diff --git a/README.md b/README.md index 7a1fbcc..51da7fb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ -# dex-listings-scanner-bot - A Telegram Bot which will notify you whenever a new pair is added on your favouirte DEXs. +# Dex Listings Scanner - Telegram Bot +A Telegram Bot which will notify you whenever a new pair is added on your favouirte DEXs. + +## Setup +1. Export your mnemomìnic private key from Metamask (preferably of an account you don't use, also it won't spend gas of course); +2. Insert it on line 5 of app.js: +''' +const mnemonic = 'YOUR MNEMONIC PHRASE GOES HERE'; +''' \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..585365b --- /dev/null +++ b/app.js @@ -0,0 +1,163 @@ +const ethers = require('ethers'); +const fs = require('fs'); +const Telegraf = require('telegraf').Telegraf; + +const mnemonic = 'YOUR MNEMONIC PHRASE GOES HERE'; +const wallet = ethers.Wallet.fromMnemonic(mnemonic); +const bot = new Telegraf('YOUR API TOKEN GOES HERE'); + +/* + ==================================================== + DEFINING DEXs AND NETWORKs INFO - ADD AN OBJECT HERE + ==================================================== +*/ + +const netswap = { + address: '0x70f51d68D16e8f9e418441280342BD43AC9Dff9f', + rpcLink: 'https://andromeda.metis.io/?owner=1088', + dex: 'Netswap' +}; + +const tethys = { + address: '0x2CdFB20205701FF01689461610C9F321D1d00F80', + rpcLink: 'https://andromeda.metis.io/?owner=1088', + dex: 'Tethys' +}; + +const trisolaris = { + address: '0xc66F594268041dB60507F00703b152492fb176E7', + rpcLink: 'https://mainnet.aurora.dev/Fon6fPMs5rCdJc4mxX4kiSK1vsKdzc3D8k6UF8aruek', + dex: 'Trisolaris' +}; + +const fuseswap = { + address: '0x1d1f1A7280D67246665Bb196F38553b469294f3a', + rpcLink: 'https://rpc.fuse.io', + dex: 'Fuseswap' +}; + +const traderjoe = { + address: '0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10', + rpcLink: 'https://api.avax.network/ext/bc/C/rpc', + dex: 'TraderJoe' +}; + +/* + ============================================== + CONTRACT OBJECTS CREATION - ADD AN OBJECT HERE + ============================================== +*/ + +const netswapFactory = buildContract(netswap.address, netswap.rpcLink); +const tethysFactory = buildContract(tethys.address, tethys.rpcLink); +const trisolarisFactory = buildContract(trisolaris.address, trisolaris.rpcLink); +const fuseswapFactory = buildContract(fuseswap.address, fuseswap.rpcLink); +const traderjoeFactory = buildContract(traderjoe.address, traderjoe.rpcLink); + +/* + ============================================= + STARTING BOT - NO NEED TO MODIFY + ============================================= +*/ + +bot.start((context) => { + /* + ===================================================================== + LISTENING ON EVERY CONTRACT'S PAIR CREATION EVENT - NO NEED TO MODIFY + ===================================================================== + */ + console.log('Bot started.') + context.reply('Scanning your favourite dexs...') + + netswapFactory.on('PairCreated', async (_token0, _token1, _pairAddress) => { + logPairInfo(_token0, _token1, _pairAddress, netswap.rpcLink, netswap.dex, context); + }); + + tethysFactory.on('PairCreated', async (_token0, _token1, _pairAddress) => { + logPairInfo(_token0, _token1, _pairAddress, tethys.rpcLink, tethys.dex, context); + }); + + trisolarisFactory.on('PairCreated', async (_token0, _token1, _pairAddress) => { + logPairInfo(_token0, _token1, _pairAddress, trisolaris.rpcLink, trisolaris.dex, context); + }); + + fuseswapFactory.on('PairCreated', async (_token0, _token1, _pairAddress) => { + logPairInfo(_token0, _token1, _pairAddress, fuseswap.rpcLink, fuseswap.dex, context); + }); + + traderjoeFactory.on('PairCreated', async (_token0, _token1, _pairAddress) => { + logPairInfo(_token0, _token1, _pairAddress, traderjoe.rpcLink, traderjoe.dex, context); + }); +}) + +bot.launch() + +/* + ============= + ============= + + AUX FUNCTIONS + + ============= + ============= +*/ + +function buildContract(_address, _rpcLink) { + const provider = new ethers.providers.JsonRpcProvider(_rpcLink); + const account = wallet.connect(provider); + + const factory = new ethers.Contract( + _address, + ['event PairCreated(address indexed token0, address indexed token1, address pair, uint)'], + account + ); + + return factory; +} + +async function getTokenSymbol(_address, _rpcLink) { + const provider = new ethers.providers.JsonRpcProvider(_rpcLink); + const account = wallet.connect(provider); + + const token = new ethers.Contract( + _address, + ["function symbol() view returns (string)"], + account + ); + + var symbol = await token.symbol(); + return '$' + symbol; +} + +async function logPairInfo(_token0, _token1, _pairAddress, rpcLink, dex, context) { + let symbol0 = await getTokenSymbol(_token0, rpcLink); + let symbol1 = await getTokenSymbol(_token1, rpcLink); + + var msg = ` +============================= +New ` + dex + ` pair detected +` + getDate() + ` + +` + symbol0 + ` : ${_token0} + +` + symbol1 + ` : ${_token1} + +pairAddress: ${_pairAddress} +=============================`; + + fs.appendFile('./logs/' + dex + '_log.txt', msg, function (err) { + if (err) throw err; + console.log(msg); + }); + + context.reply(msg); +} + +function getDate() { + var today = new Date(); + var date = today.getDate()+'-'+(today.getMonth()+1)+'-'+today.getFullYear(); + var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds(); + var dateTime = date+' '+time; + + return dateTime; +} \ No newline at end of file diff --git a/node_modules/.bin/telegraf b/node_modules/.bin/telegraf new file mode 120000 index 0000000..d09c173 --- /dev/null +++ b/node_modules/.bin/telegraf @@ -0,0 +1 @@ +../telegraf/bin/telegraf \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..742e46d --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,971 @@ +{ + "name": "DexListings", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@ethersproject/abi": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.5.0.tgz", + "integrity": "sha512-loW7I4AohP5KycATvc0MgujU6JyCHPqHdeoo9z3Nr9xEiNioxa65ccdm1+fsoJhkuhdRtfcL8cfyGamz2AxZ5w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.5.1.tgz", + "integrity": "sha512-m+MA/ful6eKbxpr99xUYeRvLkfnlqzrF8SZ46d/xFB1A7ZVknYc/sXJG0RcufF52Qn2jeFj1hhcoQ7IXjNKUqg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/networks": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/web": "^5.5.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.5.0.tgz", + "integrity": "sha512-lj//7r250MXVLKI7sVarXAbZXbv9P50lgmJQGr2/is82EwEb8r7HrxsmMqAjTsztMYy7ohrIhGMIml+Gx4D3mA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.5.0.tgz", + "integrity": "sha512-l4Nj0eWlTUh6ro5IbPTgbpT4wRbdH5l8CQf7icF7sb/SI3Nhd9Y9HzhonTSTi6CefI0necIw7LJqQPopPLZyWw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/rlp": "^5.5.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.5.0.tgz", + "integrity": "sha512-tdayUKhU1ljrlHzEWbStXazDpsx4eg1dBXUSI6+mHlYklOXoXF6lZvw8tnD6oVaWfnMxAgRSKROg3cVKtCcppA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.5.0.tgz", + "integrity": "sha512-ZIodwhHpVJ0Y3hUCfUucmxKsWQA5TMnavp5j/UOuDdzZWzJlRmuOjcTMIGgHCYuZmHt36BfiSyQPSRskPxbfaQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/properties": "^5.5.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.5.0.tgz", + "integrity": "sha512-6Xytlwvy6Rn3U3gKEc1vP7nR92frHkv6wtVr95LFR3jREXiCPzdWxKQ1cx4JGQBXxcguAwjA8murlYN2TSiEbg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "bn.js": "^4.11.9" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.5.0.tgz", + "integrity": "sha512-ABvc7BHWhZU9PNM/tANm/Qx4ostPGadAuQzWTr3doklZOhDlmcBqclrQe/ZXUIj3K8wC28oYeuRa+A37tX9kog==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.5.0.tgz", + "integrity": "sha512-2MsRRVChkvMWR+GyMGY4N1sAX9Mt3J9KykCsgUFd/1mwS0UH1qw+Bv9k1UJb3X3YJYFco9H20pjSlOIfCG5HYQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.5.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.5.0.tgz", + "integrity": "sha512-2viY7NzyvJkh+Ug17v7g3/IJC8HqZBDcOjYARZLdzRxrfGlRgmYgl6xPRKVbEzy1dWKw/iv7chDcS83pg6cLxg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "^5.5.0", + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/transactions": "^5.5.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.5.0.tgz", + "integrity": "sha512-dnGVpK1WtBjmnp3mUT0PlU2MpapnwWI0PibldQEq1408tQBAbZpPidkWoVVuNMOl/lISO3+4hXZWCL3YV7qzfg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.5.0.tgz", + "integrity": "sha512-mcSOo9zeUg1L0CoJH7zmxwUG5ggQHU1UrRf8jyTYy6HxdZV+r0PBoL1bxr+JHIPXRzS6u/UW4mEn43y0tmyF8Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/basex": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/pbkdf2": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/sha2": "^5.5.0", + "@ethersproject/signing-key": "^5.5.0", + "@ethersproject/strings": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/wordlists": "^5.5.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.5.0.tgz", + "integrity": "sha512-9lA21XQnCdcS72xlBn1jfQdj2A1VUxZzOzi9UkNdnokNKke/9Ya2xA9aIK1SC3PQyBDLt4C+dfps7ULpkvKikQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/hdnode": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/pbkdf2": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/random": "^5.5.0", + "@ethersproject/strings": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.5.0.tgz", + "integrity": "sha512-5VoFCTjo2rYbBe1l2f4mccaRFN/4VQEYFwwn04aJV2h7qf4ZvI2wFxUE1XOX+snbwCLRzIeikOqtAoPwMza9kg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.5.0.tgz", + "integrity": "sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.5.1.tgz", + "integrity": "sha512-tYRDM4zZtSUcKnD4UMuAlj7SeXH/k5WC4SP2u1Pn57++JdXHkRu2zwNkgNogZoxHzhm9Q6qqurDBVptHOsW49Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.5.0.tgz", + "integrity": "sha512-SaDvQFvXPnz1QGpzr6/HToLifftSXGoXrbpZ6BvoZhmx4bNLHrxDe8MZisuecyOziP1aVEwzC2Hasj+86TgWVg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/sha2": "^5.5.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.5.0.tgz", + "integrity": "sha512-l3zRQg3JkD8EL3CPjNK5g7kMx4qSwiR60/uk5IVjd3oq1MZR5qUg40CNOoEJoX5wc3DyY5bt9EbMk86C7x0DNA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.5.1.tgz", + "integrity": "sha512-2zdD5sltACDWhjUE12Kucg2PcgM6V2q9JMyVvObtVGnzJu+QSmibbP+BHQyLWZUBfLApx2942+7DC5D+n4wBQQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/basex": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/networks": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/random": "^5.5.0", + "@ethersproject/rlp": "^5.5.0", + "@ethersproject/sha2": "^5.5.0", + "@ethersproject/strings": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/web": "^5.5.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "node_modules/@ethersproject/random": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.5.0.tgz", + "integrity": "sha512-egGYZwZ/YIFKMHcoBUo8t3a8Hb/TKYX8BCBoLjudVCZh892welR3jOxgOmb48xznc9bTcMm7Tpwc1gHC1PFNFQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.5.0.tgz", + "integrity": "sha512-hLv8XaQ8PTI9g2RHoQGf/WSxBfTB/NudRacbzdxmst5VHAqd1sMibWG7SENzT5Dj3yZ3kJYx+WiRYEcQTAkcYA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.5.0.tgz", + "integrity": "sha512-B5UBoglbCiHamRVPLA110J+2uqsifpZaTmid2/7W5rbtYVz6gus6/hSDieIU/6gaKIDcOj12WnOdiymEUHIAOA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.5.0.tgz", + "integrity": "sha512-5VmseH7qjtNmDdZBswavhotYbWB0bOwKIlOTSlX14rKn5c11QmJwGt4GHeo7NrL/Ycl7uo9AHvEqs5xZgFBTng==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.5.0.tgz", + "integrity": "sha512-9NgZs9LhGMj6aCtHXhtmFQ4AN4sth5HuFXVvAQtzmm0jpSCNOTGtrHZJAeYTh7MBjRR8brylWZxBZR9zDStXbw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/sha2": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.5.0.tgz", + "integrity": "sha512-9fy3TtF5LrX/wTrBaT8FGE6TDJyVjOvXynXJz5MT5azq+E6D92zuKNx7i29sWW2FjVOaWjAsiZ1ZWznuduTIIQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.5.0.tgz", + "integrity": "sha512-9RZYSKX26KfzEd/1eqvv8pLauCKzDTub0Ko4LfIgaERvRuwyaNV78mJs7cpIgZaDl6RJui4o49lHwwCM0526zA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/rlp": "^5.5.0", + "@ethersproject/signing-key": "^5.5.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.5.0.tgz", + "integrity": "sha512-7+DpjiZk4v6wrikj+TCyWWa9dXLNU73tSTa7n0TSJDxkYbV3Yf1eRh9ToMLlZtuctNYu9RDNNy2USq3AdqSbag==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.5.0.tgz", + "integrity": "sha512-Mlu13hIctSYaZmUOo7r2PhNSd8eaMPVXe1wxrz4w4FCE4tDYBywDH+bAR1Xz2ADyXGwqYMwstzTrtUVIsKDO0Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/hdnode": "^5.5.0", + "@ethersproject/json-wallets": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/random": "^5.5.0", + "@ethersproject/signing-key": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/wordlists": "^5.5.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.5.1.tgz", + "integrity": "sha512-olvLvc1CB12sREc1ROPSHTdFCdvMh0J5GSJYiQg2D0hdD4QmJDy8QYDb1CvoqD/bF1c++aeKv2sR5uduuG9dQg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/base64": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.5.0.tgz", + "integrity": "sha512-bL0UTReWDiaQJJYOC9sh/XcRu/9i2jMrzf8VLRmPKx58ckSlOJiohODkECCO50dtLZHcGU6MLXQ4OOrgBwP77Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ethers": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.5.2.tgz", + "integrity": "sha512-EF5W+6Wwcu6BqVwpgmyR5U2+L4c1FQzlM/02dkZOugN3KF0cG9bzHZP+TDJglmPm2/IzCEJDT7KBxzayk7SAHw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.5.0", + "@ethersproject/abstract-provider": "5.5.1", + "@ethersproject/abstract-signer": "5.5.0", + "@ethersproject/address": "5.5.0", + "@ethersproject/base64": "5.5.0", + "@ethersproject/basex": "5.5.0", + "@ethersproject/bignumber": "5.5.0", + "@ethersproject/bytes": "5.5.0", + "@ethersproject/constants": "5.5.0", + "@ethersproject/contracts": "5.5.0", + "@ethersproject/hash": "5.5.0", + "@ethersproject/hdnode": "5.5.0", + "@ethersproject/json-wallets": "5.5.0", + "@ethersproject/keccak256": "5.5.0", + "@ethersproject/logger": "5.5.0", + "@ethersproject/networks": "5.5.1", + "@ethersproject/pbkdf2": "5.5.0", + "@ethersproject/properties": "5.5.0", + "@ethersproject/providers": "5.5.1", + "@ethersproject/random": "5.5.0", + "@ethersproject/rlp": "5.5.0", + "@ethersproject/sha2": "5.5.0", + "@ethersproject/signing-key": "5.5.0", + "@ethersproject/solidity": "5.5.0", + "@ethersproject/strings": "5.5.0", + "@ethersproject/transactions": "5.5.0", + "@ethersproject/units": "5.5.0", + "@ethersproject/wallet": "5.5.0", + "@ethersproject/web": "5.5.1", + "@ethersproject/wordlists": "5.5.0" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/module-alias": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.2.tgz", + "integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==" + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/p-timeout": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz", + "integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/safe-compare": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/safe-compare/-/safe-compare-1.1.4.tgz", + "integrity": "sha512-b9wZ986HHCo/HbKrRpBJb2kqXMK9CEWIE1egeEvZsYn69ay3kdfl9nG3RyOcR+jInTDf7a86WQ1d4VJX7goSSQ==", + "dependencies": { + "buffer-alloc": "^1.2.0" + } + }, + "node_modules/sandwich-stream": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sandwich-stream/-/sandwich-stream-2.0.2.tgz", + "integrity": "sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "node_modules/telegraf": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.5.2.tgz", + "integrity": "sha512-OG68wQqYQQq2ldzAMv6JJUkh9XU+4mWRgHinMeJ8FoRA5ZZuA4WauqRFi8aY/OQiwJM2gTT2XWCfopN2dZWDNw==", + "dependencies": { + "abort-controller": "^3.0.0", + "debug": "^4.3.3", + "minimist": "^1.2.5", + "module-alias": "^2.2.2", + "node-fetch": "^2.6.6", + "p-timeout": "^4.1.0", + "safe-compare": "^1.1.4", + "sandwich-stream": "^2.0.2", + "typegram": "^3.6.1" + }, + "bin": { + "telegraf": "bin/telegraf" + }, + "engines": { + "node": "^12.20.0 || >=14.13.1" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "node_modules/typegram": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/typegram/-/typegram-3.6.3.tgz", + "integrity": "sha512-mELK/ufnwLvc3MkOcrY8TlXXW+elYuGaNt/2eu+0YAFWp1F4MVvVoCOxKe3co0Y3XDKfWrtf2uFk5S5PvzLlqg==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/node_modules/@ethersproject/abi/LICENSE.md b/node_modules/@ethersproject/abi/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/abi/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/abi/README.md b/node_modules/@ethersproject/abi/README.md new file mode 100644 index 0000000..ded58c9 --- /dev/null +++ b/node_modules/@ethersproject/abi/README.md @@ -0,0 +1,52 @@ +Ethereum ABI Coder +================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for encoding and decoding the Application Binary Interface (ABI) +used by most smart contracts to interoperate between other smart contracts and clients. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/abi/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + ConstructorFragment, + EventFragment, + Fragment, + FunctionFragment, + ParamType, + FormatTypes, + + AbiCoder, + defaultAbiCoder, + + Interface, + Indexed, + + ///////////////////////// + // Types + + CoerceFunc, + JsonFragment, + JsonFragmentType, + + Result, + checkResultErrors, + + LogDescription, + TransactionDescription + +} = require("@ethersproject/abi"); +``` + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/abi/lib.esm/_version.d.ts b/node_modules/@ethersproject/abi/lib.esm/_version.d.ts new file mode 100644 index 0000000..6a0cecf --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abi/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/_version.js b/node_modules/@ethersproject/abi/lib.esm/_version.js new file mode 100644 index 0000000..f2822f7 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "abi/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/_version.js.map b/node_modules/@ethersproject/abi/lib.esm/_version.js.map new file mode 100644 index 0000000..4854997 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts b/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts new file mode 100644 index 0000000..7bfd727 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts @@ -0,0 +1,17 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { Coder, Reader, Result, Writer } from "./coders/abstract-coder"; +import { ParamType } from "./fragments"; +export declare type CoerceFunc = (type: string, value: any) => any; +export declare class AbiCoder { + readonly coerceFunc: CoerceFunc; + constructor(coerceFunc?: CoerceFunc); + _getCoder(param: ParamType): Coder; + _getWordSize(): number; + _getReader(data: Uint8Array, allowLoose?: boolean): Reader; + _getWriter(): Writer; + getDefaultValue(types: ReadonlyArray): Result; + encode(types: ReadonlyArray, values: ReadonlyArray): string; + decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result; +} +export declare const defaultAbiCoder: AbiCoder; +//# sourceMappingURL=abi-coder.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts.map new file mode 100644 index 0000000..836dece --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"abi-coder.d.ts","sourceRoot":"","sources":["../src.ts/abi-coder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAO3D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAWxE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAOxC,oBAAY,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE3D,qBAAa,QAAQ;IACjB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;gBAEpB,UAAU,CAAC,EAAE,UAAU;IAKnC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK;IA4ClC,YAAY,IAAI,MAAM;IAEtB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;IAI1D,UAAU,IAAI,MAAM;IAIpB,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM;IAMjE,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM;IAgBpF,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM;CAK7F;AAED,eAAO,MAAM,eAAe,EAAE,QAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/abi-coder.js b/node_modules/@ethersproject/abi/lib.esm/abi-coder.js new file mode 100644 index 0000000..5c0fe77 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/abi-coder.js @@ -0,0 +1,97 @@ +"use strict"; +// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI +import { arrayify } from "@ethersproject/bytes"; +import { defineReadOnly } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { Reader, Writer } from "./coders/abstract-coder"; +import { AddressCoder } from "./coders/address"; +import { ArrayCoder } from "./coders/array"; +import { BooleanCoder } from "./coders/boolean"; +import { BytesCoder } from "./coders/bytes"; +import { FixedBytesCoder } from "./coders/fixed-bytes"; +import { NullCoder } from "./coders/null"; +import { NumberCoder } from "./coders/number"; +import { StringCoder } from "./coders/string"; +import { TupleCoder } from "./coders/tuple"; +import { ParamType } from "./fragments"; +const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); +const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); +export class AbiCoder { + constructor(coerceFunc) { + logger.checkNew(new.target, AbiCoder); + defineReadOnly(this, "coerceFunc", coerceFunc || null); + } + _getCoder(param) { + switch (param.baseType) { + case "address": + return new AddressCoder(param.name); + case "bool": + return new BooleanCoder(param.name); + case "string": + return new StringCoder(param.name); + case "bytes": + return new BytesCoder(param.name); + case "array": + return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name); + case "tuple": + return new TupleCoder((param.components || []).map((component) => { + return this._getCoder(component); + }), param.name); + case "": + return new NullCoder(param.name); + } + // u?int[0-9]* + let match = param.type.match(paramTypeNumber); + if (match) { + let size = parseInt(match[2] || "256"); + if (size === 0 || size > 256 || (size % 8) !== 0) { + logger.throwArgumentError("invalid " + match[1] + " bit length", "param", param); + } + return new NumberCoder(size / 8, (match[1] === "int"), param.name); + } + // bytes[0-9]+ + match = param.type.match(paramTypeBytes); + if (match) { + let size = parseInt(match[1]); + if (size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes length", "param", param); + } + return new FixedBytesCoder(size, param.name); + } + return logger.throwArgumentError("invalid type", "type", param.type); + } + _getWordSize() { return 32; } + _getReader(data, allowLoose) { + return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose); + } + _getWriter() { + return new Writer(this._getWordSize()); + } + getDefaultValue(types) { + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = new TupleCoder(coders, "_"); + return coder.defaultValue(); + } + encode(types, values) { + if (types.length !== values.length) { + logger.throwError("types/values length mismatch", Logger.errors.INVALID_ARGUMENT, { + count: { types: types.length, values: values.length }, + value: { types: types, values: values } + }); + } + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = (new TupleCoder(coders, "_")); + const writer = this._getWriter(); + coder.encode(writer, values); + return writer.data; + } + decode(types, data, loose) { + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = new TupleCoder(coders, "_"); + return coder.decode(this._getReader(arrayify(data), loose)); + } +} +export const defaultAbiCoder = new AbiCoder(); +//# sourceMappingURL=abi-coder.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/abi-coder.js.map b/node_modules/@ethersproject/abi/lib.esm/abi-coder.js.map new file mode 100644 index 0000000..aab32d7 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/abi-coder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abi-coder.js","sourceRoot":"","sources":["../src.ts/abi-coder.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,mEAAmE;AAEnE,OAAO,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAS,MAAM,EAAU,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,YAAY,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AAE,MAAM,EAAE,MAAM,EAAE;aAC1C,CAAC,CAAC;SACN;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;QAE5C,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,OAAO,MAAM,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,KAAwC,EAAE,IAAe,EAAE,KAAe;QAC7E,MAAM,MAAM,GAAiB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACvF,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1C,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,eAAe,GAAa,IAAI,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts new file mode 100644 index 0000000..f499d13 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts @@ -0,0 +1,53 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +export interface Result extends ReadonlyArray { + readonly [key: string]: any; +} +export declare function checkResultErrors(result: Result): Array<{ + path: Array; + error: Error; +}>; +export declare type CoerceFunc = (type: string, value: any) => any; +export declare abstract class Coder { + readonly name: string; + readonly type: string; + readonly localName: string; + readonly dynamic: boolean; + constructor(name: string, type: string, localName: string, dynamic: boolean); + _throwError(message: string, value: any): void; + abstract encode(writer: Writer, value: any): number; + abstract decode(reader: Reader): any; + abstract defaultValue(): any; +} +export declare class Writer { + readonly wordSize: number; + _data: Array; + _dataLength: number; + _padding: Uint8Array; + constructor(wordSize?: number); + get data(): string; + get length(): number; + _writeData(data: Uint8Array): number; + appendWriter(writer: Writer): number; + writeBytes(value: BytesLike): number; + _getValue(value: BigNumberish): Uint8Array; + writeValue(value: BigNumberish): number; + writeUpdatableValue(): (value: BigNumberish) => void; +} +export declare class Reader { + readonly wordSize: number; + readonly allowLoose: boolean; + readonly _data: Uint8Array; + readonly _coerceFunc: CoerceFunc; + _offset: number; + constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean); + get data(): string; + get consumed(): number; + static coerce(name: string, value: any): any; + coerce(name: string, value: any): any; + _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array; + subReader(offset: number): Reader; + readBytes(length: number, loose?: boolean): Uint8Array; + readValue(): BigNumber; +} +//# sourceMappingURL=abstract-coder.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts.map new file mode 100644 index 0000000..2a6c329 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"abstract-coder.d.ts","sourceRoot":"","sources":["../../src.ts/coders/abstract-coder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAA8B,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAO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/abstract-coder.js new file mode 100644 index 0000000..9c48922 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js @@ -0,0 +1,147 @@ +"use strict"; +import { arrayify, concat, hexConcat, hexlify } from "@ethersproject/bytes"; +import { BigNumber } from "@ethersproject/bignumber"; +import { defineReadOnly } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "../_version"; +const logger = new Logger(version); +export function checkResultErrors(result) { + // Find the first error (if any) + const errors = []; + const checkErrors = function (path, object) { + if (!Array.isArray(object)) { + return; + } + for (let key in object) { + const childPath = path.slice(); + childPath.push(key); + try { + checkErrors(childPath, object[key]); + } + catch (error) { + errors.push({ path: childPath, error: error }); + } + } + }; + checkErrors([], result); + return errors; +} +export class Coder { + constructor(name, type, localName, dynamic) { + // @TODO: defineReadOnly these + this.name = name; + this.type = type; + this.localName = localName; + this.dynamic = dynamic; + } + _throwError(message, value) { + logger.throwArgumentError(message, this.localName, value); + } +} +export class Writer { + constructor(wordSize) { + defineReadOnly(this, "wordSize", wordSize || 32); + this._data = []; + this._dataLength = 0; + this._padding = new Uint8Array(wordSize); + } + get data() { + return hexConcat(this._data); + } + get length() { return this._dataLength; } + _writeData(data) { + this._data.push(data); + this._dataLength += data.length; + return data.length; + } + appendWriter(writer) { + return this._writeData(concat(writer._data)); + } + // Arrayish items; padded on the right to wordSize + writeBytes(value) { + let bytes = arrayify(value); + const paddingOffset = bytes.length % this.wordSize; + if (paddingOffset) { + bytes = concat([bytes, this._padding.slice(paddingOffset)]); + } + return this._writeData(bytes); + } + _getValue(value) { + let bytes = arrayify(BigNumber.from(value)); + if (bytes.length > this.wordSize) { + logger.throwError("value out-of-bounds", Logger.errors.BUFFER_OVERRUN, { + length: this.wordSize, + offset: bytes.length + }); + } + if (bytes.length % this.wordSize) { + bytes = concat([this._padding.slice(bytes.length % this.wordSize), bytes]); + } + return bytes; + } + // BigNumberish items; padded on the left to wordSize + writeValue(value) { + return this._writeData(this._getValue(value)); + } + writeUpdatableValue() { + const offset = this._data.length; + this._data.push(this._padding); + this._dataLength += this.wordSize; + return (value) => { + this._data[offset] = this._getValue(value); + }; + } +} +export class Reader { + constructor(data, wordSize, coerceFunc, allowLoose) { + defineReadOnly(this, "_data", arrayify(data)); + defineReadOnly(this, "wordSize", wordSize || 32); + defineReadOnly(this, "_coerceFunc", coerceFunc); + defineReadOnly(this, "allowLoose", allowLoose); + this._offset = 0; + } + get data() { return hexlify(this._data); } + get consumed() { return this._offset; } + // The default Coerce function + static coerce(name, value) { + let match = name.match("^u?int([0-9]+)$"); + if (match && parseInt(match[1]) <= 48) { + value = value.toNumber(); + } + return value; + } + coerce(name, value) { + if (this._coerceFunc) { + return this._coerceFunc(name, value); + } + return Reader.coerce(name, value); + } + _peekBytes(offset, length, loose) { + let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize; + if (this._offset + alignedLength > this._data.length) { + if (this.allowLoose && loose && this._offset + length <= this._data.length) { + alignedLength = length; + } + else { + logger.throwError("data out-of-bounds", Logger.errors.BUFFER_OVERRUN, { + length: this._data.length, + offset: this._offset + alignedLength + }); + } + } + return this._data.slice(this._offset, this._offset + alignedLength); + } + subReader(offset) { + return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose); + } + readBytes(length, loose) { + let bytes = this._peekBytes(0, length, !!loose); + this._offset += bytes.length; + // @TODO: Make sure the length..end bytes are all 0? + return bytes.slice(0, length); + } + readValue() { + return BigNumber.from(this.readBytes(this.wordSize)); + } +} +//# sourceMappingURL=abstract-coder.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js.map new file mode 100644 index 0000000..a806e74 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abstract-coder.js","sourceRoot":"","sources":["../../src.ts/coders/abstract-coder.ts"],"names":[],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AAC,CAAC;IACzD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts new file mode 100644 index 0000000..05df08a --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts @@ -0,0 +1,8 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class AddressCoder extends Coder { + constructor(localName: string); + defaultValue(): string; + encode(writer: Writer, value: string): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=address.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts.map new file mode 100644 index 0000000..e1d2620 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src.ts/coders/address.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,YAAa,SAAQ,KAAK;gBAEvB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAS7C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/address.js b/node_modules/@ethersproject/abi/lib.esm/coders/address.js new file mode 100644 index 0000000..39988bd --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/address.js @@ -0,0 +1,25 @@ +"use strict"; +import { getAddress } from "@ethersproject/address"; +import { hexZeroPad } from "@ethersproject/bytes"; +import { Coder } from "./abstract-coder"; +export class AddressCoder extends Coder { + constructor(localName) { + super("address", "address", localName, false); + } + defaultValue() { + return "0x0000000000000000000000000000000000000000"; + } + encode(writer, value) { + try { + value = getAddress(value); + } + catch (error) { + this._throwError(error.message, value); + } + return writer.writeValue(value); + } + decode(reader) { + return getAddress(hexZeroPad(reader.readValue().toHexString(), 20)); + } +} +//# sourceMappingURL=address.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/address.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/address.js.map new file mode 100644 index 0000000..a9526ea --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/address.js.map @@ -0,0 +1 @@ +{"version":3,"file":"address.js","sourceRoot":"","sources":["../../src.ts/coders/address.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,MAAM,OAAO,YAAa,SAAQ,KAAK;IAEnC,YAAY,SAAiB;QACzB,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,YAAY;QACR,OAAO,4CAA4C,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAa;QAChC,IAAI;YACA,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;SAC5B;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts new file mode 100644 index 0000000..8e02344 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts @@ -0,0 +1,9 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class AnonymousCoder extends Coder { + private coder; + constructor(coder: Coder); + defaultValue(): any; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=anonymous.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts.map new file mode 100644 index 0000000..21f89b6 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"anonymous.d.ts","sourceRoot":"","sources":["../../src.ts/coders/anonymous.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,qBAAa,cAAe,SAAQ,KAAK;IACrC,OAAO,CAAC,KAAK,CAAQ;gBAET,KAAK,EAAE,KAAK;IAKxB,YAAY,IAAI,GAAG;IAInB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAI1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js new file mode 100644 index 0000000..b4b2a31 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js @@ -0,0 +1,19 @@ +"use strict"; +import { Coder } from "./abstract-coder"; +// Clones the functionality of an existing Coder, but without a localName +export class AnonymousCoder extends Coder { + constructor(coder) { + super(coder.name, coder.type, undefined, coder.dynamic); + this.coder = coder; + } + defaultValue() { + return this.coder.defaultValue(); + } + encode(writer, value) { + return this.coder.encode(writer, value); + } + decode(reader) { + return this.coder.decode(reader); + } +} +//# sourceMappingURL=anonymous.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js.map new file mode 100644 index 0000000..af89875 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js.map @@ -0,0 +1 @@ +{"version":3,"file":"anonymous.js","sourceRoot":"","sources":["../../src.ts/coders/anonymous.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,yEAAyE;AACzE,MAAM,OAAO,cAAe,SAAQ,KAAK;IAGrC,YAAY,KAAY;QACpB,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts new file mode 100644 index 0000000..62032c5 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts @@ -0,0 +1,14 @@ +import { Coder, Reader, Result, Writer } from "./abstract-coder"; +export declare function pack(writer: Writer, coders: ReadonlyArray, values: Array | { + [name: string]: any; +}): number; +export declare function unpack(reader: Reader, coders: Array): Result; +export declare class ArrayCoder extends Coder { + readonly coder: Coder; + readonly length: number; + constructor(coder: Coder, length: number, localName: string); + defaultValue(): Array; + encode(writer: Writer, value: Array): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts.map new file mode 100644 index 0000000..05f6898 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src.ts/coders/array.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGjE,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,GAAG,CAAA;CAAE,GAAG,MAAM,CAuEzH;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,CAmFnE;AAGD,qBAAa,UAAW,SAAQ,KAAK;IACjC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAS3D,YAAY,IAAI,KAAK,CAAC,GAAG,CAAC;IAW1B,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM;IAoBjD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAsB9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/array.js b/node_modules/@ethersproject/abi/lib.esm/coders/array.js new file mode 100644 index 0000000..662582c --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/array.js @@ -0,0 +1,209 @@ +"use strict"; +import { Logger } from "@ethersproject/logger"; +import { version } from "../_version"; +const logger = new Logger(version); +import { Coder, Writer } from "./abstract-coder"; +import { AnonymousCoder } from "./anonymous"; +export function pack(writer, coders, values) { + let arrayValues = null; + if (Array.isArray(values)) { + arrayValues = values; + } + else if (values && typeof (values) === "object") { + let unique = {}; + arrayValues = coders.map((coder) => { + const name = coder.localName; + if (!name) { + logger.throwError("cannot encode object for signature with missing names", Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + if (unique[name]) { + logger.throwError("cannot encode object for signature with duplicate names", Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + unique[name] = true; + return values[name]; + }); + } + else { + logger.throwArgumentError("invalid tuple value", "tuple", values); + } + if (coders.length !== arrayValues.length) { + logger.throwArgumentError("types/value length mismatch", "tuple", values); + } + let staticWriter = new Writer(writer.wordSize); + let dynamicWriter = new Writer(writer.wordSize); + let updateFuncs = []; + coders.forEach((coder, index) => { + let value = arrayValues[index]; + if (coder.dynamic) { + // Get current dynamic offset (for the future pointer) + let dynamicOffset = dynamicWriter.length; + // Encode the dynamic value into the dynamicWriter + coder.encode(dynamicWriter, value); + // Prepare to populate the correct offset once we are done + let updateFunc = staticWriter.writeUpdatableValue(); + updateFuncs.push((baseOffset) => { + updateFunc(baseOffset + dynamicOffset); + }); + } + else { + coder.encode(staticWriter, value); + } + }); + // Backfill all the dynamic offsets, now that we know the static length + updateFuncs.forEach((func) => { func(staticWriter.length); }); + let length = writer.appendWriter(staticWriter); + length += writer.appendWriter(dynamicWriter); + return length; +} +export function unpack(reader, coders) { + let values = []; + // A reader anchored to this base + let baseReader = reader.subReader(0); + coders.forEach((coder) => { + let value = null; + if (coder.dynamic) { + let offset = reader.readValue(); + let offsetReader = baseReader.subReader(offset.toNumber()); + try { + value = coder.decode(offsetReader); + } + catch (error) { + // Cannot recover from this + if (error.code === Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + else { + try { + value = coder.decode(reader); + } + catch (error) { + // Cannot recover from this + if (error.code === Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + if (value != undefined) { + values.push(value); + } + }); + // We only output named properties for uniquely named coders + const uniqueNames = coders.reduce((accum, coder) => { + const name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add any named parameters (i.e. tuples) + coders.forEach((coder, index) => { + let name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + const value = values[index]; + if (value instanceof Error) { + Object.defineProperty(values, name, { + enumerable: true, + get: () => { throw value; } + }); + } + else { + values[name] = value; + } + }); + for (let i = 0; i < values.length; i++) { + const value = values[i]; + if (value instanceof Error) { + Object.defineProperty(values, i, { + enumerable: true, + get: () => { throw value; } + }); + } + } + return Object.freeze(values); +} +export class ArrayCoder extends Coder { + constructor(coder, length, localName) { + const type = (coder.type + "[" + (length >= 0 ? length : "") + "]"); + const dynamic = (length === -1 || coder.dynamic); + super("array", type, localName, dynamic); + this.coder = coder; + this.length = length; + } + defaultValue() { + // Verifies the child coder is valid (even if the array is dynamic or 0-length) + const defaultChild = this.coder.defaultValue(); + const result = []; + for (let i = 0; i < this.length; i++) { + result.push(defaultChild); + } + return result; + } + encode(writer, value) { + if (!Array.isArray(value)) { + this._throwError("expected array value", value); + } + let count = this.length; + if (count === -1) { + count = value.length; + writer.writeValue(value.length); + } + logger.checkArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : "")); + let coders = []; + for (let i = 0; i < value.length; i++) { + coders.push(this.coder); + } + return pack(writer, coders, value); + } + decode(reader) { + let count = this.length; + if (count === -1) { + count = reader.readValue().toNumber(); + // Check that there is *roughly* enough data to ensure + // stray random data is not being read as a length. Each + // slot requires at least 32 bytes for their value (or 32 + // bytes as a link to the data). This could use a much + // tighter bound, but we are erroring on the side of safety. + if (count * 32 > reader._data.length) { + logger.throwError("insufficient data length", Logger.errors.BUFFER_OVERRUN, { + length: reader._data.length, + count: count + }); + } + } + let coders = []; + for (let i = 0; i < count; i++) { + coders.push(new AnonymousCoder(this.coder)); + } + return reader.coerce(this.name, unpack(reader, coders)); + } +} +//# sourceMappingURL=array.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/array.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/array.js.map new file mode 100644 index 0000000..63a12ba --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"array.js","sourceRoot":"","sources":["../../src.ts/coders/array.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAkB,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,UAAU,IAAI,CAAC,MAAc,EAAE,MAA4B,EAAE,MAA8C;IAC7G,IAAI,WAAW,GAAe,IAAI,CAAC;IAEnC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACxB,WAAW,GAAG,MAAM,CAAC;KAEvB;SAAM,IAAI,MAAM,IAAI,OAAM,CAAC,MAAM,C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,CAAC,CAAC,CAAC;SAAE;QAEhF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts new file mode 100644 index 0000000..ae83580 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts @@ -0,0 +1,8 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class BooleanCoder extends Coder { + constructor(localName: string); + defaultValue(): boolean; + encode(writer: Writer, value: boolean): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=boolean.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts.map new file mode 100644 index 0000000..e265fba --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src.ts/coders/boolean.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,YAAa,SAAQ,KAAK;gBAEvB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,OAAO;IAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM;IAI9C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js new file mode 100644 index 0000000..5c81c72 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js @@ -0,0 +1,17 @@ +"use strict"; +import { Coder } from "./abstract-coder"; +export class BooleanCoder extends Coder { + constructor(localName) { + super("bool", "bool", localName, false); + } + defaultValue() { + return false; + } + encode(writer, value) { + return writer.writeValue(value ? 1 : 0); + } + decode(reader) { + return reader.coerce(this.type, !reader.readValue().isZero()); + } +} +//# sourceMappingURL=boolean.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js.map new file mode 100644 index 0000000..a24d8b0 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../src.ts/coders/boolean.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,MAAM,OAAO,YAAa,SAAQ,KAAK;IAEnC,YAAY,SAAiB;QACzB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,YAAY;QACR,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAc;QACjC,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts new file mode 100644 index 0000000..7fbcf7b --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts @@ -0,0 +1,12 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class DynamicBytesCoder extends Coder { + constructor(type: string, localName: string); + defaultValue(): string; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +export declare class BytesCoder extends DynamicBytesCoder { + constructor(localName: string); + decode(reader: Reader): any; +} +//# sourceMappingURL=bytes.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts.map new file mode 100644 index 0000000..aec892c --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src.ts/coders/bytes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC5B,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAI3C,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAO1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B;AAED,qBAAa,UAAW,SAAQ,iBAAiB;gBACjC,SAAS,EAAE,MAAM;IAI7B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js new file mode 100644 index 0000000..d3264c2 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js @@ -0,0 +1,29 @@ +"use strict"; +import { arrayify, hexlify } from "@ethersproject/bytes"; +import { Coder } from "./abstract-coder"; +export class DynamicBytesCoder extends Coder { + constructor(type, localName) { + super(type, type, localName, true); + } + defaultValue() { + return "0x"; + } + encode(writer, value) { + value = arrayify(value); + let length = writer.writeValue(value.length); + length += writer.writeBytes(value); + return length; + } + decode(reader) { + return reader.readBytes(reader.readValue().toNumber(), true); + } +} +export class BytesCoder extends DynamicBytesCoder { + constructor(localName) { + super("bytes", localName); + } + decode(reader) { + return reader.coerce(this.name, hexlify(super.decode(reader))); + } +} +//# sourceMappingURL=bytes.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js.map new file mode 100644 index 0000000..51480b3 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../src.ts/coders/bytes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACxC,YAAY,IAAY,EAAE,SAAiB;QACxC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;CACJ;AAED,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAC7C,YAAY,SAAiB;QACzB,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts new file mode 100644 index 0000000..e345513 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts @@ -0,0 +1,10 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class FixedBytesCoder extends Coder { + readonly size: number; + constructor(size: number, localName: string); + defaultValue(): string; + encode(writer: Writer, value: BytesLike): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=fixed-bytes.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts.map new file mode 100644 index 0000000..42da7a4 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fixed-bytes.d.ts","sourceRoot":"","sources":["../../src.ts/coders/fixed-bytes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,qBAAa,eAAgB,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAM3C,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM;IAMhD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js new file mode 100644 index 0000000..d0298e4 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js @@ -0,0 +1,25 @@ +"use strict"; +import { arrayify, hexlify } from "@ethersproject/bytes"; +import { Coder } from "./abstract-coder"; +// @TODO: Merge this with bytes +export class FixedBytesCoder extends Coder { + constructor(size, localName) { + let name = "bytes" + String(size); + super(name, name, localName, false); + this.size = size; + } + defaultValue() { + return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2); + } + encode(writer, value) { + let data = arrayify(value); + if (data.length !== this.size) { + this._throwError("incorrect data length", value); + } + return writer.writeBytes(data); + } + decode(reader) { + return reader.coerce(this.name, hexlify(reader.readBytes(this.size))); + } +} +//# sourceMappingURL=fixed-bytes.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js.map new file mode 100644 index 0000000..2839d22 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fixed-bytes.js","sourceRoot":"","sources":["../../src.ts/coders/fixed-bytes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,+BAA+B;AAC/B,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAGtC,YAAY,IAAY,EAAE,SAAiB;QACvC,IAAI,IAAI,GAAG,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,YAAY;QACR,OAAO,CAAC,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAClH,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAgB;QACnC,IAAI,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;SAAE;QACpF,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts new file mode 100644 index 0000000..04ff0fa --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts @@ -0,0 +1,8 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class NullCoder extends Coder { + constructor(localName: string); + defaultValue(): null; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=null.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts.map new file mode 100644 index 0000000..96ad6ef --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"null.d.ts","sourceRoot":"","sources":["../../src.ts/coders/null.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,SAAU,SAAQ,KAAK;gBAEpB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,IAAI;IAIpB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAK1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAI9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/null.js b/node_modules/@ethersproject/abi/lib.esm/coders/null.js new file mode 100644 index 0000000..a58eb49 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/null.js @@ -0,0 +1,21 @@ +"use strict"; +import { Coder } from "./abstract-coder"; +export class NullCoder extends Coder { + constructor(localName) { + super("null", "", localName, false); + } + defaultValue() { + return null; + } + encode(writer, value) { + if (value != null) { + this._throwError("not null", value); + } + return writer.writeBytes([]); + } + decode(reader) { + reader.readBytes(0); + return reader.coerce(this.name, null); + } +} +//# sourceMappingURL=null.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/null.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/null.js.map new file mode 100644 index 0000000..93886ef --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/null.js.map @@ -0,0 +1 @@ +{"version":3,"file":"null.js","sourceRoot":"","sources":["../../src.ts/coders/null.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEhC,YAAY,SAAiB;QACzB,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,IAAI,KAAK,IAAI,IAAI,EAAE;YAAE,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAAE;QAC3D,OAAO,MAAM,CAAC,UAAU,CAAC,EAAG,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts new file mode 100644 index 0000000..f1cd379 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts @@ -0,0 +1,11 @@ +import { BigNumberish } from "@ethersproject/bignumber"; +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class NumberCoder extends Coder { + readonly size: number; + readonly signed: boolean; + constructor(size: number, signed: boolean, localName: string); + defaultValue(): number; + encode(writer: Writer, value: BigNumberish): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts.map new file mode 100644 index 0000000..c3f5f90 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src.ts/coders/number.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,WAAY,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAEb,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM;IAQ5D,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM;IAuBnD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAS9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/number.js b/node_modules/@ethersproject/abi/lib.esm/coders/number.js new file mode 100644 index 0000000..8c7dd86 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/number.js @@ -0,0 +1,42 @@ +"use strict"; +import { BigNumber } from "@ethersproject/bignumber"; +import { MaxUint256, NegativeOne, One, Zero } from "@ethersproject/constants"; +import { Coder } from "./abstract-coder"; +export class NumberCoder extends Coder { + constructor(size, signed, localName) { + const name = ((signed ? "int" : "uint") + (size * 8)); + super(name, name, localName, false); + this.size = size; + this.signed = signed; + } + defaultValue() { + return 0; + } + encode(writer, value) { + let v = BigNumber.from(value); + // Check bounds are safe for encoding + let maxUintValue = MaxUint256.mask(writer.wordSize * 8); + if (this.signed) { + let bounds = maxUintValue.mask(this.size * 8 - 1); + if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) { + this._throwError("value out-of-bounds", value); + } + } + else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) { + this._throwError("value out-of-bounds", value); + } + v = v.toTwos(this.size * 8).mask(this.size * 8); + if (this.signed) { + v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize); + } + return writer.writeValue(v); + } + decode(reader) { + let value = reader.readValue().mask(this.size * 8); + if (this.signed) { + value = value.fromTwos(this.size * 8); + } + return reader.coerce(this.name, value); + } +} +//# sourceMappingURL=number.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/number.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/number.js.map new file mode 100644 index 0000000..c6515ec --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/number.js.map @@ -0,0 +1 @@ +{"version":3,"file":"number.js","sourceRoot":"","sources":["../../src.ts/coders/number.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAEzD,MAAM,OAAO,WAAY,SAAQ,KAAK;IAIlC,YAAY,IAAY,EAAE,MAAe,EAAE,SAAiB;QACxD,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;QACrD,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QAEpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,YAAY;QACR,OAAO,CAAC,CAAC;IACb,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAmB;QACtC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE9B,qCAAqC;QACrC,IAAI,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,MAAM,GAAG,YAAY,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K,CAAC,CAAC;IAC3C,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts new file mode 100644 index 0000000..08d75c3 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts @@ -0,0 +1,9 @@ +import { Reader, Writer } from "./abstract-coder"; +import { DynamicBytesCoder } from "./bytes"; +export declare class StringCoder extends DynamicBytesCoder { + constructor(localName: string); + defaultValue(): string; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts.map new file mode 100644 index 0000000..30d1e61 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src.ts/coders/string.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,qBAAa,WAAY,SAAQ,iBAAiB;gBAElC,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAI1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/string.js b/node_modules/@ethersproject/abi/lib.esm/coders/string.js new file mode 100644 index 0000000..f09c9a2 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/string.js @@ -0,0 +1,18 @@ +"use strict"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; +import { DynamicBytesCoder } from "./bytes"; +export class StringCoder extends DynamicBytesCoder { + constructor(localName) { + super("string", localName); + } + defaultValue() { + return ""; + } + encode(writer, value) { + return super.encode(writer, toUtf8Bytes(value)); + } + decode(reader) { + return toUtf8String(super.decode(reader)); + } +} +//# sourceMappingURL=string.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/string.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/string.js.map new file mode 100644 index 0000000..21dfd0e --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src.ts/coders/string.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAE9C,YAAY,SAAiB;QACzB,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED,YAAY;QACR,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts new file mode 100644 index 0000000..514d5c2 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts @@ -0,0 +1,11 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class TupleCoder extends Coder { + readonly coders: Array; + constructor(coders: Array, localName: string); + defaultValue(): any; + encode(writer: Writer, value: Array | { + [name: string]: any; + }): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=tuple.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts.map new file mode 100644 index 0000000..47858e1 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../src.ts/coders/tuple.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,qBAAa,UAAW,SAAQ,KAAK;IACjC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAElB,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM;IAanD,YAAY,IAAI,GAAG;IA+BnB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG;QAAE,CAAE,IAAI,EAAE,MAAM,GAAI,GAAG,CAAA;KAAE,GAAG,MAAM;IAI7E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js new file mode 100644 index 0000000..c8625f8 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js @@ -0,0 +1,57 @@ +"use strict"; +import { Coder } from "./abstract-coder"; +import { pack, unpack } from "./array"; +export class TupleCoder extends Coder { + constructor(coders, localName) { + let dynamic = false; + const types = []; + coders.forEach((coder) => { + if (coder.dynamic) { + dynamic = true; + } + types.push(coder.type); + }); + const type = ("tuple(" + types.join(",") + ")"); + super("tuple", type, localName, dynamic); + this.coders = coders; + } + defaultValue() { + const values = []; + this.coders.forEach((coder) => { + values.push(coder.defaultValue()); + }); + // We only output named properties for uniquely named coders + const uniqueNames = this.coders.reduce((accum, coder) => { + const name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add named values + this.coders.forEach((coder, index) => { + let name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + values[name] = values[index]; + }); + return Object.freeze(values); + } + encode(writer, value) { + return pack(writer, this.coders, value); + } + decode(reader) { + return reader.coerce(this.name, unpack(reader, this.coders)); + } +} +//# sourceMappingURL=tuple.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js.map b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js.map new file mode 100644 index 0000000..0fdc1bc --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../src.ts/coders/tuple.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,OAAO,UAAW,SAAQ,KAAK;IAGjC,YAAY,MAAoB,EAAE,SAAiB;QAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,KAAK,GAAkB,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACrB,IAAI,KAAK,CAAC,OAAO,EAAE;gBAAE,OAAO,GAAG,IAAI,CAAC;aAAE;YACtC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,CAAC,QAAQ,GAAG,KAA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,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAA6C;QAChE,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts b/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts new file mode 100644 index 0000000..2b9b253 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts @@ -0,0 +1,85 @@ +import { BigNumber } from "@ethersproject/bignumber"; +export interface JsonFragmentType { + readonly name?: string; + readonly indexed?: boolean; + readonly type?: string; + readonly internalType?: any; + readonly components?: ReadonlyArray; +} +export interface JsonFragment { + readonly name?: string; + readonly type?: string; + readonly anonymous?: boolean; + readonly payable?: boolean; + readonly constant?: boolean; + readonly stateMutability?: string; + readonly inputs?: ReadonlyArray; + readonly outputs?: ReadonlyArray; + readonly gas?: string; +} +export declare const FormatTypes: { + [name: string]: string; +}; +export declare class ParamType { + readonly name: string; + readonly type: string; + readonly baseType: string; + readonly indexed: boolean; + readonly components: Array; + readonly arrayLength: number; + readonly arrayChildren: ParamType; + readonly _isParamType: boolean; + constructor(constructorGuard: any, params: any); + format(format?: string): string; + static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType; + static fromObject(value: JsonFragmentType | ParamType): ParamType; + static fromString(value: string, allowIndexed?: boolean): ParamType; + static isParamType(value: any): value is ParamType; +} +export declare abstract class Fragment { + readonly type: string; + readonly name: string; + readonly inputs: Array; + readonly _isFragment: boolean; + constructor(constructorGuard: any, params: any); + abstract format(format?: string): string; + static from(value: Fragment | JsonFragment | string): Fragment; + static fromObject(value: Fragment | JsonFragment): Fragment; + static fromString(value: string): Fragment; + static isFragment(value: any): value is Fragment; +} +export declare class EventFragment extends Fragment { + readonly anonymous: boolean; + format(format?: string): string; + static from(value: EventFragment | JsonFragment | string): EventFragment; + static fromObject(value: JsonFragment | EventFragment): EventFragment; + static fromString(value: string): EventFragment; + static isEventFragment(value: any): value is EventFragment; +} +export declare class ConstructorFragment extends Fragment { + stateMutability: string; + payable: boolean; + gas?: BigNumber; + format(format?: string): string; + static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment; + static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment; + static fromString(value: string): ConstructorFragment; + static isConstructorFragment(value: any): value is ConstructorFragment; +} +export declare class FunctionFragment extends ConstructorFragment { + constant: boolean; + outputs?: Array; + format(format?: string): string; + static from(value: FunctionFragment | JsonFragment | string): FunctionFragment; + static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment; + static fromString(value: string): FunctionFragment; + static isFunctionFragment(value: any): value is FunctionFragment; +} +export declare class ErrorFragment extends Fragment { + format(format?: string): string; + static from(value: ErrorFragment | JsonFragment | string): ErrorFragment; + static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment; + static fromString(value: string): ErrorFragment; + static isErrorFragment(value: any): value is ErrorFragment; +} +//# sourceMappingURL=fragments.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts.map new file mode 100644 index 0000000..b169744 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fragments.d.ts","sourceRoot":"","sources":["../src.ts/fragments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAOrD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,C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CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAmClD,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,gBAAgB;CAGnE;AAaD,qBAAa,aAAc,SAAQ,QAAQ;IAEvC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IA2B/B,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,GAAG,aAAa;IAOxE,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,GAAG,aAAa;IAgBrE,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa;IAgB/C,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,aAAa;CAG7D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/fragments.js b/node_modules/@ethersproject/abi/lib.esm/fragments.js new file mode 100644 index 0000000..33ef391 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/fragments.js @@ -0,0 +1,855 @@ +"use strict"; +import { BigNumber } from "@ethersproject/bignumber"; +import { defineReadOnly } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +; +const _constructorGuard = {}; +let ModifiersBytes = { calldata: true, memory: true, storage: true }; +let ModifiersNest = { calldata: true, memory: true }; +function checkModifier(type, name) { + if (type === "bytes" || type === "string") { + if (ModifiersBytes[name]) { + return true; + } + } + else if (type === "address") { + if (name === "payable") { + return true; + } + } + else if (type.indexOf("[") >= 0 || type === "tuple") { + if (ModifiersNest[name]) { + return true; + } + } + if (ModifiersBytes[name] || name === "payable") { + logger.throwArgumentError("invalid modifier", "name", name); + } + return false; +} +// @TODO: Make sure that children of an indexed tuple are marked with a null indexed +function parseParamType(param, allowIndexed) { + let originalParam = param; + function throwError(i) { + logger.throwArgumentError(`unexpected character at position ${i}`, "param", param); + } + param = param.replace(/\s/g, " "); + function newNode(parent) { + let node = { type: "", name: "", parent: parent, state: { allowType: true } }; + if (allowIndexed) { + node.indexed = false; + } + return node; + } + let parent = { type: "", name: "", state: { allowType: true } }; + let node = parent; + for (let i = 0; i < param.length; i++) { + let c = param[i]; + switch (c) { + case "(": + if (node.state.allowType && node.type === "") { + node.type = "tuple"; + } + else if (!node.state.allowParams) { + throwError(i); + } + node.state.allowType = false; + node.type = verifyType(node.type); + node.components = [newNode(node)]; + node = node.components[0]; + break; + case ")": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + let child = node; + node = node.parent; + if (!node) { + throwError(i); + } + delete child.parent; + node.state.allowParams = false; + node.state.allowName = true; + node.state.allowArray = true; + break; + case ",": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + let sibling = newNode(node.parent); + //{ type: "", name: "", parent: node.parent, state: { allowType: true } }; + node.parent.components.push(sibling); + delete node.parent; + node = sibling; + break; + // Hit a space... + case " ": + // If reading type, the type is done and may read a param or name + if (node.state.allowType) { + if (node.type !== "") { + node.type = verifyType(node.type); + delete node.state.allowType; + node.state.allowName = true; + node.state.allowParams = true; + } + } + // If reading name, the name is done + if (node.state.allowName) { + if (node.name !== "") { + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + if (node.indexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + else { + node.state.allowName = false; + } + } + } + break; + case "[": + if (!node.state.allowArray) { + throwError(i); + } + node.type += c; + node.state.allowArray = false; + node.state.allowName = false; + node.state.readArray = true; + break; + case "]": + if (!node.state.readArray) { + throwError(i); + } + node.type += c; + node.state.readArray = false; + node.state.allowArray = true; + node.state.allowName = true; + break; + default: + if (node.state.allowType) { + node.type += c; + node.state.allowParams = true; + node.state.allowArray = true; + } + else if (node.state.allowName) { + node.name += c; + delete node.state.allowArray; + } + else if (node.state.readArray) { + node.type += c; + } + else { + throwError(i); + } + } + } + if (node.parent) { + logger.throwArgumentError("unexpected eof", "param", param); + } + delete parent.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(originalParam.length - 7); + } + if (node.indexed) { + throwError(originalParam.length - 7); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + parent.type = verifyType(parent.type); + return parent; +} +function populate(object, params) { + for (let key in params) { + defineReadOnly(object, key, params[key]); + } +} +export const FormatTypes = Object.freeze({ + // Bare formatting, as is needed for computing a sighash of an event or function + sighash: "sighash", + // Human-Readable with Minimal spacing and without names (compact human-readable) + minimal: "minimal", + // Human-Readable with nice spacing, including all names + full: "full", + // JSON-format a la Solidity + json: "json" +}); +const paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/); +export class ParamType { + constructor(constructorGuard, params) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use fromString", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new ParamType()" + }); + } + populate(this, params); + let match = this.type.match(paramTypeArray); + if (match) { + populate(this, { + arrayLength: parseInt(match[2] || "-1"), + arrayChildren: ParamType.fromObject({ + type: match[1], + components: this.components + }), + baseType: "array" + }); + } + else { + populate(this, { + arrayLength: null, + arrayChildren: null, + baseType: ((this.components != null) ? "tuple" : this.type) + }); + } + this._isParamType = true; + Object.freeze(this); + } + // Format the parameter fragment + // - sighash: "(uint256,address)" + // - minimal: "tuple(uint256,address) indexed" + // - full: "tuple(uint256 foo, address bar) indexed baz" + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + let result = { + type: ((this.baseType === "tuple") ? "tuple" : this.type), + name: (this.name || undefined) + }; + if (typeof (this.indexed) === "boolean") { + result.indexed = this.indexed; + } + if (this.components) { + result.components = this.components.map((comp) => JSON.parse(comp.format(format))); + } + return JSON.stringify(result); + } + let result = ""; + // Array + if (this.baseType === "array") { + result += this.arrayChildren.format(format); + result += "[" + (this.arrayLength < 0 ? "" : String(this.arrayLength)) + "]"; + } + else { + if (this.baseType === "tuple") { + if (format !== FormatTypes.sighash) { + result += this.type; + } + result += "(" + this.components.map((comp) => comp.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ")"; + } + else { + result += this.type; + } + } + if (format !== FormatTypes.sighash) { + if (this.indexed === true) { + result += " indexed"; + } + if (format === FormatTypes.full && this.name) { + result += " " + this.name; + } + } + return result; + } + static from(value, allowIndexed) { + if (typeof (value) === "string") { + return ParamType.fromString(value, allowIndexed); + } + return ParamType.fromObject(value); + } + static fromObject(value) { + if (ParamType.isParamType(value)) { + return value; + } + return new ParamType(_constructorGuard, { + name: (value.name || null), + type: verifyType(value.type), + indexed: ((value.indexed == null) ? null : !!value.indexed), + components: (value.components ? value.components.map(ParamType.fromObject) : null) + }); + } + static fromString(value, allowIndexed) { + function ParamTypify(node) { + return ParamType.fromObject({ + name: node.name, + type: node.type, + indexed: node.indexed, + components: node.components + }); + } + return ParamTypify(parseParamType(value, !!allowIndexed)); + } + static isParamType(value) { + return !!(value != null && value._isParamType); + } +} +; +function parseParams(value, allowIndex) { + return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex)); +} +export class Fragment { + constructor(constructorGuard, params) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use a static from method", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Fragment()" + }); + } + populate(this, params); + this._isFragment = true; + Object.freeze(this); + } + static from(value) { + if (Fragment.isFragment(value)) { + return value; + } + if (typeof (value) === "string") { + return Fragment.fromString(value); + } + return Fragment.fromObject(value); + } + static fromObject(value) { + if (Fragment.isFragment(value)) { + return value; + } + switch (value.type) { + case "function": + return FunctionFragment.fromObject(value); + case "event": + return EventFragment.fromObject(value); + case "constructor": + return ConstructorFragment.fromObject(value); + case "error": + return ErrorFragment.fromObject(value); + case "fallback": + case "receive": + // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment? + return null; + } + return logger.throwArgumentError("invalid fragment object", "value", value); + } + static fromString(value) { + // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space + value = value.replace(/\s/g, " "); + value = value.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " "); + value = value.trim(); + if (value.split(" ")[0] === "event") { + return EventFragment.fromString(value.substring(5).trim()); + } + else if (value.split(" ")[0] === "function") { + return FunctionFragment.fromString(value.substring(8).trim()); + } + else if (value.split("(")[0].trim() === "constructor") { + return ConstructorFragment.fromString(value.trim()); + } + else if (value.split(" ")[0] === "error") { + return ErrorFragment.fromString(value.substring(5).trim()); + } + return logger.throwArgumentError("unsupported fragment", "value", value); + } + static isFragment(value) { + return !!(value && value._isFragment); + } +} +export class EventFragment extends Fragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "event", + anonymous: this.anonymous, + name: this.name, + inputs: this.inputs.map((input) => JSON.parse(input.format(format))) + }); + } + let result = ""; + if (format !== FormatTypes.sighash) { + result += "event "; + } + result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + if (format !== FormatTypes.sighash) { + if (this.anonymous) { + result += "anonymous "; + } + } + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return EventFragment.fromString(value); + } + return EventFragment.fromObject(value); + } + static fromObject(value) { + if (EventFragment.isEventFragment(value)) { + return value; + } + if (value.type !== "event") { + logger.throwArgumentError("invalid event object", "value", value); + } + const params = { + name: verifyIdentifier(value.name), + anonymous: value.anonymous, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + type: "event" + }; + return new EventFragment(_constructorGuard, params); + } + static fromString(value) { + let match = value.match(regexParen); + if (!match) { + logger.throwArgumentError("invalid event string", "value", value); + } + let anonymous = false; + match[3].split(" ").forEach((modifier) => { + switch (modifier.trim()) { + case "anonymous": + anonymous = true; + break; + case "": + break; + default: + logger.warn("unknown modifier: " + modifier); + } + }); + return EventFragment.fromObject({ + name: match[1].trim(), + anonymous: anonymous, + inputs: parseParams(match[2], true), + type: "event" + }); + } + static isEventFragment(value) { + return (value && value._isFragment && value.type === "event"); + } +} +function parseGas(value, params) { + params.gas = null; + let comps = value.split("@"); + if (comps.length !== 1) { + if (comps.length > 2) { + logger.throwArgumentError("invalid human-readable ABI signature", "value", value); + } + if (!comps[1].match(/^[0-9]+$/)) { + logger.throwArgumentError("invalid human-readable ABI signature gas", "value", value); + } + params.gas = BigNumber.from(comps[1]); + return comps[0]; + } + return value; +} +function parseModifiers(value, params) { + params.constant = false; + params.payable = false; + params.stateMutability = "nonpayable"; + value.split(" ").forEach((modifier) => { + switch (modifier.trim()) { + case "constant": + params.constant = true; + break; + case "payable": + params.payable = true; + params.stateMutability = "payable"; + break; + case "nonpayable": + params.payable = false; + params.stateMutability = "nonpayable"; + break; + case "pure": + params.constant = true; + params.stateMutability = "pure"; + break; + case "view": + params.constant = true; + params.stateMutability = "view"; + break; + case "external": + case "public": + case "": + break; + default: + console.log("unknown modifier: " + modifier); + } + }); +} +function verifyState(value) { + let result = { + constant: false, + payable: true, + stateMutability: "payable" + }; + if (value.stateMutability != null) { + result.stateMutability = value.stateMutability; + // Set (and check things are consistent) the constant property + result.constant = (result.stateMutability === "view" || result.stateMutability === "pure"); + if (value.constant != null) { + if ((!!value.constant) !== result.constant) { + logger.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); + } + } + // Set (and check things are consistent) the payable property + result.payable = (result.stateMutability === "payable"); + if (value.payable != null) { + if ((!!value.payable) !== result.payable) { + logger.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); + } + } + } + else if (value.payable != null) { + result.payable = !!value.payable; + // If payable we can assume non-constant; otherwise we can't assume + if (value.constant == null && !result.payable && value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + result.constant = !!value.constant; + if (result.constant) { + result.stateMutability = "view"; + } + else { + result.stateMutability = (result.payable ? "payable" : "nonpayable"); + } + if (result.payable && result.constant) { + logger.throwArgumentError("cannot have constant payable function", "value", value); + } + } + else if (value.constant != null) { + result.constant = !!value.constant; + result.payable = !result.constant; + result.stateMutability = (result.constant ? "view" : "payable"); + } + else if (value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + return result; +} +export class ConstructorFragment extends Fragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "constructor", + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map((input) => JSON.parse(input.format(format))) + }); + } + if (format === FormatTypes.sighash) { + logger.throwError("cannot format a constructor for sighash", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "format(sighash)" + }); + } + let result = "constructor(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + if (this.stateMutability && this.stateMutability !== "nonpayable") { + result += this.stateMutability + " "; + } + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return ConstructorFragment.fromString(value); + } + return ConstructorFragment.fromObject(value); + } + static fromObject(value) { + if (ConstructorFragment.isConstructorFragment(value)) { + return value; + } + if (value.type !== "constructor") { + logger.throwArgumentError("invalid constructor object", "value", value); + } + let state = verifyState(value); + if (state.constant) { + logger.throwArgumentError("constructor cannot be constant", "value", value); + } + const params = { + name: null, + type: value.type, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? BigNumber.from(value.gas) : null) + }; + return new ConstructorFragment(_constructorGuard, params); + } + static fromString(value) { + let params = { type: "constructor" }; + value = parseGas(value, params); + let parens = value.match(regexParen); + if (!parens || parens[1].trim() !== "constructor") { + logger.throwArgumentError("invalid constructor string", "value", value); + } + params.inputs = parseParams(parens[2].trim(), false); + parseModifiers(parens[3].trim(), params); + return ConstructorFragment.fromObject(params); + } + static isConstructorFragment(value) { + return (value && value._isFragment && value.type === "constructor"); + } +} +export class FunctionFragment extends ConstructorFragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "function", + name: this.name, + constant: this.constant, + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map((input) => JSON.parse(input.format(format))), + outputs: this.outputs.map((output) => JSON.parse(output.format(format))), + }); + } + let result = ""; + if (format !== FormatTypes.sighash) { + result += "function "; + } + result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + if (format !== FormatTypes.sighash) { + if (this.stateMutability) { + if (this.stateMutability !== "nonpayable") { + result += (this.stateMutability + " "); + } + } + else if (this.constant) { + result += "view "; + } + if (this.outputs && this.outputs.length) { + result += "returns (" + this.outputs.map((output) => output.format(format)).join(", ") + ") "; + } + if (this.gas != null) { + result += "@" + this.gas.toString() + " "; + } + } + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return FunctionFragment.fromString(value); + } + return FunctionFragment.fromObject(value); + } + static fromObject(value) { + if (FunctionFragment.isFunctionFragment(value)) { + return value; + } + if (value.type !== "function") { + logger.throwArgumentError("invalid function object", "value", value); + } + let state = verifyState(value); + const params = { + type: value.type, + name: verifyIdentifier(value.name), + constant: state.constant, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + outputs: (value.outputs ? value.outputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? BigNumber.from(value.gas) : null) + }; + return new FunctionFragment(_constructorGuard, params); + } + static fromString(value) { + let params = { type: "function" }; + value = parseGas(value, params); + let comps = value.split(" returns "); + if (comps.length > 2) { + logger.throwArgumentError("invalid function string", "value", value); + } + let parens = comps[0].match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid function signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + parseModifiers(parens[3].trim(), params); + // We have outputs + if (comps.length > 1) { + let returns = comps[1].match(regexParen); + if (returns[1].trim() != "" || returns[3].trim() != "") { + logger.throwArgumentError("unexpected tokens", "value", value); + } + params.outputs = parseParams(returns[2], false); + } + else { + params.outputs = []; + } + return FunctionFragment.fromObject(params); + } + static isFunctionFragment(value) { + return (value && value._isFragment && value.type === "function"); + } +} +//export class StructFragment extends Fragment { +//} +function checkForbidden(fragment) { + const sig = fragment.format(); + if (sig === "Error(string)" || sig === "Panic(uint256)") { + logger.throwArgumentError(`cannot specify user defined ${sig} error`, "fragment", fragment); + } + return fragment; +} +export class ErrorFragment extends Fragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "error", + name: this.name, + inputs: this.inputs.map((input) => JSON.parse(input.format(format))), + }); + } + let result = ""; + if (format !== FormatTypes.sighash) { + result += "error "; + } + result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return ErrorFragment.fromString(value); + } + return ErrorFragment.fromObject(value); + } + static fromObject(value) { + if (ErrorFragment.isErrorFragment(value)) { + return value; + } + if (value.type !== "error") { + logger.throwArgumentError("invalid error object", "value", value); + } + const params = { + type: value.type, + name: verifyIdentifier(value.name), + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []) + }; + return checkForbidden(new ErrorFragment(_constructorGuard, params)); + } + static fromString(value) { + let params = { type: "error" }; + let parens = value.match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid error signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + return checkForbidden(ErrorFragment.fromObject(params)); + } + static isErrorFragment(value) { + return (value && value._isFragment && value.type === "error"); + } +} +function verifyType(type) { + // These need to be transformed to their full description + if (type.match(/^uint($|[^1-9])/)) { + type = "uint256" + type.substring(4); + } + else if (type.match(/^int($|[^1-9])/)) { + type = "int256" + type.substring(3); + } + // @TODO: more verification + return type; +} +// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234 +const regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$"); +function verifyIdentifier(value) { + if (!value || !value.match(regexIdentifier)) { + logger.throwArgumentError(`invalid identifier "${value}"`, "value", value); + } + return value; +} +const regexParen = new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"); +function splitNesting(value) { + value = value.trim(); + let result = []; + let accum = ""; + let depth = 0; + for (let offset = 0; offset < value.length; offset++) { + let c = value[offset]; + if (c === "," && depth === 0) { + result.push(accum); + accum = ""; + } + else { + accum += c; + if (c === "(") { + depth++; + } + else if (c === ")") { + depth--; + if (depth === -1) { + logger.throwArgumentError("unbalanced parenthesis", "value", value); + } + } + } + } + if (accum) { + result.push(accum); + } + return result; +} +//# sourceMappingURL=fragments.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/fragments.js.map b/node_modules/@ethersproject/abi/lib.esm/fragments.js.map new file mode 100644 index 0000000..c666b38 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/fragments.js.map @@ -0,0 +1 @@ +{"version":3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OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAE9D,SAAS,YAAY,CAAC,KAAa;IAC/B,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAErB,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QAClD,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,EAAE;YAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,KAAK,GAAG,EAAE,CAAC;SACd;aAAM;YACH,KAAK,IAAI,CAAC,CAAC;YACX,IAAI,CAAC,KAAK,GAAG,EAAE;gBACX,KAAK,EAAE,CAAC;aACX;iBAAM,IAAI,CAAC,KAAK,GAAG,EAAE;gBAClB,KAAK,EAAE,CAAC;gBACR,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;oBACd,MAAM,CAAC,kBAAkB,CAAC,wBAAwB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;iBACvE;aACJ;SACJ;KACJ;IACD,IAAI,KAAK,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAAE;IAElC,OAAO,MAAM,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/index.d.ts b/node_modules/@ethersproject/abi/lib.esm/index.d.ts new file mode 100644 index 0000000..cbdc15d --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/index.d.ts @@ -0,0 +1,5 @@ +import { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from "./fragments"; +import { AbiCoder, CoerceFunc, defaultAbiCoder } from "./abi-coder"; +import { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from "./interface"; +export { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType, FormatTypes, AbiCoder, defaultAbiCoder, Interface, Indexed, CoerceFunc, JsonFragment, JsonFragmentType, Result, checkResultErrors, LogDescription, TransactionDescription }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/index.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/index.d.ts.map new file mode 100644 index 0000000..da4e76f --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpK,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEpH,OAAO,EACH,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EAEX,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,OAAO,EAKP,UAAU,EACV,YAAY,EACZ,gBAAgB,EAEhB,MAAM,EACN,iBAAiB,EAEjB,cAAc,EACd,sBAAsB,EACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/index.js b/node_modules/@ethersproject/abi/lib.esm/index.js new file mode 100644 index 0000000..cf52448 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/index.js @@ -0,0 +1,6 @@ +"use strict"; +import { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, ParamType } from "./fragments"; +import { AbiCoder, defaultAbiCoder } from "./abi-coder"; +import { checkResultErrors, Indexed, Interface, LogDescription, TransactionDescription } from "./interface"; +export { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType, FormatTypes, AbiCoder, defaultAbiCoder, Interface, Indexed, checkResultErrors, LogDescription, TransactionDescription }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/index.js.map b/node_modules/@ethersproject/abi/lib.esm/index.js.map new file mode 100644 index 0000000..f7fae6d --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAkC,SAAS,EAAE,MAAM,aAAa,CAAC;AACpK,OAAO,EAAE,QAAQ,EAAc,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAU,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEpH,OAAO,EACH,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EAEX,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,OAAO,EAUP,iBAAiB,EAEjB,cAAc,EACd,sBAAsB,EACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/interface.d.ts b/node_modules/@ethersproject/abi/lib.esm/interface.d.ts new file mode 100644 index 0000000..2149670 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/interface.d.ts @@ -0,0 +1,89 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike } from "@ethersproject/bytes"; +import { Description } from "@ethersproject/properties"; +import { AbiCoder } from "./abi-coder"; +import { checkResultErrors, Result } from "./coders/abstract-coder"; +import { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, JsonFragment, ParamType } from "./fragments"; +export { checkResultErrors, Result }; +export declare class LogDescription extends Description { + readonly eventFragment: EventFragment; + readonly name: string; + readonly signature: string; + readonly topic: string; + readonly args: Result; +} +export declare class TransactionDescription extends Description { + readonly functionFragment: FunctionFragment; + readonly name: string; + readonly args: Result; + readonly signature: string; + readonly sighash: string; + readonly value: BigNumber; +} +export declare class ErrorDescription extends Description { + readonly errorFragment: ErrorFragment; + readonly name: string; + readonly args: Result; + readonly signature: string; + readonly sighash: string; +} +export declare class Indexed extends Description { + readonly hash: string; + readonly _isIndexed: boolean; + static isIndexed(value: any): value is Indexed; +} +export declare class Interface { + readonly fragments: ReadonlyArray; + readonly errors: { + [name: string]: ErrorFragment; + }; + readonly events: { + [name: string]: EventFragment; + }; + readonly functions: { + [name: string]: FunctionFragment; + }; + readonly structs: { + [name: string]: any; + }; + readonly deploy: ConstructorFragment; + readonly _abiCoder: AbiCoder; + readonly _isInterface: boolean; + constructor(fragments: string | ReadonlyArray); + format(format?: string): string | Array; + static getAbiCoder(): AbiCoder; + static getAddress(address: string): string; + static getSighash(fragment: ErrorFragment | FunctionFragment): string; + static getEventTopic(eventFragment: EventFragment): string; + getFunction(nameOrSignatureOrSighash: string): FunctionFragment; + getEvent(nameOrSignatureOrTopic: string): EventFragment; + getError(nameOrSignatureOrSighash: string): ErrorFragment; + getSighash(fragment: ErrorFragment | FunctionFragment | string): string; + getEventTopic(eventFragment: EventFragment | string): string; + _decodeParams(params: ReadonlyArray, data: BytesLike): Result; + _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string; + encodeDeploy(values?: ReadonlyArray): string; + decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result; + encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string; + decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result; + encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string; + decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result; + encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string; + encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array>; + encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { + data: string; + topics: Array; + }; + decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result; + parseTransaction(tx: { + data: string; + value?: BigNumberish; + }): TransactionDescription; + parseLog(log: { + topics: Array; + data: string; + }): LogDescription; + parseError(data: BytesLike): ErrorDescription; + static isInterface(value: any): value is Interface; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/interface.d.ts.map b/node_modules/@ethersproject/abi/lib.esm/interface.d.ts.map new file mode 100644 index 0000000..ac158df --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src.ts/interface.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAA0D,MAAM,sBAAsB,CAAC;AAGnH,OAAO,EAAkB,WAAW,EAAa,MAAM,2BAA2B,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAe,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAA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IA4CjH,cAAc,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM;IA4F9G,gBAAgB,CAAC,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAA;KAAE,GAAG,sBAAsB;IAoBpF,QAAQ,CAAC,GAAG,EAAE;QAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,cAAc;IAmBrE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,gBAAgB;IA4B7C,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,SAAS;CAGrD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/interface.js b/node_modules/@ethersproject/abi/lib.esm/interface.js new file mode 100644 index 0000000..784f4ef --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/interface.js @@ -0,0 +1,600 @@ +"use strict"; +import { getAddress } from "@ethersproject/address"; +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { id } from "@ethersproject/hash"; +import { keccak256 } from "@ethersproject/keccak256"; +import { defineReadOnly, Description, getStatic } from "@ethersproject/properties"; +import { defaultAbiCoder } from "./abi-coder"; +import { checkResultErrors } from "./coders/abstract-coder"; +import { ConstructorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, ParamType } from "./fragments"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +export { checkResultErrors }; +export class LogDescription extends Description { +} +export class TransactionDescription extends Description { +} +export class ErrorDescription extends Description { +} +export class Indexed extends Description { + static isIndexed(value) { + return !!(value && value._isIndexed); + } +} +const BuiltinErrors = { + "0x08c379a0": { signature: "Error(string)", name: "Error", inputs: ["string"], reason: true }, + "0x4e487b71": { signature: "Panic(uint256)", name: "Panic", inputs: ["uint256"] } +}; +function wrapAccessError(property, error) { + const wrap = new Error(`deferred error during ABI decoding triggered accessing ${property}`); + wrap.error = error; + return wrap; +} +/* +function checkNames(fragment: Fragment, type: "input" | "output", params: Array): void { + params.reduce((accum, param) => { + if (param.name) { + if (accum[param.name]) { + logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format("full") }`, "fragment", fragment); + } + accum[param.name] = true; + } + return accum; + }, <{ [ name: string ]: boolean }>{ }); +} +*/ +export class Interface { + constructor(fragments) { + logger.checkNew(new.target, Interface); + let abi = []; + if (typeof (fragments) === "string") { + abi = JSON.parse(fragments); + } + else { + abi = fragments; + } + defineReadOnly(this, "fragments", abi.map((fragment) => { + return Fragment.from(fragment); + }).filter((fragment) => (fragment != null))); + defineReadOnly(this, "_abiCoder", getStatic(new.target, "getAbiCoder")()); + defineReadOnly(this, "functions", {}); + defineReadOnly(this, "errors", {}); + defineReadOnly(this, "events", {}); + defineReadOnly(this, "structs", {}); + // Add all fragments by their signature + this.fragments.forEach((fragment) => { + let bucket = null; + switch (fragment.type) { + case "constructor": + if (this.deploy) { + logger.warn("duplicate definition - constructor"); + return; + } + //checkNames(fragment, "input", fragment.inputs); + defineReadOnly(this, "deploy", fragment); + return; + case "function": + //checkNames(fragment, "input", fragment.inputs); + //checkNames(fragment, "output", (fragment).outputs); + bucket = this.functions; + break; + case "event": + //checkNames(fragment, "input", fragment.inputs); + bucket = this.events; + break; + case "error": + bucket = this.errors; + break; + default: + return; + } + let signature = fragment.format(); + if (bucket[signature]) { + logger.warn("duplicate definition - " + signature); + return; + } + bucket[signature] = fragment; + }); + // If we do not have a constructor add a default + if (!this.deploy) { + defineReadOnly(this, "deploy", ConstructorFragment.from({ + payable: false, + type: "constructor" + })); + } + defineReadOnly(this, "_isInterface", true); + } + format(format) { + if (!format) { + format = FormatTypes.full; + } + if (format === FormatTypes.sighash) { + logger.throwArgumentError("interface does not support formatting sighash", "format", format); + } + const abi = this.fragments.map((fragment) => fragment.format(format)); + // We need to re-bundle the JSON fragments a bit + if (format === FormatTypes.json) { + return JSON.stringify(abi.map((j) => JSON.parse(j))); + } + return abi; + } + // Sub-classes can override these to handle other blockchains + static getAbiCoder() { + return defaultAbiCoder; + } + static getAddress(address) { + return getAddress(address); + } + static getSighash(fragment) { + return hexDataSlice(id(fragment.format()), 0, 4); + } + static getEventTopic(eventFragment) { + return id(eventFragment.format()); + } + // Find a function definition by any means necessary (unless it is ambiguous) + getFunction(nameOrSignatureOrSighash) { + if (isHexString(nameOrSignatureOrSighash)) { + for (const name in this.functions) { + if (nameOrSignatureOrSighash === this.getSighash(name)) { + return this.functions[name]; + } + } + logger.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + const name = nameOrSignatureOrSighash.trim(); + const matching = Object.keys(this.functions).filter((f) => (f.split("(" /* fix:) */)[0] === name)); + if (matching.length === 0) { + logger.throwArgumentError("no matching function", "name", name); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching functions", "name", name); + } + return this.functions[matching[0]]; + } + // Normalize the signature and lookup the function + const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); + } + return result; + } + // Find an event definition by any means necessary (unless it is ambiguous) + getEvent(nameOrSignatureOrTopic) { + if (isHexString(nameOrSignatureOrTopic)) { + const topichash = nameOrSignatureOrTopic.toLowerCase(); + for (const name in this.events) { + if (topichash === this.getEventTopic(name)) { + return this.events[name]; + } + } + logger.throwArgumentError("no matching event", "topichash", topichash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrTopic.indexOf("(") === -1) { + const name = nameOrSignatureOrTopic.trim(); + const matching = Object.keys(this.events).filter((f) => (f.split("(" /* fix:) */)[0] === name)); + if (matching.length === 0) { + logger.throwArgumentError("no matching event", "name", name); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching events", "name", name); + } + return this.events[matching[0]]; + } + // Normalize the signature and lookup the function + const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()]; + if (!result) { + logger.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); + } + return result; + } + // Find a function definition by any means necessary (unless it is ambiguous) + getError(nameOrSignatureOrSighash) { + if (isHexString(nameOrSignatureOrSighash)) { + const getSighash = getStatic(this.constructor, "getSighash"); + for (const name in this.errors) { + const error = this.errors[name]; + if (nameOrSignatureOrSighash === getSighash(error)) { + return this.errors[name]; + } + } + logger.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + const name = nameOrSignatureOrSighash.trim(); + const matching = Object.keys(this.errors).filter((f) => (f.split("(" /* fix:) */)[0] === name)); + if (matching.length === 0) { + logger.throwArgumentError("no matching error", "name", name); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching errors", "name", name); + } + return this.errors[matching[0]]; + } + // Normalize the signature and lookup the function + const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); + } + return result; + } + // Get the sighash (the bytes4 selector) used by Solidity to identify a function + getSighash(fragment) { + if (typeof (fragment) === "string") { + try { + fragment = this.getFunction(fragment); + } + catch (error) { + try { + fragment = this.getError(fragment); + } + catch (_) { + throw error; + } + } + } + return getStatic(this.constructor, "getSighash")(fragment); + } + // Get the topic (the bytes32 hash) used by Solidity to identify an event + getEventTopic(eventFragment) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + return getStatic(this.constructor, "getEventTopic")(eventFragment); + } + _decodeParams(params, data) { + return this._abiCoder.decode(params, data); + } + _encodeParams(params, values) { + return this._abiCoder.encode(params, values); + } + encodeDeploy(values) { + return this._encodeParams(this.deploy.inputs, values || []); + } + decodeErrorResult(fragment, data) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + const bytes = arrayify(data); + if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) { + logger.throwArgumentError(`data signature does not match error ${fragment.name}.`, "data", hexlify(bytes)); + } + return this._decodeParams(fragment.inputs, bytes.slice(4)); + } + encodeErrorResult(fragment, values) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + return hexlify(concat([ + this.getSighash(fragment), + this._encodeParams(fragment.inputs, values || []) + ])); + } + // Decode the data for a function call (e.g. tx.data) + decodeFunctionData(functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + const bytes = arrayify(data); + if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) { + logger.throwArgumentError(`data signature does not match function ${functionFragment.name}.`, "data", hexlify(bytes)); + } + return this._decodeParams(functionFragment.inputs, bytes.slice(4)); + } + // Encode the data for a function call (e.g. tx.data) + encodeFunctionData(functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return hexlify(concat([ + this.getSighash(functionFragment), + this._encodeParams(functionFragment.inputs, values || []) + ])); + } + // Decode the result from a function call (e.g. from eth_call) + decodeFunctionResult(functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + let bytes = arrayify(data); + let reason = null; + let errorArgs = null; + let errorName = null; + let errorSignature = null; + switch (bytes.length % this._abiCoder._getWordSize()) { + case 0: + try { + return this._abiCoder.decode(functionFragment.outputs, bytes); + } + catch (error) { } + break; + case 4: { + const selector = hexlify(bytes.slice(0, 4)); + const builtin = BuiltinErrors[selector]; + if (builtin) { + errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4)); + errorName = builtin.name; + errorSignature = builtin.signature; + if (builtin.reason) { + reason = errorArgs[0]; + } + } + else { + try { + const error = this.getError(selector); + errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4)); + errorName = error.name; + errorSignature = error.format(); + } + catch (error) { + console.log(error); + } + } + break; + } + } + return logger.throwError("call revert exception", Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + errorArgs, errorName, errorSignature, reason + }); + } + // Encode the result for a function call (e.g. for eth_call) + encodeFunctionResult(functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [])); + } + // Create the filter for the event with search criteria (e.g. for eth_filterLog) + encodeFilterTopics(eventFragment, values) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (values.length > eventFragment.inputs.length) { + logger.throwError("too many arguments for " + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, { + argument: "values", + value: values + }); + } + let topics = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + const encodeTopic = (param, value) => { + if (param.type === "string") { + return id(value); + } + else if (param.type === "bytes") { + return keccak256(hexlify(value)); + } + // Check addresses are valid + if (param.type === "address") { + this._abiCoder.encode(["address"], [value]); + } + return hexZeroPad(hexlify(value), 32); + }; + values.forEach((value, index) => { + let param = eventFragment.inputs[index]; + if (!param.indexed) { + if (value != null) { + logger.throwArgumentError("cannot filter non-indexed parameters; must be null", ("contract." + param.name), value); + } + return; + } + if (value == null) { + topics.push(null); + } + else if (param.baseType === "array" || param.baseType === "tuple") { + logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); + } + else if (Array.isArray(value)) { + topics.push(value.map((value) => encodeTopic(param, value))); + } + else { + topics.push(encodeTopic(param, value)); + } + }); + // Trim off trailing nulls + while (topics.length && topics[topics.length - 1] === null) { + topics.pop(); + } + return topics; + } + encodeEventLog(eventFragment, values) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + const topics = []; + const dataTypes = []; + const dataValues = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + if (values.length !== eventFragment.inputs.length) { + logger.throwArgumentError("event arguments/values mismatch", "values", values); + } + eventFragment.inputs.forEach((param, index) => { + const value = values[index]; + if (param.indexed) { + if (param.type === "string") { + topics.push(id(value)); + } + else if (param.type === "bytes") { + topics.push(keccak256(value)); + } + else if (param.baseType === "tuple" || param.baseType === "array") { + // @TODO + throw new Error("not implemented"); + } + else { + topics.push(this._abiCoder.encode([param.type], [value])); + } + } + else { + dataTypes.push(param); + dataValues.push(value); + } + }); + return { + data: this._abiCoder.encode(dataTypes, dataValues), + topics: topics + }; + } + // Decode a filter for the event and the search criteria + decodeEventLog(eventFragment, data, topics) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (topics != null && !eventFragment.anonymous) { + let topicHash = this.getEventTopic(eventFragment); + if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { + logger.throwError("fragment/topic mismatch", Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); + } + topics = topics.slice(1); + } + let indexed = []; + let nonIndexed = []; + let dynamic = []; + eventFragment.inputs.forEach((param, index) => { + if (param.indexed) { + if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") { + indexed.push(ParamType.fromObject({ type: "bytes32", name: param.name })); + dynamic.push(true); + } + else { + indexed.push(param); + dynamic.push(false); + } + } + else { + nonIndexed.push(param); + dynamic.push(false); + } + }); + let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)) : null; + let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true); + let result = []; + let nonIndexedIndex = 0, indexedIndex = 0; + eventFragment.inputs.forEach((param, index) => { + if (param.indexed) { + if (resultIndexed == null) { + result[index] = new Indexed({ _isIndexed: true, hash: null }); + } + else if (dynamic[index]) { + result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] }); + } + else { + try { + result[index] = resultIndexed[indexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + } + else { + try { + result[index] = resultNonIndexed[nonIndexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + // Add the keyword argument if named and safe + if (param.name && result[param.name] == null) { + const value = result[index]; + // Make error named values throw on access + if (value instanceof Error) { + Object.defineProperty(result, param.name, { + enumerable: true, + get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); } + }); + } + else { + result[param.name] = value; + } + } + }); + // Make all error indexed values throw on access + for (let i = 0; i < result.length; i++) { + const value = result[i]; + if (value instanceof Error) { + Object.defineProperty(result, i, { + enumerable: true, + get: () => { throw wrapAccessError(`index ${i}`, value); } + }); + } + } + return Object.freeze(result); + } + // Given a transaction, find the matching function fragment (if any) and + // determine all its properties and call parameters + parseTransaction(tx) { + let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new TransactionDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)), + functionFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + value: BigNumber.from(tx.value || "0"), + }); + } + // @TODO + //parseCallResult(data: BytesLike): ?? + // Given an event log, find the matching event fragment (if any) and + // determine all its properties and values + parseLog(log) { + let fragment = this.getEvent(log.topics[0]); + if (!fragment || fragment.anonymous) { + return null; + } + // @TODO: If anonymous, and the only method, and the input count matches, should we parse? + // Probably not, because just because it is the only event in the ABI does + // not mean we have the full ABI; maybe just a fragment? + return new LogDescription({ + eventFragment: fragment, + name: fragment.name, + signature: fragment.format(), + topic: this.getEventTopic(fragment), + args: this.decodeEventLog(fragment, log.data, log.topics) + }); + } + parseError(data) { + const hexData = hexlify(data); + let fragment = this.getError(hexData.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new ErrorDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + hexData.substring(10)), + errorFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + }); + } + /* + static from(value: Array | string | Interface) { + if (Interface.isInterface(value)) { + return value; + } + if (typeof(value) === "string") { + return new Interface(JSON.parse(value)); + } + return new Interface(value); + } + */ + static isInterface(value) { + return !!(value && value._isInterface); + } +} +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib.esm/interface.js.map b/node_modules/@ethersproject/abi/lib.esm/interface.js.map new file mode 100644 index 0000000..d11c803 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib.esm/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src.ts/interface.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAa,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEnF,OAAO,EAAY,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAU,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAiB,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAgB,SAAS,EAAE,MAAM,aAAa,CAAC;AAElJ,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,iBAAiB,E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/_version.d.ts b/node_modules/@ethersproject/abi/lib/_version.d.ts new file mode 100644 index 0000000..6a0cecf --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abi/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/_version.d.ts.map b/node_modules/@ethersproject/abi/lib/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/_version.js b/node_modules/@ethersproject/abi/lib/_version.js new file mode 100644 index 0000000..8c8e22c --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "abi/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/_version.js.map b/node_modules/@ethersproject/abi/lib/_version.js.map new file mode 100644 index 0000000..b3a3dff --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/abi-coder.d.ts b/node_modules/@ethersproject/abi/lib/abi-coder.d.ts new file mode 100644 index 0000000..7bfd727 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/abi-coder.d.ts @@ -0,0 +1,17 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { Coder, Reader, Result, Writer } from "./coders/abstract-coder"; +import { ParamType } from "./fragments"; +export declare type CoerceFunc = (type: string, value: any) => any; +export declare class AbiCoder { + readonly coerceFunc: CoerceFunc; + constructor(coerceFunc?: CoerceFunc); + _getCoder(param: ParamType): Coder; + _getWordSize(): number; + _getReader(data: Uint8Array, allowLoose?: boolean): Reader; + _getWriter(): Writer; + getDefaultValue(types: ReadonlyArray): Result; + encode(types: ReadonlyArray, values: ReadonlyArray): string; + decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result; +} +export declare const defaultAbiCoder: AbiCoder; +//# sourceMappingURL=abi-coder.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/abi-coder.d.ts.map b/node_modules/@ethersproject/abi/lib/abi-coder.d.ts.map new file mode 100644 index 0000000..836dece --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/abi-coder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"abi-coder.d.ts","sourceRoot":"","sources":["../src.ts/abi-coder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAO3D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAWxE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAOxC,oBAAY,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE3D,qBAAa,QAAQ;IACjB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;gBAEpB,UAAU,CAAC,EAAE,UAAU;IAKnC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK;IA4ClC,YAAY,IAAI,MAAM;IAEtB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;IAI1D,UAAU,IAAI,MAAM;IAIpB,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM;IAMjE,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM;IAgBpF,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM;CAK7F;AAED,eAAO,MAAM,eAAe,EAAE,QAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/abi-coder.js b/node_modules/@ethersproject/abi/lib/abi-coder.js new file mode 100644 index 0000000..bc006ae --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/abi-coder.js @@ -0,0 +1,106 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultAbiCoder = exports.AbiCoder = void 0; +// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var abstract_coder_1 = require("./coders/abstract-coder"); +var address_1 = require("./coders/address"); +var array_1 = require("./coders/array"); +var boolean_1 = require("./coders/boolean"); +var bytes_2 = require("./coders/bytes"); +var fixed_bytes_1 = require("./coders/fixed-bytes"); +var null_1 = require("./coders/null"); +var number_1 = require("./coders/number"); +var string_1 = require("./coders/string"); +var tuple_1 = require("./coders/tuple"); +var fragments_1 = require("./fragments"); +var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); +var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); +var AbiCoder = /** @class */ (function () { + function AbiCoder(coerceFunc) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, AbiCoder); + (0, properties_1.defineReadOnly)(this, "coerceFunc", coerceFunc || null); + } + AbiCoder.prototype._getCoder = function (param) { + var _this = this; + switch (param.baseType) { + case "address": + return new address_1.AddressCoder(param.name); + case "bool": + return new boolean_1.BooleanCoder(param.name); + case "string": + return new string_1.StringCoder(param.name); + case "bytes": + return new bytes_2.BytesCoder(param.name); + case "array": + return new array_1.ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name); + case "tuple": + return new tuple_1.TupleCoder((param.components || []).map(function (component) { + return _this._getCoder(component); + }), param.name); + case "": + return new null_1.NullCoder(param.name); + } + // u?int[0-9]* + var match = param.type.match(paramTypeNumber); + if (match) { + var size = parseInt(match[2] || "256"); + if (size === 0 || size > 256 || (size % 8) !== 0) { + logger.throwArgumentError("invalid " + match[1] + " bit length", "param", param); + } + return new number_1.NumberCoder(size / 8, (match[1] === "int"), param.name); + } + // bytes[0-9]+ + match = param.type.match(paramTypeBytes); + if (match) { + var size = parseInt(match[1]); + if (size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes length", "param", param); + } + return new fixed_bytes_1.FixedBytesCoder(size, param.name); + } + return logger.throwArgumentError("invalid type", "type", param.type); + }; + AbiCoder.prototype._getWordSize = function () { return 32; }; + AbiCoder.prototype._getReader = function (data, allowLoose) { + return new abstract_coder_1.Reader(data, this._getWordSize(), this.coerceFunc, allowLoose); + }; + AbiCoder.prototype._getWriter = function () { + return new abstract_coder_1.Writer(this._getWordSize()); + }; + AbiCoder.prototype.getDefaultValue = function (types) { + var _this = this; + var coders = types.map(function (type) { return _this._getCoder(fragments_1.ParamType.from(type)); }); + var coder = new tuple_1.TupleCoder(coders, "_"); + return coder.defaultValue(); + }; + AbiCoder.prototype.encode = function (types, values) { + var _this = this; + if (types.length !== values.length) { + logger.throwError("types/values length mismatch", logger_1.Logger.errors.INVALID_ARGUMENT, { + count: { types: types.length, values: values.length }, + value: { types: types, values: values } + }); + } + var coders = types.map(function (type) { return _this._getCoder(fragments_1.ParamType.from(type)); }); + var coder = (new tuple_1.TupleCoder(coders, "_")); + var writer = this._getWriter(); + coder.encode(writer, values); + return writer.data; + }; + AbiCoder.prototype.decode = function (types, data, loose) { + var _this = this; + var coders = types.map(function (type) { return _this._getCoder(fragments_1.ParamType.from(type)); }); + var coder = new tuple_1.TupleCoder(coders, "_"); + return coder.decode(this._getReader((0, bytes_1.arrayify)(data), loose)); + }; + return AbiCoder; +}()); +exports.AbiCoder = AbiCoder; +exports.defaultAbiCoder = new AbiCoder(); +//# sourceMappingURL=abi-coder.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/abi-coder.js.map b/node_modules/@ethersproject/abi/lib/abi-coder.js.map new file mode 100644 index 0000000..771c1f6 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/abi-coder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abi-coder.js","sourceRoot":"","sources":["../src.ts/abi-coder.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mEAAmE;AAEnE,8CAA2D;AAC3D,wDAA2D;AAE3D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,0DAAwE;AACxE,4CAAgD;AAChD,wCAA4C;AAC5C,4CAAgD;AAChD,wCAA4C;AAC5C,oDAAuD;AACvD,sCAA0C;AAC1C,0CAA8C;AAC9C,0CAA8C;AAC9C,wCAA4C;AAE5C,yCAAwC;AAGxC,IAAM,cAAc,GAAG,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACrD,IAAM,eAAe,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAKxD;IAGI,kBAAY,UAAuB;;QAC/B,MAAM,CAAC,QAAQ,aAAa,QAAQ,CAAC,CAAC;QACtC,IAAA,2BAAc,EAAC,IAAI,EAAE,YAAY,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,4BAAS,GAAT,UAAU,KAAgB;QAA1B,iBA0CC;QAxCG,QAAQ,KAAK,CAAC,QAAQ,EAAE;YACpB,KAAK,SAAS;gBACV,OAAO,IAAI,sBAAY,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AQ,EAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,CAAC;IACL,eAAC;AAAD,CAAC,AAzFD,IAyFC;AAzFY,4BAAQ;AA2FR,QAAA,eAAe,GAAa,IAAI,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts new file mode 100644 index 0000000..f499d13 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts @@ -0,0 +1,53 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +export interface Result extends ReadonlyArray { + readonly [key: string]: any; +} +export declare function checkResultErrors(result: Result): Array<{ + path: Array; + error: Error; +}>; +export declare type CoerceFunc = (type: string, value: any) => any; +export declare abstract class Coder { + readonly name: string; + readonly type: string; + readonly localName: string; + readonly dynamic: boolean; + constructor(name: string, type: string, localName: string, dynamic: boolean); + _throwError(message: string, value: any): void; + abstract encode(writer: Writer, value: any): number; + abstract decode(reader: Reader): any; + abstract defaultValue(): any; +} +export declare class Writer { + readonly wordSize: number; + _data: Array; + _dataLength: number; + _padding: Uint8Array; + constructor(wordSize?: number); + get data(): string; + get length(): number; + _writeData(data: Uint8Array): number; + appendWriter(writer: Writer): number; + writeBytes(value: BytesLike): number; + _getValue(value: BigNumberish): Uint8Array; + writeValue(value: BigNumberish): number; + writeUpdatableValue(): (value: BigNumberish) => void; +} +export declare class Reader { + readonly wordSize: number; + readonly allowLoose: boolean; + readonly _data: Uint8Array; + readonly _coerceFunc: CoerceFunc; + _offset: number; + constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean); + get data(): string; + get consumed(): number; + static coerce(name: string, value: any): any; + coerce(name: string, value: any): any; + _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array; + subReader(offset: number): Reader; + readBytes(length: number, loose?: boolean): Uint8Array; + readValue(): BigNumber; +} +//# sourceMappingURL=abstract-coder.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts.map new file mode 100644 index 0000000..2a6c329 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"abstract-coder.d.ts","sourceRoot":"","sources":["../../src.ts/coders/abstract-coder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAA8B,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOnE,MAAM,WAAW,MAAO,SAAQ,aAAa,CAAC,GAAG,CAAC;IAC9C,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC,CAqBvG;AAED,oBAAY,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE3D,8BAAsB,KAAK;IAIvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAItB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAItB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAK3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;gBAEd,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAQ3E,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAI9C,QAAQ,CAAC,MAAM,CAAC,M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AAE,GAAG,GAAG,GAAG;IAM5C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;IAKrC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU;IAevE,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAIjC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU;IAOtD,SAAS,IAAI,SAAS;CAGzB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js new file mode 100644 index 0000000..2ebc9ba --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js @@ -0,0 +1,173 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Reader = exports.Writer = exports.Coder = exports.checkResultErrors = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var bignumber_1 = require("@ethersproject/bignumber"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("../_version"); +var logger = new logger_1.Logger(_version_1.version); +function checkResultErrors(result) { + // Find the first error (if any) + var errors = []; + var checkErrors = function (path, object) { + if (!Array.isArray(object)) { + return; + } + for (var key in object) { + var childPath = path.slice(); + childPath.push(key); + try { + checkErrors(childPath, object[key]); + } + catch (error) { + errors.push({ path: childPath, error: error }); + } + } + }; + checkErrors([], result); + return errors; +} +exports.checkResultErrors = checkResultErrors; +var Coder = /** @class */ (function () { + function Coder(name, type, localName, dynamic) { + // @TODO: defineReadOnly these + this.name = name; + this.type = type; + this.localName = localName; + this.dynamic = dynamic; + } + Coder.prototype._throwError = function (message, value) { + logger.throwArgumentError(message, this.localName, value); + }; + return Coder; +}()); +exports.Coder = Coder; +var Writer = /** @class */ (function () { + function Writer(wordSize) { + (0, properties_1.defineReadOnly)(this, "wordSize", wordSize || 32); + this._data = []; + this._dataLength = 0; + this._padding = new Uint8Array(wordSize); + } + Object.defineProperty(Writer.prototype, "data", { + get: function () { + return (0, bytes_1.hexConcat)(this._data); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Writer.prototype, "length", { + get: function () { return this._dataLength; }, + enumerable: false, + configurable: true + }); + Writer.prototype._writeData = function (data) { + this._data.push(data); + this._dataLength += data.length; + return data.length; + }; + Writer.prototype.appendWriter = function (writer) { + return this._writeData((0, bytes_1.concat)(writer._data)); + }; + // Arrayish items; padded on the right to wordSize + Writer.prototype.writeBytes = function (value) { + var bytes = (0, bytes_1.arrayify)(value); + var paddingOffset = bytes.length % this.wordSize; + if (paddingOffset) { + bytes = (0, bytes_1.concat)([bytes, this._padding.slice(paddingOffset)]); + } + return this._writeData(bytes); + }; + Writer.prototype._getValue = function (value) { + var bytes = (0, bytes_1.arrayify)(bignumber_1.BigNumber.from(value)); + if (bytes.length > this.wordSize) { + logger.throwError("value out-of-bounds", logger_1.Logger.errors.BUFFER_OVERRUN, { + length: this.wordSize, + offset: bytes.length + }); + } + if (bytes.length % this.wordSize) { + bytes = (0, bytes_1.concat)([this._padding.slice(bytes.length % this.wordSize), bytes]); + } + return bytes; + }; + // BigNumberish items; padded on the left to wordSize + Writer.prototype.writeValue = function (value) { + return this._writeData(this._getValue(value)); + }; + Writer.prototype.writeUpdatableValue = function () { + var _this = this; + var offset = this._data.length; + this._data.push(this._padding); + this._dataLength += this.wordSize; + return function (value) { + _this._data[offset] = _this._getValue(value); + }; + }; + return Writer; +}()); +exports.Writer = Writer; +var Reader = /** @class */ (function () { + function Reader(data, wordSize, coerceFunc, allowLoose) { + (0, properties_1.defineReadOnly)(this, "_data", (0, bytes_1.arrayify)(data)); + (0, properties_1.defineReadOnly)(this, "wordSize", wordSize || 32); + (0, properties_1.defineReadOnly)(this, "_coerceFunc", coerceFunc); + (0, properties_1.defineReadOnly)(this, "allowLoose", allowLoose); + this._offset = 0; + } + Object.defineProperty(Reader.prototype, "data", { + get: function () { return (0, bytes_1.hexlify)(this._data); }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Reader.prototype, "consumed", { + get: function () { return this._offset; }, + enumerable: false, + configurable: true + }); + // The default Coerce function + Reader.coerce = function (name, value) { + var match = name.match("^u?int([0-9]+)$"); + if (match && parseInt(match[1]) <= 48) { + value = value.toNumber(); + } + return value; + }; + Reader.prototype.coerce = function (name, value) { + if (this._coerceFunc) { + return this._coerceFunc(name, value); + } + return Reader.coerce(name, value); + }; + Reader.prototype._peekBytes = function (offset, length, loose) { + var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize; + if (this._offset + alignedLength > this._data.length) { + if (this.allowLoose && loose && this._offset + length <= this._data.length) { + alignedLength = length; + } + else { + logger.throwError("data out-of-bounds", logger_1.Logger.errors.BUFFER_OVERRUN, { + length: this._data.length, + offset: this._offset + alignedLength + }); + } + } + return this._data.slice(this._offset, this._offset + alignedLength); + }; + Reader.prototype.subReader = function (offset) { + return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose); + }; + Reader.prototype.readBytes = function (length, loose) { + var bytes = this._peekBytes(0, length, !!loose); + this._offset += bytes.length; + // @TODO: Make sure the length..end bytes are all 0? + return bytes.slice(0, length); + }; + Reader.prototype.readValue = function () { + return bignumber_1.BigNumber.from(this.readBytes(this.wordSize)); + }; + return Reader; +}()); +exports.Reader = Reader; +//# sourceMappingURL=abstract-coder.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js.map b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js.map new file mode 100644 index 0000000..00589ae --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abstract-coder.js","sourceRoot":"","sources":["../../src.ts/coders/abstract-coder.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAAuF;AACvF,sDAA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AC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,CAAC;IACL,aAAC;AAAD,CAAC,AA9DD,IA8DC;AA9DY,wBAAM"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/address.d.ts b/node_modules/@ethersproject/abi/lib/coders/address.d.ts new file mode 100644 index 0000000..05df08a --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/address.d.ts @@ -0,0 +1,8 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class AddressCoder extends Coder { + constructor(localName: string); + defaultValue(): string; + encode(writer: Writer, value: string): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=address.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/address.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/address.d.ts.map new file mode 100644 index 0000000..e1d2620 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/address.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src.ts/coders/address.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,YAAa,SAAQ,KAAK;gBAEvB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAS7C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/address.js b/node_modules/@ethersproject/abi/lib/coders/address.js new file mode 100644 index 0000000..118428a --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/address.js @@ -0,0 +1,45 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AddressCoder = void 0; +var address_1 = require("@ethersproject/address"); +var bytes_1 = require("@ethersproject/bytes"); +var abstract_coder_1 = require("./abstract-coder"); +var AddressCoder = /** @class */ (function (_super) { + __extends(AddressCoder, _super); + function AddressCoder(localName) { + return _super.call(this, "address", "address", localName, false) || this; + } + AddressCoder.prototype.defaultValue = function () { + return "0x0000000000000000000000000000000000000000"; + }; + AddressCoder.prototype.encode = function (writer, value) { + try { + value = (0, address_1.getAddress)(value); + } + catch (error) { + this._throwError(error.message, value); + } + return writer.writeValue(value); + }; + AddressCoder.prototype.decode = function (reader) { + return (0, address_1.getAddress)((0, bytes_1.hexZeroPad)(reader.readValue().toHexString(), 20)); + }; + return AddressCoder; +}(abstract_coder_1.Coder)); +exports.AddressCoder = AddressCoder; +//# sourceMappingURL=address.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/address.js.map b/node_modules/@ethersproject/abi/lib/coders/address.js.map new file mode 100644 index 0000000..dfb8243 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/address.js.map @@ -0,0 +1 @@ +{"version":3,"file":"address.js","sourceRoot":"","sources":["../../src.ts/coders/address.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,kDAAoD;AACpD,8CAAkD;AAElD,mDAAyD;AAEzD;IAAkC,gCAAK;IAEnC,sBAAY,SAAiB;eACzB,kBAAM,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;IACjD,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,4CAA4C,CAAC;IACxD,CAAC;IAED,6BAAM,GAAN,UAAO,MAAc,EAAE,KAAa;QAChC,IAAI;YACA,KAAK,GAAG,IAAA,oBAAU,EAAC,KAAK,CAAC,CAAA;SAC5B;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,6BAAM,GAAN,UAAO,MAAc;QACjB,OAAO,IAAA,oBAAU,EAAC,IAAA,kBAAU,EAAC,MAAM,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;IACL,mBAAC;AAAD,CAAC,AAtBD,CAAkC,sBAAK,GAsBtC;AAtBY,oCAAY"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts b/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts new file mode 100644 index 0000000..8e02344 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts @@ -0,0 +1,9 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class AnonymousCoder extends Coder { + private coder; + constructor(coder: Coder); + defaultValue(): any; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=anonymous.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts.map new file mode 100644 index 0000000..21f89b6 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"anonymous.d.ts","sourceRoot":"","sources":["../../src.ts/coders/anonymous.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,qBAAa,cAAe,SAAQ,KAAK;IACrC,OAAO,CAAC,KAAK,CAAQ;gBAET,KAAK,EAAE,KAAK;IAKxB,YAAY,IAAI,GAAG;IAInB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAI1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/anonymous.js b/node_modules/@ethersproject/abi/lib/coders/anonymous.js new file mode 100644 index 0000000..f452eb0 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/anonymous.js @@ -0,0 +1,40 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnonymousCoder = void 0; +var abstract_coder_1 = require("./abstract-coder"); +// Clones the functionality of an existing Coder, but without a localName +var AnonymousCoder = /** @class */ (function (_super) { + __extends(AnonymousCoder, _super); + function AnonymousCoder(coder) { + var _this = _super.call(this, coder.name, coder.type, undefined, coder.dynamic) || this; + _this.coder = coder; + return _this; + } + AnonymousCoder.prototype.defaultValue = function () { + return this.coder.defaultValue(); + }; + AnonymousCoder.prototype.encode = function (writer, value) { + return this.coder.encode(writer, value); + }; + AnonymousCoder.prototype.decode = function (reader) { + return this.coder.decode(reader); + }; + return AnonymousCoder; +}(abstract_coder_1.Coder)); +exports.AnonymousCoder = AnonymousCoder; +//# sourceMappingURL=anonymous.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/anonymous.js.map b/node_modules/@ethersproject/abi/lib/coders/anonymous.js.map new file mode 100644 index 0000000..e98fdee --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/anonymous.js.map @@ -0,0 +1 @@ +{"version":3,"file":"anonymous.js","sourceRoot":"","sources":["../../src.ts/coders/anonymous.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,mDAAyD;AAEzD,yEAAyE;AACzE;IAAoC,kCAAK;IAGrC,wBAAY,KAAY;QAAxB,YACI,kBAAM,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,SAE1D;QADG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,qCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED,+BAAM,GAAN,UAAO,MAAc,EAAE,KAAU;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,+BAAM,GAAN,UAAO,MAAc;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IACL,qBAAC;AAAD,CAAC,AAnBD,CAAoC,sBAAK,GAmBxC;AAnBY,wCAAc"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/array.d.ts b/node_modules/@ethersproject/abi/lib/coders/array.d.ts new file mode 100644 index 0000000..62032c5 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/array.d.ts @@ -0,0 +1,14 @@ +import { Coder, Reader, Result, Writer } from "./abstract-coder"; +export declare function pack(writer: Writer, coders: ReadonlyArray, values: Array | { + [name: string]: any; +}): number; +export declare function unpack(reader: Reader, coders: Array): Result; +export declare class ArrayCoder extends Coder { + readonly coder: Coder; + readonly length: number; + constructor(coder: Coder, length: number, localName: string); + defaultValue(): Array; + encode(writer: Writer, value: Array): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/array.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/array.d.ts.map new file mode 100644 index 0000000..05f6898 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src.ts/coders/array.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGjE,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,GAAG,CAAA;CAAE,GAAG,MAAM,CAuEzH;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,CAmFnE;AAGD,qBAAa,UAAW,SAAQ,KAAK;IACjC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAS3D,YAAY,IAAI,KAAK,CAAC,GAAG,CAAC;IAW1B,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM;IAoBjD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAsB9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/array.js b/node_modules/@ethersproject/abi/lib/coders/array.js new file mode 100644 index 0000000..84d1828 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/array.js @@ -0,0 +1,236 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ArrayCoder = exports.unpack = exports.pack = void 0; +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("../_version"); +var logger = new logger_1.Logger(_version_1.version); +var abstract_coder_1 = require("./abstract-coder"); +var anonymous_1 = require("./anonymous"); +function pack(writer, coders, values) { + var arrayValues = null; + if (Array.isArray(values)) { + arrayValues = values; + } + else if (values && typeof (values) === "object") { + var unique_1 = {}; + arrayValues = coders.map(function (coder) { + var name = coder.localName; + if (!name) { + logger.throwError("cannot encode object for signature with missing names", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + if (unique_1[name]) { + logger.throwError("cannot encode object for signature with duplicate names", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + unique_1[name] = true; + return values[name]; + }); + } + else { + logger.throwArgumentError("invalid tuple value", "tuple", values); + } + if (coders.length !== arrayValues.length) { + logger.throwArgumentError("types/value length mismatch", "tuple", values); + } + var staticWriter = new abstract_coder_1.Writer(writer.wordSize); + var dynamicWriter = new abstract_coder_1.Writer(writer.wordSize); + var updateFuncs = []; + coders.forEach(function (coder, index) { + var value = arrayValues[index]; + if (coder.dynamic) { + // Get current dynamic offset (for the future pointer) + var dynamicOffset_1 = dynamicWriter.length; + // Encode the dynamic value into the dynamicWriter + coder.encode(dynamicWriter, value); + // Prepare to populate the correct offset once we are done + var updateFunc_1 = staticWriter.writeUpdatableValue(); + updateFuncs.push(function (baseOffset) { + updateFunc_1(baseOffset + dynamicOffset_1); + }); + } + else { + coder.encode(staticWriter, value); + } + }); + // Backfill all the dynamic offsets, now that we know the static length + updateFuncs.forEach(function (func) { func(staticWriter.length); }); + var length = writer.appendWriter(staticWriter); + length += writer.appendWriter(dynamicWriter); + return length; +} +exports.pack = pack; +function unpack(reader, coders) { + var values = []; + // A reader anchored to this base + var baseReader = reader.subReader(0); + coders.forEach(function (coder) { + var value = null; + if (coder.dynamic) { + var offset = reader.readValue(); + var offsetReader = baseReader.subReader(offset.toNumber()); + try { + value = coder.decode(offsetReader); + } + catch (error) { + // Cannot recover from this + if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + else { + try { + value = coder.decode(reader); + } + catch (error) { + // Cannot recover from this + if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + if (value != undefined) { + values.push(value); + } + }); + // We only output named properties for uniquely named coders + var uniqueNames = coders.reduce(function (accum, coder) { + var name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add any named parameters (i.e. tuples) + coders.forEach(function (coder, index) { + var name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + var value = values[index]; + if (value instanceof Error) { + Object.defineProperty(values, name, { + enumerable: true, + get: function () { throw value; } + }); + } + else { + values[name] = value; + } + }); + var _loop_1 = function (i) { + var value = values[i]; + if (value instanceof Error) { + Object.defineProperty(values, i, { + enumerable: true, + get: function () { throw value; } + }); + } + }; + for (var i = 0; i < values.length; i++) { + _loop_1(i); + } + return Object.freeze(values); +} +exports.unpack = unpack; +var ArrayCoder = /** @class */ (function (_super) { + __extends(ArrayCoder, _super); + function ArrayCoder(coder, length, localName) { + var _this = this; + var type = (coder.type + "[" + (length >= 0 ? length : "") + "]"); + var dynamic = (length === -1 || coder.dynamic); + _this = _super.call(this, "array", type, localName, dynamic) || this; + _this.coder = coder; + _this.length = length; + return _this; + } + ArrayCoder.prototype.defaultValue = function () { + // Verifies the child coder is valid (even if the array is dynamic or 0-length) + var defaultChild = this.coder.defaultValue(); + var result = []; + for (var i = 0; i < this.length; i++) { + result.push(defaultChild); + } + return result; + }; + ArrayCoder.prototype.encode = function (writer, value) { + if (!Array.isArray(value)) { + this._throwError("expected array value", value); + } + var count = this.length; + if (count === -1) { + count = value.length; + writer.writeValue(value.length); + } + logger.checkArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : "")); + var coders = []; + for (var i = 0; i < value.length; i++) { + coders.push(this.coder); + } + return pack(writer, coders, value); + }; + ArrayCoder.prototype.decode = function (reader) { + var count = this.length; + if (count === -1) { + count = reader.readValue().toNumber(); + // Check that there is *roughly* enough data to ensure + // stray random data is not being read as a length. Each + // slot requires at least 32 bytes for their value (or 32 + // bytes as a link to the data). This could use a much + // tighter bound, but we are erroring on the side of safety. + if (count * 32 > reader._data.length) { + logger.throwError("insufficient data length", logger_1.Logger.errors.BUFFER_OVERRUN, { + length: reader._data.length, + count: count + }); + } + } + var coders = []; + for (var i = 0; i < count; i++) { + coders.push(new anonymous_1.AnonymousCoder(this.coder)); + } + return reader.coerce(this.name, unpack(reader, coders)); + }; + return ArrayCoder; +}(abstract_coder_1.Coder)); +exports.ArrayCoder = ArrayCoder; +//# sourceMappingURL=array.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/array.js.map b/node_modules/@ethersproject/abi/lib/coders/array.js.map new file mode 100644 index 0000000..326259c --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"array.js","sourceRoot":"","sources":["../../src.ts/coders/array.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,gDAA+C;AAC/C,wCAAsC;AACtC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,mDAAiE;AACjE,yCAA6C;AAE7C,SAAgB,IAAI,CAAC,MAAc,EAAE,MAA4B,EAAE,MAA8C;IAC7G,IAAI,WAAW,GAAe,IAAI,CAAC;IAEnC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACxB,WAAW,GAAG,MAAM,CAAC;KAEvB;SAAM,IAAI,MAAM,IAAI,OAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;QAC9C,IAAI,QAAM,GAAkC,EAAG,CAAC;QAEhD,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK;YAC3B,IAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC;YAC7B,IAAI,CAAC,IAAI,EAAE;gBACP,MAAM,CAAC,UAAU,CAAC,uDAAuD,EAAE,eAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACvG,QAAQ,EAAE,QAAQ;oBAClB,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,MAAM;iBAChB,CAAC,CAAC;aACN;YAED,IAAI,QAAM,CAAC,IAAI,CAAC,EAAE;gBACd,MAAM,CAAC,UAAU,CAAC,yDAAyD,EAAE,eAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACzG,QAAQ,EAAE,QAAQ;oBAClB,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,MAAM;iBAChB,CAAC,CAAC;aACN;YAED,QAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YAEpB,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC,CA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yDAAyD;YACzD,sDAAsD;YACtD,4DAA4D;YAC5D,IAAI,KAAK,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;gBAClC,MAAM,CAAC,UAAU,CAAC,0BAA0B,EAAE,eAAM,CAAC,MAAM,CAAC,cAAc,EAAE;oBACxE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;oBAC3B,KAAK,EAAE,KAAK;iBACf,CAAC,CAAC;aACN;SACJ;QACD,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,0BAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;SAAE;QAEhF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IACL,iBAAC;AAAD,CAAC,AAlED,CAAgC,sBAAK,GAkEpC;AAlEY,gCAAU"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts b/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts new file mode 100644 index 0000000..ae83580 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts @@ -0,0 +1,8 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class BooleanCoder extends Coder { + constructor(localName: string); + defaultValue(): boolean; + encode(writer: Writer, value: boolean): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=boolean.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts.map new file mode 100644 index 0000000..e265fba --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src.ts/coders/boolean.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,YAAa,SAAQ,KAAK;gBAEvB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,OAAO;IAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM;IAI9C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/boolean.js b/node_modules/@ethersproject/abi/lib/coders/boolean.js new file mode 100644 index 0000000..2d8f5c0 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/boolean.js @@ -0,0 +1,37 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BooleanCoder = void 0; +var abstract_coder_1 = require("./abstract-coder"); +var BooleanCoder = /** @class */ (function (_super) { + __extends(BooleanCoder, _super); + function BooleanCoder(localName) { + return _super.call(this, "bool", "bool", localName, false) || this; + } + BooleanCoder.prototype.defaultValue = function () { + return false; + }; + BooleanCoder.prototype.encode = function (writer, value) { + return writer.writeValue(value ? 1 : 0); + }; + BooleanCoder.prototype.decode = function (reader) { + return reader.coerce(this.type, !reader.readValue().isZero()); + }; + return BooleanCoder; +}(abstract_coder_1.Coder)); +exports.BooleanCoder = BooleanCoder; +//# sourceMappingURL=boolean.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/boolean.js.map b/node_modules/@ethersproject/abi/lib/coders/boolean.js.map new file mode 100644 index 0000000..0b2b270 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/boolean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../src.ts/coders/boolean.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,mDAAyD;AAEzD;IAAkC,gCAAK;IAEnC,sBAAY,SAAiB;eACzB,kBAAM,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC;IAC3C,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,6BAAM,GAAN,UAAO,MAAc,EAAE,KAAc;QACjC,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,6BAAM,GAAN,UAAO,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;IACL,mBAAC;AAAD,CAAC,AAjBD,CAAkC,sBAAK,GAiBtC;AAjBY,oCAAY"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts b/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts new file mode 100644 index 0000000..7fbcf7b --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts @@ -0,0 +1,12 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class DynamicBytesCoder extends Coder { + constructor(type: string, localName: string); + defaultValue(): string; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +export declare class BytesCoder extends DynamicBytesCoder { + constructor(localName: string); + decode(reader: Reader): any; +} +//# sourceMappingURL=bytes.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts.map new file mode 100644 index 0000000..aec892c --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src.ts/coders/bytes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC5B,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAI3C,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAO1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B;AAED,qBAAa,UAAW,SAAQ,iBAAiB;gBACjC,SAAS,EAAE,MAAM;IAI7B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/bytes.js b/node_modules/@ethersproject/abi/lib/coders/bytes.js new file mode 100644 index 0000000..8204ad7 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/bytes.js @@ -0,0 +1,52 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BytesCoder = exports.DynamicBytesCoder = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var abstract_coder_1 = require("./abstract-coder"); +var DynamicBytesCoder = /** @class */ (function (_super) { + __extends(DynamicBytesCoder, _super); + function DynamicBytesCoder(type, localName) { + return _super.call(this, type, type, localName, true) || this; + } + DynamicBytesCoder.prototype.defaultValue = function () { + return "0x"; + }; + DynamicBytesCoder.prototype.encode = function (writer, value) { + value = (0, bytes_1.arrayify)(value); + var length = writer.writeValue(value.length); + length += writer.writeBytes(value); + return length; + }; + DynamicBytesCoder.prototype.decode = function (reader) { + return reader.readBytes(reader.readValue().toNumber(), true); + }; + return DynamicBytesCoder; +}(abstract_coder_1.Coder)); +exports.DynamicBytesCoder = DynamicBytesCoder; +var BytesCoder = /** @class */ (function (_super) { + __extends(BytesCoder, _super); + function BytesCoder(localName) { + return _super.call(this, "bytes", localName) || this; + } + BytesCoder.prototype.decode = function (reader) { + return reader.coerce(this.name, (0, bytes_1.hexlify)(_super.prototype.decode.call(this, reader))); + }; + return BytesCoder; +}(DynamicBytesCoder)); +exports.BytesCoder = BytesCoder; +//# sourceMappingURL=bytes.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/bytes.js.map b/node_modules/@ethersproject/abi/lib/coders/bytes.js.map new file mode 100644 index 0000000..cb92866 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/bytes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../src.ts/coders/bytes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,8CAAyD;AAEzD,mDAAyD;AAEzD;IAAuC,qCAAK;IACxC,2BAAY,IAAY,EAAE,SAAiB;eACxC,kBAAM,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC;IACrC,CAAC;IAED,wCAAY,GAAZ;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kCAAM,GAAN,UAAO,MAAc,EAAE,KAAU;QAC7B,KAAK,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;QACxB,IAAI,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,kCAAM,GAAN,UAAO,MAAc;QACjB,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;IACL,wBAAC;AAAD,CAAC,AAnBD,CAAuC,sBAAK,GAmB3C;AAnBY,8CAAiB;AAqB9B;IAAgC,8BAAiB;IAC7C,oBAAY,SAAiB;eACzB,kBAAM,OAAO,EAAE,SAAS,CAAC;IAC7B,CAAC;IAED,2BAAM,GAAN,UAAO,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,eAAO,EAAC,iBAAM,MAAM,YAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IACL,iBAAC;AAAD,CAAC,AARD,CAAgC,iBAAiB,GAQhD;AARY,gCAAU"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts new file mode 100644 index 0000000..e345513 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts @@ -0,0 +1,10 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class FixedBytesCoder extends Coder { + readonly size: number; + constructor(size: number, localName: string); + defaultValue(): string; + encode(writer: Writer, value: BytesLike): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=fixed-bytes.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts.map new file mode 100644 index 0000000..42da7a4 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fixed-bytes.d.ts","sourceRoot":"","sources":["../../src.ts/coders/fixed-bytes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,qBAAa,eAAgB,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAM3C,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM;IAMhD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js new file mode 100644 index 0000000..8756baa --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js @@ -0,0 +1,47 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FixedBytesCoder = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var abstract_coder_1 = require("./abstract-coder"); +// @TODO: Merge this with bytes +var FixedBytesCoder = /** @class */ (function (_super) { + __extends(FixedBytesCoder, _super); + function FixedBytesCoder(size, localName) { + var _this = this; + var name = "bytes" + String(size); + _this = _super.call(this, name, name, localName, false) || this; + _this.size = size; + return _this; + } + FixedBytesCoder.prototype.defaultValue = function () { + return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2); + }; + FixedBytesCoder.prototype.encode = function (writer, value) { + var data = (0, bytes_1.arrayify)(value); + if (data.length !== this.size) { + this._throwError("incorrect data length", value); + } + return writer.writeBytes(data); + }; + FixedBytesCoder.prototype.decode = function (reader) { + return reader.coerce(this.name, (0, bytes_1.hexlify)(reader.readBytes(this.size))); + }; + return FixedBytesCoder; +}(abstract_coder_1.Coder)); +exports.FixedBytesCoder = FixedBytesCoder; +//# sourceMappingURL=fixed-bytes.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js.map b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js.map new file mode 100644 index 0000000..2eac31e --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fixed-bytes.js","sourceRoot":"","sources":["../../src.ts/coders/fixed-bytes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,8CAAoE;AAEpE,mDAAyD;AAEzD,+BAA+B;AAC/B;IAAqC,mCAAK;IAGtC,yBAAY,IAAY,EAAE,SAAiB;QAA3C,iBAIC;QAHG,IAAI,IAAI,GAAG,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,QAAA,kBAAM,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,SAAC;QACpC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED,sCAAY,GAAZ;QACI,OAAO,CAAC,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAClH,CAAC;IAED,gCAAM,GAAN,UAAO,MAAc,EAAE,KAAgB;QACnC,IAAI,IAAI,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;SAAE;QACpF,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,gCAAM,GAAN,UAAO,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,eAAO,EAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;IACL,sBAAC;AAAD,CAAC,AAtBD,CAAqC,sBAAK,GAsBzC;AAtBY,0CAAe"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/null.d.ts b/node_modules/@ethersproject/abi/lib/coders/null.d.ts new file mode 100644 index 0000000..04ff0fa --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/null.d.ts @@ -0,0 +1,8 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class NullCoder extends Coder { + constructor(localName: string); + defaultValue(): null; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=null.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/null.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/null.d.ts.map new file mode 100644 index 0000000..96ad6ef --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/null.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"null.d.ts","sourceRoot":"","sources":["../../src.ts/coders/null.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,SAAU,SAAQ,KAAK;gBAEpB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,IAAI;IAIpB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAK1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAI9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/null.js b/node_modules/@ethersproject/abi/lib/coders/null.js new file mode 100644 index 0000000..596e4ea --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/null.js @@ -0,0 +1,41 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NullCoder = void 0; +var abstract_coder_1 = require("./abstract-coder"); +var NullCoder = /** @class */ (function (_super) { + __extends(NullCoder, _super); + function NullCoder(localName) { + return _super.call(this, "null", "", localName, false) || this; + } + NullCoder.prototype.defaultValue = function () { + return null; + }; + NullCoder.prototype.encode = function (writer, value) { + if (value != null) { + this._throwError("not null", value); + } + return writer.writeBytes([]); + }; + NullCoder.prototype.decode = function (reader) { + reader.readBytes(0); + return reader.coerce(this.name, null); + }; + return NullCoder; +}(abstract_coder_1.Coder)); +exports.NullCoder = NullCoder; +//# sourceMappingURL=null.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/null.js.map b/node_modules/@ethersproject/abi/lib/coders/null.js.map new file mode 100644 index 0000000..2fcfe65 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/null.js.map @@ -0,0 +1 @@ +{"version":3,"file":"null.js","sourceRoot":"","sources":["../../src.ts/coders/null.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,mDAAyD;AAEzD;IAA+B,6BAAK;IAEhC,mBAAY,SAAiB;eACzB,kBAAM,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC;IACvC,CAAC;IAED,gCAAY,GAAZ;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,0BAAM,GAAN,UAAO,MAAc,EAAE,KAAU;QAC7B,IAAI,KAAK,IAAI,IAAI,EAAE;YAAE,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAAE;QAC3D,OAAO,MAAM,CAAC,UAAU,CAAC,EAAG,CAAC,CAAC;IAClC,CAAC;IAED,0BAAM,GAAN,UAAO,MAAc;QACjB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IACL,gBAAC;AAAD,CAAC,AAnBD,CAA+B,sBAAK,GAmBnC;AAnBY,8BAAS"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/number.d.ts b/node_modules/@ethersproject/abi/lib/coders/number.d.ts new file mode 100644 index 0000000..f1cd379 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/number.d.ts @@ -0,0 +1,11 @@ +import { BigNumberish } from "@ethersproject/bignumber"; +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class NumberCoder extends Coder { + readonly size: number; + readonly signed: boolean; + constructor(size: number, signed: boolean, localName: string); + defaultValue(): number; + encode(writer: Writer, value: BigNumberish): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/number.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/number.d.ts.map new file mode 100644 index 0000000..c3f5f90 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/number.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src.ts/coders/number.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,WAAY,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAEb,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM;IAQ5D,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM;IAuBnD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAS9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/number.js b/node_modules/@ethersproject/abi/lib/coders/number.js new file mode 100644 index 0000000..5921505 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/number.js @@ -0,0 +1,64 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NumberCoder = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var constants_1 = require("@ethersproject/constants"); +var abstract_coder_1 = require("./abstract-coder"); +var NumberCoder = /** @class */ (function (_super) { + __extends(NumberCoder, _super); + function NumberCoder(size, signed, localName) { + var _this = this; + var name = ((signed ? "int" : "uint") + (size * 8)); + _this = _super.call(this, name, name, localName, false) || this; + _this.size = size; + _this.signed = signed; + return _this; + } + NumberCoder.prototype.defaultValue = function () { + return 0; + }; + NumberCoder.prototype.encode = function (writer, value) { + var v = bignumber_1.BigNumber.from(value); + // Check bounds are safe for encoding + var maxUintValue = constants_1.MaxUint256.mask(writer.wordSize * 8); + if (this.signed) { + var bounds = maxUintValue.mask(this.size * 8 - 1); + if (v.gt(bounds) || v.lt(bounds.add(constants_1.One).mul(constants_1.NegativeOne))) { + this._throwError("value out-of-bounds", value); + } + } + else if (v.lt(constants_1.Zero) || v.gt(maxUintValue.mask(this.size * 8))) { + this._throwError("value out-of-bounds", value); + } + v = v.toTwos(this.size * 8).mask(this.size * 8); + if (this.signed) { + v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize); + } + return writer.writeValue(v); + }; + NumberCoder.prototype.decode = function (reader) { + var value = reader.readValue().mask(this.size * 8); + if (this.signed) { + value = value.fromTwos(this.size * 8); + } + return reader.coerce(this.name, value); + }; + return NumberCoder; +}(abstract_coder_1.Coder)); +exports.NumberCoder = NumberCoder; +//# sourceMappingURL=number.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/number.js.map b/node_modules/@ethersproject/abi/lib/coders/number.js.map new file mode 100644 index 0000000..b978a9c --- /dev/null +++ b/node_modules/@eth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,IAAI,CAAC,CAAC,EAAE,CAAC,gBAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;YAC7D,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;SAClD;QAED,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QAEhD,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC7D;QAED,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IAED,4BAAM,GAAN,UAAO,MAAc;QACjB,IAAI,KAAK,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QAEnD,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;SACzC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IACL,kBAAC;AAAD,CAAC,AAhDD,CAAiC,sBAAK,GAgDrC;AAhDY,kCAAW"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/string.d.ts b/node_modules/@ethersproject/abi/lib/coders/string.d.ts new file mode 100644 index 0000000..08d75c3 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/string.d.ts @@ -0,0 +1,9 @@ +import { Reader, Writer } from "./abstract-coder"; +import { DynamicBytesCoder } from "./bytes"; +export declare class StringCoder extends DynamicBytesCoder { + constructor(localName: string); + defaultValue(): string; + encode(writer: Writer, value: any): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/string.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/string.d.ts.map new file mode 100644 index 0000000..30d1e61 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src.ts/coders/string.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,qBAAa,WAAY,SAAQ,iBAAiB;gBAElC,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAI1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/string.js b/node_modules/@ethersproject/abi/lib/coders/string.js new file mode 100644 index 0000000..ad20126 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/string.js @@ -0,0 +1,38 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StringCoder = void 0; +var strings_1 = require("@ethersproject/strings"); +var bytes_1 = require("./bytes"); +var StringCoder = /** @class */ (function (_super) { + __extends(StringCoder, _super); + function StringCoder(localName) { + return _super.call(this, "string", localName) || this; + } + StringCoder.prototype.defaultValue = function () { + return ""; + }; + StringCoder.prototype.encode = function (writer, value) { + return _super.prototype.encode.call(this, writer, (0, strings_1.toUtf8Bytes)(value)); + }; + StringCoder.prototype.decode = function (reader) { + return (0, strings_1.toUtf8String)(_super.prototype.decode.call(this, reader)); + }; + return StringCoder; +}(bytes_1.DynamicBytesCoder)); +exports.StringCoder = StringCoder; +//# sourceMappingURL=string.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/string.js.map b/node_modules/@ethersproject/abi/lib/coders/string.js.map new file mode 100644 index 0000000..e191ae1 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src.ts/coders/string.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,kDAAmE;AAGnE,iCAA4C;AAE5C;IAAiC,+BAAiB;IAE9C,qBAAY,SAAiB;eACzB,kBAAM,QAAQ,EAAE,SAAS,CAAC;IAC9B,CAAC;IAED,kCAAY,GAAZ;QACI,OAAO,EAAE,CAAC;IACd,CAAC;IAED,4BAAM,GAAN,UAAO,MAAc,EAAE,KAAU;QAC7B,OAAO,iBAAM,MAAM,YAAC,MAAM,EAAE,IAAA,qBAAW,EAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,4BAAM,GAAN,UAAO,MAAc;QACjB,OAAO,IAAA,sBAAY,EAAC,iBAAM,MAAM,YAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IACL,kBAAC;AAAD,CAAC,AAjBD,CAAiC,yBAAiB,GAiBjD;AAjBY,kCAAW"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts b/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts new file mode 100644 index 0000000..514d5c2 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts @@ -0,0 +1,11 @@ +import { Coder, Reader, Writer } from "./abstract-coder"; +export declare class TupleCoder extends Coder { + readonly coders: Array; + constructor(coders: Array, localName: string); + defaultValue(): any; + encode(writer: Writer, value: Array | { + [name: string]: any; + }): number; + decode(reader: Reader): any; +} +//# sourceMappingURL=tuple.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts.map b/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts.map new file mode 100644 index 0000000..47858e1 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../src.ts/coders/tuple.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,qBAAa,UAAW,SAAQ,KAAK;IACjC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAElB,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM;IAanD,YAAY,IAAI,GAAG;IA+BnB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG;QAAE,CAAE,IAAI,EAAE,MAAM,GAAI,GAAG,CAAA;KAAE,GAAG,MAAM;IAI7E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/tuple.js b/node_modules/@ethersproject/abi/lib/coders/tuple.js new file mode 100644 index 0000000..53b86fd --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/tuple.js @@ -0,0 +1,79 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TupleCoder = void 0; +var abstract_coder_1 = require("./abstract-coder"); +var array_1 = require("./array"); +var TupleCoder = /** @class */ (function (_super) { + __extends(TupleCoder, _super); + function TupleCoder(coders, localName) { + var _this = this; + var dynamic = false; + var types = []; + coders.forEach(function (coder) { + if (coder.dynamic) { + dynamic = true; + } + types.push(coder.type); + }); + var type = ("tuple(" + types.join(",") + ")"); + _this = _super.call(this, "tuple", type, localName, dynamic) || this; + _this.coders = coders; + return _this; + } + TupleCoder.prototype.defaultValue = function () { + var values = []; + this.coders.forEach(function (coder) { + values.push(coder.defaultValue()); + }); + // We only output named properties for uniquely named coders + var uniqueNames = this.coders.reduce(function (accum, coder) { + var name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add named values + this.coders.forEach(function (coder, index) { + var name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + values[name] = values[index]; + }); + return Object.freeze(values); + }; + TupleCoder.prototype.encode = function (writer, value) { + return (0, array_1.pack)(writer, this.coders, value); + }; + TupleCoder.prototype.decode = function (reader) { + return reader.coerce(this.name, (0, array_1.unpack)(reader, this.coders)); + }; + return TupleCoder; +}(abstract_coder_1.Coder)); +exports.TupleCoder = TupleCoder; +//# sourceMappingURL=tuple.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/coders/tuple.js.map b/node_modules/@ethersproject/abi/lib/coders/tuple.js.map new file mode 100644 index 0000000..3d867a6 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/coders/tuple.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../src.ts/coders/tuple.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,mDAAyD;AACzD,iCAAuC;AAEvC;IAAgC,8BAAK;IAGjC,oBAAY,MAAoB,EAAE,SAAiB;QAAnD,iBAWC;QAVG,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAM,KAAK,GAAkB,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;YACjB,IAAI,KAAK,CAAC,OAAO,EAAE;gBAAE,OAAO,GAAG,IAAI,CAAC;aAAE;YACtC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,IAAM,IAAI,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;QAEhD,QAAA,kBAAM,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,SAAC;QACzC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED,iCAAY,GAAZ;QACI,IAAM,MAAM,GAAQ,EAAG,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;YACtB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,4DAA4D;QAC5D,IAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAC,KAAK,EAAE,KAAK;YAChD,IAAM,IAAI,GAA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/@ethersproject/abi/lib/fragments.d.ts new file mode 100644 index 0000000..2b9b253 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/fragments.d.ts @@ -0,0 +1,85 @@ +import { BigNumber } from "@ethersproject/bignumber"; +export interface JsonFragmentType { + readonly name?: string; + readonly indexed?: boolean; + readonly type?: string; + readonly internalType?: any; + readonly components?: ReadonlyArray; +} +export interface JsonFragment { + readonly name?: string; + readonly type?: string; + readonly anonymous?: boolean; + readonly payable?: boolean; + readonly constant?: boolean; + readonly stateMutability?: string; + readonly inputs?: ReadonlyArray; + readonly outputs?: ReadonlyArray; + readonly gas?: string; +} +export declare const FormatTypes: { + [name: string]: string; +}; +export declare class ParamType { + readonly name: string; + readonly type: string; + readonly baseType: string; + readonly indexed: boolean; + readonly components: Array; + readonly arrayLength: number; + readonly arrayChildren: ParamType; + readonly _isParamType: boolean; + constructor(constructorGuard: any, params: any); + format(format?: string): string; + static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType; + static fromObject(value: JsonFragmentType | ParamType): ParamType; + static fromString(value: string, allowIndexed?: boolean): ParamType; + static isParamType(value: any): value is ParamType; +} +export declare abstract class Fragment { + readonly type: string; + readonly name: string; + readonly inputs: Array; + readonly _isFragment: boolean; + constructor(constructorGuard: any, params: any); + abstract format(format?: string): string; + static from(value: Fragment | JsonFragment | string): Fragment; + static fromObject(value: Fragment | JsonFragment): Fragment; + static fromString(value: string): Fragment; + static isFragment(value: any): value is Fragment; +} +export declare class EventFragment extends Fragment { + readonly anonymous: boolean; + format(format?: string): string; + static from(value: EventFragment | JsonFragment | string): EventFragment; + static fromObject(value: JsonFragment | EventFragment): EventFragment; + static fromString(value: string): EventFragment; + static isEventFragment(value: any): value is EventFragment; +} +export declare class ConstructorFragment extends Fragment { + stateMutability: string; + payable: boolean; + gas?: BigNumber; + format(format?: string): string; + static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment; + static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment; + static fromString(value: string): ConstructorFragment; + static isConstructorFragment(value: any): value is ConstructorFragment; +} +export declare class FunctionFragment extends ConstructorFragment { + constant: boolean; + outputs?: Array; + format(format?: string): string; + static from(value: FunctionFragment | JsonFragment | string): FunctionFragment; + static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment; + static fromString(value: string): FunctionFragment; + static isFunctionFragment(value: any): value is FunctionFragment; +} +export declare class ErrorFragment extends Fragment { + format(format?: string): string; + static from(value: ErrorFragment | JsonFragment | string): ErrorFragment; + static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment; + static fromString(value: string): ErrorFragment; + static isErrorFragment(value: any): value is ErrorFragment; +} +//# sourceMappingURL=fragments.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/fragments.d.ts.map b/node_modules/@ethersproject/abi/lib/fragments.d.ts.map new file mode 100644 index 0000000..b169744 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/fragments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fragments.d.ts","sourceRoot":"","sources":["../src.ts/fragments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAOrD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B,QAAQ,CAAC,OAAO,CAAC,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C,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,aAAa;CAG7D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/fragments.js b/node_modules/@ethersproject/abi/lib/fragments.js new file mode 100644 index 0000000..9095ad1 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/fragments.js @@ -0,0 +1,900 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorFragment = exports.FunctionFragment = exports.ConstructorFragment = exports.EventFragment = exports.Fragment = exports.ParamType = exports.FormatTypes = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +; +var _constructorGuard = {}; +var ModifiersBytes = { calldata: true, memory: true, storage: true }; +var ModifiersNest = { calldata: true, memory: true }; +function checkModifier(type, name) { + if (type === "bytes" || type === "string") { + if (ModifiersBytes[name]) { + return true; + } + } + else if (type === "address") { + if (name === "payable") { + return true; + } + } + else if (type.indexOf("[") >= 0 || type === "tuple") { + if (ModifiersNest[name]) { + return true; + } + } + if (ModifiersBytes[name] || name === "payable") { + logger.throwArgumentError("invalid modifier", "name", name); + } + return false; +} +// @TODO: Make sure that children of an indexed tuple are marked with a null indexed +function parseParamType(param, allowIndexed) { + var originalParam = param; + function throwError(i) { + logger.throwArgumentError("unexpected character at position " + i, "param", param); + } + param = param.replace(/\s/g, " "); + function newNode(parent) { + var node = { type: "", name: "", parent: parent, state: { allowType: true } }; + if (allowIndexed) { + node.indexed = false; + } + return node; + } + var parent = { type: "", name: "", state: { allowType: true } }; + var node = parent; + for (var i = 0; i < param.length; i++) { + var c = param[i]; + switch (c) { + case "(": + if (node.state.allowType && node.type === "") { + node.type = "tuple"; + } + else if (!node.state.allowParams) { + throwError(i); + } + node.state.allowType = false; + node.type = verifyType(node.type); + node.components = [newNode(node)]; + node = node.components[0]; + break; + case ")": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + var child = node; + node = node.parent; + if (!node) { + throwError(i); + } + delete child.parent; + node.state.allowParams = false; + node.state.allowName = true; + node.state.allowArray = true; + break; + case ",": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + var sibling = newNode(node.parent); + //{ type: "", name: "", parent: node.parent, state: { allowType: true } }; + node.parent.components.push(sibling); + delete node.parent; + node = sibling; + break; + // Hit a space... + case " ": + // If reading type, the type is done and may read a param or name + if (node.state.allowType) { + if (node.type !== "") { + node.type = verifyType(node.type); + delete node.state.allowType; + node.state.allowName = true; + node.state.allowParams = true; + } + } + // If reading name, the name is done + if (node.state.allowName) { + if (node.name !== "") { + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + if (node.indexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + else { + node.state.allowName = false; + } + } + } + break; + case "[": + if (!node.state.allowArray) { + throwError(i); + } + node.type += c; + node.state.allowArray = false; + node.state.allowName = false; + node.state.readArray = true; + break; + case "]": + if (!node.state.readArray) { + throwError(i); + } + node.type += c; + node.state.readArray = false; + node.state.allowArray = true; + node.state.allowName = true; + break; + default: + if (node.state.allowType) { + node.type += c; + node.state.allowParams = true; + node.state.allowArray = true; + } + else if (node.state.allowName) { + node.name += c; + delete node.state.allowArray; + } + else if (node.state.readArray) { + node.type += c; + } + else { + throwError(i); + } + } + } + if (node.parent) { + logger.throwArgumentError("unexpected eof", "param", param); + } + delete parent.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(originalParam.length - 7); + } + if (node.indexed) { + throwError(originalParam.length - 7); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + parent.type = verifyType(parent.type); + return parent; +} +function populate(object, params) { + for (var key in params) { + (0, properties_1.defineReadOnly)(object, key, params[key]); + } +} +exports.FormatTypes = Object.freeze({ + // Bare formatting, as is needed for computing a sighash of an event or function + sighash: "sighash", + // Human-Readable with Minimal spacing and without names (compact human-readable) + minimal: "minimal", + // Human-Readable with nice spacing, including all names + full: "full", + // JSON-format a la Solidity + json: "json" +}); +var paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/); +var ParamType = /** @class */ (function () { + function ParamType(constructorGuard, params) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use fromString", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new ParamType()" + }); + } + populate(this, params); + var match = this.type.match(paramTypeArray); + if (match) { + populate(this, { + arrayLength: parseInt(match[2] || "-1"), + arrayChildren: ParamType.fromObject({ + type: match[1], + components: this.components + }), + baseType: "array" + }); + } + else { + populate(this, { + arrayLength: null, + arrayChildren: null, + baseType: ((this.components != null) ? "tuple" : this.type) + }); + } + this._isParamType = true; + Object.freeze(this); + } + // Format the parameter fragment + // - sighash: "(uint256,address)" + // - minimal: "tuple(uint256,address) indexed" + // - full: "tuple(uint256 foo, address bar) indexed baz" + ParamType.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + var result_1 = { + type: ((this.baseType === "tuple") ? "tuple" : this.type), + name: (this.name || undefined) + }; + if (typeof (this.indexed) === "boolean") { + result_1.indexed = this.indexed; + } + if (this.components) { + result_1.components = this.components.map(function (comp) { return JSON.parse(comp.format(format)); }); + } + return JSON.stringify(result_1); + } + var result = ""; + // Array + if (this.baseType === "array") { + result += this.arrayChildren.format(format); + result += "[" + (this.arrayLength < 0 ? "" : String(this.arrayLength)) + "]"; + } + else { + if (this.baseType === "tuple") { + if (format !== exports.FormatTypes.sighash) { + result += this.type; + } + result += "(" + this.components.map(function (comp) { return comp.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ")"; + } + else { + result += this.type; + } + } + if (format !== exports.FormatTypes.sighash) { + if (this.indexed === true) { + result += " indexed"; + } + if (format === exports.FormatTypes.full && this.name) { + result += " " + this.name; + } + } + return result; + }; + ParamType.from = function (value, allowIndexed) { + if (typeof (value) === "string") { + return ParamType.fromString(value, allowIndexed); + } + return ParamType.fromObject(value); + }; + ParamType.fromObject = function (value) { + if (ParamType.isParamType(value)) { + return value; + } + return new ParamType(_constructorGuard, { + name: (value.name || null), + type: verifyType(value.type), + indexed: ((value.indexed == null) ? null : !!value.indexed), + components: (value.components ? value.components.map(ParamType.fromObject) : null) + }); + }; + ParamType.fromString = function (value, allowIndexed) { + function ParamTypify(node) { + return ParamType.fromObject({ + name: node.name, + type: node.type, + indexed: node.indexed, + components: node.components + }); + } + return ParamTypify(parseParamType(value, !!allowIndexed)); + }; + ParamType.isParamType = function (value) { + return !!(value != null && value._isParamType); + }; + return ParamType; +}()); +exports.ParamType = ParamType; +; +function parseParams(value, allowIndex) { + return splitNesting(value).map(function (param) { return ParamType.fromString(param, allowIndex); }); +} +var Fragment = /** @class */ (function () { + function Fragment(constructorGuard, params) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use a static from method", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Fragment()" + }); + } + populate(this, params); + this._isFragment = true; + Object.freeze(this); + } + Fragment.from = function (value) { + if (Fragment.isFragment(value)) { + return value; + } + if (typeof (value) === "string") { + return Fragment.fromString(value); + } + return Fragment.fromObject(value); + }; + Fragment.fromObject = function (value) { + if (Fragment.isFragment(value)) { + return value; + } + switch (value.type) { + case "function": + return FunctionFragment.fromObject(value); + case "event": + return EventFragment.fromObject(value); + case "constructor": + return ConstructorFragment.fromObject(value); + case "error": + return ErrorFragment.fromObject(value); + case "fallback": + case "receive": + // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment? + return null; + } + return logger.throwArgumentError("invalid fragment object", "value", value); + }; + Fragment.fromString = function (value) { + // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space + value = value.replace(/\s/g, " "); + value = value.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " "); + value = value.trim(); + if (value.split(" ")[0] === "event") { + return EventFragment.fromString(value.substring(5).trim()); + } + else if (value.split(" ")[0] === "function") { + return FunctionFragment.fromString(value.substring(8).trim()); + } + else if (value.split("(")[0].trim() === "constructor") { + return ConstructorFragment.fromString(value.trim()); + } + else if (value.split(" ")[0] === "error") { + return ErrorFragment.fromString(value.substring(5).trim()); + } + return logger.throwArgumentError("unsupported fragment", "value", value); + }; + Fragment.isFragment = function (value) { + return !!(value && value._isFragment); + }; + return Fragment; +}()); +exports.Fragment = Fragment; +var EventFragment = /** @class */ (function (_super) { + __extends(EventFragment, _super); + function EventFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + EventFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "event", + anonymous: this.anonymous, + name: this.name, + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }) + }); + } + var result = ""; + if (format !== exports.FormatTypes.sighash) { + result += "event "; + } + result += this.name + "(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + if (format !== exports.FormatTypes.sighash) { + if (this.anonymous) { + result += "anonymous "; + } + } + return result.trim(); + }; + EventFragment.from = function (value) { + if (typeof (value) === "string") { + return EventFragment.fromString(value); + } + return EventFragment.fromObject(value); + }; + EventFragment.fromObject = function (value) { + if (EventFragment.isEventFragment(value)) { + return value; + } + if (value.type !== "event") { + logger.throwArgumentError("invalid event object", "value", value); + } + var params = { + name: verifyIdentifier(value.name), + anonymous: value.anonymous, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + type: "event" + }; + return new EventFragment(_constructorGuard, params); + }; + EventFragment.fromString = function (value) { + var match = value.match(regexParen); + if (!match) { + logger.throwArgumentError("invalid event string", "value", value); + } + var anonymous = false; + match[3].split(" ").forEach(function (modifier) { + switch (modifier.trim()) { + case "anonymous": + anonymous = true; + break; + case "": + break; + default: + logger.warn("unknown modifier: " + modifier); + } + }); + return EventFragment.fromObject({ + name: match[1].trim(), + anonymous: anonymous, + inputs: parseParams(match[2], true), + type: "event" + }); + }; + EventFragment.isEventFragment = function (value) { + return (value && value._isFragment && value.type === "event"); + }; + return EventFragment; +}(Fragment)); +exports.EventFragment = EventFragment; +function parseGas(value, params) { + params.gas = null; + var comps = value.split("@"); + if (comps.length !== 1) { + if (comps.length > 2) { + logger.throwArgumentError("invalid human-readable ABI signature", "value", value); + } + if (!comps[1].match(/^[0-9]+$/)) { + logger.throwArgumentError("invalid human-readable ABI signature gas", "value", value); + } + params.gas = bignumber_1.BigNumber.from(comps[1]); + return comps[0]; + } + return value; +} +function parseModifiers(value, params) { + params.constant = false; + params.payable = false; + params.stateMutability = "nonpayable"; + value.split(" ").forEach(function (modifier) { + switch (modifier.trim()) { + case "constant": + params.constant = true; + break; + case "payable": + params.payable = true; + params.stateMutability = "payable"; + break; + case "nonpayable": + params.payable = false; + params.stateMutability = "nonpayable"; + break; + case "pure": + params.constant = true; + params.stateMutability = "pure"; + break; + case "view": + params.constant = true; + params.stateMutability = "view"; + break; + case "external": + case "public": + case "": + break; + default: + console.log("unknown modifier: " + modifier); + } + }); +} +function verifyState(value) { + var result = { + constant: false, + payable: true, + stateMutability: "payable" + }; + if (value.stateMutability != null) { + result.stateMutability = value.stateMutability; + // Set (and check things are consistent) the constant property + result.constant = (result.stateMutability === "view" || result.stateMutability === "pure"); + if (value.constant != null) { + if ((!!value.constant) !== result.constant) { + logger.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); + } + } + // Set (and check things are consistent) the payable property + result.payable = (result.stateMutability === "payable"); + if (value.payable != null) { + if ((!!value.payable) !== result.payable) { + logger.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); + } + } + } + else if (value.payable != null) { + result.payable = !!value.payable; + // If payable we can assume non-constant; otherwise we can't assume + if (value.constant == null && !result.payable && value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + result.constant = !!value.constant; + if (result.constant) { + result.stateMutability = "view"; + } + else { + result.stateMutability = (result.payable ? "payable" : "nonpayable"); + } + if (result.payable && result.constant) { + logger.throwArgumentError("cannot have constant payable function", "value", value); + } + } + else if (value.constant != null) { + result.constant = !!value.constant; + result.payable = !result.constant; + result.stateMutability = (result.constant ? "view" : "payable"); + } + else if (value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + return result; +} +var ConstructorFragment = /** @class */ (function (_super) { + __extends(ConstructorFragment, _super); + function ConstructorFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + ConstructorFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "constructor", + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }) + }); + } + if (format === exports.FormatTypes.sighash) { + logger.throwError("cannot format a constructor for sighash", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "format(sighash)" + }); + } + var result = "constructor(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + if (this.stateMutability && this.stateMutability !== "nonpayable") { + result += this.stateMutability + " "; + } + return result.trim(); + }; + ConstructorFragment.from = function (value) { + if (typeof (value) === "string") { + return ConstructorFragment.fromString(value); + } + return ConstructorFragment.fromObject(value); + }; + ConstructorFragment.fromObject = function (value) { + if (ConstructorFragment.isConstructorFragment(value)) { + return value; + } + if (value.type !== "constructor") { + logger.throwArgumentError("invalid constructor object", "value", value); + } + var state = verifyState(value); + if (state.constant) { + logger.throwArgumentError("constructor cannot be constant", "value", value); + } + var params = { + name: null, + type: value.type, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? bignumber_1.BigNumber.from(value.gas) : null) + }; + return new ConstructorFragment(_constructorGuard, params); + }; + ConstructorFragment.fromString = function (value) { + var params = { type: "constructor" }; + value = parseGas(value, params); + var parens = value.match(regexParen); + if (!parens || parens[1].trim() !== "constructor") { + logger.throwArgumentError("invalid constructor string", "value", value); + } + params.inputs = parseParams(parens[2].trim(), false); + parseModifiers(parens[3].trim(), params); + return ConstructorFragment.fromObject(params); + }; + ConstructorFragment.isConstructorFragment = function (value) { + return (value && value._isFragment && value.type === "constructor"); + }; + return ConstructorFragment; +}(Fragment)); +exports.ConstructorFragment = ConstructorFragment; +var FunctionFragment = /** @class */ (function (_super) { + __extends(FunctionFragment, _super); + function FunctionFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + FunctionFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "function", + name: this.name, + constant: this.constant, + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }), + outputs: this.outputs.map(function (output) { return JSON.parse(output.format(format)); }), + }); + } + var result = ""; + if (format !== exports.FormatTypes.sighash) { + result += "function "; + } + result += this.name + "(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + if (format !== exports.FormatTypes.sighash) { + if (this.stateMutability) { + if (this.stateMutability !== "nonpayable") { + result += (this.stateMutability + " "); + } + } + else if (this.constant) { + result += "view "; + } + if (this.outputs && this.outputs.length) { + result += "returns (" + this.outputs.map(function (output) { return output.format(format); }).join(", ") + ") "; + } + if (this.gas != null) { + result += "@" + this.gas.toString() + " "; + } + } + return result.trim(); + }; + FunctionFragment.from = function (value) { + if (typeof (value) === "string") { + return FunctionFragment.fromString(value); + } + return FunctionFragment.fromObject(value); + }; + FunctionFragment.fromObject = function (value) { + if (FunctionFragment.isFunctionFragment(value)) { + return value; + } + if (value.type !== "function") { + logger.throwArgumentError("invalid function object", "value", value); + } + var state = verifyState(value); + var params = { + type: value.type, + name: verifyIdentifier(value.name), + constant: state.constant, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + outputs: (value.outputs ? value.outputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? bignumber_1.BigNumber.from(value.gas) : null) + }; + return new FunctionFragment(_constructorGuard, params); + }; + FunctionFragment.fromString = function (value) { + var params = { type: "function" }; + value = parseGas(value, params); + var comps = value.split(" returns "); + if (comps.length > 2) { + logger.throwArgumentError("invalid function string", "value", value); + } + var parens = comps[0].match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid function signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + parseModifiers(parens[3].trim(), params); + // We have outputs + if (comps.length > 1) { + var returns = comps[1].match(regexParen); + if (returns[1].trim() != "" || returns[3].trim() != "") { + logger.throwArgumentError("unexpected tokens", "value", value); + } + params.outputs = parseParams(returns[2], false); + } + else { + params.outputs = []; + } + return FunctionFragment.fromObject(params); + }; + FunctionFragment.isFunctionFragment = function (value) { + return (value && value._isFragment && value.type === "function"); + }; + return FunctionFragment; +}(ConstructorFragment)); +exports.FunctionFragment = FunctionFragment; +//export class StructFragment extends Fragment { +//} +function checkForbidden(fragment) { + var sig = fragment.format(); + if (sig === "Error(string)" || sig === "Panic(uint256)") { + logger.throwArgumentError("cannot specify user defined " + sig + " error", "fragment", fragment); + } + return fragment; +} +var ErrorFragment = /** @class */ (function (_super) { + __extends(ErrorFragment, _super); + function ErrorFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "error", + name: this.name, + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }), + }); + } + var result = ""; + if (format !== exports.FormatTypes.sighash) { + result += "error "; + } + result += this.name + "(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + return result.trim(); + }; + ErrorFragment.from = function (value) { + if (typeof (value) === "string") { + return ErrorFragment.fromString(value); + } + return ErrorFragment.fromObject(value); + }; + ErrorFragment.fromObject = function (value) { + if (ErrorFragment.isErrorFragment(value)) { + return value; + } + if (value.type !== "error") { + logger.throwArgumentError("invalid error object", "value", value); + } + var params = { + type: value.type, + name: verifyIdentifier(value.name), + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []) + }; + return checkForbidden(new ErrorFragment(_constructorGuard, params)); + }; + ErrorFragment.fromString = function (value) { + var params = { type: "error" }; + var parens = value.match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid error signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + return checkForbidden(ErrorFragment.fromObject(params)); + }; + ErrorFragment.isErrorFragment = function (value) { + return (value && value._isFragment && value.type === "error"); + }; + return ErrorFragment; +}(Fragment)); +exports.ErrorFragment = ErrorFragment; +function verifyType(type) { + // These need to be transformed to their full description + if (type.match(/^uint($|[^1-9])/)) { + type = "uint256" + type.substring(4); + } + else if (type.match(/^int($|[^1-9])/)) { + type = "int256" + type.substring(3); + } + // @TODO: more verification + return type; +} +// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234 +var regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$"); +function verifyIdentifier(value) { + if (!value || !value.match(regexIdentifier)) { + logger.throwArgumentError("invalid identifier \"" + value + "\"", "value", value); + } + return value; +} +var regexParen = new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"); +function splitNesting(value) { + value = value.trim(); + var result = []; + var accum = ""; + var depth = 0; + for (var offset = 0; offset < value.length; offset++) { + var c = value[offset]; + if (c === "," && depth === 0) { + result.push(accum); + accum = ""; + } + else { + accum += c; + if (c === "(") { + depth++; + } + else if (c === ")") { + depth--; + if (depth === -1) { + logger.throwArgumentError("unbalanced parenthesis", "value", value); + } + } + } + } + if (accum) { + result.push(accum); + } + return result; +} +//# sourceMappingURL=fragments.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/fragments.js.map b/node_modules/@ethersproject/abi/lib/fragments.js.map new file mode 100644 index 0000000..02ff0ed --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/fragments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fragments.js","sourceRoot":"","sources":["../src.ts/fragments.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,sDAAqD;AACrD,wDAA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node_modules/@ethersproject/abi/lib/index.d.ts new file mode 100644 index 0000000..cbdc15d --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/index.d.ts @@ -0,0 +1,5 @@ +import { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from "./fragments"; +import { AbiCoder, CoerceFunc, defaultAbiCoder } from "./abi-coder"; +import { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from "./interface"; +export { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType, FormatTypes, AbiCoder, defaultAbiCoder, Interface, Indexed, CoerceFunc, JsonFragment, JsonFragmentType, Result, checkResultErrors, LogDescription, TransactionDescription }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/index.d.ts.map b/node_modules/@ethersproject/abi/lib/index.d.ts.map new file mode 100644 index 0000000..da4e76f --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpK,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEpH,OAAO,EACH,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EAEX,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,OAAO,EAKP,UAAU,EACV,YAAY,EACZ,gBAAgB,EAEhB,MAAM,EACN,iBAAiB,EAEjB,cAAc,EACd,sBAAsB,EACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/index.js b/node_modules/@ethersproject/abi/lib/index.js new file mode 100644 index 0000000..46439c8 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/index.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TransactionDescription = exports.LogDescription = exports.checkResultErrors = exports.Indexed = exports.Interface = exports.defaultAbiCoder = exports.AbiCoder = exports.FormatTypes = exports.ParamType = exports.FunctionFragment = exports.Fragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = void 0; +var fragments_1 = require("./fragments"); +Object.defineProperty(exports, "ConstructorFragment", { enumerable: true, get: function () { return fragments_1.ConstructorFragment; } }); +Object.defineProperty(exports, "ErrorFragment", { enumerable: true, get: function () { return fragments_1.ErrorFragment; } }); +Object.defineProperty(exports, "EventFragment", { enumerable: true, get: function () { return fragments_1.EventFragment; } }); +Object.defineProperty(exports, "FormatTypes", { enumerable: true, get: function () { return fragments_1.FormatTypes; } }); +Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return fragments_1.Fragment; } }); +Object.defineProperty(exports, "FunctionFragment", { enumerable: true, get: function () { return fragments_1.FunctionFragment; } }); +Object.defineProperty(exports, "ParamType", { enumerable: true, get: function () { return fragments_1.ParamType; } }); +var abi_coder_1 = require("./abi-coder"); +Object.defineProperty(exports, "AbiCoder", { enumerable: true, get: function () { return abi_coder_1.AbiCoder; } }); +Object.defineProperty(exports, "defaultAbiCoder", { enumerable: true, get: function () { return abi_coder_1.defaultAbiCoder; } }); +var interface_1 = require("./interface"); +Object.defineProperty(exports, "checkResultErrors", { enumerable: true, get: function () { return interface_1.checkResultErrors; } }); +Object.defineProperty(exports, "Indexed", { enumerable: true, get: function () { return interface_1.Indexed; } }); +Object.defineProperty(exports, "Interface", { enumerable: true, get: function () { return interface_1.Interface; } }); +Object.defineProperty(exports, "LogDescription", { enumerable: true, get: function () { return interface_1.LogDescription; } }); +Object.defineProperty(exports, "TransactionDescription", { enumerable: true, get: function () { return interface_1.TransactionDescription; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/index.js.map b/node_modules/@ethersproject/abi/lib/index.js.map new file mode 100644 index 0000000..c220617 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,yCAAoK;AAKhK,oGALK,+BAAmB,OAKL;AACnB,8FAN0B,yBAAa,OAM1B;AACb,8FAPyC,yBAAa,OAOzC;AAIb,4FAXwD,uBAAW,OAWxD;AAHX,yFARqE,oBAAQ,OAQrE;AACR,iGAT+E,4BAAgB,OAS/E;AAChB,0FAViI,qBAAS,OAUjI;AATb,yCAAoE;AAYhE,yFAZK,oBAAQ,OAYL;AACR,gGAb2B,2BAAe,OAa3B;AAZnB,yCAAoH;AAyBhH,kGAzBK,6BAAiB,OAyBL;AAVjB,wFAfwB,mBAAO,OAexB;AADP,0FAdiC,qBAAS,OAcjC;AAaT,+FA3B4C,0BAAc,OA2B5C;AACd,uGA5BoE,kCAAsB,OA4BpE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/interface.d.ts b/node_modules/@ethersproject/abi/lib/interface.d.ts new file mode 100644 index 0000000..2149670 --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/interface.d.ts @@ -0,0 +1,89 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike } from "@ethersproject/bytes"; +import { Description } from "@ethersproject/properties"; +import { AbiCoder } from "./abi-coder"; +import { checkResultErrors, Result } from "./coders/abstract-coder"; +import { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, JsonFragment, ParamType } from "./fragments"; +export { checkResultErrors, Result }; +export declare class LogDescription extends Description { + readonly eventFragment: EventFragment; + readonly name: string; + readonly signature: string; + readonly topic: string; + readonly args: Result; +} +export declare class TransactionDescription extends Description { + readonly functionFragment: FunctionFragment; + readonly name: string; + readonly args: Result; + readonly signature: string; + readonly sighash: string; + readonly value: BigNumber; +} +export declare class ErrorDescription extends Description { + readonly errorFragment: ErrorFragment; + readonly name: string; + readonly args: Result; + readonly signature: string; + readonly sighash: string; +} +export declare class Indexed extends Description { + readonly hash: string; + readonly _isIndexed: boolean; + static isIndexed(value: any): value is Indexed; +} +export declare class Interface { + readonly fragments: ReadonlyArray; + readonly errors: { + [name: string]: ErrorFragment; + }; + readonly events: { + [name: string]: EventFragment; + }; + readonly functions: { + [name: string]: FunctionFragment; + }; + readonly structs: { + [name: string]: any; + }; + readonly deploy: ConstructorFragment; + readonly _abiCoder: AbiCoder; + readonly _isInterface: boolean; + constructor(fragments: string | ReadonlyArray); + format(format?: string): string | Array; + static getAbiCoder(): AbiCoder; + static getAddress(address: string): string; + static getSighash(fragment: ErrorFragment | FunctionFragment): string; + static getEventTopic(eventFragment: EventFragment): string; + getFunction(nameOrSignatureOrSighash: string): FunctionFragment; + getEvent(nameOrSignatureOrTopic: string): EventFragment; + getError(nameOrSignatureOrSighash: string): ErrorFragment; + getSighash(fragment: ErrorFragment | FunctionFragment | string): string; + getEventTopic(eventFragment: EventFragment | string): string; + _decodeParams(params: ReadonlyArray, data: BytesLike): Result; + _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string; + encodeDeploy(values?: ReadonlyArray): string; + decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result; + encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string; + decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result; + encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string; + decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result; + encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string; + encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array>; + encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { + data: string; + topics: Array; + }; + decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result; + parseTransaction(tx: { + data: string; + value?: BigNumberish; + }): TransactionDescription; + parseLog(log: { + topics: Array; + data: string; + }): LogDescription; + parseError(data: BytesLike): ErrorDescription; + static isInterface(value: any): value is Interface; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/interface.d.ts.map b/node_modules/@ethersproject/abi/lib/interface.d.ts.map new file mode 100644 index 0000000..ac158df --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src.ts/interface.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAA0D,MAAM,sBAAsB,CAAC;AAGnH,OAAO,EAAkB,WAAW,EAAa,MAAM,2BAA2B,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAe,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMlJ,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC;AAErC,qBAAa,cAAe,SAAQ,WAAW,CAAC,cAAc,CAAC;IAC3D,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MA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EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,cAAc;IAmBrE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,gBAAgB;IA4B7C,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,SAAS;CAGrD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/interface.js b/node_modules/@ethersproject/abi/lib/interface.js new file mode 100644 index 0000000..65104de --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/interface.js @@ -0,0 +1,653 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Interface = exports.Indexed = exports.ErrorDescription = exports.TransactionDescription = exports.LogDescription = exports.checkResultErrors = void 0; +var address_1 = require("@ethersproject/address"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var hash_1 = require("@ethersproject/hash"); +var keccak256_1 = require("@ethersproject/keccak256"); +var properties_1 = require("@ethersproject/properties"); +var abi_coder_1 = require("./abi-coder"); +var abstract_coder_1 = require("./coders/abstract-coder"); +Object.defineProperty(exports, "checkResultErrors", { enumerable: true, get: function () { return abstract_coder_1.checkResultErrors; } }); +var fragments_1 = require("./fragments"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var LogDescription = /** @class */ (function (_super) { + __extends(LogDescription, _super); + function LogDescription() { + return _super !== null && _super.apply(this, arguments) || this; + } + return LogDescription; +}(properties_1.Description)); +exports.LogDescription = LogDescription; +var TransactionDescription = /** @class */ (function (_super) { + __extends(TransactionDescription, _super); + function TransactionDescription() { + return _super !== null && _super.apply(this, arguments) || this; + } + return TransactionDescription; +}(properties_1.Description)); +exports.TransactionDescription = TransactionDescription; +var ErrorDescription = /** @class */ (function (_super) { + __extends(ErrorDescription, _super); + function ErrorDescription() { + return _super !== null && _super.apply(this, arguments) || this; + } + return ErrorDescription; +}(properties_1.Description)); +exports.ErrorDescription = ErrorDescription; +var Indexed = /** @class */ (function (_super) { + __extends(Indexed, _super); + function Indexed() { + return _super !== null && _super.apply(this, arguments) || this; + } + Indexed.isIndexed = function (value) { + return !!(value && value._isIndexed); + }; + return Indexed; +}(properties_1.Description)); +exports.Indexed = Indexed; +var BuiltinErrors = { + "0x08c379a0": { signature: "Error(string)", name: "Error", inputs: ["string"], reason: true }, + "0x4e487b71": { signature: "Panic(uint256)", name: "Panic", inputs: ["uint256"] } +}; +function wrapAccessError(property, error) { + var wrap = new Error("deferred error during ABI decoding triggered accessing " + property); + wrap.error = error; + return wrap; +} +/* +function checkNames(fragment: Fragment, type: "input" | "output", params: Array): void { + params.reduce((accum, param) => { + if (param.name) { + if (accum[param.name]) { + logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format("full") }`, "fragment", fragment); + } + accum[param.name] = true; + } + return accum; + }, <{ [ name: string ]: boolean }>{ }); +} +*/ +var Interface = /** @class */ (function () { + function Interface(fragments) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Interface); + var abi = []; + if (typeof (fragments) === "string") { + abi = JSON.parse(fragments); + } + else { + abi = fragments; + } + (0, properties_1.defineReadOnly)(this, "fragments", abi.map(function (fragment) { + return fragments_1.Fragment.from(fragment); + }).filter(function (fragment) { return (fragment != null); })); + (0, properties_1.defineReadOnly)(this, "_abiCoder", (0, properties_1.getStatic)(_newTarget, "getAbiCoder")()); + (0, properties_1.defineReadOnly)(this, "functions", {}); + (0, properties_1.defineReadOnly)(this, "errors", {}); + (0, properties_1.defineReadOnly)(this, "events", {}); + (0, properties_1.defineReadOnly)(this, "structs", {}); + // Add all fragments by their signature + this.fragments.forEach(function (fragment) { + var bucket = null; + switch (fragment.type) { + case "constructor": + if (_this.deploy) { + logger.warn("duplicate definition - constructor"); + return; + } + //checkNames(fragment, "input", fragment.inputs); + (0, properties_1.defineReadOnly)(_this, "deploy", fragment); + return; + case "function": + //checkNames(fragment, "input", fragment.inputs); + //checkNames(fragment, "output", (fragment).outputs); + bucket = _this.functions; + break; + case "event": + //checkNames(fragment, "input", fragment.inputs); + bucket = _this.events; + break; + case "error": + bucket = _this.errors; + break; + default: + return; + } + var signature = fragment.format(); + if (bucket[signature]) { + logger.warn("duplicate definition - " + signature); + return; + } + bucket[signature] = fragment; + }); + // If we do not have a constructor add a default + if (!this.deploy) { + (0, properties_1.defineReadOnly)(this, "deploy", fragments_1.ConstructorFragment.from({ + payable: false, + type: "constructor" + })); + } + (0, properties_1.defineReadOnly)(this, "_isInterface", true); + } + Interface.prototype.format = function (format) { + if (!format) { + format = fragments_1.FormatTypes.full; + } + if (format === fragments_1.FormatTypes.sighash) { + logger.throwArgumentError("interface does not support formatting sighash", "format", format); + } + var abi = this.fragments.map(function (fragment) { return fragment.format(format); }); + // We need to re-bundle the JSON fragments a bit + if (format === fragments_1.FormatTypes.json) { + return JSON.stringify(abi.map(function (j) { return JSON.parse(j); })); + } + return abi; + }; + // Sub-classes can override these to handle other blockchains + Interface.getAbiCoder = function () { + return abi_coder_1.defaultAbiCoder; + }; + Interface.getAddress = function (address) { + return (0, address_1.getAddress)(address); + }; + Interface.getSighash = function (fragment) { + return (0, bytes_1.hexDataSlice)((0, hash_1.id)(fragment.format()), 0, 4); + }; + Interface.getEventTopic = function (eventFragment) { + return (0, hash_1.id)(eventFragment.format()); + }; + // Find a function definition by any means necessary (unless it is ambiguous) + Interface.prototype.getFunction = function (nameOrSignatureOrSighash) { + if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) { + for (var name_1 in this.functions) { + if (nameOrSignatureOrSighash === this.getSighash(name_1)) { + return this.functions[name_1]; + } + } + logger.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + var name_2 = nameOrSignatureOrSighash.trim(); + var matching = Object.keys(this.functions).filter(function (f) { return (f.split("(" /* fix:) */)[0] === name_2); }); + if (matching.length === 0) { + logger.throwArgumentError("no matching function", "name", name_2); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching functions", "name", name_2); + } + return this.functions[matching[0]]; + } + // Normalize the signature and lookup the function + var result = this.functions[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); + } + return result; + }; + // Find an event definition by any means necessary (unless it is ambiguous) + Interface.prototype.getEvent = function (nameOrSignatureOrTopic) { + if ((0, bytes_1.isHexString)(nameOrSignatureOrTopic)) { + var topichash = nameOrSignatureOrTopic.toLowerCase(); + for (var name_3 in this.events) { + if (topichash === this.getEventTopic(name_3)) { + return this.events[name_3]; + } + } + logger.throwArgumentError("no matching event", "topichash", topichash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrTopic.indexOf("(") === -1) { + var name_4 = nameOrSignatureOrTopic.trim(); + var matching = Object.keys(this.events).filter(function (f) { return (f.split("(" /* fix:) */)[0] === name_4); }); + if (matching.length === 0) { + logger.throwArgumentError("no matching event", "name", name_4); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching events", "name", name_4); + } + return this.events[matching[0]]; + } + // Normalize the signature and lookup the function + var result = this.events[fragments_1.EventFragment.fromString(nameOrSignatureOrTopic).format()]; + if (!result) { + logger.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); + } + return result; + }; + // Find a function definition by any means necessary (unless it is ambiguous) + Interface.prototype.getError = function (nameOrSignatureOrSighash) { + if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) { + var getSighash = (0, properties_1.getStatic)(this.constructor, "getSighash"); + for (var name_5 in this.errors) { + var error = this.errors[name_5]; + if (nameOrSignatureOrSighash === getSighash(error)) { + return this.errors[name_5]; + } + } + logger.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + var name_6 = nameOrSignatureOrSighash.trim(); + var matching = Object.keys(this.errors).filter(function (f) { return (f.split("(" /* fix:) */)[0] === name_6); }); + if (matching.length === 0) { + logger.throwArgumentError("no matching error", "name", name_6); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching errors", "name", name_6); + } + return this.errors[matching[0]]; + } + // Normalize the signature and lookup the function + var result = this.errors[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); + } + return result; + }; + // Get the sighash (the bytes4 selector) used by Solidity to identify a function + Interface.prototype.getSighash = function (fragment) { + if (typeof (fragment) === "string") { + try { + fragment = this.getFunction(fragment); + } + catch (error) { + try { + fragment = this.getError(fragment); + } + catch (_) { + throw error; + } + } + } + return (0, properties_1.getStatic)(this.constructor, "getSighash")(fragment); + }; + // Get the topic (the bytes32 hash) used by Solidity to identify an event + Interface.prototype.getEventTopic = function (eventFragment) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + return (0, properties_1.getStatic)(this.constructor, "getEventTopic")(eventFragment); + }; + Interface.prototype._decodeParams = function (params, data) { + return this._abiCoder.decode(params, data); + }; + Interface.prototype._encodeParams = function (params, values) { + return this._abiCoder.encode(params, values); + }; + Interface.prototype.encodeDeploy = function (values) { + return this._encodeParams(this.deploy.inputs, values || []); + }; + Interface.prototype.decodeErrorResult = function (fragment, data) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + var bytes = (0, bytes_1.arrayify)(data); + if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) { + logger.throwArgumentError("data signature does not match error " + fragment.name + ".", "data", (0, bytes_1.hexlify)(bytes)); + } + return this._decodeParams(fragment.inputs, bytes.slice(4)); + }; + Interface.prototype.encodeErrorResult = function (fragment, values) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + return (0, bytes_1.hexlify)((0, bytes_1.concat)([ + this.getSighash(fragment), + this._encodeParams(fragment.inputs, values || []) + ])); + }; + // Decode the data for a function call (e.g. tx.data) + Interface.prototype.decodeFunctionData = function (functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + var bytes = (0, bytes_1.arrayify)(data); + if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) { + logger.throwArgumentError("data signature does not match function " + functionFragment.name + ".", "data", (0, bytes_1.hexlify)(bytes)); + } + return this._decodeParams(functionFragment.inputs, bytes.slice(4)); + }; + // Encode the data for a function call (e.g. tx.data) + Interface.prototype.encodeFunctionData = function (functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return (0, bytes_1.hexlify)((0, bytes_1.concat)([ + this.getSighash(functionFragment), + this._encodeParams(functionFragment.inputs, values || []) + ])); + }; + // Decode the result from a function call (e.g. from eth_call) + Interface.prototype.decodeFunctionResult = function (functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + var bytes = (0, bytes_1.arrayify)(data); + var reason = null; + var errorArgs = null; + var errorName = null; + var errorSignature = null; + switch (bytes.length % this._abiCoder._getWordSize()) { + case 0: + try { + return this._abiCoder.decode(functionFragment.outputs, bytes); + } + catch (error) { } + break; + case 4: { + var selector = (0, bytes_1.hexlify)(bytes.slice(0, 4)); + var builtin = BuiltinErrors[selector]; + if (builtin) { + errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4)); + errorName = builtin.name; + errorSignature = builtin.signature; + if (builtin.reason) { + reason = errorArgs[0]; + } + } + else { + try { + var error = this.getError(selector); + errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4)); + errorName = error.name; + errorSignature = error.format(); + } + catch (error) { + console.log(error); + } + } + break; + } + } + return logger.throwError("call revert exception", logger_1.Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + errorArgs: errorArgs, + errorName: errorName, + errorSignature: errorSignature, + reason: reason + }); + }; + // Encode the result for a function call (e.g. for eth_call) + Interface.prototype.encodeFunctionResult = function (functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return (0, bytes_1.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || [])); + }; + // Create the filter for the event with search criteria (e.g. for eth_filterLog) + Interface.prototype.encodeFilterTopics = function (eventFragment, values) { + var _this = this; + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (values.length > eventFragment.inputs.length) { + logger.throwError("too many arguments for " + eventFragment.format(), logger_1.Logger.errors.UNEXPECTED_ARGUMENT, { + argument: "values", + value: values + }); + } + var topics = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + var encodeTopic = function (param, value) { + if (param.type === "string") { + return (0, hash_1.id)(value); + } + else if (param.type === "bytes") { + return (0, keccak256_1.keccak256)((0, bytes_1.hexlify)(value)); + } + // Check addresses are valid + if (param.type === "address") { + _this._abiCoder.encode(["address"], [value]); + } + return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32); + }; + values.forEach(function (value, index) { + var param = eventFragment.inputs[index]; + if (!param.indexed) { + if (value != null) { + logger.throwArgumentError("cannot filter non-indexed parameters; must be null", ("contract." + param.name), value); + } + return; + } + if (value == null) { + topics.push(null); + } + else if (param.baseType === "array" || param.baseType === "tuple") { + logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); + } + else if (Array.isArray(value)) { + topics.push(value.map(function (value) { return encodeTopic(param, value); })); + } + else { + topics.push(encodeTopic(param, value)); + } + }); + // Trim off trailing nulls + while (topics.length && topics[topics.length - 1] === null) { + topics.pop(); + } + return topics; + }; + Interface.prototype.encodeEventLog = function (eventFragment, values) { + var _this = this; + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + var topics = []; + var dataTypes = []; + var dataValues = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + if (values.length !== eventFragment.inputs.length) { + logger.throwArgumentError("event arguments/values mismatch", "values", values); + } + eventFragment.inputs.forEach(function (param, index) { + var value = values[index]; + if (param.indexed) { + if (param.type === "string") { + topics.push((0, hash_1.id)(value)); + } + else if (param.type === "bytes") { + topics.push((0, keccak256_1.keccak256)(value)); + } + else if (param.baseType === "tuple" || param.baseType === "array") { + // @TODO + throw new Error("not implemented"); + } + else { + topics.push(_this._abiCoder.encode([param.type], [value])); + } + } + else { + dataTypes.push(param); + dataValues.push(value); + } + }); + return { + data: this._abiCoder.encode(dataTypes, dataValues), + topics: topics + }; + }; + // Decode a filter for the event and the search criteria + Interface.prototype.decodeEventLog = function (eventFragment, data, topics) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (topics != null && !eventFragment.anonymous) { + var topicHash = this.getEventTopic(eventFragment); + if (!(0, bytes_1.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { + logger.throwError("fragment/topic mismatch", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); + } + topics = topics.slice(1); + } + var indexed = []; + var nonIndexed = []; + var dynamic = []; + eventFragment.inputs.forEach(function (param, index) { + if (param.indexed) { + if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") { + indexed.push(fragments_1.ParamType.fromObject({ type: "bytes32", name: param.name })); + dynamic.push(true); + } + else { + indexed.push(param); + dynamic.push(false); + } + } + else { + nonIndexed.push(param); + dynamic.push(false); + } + }); + var resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, (0, bytes_1.concat)(topics)) : null; + var resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true); + var result = []; + var nonIndexedIndex = 0, indexedIndex = 0; + eventFragment.inputs.forEach(function (param, index) { + if (param.indexed) { + if (resultIndexed == null) { + result[index] = new Indexed({ _isIndexed: true, hash: null }); + } + else if (dynamic[index]) { + result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] }); + } + else { + try { + result[index] = resultIndexed[indexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + } + else { + try { + result[index] = resultNonIndexed[nonIndexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + // Add the keyword argument if named and safe + if (param.name && result[param.name] == null) { + var value_1 = result[index]; + // Make error named values throw on access + if (value_1 instanceof Error) { + Object.defineProperty(result, param.name, { + enumerable: true, + get: function () { throw wrapAccessError("property " + JSON.stringify(param.name), value_1); } + }); + } + else { + result[param.name] = value_1; + } + } + }); + var _loop_1 = function (i) { + var value = result[i]; + if (value instanceof Error) { + Object.defineProperty(result, i, { + enumerable: true, + get: function () { throw wrapAccessError("index " + i, value); } + }); + } + }; + // Make all error indexed values throw on access + for (var i = 0; i < result.length; i++) { + _loop_1(i); + } + return Object.freeze(result); + }; + // Given a transaction, find the matching function fragment (if any) and + // determine all its properties and call parameters + Interface.prototype.parseTransaction = function (tx) { + var fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new TransactionDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)), + functionFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + value: bignumber_1.BigNumber.from(tx.value || "0"), + }); + }; + // @TODO + //parseCallResult(data: BytesLike): ?? + // Given an event log, find the matching event fragment (if any) and + // determine all its properties and values + Interface.prototype.parseLog = function (log) { + var fragment = this.getEvent(log.topics[0]); + if (!fragment || fragment.anonymous) { + return null; + } + // @TODO: If anonymous, and the only method, and the input count matches, should we parse? + // Probably not, because just because it is the only event in the ABI does + // not mean we have the full ABI; maybe just a fragment? + return new LogDescription({ + eventFragment: fragment, + name: fragment.name, + signature: fragment.format(), + topic: this.getEventTopic(fragment), + args: this.decodeEventLog(fragment, log.data, log.topics) + }); + }; + Interface.prototype.parseError = function (data) { + var hexData = (0, bytes_1.hexlify)(data); + var fragment = this.getError(hexData.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new ErrorDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + hexData.substring(10)), + errorFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + }); + }; + /* + static from(value: Array | string | Interface) { + if (Interface.isInterface(value)) { + return value; + } + if (typeof(value) === "string") { + return new Interface(JSON.parse(value)); + } + return new Interface(value); + } + */ + Interface.isInterface = function (value) { + return !!(value && value._isInterface); + }; + return Interface; +}()); +exports.Interface = Interface; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/lib/interface.js.map b/node_modules/@ethersproject/abi/lib/interface.js.map new file mode 100644 index 0000000..bd50aed --- /dev/null +++ b/node_modules/@ethersproject/abi/lib/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src.ts/interface.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,kDAAoD;AACpD,sDAAmE;AACnE,8CAAmH;AACnH,4CAAyC;AACzC,sDAAoD;AACpD,wDAAmF;AAEnF,yCAAwD;AACxD,0DAAoE;AAO3D,kGAPA,kCAAiB,OAOA;AAN1B,yCAAkJ;AAElJ,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAInC;IAAoC,kCAA2B;IAA/D;;IAMA,CA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IAAI,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAC;SAAE;QAE/B,OAAO,IAAI,gBAAgB,CAAC;YACxB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YAC1E,aAAa,EAAE,QAAQ;YACvB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE;YAC5B,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;SACrC,CAAC,CAAC;IACP,CAAC;IAGD;;;;;;;;;;MAUE;IAEK,qBAAW,GAAlB,UAAmB,KAAU;QACzB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;IACL,gBAAC;AAAD,CAAC,AAlnBD,IAknBC;AAlnBY,8BAAS"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abi/package.json b/node_modules/@ethersproject/abi/package.json new file mode 100644 index 0000000..a82a83b --- /dev/null +++ b/node_modules/@ethersproject/abi/package.json @@ -0,0 +1,50 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + }, + "description": "Utilities and Classes for parsing, formatting and managing Ethereum ABIs.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/abi", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/abi", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x32c0119e32be278064ae36bc915b7c5baf33479b8ad26dad71ee38a6f78b4296", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/abi/src.ts/_version.ts b/node_modules/@ethersproject/abi/src.ts/_version.ts new file mode 100644 index 0000000..b047379 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "abi/5.5.0"; diff --git a/node_modules/@ethersproject/abi/src.ts/abi-coder.ts b/node_modules/@ethersproject/abi/src.ts/abi-coder.ts new file mode 100644 index 0000000..47cf031 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/abi-coder.ts @@ -0,0 +1,124 @@ +"use strict"; + +// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI + +import { arrayify, BytesLike } from "@ethersproject/bytes"; +import { defineReadOnly } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { Coder, Reader, Result, Writer } from "./coders/abstract-coder"; +import { AddressCoder } from "./coders/address"; +import { ArrayCoder } from "./coders/array"; +import { BooleanCoder } from "./coders/boolean"; +import { BytesCoder } from "./coders/bytes"; +import { FixedBytesCoder } from "./coders/fixed-bytes"; +import { NullCoder } from "./coders/null"; +import { NumberCoder } from "./coders/number"; +import { StringCoder } from "./coders/string"; +import { TupleCoder } from "./coders/tuple"; + +import { ParamType } from "./fragments"; + + +const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); +const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); + + +export type CoerceFunc = (type: string, value: any) => any; + +export class AbiCoder { + readonly coerceFunc: CoerceFunc; + + constructor(coerceFunc?: CoerceFunc) { + logger.checkNew(new.target, AbiCoder); + defineReadOnly(this, "coerceFunc", coerceFunc || null); + } + + _getCoder(param: ParamType): Coder { + + switch (param.baseType) { + case "address": + return new AddressCoder(param.name); + case "bool": + return new BooleanCoder(param.name); + case "string": + return new StringCoder(param.name); + case "bytes": + return new BytesCoder(param.name); + case "array": + return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name); + case "tuple": + return new TupleCoder((param.components || []).map((component) => { + return this._getCoder(component); + }), param.name); + case "": + return new NullCoder(param.name); + } + + // u?int[0-9]* + let match = param.type.match(paramTypeNumber); + if (match) { + let size = parseInt(match[2] || "256"); + if (size === 0 || size > 256 || (size % 8) !== 0) { + logger.throwArgumentError("invalid " + match[1] + " bit length", "param", param); + } + return new NumberCoder(size / 8, (match[1] === "int"), param.name); + } + + // bytes[0-9]+ + match = param.type.match(paramTypeBytes); + if (match) { + let size = parseInt(match[1]); + if (size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes length", "param", param); + } + return new FixedBytesCoder(size, param.name); + } + + return logger.throwArgumentError("invalid type", "type", param.type); + } + + _getWordSize(): number { return 32; } + + _getReader(data: Uint8Array, allowLoose?: boolean): Reader { + return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose); + } + + _getWriter(): Writer { + return new Writer(this._getWordSize()); + } + + getDefaultValue(types: ReadonlyArray): Result { + const coders: Array = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = new TupleCoder(coders, "_"); + return coder.defaultValue(); + } + + encode(types: ReadonlyArray, values: ReadonlyArray): string { + if (types.length !== values.length) { + logger.throwError("types/values length mismatch", Logger.errors.INVALID_ARGUMENT, { + count: { types: types.length, values: values.length }, + value: { types: types, values: values } + }); + } + + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = (new TupleCoder(coders, "_")); + + const writer = this._getWriter(); + coder.encode(writer, values); + return writer.data; + } + + decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result { + const coders: Array = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = new TupleCoder(coders, "_"); + return coder.decode(this._getReader(arrayify(data), loose)); + } +} + +export const defaultAbiCoder: AbiCoder = new AbiCoder(); + diff --git a/node_modules/@ethersproject/abi/src.ts/coders/abstract-coder.ts b/node_modules/@ethersproject/abi/src.ts/coders/abstract-coder.ts new file mode 100644 index 0000000..df6213c --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/abstract-coder.ts @@ -0,0 +1,207 @@ +"use strict"; + +import { arrayify, BytesLike, concat, hexConcat, hexlify } from "@ethersproject/bytes"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { defineReadOnly } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "../_version"; +const logger = new Logger(version); + +export interface Result extends ReadonlyArray { + readonly [key: string]: any; +} + +export function checkResultErrors(result: Result): Array<{ path: Array, error: Error }> { + // Find the first error (if any) + const errors: Array<{ path: Array, error: Error }> = [ ]; + + const checkErrors = function(path: Array, object: any): void { + if (!Array.isArray(object)) { return; } + for (let key in object) { + const childPath = path.slice(); + childPath.push(key); + + try { + checkErrors(childPath, object[key]); + } catch (error) { + errors.push({ path: childPath, error: error }); + } + } + } + checkErrors([ ], result); + + return errors; + +} + +export type CoerceFunc = (type: string, value: any) => any; + +export abstract class Coder { + + // The coder name: + // - address, uint256, tuple, array, etc. + readonly name: string; + + // The fully expanded type, including composite types: + // - address, uint256, tuple(address,bytes), uint256[3][4][], etc. + readonly type: string; + + // The localName bound in the signature, in this example it is "baz": + // - tuple(address foo, uint bar) baz + readonly localName: string; + + // Whether this type is dynamic: + // - Dynamic: bytes, string, address[], tuple(boolean[]), etc. + // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8) + readonly dynamic: boolean; + + constructor(name: string, type: string, localName: string, dynamic: boolean) { + // @TODO: defineReadOnly these + this.name = name; + this.type = type; + this.localName = localName; + this.dynamic = dynamic; + } + + _throwError(message: string, value: any): void { + logger.throwArgumentError(message, this.localName, value); + } + + abstract encode(writer: Writer, value: any): number; + abstract decode(reader: Reader): any; + + abstract defaultValue(): any; +} + +export class Writer { + readonly wordSize: number; + + _data: Array; + _dataLength: number; + _padding: Uint8Array; + + constructor(wordSize?: number) { + defineReadOnly(this, "wordSize", wordSize || 32); + this._data = [ ]; + this._dataLength = 0; + this._padding = new Uint8Array(wordSize); + } + + get data(): string { + return hexConcat(this._data); + } + get length(): number { return this._dataLength; } + + _writeData(data: Uint8Array): number { + this._data.push(data); + this._dataLength += data.length; + return data.length; + } + + appendWriter(writer: Writer): number { + return this._writeData(concat(writer._data)); + } + + // Arrayish items; padded on the right to wordSize + writeBytes(value: BytesLike): number { + let bytes = arrayify(value); + const paddingOffset = bytes.length % this.wordSize; + if (paddingOffset) { + bytes = concat([ bytes, this._padding.slice(paddingOffset) ]) + } + return this._writeData(bytes); + } + + _getValue(value: BigNumberish): Uint8Array { + let bytes = arrayify(BigNumber.from(value)); + if (bytes.length > this.wordSize) { + logger.throwError("value out-of-bounds", Logger.errors.BUFFER_OVERRUN, { + length: this.wordSize, + offset: bytes.length + }); + } + if (bytes.length % this.wordSize) { + bytes = concat([ this._padding.slice(bytes.length % this.wordSize), bytes ]); + } + return bytes; + } + + // BigNumberish items; padded on the left to wordSize + writeValue(value: BigNumberish): number { + return this._writeData(this._getValue(value)); + } + + writeUpdatableValue(): (value: BigNumberish) => void { + const offset = this._data.length; + this._data.push(this._padding); + this._dataLength += this.wordSize; + return (value: BigNumberish) => { + this._data[offset] = this._getValue(value); + }; + } +} + +export class Reader { + readonly wordSize: number; + readonly allowLoose: boolean; + + readonly _data: Uint8Array; + readonly _coerceFunc: CoerceFunc; + + _offset: number; + + constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean) { + defineReadOnly(this, "_data", arrayify(data)); + defineReadOnly(this, "wordSize", wordSize || 32); + defineReadOnly(this, "_coerceFunc", coerceFunc); + defineReadOnly(this, "allowLoose", allowLoose); + + this._offset = 0; + } + + get data(): string { return hexlify(this._data); } + get consumed(): number { return this._offset; } + + // The default Coerce function + static coerce(name: string, value: any): any { + let match = name.match("^u?int([0-9]+)$"); + if (match && parseInt(match[1]) <= 48) { value = value.toNumber(); } + return value; + } + + coerce(name: string, value: any): any { + if (this._coerceFunc) { return this._coerceFunc(name, value); } + return Reader.coerce(name, value); + } + + _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array { + let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize; + if (this._offset + alignedLength > this._data.length) { + if (this.allowLoose && loose && this._offset + length <= this._data.length) { + alignedLength = length; + } else { + logger.throwError("data out-of-bounds", Logger.errors.BUFFER_OVERRUN, { + length: this._data.length, + offset: this._offset + alignedLength + }); + } + } + return this._data.slice(this._offset, this._offset + alignedLength) + } + + subReader(offset: number): Reader { + return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose); + } + + readBytes(length: number, loose?: boolean): Uint8Array { + let bytes = this._peekBytes(0, length, !!loose); + this._offset += bytes.length; + // @TODO: Make sure the length..end bytes are all 0? + return bytes.slice(0, length); + } + + readValue(): BigNumber { + return BigNumber.from(this.readBytes(this.wordSize)); + } +} diff --git a/node_modules/@ethersproject/abi/src.ts/coders/address.ts b/node_modules/@ethersproject/abi/src.ts/coders/address.ts new file mode 100644 index 0000000..6ae2d27 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/address.ts @@ -0,0 +1,31 @@ +"use strict"; + +import { getAddress } from "@ethersproject/address"; +import { hexZeroPad } from "@ethersproject/bytes"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +export class AddressCoder extends Coder { + + constructor(localName: string) { + super("address", "address", localName, false); + } + + defaultValue(): string { + return "0x0000000000000000000000000000000000000000"; + } + + encode(writer: Writer, value: string): number { + try { + value = getAddress(value) + } catch (error) { + this._throwError(error.message, value); + } + return writer.writeValue(value); + } + + decode(reader: Reader): any { + return getAddress(hexZeroPad(reader.readValue().toHexString(), 20)); + } +} + diff --git a/node_modules/@ethersproject/abi/src.ts/coders/anonymous.ts b/node_modules/@ethersproject/abi/src.ts/coders/anonymous.ts new file mode 100644 index 0000000..9bf778e --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/anonymous.ts @@ -0,0 +1,25 @@ +"use strict"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +// Clones the functionality of an existing Coder, but without a localName +export class AnonymousCoder extends Coder { + private coder: Coder; + + constructor(coder: Coder) { + super(coder.name, coder.type, undefined, coder.dynamic); + this.coder = coder; + } + + defaultValue(): any { + return this.coder.defaultValue(); + } + + encode(writer: Writer, value: any): number { + return this.coder.encode(writer, value); + } + + decode(reader: Reader): any { + return this.coder.decode(reader); + } +} diff --git a/node_modules/@ethersproject/abi/src.ts/coders/array.ts b/node_modules/@ethersproject/abi/src.ts/coders/array.ts new file mode 100644 index 0000000..a931037 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/array.ts @@ -0,0 +1,236 @@ +"use strict"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "../_version"; +const logger = new Logger(version); + +import { Coder, Reader, Result, Writer } from "./abstract-coder"; +import { AnonymousCoder } from "./anonymous"; + +export function pack(writer: Writer, coders: ReadonlyArray, values: Array | { [ name: string ]: any }): number { + let arrayValues: Array = null; + + if (Array.isArray(values)) { + arrayValues = values; + + } else if (values && typeof(values) === "object") { + let unique: { [ name: string ]: boolean } = { }; + + arrayValues = coders.map((coder) => { + const name = coder.localName; + if (!name) { + logger.throwError("cannot encode object for signature with missing names", Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + + if (unique[name]) { + logger.throwError("cannot encode object for signature with duplicate names", Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + + unique[name] = true; + + return values[name]; + }); + + } else { + logger.throwArgumentError("invalid tuple value", "tuple", values); + } + + if (coders.length !== arrayValues.length) { + logger.throwArgumentError("types/value length mismatch", "tuple", values); + } + + let staticWriter = new Writer(writer.wordSize); + let dynamicWriter = new Writer(writer.wordSize); + + let updateFuncs: Array<(baseOffset: number) => void> = []; + coders.forEach((coder, index) => { + let value = arrayValues[index]; + + if (coder.dynamic) { + // Get current dynamic offset (for the future pointer) + let dynamicOffset = dynamicWriter.length; + + // Encode the dynamic value into the dynamicWriter + coder.encode(dynamicWriter, value); + + // Prepare to populate the correct offset once we are done + let updateFunc = staticWriter.writeUpdatableValue(); + updateFuncs.push((baseOffset: number) => { + updateFunc(baseOffset + dynamicOffset); + }); + + } else { + coder.encode(staticWriter, value); + } + }); + + // Backfill all the dynamic offsets, now that we know the static length + updateFuncs.forEach((func) => { func(staticWriter.length); }); + + let length = writer.appendWriter(staticWriter); + length += writer.appendWriter(dynamicWriter); + return length; +} + +export function unpack(reader: Reader, coders: Array): Result { + let values: any = []; + + // A reader anchored to this base + let baseReader = reader.subReader(0); + + coders.forEach((coder) => { + let value: any = null; + + if (coder.dynamic) { + let offset = reader.readValue(); + let offsetReader = baseReader.subReader(offset.toNumber()); + try { + value = coder.decode(offsetReader); + } catch (error) { + // Cannot recover from this + if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + + } else { + try { + value = coder.decode(reader); + } catch (error) { + // Cannot recover from this + if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + + if (value != undefined) { + values.push(value); + } + }); + + // We only output named properties for uniquely named coders + const uniqueNames = coders.reduce((accum, coder) => { + const name = coder.localName; + if (name) { + if (!accum[name]) { accum[name] = 0; } + accum[name]++; + } + return accum; + }, <{ [ name: string ]: number }>{ }); + + // Add any named parameters (i.e. tuples) + coders.forEach((coder: Coder, index: number) => { + let name = coder.localName; + if (!name || uniqueNames[name] !== 1) { return; } + + if (name === "length") { name = "_length"; } + + if (values[name] != null) { return; } + + const value = values[index]; + + if (value instanceof Error) { + Object.defineProperty(values, name, { + enumerable: true, + get: () => { throw value; } + }); + } else { + values[name] = value; + } + }); + + for (let i = 0; i < values.length; i++) { + const value = values[i]; + if (value instanceof Error) { + Object.defineProperty(values, i, { + enumerable: true, + get: () => { throw value; } + }); + } + } + + return Object.freeze(values); +} + + +export class ArrayCoder extends Coder { + readonly coder: Coder; + readonly length: number; + + constructor(coder: Coder, length: number, localName: string) { + const type = (coder.type + "[" + (length >= 0 ? length: "") + "]"); + const dynamic = (length === -1 || coder.dynamic); + super("array", type, localName, dynamic); + + this.coder = coder; + this.length = length; + } + + defaultValue(): Array { + // Verifies the child coder is valid (even if the array is dynamic or 0-length) + const defaultChild = this.coder.defaultValue(); + + const result: Array = []; + for (let i = 0; i < this.length; i++) { + result.push(defaultChild); + } + return result; + } + + encode(writer: Writer, value: Array): number { + if (!Array.isArray(value)) { + this._throwError("expected array value", value); + } + + let count = this.length; + + if (count === -1) { + count = value.length; + writer.writeValue(value.length); + } + + logger.checkArgumentCount(value.length, count, "coder array" + (this.localName? (" "+ this.localName): "")); + + let coders = []; + for (let i = 0; i < value.length; i++) { coders.push(this.coder); } + + return pack(writer, coders, value); + } + + decode(reader: Reader): any { + let count = this.length; + if (count === -1) { + count = reader.readValue().toNumber(); + + // Check that there is *roughly* enough data to ensure + // stray random data is not being read as a length. Each + // slot requires at least 32 bytes for their value (or 32 + // bytes as a link to the data). This could use a much + // tighter bound, but we are erroring on the side of safety. + if (count * 32 > reader._data.length) { + logger.throwError("insufficient data length", Logger.errors.BUFFER_OVERRUN, { + length: reader._data.length, + count: count + }); + } + } + let coders = []; + for (let i = 0; i < count; i++) { coders.push(new AnonymousCoder(this.coder)); } + + return reader.coerce(this.name, unpack(reader, coders)); + } +} + diff --git a/node_modules/@ethersproject/abi/src.ts/coders/boolean.ts b/node_modules/@ethersproject/abi/src.ts/coders/boolean.ts new file mode 100644 index 0000000..ff3d1d8 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/boolean.ts @@ -0,0 +1,23 @@ +"use strict"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +export class BooleanCoder extends Coder { + + constructor(localName: string) { + super("bool", "bool", localName, false); + } + + defaultValue(): boolean { + return false; + } + + encode(writer: Writer, value: boolean): number { + return writer.writeValue(value ? 1: 0); + } + + decode(reader: Reader): any { + return reader.coerce(this.type, !reader.readValue().isZero()); + } +} + diff --git a/node_modules/@ethersproject/abi/src.ts/coders/bytes.ts b/node_modules/@ethersproject/abi/src.ts/coders/bytes.ts new file mode 100644 index 0000000..bc2b20a --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/bytes.ts @@ -0,0 +1,38 @@ +"use strict"; + +import { arrayify, hexlify } from "@ethersproject/bytes"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +export class DynamicBytesCoder extends Coder { + constructor(type: string, localName: string) { + super(type, type, localName, true); + } + + defaultValue(): string { + return "0x"; + } + + encode(writer: Writer, value: any): number { + value = arrayify(value); + let length = writer.writeValue(value.length); + length += writer.writeBytes(value); + return length; + } + + decode(reader: Reader): any { + return reader.readBytes(reader.readValue().toNumber(), true); + } +} + +export class BytesCoder extends DynamicBytesCoder { + constructor(localName: string) { + super("bytes", localName); + } + + decode(reader: Reader): any { + return reader.coerce(this.name, hexlify(super.decode(reader))); + } +} + + diff --git a/node_modules/@ethersproject/abi/src.ts/coders/fixed-bytes.ts b/node_modules/@ethersproject/abi/src.ts/coders/fixed-bytes.ts new file mode 100644 index 0000000..ebf4e23 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/fixed-bytes.ts @@ -0,0 +1,30 @@ +"use strict"; + +import { arrayify, BytesLike, hexlify } from "@ethersproject/bytes"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +// @TODO: Merge this with bytes +export class FixedBytesCoder extends Coder { + readonly size: number; + + constructor(size: number, localName: string) { + let name = "bytes" + String(size); + super(name, name, localName, false); + this.size = size; + } + + defaultValue(): string { + return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2); + } + + encode(writer: Writer, value: BytesLike): number { + let data = arrayify(value); + if (data.length !== this.size) { this._throwError("incorrect data length", value); } + return writer.writeBytes(data); + } + + decode(reader: Reader): any { + return reader.coerce(this.name, hexlify(reader.readBytes(this.size))); + } +} diff --git a/node_modules/@ethersproject/abi/src.ts/coders/null.ts b/node_modules/@ethersproject/abi/src.ts/coders/null.ts new file mode 100644 index 0000000..c7377be --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/null.ts @@ -0,0 +1,24 @@ +"use strict"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +export class NullCoder extends Coder { + + constructor(localName: string) { + super("null", "", localName, false); + } + + defaultValue(): null { + return null; + } + + encode(writer: Writer, value: any): number { + if (value != null) { this._throwError("not null", value); } + return writer.writeBytes([ ]); + } + + decode(reader: Reader): any { + reader.readBytes(0); + return reader.coerce(this.name, null); + } +} diff --git a/node_modules/@ethersproject/abi/src.ts/coders/number.ts b/node_modules/@ethersproject/abi/src.ts/coders/number.ts new file mode 100644 index 0000000..031cbdc --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/number.ts @@ -0,0 +1,57 @@ +"use strict"; + +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { MaxUint256, NegativeOne, One, Zero } from "@ethersproject/constants"; + +import { Coder, Reader, Writer } from "./abstract-coder"; + +export class NumberCoder extends Coder { + readonly size: number; + readonly signed: boolean; + + constructor(size: number, signed: boolean, localName: string) { + const name = ((signed ? "int": "uint") + (size * 8)); + super(name, name, localName, false); + + this.size = size; + this.signed = signed; + } + + defaultValue(): number { + return 0; + } + + encode(writer: Writer, value: BigNumberish): number { + let v = BigNumber.from(value); + + // Check bounds are safe for encoding + let maxUintValue = MaxUint256.mask(writer.wordSize * 8); + if (this.signed) { + let bounds = maxUintValue.mask(this.size * 8 - 1); + if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) { + this._throwError("value out-of-bounds", value); + } + } else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) { + this._throwError("value out-of-bounds", value); + } + + v = v.toTwos(this.size * 8).mask(this.size * 8); + + if (this.signed) { + v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize); + } + + return writer.writeValue(v); + } + + decode(reader: Reader): any { + let value = reader.readValue().mask(this.size * 8); + + if (this.signed) { + value = value.fromTwos(this.size * 8); + } + + return reader.coerce(this.name, value); + } +} + diff --git a/node_modules/@ethersproject/abi/src.ts/coders/string.ts b/node_modules/@ethersproject/abi/src.ts/coders/string.ts new file mode 100644 index 0000000..c2625f8 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/string.ts @@ -0,0 +1,25 @@ +"use strict"; + +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; + +import { Reader, Writer } from "./abstract-coder"; +import { DynamicBytesCoder } from "./bytes"; + +export class StringCoder extends DynamicBytesCoder { + + constructor(localName: string) { + super("string", localName); + } + + defaultValue(): string { + return ""; + } + + encode(writer: Writer, value: any): number { + return super.encode(writer, toUtf8Bytes(value)); + } + + decode(reader: Reader): any { + return toUtf8String(super.decode(reader)); + } +} diff --git a/node_modules/@ethersproject/abi/src.ts/coders/tuple.ts b/node_modules/@ethersproject/abi/src.ts/coders/tuple.ts new file mode 100644 index 0000000..9b2cf5c --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/coders/tuple.ts @@ -0,0 +1,61 @@ +"use strict"; + +import { Coder, Reader, Writer } from "./abstract-coder"; +import { pack, unpack } from "./array"; + +export class TupleCoder extends Coder { + readonly coders: Array; + + constructor(coders: Array, localName: string) { + let dynamic = false; + const types: Array = []; + coders.forEach((coder) => { + if (coder.dynamic) { dynamic = true; } + types.push(coder.type); + }); + const type = ("tuple(" + types.join(",") + ")"); + + super("tuple", type, localName, dynamic); + this.coders = coders; + } + + defaultValue(): any { + const values: any = [ ]; + this.coders.forEach((coder) => { + values.push(coder.defaultValue()); + }); + + // We only output named properties for uniquely named coders + const uniqueNames = this.coders.reduce((accum, coder) => { + const name = coder.localName; + if (name) { + if (!accum[name]) { accum[name] = 0; } + accum[name]++; + } + return accum; + }, <{ [ name: string ]: number }>{ }); + + // Add named values + this.coders.forEach((coder: Coder, index: number) => { + let name = coder.localName; + if (!name || uniqueNames[name] !== 1) { return; } + + if (name === "length") { name = "_length"; } + + if (values[name] != null) { return; } + + values[name] = values[index]; + }); + + return Object.freeze(values); + } + + encode(writer: Writer, value: Array | { [ name: string ]: any }): number { + return pack(writer, this.coders, value); + } + + decode(reader: Reader): any { + return reader.coerce(this.name, unpack(reader, this.coders)); + } +} + diff --git a/node_modules/@ethersproject/abi/src.ts/fragments.ts b/node_modules/@ethersproject/abi/src.ts/fragments.ts new file mode 100644 index 0000000..802a2a9 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/fragments.ts @@ -0,0 +1,1070 @@ +"use strict"; + +import { BigNumber } from "@ethersproject/bignumber"; +import { defineReadOnly } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export interface JsonFragmentType { + readonly name?: string; + readonly indexed?: boolean; + readonly type?: string; + readonly internalType?: any; // @TODO: in v6 reduce type + readonly components?: ReadonlyArray; +} + +export interface JsonFragment { + readonly name?: string; + readonly type?: string; + + readonly anonymous?: boolean; + + readonly payable?: boolean; + readonly constant?: boolean; + readonly stateMutability?: string; + + readonly inputs?: ReadonlyArray; + readonly outputs?: ReadonlyArray; + + readonly gas?: string; +}; + +const _constructorGuard = { }; + +// AST Node parser state +type ParseState = { + allowArray?: boolean, + allowName?: boolean, + allowParams?: boolean, + allowType?: boolean, + readArray?: boolean, +}; + +// AST Node +type ParseNode = { + parent?: any, + type?: string, + name?: string, + state?: ParseState, + indexed?: boolean, + components?: Array +}; + +let ModifiersBytes: { [ name: string ]: boolean } = { calldata: true, memory: true, storage: true }; +let ModifiersNest: { [ name: string ]: boolean } = { calldata: true, memory: true }; +function checkModifier(type: string, name: string): boolean { + if (type === "bytes" || type === "string") { + if (ModifiersBytes[name]) { return true; } + } else if (type === "address") { + if (name === "payable") { return true; } + } else if (type.indexOf("[") >= 0 || type === "tuple") { + if (ModifiersNest[name]) { return true; } + } + if (ModifiersBytes[name] || name === "payable") { + logger.throwArgumentError("invalid modifier", "name", name); + } + return false; +} + +// @TODO: Make sure that children of an indexed tuple are marked with a null indexed +function parseParamType(param: string, allowIndexed: boolean): ParseNode { + + let originalParam = param; + function throwError(i: number) { + logger.throwArgumentError(`unexpected character at position ${ i }`, "param", param); + } + param = param.replace(/\s/g, " "); + + function newNode(parent: ParseNode): ParseNode { + let node: ParseNode = { type: "", name: "", parent: parent, state: { allowType: true } }; + if (allowIndexed) { node.indexed = false; } + return node + } + + let parent: ParseNode = { type: "", name: "", state: { allowType: true } }; + let node = parent; + + for (let i = 0; i < param.length; i++) { + let c = param[i]; + switch (c) { + case "(": + if (node.state.allowType && node.type === "") { + node.type = "tuple"; + } else if (!node.state.allowParams) { + throwError(i); + } + node.state.allowType = false; + node.type = verifyType(node.type); + node.components = [ newNode(node) ]; + node = node.components[0]; + break; + + case ")": + delete node.state; + + if (node.name === "indexed") { + if (!allowIndexed) { throwError(i); } + node.indexed = true; + node.name = ""; + } + + if (checkModifier(node.type, node.name)) { node.name = ""; } + + node.type = verifyType(node.type); + + let child = node; + node = node.parent; + if (!node) { throwError(i); } + delete child.parent; + node.state.allowParams = false; + node.state.allowName = true; + node.state.allowArray = true; + break; + + case ",": + delete node.state; + + if (node.name === "indexed") { + if (!allowIndexed) { throwError(i); } + node.indexed = true; + node.name = ""; + } + + if (checkModifier(node.type, node.name)) { node.name = ""; } + + node.type = verifyType(node.type); + + let sibling: ParseNode = newNode(node.parent); + //{ type: "", name: "", parent: node.parent, state: { allowType: true } }; + node.parent.components.push(sibling); + delete node.parent; + node = sibling; + break; + + // Hit a space... + case " ": + + // If reading type, the type is done and may read a param or name + if (node.state.allowType) { + if (node.type !== "") { + node.type = verifyType(node.type); + delete node.state.allowType; + node.state.allowName = true; + node.state.allowParams = true; + } + } + + // If reading name, the name is done + if (node.state.allowName) { + if (node.name !== "") { + if (node.name === "indexed") { + if (!allowIndexed) { throwError(i); } + if (node.indexed) { throwError(i); } + node.indexed = true; + node.name = ""; + } else if (checkModifier(node.type, node.name)) { + node.name = ""; + } else { + node.state.allowName = false; + } + } + } + + break; + + case "[": + if (!node.state.allowArray) { throwError(i); } + + node.type += c; + + node.state.allowArray = false; + node.state.allowName = false; + node.state.readArray = true; + break; + + case "]": + if (!node.state.readArray) { throwError(i); } + + node.type += c; + + node.state.readArray = false; + node.state.allowArray = true; + node.state.allowName = true; + break; + + default: + if (node.state.allowType) { + node.type += c; + node.state.allowParams = true; + node.state.allowArray = true; + } else if (node.state.allowName) { + node.name += c; + delete node.state.allowArray; + } else if (node.state.readArray) { + node.type += c; + } else { + throwError(i); + } + } + } + + if (node.parent) { logger.throwArgumentError("unexpected eof", "param", param); } + + delete parent.state; + + if (node.name === "indexed") { + if (!allowIndexed) { throwError(originalParam.length - 7); } + if (node.indexed) { throwError(originalParam.length - 7); } + node.indexed = true; + node.name = ""; + } else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + + parent.type = verifyType(parent.type); + + return parent; +} + +function populate(object: any, params: any) { + for (let key in params) { defineReadOnly(object, key, params[key]); } +} + +export const FormatTypes: { [ name: string ]: string } = Object.freeze({ + // Bare formatting, as is needed for computing a sighash of an event or function + sighash: "sighash", + + // Human-Readable with Minimal spacing and without names (compact human-readable) + minimal: "minimal", + + // Human-Readable with nice spacing, including all names + full: "full", + + // JSON-format a la Solidity + json: "json" +}); + +const paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/); + +export class ParamType { + + // The local name of the parameter (of null if unbound) + readonly name: string; + + // The fully qualified type (e.g. "address", "tuple(address)", "uint256[3][]" + readonly type: string; + + // The base type (e.g. "address", "tuple", "array") + readonly baseType: string; + + // Indexable Paramters ONLY (otherwise null) + readonly indexed: boolean; + + // Tuples ONLY: (otherwise null) + // - sub-components + readonly components: Array; + + // Arrays ONLY: (otherwise null) + // - length of the array (-1 for dynamic length) + // - child type + readonly arrayLength: number; + readonly arrayChildren: ParamType; + + readonly _isParamType: boolean; + + constructor(constructorGuard: any, params: any) { + if (constructorGuard !== _constructorGuard) { logger.throwError("use fromString", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new ParamType()" + }); } + populate(this, params); + + let match = this.type.match(paramTypeArray); + if (match) { + populate(this, { + arrayLength: parseInt(match[2] || "-1"), + arrayChildren: ParamType.fromObject({ + type: match[1], + components: this.components + }), + baseType: "array" + }); + } else { + populate(this, { + arrayLength: null, + arrayChildren: null, + baseType: ((this.components != null) ? "tuple": this.type) + }); + } + + this._isParamType = true; + + Object.freeze(this); + } + + // Format the parameter fragment + // - sighash: "(uint256,address)" + // - minimal: "tuple(uint256,address) indexed" + // - full: "tuple(uint256 foo, address bar) indexed baz" + format(format?: string): string { + if (!format) { format = FormatTypes.sighash; } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + + if (format === FormatTypes.json) { + let result: any = { + type: ((this.baseType === "tuple") ? "tuple": this.type), + name: (this.name || undefined) + }; + if (typeof(this.indexed) === "boolean") { result.indexed = this.indexed; } + if (this.components) { + result.components = this.components.map((comp) => JSON.parse(comp.format(format))); + } + return JSON.stringify(result); + } + + let result = ""; + + // Array + if (this.baseType === "array") { + result += this.arrayChildren.format(format); + result += "[" + (this.arrayLength < 0 ? "": String(this.arrayLength)) + "]"; + } else { + if (this.baseType === "tuple") { + if (format !== FormatTypes.sighash) { + result += this.type; + } + result += "(" + this.components.map( + (comp) => comp.format(format) + ).join((format === FormatTypes.full) ? ", ": ",") + ")"; + } else { + result += this.type; + } + } + + if (format !== FormatTypes.sighash) { + if (this.indexed === true) { result += " indexed"; } + if (format === FormatTypes.full && this.name) { + result += " " + this.name; + } + } + + return result; + } + + static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType { + if (typeof(value) === "string") { + return ParamType.fromString(value, allowIndexed); + } + return ParamType.fromObject(value); + } + + static fromObject(value: JsonFragmentType | ParamType): ParamType { + if (ParamType.isParamType(value)) { return value; } + + return new ParamType(_constructorGuard, { + name: (value.name || null), + type: verifyType(value.type), + indexed: ((value.indexed == null) ? null: !!value.indexed), + components: (value.components ? value.components.map(ParamType.fromObject): null) + }); + } + + static fromString(value: string, allowIndexed?: boolean): ParamType { + function ParamTypify(node: ParseNode): ParamType { + return ParamType.fromObject({ + name: node.name, + type: node.type, + indexed: node.indexed, + components: node.components + }); + } + + return ParamTypify(parseParamType(value, !!allowIndexed)); + } + + static isParamType(value: any): value is ParamType { + return !!(value != null && value._isParamType); + } +}; + +function parseParams(value: string, allowIndex: boolean): Array { + return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex)); +} + +type TypeCheck = { -readonly [ K in keyof T ]: T[K] }; + +interface _Fragment { + readonly type: string; + readonly name: string; + readonly inputs: ReadonlyArray; +} + +export abstract class Fragment { + + readonly type: string; + readonly name: string; + readonly inputs: Array; + + readonly _isFragment: boolean; + + constructor(constructorGuard: any, params: any) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use a static from method", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Fragment()" + }); + } + populate(this, params); + + this._isFragment = true; + + Object.freeze(this); + } + + abstract format(format?: string): string; + + static from(value: Fragment | JsonFragment | string): Fragment { + if (Fragment.isFragment(value)) { return value; } + + if (typeof(value) === "string") { + return Fragment.fromString(value); + } + + return Fragment.fromObject(value); + } + + static fromObject(value: Fragment | JsonFragment): Fragment { + if (Fragment.isFragment(value)) { return value; } + + switch (value.type) { + case "function": + return FunctionFragment.fromObject(value); + case "event": + return EventFragment.fromObject(value); + case "constructor": + return ConstructorFragment.fromObject(value); + case "error": + return ErrorFragment.fromObject(value); + case "fallback": + case "receive": + // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment? + return null; + } + + return logger.throwArgumentError("invalid fragment object", "value", value); + } + + static fromString(value: string): Fragment { + // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space + value = value.replace(/\s/g, " "); + value = value.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " "); + value = value.trim(); + + if (value.split(" ")[0] === "event") { + return EventFragment.fromString(value.substring(5).trim()); + } else if (value.split(" ")[0] === "function") { + return FunctionFragment.fromString(value.substring(8).trim()); + } else if (value.split("(")[0].trim() === "constructor") { + return ConstructorFragment.fromString(value.trim()); + } else if (value.split(" ")[0] === "error") { + return ErrorFragment.fromString(value.substring(5).trim()); + } + + return logger.throwArgumentError("unsupported fragment", "value", value); + } + + static isFragment(value: any): value is Fragment { + return !!(value && value._isFragment); + } +} + +interface _EventFragment extends _Fragment { + readonly anonymous: boolean; +} + +export class EventFragment extends Fragment { + readonly anonymous: boolean; + + format(format?: string): string { + if (!format) { format = FormatTypes.sighash; } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "event", + anonymous: this.anonymous, + name: this.name, + inputs: this.inputs.map((input) => JSON.parse(input.format(format))) + }); + } + + let result = ""; + + if (format !== FormatTypes.sighash) { + result += "event "; + } + + result += this.name + "(" + this.inputs.map( + (input) => input.format(format) + ).join((format === FormatTypes.full) ? ", ": ",") + ") "; + + if (format !== FormatTypes.sighash) { + if (this.anonymous) { + result += "anonymous "; + } + } + + return result.trim(); + } + + static from(value: EventFragment | JsonFragment | string): EventFragment { + if (typeof(value) === "string") { + return EventFragment.fromString(value); + } + return EventFragment.fromObject(value); + } + + static fromObject(value: JsonFragment | EventFragment): EventFragment { + if (EventFragment.isEventFragment(value)) { return value; } + + if (value.type !== "event") { + logger.throwArgumentError("invalid event object", "value", value); + } + + const params: TypeCheck<_EventFragment> = { + name: verifyIdentifier(value.name), + anonymous: value.anonymous, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + type: "event" + }; + + return new EventFragment(_constructorGuard, params); + } + + static fromString(value: string): EventFragment { + + let match = value.match(regexParen); + if (!match) { + logger.throwArgumentError("invalid event string", "value", value); + } + + let anonymous = false; + match[3].split(" ").forEach((modifier) => { + switch(modifier.trim()) { + case "anonymous": + anonymous = true; + break; + case "": + break; + default: + logger.warn("unknown modifier: " + modifier); + } + }); + + return EventFragment.fromObject({ + name: match[1].trim(), + anonymous: anonymous, + inputs: parseParams(match[2], true), + type: "event" + }); + } + + static isEventFragment(value: any): value is EventFragment { + return (value && value._isFragment && value.type === "event"); + } +} + +function parseGas(value: string, params: any): string { + params.gas = null; + + let comps = value.split("@"); + if (comps.length !== 1) { + if (comps.length > 2) { + logger.throwArgumentError("invalid human-readable ABI signature", "value", value); + } + if (!comps[1].match(/^[0-9]+$/)) { + logger.throwArgumentError("invalid human-readable ABI signature gas", "value", value); + } + params.gas = BigNumber.from(comps[1]); + return comps[0]; + } + + return value; +} + +function parseModifiers(value: string, params: any): void { + params.constant = false; + params.payable = false; + params.stateMutability = "nonpayable"; + + value.split(" ").forEach((modifier) => { + switch (modifier.trim()) { + case "constant": + params.constant = true; + break; + case "payable": + params.payable = true; + params.stateMutability = "payable"; + break; + case "nonpayable": + params.payable = false; + params.stateMutability = "nonpayable"; + break; + case "pure": + params.constant = true; + params.stateMutability = "pure"; + break; + case "view": + params.constant = true; + params.stateMutability = "view"; + break; + case "external": + case "public": + case "": + break; + default: + console.log("unknown modifier: " + modifier); + } + }); +} + +type StateInputValue = { + constant?: boolean; + payable?: boolean; + stateMutability?: string; + type?: string; +}; + +type StateOutputValue = { + constant: boolean; + payable: boolean; + stateMutability: string; +}; + +function verifyState(value: StateInputValue): StateOutputValue { + let result: any = { + constant: false, + payable: true, + stateMutability: "payable" + }; + + if (value.stateMutability != null) { + result.stateMutability = value.stateMutability; + + // Set (and check things are consistent) the constant property + result.constant = (result.stateMutability === "view" || result.stateMutability === "pure"); + if (value.constant != null) { + if ((!!value.constant) !== result.constant) { + logger.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); + } + } + + // Set (and check things are consistent) the payable property + result.payable = (result.stateMutability === "payable"); + if (value.payable != null) { + if ((!!value.payable) !== result.payable) { + logger.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); + } + } + + } else if (value.payable != null) { + result.payable = !!value.payable; + + // If payable we can assume non-constant; otherwise we can't assume + if (value.constant == null && !result.payable && value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + + result.constant = !!value.constant; + + if (result.constant) { + result.stateMutability = "view"; + } else { + result.stateMutability = (result.payable ? "payable": "nonpayable"); + } + + if (result.payable && result.constant) { + logger.throwArgumentError("cannot have constant payable function", "value", value); + } + + } else if (value.constant != null) { + result.constant = !!value.constant; + result.payable = !result.constant; + result.stateMutability = (result.constant ? "view": "payable"); + + } else if (value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + + return result; +} + +interface _ConstructorFragment extends _Fragment { + stateMutability: string; + payable: boolean; + gas?: BigNumber; +} + +export class ConstructorFragment extends Fragment { + stateMutability: string; + payable: boolean; + gas?: BigNumber; + + format(format?: string): string { + if (!format) { format = FormatTypes.sighash; } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "constructor", + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability: undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber(): undefined), + inputs: this.inputs.map((input) => JSON.parse(input.format(format))) + }); + } + + if (format === FormatTypes.sighash) { + logger.throwError("cannot format a constructor for sighash", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "format(sighash)" + }); + } + + let result = "constructor(" + this.inputs.map( + (input) => input.format(format) + ).join((format === FormatTypes.full) ? ", ": ",") + ") "; + + if (this.stateMutability && this.stateMutability !== "nonpayable") { + result += this.stateMutability + " "; + } + + return result.trim(); + } + + static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment { + if (typeof(value) === "string") { + return ConstructorFragment.fromString(value); + } + return ConstructorFragment.fromObject(value); + } + + static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment { + if (ConstructorFragment.isConstructorFragment(value)) { return value; } + + if (value.type !== "constructor") { + logger.throwArgumentError("invalid constructor object", "value", value); + } + + let state = verifyState(value); + if (state.constant) { + logger.throwArgumentError("constructor cannot be constant", "value", value); + } + + const params: TypeCheck<_ConstructorFragment> = { + name: null, + type: value.type, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? BigNumber.from(value.gas): null) + }; + + return new ConstructorFragment(_constructorGuard, params); + } + + static fromString(value: string): ConstructorFragment { + let params: any = { type: "constructor" }; + + value = parseGas(value, params); + + let parens = value.match(regexParen); + if (!parens || parens[1].trim() !== "constructor") { + logger.throwArgumentError("invalid constructor string", "value", value); + } + + params.inputs = parseParams(parens[2].trim(), false); + + parseModifiers(parens[3].trim(), params); + + return ConstructorFragment.fromObject(params); + } + + static isConstructorFragment(value: any): value is ConstructorFragment { + return (value && value._isFragment && value.type === "constructor"); + } +} + +interface _FunctionFragment extends _ConstructorFragment { + constant: boolean; + outputs?: Array; +} + +export class FunctionFragment extends ConstructorFragment { + constant: boolean; + outputs?: Array; + + format(format?: string): string { + if (!format) { format = FormatTypes.sighash; } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "function", + name: this.name, + constant: this.constant, + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability: undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber(): undefined), + inputs: this.inputs.map((input) => JSON.parse(input.format(format))), + outputs: this.outputs.map((output) => JSON.parse(output.format(format))), + }); + } + + let result = ""; + + if (format !== FormatTypes.sighash) { + result += "function "; + } + + result += this.name + "(" + this.inputs.map( + (input) => input.format(format) + ).join((format === FormatTypes.full) ? ", ": ",") + ") "; + + if (format !== FormatTypes.sighash) { + if (this.stateMutability) { + if (this.stateMutability !== "nonpayable") { + result += (this.stateMutability + " "); + } + } else if (this.constant) { + result += "view "; + } + + if (this.outputs && this.outputs.length) { + result += "returns (" + this.outputs.map( + (output) => output.format(format) + ).join(", ") + ") "; + } + + if (this.gas != null) { + result += "@" + this.gas.toString() + " "; + } + } + + return result.trim(); + } + + static from(value: FunctionFragment | JsonFragment | string): FunctionFragment { + if (typeof(value) === "string") { + return FunctionFragment.fromString(value); + } + return FunctionFragment.fromObject(value); + } + + static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment { + if (FunctionFragment.isFunctionFragment(value)) { return value; } + + if (value.type !== "function") { + logger.throwArgumentError("invalid function object", "value", value); + } + + let state = verifyState(value); + + const params: TypeCheck<_FunctionFragment> = { + type: value.type, + name: verifyIdentifier(value.name), + constant: state.constant, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []), + outputs: (value.outputs ? value.outputs.map(ParamType.fromObject): [ ]), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? BigNumber.from(value.gas): null) + }; + + return new FunctionFragment(_constructorGuard, params); + } + + static fromString(value: string): FunctionFragment { + let params: any = { type: "function" }; + value = parseGas(value, params); + + let comps = value.split(" returns "); + if (comps.length > 2) { + logger.throwArgumentError("invalid function string", "value", value); + } + + let parens = comps[0].match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid function signature", "value", value); + } + + params.name = parens[1].trim(); + if (params.name) { verifyIdentifier(params.name); } + + params.inputs = parseParams(parens[2], false); + + parseModifiers(parens[3].trim(), params); + + // We have outputs + if (comps.length > 1) { + let returns = comps[1].match(regexParen); + if (returns[1].trim() != "" || returns[3].trim() != "") { + logger.throwArgumentError("unexpected tokens", "value", value); + } + params.outputs = parseParams(returns[2], false); + } else { + params.outputs = [ ]; + } + + return FunctionFragment.fromObject(params); + } + + static isFunctionFragment(value: any): value is FunctionFragment { + return (value && value._isFragment && value.type === "function"); + } +} + +//export class StructFragment extends Fragment { +//} + +function checkForbidden(fragment: ErrorFragment): ErrorFragment { + const sig = fragment.format(); + if (sig === "Error(string)" || sig === "Panic(uint256)") { + logger.throwArgumentError(`cannot specify user defined ${ sig } error`, "fragment", fragment); + } + return fragment; +} + +export class ErrorFragment extends Fragment { + + format(format?: string): string { + if (!format) { format = FormatTypes.sighash; } + if (!FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "error", + name: this.name, + inputs: this.inputs.map((input) => JSON.parse(input.format(format))), + }); + } + + let result = ""; + + if (format !== FormatTypes.sighash) { + result += "error "; + } + + result += this.name + "(" + this.inputs.map( + (input) => input.format(format) + ).join((format === FormatTypes.full) ? ", ": ",") + ") "; + + return result.trim(); + } + + static from(value: ErrorFragment | JsonFragment | string): ErrorFragment { + if (typeof(value) === "string") { + return ErrorFragment.fromString(value); + } + return ErrorFragment.fromObject(value); + } + + static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment { + if (ErrorFragment.isErrorFragment(value)) { return value; } + + if (value.type !== "error") { + logger.throwArgumentError("invalid error object", "value", value); + } + + const params: TypeCheck<_Fragment> = { + type: value.type, + name: verifyIdentifier(value.name), + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []) + }; + + return checkForbidden(new ErrorFragment(_constructorGuard, params)); + } + + static fromString(value: string): ErrorFragment { + let params: any = { type: "error" }; + + let parens = value.match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid error signature", "value", value); + } + + params.name = parens[1].trim(); + if (params.name) { verifyIdentifier(params.name); } + + params.inputs = parseParams(parens[2], false); + + return checkForbidden(ErrorFragment.fromObject(params)); + } + + static isErrorFragment(value: any): value is ErrorFragment { + return (value && value._isFragment && value.type === "error"); + } +} + +function verifyType(type: string): string { + + // These need to be transformed to their full description + if (type.match(/^uint($|[^1-9])/)) { + type = "uint256" + type.substring(4); + } else if (type.match(/^int($|[^1-9])/)) { + type = "int256" + type.substring(3); + } + + // @TODO: more verification + + return type; +} + +// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234 +const regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$"); +function verifyIdentifier(value: string): string { + if (!value || !value.match(regexIdentifier)) { + logger.throwArgumentError(`invalid identifier "${ value }"`, "value", value); + } + return value; +} + +const regexParen = new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"); + +function splitNesting(value: string): Array { + value = value.trim(); + + let result = []; + let accum = ""; + let depth = 0; + for (let offset = 0; offset < value.length; offset++) { + let c = value[offset]; + if (c === "," && depth === 0) { + result.push(accum); + accum = ""; + } else { + accum += c; + if (c === "(") { + depth++; + } else if (c === ")") { + depth--; + if (depth === -1) { + logger.throwArgumentError("unbalanced parenthesis", "value", value); + } + } + } + } + if (accum) { result.push(accum); } + + return result; +} + diff --git a/node_modules/@ethersproject/abi/src.ts/index.ts b/node_modules/@ethersproject/abi/src.ts/index.ts new file mode 100644 index 0000000..6858409 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/index.ts @@ -0,0 +1,34 @@ +"use strict"; + +import { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from "./fragments"; +import { AbiCoder, CoerceFunc, defaultAbiCoder } from "./abi-coder"; +import { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from "./interface"; + +export { + ConstructorFragment, + ErrorFragment, + EventFragment, + Fragment, + FunctionFragment, + ParamType, + FormatTypes, + + AbiCoder, + defaultAbiCoder, + + Interface, + Indexed, + + ///////////////////////// + // Types + + CoerceFunc, + JsonFragment, + JsonFragmentType, + + Result, + checkResultErrors, + + LogDescription, + TransactionDescription +}; diff --git a/node_modules/@ethersproject/abi/src.ts/interface.ts b/node_modules/@ethersproject/abi/src.ts/interface.ts new file mode 100644 index 0000000..c019e33 --- /dev/null +++ b/node_modules/@ethersproject/abi/src.ts/interface.ts @@ -0,0 +1,705 @@ +"use strict"; + +import { getAddress } from "@ethersproject/address"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { arrayify, BytesLike, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { id } from "@ethersproject/hash"; +import { keccak256 } from "@ethersproject/keccak256" +import { defineReadOnly, Description, getStatic } from "@ethersproject/properties"; + +import { AbiCoder, defaultAbiCoder } from "./abi-coder"; +import { checkResultErrors, Result } from "./coders/abstract-coder"; +import { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, ParamType } from "./fragments"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export { checkResultErrors, Result }; + +export class LogDescription extends Description { + readonly eventFragment: EventFragment; + readonly name: string; + readonly signature: string; + readonly topic: string; + readonly args: Result +} + +export class TransactionDescription extends Description { + readonly functionFragment: FunctionFragment; + readonly name: string; + readonly args: Result; + readonly signature: string; + readonly sighash: string; + readonly value: BigNumber; +} + +export class ErrorDescription extends Description { + readonly errorFragment: ErrorFragment; + readonly name: string; + readonly args: Result; + readonly signature: string; + readonly sighash: string; +} + +export class Indexed extends Description { + readonly hash: string; + readonly _isIndexed: boolean; + + static isIndexed(value: any): value is Indexed { + return !!(value && value._isIndexed); + } +} + +const BuiltinErrors: Record, name: string, reason?: boolean }> = { + "0x08c379a0": { signature: "Error(string)", name: "Error", inputs: [ "string" ], reason: true }, + "0x4e487b71": { signature: "Panic(uint256)", name: "Panic", inputs: [ "uint256" ] } +} + +function wrapAccessError(property: string, error: Error): Error { + const wrap = new Error(`deferred error during ABI decoding triggered accessing ${ property }`); + (wrap).error = error; + return wrap; +} + +/* +function checkNames(fragment: Fragment, type: "input" | "output", params: Array): void { + params.reduce((accum, param) => { + if (param.name) { + if (accum[param.name]) { + logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format("full") }`, "fragment", fragment); + } + accum[param.name] = true; + } + return accum; + }, <{ [ name: string ]: boolean }>{ }); +} +*/ +export class Interface { + readonly fragments: ReadonlyArray; + + readonly errors: { [ name: string ]: ErrorFragment }; + readonly events: { [ name: string ]: EventFragment }; + readonly functions: { [ name: string ]: FunctionFragment }; + readonly structs: { [ name: string ]: any }; + + readonly deploy: ConstructorFragment; + + readonly _abiCoder: AbiCoder; + + readonly _isInterface: boolean; + + constructor(fragments: string | ReadonlyArray) { + logger.checkNew(new.target, Interface); + + let abi: ReadonlyArray = [ ]; + if (typeof(fragments) === "string") { + abi = JSON.parse(fragments); + } else { + abi = fragments; + } + + defineReadOnly(this, "fragments", abi.map((fragment) => { + return Fragment.from(fragment); + }).filter((fragment) => (fragment != null))); + + defineReadOnly(this, "_abiCoder", getStatic<() => AbiCoder>(new.target, "getAbiCoder")()); + + defineReadOnly(this, "functions", { }); + defineReadOnly(this, "errors", { }); + defineReadOnly(this, "events", { }); + defineReadOnly(this, "structs", { }); + + // Add all fragments by their signature + this.fragments.forEach((fragment) => { + let bucket: { [ name: string ]: Fragment } = null; + switch (fragment.type) { + case "constructor": + if (this.deploy) { + logger.warn("duplicate definition - constructor"); + return; + } + //checkNames(fragment, "input", fragment.inputs); + defineReadOnly(this, "deploy", fragment); + return; + case "function": + //checkNames(fragment, "input", fragment.inputs); + //checkNames(fragment, "output", (fragment).outputs); + bucket = this.functions; + break; + case "event": + //checkNames(fragment, "input", fragment.inputs); + bucket = this.events; + break; + case "error": + bucket = this.errors; + break; + default: + return; + } + + let signature = fragment.format(); + if (bucket[signature]) { + logger.warn("duplicate definition - " + signature); + return; + } + + bucket[signature] = fragment; + }); + + // If we do not have a constructor add a default + if (!this.deploy) { + defineReadOnly(this, "deploy", ConstructorFragment.from({ + payable: false, + type: "constructor" + })); + } + + defineReadOnly(this, "_isInterface", true); + } + + format(format?: string): string | Array { + if (!format) { format = FormatTypes.full; } + if (format === FormatTypes.sighash) { + logger.throwArgumentError("interface does not support formatting sighash", "format", format); + } + + const abi = this.fragments.map((fragment) => fragment.format(format)); + + // We need to re-bundle the JSON fragments a bit + if (format === FormatTypes.json) { + return JSON.stringify(abi.map((j) => JSON.parse(j))); + } + + return abi; + } + + // Sub-classes can override these to handle other blockchains + static getAbiCoder(): AbiCoder { + return defaultAbiCoder; + } + + static getAddress(address: string): string { + return getAddress(address); + } + + static getSighash(fragment: ErrorFragment | FunctionFragment): string { + return hexDataSlice(id(fragment.format()), 0, 4); + } + + static getEventTopic(eventFragment: EventFragment): string { + return id(eventFragment.format()); + } + + // Find a function definition by any means necessary (unless it is ambiguous) + getFunction(nameOrSignatureOrSighash: string): FunctionFragment { + if (isHexString(nameOrSignatureOrSighash)) { + for (const name in this.functions) { + if (nameOrSignatureOrSighash === this.getSighash(name)) { + return this.functions[name]; + } + } + logger.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); + } + + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + const name = nameOrSignatureOrSighash.trim(); + const matching = Object.keys(this.functions).filter((f) => (f.split("("/* fix:) */)[0] === name)); + if (matching.length === 0) { + logger.throwArgumentError("no matching function", "name", name); + } else if (matching.length > 1) { + logger.throwArgumentError("multiple matching functions", "name", name); + } + + return this.functions[matching[0]]; + } + + // Normalize the signature and lookup the function + const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); + } + return result; + } + + // Find an event definition by any means necessary (unless it is ambiguous) + getEvent(nameOrSignatureOrTopic: string): EventFragment { + if (isHexString(nameOrSignatureOrTopic)) { + const topichash = nameOrSignatureOrTopic.toLowerCase(); + for (const name in this.events) { + if (topichash === this.getEventTopic(name)) { + return this.events[name]; + } + } + logger.throwArgumentError("no matching event", "topichash", topichash); + } + + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrTopic.indexOf("(") === -1) { + const name = nameOrSignatureOrTopic.trim(); + const matching = Object.keys(this.events).filter((f) => (f.split("("/* fix:) */)[0] === name)); + if (matching.length === 0) { + logger.throwArgumentError("no matching event", "name", name); + } else if (matching.length > 1) { + logger.throwArgumentError("multiple matching events", "name", name); + } + + return this.events[matching[0]]; + } + + // Normalize the signature and lookup the function + const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()]; + if (!result) { + logger.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); + } + return result; + } + + // Find a function definition by any means necessary (unless it is ambiguous) + getError(nameOrSignatureOrSighash: string): ErrorFragment { + if (isHexString(nameOrSignatureOrSighash)) { + const getSighash = getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, "getSighash"); + for (const name in this.errors) { + const error = this.errors[name]; + if (nameOrSignatureOrSighash === getSighash(error)) { + return this.errors[name]; + } + } + logger.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); + } + + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + const name = nameOrSignatureOrSighash.trim(); + const matching = Object.keys(this.errors).filter((f) => (f.split("("/* fix:) */)[0] === name)); + if (matching.length === 0) { + logger.throwArgumentError("no matching error", "name", name); + } else if (matching.length > 1) { + logger.throwArgumentError("multiple matching errors", "name", name); + } + + return this.errors[matching[0]]; + } + + // Normalize the signature and lookup the function + const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); + } + return result; + } + + // Get the sighash (the bytes4 selector) used by Solidity to identify a function + getSighash(fragment: ErrorFragment | FunctionFragment | string): string { + if (typeof(fragment) === "string") { + try { + fragment = this.getFunction(fragment); + } catch (error) { + try { + fragment = this.getError(fragment); + } catch (_) { + throw error; + } + } + } + + return getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, "getSighash")(fragment); + } + + // Get the topic (the bytes32 hash) used by Solidity to identify an event + getEventTopic(eventFragment: EventFragment | string): string { + if (typeof(eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + + return getStatic<(e: EventFragment) => string>(this.constructor, "getEventTopic")(eventFragment); + } + + + _decodeParams(params: ReadonlyArray, data: BytesLike): Result { + return this._abiCoder.decode(params, data) + } + + _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string { + return this._abiCoder.encode(params, values) + } + + encodeDeploy(values?: ReadonlyArray): string { + return this._encodeParams(this.deploy.inputs, values || [ ]); + } + + decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result { + if (typeof(fragment) === "string") { + fragment = this.getError(fragment); + } + + const bytes = arrayify(data); + + if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) { + logger.throwArgumentError(`data signature does not match error ${ fragment.name }.`, "data", hexlify(bytes)); + } + + return this._decodeParams(fragment.inputs, bytes.slice(4)); + } + + encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string { + if (typeof(fragment) === "string") { + fragment = this.getError(fragment); + } + + return hexlify(concat([ + this.getSighash(fragment), + this._encodeParams(fragment.inputs, values || [ ]) + ])); + } + + // Decode the data for a function call (e.g. tx.data) + decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result { + if (typeof(functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + + const bytes = arrayify(data); + + if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) { + logger.throwArgumentError(`data signature does not match function ${ functionFragment.name }.`, "data", hexlify(bytes)); + } + + return this._decodeParams(functionFragment.inputs, bytes.slice(4)); + } + + // Encode the data for a function call (e.g. tx.data) + encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string { + if (typeof(functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + + return hexlify(concat([ + this.getSighash(functionFragment), + this._encodeParams(functionFragment.inputs, values || [ ]) + ])); + } + + // Decode the result from a function call (e.g. from eth_call) + decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result { + if (typeof(functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + + let bytes = arrayify(data); + + let reason: string = null; + let errorArgs: Result = null; + let errorName: string = null; + let errorSignature: string = null; + switch (bytes.length % this._abiCoder._getWordSize()) { + case 0: + try { + return this._abiCoder.decode(functionFragment.outputs, bytes); + } catch (error) { } + break; + + case 4: { + const selector = hexlify(bytes.slice(0, 4)); + const builtin = BuiltinErrors[selector]; + if (builtin) { + errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4)); + errorName = builtin.name; + errorSignature = builtin.signature; + if (builtin.reason) { reason = errorArgs[0]; } + } else { + try { + const error = this.getError(selector); + errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4)); + errorName = error.name; + errorSignature = error.format(); + } catch (error) { + console.log(error); + } + } + break; + } + } + + return logger.throwError("call revert exception", Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + errorArgs, errorName, errorSignature, reason + }); + } + + // Encode the result for a function call (e.g. for eth_call) + encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string { + if (typeof(functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + + return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [ ])); + } + + // Create the filter for the event with search criteria (e.g. for eth_filterLog) + encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array> { + if (typeof(eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + + if (values.length > eventFragment.inputs.length) { + logger.throwError("too many arguments for " + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, { + argument: "values", + value: values + }) + } + + let topics: Array> = []; + if (!eventFragment.anonymous) { topics.push(this.getEventTopic(eventFragment)); } + + const encodeTopic = (param: ParamType, value: any): string => { + if (param.type === "string") { + return id(value); + } else if (param.type === "bytes") { + return keccak256(hexlify(value)); + } + + // Check addresses are valid + if (param.type === "address") { this._abiCoder.encode( [ "address" ], [ value ]); } + return hexZeroPad(hexlify(value), 32); + }; + + values.forEach((value, index) => { + + let param = eventFragment.inputs[index]; + + if (!param.indexed) { + if (value != null) { + logger.throwArgumentError("cannot filter non-indexed parameters; must be null", ("contract." + param.name), value); + } + return; + } + + if (value == null) { + topics.push(null); + } else if (param.baseType === "array" || param.baseType === "tuple") { + logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); + } else if (Array.isArray(value)) { + topics.push(value.map((value) => encodeTopic(param, value))); + } else { + topics.push(encodeTopic(param, value)); + } + }); + + // Trim off trailing nulls + while (topics.length && topics[topics.length - 1] === null) { + topics.pop(); + } + + return topics; + } + + encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { data: string, topics: Array } { + if (typeof(eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + + const topics: Array = [ ]; + + const dataTypes: Array = [ ]; + const dataValues: Array = [ ]; + + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + + if (values.length !== eventFragment.inputs.length) { + logger.throwArgumentError("event arguments/values mismatch", "values", values); + } + + eventFragment.inputs.forEach((param, index) => { + const value = values[index]; + if (param.indexed) { + if (param.type === "string") { + topics.push(id(value)) + } else if (param.type === "bytes") { + topics.push(keccak256(value)) + } else if (param.baseType === "tuple" || param.baseType === "array") { + // @TODO + throw new Error("not implemented"); + } else { + topics.push(this._abiCoder.encode([ param.type] , [ value ])); + } + } else { + dataTypes.push(param); + dataValues.push(value); + } + }); + + return { + data: this._abiCoder.encode(dataTypes , dataValues), + topics: topics + }; + } + + // Decode a filter for the event and the search criteria + decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result { + if (typeof(eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + + if (topics != null && !eventFragment.anonymous) { + let topicHash = this.getEventTopic(eventFragment); + if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { + logger.throwError("fragment/topic mismatch", Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); + } + topics = topics.slice(1); + } + + let indexed: Array = []; + let nonIndexed: Array = []; + let dynamic: Array = []; + + eventFragment.inputs.forEach((param, index) => { + if (param.indexed) { + if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") { + indexed.push(ParamType.fromObject({ type: "bytes32", name: param.name })); + dynamic.push(true); + } else { + indexed.push(param); + dynamic.push(false); + } + } else { + nonIndexed.push(param); + dynamic.push(false); + } + }); + + let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)): null; + let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true); + + let result: (Array & { [ key: string ]: any }) = [ ]; + let nonIndexedIndex = 0, indexedIndex = 0; + eventFragment.inputs.forEach((param, index) => { + if (param.indexed) { + if (resultIndexed == null) { + result[index] = new Indexed({ _isIndexed: true, hash: null }); + + } else if (dynamic[index]) { + result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] }); + + } else { + try { + result[index] = resultIndexed[indexedIndex++]; + } catch (error) { + result[index] = error; + } + } + } else { + try { + result[index] = resultNonIndexed[nonIndexedIndex++]; + } catch (error) { + result[index] = error; + } + } + + // Add the keyword argument if named and safe + if (param.name && result[param.name] == null) { + const value = result[index]; + + // Make error named values throw on access + if (value instanceof Error) { + Object.defineProperty(result, param.name, { + enumerable: true, + get: () => { throw wrapAccessError(`property ${ JSON.stringify(param.name) }`, value); } + }); + } else { + result[param.name] = value; + } + } + }); + + // Make all error indexed values throw on access + for (let i = 0; i < result.length; i++) { + const value = result[i]; + if (value instanceof Error) { + Object.defineProperty(result, i, { + enumerable: true, + get: () => { throw wrapAccessError(`index ${ i }`, value); } + }); + } + } + + return Object.freeze(result); + } + + // Given a transaction, find the matching function fragment (if any) and + // determine all its properties and call parameters + parseTransaction(tx: { data: string, value?: BigNumberish }): TransactionDescription { + let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase()) + + if (!fragment) { return null; } + + return new TransactionDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)), + functionFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + value: BigNumber.from(tx.value || "0"), + }); + } + + // @TODO + //parseCallResult(data: BytesLike): ?? + + // Given an event log, find the matching event fragment (if any) and + // determine all its properties and values + parseLog(log: { topics: Array, data: string}): LogDescription { + let fragment = this.getEvent(log.topics[0]); + + if (!fragment || fragment.anonymous) { return null; } + + // @TODO: If anonymous, and the only method, and the input count matches, should we parse? + // Probably not, because just because it is the only event in the ABI does + // not mean we have the full ABI; maybe just a fragment? + + + return new LogDescription({ + eventFragment: fragment, + name: fragment.name, + signature: fragment.format(), + topic: this.getEventTopic(fragment), + args: this.decodeEventLog(fragment, log.data, log.topics) + }); + } + + parseError(data: BytesLike): ErrorDescription { + const hexData = hexlify(data); + let fragment = this.getError(hexData.substring(0, 10).toLowerCase()) + + if (!fragment) { return null; } + + return new ErrorDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + hexData.substring(10)), + errorFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + }); + } + + + /* + static from(value: Array | string | Interface) { + if (Interface.isInterface(value)) { + return value; + } + if (typeof(value) === "string") { + return new Interface(JSON.parse(value)); + } + return new Interface(value); + } + */ + + static isInterface(value: any): value is Interface { + return !!(value && value._isInterface); + } +} + diff --git a/node_modules/@ethersproject/abstract-provider/LICENSE.md b/node_modules/@ethersproject/abstract-provider/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/abstract-provider/README.md b/node_modules/@ethersproject/abstract-provider/README.md new file mode 100644 index 0000000..16ce8cc --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/README.md @@ -0,0 +1,58 @@ +Abstract Provider +================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for defining the common interface for a Provider, which in +ethers differs quite substantially from Web3.js. + +A Provider is an abstraction of non-account-based operations on a blockchain and +is generally not directly involved in signing transaction or data. + +For signing, see the [Abstract Signer](https://www.npmjs.com/package/@ethersproject/abstract-signer) +or [Wallet](https://www.npmjs.com/package/@ethersproject/wallet) sub-modules. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Provider, + + ForkEvent, + BlockForkEvent, + TransactionForkEvent, + TransactionOrderForkEvent, + + // Types + BlockTag, + + Block, + BlockWithTransactions, + + TransactionRequest, + TransactionResponse, + TransactionReceipt, + + Log, + EventFilter, + + Filter, + FilterByBlockHash, + + EventType, + Listener + +} = require("@ethersproject/abstract-provider"); +``` + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts new file mode 100644 index 0000000..48d6014 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-provider/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..fbdadae --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,4BAA4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js new file mode 100644 index 0000000..f85a77c --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "abstract-provider/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js.map b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js.map new file mode 100644 index 0000000..f068180 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts b/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts new file mode 100644 index 0000000..facf608 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts @@ -0,0 +1,154 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike } from "@ethersproject/bytes"; +import { Network } from "@ethersproject/networks"; +import { Deferrable, Description } from "@ethersproject/properties"; +import { AccessListish, Transaction } from "@ethersproject/transactions"; +import { OnceBlockable } from "@ethersproject/web"; +export declare type TransactionRequest = { + to?: string; + from?: string; + nonce?: BigNumberish; + gasLimit?: BigNumberish; + gasPrice?: BigNumberish; + data?: BytesLike; + value?: BigNumberish; + chainId?: number; + type?: number; + accessList?: AccessListish; + maxPriorityFeePerGas?: BigNumberish; + maxFeePerGas?: BigNumberish; + customData?: Record; +}; +export interface TransactionResponse extends Transaction { + hash: string; + blockNumber?: number; + blockHash?: string; + timestamp?: number; + confirmations: number; + from: string; + raw?: string; + wait: (confirmations?: number) => Promise; +} +export declare type BlockTag = string | number; +export interface _Block { + hash: string; + parentHash: string; + number: number; + timestamp: number; + nonce: string; + difficulty: number; + _difficulty: BigNumber; + gasLimit: BigNumber; + gasUsed: BigNumber; + miner: string; + extraData: string; + baseFeePerGas?: null | BigNumber; +} +export interface Block extends _Block { + transactions: Array; +} +export interface BlockWithTransactions extends _Block { + transactions: Array; +} +export interface Log { + blockNumber: number; + blockHash: string; + transactionIndex: number; + removed: boolean; + address: string; + data: string; + topics: Array; + transactionHash: string; + logIndex: number; +} +export interface TransactionReceipt { + to: string; + from: string; + contractAddress: string; + transactionIndex: number; + root?: string; + gasUsed: BigNumber; + logsBloom: string; + blockHash: string; + transactionHash: string; + logs: Array; + blockNumber: number; + confirmations: number; + cumulativeGasUsed: BigNumber; + effectiveGasPrice: BigNumber; + byzantium: boolean; + type: number; + status?: number; +} +export interface FeeData { + maxFeePerGas: null | BigNumber; + maxPriorityFeePerGas: null | BigNumber; + gasPrice: null | BigNumber; +} +export interface EventFilter { + address?: string; + topics?: Array | null>; +} +export interface Filter extends EventFilter { + fromBlock?: BlockTag; + toBlock?: BlockTag; +} +export interface FilterByBlockHash extends EventFilter { + blockHash?: string; +} +export declare abstract class ForkEvent extends Description { + readonly expiry: number; + readonly _isForkEvent?: boolean; + static isForkEvent(value: any): value is ForkEvent; +} +export declare class BlockForkEvent extends ForkEvent { + readonly blockHash: string; + readonly _isBlockForkEvent?: boolean; + constructor(blockHash: string, expiry?: number); +} +export declare class TransactionForkEvent extends ForkEvent { + readonly hash: string; + readonly _isTransactionOrderForkEvent?: boolean; + constructor(hash: string, expiry?: number); +} +export declare class TransactionOrderForkEvent extends ForkEvent { + readonly beforeHash: string; + readonly afterHash: string; + constructor(beforeHash: string, afterHash: string, expiry?: number); +} +export declare type EventType = string | Array> | EventFilter | ForkEvent; +export declare type Listener = (...args: Array) => void; +export declare abstract class Provider implements OnceBlockable { + abstract getNetwork(): Promise; + abstract getBlockNumber(): Promise; + abstract getGasPrice(): Promise; + getFeeData(): Promise; + abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + abstract sendTransaction(signedTransaction: string | Promise): Promise; + abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + abstract estimateGas(transaction: Deferrable): Promise; + abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + abstract getTransaction(transactionHash: string): Promise; + abstract getTransactionReceipt(transactionHash: string): Promise; + abstract getLogs(filter: Filter): Promise>; + abstract resolveName(name: string | Promise): Promise; + abstract lookupAddress(address: string | Promise): Promise; + abstract on(eventName: EventType, listener: Listener): Provider; + abstract once(eventName: EventType, listener: Listener): Provider; + abstract emit(eventName: EventType, ...args: Array): boolean; + abstract listenerCount(eventName?: EventType): number; + abstract listeners(eventName?: EventType): Array; + abstract off(eventName: EventType, listener?: Listener): Provider; + abstract removeAllListeners(eventName?: EventType): Provider; + addListener(eventName: EventType, listener: Listener): Provider; + removeListener(eventName: EventType, listener: Listener): Provider; + abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + readonly _isProvider: boolean; + constructor(); + static isProvider(value: any): value is Provider; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts.map b/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts.map new file mode 100644 index 0000000..0625265 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAe,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAqC,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAUnD,oBAAY,kBAAkB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CA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,CAAC,EAAE,QAAQ,GAAG,QAAQ;IACjE,QAAQ,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ;IAG5D,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAK/D,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAKlE,QAAQ,CAAC,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAE3H,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;;IAO9B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,QAAQ;CA2CnD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/index.js b/node_modules/@ethersproject/abstract-provider/lib.esm/index.js new file mode 100644 index 0000000..0cb962d --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/index.js @@ -0,0 +1,110 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { BigNumber } from "@ethersproject/bignumber"; +import { isHexString } from "@ethersproject/bytes"; +import { Description, defineReadOnly, resolveProperties } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +; +; +//export type CallTransactionable = { +// call(transaction: TransactionRequest): Promise; +//}; +export class ForkEvent extends Description { + static isForkEvent(value) { + return !!(value && value._isForkEvent); + } +} +export class BlockForkEvent extends ForkEvent { + constructor(blockHash, expiry) { + if (!isHexString(blockHash, 32)) { + logger.throwArgumentError("invalid blockHash", "blockHash", blockHash); + } + super({ + _isForkEvent: true, + _isBlockForkEvent: true, + expiry: (expiry || 0), + blockHash: blockHash + }); + } +} +export class TransactionForkEvent extends ForkEvent { + constructor(hash, expiry) { + if (!isHexString(hash, 32)) { + logger.throwArgumentError("invalid transaction hash", "hash", hash); + } + super({ + _isForkEvent: true, + _isTransactionForkEvent: true, + expiry: (expiry || 0), + hash: hash + }); + } +} +export class TransactionOrderForkEvent extends ForkEvent { + constructor(beforeHash, afterHash, expiry) { + if (!isHexString(beforeHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash); + } + if (!isHexString(afterHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "afterHash", afterHash); + } + super({ + _isForkEvent: true, + _isTransactionOrderForkEvent: true, + expiry: (expiry || 0), + beforeHash: beforeHash, + afterHash: afterHash + }); + } +} +/////////////////////////////// +// Exported Abstracts +export class Provider { + constructor() { + logger.checkAbstract(new.target, Provider); + defineReadOnly(this, "_isProvider", true); + } + getFeeData() { + return __awaiter(this, void 0, void 0, function* () { + const { block, gasPrice } = yield resolveProperties({ + block: this.getBlock("latest"), + gasPrice: this.getGasPrice().catch((error) => { + // @TODO: Why is this now failing on Calaveras? + //console.log(error); + return null; + }) + }); + let maxFeePerGas = null, maxPriorityFeePerGas = null; + if (block && block.baseFeePerGas) { + // We may want to compute this more accurately in the future, + // using the formula "check if the base fee is correct". + // See: https://eips.ethereum.org/EIPS/eip-1559 + maxPriorityFeePerGas = BigNumber.from("2500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + return { maxFeePerGas, maxPriorityFeePerGas, gasPrice }; + }); + } + // Alias for "on" + addListener(eventName, listener) { + return this.on(eventName, listener); + } + // Alias for "off" + removeListener(eventName, listener) { + return this.off(eventName, listener); + } + static isProvider(value) { + return !!(value && value._isProvider); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib.esm/index.js.map b/node_modules/@ethersproject/abstract-provider/lib.esm/index.js.map new file mode 100644 index 0000000..76a3188 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAa,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAc,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIvG,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AA6ClC,CAAC;AAkED,CAAC;AAsBF,qCAAqC;AACrC,0EAA0E;AAC1E,IAAI;AAEJ,MAAM,OAAgB,SAAU,SAAQ,WAAW;IAK/C,MAAM,CAAC,WAAW,CAAC,KAAU;QACzB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;CACJ;AAED,MAAM,OAAO,cAAe,SAAQ,SAAS;IAKzC,YAAY,SAAiB,EAAE,MAAe;QAC1C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE;YAC7B,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SAC1E;QAED,KAAK,CAAC;YACF,YAAY,EAAE,IAAI;YAClB,iBAAiB,EAAE,IAAI;YACvB,MAAM,EAAE,CAAC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-provider/lib/_version.d.ts new file mode 100644 index 0000000..48d6014 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-provider/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts.map b/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts.map new file mode 100644 index 0000000..fbdadae --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,4BAA4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/_version.js b/node_modules/@ethersproject/abstract-provider/lib/_version.js new file mode 100644 index 0000000..c705412 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "abstract-provider/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/_version.js.map b/node_modules/@ethersproject/abstract-provider/lib/_version.js.map new file mode 100644 index 0000000..e2c87f9 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/index.d.ts b/node_modules/@ethersproject/abstract-provider/lib/index.d.ts new file mode 100644 index 0000000..facf608 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/index.d.ts @@ -0,0 +1,154 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike } from "@ethersproject/bytes"; +import { Network } from "@ethersproject/networks"; +import { Deferrable, Description } from "@ethersproject/properties"; +import { AccessListish, Transaction } from "@ethersproject/transactions"; +import { OnceBlockable } from "@ethersproject/web"; +export declare type TransactionRequest = { + to?: string; + from?: string; + nonce?: BigNumberish; + gasLimit?: BigNumberish; + gasPrice?: BigNumberish; + data?: BytesLike; + value?: BigNumberish; + chainId?: number; + type?: number; + accessList?: AccessListish; + maxPriorityFeePerGas?: BigNumberish; + maxFeePerGas?: BigNumberish; + customData?: Record; +}; +export interface TransactionResponse extends Transaction { + hash: string; + blockNumber?: number; + blockHash?: string; + timestamp?: number; + confirmations: number; + from: string; + raw?: string; + wait: (confirmations?: number) => Promise; +} +export declare type BlockTag = string | number; +export interface _Block { + hash: string; + parentHash: string; + number: number; + timestamp: number; + nonce: string; + difficulty: number; + _difficulty: BigNumber; + gasLimit: BigNumber; + gasUsed: BigNumber; + miner: string; + extraData: string; + baseFeePerGas?: null | BigNumber; +} +export interface Block extends _Block { + transactions: Array; +} +export interface BlockWithTransactions extends _Block { + transactions: Array; +} +export interface Log { + blockNumber: number; + blockHash: string; + transactionIndex: number; + removed: boolean; + address: string; + data: string; + topics: Array; + transactionHash: string; + logIndex: number; +} +export interface TransactionReceipt { + to: string; + from: string; + contractAddress: string; + transactionIndex: number; + root?: string; + gasUsed: BigNumber; + logsBloom: string; + blockHash: string; + transactionHash: string; + logs: Array; + blockNumber: number; + confirmations: number; + cumulativeGasUsed: BigNumber; + effectiveGasPrice: BigNumber; + byzantium: boolean; + type: number; + status?: number; +} +export interface FeeData { + maxFeePerGas: null | BigNumber; + maxPriorityFeePerGas: null | BigNumber; + gasPrice: null | BigNumber; +} +export interface EventFilter { + address?: string; + topics?: Array | null>; +} +export interface Filter extends EventFilter { + fromBlock?: BlockTag; + toBlock?: BlockTag; +} +export interface FilterByBlockHash extends EventFilter { + blockHash?: string; +} +export declare abstract class ForkEvent extends Description { + readonly expiry: number; + readonly _isForkEvent?: boolean; + static isForkEvent(value: any): value is ForkEvent; +} +export declare class BlockForkEvent extends ForkEvent { + readonly blockHash: string; + readonly _isBlockForkEvent?: boolean; + constructor(blockHash: string, expiry?: number); +} +export declare class TransactionForkEvent extends ForkEvent { + readonly hash: string; + readonly _isTransactionOrderForkEvent?: boolean; + constructor(hash: string, expiry?: number); +} +export declare class TransactionOrderForkEvent extends ForkEvent { + readonly beforeHash: string; + readonly afterHash: string; + constructor(beforeHash: string, afterHash: string, expiry?: number); +} +export declare type EventType = string | Array> | EventFilter | ForkEvent; +export declare type Listener = (...args: Array) => void; +export declare abstract class Provider implements OnceBlockable { + abstract getNetwork(): Promise; + abstract getBlockNumber(): Promise; + abstract getGasPrice(): Promise; + getFeeData(): Promise; + abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + abstract sendTransaction(signedTransaction: string | Promise): Promise; + abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + abstract estimateGas(transaction: Deferrable): Promise; + abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + abstract getTransaction(transactionHash: string): Promise; + abstract getTransactionReceipt(transactionHash: string): Promise; + abstract getLogs(filter: Filter): Promise>; + abstract resolveName(name: string | Promise): Promise; + abstract lookupAddress(address: string | Promise): Promise; + abstract on(eventName: EventType, listener: Listener): Provider; + abstract once(eventName: EventType, listener: Listener): Provider; + abstract emit(eventName: EventType, ...args: Array): boolean; + abstract listenerCount(eventName?: EventType): number; + abstract listeners(eventName?: EventType): Array; + abstract off(eventName: EventType, listener?: Listener): Provider; + abstract removeAllListeners(eventName?: EventType): Provider; + addListener(eventName: EventType, listener: Listener): Provider; + removeListener(eventName: EventType, listener: Listener): Provider; + abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + readonly _isProvider: boolean; + constructor(); + static isProvider(value: any): value is Provider; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/index.d.ts.map b/node_modules/@ethersproject/abstract-provider/lib/index.d.ts.map new file mode 100644 index 0000000..0625265 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAe,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAqC,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAUnD,oBAAY,kBAAkB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,UAAU,CAAC,EAA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AAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ;IACjE,QAAQ,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ;IAG5D,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAK/D,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAKlE,QAAQ,CAAC,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAE3H,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;;IAO9B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,QAAQ;CA2CnD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/index.js b/node_modules/@ethersproject/abstract-provider/lib/index.js new file mode 100644 index 0000000..7d9ef1f --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/index.js @@ -0,0 +1,185 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Provider = exports.TransactionOrderForkEvent = exports.TransactionForkEvent = exports.BlockForkEvent = exports.ForkEvent = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +; +; +//export type CallTransactionable = { +// call(transaction: TransactionRequest): Promise; +//}; +var ForkEvent = /** @class */ (function (_super) { + __extends(ForkEvent, _super); + function ForkEvent() { + return _super !== null && _super.apply(this, arguments) || this; + } + ForkEvent.isForkEvent = function (value) { + return !!(value && value._isForkEvent); + }; + return ForkEvent; +}(properties_1.Description)); +exports.ForkEvent = ForkEvent; +var BlockForkEvent = /** @class */ (function (_super) { + __extends(BlockForkEvent, _super); + function BlockForkEvent(blockHash, expiry) { + var _this = this; + if (!(0, bytes_1.isHexString)(blockHash, 32)) { + logger.throwArgumentError("invalid blockHash", "blockHash", blockHash); + } + _this = _super.call(this, { + _isForkEvent: true, + _isBlockForkEvent: true, + expiry: (expiry || 0), + blockHash: blockHash + }) || this; + return _this; + } + return BlockForkEvent; +}(ForkEvent)); +exports.BlockForkEvent = BlockForkEvent; +var TransactionForkEvent = /** @class */ (function (_super) { + __extends(TransactionForkEvent, _super); + function TransactionForkEvent(hash, expiry) { + var _this = this; + if (!(0, bytes_1.isHexString)(hash, 32)) { + logger.throwArgumentError("invalid transaction hash", "hash", hash); + } + _this = _super.call(this, { + _isForkEvent: true, + _isTransactionForkEvent: true, + expiry: (expiry || 0), + hash: hash + }) || this; + return _this; + } + return TransactionForkEvent; +}(ForkEvent)); +exports.TransactionForkEvent = TransactionForkEvent; +var TransactionOrderForkEvent = /** @class */ (function (_super) { + __extends(TransactionOrderForkEvent, _super); + function TransactionOrderForkEvent(beforeHash, afterHash, expiry) { + var _this = this; + if (!(0, bytes_1.isHexString)(beforeHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash); + } + if (!(0, bytes_1.isHexString)(afterHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "afterHash", afterHash); + } + _this = _super.call(this, { + _isForkEvent: true, + _isTransactionOrderForkEvent: true, + expiry: (expiry || 0), + beforeHash: beforeHash, + afterHash: afterHash + }) || this; + return _this; + } + return TransactionOrderForkEvent; +}(ForkEvent)); +exports.TransactionOrderForkEvent = TransactionOrderForkEvent; +/////////////////////////////// +// Exported Abstracts +var Provider = /** @class */ (function () { + function Provider() { + var _newTarget = this.constructor; + logger.checkAbstract(_newTarget, Provider); + (0, properties_1.defineReadOnly)(this, "_isProvider", true); + } + Provider.prototype.getFeeData = function () { + return __awaiter(this, void 0, void 0, function () { + var _a, block, gasPrice, maxFeePerGas, maxPriorityFeePerGas; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, (0, properties_1.resolveProperties)({ + block: this.getBlock("latest"), + gasPrice: this.getGasPrice().catch(function (error) { + // @TODO: Why is this now failing on Calaveras? + //console.log(error); + return null; + }) + })]; + case 1: + _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice; + maxFeePerGas = null, maxPriorityFeePerGas = null; + if (block && block.baseFeePerGas) { + // We may want to compute this more accurately in the future, + // using the formula "check if the base fee is correct". + // See: https://eips.ethereum.org/EIPS/eip-1559 + maxPriorityFeePerGas = bignumber_1.BigNumber.from("2500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + return [2 /*return*/, { maxFeePerGas: maxFeePerGas, maxPriorityFeePerGas: maxPriorityFeePerGas, gasPrice: gasPrice }]; + } + }); + }); + }; + // Alias for "on" + Provider.prototype.addListener = function (eventName, listener) { + return this.on(eventName, listener); + }; + // Alias for "off" + Provider.prototype.removeListener = function (eventName, listener) { + return this.off(eventName, listener); + }; + Provider.isProvider = function (value) { + return !!(value && value._isProvider); + }; + return Provider; +}()); +exports.Provider = Provider; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/lib/index.js.map b/node_modules/@ethersproject/abstract-provider/lib/index.js.map new file mode 100644 index 0000000..0aece9e --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/lib/index.js.map @@ -0,0 +1 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I,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,UAAC,KAAK;gCACrC,+CAA+C;gCAC/C,qBAAqB;gCACrB,OAAO,IAAI,CAAC;4BAChB,CAAC,CAAC;yBACL,CAAC,EAAA;;wBAPI,KAAsB,SAO1B,EAPM,KAAK,WAAA,EAAE,QAAQ,cAAA;wBASnB,YAAY,GAAG,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAC;wBAErD,IAAI,KAAK,IAAI,KAAK,CAAC,aAAa,EAAE;4BAC9B,6DAA6D;4BAC7D,wDAAwD;4BACxD,+CAA+C;4BAC/C,oBAAoB,GAAG,qBAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;4BACpD,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;yBACvE;wBAED,sBAAO,EAAE,YAAY,cAAA,EAAE,oBAAoB,sBAAA,EAAE,QAAQ,UAAA,EAAE,EAAC;;;;KAC3D;IAmCD,iBAAiB;IACjB,8BAAW,GAAX,UAAY,SAAoB,EAAE,QAAkB;QAChD,OAAO,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;IAED,kBAAkB;IAClB,iCAAc,GAAd,UAAe,SAAoB,EAAE,QAAkB;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IAYM,mBAAU,GAAjB,UAAkB,KAAU;QACxB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAyCL,eAAC;AAAD,CAAC,AA/HD,IA+HC;AA/HqB,4BAAQ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-provider/package.json b/node_modules/@ethersproject/abstract-provider/package.json new file mode 100644 index 0000000..c2c6c33 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/package.json @@ -0,0 +1,48 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/networks": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/web": "^5.5.0" + }, + "description": "An Abstract Class for describing an Ethereum Provider for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "b1458989761c11bf626591706aa4ce98dae2d6a9", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/abstract-provider", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/abstract-provider", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x2bfa68ddd70e2bae7207dbdca73308cf780b5a896a2b8fcc518a912192898860", + "types": "./lib/index.d.ts", + "version": "5.5.1" +} diff --git a/node_modules/@ethersproject/abstract-provider/src.ts/_version.ts b/node_modules/@ethersproject/abstract-provider/src.ts/_version.ts new file mode 100644 index 0000000..8100a93 --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "abstract-provider/5.5.1"; diff --git a/node_modules/@ethersproject/abstract-provider/src.ts/index.ts b/node_modules/@ethersproject/abstract-provider/src.ts/index.ts new file mode 100644 index 0000000..70bbf4e --- /dev/null +++ b/node_modules/@ethersproject/abstract-provider/src.ts/index.ts @@ -0,0 +1,352 @@ +"use strict"; + +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike, isHexString } from "@ethersproject/bytes"; +import { Network } from "@ethersproject/networks"; +import { Deferrable, Description, defineReadOnly, resolveProperties } from "@ethersproject/properties"; +import { AccessListish, Transaction } from "@ethersproject/transactions"; +import { OnceBlockable } from "@ethersproject/web"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +/////////////////////////////// +// Exported Types + + +export type TransactionRequest = { + to?: string, + from?: string, + nonce?: BigNumberish, + + gasLimit?: BigNumberish, + gasPrice?: BigNumberish, + + data?: BytesLike, + value?: BigNumberish, + chainId?: number + + type?: number; + accessList?: AccessListish; + + maxPriorityFeePerGas?: BigNumberish; + maxFeePerGas?: BigNumberish; + + customData?: Record; +} + +export interface TransactionResponse extends Transaction { + hash: string; + + // Only if a transaction has been mined + blockNumber?: number, + blockHash?: string, + timestamp?: number, + + confirmations: number, + + // Not optional (as it is in Transaction) + from: string; + + // The raw transaction + raw?: string, + + // This function waits until the transaction has been mined + wait: (confirmations?: number) => Promise +}; + +export type BlockTag = string | number; + +export interface _Block { + hash: string; + parentHash: string; + number: number; + + timestamp: number; + nonce: string; + difficulty: number; + _difficulty: BigNumber; + + gasLimit: BigNumber; + gasUsed: BigNumber; + + miner: string; + extraData: string; + + baseFeePerGas?: null | BigNumber; +} + +export interface Block extends _Block { + transactions: Array; +} + +export interface BlockWithTransactions extends _Block { + transactions: Array; +} + + +export interface Log { + blockNumber: number; + blockHash: string; + transactionIndex: number; + + removed: boolean; + + address: string; + data: string; + + topics: Array; + + transactionHash: string; + logIndex: number; +} + +export interface TransactionReceipt { + to: string; + from: string; + contractAddress: string, + transactionIndex: number, + root?: string, + gasUsed: BigNumber, + logsBloom: string, + blockHash: string, + transactionHash: string, + logs: Array, + blockNumber: number, + confirmations: number, + cumulativeGasUsed: BigNumber, + effectiveGasPrice: BigNumber, + byzantium: boolean, + type: number; + status?: number +}; + +export interface FeeData { + maxFeePerGas: null | BigNumber; + maxPriorityFeePerGas: null | BigNumber; + gasPrice: null | BigNumber; +} + +export interface EventFilter { + address?: string; + topics?: Array | null>; +} + +export interface Filter extends EventFilter { + fromBlock?: BlockTag, + toBlock?: BlockTag, +} + +export interface FilterByBlockHash extends EventFilter { + blockHash?: string; +} + +//export type CallTransactionable = { +// call(transaction: TransactionRequest): Promise; +//}; + +export abstract class ForkEvent extends Description { + readonly expiry: number; + + readonly _isForkEvent?: boolean; + + static isForkEvent(value: any): value is ForkEvent { + return !!(value && value._isForkEvent); + } +} + +export class BlockForkEvent extends ForkEvent { + readonly blockHash: string; + + readonly _isBlockForkEvent?: boolean; + + constructor(blockHash: string, expiry?: number) { + if (!isHexString(blockHash, 32)) { + logger.throwArgumentError("invalid blockHash", "blockHash", blockHash); + } + + super({ + _isForkEvent: true, + _isBlockForkEvent: true, + expiry: (expiry || 0), + blockHash: blockHash + }); + } +} + +export class TransactionForkEvent extends ForkEvent { + readonly hash: string; + + readonly _isTransactionOrderForkEvent?: boolean; + + constructor(hash: string, expiry?: number) { + if (!isHexString(hash, 32)) { + logger.throwArgumentError("invalid transaction hash", "hash", hash); + } + + super({ + _isForkEvent: true, + _isTransactionForkEvent: true, + expiry: (expiry || 0), + hash: hash + }); + } +} + +export class TransactionOrderForkEvent extends ForkEvent { + readonly beforeHash: string; + readonly afterHash: string; + + constructor(beforeHash: string, afterHash: string, expiry?: number) { + if (!isHexString(beforeHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash); + } + if (!isHexString(afterHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "afterHash", afterHash); + } + + super({ + _isForkEvent: true, + _isTransactionOrderForkEvent: true, + expiry: (expiry || 0), + beforeHash: beforeHash, + afterHash: afterHash + }); + } +} + +export type EventType = string | Array> | EventFilter | ForkEvent; + +export type Listener = (...args: Array) => void; + +/////////////////////////////// +// Exported Abstracts +export abstract class Provider implements OnceBlockable { + + // Network + abstract getNetwork(): Promise; + + // Latest State + abstract getBlockNumber(): Promise; + abstract getGasPrice(): Promise; + async getFeeData(): Promise { + const { block, gasPrice } = await resolveProperties({ + block: this.getBlock("latest"), + gasPrice: this.getGasPrice().catch((error) => { + // @TODO: Why is this now failing on Calaveras? + //console.log(error); + return null; + }) + }); + + let maxFeePerGas = null, maxPriorityFeePerGas = null; + + if (block && block.baseFeePerGas) { + // We may want to compute this more accurately in the future, + // using the formula "check if the base fee is correct". + // See: https://eips.ethereum.org/EIPS/eip-1559 + maxPriorityFeePerGas = BigNumber.from("2500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + + return { maxFeePerGas, maxPriorityFeePerGas, gasPrice }; + } + + // Account + abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise ; + abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + + // Execution + abstract sendTransaction(signedTransaction: string | Promise): Promise; + abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + abstract estimateGas(transaction: Deferrable): Promise; + + // Queries + abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + abstract getTransaction(transactionHash: string): Promise; + abstract getTransactionReceipt(transactionHash: string): Promise; + + // Bloom-filter Queries + abstract getLogs(filter: Filter): Promise>; + + // ENS + abstract resolveName(name: string | Promise): Promise; + abstract lookupAddress(address: string | Promise): Promise; + + // Event Emitter (ish) + abstract on(eventName: EventType, listener: Listener): Provider; + abstract once(eventName: EventType, listener: Listener): Provider; + abstract emit(eventName: EventType, ...args: Array): boolean + abstract listenerCount(eventName?: EventType): number; + abstract listeners(eventName?: EventType): Array; + abstract off(eventName: EventType, listener?: Listener): Provider; + abstract removeAllListeners(eventName?: EventType): Provider; + + // Alias for "on" + addListener(eventName: EventType, listener: Listener): Provider { + return this.on(eventName, listener); + } + + // Alias for "off" + removeListener(eventName: EventType, listener: Listener): Provider { + return this.off(eventName, listener); + } + + // @TODO: This *could* be implemented here, but would pull in events... + abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + + readonly _isProvider: boolean; + + constructor() { + logger.checkAbstract(new.target, Provider); + defineReadOnly(this, "_isProvider", true); + } + + static isProvider(value: any): value is Provider { + return !!(value && value._isProvider); + } + +/* + static getResolver(network: Network, callable: CallTransactionable, namehash: string): string { + // No ENS... + if (!network.ensAddress) { + errors.throwError( + "network does support ENS", + errors.UNSUPPORTED_OPERATION, + { operation: "ENS", network: network.name } + ); + } + + // Not a namehash + if (!isHexString(namehash, 32)) { + errors.throwArgumentError("invalid name hash", "namehash", namehash); + } + + // keccak256("resolver(bytes32)") + let data = "0x0178b8bf" + namehash.substring(2); + let transaction = { to: network.ensAddress, data: data }; + + return provider.call(transaction).then((data) => { + return provider.formatter.callAddress(data); + }); + } + + static resolveNamehash(network: Network, callable: CallTransactionable, namehash: string): string { + return this.getResolver(network, callable, namehash).then((resolverAddress) => { + if (!resolverAddress) { return null; } + + // keccak256("addr(bytes32)") + let data = "0x3b3b57de" + namehash(name).substring(2); + let transaction = { to: resolverAddress, data: data }; + return callable.call(transaction).then((data) => { + return this.formatter.callAddress(data); + }); + + }) + } +*/ +} diff --git a/node_modules/@ethersproject/abstract-signer/LICENSE.md b/node_modules/@ethersproject/abstract-signer/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/abstract-signer/README.md b/node_modules/@ethersproject/abstract-signer/README.md new file mode 100644 index 0000000..0e8be1a --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/README.md @@ -0,0 +1,34 @@ +Abstract Signer +=============== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is an abstraction of an Ethereum account, which may be backed by a [private key](https://www.npmjs.com/package/@ethersproject/wallet), +signing service (such as Geth or Parity with key managment enabled, or a +dedicated signing service such as Clef), +[hardware wallets](https://www.npmjs.com/package/@ethersproject/hardware-wallets), etc. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/signer/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Signer, + VoidSigner, + + // Types + ExternallyOwnedAccount + +} = require("@ethersproject/abstract-signer"); +``` + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts new file mode 100644 index 0000000..0c205eb --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-signer/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..85640ad --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,0BAA0B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js new file mode 100644 index 0000000..14d741e --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "abstract-signer/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js.map b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js.map new file mode 100644 index 0000000..80e36ec --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts b/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts new file mode 100644 index 0000000..b95db43 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts @@ -0,0 +1,55 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { Bytes, BytesLike } from "@ethersproject/bytes"; +import { Deferrable } from "@ethersproject/properties"; +export interface TypedDataDomain { + name?: string; + version?: string; + chainId?: BigNumberish; + verifyingContract?: string; + salt?: BytesLike; +} +export interface TypedDataField { + name: string; + type: string; +} +export interface ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; +} +export interface TypedDataSigner { + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; +} +export declare abstract class Signer { + readonly provider?: Provider; + abstract getAddress(): Promise; + abstract signMessage(message: Bytes | string): Promise; + abstract signTransaction(transaction: Deferrable): Promise; + abstract connect(provider: Provider): Signer; + readonly _isSigner: boolean; + constructor(); + getBalance(blockTag?: BlockTag): Promise; + getTransactionCount(blockTag?: BlockTag): Promise; + estimateGas(transaction: Deferrable): Promise; + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + sendTransaction(transaction: Deferrable): Promise; + getChainId(): Promise; + getGasPrice(): Promise; + getFeeData(): Promise; + resolveName(name: string): Promise; + checkTransaction(transaction: Deferrable): Deferrable; + populateTransaction(transaction: Deferrable): Promise; + _checkProvider(operation?: string): void; + static isSigner(value: any): value is Signer; +} +export declare class VoidSigner extends Signer implements TypedDataSigner { + readonly address: string; + constructor(address: string, provider?: Provider); + getAddress(): Promise; + _fail(message: string, operation: string): Promise; + signMessage(message: Bytes | string): Promise; + signTransaction(transaction: Deferrable): Promise; + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; + connect(provider: Provider): VoidSigner; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts.map b/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts.map new file mode 100644 index 0000000..4f6570c --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,sB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AAC,MAAM,CAAC;IAIrD,eAAe,CAAC,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAI7E,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlI,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU;CAG1C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/index.js b/node_modules/@ethersproject/abstract-signer/lib.esm/index.js new file mode 100644 index 0000000..6775ee3 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/index.js @@ -0,0 +1,304 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { defineReadOnly, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +const allowedTransactionKeys = [ + "accessList", "chainId", "customData", "data", "from", "gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "to", "type", "value" +]; +const forwardErrors = [ + Logger.errors.INSUFFICIENT_FUNDS, + Logger.errors.NONCE_EXPIRED, + Logger.errors.REPLACEMENT_UNDERPRICED, +]; +; +; +export class Signer { + /////////////////// + // Sub-classes MUST call super + constructor() { + logger.checkAbstract(new.target, Signer); + defineReadOnly(this, "_isSigner", true); + } + /////////////////// + // Sub-classes MAY override these + getBalance(blockTag) { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("getBalance"); + return yield this.provider.getBalance(this.getAddress(), blockTag); + }); + } + getTransactionCount(blockTag) { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("getTransactionCount"); + return yield this.provider.getTransactionCount(this.getAddress(), blockTag); + }); + } + // Populates "from" if unspecified, and estimates the gas for the transaction + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("estimateGas"); + const tx = yield resolveProperties(this.checkTransaction(transaction)); + return yield this.provider.estimateGas(tx); + }); + } + // Populates "from" if unspecified, and calls with the transaction + call(transaction, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("call"); + const tx = yield resolveProperties(this.checkTransaction(transaction)); + return yield this.provider.call(tx, blockTag); + }); + } + // Populates all fields in a transaction, signs it and sends it to the network + sendTransaction(transaction) { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("sendTransaction"); + const tx = yield this.populateTransaction(transaction); + const signedTx = yield this.signTransaction(tx); + return yield this.provider.sendTransaction(signedTx); + }); + } + getChainId() { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("getChainId"); + const network = yield this.provider.getNetwork(); + return network.chainId; + }); + } + getGasPrice() { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("getGasPrice"); + return yield this.provider.getGasPrice(); + }); + } + getFeeData() { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("getFeeData"); + return yield this.provider.getFeeData(); + }); + } + resolveName(name) { + return __awaiter(this, void 0, void 0, function* () { + this._checkProvider("resolveName"); + return yield this.provider.resolveName(name); + }); + } + // Checks a transaction does not contain invalid keys and if + // no "from" is provided, populates it. + // - does NOT require a provider + // - adds "from" is not present + // - returns a COPY (safe to mutate the result) + // By default called from: (overriding these prevents it) + // - call + // - estimateGas + // - populateTransaction (and therefor sendTransaction) + checkTransaction(transaction) { + for (const key in transaction) { + if (allowedTransactionKeys.indexOf(key) === -1) { + logger.throwArgumentError("invalid transaction key: " + key, "transaction", transaction); + } + } + const tx = shallowCopy(transaction); + if (tx.from == null) { + tx.from = this.getAddress(); + } + else { + // Make sure any provided address matches this signer + tx.from = Promise.all([ + Promise.resolve(tx.from), + this.getAddress() + ]).then((result) => { + if (result[0].toLowerCase() !== result[1].toLowerCase()) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + return result[0]; + }); + } + return tx; + } + // Populates ALL keys for a transaction and checks that "from" matches + // this Signer. Should be used by sendTransaction but NOT by signTransaction. + // By default called from: (overriding these prevents it) + // - sendTransaction + // + // Notes: + // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas + populateTransaction(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const tx = yield resolveProperties(this.checkTransaction(transaction)); + if (tx.to != null) { + tx.to = Promise.resolve(tx.to).then((to) => __awaiter(this, void 0, void 0, function* () { + if (to == null) { + return null; + } + const address = yield this.resolveName(to); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return address; + })); + // Prevent this error from causing an UnhandledPromiseException + tx.to.catch((error) => { }); + } + // Do not allow mixing pre-eip-1559 and eip-1559 properties + const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null); + if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) { + logger.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); + } + else if ((tx.type === 0 || tx.type === 1) && hasEip1559) { + logger.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); + } + if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) { + // Fully-formed EIP-1559 transaction (skip getFeeData) + tx.type = 2; + } + else if (tx.type === 0 || tx.type === 1) { + // Explicit Legacy or EIP-2930 transaction + // Populate missing gasPrice + if (tx.gasPrice == null) { + tx.gasPrice = this.getGasPrice(); + } + } + else { + // We need to get fee data to determine things + const feeData = yield this.getFeeData(); + if (tx.type == null) { + // We need to auto-detect the intended type of this transaction... + if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { + // The network supports EIP-1559! + // Upgrade transaction from null to eip-1559 + tx.type = 2; + if (tx.gasPrice != null) { + // Using legacy gasPrice property on an eip-1559 network, + // so use gasPrice as both fee properties + const gasPrice = tx.gasPrice; + delete tx.gasPrice; + tx.maxFeePerGas = gasPrice; + tx.maxPriorityFeePerGas = gasPrice; + } + else { + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } + else if (feeData.gasPrice != null) { + // Network doesn't support EIP-1559... + // ...but they are trying to use EIP-1559 properties + if (hasEip1559) { + logger.throwError("network does not support EIP-1559", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "populateTransaction" + }); + } + // Populate missing fee data + if (tx.gasPrice == null) { + tx.gasPrice = feeData.gasPrice; + } + // Explicitly set untyped transaction to legacy + tx.type = 0; + } + else { + // getFeeData has failed us. + logger.throwError("failed to get consistent fee data", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signer.getFeeData" + }); + } + } + else if (tx.type === 2) { + // Explicitly using EIP-1559 + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } + if (tx.nonce == null) { + tx.nonce = this.getTransactionCount("pending"); + } + if (tx.gasLimit == null) { + tx.gasLimit = this.estimateGas(tx).catch((error) => { + if (forwardErrors.indexOf(error.code) >= 0) { + throw error; + } + return logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + tx: tx + }); + }); + } + if (tx.chainId == null) { + tx.chainId = this.getChainId(); + } + else { + tx.chainId = Promise.all([ + Promise.resolve(tx.chainId), + this.getChainId() + ]).then((results) => { + if (results[1] !== 0 && results[0] !== results[1]) { + logger.throwArgumentError("chainId address mismatch", "transaction", transaction); + } + return results[0]; + }); + } + return yield resolveProperties(tx); + }); + } + /////////////////// + // Sub-classes SHOULD leave these alone + _checkProvider(operation) { + if (!this.provider) { + logger.throwError("missing provider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: (operation || "_checkProvider") + }); + } + } + static isSigner(value) { + return !!(value && value._isSigner); + } +} +export class VoidSigner extends Signer { + constructor(address, provider) { + logger.checkNew(new.target, VoidSigner); + super(); + defineReadOnly(this, "address", address); + defineReadOnly(this, "provider", provider || null); + } + getAddress() { + return Promise.resolve(this.address); + } + _fail(message, operation) { + return Promise.resolve().then(() => { + logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation }); + }); + } + signMessage(message) { + return this._fail("VoidSigner cannot sign messages", "signMessage"); + } + signTransaction(transaction) { + return this._fail("VoidSigner cannot sign transactions", "signTransaction"); + } + _signTypedData(domain, types, value) { + return this._fail("VoidSigner cannot sign typed data", "signTypedData"); + } + connect(provider) { + return new VoidSigner(this.address, provider); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib.esm/index.js.map b/node_modules/@ethersproject/abstract-signer/lib.esm/index.js.map new file mode 100644 index 0000000..aeb2949 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAKb,OAAO,EAAc,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY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,cAAc,CAAC,MAAuB,EAAE,KAA4C,EAAE,KAA0B;QAC5G,OAAO,IAAI,CAAC,KAAK,CAAC,mCAAmC,EAAE,eAAe,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,CAAC,QAAkB;QACtB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts b/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts new file mode 100644 index 0000000..0c205eb --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-signer/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts.map b/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts.map new file mode 100644 index 0000000..85640ad --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,0BAA0B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/_version.js b/node_modules/@ethersproject/abstract-signer/lib/_version.js new file mode 100644 index 0000000..575c208 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "abstract-signer/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/_version.js.map b/node_modules/@ethersproject/abstract-signer/lib/_version.js.map new file mode 100644 index 0000000..2ad9706 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/index.d.ts b/node_modules/@ethersproject/abstract-signer/lib/index.d.ts new file mode 100644 index 0000000..b95db43 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/index.d.ts @@ -0,0 +1,55 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { Bytes, BytesLike } from "@ethersproject/bytes"; +import { Deferrable } from "@ethersproject/properties"; +export interface TypedDataDomain { + name?: string; + version?: string; + chainId?: BigNumberish; + verifyingContract?: string; + salt?: BytesLike; +} +export interface TypedDataField { + name: string; + type: string; +} +export interface ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; +} +export interface TypedDataSigner { + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; +} +export declare abstract class Signer { + readonly provider?: Provider; + abstract getAddress(): Promise; + abstract signMessage(message: Bytes | string): Promise; + abstract signTransaction(transaction: Deferrable): Promise; + abstract connect(provider: Provider): Signer; + readonly _isSigner: boolean; + constructor(); + getBalance(blockTag?: BlockTag): Promise; + getTransactionCount(blockTag?: BlockTag): Promise; + estimateGas(transaction: Deferrable): Promise; + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + sendTransaction(transaction: Deferrable): Promise; + getChainId(): Promise; + getGasPrice(): Promise; + getFeeData(): Promise; + resolveName(name: string): Promise; + checkTransaction(transaction: Deferrable): Deferrable; + populateTransaction(transaction: Deferrable): Promise; + _checkProvider(operation?: string): void; + static isSigner(value: any): value is Signer; +} +export declare class VoidSigner extends Signer implements TypedDataSigner { + readonly address: string; + constructor(address: string, provider?: Provider); + getAddress(): Promise; + _fail(message: string, operation: string): Promise; + signMessage(message: Bytes | string): Promise; + signTransaction(transaction: Deferrable): Promise; + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; + connect(provider: Provider): VoidSigner; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/index.d.ts.map b/node_modules/@ethersproject/abstract-signer/lib/index.d.ts.map new file mode 100644 index 0000000..4f6570c --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAkD,MAAM,2BAA2B,CAAC;AAmBvG,MAAM,WAAW,eAAe;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAID,MAAM,WAAW,sBAAsB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAWD,MAAM,WAAW,eAAe;IAC5B,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GA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C,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAoInG,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAMxC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM;CAG/C;AAED,qBAAa,UAAW,SAAQ,MAAO,YAAW,eAAe;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAOhD,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAMvD,WAAW,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrD,eAAe,CAAC,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAI7E,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlI,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU;CAG1C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/index.js b/node_modules/@ethersproject/abstract-signer/lib/index.js new file mode 100644 index 0000000..b82d8e9 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/index.js @@ -0,0 +1,440 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VoidSigner = exports.Signer = void 0; +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var allowedTransactionKeys = [ + "accessList", "chainId", "customData", "data", "from", "gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "to", "type", "value" +]; +var forwardErrors = [ + logger_1.Logger.errors.INSUFFICIENT_FUNDS, + logger_1.Logger.errors.NONCE_EXPIRED, + logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, +]; +; +; +var Signer = /** @class */ (function () { + /////////////////// + // Sub-classes MUST call super + function Signer() { + var _newTarget = this.constructor; + logger.checkAbstract(_newTarget, Signer); + (0, properties_1.defineReadOnly)(this, "_isSigner", true); + } + /////////////////// + // Sub-classes MAY override these + Signer.prototype.getBalance = function (blockTag) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getBalance"); + return [4 /*yield*/, this.provider.getBalance(this.getAddress(), blockTag)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.getTransactionCount = function (blockTag) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getTransactionCount"); + return [4 /*yield*/, this.provider.getTransactionCount(this.getAddress(), blockTag)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Populates "from" if unspecified, and estimates the gas for the transaction + Signer.prototype.estimateGas = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("estimateGas"); + return [4 /*yield*/, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, this.provider.estimateGas(tx)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Populates "from" if unspecified, and calls with the transaction + Signer.prototype.call = function (transaction, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("call"); + return [4 /*yield*/, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, this.provider.call(tx, blockTag)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Populates all fields in a transaction, signs it and sends it to the network + Signer.prototype.sendTransaction = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var tx, signedTx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("sendTransaction"); + return [4 /*yield*/, this.populateTransaction(transaction)]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, this.signTransaction(tx)]; + case 2: + signedTx = _a.sent(); + return [4 /*yield*/, this.provider.sendTransaction(signedTx)]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.getChainId = function () { + return __awaiter(this, void 0, void 0, function () { + var network; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getChainId"); + return [4 /*yield*/, this.provider.getNetwork()]; + case 1: + network = _a.sent(); + return [2 /*return*/, network.chainId]; + } + }); + }); + }; + Signer.prototype.getGasPrice = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getGasPrice"); + return [4 /*yield*/, this.provider.getGasPrice()]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.getFeeData = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getFeeData"); + return [4 /*yield*/, this.provider.getFeeData()]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.resolveName = function (name) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("resolveName"); + return [4 /*yield*/, this.provider.resolveName(name)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Checks a transaction does not contain invalid keys and if + // no "from" is provided, populates it. + // - does NOT require a provider + // - adds "from" is not present + // - returns a COPY (safe to mutate the result) + // By default called from: (overriding these prevents it) + // - call + // - estimateGas + // - populateTransaction (and therefor sendTransaction) + Signer.prototype.checkTransaction = function (transaction) { + for (var key in transaction) { + if (allowedTransactionKeys.indexOf(key) === -1) { + logger.throwArgumentError("invalid transaction key: " + key, "transaction", transaction); + } + } + var tx = (0, properties_1.shallowCopy)(transaction); + if (tx.from == null) { + tx.from = this.getAddress(); + } + else { + // Make sure any provided address matches this signer + tx.from = Promise.all([ + Promise.resolve(tx.from), + this.getAddress() + ]).then(function (result) { + if (result[0].toLowerCase() !== result[1].toLowerCase()) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + return result[0]; + }); + } + return tx; + }; + // Populates ALL keys for a transaction and checks that "from" matches + // this Signer. Should be used by sendTransaction but NOT by signTransaction. + // By default called from: (overriding these prevents it) + // - sendTransaction + // + // Notes: + // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas + Signer.prototype.populateTransaction = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var tx, hasEip1559, feeData, gasPrice; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx = _a.sent(); + if (tx.to != null) { + tx.to = Promise.resolve(tx.to).then(function (to) { return __awaiter(_this, void 0, void 0, function () { + var address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (to == null) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this.resolveName(to)]; + case 1: + address = _a.sent(); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return [2 /*return*/, address]; + } + }); + }); }); + // Prevent this error from causing an UnhandledPromiseException + tx.to.catch(function (error) { }); + } + hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null); + if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) { + logger.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); + } + else if ((tx.type === 0 || tx.type === 1) && hasEip1559) { + logger.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); + } + if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null))) return [3 /*break*/, 2]; + // Fully-formed EIP-1559 transaction (skip getFeeData) + tx.type = 2; + return [3 /*break*/, 5]; + case 2: + if (!(tx.type === 0 || tx.type === 1)) return [3 /*break*/, 3]; + // Explicit Legacy or EIP-2930 transaction + // Populate missing gasPrice + if (tx.gasPrice == null) { + tx.gasPrice = this.getGasPrice(); + } + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, this.getFeeData()]; + case 4: + feeData = _a.sent(); + if (tx.type == null) { + // We need to auto-detect the intended type of this transaction... + if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { + // The network supports EIP-1559! + // Upgrade transaction from null to eip-1559 + tx.type = 2; + if (tx.gasPrice != null) { + gasPrice = tx.gasPrice; + delete tx.gasPrice; + tx.maxFeePerGas = gasPrice; + tx.maxPriorityFeePerGas = gasPrice; + } + else { + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } + else if (feeData.gasPrice != null) { + // Network doesn't support EIP-1559... + // ...but they are trying to use EIP-1559 properties + if (hasEip1559) { + logger.throwError("network does not support EIP-1559", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "populateTransaction" + }); + } + // Populate missing fee data + if (tx.gasPrice == null) { + tx.gasPrice = feeData.gasPrice; + } + // Explicitly set untyped transaction to legacy + tx.type = 0; + } + else { + // getFeeData has failed us. + logger.throwError("failed to get consistent fee data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signer.getFeeData" + }); + } + } + else if (tx.type === 2) { + // Explicitly using EIP-1559 + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + _a.label = 5; + case 5: + if (tx.nonce == null) { + tx.nonce = this.getTransactionCount("pending"); + } + if (tx.gasLimit == null) { + tx.gasLimit = this.estimateGas(tx).catch(function (error) { + if (forwardErrors.indexOf(error.code) >= 0) { + throw error; + } + return logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + tx: tx + }); + }); + } + if (tx.chainId == null) { + tx.chainId = this.getChainId(); + } + else { + tx.chainId = Promise.all([ + Promise.resolve(tx.chainId), + this.getChainId() + ]).then(function (results) { + if (results[1] !== 0 && results[0] !== results[1]) { + logger.throwArgumentError("chainId address mismatch", "transaction", transaction); + } + return results[0]; + }); + } + return [4 /*yield*/, (0, properties_1.resolveProperties)(tx)]; + case 6: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + /////////////////// + // Sub-classes SHOULD leave these alone + Signer.prototype._checkProvider = function (operation) { + if (!this.provider) { + logger.throwError("missing provider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: (operation || "_checkProvider") + }); + } + }; + Signer.isSigner = function (value) { + return !!(value && value._isSigner); + }; + return Signer; +}()); +exports.Signer = Signer; +var VoidSigner = /** @class */ (function (_super) { + __extends(VoidSigner, _super); + function VoidSigner(address, provider) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, VoidSigner); + _this = _super.call(this) || this; + (0, properties_1.defineReadOnly)(_this, "address", address); + (0, properties_1.defineReadOnly)(_this, "provider", provider || null); + return _this; + } + VoidSigner.prototype.getAddress = function () { + return Promise.resolve(this.address); + }; + VoidSigner.prototype._fail = function (message, operation) { + return Promise.resolve().then(function () { + logger.throwError(message, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: operation }); + }); + }; + VoidSigner.prototype.signMessage = function (message) { + return this._fail("VoidSigner cannot sign messages", "signMessage"); + }; + VoidSigner.prototype.signTransaction = function (transaction) { + return this._fail("VoidSigner cannot sign transactions", "signTransaction"); + }; + VoidSigner.prototype._signTypedData = function (domain, types, value) { + return this._fail("VoidSigner cannot sign typed data", "signTypedData"); + }; + VoidSigner.prototype.connect = function (provider) { + return new VoidSigner(this.address, provider); + }; + return VoidSigner; +}(Signer)); +exports.VoidSigner = VoidSigner; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/lib/index.js.map b/node_modules/@ethersproject/abstract-signer/lib/index.js.map new file mode 100644 index 0000000..90faa55 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKb,wDAAuG;AAEvG,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,IAAM,sBAAsB,GAAkB;IAC1C,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO;C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gB,WAA2C;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,qCAAqC,EAAE,iBAAiB,CAAC,CAAC;IAChF,CAAC;IAED,mCAAc,GAAd,UAAe,MAAuB,EAAE,KAA4C,EAAE,KAA0B;QAC5G,OAAO,IAAI,CAAC,KAAK,CAAC,mCAAmC,EAAE,eAAe,CAAC,CAAC;IAC5E,CAAC;IAED,4BAAO,GAAP,UAAQ,QAAkB;QACtB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IACL,iBAAC;AAAD,CAAC,AAnCD,CAAgC,MAAM,GAmCrC;AAnCY,gCAAU"} \ No newline at end of file diff --git a/node_modules/@ethersproject/abstract-signer/package.json b/node_modules/@ethersproject/abstract-signer/package.json new file mode 100644 index 0000000..661efa8 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0" + }, + "description": "An Abstract Class for desribing an Ethereum Signer for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/abstract-signer", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/abstract-signer", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x02eb8a3e41b27927d5717202f6818d00c95b77a3e7227ce3c7312ed21d2ff8ba", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/abstract-signer/src.ts/_version.ts b/node_modules/@ethersproject/abstract-signer/src.ts/_version.ts new file mode 100644 index 0000000..1372d85 --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "abstract-signer/5.5.0"; diff --git a/node_modules/@ethersproject/abstract-signer/src.ts/index.ts b/node_modules/@ethersproject/abstract-signer/src.ts/index.ts new file mode 100644 index 0000000..8ec850d --- /dev/null +++ b/node_modules/@ethersproject/abstract-signer/src.ts/index.ts @@ -0,0 +1,376 @@ +"use strict"; + +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { Bytes, BytesLike } from "@ethersproject/bytes"; +import { Deferrable, defineReadOnly, resolveProperties, shallowCopy } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +const allowedTransactionKeys: Array = [ + "accessList", "chainId", "customData", "data", "from", "gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "to", "type", "value" +]; + +const forwardErrors = [ + Logger.errors.INSUFFICIENT_FUNDS, + Logger.errors.NONCE_EXPIRED, + Logger.errors.REPLACEMENT_UNDERPRICED, +]; + +// EIP-712 Typed Data +// See: https://eips.ethereum.org/EIPS/eip-712 + +export interface TypedDataDomain { + name?: string; + version?: string; + chainId?: BigNumberish; + verifyingContract?: string; + salt?: BytesLike; +}; + +export interface TypedDataField { + name: string; + type: string; +}; + +// Sub-classes of Signer may optionally extend this interface to indicate +// they have a private key available synchronously +export interface ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; +} + +// Sub-Class Notes: +// - A Signer MUST always make sure, that if present, the "from" field +// matches the Signer, before sending or signing a transaction +// - A Signer SHOULD always wrap private information (such as a private +// key or mnemonic) in a function, so that console.log does not leak +// the data + +// @TODO: This is a temporary measure to preserve backwards compatibility +// In v6, the method on TypedDataSigner will be added to Signer +export interface TypedDataSigner { + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; +} + +export abstract class Signer { + readonly provider?: Provider; + + /////////////////// + // Sub-classes MUST implement these + + // Returns the checksum address + abstract getAddress(): Promise + + // Returns the signed prefixed-message. This MUST treat: + // - Bytes as a binary message + // - string as a UTF8-message + // i.e. "0x1234" is a SIX (6) byte string, NOT 2 bytes of data + abstract signMessage(message: Bytes | string): Promise; + + // Signs a transaction and returns the fully serialized, signed transaction. + // The EXACT transaction MUST be signed, and NO additional properties to be added. + // - This MAY throw if signing transactions is not supports, but if + // it does, sentTransaction MUST be overridden. + abstract signTransaction(transaction: Deferrable): Promise; + + // Returns a new instance of the Signer, connected to provider. + // This MAY throw if changing providers is not supported. + abstract connect(provider: Provider): Signer; + + readonly _isSigner: boolean; + + + /////////////////// + // Sub-classes MUST call super + constructor() { + logger.checkAbstract(new.target, Signer); + defineReadOnly(this, "_isSigner", true); + } + + + /////////////////// + // Sub-classes MAY override these + + async getBalance(blockTag?: BlockTag): Promise { + this._checkProvider("getBalance"); + return await this.provider.getBalance(this.getAddress(), blockTag); + } + + async getTransactionCount(blockTag?: BlockTag): Promise { + this._checkProvider("getTransactionCount"); + return await this.provider.getTransactionCount(this.getAddress(), blockTag); + } + + // Populates "from" if unspecified, and estimates the gas for the transaction + async estimateGas(transaction: Deferrable): Promise { + this._checkProvider("estimateGas"); + const tx = await resolveProperties(this.checkTransaction(transaction)); + return await this.provider.estimateGas(tx); + } + + // Populates "from" if unspecified, and calls with the transaction + async call(transaction: Deferrable, blockTag?: BlockTag): Promise { + this._checkProvider("call"); + const tx = await resolveProperties(this.checkTransaction(transaction)); + return await this.provider.call(tx, blockTag); + } + + // Populates all fields in a transaction, signs it and sends it to the network + async sendTransaction(transaction: Deferrable): Promise { + this._checkProvider("sendTransaction"); + const tx = await this.populateTransaction(transaction); + const signedTx = await this.signTransaction(tx); + return await this.provider.sendTransaction(signedTx); + } + + async getChainId(): Promise { + this._checkProvider("getChainId"); + const network = await this.provider.getNetwork(); + return network.chainId; + } + + async getGasPrice(): Promise { + this._checkProvider("getGasPrice"); + return await this.provider.getGasPrice(); + } + + async getFeeData(): Promise { + this._checkProvider("getFeeData"); + return await this.provider.getFeeData(); + } + + + async resolveName(name: string): Promise { + this._checkProvider("resolveName"); + return await this.provider.resolveName(name); + } + + + + // Checks a transaction does not contain invalid keys and if + // no "from" is provided, populates it. + // - does NOT require a provider + // - adds "from" is not present + // - returns a COPY (safe to mutate the result) + // By default called from: (overriding these prevents it) + // - call + // - estimateGas + // - populateTransaction (and therefor sendTransaction) + checkTransaction(transaction: Deferrable): Deferrable { + for (const key in transaction) { + if (allowedTransactionKeys.indexOf(key) === -1) { + logger.throwArgumentError("invalid transaction key: " + key, "transaction", transaction); + } + } + + const tx = shallowCopy(transaction); + + if (tx.from == null) { + tx.from = this.getAddress(); + + } else { + // Make sure any provided address matches this signer + tx.from = Promise.all([ + Promise.resolve(tx.from), + this.getAddress() + ]).then((result) => { + if (result[0].toLowerCase() !== result[1].toLowerCase()) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + return result[0]; + }); + } + + return tx; + } + + // Populates ALL keys for a transaction and checks that "from" matches + // this Signer. Should be used by sendTransaction but NOT by signTransaction. + // By default called from: (overriding these prevents it) + // - sendTransaction + // + // Notes: + // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas + async populateTransaction(transaction: Deferrable): Promise { + + const tx: Deferrable = await resolveProperties(this.checkTransaction(transaction)) + + if (tx.to != null) { + tx.to = Promise.resolve(tx.to).then(async (to) => { + if (to == null) { return null; } + const address = await this.resolveName(to); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return address; + }); + + // Prevent this error from causing an UnhandledPromiseException + tx.to.catch((error) => { }); + } + + // Do not allow mixing pre-eip-1559 and eip-1559 properties + const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null); + if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) { + logger.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); + } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) { + logger.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); + } + + if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) { + // Fully-formed EIP-1559 transaction (skip getFeeData) + tx.type = 2; + + } else if (tx.type === 0 || tx.type === 1) { + // Explicit Legacy or EIP-2930 transaction + + // Populate missing gasPrice + if (tx.gasPrice == null) { tx.gasPrice = this.getGasPrice(); } + + } else { + + // We need to get fee data to determine things + const feeData = await this.getFeeData(); + + if (tx.type == null) { + // We need to auto-detect the intended type of this transaction... + + if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { + // The network supports EIP-1559! + + // Upgrade transaction from null to eip-1559 + tx.type = 2; + + if (tx.gasPrice != null) { + // Using legacy gasPrice property on an eip-1559 network, + // so use gasPrice as both fee properties + const gasPrice = tx.gasPrice; + delete tx.gasPrice; + tx.maxFeePerGas = gasPrice; + tx.maxPriorityFeePerGas = gasPrice; + + } else { + // Populate missing fee data + if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; } + if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; } + } + + } else if (feeData.gasPrice != null) { + // Network doesn't support EIP-1559... + + // ...but they are trying to use EIP-1559 properties + if (hasEip1559) { + logger.throwError("network does not support EIP-1559", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "populateTransaction" + }); + } + + // Populate missing fee data + if (tx.gasPrice == null) { tx.gasPrice = feeData.gasPrice; } + + // Explicitly set untyped transaction to legacy + tx.type = 0; + + } else { + // getFeeData has failed us. + logger.throwError("failed to get consistent fee data", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signer.getFeeData" + }); + } + + } else if (tx.type === 2) { + // Explicitly using EIP-1559 + + // Populate missing fee data + if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; } + if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; } + } + } + + if (tx.nonce == null) { tx.nonce = this.getTransactionCount("pending"); } + + if (tx.gasLimit == null) { + tx.gasLimit = this.estimateGas(tx).catch((error) => { + if (forwardErrors.indexOf(error.code) >= 0) { + throw error; + } + + return logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + tx: tx + }); + }); + } + + if (tx.chainId == null) { + tx.chainId = this.getChainId(); + } else { + tx.chainId = Promise.all([ + Promise.resolve(tx.chainId), + this.getChainId() + ]).then((results) => { + if (results[1] !== 0 && results[0] !== results[1]) { + logger.throwArgumentError("chainId address mismatch", "transaction", transaction); + } + return results[0]; + }); + } + + return await resolveProperties(tx); + } + + + /////////////////// + // Sub-classes SHOULD leave these alone + + _checkProvider(operation?: string): void { + if (!this.provider) { logger.throwError("missing provider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: (operation || "_checkProvider") }); + } + } + + static isSigner(value: any): value is Signer { + return !!(value && value._isSigner); + } +} + +export class VoidSigner extends Signer implements TypedDataSigner { + readonly address: string; + + constructor(address: string, provider?: Provider) { + logger.checkNew(new.target, VoidSigner); + super(); + defineReadOnly(this, "address", address); + defineReadOnly(this, "provider", provider || null); + } + + getAddress(): Promise { + return Promise.resolve(this.address); + } + + _fail(message: string, operation: string): Promise { + return Promise.resolve().then(() => { + logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation }); + }); + } + + signMessage(message: Bytes | string): Promise { + return this._fail("VoidSigner cannot sign messages", "signMessage"); + } + + signTransaction(transaction: Deferrable): Promise { + return this._fail("VoidSigner cannot sign transactions", "signTransaction"); + } + + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise { + return this._fail("VoidSigner cannot sign typed data", "signTypedData"); + } + + connect(provider: Provider): VoidSigner { + return new VoidSigner(this.address, provider); + } +} + diff --git a/node_modules/@ethersproject/address/LICENSE.md b/node_modules/@ethersproject/address/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/address/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/address/README.md b/node_modules/@ethersproject/address/README.md new file mode 100644 index 0000000..80e994d --- /dev/null +++ b/node_modules/@ethersproject/address/README.md @@ -0,0 +1,35 @@ +Ethereum Address Utilities +========================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for encoding, verifying and computing checksums for +Ethereum addresses and computing special addresses, such as those +enerated by and for contracts under various situations. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/address/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + getAddress, + isAddress, + + getIcapAddress, + + getContractAddress, + getCreate2Address + +} = require("@ethersproject/address"); +``` + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/address/lib.esm/_version.d.ts b/node_modules/@ethersproject/address/lib.esm/_version.d.ts new file mode 100644 index 0000000..b0dd9a3 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "address/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/address/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/_version.js b/node_modules/@ethersproject/address/lib.esm/_version.js new file mode 100644 index 0000000..22b2d93 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "address/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/_version.js.map b/node_modules/@ethersproject/address/lib.esm/_version.js.map new file mode 100644 index 0000000..2d391d7 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/index.d.ts b/node_modules/@ethersproject/address/lib.esm/index.d.ts new file mode 100644 index 0000000..43a6134 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/index.d.ts @@ -0,0 +1,11 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { BigNumberish } from "@ethersproject/bignumber"; +export declare function getAddress(address: string): string; +export declare function isAddress(address: string): boolean; +export declare function getIcapAddress(address: string): string; +export declare function getContractAddress(transaction: { + from: string; + nonce: BigNumberish; +}): string; +export declare function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/index.d.ts.map b/node_modules/@ethersproject/address/lib.esm/index.d.ts.map new file mode 100644 index 0000000..e432764 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAgE,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAa,YAAY,EAA4B,MAAM,0BAA0B,CAAC;AAyE7F,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoClD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMlD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAItD;AAGD,wBAAgB,kBAAkB,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,UAWpF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,GAAG,MAAM,CAQhG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/index.js b/node_modules/@ethersproject/address/lib.esm/index.js new file mode 100644 index 0000000..beb8dd7 --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/index.js @@ -0,0 +1,134 @@ +"use strict"; +import { arrayify, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from "@ethersproject/bytes"; +import { BigNumber, _base16To36, _base36To16 } from "@ethersproject/bignumber"; +import { keccak256 } from "@ethersproject/keccak256"; +import { encode } from "@ethersproject/rlp"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +function getChecksumAddress(address) { + if (!isHexString(address, 20)) { + logger.throwArgumentError("invalid address", "address", address); + } + address = address.toLowerCase(); + const chars = address.substring(2).split(""); + const expanded = new Uint8Array(40); + for (let i = 0; i < 40; i++) { + expanded[i] = chars[i].charCodeAt(0); + } + const hashed = arrayify(keccak256(expanded)); + for (let i = 0; i < 40; i += 2) { + if ((hashed[i >> 1] >> 4) >= 8) { + chars[i] = chars[i].toUpperCase(); + } + if ((hashed[i >> 1] & 0x0f) >= 8) { + chars[i + 1] = chars[i + 1].toUpperCase(); + } + } + return "0x" + chars.join(""); +} +// Shims for environments that are missing some required constants and functions +const MAX_SAFE_INTEGER = 0x1fffffffffffff; +function log10(x) { + if (Math.log10) { + return Math.log10(x); + } + return Math.log(x) / Math.LN10; +} +// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number +// Create lookup table +const ibanLookup = {}; +for (let i = 0; i < 10; i++) { + ibanLookup[String(i)] = String(i); +} +for (let i = 0; i < 26; i++) { + ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); +} +// How many decimal digits can we process? (for 64-bit float, this is 15) +const safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); +function ibanChecksum(address) { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + "00"; + let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join(""); + // Javascript can handle integers safely up to 15 (decimal) digits + while (expanded.length >= safeDigits) { + let block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + let checksum = String(98 - (parseInt(expanded, 10) % 97)); + while (checksum.length < 2) { + checksum = "0" + checksum; + } + return checksum; +} +; +export function getAddress(address) { + let result = null; + if (typeof (address) !== "string") { + logger.throwArgumentError("invalid address", "address", address); + } + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + // Missing the 0x prefix + if (address.substring(0, 2) !== "0x") { + address = "0x" + address; + } + result = getChecksumAddress(address); + // It is a checksummed address with a bad checksum + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + logger.throwArgumentError("bad address checksum", "address", address); + } + // Maybe ICAP? (we only support direct mode) + } + else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + // It is an ICAP address with a bad checksum + if (address.substring(2, 4) !== ibanChecksum(address)) { + logger.throwArgumentError("bad icap checksum", "address", address); + } + result = _base36To16(address.substring(4)); + while (result.length < 40) { + result = "0" + result; + } + result = getChecksumAddress("0x" + result); + } + else { + logger.throwArgumentError("invalid address", "address", address); + } + return result; +} +export function isAddress(address) { + try { + getAddress(address); + return true; + } + catch (error) { } + return false; +} +export function getIcapAddress(address) { + let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase(); + while (base36.length < 30) { + base36 = "0" + base36; + } + return "XE" + ibanChecksum("XE00" + base36) + base36; +} +// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed +export function getContractAddress(transaction) { + let from = null; + try { + from = getAddress(transaction.from); + } + catch (error) { + logger.throwArgumentError("missing from address", "transaction", transaction); + } + const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString())); + return getAddress(hexDataSlice(keccak256(encode([from, nonce])), 12)); +} +export function getCreate2Address(from, salt, initCodeHash) { + if (hexDataLength(salt) !== 32) { + logger.throwArgumentError("salt must be 32 bytes", "salt", salt); + } + if (hexDataLength(initCodeHash) !== 32) { + logger.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); + } + return getAddress(hexDataSlice(keccak256(concat(["0xff", getAddress(from), salt, initCodeHash])), 12)); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib.esm/index.js.map b/node_modules/@ethersproject/address/lib.esm/index.js.map new file mode 100644 index 0000000..7993c0f --- /dev/null +++ b/node_modules/@ethersproject/address/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAE,SAAS,EAAgB,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,SAAS,kBAAkB,CAAC,OAAe;IACvC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE;QAC3B,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QACzB,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAA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BAAkB,CAAC,uBAAuB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KACpE;IACD,IAAI,aAAa,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE;QACpC,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;KAC5F;IACD,OAAO,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC5G,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/_version.d.ts b/node_modules/@ethersproject/address/lib/_version.d.ts new file mode 100644 index 0000000..b0dd9a3 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "address/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/_version.d.ts.map b/node_modules/@ethersproject/address/lib/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/_version.js b/node_modules/@ethersproject/address/lib/_version.js new file mode 100644 index 0000000..2b22d66 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "address/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/_version.js.map b/node_modules/@ethersproject/address/lib/_version.js.map new file mode 100644 index 0000000..0ce0fea --- /dev/null +++ b/node_modules/@ethersproject/address/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/index.d.ts b/node_modules/@ethersproject/address/lib/index.d.ts new file mode 100644 index 0000000..43a6134 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/index.d.ts @@ -0,0 +1,11 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { BigNumberish } from "@ethersproject/bignumber"; +export declare function getAddress(address: string): string; +export declare function isAddress(address: string): boolean; +export declare function getIcapAddress(address: string): string; +export declare function getContractAddress(transaction: { + from: string; + nonce: BigNumberish; +}): string; +export declare function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/index.d.ts.map b/node_modules/@ethersproject/address/lib/index.d.ts.map new file mode 100644 index 0000000..e432764 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAgE,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAa,YAAY,EAA4B,MAAM,0BAA0B,CAAC;AAyE7F,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoClD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMlD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAItD;AAGD,wBAAgB,kBAAkB,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,UAWpF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,GAAG,MAAM,CAQhG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/index.js b/node_modules/@ethersproject/address/lib/index.js new file mode 100644 index 0000000..21dfad1 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/index.js @@ -0,0 +1,141 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCreate2Address = exports.getContractAddress = exports.getIcapAddress = exports.isAddress = exports.getAddress = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var bignumber_1 = require("@ethersproject/bignumber"); +var keccak256_1 = require("@ethersproject/keccak256"); +var rlp_1 = require("@ethersproject/rlp"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function getChecksumAddress(address) { + if (!(0, bytes_1.isHexString)(address, 20)) { + logger.throwArgumentError("invalid address", "address", address); + } + address = address.toLowerCase(); + var chars = address.substring(2).split(""); + var expanded = new Uint8Array(40); + for (var i = 0; i < 40; i++) { + expanded[i] = chars[i].charCodeAt(0); + } + var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded)); + for (var i = 0; i < 40; i += 2) { + if ((hashed[i >> 1] >> 4) >= 8) { + chars[i] = chars[i].toUpperCase(); + } + if ((hashed[i >> 1] & 0x0f) >= 8) { + chars[i + 1] = chars[i + 1].toUpperCase(); + } + } + return "0x" + chars.join(""); +} +// Shims for environments that are missing some required constants and functions +var MAX_SAFE_INTEGER = 0x1fffffffffffff; +function log10(x) { + if (Math.log10) { + return Math.log10(x); + } + return Math.log(x) / Math.LN10; +} +// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number +// Create lookup table +var ibanLookup = {}; +for (var i = 0; i < 10; i++) { + ibanLookup[String(i)] = String(i); +} +for (var i = 0; i < 26; i++) { + ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); +} +// How many decimal digits can we process? (for 64-bit float, this is 15) +var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); +function ibanChecksum(address) { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + "00"; + var expanded = address.split("").map(function (c) { return ibanLookup[c]; }).join(""); + // Javascript can handle integers safely up to 15 (decimal) digits + while (expanded.length >= safeDigits) { + var block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + var checksum = String(98 - (parseInt(expanded, 10) % 97)); + while (checksum.length < 2) { + checksum = "0" + checksum; + } + return checksum; +} +; +function getAddress(address) { + var result = null; + if (typeof (address) !== "string") { + logger.throwArgumentError("invalid address", "address", address); + } + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + // Missing the 0x prefix + if (address.substring(0, 2) !== "0x") { + address = "0x" + address; + } + result = getChecksumAddress(address); + // It is a checksummed address with a bad checksum + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + logger.throwArgumentError("bad address checksum", "address", address); + } + // Maybe ICAP? (we only support direct mode) + } + else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + // It is an ICAP address with a bad checksum + if (address.substring(2, 4) !== ibanChecksum(address)) { + logger.throwArgumentError("bad icap checksum", "address", address); + } + result = (0, bignumber_1._base36To16)(address.substring(4)); + while (result.length < 40) { + result = "0" + result; + } + result = getChecksumAddress("0x" + result); + } + else { + logger.throwArgumentError("invalid address", "address", address); + } + return result; +} +exports.getAddress = getAddress; +function isAddress(address) { + try { + getAddress(address); + return true; + } + catch (error) { } + return false; +} +exports.isAddress = isAddress; +function getIcapAddress(address) { + var base36 = (0, bignumber_1._base16To36)(getAddress(address).substring(2)).toUpperCase(); + while (base36.length < 30) { + base36 = "0" + base36; + } + return "XE" + ibanChecksum("XE00" + base36) + base36; +} +exports.getIcapAddress = getIcapAddress; +// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed +function getContractAddress(transaction) { + var from = null; + try { + from = getAddress(transaction.from); + } + catch (error) { + logger.throwArgumentError("missing from address", "transaction", transaction); + } + var nonce = (0, bytes_1.stripZeros)((0, bytes_1.arrayify)(bignumber_1.BigNumber.from(transaction.nonce).toHexString())); + return getAddress((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, rlp_1.encode)([from, nonce])), 12)); +} +exports.getContractAddress = getContractAddress; +function getCreate2Address(from, salt, initCodeHash) { + if ((0, bytes_1.hexDataLength)(salt) !== 32) { + logger.throwArgumentError("salt must be 32 bytes", "salt", salt); + } + if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) { + logger.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); + } + return getAddress((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)(["0xff", getAddress(from), salt, initCodeHash])), 12)); +} +exports.getCreate2Address = getCreate2Address; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/address/lib/index.js.map b/node_modules/@ethersproject/address/lib/index.js.map new file mode 100644 index 0000000..74c3242 --- /dev/null +++ b/node_modules/@ethersproject/address/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAAyH;AACzH,sDAA6F;AAC7F,sDAAqD;AACrD,0CAA4C;AAE5C,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,SAAS,kBAAkB,CAAC,OAAe;IACvC,IAAI,CAAC,IAAA,mBAAW,EAAC,OAAO,EAAE,EAAE,CAAC,EAAE;QAC3B,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAEhC,IAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,C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AK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAEpF,OAAO,UAAU,CAAC,IAAA,oBAAY,EAAC,IAAA,qBAAS,EAAC,IAAA,YAAM,EAAC,CAAE,IAAI,EAAE,KAAK,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAXD,gDAWC;AAED,SAAgB,iBAAiB,CAAC,IAAY,EAAE,IAAe,EAAE,YAAuB;IACpF,IAAI,IAAA,qBAAa,EAAC,IAAI,CAAC,KAAK,EAAE,EAAE;QAC5B,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KACpE;IACD,IAAI,IAAA,qBAAa,EAAC,YAAY,CAAC,KAAK,EAAE,EAAE;QACpC,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;KAC5F;IACD,OAAO,UAAU,CAAC,IAAA,oBAAY,EAAC,IAAA,qBAAS,EAAC,IAAA,cAAM,EAAC,CAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC5G,CAAC;AARD,8CAQC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/address/package.json b/node_modules/@ethersproject/address/package.json new file mode 100644 index 0000000..3a01136 --- /dev/null +++ b/node_modules/@ethersproject/address/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/rlp": "^5.5.0" + }, + "description": "Utilities for handling Ethereum Addresses for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/address", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/address", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xfa99c21467355e5473cdc8ce0e315c73cebad21c774010607622fa99f30f3b13", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/address/src.ts/_version.ts b/node_modules/@ethersproject/address/src.ts/_version.ts new file mode 100644 index 0000000..c7db67f --- /dev/null +++ b/node_modules/@ethersproject/address/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "address/5.5.0"; diff --git a/node_modules/@ethersproject/address/src.ts/index.ts b/node_modules/@ethersproject/address/src.ts/index.ts new file mode 100644 index 0000000..661d70e --- /dev/null +++ b/node_modules/@ethersproject/address/src.ts/index.ts @@ -0,0 +1,151 @@ +"use strict"; + +import { arrayify, BytesLike, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from "@ethersproject/bytes"; +import { BigNumber, BigNumberish, _base16To36, _base36To16 } from "@ethersproject/bignumber"; +import { keccak256 } from "@ethersproject/keccak256"; +import { encode } from "@ethersproject/rlp"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +function getChecksumAddress(address: string): string { + if (!isHexString(address, 20)) { + logger.throwArgumentError("invalid address", "address", address); + } + + address = address.toLowerCase(); + + const chars = address.substring(2).split(""); + + const expanded = new Uint8Array(40); + for (let i = 0; i < 40; i++) { + expanded[i] = chars[i].charCodeAt(0); + } + + const hashed = arrayify(keccak256(expanded)); + + for (let i = 0; i < 40; i += 2) { + if ((hashed[i >> 1] >> 4) >= 8) { + chars[i] = chars[i].toUpperCase(); + } + if ((hashed[i >> 1] & 0x0f) >= 8) { + chars[i + 1] = chars[i + 1].toUpperCase(); + } + } + + return "0x" + chars.join(""); +} + +// Shims for environments that are missing some required constants and functions +const MAX_SAFE_INTEGER: number = 0x1fffffffffffff; + +function log10(x: number): number { + if (Math.log10) { return Math.log10(x); } + return Math.log(x) / Math.LN10; +} + + +// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number + +// Create lookup table +const ibanLookup: { [character: string]: string } = { }; +for (let i = 0; i < 10; i++) { ibanLookup[String(i)] = String(i); } +for (let i = 0; i < 26; i++) { ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); } + +// How many decimal digits can we process? (for 64-bit float, this is 15) +const safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); + +function ibanChecksum(address: string): string { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + "00"; + + let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join(""); + + // Javascript can handle integers safely up to 15 (decimal) digits + while (expanded.length >= safeDigits){ + let block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + + let checksum = String(98 - (parseInt(expanded, 10) % 97)); + while (checksum.length < 2) { checksum = "0" + checksum; } + + return checksum; +}; + +export function getAddress(address: string): string { + let result = null; + + if (typeof(address) !== "string") { + logger.throwArgumentError("invalid address", "address", address); + } + + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + + // Missing the 0x prefix + if (address.substring(0, 2) !== "0x") { address = "0x" + address; } + + result = getChecksumAddress(address); + + // It is a checksummed address with a bad checksum + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + logger.throwArgumentError("bad address checksum", "address", address); + } + + // Maybe ICAP? (we only support direct mode) + } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + + // It is an ICAP address with a bad checksum + if (address.substring(2, 4) !== ibanChecksum(address)) { + logger.throwArgumentError("bad icap checksum", "address", address); + } + + result = _base36To16(address.substring(4)); + while (result.length < 40) { result = "0" + result; } + result = getChecksumAddress("0x" + result); + + } else { + logger.throwArgumentError("invalid address", "address", address); + } + + return result; +} + +export function isAddress(address: string): boolean { + try { + getAddress(address); + return true; + } catch (error) { } + return false; +} + +export function getIcapAddress(address: string): string { + let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase(); + while (base36.length < 30) { base36 = "0" + base36; } + return "XE" + ibanChecksum("XE00" + base36) + base36; +} + +// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed +export function getContractAddress(transaction: { from: string, nonce: BigNumberish }) { + let from: string = null; + try { + from = getAddress(transaction.from); + } catch (error) { + logger.throwArgumentError("missing from address", "transaction", transaction); + } + + const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString())); + + return getAddress(hexDataSlice(keccak256(encode([ from, nonce ])), 12)); +} + +export function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string { + if (hexDataLength(salt) !== 32) { + logger.throwArgumentError("salt must be 32 bytes", "salt", salt); + } + if (hexDataLength(initCodeHash) !== 32) { + logger.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); + } + return getAddress(hexDataSlice(keccak256(concat([ "0xff", getAddress(from), salt, initCodeHash ])), 12)) +} diff --git a/node_modules/@ethersproject/address/thirdparty.d.ts b/node_modules/@ethersproject/address/thirdparty.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/@ethersproject/base64/LICENSE.md b/node_modules/@ethersproject/base64/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/base64/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/base64/README.md b/node_modules/@ethersproject/base64/README.md new file mode 100644 index 0000000..9c7d505 --- /dev/null +++ b/node_modules/@ethersproject/base64/README.md @@ -0,0 +1,35 @@ +Base64 Coder +============ + +function decode(textData: string): Uint8Array +--------------------------------------------- + +Decodes a base64 encoded string into the binary data. + +```javascript +import * as base64 from "@ethersproject/base64"; + +let encodedData = "..."; +let data = base64.decode(encodedData); +console.log(data); +// { Uint8Array: [] } +``` + +function encode(data: Arrayish): string +--------------------------------------- + +Decodes a base64 encoded string into the binary data. + +```javascript +import * as base64 from "@ethersproject/base64"; + +let data = [ ]; +let encodedData = base64.encode(data); +console.log(encodedData); +// "..." +``` + +License +======= + +MIT License diff --git a/node_modules/@ethersproject/base64/lib.esm/_version.d.ts b/node_modules/@ethersproject/base64/lib.esm/_version.d.ts new file mode 100644 index 0000000..c097d51 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "base64/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/base64/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/_version.js b/node_modules/@ethersproject/base64/lib.esm/_version.js new file mode 100644 index 0000000..147df3e --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "base64/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/_version.js.map b/node_modules/@ethersproject/base64/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/base64.d.ts b/node_modules/@ethersproject/base64/lib.esm/base64.d.ts new file mode 100644 index 0000000..3abd5c4 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/base64.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function decode(textData: string): Uint8Array; +export declare function encode(data: BytesLike): string; +//# sourceMappingURL=base64.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/base64.d.ts.map b/node_modules/@ethersproject/base64/lib.esm/base64.d.ts.map new file mode 100644 index 0000000..65da5bf --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../src.ts/browser-base64.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAOnD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAO9C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/base64.js b/node_modules/@ethersproject/base64/lib.esm/base64.js new file mode 100644 index 0000000..869d25e --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/base64.js @@ -0,0 +1,19 @@ +"use strict"; +import { arrayify } from "@ethersproject/bytes"; +export function decode(textData) { + textData = atob(textData); + const data = []; + for (let i = 0; i < textData.length; i++) { + data.push(textData.charCodeAt(i)); + } + return arrayify(data); +} +export function encode(data) { + data = arrayify(data); + let textData = ""; + for (let i = 0; i < data.length; i++) { + textData += String.fromCharCode(data[i]); + } + return btoa(textData); +} +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/base64.js.map b/node_modules/@ethersproject/base64/lib.esm/base64.js.map new file mode 100644 index 0000000..06ca251 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../src.ts/browser-base64.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAE3D,MAAM,UAAU,MAAM,CAAC,QAAgB;IACnC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACrC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAe;IAClC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,QAAQ,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/index.d.ts b/node_modules/@ethersproject/base64/lib.esm/index.d.ts new file mode 100644 index 0000000..d0fd1f2 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/index.d.ts @@ -0,0 +1,2 @@ +export { decode, encode } from "./base64"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/index.d.ts.map b/node_modules/@ethersproject/base64/lib.esm/index.d.ts.map new file mode 100644 index 0000000..e96cd52 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/index.js b/node_modules/@ethersproject/base64/lib.esm/index.js new file mode 100644 index 0000000..9cd503b --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/index.js @@ -0,0 +1,3 @@ +"use strict"; +export { decode, encode } from "./base64"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib.esm/index.js.map b/node_modules/@ethersproject/base64/lib.esm/index.js.map new file mode 100644 index 0000000..39f8d64 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/_version.d.ts b/node_modules/@ethersproject/base64/lib/_version.d.ts new file mode 100644 index 0000000..c097d51 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "base64/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/_version.d.ts.map b/node_modules/@ethersproject/base64/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/_version.js b/node_modules/@ethersproject/base64/lib/_version.js new file mode 100644 index 0000000..859bca3 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "base64/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/_version.js.map b/node_modules/@ethersproject/base64/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/base64.d.ts b/node_modules/@ethersproject/base64/lib/base64.d.ts new file mode 100644 index 0000000..3abd5c4 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/base64.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function decode(textData: string): Uint8Array; +export declare function encode(data: BytesLike): string; +//# sourceMappingURL=base64.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/base64.d.ts.map b/node_modules/@ethersproject/base64/lib/base64.d.ts.map new file mode 100644 index 0000000..354ba22 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../src.ts/base64.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG3D,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAEnD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/base64.js b/node_modules/@ethersproject/base64/lib/base64.js new file mode 100644 index 0000000..c1a3b8f --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/base64.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encode = exports.decode = void 0; +var bytes_1 = require("@ethersproject/bytes"); +function decode(textData) { + return (0, bytes_1.arrayify)(new Uint8Array(Buffer.from(textData, "base64"))); +} +exports.decode = decode; +; +function encode(data) { + return Buffer.from((0, bytes_1.arrayify)(data)).toString("base64"); +} +exports.encode = encode; +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/base64.js.map b/node_modules/@ethersproject/base64/lib/base64.js.map new file mode 100644 index 0000000..bc03083 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../src.ts/base64.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAA2D;AAG3D,SAAgB,MAAM,CAAC,QAAgB;IACnC,OAAO,IAAA,gBAAQ,EAAC,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AAFD,wBAEC;AAAA,CAAC;AAEF,SAAgB,MAAM,CAAC,IAAe;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/browser-base64.d.ts b/node_modules/@ethersproject/base64/lib/browser-base64.d.ts new file mode 100644 index 0000000..63ef31d --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/browser-base64.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function decode(textData: string): Uint8Array; +export declare function encode(data: BytesLike): string; +//# sourceMappingURL=browser-base64.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/browser-base64.d.ts.map b/node_modules/@ethersproject/base64/lib/browser-base64.d.ts.map new file mode 100644 index 0000000..55eb246 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/browser-base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-base64.d.ts","sourceRoot":"","sources":["../src.ts/browser-base64.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAOnD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAO9C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/browser-base64.js b/node_modules/@ethersproject/base64/lib/browser-base64.js new file mode 100644 index 0000000..807c862 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/browser-base64.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encode = exports.decode = void 0; +var bytes_1 = require("@ethersproject/bytes"); +function decode(textData) { + textData = atob(textData); + var data = []; + for (var i = 0; i < textData.length; i++) { + data.push(textData.charCodeAt(i)); + } + return (0, bytes_1.arrayify)(data); +} +exports.decode = decode; +function encode(data) { + data = (0, bytes_1.arrayify)(data); + var textData = ""; + for (var i = 0; i < data.length; i++) { + textData += String.fromCharCode(data[i]); + } + return btoa(textData); +} +exports.encode = encode; +//# sourceMappingURL=browser-base64.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/browser-base64.js.map b/node_modules/@ethersproject/base64/lib/browser-base64.js.map new file mode 100644 index 0000000..61264d3 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/browser-base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-base64.js","sourceRoot":"","sources":["../src.ts/browser-base64.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAA2D;AAE3D,SAAgB,MAAM,CAAC,QAAgB;IACnC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,IAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACrC;IACD,OAAO,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAPD,wBAOC;AAED,SAAgB,MAAM,CAAC,IAAe;IAClC,IAAI,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IACtB,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,QAAQ,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AAPD,wBAOC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/index.d.ts b/node_modules/@ethersproject/base64/lib/index.d.ts new file mode 100644 index 0000000..d0fd1f2 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/index.d.ts @@ -0,0 +1,2 @@ +export { decode, encode } from "./base64"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/index.d.ts.map b/node_modules/@ethersproject/base64/lib/index.d.ts.map new file mode 100644 index 0000000..e96cd52 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/index.js b/node_modules/@ethersproject/base64/lib/index.js new file mode 100644 index 0000000..39229aa --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encode = exports.decode = void 0; +var base64_1 = require("./base64"); +Object.defineProperty(exports, "decode", { enumerable: true, get: function () { return base64_1.decode; } }); +Object.defineProperty(exports, "encode", { enumerable: true, get: function () { return base64_1.encode; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/lib/index.js.map b/node_modules/@ethersproject/base64/lib/index.js.map new file mode 100644 index 0000000..f72dab6 --- /dev/null +++ b/node_modules/@ethersproject/base64/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAA0C;AAAjC,gGAAA,MAAM,OAAA;AAAE,gGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/base64/package.json b/node_modules/@ethersproject/base64/package.json new file mode 100644 index 0000000..73b0bf4 --- /dev/null +++ b/node_modules/@ethersproject/base64/package.json @@ -0,0 +1,48 @@ +{ + "_ethers.alias": { + "base64.js": "browser-base64.js" + }, + "author": "Richard Moore ", + "browser": { + "./lib/base64": "./lib/browser-base64.js" + }, + "dependencies": { + "@ethersproject/bytes": "^5.5.0" + }, + "description": "Base64 coder.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/base64", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/base64", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xd41aeec849d5c477d67777f87429f2494a37e758d237433bd25664427acae89c", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/base64/src.ts/_version.ts b/node_modules/@ethersproject/base64/src.ts/_version.ts new file mode 100644 index 0000000..6a43f40 --- /dev/null +++ b/node_modules/@ethersproject/base64/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "base64/5.5.0"; diff --git a/node_modules/@ethersproject/base64/src.ts/base64.ts b/node_modules/@ethersproject/base64/src.ts/base64.ts new file mode 100644 index 0000000..c6f84a0 --- /dev/null +++ b/node_modules/@ethersproject/base64/src.ts/base64.ts @@ -0,0 +1,12 @@ +"use strict"; + +import { arrayify, BytesLike } from "@ethersproject/bytes"; + + +export function decode(textData: string): Uint8Array { + return arrayify(new Uint8Array(Buffer.from(textData, "base64"))); +}; + +export function encode(data: BytesLike): string { + return Buffer.from(arrayify(data)).toString("base64"); +} diff --git a/node_modules/@ethersproject/base64/src.ts/browser-base64.ts b/node_modules/@ethersproject/base64/src.ts/browser-base64.ts new file mode 100644 index 0000000..4fb4d83 --- /dev/null +++ b/node_modules/@ethersproject/base64/src.ts/browser-base64.ts @@ -0,0 +1,23 @@ +"use strict"; + +import { arrayify, BytesLike } from "@ethersproject/bytes"; + +export function decode(textData: string): Uint8Array { + textData = atob(textData); + const data = []; + for (let i = 0; i < textData.length; i++) { + data.push(textData.charCodeAt(i)); + } + return arrayify(data); +} + +export function encode(data: BytesLike): string { + data = arrayify(data); + let textData = ""; + for (let i = 0; i < data.length; i++) { + textData += String.fromCharCode(data[i]); + } + return btoa(textData); +} + + diff --git a/node_modules/@ethersproject/base64/src.ts/index.ts b/node_modules/@ethersproject/base64/src.ts/index.ts new file mode 100644 index 0000000..5abfcec --- /dev/null +++ b/node_modules/@ethersproject/base64/src.ts/index.ts @@ -0,0 +1,3 @@ +"use strict"; + +export { decode, encode } from "./base64"; diff --git a/node_modules/@ethersproject/basex/LICENSE.md b/node_modules/@ethersproject/basex/LICENSE.md new file mode 100644 index 0000000..b587c34 --- /dev/null +++ b/node_modules/@ethersproject/basex/LICENSE.md @@ -0,0 +1,31 @@ +Forked from https://github.com/cryptocoinjs/bs58 +Originally written by Mike Hearn for BitcoinJ +Copyright (c) 2011 Google Inc + +Ported to JavaScript by Stefan Thomas +Merged Buffer refactorings from base58-native by Stephen Pair +Copyright (c) 2013 BitPay Inc + +Removed Buffer Dependency +Copyright (c) 2019 Richard Moore + + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/basex/README.md b/node_modules/@ethersproject/basex/README.md new file mode 100644 index 0000000..b5217d1 --- /dev/null +++ b/node_modules/@ethersproject/basex/README.md @@ -0,0 +1,31 @@ +Base-X +====== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for encoding and decoding vinary data in arbitrary bases, but +is primarily for Base58 encoding which is used for various blockchain data. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/encoding/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + BaseX, + + Base32, + Base58 + +} = require("@ethersproject/basex"); +``` + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/basex/lib.esm/_version.d.ts b/node_modules/@ethersproject/basex/lib.esm/_version.d.ts new file mode 100644 index 0000000..634e919 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "basex/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/basex/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/_version.js b/node_modules/@ethersproject/basex/lib.esm/_version.js new file mode 100644 index 0000000..32b9ff2 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "basex/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/_version.js.map b/node_modules/@ethersproject/basex/lib.esm/_version.js.map new file mode 100644 index 0000000..2b36b38 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/index.d.ts b/node_modules/@ethersproject/basex/lib.esm/index.d.ts new file mode 100644 index 0000000..4fe19f3 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/index.d.ts @@ -0,0 +1,55 @@ +/** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ +import { BytesLike } from "@ethersproject/bytes"; +export declare class BaseX { + readonly alphabet: string; + readonly base: number; + _alphabetMap: { + [character: string]: number; + }; + _leader: string; + constructor(alphabet: string); + encode(value: BytesLike): string; + decode(value: string): Uint8Array; +} +declare const Base32: BaseX; +declare const Base58: BaseX; +export { Base32, Base58 }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/index.d.ts.map b/node_modules/@ethersproject/basex/lib.esm/index.d.ts.map new file mode 100644 index 0000000..6371534 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG3D,qBAAa,KAAK;IACd,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,EAAE;QAAE,CAAE,SAAS,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;IAChD,OAAO,EAAE,MAAM,CAAC;gBAEJ,QAAQ,EAAE,MAAM;IAa5B,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAmChC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;CAoCpC;AAED,QAAA,MAAM,MAAM,OAAgD,CAAC;AAC7D,QAAA,MAAM,MAAM,OAA0E,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/index.js b/node_modules/@ethersproject/basex/lib.esm/index.js new file mode 100644 index 0000000..466ee5d --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/index.js @@ -0,0 +1,119 @@ +/** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ +import { arrayify } from "@ethersproject/bytes"; +import { defineReadOnly } from "@ethersproject/properties"; +export class BaseX { + constructor(alphabet) { + defineReadOnly(this, "alphabet", alphabet); + defineReadOnly(this, "base", alphabet.length); + defineReadOnly(this, "_alphabetMap", {}); + defineReadOnly(this, "_leader", alphabet.charAt(0)); + // pre-compute lookup table + for (let i = 0; i < alphabet.length; i++) { + this._alphabetMap[alphabet.charAt(i)] = i; + } + } + encode(value) { + let source = arrayify(value); + if (source.length === 0) { + return ""; + } + let digits = [0]; + for (let i = 0; i < source.length; ++i) { + let carry = source[i]; + for (let j = 0; j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % this.base; + carry = (carry / this.base) | 0; + } + while (carry > 0) { + digits.push(carry % this.base); + carry = (carry / this.base) | 0; + } + } + let string = ""; + // deal with leading zeros + for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) { + string += this._leader; + } + // convert digits to a string + for (let q = digits.length - 1; q >= 0; --q) { + string += this.alphabet[digits[q]]; + } + return string; + } + decode(value) { + if (typeof (value) !== "string") { + throw new TypeError("Expected String"); + } + let bytes = []; + if (value.length === 0) { + return new Uint8Array(bytes); + } + bytes.push(0); + for (let i = 0; i < value.length; i++) { + let byte = this._alphabetMap[value[i]]; + if (byte === undefined) { + throw new Error("Non-base" + this.base + " character"); + } + let carry = byte; + for (let j = 0; j < bytes.length; ++j) { + carry += bytes[j] * this.base; + bytes[j] = carry & 0xff; + carry >>= 8; + } + while (carry > 0) { + bytes.push(carry & 0xff); + carry >>= 8; + } + } + // deal with leading zeros + for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) { + bytes.push(0); + } + return arrayify(new Uint8Array(bytes.reverse())); + } +} +const Base32 = new BaseX("abcdefghijklmnopqrstuvwxyz234567"); +const Base58 = new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); +export { Base32, Base58 }; +//console.log(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj")) +//console.log(Base58.encode(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj"))) +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib.esm/index.js.map b/node_modules/@ethersproject/basex/lib.esm/index.js.map new file mode 100644 index 0000000..762932b --- /dev/null +++ b/node_modules/@ethersproject/basex/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,OAAO,KAAK;IAOd,YAAY,QAAgB;QACxB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC3C,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAE9C,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,EAAG,CAAC,CAAC;QAC1C,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpD,2BAA2B;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,C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KAAK,CAAC,CAAC;aACf;SACJ;QAED,0BAA0B;QAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,OAAO,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;YACpE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SAChB;QAED,OAAO,QAAQ,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;IACpD,CAAC;CACJ;AAED,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAE1B,8EAA8E;AAC9E,6FAA6F"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/_version.d.ts b/node_modules/@ethersproject/basex/lib/_version.d.ts new file mode 100644 index 0000000..634e919 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "basex/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/_version.d.ts.map b/node_modules/@ethersproject/basex/lib/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/_version.js b/node_modules/@ethersproject/basex/lib/_version.js new file mode 100644 index 0000000..6810cad --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "basex/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/_version.js.map b/node_modules/@ethersproject/basex/lib/_version.js.map new file mode 100644 index 0000000..2f9c571 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/index.d.ts b/node_modules/@ethersproject/basex/lib/index.d.ts new file mode 100644 index 0000000..4fe19f3 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/index.d.ts @@ -0,0 +1,55 @@ +/** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ +import { BytesLike } from "@ethersproject/bytes"; +export declare class BaseX { + readonly alphabet: string; + readonly base: number; + _alphabetMap: { + [character: string]: number; + }; + _leader: string; + constructor(alphabet: string); + encode(value: BytesLike): string; + decode(value: string): Uint8Array; +} +declare const Base32: BaseX; +declare const Base58: BaseX; +export { Base32, Base58 }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/index.d.ts.map b/node_modules/@ethersproject/basex/lib/index.d.ts.map new file mode 100644 index 0000000..6371534 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG3D,qBAAa,KAAK;IACd,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,EAAE;QAAE,CAAE,SAAS,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;IAChD,OAAO,EAAE,MAAM,CAAC;gBAEJ,QAAQ,EAAE,MAAM;IAa5B,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAmChC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;CAoCpC;AAED,QAAA,MAAM,MAAM,OAAgD,CAAC;AAC7D,QAAA,MAAM,MAAM,OAA0E,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/index.js b/node_modules/@ethersproject/basex/lib/index.js new file mode 100644 index 0000000..78f7d54 --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/index.js @@ -0,0 +1,125 @@ +"use strict"; +/** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Base58 = exports.Base32 = exports.BaseX = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var BaseX = /** @class */ (function () { + function BaseX(alphabet) { + (0, properties_1.defineReadOnly)(this, "alphabet", alphabet); + (0, properties_1.defineReadOnly)(this, "base", alphabet.length); + (0, properties_1.defineReadOnly)(this, "_alphabetMap", {}); + (0, properties_1.defineReadOnly)(this, "_leader", alphabet.charAt(0)); + // pre-compute lookup table + for (var i = 0; i < alphabet.length; i++) { + this._alphabetMap[alphabet.charAt(i)] = i; + } + } + BaseX.prototype.encode = function (value) { + var source = (0, bytes_1.arrayify)(value); + if (source.length === 0) { + return ""; + } + var digits = [0]; + for (var i = 0; i < source.length; ++i) { + var carry = source[i]; + for (var j = 0; j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % this.base; + carry = (carry / this.base) | 0; + } + while (carry > 0) { + digits.push(carry % this.base); + carry = (carry / this.base) | 0; + } + } + var string = ""; + // deal with leading zeros + for (var k = 0; source[k] === 0 && k < source.length - 1; ++k) { + string += this._leader; + } + // convert digits to a string + for (var q = digits.length - 1; q >= 0; --q) { + string += this.alphabet[digits[q]]; + } + return string; + }; + BaseX.prototype.decode = function (value) { + if (typeof (value) !== "string") { + throw new TypeError("Expected String"); + } + var bytes = []; + if (value.length === 0) { + return new Uint8Array(bytes); + } + bytes.push(0); + for (var i = 0; i < value.length; i++) { + var byte = this._alphabetMap[value[i]]; + if (byte === undefined) { + throw new Error("Non-base" + this.base + " character"); + } + var carry = byte; + for (var j = 0; j < bytes.length; ++j) { + carry += bytes[j] * this.base; + bytes[j] = carry & 0xff; + carry >>= 8; + } + while (carry > 0) { + bytes.push(carry & 0xff); + carry >>= 8; + } + } + // deal with leading zeros + for (var k = 0; value[k] === this._leader && k < value.length - 1; ++k) { + bytes.push(0); + } + return (0, bytes_1.arrayify)(new Uint8Array(bytes.reverse())); + }; + return BaseX; +}()); +exports.BaseX = BaseX; +var Base32 = new BaseX("abcdefghijklmnopqrstuvwxyz234567"); +exports.Base32 = Base32; +var Base58 = new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); +exports.Base58 = Base58; +//console.log(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj")) +//console.log(Base58.encode(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj"))) +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/lib/index.js.map b/node_modules/@ethersproject/basex/lib/index.js.map new file mode 100644 index 0000000..4af694c --- /dev/null +++ b/node_modules/@ethersproject/basex/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;;;AAEH,8CAA2D;AAC3D,wDAA2D;AAE3D;IAOI,eAAY,QAAgB;QACxB,IAAA,2BAAc,EAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC3C,IAAA,2BAAc,EAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAA,2BAAc,EAAC,IAAI,EAAE,cAAc,EAAE,EAAG,CAAC,CAAC;QAC1C,IAAA,2BAAc,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpD,2BAA2B;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SAC7C;IACL,CAAC;IAED,sBAAM,GAAN,UAAO,KAAgB;QACnB,IAAI,MAAM,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YAAE,OAAO,EAAE,CAAC;SAAE;QAEvC,IAAI,MAA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K,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SAChB;QAED,OAAO,IAAA,gBAAQ,EAAC,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;IACpD,CAAC;IACL,YAAC;AAAD,CAAC,AA3FD,IA2FC;AA3FY,sBAAK;AA6FlB,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAGpD,wBAAM;AAFf,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;AAEtE,wBAAM;AAEvB,8EAA8E;AAC9E,6FAA6F"} \ No newline at end of file diff --git a/node_modules/@ethersproject/basex/package.json b/node_modules/@ethersproject/basex/package.json new file mode 100644 index 0000000..a6e8d8d --- /dev/null +++ b/node_modules/@ethersproject/basex/package.json @@ -0,0 +1,43 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/properties": "^5.5.0" + }, + "description": "Base-X without Buffer.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/basex", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/basex", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x1a3d6f95552d8ac4c75235b76d2b0f50bc713c3f7c0622c09aac3fe239c7e1a1", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/basex/src.ts/_version.ts b/node_modules/@ethersproject/basex/src.ts/_version.ts new file mode 100644 index 0000000..b49aa55 --- /dev/null +++ b/node_modules/@ethersproject/basex/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "basex/5.5.0"; diff --git a/node_modules/@ethersproject/basex/src.ts/index.ts b/node_modules/@ethersproject/basex/src.ts/index.ts new file mode 100644 index 0000000..6f93a33 --- /dev/null +++ b/node_modules/@ethersproject/basex/src.ts/index.ts @@ -0,0 +1,143 @@ +/** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ + +import { arrayify, BytesLike } from "@ethersproject/bytes"; +import { defineReadOnly } from "@ethersproject/properties"; + +export class BaseX { + readonly alphabet: string; + readonly base: number; + + _alphabetMap: { [ character: string ]: number }; + _leader: string; + + constructor(alphabet: string) { + defineReadOnly(this, "alphabet", alphabet); + defineReadOnly(this, "base", alphabet.length); + + defineReadOnly(this, "_alphabetMap", { }); + defineReadOnly(this, "_leader", alphabet.charAt(0)); + + // pre-compute lookup table + for (let i = 0; i < alphabet.length; i++) { + this._alphabetMap[alphabet.charAt(i)] = i; + } + } + + encode(value: BytesLike): string { + let source = arrayify(value); + + if (source.length === 0) { return ""; } + + let digits = [ 0 ] + for (let i = 0; i < source.length; ++i) { + let carry = source[i]; + for (let j = 0; j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % this.base; + carry = (carry / this.base) | 0; + } + + while (carry > 0) { + digits.push(carry % this.base); + carry = (carry / this.base) | 0; + } + } + + let string = "" + + // deal with leading zeros + for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) { + string += this._leader; + } + + // convert digits to a string + for (let q = digits.length - 1; q >= 0; --q) { + string += this.alphabet[digits[q]]; + } + + return string; + } + + decode(value: string): Uint8Array { + if (typeof(value) !== "string") { + throw new TypeError("Expected String"); + } + + let bytes: Array = []; + if (value.length === 0) { return new Uint8Array(bytes); } + + bytes.push(0); + for (let i = 0; i < value.length; i++) { + let byte = this._alphabetMap[value[i]]; + + if (byte === undefined) { + throw new Error("Non-base" + this.base + " character"); + } + + let carry = byte; + for (let j = 0; j < bytes.length; ++j) { + carry += bytes[j] * this.base; + bytes[j] = carry & 0xff; + carry >>= 8; + } + + while (carry > 0) { + bytes.push(carry & 0xff); + carry >>= 8; + } + } + + // deal with leading zeros + for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) { + bytes.push(0) + } + + return arrayify(new Uint8Array(bytes.reverse())) + } +} + +const Base32 = new BaseX("abcdefghijklmnopqrstuvwxyz234567"); +const Base58 = new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); + +export { Base32, Base58 }; + +//console.log(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj")) +//console.log(Base58.encode(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj"))) diff --git a/node_modules/@ethersproject/bignumber/LICENSE.md b/node_modules/@ethersproject/bignumber/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/bignumber/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/bignumber/README.md b/node_modules/@ethersproject/bignumber/README.md new file mode 100644 index 0000000..9d19325 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/README.md @@ -0,0 +1,41 @@ +Big Numbers +=========== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for handling arbitrarily large numbers and mathematic operations. + +For more information, see the documentation for [Big Numbers](https://docs.ethers.io/v5/api/utils/bignumber/) +and [Fixed-Point Numbers](https://docs.ethers.io/v5/api/utils/fixednumber/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + BigNumber, + + FixedFormat, + FixedNumber, + + formatFixed, + + parseFixed + + // Types + + BigNumberish + +} = require("@ethersproject/bignumber"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts b/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts new file mode 100644 index 0000000..2f7c9d0 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bignumber/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/_version.js b/node_modules/@ethersproject/bignumber/lib.esm/_version.js new file mode 100644 index 0000000..9e17787 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "bignumber/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/_version.js.map b/node_modules/@ethersproject/bignumber/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts new file mode 100644 index 0000000..4864fab --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts @@ -0,0 +1,40 @@ +import { Bytes, Hexable } from "@ethersproject/bytes"; +export declare type BigNumberish = BigNumber | Bytes | bigint | string | number; +export declare function isBigNumberish(value: any): value is BigNumberish; +export declare class BigNumber implements Hexable { + readonly _hex: string; + readonly _isBigNumber: boolean; + constructor(constructorGuard: any, hex: string); + fromTwos(value: number): BigNumber; + toTwos(value: number): BigNumber; + abs(): BigNumber; + add(other: BigNumberish): BigNumber; + sub(other: BigNumberish): BigNumber; + div(other: BigNumberish): BigNumber; + mul(other: BigNumberish): BigNumber; + mod(other: BigNumberish): BigNumber; + pow(other: BigNumberish): BigNumber; + and(other: BigNumberish): BigNumber; + or(other: BigNumberish): BigNumber; + xor(other: BigNumberish): BigNumber; + mask(value: number): BigNumber; + shl(value: number): BigNumber; + shr(value: number): BigNumber; + eq(other: BigNumberish): boolean; + lt(other: BigNumberish): boolean; + lte(other: BigNumberish): boolean; + gt(other: BigNumberish): boolean; + gte(other: BigNumberish): boolean; + isNegative(): boolean; + isZero(): boolean; + toNumber(): number; + toBigInt(): bigint; + toString(): string; + toHexString(): string; + toJSON(key?: string): any; + static from(value: any): BigNumber; + static isBigNumber(value: any): value is BigNumber; +} +export declare function _base36To16(value: string): string; +export declare function _base16To36(value: string): string; +//# sourceMappingURL=bignumber.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts.map b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts.map new file mode 100644 index 0000000..e20a769 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.d.ts","sourceRoot":"","sources":["../src.ts/b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AIhC,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIjC,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIhC,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIjC,UAAU,IAAI,OAAO;IAIrB,MAAM,IAAI,OAAO;IAIjB,QAAQ,IAAI,MAAM;IASlB,QAAQ,IAAI,MAAM;IAUlB,QAAQ,IAAI,MAAM;IAiBlB,WAAW,IAAI,MAAM;IAIrB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG;IAIzB,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS;IAkElC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,SAAS;CAGrD;AAiED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js new file mode 100644 index 0000000..37d3df0 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js @@ -0,0 +1,306 @@ +"use strict"; +/** + * BigNumber + * + * A wrapper around the BN.js object. We use the BN.js library + * because it is used by elliptic, so it is required regardless. + * + */ +import _BN from "bn.js"; +var BN = _BN.BN; +import { hexlify, isBytes, isHexString } from "@ethersproject/bytes"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +const _constructorGuard = {}; +const MAX_SAFE = 0x1fffffffffffff; +export function isBigNumberish(value) { + return (value != null) && (BigNumber.isBigNumber(value) || + (typeof (value) === "number" && (value % 1) === 0) || + (typeof (value) === "string" && !!value.match(/^-?[0-9]+$/)) || + isHexString(value) || + (typeof (value) === "bigint") || + isBytes(value)); +} +// Only warn about passing 10 into radix once +let _warnedToStringRadix = false; +export class BigNumber { + constructor(constructorGuard, hex) { + logger.checkNew(new.target, BigNumber); + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot call constructor directly; use BigNumber.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new (BigNumber)" + }); + } + this._hex = hex; + this._isBigNumber = true; + Object.freeze(this); + } + fromTwos(value) { + return toBigNumber(toBN(this).fromTwos(value)); + } + toTwos(value) { + return toBigNumber(toBN(this).toTwos(value)); + } + abs() { + if (this._hex[0] === "-") { + return BigNumber.from(this._hex.substring(1)); + } + return this; + } + add(other) { + return toBigNumber(toBN(this).add(toBN(other))); + } + sub(other) { + return toBigNumber(toBN(this).sub(toBN(other))); + } + div(other) { + const o = BigNumber.from(other); + if (o.isZero()) { + throwFault("division by zero", "div"); + } + return toBigNumber(toBN(this).div(toBN(other))); + } + mul(other) { + return toBigNumber(toBN(this).mul(toBN(other))); + } + mod(other) { + const value = toBN(other); + if (value.isNeg()) { + throwFault("cannot modulo negative values", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + } + pow(other) { + const value = toBN(other); + if (value.isNeg()) { + throwFault("cannot raise to negative values", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + } + and(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'and' negative values", "and"); + } + return toBigNumber(toBN(this).and(value)); + } + or(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'or' negative values", "or"); + } + return toBigNumber(toBN(this).or(value)); + } + xor(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'xor' negative values", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + } + mask(value) { + if (this.isNegative() || value < 0) { + throwFault("cannot mask negative values", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + } + shl(value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + } + shr(value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shr"); + } + return toBigNumber(toBN(this).shrn(value)); + } + eq(other) { + return toBN(this).eq(toBN(other)); + } + lt(other) { + return toBN(this).lt(toBN(other)); + } + lte(other) { + return toBN(this).lte(toBN(other)); + } + gt(other) { + return toBN(this).gt(toBN(other)); + } + gte(other) { + return toBN(this).gte(toBN(other)); + } + isNegative() { + return (this._hex[0] === "-"); + } + isZero() { + return toBN(this).isZero(); + } + toNumber() { + try { + return toBN(this).toNumber(); + } + catch (error) { + throwFault("overflow", "toNumber", this.toString()); + } + return null; + } + toBigInt() { + try { + return BigInt(this.toString()); + } + catch (e) { } + return logger.throwError("this platform does not support BigInt", Logger.errors.UNSUPPORTED_OPERATION, { + value: this.toString() + }); + } + toString() { + // Lots of people expect this, which we do not support, so check (See: #889) + if (arguments.length > 0) { + if (arguments[0] === 10) { + if (!_warnedToStringRadix) { + _warnedToStringRadix = true; + logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); + } + } + else if (arguments[0] === 16) { + logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + else { + logger.throwError("BigNumber.toString does not accept parameters", Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + } + return toBN(this).toString(10); + } + toHexString() { + return this._hex; + } + toJSON(key) { + return { type: "BigNumber", hex: this.toHexString() }; + } + static from(value) { + if (value instanceof BigNumber) { + return value; + } + if (typeof (value) === "string") { + if (value.match(/^-?0x[0-9a-f]+$/i)) { + return new BigNumber(_constructorGuard, toHex(value)); + } + if (value.match(/^-?[0-9]+$/)) { + return new BigNumber(_constructorGuard, toHex(new BN(value))); + } + return logger.throwArgumentError("invalid BigNumber string", "value", value); + } + if (typeof (value) === "number") { + if (value % 1) { + throwFault("underflow", "BigNumber.from", value); + } + if (value >= MAX_SAFE || value <= -MAX_SAFE) { + throwFault("overflow", "BigNumber.from", value); + } + return BigNumber.from(String(value)); + } + const anyValue = value; + if (typeof (anyValue) === "bigint") { + return BigNumber.from(anyValue.toString()); + } + if (isBytes(anyValue)) { + return BigNumber.from(hexlify(anyValue)); + } + if (anyValue) { + // Hexable interface (takes priority) + if (anyValue.toHexString) { + const hex = anyValue.toHexString(); + if (typeof (hex) === "string") { + return BigNumber.from(hex); + } + } + else { + // For now, handle legacy JSON-ified values (goes away in v6) + let hex = anyValue._hex; + // New-form JSON + if (hex == null && anyValue.type === "BigNumber") { + hex = anyValue.hex; + } + if (typeof (hex) === "string") { + if (isHexString(hex) || (hex[0] === "-" && isHexString(hex.substring(1)))) { + return BigNumber.from(hex); + } + } + } + } + return logger.throwArgumentError("invalid BigNumber value", "value", value); + } + static isBigNumber(value) { + return !!(value && value._isBigNumber); + } +} +// Normalize the hex string +function toHex(value) { + // For BN, call on the hex string + if (typeof (value) !== "string") { + return toHex(value.toString(16)); + } + // If negative, prepend the negative sign to the normalized positive value + if (value[0] === "-") { + // Strip off the negative sign + value = value.substring(1); + // Cannot have multiple negative signs (e.g. "--0x04") + if (value[0] === "-") { + logger.throwArgumentError("invalid hex", "value", value); + } + // Call toHex on the positive component + value = toHex(value); + // Do not allow "-0x00" + if (value === "0x00") { + return value; + } + // Negate the value + return "-" + value; + } + // Add a "0x" prefix if missing + if (value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + // Normalize zero + if (value === "0x") { + return "0x00"; + } + // Make the string even length + if (value.length % 2) { + value = "0x0" + value.substring(2); + } + // Trim to smallest even-length string + while (value.length > 4 && value.substring(0, 4) === "0x00") { + value = "0x" + value.substring(4); + } + return value; +} +function toBigNumber(value) { + return BigNumber.from(toHex(value)); +} +function toBN(value) { + const hex = BigNumber.from(value).toHexString(); + if (hex[0] === "-") { + return (new BN("-" + hex.substring(3), 16)); + } + return new BN(hex.substring(2), 16); +} +function throwFault(fault, operation, value) { + const params = { fault: fault, operation: operation }; + if (value != null) { + params.value = value; + } + return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params); +} +// value should have no prefix +export function _base36To16(value) { + return (new BN(value, 36)).toString(16); +} +// value should have no prefix +export function _base16To36(value) { + return (new BN(value, 16)).toString(36); +} +//# sourceMappingURL=bignumber.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js.map b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js.map new file mode 100644 index 0000000..76f55bf --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.js","sourceRoot":"","sources":["../src.ts/bignumber.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb;;;;;;GAMG;AAEH,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,IAAO,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;AAEnB,OAAO,EAAkB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,MAAM,iBAAiB,GAAG,EAAG,CAAC;AAE9B,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAKlC,MAAM,UAAU,cAAc,CAAC,KAAU;IACrC,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CACtB,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;QAC5B,CAAC,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC3D,WAAW,CAAC,KAAK,CAAC;QAClB,CAAC,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC;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AC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IAChD,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QAChB,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KAC/C;IACD,OAAO,IAAI,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,SAAiB,EAAE,KAAW;IAC7D,MAAM,MAAM,GAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAC3D,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KAAE;IAE5C,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACzE,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,WAAW,CAAC,KAAa;IACrC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,WAAW,CAAC,KAAa;IACrC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts new file mode 100644 index 0000000..71d8de6 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts @@ -0,0 +1,40 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { BigNumber, BigNumberish } from "./bignumber"; +export declare function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string; +export declare function parseFixed(value: string, decimals?: BigNumberish): BigNumber; +export declare class FixedFormat { + readonly signed: boolean; + readonly width: number; + readonly decimals: number; + readonly name: string; + readonly _multiplier: string; + constructor(constructorGuard: any, signed: boolean, width: number, decimals: number); + static from(value: any): FixedFormat; +} +export declare class FixedNumber { + readonly format: FixedFormat; + readonly _hex: string; + readonly _value: string; + readonly _isFixedNumber: boolean; + constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat); + _checkFormat(other: FixedNumber): void; + addUnsafe(other: FixedNumber): FixedNumber; + subUnsafe(other: FixedNumber): FixedNumber; + mulUnsafe(other: FixedNumber): FixedNumber; + divUnsafe(other: FixedNumber): FixedNumber; + floor(): FixedNumber; + ceiling(): FixedNumber; + round(decimals?: number): FixedNumber; + isZero(): boolean; + isNegative(): boolean; + toString(): string; + toHexString(width?: number): string; + toUnsafeFloat(): number; + toFormat(format: FixedFormat | string): FixedNumber; + static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber; + static fromString(value: string, format?: FixedFormat | string | number): FixedNumber; + static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber; + static from(value: any, format?: FixedFormat | string | number): FixedNumber; + static isFixedNumber(value: any): value is FixedNumber; +} +//# sourceMappingURL=fixednumber.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts.map b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts.map new file mode 100644 index 0000000..65d23cc --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fixednumber.d.ts","sourceRoot":"","sources":["../src.ts/fixednumber.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAuB,MAAM,sBAAsB,CAAC;AAMhF,OAAO,EAAE,SAAS,EAA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AO,IAAI,WAAW;IAetB,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW;IAmBrC,MAAM,IAAI,OAAO;IAIjB,UAAU,IAAI,OAAO;IAIrB,QAAQ,IAAI,MAAM;IAElB,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM;IAOnC,aAAa,IAAI,MAAM;IAEvB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,WAAW;IAKnD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW;IAchH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW;IAwBrF,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW;IAkBvF,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM;IAqB9D,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW;CAGzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js new file mode 100644 index 0000000..0ab992a --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js @@ -0,0 +1,362 @@ +"use strict"; +import { arrayify, hexZeroPad, isBytes } from "@ethersproject/bytes"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { BigNumber, isBigNumberish } from "./bignumber"; +const _constructorGuard = {}; +const Zero = BigNumber.from(0); +const NegativeOne = BigNumber.from(-1); +function throwFault(message, fault, operation, value) { + const params = { fault: fault, operation: operation }; + if (value !== undefined) { + params.value = value; + } + return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params); +} +// Constant to pull zeros from for multipliers +let zeros = "0"; +while (zeros.length < 256) { + zeros += zeros; +} +// Returns a string "1" followed by decimal "0"s +function getMultiplier(decimals) { + if (typeof (decimals) !== "number") { + try { + decimals = BigNumber.from(decimals).toNumber(); + } + catch (e) { } + } + if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) { + return ("1" + zeros.substring(0, decimals)); + } + return logger.throwArgumentError("invalid decimal size", "decimals", decimals); +} +export function formatFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + const multiplier = getMultiplier(decimals); + // Make sure wei is a big number (convert as necessary) + value = BigNumber.from(value); + const negative = value.lt(Zero); + if (negative) { + value = value.mul(NegativeOne); + } + let fraction = value.mod(multiplier).toString(); + while (fraction.length < multiplier.length - 1) { + fraction = "0" + fraction; + } + // Strip training 0 + fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1]; + const whole = value.div(multiplier).toString(); + if (multiplier.length === 1) { + value = whole; + } + else { + value = whole + "." + fraction; + } + if (negative) { + value = "-" + value; + } + return value; +} +export function parseFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + const multiplier = getMultiplier(decimals); + if (typeof (value) !== "string" || !value.match(/^-?[0-9.]+$/)) { + logger.throwArgumentError("invalid decimal value", "value", value); + } + // Is it negative? + const negative = (value.substring(0, 1) === "-"); + if (negative) { + value = value.substring(1); + } + if (value === ".") { + logger.throwArgumentError("missing value", "value", value); + } + // Split it into a whole and fractional part + const comps = value.split("."); + if (comps.length > 2) { + logger.throwArgumentError("too many decimal points", "value", value); + } + let whole = comps[0], fraction = comps[1]; + if (!whole) { + whole = "0"; + } + if (!fraction) { + fraction = "0"; + } + // Trim trailing zeros + while (fraction[fraction.length - 1] === "0") { + fraction = fraction.substring(0, fraction.length - 1); + } + // Check the fraction doesn't exceed our decimals size + if (fraction.length > multiplier.length - 1) { + throwFault("fractional component exceeds decimals", "underflow", "parseFixed"); + } + // If decimals is 0, we have an empty string for fraction + if (fraction === "") { + fraction = "0"; + } + // Fully pad the string with zeros to get to wei + while (fraction.length < multiplier.length - 1) { + fraction += "0"; + } + const wholeValue = BigNumber.from(whole); + const fractionValue = BigNumber.from(fraction); + let wei = (wholeValue.mul(multiplier)).add(fractionValue); + if (negative) { + wei = wei.mul(NegativeOne); + } + return wei; +} +export class FixedFormat { + constructor(constructorGuard, signed, width, decimals) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.signed = signed; + this.width = width; + this.decimals = decimals; + this.name = (signed ? "" : "u") + "fixed" + String(width) + "x" + String(decimals); + this._multiplier = getMultiplier(decimals); + Object.freeze(this); + } + static from(value) { + if (value instanceof FixedFormat) { + return value; + } + if (typeof (value) === "number") { + value = `fixed128x${value}`; + } + let signed = true; + let width = 128; + let decimals = 18; + if (typeof (value) === "string") { + if (value === "fixed") { + // defaults... + } + else if (value === "ufixed") { + signed = false; + } + else { + const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/); + if (!match) { + logger.throwArgumentError("invalid fixed format", "format", value); + } + signed = (match[1] !== "u"); + width = parseInt(match[2]); + decimals = parseInt(match[3]); + } + } + else if (value) { + const check = (key, type, defaultValue) => { + if (value[key] == null) { + return defaultValue; + } + if (typeof (value[key]) !== type) { + logger.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]); + } + return value[key]; + }; + signed = check("signed", "boolean", signed); + width = check("width", "number", width); + decimals = check("decimals", "number", decimals); + } + if (width % 8) { + logger.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); + } + if (decimals > 80) { + logger.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); + } + return new FixedFormat(_constructorGuard, signed, width, decimals); + } +} +export class FixedNumber { + constructor(constructorGuard, hex, value, format) { + logger.checkNew(new.target, FixedNumber); + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.format = format; + this._hex = hex; + this._value = value; + this._isFixedNumber = true; + Object.freeze(this); + } + _checkFormat(other) { + if (this.format.name !== other.format.name) { + logger.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); + } + } + addUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format); + } + subUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format); + } + mulUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format); + } + divUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format); + } + floor() { + const comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + let result = FixedNumber.from(comps[0], this.format); + const hasFraction = !comps[1].match(/^(0*)$/); + if (this.isNegative() && hasFraction) { + result = result.subUnsafe(ONE.toFormat(result.format)); + } + return result; + } + ceiling() { + const comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + let result = FixedNumber.from(comps[0], this.format); + const hasFraction = !comps[1].match(/^(0*)$/); + if (!this.isNegative() && hasFraction) { + result = result.addUnsafe(ONE.toFormat(result.format)); + } + return result; + } + // @TODO: Support other rounding algorithms + round(decimals) { + if (decimals == null) { + decimals = 0; + } + // If we are already in range, we're done + const comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + if (decimals < 0 || decimals > 80 || (decimals % 1)) { + logger.throwArgumentError("invalid decimal count", "decimals", decimals); + } + if (comps[1].length <= decimals) { + return this; + } + const factor = FixedNumber.from("1" + zeros.substring(0, decimals), this.format); + const bump = BUMP.toFormat(this.format); + return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor); + } + isZero() { + return (this._value === "0.0" || this._value === "0"); + } + isNegative() { + return (this._value[0] === "-"); + } + toString() { return this._value; } + toHexString(width) { + if (width == null) { + return this._hex; + } + if (width % 8) { + logger.throwArgumentError("invalid byte width", "width", width); + } + const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(); + return hexZeroPad(hex, width / 8); + } + toUnsafeFloat() { return parseFloat(this.toString()); } + toFormat(format) { + return FixedNumber.fromString(this._value, format); + } + static fromValue(value, decimals, format) { + // If decimals looks more like a format, and there is no format, shift the parameters + if (format == null && decimals != null && !isBigNumberish(decimals)) { + format = decimals; + decimals = null; + } + if (decimals == null) { + decimals = 0; + } + if (format == null) { + format = "fixed"; + } + return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format)); + } + static fromString(value, format) { + if (format == null) { + format = "fixed"; + } + const fixedFormat = FixedFormat.from(format); + const numeric = parseFixed(value, fixedFormat.decimals); + if (!fixedFormat.signed && numeric.lt(Zero)) { + throwFault("unsigned value cannot be negative", "overflow", "value", value); + } + let hex = null; + if (fixedFormat.signed) { + hex = numeric.toTwos(fixedFormat.width).toHexString(); + } + else { + hex = numeric.toHexString(); + hex = hexZeroPad(hex, fixedFormat.width / 8); + } + const decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + } + static fromBytes(value, format) { + if (format == null) { + format = "fixed"; + } + const fixedFormat = FixedFormat.from(format); + if (arrayify(value).length > fixedFormat.width / 8) { + throw new Error("overflow"); + } + let numeric = BigNumber.from(value); + if (fixedFormat.signed) { + numeric = numeric.fromTwos(fixedFormat.width); + } + const hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString(); + const decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + } + static from(value, format) { + if (typeof (value) === "string") { + return FixedNumber.fromString(value, format); + } + if (isBytes(value)) { + return FixedNumber.fromBytes(value, format); + } + try { + return FixedNumber.fromValue(value, 0, format); + } + catch (error) { + // Allow NUMERIC_FAULT to bubble up + if (error.code !== Logger.errors.INVALID_ARGUMENT) { + throw error; + } + } + return logger.throwArgumentError("invalid FixedNumber value", "value", value); + } + static isFixedNumber(value) { + return !!(value && value._isFixedNumber); + } +} +const ONE = FixedNumber.from(1); +const BUMP = FixedNumber.from("0.5"); +//# sourceMappingURL=fixednumber.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js.map b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js.map new file mode 100644 index 0000000..796fe78 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fixednumber.js","sourceRoot":"","sources":["../src.ts/fixednumber.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtE,MAAM,iBAAiB,GAAG,EAAG,CAAC;AAE9B,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/B,MAAM,WAA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m/index.d.ts b/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts new file mode 100644 index 0000000..5d2c2d7 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts @@ -0,0 +1,4 @@ +export { BigNumber, BigNumberish } from "./bignumber"; +export { formatFixed, FixedFormat, FixedNumber, parseFixed } from "./fixednumber"; +export { _base16To36, _base36To16 } from "./bignumber"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts.map b/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts.map new file mode 100644 index 0000000..fad2403 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/index.js b/node_modules/@ethersproject/bignumber/lib.esm/index.js new file mode 100644 index 0000000..a2f81d6 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/index.js @@ -0,0 +1,5 @@ +export { BigNumber } from "./bignumber"; +export { formatFixed, FixedFormat, FixedNumber, parseFixed } from "./fixednumber"; +// Internal methods used by address +export { _base16To36, _base36To16 } from "./bignumber"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib.esm/index.js.map b/node_modules/@ethersproject/bignumber/lib.esm/index.js.map new file mode 100644 index 0000000..3ab92f0 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAElF,mCAAmC;AACnC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/_version.d.ts b/node_modules/@ethersproject/bignumber/lib/_version.d.ts new file mode 100644 index 0000000..2f7c9d0 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bignumber/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/_version.d.ts.map b/node_modules/@ethersproject/bignumber/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/_version.js b/node_modules/@ethersproject/bignumber/lib/_version.js new file mode 100644 index 0000000..49fc964 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "bignumber/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/_version.js.map b/node_modules/@ethersproject/bignumber/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts b/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts new file mode 100644 index 0000000..4864fab --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts @@ -0,0 +1,40 @@ +import { Bytes, Hexable } from "@ethersproject/bytes"; +export declare type BigNumberish = BigNumber | Bytes | bigint | string | number; +export declare function isBigNumberish(value: any): value is BigNumberish; +export declare class BigNumber implements Hexable { + readonly _hex: string; + readonly _isBigNumber: boolean; + constructor(constructorGuard: any, hex: string); + fromTwos(value: number): BigNumber; + toTwos(value: number): BigNumber; + abs(): BigNumber; + add(other: BigNumberish): BigNumber; + sub(other: BigNumberish): BigNumber; + div(other: BigNumberish): BigNumber; + mul(other: BigNumberish): BigNumber; + mod(other: BigNumberish): BigNumber; + pow(other: BigNumberish): BigNumber; + and(other: BigNumberish): BigNumber; + or(other: BigNumberish): BigNumber; + xor(other: BigNumberish): BigNumber; + mask(value: number): BigNumber; + shl(value: number): BigNumber; + shr(value: number): BigNumber; + eq(other: BigNumberish): boolean; + lt(other: BigNumberish): boolean; + lte(other: BigNumberish): boolean; + gt(other: BigNumberish): boolean; + gte(other: BigNumberish): boolean; + isNegative(): boolean; + isZero(): boolean; + toNumber(): number; + toBigInt(): bigint; + toString(): string; + toHexString(): string; + toJSON(key?: string): any; + static from(value: any): BigNumber; + static isBigNumber(value: any): value is BigNumber; +} +export declare function _base36To16(value: string): string; +export declare function _base16To36(value: string): string; +//# sourceMappingURL=bignumber.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts.map b/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts.map new file mode 100644 index 0000000..e20a769 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.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AAK,EAAE,YAAY,GAAG,OAAO;IAIhC,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIjC,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIhC,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIjC,UAAU,IAAI,OAAO;IAIrB,MAAM,IAAI,OAAO;IAIjB,QAAQ,IAAI,MAAM;IASlB,QAAQ,IAAI,MAAM;IAUlB,QAAQ,IAAI,MAAM;IAiBlB,WAAW,IAAI,MAAM;IAIrB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG;IAIzB,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS;IAkElC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,SAAS;CAGrD;AAiED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/bignumber.js b/node_modules/@ethersproject/bignumber/lib/bignumber.js new file mode 100644 index 0000000..6bbb010 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/bignumber.js @@ -0,0 +1,317 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports._base16To36 = exports._base36To16 = exports.BigNumber = exports.isBigNumberish = void 0; +/** + * BigNumber + * + * A wrapper around the BN.js object. We use the BN.js library + * because it is used by elliptic, so it is required regardless. + * + */ +var bn_js_1 = __importDefault(require("bn.js")); +var BN = bn_js_1.default.BN; +var bytes_1 = require("@ethersproject/bytes"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var _constructorGuard = {}; +var MAX_SAFE = 0x1fffffffffffff; +function isBigNumberish(value) { + return (value != null) && (BigNumber.isBigNumber(value) || + (typeof (value) === "number" && (value % 1) === 0) || + (typeof (value) === "string" && !!value.match(/^-?[0-9]+$/)) || + (0, bytes_1.isHexString)(value) || + (typeof (value) === "bigint") || + (0, bytes_1.isBytes)(value)); +} +exports.isBigNumberish = isBigNumberish; +// Only warn about passing 10 into radix once +var _warnedToStringRadix = false; +var BigNumber = /** @class */ (function () { + function BigNumber(constructorGuard, hex) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, BigNumber); + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot call constructor directly; use BigNumber.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new (BigNumber)" + }); + } + this._hex = hex; + this._isBigNumber = true; + Object.freeze(this); + } + BigNumber.prototype.fromTwos = function (value) { + return toBigNumber(toBN(this).fromTwos(value)); + }; + BigNumber.prototype.toTwos = function (value) { + return toBigNumber(toBN(this).toTwos(value)); + }; + BigNumber.prototype.abs = function () { + if (this._hex[0] === "-") { + return BigNumber.from(this._hex.substring(1)); + } + return this; + }; + BigNumber.prototype.add = function (other) { + return toBigNumber(toBN(this).add(toBN(other))); + }; + BigNumber.prototype.sub = function (other) { + return toBigNumber(toBN(this).sub(toBN(other))); + }; + BigNumber.prototype.div = function (other) { + var o = BigNumber.from(other); + if (o.isZero()) { + throwFault("division by zero", "div"); + } + return toBigNumber(toBN(this).div(toBN(other))); + }; + BigNumber.prototype.mul = function (other) { + return toBigNumber(toBN(this).mul(toBN(other))); + }; + BigNumber.prototype.mod = function (other) { + var value = toBN(other); + if (value.isNeg()) { + throwFault("cannot modulo negative values", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + }; + BigNumber.prototype.pow = function (other) { + var value = toBN(other); + if (value.isNeg()) { + throwFault("cannot raise to negative values", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + }; + BigNumber.prototype.and = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'and' negative values", "and"); + } + return toBigNumber(toBN(this).and(value)); + }; + BigNumber.prototype.or = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'or' negative values", "or"); + } + return toBigNumber(toBN(this).or(value)); + }; + BigNumber.prototype.xor = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'xor' negative values", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + }; + BigNumber.prototype.mask = function (value) { + if (this.isNegative() || value < 0) { + throwFault("cannot mask negative values", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + }; + BigNumber.prototype.shl = function (value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + }; + BigNumber.prototype.shr = function (value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shr"); + } + return toBigNumber(toBN(this).shrn(value)); + }; + BigNumber.prototype.eq = function (other) { + return toBN(this).eq(toBN(other)); + }; + BigNumber.prototype.lt = function (other) { + return toBN(this).lt(toBN(other)); + }; + BigNumber.prototype.lte = function (other) { + return toBN(this).lte(toBN(other)); + }; + BigNumber.prototype.gt = function (other) { + return toBN(this).gt(toBN(other)); + }; + BigNumber.prototype.gte = function (other) { + return toBN(this).gte(toBN(other)); + }; + BigNumber.prototype.isNegative = function () { + return (this._hex[0] === "-"); + }; + BigNumber.prototype.isZero = function () { + return toBN(this).isZero(); + }; + BigNumber.prototype.toNumber = function () { + try { + return toBN(this).toNumber(); + } + catch (error) { + throwFault("overflow", "toNumber", this.toString()); + } + return null; + }; + BigNumber.prototype.toBigInt = function () { + try { + return BigInt(this.toString()); + } + catch (e) { } + return logger.throwError("this platform does not support BigInt", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + value: this.toString() + }); + }; + BigNumber.prototype.toString = function () { + // Lots of people expect this, which we do not support, so check (See: #889) + if (arguments.length > 0) { + if (arguments[0] === 10) { + if (!_warnedToStringRadix) { + _warnedToStringRadix = true; + logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); + } + } + else if (arguments[0] === 16) { + logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + else { + logger.throwError("BigNumber.toString does not accept parameters", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + } + return toBN(this).toString(10); + }; + BigNumber.prototype.toHexString = function () { + return this._hex; + }; + BigNumber.prototype.toJSON = function (key) { + return { type: "BigNumber", hex: this.toHexString() }; + }; + BigNumber.from = function (value) { + if (value instanceof BigNumber) { + return value; + } + if (typeof (value) === "string") { + if (value.match(/^-?0x[0-9a-f]+$/i)) { + return new BigNumber(_constructorGuard, toHex(value)); + } + if (value.match(/^-?[0-9]+$/)) { + return new BigNumber(_constructorGuard, toHex(new BN(value))); + } + return logger.throwArgumentError("invalid BigNumber string", "value", value); + } + if (typeof (value) === "number") { + if (value % 1) { + throwFault("underflow", "BigNumber.from", value); + } + if (value >= MAX_SAFE || value <= -MAX_SAFE) { + throwFault("overflow", "BigNumber.from", value); + } + return BigNumber.from(String(value)); + } + var anyValue = value; + if (typeof (anyValue) === "bigint") { + return BigNumber.from(anyValue.toString()); + } + if ((0, bytes_1.isBytes)(anyValue)) { + return BigNumber.from((0, bytes_1.hexlify)(anyValue)); + } + if (anyValue) { + // Hexable interface (takes priority) + if (anyValue.toHexString) { + var hex = anyValue.toHexString(); + if (typeof (hex) === "string") { + return BigNumber.from(hex); + } + } + else { + // For now, handle legacy JSON-ified values (goes away in v6) + var hex = anyValue._hex; + // New-form JSON + if (hex == null && anyValue.type === "BigNumber") { + hex = anyValue.hex; + } + if (typeof (hex) === "string") { + if ((0, bytes_1.isHexString)(hex) || (hex[0] === "-" && (0, bytes_1.isHexString)(hex.substring(1)))) { + return BigNumber.from(hex); + } + } + } + } + return logger.throwArgumentError("invalid BigNumber value", "value", value); + }; + BigNumber.isBigNumber = function (value) { + return !!(value && value._isBigNumber); + }; + return BigNumber; +}()); +exports.BigNumber = BigNumber; +// Normalize the hex string +function toHex(value) { + // For BN, call on the hex string + if (typeof (value) !== "string") { + return toHex(value.toString(16)); + } + // If negative, prepend the negative sign to the normalized positive value + if (value[0] === "-") { + // Strip off the negative sign + value = value.substring(1); + // Cannot have multiple negative signs (e.g. "--0x04") + if (value[0] === "-") { + logger.throwArgumentError("invalid hex", "value", value); + } + // Call toHex on the positive component + value = toHex(value); + // Do not allow "-0x00" + if (value === "0x00") { + return value; + } + // Negate the value + return "-" + value; + } + // Add a "0x" prefix if missing + if (value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + // Normalize zero + if (value === "0x") { + return "0x00"; + } + // Make the string even length + if (value.length % 2) { + value = "0x0" + value.substring(2); + } + // Trim to smallest even-length string + while (value.length > 4 && value.substring(0, 4) === "0x00") { + value = "0x" + value.substring(4); + } + return value; +} +function toBigNumber(value) { + return BigNumber.from(toHex(value)); +} +function toBN(value) { + var hex = BigNumber.from(value).toHexString(); + if (hex[0] === "-") { + return (new BN("-" + hex.substring(3), 16)); + } + return new BN(hex.substring(2), 16); +} +function throwFault(fault, operation, value) { + var params = { fault: fault, operation: operation }; + if (value != null) { + params.value = value; + } + return logger.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params); +} +// value should have no prefix +function _base36To16(value) { + return (new BN(value, 36)).toString(16); +} +exports._base36To16 = _base36To16; +// value should have no prefix +function _base16To36(value) { + return (new BN(value, 16)).toString(36); +} +exports._base16To36 = _base16To36; +//# sourceMappingURL=bignumber.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/bignumber.js.map b/node_modules/@ethersproject/bignumber/lib/bignumber.js.map new file mode 100644 index 0000000..ea12c8d --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/bignumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.js","sourceRoot":"","sources":["../src.ts/bignumber.ts"],"names":[],"mappings":"AAAA,YAAY,CAA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CAAC,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,SAAiB,EAAE,KAAW;IAC7D,IAAM,MAAM,GAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAC3D,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KAAE;IAE5C,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,eAAM,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACzE,CAAC;AAED,8BAA8B;AAC9B,SAAgB,WAAW,CAAC,KAAa;IACrC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC5C,CAAC;AAFD,kCAEC;AAED,8BAA8B;AAC9B,SAAgB,WAAW,CAAC,KAAa;IACrC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC5C,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts b/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts new file mode 100644 index 0000000..71d8de6 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts @@ -0,0 +1,40 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { BigNumber, BigNumberish } from "./bignumber"; +export declare function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string; +export declare function parseFixed(value: string, decimals?: BigNumberish): BigNumber; +export declare class FixedFormat { + readonly signed: boolean; + readonly width: number; + readonly decimals: number; + readonly name: string; + readonly _multiplier: string; + constructor(constructorGuard: any, signed: boolean, width: number, decimals: number); + static from(value: any): FixedFormat; +} +export declare class FixedNumber { + readonly format: FixedFormat; + readonly _hex: string; + readonly _value: string; + readonly _isFixedNumber: boolean; + constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat); + _checkFormat(other: FixedNumber): void; + addUnsafe(other: FixedNumber): FixedNumber; + subUnsafe(other: FixedNumber): FixedNumber; + mulUnsafe(other: FixedNumber): FixedNumber; + divUnsafe(other: FixedNumber): FixedNumber; + floor(): FixedNumber; + ceiling(): FixedNumber; + round(decimals?: number): FixedNumber; + isZero(): boolean; + isNegative(): boolean; + toString(): string; + toHexString(width?: number): string; + toUnsafeFloat(): number; + toFormat(format: FixedFormat | string): FixedNumber; + static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber; + static fromString(value: string, format?: FixedFormat | string | number): FixedNumber; + static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber; + static from(value: any, format?: FixedFormat | string | number): FixedNumber; + static isFixedNumber(value: any): value is FixedNumber; +} +//# sourceMappingURL=fixednumber.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts.map b/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts.map new file mode 100644 index 0000000..65d23cc --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fixednumber.d.ts","sourceRoot":"","sources":["../src.ts/fixednumber.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAuB,MAAM,sBAAsB,CAAC;AAMhF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAiCtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CA0BzF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAmD5E;AAGD,qBAAa,WAAW;IACpB,QAAQ,CAAC,MAAM,EAAE,O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IAKnD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW;IAchH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW;IAwBrF,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW;IAkBvF,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM;IAqB9D,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW;CAGzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/fixednumber.js b/node_modules/@ethersproject/bignumber/lib/fixednumber.js new file mode 100644 index 0000000..f7f1581 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/fixednumber.js @@ -0,0 +1,371 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FixedNumber = exports.FixedFormat = exports.parseFixed = exports.formatFixed = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var bignumber_1 = require("./bignumber"); +var _constructorGuard = {}; +var Zero = bignumber_1.BigNumber.from(0); +var NegativeOne = bignumber_1.BigNumber.from(-1); +function throwFault(message, fault, operation, value) { + var params = { fault: fault, operation: operation }; + if (value !== undefined) { + params.value = value; + } + return logger.throwError(message, logger_1.Logger.errors.NUMERIC_FAULT, params); +} +// Constant to pull zeros from for multipliers +var zeros = "0"; +while (zeros.length < 256) { + zeros += zeros; +} +// Returns a string "1" followed by decimal "0"s +function getMultiplier(decimals) { + if (typeof (decimals) !== "number") { + try { + decimals = bignumber_1.BigNumber.from(decimals).toNumber(); + } + catch (e) { } + } + if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) { + return ("1" + zeros.substring(0, decimals)); + } + return logger.throwArgumentError("invalid decimal size", "decimals", decimals); +} +function formatFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + var multiplier = getMultiplier(decimals); + // Make sure wei is a big number (convert as necessary) + value = bignumber_1.BigNumber.from(value); + var negative = value.lt(Zero); + if (negative) { + value = value.mul(NegativeOne); + } + var fraction = value.mod(multiplier).toString(); + while (fraction.length < multiplier.length - 1) { + fraction = "0" + fraction; + } + // Strip training 0 + fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1]; + var whole = value.div(multiplier).toString(); + if (multiplier.length === 1) { + value = whole; + } + else { + value = whole + "." + fraction; + } + if (negative) { + value = "-" + value; + } + return value; +} +exports.formatFixed = formatFixed; +function parseFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + var multiplier = getMultiplier(decimals); + if (typeof (value) !== "string" || !value.match(/^-?[0-9.]+$/)) { + logger.throwArgumentError("invalid decimal value", "value", value); + } + // Is it negative? + var negative = (value.substring(0, 1) === "-"); + if (negative) { + value = value.substring(1); + } + if (value === ".") { + logger.throwArgumentError("missing value", "value", value); + } + // Split it into a whole and fractional part + var comps = value.split("."); + if (comps.length > 2) { + logger.throwArgumentError("too many decimal points", "value", value); + } + var whole = comps[0], fraction = comps[1]; + if (!whole) { + whole = "0"; + } + if (!fraction) { + fraction = "0"; + } + // Trim trailing zeros + while (fraction[fraction.length - 1] === "0") { + fraction = fraction.substring(0, fraction.length - 1); + } + // Check the fraction doesn't exceed our decimals size + if (fraction.length > multiplier.length - 1) { + throwFault("fractional component exceeds decimals", "underflow", "parseFixed"); + } + // If decimals is 0, we have an empty string for fraction + if (fraction === "") { + fraction = "0"; + } + // Fully pad the string with zeros to get to wei + while (fraction.length < multiplier.length - 1) { + fraction += "0"; + } + var wholeValue = bignumber_1.BigNumber.from(whole); + var fractionValue = bignumber_1.BigNumber.from(fraction); + var wei = (wholeValue.mul(multiplier)).add(fractionValue); + if (negative) { + wei = wei.mul(NegativeOne); + } + return wei; +} +exports.parseFixed = parseFixed; +var FixedFormat = /** @class */ (function () { + function FixedFormat(constructorGuard, signed, width, decimals) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedFormat constructor; use FixedFormat.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.signed = signed; + this.width = width; + this.decimals = decimals; + this.name = (signed ? "" : "u") + "fixed" + String(width) + "x" + String(decimals); + this._multiplier = getMultiplier(decimals); + Object.freeze(this); + } + FixedFormat.from = function (value) { + if (value instanceof FixedFormat) { + return value; + } + if (typeof (value) === "number") { + value = "fixed128x" + value; + } + var signed = true; + var width = 128; + var decimals = 18; + if (typeof (value) === "string") { + if (value === "fixed") { + // defaults... + } + else if (value === "ufixed") { + signed = false; + } + else { + var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/); + if (!match) { + logger.throwArgumentError("invalid fixed format", "format", value); + } + signed = (match[1] !== "u"); + width = parseInt(match[2]); + decimals = parseInt(match[3]); + } + } + else if (value) { + var check = function (key, type, defaultValue) { + if (value[key] == null) { + return defaultValue; + } + if (typeof (value[key]) !== type) { + logger.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]); + } + return value[key]; + }; + signed = check("signed", "boolean", signed); + width = check("width", "number", width); + decimals = check("decimals", "number", decimals); + } + if (width % 8) { + logger.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); + } + if (decimals > 80) { + logger.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); + } + return new FixedFormat(_constructorGuard, signed, width, decimals); + }; + return FixedFormat; +}()); +exports.FixedFormat = FixedFormat; +var FixedNumber = /** @class */ (function () { + function FixedNumber(constructorGuard, hex, value, format) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, FixedNumber); + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.format = format; + this._hex = hex; + this._value = value; + this._isFixedNumber = true; + Object.freeze(this); + } + FixedNumber.prototype._checkFormat = function (other) { + if (this.format.name !== other.format.name) { + logger.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); + } + }; + FixedNumber.prototype.addUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format); + }; + FixedNumber.prototype.subUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format); + }; + FixedNumber.prototype.mulUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format); + }; + FixedNumber.prototype.divUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format); + }; + FixedNumber.prototype.floor = function () { + var comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + var result = FixedNumber.from(comps[0], this.format); + var hasFraction = !comps[1].match(/^(0*)$/); + if (this.isNegative() && hasFraction) { + result = result.subUnsafe(ONE.toFormat(result.format)); + } + return result; + }; + FixedNumber.prototype.ceiling = function () { + var comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + var result = FixedNumber.from(comps[0], this.format); + var hasFraction = !comps[1].match(/^(0*)$/); + if (!this.isNegative() && hasFraction) { + result = result.addUnsafe(ONE.toFormat(result.format)); + } + return result; + }; + // @TODO: Support other rounding algorithms + FixedNumber.prototype.round = function (decimals) { + if (decimals == null) { + decimals = 0; + } + // If we are already in range, we're done + var comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + if (decimals < 0 || decimals > 80 || (decimals % 1)) { + logger.throwArgumentError("invalid decimal count", "decimals", decimals); + } + if (comps[1].length <= decimals) { + return this; + } + var factor = FixedNumber.from("1" + zeros.substring(0, decimals), this.format); + var bump = BUMP.toFormat(this.format); + return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor); + }; + FixedNumber.prototype.isZero = function () { + return (this._value === "0.0" || this._value === "0"); + }; + FixedNumber.prototype.isNegative = function () { + return (this._value[0] === "-"); + }; + FixedNumber.prototype.toString = function () { return this._value; }; + FixedNumber.prototype.toHexString = function (width) { + if (width == null) { + return this._hex; + } + if (width % 8) { + logger.throwArgumentError("invalid byte width", "width", width); + } + var hex = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(); + return (0, bytes_1.hexZeroPad)(hex, width / 8); + }; + FixedNumber.prototype.toUnsafeFloat = function () { return parseFloat(this.toString()); }; + FixedNumber.prototype.toFormat = function (format) { + return FixedNumber.fromString(this._value, format); + }; + FixedNumber.fromValue = function (value, decimals, format) { + // If decimals looks more like a format, and there is no format, shift the parameters + if (format == null && decimals != null && !(0, bignumber_1.isBigNumberish)(decimals)) { + format = decimals; + decimals = null; + } + if (decimals == null) { + decimals = 0; + } + if (format == null) { + format = "fixed"; + } + return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format)); + }; + FixedNumber.fromString = function (value, format) { + if (format == null) { + format = "fixed"; + } + var fixedFormat = FixedFormat.from(format); + var numeric = parseFixed(value, fixedFormat.decimals); + if (!fixedFormat.signed && numeric.lt(Zero)) { + throwFault("unsigned value cannot be negative", "overflow", "value", value); + } + var hex = null; + if (fixedFormat.signed) { + hex = numeric.toTwos(fixedFormat.width).toHexString(); + } + else { + hex = numeric.toHexString(); + hex = (0, bytes_1.hexZeroPad)(hex, fixedFormat.width / 8); + } + var decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + }; + FixedNumber.fromBytes = function (value, format) { + if (format == null) { + format = "fixed"; + } + var fixedFormat = FixedFormat.from(format); + if ((0, bytes_1.arrayify)(value).length > fixedFormat.width / 8) { + throw new Error("overflow"); + } + var numeric = bignumber_1.BigNumber.from(value); + if (fixedFormat.signed) { + numeric = numeric.fromTwos(fixedFormat.width); + } + var hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString(); + var decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + }; + FixedNumber.from = function (value, format) { + if (typeof (value) === "string") { + return FixedNumber.fromString(value, format); + } + if ((0, bytes_1.isBytes)(value)) { + return FixedNumber.fromBytes(value, format); + } + try { + return FixedNumber.fromValue(value, 0, format); + } + catch (error) { + // Allow NUMERIC_FAULT to bubble up + if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT) { + throw error; + } + } + return logger.throwArgumentError("invalid FixedNumber value", "value", value); + }; + FixedNumber.isFixedNumber = function (value) { + return !!(value && value._isFixedNumber); + }; + return FixedNumber; +}()); +exports.FixedNumber = FixedNumber; +var ONE = FixedNumber.from(1); +var BUMP = FixedNumber.from("0.5"); +//# sourceMappingURL=fixednumber.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/fixednumber.js.map b/node_modules/@ethersproject/bignumber/lib/fixednumber.js.map new file mode 100644 index 0000000..9785f79 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/fixednumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fixednumber.js","sourceRoot":"","sources":["../src.ts/fixednumber.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAAgF;AAEhF,gDAA+C;AAC/C,uCAAqC;AACr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AAC,CAAC;IAClF,CAAC;IAEM,yBAAa,GAApB,UAAqB,KAAU;QAC3B,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7C,CAAC;IACL,kBAAC;AAAD,CAAC,AAnND,IAmNC;AAnNY,kCAAW;AAqNxB,IAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAChC,IAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/index.d.ts b/node_modules/@ethersproject/bignumber/lib/index.d.ts new file mode 100644 index 0000000..5d2c2d7 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/index.d.ts @@ -0,0 +1,4 @@ +export { BigNumber, BigNumberish } from "./bignumber"; +export { formatFixed, FixedFormat, FixedNumber, parseFixed } from "./fixednumber"; +export { _base16To36, _base36To16 } from "./bignumber"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/index.d.ts.map b/node_modules/@ethersproject/bignumber/lib/index.d.ts.map new file mode 100644 index 0000000..fad2403 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/index.js b/node_modules/@ethersproject/bignumber/lib/index.js new file mode 100644 index 0000000..b56a00f --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/index.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports._base36To16 = exports._base16To36 = exports.parseFixed = exports.FixedNumber = exports.FixedFormat = exports.formatFixed = exports.BigNumber = void 0; +var bignumber_1 = require("./bignumber"); +Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return bignumber_1.BigNumber; } }); +var fixednumber_1 = require("./fixednumber"); +Object.defineProperty(exports, "formatFixed", { enumerable: true, get: function () { return fixednumber_1.formatFixed; } }); +Object.defineProperty(exports, "FixedFormat", { enumerable: true, get: function () { return fixednumber_1.FixedFormat; } }); +Object.defineProperty(exports, "FixedNumber", { enumerable: true, get: function () { return fixednumber_1.FixedNumber; } }); +Object.defineProperty(exports, "parseFixed", { enumerable: true, get: function () { return fixednumber_1.parseFixed; } }); +// Internal methods used by address +var bignumber_2 = require("./bignumber"); +Object.defineProperty(exports, "_base16To36", { enumerable: true, get: function () { return bignumber_2._base16To36; } }); +Object.defineProperty(exports, "_base36To16", { enumerable: true, get: function () { return bignumber_2._base36To16; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/lib/index.js.map b/node_modules/@ethersproject/bignumber/lib/index.js.map new file mode 100644 index 0000000..e4f78cc --- /dev/null +++ b/node_modules/@ethersproject/bignumber/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AAA7C,sGAAA,SAAS,OAAA;AAClB,6CAAkF;AAAzE,0GAAA,WAAW,OAAA;AAAE,0GAAA,WAAW,OAAA;AAAE,0GAAA,WAAW,OAAA;AAAE,yGAAA,UAAU,OAAA;AAE1D,mCAAmC;AACnC,yCAAuD;AAA9C,wGAAA,WAAW,OAAA;AAAE,wGAAA,WAAW,OAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bignumber/package.json b/node_modules/@ethersproject/bignumber/package.json new file mode 100644 index 0000000..38d97a6 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/package.json @@ -0,0 +1,45 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "bn.js": "^4.11.9" + }, + "description": "BigNumber library used in ethers.js.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "bignumber", + "bn" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/bignumber", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/bignumber", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xc96a25dc52eed1cbc00347b751e5beea569cdc12b2c2df276fc08a7f4d756f72", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/bignumber/src.ts/_version.ts b/node_modules/@ethersproject/bignumber/src.ts/_version.ts new file mode 100644 index 0000000..5c1f2c4 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "bignumber/5.5.0"; diff --git a/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts b/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts new file mode 100644 index 0000000..6560189 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts @@ -0,0 +1,369 @@ +"use strict"; + +/** + * BigNumber + * + * A wrapper around the BN.js object. We use the BN.js library + * because it is used by elliptic, so it is required regardless. + * + */ + +import _BN from "bn.js"; +import BN = _BN.BN; + +import { Bytes, Hexable, hexlify, isBytes, isHexString } from "@ethersproject/bytes"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +const _constructorGuard = { }; + +const MAX_SAFE = 0x1fffffffffffff; + + +export type BigNumberish = BigNumber | Bytes | bigint | string | number; + +export function isBigNumberish(value: any): value is BigNumberish { + return (value != null) && ( + BigNumber.isBigNumber(value) || + (typeof(value) === "number" && (value % 1) === 0) || + (typeof(value) === "string" && !!value.match(/^-?[0-9]+$/)) || + isHexString(value) || + (typeof(value) === "bigint") || + isBytes(value) + ); +} + +// Only warn about passing 10 into radix once +let _warnedToStringRadix = false; + +export class BigNumber implements Hexable { + readonly _hex: string; + readonly _isBigNumber: boolean; + + constructor(constructorGuard: any, hex: string) { + logger.checkNew(new.target, BigNumber); + + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot call constructor directly; use BigNumber.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new (BigNumber)" + }); + } + + this._hex = hex; + this._isBigNumber = true; + + Object.freeze(this); + } + + fromTwos(value: number): BigNumber { + return toBigNumber(toBN(this).fromTwos(value)); + } + + toTwos(value: number): BigNumber { + return toBigNumber(toBN(this).toTwos(value)); + } + + abs(): BigNumber { + if (this._hex[0] === "-") { + return BigNumber.from(this._hex.substring(1)); + } + return this; + } + + add(other: BigNumberish): BigNumber { + return toBigNumber(toBN(this).add(toBN(other))); + } + + sub(other: BigNumberish): BigNumber { + return toBigNumber(toBN(this).sub(toBN(other))); + } + + div(other: BigNumberish): BigNumber { + const o = BigNumber.from(other); + if (o.isZero()) { + throwFault("division by zero", "div"); + } + return toBigNumber(toBN(this).div(toBN(other))); + } + + mul(other: BigNumberish): BigNumber { + return toBigNumber(toBN(this).mul(toBN(other))); + } + + mod(other: BigNumberish): BigNumber { + const value = toBN(other); + if (value.isNeg()) { + throwFault("cannot modulo negative values", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + } + + pow(other: BigNumberish): BigNumber { + const value = toBN(other); + if (value.isNeg()) { + throwFault("cannot raise to negative values", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + } + + and(other: BigNumberish): BigNumber { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'and' negative values", "and"); + } + return toBigNumber(toBN(this).and(value)); + } + + or(other: BigNumberish): BigNumber { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'or' negative values", "or"); + } + return toBigNumber(toBN(this).or(value)); + } + + xor(other: BigNumberish): BigNumber { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'xor' negative values", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + } + + mask(value: number): BigNumber { + if (this.isNegative() || value < 0) { + throwFault("cannot mask negative values", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + } + + shl(value: number): BigNumber { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + } + + shr(value: number): BigNumber { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shr"); + } + return toBigNumber(toBN(this).shrn(value)); + } + + eq(other: BigNumberish): boolean { + return toBN(this).eq(toBN(other)); + } + + lt(other: BigNumberish): boolean { + return toBN(this).lt(toBN(other)); + } + + lte(other: BigNumberish): boolean { + return toBN(this).lte(toBN(other)); + } + + gt(other: BigNumberish): boolean { + return toBN(this).gt(toBN(other)); + } + + gte(other: BigNumberish): boolean { + return toBN(this).gte(toBN(other)); + } + + isNegative(): boolean { + return (this._hex[0] === "-"); + } + + isZero(): boolean { + return toBN(this).isZero(); + } + + toNumber(): number { + try { + return toBN(this).toNumber(); + } catch (error) { + throwFault("overflow", "toNumber", this.toString()); + } + return null; + } + + toBigInt(): bigint { + try { + return BigInt(this.toString()); + } catch (e) { } + + return logger.throwError("this platform does not support BigInt", Logger.errors.UNSUPPORTED_OPERATION, { + value: this.toString() + }); + } + + toString(): string { + // Lots of people expect this, which we do not support, so check (See: #889) + if (arguments.length > 0) { + if (arguments[0] === 10) { + if (!_warnedToStringRadix) { + _warnedToStringRadix = true; + logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); + } + } else if (arguments[0] === 16) { + logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger.errors.UNEXPECTED_ARGUMENT, { }); + } else { + logger.throwError("BigNumber.toString does not accept parameters", Logger.errors.UNEXPECTED_ARGUMENT, { }); + } + } + return toBN(this).toString(10); + } + + toHexString(): string { + return this._hex; + } + + toJSON(key?: string): any { + return { type: "BigNumber", hex: this.toHexString() }; + } + + static from(value: any): BigNumber { + if (value instanceof BigNumber) { return value; } + + if (typeof(value) === "string") { + if (value.match(/^-?0x[0-9a-f]+$/i)) { + return new BigNumber(_constructorGuard, toHex(value)); + } + + if (value.match(/^-?[0-9]+$/)) { + return new BigNumber(_constructorGuard, toHex(new BN(value))); + } + + return logger.throwArgumentError("invalid BigNumber string", "value", value); + } + + if (typeof(value) === "number") { + if (value % 1) { + throwFault("underflow", "BigNumber.from", value); + } + + if (value >= MAX_SAFE || value <= -MAX_SAFE) { + throwFault("overflow", "BigNumber.from", value); + } + + return BigNumber.from(String(value)); + } + + const anyValue = value; + + if (typeof(anyValue) === "bigint") { + return BigNumber.from(anyValue.toString()); + } + + if (isBytes(anyValue)) { + return BigNumber.from(hexlify(anyValue)); + } + + if (anyValue) { + + // Hexable interface (takes priority) + if (anyValue.toHexString) { + const hex = anyValue.toHexString(); + if (typeof(hex) === "string") { + return BigNumber.from(hex); + } + + } else { + // For now, handle legacy JSON-ified values (goes away in v6) + let hex = anyValue._hex; + + // New-form JSON + if (hex == null && anyValue.type === "BigNumber") { + hex = anyValue.hex; + } + + if (typeof(hex) === "string") { + if (isHexString(hex) || (hex[0] === "-" && isHexString(hex.substring(1)))) { + return BigNumber.from(hex); + } + } + } + } + + return logger.throwArgumentError("invalid BigNumber value", "value", value); + } + + static isBigNumber(value: any): value is BigNumber { + return !!(value && value._isBigNumber); + } +} + +// Normalize the hex string +function toHex(value: string | BN): string { + + // For BN, call on the hex string + if (typeof(value) !== "string") { + return toHex(value.toString(16)); + } + + // If negative, prepend the negative sign to the normalized positive value + if (value[0] === "-") { + // Strip off the negative sign + value = value.substring(1); + + // Cannot have multiple negative signs (e.g. "--0x04") + if (value[0] === "-") { logger.throwArgumentError("invalid hex", "value", value); } + + // Call toHex on the positive component + value = toHex(value); + + // Do not allow "-0x00" + if (value === "0x00") { return value; } + + // Negate the value + return "-" + value; + } + + // Add a "0x" prefix if missing + if (value.substring(0, 2) !== "0x") { value = "0x" + value; } + + // Normalize zero + if (value === "0x") { return "0x00"; } + + // Make the string even length + if (value.length % 2) { value = "0x0" + value.substring(2); } + + // Trim to smallest even-length string + while (value.length > 4 && value.substring(0, 4) === "0x00") { + value = "0x" + value.substring(4); + } + + return value; +} + +function toBigNumber(value: BN): BigNumber { + return BigNumber.from(toHex(value)); +} + +function toBN(value: BigNumberish): BN { + const hex = BigNumber.from(value).toHexString(); + if (hex[0] === "-") { + return (new BN("-" + hex.substring(3), 16)); + } + return new BN(hex.substring(2), 16); +} + +function throwFault(fault: string, operation: string, value?: any): never { + const params: any = { fault: fault, operation: operation }; + if (value != null) { params.value = value; } + + return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params); +} + +// value should have no prefix +export function _base36To16(value: string): string { + return (new BN(value, 36)).toString(16); +} + +// value should have no prefix +export function _base16To36(value: string): string { + return (new BN(value, 16)).toString(36); +} diff --git a/node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts b/node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts new file mode 100644 index 0000000..4b615c2 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts @@ -0,0 +1,411 @@ +"use strict"; + +import { arrayify, BytesLike, hexZeroPad, isBytes } from "@ethersproject/bytes"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { BigNumber, BigNumberish, isBigNumberish } from "./bignumber"; + +const _constructorGuard = { }; + +const Zero = BigNumber.from(0); +const NegativeOne = BigNumber.from(-1); + +function throwFault(message: string, fault: string, operation: string, value?: any): never { + const params: any = { fault: fault, operation: operation }; + if (value !== undefined) { params.value = value; } + return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params); +} + +// Constant to pull zeros from for multipliers +let zeros = "0"; +while (zeros.length < 256) { zeros += zeros; } + +// Returns a string "1" followed by decimal "0"s +function getMultiplier(decimals: BigNumberish): string { + + if (typeof(decimals) !== "number") { + try { + decimals = BigNumber.from(decimals).toNumber(); + } catch (e) { } + } + + if (typeof(decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) { + return ("1" + zeros.substring(0, decimals)); + } + + return logger.throwArgumentError("invalid decimal size", "decimals", decimals); +} + +export function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string { + if (decimals == null) { decimals = 0; } + const multiplier = getMultiplier(decimals); + + // Make sure wei is a big number (convert as necessary) + value = BigNumber.from(value); + + const negative = value.lt(Zero); + if (negative) { value = value.mul(NegativeOne); } + + let fraction = value.mod(multiplier).toString(); + while (fraction.length < multiplier.length - 1) { fraction = "0" + fraction; } + + // Strip training 0 + fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1]; + + const whole = value.div(multiplier).toString(); + if (multiplier.length === 1) { + value = whole; + } else { + value = whole + "." + fraction; + } + + if (negative) { value = "-" + value; } + + return value; +} + +export function parseFixed(value: string, decimals?: BigNumberish): BigNumber { + + if (decimals == null) { decimals = 0; } + const multiplier = getMultiplier(decimals); + + if (typeof(value) !== "string" || !value.match(/^-?[0-9.]+$/)) { + logger.throwArgumentError("invalid decimal value", "value", value); + } + + // Is it negative? + const negative = (value.substring(0, 1) === "-"); + if (negative) { value = value.substring(1); } + + if (value === ".") { + logger.throwArgumentError("missing value", "value", value); + } + + // Split it into a whole and fractional part + const comps = value.split("."); + if (comps.length > 2) { + logger.throwArgumentError("too many decimal points", "value", value); + } + + let whole = comps[0], fraction = comps[1]; + if (!whole) { whole = "0"; } + if (!fraction) { fraction = "0"; } + + // Trim trailing zeros + while (fraction[fraction.length - 1] === "0") { + fraction = fraction.substring(0, fraction.length - 1); + } + + // Check the fraction doesn't exceed our decimals size + if (fraction.length > multiplier.length - 1) { + throwFault("fractional component exceeds decimals", "underflow", "parseFixed"); + } + + // If decimals is 0, we have an empty string for fraction + if (fraction === "") { fraction = "0"; } + + // Fully pad the string with zeros to get to wei + while (fraction.length < multiplier.length - 1) { fraction += "0"; } + + const wholeValue = BigNumber.from(whole); + const fractionValue = BigNumber.from(fraction); + + let wei = (wholeValue.mul(multiplier)).add(fractionValue); + + if (negative) { wei = wei.mul(NegativeOne); } + + return wei; +} + + +export class FixedFormat { + readonly signed: boolean; + readonly width: number; + readonly decimals: number; + readonly name: string; + readonly _multiplier: string; + + constructor(constructorGuard: any, signed: boolean, width: number, decimals: number) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + + this.signed = signed; + this.width = width; + this.decimals = decimals; + + this.name = (signed ? "": "u") + "fixed" + String(width) + "x" + String(decimals); + + this._multiplier = getMultiplier(decimals); + + Object.freeze(this); + } + + static from(value: any): FixedFormat { + if (value instanceof FixedFormat) { return value; } + + if (typeof(value) === "number") { + value = `fixed128x${value}` + } + + let signed = true; + let width = 128; + let decimals = 18; + + if (typeof(value) === "string") { + if (value === "fixed") { + // defaults... + } else if (value === "ufixed") { + signed = false; + } else { + const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/); + if (!match) { logger.throwArgumentError("invalid fixed format", "format", value); } + signed = (match[1] !== "u"); + width = parseInt(match[2]); + decimals = parseInt(match[3]); + } + } else if (value) { + const check = (key: string, type: string, defaultValue: any): any => { + if (value[key] == null) { return defaultValue; } + if (typeof(value[key]) !== type) { + logger.throwArgumentError("invalid fixed format (" + key + " not " + type +")", "format." + key, value[key]); + } + return value[key]; + } + signed = check("signed", "boolean", signed); + width = check("width", "number", width); + decimals = check("decimals", "number", decimals); + } + + if (width % 8) { + logger.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); + } + + if (decimals > 80) { + logger.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); + } + + return new FixedFormat(_constructorGuard, signed, width, decimals); + } +} + +export class FixedNumber { + readonly format: FixedFormat; + readonly _hex: string; + readonly _value: string; + + readonly _isFixedNumber: boolean; + + constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat) { + logger.checkNew(new.target, FixedNumber); + + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + + this.format = format; + this._hex = hex; + this._value = value; + + this._isFixedNumber = true; + + Object.freeze(this); + } + + _checkFormat(other: FixedNumber): void { + if (this.format.name !== other.format.name) { + logger.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); + } + } + + addUnsafe(other: FixedNumber): FixedNumber { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format); + } + + subUnsafe(other: FixedNumber): FixedNumber { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format); + } + + mulUnsafe(other: FixedNumber): FixedNumber { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format); + } + + divUnsafe(other: FixedNumber): FixedNumber { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format); + } + + floor(): FixedNumber { + const comps = this.toString().split("."); + if (comps.length === 1) { comps.push("0"); } + + let result = FixedNumber.from(comps[0], this.format); + + const hasFraction = !comps[1].match(/^(0*)$/); + if (this.isNegative() && hasFraction) { + result = result.subUnsafe(ONE.toFormat(result.format)); + } + + return result; + } + + ceiling(): FixedNumber { + const comps = this.toString().split("."); + if (comps.length === 1) { comps.push("0"); } + + let result = FixedNumber.from(comps[0], this.format); + + const hasFraction = !comps[1].match(/^(0*)$/); + if (!this.isNegative() && hasFraction) { + result = result.addUnsafe(ONE.toFormat(result.format)); + } + + return result; + } + + // @TODO: Support other rounding algorithms + round(decimals?: number): FixedNumber { + if (decimals == null) { decimals = 0; } + + // If we are already in range, we're done + const comps = this.toString().split("."); + if (comps.length === 1) { comps.push("0"); } + + if (decimals < 0 || decimals > 80 || (decimals % 1)) { + logger.throwArgumentError("invalid decimal count", "decimals", decimals); + } + + if (comps[1].length <= decimals) { return this; } + + const factor = FixedNumber.from("1" + zeros.substring(0, decimals), this.format); + const bump = BUMP.toFormat(this.format); + + return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor); + } + + isZero(): boolean { + return (this._value === "0.0" || this._value === "0"); + } + + isNegative(): boolean { + return (this._value[0] === "-"); + } + + toString(): string { return this._value; } + + toHexString(width?: number): string { + if (width == null) { return this._hex; } + if (width % 8) { logger.throwArgumentError("invalid byte width", "width", width); } + const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(); + return hexZeroPad(hex, width / 8); + } + + toUnsafeFloat(): number { return parseFloat(this.toString()); } + + toFormat(format: FixedFormat | string): FixedNumber { + return FixedNumber.fromString(this._value, format); + } + + + static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber { + // If decimals looks more like a format, and there is no format, shift the parameters + if (format == null && decimals != null && !isBigNumberish(decimals)) { + format = decimals; + decimals = null; + } + + if (decimals == null) { decimals = 0; } + if (format == null) { format = "fixed"; } + + return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format)); + } + + + static fromString(value: string, format?: FixedFormat | string | number): FixedNumber { + if (format == null) { format = "fixed"; } + + const fixedFormat = FixedFormat.from(format); + + const numeric = parseFixed(value, fixedFormat.decimals); + + if (!fixedFormat.signed && numeric.lt(Zero)) { + throwFault("unsigned value cannot be negative", "overflow", "value", value); + } + + let hex: string = null; + if (fixedFormat.signed) { + hex = numeric.toTwos(fixedFormat.width).toHexString(); + } else { + hex = numeric.toHexString(); + hex = hexZeroPad(hex, fixedFormat.width / 8); + } + + const decimal = formatFixed(numeric, fixedFormat.decimals); + + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + } + + static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber { + if (format == null) { format = "fixed"; } + + const fixedFormat = FixedFormat.from(format); + + if (arrayify(value).length > fixedFormat.width / 8) { + throw new Error("overflow"); + } + + let numeric = BigNumber.from(value); + if (fixedFormat.signed) { numeric = numeric.fromTwos(fixedFormat.width); } + + const hex = numeric.toTwos((fixedFormat.signed ? 0: 1) + fixedFormat.width).toHexString(); + const decimal = formatFixed(numeric, fixedFormat.decimals); + + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + } + + static from(value: any, format?: FixedFormat | string | number) { + if (typeof(value) === "string") { + return FixedNumber.fromString(value, format); + } + + if (isBytes(value)) { + return FixedNumber.fromBytes(value, format); + } + + try { + return FixedNumber.fromValue(value, 0, format); + } catch (error) { + // Allow NUMERIC_FAULT to bubble up + if (error.code !== Logger.errors.INVALID_ARGUMENT) { + throw error; + } + } + + return logger.throwArgumentError("invalid FixedNumber value", "value", value); + } + + static isFixedNumber(value: any): value is FixedNumber { + return !!(value && value._isFixedNumber); + } +} + +const ONE = FixedNumber.from(1); +const BUMP = FixedNumber.from("0.5"); diff --git a/node_modules/@ethersproject/bignumber/src.ts/index.ts b/node_modules/@ethersproject/bignumber/src.ts/index.ts new file mode 100644 index 0000000..b089018 --- /dev/null +++ b/node_modules/@ethersproject/bignumber/src.ts/index.ts @@ -0,0 +1,5 @@ +export { BigNumber, BigNumberish } from "./bignumber"; +export { formatFixed, FixedFormat, FixedNumber, parseFixed } from "./fixednumber"; + +// Internal methods used by address +export { _base16To36, _base36To16 } from "./bignumber"; diff --git a/node_modules/@ethersproject/bignumber/thirdparty.d.ts b/node_modules/@ethersproject/bignumber/thirdparty.d.ts new file mode 100644 index 0000000..376001f --- /dev/null +++ b/node_modules/@ethersproject/bignumber/thirdparty.d.ts @@ -0,0 +1,38 @@ +declare module "bn.js" { + export class BN { + constructor(value: string | number, radix?: number); + + add(other: BN): BN; + sub(other: BN): BN; + div(other: BN): BN; + mod(other: BN): BN; + mul(other: BN): BN; + + pow(other: BN): BN; + umod(other: BN): BN; + + eq(other: BN): boolean; + lt(other: BN): boolean; + lte(other: BN): boolean; + gt(other: BN): boolean; + gte(other: BN): boolean; + + isNeg(): boolean; + isZero(): boolean; + + toTwos(other: number): BN; + fromTwos(other: number): BN; + + or(other: BN): BN; + and(other: BN): BN; + xor(other: BN): BN; + shln(other: number): BN; + shrn(other: number): BN; + maskn(other: number): BN; + + toString(radix: number): string; + toNumber(): number; + toArray(endian: string, width: number): Uint8Array; + encode(encoding: string, compact: boolean): Uint8Array; + } +} diff --git a/node_modules/@ethersproject/bytes/LICENSE.md b/node_modules/@ethersproject/bytes/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/bytes/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/bytes/README.md b/node_modules/@ethersproject/bytes/README.md new file mode 100644 index 0000000..865325e --- /dev/null +++ b/node_modules/@ethersproject/bytes/README.md @@ -0,0 +1,64 @@ +Byte Manipulation +================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for manipulating binary data. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/bytes/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + isBytesLike, + isBytes, + + arrayify, + + concat, + + stripZeros, + zeroPad, + + isHexString, + hexlify, + + hexDataLength, + hexDataSlice, + hexConcat, + + hexValue, + + hexStripZeros, + hexZeroPad, + + splitSignature, + joinSignature, + + // Types + + Bytes, + BytesLike, + + DataOptions, + + Hexable, + + SignatureLike, + Signature + +} = require("@ethersproject/bytes"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts b/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts new file mode 100644 index 0000000..27c98b3 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bytes/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/_version.js b/node_modules/@ethersproject/bytes/lib.esm/_version.js new file mode 100644 index 0000000..84bb2c0 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "bytes/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/_version.js.map b/node_modules/@ethersproject/bytes/lib.esm/_version.js.map new file mode 100644 index 0000000..2b36b38 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/index.d.ts b/node_modules/@ethersproject/bytes/lib.esm/index.d.ts new file mode 100644 index 0000000..020dd2d --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/index.d.ts @@ -0,0 +1,40 @@ +export declare type Bytes = ArrayLike; +export declare type BytesLike = Bytes | string; +export declare type DataOptions = { + allowMissingPrefix?: boolean; + hexPad?: "left" | "right" | null; +}; +export interface Hexable { + toHexString(): string; +} +export declare type SignatureLike = { + r: string; + s?: string; + _vs?: string; + recoveryParam?: number; + v?: number; +} | BytesLike; +export interface Signature { + r: string; + s: string; + _vs: string; + recoveryParam: number; + v: number; +} +export declare function isBytesLike(value: any): value is BytesLike; +export declare function isBytes(value: any): value is Bytes; +export declare function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array; +export declare function concat(items: ReadonlyArray): Uint8Array; +export declare function stripZeros(value: BytesLike): Uint8Array; +export declare function zeroPad(value: BytesLike, length: number): Uint8Array; +export declare function isHexString(value: any, length?: number): boolean; +export declare function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string; +export declare function hexDataLength(data: BytesLike): number; +export declare function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string; +export declare function hexConcat(items: ReadonlyArray): string; +export declare function hexValue(value: BytesLike | Hexable | number | bigint): string; +export declare function hexStripZeros(value: BytesLike): string; +export declare function hexZeroPad(value: BytesLike, length: number): string; +export declare function splitSignature(signature: SignatureLike): Signature; +export declare function joinSignature(signature: SignatureLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/index.d.ts.map b/node_modules/@ethersproject/bytes/lib.esm/index.d.ts.map new file mode 100644 index 0000000..12bbf71 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AASA,oBAAY,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAEtC,oBAAY,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvC,oBAAY,WAAW,GAAG;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,OAAO;IACpB,WAAW,IAAI,MAAM,CAAC;CACzB;AAYD,oBAAY,aAAa,GAAI;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,SAAS,CAAC;AAEd,MAAM,WAAW,SAAS;IACtB,CAAC,EAAE,MAAM,CAAC;IAEV,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,MAAM,CAAC;IAEZ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AAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgBnE;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,CA0HlE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa,GAAG,MAAM,CAQ9D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/index.js b/node_modules/@ethersproject/bytes/lib.esm/index.js new file mode 100644 index 0000000..6415b66 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/index.js @@ -0,0 +1,396 @@ +"use strict"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +/////////////////////////////// +function isHexable(value) { + return !!(value.toHexString); +} +function addSlice(array) { + if (array.slice) { + return array; + } + array.slice = function () { + const args = Array.prototype.slice.call(arguments); + return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args))); + }; + return array; +} +export function isBytesLike(value) { + return ((isHexString(value) && !(value.length % 2)) || isBytes(value)); +} +function isInteger(value) { + return (typeof (value) === "number" && value == value && (value % 1) === 0); +} +export function isBytes(value) { + if (value == null) { + return false; + } + if (value.constructor === Uint8Array) { + return true; + } + if (typeof (value) === "string") { + return false; + } + if (!isInteger(value.length) || value.length < 0) { + return false; + } + for (let i = 0; i < value.length; i++) { + const v = value[i]; + if (!isInteger(v) || v < 0 || v >= 256) { + return false; + } + } + return true; +} +export function arrayify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid arrayify value"); + const result = []; + while (value) { + result.unshift(value & 0xff); + value = parseInt(String(value / 256)); + } + if (result.length === 0) { + result.push(0); + } + return addSlice(new Uint8Array(result)); + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + value = value.toHexString(); + } + if (isHexString(value)) { + let hex = value.substring(2); + if (hex.length % 2) { + if (options.hexPad === "left") { + hex = "0x0" + hex.substring(2); + } + else if (options.hexPad === "right") { + hex += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + const result = []; + for (let i = 0; i < hex.length; i += 2) { + result.push(parseInt(hex.substring(i, i + 2), 16)); + } + return addSlice(new Uint8Array(result)); + } + if (isBytes(value)) { + return addSlice(new Uint8Array(value)); + } + return logger.throwArgumentError("invalid arrayify value", "value", value); +} +export function concat(items) { + const objects = items.map(item => arrayify(item)); + const length = objects.reduce((accum, item) => (accum + item.length), 0); + const result = new Uint8Array(length); + objects.reduce((offset, object) => { + result.set(object, offset); + return offset + object.length; + }, 0); + return addSlice(result); +} +export function stripZeros(value) { + let result = arrayify(value); + if (result.length === 0) { + return result; + } + // Find the first non-zero entry + let start = 0; + while (start < result.length && result[start] === 0) { + start++; + } + // If we started with zeros, strip them + if (start) { + result = result.slice(start); + } + return result; +} +export function zeroPad(value, length) { + value = arrayify(value); + if (value.length > length) { + logger.throwArgumentError("value out of range", "value", arguments[0]); + } + const result = new Uint8Array(length); + result.set(value, length - value.length); + return addSlice(result); +} +export function isHexString(value, length) { + if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + if (length && value.length !== 2 + 2 * length) { + return false; + } + return true; +} +const HexCharacters = "0123456789abcdef"; +export function hexlify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid hexlify value"); + let hex = ""; + while (value) { + hex = HexCharacters[value & 0xf] + hex; + value = Math.floor(value / 16); + } + if (hex.length) { + if (hex.length % 2) { + hex = "0" + hex; + } + return "0x" + hex; + } + return "0x00"; + } + if (typeof (value) === "bigint") { + value = value.toString(16); + if (value.length % 2) { + return ("0x0" + value); + } + return "0x" + value; + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + return value.toHexString(); + } + if (isHexString(value)) { + if (value.length % 2) { + if (options.hexPad === "left") { + value = "0x0" + value.substring(2); + } + else if (options.hexPad === "right") { + value += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + return value.toLowerCase(); + } + if (isBytes(value)) { + let result = "0x"; + for (let i = 0; i < value.length; i++) { + let v = value[i]; + result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; + } + return result; + } + return logger.throwArgumentError("invalid hexlify value", "value", value); +} +/* +function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number { + if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") { + return "0x0" + value.substring(2); + } + return value; +} +*/ +export function hexDataLength(data) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + return null; + } + return (data.length - 2) / 2; +} +export function hexDataSlice(data, offset, endOffset) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + logger.throwArgumentError("invalid hexData", "value", data); + } + offset = 2 + 2 * offset; + if (endOffset != null) { + return "0x" + data.substring(offset, 2 + 2 * endOffset); + } + return "0x" + data.substring(offset); +} +export function hexConcat(items) { + let result = "0x"; + items.forEach((item) => { + result += hexlify(item).substring(2); + }); + return result; +} +export function hexValue(value) { + const trimmed = hexStripZeros(hexlify(value, { hexPad: "left" })); + if (trimmed === "0x") { + return "0x0"; + } + return trimmed; +} +export function hexStripZeros(value) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + value = value.substring(2); + let offset = 0; + while (offset < value.length && value[offset] === "0") { + offset++; + } + return "0x" + value.substring(offset); +} +export function hexZeroPad(value, length) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + else if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + if (value.length > 2 * length + 2) { + logger.throwArgumentError("value out of range", "value", arguments[1]); + } + while (value.length < 2 * length + 2) { + value = "0x0" + value.substring(2); + } + return value; +} +export function splitSignature(signature) { + const result = { + r: "0x", + s: "0x", + _vs: "0x", + recoveryParam: 0, + v: 0 + }; + if (isBytesLike(signature)) { + const bytes = arrayify(signature); + if (bytes.length !== 65) { + logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature); + } + // Get the r, s and v + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + // Allow a recid to be used as the v + if (result.v < 27) { + if (result.v === 0 || result.v === 1) { + result.v += 27; + } + else { + logger.throwArgumentError("signature invalid v byte", "signature", signature); + } + } + // Compute recoveryParam from v + result.recoveryParam = 1 - (result.v % 2); + // Compute _vs from recoveryParam and s + if (result.recoveryParam) { + bytes[32] |= 0x80; + } + result._vs = hexlify(bytes.slice(32, 64)); + } + else { + result.r = signature.r; + result.s = signature.s; + result.v = signature.v; + result.recoveryParam = signature.recoveryParam; + result._vs = signature._vs; + // If the _vs is available, use it to populate missing s, v and recoveryParam + // and verify non-missing s, v and recoveryParam + if (result._vs != null) { + const vs = zeroPad(arrayify(result._vs), 32); + result._vs = hexlify(vs); + // Set or check the recid + const recoveryParam = ((vs[0] >= 128) ? 1 : 0); + if (result.recoveryParam == null) { + result.recoveryParam = recoveryParam; + } + else if (result.recoveryParam !== recoveryParam) { + logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature); + } + // Set or check the s + vs[0] &= 0x7f; + const s = hexlify(vs); + if (result.s == null) { + result.s = s; + } + else if (result.s !== s) { + logger.throwArgumentError("signature v mismatch _vs", "signature", signature); + } + } + // Use recid and v to populate each other + if (result.recoveryParam == null) { + if (result.v == null) { + logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature); + } + else if (result.v === 0 || result.v === 1) { + result.recoveryParam = result.v; + } + else { + result.recoveryParam = 1 - (result.v % 2); + } + } + else { + if (result.v == null) { + result.v = 27 + result.recoveryParam; + } + else { + const recId = (result.v === 0 || result.v === 1) ? result.v : (1 - (result.v % 2)); + if (result.recoveryParam !== recId) { + logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature); + } + } + } + if (result.r == null || !isHexString(result.r)) { + logger.throwArgumentError("signature missing or invalid r", "signature", signature); + } + else { + result.r = hexZeroPad(result.r, 32); + } + if (result.s == null || !isHexString(result.s)) { + logger.throwArgumentError("signature missing or invalid s", "signature", signature); + } + else { + result.s = hexZeroPad(result.s, 32); + } + const vs = arrayify(result.s); + if (vs[0] >= 128) { + logger.throwArgumentError("signature s out of range", "signature", signature); + } + if (result.recoveryParam) { + vs[0] |= 0x80; + } + const _vs = hexlify(vs); + if (result._vs) { + if (!isHexString(result._vs)) { + logger.throwArgumentError("signature invalid _vs", "signature", signature); + } + result._vs = hexZeroPad(result._vs, 32); + } + // Set or check the _vs + if (result._vs == null) { + result._vs = _vs; + } + else if (result._vs !== _vs) { + logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature); + } + } + return result; +} +export function joinSignature(signature) { + signature = splitSignature(signature); + return hexlify(concat([ + signature.r, + signature.s, + (signature.recoveryParam ? "0x1c" : "0x1b") + ])); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib.esm/index.js.map b/node_modules/@ethersproject/bytes/lib.esm/index.js.map new file mode 100644 index 0000000..7b0e1de --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AA8CnC,+BAA+B;AAG/B,SAAS,SAAS,CAAC,KAAU;IACzB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAiB;IAC/B,IAAI,KAAK,CAA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;aAC9E;YACD,MAAM,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;SAC3C;QAED,uBAAuB;QACvB,IAAI,MAAM,CAAC,GAAG,IAAI,IAAI,EAAE;YACpB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;SACpB;aAAM,IAAI,MAAM,CAAC,GAAG,KAAK,GAAG,EAAE;YAC3B,MAAM,CAAC,kBAAkB,CAAC,gCAAgC,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SACvF;KACJ;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,SAAwB;IAClD,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,MAAM,CAAC;QACjB,SAAS,CAAC,CAAC;QACX,SAAS,CAAC,CAAC;QACX,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAA,CAAC,CAAC,MAAM,CAAC;KAC9C,CAAC,CAAC,CAAC;AACR,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/_version.d.ts b/node_modules/@ethersproject/bytes/lib/_version.d.ts new file mode 100644 index 0000000..27c98b3 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bytes/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/_version.d.ts.map b/node_modules/@ethersproject/bytes/lib/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/_version.js b/node_modules/@ethersproject/bytes/lib/_version.js new file mode 100644 index 0000000..c1bfa14 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "bytes/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/_version.js.map b/node_modules/@ethersproject/bytes/lib/_version.js.map new file mode 100644 index 0000000..2f9c571 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/index.d.ts b/node_modules/@ethersproject/bytes/lib/index.d.ts new file mode 100644 index 0000000..020dd2d --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/index.d.ts @@ -0,0 +1,40 @@ +export declare type Bytes = ArrayLike; +export declare type BytesLike = Bytes | string; +export declare type DataOptions = { + allowMissingPrefix?: boolean; + hexPad?: "left" | "right" | null; +}; +export interface Hexable { + toHexString(): string; +} +export declare type SignatureLike = { + r: string; + s?: string; + _vs?: string; + recoveryParam?: number; + v?: number; +} | BytesLike; +export interface Signature { + r: string; + s: string; + _vs: string; + recoveryParam: number; + v: number; +} +export declare function isBytesLike(value: any): value is BytesLike; +export declare function isBytes(value: any): value is Bytes; +export declare function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array; +export declare function concat(items: ReadonlyArray): Uint8Array; +export declare function stripZeros(value: BytesLike): Uint8Array; +export declare function zeroPad(value: BytesLike, length: number): Uint8Array; +export declare function isHexString(value: any, length?: number): boolean; +export declare function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string; +export declare function hexDataLength(data: BytesLike): number; +export declare function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string; +export declare function hexConcat(items: ReadonlyArray): string; +export declare function hexValue(value: BytesLike | Hexable | number | bigint): string; +export declare function hexStripZeros(value: BytesLike): string; +export declare function hexZeroPad(value: BytesLike, length: number): string; +export declare function splitSignature(signature: SignatureLike): Signature; +export declare function joinSignature(signature: SignatureLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/index.d.ts.map b/node_modules/@ethersproject/bytes/lib/index.d.ts.map new file mode 100644 index 0000000..12bbf71 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AASA,oBAAY,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAEtC,oBAAY,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvC,oBAAY,WAAW,GAAG;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,OAAO;IACpB,WAAW,IAAI,MAAM,CAAC;CACzB;AAYD,oBAAY,aAAa,GAAI;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,SAAS,CAAC;AAEd,MAAM,WAAW,SAAS;IACtB,CAAC,EAAE,MAAM,CAAC;IAEV,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,MAAM,CAAC;IAEZ,aAAa,EAAE,MAAM,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;CACb;AAoBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,SAAS,CAE1D;AAMD,wBAAgB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AAE,aAAa,GAAG,MAAM,CAQ9D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/index.js b/node_modules/@ethersproject/bytes/lib/index.js new file mode 100644 index 0000000..46066ce --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/index.js @@ -0,0 +1,414 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinSignature = exports.splitSignature = exports.hexZeroPad = exports.hexStripZeros = exports.hexValue = exports.hexConcat = exports.hexDataSlice = exports.hexDataLength = exports.hexlify = exports.isHexString = exports.zeroPad = exports.stripZeros = exports.concat = exports.arrayify = exports.isBytes = exports.isBytesLike = void 0; +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +/////////////////////////////// +function isHexable(value) { + return !!(value.toHexString); +} +function addSlice(array) { + if (array.slice) { + return array; + } + array.slice = function () { + var args = Array.prototype.slice.call(arguments); + return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args))); + }; + return array; +} +function isBytesLike(value) { + return ((isHexString(value) && !(value.length % 2)) || isBytes(value)); +} +exports.isBytesLike = isBytesLike; +function isInteger(value) { + return (typeof (value) === "number" && value == value && (value % 1) === 0); +} +function isBytes(value) { + if (value == null) { + return false; + } + if (value.constructor === Uint8Array) { + return true; + } + if (typeof (value) === "string") { + return false; + } + if (!isInteger(value.length) || value.length < 0) { + return false; + } + for (var i = 0; i < value.length; i++) { + var v = value[i]; + if (!isInteger(v) || v < 0 || v >= 256) { + return false; + } + } + return true; +} +exports.isBytes = isBytes; +function arrayify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid arrayify value"); + var result = []; + while (value) { + result.unshift(value & 0xff); + value = parseInt(String(value / 256)); + } + if (result.length === 0) { + result.push(0); + } + return addSlice(new Uint8Array(result)); + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + value = value.toHexString(); + } + if (isHexString(value)) { + var hex = value.substring(2); + if (hex.length % 2) { + if (options.hexPad === "left") { + hex = "0x0" + hex.substring(2); + } + else if (options.hexPad === "right") { + hex += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + var result = []; + for (var i = 0; i < hex.length; i += 2) { + result.push(parseInt(hex.substring(i, i + 2), 16)); + } + return addSlice(new Uint8Array(result)); + } + if (isBytes(value)) { + return addSlice(new Uint8Array(value)); + } + return logger.throwArgumentError("invalid arrayify value", "value", value); +} +exports.arrayify = arrayify; +function concat(items) { + var objects = items.map(function (item) { return arrayify(item); }); + var length = objects.reduce(function (accum, item) { return (accum + item.length); }, 0); + var result = new Uint8Array(length); + objects.reduce(function (offset, object) { + result.set(object, offset); + return offset + object.length; + }, 0); + return addSlice(result); +} +exports.concat = concat; +function stripZeros(value) { + var result = arrayify(value); + if (result.length === 0) { + return result; + } + // Find the first non-zero entry + var start = 0; + while (start < result.length && result[start] === 0) { + start++; + } + // If we started with zeros, strip them + if (start) { + result = result.slice(start); + } + return result; +} +exports.stripZeros = stripZeros; +function zeroPad(value, length) { + value = arrayify(value); + if (value.length > length) { + logger.throwArgumentError("value out of range", "value", arguments[0]); + } + var result = new Uint8Array(length); + result.set(value, length - value.length); + return addSlice(result); +} +exports.zeroPad = zeroPad; +function isHexString(value, length) { + if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + if (length && value.length !== 2 + 2 * length) { + return false; + } + return true; +} +exports.isHexString = isHexString; +var HexCharacters = "0123456789abcdef"; +function hexlify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid hexlify value"); + var hex = ""; + while (value) { + hex = HexCharacters[value & 0xf] + hex; + value = Math.floor(value / 16); + } + if (hex.length) { + if (hex.length % 2) { + hex = "0" + hex; + } + return "0x" + hex; + } + return "0x00"; + } + if (typeof (value) === "bigint") { + value = value.toString(16); + if (value.length % 2) { + return ("0x0" + value); + } + return "0x" + value; + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + return value.toHexString(); + } + if (isHexString(value)) { + if (value.length % 2) { + if (options.hexPad === "left") { + value = "0x0" + value.substring(2); + } + else if (options.hexPad === "right") { + value += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + return value.toLowerCase(); + } + if (isBytes(value)) { + var result = "0x"; + for (var i = 0; i < value.length; i++) { + var v = value[i]; + result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; + } + return result; + } + return logger.throwArgumentError("invalid hexlify value", "value", value); +} +exports.hexlify = hexlify; +/* +function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number { + if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") { + return "0x0" + value.substring(2); + } + return value; +} +*/ +function hexDataLength(data) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + return null; + } + return (data.length - 2) / 2; +} +exports.hexDataLength = hexDataLength; +function hexDataSlice(data, offset, endOffset) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + logger.throwArgumentError("invalid hexData", "value", data); + } + offset = 2 + 2 * offset; + if (endOffset != null) { + return "0x" + data.substring(offset, 2 + 2 * endOffset); + } + return "0x" + data.substring(offset); +} +exports.hexDataSlice = hexDataSlice; +function hexConcat(items) { + var result = "0x"; + items.forEach(function (item) { + result += hexlify(item).substring(2); + }); + return result; +} +exports.hexConcat = hexConcat; +function hexValue(value) { + var trimmed = hexStripZeros(hexlify(value, { hexPad: "left" })); + if (trimmed === "0x") { + return "0x0"; + } + return trimmed; +} +exports.hexValue = hexValue; +function hexStripZeros(value) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + value = value.substring(2); + var offset = 0; + while (offset < value.length && value[offset] === "0") { + offset++; + } + return "0x" + value.substring(offset); +} +exports.hexStripZeros = hexStripZeros; +function hexZeroPad(value, length) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + else if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + if (value.length > 2 * length + 2) { + logger.throwArgumentError("value out of range", "value", arguments[1]); + } + while (value.length < 2 * length + 2) { + value = "0x0" + value.substring(2); + } + return value; +} +exports.hexZeroPad = hexZeroPad; +function splitSignature(signature) { + var result = { + r: "0x", + s: "0x", + _vs: "0x", + recoveryParam: 0, + v: 0 + }; + if (isBytesLike(signature)) { + var bytes = arrayify(signature); + if (bytes.length !== 65) { + logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature); + } + // Get the r, s and v + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + // Allow a recid to be used as the v + if (result.v < 27) { + if (result.v === 0 || result.v === 1) { + result.v += 27; + } + else { + logger.throwArgumentError("signature invalid v byte", "signature", signature); + } + } + // Compute recoveryParam from v + result.recoveryParam = 1 - (result.v % 2); + // Compute _vs from recoveryParam and s + if (result.recoveryParam) { + bytes[32] |= 0x80; + } + result._vs = hexlify(bytes.slice(32, 64)); + } + else { + result.r = signature.r; + result.s = signature.s; + result.v = signature.v; + result.recoveryParam = signature.recoveryParam; + result._vs = signature._vs; + // If the _vs is available, use it to populate missing s, v and recoveryParam + // and verify non-missing s, v and recoveryParam + if (result._vs != null) { + var vs_1 = zeroPad(arrayify(result._vs), 32); + result._vs = hexlify(vs_1); + // Set or check the recid + var recoveryParam = ((vs_1[0] >= 128) ? 1 : 0); + if (result.recoveryParam == null) { + result.recoveryParam = recoveryParam; + } + else if (result.recoveryParam !== recoveryParam) { + logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature); + } + // Set or check the s + vs_1[0] &= 0x7f; + var s = hexlify(vs_1); + if (result.s == null) { + result.s = s; + } + else if (result.s !== s) { + logger.throwArgumentError("signature v mismatch _vs", "signature", signature); + } + } + // Use recid and v to populate each other + if (result.recoveryParam == null) { + if (result.v == null) { + logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature); + } + else if (result.v === 0 || result.v === 1) { + result.recoveryParam = result.v; + } + else { + result.recoveryParam = 1 - (result.v % 2); + } + } + else { + if (result.v == null) { + result.v = 27 + result.recoveryParam; + } + else { + var recId = (result.v === 0 || result.v === 1) ? result.v : (1 - (result.v % 2)); + if (result.recoveryParam !== recId) { + logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature); + } + } + } + if (result.r == null || !isHexString(result.r)) { + logger.throwArgumentError("signature missing or invalid r", "signature", signature); + } + else { + result.r = hexZeroPad(result.r, 32); + } + if (result.s == null || !isHexString(result.s)) { + logger.throwArgumentError("signature missing or invalid s", "signature", signature); + } + else { + result.s = hexZeroPad(result.s, 32); + } + var vs = arrayify(result.s); + if (vs[0] >= 128) { + logger.throwArgumentError("signature s out of range", "signature", signature); + } + if (result.recoveryParam) { + vs[0] |= 0x80; + } + var _vs = hexlify(vs); + if (result._vs) { + if (!isHexString(result._vs)) { + logger.throwArgumentError("signature invalid _vs", "signature", signature); + } + result._vs = hexZeroPad(result._vs, 32); + } + // Set or check the _vs + if (result._vs == null) { + result._vs = _vs; + } + else if (result._vs !== _vs) { + logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature); + } + } + return result; +} +exports.splitSignature = splitSignature; +function joinSignature(signature) { + signature = splitSignature(signature); + return hexlify(concat([ + signature.r, + signature.s, + (signature.recoveryParam ? "0x1c" : "0x1b") + ])); +} +exports.joinSignature = joinSignature; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/lib/index.js.map b/node_modules/@ethersproject/bytes/lib/index.js.map new file mode 100644 index 0000000..5189b15 --- /dev/null +++ b/node_modules/@ethersproject/bytes/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"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AAG,EAAE;YACd,MAAM,CAAC,kBAAkB,CAAC,0BAA0B,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SACjF;QACD,IAAI,MAAM,CAAC,aAAa,EAAE;YAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;SAAE;QAC5C,IAAM,GAAG,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;QAExB,IAAI,MAAM,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;gBAC1B,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;aAC9E;YACD,MAAM,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;SAC3C;QAED,uBAAuB;QACvB,IAAI,MAAM,CAAC,GAAG,IAAI,IAAI,EAAE;YACpB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;SACpB;aAAM,IAAI,MAAM,CAAC,GAAG,KAAK,GAAG,EAAE;YAC3B,MAAM,CAAC,kBAAkB,CAAC,gCAAgC,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SACvF;KACJ;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AA1HD,wCA0HC;AAED,SAAgB,aAAa,CAAC,SAAwB;IAClD,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,MAAM,CAAC;QACjB,SAAS,CAAC,CAAC;QACX,SAAS,CAAC,CAAC;QACX,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAA,CAAC,CAAC,MAAM,CAAC;KAC9C,CAAC,CAAC,CAAC;AACR,CAAC;AARD,sCAQC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/bytes/package.json b/node_modules/@ethersproject/bytes/package.json new file mode 100644 index 0000000..4a45407 --- /dev/null +++ b/node_modules/@ethersproject/bytes/package.json @@ -0,0 +1,44 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/logger": "^5.5.0" + }, + "description": "Bytes utility functions for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "5899c8aec0600dca42d7e24fc215037aa48917f2", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/bytes", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/bytes", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "auto-build": "npm run build -- -w", + "build": "tsc -p ./tsconfig.json", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x1daef684cc067d9e39c56da0288767a1d0d210074513e60fac0b86d8243278fc", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/bytes/src.ts/_version.ts b/node_modules/@ethersproject/bytes/src.ts/_version.ts new file mode 100644 index 0000000..19ad094 --- /dev/null +++ b/node_modules/@ethersproject/bytes/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "bytes/5.5.0"; diff --git a/node_modules/@ethersproject/bytes/src.ts/index.ts b/node_modules/@ethersproject/bytes/src.ts/index.ts new file mode 100644 index 0000000..ab550b5 --- /dev/null +++ b/node_modules/@ethersproject/bytes/src.ts/index.ts @@ -0,0 +1,463 @@ +"use strict"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +/////////////////////////////// +// Exported Types + +export type Bytes = ArrayLike; + +export type BytesLike = Bytes | string; + +export type DataOptions = { + allowMissingPrefix?: boolean; + hexPad?: "left" | "right" | null; +}; + +export interface Hexable { + toHexString(): string; +} + + +/* +export interface HexString { + length: number; + substring: (start: number, end?: number) => string; + + [index: number]: string; +} +*/ + +export type SignatureLike = { + r: string; + s?: string; + _vs?: string, + recoveryParam?: number; + v?: number; +} | BytesLike; + +export interface Signature { + r: string; + + s: string; + _vs: string, + + recoveryParam: number; + v: number; +} + +/////////////////////////////// + + +function isHexable(value: any): value is Hexable { + return !!(value.toHexString); +} + +function addSlice(array: Uint8Array): Uint8Array { + if (array.slice) { return array; } + + array.slice = function() { + const args = Array.prototype.slice.call(arguments); + return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args))); + } + + return array; +} + +export function isBytesLike(value: any): value is BytesLike { + return ((isHexString(value) && !(value.length % 2)) || isBytes(value)); +} + +function isInteger(value: number) { + return (typeof(value) === "number" && value == value && (value % 1) === 0); +} + +export function isBytes(value: any): value is Bytes { + if (value == null) { return false; } + + if (value.constructor === Uint8Array) { return true; } + if (typeof(value) === "string") { return false; } + if (!isInteger(value.length) || value.length < 0) { return false; } + + for (let i = 0; i < value.length; i++) { + const v = value[i]; + if (!isInteger(v) || v < 0 || v >= 256) { return false; } + } + return true; +} + + +export function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array { + if (!options) { options = { }; } + + if (typeof(value) === "number") { + logger.checkSafeUint53(value, "invalid arrayify value"); + + const result = []; + while (value) { + result.unshift(value & 0xff); + value = parseInt(String(value / 256)); + } + if (result.length === 0) { result.push(0); } + + return addSlice(new Uint8Array(result)); + } + + if (options.allowMissingPrefix && typeof(value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + + if (isHexable(value)) { value = value.toHexString(); } + + if (isHexString(value)) { + let hex = (value).substring(2); + if (hex.length % 2) { + if (options.hexPad === "left") { + hex = "0x0" + hex.substring(2); + } else if (options.hexPad === "right") { + hex += "0"; + } else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + + const result = []; + for (let i = 0; i < hex.length; i += 2) { + result.push(parseInt(hex.substring(i, i + 2), 16)); + } + + return addSlice(new Uint8Array(result)); + } + + if (isBytes(value)) { + return addSlice(new Uint8Array(value)); + } + + return logger.throwArgumentError("invalid arrayify value", "value", value); +} + +export function concat(items: ReadonlyArray): Uint8Array { + const objects = items.map(item => arrayify(item)); + const length = objects.reduce((accum, item) => (accum + item.length), 0); + + const result = new Uint8Array(length); + + objects.reduce((offset, object) => { + result.set(object, offset); + return offset + object.length; + }, 0); + + return addSlice(result); +} + +export function stripZeros(value: BytesLike): Uint8Array { + let result: Uint8Array = arrayify(value); + + if (result.length === 0) { return result; } + + // Find the first non-zero entry + let start = 0; + while (start < result.length && result[start] === 0) { start++ } + + // If we started with zeros, strip them + if (start) { + result = result.slice(start); + } + + return result; +} + +export function zeroPad(value: BytesLike, length: number): Uint8Array { + value = arrayify(value); + + if (value.length > length) { + logger.throwArgumentError("value out of range", "value", arguments[0]); + } + + const result = new Uint8Array(length); + result.set(value, length - value.length); + return addSlice(result); +} + + +export function isHexString(value: any, length?: number): boolean { + if (typeof(value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false + } + if (length && value.length !== 2 + 2 * length) { return false; } + return true; +} + +const HexCharacters: string = "0123456789abcdef"; + +export function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string { + if (!options) { options = { }; } + + if (typeof(value) === "number") { + logger.checkSafeUint53(value, "invalid hexlify value"); + + let hex = ""; + while (value) { + hex = HexCharacters[value & 0xf] + hex; + value = Math.floor(value / 16); + } + + if (hex.length) { + if (hex.length % 2) { hex = "0" + hex; } + return "0x" + hex; + } + + return "0x00"; + } + + if (typeof(value) === "bigint") { + value = value.toString(16); + if (value.length % 2) { return ("0x0" + value); } + return "0x" + value; + } + + if (options.allowMissingPrefix && typeof(value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + + if (isHexable(value)) { return value.toHexString(); } + + if (isHexString(value)) { + if ((value).length % 2) { + if (options.hexPad === "left") { + value = "0x0" + (value).substring(2); + } else if (options.hexPad === "right") { + value += "0"; + } else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + return (value).toLowerCase(); + } + + if (isBytes(value)) { + let result = "0x"; + for (let i = 0; i < value.length; i++) { + let v = value[i]; + result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; + } + return result; + } + + return logger.throwArgumentError("invalid hexlify value", "value", value); +} + +/* +function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number { + if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") { + return "0x0" + value.substring(2); + } + return value; +} +*/ +export function hexDataLength(data: BytesLike) { + if (typeof(data) !== "string") { + data = hexlify(data); + } else if (!isHexString(data) || (data.length % 2)) { + return null; + } + + return (data.length - 2) / 2; +} + +export function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string { + if (typeof(data) !== "string") { + data = hexlify(data); + } else if (!isHexString(data) || (data.length % 2)) { + logger.throwArgumentError("invalid hexData", "value", data ); + } + + offset = 2 + 2 * offset; + + if (endOffset != null) { + return "0x" + data.substring(offset, 2 + 2 * endOffset); + } + + return "0x" + data.substring(offset); +} + +export function hexConcat(items: ReadonlyArray): string { + let result = "0x"; + items.forEach((item) => { + result += hexlify(item).substring(2); + }); + return result; +} + +export function hexValue(value: BytesLike | Hexable | number | bigint): string { + const trimmed = hexStripZeros(hexlify(value, { hexPad: "left" })); + if (trimmed === "0x") { return "0x0"; } + return trimmed; +} + +export function hexStripZeros(value: BytesLike): string { + if (typeof(value) !== "string") { value = hexlify(value); } + + if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + value = value.substring(2); + let offset = 0; + while (offset < value.length && value[offset] === "0") { offset++; } + return "0x" + value.substring(offset); +} + +export function hexZeroPad(value: BytesLike, length: number): string { + if (typeof(value) !== "string") { + value = hexlify(value); + } else if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + + if (value.length > 2 * length + 2) { + logger.throwArgumentError("value out of range", "value", arguments[1]); + } + + while (value.length < 2 * length + 2) { + value = "0x0" + value.substring(2); + } + + return value; +} + +export function splitSignature(signature: SignatureLike): Signature { + const result = { + r: "0x", + s: "0x", + _vs: "0x", + recoveryParam: 0, + v: 0 + }; + + if (isBytesLike(signature)) { + const bytes: Uint8Array = arrayify(signature); + if (bytes.length !== 65) { + logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature); + } + + // Get the r, s and v + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + + // Allow a recid to be used as the v + if (result.v < 27) { + if (result.v === 0 || result.v === 1) { + result.v += 27; + } else { + logger.throwArgumentError("signature invalid v byte", "signature", signature); + } + } + + // Compute recoveryParam from v + result.recoveryParam = 1 - (result.v % 2); + + // Compute _vs from recoveryParam and s + if (result.recoveryParam) { bytes[32] |= 0x80; } + result._vs = hexlify(bytes.slice(32, 64)) + + } else { + result.r = signature.r; + result.s = signature.s; + result.v = signature.v; + result.recoveryParam = signature.recoveryParam; + result._vs = signature._vs; + + // If the _vs is available, use it to populate missing s, v and recoveryParam + // and verify non-missing s, v and recoveryParam + if (result._vs != null) { + const vs = zeroPad(arrayify(result._vs), 32); + result._vs = hexlify(vs); + + // Set or check the recid + const recoveryParam = ((vs[0] >= 128) ? 1: 0); + if (result.recoveryParam == null) { + result.recoveryParam = recoveryParam; + } else if (result.recoveryParam !== recoveryParam) { + logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature); + } + + // Set or check the s + vs[0] &= 0x7f; + const s = hexlify(vs); + if (result.s == null) { + result.s = s; + } else if (result.s !== s) { + logger.throwArgumentError("signature v mismatch _vs", "signature", signature); + } + } + + // Use recid and v to populate each other + if (result.recoveryParam == null) { + if (result.v == null) { + logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature); + } else if (result.v === 0 || result.v === 1) { + result.recoveryParam = result.v; + } else { + result.recoveryParam = 1 - (result.v % 2); + } + } else { + if (result.v == null) { + result.v = 27 + result.recoveryParam; + } else { + const recId = (result.v === 0 || result.v === 1) ? result.v :(1 - (result.v % 2)); + if (result.recoveryParam !== recId) { + logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature); + } + } + } + + if (result.r == null || !isHexString(result.r)) { + logger.throwArgumentError("signature missing or invalid r", "signature", signature); + } else { + result.r = hexZeroPad(result.r, 32); + } + + if (result.s == null || !isHexString(result.s)) { + logger.throwArgumentError("signature missing or invalid s", "signature", signature); + } else { + result.s = hexZeroPad(result.s, 32); + } + + const vs = arrayify(result.s); + if (vs[0] >= 128) { + logger.throwArgumentError("signature s out of range", "signature", signature); + } + if (result.recoveryParam) { vs[0] |= 0x80; } + const _vs = hexlify(vs); + + if (result._vs) { + if (!isHexString(result._vs)) { + logger.throwArgumentError("signature invalid _vs", "signature", signature); + } + result._vs = hexZeroPad(result._vs, 32); + } + + // Set or check the _vs + if (result._vs == null) { + result._vs = _vs; + } else if (result._vs !== _vs) { + logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature); + } + } + + return result; +} + +export function joinSignature(signature: SignatureLike): string { + signature = splitSignature(signature); + + return hexlify(concat([ + signature.r, + signature.s, + (signature.recoveryParam ? "0x1c": "0x1b") + ])); +} + diff --git a/node_modules/@ethersproject/constants/LICENSE.md b/node_modules/@ethersproject/constants/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/constants/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/constants/README.md b/node_modules/@ethersproject/constants/README.md new file mode 100644 index 0000000..4018a69 --- /dev/null +++ b/node_modules/@ethersproject/constants/README.md @@ -0,0 +1,39 @@ +Etehreum Constants +================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains many frequently used constants when dealing with Ethereum. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/constants/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + AddressZero, + HashZero, + + EtherSymbol, + + NegativeOne, + Zero, + One, + Two, + + WeiPerEther, + MaxUint256 + +} = require("@ethersproject/constants"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/constants/lib.esm/_version.d.ts b/node_modules/@ethersproject/constants/lib.esm/_version.d.ts new file mode 100644 index 0000000..1017e51 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "constants/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/constants/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/_version.js b/node_modules/@ethersproject/constants/lib.esm/_version.js new file mode 100644 index 0000000..b78afe0 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "constants/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/_version.js.map b/node_modules/@ethersproject/constants/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts b/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts new file mode 100644 index 0000000..6b9a3d0 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts @@ -0,0 +1,2 @@ +export declare const AddressZero = "0x0000000000000000000000000000000000000000"; +//# sourceMappingURL=addresses.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts.map b/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts.map new file mode 100644 index 0000000..5626d9d --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../src.ts/addresses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,+CAA+C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/addresses.js b/node_modules/@ethersproject/constants/lib.esm/addresses.js new file mode 100644 index 0000000..eb40d2a --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/addresses.js @@ -0,0 +1,2 @@ +export const AddressZero = "0x0000000000000000000000000000000000000000"; +//# sourceMappingURL=addresses.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/addresses.js.map b/node_modules/@ethersproject/constants/lib.esm/addresses.js.map new file mode 100644 index 0000000..aff8311 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/addresses.js.map @@ -0,0 +1 @@ +{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../src.ts/addresses.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,4CAA4C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts b/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts new file mode 100644 index 0000000..c5a60ba --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts @@ -0,0 +1,11 @@ +import { BigNumber } from "@ethersproject/bignumber"; +declare const NegativeOne: BigNumber; +declare const Zero: BigNumber; +declare const One: BigNumber; +declare const Two: BigNumber; +declare const WeiPerEther: BigNumber; +declare const MaxUint256: BigNumber; +declare const MinInt256: BigNumber; +declare const MaxInt256: BigNumber; +export { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256, }; +//# sourceMappingURL=bignumbers.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts.map b/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts.map new file mode 100644 index 0000000..7cd1ef2 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumbers.d.ts","sourceRoot":"","sources":["../src.ts/bignumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,QAAA,MAAM,WAAW,EAAE,SAA6C,CAAC;AACjE,QAAA,MAAM,IAAI,EAAE,SAA4C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,SAA4C,CAAC;AACxD,QAAA,MAAM,GAAG,EAAE,SAA4C,CAAC;AACxD,QAAA,MAAM,WAAW,EAAE,SAAgE,CAAC;AACpF,QAAA,MAAM,UAAU,EAAE,SAA+G,CAAC;AAElI,QAAA,MAAM,SAAS,EAAE,SAAgH,CAAC;AAClI,QAAA,MAAM,SAAS,EAAE,SAA+G,CAAC;AAEjI,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,GACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/bignumbers.js b/node_modules/@ethersproject/constants/lib.esm/bignumbers.js new file mode 100644 index 0000000..343462a --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/bignumbers.js @@ -0,0 +1,11 @@ +import { BigNumber } from "@ethersproject/bignumber"; +const NegativeOne = ( /*#__PURE__*/BigNumber.from(-1)); +const Zero = ( /*#__PURE__*/BigNumber.from(0)); +const One = ( /*#__PURE__*/BigNumber.from(1)); +const Two = ( /*#__PURE__*/BigNumber.from(2)); +const WeiPerEther = ( /*#__PURE__*/BigNumber.from("1000000000000000000")); +const MaxUint256 = ( /*#__PURE__*/BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); +const MinInt256 = ( /*#__PURE__*/BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000")); +const MaxInt256 = ( /*#__PURE__*/BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); +export { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256, }; +//# sourceMappingURL=bignumbers.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/bignumbers.js.map b/node_modules/@ethersproject/constants/lib.esm/bignumbers.js.map new file mode 100644 index 0000000..d484111 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/bignumbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumbers.js","sourceRoot":"","sources":["../src.ts/bignumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,MAAM,IAAI,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACzD,MAAM,GAAG,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,MAAM,GAAG,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,MAAM,WAAW,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;AACpF,MAAM,UAAU,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC,CAAC;AAElI,MAAM,SAAS,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC,CAAC;AAClI,MAAM,SAAS,GAAc,EAAC,aAAa,SAAS,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC,CAAC;AAEjI,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,GACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts b/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts new file mode 100644 index 0000000..57a2802 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts @@ -0,0 +1,2 @@ +export declare const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; +//# sourceMappingURL=hashes.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts.map b/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts.map new file mode 100644 index 0000000..839ee74 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hashes.d.ts","sourceRoot":"","sources":["../src.ts/hashes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,uEAAuE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/hashes.js b/node_modules/@ethersproject/constants/lib.esm/hashes.js new file mode 100644 index 0000000..7d339e5 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/hashes.js @@ -0,0 +1,2 @@ +export const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; +//# sourceMappingURL=hashes.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/hashes.js.map b/node_modules/@ethersproject/constants/lib.esm/hashes.js.map new file mode 100644 index 0000000..ba7a261 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/hashes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hashes.js","sourceRoot":"","sources":["../src.ts/hashes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,oEAAoE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/index.d.ts b/node_modules/@ethersproject/constants/lib.esm/index.d.ts new file mode 100644 index 0000000..e24626e --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/index.d.ts @@ -0,0 +1,5 @@ +export { AddressZero } from "./addresses"; +export { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256 } from "./bignumbers"; +export { HashZero } from "./hashes"; +export { EtherSymbol } from "./strings"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/index.d.ts.map b/node_modules/@ethersproject/constants/lib.esm/index.d.ts.map new file mode 100644 index 0000000..d585444 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/index.js b/node_modules/@ethersproject/constants/lib.esm/index.js new file mode 100644 index 0000000..a384a67 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/index.js @@ -0,0 +1,6 @@ +"use strict"; +export { AddressZero } from "./addresses"; +export { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256 } from "./bignumbers"; +export { HashZero } from "./hashes"; +export { EtherSymbol } from "./strings"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/index.js.map b/node_modules/@ethersproject/constants/lib.esm/index.js.map new file mode 100644 index 0000000..e90f939 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/strings.d.ts b/node_modules/@ethersproject/constants/lib.esm/strings.d.ts new file mode 100644 index 0000000..8665a83 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/strings.d.ts @@ -0,0 +1,2 @@ +export declare const EtherSymbol = "\u039E"; +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/strings.d.ts.map b/node_modules/@ethersproject/constants/lib.esm/strings.d.ts.map new file mode 100644 index 0000000..901e733 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/strings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src.ts/strings.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/strings.js b/node_modules/@ethersproject/constants/lib.esm/strings.js new file mode 100644 index 0000000..27131f5 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/strings.js @@ -0,0 +1,3 @@ +// NFKC (composed) // (decomposed) +export const EtherSymbol = "\u039e"; // "\uD835\uDF63"; +//# sourceMappingURL=strings.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib.esm/strings.js.map b/node_modules/@ethersproject/constants/lib.esm/strings.js.map new file mode 100644 index 0000000..04e2d51 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib.esm/strings.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.js","sourceRoot":"","sources":["../src.ts/strings.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAE,kBAAkB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/_version.d.ts b/node_modules/@ethersproject/constants/lib/_version.d.ts new file mode 100644 index 0000000..1017e51 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "constants/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/_version.d.ts.map b/node_modules/@ethersproject/constants/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/_version.js b/node_modules/@ethersproject/constants/lib/_version.js new file mode 100644 index 0000000..1e615d6 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "constants/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/_version.js.map b/node_modules/@ethersproject/constants/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/addresses.d.ts b/node_modules/@ethersproject/constants/lib/addresses.d.ts new file mode 100644 index 0000000..6b9a3d0 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/addresses.d.ts @@ -0,0 +1,2 @@ +export declare const AddressZero = "0x0000000000000000000000000000000000000000"; +//# sourceMappingURL=addresses.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/addresses.d.ts.map b/node_modules/@ethersproject/constants/lib/addresses.d.ts.map new file mode 100644 index 0000000..5626d9d --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/addresses.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../src.ts/addresses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,+CAA+C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/addresses.js b/node_modules/@ethersproject/constants/lib/addresses.js new file mode 100644 index 0000000..3fc7ff5 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/addresses.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AddressZero = void 0; +exports.AddressZero = "0x0000000000000000000000000000000000000000"; +//# sourceMappingURL=addresses.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/addresses.js.map b/node_modules/@ethersproject/constants/lib/addresses.js.map new file mode 100644 index 0000000..d96617d --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/addresses.js.map @@ -0,0 +1 @@ +{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../src.ts/addresses.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,4CAA4C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/bignumbers.d.ts b/node_modules/@ethersproject/constants/lib/bignumbers.d.ts new file mode 100644 index 0000000..c5a60ba --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/bignumbers.d.ts @@ -0,0 +1,11 @@ +import { BigNumber } from "@ethersproject/bignumber"; +declare const NegativeOne: BigNumber; +declare const Zero: BigNumber; +declare const One: BigNumber; +declare const Two: BigNumber; +declare const WeiPerEther: BigNumber; +declare const MaxUint256: BigNumber; +declare const MinInt256: BigNumber; +declare const MaxInt256: BigNumber; +export { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256, }; +//# sourceMappingURL=bignumbers.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/bignumbers.d.ts.map b/node_modules/@ethersproject/constants/lib/bignumbers.d.ts.map new file mode 100644 index 0000000..7cd1ef2 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/bignumbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumbers.d.ts","sourceRoot":"","sources":["../src.ts/bignumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,QAAA,MAAM,WAAW,EAAE,SAA6C,CAAC;AACjE,QAAA,MAAM,IAAI,EAAE,SAA4C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,SAA4C,CAAC;AACxD,QAAA,MAAM,GAAG,EAAE,SAA4C,CAAC;AACxD,QAAA,MAAM,WAAW,EAAE,SAAgE,CAAC;AACpF,QAAA,MAAM,UAAU,EAAE,SAA+G,CAAC;AAElI,QAAA,MAAM,SAAS,EAAE,SAAgH,CAAC;AAClI,QAAA,MAAM,SAAS,EAAE,SAA+G,CAAC;AAEjI,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,GACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/bignumbers.js b/node_modules/@ethersproject/constants/lib/bignumbers.js new file mode 100644 index 0000000..3e4d566 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/bignumbers.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.Two = exports.One = exports.Zero = exports.NegativeOne = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var NegativeOne = ( /*#__PURE__*/bignumber_1.BigNumber.from(-1)); +exports.NegativeOne = NegativeOne; +var Zero = ( /*#__PURE__*/bignumber_1.BigNumber.from(0)); +exports.Zero = Zero; +var One = ( /*#__PURE__*/bignumber_1.BigNumber.from(1)); +exports.One = One; +var Two = ( /*#__PURE__*/bignumber_1.BigNumber.from(2)); +exports.Two = Two; +var WeiPerEther = ( /*#__PURE__*/bignumber_1.BigNumber.from("1000000000000000000")); +exports.WeiPerEther = WeiPerEther; +var MaxUint256 = ( /*#__PURE__*/bignumber_1.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); +exports.MaxUint256 = MaxUint256; +var MinInt256 = ( /*#__PURE__*/bignumber_1.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000")); +exports.MinInt256 = MinInt256; +var MaxInt256 = ( /*#__PURE__*/bignumber_1.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); +exports.MaxInt256 = MaxInt256; +//# sourceMappingURL=bignumbers.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/bignumbers.js.map b/node_modules/@ethersproject/constants/lib/bignumbers.js.map new file mode 100644 index 0000000..b4e6c2a --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/bignumbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumbers.js","sourceRoot":"","sources":["../src.ts/bignumbers.ts"],"names":[],"mappings":";;;AAAA,sDAAqD;AAErD,IAAM,WAAW,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAW7D,kCAAW;AAVf,IAAM,IAAI,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAWrD,oBAAI;AAVR,IAAM,GAAG,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAWpD,kBAAG;AAVP,IAAM,GAAG,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAWpD,kBAAG;AAVP,IAAM,WAAW,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAWhF,kCAAW;AAVf,IAAM,UAAU,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC,CAAC;AAW9H,gCAAU;AATd,IAAM,SAAS,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC,CAAC;AAU9H,8BAAS;AATb,IAAM,SAAS,GAAc,EAAC,aAAa,qBAAS,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC,CAAC;AAU7H,8BAAS"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/hashes.d.ts b/node_modules/@ethersproject/constants/lib/hashes.d.ts new file mode 100644 index 0000000..57a2802 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/hashes.d.ts @@ -0,0 +1,2 @@ +export declare const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; +//# sourceMappingURL=hashes.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/hashes.d.ts.map b/node_modules/@ethersproject/constants/lib/hashes.d.ts.map new file mode 100644 index 0000000..839ee74 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/hashes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hashes.d.ts","sourceRoot":"","sources":["../src.ts/hashes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,uEAAuE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/hashes.js b/node_modules/@ethersproject/constants/lib/hashes.js new file mode 100644 index 0000000..4c908e3 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/hashes.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HashZero = void 0; +exports.HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; +//# sourceMappingURL=hashes.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/hashes.js.map b/node_modules/@ethersproject/constants/lib/hashes.js.map new file mode 100644 index 0000000..c70809b --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/hashes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hashes.js","sourceRoot":"","sources":["../src.ts/hashes.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG,oEAAoE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/index.d.ts b/node_modules/@ethersproject/constants/lib/index.d.ts new file mode 100644 index 0000000..e24626e --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/index.d.ts @@ -0,0 +1,5 @@ +export { AddressZero } from "./addresses"; +export { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256 } from "./bignumbers"; +export { HashZero } from "./hashes"; +export { EtherSymbol } from "./strings"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/index.d.ts.map b/node_modules/@ethersproject/constants/lib/index.d.ts.map new file mode 100644 index 0000000..d585444 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/index.js b/node_modules/@ethersproject/constants/lib/index.js new file mode 100644 index 0000000..13368eb --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/index.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EtherSymbol = exports.HashZero = exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.Two = exports.One = exports.Zero = exports.NegativeOne = exports.AddressZero = void 0; +var addresses_1 = require("./addresses"); +Object.defineProperty(exports, "AddressZero", { enumerable: true, get: function () { return addresses_1.AddressZero; } }); +var bignumbers_1 = require("./bignumbers"); +Object.defineProperty(exports, "NegativeOne", { enumerable: true, get: function () { return bignumbers_1.NegativeOne; } }); +Object.defineProperty(exports, "Zero", { enumerable: true, get: function () { return bignumbers_1.Zero; } }); +Object.defineProperty(exports, "One", { enumerable: true, get: function () { return bignumbers_1.One; } }); +Object.defineProperty(exports, "Two", { enumerable: true, get: function () { return bignumbers_1.Two; } }); +Object.defineProperty(exports, "WeiPerEther", { enumerable: true, get: function () { return bignumbers_1.WeiPerEther; } }); +Object.defineProperty(exports, "MaxUint256", { enumerable: true, get: function () { return bignumbers_1.MaxUint256; } }); +Object.defineProperty(exports, "MinInt256", { enumerable: true, get: function () { return bignumbers_1.MinInt256; } }); +Object.defineProperty(exports, "MaxInt256", { enumerable: true, get: function () { return bignumbers_1.MaxInt256; } }); +var hashes_1 = require("./hashes"); +Object.defineProperty(exports, "HashZero", { enumerable: true, get: function () { return hashes_1.HashZero; } }); +var strings_1 = require("./strings"); +Object.defineProperty(exports, "EtherSymbol", { enumerable: true, get: function () { return strings_1.EtherSymbol; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/index.js.map b/node_modules/@ethersproject/constants/lib/index.js.map new file mode 100644 index 0000000..b2c8133 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,yCAA0C;AAAjC,wGAAA,WAAW,OAAA;AACpB,2CASsB;AARlB,yGAAA,WAAW,OAAA;AACX,kGAAA,IAAI,OAAA;AACJ,iGAAA,GAAG,OAAA;AACH,iGAAA,GAAG,OAAA;AACH,yGAAA,WAAW,OAAA;AACX,wGAAA,UAAU,OAAA;AACV,uGAAA,SAAS,OAAA;AACT,uGAAA,SAAS,OAAA;AAEb,mCAAoC;AAA3B,kGAAA,QAAQ,OAAA;AACjB,qCAAwC;AAA/B,sGAAA,WAAW,OAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/strings.d.ts b/node_modules/@ethersproject/constants/lib/strings.d.ts new file mode 100644 index 0000000..8665a83 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/strings.d.ts @@ -0,0 +1,2 @@ +export declare const EtherSymbol = "\u039E"; +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/strings.d.ts.map b/node_modules/@ethersproject/constants/lib/strings.d.ts.map new file mode 100644 index 0000000..901e733 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/strings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src.ts/strings.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/strings.js b/node_modules/@ethersproject/constants/lib/strings.js new file mode 100644 index 0000000..5b18c45 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/strings.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EtherSymbol = void 0; +// NFKC (composed) // (decomposed) +exports.EtherSymbol = "\u039e"; // "\uD835\uDF63"; +//# sourceMappingURL=strings.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/lib/strings.js.map b/node_modules/@ethersproject/constants/lib/strings.js.map new file mode 100644 index 0000000..ea78509 --- /dev/null +++ b/node_modules/@ethersproject/constants/lib/strings.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.js","sourceRoot":"","sources":["../src.ts/strings.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AACjC,QAAA,WAAW,GAAG,QAAQ,CAAC,CAAE,kBAAkB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/constants/package.json b/node_modules/@ethersproject/constants/package.json new file mode 100644 index 0000000..6af8cf3 --- /dev/null +++ b/node_modules/@ethersproject/constants/package.json @@ -0,0 +1,42 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.5.0" + }, + "description": "Common Ethereum constants used for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/constants", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/constants", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xd76d5e19c938fe7efb26a4d99a62beb100369872e99cf82cc7dbce414097f58d", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/constants/src.ts/_version.ts b/node_modules/@ethersproject/constants/src.ts/_version.ts new file mode 100644 index 0000000..cee9d1c --- /dev/null +++ b/node_modules/@ethersproject/constants/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "constants/5.5.0"; diff --git a/node_modules/@ethersproject/constants/src.ts/addresses.ts b/node_modules/@ethersproject/constants/src.ts/addresses.ts new file mode 100644 index 0000000..89a66bb --- /dev/null +++ b/node_modules/@ethersproject/constants/src.ts/addresses.ts @@ -0,0 +1,2 @@ +export const AddressZero = "0x0000000000000000000000000000000000000000"; + diff --git a/node_modules/@ethersproject/constants/src.ts/bignumbers.ts b/node_modules/@ethersproject/constants/src.ts/bignumbers.ts new file mode 100644 index 0000000..7175087 --- /dev/null +++ b/node_modules/@ethersproject/constants/src.ts/bignumbers.ts @@ -0,0 +1,22 @@ +import { BigNumber } from "@ethersproject/bignumber"; + +const NegativeOne: BigNumber = (/*#__PURE__*/BigNumber.from(-1)); +const Zero: BigNumber = (/*#__PURE__*/BigNumber.from(0)); +const One: BigNumber = (/*#__PURE__*/BigNumber.from(1)); +const Two: BigNumber = (/*#__PURE__*/BigNumber.from(2)); +const WeiPerEther: BigNumber = (/*#__PURE__*/BigNumber.from("1000000000000000000")); +const MaxUint256: BigNumber = (/*#__PURE__*/BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); + +const MinInt256: BigNumber = (/*#__PURE__*/BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000")); +const MaxInt256: BigNumber = (/*#__PURE__*/BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); + +export { + NegativeOne, + Zero, + One, + Two, + WeiPerEther, + MaxUint256, + MinInt256, + MaxInt256, +}; diff --git a/node_modules/@ethersproject/constants/src.ts/hashes.ts b/node_modules/@ethersproject/constants/src.ts/hashes.ts new file mode 100644 index 0000000..d8c1eed --- /dev/null +++ b/node_modules/@ethersproject/constants/src.ts/hashes.ts @@ -0,0 +1,2 @@ +export const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; + diff --git a/node_modules/@ethersproject/constants/src.ts/index.ts b/node_modules/@ethersproject/constants/src.ts/index.ts new file mode 100644 index 0000000..abc59a0 --- /dev/null +++ b/node_modules/@ethersproject/constants/src.ts/index.ts @@ -0,0 +1,16 @@ +"use strict"; + +export { AddressZero } from "./addresses"; +export { + NegativeOne, + Zero, + One, + Two, + WeiPerEther, + MaxUint256, + MinInt256, + MaxInt256 +} from "./bignumbers"; +export { HashZero } from "./hashes"; +export { EtherSymbol } from "./strings"; + diff --git a/node_modules/@ethersproject/constants/src.ts/strings.ts b/node_modules/@ethersproject/constants/src.ts/strings.ts new file mode 100644 index 0000000..bf87422 --- /dev/null +++ b/node_modules/@ethersproject/constants/src.ts/strings.ts @@ -0,0 +1,2 @@ +// NFKC (composed) // (decomposed) +export const EtherSymbol = "\u039e"; // "\uD835\uDF63"; diff --git a/node_modules/@ethersproject/contracts/LICENSE.md b/node_modules/@ethersproject/contracts/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/contracts/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/contracts/README.md b/node_modules/@ethersproject/contracts/README.md new file mode 100644 index 0000000..d721e5c --- /dev/null +++ b/node_modules/@ethersproject/contracts/README.md @@ -0,0 +1,52 @@ +Ethereum Contract Meta-Class +============================ + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is creating (at run-time) an object which interacts with an on-chain +contract as a native JavaScript object. + +If you are familiar with ORM for Databases, this is similar, but for smart contracts. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/contract/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Contract, + ContractFactory, + + RunningEvent, + + // Types + + ContractInterface, + + Overrides, + PayableOverrides, + CallOverrides, + + PopulatedTransaction, + + EventFilter, + + ContractFunction, + + Event, + ContractReceipt, + ContractTransaction + +} = require("@ethersproject/contracts"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts b/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts new file mode 100644 index 0000000..f0265ad --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "contracts/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/_version.js b/node_modules/@ethersproject/contracts/lib.esm/_version.js new file mode 100644 index 0000000..e75d8b7 --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "contracts/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/_version.js.map b/node_modules/@ethersproject/contracts/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/index.d.ts b/node_modules/@ethersproject/contracts/lib.esm/index.d.ts new file mode 100644 index 0000000..f6d85c5 --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/index.d.ts @@ -0,0 +1,155 @@ +import { Fragment, Indexed, Interface, JsonFragment, Result } from "@ethersproject/abi"; +import { Block, BlockTag, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Signer } from "@ethersproject/abstract-signer"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike } from "@ethersproject/bytes"; +import { AccessList, AccessListish } from "@ethersproject/transactions"; +export interface Overrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + maxFeePerGas?: BigNumberish | Promise; + maxPriorityFeePerGas?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + type?: number; + accessList?: AccessListish; + customData?: Record; +} +export interface PayableOverrides extends Overrides { + value?: BigNumberish | Promise; +} +export interface CallOverrides extends PayableOverrides { + blockTag?: BlockTag | Promise; + from?: string | Promise; +} +export interface PopulatedTransaction { + to?: string; + from?: string; + nonce?: number; + gasLimit?: BigNumber; + gasPrice?: BigNumber; + data?: string; + value?: BigNumber; + chainId?: number; + type?: number; + accessList?: AccessList; + maxFeePerGas?: BigNumber; + maxPriorityFeePerGas?: BigNumber; + customData?: Record; +} +export declare type EventFilter = { + address?: string; + topics?: Array>; +}; +export declare type ContractFunction = (...args: Array) => Promise; +export interface Event extends Log { + event?: string; + eventSignature?: string; + args?: Result; + decodeError?: Error; + decode?: (data: string, topics?: Array) => any; + removeListener: () => void; + getBlock: () => Promise; + getTransaction: () => Promise; + getTransactionReceipt: () => Promise; +} +export interface ContractReceipt extends TransactionReceipt { + events?: Array; +} +export interface ContractTransaction extends TransactionResponse { + wait(confirmations?: number): Promise; +} +declare class RunningEvent { + readonly tag: string; + readonly filter: EventFilter; + private _listeners; + constructor(tag: string, filter: EventFilter); + addListener(listener: Listener, once: boolean): void; + removeListener(listener: Listener): void; + removeAllListeners(): void; + listeners(): Array; + listenerCount(): number; + run(args: Array): number; + prepareEvent(event: Event): void; + getEmit(event: Event): Array; +} +export declare type ContractInterface = string | ReadonlyArray | Interface; +export declare class BaseContract { + readonly address: string; + readonly interface: Interface; + readonly signer: Signer; + readonly provider: Provider; + readonly functions: { + [name: string]: ContractFunction; + }; + readonly callStatic: { + [name: string]: ContractFunction; + }; + readonly estimateGas: { + [name: string]: ContractFunction; + }; + readonly populateTransaction: { + [name: string]: ContractFunction; + }; + readonly filters: { + [name: string]: (...args: Array) => EventFilter; + }; + readonly resolvedAddress: Promise; + readonly deployTransaction: TransactionResponse; + _deployedPromise: Promise; + _runningEvents: { + [eventTag: string]: RunningEvent; + }; + _wrappedEmits: { + [eventTag: string]: (...args: Array) => void; + }; + constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider); + static getContractAddress(transaction: { + from: string; + nonce: BigNumberish; + }): string; + static getInterface(contractInterface: ContractInterface): Interface; + deployed(): Promise; + _deployed(blockTag?: BlockTag): Promise; + fallback(overrides?: TransactionRequest): Promise; + connect(signerOrProvider: Signer | Provider | string): Contract; + attach(addressOrName: string): Contract; + static isIndexed(value: any): value is Indexed; + private _normalizeRunningEvent; + private _getRunningEvent; + _checkRunningEvents(runningEvent: RunningEvent): void; + _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event; + private _addEventListener; + queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise>; + on(event: EventFilter | string, listener: Listener): this; + once(event: EventFilter | string, listener: Listener): this; + emit(eventName: EventFilter | string, ...args: Array): boolean; + listenerCount(eventName?: EventFilter | string): number; + listeners(eventName?: EventFilter | string): Array; + removeAllListeners(eventName?: EventFilter | string): this; + off(eventName: EventFilter | string, listener: Listener): this; + removeListener(eventName: EventFilter | string, listener: Listener): this; +} +export declare class Contract extends BaseContract { + readonly [key: string]: ContractFunction | any; +} +export declare class ContractFactory { + readonly interface: Interface; + readonly bytecode: string; + readonly signer: Signer; + constructor(contractInterface: ContractInterface, bytecode: BytesLike | { + object: string; + }, signer?: Signer); + getDeployTransaction(...args: Array): TransactionRequest; + deploy(...args: Array): Promise; + attach(address: string): Contract; + connect(signer: Signer): ContractFactory; + static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory; + static getInterface(contractInterface: ContractInterface): Interface; + static getContractAddress(tx: { + from: string; + nonce: BytesLike | BigNumber | number; + }): string; + static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/index.d.ts.map b/node_modules/@ethersproject/contracts/lib.esm/index.d.ts.map new file mode 100644 index 0000000..d2e8dca --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoC,QAAQ,EAAoB,OAAO,EAAE,SAAS,EAAE,YAAY,EAA6B,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACvK,OAAO,EAAE,KAAK,EAAE,QAAQ,EAA6B,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACpL,OAAO,EAAE,MAAM,EAAc,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAAyC,MAAM,sBAAsB,CAAC;AAElG,OAAO,EAAE,UAAU,EAAiB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAOvF,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAChD,YAAY,C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AE,SAAS,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,MAAM;IAmC3G,oBAAoB,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,kBAAkB;IAyCvD,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IAgCpD,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM;IAItB,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe;IAqB1E,MAAM,CAAC,YAAY,CAAC,iBAAiB,EAAE,iBAAiB;IAIxD,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;KAAE,GAAG,MAAM;IAI9F,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ;CAGvG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/index.js b/node_modules/@ethersproject/contracts/lib.esm/index.js new file mode 100644 index 0000000..d91e9de --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/index.js @@ -0,0 +1,1022 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { checkResultErrors, Indexed, Interface } from "@ethersproject/abi"; +import { Provider } from "@ethersproject/abstract-provider"; +import { Signer, VoidSigner } from "@ethersproject/abstract-signer"; +import { getAddress, getContractAddress } from "@ethersproject/address"; +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, concat, hexlify, isBytes, isHexString } from "@ethersproject/bytes"; +import { defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import { accessListify } from "@ethersproject/transactions"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +; +; +/////////////////////////////// +const allowedTransactionKeys = { + chainId: true, data: true, from: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true, + customData: true +}; +function resolveName(resolver, nameOrPromise) { + return __awaiter(this, void 0, void 0, function* () { + const name = yield nameOrPromise; + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", name); + } + // If it is already an address, just use it (after adding checksum) + try { + return getAddress(name); + } + catch (error) { } + if (!resolver) { + logger.throwError("a provider or signer is needed to resolve ENS names", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName" + }); + } + const address = yield resolver.resolveName(name); + if (address == null) { + logger.throwArgumentError("resolver or addr is not configured for ENS name", "name", name); + } + return address; + }); +} +// Recursively replaces ENS names with promises to resolve the name and resolves all properties +function resolveAddresses(resolver, value, paramType) { + return __awaiter(this, void 0, void 0, function* () { + if (Array.isArray(paramType)) { + return yield Promise.all(paramType.map((paramType, index) => { + return resolveAddresses(resolver, ((Array.isArray(value)) ? value[index] : value[paramType.name]), paramType); + })); + } + if (paramType.type === "address") { + return yield resolveName(resolver, value); + } + if (paramType.type === "tuple") { + return yield resolveAddresses(resolver, value, paramType.components); + } + if (paramType.baseType === "array") { + if (!Array.isArray(value)) { + return Promise.reject(logger.makeError("invalid value for array", Logger.errors.INVALID_ARGUMENT, { + argument: "value", + value + })); + } + return yield Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren))); + } + return value; + }); +} +function populateTransaction(contract, fragment, args) { + return __awaiter(this, void 0, void 0, function* () { + // If an extra argument is given, it is overrides + let overrides = {}; + if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + overrides = shallowCopy(args.pop()); + } + // Make sure the parameter count matches + logger.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); + // Populate "from" override (allow promises) + if (contract.signer) { + if (overrides.from) { + // Contracts with a Signer are from the Signer's frame-of-reference; + // but we allow overriding "from" if it matches the signer + overrides.from = resolveProperties({ + override: resolveName(contract.signer, overrides.from), + signer: contract.signer.getAddress() + }).then((check) => __awaiter(this, void 0, void 0, function* () { + if (getAddress(check.signer) !== check.override) { + logger.throwError("Contract with a Signer cannot override from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.from" + }); + } + return check.override; + })); + } + else { + overrides.from = contract.signer.getAddress(); + } + } + else if (overrides.from) { + overrides.from = resolveName(contract.provider, overrides.from); + //} else { + // Contracts without a signer can override "from", and if + // unspecified the zero address is used + //overrides.from = AddressZero; + } + // Wait for all dependencies to be resolved (prefer the signer over the provider) + const resolved = yield resolveProperties({ + args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs), + address: contract.resolvedAddress, + overrides: (resolveProperties(overrides) || {}) + }); + // The ABI coded transaction + const data = contract.interface.encodeFunctionData(fragment, resolved.args); + const tx = { + data: data, + to: resolved.address + }; + // Resolved Overrides + const ro = resolved.overrides; + // Populate simple overrides + if (ro.nonce != null) { + tx.nonce = BigNumber.from(ro.nonce).toNumber(); + } + if (ro.gasLimit != null) { + tx.gasLimit = BigNumber.from(ro.gasLimit); + } + if (ro.gasPrice != null) { + tx.gasPrice = BigNumber.from(ro.gasPrice); + } + if (ro.maxFeePerGas != null) { + tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); + } + if (ro.maxPriorityFeePerGas != null) { + tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); + } + if (ro.from != null) { + tx.from = ro.from; + } + if (ro.type != null) { + tx.type = ro.type; + } + if (ro.accessList != null) { + tx.accessList = accessListify(ro.accessList); + } + // If there was no "gasLimit" override, but the ABI specifies a default, use it + if (tx.gasLimit == null && fragment.gas != null) { + // Compute the intrinsic gas cost for this transaction + // @TODO: This is based on the yellow paper as of Petersburg; this is something + // we may wish to parameterize in v6 as part of the Network object. Since this + // is always a non-nil to address, we can ignore G_create, but may wish to add + // similar logic to the ContractFactory. + let intrinsic = 21000; + const bytes = arrayify(data); + for (let i = 0; i < bytes.length; i++) { + intrinsic += 4; + if (bytes[i]) { + intrinsic += 64; + } + } + tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic); + } + // Populate "value" override + if (ro.value) { + const roValue = BigNumber.from(ro.value); + if (!roValue.isZero() && !fragment.payable) { + logger.throwError("non-payable method cannot override value", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: overrides.value + }); + } + tx.value = roValue; + } + if (ro.customData) { + tx.customData = shallowCopy(ro.customData); + } + // Remove the overrides + delete overrides.nonce; + delete overrides.gasLimit; + delete overrides.gasPrice; + delete overrides.from; + delete overrides.value; + delete overrides.type; + delete overrides.accessList; + delete overrides.maxFeePerGas; + delete overrides.maxPriorityFeePerGas; + delete overrides.customData; + // Make sure there are no stray overrides, which may indicate a + // typo or using an unsupported key. + const leftovers = Object.keys(overrides).filter((key) => (overrides[key] != null)); + if (leftovers.length) { + logger.throwError(`cannot override ${leftovers.map((l) => JSON.stringify(l)).join(",")}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides", + overrides: leftovers + }); + } + return tx; + }); +} +function buildPopulate(contract, fragment) { + return function (...args) { + return populateTransaction(contract, fragment, args); + }; +} +function buildEstimate(contract, fragment) { + const signerOrProvider = (contract.signer || contract.provider); + return function (...args) { + return __awaiter(this, void 0, void 0, function* () { + if (!signerOrProvider) { + logger.throwError("estimate require a provider or signer", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "estimateGas" + }); + } + const tx = yield populateTransaction(contract, fragment, args); + return yield signerOrProvider.estimateGas(tx); + }); + }; +} +function addContractWait(contract, tx) { + const wait = tx.wait.bind(tx); + tx.wait = (confirmations) => { + return wait(confirmations).then((receipt) => { + receipt.events = receipt.logs.map((log) => { + let event = deepCopy(log); + let parsed = null; + try { + parsed = contract.interface.parseLog(log); + } + catch (e) { } + // Successfully parsed the event log; include it + if (parsed) { + event.args = parsed.args; + event.decode = (data, topics) => { + return contract.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.event = parsed.name; + event.eventSignature = parsed.signature; + } + // Useful operations + event.removeListener = () => { return contract.provider; }; + event.getBlock = () => { + return contract.provider.getBlock(receipt.blockHash); + }; + event.getTransaction = () => { + return contract.provider.getTransaction(receipt.transactionHash); + }; + event.getTransactionReceipt = () => { + return Promise.resolve(receipt); + }; + return event; + }); + return receipt; + }); + }; +} +function buildCall(contract, fragment, collapseSimple) { + const signerOrProvider = (contract.signer || contract.provider); + return function (...args) { + return __awaiter(this, void 0, void 0, function* () { + // Extract the "blockTag" override if present + let blockTag = undefined; + if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + const overrides = shallowCopy(args.pop()); + if (overrides.blockTag != null) { + blockTag = yield overrides.blockTag; + } + delete overrides.blockTag; + args.push(overrides); + } + // If the contract was just deployed, wait until it is mined + if (contract.deployTransaction != null) { + yield contract._deployed(blockTag); + } + // Call a node and get the result + const tx = yield populateTransaction(contract, fragment, args); + const result = yield signerOrProvider.call(tx, blockTag); + try { + let value = contract.interface.decodeFunctionResult(fragment, result); + if (collapseSimple && fragment.outputs.length === 1) { + value = value[0]; + } + return value; + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + error.address = contract.address; + error.args = args; + error.transaction = tx; + } + throw error; + } + }); + }; +} +function buildSend(contract, fragment) { + return function (...args) { + return __awaiter(this, void 0, void 0, function* () { + if (!contract.signer) { + logger.throwError("sending a transaction requires a signer", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "sendTransaction" + }); + } + // If the contract was just deployed, wait until it is mined + if (contract.deployTransaction != null) { + yield contract._deployed(); + } + const txRequest = yield populateTransaction(contract, fragment, args); + const tx = yield contract.signer.sendTransaction(txRequest); + // Tweak the tx.wait so the receipt has extra properties + addContractWait(contract, tx); + return tx; + }); + }; +} +function buildDefault(contract, fragment, collapseSimple) { + if (fragment.constant) { + return buildCall(contract, fragment, collapseSimple); + } + return buildSend(contract, fragment); +} +function getEventTag(filter) { + if (filter.address && (filter.topics == null || filter.topics.length === 0)) { + return "*"; + } + return (filter.address || "*") + "@" + (filter.topics ? filter.topics.map((topic) => { + if (Array.isArray(topic)) { + return topic.join("|"); + } + return topic; + }).join(":") : ""); +} +class RunningEvent { + constructor(tag, filter) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "filter", filter); + this._listeners = []; + } + addListener(listener, once) { + this._listeners.push({ listener: listener, once: once }); + } + removeListener(listener) { + let done = false; + this._listeners = this._listeners.filter((item) => { + if (done || item.listener !== listener) { + return true; + } + done = true; + return false; + }); + } + removeAllListeners() { + this._listeners = []; + } + listeners() { + return this._listeners.map((i) => i.listener); + } + listenerCount() { + return this._listeners.length; + } + run(args) { + const listenerCount = this.listenerCount(); + this._listeners = this._listeners.filter((item) => { + const argsCopy = args.slice(); + // Call the callback in the next event loop + setTimeout(() => { + item.listener.apply(this, argsCopy); + }, 0); + // Reschedule it if it not "once" + return !(item.once); + }); + return listenerCount; + } + prepareEvent(event) { + } + // Returns the array that will be applied to an emit + getEmit(event) { + return [event]; + } +} +class ErrorRunningEvent extends RunningEvent { + constructor() { + super("error", null); + } +} +// @TODO Fragment should inherit Wildcard? and just override getEmit? +// or have a common abstract super class, with enough constructor +// options to configure both. +// A Fragment Event will populate all the properties that Wildcard +// will, and additionally dereference the arguments when emitting +class FragmentRunningEvent extends RunningEvent { + constructor(address, contractInterface, fragment, topics) { + const filter = { + address: address + }; + let topic = contractInterface.getEventTopic(fragment); + if (topics) { + if (topic !== topics[0]) { + logger.throwArgumentError("topic mismatch", "topics", topics); + } + filter.topics = topics.slice(); + } + else { + filter.topics = [topic]; + } + super(getEventTag(filter), filter); + defineReadOnly(this, "address", address); + defineReadOnly(this, "interface", contractInterface); + defineReadOnly(this, "fragment", fragment); + } + prepareEvent(event) { + super.prepareEvent(event); + event.event = this.fragment.name; + event.eventSignature = this.fragment.format(); + event.decode = (data, topics) => { + return this.interface.decodeEventLog(this.fragment, data, topics); + }; + try { + event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics); + } + catch (error) { + event.args = null; + event.decodeError = error; + } + } + getEmit(event) { + const errors = checkResultErrors(event.args); + if (errors.length) { + throw errors[0].error; + } + const args = (event.args || []).slice(); + args.push(event); + return args; + } +} +// A Wildcard Event will attempt to populate: +// - event The name of the event name +// - eventSignature The full signature of the event +// - decode A function to decode data and topics +// - args The decoded data and topics +class WildcardRunningEvent extends RunningEvent { + constructor(address, contractInterface) { + super("*", { address: address }); + defineReadOnly(this, "address", address); + defineReadOnly(this, "interface", contractInterface); + } + prepareEvent(event) { + super.prepareEvent(event); + try { + const parsed = this.interface.parseLog(event); + event.event = parsed.name; + event.eventSignature = parsed.signature; + event.decode = (data, topics) => { + return this.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.args = parsed.args; + } + catch (error) { + // No matching event + } + } +} +export class BaseContract { + constructor(addressOrName, contractInterface, signerOrProvider) { + logger.checkNew(new.target, Contract); + // @TODO: Maybe still check the addressOrName looks like a valid address or name? + //address = getAddress(address); + defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + if (signerOrProvider == null) { + defineReadOnly(this, "provider", null); + defineReadOnly(this, "signer", null); + } + else if (Signer.isSigner(signerOrProvider)) { + defineReadOnly(this, "provider", signerOrProvider.provider || null); + defineReadOnly(this, "signer", signerOrProvider); + } + else if (Provider.isProvider(signerOrProvider)) { + defineReadOnly(this, "provider", signerOrProvider); + defineReadOnly(this, "signer", null); + } + else { + logger.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); + } + defineReadOnly(this, "callStatic", {}); + defineReadOnly(this, "estimateGas", {}); + defineReadOnly(this, "functions", {}); + defineReadOnly(this, "populateTransaction", {}); + defineReadOnly(this, "filters", {}); + { + const uniqueFilters = {}; + Object.keys(this.interface.events).forEach((eventSignature) => { + const event = this.interface.events[eventSignature]; + defineReadOnly(this.filters, eventSignature, (...args) => { + return { + address: this.address, + topics: this.interface.encodeFilterTopics(event, args) + }; + }); + if (!uniqueFilters[event.name]) { + uniqueFilters[event.name] = []; + } + uniqueFilters[event.name].push(eventSignature); + }); + Object.keys(uniqueFilters).forEach((name) => { + const filters = uniqueFilters[name]; + if (filters.length === 1) { + defineReadOnly(this.filters, name, this.filters[filters[0]]); + } + else { + logger.warn(`Duplicate definition of ${name} (${filters.join(", ")})`); + } + }); + } + defineReadOnly(this, "_runningEvents", {}); + defineReadOnly(this, "_wrappedEmits", {}); + if (addressOrName == null) { + logger.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); + } + defineReadOnly(this, "address", addressOrName); + if (this.provider) { + defineReadOnly(this, "resolvedAddress", resolveName(this.provider, addressOrName)); + } + else { + try { + defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName))); + } + catch (error) { + // Without a provider, we cannot use ENS names + logger.throwError("provider is required to use ENS name as contract address", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Contract" + }); + } + } + const uniqueNames = {}; + const uniqueSignatures = {}; + Object.keys(this.interface.functions).forEach((signature) => { + const fragment = this.interface.functions[signature]; + // Check that the signature is unique; if not the ABI generation has + // not been cleaned or may be incorrectly generated + if (uniqueSignatures[signature]) { + logger.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`); + return; + } + uniqueSignatures[signature] = true; + // Track unique names; we only expose bare named functions if they + // are ambiguous + { + const name = fragment.name; + if (!uniqueNames[`%${name}`]) { + uniqueNames[`%${name}`] = []; + } + uniqueNames[`%${name}`].push(signature); + } + if (this[signature] == null) { + defineReadOnly(this, signature, buildDefault(this, fragment, true)); + } + // We do not collapse simple calls on this bucket, which allows + // frameworks to safely use this without introspection as well as + // allows decoding error recovery. + if (this.functions[signature] == null) { + defineReadOnly(this.functions, signature, buildDefault(this, fragment, false)); + } + if (this.callStatic[signature] == null) { + defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true)); + } + if (this.populateTransaction[signature] == null) { + defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment)); + } + if (this.estimateGas[signature] == null) { + defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment)); + } + }); + Object.keys(uniqueNames).forEach((name) => { + // Ambiguous names to not get attached as bare names + const signatures = uniqueNames[name]; + if (signatures.length > 1) { + return; + } + // Strip off the leading "%" used for prototype protection + name = name.substring(1); + const signature = signatures[0]; + // If overwriting a member property that is null, swallow the error + try { + if (this[name] == null) { + defineReadOnly(this, name, this[signature]); + } + } + catch (e) { } + if (this.functions[name] == null) { + defineReadOnly(this.functions, name, this.functions[signature]); + } + if (this.callStatic[name] == null) { + defineReadOnly(this.callStatic, name, this.callStatic[signature]); + } + if (this.populateTransaction[name] == null) { + defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]); + } + if (this.estimateGas[name] == null) { + defineReadOnly(this.estimateGas, name, this.estimateGas[signature]); + } + }); + } + static getContractAddress(transaction) { + return getContractAddress(transaction); + } + static getInterface(contractInterface) { + if (Interface.isInterface(contractInterface)) { + return contractInterface; + } + return new Interface(contractInterface); + } + // @TODO: Allow timeout? + deployed() { + return this._deployed(); + } + _deployed(blockTag) { + if (!this._deployedPromise) { + // If we were just deployed, we know the transaction we should occur in + if (this.deployTransaction) { + this._deployedPromise = this.deployTransaction.wait().then(() => { + return this; + }); + } + else { + // @TODO: Once we allow a timeout to be passed in, we will wait + // up to that many blocks for getCode + // Otherwise, poll for our code to be deployed + this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => { + if (code === "0x") { + logger.throwError("contract not deployed", Logger.errors.UNSUPPORTED_OPERATION, { + contractAddress: this.address, + operation: "getDeployed" + }); + } + return this; + }); + } + } + return this._deployedPromise; + } + // @TODO: + // estimateFallback(overrides?: TransactionRequest): Promise + // @TODO: + // estimateDeploy(bytecode: string, ...args): Promise + fallback(overrides) { + if (!this.signer) { + logger.throwError("sending a transactions require a signer", Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }); + } + const tx = shallowCopy(overrides || {}); + ["from", "to"].forEach(function (key) { + if (tx[key] == null) { + return; + } + logger.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + tx.to = this.resolvedAddress; + return this.deployed().then(() => { + return this.signer.sendTransaction(tx); + }); + } + // Reconnect to a different signer or provider + connect(signerOrProvider) { + if (typeof (signerOrProvider) === "string") { + signerOrProvider = new VoidSigner(signerOrProvider, this.provider); + } + const contract = new (this.constructor)(this.address, this.interface, signerOrProvider); + if (this.deployTransaction) { + defineReadOnly(contract, "deployTransaction", this.deployTransaction); + } + return contract; + } + // Re-attach to a different on-chain instance of this contract + attach(addressOrName) { + return new (this.constructor)(addressOrName, this.interface, this.signer || this.provider); + } + static isIndexed(value) { + return Indexed.isIndexed(value); + } + _normalizeRunningEvent(runningEvent) { + // Already have an instance of this event running; we can re-use it + if (this._runningEvents[runningEvent.tag]) { + return this._runningEvents[runningEvent.tag]; + } + return runningEvent; + } + _getRunningEvent(eventName) { + if (typeof (eventName) === "string") { + // Listen for "error" events (if your contract has an error event, include + // the full signature to bypass this special event keyword) + if (eventName === "error") { + return this._normalizeRunningEvent(new ErrorRunningEvent()); + } + // Listen for any event that is registered + if (eventName === "event") { + return this._normalizeRunningEvent(new RunningEvent("event", null)); + } + // Listen for any event + if (eventName === "*") { + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + // Get the event Fragment (throws if ambiguous/unknown event) + const fragment = this.interface.getEvent(eventName); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment)); + } + // We have topics to filter by... + if (eventName.topics && eventName.topics.length > 0) { + // Is it a known topichash? (throws if no matching topichash) + try { + const topic = eventName.topics[0]; + if (typeof (topic) !== "string") { + throw new Error("invalid topic"); // @TODO: May happen for anonymous events + } + const fragment = this.interface.getEvent(topic); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics)); + } + catch (error) { } + // Filter by the unknown topichash + const filter = { + address: this.address, + topics: eventName.topics + }; + return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter)); + } + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + _checkRunningEvents(runningEvent) { + if (runningEvent.listenerCount() === 0) { + delete this._runningEvents[runningEvent.tag]; + // If we have a poller for this, remove it + const emit = this._wrappedEmits[runningEvent.tag]; + if (emit && runningEvent.filter) { + this.provider.off(runningEvent.filter, emit); + delete this._wrappedEmits[runningEvent.tag]; + } + } + } + // Subclasses can override this to gracefully recover + // from parse errors if they wish + _wrapEvent(runningEvent, log, listener) { + const event = deepCopy(log); + event.removeListener = () => { + if (!listener) { + return; + } + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + }; + event.getBlock = () => { return this.provider.getBlock(log.blockHash); }; + event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); }; + event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); }; + // This may throw if the topics and data mismatch the signature + runningEvent.prepareEvent(event); + return event; + } + _addEventListener(runningEvent, listener, once) { + if (!this.provider) { + logger.throwError("events require a provider or a signer with a provider", Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }); + } + runningEvent.addListener(listener, once); + // Track this running event and its listeners (may already be there; but no hard in updating) + this._runningEvents[runningEvent.tag] = runningEvent; + // If we are not polling the provider, start polling + if (!this._wrappedEmits[runningEvent.tag]) { + const wrappedEmit = (log) => { + let event = this._wrapEvent(runningEvent, log, listener); + // Try to emit the result for the parameterized event... + if (event.decodeError == null) { + try { + const args = runningEvent.getEmit(event); + this.emit(runningEvent.filter, ...args); + } + catch (error) { + event.decodeError = error.error; + } + } + // Always emit "event" for fragment-base events + if (runningEvent.filter != null) { + this.emit("event", event); + } + // Emit "error" if there was an error + if (event.decodeError != null) { + this.emit("error", event.decodeError, event); + } + }; + this._wrappedEmits[runningEvent.tag] = wrappedEmit; + // Special events, like "error" do not have a filter + if (runningEvent.filter != null) { + this.provider.on(runningEvent.filter, wrappedEmit); + } + } + } + queryFilter(event, fromBlockOrBlockhash, toBlock) { + const runningEvent = this._getRunningEvent(event); + const filter = shallowCopy(runningEvent.filter); + if (typeof (fromBlockOrBlockhash) === "string" && isHexString(fromBlockOrBlockhash, 32)) { + if (toBlock != null) { + logger.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); + } + filter.blockHash = fromBlockOrBlockhash; + } + else { + filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0); + filter.toBlock = ((toBlock != null) ? toBlock : "latest"); + } + return this.provider.getLogs(filter).then((logs) => { + return logs.map((log) => this._wrapEvent(runningEvent, log, null)); + }); + } + on(event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, false); + return this; + } + once(event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, true); + return this; + } + emit(eventName, ...args) { + if (!this.provider) { + return false; + } + const runningEvent = this._getRunningEvent(eventName); + const result = (runningEvent.run(args) > 0); + // May have drained all the "once" events; check for living events + this._checkRunningEvents(runningEvent); + return result; + } + listenerCount(eventName) { + if (!this.provider) { + return 0; + } + if (eventName == null) { + return Object.keys(this._runningEvents).reduce((accum, key) => { + return accum + this._runningEvents[key].listenerCount(); + }, 0); + } + return this._getRunningEvent(eventName).listenerCount(); + } + listeners(eventName) { + if (!this.provider) { + return []; + } + if (eventName == null) { + const result = []; + for (let tag in this._runningEvents) { + this._runningEvents[tag].listeners().forEach((listener) => { + result.push(listener); + }); + } + return result; + } + return this._getRunningEvent(eventName).listeners(); + } + removeAllListeners(eventName) { + if (!this.provider) { + return this; + } + if (eventName == null) { + for (const tag in this._runningEvents) { + const runningEvent = this._runningEvents[tag]; + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + } + return this; + } + // Delete any listeners + const runningEvent = this._getRunningEvent(eventName); + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + return this; + } + off(eventName, listener) { + if (!this.provider) { + return this; + } + const runningEvent = this._getRunningEvent(eventName); + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + return this; + } + removeListener(eventName, listener) { + return this.off(eventName, listener); + } +} +export class Contract extends BaseContract { +} +export class ContractFactory { + constructor(contractInterface, bytecode, signer) { + let bytecodeHex = null; + if (typeof (bytecode) === "string") { + bytecodeHex = bytecode; + } + else if (isBytes(bytecode)) { + bytecodeHex = hexlify(bytecode); + } + else if (bytecode && typeof (bytecode.object) === "string") { + // Allow the bytecode object from the Solidity compiler + bytecodeHex = bytecode.object; + } + else { + // Crash in the next verification step + bytecodeHex = "!"; + } + // Make sure it is 0x prefixed + if (bytecodeHex.substring(0, 2) !== "0x") { + bytecodeHex = "0x" + bytecodeHex; + } + // Make sure the final result is valid bytecode + if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) { + logger.throwArgumentError("invalid bytecode", "bytecode", bytecode); + } + // If we have a signer, make sure it is valid + if (signer && !Signer.isSigner(signer)) { + logger.throwArgumentError("invalid signer", "signer", signer); + } + defineReadOnly(this, "bytecode", bytecodeHex); + defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + defineReadOnly(this, "signer", signer || null); + } + // @TODO: Future; rename to populateTransaction? + getDeployTransaction(...args) { + let tx = {}; + // If we have 1 additional argument, we allow transaction overrides + if (args.length === this.interface.deploy.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + tx = shallowCopy(args.pop()); + for (const key in tx) { + if (!allowedTransactionKeys[key]) { + throw new Error("unknown transaction override " + key); + } + } + } + // Do not allow these to be overridden in a deployment transaction + ["data", "from", "to"].forEach((key) => { + if (tx[key] == null) { + return; + } + logger.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + if (tx.value) { + const value = BigNumber.from(tx.value); + if (!value.isZero() && !this.interface.deploy.payable) { + logger.throwError("non-payable constructor cannot override value", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: tx.value + }); + } + } + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + // Set the data to the bytecode + the encoded constructor arguments + tx.data = hexlify(concat([ + this.bytecode, + this.interface.encodeDeploy(args) + ])); + return tx; + } + deploy(...args) { + return __awaiter(this, void 0, void 0, function* () { + let overrides = {}; + // If 1 extra parameter was passed in, it contains overrides + if (args.length === this.interface.deploy.inputs.length + 1) { + overrides = args.pop(); + } + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + // Resolve ENS names and promises in the arguments + const params = yield resolveAddresses(this.signer, args, this.interface.deploy.inputs); + params.push(overrides); + // Get the deployment transaction (with optional overrides) + const unsignedTx = this.getDeployTransaction(...params); + // Send the deployment transaction + const tx = yield this.signer.sendTransaction(unsignedTx); + const address = getStatic(this.constructor, "getContractAddress")(tx); + const contract = getStatic(this.constructor, "getContract")(address, this.interface, this.signer); + // Add the modified wait that wraps events + addContractWait(contract, tx); + defineReadOnly(contract, "deployTransaction", tx); + return contract; + }); + } + attach(address) { + return (this.constructor).getContract(address, this.interface, this.signer); + } + connect(signer) { + return new (this.constructor)(this.interface, this.bytecode, signer); + } + static fromSolidity(compilerOutput, signer) { + if (compilerOutput == null) { + logger.throwError("missing compiler output", Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); + } + if (typeof (compilerOutput) === "string") { + compilerOutput = JSON.parse(compilerOutput); + } + const abi = compilerOutput.abi; + let bytecode = null; + if (compilerOutput.bytecode) { + bytecode = compilerOutput.bytecode; + } + else if (compilerOutput.evm && compilerOutput.evm.bytecode) { + bytecode = compilerOutput.evm.bytecode; + } + return new this(abi, bytecode, signer); + } + static getInterface(contractInterface) { + return Contract.getInterface(contractInterface); + } + static getContractAddress(tx) { + return getContractAddress(tx); + } + static getContract(address, contractInterface, signer) { + return new Contract(address, contractInterface, signer); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib.esm/index.js.map b/node_modules/@ethersproject/contracts/lib.esm/index.js.map new file mode 100644 index 0000000..a99165e --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,iBAAiB,EAA6C,OAAO,EAAE,SAAS,EAAmD,MAAM,oBAAoB,CAAC;AACvK,OAAO,EAA6D,QAAQ,EAA+D,MAAM,kCAAkC,CAAC;AACpL,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAa,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAc,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC5H,OAAO,EAAc,aAAa,EAAiB,MAAM,6BAA6B,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAWlC,CAAC;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CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,EAA2D;QACjF,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,OAAe,EAAE,iBAAoC,EAAE,MAAe;QACrF,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/_version.d.ts b/node_modules/@ethersproject/contracts/lib/_version.d.ts new file mode 100644 index 0000000..f0265ad --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "contracts/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/_version.d.ts.map b/node_modules/@ethersproject/contracts/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/_version.js b/node_modules/@ethersproject/contracts/lib/_version.js new file mode 100644 index 0000000..07b264c --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "contracts/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/_version.js.map b/node_modules/@ethersproject/contracts/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/index.d.ts b/node_modules/@ethersproject/contracts/lib/index.d.ts new file mode 100644 index 0000000..f6d85c5 --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/index.d.ts @@ -0,0 +1,155 @@ +import { Fragment, Indexed, Interface, JsonFragment, Result } from "@ethersproject/abi"; +import { Block, BlockTag, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Signer } from "@ethersproject/abstract-signer"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike } from "@ethersproject/bytes"; +import { AccessList, AccessListish } from "@ethersproject/transactions"; +export interface Overrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + maxFeePerGas?: BigNumberish | Promise; + maxPriorityFeePerGas?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + type?: number; + accessList?: AccessListish; + customData?: Record; +} +export interface PayableOverrides extends Overrides { + value?: BigNumberish | Promise; +} +export interface CallOverrides extends PayableOverrides { + blockTag?: BlockTag | Promise; + from?: string | Promise; +} +export interface PopulatedTransaction { + to?: string; + from?: string; + nonce?: number; + gasLimit?: BigNumber; + gasPrice?: BigNumber; + data?: string; + value?: BigNumber; + chainId?: number; + type?: number; + accessList?: AccessList; + maxFeePerGas?: BigNumber; + maxPriorityFeePerGas?: BigNumber; + customData?: Record; +} +export declare type EventFilter = { + address?: string; + topics?: Array>; +}; +export declare type ContractFunction = (...args: Array) => Promise; +export interface Event extends Log { + event?: string; + eventSignature?: string; + args?: Result; + decodeError?: Error; + decode?: (data: string, topics?: Array) => any; + removeListener: () => void; + getBlock: () => Promise; + getTransaction: () => Promise; + getTransactionReceipt: () => Promise; +} +export interface ContractReceipt extends TransactionReceipt { + events?: Array; +} +export interface ContractTransaction extends TransactionResponse { + wait(confirmations?: number): Promise; +} +declare class RunningEvent { + readonly tag: string; + readonly filter: EventFilter; + private _listeners; + constructor(tag: string, filter: EventFilter); + addListener(listener: Listener, once: boolean): void; + removeListener(listener: Listener): void; + removeAllListeners(): void; + listeners(): Array; + listenerCount(): number; + run(args: Array): number; + prepareEvent(event: Event): void; + getEmit(event: Event): Array; +} +export declare type ContractInterface = string | ReadonlyArray | Interface; +export declare class BaseContract { + readonly address: string; + readonly interface: Interface; + readonly signer: Signer; + readonly provider: Provider; + readonly functions: { + [name: string]: ContractFunction; + }; + readonly callStatic: { + [name: string]: ContractFunction; + }; + readonly estimateGas: { + [name: string]: ContractFunction; + }; + readonly populateTransaction: { + [name: string]: ContractFunction; + }; + readonly filters: { + [name: string]: (...args: Array) => EventFilter; + }; + readonly resolvedAddress: Promise; + readonly deployTransaction: TransactionResponse; + _deployedPromise: Promise; + _runningEvents: { + [eventTag: string]: RunningEvent; + }; + _wrappedEmits: { + [eventTag: string]: (...args: Array) => void; + }; + constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider); + static getContractAddress(transaction: { + from: string; + nonce: BigNumberish; + }): string; + static getInterface(contractInterface: ContractInterface): Interface; + deployed(): Promise; + _deployed(blockTag?: BlockTag): Promise; + fallback(overrides?: TransactionRequest): Promise; + connect(signerOrProvider: Signer | Provider | string): Contract; + attach(addressOrName: string): Contract; + static isIndexed(value: any): value is Indexed; + private _normalizeRunningEvent; + private _getRunningEvent; + _checkRunningEvents(runningEvent: RunningEvent): void; + _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event; + private _addEventListener; + queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise>; + on(event: EventFilter | string, listener: Listener): this; + once(event: EventFilter | string, listener: Listener): this; + emit(eventName: EventFilter | string, ...args: Array): boolean; + listenerCount(eventName?: EventFilter | string): number; + listeners(eventName?: EventFilter | string): Array; + removeAllListeners(eventName?: EventFilter | string): this; + off(eventName: EventFilter | string, listener: Listener): this; + removeListener(eventName: EventFilter | string, listener: Listener): this; +} +export declare class Contract extends BaseContract { + readonly [key: string]: ContractFunction | any; +} +export declare class ContractFactory { + readonly interface: Interface; + readonly bytecode: string; + readonly signer: Signer; + constructor(contractInterface: ContractInterface, bytecode: BytesLike | { + object: string; + }, signer?: Signer); + getDeployTransaction(...args: Array): TransactionRequest; + deploy(...args: Array): Promise; + attach(address: string): Contract; + connect(signer: Signer): ContractFactory; + static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory; + static getInterface(contractInterface: ContractInterface): Interface; + static getContractAddress(tx: { + from: string; + nonce: BytesLike | BigNumber | number; + }): string; + static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/index.d.ts.map b/node_modules/@ethersproject/contracts/lib/index.d.ts.map new file mode 100644 index 0000000..d2e8dca --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoC,QAAQ,EAAoB,OAAO,EAAE,SAAS,EAAE,YAAY,EAA6B,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACvK,OAAO,EAAE,KAAK,EAAE,QAAQ,EAA6B,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACpL,OAAO,EAAE,MAAM,EAAc,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAAyC,MAAM,sBAAsB,CAAC;AAElG,OAAO,EAAE,UAAU,EAAiB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAOvF,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,EAAE,YAAY,GAA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Q,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,iBAAiB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,MAAM;IAmC3G,oBAAoB,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,kBAAkB;IAyCvD,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IAgCpD,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM;IAItB,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe;IAqB1E,MAAM,CAAC,YAAY,CAAC,iBAAiB,EAAE,iBAAiB;IAIxD,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;KAAE,GAAG,MAAM;IAI9F,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ;CAGvG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/index.js b/node_modules/@ethersproject/contracts/lib/index.js new file mode 100644 index 0000000..2a5c162 --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/index.js @@ -0,0 +1,1197 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ContractFactory = exports.Contract = exports.BaseContract = void 0; +var abi_1 = require("@ethersproject/abi"); +var abstract_provider_1 = require("@ethersproject/abstract-provider"); +var abstract_signer_1 = require("@ethersproject/abstract-signer"); +var address_1 = require("@ethersproject/address"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var transactions_1 = require("@ethersproject/transactions"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +; +; +/////////////////////////////// +var allowedTransactionKeys = { + chainId: true, data: true, from: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true, + customData: true +}; +function resolveName(resolver, nameOrPromise) { + return __awaiter(this, void 0, void 0, function () { + var name, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, nameOrPromise]; + case 1: + name = _a.sent(); + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", name); + } + // If it is already an address, just use it (after adding checksum) + try { + return [2 /*return*/, (0, address_1.getAddress)(name)]; + } + catch (error) { } + if (!resolver) { + logger.throwError("a provider or signer is needed to resolve ENS names", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName" + }); + } + return [4 /*yield*/, resolver.resolveName(name)]; + case 2: + address = _a.sent(); + if (address == null) { + logger.throwArgumentError("resolver or addr is not configured for ENS name", "name", name); + } + return [2 /*return*/, address]; + } + }); + }); +} +// Recursively replaces ENS names with promises to resolve the name and resolves all properties +function resolveAddresses(resolver, value, paramType) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!Array.isArray(paramType)) return [3 /*break*/, 2]; + return [4 /*yield*/, Promise.all(paramType.map(function (paramType, index) { + return resolveAddresses(resolver, ((Array.isArray(value)) ? value[index] : value[paramType.name]), paramType); + }))]; + case 1: return [2 /*return*/, _a.sent()]; + case 2: + if (!(paramType.type === "address")) return [3 /*break*/, 4]; + return [4 /*yield*/, resolveName(resolver, value)]; + case 3: return [2 /*return*/, _a.sent()]; + case 4: + if (!(paramType.type === "tuple")) return [3 /*break*/, 6]; + return [4 /*yield*/, resolveAddresses(resolver, value, paramType.components)]; + case 5: return [2 /*return*/, _a.sent()]; + case 6: + if (!(paramType.baseType === "array")) return [3 /*break*/, 8]; + if (!Array.isArray(value)) { + return [2 /*return*/, Promise.reject(logger.makeError("invalid value for array", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "value", + value: value + }))]; + } + return [4 /*yield*/, Promise.all(value.map(function (v) { return resolveAddresses(resolver, v, paramType.arrayChildren); }))]; + case 7: return [2 /*return*/, _a.sent()]; + case 8: return [2 /*return*/, value]; + } + }); + }); +} +function populateTransaction(contract, fragment, args) { + return __awaiter(this, void 0, void 0, function () { + var overrides, resolved, data, tx, ro, intrinsic, bytes, i, roValue, leftovers; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + overrides = {}; + if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + overrides = (0, properties_1.shallowCopy)(args.pop()); + } + // Make sure the parameter count matches + logger.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); + // Populate "from" override (allow promises) + if (contract.signer) { + if (overrides.from) { + // Contracts with a Signer are from the Signer's frame-of-reference; + // but we allow overriding "from" if it matches the signer + overrides.from = (0, properties_1.resolveProperties)({ + override: resolveName(contract.signer, overrides.from), + signer: contract.signer.getAddress() + }).then(function (check) { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + if ((0, address_1.getAddress)(check.signer) !== check.override) { + logger.throwError("Contract with a Signer cannot override from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.from" + }); + } + return [2 /*return*/, check.override]; + }); + }); }); + } + else { + overrides.from = contract.signer.getAddress(); + } + } + else if (overrides.from) { + overrides.from = resolveName(contract.provider, overrides.from); + //} else { + // Contracts without a signer can override "from", and if + // unspecified the zero address is used + //overrides.from = AddressZero; + } + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs), + address: contract.resolvedAddress, + overrides: ((0, properties_1.resolveProperties)(overrides) || {}) + })]; + case 1: + resolved = _a.sent(); + data = contract.interface.encodeFunctionData(fragment, resolved.args); + tx = { + data: data, + to: resolved.address + }; + ro = resolved.overrides; + // Populate simple overrides + if (ro.nonce != null) { + tx.nonce = bignumber_1.BigNumber.from(ro.nonce).toNumber(); + } + if (ro.gasLimit != null) { + tx.gasLimit = bignumber_1.BigNumber.from(ro.gasLimit); + } + if (ro.gasPrice != null) { + tx.gasPrice = bignumber_1.BigNumber.from(ro.gasPrice); + } + if (ro.maxFeePerGas != null) { + tx.maxFeePerGas = bignumber_1.BigNumber.from(ro.maxFeePerGas); + } + if (ro.maxPriorityFeePerGas != null) { + tx.maxPriorityFeePerGas = bignumber_1.BigNumber.from(ro.maxPriorityFeePerGas); + } + if (ro.from != null) { + tx.from = ro.from; + } + if (ro.type != null) { + tx.type = ro.type; + } + if (ro.accessList != null) { + tx.accessList = (0, transactions_1.accessListify)(ro.accessList); + } + // If there was no "gasLimit" override, but the ABI specifies a default, use it + if (tx.gasLimit == null && fragment.gas != null) { + intrinsic = 21000; + bytes = (0, bytes_1.arrayify)(data); + for (i = 0; i < bytes.length; i++) { + intrinsic += 4; + if (bytes[i]) { + intrinsic += 64; + } + } + tx.gasLimit = bignumber_1.BigNumber.from(fragment.gas).add(intrinsic); + } + // Populate "value" override + if (ro.value) { + roValue = bignumber_1.BigNumber.from(ro.value); + if (!roValue.isZero() && !fragment.payable) { + logger.throwError("non-payable method cannot override value", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: overrides.value + }); + } + tx.value = roValue; + } + if (ro.customData) { + tx.customData = (0, properties_1.shallowCopy)(ro.customData); + } + // Remove the overrides + delete overrides.nonce; + delete overrides.gasLimit; + delete overrides.gasPrice; + delete overrides.from; + delete overrides.value; + delete overrides.type; + delete overrides.accessList; + delete overrides.maxFeePerGas; + delete overrides.maxPriorityFeePerGas; + delete overrides.customData; + leftovers = Object.keys(overrides).filter(function (key) { return (overrides[key] != null); }); + if (leftovers.length) { + logger.throwError("cannot override " + leftovers.map(function (l) { return JSON.stringify(l); }).join(","), logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides", + overrides: leftovers + }); + } + return [2 /*return*/, tx]; + } + }); + }); +} +function buildPopulate(contract, fragment) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return populateTransaction(contract, fragment, args); + }; +} +function buildEstimate(contract, fragment) { + var signerOrProvider = (contract.signer || contract.provider); + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!signerOrProvider) { + logger.throwError("estimate require a provider or signer", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "estimateGas" + }); + } + return [4 /*yield*/, populateTransaction(contract, fragment, args)]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, signerOrProvider.estimateGas(tx)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; +} +function addContractWait(contract, tx) { + var wait = tx.wait.bind(tx); + tx.wait = function (confirmations) { + return wait(confirmations).then(function (receipt) { + receipt.events = receipt.logs.map(function (log) { + var event = (0, properties_1.deepCopy)(log); + var parsed = null; + try { + parsed = contract.interface.parseLog(log); + } + catch (e) { } + // Successfully parsed the event log; include it + if (parsed) { + event.args = parsed.args; + event.decode = function (data, topics) { + return contract.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.event = parsed.name; + event.eventSignature = parsed.signature; + } + // Useful operations + event.removeListener = function () { return contract.provider; }; + event.getBlock = function () { + return contract.provider.getBlock(receipt.blockHash); + }; + event.getTransaction = function () { + return contract.provider.getTransaction(receipt.transactionHash); + }; + event.getTransactionReceipt = function () { + return Promise.resolve(receipt); + }; + return event; + }); + return receipt; + }); + }; +} +function buildCall(contract, fragment, collapseSimple) { + var signerOrProvider = (contract.signer || contract.provider); + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var blockTag, overrides, tx, result, value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + blockTag = undefined; + if (!(args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object")) return [3 /*break*/, 3]; + overrides = (0, properties_1.shallowCopy)(args.pop()); + if (!(overrides.blockTag != null)) return [3 /*break*/, 2]; + return [4 /*yield*/, overrides.blockTag]; + case 1: + blockTag = _a.sent(); + _a.label = 2; + case 2: + delete overrides.blockTag; + args.push(overrides); + _a.label = 3; + case 3: + if (!(contract.deployTransaction != null)) return [3 /*break*/, 5]; + return [4 /*yield*/, contract._deployed(blockTag)]; + case 4: + _a.sent(); + _a.label = 5; + case 5: return [4 /*yield*/, populateTransaction(contract, fragment, args)]; + case 6: + tx = _a.sent(); + return [4 /*yield*/, signerOrProvider.call(tx, blockTag)]; + case 7: + result = _a.sent(); + try { + value = contract.interface.decodeFunctionResult(fragment, result); + if (collapseSimple && fragment.outputs.length === 1) { + value = value[0]; + } + return [2 /*return*/, value]; + } + catch (error) { + if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) { + error.address = contract.address; + error.args = args; + error.transaction = tx; + } + throw error; + } + return [2 /*return*/]; + } + }); + }); + }; +} +function buildSend(contract, fragment) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var txRequest, tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!contract.signer) { + logger.throwError("sending a transaction requires a signer", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "sendTransaction" + }); + } + if (!(contract.deployTransaction != null)) return [3 /*break*/, 2]; + return [4 /*yield*/, contract._deployed()]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [4 /*yield*/, populateTransaction(contract, fragment, args)]; + case 3: + txRequest = _a.sent(); + return [4 /*yield*/, contract.signer.sendTransaction(txRequest)]; + case 4: + tx = _a.sent(); + // Tweak the tx.wait so the receipt has extra properties + addContractWait(contract, tx); + return [2 /*return*/, tx]; + } + }); + }); + }; +} +function buildDefault(contract, fragment, collapseSimple) { + if (fragment.constant) { + return buildCall(contract, fragment, collapseSimple); + } + return buildSend(contract, fragment); +} +function getEventTag(filter) { + if (filter.address && (filter.topics == null || filter.topics.length === 0)) { + return "*"; + } + return (filter.address || "*") + "@" + (filter.topics ? filter.topics.map(function (topic) { + if (Array.isArray(topic)) { + return topic.join("|"); + } + return topic; + }).join(":") : ""); +} +var RunningEvent = /** @class */ (function () { + function RunningEvent(tag, filter) { + (0, properties_1.defineReadOnly)(this, "tag", tag); + (0, properties_1.defineReadOnly)(this, "filter", filter); + this._listeners = []; + } + RunningEvent.prototype.addListener = function (listener, once) { + this._listeners.push({ listener: listener, once: once }); + }; + RunningEvent.prototype.removeListener = function (listener) { + var done = false; + this._listeners = this._listeners.filter(function (item) { + if (done || item.listener !== listener) { + return true; + } + done = true; + return false; + }); + }; + RunningEvent.prototype.removeAllListeners = function () { + this._listeners = []; + }; + RunningEvent.prototype.listeners = function () { + return this._listeners.map(function (i) { return i.listener; }); + }; + RunningEvent.prototype.listenerCount = function () { + return this._listeners.length; + }; + RunningEvent.prototype.run = function (args) { + var _this = this; + var listenerCount = this.listenerCount(); + this._listeners = this._listeners.filter(function (item) { + var argsCopy = args.slice(); + // Call the callback in the next event loop + setTimeout(function () { + item.listener.apply(_this, argsCopy); + }, 0); + // Reschedule it if it not "once" + return !(item.once); + }); + return listenerCount; + }; + RunningEvent.prototype.prepareEvent = function (event) { + }; + // Returns the array that will be applied to an emit + RunningEvent.prototype.getEmit = function (event) { + return [event]; + }; + return RunningEvent; +}()); +var ErrorRunningEvent = /** @class */ (function (_super) { + __extends(ErrorRunningEvent, _super); + function ErrorRunningEvent() { + return _super.call(this, "error", null) || this; + } + return ErrorRunningEvent; +}(RunningEvent)); +// @TODO Fragment should inherit Wildcard? and just override getEmit? +// or have a common abstract super class, with enough constructor +// options to configure both. +// A Fragment Event will populate all the properties that Wildcard +// will, and additionally dereference the arguments when emitting +var FragmentRunningEvent = /** @class */ (function (_super) { + __extends(FragmentRunningEvent, _super); + function FragmentRunningEvent(address, contractInterface, fragment, topics) { + var _this = this; + var filter = { + address: address + }; + var topic = contractInterface.getEventTopic(fragment); + if (topics) { + if (topic !== topics[0]) { + logger.throwArgumentError("topic mismatch", "topics", topics); + } + filter.topics = topics.slice(); + } + else { + filter.topics = [topic]; + } + _this = _super.call(this, getEventTag(filter), filter) || this; + (0, properties_1.defineReadOnly)(_this, "address", address); + (0, properties_1.defineReadOnly)(_this, "interface", contractInterface); + (0, properties_1.defineReadOnly)(_this, "fragment", fragment); + return _this; + } + FragmentRunningEvent.prototype.prepareEvent = function (event) { + var _this = this; + _super.prototype.prepareEvent.call(this, event); + event.event = this.fragment.name; + event.eventSignature = this.fragment.format(); + event.decode = function (data, topics) { + return _this.interface.decodeEventLog(_this.fragment, data, topics); + }; + try { + event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics); + } + catch (error) { + event.args = null; + event.decodeError = error; + } + }; + FragmentRunningEvent.prototype.getEmit = function (event) { + var errors = (0, abi_1.checkResultErrors)(event.args); + if (errors.length) { + throw errors[0].error; + } + var args = (event.args || []).slice(); + args.push(event); + return args; + }; + return FragmentRunningEvent; +}(RunningEvent)); +// A Wildcard Event will attempt to populate: +// - event The name of the event name +// - eventSignature The full signature of the event +// - decode A function to decode data and topics +// - args The decoded data and topics +var WildcardRunningEvent = /** @class */ (function (_super) { + __extends(WildcardRunningEvent, _super); + function WildcardRunningEvent(address, contractInterface) { + var _this = _super.call(this, "*", { address: address }) || this; + (0, properties_1.defineReadOnly)(_this, "address", address); + (0, properties_1.defineReadOnly)(_this, "interface", contractInterface); + return _this; + } + WildcardRunningEvent.prototype.prepareEvent = function (event) { + var _this = this; + _super.prototype.prepareEvent.call(this, event); + try { + var parsed_1 = this.interface.parseLog(event); + event.event = parsed_1.name; + event.eventSignature = parsed_1.signature; + event.decode = function (data, topics) { + return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics); + }; + event.args = parsed_1.args; + } + catch (error) { + // No matching event + } + }; + return WildcardRunningEvent; +}(RunningEvent)); +var BaseContract = /** @class */ (function () { + function BaseContract(addressOrName, contractInterface, signerOrProvider) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Contract); + // @TODO: Maybe still check the addressOrName looks like a valid address or name? + //address = getAddress(address); + (0, properties_1.defineReadOnly)(this, "interface", (0, properties_1.getStatic)(_newTarget, "getInterface")(contractInterface)); + if (signerOrProvider == null) { + (0, properties_1.defineReadOnly)(this, "provider", null); + (0, properties_1.defineReadOnly)(this, "signer", null); + } + else if (abstract_signer_1.Signer.isSigner(signerOrProvider)) { + (0, properties_1.defineReadOnly)(this, "provider", signerOrProvider.provider || null); + (0, properties_1.defineReadOnly)(this, "signer", signerOrProvider); + } + else if (abstract_provider_1.Provider.isProvider(signerOrProvider)) { + (0, properties_1.defineReadOnly)(this, "provider", signerOrProvider); + (0, properties_1.defineReadOnly)(this, "signer", null); + } + else { + logger.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); + } + (0, properties_1.defineReadOnly)(this, "callStatic", {}); + (0, properties_1.defineReadOnly)(this, "estimateGas", {}); + (0, properties_1.defineReadOnly)(this, "functions", {}); + (0, properties_1.defineReadOnly)(this, "populateTransaction", {}); + (0, properties_1.defineReadOnly)(this, "filters", {}); + { + var uniqueFilters_1 = {}; + Object.keys(this.interface.events).forEach(function (eventSignature) { + var event = _this.interface.events[eventSignature]; + (0, properties_1.defineReadOnly)(_this.filters, eventSignature, function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return { + address: _this.address, + topics: _this.interface.encodeFilterTopics(event, args) + }; + }); + if (!uniqueFilters_1[event.name]) { + uniqueFilters_1[event.name] = []; + } + uniqueFilters_1[event.name].push(eventSignature); + }); + Object.keys(uniqueFilters_1).forEach(function (name) { + var filters = uniqueFilters_1[name]; + if (filters.length === 1) { + (0, properties_1.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]); + } + else { + logger.warn("Duplicate definition of " + name + " (" + filters.join(", ") + ")"); + } + }); + } + (0, properties_1.defineReadOnly)(this, "_runningEvents", {}); + (0, properties_1.defineReadOnly)(this, "_wrappedEmits", {}); + if (addressOrName == null) { + logger.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); + } + (0, properties_1.defineReadOnly)(this, "address", addressOrName); + if (this.provider) { + (0, properties_1.defineReadOnly)(this, "resolvedAddress", resolveName(this.provider, addressOrName)); + } + else { + try { + (0, properties_1.defineReadOnly)(this, "resolvedAddress", Promise.resolve((0, address_1.getAddress)(addressOrName))); + } + catch (error) { + // Without a provider, we cannot use ENS names + logger.throwError("provider is required to use ENS name as contract address", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Contract" + }); + } + } + var uniqueNames = {}; + var uniqueSignatures = {}; + Object.keys(this.interface.functions).forEach(function (signature) { + var fragment = _this.interface.functions[signature]; + // Check that the signature is unique; if not the ABI generation has + // not been cleaned or may be incorrectly generated + if (uniqueSignatures[signature]) { + logger.warn("Duplicate ABI entry for " + JSON.stringify(signature)); + return; + } + uniqueSignatures[signature] = true; + // Track unique names; we only expose bare named functions if they + // are ambiguous + { + var name_1 = fragment.name; + if (!uniqueNames["%" + name_1]) { + uniqueNames["%" + name_1] = []; + } + uniqueNames["%" + name_1].push(signature); + } + if (_this[signature] == null) { + (0, properties_1.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true)); + } + // We do not collapse simple calls on this bucket, which allows + // frameworks to safely use this without introspection as well as + // allows decoding error recovery. + if (_this.functions[signature] == null) { + (0, properties_1.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false)); + } + if (_this.callStatic[signature] == null) { + (0, properties_1.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true)); + } + if (_this.populateTransaction[signature] == null) { + (0, properties_1.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment)); + } + if (_this.estimateGas[signature] == null) { + (0, properties_1.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment)); + } + }); + Object.keys(uniqueNames).forEach(function (name) { + // Ambiguous names to not get attached as bare names + var signatures = uniqueNames[name]; + if (signatures.length > 1) { + return; + } + // Strip off the leading "%" used for prototype protection + name = name.substring(1); + var signature = signatures[0]; + // If overwriting a member property that is null, swallow the error + try { + if (_this[name] == null) { + (0, properties_1.defineReadOnly)(_this, name, _this[signature]); + } + } + catch (e) { } + if (_this.functions[name] == null) { + (0, properties_1.defineReadOnly)(_this.functions, name, _this.functions[signature]); + } + if (_this.callStatic[name] == null) { + (0, properties_1.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]); + } + if (_this.populateTransaction[name] == null) { + (0, properties_1.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]); + } + if (_this.estimateGas[name] == null) { + (0, properties_1.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]); + } + }); + } + BaseContract.getContractAddress = function (transaction) { + return (0, address_1.getContractAddress)(transaction); + }; + BaseContract.getInterface = function (contractInterface) { + if (abi_1.Interface.isInterface(contractInterface)) { + return contractInterface; + } + return new abi_1.Interface(contractInterface); + }; + // @TODO: Allow timeout? + BaseContract.prototype.deployed = function () { + return this._deployed(); + }; + BaseContract.prototype._deployed = function (blockTag) { + var _this = this; + if (!this._deployedPromise) { + // If we were just deployed, we know the transaction we should occur in + if (this.deployTransaction) { + this._deployedPromise = this.deployTransaction.wait().then(function () { + return _this; + }); + } + else { + // @TODO: Once we allow a timeout to be passed in, we will wait + // up to that many blocks for getCode + // Otherwise, poll for our code to be deployed + this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function (code) { + if (code === "0x") { + logger.throwError("contract not deployed", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + contractAddress: _this.address, + operation: "getDeployed" + }); + } + return _this; + }); + } + } + return this._deployedPromise; + }; + // @TODO: + // estimateFallback(overrides?: TransactionRequest): Promise + // @TODO: + // estimateDeploy(bytecode: string, ...args): Promise + BaseContract.prototype.fallback = function (overrides) { + var _this = this; + if (!this.signer) { + logger.throwError("sending a transactions require a signer", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }); + } + var tx = (0, properties_1.shallowCopy)(overrides || {}); + ["from", "to"].forEach(function (key) { + if (tx[key] == null) { + return; + } + logger.throwError("cannot override " + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + tx.to = this.resolvedAddress; + return this.deployed().then(function () { + return _this.signer.sendTransaction(tx); + }); + }; + // Reconnect to a different signer or provider + BaseContract.prototype.connect = function (signerOrProvider) { + if (typeof (signerOrProvider) === "string") { + signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider); + } + var contract = new (this.constructor)(this.address, this.interface, signerOrProvider); + if (this.deployTransaction) { + (0, properties_1.defineReadOnly)(contract, "deployTransaction", this.deployTransaction); + } + return contract; + }; + // Re-attach to a different on-chain instance of this contract + BaseContract.prototype.attach = function (addressOrName) { + return new (this.constructor)(addressOrName, this.interface, this.signer || this.provider); + }; + BaseContract.isIndexed = function (value) { + return abi_1.Indexed.isIndexed(value); + }; + BaseContract.prototype._normalizeRunningEvent = function (runningEvent) { + // Already have an instance of this event running; we can re-use it + if (this._runningEvents[runningEvent.tag]) { + return this._runningEvents[runningEvent.tag]; + } + return runningEvent; + }; + BaseContract.prototype._getRunningEvent = function (eventName) { + if (typeof (eventName) === "string") { + // Listen for "error" events (if your contract has an error event, include + // the full signature to bypass this special event keyword) + if (eventName === "error") { + return this._normalizeRunningEvent(new ErrorRunningEvent()); + } + // Listen for any event that is registered + if (eventName === "event") { + return this._normalizeRunningEvent(new RunningEvent("event", null)); + } + // Listen for any event + if (eventName === "*") { + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + // Get the event Fragment (throws if ambiguous/unknown event) + var fragment = this.interface.getEvent(eventName); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment)); + } + // We have topics to filter by... + if (eventName.topics && eventName.topics.length > 0) { + // Is it a known topichash? (throws if no matching topichash) + try { + var topic = eventName.topics[0]; + if (typeof (topic) !== "string") { + throw new Error("invalid topic"); // @TODO: May happen for anonymous events + } + var fragment = this.interface.getEvent(topic); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics)); + } + catch (error) { } + // Filter by the unknown topichash + var filter = { + address: this.address, + topics: eventName.topics + }; + return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter)); + } + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + }; + BaseContract.prototype._checkRunningEvents = function (runningEvent) { + if (runningEvent.listenerCount() === 0) { + delete this._runningEvents[runningEvent.tag]; + // If we have a poller for this, remove it + var emit = this._wrappedEmits[runningEvent.tag]; + if (emit && runningEvent.filter) { + this.provider.off(runningEvent.filter, emit); + delete this._wrappedEmits[runningEvent.tag]; + } + } + }; + // Subclasses can override this to gracefully recover + // from parse errors if they wish + BaseContract.prototype._wrapEvent = function (runningEvent, log, listener) { + var _this = this; + var event = (0, properties_1.deepCopy)(log); + event.removeListener = function () { + if (!listener) { + return; + } + runningEvent.removeListener(listener); + _this._checkRunningEvents(runningEvent); + }; + event.getBlock = function () { return _this.provider.getBlock(log.blockHash); }; + event.getTransaction = function () { return _this.provider.getTransaction(log.transactionHash); }; + event.getTransactionReceipt = function () { return _this.provider.getTransactionReceipt(log.transactionHash); }; + // This may throw if the topics and data mismatch the signature + runningEvent.prepareEvent(event); + return event; + }; + BaseContract.prototype._addEventListener = function (runningEvent, listener, once) { + var _this = this; + if (!this.provider) { + logger.throwError("events require a provider or a signer with a provider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }); + } + runningEvent.addListener(listener, once); + // Track this running event and its listeners (may already be there; but no hard in updating) + this._runningEvents[runningEvent.tag] = runningEvent; + // If we are not polling the provider, start polling + if (!this._wrappedEmits[runningEvent.tag]) { + var wrappedEmit = function (log) { + var event = _this._wrapEvent(runningEvent, log, listener); + // Try to emit the result for the parameterized event... + if (event.decodeError == null) { + try { + var args = runningEvent.getEmit(event); + _this.emit.apply(_this, __spreadArray([runningEvent.filter], args, false)); + } + catch (error) { + event.decodeError = error.error; + } + } + // Always emit "event" for fragment-base events + if (runningEvent.filter != null) { + _this.emit("event", event); + } + // Emit "error" if there was an error + if (event.decodeError != null) { + _this.emit("error", event.decodeError, event); + } + }; + this._wrappedEmits[runningEvent.tag] = wrappedEmit; + // Special events, like "error" do not have a filter + if (runningEvent.filter != null) { + this.provider.on(runningEvent.filter, wrappedEmit); + } + } + }; + BaseContract.prototype.queryFilter = function (event, fromBlockOrBlockhash, toBlock) { + var _this = this; + var runningEvent = this._getRunningEvent(event); + var filter = (0, properties_1.shallowCopy)(runningEvent.filter); + if (typeof (fromBlockOrBlockhash) === "string" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) { + if (toBlock != null) { + logger.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); + } + filter.blockHash = fromBlockOrBlockhash; + } + else { + filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0); + filter.toBlock = ((toBlock != null) ? toBlock : "latest"); + } + return this.provider.getLogs(filter).then(function (logs) { + return logs.map(function (log) { return _this._wrapEvent(runningEvent, log, null); }); + }); + }; + BaseContract.prototype.on = function (event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, false); + return this; + }; + BaseContract.prototype.once = function (event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, true); + return this; + }; + BaseContract.prototype.emit = function (eventName) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + if (!this.provider) { + return false; + } + var runningEvent = this._getRunningEvent(eventName); + var result = (runningEvent.run(args) > 0); + // May have drained all the "once" events; check for living events + this._checkRunningEvents(runningEvent); + return result; + }; + BaseContract.prototype.listenerCount = function (eventName) { + var _this = this; + if (!this.provider) { + return 0; + } + if (eventName == null) { + return Object.keys(this._runningEvents).reduce(function (accum, key) { + return accum + _this._runningEvents[key].listenerCount(); + }, 0); + } + return this._getRunningEvent(eventName).listenerCount(); + }; + BaseContract.prototype.listeners = function (eventName) { + if (!this.provider) { + return []; + } + if (eventName == null) { + var result_1 = []; + for (var tag in this._runningEvents) { + this._runningEvents[tag].listeners().forEach(function (listener) { + result_1.push(listener); + }); + } + return result_1; + } + return this._getRunningEvent(eventName).listeners(); + }; + BaseContract.prototype.removeAllListeners = function (eventName) { + if (!this.provider) { + return this; + } + if (eventName == null) { + for (var tag in this._runningEvents) { + var runningEvent_1 = this._runningEvents[tag]; + runningEvent_1.removeAllListeners(); + this._checkRunningEvents(runningEvent_1); + } + return this; + } + // Delete any listeners + var runningEvent = this._getRunningEvent(eventName); + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + return this; + }; + BaseContract.prototype.off = function (eventName, listener) { + if (!this.provider) { + return this; + } + var runningEvent = this._getRunningEvent(eventName); + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + return this; + }; + BaseContract.prototype.removeListener = function (eventName, listener) { + return this.off(eventName, listener); + }; + return BaseContract; +}()); +exports.BaseContract = BaseContract; +var Contract = /** @class */ (function (_super) { + __extends(Contract, _super); + function Contract() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Contract; +}(BaseContract)); +exports.Contract = Contract; +var ContractFactory = /** @class */ (function () { + function ContractFactory(contractInterface, bytecode, signer) { + var _newTarget = this.constructor; + var bytecodeHex = null; + if (typeof (bytecode) === "string") { + bytecodeHex = bytecode; + } + else if ((0, bytes_1.isBytes)(bytecode)) { + bytecodeHex = (0, bytes_1.hexlify)(bytecode); + } + else if (bytecode && typeof (bytecode.object) === "string") { + // Allow the bytecode object from the Solidity compiler + bytecodeHex = bytecode.object; + } + else { + // Crash in the next verification step + bytecodeHex = "!"; + } + // Make sure it is 0x prefixed + if (bytecodeHex.substring(0, 2) !== "0x") { + bytecodeHex = "0x" + bytecodeHex; + } + // Make sure the final result is valid bytecode + if (!(0, bytes_1.isHexString)(bytecodeHex) || (bytecodeHex.length % 2)) { + logger.throwArgumentError("invalid bytecode", "bytecode", bytecode); + } + // If we have a signer, make sure it is valid + if (signer && !abstract_signer_1.Signer.isSigner(signer)) { + logger.throwArgumentError("invalid signer", "signer", signer); + } + (0, properties_1.defineReadOnly)(this, "bytecode", bytecodeHex); + (0, properties_1.defineReadOnly)(this, "interface", (0, properties_1.getStatic)(_newTarget, "getInterface")(contractInterface)); + (0, properties_1.defineReadOnly)(this, "signer", signer || null); + } + // @TODO: Future; rename to populateTransaction? + ContractFactory.prototype.getDeployTransaction = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var tx = {}; + // If we have 1 additional argument, we allow transaction overrides + if (args.length === this.interface.deploy.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + tx = (0, properties_1.shallowCopy)(args.pop()); + for (var key in tx) { + if (!allowedTransactionKeys[key]) { + throw new Error("unknown transaction override " + key); + } + } + } + // Do not allow these to be overridden in a deployment transaction + ["data", "from", "to"].forEach(function (key) { + if (tx[key] == null) { + return; + } + logger.throwError("cannot override " + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + if (tx.value) { + var value = bignumber_1.BigNumber.from(tx.value); + if (!value.isZero() && !this.interface.deploy.payable) { + logger.throwError("non-payable constructor cannot override value", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: tx.value + }); + } + } + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + // Set the data to the bytecode + the encoded constructor arguments + tx.data = (0, bytes_1.hexlify)((0, bytes_1.concat)([ + this.bytecode, + this.interface.encodeDeploy(args) + ])); + return tx; + }; + ContractFactory.prototype.deploy = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var overrides, params, unsignedTx, tx, address, contract; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + overrides = {}; + // If 1 extra parameter was passed in, it contains overrides + if (args.length === this.interface.deploy.inputs.length + 1) { + overrides = args.pop(); + } + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + return [4 /*yield*/, resolveAddresses(this.signer, args, this.interface.deploy.inputs)]; + case 1: + params = _a.sent(); + params.push(overrides); + unsignedTx = this.getDeployTransaction.apply(this, params); + return [4 /*yield*/, this.signer.sendTransaction(unsignedTx)]; + case 2: + tx = _a.sent(); + address = (0, properties_1.getStatic)(this.constructor, "getContractAddress")(tx); + contract = (0, properties_1.getStatic)(this.constructor, "getContract")(address, this.interface, this.signer); + // Add the modified wait that wraps events + addContractWait(contract, tx); + (0, properties_1.defineReadOnly)(contract, "deployTransaction", tx); + return [2 /*return*/, contract]; + } + }); + }); + }; + ContractFactory.prototype.attach = function (address) { + return (this.constructor).getContract(address, this.interface, this.signer); + }; + ContractFactory.prototype.connect = function (signer) { + return new (this.constructor)(this.interface, this.bytecode, signer); + }; + ContractFactory.fromSolidity = function (compilerOutput, signer) { + if (compilerOutput == null) { + logger.throwError("missing compiler output", logger_1.Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); + } + if (typeof (compilerOutput) === "string") { + compilerOutput = JSON.parse(compilerOutput); + } + var abi = compilerOutput.abi; + var bytecode = null; + if (compilerOutput.bytecode) { + bytecode = compilerOutput.bytecode; + } + else if (compilerOutput.evm && compilerOutput.evm.bytecode) { + bytecode = compilerOutput.evm.bytecode; + } + return new this(abi, bytecode, signer); + }; + ContractFactory.getInterface = function (contractInterface) { + return Contract.getInterface(contractInterface); + }; + ContractFactory.getContractAddress = function (tx) { + return (0, address_1.getContractAddress)(tx); + }; + ContractFactory.getContract = function (address, contractInterface, signer) { + return new Contract(address, contractInterface, signer); + }; + return ContractFactory; +}()); +exports.ContractFactory = ContractFactory; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/lib/index.js.map b/node_modules/@ethersproject/contracts/lib/index.js.map new file mode 100644 index 0000000..9f3c07c --- /dev/null +++ b/node_modules/@ethersproject/contracts/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,0CAAuK;AACvK,sEAAoL;AACpL,kEAAoE;AACpE,kDAAwE;AACxE,sDAAmE;AACnE,8CAAkG;AAClG,wDAA4H;AAC5H,4DAAuF;AAEvF,gDAA+C;AAC/C,uCAAqC;AAErC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAWlC,CAAC;AAmCD,CAAC;AA8CF,+BAA+B;AAE/B,IAAM,sBAAsB,GAAiC;IACzD,OAAO,EA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IACpD,CAAC;IAEM,kCAAkB,GAAzB,UAA0B,EAA2D;QACjF,OAAO,IAAA,4BAAkB,EAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAEM,2BAAW,GAAlB,UAAmB,OAAe,EAAE,iBAAoC,EAAE,MAAe;QACrF,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACL,sBAAC;AAAD,CAAC,AA1JD,IA0JC;AA1JY,0CAAe"} \ No newline at end of file diff --git a/node_modules/@ethersproject/contracts/package.json b/node_modules/@ethersproject/contracts/package.json new file mode 100644 index 0000000..67aa5c0 --- /dev/null +++ b/node_modules/@ethersproject/contracts/package.json @@ -0,0 +1,51 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abi": "^5.5.0", + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/transactions": "^5.5.0" + }, + "description": "Contract abstraction meta-class for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "5899c8aec0600dca42d7e24fc215037aa48917f2", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/contracts", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/contracts", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x58131be143d730526df6eb67c8dca188c60f214a2466fc6a2986d688558cd121", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/contracts/src.ts/_version.ts b/node_modules/@ethersproject/contracts/src.ts/_version.ts new file mode 100644 index 0000000..4334dc2 --- /dev/null +++ b/node_modules/@ethersproject/contracts/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "contracts/5.5.0"; diff --git a/node_modules/@ethersproject/contracts/src.ts/index.ts b/node_modules/@ethersproject/contracts/src.ts/index.ts new file mode 100644 index 0000000..a3cb9a9 --- /dev/null +++ b/node_modules/@ethersproject/contracts/src.ts/index.ts @@ -0,0 +1,1289 @@ +"use strict"; + +import { checkResultErrors, EventFragment, Fragment, FunctionFragment, Indexed, Interface, JsonFragment, LogDescription, ParamType, Result } from "@ethersproject/abi"; +import { Block, BlockTag, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Signer, VoidSigner } from "@ethersproject/abstract-signer"; +import { getAddress, getContractAddress } from "@ethersproject/address"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { arrayify, BytesLike, concat, hexlify, isBytes, isHexString } from "@ethersproject/bytes"; +import { Deferrable, defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import { AccessList, accessListify, AccessListish } from "@ethersproject/transactions"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; + +const logger = new Logger(version); + +export interface Overrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + maxFeePerGas?: BigNumberish | Promise; + maxPriorityFeePerGas?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + type?: number; + accessList?: AccessListish; + customData?: Record; +}; + +export interface PayableOverrides extends Overrides { + value?: BigNumberish | Promise; +} + +export interface CallOverrides extends PayableOverrides { + blockTag?: BlockTag | Promise; + from?: string | Promise; +} + +// @TODO: Better hierarchy with: (in v6) +// - abstract-provider:TransactionRequest +// - transactions:Transaction +// - transaction:UnsignedTransaction + +export interface PopulatedTransaction { + to?: string; + from?: string; + nonce?: number; + + gasLimit?: BigNumber; + gasPrice?: BigNumber; + + data?: string; + value?: BigNumber; + chainId?: number; + + type?: number; + accessList?: AccessList; + + maxFeePerGas?: BigNumber; + maxPriorityFeePerGas?: BigNumber; + + customData?: Record; +}; + +export type EventFilter = { + address?: string; + topics?: Array>; +}; + + +export type ContractFunction = (...args: Array) => Promise; + + +// The (n + 1)th parameter passed to contract event callbacks +export interface Event extends Log { + + // The event name + event?: string; + + // The event signature + eventSignature?: string; + + // The parsed arguments to the event + args?: Result; + + // If parsing the arguments failed, this is the error + decodeError?: Error; + + // A function that can be used to decode event data and topics + decode?: (data: string, topics?: Array) => any; + + // A function that will remove the listener responsible for this event (if any) + removeListener: () => void; + + // Get blockchain details about this event's block and transaction + getBlock: () => Promise; + getTransaction: () => Promise; + getTransactionReceipt: () => Promise; +} + +export interface ContractReceipt extends TransactionReceipt { + events?: Array; +} + +export interface ContractTransaction extends TransactionResponse { + wait(confirmations?: number): Promise; +} + +/////////////////////////////// + +const allowedTransactionKeys: { [ key: string ]: boolean } = { + chainId: true, data: true, from: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true, + customData: true +} + +async function resolveName(resolver: Signer | Provider, nameOrPromise: string | Promise): Promise { + const name = await nameOrPromise; + + if (typeof(name) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", name); + } + + // If it is already an address, just use it (after adding checksum) + try { + return getAddress(name); + } catch (error) { } + + if (!resolver) { + logger.throwError("a provider or signer is needed to resolve ENS names", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName" + }); + } + + const address = await resolver.resolveName(name); + + if (address == null) { + logger.throwArgumentError("resolver or addr is not configured for ENS name", "name", name); + } + + return address; +} + +// Recursively replaces ENS names with promises to resolve the name and resolves all properties +async function resolveAddresses(resolver: Signer | Provider, value: any, paramType: ParamType | Array): Promise { + if (Array.isArray(paramType)) { + return await Promise.all(paramType.map((paramType, index) => { + return resolveAddresses( + resolver, + ((Array.isArray(value)) ? value[index]: value[paramType.name]), + paramType + ); + })); + } + + if (paramType.type === "address") { + return await resolveName(resolver, value); + } + + if (paramType.type === "tuple") { + return await resolveAddresses(resolver, value, paramType.components); + } + + if (paramType.baseType === "array") { + if (!Array.isArray(value)) { + return Promise.reject(logger.makeError("invalid value for array", Logger.errors.INVALID_ARGUMENT, { + argument: "value", + value + })); + } + return await Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren))); + } + + return value; +} + +async function populateTransaction(contract: Contract, fragment: FunctionFragment, args: Array): Promise { + // If an extra argument is given, it is overrides + let overrides: CallOverrides = { }; + if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === "object") { + overrides = shallowCopy(args.pop()); + } + + // Make sure the parameter count matches + logger.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); + + // Populate "from" override (allow promises) + if (contract.signer) { + if (overrides.from) { + // Contracts with a Signer are from the Signer's frame-of-reference; + // but we allow overriding "from" if it matches the signer + overrides.from = resolveProperties({ + override: resolveName(contract.signer, overrides.from), + signer: contract.signer.getAddress() + }).then(async (check) => { + if (getAddress(check.signer) !== check.override) { + logger.throwError("Contract with a Signer cannot override from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.from" + }); + } + + return check.override; + }); + + } else { + overrides.from = contract.signer.getAddress(); + } + + } else if (overrides.from) { + overrides.from = resolveName(contract.provider, overrides.from); + + //} else { + // Contracts without a signer can override "from", and if + // unspecified the zero address is used + //overrides.from = AddressZero; + } + + // Wait for all dependencies to be resolved (prefer the signer over the provider) + const resolved = await resolveProperties({ + args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs), + address: contract.resolvedAddress, + overrides: (resolveProperties(overrides) || { }) + }); + + // The ABI coded transaction + const data = contract.interface.encodeFunctionData(fragment, resolved.args); + const tx: PopulatedTransaction = { + data: data, + to: resolved.address + }; + + // Resolved Overrides + const ro = resolved.overrides; + + // Populate simple overrides + if (ro.nonce != null) { tx.nonce = BigNumber.from(ro.nonce).toNumber(); } + if (ro.gasLimit != null) { tx.gasLimit = BigNumber.from(ro.gasLimit); } + if (ro.gasPrice != null) { tx.gasPrice = BigNumber.from(ro.gasPrice); } + if (ro.maxFeePerGas != null) { tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); } + if (ro.maxPriorityFeePerGas != null) { tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); } + if (ro.from != null) { tx.from = ro.from; } + + if (ro.type != null) { tx.type = ro.type; } + if (ro.accessList != null) { tx.accessList = accessListify(ro.accessList); } + + // If there was no "gasLimit" override, but the ABI specifies a default, use it + if (tx.gasLimit == null && fragment.gas != null) { + // Compute the intrinsic gas cost for this transaction + // @TODO: This is based on the yellow paper as of Petersburg; this is something + // we may wish to parameterize in v6 as part of the Network object. Since this + // is always a non-nil to address, we can ignore G_create, but may wish to add + // similar logic to the ContractFactory. + let intrinsic = 21000; + const bytes = arrayify(data); + for (let i = 0; i < bytes.length; i++) { + intrinsic += 4; + if (bytes[i]) { intrinsic += 64; } + } + tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic); + } + + // Populate "value" override + if (ro.value) { + const roValue = BigNumber.from(ro.value); + if (!roValue.isZero() && !fragment.payable) { + logger.throwError("non-payable method cannot override value", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: overrides.value + }); + } + tx.value = roValue; + } + + if (ro.customData) { + tx.customData = shallowCopy(ro.customData); + } + + // Remove the overrides + delete overrides.nonce; + delete overrides.gasLimit; + delete overrides.gasPrice; + delete overrides.from; + delete overrides.value; + + delete overrides.type; + delete overrides.accessList; + + delete overrides.maxFeePerGas; + delete overrides.maxPriorityFeePerGas; + + delete overrides.customData; + + // Make sure there are no stray overrides, which may indicate a + // typo or using an unsupported key. + const leftovers = Object.keys(overrides).filter((key) => ((overrides)[key] != null)); + if (leftovers.length) { + logger.throwError(`cannot override ${ leftovers.map((l) => JSON.stringify(l)).join(",") }`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides", + overrides: leftovers + }); + } + + return tx; +} + + +function buildPopulate(contract: Contract, fragment: FunctionFragment): ContractFunction { + return function(...args: Array): Promise { + return populateTransaction(contract, fragment, args); + }; +} + +function buildEstimate(contract: Contract, fragment: FunctionFragment): ContractFunction { + const signerOrProvider = (contract.signer || contract.provider); + return async function(...args: Array): Promise { + if (!signerOrProvider) { + logger.throwError("estimate require a provider or signer", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "estimateGas" + }) + } + + const tx = await populateTransaction(contract, fragment, args); + return await signerOrProvider.estimateGas(tx); + }; +} + +function addContractWait(contract: Contract, tx: TransactionResponse) { + const wait = tx.wait.bind(tx); + tx.wait = (confirmations?: number) => { + return wait(confirmations).then((receipt: ContractReceipt) => { + receipt.events = receipt.logs.map((log) => { + let event: Event = (deepCopy(log)); + let parsed: LogDescription = null; + try { + parsed = contract.interface.parseLog(log); + } catch (e){ } + + // Successfully parsed the event log; include it + if (parsed) { + event.args = parsed.args; + event.decode = (data: BytesLike, topics?: Array) => { + return contract.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.event = parsed.name; + event.eventSignature = parsed.signature; + } + + // Useful operations + event.removeListener = () => { return contract.provider; } + event.getBlock = () => { + return contract.provider.getBlock(receipt.blockHash); + } + event.getTransaction = () => { + return contract.provider.getTransaction(receipt.transactionHash); + } + event.getTransactionReceipt = () => { + return Promise.resolve(receipt); + } + + return event; + }); + + return receipt; + }); + }; +} + +function buildCall(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction { + const signerOrProvider = (contract.signer || contract.provider); + + return async function(...args: Array): Promise { + // Extract the "blockTag" override if present + let blockTag = undefined; + if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === "object") { + const overrides = shallowCopy(args.pop()); + if (overrides.blockTag != null) { + blockTag = await overrides.blockTag; + } + delete overrides.blockTag; + args.push(overrides); + } + + // If the contract was just deployed, wait until it is mined + if (contract.deployTransaction != null) { + await contract._deployed(blockTag); + } + + // Call a node and get the result + const tx = await populateTransaction(contract, fragment, args); + const result = await signerOrProvider.call(tx, blockTag); + + try { + let value = contract.interface.decodeFunctionResult(fragment, result); + if (collapseSimple && fragment.outputs.length === 1) { + value = value[0]; + } + return value; + + } catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + error.address = contract.address; + error.args = args; + error.transaction = tx; + } + throw error; + } + }; +} + +function buildSend(contract: Contract, fragment: FunctionFragment): ContractFunction { + return async function(...args: Array): Promise { + if (!contract.signer) { + logger.throwError("sending a transaction requires a signer", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "sendTransaction" + }) + } + + // If the contract was just deployed, wait until it is mined + if (contract.deployTransaction != null) { + await contract._deployed(); + } + + const txRequest = await populateTransaction(contract, fragment, args); + + const tx = await contract.signer.sendTransaction(txRequest); + + // Tweak the tx.wait so the receipt has extra properties + addContractWait(contract, tx); + + return tx; + }; +} + +function buildDefault(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction { + if (fragment.constant) { + return buildCall(contract, fragment, collapseSimple); + } + return buildSend(contract, fragment); +} + +function getEventTag(filter: EventFilter): string { + if (filter.address && (filter.topics == null || filter.topics.length === 0)) { + return "*"; + } + + return (filter.address || "*") + "@" + (filter.topics ? filter.topics.map((topic) => { + if (Array.isArray(topic)) { + return topic.join("|"); + } + return topic; + }).join(":"): ""); +} + +class RunningEvent { + readonly tag: string; + readonly filter: EventFilter; + private _listeners: Array<{ listener: Listener, once: boolean }>; + + constructor(tag: string, filter: EventFilter) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "filter", filter); + this._listeners = [ ]; + } + + addListener(listener: Listener, once: boolean): void { + this._listeners.push({ listener: listener, once: once }); + } + + removeListener(listener: Listener): void { + let done = false; + this._listeners = this._listeners.filter((item) => { + if (done || item.listener !== listener) { return true; } + done = true; + return false; + }); + } + + removeAllListeners(): void { + this._listeners = []; + } + + listeners(): Array { + return this._listeners.map((i) => i.listener); + } + + listenerCount(): number { + return this._listeners.length; + } + + run(args: Array): number { + const listenerCount = this.listenerCount(); + this._listeners = this._listeners.filter((item) => { + + const argsCopy = args.slice(); + + // Call the callback in the next event loop + setTimeout(() => { + item.listener.apply(this, argsCopy); + }, 0); + + // Reschedule it if it not "once" + return !(item.once); + }); + + return listenerCount; + } + + prepareEvent(event: Event): void { + } + + // Returns the array that will be applied to an emit + getEmit(event: Event): Array { + return [ event ]; + } +} + +class ErrorRunningEvent extends RunningEvent { + constructor() { + super("error", null); + } +} + + +// @TODO Fragment should inherit Wildcard? and just override getEmit? +// or have a common abstract super class, with enough constructor +// options to configure both. + +// A Fragment Event will populate all the properties that Wildcard +// will, and additionally dereference the arguments when emitting +class FragmentRunningEvent extends RunningEvent { + readonly address: string; + readonly interface: Interface; + readonly fragment: EventFragment; + + constructor(address: string, contractInterface: Interface, fragment: EventFragment, topics?: Array>) { + const filter: EventFilter = { + address: address + } + + let topic = contractInterface.getEventTopic(fragment); + if (topics) { + if (topic !== topics[0]) { logger.throwArgumentError("topic mismatch", "topics", topics); } + filter.topics = topics.slice(); + } else { + filter.topics = [ topic ]; + } + + super(getEventTag(filter), filter); + defineReadOnly(this, "address", address); + defineReadOnly(this, "interface", contractInterface); + defineReadOnly(this, "fragment", fragment); + } + + + prepareEvent(event: Event): void { + super.prepareEvent(event); + + event.event = this.fragment.name; + event.eventSignature = this.fragment.format(); + + event.decode = (data: BytesLike, topics?: Array) => { + return this.interface.decodeEventLog(this.fragment, data, topics); + }; + + try { + event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics); + } catch (error) { + event.args = null; + event.decodeError = error; + } + } + + getEmit(event: Event): Array { + const errors = checkResultErrors(event.args); + if (errors.length) { throw errors[0].error; } + + const args = (event.args || []).slice(); + args.push(event); + return args; + } +} + +// A Wildcard Event will attempt to populate: +// - event The name of the event name +// - eventSignature The full signature of the event +// - decode A function to decode data and topics +// - args The decoded data and topics +class WildcardRunningEvent extends RunningEvent { + readonly address: string; + readonly interface: Interface; + + constructor(address: string, contractInterface: Interface) { + super("*", { address: address }); + defineReadOnly(this, "address", address); + defineReadOnly(this, "interface", contractInterface); + } + + prepareEvent(event: Event): void { + super.prepareEvent(event); + + try { + const parsed = this.interface.parseLog(event); + event.event = parsed.name; + event.eventSignature = parsed.signature; + + event.decode = (data: BytesLike, topics?: Array) => { + return this.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + + event.args = parsed.args; + } catch (error) { + // No matching event + } + } +} + +export type ContractInterface = string | ReadonlyArray | Interface; + +type InterfaceFunc = (contractInterface: ContractInterface) => Interface; + + +export class BaseContract { + readonly address: string; + readonly interface: Interface; + + readonly signer: Signer; + readonly provider: Provider; + + readonly functions: { [ name: string ]: ContractFunction }; + + readonly callStatic: { [ name: string ]: ContractFunction }; + readonly estimateGas: { [ name: string ]: ContractFunction }; + readonly populateTransaction: { [ name: string ]: ContractFunction }; + + readonly filters: { [ name: string ]: (...args: Array) => EventFilter }; + + // This will always be an address. This will only differ from + // address if an ENS name was used in the constructor + readonly resolvedAddress: Promise; + + // This is only set if the contract was created with a call to deploy + readonly deployTransaction: TransactionResponse; + + _deployedPromise: Promise; + + // A list of RunningEvents to track listeners for each event tag + _runningEvents: { [ eventTag: string ]: RunningEvent }; + + // Wrapped functions to call emit and allow deregistration from the provider + _wrappedEmits: { [ eventTag: string ]: (...args: Array) => void }; + + constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider) { + logger.checkNew(new.target, Contract); + + // @TODO: Maybe still check the addressOrName looks like a valid address or name? + //address = getAddress(address); + defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + + if (signerOrProvider == null) { + defineReadOnly(this, "provider", null); + defineReadOnly(this, "signer", null); + } else if (Signer.isSigner(signerOrProvider)) { + defineReadOnly(this, "provider", signerOrProvider.provider || null); + defineReadOnly(this, "signer", signerOrProvider); + } else if (Provider.isProvider(signerOrProvider)) { + defineReadOnly(this, "provider", signerOrProvider); + defineReadOnly(this, "signer", null); + } else { + logger.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); + } + + defineReadOnly(this, "callStatic", { }); + defineReadOnly(this, "estimateGas", { }); + defineReadOnly(this, "functions", { }); + defineReadOnly(this, "populateTransaction", { }); + + defineReadOnly(this, "filters", { }); + + { + const uniqueFilters: { [ name: string ]: Array } = { }; + Object.keys(this.interface.events).forEach((eventSignature) => { + const event = this.interface.events[eventSignature]; + defineReadOnly(this.filters, eventSignature, (...args: Array) => { + return { + address: this.address, + topics: this.interface.encodeFilterTopics(event, args) + } + }); + if (!uniqueFilters[event.name]) { uniqueFilters[event.name] = [ ]; } + uniqueFilters[event.name].push(eventSignature); + }); + + Object.keys(uniqueFilters).forEach((name) => { + const filters = uniqueFilters[name]; + if (filters.length === 1) { + defineReadOnly(this.filters, name, this.filters[filters[0]]); + } else { + logger.warn(`Duplicate definition of ${ name } (${ filters.join(", ")})`); + } + }); + } + + defineReadOnly(this, "_runningEvents", { }); + defineReadOnly(this, "_wrappedEmits", { }); + + if (addressOrName == null) { + logger.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); + } + + defineReadOnly(this, "address", addressOrName); + if (this.provider) { + defineReadOnly(this, "resolvedAddress", resolveName(this.provider, addressOrName)); + } else { + try { + defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName))); + } catch (error) { + // Without a provider, we cannot use ENS names + logger.throwError("provider is required to use ENS name as contract address", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Contract" + }); + } + } + + const uniqueNames: { [ name: string ]: Array } = { }; + const uniqueSignatures: { [ signature: string ]: boolean } = { }; + Object.keys(this.interface.functions).forEach((signature) => { + const fragment = this.interface.functions[signature]; + + // Check that the signature is unique; if not the ABI generation has + // not been cleaned or may be incorrectly generated + if (uniqueSignatures[signature]) { + logger.warn(`Duplicate ABI entry for ${ JSON.stringify(signature) }`); + return; + } + uniqueSignatures[signature] = true; + + // Track unique names; we only expose bare named functions if they + // are ambiguous + { + const name = fragment.name; + if (!uniqueNames[`%${ name }`]) { uniqueNames[`%${ name }`] = [ ]; } + uniqueNames[`%${ name }`].push(signature); + } + + if ((this)[signature] == null) { + defineReadOnly(this, signature, buildDefault(this, fragment, true)); + } + + // We do not collapse simple calls on this bucket, which allows + // frameworks to safely use this without introspection as well as + // allows decoding error recovery. + if (this.functions[signature] == null) { + defineReadOnly(this.functions, signature, buildDefault(this, fragment, false)); + } + + if (this.callStatic[signature] == null) { + defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true)); + } + + if (this.populateTransaction[signature] == null) { + defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment)); + } + + if (this.estimateGas[signature] == null) { + defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment)); + } + }); + + Object.keys(uniqueNames).forEach((name) => { + // Ambiguous names to not get attached as bare names + const signatures = uniqueNames[name]; + if (signatures.length > 1) { return; } + + // Strip off the leading "%" used for prototype protection + name = name.substring(1); + + const signature = signatures[0]; + + // If overwriting a member property that is null, swallow the error + try { + if ((this)[name] == null) { + defineReadOnly(this, name, (this)[signature]); + } + } catch (e) { } + + if (this.functions[name] == null) { + defineReadOnly(this.functions, name, this.functions[signature]); + } + + if (this.callStatic[name] == null) { + defineReadOnly(this.callStatic, name, this.callStatic[signature]); + } + + if (this.populateTransaction[name] == null) { + defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]); + } + + if (this.estimateGas[name] == null) { + defineReadOnly(this.estimateGas, name, this.estimateGas[signature]); + } + }); + } + + static getContractAddress(transaction: { from: string, nonce: BigNumberish }): string { + return getContractAddress(transaction); + } + + static getInterface(contractInterface: ContractInterface): Interface { + if (Interface.isInterface(contractInterface)) { + return contractInterface; + } + return new Interface(contractInterface); + } + + // @TODO: Allow timeout? + deployed(): Promise { + return this._deployed(); + } + + _deployed(blockTag?: BlockTag): Promise { + if (!this._deployedPromise) { + + // If we were just deployed, we know the transaction we should occur in + if (this.deployTransaction) { + this._deployedPromise = this.deployTransaction.wait().then(() => { + return this; + }); + + } else { + // @TODO: Once we allow a timeout to be passed in, we will wait + // up to that many blocks for getCode + + // Otherwise, poll for our code to be deployed + this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => { + if (code === "0x") { + logger.throwError("contract not deployed", Logger.errors.UNSUPPORTED_OPERATION, { + contractAddress: this.address, + operation: "getDeployed" + }); + } + return this; + }); + } + } + + return this._deployedPromise; + } + + // @TODO: + // estimateFallback(overrides?: TransactionRequest): Promise + + // @TODO: + // estimateDeploy(bytecode: string, ...args): Promise + + fallback(overrides?: TransactionRequest): Promise { + if (!this.signer) { + logger.throwError("sending a transactions require a signer", Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }) + } + + const tx: Deferrable = shallowCopy(overrides || {}); + + ["from", "to"].forEach(function(key) { + if ((tx)[key] == null) { return; } + logger.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key }) + }); + + tx.to = this.resolvedAddress; + return this.deployed().then(() => { + return this.signer.sendTransaction(tx); + }); + } + + // Reconnect to a different signer or provider + connect(signerOrProvider: Signer | Provider | string): Contract { + if (typeof(signerOrProvider) === "string") { + signerOrProvider = new VoidSigner(signerOrProvider, this.provider); + } + + const contract = new (<{ new(...args: any[]): Contract }>(this.constructor))(this.address, this.interface, signerOrProvider); + if (this.deployTransaction) { + defineReadOnly(contract, "deployTransaction", this.deployTransaction); + } + return contract; + } + + // Re-attach to a different on-chain instance of this contract + attach(addressOrName: string): Contract { + return new (<{ new(...args: any[]): Contract }>(this.constructor))(addressOrName, this.interface, this.signer || this.provider); + } + + static isIndexed(value: any): value is Indexed { + return Indexed.isIndexed(value); + } + + private _normalizeRunningEvent(runningEvent: RunningEvent): RunningEvent { + // Already have an instance of this event running; we can re-use it + if (this._runningEvents[runningEvent.tag]) { + return this._runningEvents[runningEvent.tag]; + } + return runningEvent + } + + private _getRunningEvent(eventName: EventFilter | string): RunningEvent { + if (typeof(eventName) === "string") { + + // Listen for "error" events (if your contract has an error event, include + // the full signature to bypass this special event keyword) + if (eventName === "error") { + return this._normalizeRunningEvent(new ErrorRunningEvent()); + } + + // Listen for any event that is registered + if (eventName === "event") { + return this._normalizeRunningEvent(new RunningEvent("event", null)); + } + + // Listen for any event + if (eventName === "*") { + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + + // Get the event Fragment (throws if ambiguous/unknown event) + const fragment = this.interface.getEvent(eventName) + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment)); + } + + // We have topics to filter by... + if (eventName.topics && eventName.topics.length > 0) { + + // Is it a known topichash? (throws if no matching topichash) + try { + const topic = eventName.topics[0]; + if (typeof(topic) !== "string") { + throw new Error("invalid topic"); // @TODO: May happen for anonymous events + } + const fragment = this.interface.getEvent(topic); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics)); + } catch (error) { } + + // Filter by the unknown topichash + const filter: EventFilter = { + address: this.address, + topics: eventName.topics + } + + return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter)); + } + + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + + _checkRunningEvents(runningEvent: RunningEvent): void { + if (runningEvent.listenerCount() === 0) { + delete this._runningEvents[runningEvent.tag]; + + // If we have a poller for this, remove it + const emit = this._wrappedEmits[runningEvent.tag]; + if (emit && runningEvent.filter) { + this.provider.off(runningEvent.filter, emit); + delete this._wrappedEmits[runningEvent.tag]; + } + } + } + + // Subclasses can override this to gracefully recover + // from parse errors if they wish + _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event { + const event = deepCopy(log); + + event.removeListener = () => { + if (!listener) { return; } + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + }; + + event.getBlock = () => { return this.provider.getBlock(log.blockHash); } + event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); } + event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); } + + // This may throw if the topics and data mismatch the signature + runningEvent.prepareEvent(event); + + return event; + } + + private _addEventListener(runningEvent: RunningEvent, listener: Listener, once: boolean): void { + if (!this.provider) { + logger.throwError("events require a provider or a signer with a provider", Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }) + } + + runningEvent.addListener(listener, once); + + // Track this running event and its listeners (may already be there; but no hard in updating) + this._runningEvents[runningEvent.tag] = runningEvent; + + // If we are not polling the provider, start polling + if (!this._wrappedEmits[runningEvent.tag]) { + const wrappedEmit = (log: Log) => { + let event = this._wrapEvent(runningEvent, log, listener); + + // Try to emit the result for the parameterized event... + if (event.decodeError == null) { + try { + const args = runningEvent.getEmit(event); + this.emit(runningEvent.filter, ...args); + } catch (error) { + event.decodeError = error.error; + } + } + + // Always emit "event" for fragment-base events + if (runningEvent.filter != null) { + this.emit("event", event); + } + + // Emit "error" if there was an error + if (event.decodeError != null) { + this.emit("error", event.decodeError, event); + } + }; + this._wrappedEmits[runningEvent.tag] = wrappedEmit; + + // Special events, like "error" do not have a filter + if (runningEvent.filter != null) { + this.provider.on(runningEvent.filter, wrappedEmit); + } + } + } + + queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise> { + const runningEvent = this._getRunningEvent(event); + const filter = shallowCopy(runningEvent.filter); + + if (typeof(fromBlockOrBlockhash) === "string" && isHexString(fromBlockOrBlockhash, 32)) { + if (toBlock != null) { + logger.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); + } + (filter).blockHash = fromBlockOrBlockhash; + } else { + (filter).fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash: 0); + (filter).toBlock = ((toBlock != null) ? toBlock: "latest"); + } + + return this.provider.getLogs(filter).then((logs) => { + return logs.map((log) => this._wrapEvent(runningEvent, log, null)); + }); + } + + on(event: EventFilter | string, listener: Listener): this { + this._addEventListener(this._getRunningEvent(event), listener, false); + return this; + } + + once(event: EventFilter | string, listener: Listener): this { + this._addEventListener(this._getRunningEvent(event), listener, true); + return this; + } + + emit(eventName: EventFilter | string, ...args: Array): boolean { + if (!this.provider) { return false; } + + const runningEvent = this._getRunningEvent(eventName); + const result = (runningEvent.run(args) > 0); + + // May have drained all the "once" events; check for living events + this._checkRunningEvents(runningEvent); + + return result; + } + + listenerCount(eventName?: EventFilter | string): number { + if (!this.provider) { return 0; } + if (eventName == null) { + return Object.keys(this._runningEvents).reduce((accum, key) => { + return accum + this._runningEvents[key].listenerCount(); + }, 0); + } + return this._getRunningEvent(eventName).listenerCount(); + } + + listeners(eventName?: EventFilter | string): Array { + if (!this.provider) { return []; } + + if (eventName == null) { + const result: Array = [ ]; + for (let tag in this._runningEvents) { + this._runningEvents[tag].listeners().forEach((listener) => { + result.push(listener) + }); + } + return result; + } + + return this._getRunningEvent(eventName).listeners(); + } + + removeAllListeners(eventName?: EventFilter | string): this { + if (!this.provider) { return this; } + + if (eventName == null) { + for (const tag in this._runningEvents) { + const runningEvent = this._runningEvents[tag]; + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + } + return this; + } + + // Delete any listeners + const runningEvent = this._getRunningEvent(eventName); + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + + return this; + } + + off(eventName: EventFilter | string, listener: Listener): this { + if (!this.provider) { return this; } + const runningEvent = this._getRunningEvent(eventName); + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + return this; + } + + removeListener(eventName: EventFilter | string, listener: Listener): this { + return this.off(eventName, listener); + } + +} + +export class Contract extends BaseContract { + // The meta-class properties + readonly [ key: string ]: ContractFunction | any; +} + +export class ContractFactory { + + readonly interface: Interface; + readonly bytecode: string; + readonly signer: Signer; + + constructor(contractInterface: ContractInterface, bytecode: BytesLike | { object: string }, signer?: Signer) { + + let bytecodeHex: string = null; + + if (typeof(bytecode) === "string") { + bytecodeHex = bytecode; + } else if (isBytes(bytecode)) { + bytecodeHex = hexlify(bytecode); + } else if (bytecode && typeof(bytecode.object) === "string") { + // Allow the bytecode object from the Solidity compiler + bytecodeHex = (bytecode).object; + } else { + // Crash in the next verification step + bytecodeHex = "!"; + } + + // Make sure it is 0x prefixed + if (bytecodeHex.substring(0, 2) !== "0x") { bytecodeHex = "0x" + bytecodeHex; } + + // Make sure the final result is valid bytecode + if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) { + logger.throwArgumentError("invalid bytecode", "bytecode", bytecode); + } + + // If we have a signer, make sure it is valid + if (signer && !Signer.isSigner(signer)) { + logger.throwArgumentError("invalid signer", "signer", signer); + } + + defineReadOnly(this, "bytecode", bytecodeHex); + defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + defineReadOnly(this, "signer", signer || null); + } + + // @TODO: Future; rename to populateTransaction? + getDeployTransaction(...args: Array): TransactionRequest { + let tx: TransactionRequest = { }; + + // If we have 1 additional argument, we allow transaction overrides + if (args.length === this.interface.deploy.inputs.length + 1 && typeof(args[args.length - 1]) === "object") { + tx = shallowCopy(args.pop()); + for (const key in tx) { + if (!allowedTransactionKeys[key]) { + throw new Error("unknown transaction override " + key); + } + } + } + + // Do not allow these to be overridden in a deployment transaction + ["data", "from", "to"].forEach((key) => { + if ((tx)[key] == null) { return; } + logger.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key }) + }); + + if (tx.value) { + const value = BigNumber.from(tx.value); + if (!value.isZero() && !this.interface.deploy.payable) { + logger.throwError("non-payable constructor cannot override value", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: tx.value + }); + } + } + + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + + // Set the data to the bytecode + the encoded constructor arguments + tx.data = hexlify(concat([ + this.bytecode, + this.interface.encodeDeploy(args) + ])); + + return tx + } + + async deploy(...args: Array): Promise { + + let overrides: any = { }; + + // If 1 extra parameter was passed in, it contains overrides + if (args.length === this.interface.deploy.inputs.length + 1) { + overrides = args.pop(); + } + + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + + // Resolve ENS names and promises in the arguments + const params = await resolveAddresses(this.signer, args, this.interface.deploy.inputs); + params.push(overrides); + + // Get the deployment transaction (with optional overrides) + const unsignedTx = this.getDeployTransaction(...params); + + // Send the deployment transaction + const tx = await this.signer.sendTransaction(unsignedTx); + + const address = getStatic<(tx: TransactionResponse) => string>(this.constructor, "getContractAddress")(tx); + const contract = getStatic<(address: string, contractInterface: ContractInterface, signer?: Signer) => Contract>(this.constructor, "getContract")(address, this.interface, this.signer); + + // Add the modified wait that wraps events + addContractWait(contract, tx); + + defineReadOnly(contract, "deployTransaction", tx); + return contract; + } + + attach(address: string): Contract { + return ((this.constructor)).getContract(address, this.interface, this.signer); + } + + connect(signer: Signer) { + return new (<{ new(...args: any[]): ContractFactory }>(this.constructor))(this.interface, this.bytecode, signer); + } + + static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory { + if (compilerOutput == null) { + logger.throwError("missing compiler output", Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); + } + + if (typeof(compilerOutput) === "string") { + compilerOutput = JSON.parse(compilerOutput); + } + + const abi = compilerOutput.abi; + + let bytecode: any = null; + if (compilerOutput.bytecode) { + bytecode = compilerOutput.bytecode; + } else if (compilerOutput.evm && compilerOutput.evm.bytecode) { + bytecode = compilerOutput.evm.bytecode; + } + + return new this(abi, bytecode, signer); + } + + static getInterface(contractInterface: ContractInterface) { + return Contract.getInterface(contractInterface); + } + + static getContractAddress(tx: { from: string, nonce: BytesLike | BigNumber | number }): string { + return getContractAddress(tx); + } + + static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract { + return new Contract(address, contractInterface, signer); + } +} diff --git a/node_modules/@ethersproject/hash/LICENSE.md b/node_modules/@ethersproject/hash/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/hash/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/hash/README.md b/node_modules/@ethersproject/hash/README.md new file mode 100644 index 0000000..fde1d64 --- /dev/null +++ b/node_modules/@ethersproject/hash/README.md @@ -0,0 +1,34 @@ +Etheruem Hash Utilities +======================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains several common hashing utilities (but not the actual hash functions). + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + isValidName, + namehash, + + id, + + messagePrefix, + hashMessage + +} = require("@ethersproject/hash"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/hash/lib.esm/_version.d.ts b/node_modules/@ethersproject/hash/lib.esm/_version.d.ts new file mode 100644 index 0000000..47702f6 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hash/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/hash/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/_version.js b/node_modules/@ethersproject/hash/lib.esm/_version.js new file mode 100644 index 0000000..09de531 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "hash/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/_version.js.map b/node_modules/@ethersproject/hash/lib.esm/_version.js.map new file mode 100644 index 0000000..33a652d --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/id.d.ts b/node_modules/@ethersproject/hash/lib.esm/id.d.ts new file mode 100644 index 0000000..6477953 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/id.d.ts @@ -0,0 +1,2 @@ +export declare function id(text: string): string; +//# sourceMappingURL=id.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/id.d.ts.map b/node_modules/@ethersproject/hash/lib.esm/id.d.ts.map new file mode 100644 index 0000000..2f23438 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/id.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src.ts/id.ts"],"names":[],"mappings":"AAGA,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/id.js b/node_modules/@ethersproject/hash/lib.esm/id.js new file mode 100644 index 0000000..8ae89e4 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/id.js @@ -0,0 +1,6 @@ +import { keccak256 } from "@ethersproject/keccak256"; +import { toUtf8Bytes } from "@ethersproject/strings"; +export function id(text) { + return keccak256(toUtf8Bytes(text)); +} +//# sourceMappingURL=id.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/id.js.map b/node_modules/@ethersproject/hash/lib.esm/id.js.map new file mode 100644 index 0000000..db337ca --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/id.js.map @@ -0,0 +1 @@ +{"version":3,"file":"id.js","sourceRoot":"","sources":["../src.ts/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,UAAU,EAAE,CAAC,IAAY;IAC3B,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/index.d.ts b/node_modules/@ethersproject/hash/lib.esm/index.d.ts new file mode 100644 index 0000000..f7745e5 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/index.d.ts @@ -0,0 +1,6 @@ +import { id } from "./id"; +import { isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; +export { id, namehash, isValidName, messagePrefix, hashMessage, _TypedDataEncoder, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/index.d.ts.map b/node_modules/@ethersproject/hash/lib.esm/index.d.ts.map new file mode 100644 index 0000000..6efd6ca --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EACH,EAAE,EAEF,QAAQ,EACR,WAAW,EAEX,aAAa,EACb,WAAW,EAEX,iBAAiB,GACpB,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/index.js b/node_modules/@ethersproject/hash/lib.esm/index.js new file mode 100644 index 0000000..37ed238 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/index.js @@ -0,0 +1,7 @@ +"use strict"; +import { id } from "./id"; +import { isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; +export { id, namehash, isValidName, messagePrefix, hashMessage, _TypedDataEncoder, }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/index.js.map b/node_modules/@ethersproject/hash/lib.esm/index.js.map new file mode 100644 index 0000000..620faa5 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EACH,EAAE,EAEF,QAAQ,EACR,WAAW,EAEX,aAAa,EACb,WAAW,EAEX,iBAAiB,GACpB,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/message.d.ts b/node_modules/@ethersproject/hash/lib.esm/message.d.ts new file mode 100644 index 0000000..613ccd3 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/message.d.ts @@ -0,0 +1,4 @@ +import { Bytes } from "@ethersproject/bytes"; +export declare const messagePrefix = "\u0019Ethereum Signed Message:\n"; +export declare function hashMessage(message: Bytes | string): string; +//# sourceMappingURL=message.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/message.d.ts.map b/node_modules/@ethersproject/hash/lib.esm/message.d.ts.map new file mode 100644 index 0000000..abbe140 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/message.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src.ts/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAU,MAAM,sBAAsB,CAAC;AAIrD,eAAO,MAAM,aAAa,qCAAmC,CAAC;AAE9D,wBAAgB,WAAW,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAO3D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/message.js b/node_modules/@ethersproject/hash/lib.esm/message.js new file mode 100644 index 0000000..6fd8c3f --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/message.js @@ -0,0 +1,15 @@ +import { concat } from "@ethersproject/bytes"; +import { keccak256 } from "@ethersproject/keccak256"; +import { toUtf8Bytes } from "@ethersproject/strings"; +export const messagePrefix = "\x19Ethereum Signed Message:\n"; +export function hashMessage(message) { + if (typeof (message) === "string") { + message = toUtf8Bytes(message); + } + return keccak256(concat([ + toUtf8Bytes(messagePrefix), + toUtf8Bytes(String(message.length)), + message + ])); +} +//# sourceMappingURL=message.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/message.js.map b/node_modules/@ethersproject/hash/lib.esm/message.js.map new file mode 100644 index 0000000..e14f54d --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/message.js.map @@ -0,0 +1 @@ +{"version":3,"file":"message.js","sourceRoot":"","sources":["../src.ts/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,CAAC,MAAM,aAAa,GAAG,gCAAgC,CAAC;AAE9D,MAAM,UAAU,WAAW,CAAC,OAAuB;IAC/C,IAAI,OAAM,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE;QAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;KAAE;IACrE,OAAO,SAAS,CAAC,MAAM,CAAC;QACpB,WAAW,CAAC,aAAa,CAAC;QAC1B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,OAAO;KACV,CAAC,CAAC,CAAC;AACR,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts b/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts new file mode 100644 index 0000000..2a5356a --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts @@ -0,0 +1,3 @@ +export declare function isValidName(name: string): boolean; +export declare function namehash(name: string): string; +//# sourceMappingURL=namehash.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts.map b/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts.map new file mode 100644 index 0000000..949c61a --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../src.ts/namehash.ts"],"names":[],"mappings":"AAaA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWjD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoB7C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/namehash.js b/node_modules/@ethersproject/hash/lib.esm/namehash.js new file mode 100644 index 0000000..65f1422 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/namehash.js @@ -0,0 +1,41 @@ +import { concat, hexlify } from "@ethersproject/bytes"; +import { nameprep, toUtf8Bytes } from "@ethersproject/strings"; +import { keccak256 } from "@ethersproject/keccak256"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +const Zeros = new Uint8Array(32); +Zeros.fill(0); +const Partition = new RegExp("^((.*)\\.)?([^.]+)$"); +export function isValidName(name) { + try { + const comps = name.split("."); + for (let i = 0; i < comps.length; i++) { + if (nameprep(comps[i]).length === 0) { + throw new Error("empty"); + } + } + return true; + } + catch (error) { } + return false; +} +export function namehash(name) { + /* istanbul ignore if */ + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid ENS name; not a string", "name", name); + } + let current = name; + let result = Zeros; + while (current.length) { + const partition = current.match(Partition); + if (partition == null || partition[2] === "") { + logger.throwArgumentError("invalid ENS address; missing component", "name", name); + } + const label = toUtf8Bytes(nameprep(partition[3])); + result = keccak256(concat([result, keccak256(label)])); + current = partition[2] || ""; + } + return hexlify(result); +} +//# sourceMappingURL=namehash.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/namehash.js.map b/node_modules/@ethersproject/hash/lib.esm/namehash.js.map new file mode 100644 index 0000000..f5e37e6 --- /dev/null +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,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KAC7E;IAED,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,MAAM,GAAwB,KAAK,CAAC;IACxC,OAAO,OAAO,CAAC,MAAM,EAAE;QACnB,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;YAC1C,MAAM,CAAC,kBAAkB,CAAC,wCAAwC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;SACrF;QACD,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEvD,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KAChC;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts b/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts new file mode 100644 index 0000000..0e07dfd --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts @@ -0,0 +1,29 @@ +import { TypedDataDomain, TypedDataField } from "@ethersproject/abstract-signer"; +export declare class TypedDataEncoder { + readonly primaryType: string; + readonly types: Record>; + readonly _encoderCache: Record string>; + readonly _types: Record; + constructor(types: Record>); + getEncoder(type: string): (value: any) => string; + _getEncoder(type: string): (value: any) => string; + encodeType(name: string): string; + encodeData(type: string, value: any): string; + hashStruct(name: string, value: Record): string; + encode(value: Record): string; + hash(value: Record): string; + _visit(type: string, value: any, callback: (type: string, data: any) => any): any; + visit(value: Record, callback: (type: string, data: any) => any): any; + static from(types: Record>): TypedDataEncoder; + static getPrimaryType(types: Record>): string; + static hashStruct(name: string, types: Record>, value: Record): string; + static hashDomain(domain: TypedDataDomain): string; + static encode(domain: TypedDataDomain, types: Record>, value: Record): string; + static hash(domain: TypedDataDomain, types: Record>, value: Record): string; + static resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ + domain: TypedDataDomain; + value: any; + }>; + static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any; +} +//# sourceMappingURL=typed-data.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts.map b/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts.map new file mode 100644 index 0000000..6854776 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typed-data.d.ts","sourceRoot":"","sources":["../src.ts/typed-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAmJjF,qBAAa,gBAAgB;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;IAEtD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IAC/D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAgGxD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM;IAQhD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM;IA8CjD,UAAU,CA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,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAQxH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;WAKzG,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IA0C9N,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG;CA2D5H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/typed-data.js b/node_modules/@ethersproject/hash/lib.esm/typed-data.js new file mode 100644 index 0000000..f5f024f --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/typed-data.js @@ -0,0 +1,441 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { getAddress } from "@ethersproject/address"; +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, hexConcat, hexlify, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { keccak256 } from "@ethersproject/keccak256"; +import { deepCopy, defineReadOnly, shallowCopy } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { id } from "./id"; +const padding = new Uint8Array(32); +padding.fill(0); +const NegativeOne = BigNumber.from(-1); +const Zero = BigNumber.from(0); +const One = BigNumber.from(1); +const MaxUint256 = BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); +function hexPadRight(value) { + const bytes = arrayify(value); + const padOffset = bytes.length % 32; + if (padOffset) { + return hexConcat([bytes, padding.slice(padOffset)]); + } + return hexlify(bytes); +} +const hexTrue = hexZeroPad(One.toHexString(), 32); +const hexFalse = hexZeroPad(Zero.toHexString(), 32); +const domainFieldTypes = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" +}; +const domainFieldNames = [ + "name", "version", "chainId", "verifyingContract", "salt" +]; +function checkString(key) { + return function (value) { + if (typeof (value) !== "string") { + logger.throwArgumentError(`invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value); + } + return value; + }; +} +const domainChecks = { + name: checkString("name"), + version: checkString("version"), + chainId: function (value) { + try { + return BigNumber.from(value).toString(); + } + catch (error) { } + return logger.throwArgumentError(`invalid domain value for "chainId"`, "domain.chainId", value); + }, + verifyingContract: function (value) { + try { + return getAddress(value).toLowerCase(); + } + catch (error) { } + return logger.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value); + }, + salt: function (value) { + try { + const bytes = arrayify(value); + if (bytes.length !== 32) { + throw new Error("bad length"); + } + return hexlify(bytes); + } + catch (error) { } + return logger.throwArgumentError(`invalid domain value "salt"`, "domain.salt", value); + } +}; +function getBaseEncoder(type) { + // intXX and uintXX + { + const match = type.match(/^(u?)int(\d*)$/); + if (match) { + const signed = (match[1] === ""); + const width = parseInt(match[2] || "256"); + if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) { + logger.throwArgumentError("invalid numeric width", "type", type); + } + const boundsUpper = MaxUint256.mask(signed ? (width - 1) : width); + const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne) : Zero; + return function (value) { + const v = BigNumber.from(value); + if (v.lt(boundsLower) || v.gt(boundsUpper)) { + logger.throwArgumentError(`value out-of-bounds for ${type}`, "value", value); + } + return hexZeroPad(v.toTwos(256).toHexString(), 32); + }; + } + } + // bytesXX + { + const match = type.match(/^bytes(\d+)$/); + if (match) { + const width = parseInt(match[1]); + if (width === 0 || width > 32 || match[1] !== String(width)) { + logger.throwArgumentError("invalid bytes width", "type", type); + } + return function (value) { + const bytes = arrayify(value); + if (bytes.length !== width) { + logger.throwArgumentError(`invalid length for ${type}`, "value", value); + } + return hexPadRight(value); + }; + } + } + switch (type) { + case "address": return function (value) { + return hexZeroPad(getAddress(value), 32); + }; + case "bool": return function (value) { + return ((!value) ? hexFalse : hexTrue); + }; + case "bytes": return function (value) { + return keccak256(value); + }; + case "string": return function (value) { + return id(value); + }; + } + return null; +} +function encodeType(name, fields) { + return `${name}(${fields.map(({ name, type }) => (type + " " + name)).join(",")})`; +} +export class TypedDataEncoder { + constructor(types) { + defineReadOnly(this, "types", Object.freeze(deepCopy(types))); + defineReadOnly(this, "_encoderCache", {}); + defineReadOnly(this, "_types", {}); + // Link struct types to their direct child structs + const links = {}; + // Link structs to structs which contain them as a child + const parents = {}; + // Link all subtypes within a given struct + const subtypes = {}; + Object.keys(types).forEach((type) => { + links[type] = {}; + parents[type] = []; + subtypes[type] = {}; + }); + for (const name in types) { + const uniqueNames = {}; + types[name].forEach((field) => { + // Check each field has a unique name + if (uniqueNames[field.name]) { + logger.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, "types", types); + } + uniqueNames[field.name] = true; + // Get the base type (drop any array specifiers) + const baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1]; + if (baseType === name) { + logger.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`, "types", types); + } + // Is this a base encoding type? + const encoder = getBaseEncoder(baseType); + if (encoder) { + return; + } + if (!parents[baseType]) { + logger.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`, "types", types); + } + // Add linkage + parents[baseType].push(name); + links[name][baseType] = true; + }); + } + // Deduce the primary type + const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0)); + if (primaryTypes.length === 0) { + logger.throwArgumentError("missing primary type", "types", types); + } + else if (primaryTypes.length > 1) { + logger.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(", ")}`, "types", types); + } + defineReadOnly(this, "primaryType", primaryTypes[0]); + // Check for circular type references + function checkCircular(type, found) { + if (found[type]) { + logger.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`, "types", types); + } + found[type] = true; + Object.keys(links[type]).forEach((child) => { + if (!parents[child]) { + return; + } + // Recursively check children + checkCircular(child, found); + // Mark all ancestors as having this decendant + Object.keys(found).forEach((subtype) => { + subtypes[subtype][child] = true; + }); + }); + delete found[type]; + } + checkCircular(this.primaryType, {}); + // Compute each fully describe type + for (const name in subtypes) { + const st = Object.keys(subtypes[name]); + st.sort(); + this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(""); + } + } + getEncoder(type) { + let encoder = this._encoderCache[type]; + if (!encoder) { + encoder = this._encoderCache[type] = this._getEncoder(type); + } + return encoder; + } + _getEncoder(type) { + // Basic encoder type (address, bool, uint256, etc) + { + const encoder = getBaseEncoder(type); + if (encoder) { + return encoder; + } + } + // Array + const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + const subtype = match[1]; + const subEncoder = this.getEncoder(subtype); + const length = parseInt(match[3]); + return (value) => { + if (length >= 0 && value.length !== length) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + let result = value.map(subEncoder); + if (this._types[subtype]) { + result = result.map(keccak256); + } + return keccak256(hexConcat(result)); + }; + } + // Struct + const fields = this.types[type]; + if (fields) { + const encodedType = id(this._types[type]); + return (value) => { + const values = fields.map(({ name, type }) => { + const result = this.getEncoder(type)(value[name]); + if (this._types[type]) { + return keccak256(result); + } + return result; + }); + values.unshift(encodedType); + return hexConcat(values); + }; + } + return logger.throwArgumentError(`unknown type: ${type}`, "type", type); + } + encodeType(name) { + const result = this._types[name]; + if (!result) { + logger.throwArgumentError(`unknown type: ${JSON.stringify(name)}`, "name", name); + } + return result; + } + encodeData(type, value) { + return this.getEncoder(type)(value); + } + hashStruct(name, value) { + return keccak256(this.encodeData(name, value)); + } + encode(value) { + return this.encodeData(this.primaryType, value); + } + hash(value) { + return this.hashStruct(this.primaryType, value); + } + _visit(type, value, callback) { + // Basic encoder type (address, bool, uint256, etc) + { + const encoder = getBaseEncoder(type); + if (encoder) { + return callback(type, value); + } + } + // Array + const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + const subtype = match[1]; + const length = parseInt(match[3]); + if (length >= 0 && value.length !== length) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + return value.map((v) => this._visit(subtype, v, callback)); + } + // Struct + const fields = this.types[type]; + if (fields) { + return fields.reduce((accum, { name, type }) => { + accum[name] = this._visit(type, value[name], callback); + return accum; + }, {}); + } + return logger.throwArgumentError(`unknown type: ${type}`, "type", type); + } + visit(value, callback) { + return this._visit(this.primaryType, value, callback); + } + static from(types) { + return new TypedDataEncoder(types); + } + static getPrimaryType(types) { + return TypedDataEncoder.from(types).primaryType; + } + static hashStruct(name, types, value) { + return TypedDataEncoder.from(types).hashStruct(name, value); + } + static hashDomain(domain) { + const domainFields = []; + for (const name in domain) { + const type = domainFieldTypes[name]; + if (!type) { + logger.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name)}`, "domain", domain); + } + domainFields.push({ name, type }); + } + domainFields.sort((a, b) => { + return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name); + }); + return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); + } + static encode(domain, types, value) { + return hexConcat([ + "0x1901", + TypedDataEncoder.hashDomain(domain), + TypedDataEncoder.from(types).hash(value) + ]); + } + static hash(domain, types, value) { + return keccak256(TypedDataEncoder.encode(domain, types, value)); + } + // Replaces all address types with ENS names with their looked up address + static resolveNames(domain, types, value, resolveName) { + return __awaiter(this, void 0, void 0, function* () { + // Make a copy to isolate it from the object passed in + domain = shallowCopy(domain); + // Look up all ENS names + const ensCache = {}; + // Do we need to look up the domain's verifyingContract? + if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) { + ensCache[domain.verifyingContract] = "0x"; + } + // We are going to use the encoder to visit all the base values + const encoder = TypedDataEncoder.from(types); + // Get a list of all the addresses + encoder.visit(value, (type, value) => { + if (type === "address" && !isHexString(value, 20)) { + ensCache[value] = "0x"; + } + return value; + }); + // Lookup each name + for (const name in ensCache) { + ensCache[name] = yield resolveName(name); + } + // Replace the domain verifyingContract if needed + if (domain.verifyingContract && ensCache[domain.verifyingContract]) { + domain.verifyingContract = ensCache[domain.verifyingContract]; + } + // Replace all ENS names with their address + value = encoder.visit(value, (type, value) => { + if (type === "address" && ensCache[value]) { + return ensCache[value]; + } + return value; + }); + return { domain, value }; + }); + } + static getPayload(domain, types, value) { + // Validate the domain fields + TypedDataEncoder.hashDomain(domain); + // Derive the EIP712Domain Struct reference type + const domainValues = {}; + const domainTypes = []; + domainFieldNames.forEach((name) => { + const value = domain[name]; + if (value == null) { + return; + } + domainValues[name] = domainChecks[name](value); + domainTypes.push({ name, type: domainFieldTypes[name] }); + }); + const encoder = TypedDataEncoder.from(types); + const typesWithDomain = shallowCopy(types); + if (typesWithDomain.EIP712Domain) { + logger.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types); + } + else { + typesWithDomain.EIP712Domain = domainTypes; + } + // Validate the data structures and types + encoder.encode(value); + return { + types: typesWithDomain, + domain: domainValues, + primaryType: encoder.primaryType, + message: encoder.visit(value, (type, value) => { + // bytes + if (type.match(/^bytes(\d*)/)) { + return hexlify(arrayify(value)); + } + // uint or int + if (type.match(/^u?int/)) { + return BigNumber.from(value).toString(); + } + switch (type) { + case "address": + return value.toLowerCase(); + case "bool": + return !!value; + case "string": + if (typeof (value) !== "string") { + logger.throwArgumentError(`invalid string`, "value", value); + } + return value; + } + return logger.throwArgumentError("unsupported type", "type", type); + }) + }; + } +} +//# sourceMappingURL=typed-data.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib.esm/typed-data.js.map b/node_modules/@ethersproject/hash/lib.esm/typed-data.js.map new file mode 100644 index 0000000..ca12c92 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib.esm/typed-data.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typed-data.js","sourceRoot":"","sources":["../src.ts/typed-data.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAa,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAElF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,MAAM,OA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AE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,IAAY,EAAE,KAAU,EAAE,EAAE;gBAEvD,QAAQ;gBACR,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;oBAC3B,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;iBACnC;gBAED,cAAc;gBACd,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;oBACtB,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;iBAC3C;gBAED,QAAQ,IAAI,EAAE;oBACV,KAAK,SAAS;wBACV,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;oBAC/B,KAAK,MAAM;wBACP,OAAO,CAAC,CAAC,KAAK,CAAC;oBACnB,KAAK,QAAQ;wBACT,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,EAAE;4BAC5B,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;yBAC/D;wBACD,OAAO,KAAK,CAAC;iBACpB;gBAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACvE,CAAC,CAAC;SACL,CAAC;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/_version.d.ts b/node_modules/@ethersproject/hash/lib/_version.d.ts new file mode 100644 index 0000000..47702f6 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hash/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/_version.d.ts.map b/node_modules/@ethersproject/hash/lib/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/_version.js b/node_modules/@ethersproject/hash/lib/_version.js new file mode 100644 index 0000000..3d2b874 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "hash/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/_version.js.map b/node_modules/@ethersproject/hash/lib/_version.js.map new file mode 100644 index 0000000..9d275b7 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/id.d.ts b/node_modules/@ethersproject/hash/lib/id.d.ts new file mode 100644 index 0000000..6477953 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/id.d.ts @@ -0,0 +1,2 @@ +export declare function id(text: string): string; +//# sourceMappingURL=id.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/id.d.ts.map b/node_modules/@ethersproject/hash/lib/id.d.ts.map new file mode 100644 index 0000000..2f23438 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/id.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src.ts/id.ts"],"names":[],"mappings":"AAGA,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/id.js b/node_modules/@ethersproject/hash/lib/id.js new file mode 100644 index 0000000..3093444 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/id.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.id = void 0; +var keccak256_1 = require("@ethersproject/keccak256"); +var strings_1 = require("@ethersproject/strings"); +function id(text) { + return (0, keccak256_1.keccak256)((0, strings_1.toUtf8Bytes)(text)); +} +exports.id = id; +//# sourceMappingURL=id.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/id.js.map b/node_modules/@ethersproject/hash/lib/id.js.map new file mode 100644 index 0000000..15846c0 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/id.js.map @@ -0,0 +1 @@ +{"version":3,"file":"id.js","sourceRoot":"","sources":["../src.ts/id.ts"],"names":[],"mappings":";;;AAAA,sDAAqD;AACrD,kDAAqD;AAErD,SAAgB,EAAE,CAAC,IAAY;IAC3B,OAAO,IAAA,qBAAS,EAAC,IAAA,qBAAW,EAAC,IAAI,CAAC,CAAC,CAAC;AACxC,CAAC;AAFD,gBAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/index.d.ts b/node_modules/@ethersproject/hash/lib/index.d.ts new file mode 100644 index 0000000..f7745e5 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/index.d.ts @@ -0,0 +1,6 @@ +import { id } from "./id"; +import { isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; +export { id, namehash, isValidName, messagePrefix, hashMessage, _TypedDataEncoder, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/index.d.ts.map b/node_modules/@ethersproject/hash/lib/index.d.ts.map new file mode 100644 index 0000000..6efd6ca --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EACH,EAAE,EAEF,QAAQ,EACR,WAAW,EAEX,aAAa,EACb,WAAW,EAEX,iBAAiB,GACpB,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/index.js b/node_modules/@ethersproject/hash/lib/index.js new file mode 100644 index 0000000..f9ab983 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/index.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports._TypedDataEncoder = exports.hashMessage = exports.messagePrefix = exports.isValidName = exports.namehash = exports.id = void 0; +var id_1 = require("./id"); +Object.defineProperty(exports, "id", { enumerable: true, get: function () { return id_1.id; } }); +var namehash_1 = require("./namehash"); +Object.defineProperty(exports, "isValidName", { enumerable: true, get: function () { return namehash_1.isValidName; } }); +Object.defineProperty(exports, "namehash", { enumerable: true, get: function () { return namehash_1.namehash; } }); +var message_1 = require("./message"); +Object.defineProperty(exports, "hashMessage", { enumerable: true, get: function () { return message_1.hashMessage; } }); +Object.defineProperty(exports, "messagePrefix", { enumerable: true, get: function () { return message_1.messagePrefix; } }); +var typed_data_1 = require("./typed-data"); +Object.defineProperty(exports, "_TypedDataEncoder", { enumerable: true, get: function () { return typed_data_1.TypedDataEncoder; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/index.js.map b/node_modules/@ethersproject/hash/lib/index.js.map new file mode 100644 index 0000000..3b0ffa5 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,2BAA0B;AAOtB,mFAPK,OAAE,OAOL;AANN,uCAAmD;AAS/C,4FATK,sBAAW,OASL;AADX,yFARkB,mBAAQ,OAQlB;AAPZ,qCAAuD;AAWnD,4FAXK,qBAAW,OAWL;AADX,8FAVkB,uBAAa,OAUlB;AARjB,2CAAqE;AAWjE,kGAXyB,6BAAiB,OAWzB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/message.d.ts b/node_modules/@ethersproject/hash/lib/message.d.ts new file mode 100644 index 0000000..613ccd3 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/message.d.ts @@ -0,0 +1,4 @@ +import { Bytes } from "@ethersproject/bytes"; +export declare const messagePrefix = "\u0019Ethereum Signed Message:\n"; +export declare function hashMessage(message: Bytes | string): string; +//# sourceMappingURL=message.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/message.d.ts.map b/node_modules/@ethersproject/hash/lib/message.d.ts.map new file mode 100644 index 0000000..abbe140 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/message.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src.ts/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAU,MAAM,sBAAsB,CAAC;AAIrD,eAAO,MAAM,aAAa,qCAAmC,CAAC;AAE9D,wBAAgB,WAAW,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAO3D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/message.js b/node_modules/@ethersproject/hash/lib/message.js new file mode 100644 index 0000000..f193110 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/message.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hashMessage = exports.messagePrefix = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var keccak256_1 = require("@ethersproject/keccak256"); +var strings_1 = require("@ethersproject/strings"); +exports.messagePrefix = "\x19Ethereum Signed Message:\n"; +function hashMessage(message) { + if (typeof (message) === "string") { + message = (0, strings_1.toUtf8Bytes)(message); + } + return (0, keccak256_1.keccak256)((0, bytes_1.concat)([ + (0, strings_1.toUtf8Bytes)(exports.messagePrefix), + (0, strings_1.toUtf8Bytes)(String(message.length)), + message + ])); +} +exports.hashMessage = hashMessage; +//# sourceMappingURL=message.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/message.js.map b/node_modules/@ethersproject/hash/lib/message.js.map new file mode 100644 index 0000000..dae70cd --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/message.js.map @@ -0,0 +1 @@ +{"version":3,"file":"message.js","sourceRoot":"","sources":["../src.ts/message.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AACrD,sDAAqD;AACrD,kDAAqD;AAExC,QAAA,aAAa,GAAG,gCAAgC,CAAC;AAE9D,SAAgB,WAAW,CAAC,OAAuB;IAC/C,IAAI,OAAM,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE;QAAE,OAAO,GAAG,IAAA,qBAAW,EAAC,OAAO,CAAC,CAAC;KAAE;IACrE,OAAO,IAAA,qBAAS,EAAC,IAAA,cAAM,EAAC;QACpB,IAAA,qBAAW,EAAC,qBAAa,CAAC;QAC1B,IAAA,qBAAW,EAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,OAAO;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AAPD,kCAOC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/namehash.d.ts b/node_modules/@ethersproject/hash/lib/namehash.d.ts new file mode 100644 index 0000000..2a5356a --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/namehash.d.ts @@ -0,0 +1,3 @@ +export declare function isValidName(name: string): boolean; +export declare function namehash(name: string): string; +//# sourceMappingURL=namehash.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/namehash.d.ts.map b/node_modules/@ethersproject/hash/lib/namehash.d.ts.map new file mode 100644 index 0000000..949c61a --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/namehash.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../src.ts/namehash.ts"],"names":[],"mappings":"AAaA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWjD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoB7C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/namehash.js b/node_modules/@ethersproject/hash/lib/namehash.js new file mode 100644 index 0000000..3142292 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/namehash.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.namehash = exports.isValidName = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var strings_1 = require("@ethersproject/strings"); +var keccak256_1 = require("@ethersproject/keccak256"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var Zeros = new Uint8Array(32); +Zeros.fill(0); +var Partition = new RegExp("^((.*)\\.)?([^.]+)$"); +function isValidName(name) { + try { + var comps = name.split("."); + for (var i = 0; i < comps.length; i++) { + if ((0, strings_1.nameprep)(comps[i]).length === 0) { + throw new Error("empty"); + } + } + return true; + } + catch (error) { } + return false; +} +exports.isValidName = isValidName; +function namehash(name) { + /* istanbul ignore if */ + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid ENS name; not a string", "name", name); + } + var current = name; + var result = Zeros; + while (current.length) { + var partition = current.match(Partition); + if (partition == null || partition[2] === "") { + logger.throwArgumentError("invalid ENS address; missing component", "name", name); + } + var label = (0, strings_1.toUtf8Bytes)((0, strings_1.nameprep)(partition[3])); + result = (0, keccak256_1.keccak256)((0, bytes_1.concat)([result, (0, keccak256_1.keccak256)(label)])); + current = partition[2] || ""; + } + return (0, bytes_1.hexlify)(result); +} +exports.namehash = namehash; +//# sourceMappingURL=namehash.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/namehash.js.map b/node_modules/@ethersproject/hash/lib/namehash.js.map new file mode 100644 index 0000000..2962222 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/namehash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../src.ts/namehash.ts"],"names":[],"mappings":";;;AAAA,8CAAuD;AACvD,kDAA+D;AAC/D,sDAAqD;AAErD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,IAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,IAAM,SAAS,GAAG,IAAI,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAEpD,SAAgB,WAAW,CAAC,IAAY;IACpC,IAAI;QACA,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,IAAA,kBAAQ,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;gBACjC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAA;aAC3B;SACJ;QACD,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,KAAK,EAAE,GAAG;IACnB,OAAO,KAAK,CAAC;AACjB,CAAC;AAXD,kCAWC;AAED,SAAgB,QAAQ,CAAC,IAAY;IACjC,wBAAwB;IACxB,IAAI,OAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE;QAC3B,MAAM,CAAC,kBAAkB,CAAC,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KAC7E;IAED,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,MAAM,GAAwB,KAAK,CAAC;IACxC,OAAO,OAAO,CAAC,MAAM,EAAE;QACnB,IAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;YAC1C,MAAM,CAAC,kBAAkB,CAAC,wCAAwC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;SACrF;QACD,IAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,IAAA,kBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,GAAG,IAAA,qBAAS,EAAC,IAAA,cAAM,EAAC,CAAC,MAAM,EAAE,IAAA,qBAAS,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEvD,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KAChC;IAED,OAAO,IAAA,eAAO,EAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AApBD,4BAoBC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/typed-data.d.ts b/node_modules/@ethersproject/hash/lib/typed-data.d.ts new file mode 100644 index 0000000..0e07dfd --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/typed-data.d.ts @@ -0,0 +1,29 @@ +import { TypedDataDomain, TypedDataField } from "@ethersproject/abstract-signer"; +export declare class TypedDataEncoder { + readonly primaryType: string; + readonly types: Record>; + readonly _encoderCache: Record string>; + readonly _types: Record; + constructor(types: Record>); + getEncoder(type: string): (value: any) => string; + _getEncoder(type: string): (value: any) => string; + encodeType(name: string): string; + encodeData(type: string, value: any): string; + hashStruct(name: string, value: Record): string; + encode(value: Record): string; + hash(value: Record): string; + _visit(type: string, value: any, callback: (type: string, data: any) => any): any; + visit(value: Record, callback: (type: string, data: any) => any): any; + static from(types: Record>): TypedDataEncoder; + static getPrimaryType(types: Record>): string; + static hashStruct(name: string, types: Record>, value: Record): string; + static hashDomain(domain: TypedDataDomain): string; + static encode(domain: TypedDataDomain, types: Record>, value: Record): string; + static hash(domain: TypedDataDomain, types: Record>, value: Record): string; + static resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ + domain: TypedDataDomain; + value: any; + }>; + static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any; +} +//# sourceMappingURL=typed-data.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/typed-data.d.ts.map b/node_modules/@ethersproject/hash/lib/typed-data.d.ts.map new file mode 100644 index 0000000..6854776 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/typed-data.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typed-data.d.ts","sourceRoot":"","sources":["../src.ts/typed-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAmJjF,qBAAa,gBAAgB;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;IAEtD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IAC/D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAgGxD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM;IAQhD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,C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AAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAQxH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;WAKzG,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IA0C9N,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG;CA2D5H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/typed-data.js b/node_modules/@ethersproject/hash/lib/typed-data.js new file mode 100644 index 0000000..e3e85db --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/typed-data.js @@ -0,0 +1,501 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypedDataEncoder = void 0; +var address_1 = require("@ethersproject/address"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var keccak256_1 = require("@ethersproject/keccak256"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var id_1 = require("./id"); +var padding = new Uint8Array(32); +padding.fill(0); +var NegativeOne = bignumber_1.BigNumber.from(-1); +var Zero = bignumber_1.BigNumber.from(0); +var One = bignumber_1.BigNumber.from(1); +var MaxUint256 = bignumber_1.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); +function hexPadRight(value) { + var bytes = (0, bytes_1.arrayify)(value); + var padOffset = bytes.length % 32; + if (padOffset) { + return (0, bytes_1.hexConcat)([bytes, padding.slice(padOffset)]); + } + return (0, bytes_1.hexlify)(bytes); +} +var hexTrue = (0, bytes_1.hexZeroPad)(One.toHexString(), 32); +var hexFalse = (0, bytes_1.hexZeroPad)(Zero.toHexString(), 32); +var domainFieldTypes = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" +}; +var domainFieldNames = [ + "name", "version", "chainId", "verifyingContract", "salt" +]; +function checkString(key) { + return function (value) { + if (typeof (value) !== "string") { + logger.throwArgumentError("invalid domain value for " + JSON.stringify(key), "domain." + key, value); + } + return value; + }; +} +var domainChecks = { + name: checkString("name"), + version: checkString("version"), + chainId: function (value) { + try { + return bignumber_1.BigNumber.from(value).toString(); + } + catch (error) { } + return logger.throwArgumentError("invalid domain value for \"chainId\"", "domain.chainId", value); + }, + verifyingContract: function (value) { + try { + return (0, address_1.getAddress)(value).toLowerCase(); + } + catch (error) { } + return logger.throwArgumentError("invalid domain value \"verifyingContract\"", "domain.verifyingContract", value); + }, + salt: function (value) { + try { + var bytes = (0, bytes_1.arrayify)(value); + if (bytes.length !== 32) { + throw new Error("bad length"); + } + return (0, bytes_1.hexlify)(bytes); + } + catch (error) { } + return logger.throwArgumentError("invalid domain value \"salt\"", "domain.salt", value); + } +}; +function getBaseEncoder(type) { + // intXX and uintXX + { + var match = type.match(/^(u?)int(\d*)$/); + if (match) { + var signed = (match[1] === ""); + var width = parseInt(match[2] || "256"); + if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) { + logger.throwArgumentError("invalid numeric width", "type", type); + } + var boundsUpper_1 = MaxUint256.mask(signed ? (width - 1) : width); + var boundsLower_1 = signed ? boundsUpper_1.add(One).mul(NegativeOne) : Zero; + return function (value) { + var v = bignumber_1.BigNumber.from(value); + if (v.lt(boundsLower_1) || v.gt(boundsUpper_1)) { + logger.throwArgumentError("value out-of-bounds for " + type, "value", value); + } + return (0, bytes_1.hexZeroPad)(v.toTwos(256).toHexString(), 32); + }; + } + } + // bytesXX + { + var match = type.match(/^bytes(\d+)$/); + if (match) { + var width_1 = parseInt(match[1]); + if (width_1 === 0 || width_1 > 32 || match[1] !== String(width_1)) { + logger.throwArgumentError("invalid bytes width", "type", type); + } + return function (value) { + var bytes = (0, bytes_1.arrayify)(value); + if (bytes.length !== width_1) { + logger.throwArgumentError("invalid length for " + type, "value", value); + } + return hexPadRight(value); + }; + } + } + switch (type) { + case "address": return function (value) { + return (0, bytes_1.hexZeroPad)((0, address_1.getAddress)(value), 32); + }; + case "bool": return function (value) { + return ((!value) ? hexFalse : hexTrue); + }; + case "bytes": return function (value) { + return (0, keccak256_1.keccak256)(value); + }; + case "string": return function (value) { + return (0, id_1.id)(value); + }; + } + return null; +} +function encodeType(name, fields) { + return name + "(" + fields.map(function (_a) { + var name = _a.name, type = _a.type; + return (type + " " + name); + }).join(",") + ")"; +} +var TypedDataEncoder = /** @class */ (function () { + function TypedDataEncoder(types) { + (0, properties_1.defineReadOnly)(this, "types", Object.freeze((0, properties_1.deepCopy)(types))); + (0, properties_1.defineReadOnly)(this, "_encoderCache", {}); + (0, properties_1.defineReadOnly)(this, "_types", {}); + // Link struct types to their direct child structs + var links = {}; + // Link structs to structs which contain them as a child + var parents = {}; + // Link all subtypes within a given struct + var subtypes = {}; + Object.keys(types).forEach(function (type) { + links[type] = {}; + parents[type] = []; + subtypes[type] = {}; + }); + var _loop_1 = function (name_1) { + var uniqueNames = {}; + types[name_1].forEach(function (field) { + // Check each field has a unique name + if (uniqueNames[field.name]) { + logger.throwArgumentError("duplicate variable name " + JSON.stringify(field.name) + " in " + JSON.stringify(name_1), "types", types); + } + uniqueNames[field.name] = true; + // Get the base type (drop any array specifiers) + var baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1]; + if (baseType === name_1) { + logger.throwArgumentError("circular type reference to " + JSON.stringify(baseType), "types", types); + } + // Is this a base encoding type? + var encoder = getBaseEncoder(baseType); + if (encoder) { + return; + } + if (!parents[baseType]) { + logger.throwArgumentError("unknown type " + JSON.stringify(baseType), "types", types); + } + // Add linkage + parents[baseType].push(name_1); + links[name_1][baseType] = true; + }); + }; + for (var name_1 in types) { + _loop_1(name_1); + } + // Deduce the primary type + var primaryTypes = Object.keys(parents).filter(function (n) { return (parents[n].length === 0); }); + if (primaryTypes.length === 0) { + logger.throwArgumentError("missing primary type", "types", types); + } + else if (primaryTypes.length > 1) { + logger.throwArgumentError("ambiguous primary types or unused types: " + primaryTypes.map(function (t) { return (JSON.stringify(t)); }).join(", "), "types", types); + } + (0, properties_1.defineReadOnly)(this, "primaryType", primaryTypes[0]); + // Check for circular type references + function checkCircular(type, found) { + if (found[type]) { + logger.throwArgumentError("circular type reference to " + JSON.stringify(type), "types", types); + } + found[type] = true; + Object.keys(links[type]).forEach(function (child) { + if (!parents[child]) { + return; + } + // Recursively check children + checkCircular(child, found); + // Mark all ancestors as having this decendant + Object.keys(found).forEach(function (subtype) { + subtypes[subtype][child] = true; + }); + }); + delete found[type]; + } + checkCircular(this.primaryType, {}); + // Compute each fully describe type + for (var name_2 in subtypes) { + var st = Object.keys(subtypes[name_2]); + st.sort(); + this._types[name_2] = encodeType(name_2, types[name_2]) + st.map(function (t) { return encodeType(t, types[t]); }).join(""); + } + } + TypedDataEncoder.prototype.getEncoder = function (type) { + var encoder = this._encoderCache[type]; + if (!encoder) { + encoder = this._encoderCache[type] = this._getEncoder(type); + } + return encoder; + }; + TypedDataEncoder.prototype._getEncoder = function (type) { + var _this = this; + // Basic encoder type (address, bool, uint256, etc) + { + var encoder = getBaseEncoder(type); + if (encoder) { + return encoder; + } + } + // Array + var match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + var subtype_1 = match[1]; + var subEncoder_1 = this.getEncoder(subtype_1); + var length_1 = parseInt(match[3]); + return function (value) { + if (length_1 >= 0 && value.length !== length_1) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + var result = value.map(subEncoder_1); + if (_this._types[subtype_1]) { + result = result.map(keccak256_1.keccak256); + } + return (0, keccak256_1.keccak256)((0, bytes_1.hexConcat)(result)); + }; + } + // Struct + var fields = this.types[type]; + if (fields) { + var encodedType_1 = (0, id_1.id)(this._types[type]); + return function (value) { + var values = fields.map(function (_a) { + var name = _a.name, type = _a.type; + var result = _this.getEncoder(type)(value[name]); + if (_this._types[type]) { + return (0, keccak256_1.keccak256)(result); + } + return result; + }); + values.unshift(encodedType_1); + return (0, bytes_1.hexConcat)(values); + }; + } + return logger.throwArgumentError("unknown type: " + type, "type", type); + }; + TypedDataEncoder.prototype.encodeType = function (name) { + var result = this._types[name]; + if (!result) { + logger.throwArgumentError("unknown type: " + JSON.stringify(name), "name", name); + } + return result; + }; + TypedDataEncoder.prototype.encodeData = function (type, value) { + return this.getEncoder(type)(value); + }; + TypedDataEncoder.prototype.hashStruct = function (name, value) { + return (0, keccak256_1.keccak256)(this.encodeData(name, value)); + }; + TypedDataEncoder.prototype.encode = function (value) { + return this.encodeData(this.primaryType, value); + }; + TypedDataEncoder.prototype.hash = function (value) { + return this.hashStruct(this.primaryType, value); + }; + TypedDataEncoder.prototype._visit = function (type, value, callback) { + var _this = this; + // Basic encoder type (address, bool, uint256, etc) + { + var encoder = getBaseEncoder(type); + if (encoder) { + return callback(type, value); + } + } + // Array + var match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + var subtype_2 = match[1]; + var length_2 = parseInt(match[3]); + if (length_2 >= 0 && value.length !== length_2) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + return value.map(function (v) { return _this._visit(subtype_2, v, callback); }); + } + // Struct + var fields = this.types[type]; + if (fields) { + return fields.reduce(function (accum, _a) { + var name = _a.name, type = _a.type; + accum[name] = _this._visit(type, value[name], callback); + return accum; + }, {}); + } + return logger.throwArgumentError("unknown type: " + type, "type", type); + }; + TypedDataEncoder.prototype.visit = function (value, callback) { + return this._visit(this.primaryType, value, callback); + }; + TypedDataEncoder.from = function (types) { + return new TypedDataEncoder(types); + }; + TypedDataEncoder.getPrimaryType = function (types) { + return TypedDataEncoder.from(types).primaryType; + }; + TypedDataEncoder.hashStruct = function (name, types, value) { + return TypedDataEncoder.from(types).hashStruct(name, value); + }; + TypedDataEncoder.hashDomain = function (domain) { + var domainFields = []; + for (var name_3 in domain) { + var type = domainFieldTypes[name_3]; + if (!type) { + logger.throwArgumentError("invalid typed-data domain key: " + JSON.stringify(name_3), "domain", domain); + } + domainFields.push({ name: name_3, type: type }); + } + domainFields.sort(function (a, b) { + return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name); + }); + return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); + }; + TypedDataEncoder.encode = function (domain, types, value) { + return (0, bytes_1.hexConcat)([ + "0x1901", + TypedDataEncoder.hashDomain(domain), + TypedDataEncoder.from(types).hash(value) + ]); + }; + TypedDataEncoder.hash = function (domain, types, value) { + return (0, keccak256_1.keccak256)(TypedDataEncoder.encode(domain, types, value)); + }; + // Replaces all address types with ENS names with their looked up address + TypedDataEncoder.resolveNames = function (domain, types, value, resolveName) { + return __awaiter(this, void 0, void 0, function () { + var ensCache, encoder, _a, _b, _i, name_4, _c, _d; + return __generator(this, function (_e) { + switch (_e.label) { + case 0: + // Make a copy to isolate it from the object passed in + domain = (0, properties_1.shallowCopy)(domain); + ensCache = {}; + // Do we need to look up the domain's verifyingContract? + if (domain.verifyingContract && !(0, bytes_1.isHexString)(domain.verifyingContract, 20)) { + ensCache[domain.verifyingContract] = "0x"; + } + encoder = TypedDataEncoder.from(types); + // Get a list of all the addresses + encoder.visit(value, function (type, value) { + if (type === "address" && !(0, bytes_1.isHexString)(value, 20)) { + ensCache[value] = "0x"; + } + return value; + }); + _a = []; + for (_b in ensCache) + _a.push(_b); + _i = 0; + _e.label = 1; + case 1: + if (!(_i < _a.length)) return [3 /*break*/, 4]; + name_4 = _a[_i]; + _c = ensCache; + _d = name_4; + return [4 /*yield*/, resolveName(name_4)]; + case 2: + _c[_d] = _e.sent(); + _e.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: + // Replace the domain verifyingContract if needed + if (domain.verifyingContract && ensCache[domain.verifyingContract]) { + domain.verifyingContract = ensCache[domain.verifyingContract]; + } + // Replace all ENS names with their address + value = encoder.visit(value, function (type, value) { + if (type === "address" && ensCache[value]) { + return ensCache[value]; + } + return value; + }); + return [2 /*return*/, { domain: domain, value: value }]; + } + }); + }); + }; + TypedDataEncoder.getPayload = function (domain, types, value) { + // Validate the domain fields + TypedDataEncoder.hashDomain(domain); + // Derive the EIP712Domain Struct reference type + var domainValues = {}; + var domainTypes = []; + domainFieldNames.forEach(function (name) { + var value = domain[name]; + if (value == null) { + return; + } + domainValues[name] = domainChecks[name](value); + domainTypes.push({ name: name, type: domainFieldTypes[name] }); + }); + var encoder = TypedDataEncoder.from(types); + var typesWithDomain = (0, properties_1.shallowCopy)(types); + if (typesWithDomain.EIP712Domain) { + logger.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types); + } + else { + typesWithDomain.EIP712Domain = domainTypes; + } + // Validate the data structures and types + encoder.encode(value); + return { + types: typesWithDomain, + domain: domainValues, + primaryType: encoder.primaryType, + message: encoder.visit(value, function (type, value) { + // bytes + if (type.match(/^bytes(\d*)/)) { + return (0, bytes_1.hexlify)((0, bytes_1.arrayify)(value)); + } + // uint or int + if (type.match(/^u?int/)) { + return bignumber_1.BigNumber.from(value).toString(); + } + switch (type) { + case "address": + return value.toLowerCase(); + case "bool": + return !!value; + case "string": + if (typeof (value) !== "string") { + logger.throwArgumentError("invalid string", "value", value); + } + return value; + } + return logger.throwArgumentError("unsupported type", "type", type); + }) + }; + }; + return TypedDataEncoder; +}()); +exports.TypedDataEncoder = TypedDataEncoder; +//# sourceMappingURL=typed-data.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/lib/typed-data.js.map b/node_modules/@ethersproject/hash/lib/typed-data.js.map new file mode 100644 index 0000000..40e1f29 --- /dev/null +++ b/node_modules/@ethersproject/hash/lib/typed-data.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typed-data.js","sourceRoot":"","sources":["../src.ts/typed-data.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoD;AACpD,sDAAmE;AACnE,8CAAwG;AACxG,sDAAqD;AACrD,wDAAkF;AAElF,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,2BAA0B;AAE1B,IAAM,OAAO,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhB,IAAM,WAAW,GAAc,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,IAAM,IAAI,GAAc,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC1C,IAAM,GAAG,GAAc,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACzC,IAAM,UAAU,GAAc,qBAAS,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;AAEnH,SAAS,WAAW,CAAC,KAAgB;IACjC,IAAM,KAAK,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC9B,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,EAAE,CAAA;IACnC,IAAI,SAAS,EAAE;QACX,OAAO,IA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AE;oBACtB,OAAO,qBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;iBAC3C;gBAED,QAAQ,IAAI,EAAE;oBACV,KAAK,SAAS;wBACV,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;oBAC/B,KAAK,MAAM;wBACP,OAAO,CAAC,CAAC,KAAK,CAAC;oBACnB,KAAK,QAAQ;wBACT,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,EAAE;4BAC5B,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;yBAC/D;wBACD,OAAO,KAAK,CAAC;iBACpB;gBAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACvE,CAAC,CAAC;SACL,CAAC;IACN,CAAC;IACL,uBAAC;AAAD,CAAC,AAtWD,IAsWC;AAtWY,4CAAgB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hash/package.json b/node_modules/@ethersproject/hash/package.json new file mode 100644 index 0000000..20f3db0 --- /dev/null +++ b/node_modules/@ethersproject/hash/package.json @@ -0,0 +1,49 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + }, + "description": "Hash utility functions for Ethereum.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/hash", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/hash", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x7d9a6d1808386f7963885e757b739ee981616a16bc1f479d43278be9611e9cc1", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/hash/src.ts/_version.ts b/node_modules/@ethersproject/hash/src.ts/_version.ts new file mode 100644 index 0000000..ff8cbaa --- /dev/null +++ b/node_modules/@ethersproject/hash/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "hash/5.5.0"; diff --git a/node_modules/@ethersproject/hash/src.ts/id.ts b/node_modules/@ethersproject/hash/src.ts/id.ts new file mode 100644 index 0000000..13c71d5 --- /dev/null +++ b/node_modules/@ethersproject/hash/src.ts/id.ts @@ -0,0 +1,6 @@ +import { keccak256 } from "@ethersproject/keccak256"; +import { toUtf8Bytes } from "@ethersproject/strings"; + +export function id(text: string): string { + return keccak256(toUtf8Bytes(text)); +} diff --git a/node_modules/@ethersproject/hash/src.ts/index.ts b/node_modules/@ethersproject/hash/src.ts/index.ts new file mode 100644 index 0000000..ec420e5 --- /dev/null +++ b/node_modules/@ethersproject/hash/src.ts/index.ts @@ -0,0 +1,19 @@ +"use strict"; + +import { id } from "./id"; +import { isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; + +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; + +export { + id, + + namehash, + isValidName, + + messagePrefix, + hashMessage, + + _TypedDataEncoder, +} diff --git a/node_modules/@ethersproject/hash/src.ts/message.ts b/node_modules/@ethersproject/hash/src.ts/message.ts new file mode 100644 index 0000000..f5650a4 --- /dev/null +++ b/node_modules/@ethersproject/hash/src.ts/message.ts @@ -0,0 +1,15 @@ +import { Bytes, concat } from "@ethersproject/bytes"; +import { keccak256 } from "@ethersproject/keccak256"; +import { toUtf8Bytes } from "@ethersproject/strings"; + +export const messagePrefix = "\x19Ethereum Signed Message:\n"; + +export function hashMessage(message: Bytes | string): string { + if (typeof(message) === "string") { message = toUtf8Bytes(message); } + return keccak256(concat([ + toUtf8Bytes(messagePrefix), + toUtf8Bytes(String(message.length)), + message + ])); +} + diff --git a/node_modules/@ethersproject/hash/src.ts/namehash.ts b/node_modules/@ethersproject/hash/src.ts/namehash.ts new file mode 100644 index 0000000..856a0be --- /dev/null +++ b/node_modules/@ethersproject/hash/src.ts/namehash.ts @@ -0,0 +1,48 @@ +import { concat, hexlify } from "@ethersproject/bytes"; +import { nameprep, toUtf8Bytes } from "@ethersproject/strings"; +import { keccak256 } from "@ethersproject/keccak256"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +const Zeros = new Uint8Array(32); +Zeros.fill(0); + +const Partition = new RegExp("^((.*)\\.)?([^.]+)$"); + +export function isValidName(name: string): boolean { + try { + const comps = name.split("."); + for (let i = 0; i < comps.length; i++) { + if (nameprep(comps[i]).length === 0) { + throw new Error("empty") + } + } + return true; + } catch (error) { } + return false; +} + +export function namehash(name: string): string { + /* istanbul ignore if */ + if (typeof(name) !== "string") { + logger.throwArgumentError("invalid ENS name; not a string", "name", name); + } + + let current = name; + let result: string | Uint8Array = Zeros; + while (current.length) { + const partition = current.match(Partition); + if (partition == null || partition[2] === "") { + logger.throwArgumentError("invalid ENS address; missing component", "name", name); + } + const label = toUtf8Bytes(nameprep(partition[3])); + result = keccak256(concat([result, keccak256(label)])); + + current = partition[2] || ""; + } + + return hexlify(result); +} + diff --git a/node_modules/@ethersproject/hash/src.ts/typed-data.ts b/node_modules/@ethersproject/hash/src.ts/typed-data.ts new file mode 100644 index 0000000..a1758ec --- /dev/null +++ b/node_modules/@ethersproject/hash/src.ts/typed-data.ts @@ -0,0 +1,507 @@ +import { TypedDataDomain, TypedDataField } from "@ethersproject/abstract-signer"; +import { getAddress } from "@ethersproject/address"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { arrayify, BytesLike, hexConcat, hexlify, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { keccak256 } from "@ethersproject/keccak256"; +import { deepCopy, defineReadOnly, shallowCopy } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { id } from "./id"; + +const padding = new Uint8Array(32); +padding.fill(0); + +const NegativeOne: BigNumber = BigNumber.from(-1); +const Zero: BigNumber = BigNumber.from(0); +const One: BigNumber = BigNumber.from(1); +const MaxUint256: BigNumber = BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + +function hexPadRight(value: BytesLike) { + const bytes = arrayify(value); + const padOffset = bytes.length % 32 + if (padOffset) { + return hexConcat([ bytes, padding.slice(padOffset) ]); + } + return hexlify(bytes); +} + +const hexTrue = hexZeroPad(One.toHexString(), 32); +const hexFalse = hexZeroPad(Zero.toHexString(), 32); + +const domainFieldTypes: Record = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" +}; + +const domainFieldNames: Array = [ + "name", "version", "chainId", "verifyingContract", "salt" +]; + +function checkString(key: string): (value: any) => string { + return function (value: any){ + if (typeof(value) !== "string") { + logger.throwArgumentError(`invalid domain value for ${ JSON.stringify(key) }`, `domain.${ key }`, value); + } + return value; + } +} + +const domainChecks: Record any> = { + name: checkString("name"), + version: checkString("version"), + chainId: function(value: any) { + try { + return BigNumber.from(value).toString() + } catch (error) { } + return logger.throwArgumentError(`invalid domain value for "chainId"`, "domain.chainId", value); + }, + verifyingContract: function(value: any) { + try { + return getAddress(value).toLowerCase(); + } catch (error) { } + return logger.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value); + }, + salt: function(value: any) { + try { + const bytes = arrayify(value); + if (bytes.length !== 32) { throw new Error("bad length"); } + return hexlify(bytes); + } catch (error) { } + return logger.throwArgumentError(`invalid domain value "salt"`, "domain.salt", value); + } +} + +function getBaseEncoder(type: string): (value: any) => string { + // intXX and uintXX + { + const match = type.match(/^(u?)int(\d*)$/); + if (match) { + const signed = (match[1] === ""); + + const width = parseInt(match[2] || "256"); + if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) { + logger.throwArgumentError("invalid numeric width", "type", type); + } + + const boundsUpper = MaxUint256.mask(signed ? (width - 1): width); + const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne): Zero; + + return function(value: BigNumberish) { + const v = BigNumber.from(value); + + if (v.lt(boundsLower) || v.gt(boundsUpper)) { + logger.throwArgumentError(`value out-of-bounds for ${ type }`, "value", value); + } + + return hexZeroPad(v.toTwos(256).toHexString(), 32); + }; + } + } + + // bytesXX + { + const match = type.match(/^bytes(\d+)$/); + if (match) { + const width = parseInt(match[1]); + if (width === 0 || width > 32 || match[1] !== String(width)) { + logger.throwArgumentError("invalid bytes width", "type", type); + } + + return function(value: BytesLike) { + const bytes = arrayify(value); + if (bytes.length !== width) { + logger.throwArgumentError(`invalid length for ${ type }`, "value", value); + } + return hexPadRight(value); + }; + } + } + + switch (type) { + case "address": return function(value: string) { + return hexZeroPad(getAddress(value), 32); + }; + case "bool": return function(value: boolean) { + return ((!value) ? hexFalse: hexTrue); + }; + case "bytes": return function(value: BytesLike) { + return keccak256(value); + }; + case "string": return function(value: string) { + return id(value); + }; + } + + return null; +} + +function encodeType(name: string, fields: Array): string { + return `${ name }(${ fields.map(({ name, type }) => (type + " " + name)).join(",") })`; +} + +export class TypedDataEncoder { + readonly primaryType: string; + readonly types: Record>; + + readonly _encoderCache: Record string>; + readonly _types: Record; + + constructor(types: Record>) { + defineReadOnly(this, "types", Object.freeze(deepCopy(types))); + + defineReadOnly(this, "_encoderCache", { }); + defineReadOnly(this, "_types", { }); + + // Link struct types to their direct child structs + const links: Record> = { }; + + // Link structs to structs which contain them as a child + const parents: Record> = { }; + + // Link all subtypes within a given struct + const subtypes: Record> = { }; + + Object.keys(types).forEach((type) => { + links[type] = { }; + parents[type] = [ ]; + subtypes[type] = { } + }); + + for (const name in types) { + + const uniqueNames: Record = { }; + + types[name].forEach((field) => { + + // Check each field has a unique name + if (uniqueNames[field.name]) { + logger.throwArgumentError(`duplicate variable name ${ JSON.stringify(field.name) } in ${ JSON.stringify(name) }`, "types", types); + } + uniqueNames[field.name] = true; + + // Get the base type (drop any array specifiers) + const baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1]; + if (baseType === name) { + logger.throwArgumentError(`circular type reference to ${ JSON.stringify(baseType) }`, "types", types); + } + + // Is this a base encoding type? + const encoder = getBaseEncoder(baseType); + if (encoder) { return ;} + + if (!parents[baseType]) { + logger.throwArgumentError(`unknown type ${ JSON.stringify(baseType) }`, "types", types); + } + + // Add linkage + parents[baseType].push(name); + links[name][baseType] = true; + }); + } + + // Deduce the primary type + const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0)); + + if (primaryTypes.length === 0) { + logger.throwArgumentError("missing primary type", "types", types); + } else if (primaryTypes.length > 1) { + logger.throwArgumentError(`ambiguous primary types or unused types: ${ primaryTypes.map((t) => (JSON.stringify(t))).join(", ") }`, "types", types); + } + + defineReadOnly(this, "primaryType", primaryTypes[0]); + + // Check for circular type references + function checkCircular(type: string, found: Record) { + if (found[type]) { + logger.throwArgumentError(`circular type reference to ${ JSON.stringify(type) }`, "types", types); + } + + found[type] = true; + + Object.keys(links[type]).forEach((child) => { + if (!parents[child]) { return; } + + // Recursively check children + checkCircular(child, found); + + // Mark all ancestors as having this decendant + Object.keys(found).forEach((subtype) => { + subtypes[subtype][child] = true; + }); + }); + + delete found[type]; + } + checkCircular(this.primaryType, { }); + + // Compute each fully describe type + for (const name in subtypes) { + const st = Object.keys(subtypes[name]); + st.sort(); + this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(""); + } + } + + getEncoder(type: string): (value: any) => string { + let encoder = this._encoderCache[type]; + if (!encoder) { + encoder = this._encoderCache[type] = this._getEncoder(type); + } + return encoder; + } + + _getEncoder(type: string): (value: any) => string { + + // Basic encoder type (address, bool, uint256, etc) + { + const encoder = getBaseEncoder(type); + if (encoder) { return encoder; } + } + + // Array + const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + const subtype = match[1]; + const subEncoder = this.getEncoder(subtype); + const length = parseInt(match[3]); + return (value: Array) => { + if (length >= 0 && value.length !== length) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + + let result = value.map(subEncoder); + if (this._types[subtype]) { + result = result.map(keccak256); + } + + return keccak256(hexConcat(result)); + }; + } + + // Struct + const fields = this.types[type]; + if (fields) { + const encodedType = id(this._types[type]); + return (value: Record) => { + const values = fields.map(({ name, type }) => { + const result = this.getEncoder(type)(value[name]); + if (this._types[type]) { return keccak256(result); } + return result; + }); + values.unshift(encodedType); + return hexConcat(values); + } + } + + return logger.throwArgumentError(`unknown type: ${ type }`, "type", type); + } + + encodeType(name: string): string { + const result = this._types[name]; + if (!result) { + logger.throwArgumentError(`unknown type: ${ JSON.stringify(name) }`, "name", name); + } + return result; + } + + encodeData(type: string, value: any): string { + return this.getEncoder(type)(value); + } + + hashStruct(name: string, value: Record): string { + return keccak256(this.encodeData(name, value)); + } + + encode(value: Record): string { + return this.encodeData(this.primaryType, value); + } + + hash(value: Record): string { + return this.hashStruct(this.primaryType, value); + } + + _visit(type: string, value: any, callback: (type: string, data: any) => any): any { + // Basic encoder type (address, bool, uint256, etc) + { + const encoder = getBaseEncoder(type); + if (encoder) { return callback(type, value); } + } + + // Array + const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + const subtype = match[1]; + const length = parseInt(match[3]); + if (length >= 0 && value.length !== length) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + return value.map((v: any) => this._visit(subtype, v, callback)); + } + + // Struct + const fields = this.types[type]; + if (fields) { + return fields.reduce((accum, { name, type }) => { + accum[name] = this._visit(type, value[name], callback); + return accum; + }, >{}); + } + + return logger.throwArgumentError(`unknown type: ${ type }`, "type", type); + } + + visit(value: Record, callback: (type: string, data: any) => any): any { + return this._visit(this.primaryType, value, callback); + } + + static from(types: Record>): TypedDataEncoder { + return new TypedDataEncoder(types); + } + + static getPrimaryType(types: Record>): string { + return TypedDataEncoder.from(types).primaryType; + } + + static hashStruct(name: string, types: Record>, value: Record): string { + return TypedDataEncoder.from(types).hashStruct(name, value); + } + + static hashDomain(domain: TypedDataDomain): string { + const domainFields: Array = [ ]; + for (const name in domain) { + const type = domainFieldTypes[name]; + if (!type) { + logger.throwArgumentError(`invalid typed-data domain key: ${ JSON.stringify(name) }`, "domain", domain); + } + domainFields.push({ name, type }); + } + + domainFields.sort((a, b) => { + return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name); + }); + + return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); + } + + static encode(domain: TypedDataDomain, types: Record>, value: Record): string { + return hexConcat([ + "0x1901", + TypedDataEncoder.hashDomain(domain), + TypedDataEncoder.from(types).hash(value) + ]); + } + + static hash(domain: TypedDataDomain, types: Record>, value: Record): string { + return keccak256(TypedDataEncoder.encode(domain, types, value)); + } + + // Replaces all address types with ENS names with their looked up address + static async resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ domain: TypedDataDomain, value: any }> { + // Make a copy to isolate it from the object passed in + domain = shallowCopy(domain); + + // Look up all ENS names + const ensCache: Record = { }; + + // Do we need to look up the domain's verifyingContract? + if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) { + ensCache[domain.verifyingContract] = "0x"; + } + + // We are going to use the encoder to visit all the base values + const encoder = TypedDataEncoder.from(types); + + // Get a list of all the addresses + encoder.visit(value, (type: string, value: any) => { + if (type === "address" && !isHexString(value, 20)) { + ensCache[value] = "0x"; + } + return value; + }); + + // Lookup each name + for (const name in ensCache) { + ensCache[name] = await resolveName(name); + } + + // Replace the domain verifyingContract if needed + if (domain.verifyingContract && ensCache[domain.verifyingContract]) { + domain.verifyingContract = ensCache[domain.verifyingContract]; + } + + // Replace all ENS names with their address + value = encoder.visit(value, (type: string, value: any) => { + if (type === "address" && ensCache[value]) { return ensCache[value]; } + return value; + }); + + return { domain, value }; + } + + static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any { + // Validate the domain fields + TypedDataEncoder.hashDomain(domain); + + // Derive the EIP712Domain Struct reference type + const domainValues: Record = { }; + const domainTypes: Array<{ name: string, type:string }> = [ ]; + + domainFieldNames.forEach((name) => { + const value = (domain)[name]; + if (value == null) { return; } + domainValues[name] = domainChecks[name](value); + domainTypes.push({ name, type: domainFieldTypes[name] }); + }); + + const encoder = TypedDataEncoder.from(types); + + const typesWithDomain = shallowCopy(types); + if (typesWithDomain.EIP712Domain) { + logger.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types); + } else { + typesWithDomain.EIP712Domain = domainTypes; + } + + // Validate the data structures and types + encoder.encode(value); + + return { + types: typesWithDomain, + domain: domainValues, + primaryType: encoder.primaryType, + message: encoder.visit(value, (type: string, value: any) => { + + // bytes + if (type.match(/^bytes(\d*)/)) { + return hexlify(arrayify(value)); + } + + // uint or int + if (type.match(/^u?int/)) { + return BigNumber.from(value).toString(); + } + + switch (type) { + case "address": + return value.toLowerCase(); + case "bool": + return !!value; + case "string": + if (typeof(value) !== "string") { + logger.throwArgumentError(`invalid string`, "value", value); + } + return value; + } + + return logger.throwArgumentError("unsupported type", "type", type); + }) + }; + } +} + diff --git a/node_modules/@ethersproject/hdnode/LICENSE.md b/node_modules/@ethersproject/hdnode/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/hdnode/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/hdnode/README.md b/node_modules/@ethersproject/hdnode/README.md new file mode 100644 index 0000000..f61ba72 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/README.md @@ -0,0 +1,40 @@ +Hierarchal Deterministic Utilities (BIP32) +========================================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible computing, deriving, encoding and decoding Hierarchal-Deterministic +private keys. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hdnode/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + HDNode, + + defaultPath, + + mnemonicToSeed, + mnemonicToEntropy, + entropyToMnemonic, + isValidMnemonic, + + // Types + + Mnemonic + +} = require("@ethersproject/hdnode"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts b/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts new file mode 100644 index 0000000..68ee91b --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hdnode/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/_version.js b/node_modules/@ethersproject/hdnode/lib.esm/_version.js new file mode 100644 index 0000000..e37eac5 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "hdnode/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/_version.js.map b/node_modules/@ethersproject/hdnode/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts b/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts new file mode 100644 index 0000000..23c283b --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts @@ -0,0 +1,43 @@ +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { BytesLike } from "@ethersproject/bytes"; +import { Wordlist } from "@ethersproject/wordlists"; +export declare const defaultPath = "m/44'/60'/0'/0/0"; +export interface Mnemonic { + readonly phrase: string; + readonly path: string; + readonly locale: string; +} +export declare class HDNode implements ExternallyOwnedAccount { + readonly privateKey: string; + readonly publicKey: string; + readonly fingerprint: string; + readonly parentFingerprint: string; + readonly address: string; + readonly mnemonic?: Mnemonic; + readonly path: string; + readonly chainCode: string; + readonly index: number; + readonly depth: number; + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string); + get extendedKey(): string; + neuter(): HDNode; + private _derive; + derivePath(path: string): HDNode; + static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode; + static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode; + static fromSeed(seed: BytesLike): HDNode; + static fromExtendedKey(extendedKey: string): HDNode; +} +export declare function mnemonicToSeed(mnemonic: string, password?: string): string; +export declare function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string; +export declare function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string; +export declare function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean; +export declare function getAccountPath(index: number): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts.map b/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts.map new file mode 100644 index 0000000..3581f97 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAY,SAAS,EAA6C,MAAM,sBAAsB,CAAC;AAQtG,OAAO,EAAE,QAAQ,EAAa,MAAM,0BAA0B,CAAC;AAkD/D,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAE9C,MAAM,WAAW,QAAQ;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,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AAG,MAAM;CA0BtD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAM1E;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAmCxF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CA0C1F;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAM9E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/index.js b/node_modules/@ethersproject/hdnode/lib.esm/index.js new file mode 100644 index 0000000..3e05cf9 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/index.js @@ -0,0 +1,331 @@ +"use strict"; +import { Base58 } from "@ethersproject/basex"; +import { arrayify, concat, hexDataSlice, hexZeroPad, hexlify } from "@ethersproject/bytes"; +import { BigNumber } from "@ethersproject/bignumber"; +import { toUtf8Bytes, UnicodeNormalizationForm } from "@ethersproject/strings"; +import { pbkdf2 } from "@ethersproject/pbkdf2"; +import { defineReadOnly } from "@ethersproject/properties"; +import { SigningKey } from "@ethersproject/signing-key"; +import { computeHmac, ripemd160, sha256, SupportedAlgorithm } from "@ethersproject/sha2"; +import { computeAddress } from "@ethersproject/transactions"; +import { wordlists } from "@ethersproject/wordlists"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +const N = BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); +// "Bitcoin seed" +const MasterSecret = toUtf8Bytes("Bitcoin seed"); +const HardenedBit = 0x80000000; +// Returns a byte with the MSB bits set +function getUpperMask(bits) { + return ((1 << bits) - 1) << (8 - bits); +} +// Returns a byte with the LSB bits set +function getLowerMask(bits) { + return (1 << bits) - 1; +} +function bytes32(value) { + return hexZeroPad(hexlify(value), 32); +} +function base58check(data) { + return Base58.encode(concat([data, hexDataSlice(sha256(sha256(data)), 0, 4)])); +} +function getWordlist(wordlist) { + if (wordlist == null) { + return wordlists["en"]; + } + if (typeof (wordlist) === "string") { + const words = wordlists[wordlist]; + if (words == null) { + logger.throwArgumentError("unknown locale", "wordlist", wordlist); + } + return words; + } + return wordlist; +} +const _constructorGuard = {}; +export const defaultPath = "m/44'/60'/0'/0/0"; +; +export class HDNode { + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + constructor(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonicOrPath) { + logger.checkNew(new.target, HDNode); + /* istanbul ignore if */ + if (constructorGuard !== _constructorGuard) { + throw new Error("HDNode constructor cannot be called directly"); + } + if (privateKey) { + const signingKey = new SigningKey(privateKey); + defineReadOnly(this, "privateKey", signingKey.privateKey); + defineReadOnly(this, "publicKey", signingKey.compressedPublicKey); + } + else { + defineReadOnly(this, "privateKey", null); + defineReadOnly(this, "publicKey", hexlify(publicKey)); + } + defineReadOnly(this, "parentFingerprint", parentFingerprint); + defineReadOnly(this, "fingerprint", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4)); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + defineReadOnly(this, "chainCode", chainCode); + defineReadOnly(this, "index", index); + defineReadOnly(this, "depth", depth); + if (mnemonicOrPath == null) { + // From a source that does not preserve the path (e.g. extended keys) + defineReadOnly(this, "mnemonic", null); + defineReadOnly(this, "path", null); + } + else if (typeof (mnemonicOrPath) === "string") { + // From a source that does not preserve the mnemonic (e.g. neutered) + defineReadOnly(this, "mnemonic", null); + defineReadOnly(this, "path", mnemonicOrPath); + } + else { + // From a fully qualified source + defineReadOnly(this, "mnemonic", mnemonicOrPath); + defineReadOnly(this, "path", mnemonicOrPath.path); + } + } + get extendedKey() { + // We only support the mainnet values for now, but if anyone needs + // testnet values, let me know. I believe current sentiment is that + // we should always use mainnet, and use BIP-44 to derive the network + // - Mainnet: public=0x0488B21E, private=0x0488ADE4 + // - Testnet: public=0x043587CF, private=0x04358394 + if (this.depth >= 256) { + throw new Error("Depth too large!"); + } + return base58check(concat([ + ((this.privateKey != null) ? "0x0488ADE4" : "0x0488B21E"), + hexlify(this.depth), + this.parentFingerprint, + hexZeroPad(hexlify(this.index), 4), + this.chainCode, + ((this.privateKey != null) ? concat(["0x00", this.privateKey]) : this.publicKey), + ])); + } + neuter() { + return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path); + } + _derive(index) { + if (index > 0xffffffff) { + throw new Error("invalid index - " + String(index)); + } + // Base path + let path = this.path; + if (path) { + path += "/" + (index & ~HardenedBit); + } + const data = new Uint8Array(37); + if (index & HardenedBit) { + if (!this.privateKey) { + throw new Error("cannot derive child of neutered node"); + } + // Data = 0x00 || ser_256(k_par) + data.set(arrayify(this.privateKey), 1); + // Hardened path + if (path) { + path += "'"; + } + } + else { + // Data = ser_p(point(k_par)) + data.set(arrayify(this.publicKey)); + } + // Data += ser_32(i) + for (let i = 24; i >= 0; i -= 8) { + data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); + } + const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data)); + const IL = I.slice(0, 32); + const IR = I.slice(32); + // The private key + let ki = null; + // The public key + let Ki = null; + if (this.privateKey) { + ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N)); + } + else { + const ek = new SigningKey(hexlify(IL)); + Ki = ek._addPoint(this.publicKey); + } + let mnemonicOrPath = path; + const srcMnemonic = this.mnemonic; + if (srcMnemonic) { + mnemonicOrPath = Object.freeze({ + phrase: srcMnemonic.phrase, + path: path, + locale: (srcMnemonic.locale || "en") + }); + } + return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath); + } + derivePath(path) { + const components = path.split("/"); + if (components.length === 0 || (components[0] === "m" && this.depth !== 0)) { + throw new Error("invalid path - " + path); + } + if (components[0] === "m") { + components.shift(); + } + let result = this; + for (let i = 0; i < components.length; i++) { + const component = components[i]; + if (component.match(/^[0-9]+'$/)) { + const index = parseInt(component.substring(0, component.length - 1)); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(HardenedBit + index); + } + else if (component.match(/^[0-9]+$/)) { + const index = parseInt(component); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(index); + } + else { + throw new Error("invalid path component - " + component); + } + } + return result; + } + static _fromSeed(seed, mnemonic) { + const seedArray = arrayify(seed); + if (seedArray.length < 16 || seedArray.length > 64) { + throw new Error("invalid seed"); + } + const I = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray)); + return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); + } + static fromMnemonic(mnemonic, password, wordlist) { + // If a locale name was passed in, find the associated wordlist + wordlist = getWordlist(wordlist); + // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid) + mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist); + return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), { + phrase: mnemonic, + path: "m", + locale: wordlist.locale + }); + } + static fromSeed(seed) { + return HDNode._fromSeed(seed, null); + } + static fromExtendedKey(extendedKey) { + const bytes = Base58.decode(extendedKey); + if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) { + logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } + const depth = bytes[4]; + const parentFingerprint = hexlify(bytes.slice(5, 9)); + const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16); + const chainCode = hexlify(bytes.slice(13, 45)); + const key = bytes.slice(45, 78); + switch (hexlify(bytes.slice(0, 4))) { + // Public Key + case "0x0488b21e": + case "0x043587cf": + return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null); + // Private Key + case "0x0488ade4": + case "0x04358394 ": + if (key[0] !== 0) { + break; + } + return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null); + } + return logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } +} +export function mnemonicToSeed(mnemonic, password) { + if (!password) { + password = ""; + } + const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD); + return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512"); +} +export function mnemonicToEntropy(mnemonic, wordlist) { + wordlist = getWordlist(wordlist); + logger.checkNormalize(); + const words = wordlist.split(mnemonic); + if ((words.length % 3) !== 0) { + throw new Error("invalid mnemonic"); + } + const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8))); + let offset = 0; + for (let i = 0; i < words.length; i++) { + let index = wordlist.getWordIndex(words[i].normalize("NFKD")); + if (index === -1) { + throw new Error("invalid mnemonic"); + } + for (let bit = 0; bit < 11; bit++) { + if (index & (1 << (10 - bit))) { + entropy[offset >> 3] |= (1 << (7 - (offset % 8))); + } + offset++; + } + } + const entropyBits = 32 * words.length / 3; + const checksumBits = words.length / 3; + const checksumMask = getUpperMask(checksumBits); + const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; + if (checksum !== (entropy[entropy.length - 1] & checksumMask)) { + throw new Error("invalid checksum"); + } + return hexlify(entropy.slice(0, entropyBits / 8)); +} +export function entropyToMnemonic(entropy, wordlist) { + wordlist = getWordlist(wordlist); + entropy = arrayify(entropy); + if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) { + throw new Error("invalid entropy"); + } + const indices = [0]; + let remainingBits = 11; + for (let i = 0; i < entropy.length; i++) { + // Consume the whole byte (with still more to go) + if (remainingBits > 8) { + indices[indices.length - 1] <<= 8; + indices[indices.length - 1] |= entropy[i]; + remainingBits -= 8; + // This byte will complete an 11-bit index + } + else { + indices[indices.length - 1] <<= remainingBits; + indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits); + // Start the next word + indices.push(entropy[i] & getLowerMask(8 - remainingBits)); + remainingBits += 3; + } + } + // Compute the checksum bits + const checksumBits = entropy.length / 4; + const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits); + // Shift the checksum into the word indices + indices[indices.length - 1] <<= checksumBits; + indices[indices.length - 1] |= (checksum >> (8 - checksumBits)); + return wordlist.join(indices.map((index) => wordlist.getWord(index))); +} +export function isValidMnemonic(mnemonic, wordlist) { + try { + mnemonicToEntropy(mnemonic, wordlist); + return true; + } + catch (error) { } + return false; +} +export function getAccountPath(index) { + if (typeof (index) !== "number" || index < 0 || index >= HardenedBit || index % 1) { + logger.throwArgumentError("invalid account index", "index", index); + } + return `m/44'/60'/${index}'/0/0`; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib.esm/index.js.map b/node_modules/@ethersproject/hdnode/lib.esm/index.js.map new file mode 100644 index 0000000..1457d7c --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAOb,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAa,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;A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;QACA,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,KAAK,EAAE,GAAG;IACnB,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa;IACxC,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,WAAW,IAAI,KAAK,GAAG,CAAC,EAAE;QAC9E,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KACtE;IACD,OAAO,aAAc,KAAM,OAAO,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/_version.d.ts b/node_modules/@ethersproject/hdnode/lib/_version.d.ts new file mode 100644 index 0000000..68ee91b --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hdnode/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/_version.d.ts.map b/node_modules/@ethersproject/hdnode/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/_version.js b/node_modules/@ethersproject/hdnode/lib/_version.js new file mode 100644 index 0000000..8610b97 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "hdnode/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/_version.js.map b/node_modules/@ethersproject/hdnode/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/index.d.ts b/node_modules/@ethersproject/hdnode/lib/index.d.ts new file mode 100644 index 0000000..23c283b --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/index.d.ts @@ -0,0 +1,43 @@ +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { BytesLike } from "@ethersproject/bytes"; +import { Wordlist } from "@ethersproject/wordlists"; +export declare const defaultPath = "m/44'/60'/0'/0/0"; +export interface Mnemonic { + readonly phrase: string; + readonly path: string; + readonly locale: string; +} +export declare class HDNode implements ExternallyOwnedAccount { + readonly privateKey: string; + readonly publicKey: string; + readonly fingerprint: string; + readonly parentFingerprint: string; + readonly address: string; + readonly mnemonic?: Mnemonic; + readonly path: string; + readonly chainCode: string; + readonly index: number; + readonly depth: number; + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string); + get extendedKey(): string; + neuter(): HDNode; + private _derive; + derivePath(path: string): HDNode; + static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode; + static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode; + static fromSeed(seed: BytesLike): HDNode; + static fromExtendedKey(extendedKey: string): HDNode; +} +export declare function mnemonicToSeed(mnemonic: string, password?: string): string; +export declare function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string; +export declare function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string; +export declare function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean; +export declare function getAccountPath(index: number): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/index.d.ts.map b/node_modules/@ethersproject/hdnode/lib/index.d.ts.map new file mode 100644 index 0000000..3581f97 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAY,SAAS,EAA6C,MAAM,sBAAsB,CAAC;AAQtG,OAAO,EAAE,QAAQ,EAAa,MAAM,0BAA0B,CAAC;AAkD/D,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAE9C,MAAM,WAAW,QAAQ;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,MAAO,YAAW,sBAAsB;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAEnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;gBACS,gBAAgB,EAAE,GAA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ib/index.js new file mode 100644 index 0000000..f073382 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/index.js @@ -0,0 +1,345 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAccountPath = exports.isValidMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.mnemonicToSeed = exports.HDNode = exports.defaultPath = void 0; +var basex_1 = require("@ethersproject/basex"); +var bytes_1 = require("@ethersproject/bytes"); +var bignumber_1 = require("@ethersproject/bignumber"); +var strings_1 = require("@ethersproject/strings"); +var pbkdf2_1 = require("@ethersproject/pbkdf2"); +var properties_1 = require("@ethersproject/properties"); +var signing_key_1 = require("@ethersproject/signing-key"); +var sha2_1 = require("@ethersproject/sha2"); +var transactions_1 = require("@ethersproject/transactions"); +var wordlists_1 = require("@ethersproject/wordlists"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var N = bignumber_1.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); +// "Bitcoin seed" +var MasterSecret = (0, strings_1.toUtf8Bytes)("Bitcoin seed"); +var HardenedBit = 0x80000000; +// Returns a byte with the MSB bits set +function getUpperMask(bits) { + return ((1 << bits) - 1) << (8 - bits); +} +// Returns a byte with the LSB bits set +function getLowerMask(bits) { + return (1 << bits) - 1; +} +function bytes32(value) { + return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32); +} +function base58check(data) { + return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)])); +} +function getWordlist(wordlist) { + if (wordlist == null) { + return wordlists_1.wordlists["en"]; + } + if (typeof (wordlist) === "string") { + var words = wordlists_1.wordlists[wordlist]; + if (words == null) { + logger.throwArgumentError("unknown locale", "wordlist", wordlist); + } + return words; + } + return wordlist; +} +var _constructorGuard = {}; +exports.defaultPath = "m/44'/60'/0'/0/0"; +; +var HDNode = /** @class */ (function () { + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + function HDNode(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonicOrPath) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, HDNode); + /* istanbul ignore if */ + if (constructorGuard !== _constructorGuard) { + throw new Error("HDNode constructor cannot be called directly"); + } + if (privateKey) { + var signingKey = new signing_key_1.SigningKey(privateKey); + (0, properties_1.defineReadOnly)(this, "privateKey", signingKey.privateKey); + (0, properties_1.defineReadOnly)(this, "publicKey", signingKey.compressedPublicKey); + } + else { + (0, properties_1.defineReadOnly)(this, "privateKey", null); + (0, properties_1.defineReadOnly)(this, "publicKey", (0, bytes_1.hexlify)(publicKey)); + } + (0, properties_1.defineReadOnly)(this, "parentFingerprint", parentFingerprint); + (0, properties_1.defineReadOnly)(this, "fingerprint", (0, bytes_1.hexDataSlice)((0, sha2_1.ripemd160)((0, sha2_1.sha256)(this.publicKey)), 0, 4)); + (0, properties_1.defineReadOnly)(this, "address", (0, transactions_1.computeAddress)(this.publicKey)); + (0, properties_1.defineReadOnly)(this, "chainCode", chainCode); + (0, properties_1.defineReadOnly)(this, "index", index); + (0, properties_1.defineReadOnly)(this, "depth", depth); + if (mnemonicOrPath == null) { + // From a source that does not preserve the path (e.g. extended keys) + (0, properties_1.defineReadOnly)(this, "mnemonic", null); + (0, properties_1.defineReadOnly)(this, "path", null); + } + else if (typeof (mnemonicOrPath) === "string") { + // From a source that does not preserve the mnemonic (e.g. neutered) + (0, properties_1.defineReadOnly)(this, "mnemonic", null); + (0, properties_1.defineReadOnly)(this, "path", mnemonicOrPath); + } + else { + // From a fully qualified source + (0, properties_1.defineReadOnly)(this, "mnemonic", mnemonicOrPath); + (0, properties_1.defineReadOnly)(this, "path", mnemonicOrPath.path); + } + } + Object.defineProperty(HDNode.prototype, "extendedKey", { + get: function () { + // We only support the mainnet values for now, but if anyone needs + // testnet values, let me know. I believe current sentiment is that + // we should always use mainnet, and use BIP-44 to derive the network + // - Mainnet: public=0x0488B21E, private=0x0488ADE4 + // - Testnet: public=0x043587CF, private=0x04358394 + if (this.depth >= 256) { + throw new Error("Depth too large!"); + } + return base58check((0, bytes_1.concat)([ + ((this.privateKey != null) ? "0x0488ADE4" : "0x0488B21E"), + (0, bytes_1.hexlify)(this.depth), + this.parentFingerprint, + (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(this.index), 4), + this.chainCode, + ((this.privateKey != null) ? (0, bytes_1.concat)(["0x00", this.privateKey]) : this.publicKey), + ])); + }, + enumerable: false, + configurable: true + }); + HDNode.prototype.neuter = function () { + return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path); + }; + HDNode.prototype._derive = function (index) { + if (index > 0xffffffff) { + throw new Error("invalid index - " + String(index)); + } + // Base path + var path = this.path; + if (path) { + path += "/" + (index & ~HardenedBit); + } + var data = new Uint8Array(37); + if (index & HardenedBit) { + if (!this.privateKey) { + throw new Error("cannot derive child of neutered node"); + } + // Data = 0x00 || ser_256(k_par) + data.set((0, bytes_1.arrayify)(this.privateKey), 1); + // Hardened path + if (path) { + path += "'"; + } + } + else { + // Data = ser_p(point(k_par)) + data.set((0, bytes_1.arrayify)(this.publicKey)); + } + // Data += ser_32(i) + for (var i = 24; i >= 0; i -= 8) { + data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); + } + var I = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, this.chainCode, data)); + var IL = I.slice(0, 32); + var IR = I.slice(32); + // The private key + var ki = null; + // The public key + var Ki = null; + if (this.privateKey) { + ki = bytes32(bignumber_1.BigNumber.from(IL).add(this.privateKey).mod(N)); + } + else { + var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL)); + Ki = ek._addPoint(this.publicKey); + } + var mnemonicOrPath = path; + var srcMnemonic = this.mnemonic; + if (srcMnemonic) { + mnemonicOrPath = Object.freeze({ + phrase: srcMnemonic.phrase, + path: path, + locale: (srcMnemonic.locale || "en") + }); + } + return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath); + }; + HDNode.prototype.derivePath = function (path) { + var components = path.split("/"); + if (components.length === 0 || (components[0] === "m" && this.depth !== 0)) { + throw new Error("invalid path - " + path); + } + if (components[0] === "m") { + components.shift(); + } + var result = this; + for (var i = 0; i < components.length; i++) { + var component = components[i]; + if (component.match(/^[0-9]+'$/)) { + var index = parseInt(component.substring(0, component.length - 1)); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(HardenedBit + index); + } + else if (component.match(/^[0-9]+$/)) { + var index = parseInt(component); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(index); + } + else { + throw new Error("invalid path component - " + component); + } + } + return result; + }; + HDNode._fromSeed = function (seed, mnemonic) { + var seedArray = (0, bytes_1.arrayify)(seed); + if (seedArray.length < 16 || seedArray.length > 64) { + throw new Error("invalid seed"); + } + var I = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, MasterSecret, seedArray)); + return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); + }; + HDNode.fromMnemonic = function (mnemonic, password, wordlist) { + // If a locale name was passed in, find the associated wordlist + wordlist = getWordlist(wordlist); + // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid) + mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist); + return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), { + phrase: mnemonic, + path: "m", + locale: wordlist.locale + }); + }; + HDNode.fromSeed = function (seed) { + return HDNode._fromSeed(seed, null); + }; + HDNode.fromExtendedKey = function (extendedKey) { + var bytes = basex_1.Base58.decode(extendedKey); + if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) { + logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } + var depth = bytes[4]; + var parentFingerprint = (0, bytes_1.hexlify)(bytes.slice(5, 9)); + var index = parseInt((0, bytes_1.hexlify)(bytes.slice(9, 13)).substring(2), 16); + var chainCode = (0, bytes_1.hexlify)(bytes.slice(13, 45)); + var key = bytes.slice(45, 78); + switch ((0, bytes_1.hexlify)(bytes.slice(0, 4))) { + // Public Key + case "0x0488b21e": + case "0x043587cf": + return new HDNode(_constructorGuard, null, (0, bytes_1.hexlify)(key), parentFingerprint, chainCode, index, depth, null); + // Private Key + case "0x0488ade4": + case "0x04358394 ": + if (key[0] !== 0) { + break; + } + return new HDNode(_constructorGuard, (0, bytes_1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null); + } + return logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + }; + return HDNode; +}()); +exports.HDNode = HDNode; +function mnemonicToSeed(mnemonic, password) { + if (!password) { + password = ""; + } + var salt = (0, strings_1.toUtf8Bytes)("mnemonic" + password, strings_1.UnicodeNormalizationForm.NFKD); + return (0, pbkdf2_1.pbkdf2)((0, strings_1.toUtf8Bytes)(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512"); +} +exports.mnemonicToSeed = mnemonicToSeed; +function mnemonicToEntropy(mnemonic, wordlist) { + wordlist = getWordlist(wordlist); + logger.checkNormalize(); + var words = wordlist.split(mnemonic); + if ((words.length % 3) !== 0) { + throw new Error("invalid mnemonic"); + } + var entropy = (0, bytes_1.arrayify)(new Uint8Array(Math.ceil(11 * words.length / 8))); + var offset = 0; + for (var i = 0; i < words.length; i++) { + var index = wordlist.getWordIndex(words[i].normalize("NFKD")); + if (index === -1) { + throw new Error("invalid mnemonic"); + } + for (var bit = 0; bit < 11; bit++) { + if (index & (1 << (10 - bit))) { + entropy[offset >> 3] |= (1 << (7 - (offset % 8))); + } + offset++; + } + } + var entropyBits = 32 * words.length / 3; + var checksumBits = words.length / 3; + var checksumMask = getUpperMask(checksumBits); + var checksum = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; + if (checksum !== (entropy[entropy.length - 1] & checksumMask)) { + throw new Error("invalid checksum"); + } + return (0, bytes_1.hexlify)(entropy.slice(0, entropyBits / 8)); +} +exports.mnemonicToEntropy = mnemonicToEntropy; +function entropyToMnemonic(entropy, wordlist) { + wordlist = getWordlist(wordlist); + entropy = (0, bytes_1.arrayify)(entropy); + if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) { + throw new Error("invalid entropy"); + } + var indices = [0]; + var remainingBits = 11; + for (var i = 0; i < entropy.length; i++) { + // Consume the whole byte (with still more to go) + if (remainingBits > 8) { + indices[indices.length - 1] <<= 8; + indices[indices.length - 1] |= entropy[i]; + remainingBits -= 8; + // This byte will complete an 11-bit index + } + else { + indices[indices.length - 1] <<= remainingBits; + indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits); + // Start the next word + indices.push(entropy[i] & getLowerMask(8 - remainingBits)); + remainingBits += 3; + } + } + // Compute the checksum bits + var checksumBits = entropy.length / 4; + var checksum = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy))[0] & getUpperMask(checksumBits); + // Shift the checksum into the word indices + indices[indices.length - 1] <<= checksumBits; + indices[indices.length - 1] |= (checksum >> (8 - checksumBits)); + return wordlist.join(indices.map(function (index) { return wordlist.getWord(index); })); +} +exports.entropyToMnemonic = entropyToMnemonic; +function isValidMnemonic(mnemonic, wordlist) { + try { + mnemonicToEntropy(mnemonic, wordlist); + return true; + } + catch (error) { } + return false; +} +exports.isValidMnemonic = isValidMnemonic; +function getAccountPath(index) { + if (typeof (index) !== "number" || index < 0 || index >= HardenedBit || index % 1) { + logger.throwArgumentError("invalid account index", "index", index); + } + return "m/44'/60'/" + index + "'/0/0"; +} +exports.getAccountPath = getAccountPath; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/lib/index.js.map b/node_modules/@ethersproject/hdnode/lib/index.js.map new file mode 100644 index 0000000..709525c --- /dev/null +++ b/node_modules/@ethersproject/hdnode/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAOb,8CAA8C;AAC9C,8CAAsG;AACtG,sDAAqD;AACrD,kDAA+E;AAC/E,gDAA+C;AAC/C,wDAA2D;AAC3D,0DAAwD;AACxD,4CAAyF;AACzF,4DAA6D;AAC7D,sDAA+D;AAE/D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,IAAM,CAAC,GAAG,qBAAS,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;AAG/F,iBAAiB;AACjB,IAAM,YAAY,GAAG,IAAA,qBAAW,EAAC,cAAc,CAAC,CAAC;AAEjD,IAAM,WAAW,GAAG,UAAU,CAAC;AAE/B,uCAAuC;AACvC,SAAS,YAAY,CAAC,IAAY;IAC/B,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED,uCAAuC;AACvC,SAAS,YAAY,CAAC,IAAY;IAC/B,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,OAAO,CAAC,KAA6B;IAC1C,OAAO,IAAA,kBAAU,EAAC,IAAA,eAAO,EAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,WAAW,CAAC,IAAgB;IACjC,OAAO,cAAM,CAAC,MAAM,CAAC,IAAA,cAAM,EAAC,CAAE,IAAI,EAAE,IAAA,oBAAY,EAAC,IAAA,aAAM,EAAC,IAAA,aAAM,EAAC,IAAI,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,CAAC,YAAY,CAAC,CAAC;IAE3E,2CAA2C;IAC3C,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,YAAY,CAAC;IAC7C,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;IAEhE,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAW,QAAS,CAAC,OAAO,CAAC,KAAK,CAAC,EAAnC,CAAmC,CAAC,CAAC,CAAC;AACtF,CAAC;AA1CD,8CA0CC;AAED,SAAgB,eAAe,CAAC,QAAgB,EAAE,QAAmB;IACjE,IAAI;QACA,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,KAAK,EAAE,GAAG;IACnB,OAAO,KAAK,CAAC;AACjB,CAAC;AAND,0CAMC;AAED,SAAgB,cAAc,CAAC,KAAa;IACxC,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,WAAW,IAAI,KAAK,GAAG,CAAC,EAAE;QAC9E,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KACtE;IACD,OAAO,eAAc,KAAK,UAAQ,CAAC;AACvC,CAAC;AALD,wCAKC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/hdnode/package.json b/node_modules/@ethersproject/hdnode/package.json new file mode 100644 index 0000000..a4e54e9 --- /dev/null +++ b/node_modules/@ethersproject/hdnode/package.json @@ -0,0 +1,53 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/basex": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/pbkdf2": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/sha2": "^5.5.0", + "@ethersproject/signing-key": "^5.5.0", + "@ethersproject/strings": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/wordlists": "^5.5.0" + }, + "description": "BIP32 Hierarchal Deterministic Node operations.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/hdnode", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/hdnode", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xe0380795f54dd16283bb2614baafa8ce9beb51856a8a99b48f44c8658db7876c", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/hdnode/src.ts/_version.ts b/node_modules/@ethersproject/hdnode/src.ts/_version.ts new file mode 100644 index 0000000..42520bc --- /dev/null +++ b/node_modules/@ethersproject/hdnode/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "hdnode/5.5.0"; diff --git a/node_modules/@ethersproject/hdnode/src.ts/index.ts b/node_modules/@ethersproject/hdnode/src.ts/index.ts new file mode 100644 index 0000000..2fb609d --- /dev/null +++ b/node_modules/@ethersproject/hdnode/src.ts/index.ts @@ -0,0 +1,412 @@ +"use strict"; + +// See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki +// See: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki + + +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { Base58 } from "@ethersproject/basex"; +import { arrayify, BytesLike, concat, hexDataSlice, hexZeroPad, hexlify } from "@ethersproject/bytes"; +import { BigNumber } from "@ethersproject/bignumber"; +import { toUtf8Bytes, UnicodeNormalizationForm } from "@ethersproject/strings"; +import { pbkdf2 } from "@ethersproject/pbkdf2"; +import { defineReadOnly } from "@ethersproject/properties"; +import { SigningKey } from "@ethersproject/signing-key"; +import { computeHmac, ripemd160, sha256, SupportedAlgorithm } from "@ethersproject/sha2"; +import { computeAddress } from "@ethersproject/transactions"; +import { Wordlist, wordlists } from "@ethersproject/wordlists"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +const N = BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); + + +// "Bitcoin seed" +const MasterSecret = toUtf8Bytes("Bitcoin seed"); + +const HardenedBit = 0x80000000; + +// Returns a byte with the MSB bits set +function getUpperMask(bits: number): number { + return ((1 << bits) - 1) << (8 - bits); +} + +// Returns a byte with the LSB bits set +function getLowerMask(bits: number): number { + return (1 << bits) - 1; +} + +function bytes32(value: BigNumber | Uint8Array): string { + return hexZeroPad(hexlify(value), 32); +} + +function base58check(data: Uint8Array): string { + return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ])); +} + +function getWordlist(wordlist: string | Wordlist): Wordlist { + if (wordlist == null) { + return wordlists["en"]; + } + + if (typeof(wordlist) === "string") { + const words = wordlists[wordlist]; + if (words == null) { + logger.throwArgumentError("unknown locale", "wordlist", wordlist); + } + return words; + } + + return wordlist; +} + +const _constructorGuard: any = {}; + +export const defaultPath = "m/44'/60'/0'/0/0"; + +export interface Mnemonic { + readonly phrase: string; + readonly path: string; + readonly locale: string; +}; + +export class HDNode implements ExternallyOwnedAccount { + readonly privateKey: string; + readonly publicKey: string; + + readonly fingerprint: string; + readonly parentFingerprint: string; + + readonly address: string; + + readonly mnemonic?: Mnemonic; + readonly path: string; + + readonly chainCode: string; + + readonly index: number; + readonly depth: number; + + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string) { + logger.checkNew(new.target, HDNode); + + /* istanbul ignore if */ + if (constructorGuard !== _constructorGuard) { + throw new Error("HDNode constructor cannot be called directly"); + } + + if (privateKey) { + const signingKey = new SigningKey(privateKey); + defineReadOnly(this, "privateKey", signingKey.privateKey); + defineReadOnly(this, "publicKey", signingKey.compressedPublicKey); + } else { + defineReadOnly(this, "privateKey", null); + defineReadOnly(this, "publicKey", hexlify(publicKey)); + } + + defineReadOnly(this, "parentFingerprint", parentFingerprint); + defineReadOnly(this, "fingerprint", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4)); + + defineReadOnly(this, "address", computeAddress(this.publicKey)); + + defineReadOnly(this, "chainCode", chainCode); + + defineReadOnly(this, "index", index); + defineReadOnly(this, "depth", depth); + + if (mnemonicOrPath == null) { + // From a source that does not preserve the path (e.g. extended keys) + defineReadOnly(this, "mnemonic", null); + defineReadOnly(this, "path", null); + + } else if (typeof(mnemonicOrPath) === "string") { + // From a source that does not preserve the mnemonic (e.g. neutered) + defineReadOnly(this, "mnemonic", null); + defineReadOnly(this, "path", mnemonicOrPath); + + } else { + // From a fully qualified source + defineReadOnly(this, "mnemonic", mnemonicOrPath); + defineReadOnly(this, "path", mnemonicOrPath.path); + } + } + + get extendedKey(): string { + // We only support the mainnet values for now, but if anyone needs + // testnet values, let me know. I believe current sentiment is that + // we should always use mainnet, and use BIP-44 to derive the network + // - Mainnet: public=0x0488B21E, private=0x0488ADE4 + // - Testnet: public=0x043587CF, private=0x04358394 + + if (this.depth >= 256) { throw new Error("Depth too large!"); } + + return base58check(concat([ + ((this.privateKey != null) ? "0x0488ADE4": "0x0488B21E"), + hexlify(this.depth), + this.parentFingerprint, + hexZeroPad(hexlify(this.index), 4), + this.chainCode, + ((this.privateKey != null) ? concat([ "0x00", this.privateKey ]): this.publicKey), + ])); + } + + neuter(): HDNode { + return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path); + } + + private _derive(index: number): HDNode { + if (index > 0xffffffff) { throw new Error("invalid index - " + String(index)); } + + // Base path + let path = this.path; + if (path) { path += "/" + (index & ~HardenedBit); } + + const data = new Uint8Array(37); + + if (index & HardenedBit) { + if (!this.privateKey) { + throw new Error("cannot derive child of neutered node"); + } + + // Data = 0x00 || ser_256(k_par) + data.set(arrayify(this.privateKey), 1); + + // Hardened path + if (path) { path += "'"; } + + } else { + // Data = ser_p(point(k_par)) + data.set(arrayify(this.publicKey)); + } + + // Data += ser_32(i) + for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); } + + const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data)); + const IL = I.slice(0, 32); + const IR = I.slice(32); + + // The private key + let ki: string = null + + // The public key + let Ki: string = null; + + if (this.privateKey) { + ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N)); + } else { + const ek = new SigningKey(hexlify(IL)); + Ki = ek._addPoint(this.publicKey); + } + + let mnemonicOrPath: Mnemonic | string = path; + + const srcMnemonic = this.mnemonic; + if (srcMnemonic) { + mnemonicOrPath = Object.freeze({ + phrase: srcMnemonic.phrase, + path: path, + locale: (srcMnemonic.locale || "en") + }); + } + + return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath); + } + + derivePath(path: string): HDNode { + const components = path.split("/"); + + if (components.length === 0 || (components[0] === "m" && this.depth !== 0)) { + throw new Error("invalid path - " + path); + } + + if (components[0] === "m") { components.shift(); } + + let result: HDNode = this; + for (let i = 0; i < components.length; i++) { + const component = components[i]; + if (component.match(/^[0-9]+'$/)) { + const index = parseInt(component.substring(0, component.length - 1)); + if (index >= HardenedBit) { throw new Error("invalid path index - " + component); } + result = result._derive(HardenedBit + index); + } else if (component.match(/^[0-9]+$/)) { + const index = parseInt(component); + if (index >= HardenedBit) { throw new Error("invalid path index - " + component); } + result = result._derive(index); + } else { + throw new Error("invalid path component - " + component); + } + } + + return result; + } + + + static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode { + const seedArray: Uint8Array = arrayify(seed); + if (seedArray.length < 16 || seedArray.length > 64) { throw new Error("invalid seed"); } + + const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray)); + + return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); + } + + static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode { + + // If a locale name was passed in, find the associated wordlist + wordlist = getWordlist(wordlist); + + // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid) + mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist); + + return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), { + phrase: mnemonic, + path: "m", + locale: wordlist.locale + }); + } + + static fromSeed(seed: BytesLike): HDNode { + return HDNode._fromSeed(seed, null); + } + + static fromExtendedKey(extendedKey: string): HDNode { + const bytes = Base58.decode(extendedKey); + + if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) { + logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } + + const depth = bytes[4]; + const parentFingerprint = hexlify(bytes.slice(5, 9)); + const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16); + const chainCode = hexlify(bytes.slice(13, 45)); + const key = bytes.slice(45, 78); + + switch (hexlify(bytes.slice(0, 4))) { + // Public Key + case "0x0488b21e": case "0x043587cf": + return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null); + + // Private Key + case "0x0488ade4": case "0x04358394 ": + if (key[0] !== 0) { break; } + return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null); + } + + return logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } +} + +export function mnemonicToSeed(mnemonic: string, password?: string): string { + if (!password) { password = ""; } + + const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD); + + return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512"); +} + +export function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string { + wordlist = getWordlist(wordlist); + + logger.checkNormalize(); + + const words = wordlist.split(mnemonic); + if ((words.length % 3) !== 0) { throw new Error("invalid mnemonic"); } + + const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8))); + + let offset = 0; + for (let i = 0; i < words.length; i++) { + let index = wordlist.getWordIndex(words[i].normalize("NFKD")); + if (index === -1) { throw new Error("invalid mnemonic"); } + + for (let bit = 0; bit < 11; bit++) { + if (index & (1 << (10 - bit))) { + entropy[offset >> 3] |= (1 << (7 - (offset % 8))); + } + offset++; + } + } + + const entropyBits = 32 * words.length / 3; + + const checksumBits = words.length / 3; + const checksumMask = getUpperMask(checksumBits); + + const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; + + if (checksum !== (entropy[entropy.length - 1] & checksumMask)) { + throw new Error("invalid checksum"); + } + + return hexlify(entropy.slice(0, entropyBits / 8)); +} + +export function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string { + wordlist = getWordlist(wordlist); + + entropy = arrayify(entropy); + + if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) { + throw new Error("invalid entropy"); + } + + const indices: Array = [ 0 ]; + + let remainingBits = 11; + for (let i = 0; i < entropy.length; i++) { + + // Consume the whole byte (with still more to go) + if (remainingBits > 8) { + indices[indices.length - 1] <<= 8; + indices[indices.length - 1] |= entropy[i]; + + remainingBits -= 8; + + // This byte will complete an 11-bit index + } else { + indices[indices.length - 1] <<= remainingBits; + indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits); + + // Start the next word + indices.push(entropy[i] & getLowerMask(8 - remainingBits)); + + remainingBits += 3; + } + } + + // Compute the checksum bits + const checksumBits = entropy.length / 4; + const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits); + + // Shift the checksum into the word indices + indices[indices.length - 1] <<= checksumBits; + indices[indices.length - 1] |= (checksum >> (8 - checksumBits)); + + return wordlist.join(indices.map((index) => (wordlist).getWord(index))); +} + +export function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean { + try { + mnemonicToEntropy(mnemonic, wordlist); + return true; + } catch (error) { } + return false; +} + +export function getAccountPath(index: number): string { + if (typeof(index) !== "number" || index < 0 || index >= HardenedBit || index % 1) { + logger.throwArgumentError("invalid account index", "index", index); + } + return `m/44'/60'/${ index }'/0/0`; +} diff --git a/node_modules/@ethersproject/json-wallets/LICENSE.md b/node_modules/@ethersproject/json-wallets/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/json-wallets/README.md b/node_modules/@ethersproject/json-wallets/README.md new file mode 100644 index 0000000..f460484 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/README.md @@ -0,0 +1,47 @@ +Secret Storage JSON Wallet Utilities +==================================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for encoding, decoding, encrypting and decrypting JSON wallet +formats. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + isCrowdsaleWallet, + decryptCrowdsale, + + isKeystoreWallet, + decryptKeystore, + decryptKeystoreSync, + encryptKeystore, + + getJsonWalletAddress, + + decryptJsonWallet, + decryptJsonWalletSync, + + // Types + + ProgressCallback, + + EncryptOptions + +} = require("@ethersproject/json-wallets"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts b/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts new file mode 100644 index 0000000..e0f4aec --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "json-wallets/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/_version.js b/node_modules/@ethersproject/json-wallets/lib.esm/_version.js new file mode 100644 index 0000000..4eb5ff5 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "json-wallets/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/_version.js.map b/node_modules/@ethersproject/json-wallets/lib.esm/_version.js.map new file mode 100644 index 0000000..a4db61b --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts new file mode 100644 index 0000000..35615f9 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts @@ -0,0 +1,18 @@ +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { Bytes } from "@ethersproject/bytes"; +import { Description } from "@ethersproject/properties"; +export interface _CrowdsaleAccount { + address: string; + privateKey: string; + _isCrowdsaleAccount: boolean; +} +export declare class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; + readonly mnemonic?: string; + readonly path?: string; + readonly _isCrowdsaleAccount: boolean; + isCrowdsaleAccount(value: any): value is CrowdsaleAccount; +} +export declare function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount; +//# sourceMappingURL=crowdsale.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts.map b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts.map new file mode 100644 index 0000000..a55220a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"crowdsale.d.ts","sourceRoot":"","sources":["../src.ts/crowdsale.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAY,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAQxD,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IAEnB,mBAAmB,EAAE,OAAO,CAAC;CAChC;AAED,qBAAa,gBAAiB,SAAQ,WAAW,CAAC,iBAAiB,CAAE,YAAW,sBAAsB;IAClG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAEtC,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,gBAAgB;CAG5D;AAGD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,sBAAsB,CAsCtF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js new file mode 100644 index 0000000..97b0639 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js @@ -0,0 +1,48 @@ +"use strict"; +import aes from "aes-js"; +import { getAddress } from "@ethersproject/address"; +import { arrayify } from "@ethersproject/bytes"; +import { keccak256 } from "@ethersproject/keccak256"; +import { pbkdf2 } from "@ethersproject/pbkdf2"; +import { toUtf8Bytes } from "@ethersproject/strings"; +import { Description } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { getPassword, looseArrayify, searchPath } from "./utils"; +export class CrowdsaleAccount extends Description { + isCrowdsaleAccount(value) { + return !!(value && value._isCrowdsaleAccount); + } +} +// See: https://github.com/ethereum/pyethsaletool +export function decrypt(json, password) { + const data = JSON.parse(json); + password = getPassword(password); + // Ethereum Address + const ethaddr = getAddress(searchPath(data, "ethaddr")); + // Encrypted Seed + const encseed = looseArrayify(searchPath(data, "encseed")); + if (!encseed || (encseed.length % 16) !== 0) { + logger.throwArgumentError("invalid encseed", "json", json); + } + const key = arrayify(pbkdf2(password, password, 2000, 32, "sha256")).slice(0, 16); + const iv = encseed.slice(0, 16); + const encryptedSeed = encseed.slice(16); + // Decrypt the seed + const aesCbc = new aes.ModeOfOperation.cbc(key, iv); + const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed))); + // This wallet format is weird... Convert the binary encoded hex to a string. + let seedHex = ""; + for (let i = 0; i < seed.length; i++) { + seedHex += String.fromCharCode(seed[i]); + } + const seedHexBytes = toUtf8Bytes(seedHex); + const privateKey = keccak256(seedHexBytes); + return new CrowdsaleAccount({ + _isCrowdsaleAccount: true, + address: ethaddr, + privateKey: privateKey + }); +} +//# sourceMappingURL=crowdsale.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js.map b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js.map new file mode 100644 index 0000000..3d23ec7 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js.map @@ -0,0 +1 @@ +{"version":3,"file":"crowdsale.js","sourceRoot":"","sources":["../src.ts/crowdsale.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,GAAG,MAAM,QAAQ,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAS,MAAM,sBAA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EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAElF,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChC,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAExC,mBAAmB;IACnB,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAE9E,6EAA6E;IAC7E,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3C;IAED,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE1C,MAAM,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;IAE3C,OAAO,IAAI,gBAAgB,CAAE;QACzB,mBAAmB,EAAE,IAAI;QACzB,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;KACzB,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts b/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts new file mode 100644 index 0000000..7510048 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts @@ -0,0 +1,9 @@ +import { Bytes } from "@ethersproject/bytes"; +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { decrypt as decryptCrowdsale } from "./crowdsale"; +import { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from "./inspect"; +import { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from "./keystore"; +declare function decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; +declare function decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount; +export { decryptCrowdsale, decryptKeystore, decryptKeystoreSync, encryptKeystore, isCrowdsaleWallet, isKeystoreWallet, getJsonWalletAddress, decryptJsonWallet, decryptJsonWalletSync, ProgressCallback, EncryptOptions, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts.map b/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts.map new file mode 100644 index 0000000..f5ea80a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,WAAW,IAAI,mBAAmB,EAAE,OAAO,IAAI,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE1J,iBAAS,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAavI;AAED,iBAAS,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,sBAAsB,CAU7F;AAED,OAAO,EACH,gBAAgB,EAEhB,eAAe,EACf,mBAAmB,EACnB,eAAe,EAEf,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EAEpB,iBAAiB,EACjB,qBAAqB,EAErB,gBAAgB,EAChB,cAAc,GACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/index.js b/node_modules/@ethersproject/json-wallets/lib.esm/index.js new file mode 100644 index 0000000..b575b3a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/index.js @@ -0,0 +1,31 @@ +"use strict"; +import { decrypt as decryptCrowdsale } from "./crowdsale"; +import { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from "./inspect"; +import { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore } from "./keystore"; +function decryptJsonWallet(json, password, progressCallback) { + if (isCrowdsaleWallet(json)) { + if (progressCallback) { + progressCallback(0); + } + const account = decryptCrowdsale(json, password); + if (progressCallback) { + progressCallback(1); + } + return Promise.resolve(account); + } + if (isKeystoreWallet(json)) { + return decryptKeystore(json, password, progressCallback); + } + return Promise.reject(new Error("invalid JSON wallet")); +} +function decryptJsonWalletSync(json, password) { + if (isCrowdsaleWallet(json)) { + return decryptCrowdsale(json, password); + } + if (isKeystoreWallet(json)) { + return decryptKeystoreSync(json, password); + } + throw new Error("invalid JSON wallet"); +} +export { decryptCrowdsale, decryptKeystore, decryptKeystoreSync, encryptKeystore, isCrowdsaleWallet, isKeystoreWallet, getJsonWalletAddress, decryptJsonWallet, decryptJsonWalletSync, }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/index.js.map b/node_modules/@ethersproject/json-wallets/lib.esm/index.js.map new file mode 100644 index 0000000..8e1f3b7 --- /dev/null +++ b/node_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KAC9C;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC;AAED,OAAO,EACH,gBAAgB,EAEhB,eAAe,EACf,mBAAmB,EACnB,eAAe,EAEf,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EAEpB,iBAAiB,EACjB,qBAAqB,GAIxB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts new file mode 100644 index 0000000..197ac18 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts @@ -0,0 +1,4 @@ +export declare function isCrowdsaleWallet(json: string): boolean; +export declare function isKeystoreWallet(json: string): boolean; +export declare function getJsonWalletAddress(json: string): string; +//# sourceMappingURL=inspect.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts.map b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts.map new file mode 100644 index 0000000..ca15e91 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src.ts/inspect.ts"],"names":[],"mappings":"AAKA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYtD;AAMD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAczD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js new file mode 100644 index 0000000..cbdfd67 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js @@ -0,0 +1,49 @@ +"use strict"; +import { getAddress } from "@ethersproject/address"; +export function isCrowdsaleWallet(json) { + let data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + return (data.encseed && data.ethaddr); +} +export function isKeystoreWallet(json) { + let data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) { + return false; + } + // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff + return true; +} +//export function isJsonWallet(json: string): boolean { +// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json)); +//} +export function getJsonWalletAddress(json) { + if (isCrowdsaleWallet(json)) { + try { + return getAddress(JSON.parse(json).ethaddr); + } + catch (error) { + return null; + } + } + if (isKeystoreWallet(json)) { + try { + return getAddress(JSON.parse(json).address); + } + catch (error) { + return null; + } + } + return null; +} +//# sourceMappingURL=inspect.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js.map b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js.map new file mode 100644 index 0000000..8346a38 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../src.ts/inspect.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC1C,IAAI,IAAI,GAAQ,IAAI,CAAC;IACrB,IAAI;QACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KAC3B;IAAC,OAAO,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAEjC,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IACzC,IAAI,IAAI,GAAQ,IAAI,CAAC;IACrB,IAAI;QACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KAC3B;IAAC,OAAO,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAEjC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC1F,OAAO,KAAK,CAAC;KAChB;IAED,6EAA6E;IAC7E,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,uDAAuD;AACvD,sEAAsE;AACtE,GAAG;AAEH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC7C,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACzB,IAAI;YACA,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;SAAE;KACnC;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI;YACA,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;SAAE;KACnC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts new file mode 100644 index 0000000..33cddcb --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts @@ -0,0 +1,34 @@ +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { Bytes, BytesLike } from "@ethersproject/bytes"; +import { Mnemonic } from "@ethersproject/hdnode"; +import { Description } from "@ethersproject/properties"; +export interface _KeystoreAccount { + address: string; + privateKey: string; + mnemonic?: Mnemonic; + _isKeystoreAccount: boolean; +} +export declare class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; + readonly mnemonic?: Mnemonic; + readonly _isKeystoreAccount: boolean; + isKeystoreAccount(value: any): value is KeystoreAccount; +} +export declare type ProgressCallback = (percent: number) => void; +export declare type EncryptOptions = { + iv?: BytesLike; + entropy?: BytesLike; + client?: string; + salt?: BytesLike; + uuid?: string; + scrypt?: { + N?: number; + r?: number; + p?: number; + }; +}; +export declare function decryptSync(json: string, password: Bytes | string): KeystoreAccount; +export declare function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; +export declare function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise; +//# sourceMappingURL=keystore.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts.map b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts.map new file mode 100644 index 0000000..08e992d --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"keystore.d.ts","sourceRoot":"","sources":["../src.ts/keystore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAY,KAAK,EAAE,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAA0C,QAAQ,EAAqB,MAAM,uBAAuB,CAAC;AAI5G,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAexD,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED,qBAAa,eAAgB,SAAQ,WAAW,CAAC,gBAAgB,CAAE,YAAW,sBAAsB;IAChG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAE7B,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAErC,iBAAiB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,eAAe;CAG1D;AAED,oBAAY,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzD,oBAAY,cAAc,GAAG;IAC1B,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QACL,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,CAAC,CAAC,EAAE,MAAM,CAAC;KACd,CAAA;CACH,CAAA;AAuJD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,eAAe,CAKnF;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAKnI;AAGD,wBAAgB,OAAO,CAAC,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJjK"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js new file mode 100644 index 0000000..da9e3f6 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js @@ -0,0 +1,316 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import aes from "aes-js"; +import scrypt from "scrypt-js"; +import { getAddress } from "@ethersproject/address"; +import { arrayify, concat, hexlify } from "@ethersproject/bytes"; +import { defaultPath, entropyToMnemonic, HDNode, mnemonicToEntropy } from "@ethersproject/hdnode"; +import { keccak256 } from "@ethersproject/keccak256"; +import { pbkdf2 as _pbkdf2 } from "@ethersproject/pbkdf2"; +import { randomBytes } from "@ethersproject/random"; +import { Description } from "@ethersproject/properties"; +import { computeAddress } from "@ethersproject/transactions"; +import { getPassword, looseArrayify, searchPath, uuidV4, zpad } from "./utils"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +// Exported Types +function hasMnemonic(value) { + return (value != null && value.mnemonic && value.mnemonic.phrase); +} +export class KeystoreAccount extends Description { + isKeystoreAccount(value) { + return !!(value && value._isKeystoreAccount); + } +} +function _decrypt(data, key, ciphertext) { + const cipher = searchPath(data, "crypto/cipher"); + if (cipher === "aes-128-ctr") { + const iv = looseArrayify(searchPath(data, "crypto/cipherparams/iv")); + const counter = new aes.Counter(iv); + const aesCtr = new aes.ModeOfOperation.ctr(key, counter); + return arrayify(aesCtr.decrypt(ciphertext)); + } + return null; +} +function _getAccount(data, key) { + const ciphertext = looseArrayify(searchPath(data, "crypto/ciphertext")); + const computedMAC = hexlify(keccak256(concat([key.slice(16, 32), ciphertext]))).substring(2); + if (computedMAC !== searchPath(data, "crypto/mac").toLowerCase()) { + throw new Error("invalid password"); + } + const privateKey = _decrypt(data, key.slice(0, 16), ciphertext); + if (!privateKey) { + logger.throwError("unsupported cipher", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "decrypt" + }); + } + const mnemonicKey = key.slice(32, 64); + const address = computeAddress(privateKey); + if (data.address) { + let check = data.address.toLowerCase(); + if (check.substring(0, 2) !== "0x") { + check = "0x" + check; + } + if (getAddress(check) !== address) { + throw new Error("address mismatch"); + } + } + const account = { + _isKeystoreAccount: true, + address: address, + privateKey: hexlify(privateKey) + }; + // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase + if (searchPath(data, "x-ethers/version") === "0.1") { + const mnemonicCiphertext = looseArrayify(searchPath(data, "x-ethers/mnemonicCiphertext")); + const mnemonicIv = looseArrayify(searchPath(data, "x-ethers/mnemonicCounter")); + const mnemonicCounter = new aes.Counter(mnemonicIv); + const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + const path = searchPath(data, "x-ethers/path") || defaultPath; + const locale = searchPath(data, "x-ethers/locale") || "en"; + const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext)); + try { + const mnemonic = entropyToMnemonic(entropy, locale); + const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + account.mnemonic = node.mnemonic; + } + catch (error) { + // If we don't have the locale wordlist installed to + // read this mnemonic, just bail and don't set the + // mnemonic + if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { + throw error; + } + } + } + return new KeystoreAccount(account); +} +function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) { + return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc)); +} +function pbkdf2(passwordBytes, salt, count, dkLen, prfFunc) { + return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc)); +} +function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) { + const passwordBytes = getPassword(password); + const kdf = searchPath(data, "crypto/kdf"); + if (kdf && typeof (kdf) === "string") { + const throwError = function (name, value) { + return logger.throwArgumentError("invalid key-derivation function parameters", name, value); + }; + if (kdf.toLowerCase() === "scrypt") { + const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); + const N = parseInt(searchPath(data, "crypto/kdfparams/n")); + const r = parseInt(searchPath(data, "crypto/kdfparams/r")); + const p = parseInt(searchPath(data, "crypto/kdfparams/p")); + // Check for all required parameters + if (!N || !r || !p) { + throwError("kdf", kdf); + } + // Make sure N is a power of 2 + if ((N & (N - 1)) !== 0) { + throwError("N", N); + } + const dkLen = parseInt(searchPath(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback); + } + else if (kdf.toLowerCase() === "pbkdf2") { + const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); + let prfFunc = null; + const prf = searchPath(data, "crypto/kdfparams/prf"); + if (prf === "hmac-sha256") { + prfFunc = "sha256"; + } + else if (prf === "hmac-sha512") { + prfFunc = "sha512"; + } + else { + throwError("prf", prf); + } + const count = parseInt(searchPath(data, "crypto/kdfparams/c")); + const dkLen = parseInt(searchPath(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc); + } + } + return logger.throwArgumentError("unsupported key-derivation function", "kdf", kdf); +} +export function decryptSync(json, password) { + const data = JSON.parse(json); + const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt); + return _getAccount(data, key); +} +export function decrypt(json, password, progressCallback) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.parse(json); + const key = yield _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback); + return _getAccount(data, key); + }); +} +export function encrypt(account, password, options, progressCallback) { + try { + // Check the address matches the private key + if (getAddress(account.address) !== computeAddress(account.privateKey)) { + throw new Error("address/privateKey mismatch"); + } + // Check the mnemonic (if any) matches the private key + if (hasMnemonic(account)) { + const mnemonic = account.mnemonic; + const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + } + } + catch (e) { + return Promise.reject(e); + } + // The options are optional, so adjust the call as needed + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (!options) { + options = {}; + } + const privateKey = arrayify(account.privateKey); + const passwordBytes = getPassword(password); + let entropy = null; + let path = null; + let locale = null; + if (hasMnemonic(account)) { + const srcMnemonic = account.mnemonic; + entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || "en")); + path = srcMnemonic.path || defaultPath; + locale = srcMnemonic.locale || "en"; + } + let client = options.client; + if (!client) { + client = "ethers.js"; + } + // Check/generate the salt + let salt = null; + if (options.salt) { + salt = arrayify(options.salt); + } + else { + salt = randomBytes(32); + ; + } + // Override initialization vector + let iv = null; + if (options.iv) { + iv = arrayify(options.iv); + if (iv.length !== 16) { + throw new Error("invalid iv"); + } + } + else { + iv = randomBytes(16); + } + // Override the uuid + let uuidRandom = null; + if (options.uuid) { + uuidRandom = arrayify(options.uuid); + if (uuidRandom.length !== 16) { + throw new Error("invalid uuid"); + } + } + else { + uuidRandom = randomBytes(16); + } + // Override the scrypt password-based key derivation function parameters + let N = (1 << 17), r = 8, p = 1; + if (options.scrypt) { + if (options.scrypt.N) { + N = options.scrypt.N; + } + if (options.scrypt.r) { + r = options.scrypt.r; + } + if (options.scrypt.p) { + p = options.scrypt.p; + } + } + // We take 64 bytes: + // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix) + // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet) + return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => { + key = arrayify(key); + // This will be used to encrypt the wallet (as per Web3 secret storage) + const derivedKey = key.slice(0, 16); + const macPrefix = key.slice(16, 32); + // This will be used to encrypt the mnemonic phrase (if any) + const mnemonicKey = key.slice(32, 64); + // Encrypt the private key + const counter = new aes.Counter(iv); + const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter); + const ciphertext = arrayify(aesCtr.encrypt(privateKey)); + // Compute the message authentication code, used to check the password + const mac = keccak256(concat([macPrefix, ciphertext])); + // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition + const data = { + address: account.address.substring(2).toLowerCase(), + id: uuidV4(uuidRandom), + version: 3, + Crypto: { + cipher: "aes-128-ctr", + cipherparams: { + iv: hexlify(iv).substring(2), + }, + ciphertext: hexlify(ciphertext).substring(2), + kdf: "scrypt", + kdfparams: { + salt: hexlify(salt).substring(2), + n: N, + dklen: 32, + p: p, + r: r + }, + mac: mac.substring(2) + } + }; + // If we have a mnemonic, encrypt it into the JSON wallet + if (entropy) { + const mnemonicIv = randomBytes(16); + const mnemonicCounter = new aes.Counter(mnemonicIv); + const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy)); + const now = new Date(); + const timestamp = (now.getUTCFullYear() + "-" + + zpad(now.getUTCMonth() + 1, 2) + "-" + + zpad(now.getUTCDate(), 2) + "T" + + zpad(now.getUTCHours(), 2) + "-" + + zpad(now.getUTCMinutes(), 2) + "-" + + zpad(now.getUTCSeconds(), 2) + ".0Z"); + data["x-ethers"] = { + client: client, + gethFilename: ("UTC--" + timestamp + "--" + data.address), + mnemonicCounter: hexlify(mnemonicIv).substring(2), + mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2), + path: path, + locale: locale, + version: "0.1" + }; + } + return JSON.stringify(data); + }); +} +//# sourceMappingURL=keystore.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js.map b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js.map new file mode 100644 index 0000000..93b3171 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keystore.js","sourceRoot":"","sources":["../src.ts/keystore.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,GAAG,MAAM,QAAQ,CAAC;AACzB,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAoB,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAY,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,iBAAiB;AAEjB,SAAS,WAAW,CAAC,KAAU;IAC3B,OAAO,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACtE,CAAC;AAUD,MAAM,OAAO,eAAgB,SAAQ,WAA6B;I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,IAAI,CAAC,OAAO,CAAC;gBACzD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACjD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBAC5D,IAAI,EAAE,IAAI;gBACV,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,KAAK;aACjB,CAAC;SACL;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts b/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts new file mode 100644 index 0000000..2feb728 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts @@ -0,0 +1,7 @@ +import { Bytes, BytesLike } from "@ethersproject/bytes"; +export declare function looseArrayify(hexString: string): Uint8Array; +export declare function zpad(value: String | number, length: number): String; +export declare function getPassword(password: Bytes | string): Uint8Array; +export declare function searchPath(object: any, path: string): string; +export declare function uuidV4(randomBytes: BytesLike): string; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts.map b/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts.map new file mode 100644 index 0000000..02a6c93 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAG3E,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAK3D;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,CAKhE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAyB5D;AAGD,wBAAgB,MAAM,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,CAqBrD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/utils.js b/node_modules/@ethersproject/json-wallets/lib.esm/utils.js new file mode 100644 index 0000000..97b4711 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/utils.js @@ -0,0 +1,63 @@ +"use strict"; +import { arrayify, hexlify } from "@ethersproject/bytes"; +import { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings'; +export function looseArrayify(hexString) { + if (typeof (hexString) === 'string' && hexString.substring(0, 2) !== '0x') { + hexString = '0x' + hexString; + } + return arrayify(hexString); +} +export function zpad(value, length) { + value = String(value); + while (value.length < length) { + value = '0' + value; + } + return value; +} +export function getPassword(password) { + if (typeof (password) === 'string') { + return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC); + } + return arrayify(password); +} +export function searchPath(object, path) { + let currentChild = object; + const comps = path.toLowerCase().split('/'); + for (let i = 0; i < comps.length; i++) { + // Search for a child object with a case-insensitive matching key + let matchingChild = null; + for (const key in currentChild) { + if (key.toLowerCase() === comps[i]) { + matchingChild = currentChild[key]; + break; + } + } + // Didn't find one. :'( + if (matchingChild === null) { + return null; + } + // Now check this child... + currentChild = matchingChild; + } + return currentChild; +} +// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4) +export function uuidV4(randomBytes) { + const bytes = arrayify(randomBytes); + // Section: 4.1.3: + // - time_hi_and_version[12:16] = 0b0100 + bytes[6] = (bytes[6] & 0x0f) | 0x40; + // Section 4.4 + // - clock_seq_hi_and_reserved[6] = 0b0 + // - clock_seq_hi_and_reserved[7] = 0b1 + bytes[8] = (bytes[8] & 0x3f) | 0x80; + const value = hexlify(bytes); + return [ + value.substring(2, 10), + value.substring(10, 14), + value.substring(14, 18), + value.substring(18, 22), + value.substring(22, 34), + ].join("-"); +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib.esm/utils.js.map b/node_modules/@ethersproject/json-wallets/lib.esm/utils.js.map new file mode 100644 index 0000000..841f743 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib.esm/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAoB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC3C,IAAI,OAAM,CAAC,SAAS,CAAC,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;QACtE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;KAChC;IACD,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,KAAsB,EAAE,MAAc;IACvD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;QAAE,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;KAAE;IACtD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAwB;IAChD,IAAI,OAAM,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC/B,OAAO,WAAW,CAAC,QAAQ,EAAE,wBAAwB,CAAC,IAAI,CAAC,CAAC;KAC/D;IACD,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAA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EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;KACzB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/_version.d.ts b/node_modules/@ethersproject/json-wallets/lib/_version.d.ts new file mode 100644 index 0000000..e0f4aec --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "json-wallets/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/_version.d.ts.map b/node_modules/@ethersproject/json-wallets/lib/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/_version.js b/node_modules/@ethersproject/json-wallets/lib/_version.js new file mode 100644 index 0000000..cd4d73c --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "json-wallets/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/_version.js.map b/node_modules/@ethersproject/json-wallets/lib/_version.js.map new file mode 100644 index 0000000..cb386e2 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts b/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts new file mode 100644 index 0000000..35615f9 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts @@ -0,0 +1,18 @@ +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { Bytes } from "@ethersproject/bytes"; +import { Description } from "@ethersproject/properties"; +export interface _CrowdsaleAccount { + address: string; + privateKey: string; + _isCrowdsaleAccount: boolean; +} +export declare class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; + readonly mnemonic?: string; + readonly path?: string; + readonly _isCrowdsaleAccount: boolean; + isCrowdsaleAccount(value: any): value is CrowdsaleAccount; +} +export declare function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount; +//# sourceMappingURL=crowdsale.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts.map b/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts.map new file mode 100644 index 0000000..a55220a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"crowdsale.d.ts","sourceRoot":"","sources":["../src.ts/crowdsale.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAY,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAQxD,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IAEnB,mBAAmB,EAAE,OAAO,CAAC;CAChC;AAED,qBAAa,gBAAiB,SAAQ,WAAW,CAAC,iBAAiB,CAAE,YAAW,sBAAsB;IAClG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAEtC,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,gBAAgB;CAG5D;AAGD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,sBAAsB,CAsCtF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/crowdsale.js b/node_modules/@ethersproject/json-wallets/lib/crowdsale.js new file mode 100644 index 0000000..40c730b --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/crowdsale.js @@ -0,0 +1,75 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decrypt = exports.CrowdsaleAccount = void 0; +var aes_js_1 = __importDefault(require("aes-js")); +var address_1 = require("@ethersproject/address"); +var bytes_1 = require("@ethersproject/bytes"); +var keccak256_1 = require("@ethersproject/keccak256"); +var pbkdf2_1 = require("@ethersproject/pbkdf2"); +var strings_1 = require("@ethersproject/strings"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var utils_1 = require("./utils"); +var CrowdsaleAccount = /** @class */ (function (_super) { + __extends(CrowdsaleAccount, _super); + function CrowdsaleAccount() { + return _super !== null && _super.apply(this, arguments) || this; + } + CrowdsaleAccount.prototype.isCrowdsaleAccount = function (value) { + return !!(value && value._isCrowdsaleAccount); + }; + return CrowdsaleAccount; +}(properties_1.Description)); +exports.CrowdsaleAccount = CrowdsaleAccount; +// See: https://github.com/ethereum/pyethsaletool +function decrypt(json, password) { + var data = JSON.parse(json); + password = (0, utils_1.getPassword)(password); + // Ethereum Address + var ethaddr = (0, address_1.getAddress)((0, utils_1.searchPath)(data, "ethaddr")); + // Encrypted Seed + var encseed = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "encseed")); + if (!encseed || (encseed.length % 16) !== 0) { + logger.throwArgumentError("invalid encseed", "json", json); + } + var key = (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(password, password, 2000, 32, "sha256")).slice(0, 16); + var iv = encseed.slice(0, 16); + var encryptedSeed = encseed.slice(16); + // Decrypt the seed + var aesCbc = new aes_js_1.default.ModeOfOperation.cbc(key, iv); + var seed = aes_js_1.default.padding.pkcs7.strip((0, bytes_1.arrayify)(aesCbc.decrypt(encryptedSeed))); + // This wallet format is weird... Convert the binary encoded hex to a string. + var seedHex = ""; + for (var i = 0; i < seed.length; i++) { + seedHex += String.fromCharCode(seed[i]); + } + var seedHexBytes = (0, strings_1.toUtf8Bytes)(seedHex); + var privateKey = (0, keccak256_1.keccak256)(seedHexBytes); + return new CrowdsaleAccount({ + _isCrowdsaleAccount: true, + address: ethaddr, + privateKey: privateKey + }); +} +exports.decrypt = decrypt; +//# sourceMappingURL=crowdsale.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/crowdsale.js.map b/node_modules/@ethersproject/json-wallets/lib/crowdsale.js.map new file mode 100644 index 0000000..1d8a1c6 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/crowdsale.js.map @@ -0,0 +1 @@ +{"version":3,"file":"crowdsale.js","sourceRoot":"","sources":["../src.ts/crowdsale.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;AAEb,kDAAyB;AAGzB,kDAAoD;AACpD,8CAAuD;AACvD,sDAAqD;AACrD,gDAA+C;AAC/C,kDAAqD;AACrD,wDAAwD;AAExD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iCAAiE;AASjE;IAAsC,oCAA8B;IAApE;;IAWA,CAAC;IAHG,6CAAkB,GAAlB,UAAmB,KAAU;QACzB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAClD,CAAC;IACL,uBAAC;AAAD,CAAC,AAXD,CAAsC,wBAAW,GAWhD;AAXY,4CAAgB;AAa7B,iDAAiD;AACjD,SAAgB,OAAO,CAAC,IAAY,EAAE,QAAwB;IAC1D,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE9B,QAAQ,GAAG,IAAA,mBAAW,EAAC,QAAQ,CAAC,CAAC;IAEjC,mBAAmB;IACnB,IAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,IAAA,kBAAU,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAExD,iBAAiB;IACjB,IAAM,OAAO,GAAG,IAAA,qBAAa,EAAC,IAAA,kBAAU,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAC3D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE;QACzC,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KAC9D;IAED,IAAM,GAAG,GAAG,IAAA,gBAAQ,EAAC,IAAA,eAAM,EAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAElF,IAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChC,IAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAExC,mBAAmB;IACnB,IAAM,MAAM,GAAG,IAAI,gBAAG,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACpD,IAAM,IAAI,GAAG,gBAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAA,gBAAQ,EAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAE9E,6EAA6E;IAC7E,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3C;IAED,IAAM,YAAY,GAAG,IAAA,qBAAW,EAAC,OAAO,CAAC,CAAC;IAE1C,IAAM,UAAU,GAAG,IAAA,qBAAS,EAAC,YAAY,CAAC,CAAC;IAE3C,OAAO,IAAI,gBAAgB,CAAE;QACzB,mBAAmB,EAAE,IAAI;QACzB,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;KACzB,CAAC,CAAC;AACP,CAAC;AAtCD,0BAsCC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/index.d.ts b/node_modules/@ethersproject/json-wallets/lib/index.d.ts new file mode 100644 index 0000000..7510048 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/index.d.ts @@ -0,0 +1,9 @@ +import { Bytes } from "@ethersproject/bytes"; +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { decrypt as decryptCrowdsale } from "./crowdsale"; +import { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from "./inspect"; +import { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from "./keystore"; +declare function decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; +declare function decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount; +export { decryptCrowdsale, decryptKeystore, decryptKeystoreSync, encryptKeystore, isCrowdsaleWallet, isKeystoreWallet, getJsonWalletAddress, decryptJsonWallet, decryptJsonWalletSync, ProgressCallback, EncryptOptions, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/index.d.ts.map b/node_modules/@ethersproject/json-wallets/lib/index.d.ts.map new file mode 100644 index 0000000..f5ea80a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,WAAW,IAAI,mBAAmB,EAAE,OAAO,IAAI,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE1J,iBAAS,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAavI;AAED,iBAAS,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,sBAAsB,CAU7F;AAED,OAAO,EACH,gBAAgB,EAEhB,eAAe,EACf,mBAAmB,EACnB,eAAe,EAEf,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EAEpB,iBAAiB,EACjB,qBAAqB,EAErB,gBAAgB,EAChB,cAAc,GACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/index.js b/node_modules/@ethersproject/json-wallets/lib/index.js new file mode 100644 index 0000000..040f715 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/index.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decryptJsonWalletSync = exports.decryptJsonWallet = exports.getJsonWalletAddress = exports.isKeystoreWallet = exports.isCrowdsaleWallet = exports.encryptKeystore = exports.decryptKeystoreSync = exports.decryptKeystore = exports.decryptCrowdsale = void 0; +var crowdsale_1 = require("./crowdsale"); +Object.defineProperty(exports, "decryptCrowdsale", { enumerable: true, get: function () { return crowdsale_1.decrypt; } }); +var inspect_1 = require("./inspect"); +Object.defineProperty(exports, "getJsonWalletAddress", { enumerable: true, get: function () { return inspect_1.getJsonWalletAddress; } }); +Object.defineProperty(exports, "isCrowdsaleWallet", { enumerable: true, get: function () { return inspect_1.isCrowdsaleWallet; } }); +Object.defineProperty(exports, "isKeystoreWallet", { enumerable: true, get: function () { return inspect_1.isKeystoreWallet; } }); +var keystore_1 = require("./keystore"); +Object.defineProperty(exports, "decryptKeystore", { enumerable: true, get: function () { return keystore_1.decrypt; } }); +Object.defineProperty(exports, "decryptKeystoreSync", { enumerable: true, get: function () { return keystore_1.decryptSync; } }); +Object.defineProperty(exports, "encryptKeystore", { enumerable: true, get: function () { return keystore_1.encrypt; } }); +function decryptJsonWallet(json, password, progressCallback) { + if ((0, inspect_1.isCrowdsaleWallet)(json)) { + if (progressCallback) { + progressCallback(0); + } + var account = (0, crowdsale_1.decrypt)(json, password); + if (progressCallback) { + progressCallback(1); + } + return Promise.resolve(account); + } + if ((0, inspect_1.isKeystoreWallet)(json)) { + return (0, keystore_1.decrypt)(json, password, progressCallback); + } + return Promise.reject(new Error("invalid JSON wallet")); +} +exports.decryptJsonWallet = decryptJsonWallet; +function decryptJsonWalletSync(json, password) { + if ((0, inspect_1.isCrowdsaleWallet)(json)) { + return (0, crowdsale_1.decrypt)(json, password); + } + if ((0, inspect_1.isKeystoreWallet)(json)) { + return (0, keystore_1.decryptSync)(json, password); + } + throw new Error("invalid JSON wallet"); +} +exports.decryptJsonWalletSync = decryptJsonWalletSync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/index.js.map b/node_modules/@ethersproject/json-wallets/lib/index.js.map new file mode 100644 index 0000000..08f116e --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAKb,yCAA0D;AAgCtD,iGAhCgB,mBAAgB,OAgChB;AA/BpB,qCAAsF;AAuClF,qGAvCK,8BAAoB,OAuCL;AAFpB,kGArC2B,2BAAiB,OAqC3B;AACjB,iGAtC8C,0BAAgB,OAsC9C;AArCpB,uCAA0J;AAgCtJ,gGAhCgB,kBAAe,OAgChB;AACf,oGAjCgD,sBAAmB,OAiChD;AACnB,gGAlCgF,kBAAe,OAkChF;AAhCnB,SAAS,iBAAiB,CAAC,IAAY,EAAE,QAAwB,EAAE,gBAAmC;IAClG,IAAI,IAAA,2BAAiB,EAAC,IAAI,CAAC,EAAE;QACzB,IAAI,gBAAgB,EAAE;YAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;SAAE;QAC9C,IAAM,OAAO,GAAG,IAAA,mBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QAChD,IAAI,gBAAgB,EAAE;YAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;SAAE;QAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KACnC;IAED,IAAI,IAAA,0BAAgB,EAAC,IAAI,CAAC,EAAE;QACxB,OAAO,IAAA,kBAAe,EAAC,IAAI,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;KAC5D;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAC5D,CAAC;AAyBG,8CAAiB;AAvBrB,SAAS,qBAAqB,CAAC,IAAY,EAAE,QAAwB;IACjE,IAAI,IAAA,2BAAiB,EAAC,IAAI,CAAC,EAAE;QACzB,OAAO,IAAA,mBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;KAC1C;IAED,IAAI,IAAA,0BAAgB,EAAC,IAAI,CAAC,EAAE;QACxB,OAAO,IAAA,sBAAmB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KAC9C;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC;AAcG,sDAAqB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts b/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts new file mode 100644 index 0000000..197ac18 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts @@ -0,0 +1,4 @@ +export declare function isCrowdsaleWallet(json: string): boolean; +export declare function isKeystoreWallet(json: string): boolean; +export declare function getJsonWalletAddress(json: string): string; +//# sourceMappingURL=inspect.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts.map b/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts.map new file mode 100644 index 0000000..ca15e91 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src.ts/inspect.ts"],"names":[],"mappings":"AAKA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYtD;AAMD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAczD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/inspect.js b/node_modules/@ethersproject/json-wallets/lib/inspect.js new file mode 100644 index 0000000..74b9ebc --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/inspect.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getJsonWalletAddress = exports.isKeystoreWallet = exports.isCrowdsaleWallet = void 0; +var address_1 = require("@ethersproject/address"); +function isCrowdsaleWallet(json) { + var data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + return (data.encseed && data.ethaddr); +} +exports.isCrowdsaleWallet = isCrowdsaleWallet; +function isKeystoreWallet(json) { + var data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) { + return false; + } + // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff + return true; +} +exports.isKeystoreWallet = isKeystoreWallet; +//export function isJsonWallet(json: string): boolean { +// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json)); +//} +function getJsonWalletAddress(json) { + if (isCrowdsaleWallet(json)) { + try { + return (0, address_1.getAddress)(JSON.parse(json).ethaddr); + } + catch (error) { + return null; + } + } + if (isKeystoreWallet(json)) { + try { + return (0, address_1.getAddress)(JSON.parse(json).address); + } + catch (error) { + return null; + } + } + return null; +} +exports.getJsonWalletAddress = getJsonWalletAddress; +//# sourceMappingURL=inspect.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/inspect.js.map b/node_modules/@ethersproject/json-wallets/lib/inspect.js.map new file mode 100644 index 0000000..5d384b8 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/inspect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../src.ts/inspect.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,kDAAoD;AAGpD,SAAgB,iBAAiB,CAAC,IAAY;IAC1C,IAAI,IAAI,GAAQ,IAAI,CAAC;IACrB,IAAI;QACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KAC3B;IAAC,OAAO,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAEjC,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAPD,8CAOC;AAED,SAAgB,gBAAgB,CAAC,IAAY;IACzC,IAAI,IAAI,GAAQ,IAAI,CAAC;IACrB,IAAI;QACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KAC3B;IAAC,OAAO,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAEjC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC1F,OAAO,KAAK,CAAC;KAChB;IAED,6EAA6E;IAC7E,OAAO,IAAI,CAAC;AAChB,CAAC;AAZD,4CAYC;AAED,uDAAuD;AACvD,sEAAsE;AACtE,GAAG;AAEH,SAAgB,oBAAoB,CAAC,IAAY;IAC7C,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACzB,IAAI;YACA,OAAO,IAAA,oBAAU,EAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;SAAE;KACnC;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI;YACA,OAAO,IAAA,oBAAU,EAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;SAAE;KACnC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAdD,oDAcC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts b/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts new file mode 100644 index 0000000..33cddcb --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts @@ -0,0 +1,34 @@ +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { Bytes, BytesLike } from "@ethersproject/bytes"; +import { Mnemonic } from "@ethersproject/hdnode"; +import { Description } from "@ethersproject/properties"; +export interface _KeystoreAccount { + address: string; + privateKey: string; + mnemonic?: Mnemonic; + _isKeystoreAccount: boolean; +} +export declare class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; + readonly mnemonic?: Mnemonic; + readonly _isKeystoreAccount: boolean; + isKeystoreAccount(value: any): value is KeystoreAccount; +} +export declare type ProgressCallback = (percent: number) => void; +export declare type EncryptOptions = { + iv?: BytesLike; + entropy?: BytesLike; + client?: string; + salt?: BytesLike; + uuid?: string; + scrypt?: { + N?: number; + r?: number; + p?: number; + }; +}; +export declare function decryptSync(json: string, password: Bytes | string): KeystoreAccount; +export declare function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; +export declare function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise; +//# sourceMappingURL=keystore.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts.map b/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts.map new file mode 100644 index 0000000..08e992d --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"keystore.d.ts","sourceRoot":"","sources":["../src.ts/keystore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAY,KAAK,EAAE,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAA0C,QAAQ,EAAqB,MAAM,uBAAuB,CAAC;AAI5G,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAexD,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED,qBAAa,eAAgB,SAAQ,WAAW,CAAC,gBAAgB,CAAE,YAAW,sBAAsB;IAChG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAE7B,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAErC,iBAAiB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,eAAe;CAG1D;AAED,oBAAY,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzD,oBAAY,cAAc,GAAG;IAC1B,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QACL,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,CAAC,CAAC,EAAE,MAAM,CAAC;KACd,CAAA;CACH,CAAA;AAuJD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,eAAe,CAKnF;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAKnI;AAGD,wBAAgB,OAAO,CAAC,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJjK"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/keystore.js b/node_modules/@ethersproject/json-wallets/lib/keystore.js new file mode 100644 index 0000000..40e4207 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/keystore.js @@ -0,0 +1,380 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encrypt = exports.decrypt = exports.decryptSync = exports.KeystoreAccount = void 0; +var aes_js_1 = __importDefault(require("aes-js")); +var scrypt_js_1 = __importDefault(require("scrypt-js")); +var address_1 = require("@ethersproject/address"); +var bytes_1 = require("@ethersproject/bytes"); +var hdnode_1 = require("@ethersproject/hdnode"); +var keccak256_1 = require("@ethersproject/keccak256"); +var pbkdf2_1 = require("@ethersproject/pbkdf2"); +var random_1 = require("@ethersproject/random"); +var properties_1 = require("@ethersproject/properties"); +var transactions_1 = require("@ethersproject/transactions"); +var utils_1 = require("./utils"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +// Exported Types +function hasMnemonic(value) { + return (value != null && value.mnemonic && value.mnemonic.phrase); +} +var KeystoreAccount = /** @class */ (function (_super) { + __extends(KeystoreAccount, _super); + function KeystoreAccount() { + return _super !== null && _super.apply(this, arguments) || this; + } + KeystoreAccount.prototype.isKeystoreAccount = function (value) { + return !!(value && value._isKeystoreAccount); + }; + return KeystoreAccount; +}(properties_1.Description)); +exports.KeystoreAccount = KeystoreAccount; +function _decrypt(data, key, ciphertext) { + var cipher = (0, utils_1.searchPath)(data, "crypto/cipher"); + if (cipher === "aes-128-ctr") { + var iv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "crypto/cipherparams/iv")); + var counter = new aes_js_1.default.Counter(iv); + var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(key, counter); + return (0, bytes_1.arrayify)(aesCtr.decrypt(ciphertext)); + } + return null; +} +function _getAccount(data, key) { + var ciphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "crypto/ciphertext")); + var computedMAC = (0, bytes_1.hexlify)((0, keccak256_1.keccak256)((0, bytes_1.concat)([key.slice(16, 32), ciphertext]))).substring(2); + if (computedMAC !== (0, utils_1.searchPath)(data, "crypto/mac").toLowerCase()) { + throw new Error("invalid password"); + } + var privateKey = _decrypt(data, key.slice(0, 16), ciphertext); + if (!privateKey) { + logger.throwError("unsupported cipher", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "decrypt" + }); + } + var mnemonicKey = key.slice(32, 64); + var address = (0, transactions_1.computeAddress)(privateKey); + if (data.address) { + var check = data.address.toLowerCase(); + if (check.substring(0, 2) !== "0x") { + check = "0x" + check; + } + if ((0, address_1.getAddress)(check) !== address) { + throw new Error("address mismatch"); + } + } + var account = { + _isKeystoreAccount: true, + address: address, + privateKey: (0, bytes_1.hexlify)(privateKey) + }; + // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase + if ((0, utils_1.searchPath)(data, "x-ethers/version") === "0.1") { + var mnemonicCiphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "x-ethers/mnemonicCiphertext")); + var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "x-ethers/mnemonicCounter")); + var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv); + var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + var path = (0, utils_1.searchPath)(data, "x-ethers/path") || hdnode_1.defaultPath; + var locale = (0, utils_1.searchPath)(data, "x-ethers/locale") || "en"; + var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext)); + try { + var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale); + var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + account.mnemonic = node.mnemonic; + } + catch (error) { + // If we don't have the locale wordlist installed to + // read this mnemonic, just bail and don't set the + // mnemonic + if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { + throw error; + } + } + } + return new KeystoreAccount(account); +} +function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) { + return (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(passwordBytes, salt, count, dkLen, prfFunc)); +} +function pbkdf2(passwordBytes, salt, count, dkLen, prfFunc) { + return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc)); +} +function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) { + var passwordBytes = (0, utils_1.getPassword)(password); + var kdf = (0, utils_1.searchPath)(data, "crypto/kdf"); + if (kdf && typeof (kdf) === "string") { + var throwError = function (name, value) { + return logger.throwArgumentError("invalid key-derivation function parameters", name, value); + }; + if (kdf.toLowerCase() === "scrypt") { + var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "crypto/kdfparams/salt")); + var N = parseInt((0, utils_1.searchPath)(data, "crypto/kdfparams/n")); + var r = parseInt((0, utils_1.searchPath)(data, "crypto/kdfparams/r")); + var p = parseInt((0, utils_1.searchPath)(data, "crypto/kdfparams/p")); + // Check for all required parameters + if (!N || !r || !p) { + throwError("kdf", kdf); + } + // Make sure N is a power of 2 + if ((N & (N - 1)) !== 0) { + throwError("N", N); + } + var dkLen = parseInt((0, utils_1.searchPath)(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback); + } + else if (kdf.toLowerCase() === "pbkdf2") { + var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "crypto/kdfparams/salt")); + var prfFunc = null; + var prf = (0, utils_1.searchPath)(data, "crypto/kdfparams/prf"); + if (prf === "hmac-sha256") { + prfFunc = "sha256"; + } + else if (prf === "hmac-sha512") { + prfFunc = "sha512"; + } + else { + throwError("prf", prf); + } + var count = parseInt((0, utils_1.searchPath)(data, "crypto/kdfparams/c")); + var dkLen = parseInt((0, utils_1.searchPath)(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc); + } + } + return logger.throwArgumentError("unsupported key-derivation function", "kdf", kdf); +} +function decryptSync(json, password) { + var data = JSON.parse(json); + var key = _computeKdfKey(data, password, pbkdf2Sync, scrypt_js_1.default.syncScrypt); + return _getAccount(data, key); +} +exports.decryptSync = decryptSync; +function decrypt(json, password, progressCallback) { + return __awaiter(this, void 0, void 0, function () { + var data, key; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = JSON.parse(json); + return [4 /*yield*/, _computeKdfKey(data, password, pbkdf2, scrypt_js_1.default.scrypt, progressCallback)]; + case 1: + key = _a.sent(); + return [2 /*return*/, _getAccount(data, key)]; + } + }); + }); +} +exports.decrypt = decrypt; +function encrypt(account, password, options, progressCallback) { + try { + // Check the address matches the private key + if ((0, address_1.getAddress)(account.address) !== (0, transactions_1.computeAddress)(account.privateKey)) { + throw new Error("address/privateKey mismatch"); + } + // Check the mnemonic (if any) matches the private key + if (hasMnemonic(account)) { + var mnemonic = account.mnemonic; + var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || hdnode_1.defaultPath); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + } + } + catch (e) { + return Promise.reject(e); + } + // The options are optional, so adjust the call as needed + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (!options) { + options = {}; + } + var privateKey = (0, bytes_1.arrayify)(account.privateKey); + var passwordBytes = (0, utils_1.getPassword)(password); + var entropy = null; + var path = null; + var locale = null; + if (hasMnemonic(account)) { + var srcMnemonic = account.mnemonic; + entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || "en")); + path = srcMnemonic.path || hdnode_1.defaultPath; + locale = srcMnemonic.locale || "en"; + } + var client = options.client; + if (!client) { + client = "ethers.js"; + } + // Check/generate the salt + var salt = null; + if (options.salt) { + salt = (0, bytes_1.arrayify)(options.salt); + } + else { + salt = (0, random_1.randomBytes)(32); + ; + } + // Override initialization vector + var iv = null; + if (options.iv) { + iv = (0, bytes_1.arrayify)(options.iv); + if (iv.length !== 16) { + throw new Error("invalid iv"); + } + } + else { + iv = (0, random_1.randomBytes)(16); + } + // Override the uuid + var uuidRandom = null; + if (options.uuid) { + uuidRandom = (0, bytes_1.arrayify)(options.uuid); + if (uuidRandom.length !== 16) { + throw new Error("invalid uuid"); + } + } + else { + uuidRandom = (0, random_1.randomBytes)(16); + } + // Override the scrypt password-based key derivation function parameters + var N = (1 << 17), r = 8, p = 1; + if (options.scrypt) { + if (options.scrypt.N) { + N = options.scrypt.N; + } + if (options.scrypt.r) { + r = options.scrypt.r; + } + if (options.scrypt.p) { + p = options.scrypt.p; + } + } + // We take 64 bytes: + // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix) + // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet) + return scrypt_js_1.default.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then(function (key) { + key = (0, bytes_1.arrayify)(key); + // This will be used to encrypt the wallet (as per Web3 secret storage) + var derivedKey = key.slice(0, 16); + var macPrefix = key.slice(16, 32); + // This will be used to encrypt the mnemonic phrase (if any) + var mnemonicKey = key.slice(32, 64); + // Encrypt the private key + var counter = new aes_js_1.default.Counter(iv); + var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(derivedKey, counter); + var ciphertext = (0, bytes_1.arrayify)(aesCtr.encrypt(privateKey)); + // Compute the message authentication code, used to check the password + var mac = (0, keccak256_1.keccak256)((0, bytes_1.concat)([macPrefix, ciphertext])); + // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition + var data = { + address: account.address.substring(2).toLowerCase(), + id: (0, utils_1.uuidV4)(uuidRandom), + version: 3, + Crypto: { + cipher: "aes-128-ctr", + cipherparams: { + iv: (0, bytes_1.hexlify)(iv).substring(2), + }, + ciphertext: (0, bytes_1.hexlify)(ciphertext).substring(2), + kdf: "scrypt", + kdfparams: { + salt: (0, bytes_1.hexlify)(salt).substring(2), + n: N, + dklen: 32, + p: p, + r: r + }, + mac: mac.substring(2) + } + }; + // If we have a mnemonic, encrypt it into the JSON wallet + if (entropy) { + var mnemonicIv = (0, random_1.randomBytes)(16); + var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv); + var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + var mnemonicCiphertext = (0, bytes_1.arrayify)(mnemonicAesCtr.encrypt(entropy)); + var now = new Date(); + var timestamp = (now.getUTCFullYear() + "-" + + (0, utils_1.zpad)(now.getUTCMonth() + 1, 2) + "-" + + (0, utils_1.zpad)(now.getUTCDate(), 2) + "T" + + (0, utils_1.zpad)(now.getUTCHours(), 2) + "-" + + (0, utils_1.zpad)(now.getUTCMinutes(), 2) + "-" + + (0, utils_1.zpad)(now.getUTCSeconds(), 2) + ".0Z"); + data["x-ethers"] = { + client: client, + gethFilename: ("UTC--" + timestamp + "--" + data.address), + mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2), + mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2), + path: path, + locale: locale, + version: "0.1" + }; + } + return JSON.stringify(data); + }); +} +exports.encrypt = encrypt; +//# sourceMappingURL=keystore.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/keystore.js.map b/node_modules/@ethersproject/json-wallets/lib/keystore.js.map new file mode 100644 index 0000000..c65c95c --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/keystore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keystore.js","sourceRoot":"","sources":["../src.ts/keystore.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,kDAAyB;AACzB,wDAA+B;AAG/B,kDAAoD;AACpD,8CAAmF;AACnF,gDAA4G;AAC5G,sDAAqD;AACrD,gDAA0D;AAC1D,gDAAoD;AACpD,wDAAwD;AACxD,4DAA6D;AAE7D,iCAA+E;A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diff --git a/node_modules/@ethersproject/json-wallets/lib/utils.d.ts b/node_modules/@ethersproject/json-wallets/lib/utils.d.ts new file mode 100644 index 0000000..2feb728 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/utils.d.ts @@ -0,0 +1,7 @@ +import { Bytes, BytesLike } from "@ethersproject/bytes"; +export declare function looseArrayify(hexString: string): Uint8Array; +export declare function zpad(value: String | number, length: number): String; +export declare function getPassword(password: Bytes | string): Uint8Array; +export declare function searchPath(object: any, path: string): string; +export declare function uuidV4(randomBytes: BytesLike): string; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/utils.d.ts.map b/node_modules/@ethersproject/json-wallets/lib/utils.d.ts.map new file mode 100644 index 0000000..02a6c93 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAG3E,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAK3D;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,CAKhE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAyB5D;AAGD,wBAAgB,MAAM,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,CAqBrD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/utils.js b/node_modules/@ethersproject/json-wallets/lib/utils.js new file mode 100644 index 0000000..e931eae --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/utils.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uuidV4 = exports.searchPath = exports.getPassword = exports.zpad = exports.looseArrayify = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var strings_1 = require("@ethersproject/strings"); +function looseArrayify(hexString) { + if (typeof (hexString) === 'string' && hexString.substring(0, 2) !== '0x') { + hexString = '0x' + hexString; + } + return (0, bytes_1.arrayify)(hexString); +} +exports.looseArrayify = looseArrayify; +function zpad(value, length) { + value = String(value); + while (value.length < length) { + value = '0' + value; + } + return value; +} +exports.zpad = zpad; +function getPassword(password) { + if (typeof (password) === 'string') { + return (0, strings_1.toUtf8Bytes)(password, strings_1.UnicodeNormalizationForm.NFKC); + } + return (0, bytes_1.arrayify)(password); +} +exports.getPassword = getPassword; +function searchPath(object, path) { + var currentChild = object; + var comps = path.toLowerCase().split('/'); + for (var i = 0; i < comps.length; i++) { + // Search for a child object with a case-insensitive matching key + var matchingChild = null; + for (var key in currentChild) { + if (key.toLowerCase() === comps[i]) { + matchingChild = currentChild[key]; + break; + } + } + // Didn't find one. :'( + if (matchingChild === null) { + return null; + } + // Now check this child... + currentChild = matchingChild; + } + return currentChild; +} +exports.searchPath = searchPath; +// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4) +function uuidV4(randomBytes) { + var bytes = (0, bytes_1.arrayify)(randomBytes); + // Section: 4.1.3: + // - time_hi_and_version[12:16] = 0b0100 + bytes[6] = (bytes[6] & 0x0f) | 0x40; + // Section 4.4 + // - clock_seq_hi_and_reserved[6] = 0b0 + // - clock_seq_hi_and_reserved[7] = 0b1 + bytes[8] = (bytes[8] & 0x3f) | 0x80; + var value = (0, bytes_1.hexlify)(bytes); + return [ + value.substring(2, 10), + value.substring(10, 14), + value.substring(14, 18), + value.substring(18, 22), + value.substring(22, 34), + ].join("-"); +} +exports.uuidV4 = uuidV4; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/lib/utils.js.map b/node_modules/@ethersproject/json-wallets/lib/utils.js.map new file mode 100644 index 0000000..ddd1193 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAA2E;AAC3E,kDAA+E;AAE/E,SAAgB,aAAa,CAAC,SAAiB;IAC3C,IAAI,OAAM,CAAC,SAAS,CAAC,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;QACtE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;KAChC;IACD,OAAO,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AALD,sCAKC;AAED,SAAgB,IAAI,CAAC,KAAsB,EAAE,MAAc;IACvD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;QAAE,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;KAAE;IACtD,OAAO,KAAK,CAAC;AACjB,CAAC;AAJD,oBAIC;AAED,SAAgB,WAAW,CAAC,QAAwB;IAChD,IAAI,OAAM,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC/B,OAAO,IAAA,qBAAW,EAAC,QAAQ,EAAE,kCAAwB,CAAC,IAAI,CAAC,CAAC;KAC/D;IACD,OAAO,IAAA,gBAAQ,EAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AALD,kCAKC;AAED,SAAgB,UAAU,CAAC,MAAW,EAAE,IAAY;IAChD,IAAI,YAAY,GAAG,MAAM,CAAC;IAE1B,IAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,E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wBAqBC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/json-wallets/package.json b/node_modules/@ethersproject/json-wallets/package.json new file mode 100644 index 0000000..b1fb9ac --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/package.json @@ -0,0 +1,54 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/hdnode": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/pbkdf2": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/random": "^5.5.0", + "@ethersproject/strings": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + }, + "description": "Wallet management utilities for KeyStore and Crowdsale JSON wallets.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/json-wallets", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/json-wallets", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xde9c1ef5ff92f71418ec3430531320f776248a11e3e698caf551d0f164c29ae1", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/json-wallets/src.ts/_version.ts b/node_modules/@ethersproject/json-wallets/src.ts/_version.ts new file mode 100644 index 0000000..4420bec --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "json-wallets/5.5.0"; diff --git a/node_modules/@ethersproject/json-wallets/src.ts/crowdsale.ts b/node_modules/@ethersproject/json-wallets/src.ts/crowdsale.ts new file mode 100644 index 0000000..0b4e6f2 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/src.ts/crowdsale.ts @@ -0,0 +1,79 @@ +"use strict"; + +import aes from "aes-js"; + +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { getAddress } from "@ethersproject/address"; +import { arrayify, Bytes } from "@ethersproject/bytes"; +import { keccak256 } from "@ethersproject/keccak256"; +import { pbkdf2 } from "@ethersproject/pbkdf2"; +import { toUtf8Bytes } from "@ethersproject/strings"; +import { Description } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { getPassword, looseArrayify, searchPath } from "./utils"; + +export interface _CrowdsaleAccount { + address: string; + privateKey: string; + + _isCrowdsaleAccount: boolean; +} + +export class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; + readonly mnemonic?: string; + readonly path?: string; + + readonly _isCrowdsaleAccount: boolean; + + isCrowdsaleAccount(value: any): value is CrowdsaleAccount { + return !!(value && value._isCrowdsaleAccount); + } +} + +// See: https://github.com/ethereum/pyethsaletool +export function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount { + const data = JSON.parse(json); + + password = getPassword(password); + + // Ethereum Address + const ethaddr = getAddress(searchPath(data, "ethaddr")); + + // Encrypted Seed + const encseed = looseArrayify(searchPath(data, "encseed")); + if (!encseed || (encseed.length % 16) !== 0) { + logger.throwArgumentError("invalid encseed", "json", json); + } + + const key = arrayify(pbkdf2(password, password, 2000, 32, "sha256")).slice(0, 16); + + const iv = encseed.slice(0, 16); + const encryptedSeed = encseed.slice(16); + + // Decrypt the seed + const aesCbc = new aes.ModeOfOperation.cbc(key, iv); + const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed))); + + // This wallet format is weird... Convert the binary encoded hex to a string. + let seedHex = ""; + for (let i = 0; i < seed.length; i++) { + seedHex += String.fromCharCode(seed[i]); + } + + const seedHexBytes = toUtf8Bytes(seedHex); + + const privateKey = keccak256(seedHexBytes); + + return new CrowdsaleAccount ({ + _isCrowdsaleAccount: true, + address: ethaddr, + privateKey: privateKey + }); +} + diff --git a/node_modules/@ethersproject/json-wallets/src.ts/index.ts b/node_modules/@ethersproject/json-wallets/src.ts/index.ts new file mode 100644 index 0000000..37e2ad3 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/src.ts/index.ts @@ -0,0 +1,53 @@ +"use strict"; + +import { Bytes } from "@ethersproject/bytes"; +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; + +import { decrypt as decryptCrowdsale } from "./crowdsale"; +import { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from "./inspect"; +import { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from "./keystore"; + +function decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise { + if (isCrowdsaleWallet(json)) { + if (progressCallback) { progressCallback(0); } + const account = decryptCrowdsale(json, password) + if (progressCallback) { progressCallback(1); } + return Promise.resolve(account); + } + + if (isKeystoreWallet(json)) { + return decryptKeystore(json, password, progressCallback); + } + + return Promise.reject(new Error("invalid JSON wallet")); +} + +function decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount { + if (isCrowdsaleWallet(json)) { + return decryptCrowdsale(json, password) + } + + if (isKeystoreWallet(json)) { + return decryptKeystoreSync(json, password); + } + + throw new Error("invalid JSON wallet"); +} + +export { + decryptCrowdsale, + + decryptKeystore, + decryptKeystoreSync, + encryptKeystore, + + isCrowdsaleWallet, + isKeystoreWallet, + getJsonWalletAddress, + + decryptJsonWallet, + decryptJsonWalletSync, + + ProgressCallback, + EncryptOptions, +}; diff --git a/node_modules/@ethersproject/json-wallets/src.ts/inspect.ts b/node_modules/@ethersproject/json-wallets/src.ts/inspect.ts new file mode 100644 index 0000000..eac413a --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/src.ts/inspect.ts @@ -0,0 +1,48 @@ +"use strict"; + +import { getAddress } from "@ethersproject/address"; + + +export function isCrowdsaleWallet(json: string): boolean { + let data: any = null; + try { + data = JSON.parse(json); + } catch (error) { return false; } + + return (data.encseed && data.ethaddr); +} + +export function isKeystoreWallet(json: string): boolean { + let data: any = null; + try { + data = JSON.parse(json); + } catch (error) { return false; } + + if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) { + return false; + } + + // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff + return true; +} + +//export function isJsonWallet(json: string): boolean { +// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json)); +//} + +export function getJsonWalletAddress(json: string): string { + if (isCrowdsaleWallet(json)) { + try { + return getAddress(JSON.parse(json).ethaddr); + } catch (error) { return null; } + } + + if (isKeystoreWallet(json)) { + try { + return getAddress(JSON.parse(json).address); + } catch (error) { return null; } + } + + return null; +} + diff --git a/node_modules/@ethersproject/json-wallets/src.ts/keystore.ts b/node_modules/@ethersproject/json-wallets/src.ts/keystore.ts new file mode 100644 index 0000000..41ea298 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/src.ts/keystore.ts @@ -0,0 +1,377 @@ +"use strict"; + +import aes from "aes-js"; +import scrypt from "scrypt-js"; + +import { ExternallyOwnedAccount } from "@ethersproject/abstract-signer"; +import { getAddress } from "@ethersproject/address"; +import { arrayify, Bytes, BytesLike, concat, hexlify } from "@ethersproject/bytes"; +import { defaultPath, entropyToMnemonic, HDNode, Mnemonic, mnemonicToEntropy } from "@ethersproject/hdnode"; +import { keccak256 } from "@ethersproject/keccak256"; +import { pbkdf2 as _pbkdf2 } from "@ethersproject/pbkdf2"; +import { randomBytes } from "@ethersproject/random"; +import { Description } from "@ethersproject/properties"; +import { computeAddress } from "@ethersproject/transactions"; + +import { getPassword, looseArrayify, searchPath, uuidV4, zpad } from "./utils"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +// Exported Types + +function hasMnemonic(value: any): value is { mnemonic: Mnemonic } { + return (value != null && value.mnemonic && value.mnemonic.phrase); +} + +export interface _KeystoreAccount { + address: string; + privateKey: string; + mnemonic?: Mnemonic; + + _isKeystoreAccount: boolean; +} + +export class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount { + readonly address: string; + readonly privateKey: string; + readonly mnemonic?: Mnemonic; + + readonly _isKeystoreAccount: boolean; + + isKeystoreAccount(value: any): value is KeystoreAccount { + return !!(value && value._isKeystoreAccount); + } +} + +export type ProgressCallback = (percent: number) => void; + +export type EncryptOptions = { + iv?: BytesLike; + entropy?: BytesLike; + client?: string; + salt?: BytesLike; + uuid?: string; + scrypt?: { + N?: number; + r?: number; + p?: number; + } +} + +function _decrypt(data: any, key: Uint8Array, ciphertext: Uint8Array): Uint8Array { + const cipher = searchPath(data, "crypto/cipher"); + if (cipher === "aes-128-ctr") { + const iv = looseArrayify(searchPath(data, "crypto/cipherparams/iv")) + const counter = new aes.Counter(iv); + + const aesCtr = new aes.ModeOfOperation.ctr(key, counter); + + return arrayify(aesCtr.decrypt(ciphertext)); + } + + return null; +} + +function _getAccount(data: any, key: Uint8Array): KeystoreAccount { + const ciphertext = looseArrayify(searchPath(data, "crypto/ciphertext")); + + const computedMAC = hexlify(keccak256(concat([ key.slice(16, 32), ciphertext ]))).substring(2); + if (computedMAC !== searchPath(data, "crypto/mac").toLowerCase()) { + throw new Error("invalid password"); + } + + const privateKey = _decrypt(data, key.slice(0, 16), ciphertext); + + if (!privateKey) { + logger.throwError("unsupported cipher", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "decrypt" + }); + } + + const mnemonicKey = key.slice(32, 64); + + const address = computeAddress(privateKey); + if (data.address) { + let check = data.address.toLowerCase(); + if (check.substring(0, 2) !== "0x") { check = "0x" + check; } + + if (getAddress(check) !== address) { + throw new Error("address mismatch"); + } + } + + const account: _KeystoreAccount = { + _isKeystoreAccount: true, + address: address, + privateKey: hexlify(privateKey) + }; + + // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase + if (searchPath(data, "x-ethers/version") === "0.1") { + const mnemonicCiphertext = looseArrayify(searchPath(data, "x-ethers/mnemonicCiphertext")); + const mnemonicIv = looseArrayify(searchPath(data, "x-ethers/mnemonicCounter")); + + const mnemonicCounter = new aes.Counter(mnemonicIv); + const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + + const path = searchPath(data, "x-ethers/path") || defaultPath; + const locale = searchPath(data, "x-ethers/locale") || "en"; + + const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext)); + + try { + const mnemonic = entropyToMnemonic(entropy, locale); + const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path); + + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + + account.mnemonic = node.mnemonic; + + } catch (error) { + // If we don't have the locale wordlist installed to + // read this mnemonic, just bail and don't set the + // mnemonic + if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { + throw error; + } + } + } + + return new KeystoreAccount(account); +} + +type ScryptFunc = (pw: Uint8Array, salt: Uint8Array, n: number, r: number, p: number, dkLen: number, callback?: ProgressCallback) => T; +type Pbkdf2Func = (pw: Uint8Array, salt: Uint8Array, c: number, dkLen: number, prfFunc: string) => T; + +function pbkdf2Sync(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Uint8Array { + return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc)); +} + +function pbkdf2(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Promise { + return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc)); +} + +function _computeKdfKey(data: any, password: Bytes | string, pbkdf2Func: Pbkdf2Func, scryptFunc: ScryptFunc, progressCallback?: ProgressCallback): T { + const passwordBytes = getPassword(password); + + const kdf = searchPath(data, "crypto/kdf"); + + if (kdf && typeof(kdf) === "string") { + const throwError = function(name: string, value: any): never { + return logger.throwArgumentError("invalid key-derivation function parameters", name, value); + } + + if (kdf.toLowerCase() === "scrypt") { + const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); + const N = parseInt(searchPath(data, "crypto/kdfparams/n")); + const r = parseInt(searchPath(data, "crypto/kdfparams/r")); + const p = parseInt(searchPath(data, "crypto/kdfparams/p")); + + // Check for all required parameters + if (!N || !r || !p) { throwError("kdf", kdf); } + + // Make sure N is a power of 2 + if ((N & (N - 1)) !== 0) { throwError("N", N); } + + const dkLen = parseInt(searchPath(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { throwError("dklen", dkLen); } + + return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback); + + } else if (kdf.toLowerCase() === "pbkdf2") { + + const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); + + let prfFunc: string = null; + const prf = searchPath(data, "crypto/kdfparams/prf"); + if (prf === "hmac-sha256") { + prfFunc = "sha256"; + } else if (prf === "hmac-sha512") { + prfFunc = "sha512"; + } else { + throwError("prf", prf); + } + + const count = parseInt(searchPath(data, "crypto/kdfparams/c")); + + const dkLen = parseInt(searchPath(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { throwError("dklen", dkLen); } + + return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc); + } + } + + return logger.throwArgumentError("unsupported key-derivation function", "kdf", kdf); +} + + +export function decryptSync(json: string, password: Bytes | string): KeystoreAccount { + const data = JSON.parse(json); + + const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt); + return _getAccount(data, key); +} + +export async function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise { + const data = JSON.parse(json); + + const key = await _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback); + return _getAccount(data, key); +} + + +export function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise { + + try { + // Check the address matches the private key + if (getAddress(account.address) !== computeAddress(account.privateKey)) { + throw new Error("address/privateKey mismatch"); + } + + // Check the mnemonic (if any) matches the private key + if (hasMnemonic(account)) { + const mnemonic = account.mnemonic; + const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath); + + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + } + + } catch (e) { + return Promise.reject(e); + } + + // The options are optional, so adjust the call as needed + if (typeof(options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (!options) { options = {}; } + + const privateKey: Uint8Array = arrayify(account.privateKey); + const passwordBytes = getPassword(password); + + let entropy: Uint8Array = null + let path: string = null; + let locale: string = null; + if (hasMnemonic(account)) { + const srcMnemonic = account.mnemonic; + entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || "en")); + path = srcMnemonic.path || defaultPath; + locale = srcMnemonic.locale || "en"; + } + + let client = options.client; + if (!client) { client = "ethers.js"; } + + // Check/generate the salt + let salt: Uint8Array = null; + if (options.salt) { + salt = arrayify(options.salt); + } else { + salt = randomBytes(32);; + } + + // Override initialization vector + let iv: Uint8Array = null; + if (options.iv) { + iv = arrayify(options.iv); + if (iv.length !== 16) { throw new Error("invalid iv"); } + } else { + iv = randomBytes(16); + } + + // Override the uuid + let uuidRandom: Uint8Array = null; + if (options.uuid) { + uuidRandom = arrayify(options.uuid); + if (uuidRandom.length !== 16) { throw new Error("invalid uuid"); } + } else { + uuidRandom = randomBytes(16); + } + + // Override the scrypt password-based key derivation function parameters + let N = (1 << 17), r = 8, p = 1; + if (options.scrypt) { + if (options.scrypt.N) { N = options.scrypt.N; } + if (options.scrypt.r) { r = options.scrypt.r; } + if (options.scrypt.p) { p = options.scrypt.p; } + } + + // We take 64 bytes: + // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix) + // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet) + return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => { + key = arrayify(key); + + // This will be used to encrypt the wallet (as per Web3 secret storage) + const derivedKey = key.slice(0, 16); + const macPrefix = key.slice(16, 32); + + // This will be used to encrypt the mnemonic phrase (if any) + const mnemonicKey = key.slice(32, 64); + + // Encrypt the private key + const counter = new aes.Counter(iv); + const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter); + const ciphertext = arrayify(aesCtr.encrypt(privateKey)); + + // Compute the message authentication code, used to check the password + const mac = keccak256(concat([macPrefix, ciphertext])) + + // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition + const data: { [key: string]: any } = { + address: account.address.substring(2).toLowerCase(), + id: uuidV4(uuidRandom), + version: 3, + Crypto: { + cipher: "aes-128-ctr", + cipherparams: { + iv: hexlify(iv).substring(2), + }, + ciphertext: hexlify(ciphertext).substring(2), + kdf: "scrypt", + kdfparams: { + salt: hexlify(salt).substring(2), + n: N, + dklen: 32, + p: p, + r: r + }, + mac: mac.substring(2) + } + }; + + // If we have a mnemonic, encrypt it into the JSON wallet + if (entropy) { + const mnemonicIv = randomBytes(16); + const mnemonicCounter = new aes.Counter(mnemonicIv); + const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy)); + const now = new Date(); + const timestamp = (now.getUTCFullYear() + "-" + + zpad(now.getUTCMonth() + 1, 2) + "-" + + zpad(now.getUTCDate(), 2) + "T" + + zpad(now.getUTCHours(), 2) + "-" + + zpad(now.getUTCMinutes(), 2) + "-" + + zpad(now.getUTCSeconds(), 2) + ".0Z" + ); + data["x-ethers"] = { + client: client, + gethFilename: ("UTC--" + timestamp + "--" + data.address), + mnemonicCounter: hexlify(mnemonicIv).substring(2), + mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2), + path: path, + locale: locale, + version: "0.1" + }; + } + + return JSON.stringify(data); + }); +} diff --git a/node_modules/@ethersproject/json-wallets/src.ts/utils.ts b/node_modules/@ethersproject/json-wallets/src.ts/utils.ts new file mode 100644 index 0000000..2140503 --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/src.ts/utils.ts @@ -0,0 +1,76 @@ +"use strict"; + +import { arrayify, Bytes, BytesLike, hexlify } from "@ethersproject/bytes"; +import { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings'; + +export function looseArrayify(hexString: string): Uint8Array { + if (typeof(hexString) === 'string' && hexString.substring(0, 2) !== '0x') { + hexString = '0x' + hexString; + } + return arrayify(hexString); +} + +export function zpad(value: String | number, length: number): String { + value = String(value); + while (value.length < length) { value = '0' + value; } + return value; +} + +export function getPassword(password: Bytes | string): Uint8Array { + if (typeof(password) === 'string') { + return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC); + } + return arrayify(password); +} + +export function searchPath(object: any, path: string): string { + let currentChild = object; + + const comps = path.toLowerCase().split('/'); + for (let i = 0; i < comps.length; i++) { + + // Search for a child object with a case-insensitive matching key + let matchingChild = null; + for (const key in currentChild) { + if (key.toLowerCase() === comps[i]) { + matchingChild = currentChild[key]; + break; + } + } + + // Didn't find one. :'( + if (matchingChild === null) { + return null; + } + + // Now check this child... + currentChild = matchingChild; + } + + return currentChild; +} + +// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4) +export function uuidV4(randomBytes: BytesLike): string { + const bytes = arrayify(randomBytes); + + // Section: 4.1.3: + // - time_hi_and_version[12:16] = 0b0100 + bytes[6] = (bytes[6] & 0x0f) | 0x40; + + // Section 4.4 + // - clock_seq_hi_and_reserved[6] = 0b0 + // - clock_seq_hi_and_reserved[7] = 0b1 + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + const value = hexlify(bytes); + + return [ + value.substring(2, 10), + value.substring(10, 14), + value.substring(14, 18), + value.substring(18, 22), + value.substring(22, 34), + ].join("-"); +} + diff --git a/node_modules/@ethersproject/json-wallets/thirdparty.d.ts b/node_modules/@ethersproject/json-wallets/thirdparty.d.ts new file mode 100644 index 0000000..a50468d --- /dev/null +++ b/node_modules/@ethersproject/json-wallets/thirdparty.d.ts @@ -0,0 +1,22 @@ +declare module "aes-js" { + export class Counter { + constructor(iv: Uint8Array); + } + export namespace ModeOfOperation { + class cbc{ + constructor(key: Uint8Array, iv: Uint8Array); + decrypt(data: Uint8Array): Uint8Array; + encrypt(data: Uint8Array): Uint8Array; + } + class ctr{ + constructor(key: Uint8Array, counter: Counter); + decrypt(data: Uint8Array): Uint8Array; + encrypt(data: Uint8Array): Uint8Array; + } + } + export namespace padding { + export namespace pkcs7 { + export function strip(data: Uint8Array): Uint8Array; + } + } +} diff --git a/node_modules/@ethersproject/keccak256/LICENSE.md b/node_modules/@ethersproject/keccak256/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/keccak256/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/keccak256/README.md b/node_modules/@ethersproject/keccak256/README.md new file mode 100644 index 0000000..bc9da64 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/README.md @@ -0,0 +1,29 @@ +KECCAK256 Hash Function +======================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for the identify function (i.e. KECCAK256) use in Ethereum. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/#utils-keccak256). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + keccak256 + +} = require("@ethersproject/keccak256"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts b/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts new file mode 100644 index 0000000..aff69ed --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "keccak256/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/_version.js b/node_modules/@ethersproject/keccak256/lib.esm/_version.js new file mode 100644 index 0000000..ded4f17 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "keccak256/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/_version.js.map b/node_modules/@ethersproject/keccak256/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts b/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts new file mode 100644 index 0000000..0274dde --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts @@ -0,0 +1,3 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function keccak256(data: BytesLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts.map b/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts.map new file mode 100644 index 0000000..12db101 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEjD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/index.js b/node_modules/@ethersproject/keccak256/lib.esm/index.js new file mode 100644 index 0000000..760d8bb --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/index.js @@ -0,0 +1,7 @@ +"use strict"; +import sha3 from "js-sha3"; +import { arrayify } from "@ethersproject/bytes"; +export function keccak256(data) { + return '0x' + sha3.keccak_256(arrayify(data)); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib.esm/index.js.map b/node_modules/@ethersproject/keccak256/lib.esm/index.js.map new file mode 100644 index 0000000..336db67 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAE3D,MAAM,UAAU,SAAS,CAAC,IAAe;IACrC,OAAO,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/_version.d.ts b/node_modules/@ethersproject/keccak256/lib/_version.d.ts new file mode 100644 index 0000000..aff69ed --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "keccak256/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/_version.d.ts.map b/node_modules/@ethersproject/keccak256/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/_version.js b/node_modules/@ethersproject/keccak256/lib/_version.js new file mode 100644 index 0000000..04e5fa4 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "keccak256/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/_version.js.map b/node_modules/@ethersproject/keccak256/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/index.d.ts b/node_modules/@ethersproject/keccak256/lib/index.d.ts new file mode 100644 index 0000000..0274dde --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/index.d.ts @@ -0,0 +1,3 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function keccak256(data: BytesLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/index.d.ts.map b/node_modules/@ethersproject/keccak256/lib/index.d.ts.map new file mode 100644 index 0000000..12db101 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEjD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/index.js b/node_modules/@ethersproject/keccak256/lib/index.js new file mode 100644 index 0000000..c08f2ed --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/index.js @@ -0,0 +1,13 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.keccak256 = void 0; +var js_sha3_1 = __importDefault(require("js-sha3")); +var bytes_1 = require("@ethersproject/bytes"); +function keccak256(data) { + return '0x' + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data)); +} +exports.keccak256 = keccak256; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/lib/index.js.map b/node_modules/@ethersproject/keccak256/lib/index.js.map new file mode 100644 index 0000000..eb93cf2 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb,oDAA2B;AAE3B,8CAA2D;AAE3D,SAAgB,SAAS,CAAC,IAAe;IACrC,OAAO,IAAI,GAAG,iBAAI,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;AAClD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/keccak256/package.json b/node_modules/@ethersproject/keccak256/package.json new file mode 100644 index 0000000..c4bc06e --- /dev/null +++ b/node_modules/@ethersproject/keccak256/package.json @@ -0,0 +1,43 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "js-sha3": "0.8.0" + }, + "description": "The keccak256 hash function for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/keccak256", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/keccak256", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xdd7111141318ba77399dff10f1012094266be538dcabc80de0154a0ddfa262f0", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/keccak256/src.ts/_version.ts b/node_modules/@ethersproject/keccak256/src.ts/_version.ts new file mode 100644 index 0000000..24f8da5 --- /dev/null +++ b/node_modules/@ethersproject/keccak256/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "keccak256/5.5.0"; diff --git a/node_modules/@ethersproject/keccak256/src.ts/index.ts b/node_modules/@ethersproject/keccak256/src.ts/index.ts new file mode 100644 index 0000000..f3e979a --- /dev/null +++ b/node_modules/@ethersproject/keccak256/src.ts/index.ts @@ -0,0 +1,9 @@ +"use strict"; + +import sha3 from "js-sha3"; + +import { arrayify, BytesLike } from "@ethersproject/bytes"; + +export function keccak256(data: BytesLike): string { + return '0x' + sha3.keccak_256(arrayify(data)); +} diff --git a/node_modules/@ethersproject/logger/README.md b/node_modules/@ethersproject/logger/README.md new file mode 100644 index 0000000..114b2fd --- /dev/null +++ b/node_modules/@ethersproject/logger/README.md @@ -0,0 +1,35 @@ +Logger +====== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for managing logging and errors to maintain a standard +structure. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/logger/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Logger, + + // Enums + + ErrorCode, + + LogLevel, + +} = require("@ethersproject/logger"); +``` + + +License +------- + +MIT License. diff --git a/node_modules/@ethersproject/logger/lib.esm/_version.d.ts b/node_modules/@ethersproject/logger/lib.esm/_version.d.ts new file mode 100644 index 0000000..2d72051 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "logger/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/logger/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/_version.js b/node_modules/@ethersproject/logger/lib.esm/_version.js new file mode 100644 index 0000000..cea5352 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "logger/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/_version.js.map b/node_modules/@ethersproject/logger/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/index.d.ts b/node_modules/@ethersproject/logger/lib.esm/index.d.ts new file mode 100644 index 0000000..8e74d3f --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/index.d.ts @@ -0,0 +1,52 @@ +export declare enum LogLevel { + DEBUG = "DEBUG", + INFO = "INFO", + WARNING = "WARNING", + ERROR = "ERROR", + OFF = "OFF" +} +export declare enum ErrorCode { + UNKNOWN_ERROR = "UNKNOWN_ERROR", + NOT_IMPLEMENTED = "NOT_IMPLEMENTED", + UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION", + NETWORK_ERROR = "NETWORK_ERROR", + SERVER_ERROR = "SERVER_ERROR", + TIMEOUT = "TIMEOUT", + BUFFER_OVERRUN = "BUFFER_OVERRUN", + NUMERIC_FAULT = "NUMERIC_FAULT", + MISSING_NEW = "MISSING_NEW", + INVALID_ARGUMENT = "INVALID_ARGUMENT", + MISSING_ARGUMENT = "MISSING_ARGUMENT", + UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT", + CALL_EXCEPTION = "CALL_EXCEPTION", + INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", + NONCE_EXPIRED = "NONCE_EXPIRED", + REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED", + UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT", + TRANSACTION_REPLACED = "TRANSACTION_REPLACED" +} +export declare class Logger { + readonly version: string; + static errors: typeof ErrorCode; + static levels: typeof LogLevel; + constructor(version: string); + _log(logLevel: LogLevel, args: Array): void; + debug(...args: Array): void; + info(...args: Array): void; + warn(...args: Array): void; + makeError(message: string, code?: ErrorCode, params?: any): Error; + throwError(message: string, code?: ErrorCode, params?: any): never; + throwArgumentError(message: string, name: string, value: any): never; + assert(condition: any, message: string, code?: ErrorCode, params?: any): void; + assertArgument(condition: any, message: string, name: string, value: any): void; + checkNormalize(message?: string): void; + checkSafeUint53(value: number, message?: string): void; + checkArgumentCount(count: number, expectedCount: number, message?: string): void; + checkNew(target: any, kind: any): void; + checkAbstract(target: any, kind: any): void; + static globalLogger(): Logger; + static setCensorship(censorship: boolean, permanent?: boolean): void; + static setLogLevel(logLevel: LogLevel): void; + static from(version: string): Logger; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/index.d.ts.map b/node_modules/@ethersproject/logger/lib.esm/index.d.ts.map new file mode 100644 index 0000000..981279a --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AA2CA,oBAAY,QAAQ;IAChB,KAAK,UAAa;IAClB,IAAI,SAAa;IACjB,OAAO,YAAa;IACpB,KAAK,UAAa;IAClB,GAAG,QAAa;CACnB;AAGD,oBAAY,SAAS;IAMjB,aAAa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,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;IAK7E,cAAc,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAK/E,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAStC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAsBtD,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAsBhF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAMtC,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAY3C,MAAM,CAAC,YAAY,IAAI,MAAM;IAK7B,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI;IAkBpE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAS5C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAGvC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/index.js b/node_modules/@ethersproject/logger/lib.esm/index.js new file mode 100644 index 0000000..a5db56d --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/index.js @@ -0,0 +1,316 @@ +"use strict"; +let _permanentCensorErrors = false; +let _censorErrors = false; +const LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 }; +let _logLevel = LogLevels["default"]; +import { version } from "./_version"; +let _globalLogger = null; +function _checkNormalize() { + try { + const missing = []; + // Make sure all forms of normalization are supported + ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => { + try { + if ("test".normalize(form) !== "test") { + throw new Error("bad normalize"); + } + ; + } + catch (error) { + missing.push(form); + } + }); + if (missing.length) { + throw new Error("missing " + missing.join(", ")); + } + if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) { + throw new Error("broken implementation"); + } + } + catch (error) { + return error.message; + } + return null; +} +const _normalizeError = _checkNormalize(); +export var LogLevel; +(function (LogLevel) { + LogLevel["DEBUG"] = "DEBUG"; + LogLevel["INFO"] = "INFO"; + LogLevel["WARNING"] = "WARNING"; + LogLevel["ERROR"] = "ERROR"; + LogLevel["OFF"] = "OFF"; +})(LogLevel || (LogLevel = {})); +export var ErrorCode; +(function (ErrorCode) { + /////////////////// + // Generic Errors + // Unknown Error + ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; + // Not Implemented + ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED"; + // Unsupported Operation + // - operation + ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION"; + // Network Error (i.e. Ethereum Network, such as an invalid chain ID) + // - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown) + ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR"; + // Some sort of bad response from the server + ErrorCode["SERVER_ERROR"] = "SERVER_ERROR"; + // Timeout + ErrorCode["TIMEOUT"] = "TIMEOUT"; + /////////////////// + // Operational Errors + // Buffer Overrun + ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN"; + // Numeric Fault + // - operation: the operation being executed + // - fault: the reason this faulted + ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT"; + /////////////////// + // Argument Errors + // Missing new operator to an object + // - name: The name of the class + ErrorCode["MISSING_NEW"] = "MISSING_NEW"; + // Invalid argument (e.g. value is incompatible with type) to a function: + // - argument: The argument name that was invalid + // - value: The value of the argument + ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT"; + // Missing argument to a function: + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT"; + // Too many arguments + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT"; + /////////////////// + // Blockchain Errors + // Call exception + // - transaction: the transaction + // - address?: the contract address + // - args?: The arguments passed into the function + // - method?: The Solidity method signature + // - errorSignature?: The EIP848 error signature + // - errorArgs?: The EIP848 error parameters + // - reason: The reason (only for EIP848 "Error(string)") + ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION"; + // Insufficient funds (< value + gasLimit * gasPrice) + // - transaction: the transaction attempted + ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS"; + // Nonce has already been used + // - transaction: the transaction attempted + ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED"; + // The replacement fee for the transaction is too low + // - transaction: the transaction attempted + ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED"; + // The gas limit could not be estimated + // - transaction: the transaction passed to estimateGas + ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT"; + // The transaction was replaced by one with a higher gas price + // - reason: "cancelled", "replaced" or "repriced" + // - cancelled: true if reason == "cancelled" or reason == "replaced") + // - hash: original transaction hash + // - replacement: the full TransactionsResponse for the replacement + // - receipt: the receipt of the replacement + ErrorCode["TRANSACTION_REPLACED"] = "TRANSACTION_REPLACED"; +})(ErrorCode || (ErrorCode = {})); +; +const HEX = "0123456789abcdef"; +export class Logger { + constructor(version) { + Object.defineProperty(this, "version", { + enumerable: true, + value: version, + writable: false + }); + } + _log(logLevel, args) { + const level = logLevel.toLowerCase(); + if (LogLevels[level] == null) { + this.throwArgumentError("invalid log level name", "logLevel", logLevel); + } + if (_logLevel > LogLevels[level]) { + return; + } + console.log.apply(console, args); + } + debug(...args) { + this._log(Logger.levels.DEBUG, args); + } + info(...args) { + this._log(Logger.levels.INFO, args); + } + warn(...args) { + this._log(Logger.levels.WARNING, args); + } + makeError(message, code, params) { + // Errors are being censored + if (_censorErrors) { + return this.makeError("censored error", code, {}); + } + if (!code) { + code = Logger.errors.UNKNOWN_ERROR; + } + if (!params) { + params = {}; + } + const messageDetails = []; + Object.keys(params).forEach((key) => { + const value = params[key]; + try { + if (value instanceof Uint8Array) { + let hex = ""; + for (let i = 0; i < value.length; i++) { + hex += HEX[value[i] >> 4]; + hex += HEX[value[i] & 0x0f]; + } + messageDetails.push(key + "=Uint8Array(0x" + hex + ")"); + } + else { + messageDetails.push(key + "=" + JSON.stringify(value)); + } + } + catch (error) { + messageDetails.push(key + "=" + JSON.stringify(params[key].toString())); + } + }); + messageDetails.push(`code=${code}`); + messageDetails.push(`version=${this.version}`); + const reason = message; + if (messageDetails.length) { + message += " (" + messageDetails.join(", ") + ")"; + } + // @TODO: Any?? + const error = new Error(message); + error.reason = reason; + error.code = code; + Object.keys(params).forEach(function (key) { + error[key] = params[key]; + }); + return error; + } + throwError(message, code, params) { + throw this.makeError(message, code, params); + } + throwArgumentError(message, name, value) { + return this.throwError(message, Logger.errors.INVALID_ARGUMENT, { + argument: name, + value: value + }); + } + assert(condition, message, code, params) { + if (!!condition) { + return; + } + this.throwError(message, code, params); + } + assertArgument(condition, message, name, value) { + if (!!condition) { + return; + } + this.throwArgumentError(message, name, value); + } + checkNormalize(message) { + if (message == null) { + message = "platform missing String.prototype.normalize"; + } + if (_normalizeError) { + this.throwError("platform missing String.prototype.normalize", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "String.prototype.normalize", form: _normalizeError + }); + } + } + checkSafeUint53(value, message) { + if (typeof (value) !== "number") { + return; + } + if (message == null) { + message = "value not safe"; + } + if (value < 0 || value >= 0x1fffffffffffff) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "out-of-safe-range", + value: value + }); + } + if (value % 1) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "non-integer", + value: value + }); + } + } + checkArgumentCount(count, expectedCount, message) { + if (message) { + message = ": " + message; + } + else { + message = ""; + } + if (count < expectedCount) { + this.throwError("missing argument" + message, Logger.errors.MISSING_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + if (count > expectedCount) { + this.throwError("too many arguments" + message, Logger.errors.UNEXPECTED_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + } + checkNew(target, kind) { + if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + } + checkAbstract(target, kind) { + if (target === kind) { + this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); + } + else if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + } + static globalLogger() { + if (!_globalLogger) { + _globalLogger = new Logger(version); + } + return _globalLogger; + } + static setCensorship(censorship, permanent) { + if (!censorship && permanent) { + this.globalLogger().throwError("cannot permanently disable censorship", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + if (_permanentCensorErrors) { + if (!censorship) { + return; + } + this.globalLogger().throwError("error censorship permanent", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + _censorErrors = !!censorship; + _permanentCensorErrors = !!permanent; + } + static setLogLevel(logLevel) { + const level = LogLevels[logLevel.toLowerCase()]; + if (level == null) { + Logger.globalLogger().warn("invalid log level - " + logLevel); + return; + } + _logLevel = level; + } + static from(version) { + return new Logger(version); + } +} +Logger.errors = ErrorCode; +Logger.levels = LogLevel; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib.esm/index.js.map b/node_modules/@ethersproject/logger/lib.esm/index.js.map new file mode 100644 index 0000000..03fd470 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib.esm/index.js.map @@ -0,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CAAC;IAED,MAAM,CAAC,IAAI,CAAC,OAAe;QACvB,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;;AA9MM,aAAM,GAAG,SAAS,CAAC;AAEnB,aAAM,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/_version.d.ts b/node_modules/@ethersproject/logger/lib/_version.d.ts new file mode 100644 index 0000000..2d72051 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "logger/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/_version.d.ts.map b/node_modules/@ethersproject/logger/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/_version.js b/node_modules/@ethersproject/logger/lib/_version.js new file mode 100644 index 0000000..8c488cf --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "logger/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/_version.js.map b/node_modules/@ethersproject/logger/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/index.d.ts b/node_modules/@ethersproject/logger/lib/index.d.ts new file mode 100644 index 0000000..8e74d3f --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/index.d.ts @@ -0,0 +1,52 @@ +export declare enum LogLevel { + DEBUG = "DEBUG", + INFO = "INFO", + WARNING = "WARNING", + ERROR = "ERROR", + OFF = "OFF" +} +export declare enum ErrorCode { + UNKNOWN_ERROR = "UNKNOWN_ERROR", + NOT_IMPLEMENTED = "NOT_IMPLEMENTED", + UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION", + NETWORK_ERROR = "NETWORK_ERROR", + SERVER_ERROR = "SERVER_ERROR", + TIMEOUT = "TIMEOUT", + BUFFER_OVERRUN = "BUFFER_OVERRUN", + NUMERIC_FAULT = "NUMERIC_FAULT", + MISSING_NEW = "MISSING_NEW", + INVALID_ARGUMENT = "INVALID_ARGUMENT", + MISSING_ARGUMENT = "MISSING_ARGUMENT", + UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT", + CALL_EXCEPTION = "CALL_EXCEPTION", + INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", + NONCE_EXPIRED = "NONCE_EXPIRED", + REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED", + UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT", + TRANSACTION_REPLACED = "TRANSACTION_REPLACED" +} +export declare class Logger { + readonly version: string; + static errors: typeof ErrorCode; + static levels: typeof LogLevel; + constructor(version: string); + _log(logLevel: LogLevel, args: Array): void; + debug(...args: Array): void; + info(...args: Array): void; + warn(...args: Array): void; + makeError(message: string, code?: ErrorCode, params?: any): Error; + throwError(message: string, code?: ErrorCode, params?: any): never; + throwArgumentError(message: string, name: string, value: any): never; + assert(condition: any, message: string, code?: ErrorCode, params?: any): void; + assertArgument(condition: any, message: string, name: string, value: any): void; + checkNormalize(message?: string): void; + checkSafeUint53(value: number, message?: string): void; + checkArgumentCount(count: number, expectedCount: number, message?: string): void; + checkNew(target: any, kind: any): void; + checkAbstract(target: any, kind: any): void; + static globalLogger(): Logger; + static setCensorship(censorship: boolean, permanent?: boolean): void; + static setLogLevel(logLevel: LogLevel): void; + static from(version: string): Logger; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/index.d.ts.map b/node_modules/@ethersproject/logger/lib/index.d.ts.map new file mode 100644 index 0000000..981279a --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AA2CA,oBAAY,QAAQ;IAChB,KAAK,UAAa;IAClB,IAAI,SAAa;IACjB,OAAO,YAAa;IACpB,KAAK,UAAa;IAClB,GAAG,QAAa;CACnB;AAGD,oBAAY,SAAS;IAMjB,aAAa,kBAAkB;IAG/B,eAAe,oBAAoB;IAInC,qBAAqB,0BAA0B;IAI/C,aAAa,kBAAkB;IAG/B,YAAY,iBAAiB;IAG7B,OAAO,YAAY;IAMnB,cAAc,mBAAmB;IAKjC,aAAa,kBAAkB;IAQ/B,WAAW,gBAAgB;IAK3B,gBAAgB,qBAAqB;IAKrC,gBAAgB,qBAAqB;IAKrC,mBAAmB,wBAAwB;IAc3C,cAAc,mBAAmB;IAIjC,kBAAkB,uBAAuB;IAIzC,aAAa,kBAAkB;IAI/B,uBAAuB,4BAA4B;IAInD,uBAAuB,4BAA4B;IAQnD,oBAAoB,yBAAyB;CAChD;AAID,qBAAa,MAAM;IACf,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,MAAM,CAAC,MAAM,mBAAa;IAE1B,MAAM,CAAC,MAAM,kBAAY;gBAEb,OAAO,EAAE,MAAM;IAQ3B,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI;IAShD,KAAK,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IA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GAAG,IAAI;IAkBpE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAS5C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAGvC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/index.js b/node_modules/@ethersproject/logger/lib/index.js new file mode 100644 index 0000000..0765292 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/index.js @@ -0,0 +1,332 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Logger = exports.ErrorCode = exports.LogLevel = void 0; +var _permanentCensorErrors = false; +var _censorErrors = false; +var LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 }; +var _logLevel = LogLevels["default"]; +var _version_1 = require("./_version"); +var _globalLogger = null; +function _checkNormalize() { + try { + var missing_1 = []; + // Make sure all forms of normalization are supported + ["NFD", "NFC", "NFKD", "NFKC"].forEach(function (form) { + try { + if ("test".normalize(form) !== "test") { + throw new Error("bad normalize"); + } + ; + } + catch (error) { + missing_1.push(form); + } + }); + if (missing_1.length) { + throw new Error("missing " + missing_1.join(", ")); + } + if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) { + throw new Error("broken implementation"); + } + } + catch (error) { + return error.message; + } + return null; +} +var _normalizeError = _checkNormalize(); +var LogLevel; +(function (LogLevel) { + LogLevel["DEBUG"] = "DEBUG"; + LogLevel["INFO"] = "INFO"; + LogLevel["WARNING"] = "WARNING"; + LogLevel["ERROR"] = "ERROR"; + LogLevel["OFF"] = "OFF"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +var ErrorCode; +(function (ErrorCode) { + /////////////////// + // Generic Errors + // Unknown Error + ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; + // Not Implemented + ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED"; + // Unsupported Operation + // - operation + ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION"; + // Network Error (i.e. Ethereum Network, such as an invalid chain ID) + // - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown) + ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR"; + // Some sort of bad response from the server + ErrorCode["SERVER_ERROR"] = "SERVER_ERROR"; + // Timeout + ErrorCode["TIMEOUT"] = "TIMEOUT"; + /////////////////// + // Operational Errors + // Buffer Overrun + ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN"; + // Numeric Fault + // - operation: the operation being executed + // - fault: the reason this faulted + ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT"; + /////////////////// + // Argument Errors + // Missing new operator to an object + // - name: The name of the class + ErrorCode["MISSING_NEW"] = "MISSING_NEW"; + // Invalid argument (e.g. value is incompatible with type) to a function: + // - argument: The argument name that was invalid + // - value: The value of the argument + ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT"; + // Missing argument to a function: + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT"; + // Too many arguments + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT"; + /////////////////// + // Blockchain Errors + // Call exception + // - transaction: the transaction + // - address?: the contract address + // - args?: The arguments passed into the function + // - method?: The Solidity method signature + // - errorSignature?: The EIP848 error signature + // - errorArgs?: The EIP848 error parameters + // - reason: The reason (only for EIP848 "Error(string)") + ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION"; + // Insufficient funds (< value + gasLimit * gasPrice) + // - transaction: the transaction attempted + ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS"; + // Nonce has already been used + // - transaction: the transaction attempted + ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED"; + // The replacement fee for the transaction is too low + // - transaction: the transaction attempted + ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED"; + // The gas limit could not be estimated + // - transaction: the transaction passed to estimateGas + ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT"; + // The transaction was replaced by one with a higher gas price + // - reason: "cancelled", "replaced" or "repriced" + // - cancelled: true if reason == "cancelled" or reason == "replaced") + // - hash: original transaction hash + // - replacement: the full TransactionsResponse for the replacement + // - receipt: the receipt of the replacement + ErrorCode["TRANSACTION_REPLACED"] = "TRANSACTION_REPLACED"; +})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); +; +var HEX = "0123456789abcdef"; +var Logger = /** @class */ (function () { + function Logger(version) { + Object.defineProperty(this, "version", { + enumerable: true, + value: version, + writable: false + }); + } + Logger.prototype._log = function (logLevel, args) { + var level = logLevel.toLowerCase(); + if (LogLevels[level] == null) { + this.throwArgumentError("invalid log level name", "logLevel", logLevel); + } + if (_logLevel > LogLevels[level]) { + return; + } + console.log.apply(console, args); + }; + Logger.prototype.debug = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this._log(Logger.levels.DEBUG, args); + }; + Logger.prototype.info = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this._log(Logger.levels.INFO, args); + }; + Logger.prototype.warn = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this._log(Logger.levels.WARNING, args); + }; + Logger.prototype.makeError = function (message, code, params) { + // Errors are being censored + if (_censorErrors) { + return this.makeError("censored error", code, {}); + } + if (!code) { + code = Logger.errors.UNKNOWN_ERROR; + } + if (!params) { + params = {}; + } + var messageDetails = []; + Object.keys(params).forEach(function (key) { + var value = params[key]; + try { + if (value instanceof Uint8Array) { + var hex = ""; + for (var i = 0; i < value.length; i++) { + hex += HEX[value[i] >> 4]; + hex += HEX[value[i] & 0x0f]; + } + messageDetails.push(key + "=Uint8Array(0x" + hex + ")"); + } + else { + messageDetails.push(key + "=" + JSON.stringify(value)); + } + } + catch (error) { + messageDetails.push(key + "=" + JSON.stringify(params[key].toString())); + } + }); + messageDetails.push("code=" + code); + messageDetails.push("version=" + this.version); + var reason = message; + if (messageDetails.length) { + message += " (" + messageDetails.join(", ") + ")"; + } + // @TODO: Any?? + var error = new Error(message); + error.reason = reason; + error.code = code; + Object.keys(params).forEach(function (key) { + error[key] = params[key]; + }); + return error; + }; + Logger.prototype.throwError = function (message, code, params) { + throw this.makeError(message, code, params); + }; + Logger.prototype.throwArgumentError = function (message, name, value) { + return this.throwError(message, Logger.errors.INVALID_ARGUMENT, { + argument: name, + value: value + }); + }; + Logger.prototype.assert = function (condition, message, code, params) { + if (!!condition) { + return; + } + this.throwError(message, code, params); + }; + Logger.prototype.assertArgument = function (condition, message, name, value) { + if (!!condition) { + return; + } + this.throwArgumentError(message, name, value); + }; + Logger.prototype.checkNormalize = function (message) { + if (message == null) { + message = "platform missing String.prototype.normalize"; + } + if (_normalizeError) { + this.throwError("platform missing String.prototype.normalize", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "String.prototype.normalize", form: _normalizeError + }); + } + }; + Logger.prototype.checkSafeUint53 = function (value, message) { + if (typeof (value) !== "number") { + return; + } + if (message == null) { + message = "value not safe"; + } + if (value < 0 || value >= 0x1fffffffffffff) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "out-of-safe-range", + value: value + }); + } + if (value % 1) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "non-integer", + value: value + }); + } + }; + Logger.prototype.checkArgumentCount = function (count, expectedCount, message) { + if (message) { + message = ": " + message; + } + else { + message = ""; + } + if (count < expectedCount) { + this.throwError("missing argument" + message, Logger.errors.MISSING_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + if (count > expectedCount) { + this.throwError("too many arguments" + message, Logger.errors.UNEXPECTED_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + }; + Logger.prototype.checkNew = function (target, kind) { + if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + }; + Logger.prototype.checkAbstract = function (target, kind) { + if (target === kind) { + this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); + } + else if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + }; + Logger.globalLogger = function () { + if (!_globalLogger) { + _globalLogger = new Logger(_version_1.version); + } + return _globalLogger; + }; + Logger.setCensorship = function (censorship, permanent) { + if (!censorship && permanent) { + this.globalLogger().throwError("cannot permanently disable censorship", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + if (_permanentCensorErrors) { + if (!censorship) { + return; + } + this.globalLogger().throwError("error censorship permanent", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + _censorErrors = !!censorship; + _permanentCensorErrors = !!permanent; + }; + Logger.setLogLevel = function (logLevel) { + var level = LogLevels[logLevel.toLowerCase()]; + if (level == null) { + Logger.globalLogger().warn("invalid log level - " + logLevel); + return; + } + _logLevel = level; + }; + Logger.from = function (version) { + return new Logger(version); + }; + Logger.errors = ErrorCode; + Logger.levels = LogLevel; + return Logger; +}()); +exports.Logger = Logger; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/lib/index.js.map b/node_modules/@ethersproject/logger/lib/index.js.map new file mode 100644 index 0000000..68ef3d7 --- /dev/null +++ b/node_modules/@ethersproject/logger/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B,IAAM,SAAS,GAAiC,EAAE,KAAK,EAAE,C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X,UAAY,OAAe;QACvB,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IA9MM,aAAM,GAAG,SAAS,CAAC;IAEnB,aAAM,GAAG,QAAQ,CAAC;IA6M7B,aAAC;CAAA,AAlND,IAkNC;AAlNY,wBAAM"} \ No newline at end of file diff --git a/node_modules/@ethersproject/logger/package.json b/node_modules/@ethersproject/logger/package.json new file mode 100644 index 0000000..5657e39 --- /dev/null +++ b/node_modules/@ethersproject/logger/package.json @@ -0,0 +1,40 @@ +{ + "author": "Richard Moore ", + "dependencies": {}, + "description": "Logger utility functions for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/logger", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/logger", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x7810ac41144c4a0c3d1b3fb597a803d53c3e0661b2f047d82741deb397ff7d6d", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/logger/src.ts/_version.ts b/node_modules/@ethersproject/logger/src.ts/_version.ts new file mode 100644 index 0000000..0992901 --- /dev/null +++ b/node_modules/@ethersproject/logger/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "logger/5.5.0"; diff --git a/node_modules/@ethersproject/logger/src.ts/index.ts b/node_modules/@ethersproject/logger/src.ts/index.ts new file mode 100644 index 0000000..87808ec --- /dev/null +++ b/node_modules/@ethersproject/logger/src.ts/index.ts @@ -0,0 +1,363 @@ +"use strict"; + +let _permanentCensorErrors = false; +let _censorErrors = false; + +const LogLevels: { [ name: string ]: number } = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 }; +let _logLevel = LogLevels["default"]; + +import { version } from "./_version"; + +let _globalLogger: Logger = null; + +function _checkNormalize(): string { + try { + const missing: Array = [ ]; + + // Make sure all forms of normalization are supported + ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => { + try { + if ("test".normalize(form) !== "test") { + throw new Error("bad normalize"); + }; + } catch(error) { + missing.push(form); + } + }); + + if (missing.length) { + throw new Error("missing " + missing.join(", ")); + } + + if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) { + throw new Error("broken implementation") + } + } catch (error) { + return error.message; + } + + return null; +} + +const _normalizeError = _checkNormalize(); + +export enum LogLevel { + DEBUG = "DEBUG", + INFO = "INFO", + WARNING = "WARNING", + ERROR = "ERROR", + OFF = "OFF" +} + + +export enum ErrorCode { + + /////////////////// + // Generic Errors + + // Unknown Error + UNKNOWN_ERROR = "UNKNOWN_ERROR", + + // Not Implemented + NOT_IMPLEMENTED = "NOT_IMPLEMENTED", + + // Unsupported Operation + // - operation + UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION", + + // Network Error (i.e. Ethereum Network, such as an invalid chain ID) + // - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown) + NETWORK_ERROR = "NETWORK_ERROR", + + // Some sort of bad response from the server + SERVER_ERROR = "SERVER_ERROR", + + // Timeout + TIMEOUT = "TIMEOUT", + + /////////////////// + // Operational Errors + + // Buffer Overrun + BUFFER_OVERRUN = "BUFFER_OVERRUN", + + // Numeric Fault + // - operation: the operation being executed + // - fault: the reason this faulted + NUMERIC_FAULT = "NUMERIC_FAULT", + + + /////////////////// + // Argument Errors + + // Missing new operator to an object + // - name: The name of the class + MISSING_NEW = "MISSING_NEW", + + // Invalid argument (e.g. value is incompatible with type) to a function: + // - argument: The argument name that was invalid + // - value: The value of the argument + INVALID_ARGUMENT = "INVALID_ARGUMENT", + + // Missing argument to a function: + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + MISSING_ARGUMENT = "MISSING_ARGUMENT", + + // Too many arguments + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT", + + + /////////////////// + // Blockchain Errors + + // Call exception + // - transaction: the transaction + // - address?: the contract address + // - args?: The arguments passed into the function + // - method?: The Solidity method signature + // - errorSignature?: The EIP848 error signature + // - errorArgs?: The EIP848 error parameters + // - reason: The reason (only for EIP848 "Error(string)") + CALL_EXCEPTION = "CALL_EXCEPTION", + + // Insufficient funds (< value + gasLimit * gasPrice) + // - transaction: the transaction attempted + INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", + + // Nonce has already been used + // - transaction: the transaction attempted + NONCE_EXPIRED = "NONCE_EXPIRED", + + // The replacement fee for the transaction is too low + // - transaction: the transaction attempted + REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED", + + // The gas limit could not be estimated + // - transaction: the transaction passed to estimateGas + UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT", + + // The transaction was replaced by one with a higher gas price + // - reason: "cancelled", "replaced" or "repriced" + // - cancelled: true if reason == "cancelled" or reason == "replaced") + // - hash: original transaction hash + // - replacement: the full TransactionsResponse for the replacement + // - receipt: the receipt of the replacement + TRANSACTION_REPLACED = "TRANSACTION_REPLACED", +}; + +const HEX = "0123456789abcdef"; + +export class Logger { + readonly version: string; + + static errors = ErrorCode; + + static levels = LogLevel; + + constructor(version: string) { + Object.defineProperty(this, "version", { + enumerable: true, + value: version, + writable: false + }); + } + + _log(logLevel: LogLevel, args: Array): void { + const level = logLevel.toLowerCase(); + if (LogLevels[level] == null) { + this.throwArgumentError("invalid log level name", "logLevel", logLevel); + } + if (_logLevel > LogLevels[level]) { return; } + console.log.apply(console, args); + } + + debug(...args: Array): void { + this._log(Logger.levels.DEBUG, args); + } + + info(...args: Array): void { + this._log(Logger.levels.INFO, args); + } + + warn(...args: Array): void { + this._log(Logger.levels.WARNING, args); + } + + makeError(message: string, code?: ErrorCode, params?: any): Error { + // Errors are being censored + if (_censorErrors) { + return this.makeError("censored error", code, { }); + } + + if (!code) { code = Logger.errors.UNKNOWN_ERROR; } + if (!params) { params = {}; } + + const messageDetails: Array = []; + Object.keys(params).forEach((key) => { + const value = params[key]; + try { + if (value instanceof Uint8Array) { + let hex = ""; + for (let i = 0; i < value.length; i++) { + hex += HEX[value[i] >> 4]; + hex += HEX[value[i] & 0x0f]; + } + messageDetails.push(key + "=Uint8Array(0x" + hex + ")"); + } else { + messageDetails.push(key + "=" + JSON.stringify(value)); + } + } catch (error) { + messageDetails.push(key + "=" + JSON.stringify(params[key].toString())); + } + }); + messageDetails.push(`code=${ code }`); + messageDetails.push(`version=${ this.version }`); + + const reason = message; + if (messageDetails.length) { + message += " (" + messageDetails.join(", ") + ")"; + } + + // @TODO: Any?? + const error: any = new Error(message); + error.reason = reason; + error.code = code + + Object.keys(params).forEach(function(key) { + error[key] = params[key]; + }); + + return error; + } + + throwError(message: string, code?: ErrorCode, params?: any): never { + throw this.makeError(message, code, params); + } + + throwArgumentError(message: string, name: string, value: any): never { + return this.throwError(message, Logger.errors.INVALID_ARGUMENT, { + argument: name, + value: value + }); + } + + assert(condition: any, message: string, code?: ErrorCode, params?: any): void { + if (!!condition) { return; } + this.throwError(message, code, params); + } + + assertArgument(condition: any, message: string, name: string, value: any): void { + if (!!condition) { return; } + this.throwArgumentError(message, name, value); + } + + checkNormalize(message?: string): void { + if (message == null) { message = "platform missing String.prototype.normalize"; } + if (_normalizeError) { + this.throwError("platform missing String.prototype.normalize", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "String.prototype.normalize", form: _normalizeError + }); + } + } + + checkSafeUint53(value: number, message?: string): void { + if (typeof(value) !== "number") { return; } + + if (message == null) { message = "value not safe"; } + + if (value < 0 || value >= 0x1fffffffffffff) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "out-of-safe-range", + value: value + }); + } + + if (value % 1) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "non-integer", + value: value + }); + } + } + + checkArgumentCount(count: number, expectedCount: number, message?: string): void { + if (message) { + message = ": " + message; + } else { + message = ""; + } + + if (count < expectedCount) { + this.throwError("missing argument" + message, Logger.errors.MISSING_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + + if (count > expectedCount) { + this.throwError("too many arguments" + message, Logger.errors.UNEXPECTED_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + } + + checkNew(target: any, kind: any): void { + if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + } + + checkAbstract(target: any, kind: any): void { + if (target === kind) { + this.throwError( + "cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", + Logger.errors.UNSUPPORTED_OPERATION, + { name: target.name, operation: "new" } + ); + } else if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + } + + static globalLogger(): Logger { + if (!_globalLogger) { _globalLogger = new Logger(version); } + return _globalLogger; + } + + static setCensorship(censorship: boolean, permanent?: boolean): void { + if (!censorship && permanent) { + this.globalLogger().throwError("cannot permanently disable censorship", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + + if (_permanentCensorErrors) { + if (!censorship) { return; } + this.globalLogger().throwError("error censorship permanent", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + + _censorErrors = !!censorship; + _permanentCensorErrors = !!permanent; + } + + static setLogLevel(logLevel: LogLevel): void { + const level = LogLevels[logLevel.toLowerCase()]; + if (level == null) { + Logger.globalLogger().warn("invalid log level - " + logLevel); + return; + } + _logLevel = level; + } + + static from(version: string): Logger { + return new Logger(version); + } +} diff --git a/node_modules/@ethersproject/networks/LICENSE.md b/node_modules/@ethersproject/networks/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/networks/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/networks/README.md b/node_modules/@ethersproject/networks/README.md new file mode 100644 index 0000000..1b93a51 --- /dev/null +++ b/node_modules/@ethersproject/networks/README.md @@ -0,0 +1,34 @@ +Ethereum (and ilk) Network Definitions +====================================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for tracking common networks along with important +parameters for each. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/types/#providers-Network). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + getNetwork, + + // Types + + Network, + Networkish + +} = require("@ethersproject/networks"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/networks/lib.esm/_version.d.ts b/node_modules/@ethersproject/networks/lib.esm/_version.d.ts new file mode 100644 index 0000000..e286039 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "networks/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/networks/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7ec6ea1 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/_version.js b/node_modules/@ethersproject/networks/lib.esm/_version.js new file mode 100644 index 0000000..34c752b --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "networks/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/_version.js.map b/node_modules/@ethersproject/networks/lib.esm/_version.js.map new file mode 100644 index 0000000..5e52401 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/index.d.ts b/node_modules/@ethersproject/networks/lib.esm/index.d.ts new file mode 100644 index 0000000..8dde38b --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/index.d.ts @@ -0,0 +1,10 @@ +import { Network, Networkish } from "./types"; +export { Network, Networkish }; +/** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ +export declare function getNetwork(network: Networkish): Network; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/index.d.ts.map b/node_modules/@ethersproject/networks/lib.esm/index.d.ts.map new file mode 100644 index 0000000..41783f2 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AAoLF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/index.js b/node_modules/@ethersproject/networks/lib.esm/index.js new file mode 100644 index 0000000..a392d9a --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/index.js @@ -0,0 +1,223 @@ +"use strict"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +; +function isRenetworkable(value) { + return (value && typeof (value.renetwork) === "function"); +} +function ethDefaultProvider(network) { + const func = function (providers, options) { + if (options == null) { + options = {}; + } + const providerList = []; + if (providers.InfuraProvider) { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } + catch (error) { } + } + if (providers.EtherscanProvider) { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } + catch (error) { } + } + if (providers.AlchemyProvider) { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } + catch (error) { } + } + if (providers.PocketProvider) { + // These networks are currently faulty on Pocket as their + // network does not handle the Berlin hardfork, which is + // live on these ones. + // @TODO: This goes away once Pocket has upgraded their nodes + const skip = ["goerli", "ropsten", "rinkeby"]; + try { + const provider = new providers.PocketProvider(network); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + catch (error) { } + } + if (providers.CloudflareProvider) { + try { + providerList.push(new providers.CloudflareProvider(network)); + } + catch (error) { } + } + if (providerList.length === 0) { + return null; + } + if (providers.FallbackProvider) { + let quorum = 1; + if (options.quorum != null) { + quorum = options.quorum; + } + else if (network === "homestead") { + quorum = 2; + } + return new providers.FallbackProvider(providerList, quorum); + } + return providerList[0]; + }; + func.renetwork = function (network) { + return ethDefaultProvider(network); + }; + return func; +} +function etcDefaultProvider(url, network) { + const func = function (providers, options) { + if (providers.JsonRpcProvider) { + return new providers.JsonRpcProvider(url, network); + } + return null; + }; + func.renetwork = function (network) { + return etcDefaultProvider(url, network); + }; + return func; +} +const homestead = { + chainId: 1, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "homestead", + _defaultProvider: ethDefaultProvider("homestead") +}; +const ropsten = { + chainId: 3, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "ropsten", + _defaultProvider: ethDefaultProvider("ropsten") +}; +const classicMordor = { + chainId: 63, + name: "classicMordor", + _defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor") +}; +// See: https://chainlist.org +const networks = { + unspecified: { chainId: 0, name: "unspecified" }, + homestead: homestead, + mainnet: homestead, + morden: { chainId: 2, name: "morden" }, + ropsten: ropsten, + testnet: ropsten, + rinkeby: { + chainId: 4, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "rinkeby", + _defaultProvider: ethDefaultProvider("rinkeby") + }, + kovan: { + chainId: 42, + name: "kovan", + _defaultProvider: ethDefaultProvider("kovan") + }, + goerli: { + chainId: 5, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "goerli", + _defaultProvider: ethDefaultProvider("goerli") + }, + // ETC (See: #351) + classic: { + chainId: 61, + name: "classic", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/etc", "classic") + }, + classicMorden: { chainId: 62, name: "classicMorden" }, + classicMordor: classicMordor, + classicTestnet: classicMordor, + classicKotti: { + chainId: 6, + name: "classicKotti", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/kotti", "classicKotti") + }, + xdai: { chainId: 100, name: "xdai" }, + matic: { chainId: 137, name: "matic" }, + maticmum: { chainId: 80001, name: "maticmum" }, + optimism: { chainId: 10, name: "optimism" }, + "optimism-kovan": { chainId: 69, name: "optimism-kovan" }, + "optimism-goerli": { chainId: 420, name: "optimism-goerli" }, + arbitrum: { chainId: 42161, name: "arbitrum" }, + "arbitrum-rinkeby": { chainId: 421611, name: "arbitrum-rinkeby" }, + bnb: { chainId: 56, name: "bnb" }, + bnbt: { chainId: 97, name: "bnbt" }, +}; +/** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ +export function getNetwork(network) { + // No network (null) + if (network == null) { + return null; + } + if (typeof (network) === "number") { + for (const name in networks) { + const standard = networks[name]; + if (standard.chainId === network) { + return { + name: standard.name, + chainId: standard.chainId, + ensAddress: (standard.ensAddress || null), + _defaultProvider: (standard._defaultProvider || null) + }; + } + } + return { + chainId: network, + name: "unknown" + }; + } + if (typeof (network) === "string") { + const standard = networks[network]; + if (standard == null) { + return null; + } + return { + name: standard.name, + chainId: standard.chainId, + ensAddress: standard.ensAddress, + _defaultProvider: (standard._defaultProvider || null) + }; + } + const standard = networks[network.name]; + // Not a standard network; check that it is a valid network in general + if (!standard) { + if (typeof (network.chainId) !== "number") { + logger.throwArgumentError("invalid network chainId", "network", network); + } + return network; + } + // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155) + if (network.chainId !== 0 && network.chainId !== standard.chainId) { + logger.throwArgumentError("network chainId mismatch", "network", network); + } + // @TODO: In the next major version add an attach function to a defaultProvider + // class and move the _defaultProvider internal to this file (extend Network) + let defaultProvider = network._defaultProvider || null; + if (defaultProvider == null && standard._defaultProvider) { + if (isRenetworkable(standard._defaultProvider)) { + defaultProvider = standard._defaultProvider.renetwork(network); + } + else { + defaultProvider = standard._defaultProvider; + } + } + // Standard Network (allow overriding the ENS address) + return { + name: network.name, + chainId: standard.chainId, + ensAddress: (network.ensAddress || standard.ensAddress || null), + _defaultProvider: defaultProvider + }; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/index.js.map b/node_modules/@ethersproject/networks/lib.esm/index.js.map new file mode 100644 index 0000000..a5ba169 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAalC,CAAC;AAEF,SAAS,eAAe,CAAC,KAAU;IAC/B,OAAO,CAAC,KAAK,IAAI,OAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,UAAU,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAyB;IACjD,MAAM,IAAI,GAAG,UAAS,SAAc,EAAE,OAAa;QAC/C,IAAI,OAAO,IAAI,IAAI,EAAE;YAAE,OAAO,GAAG,EAAG,CAAC;SAAE;QACvC,MAAM,YAAY,GAAe,EAAE,CAAC;QAEpC,IAAI,SAAS,CAAC,cAAc,EAAE;YAC1B,IAAI;gBACA,YAAY,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;aAC5E;YAAC,OAAM,KAAK,EAAE,GAAG;SACrB;QAED,IAAI,SAAS,CAAC,iBAAiB,EAAE;YAC7B,IAAI;gBACA,YAAY,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;aA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CAAC,IAAI;QAClB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,UAAU,EAAE,CAAC,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC;QAC/D,gBAAgB,EAAE,eAAe;KACpC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/types.d.ts b/node_modules/@ethersproject/networks/lib.esm/types.d.ts new file mode 100644 index 0000000..417982f --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/types.d.ts @@ -0,0 +1,8 @@ +export declare type Network = { + name: string; + chainId: number; + ensAddress?: string; + _defaultProvider?: (providers: any, options?: any) => any; +}; +export declare type Networkish = Network | string | number; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/types.d.ts.map b/node_modules/@ethersproject/networks/lib.esm/types.d.ts.map new file mode 100644 index 0000000..ec8bc09 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,CAAA;CAC5D,CAAA;AAED,oBAAY,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/types.js b/node_modules/@ethersproject/networks/lib.esm/types.js new file mode 100644 index 0000000..f50a4bb --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/types.js @@ -0,0 +1,3 @@ +"use strict"; +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib.esm/types.js.map b/node_modules/@ethersproject/networks/lib.esm/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/node_modules/@ethersproject/networks/lib.esm/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/_version.d.ts b/node_modules/@ethersproject/networks/lib/_version.d.ts new file mode 100644 index 0000000..e286039 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "networks/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/_version.d.ts.map b/node_modules/@ethersproject/networks/lib/_version.d.ts.map new file mode 100644 index 0000000..7ec6ea1 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/_version.js b/node_modules/@ethersproject/networks/lib/_version.js new file mode 100644 index 0000000..0c3a647 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "networks/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/_version.js.map b/node_modules/@ethersproject/networks/lib/_version.js.map new file mode 100644 index 0000000..fca74f2 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/index.d.ts b/node_modules/@ethersproject/networks/lib/index.d.ts new file mode 100644 index 0000000..8dde38b --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/index.d.ts @@ -0,0 +1,10 @@ +import { Network, Networkish } from "./types"; +export { Network, Networkish }; +/** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ +export declare function getNetwork(network: Networkish): Network; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/index.d.ts.map b/node_modules/@ethersproject/networks/lib/index.d.ts.map new file mode 100644 index 0000000..41783f2 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AAoLF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/index.js b/node_modules/@ethersproject/networks/lib/index.js new file mode 100644 index 0000000..82eea67 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/index.js @@ -0,0 +1,226 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getNetwork = void 0; +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +; +function isRenetworkable(value) { + return (value && typeof (value.renetwork) === "function"); +} +function ethDefaultProvider(network) { + var func = function (providers, options) { + if (options == null) { + options = {}; + } + var providerList = []; + if (providers.InfuraProvider) { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } + catch (error) { } + } + if (providers.EtherscanProvider) { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } + catch (error) { } + } + if (providers.AlchemyProvider) { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } + catch (error) { } + } + if (providers.PocketProvider) { + // These networks are currently faulty on Pocket as their + // network does not handle the Berlin hardfork, which is + // live on these ones. + // @TODO: This goes away once Pocket has upgraded their nodes + var skip = ["goerli", "ropsten", "rinkeby"]; + try { + var provider = new providers.PocketProvider(network); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + catch (error) { } + } + if (providers.CloudflareProvider) { + try { + providerList.push(new providers.CloudflareProvider(network)); + } + catch (error) { } + } + if (providerList.length === 0) { + return null; + } + if (providers.FallbackProvider) { + var quorum = 1; + if (options.quorum != null) { + quorum = options.quorum; + } + else if (network === "homestead") { + quorum = 2; + } + return new providers.FallbackProvider(providerList, quorum); + } + return providerList[0]; + }; + func.renetwork = function (network) { + return ethDefaultProvider(network); + }; + return func; +} +function etcDefaultProvider(url, network) { + var func = function (providers, options) { + if (providers.JsonRpcProvider) { + return new providers.JsonRpcProvider(url, network); + } + return null; + }; + func.renetwork = function (network) { + return etcDefaultProvider(url, network); + }; + return func; +} +var homestead = { + chainId: 1, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "homestead", + _defaultProvider: ethDefaultProvider("homestead") +}; +var ropsten = { + chainId: 3, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "ropsten", + _defaultProvider: ethDefaultProvider("ropsten") +}; +var classicMordor = { + chainId: 63, + name: "classicMordor", + _defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor") +}; +// See: https://chainlist.org +var networks = { + unspecified: { chainId: 0, name: "unspecified" }, + homestead: homestead, + mainnet: homestead, + morden: { chainId: 2, name: "morden" }, + ropsten: ropsten, + testnet: ropsten, + rinkeby: { + chainId: 4, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "rinkeby", + _defaultProvider: ethDefaultProvider("rinkeby") + }, + kovan: { + chainId: 42, + name: "kovan", + _defaultProvider: ethDefaultProvider("kovan") + }, + goerli: { + chainId: 5, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "goerli", + _defaultProvider: ethDefaultProvider("goerli") + }, + // ETC (See: #351) + classic: { + chainId: 61, + name: "classic", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/etc", "classic") + }, + classicMorden: { chainId: 62, name: "classicMorden" }, + classicMordor: classicMordor, + classicTestnet: classicMordor, + classicKotti: { + chainId: 6, + name: "classicKotti", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/kotti", "classicKotti") + }, + xdai: { chainId: 100, name: "xdai" }, + matic: { chainId: 137, name: "matic" }, + maticmum: { chainId: 80001, name: "maticmum" }, + optimism: { chainId: 10, name: "optimism" }, + "optimism-kovan": { chainId: 69, name: "optimism-kovan" }, + "optimism-goerli": { chainId: 420, name: "optimism-goerli" }, + arbitrum: { chainId: 42161, name: "arbitrum" }, + "arbitrum-rinkeby": { chainId: 421611, name: "arbitrum-rinkeby" }, + bnb: { chainId: 56, name: "bnb" }, + bnbt: { chainId: 97, name: "bnbt" }, +}; +/** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ +function getNetwork(network) { + // No network (null) + if (network == null) { + return null; + } + if (typeof (network) === "number") { + for (var name_1 in networks) { + var standard_1 = networks[name_1]; + if (standard_1.chainId === network) { + return { + name: standard_1.name, + chainId: standard_1.chainId, + ensAddress: (standard_1.ensAddress || null), + _defaultProvider: (standard_1._defaultProvider || null) + }; + } + } + return { + chainId: network, + name: "unknown" + }; + } + if (typeof (network) === "string") { + var standard_2 = networks[network]; + if (standard_2 == null) { + return null; + } + return { + name: standard_2.name, + chainId: standard_2.chainId, + ensAddress: standard_2.ensAddress, + _defaultProvider: (standard_2._defaultProvider || null) + }; + } + var standard = networks[network.name]; + // Not a standard network; check that it is a valid network in general + if (!standard) { + if (typeof (network.chainId) !== "number") { + logger.throwArgumentError("invalid network chainId", "network", network); + } + return network; + } + // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155) + if (network.chainId !== 0 && network.chainId !== standard.chainId) { + logger.throwArgumentError("network chainId mismatch", "network", network); + } + // @TODO: In the next major version add an attach function to a defaultProvider + // class and move the _defaultProvider internal to this file (extend Network) + var defaultProvider = network._defaultProvider || null; + if (defaultProvider == null && standard._defaultProvider) { + if (isRenetworkable(standard._defaultProvider)) { + defaultProvider = standard._defaultProvider.renetwork(network); + } + else { + defaultProvider = standard._defaultProvider; + } + } + // Standard Network (allow overriding the ENS address) + return { + name: network.name, + chainId: standard.chainId, + ensAddress: (network.ensAddress || standard.ensAddress || null), + _defaultProvider: defaultProvider + }; +} +exports.getNetwork = getNetwork; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/index.js.map b/node_modules/@ethersproject/networks/lib/index.js.map new file mode 100644 index 0000000..96a91ea --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAalC,CAAC;AAEF,SAAS,eAAe,CAAC,KAAU;IAC/B,OAAO,CAAC,KAAK,IAAI,OAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,UAAU,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAyB;IACjD,IAAM,IAAI,GAAG,UAAS,SAAc,EAAE,OAAa;QAC/C,IAAI,OAAO,IAAI,IAAI,EAAE;YAAE,OAAO,GAAG,EAAG,CAAC;SAAE;QACvC,IAAM,YAAY,GAAe,EAAE,CAAC;QAEpC,IAAI,SAAS,CAAC,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IAAI,IAAI,CAAC;IAC5E,IAAI,eAAe,IAAI,IAAI,IAAI,QAAQ,CAAC,gBAAgB,EAAE;QACtD,IAAI,eAAe,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;YAC5C,eAAe,GAAG,QAAQ,CAAC,gBAAgB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SAClE;aAAM;YACH,eAAe,GAAG,QAAQ,CAAC,gBAAgB,CAAC;SAC/C;KACJ;IAED,sDAAsD;IACtD,OAAO;QACH,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,UAAU,EAAE,CAAC,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC;QAC/D,gBAAgB,EAAE,eAAe;KACpC,CAAC;AACN,CAAC;AAnED,gCAmEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/types.d.ts b/node_modules/@ethersproject/networks/lib/types.d.ts new file mode 100644 index 0000000..417982f --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/types.d.ts @@ -0,0 +1,8 @@ +export declare type Network = { + name: string; + chainId: number; + ensAddress?: string; + _defaultProvider?: (providers: any, options?: any) => any; +}; +export declare type Networkish = Network | string | number; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/types.d.ts.map b/node_modules/@ethersproject/networks/lib/types.d.ts.map new file mode 100644 index 0000000..ec8bc09 --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,CAAA;CAC5D,CAAA;AAED,oBAAY,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/types.js b/node_modules/@ethersproject/networks/lib/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/lib/types.js.map b/node_modules/@ethersproject/networks/lib/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/node_modules/@ethersproject/networks/lib/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/networks/package.json b/node_modules/@ethersproject/networks/package.json new file mode 100644 index 0000000..45ed59d --- /dev/null +++ b/node_modules/@ethersproject/networks/package.json @@ -0,0 +1,42 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/logger": "^5.5.0" + }, + "description": "Network definitions for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "50d712d6afc927aaee68b482157598554a45d403", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/networks", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/networks", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x11d6b29ad1408b2116c4e687320aa9b87c7be5e0f6d19a5813f50a31bb869165", + "types": "./lib/index.d.ts", + "version": "5.5.1" +} diff --git a/node_modules/@ethersproject/networks/src.ts/_version.ts b/node_modules/@ethersproject/networks/src.ts/_version.ts new file mode 100644 index 0000000..f6e0bc4 --- /dev/null +++ b/node_modules/@ethersproject/networks/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "networks/5.5.1"; diff --git a/node_modules/@ethersproject/networks/src.ts/index.ts b/node_modules/@ethersproject/networks/src.ts/index.ts new file mode 100644 index 0000000..3ab2bea --- /dev/null +++ b/node_modules/@ethersproject/networks/src.ts/index.ts @@ -0,0 +1,265 @@ +"use strict"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { Network, Networkish } from "./types"; + +export { + Network, + Networkish +}; + +type DefaultProviderFunc = (providers: any, options?: any) => any; + +interface Renetworkable extends DefaultProviderFunc { + renetwork: (network: Network) => DefaultProviderFunc; +}; + +function isRenetworkable(value: any): value is Renetworkable { + return (value && typeof(value.renetwork) === "function"); +} + +function ethDefaultProvider(network: string | Network): Renetworkable { + const func = function(providers: any, options?: any): any { + if (options == null) { options = { }; } + const providerList: Array = []; + + if (providers.InfuraProvider) { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } catch(error) { } + } + + if (providers.EtherscanProvider) { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } catch(error) { } + } + + if (providers.AlchemyProvider) { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } catch(error) { } + } + + if (providers.PocketProvider) { + // These networks are currently faulty on Pocket as their + // network does not handle the Berlin hardfork, which is + // live on these ones. + // @TODO: This goes away once Pocket has upgraded their nodes + const skip = [ "goerli", "ropsten", "rinkeby" ]; + try { + const provider = new providers.PocketProvider(network); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } catch(error) { } + } + + if (providers.CloudflareProvider) { + try { + providerList.push(new providers.CloudflareProvider(network)); + } catch(error) { } + } + + if (providerList.length === 0) { return null; } + + if (providers.FallbackProvider) { + let quorum = 1; + if (options.quorum != null) { + quorum = options.quorum; + } else if (network === "homestead") { + quorum = 2; + } + return new providers.FallbackProvider(providerList, quorum); + } + + return providerList[0]; + }; + + func.renetwork = function(network: Network) { + return ethDefaultProvider(network); + }; + + return func; +} + +function etcDefaultProvider(url: string, network: string | Network): Renetworkable { + const func = function(providers: any, options?: any): any { + if (providers.JsonRpcProvider) { + return new providers.JsonRpcProvider(url, network); + } + + return null; + }; + + func.renetwork = function(network: Network) { + return etcDefaultProvider(url, network); + }; + + return func; +} + +const homestead: Network = { + chainId: 1, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "homestead", + _defaultProvider: ethDefaultProvider("homestead") +}; + +const ropsten: Network = { + chainId: 3, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "ropsten", + _defaultProvider: ethDefaultProvider("ropsten") +}; + +const classicMordor: Network = { + chainId: 63, + name: "classicMordor", + _defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor") +}; + +// See: https://chainlist.org +const networks: { [name: string]: Network } = { + unspecified: { chainId: 0, name: "unspecified" }, + + homestead: homestead, + mainnet: homestead, + + morden: { chainId: 2, name: "morden" }, + + ropsten: ropsten, + testnet: ropsten, + + rinkeby: { + chainId: 4, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "rinkeby", + _defaultProvider: ethDefaultProvider("rinkeby") + }, + + kovan: { + chainId: 42, + name: "kovan", + _defaultProvider: ethDefaultProvider("kovan") + }, + + goerli: { + chainId: 5, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "goerli", + _defaultProvider: ethDefaultProvider("goerli") + }, + + + // ETC (See: #351) + classic: { + chainId: 61, + name: "classic", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/etc", "classic") + }, + + classicMorden: { chainId: 62, name: "classicMorden" }, + + classicMordor: classicMordor, + classicTestnet: classicMordor, + + classicKotti: { + chainId: 6, + name: "classicKotti", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/kotti", "classicKotti") + }, + + xdai: { chainId: 100, name: "xdai" }, + + matic: { chainId: 137, name: "matic" }, + maticmum: { chainId: 80001, name: "maticmum" }, + + optimism: { chainId: 10, name: "optimism" }, + "optimism-kovan": { chainId: 69, name: "optimism-kovan" }, + "optimism-goerli": { chainId: 420, name: "optimism-goerli" }, + + arbitrum: { chainId: 42161, name: "arbitrum" }, + "arbitrum-rinkeby": { chainId: 421611, name: "arbitrum-rinkeby" }, + + bnb: { chainId: 56, name: "bnb" }, + bnbt: { chainId: 97, name: "bnbt" }, +} + +/** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ +export function getNetwork(network: Networkish): Network { + // No network (null) + if (network == null) { return null; } + + if (typeof(network) === "number") { + for (const name in networks) { + const standard = networks[name]; + if (standard.chainId === network) { + return { + name: standard.name, + chainId: standard.chainId, + ensAddress: (standard.ensAddress || null), + _defaultProvider: (standard._defaultProvider || null) + }; + } + } + + return { + chainId: network, + name: "unknown" + }; + } + + if (typeof(network) === "string") { + const standard = networks[network]; + if (standard == null) { return null; } + return { + name: standard.name, + chainId: standard.chainId, + ensAddress: standard.ensAddress, + _defaultProvider: (standard._defaultProvider || null) + }; + } + + const standard = networks[network.name]; + + // Not a standard network; check that it is a valid network in general + if (!standard) { + if (typeof(network.chainId) !== "number") { + logger.throwArgumentError("invalid network chainId", "network", network); + } + return network; + } + + // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155) + if (network.chainId !== 0 && network.chainId !== standard.chainId) { + logger.throwArgumentError("network chainId mismatch", "network", network); + } + + // @TODO: In the next major version add an attach function to a defaultProvider + // class and move the _defaultProvider internal to this file (extend Network) + let defaultProvider: DefaultProviderFunc = network._defaultProvider || null; + if (defaultProvider == null && standard._defaultProvider) { + if (isRenetworkable(standard._defaultProvider)) { + defaultProvider = standard._defaultProvider.renetwork(network); + } else { + defaultProvider = standard._defaultProvider; + } + } + + // Standard Network (allow overriding the ENS address) + return { + name: network.name, + chainId: standard.chainId, + ensAddress: (network.ensAddress || standard.ensAddress || null), + _defaultProvider: defaultProvider + }; +} diff --git a/node_modules/@ethersproject/networks/src.ts/types.ts b/node_modules/@ethersproject/networks/src.ts/types.ts new file mode 100644 index 0000000..4e048d0 --- /dev/null +++ b/node_modules/@ethersproject/networks/src.ts/types.ts @@ -0,0 +1,10 @@ +"use strict"; + +export type Network = { + name: string, + chainId: number, + ensAddress?: string, + _defaultProvider?: (providers: any, options?: any) => any +} + +export type Networkish = Network | string | number; diff --git a/node_modules/@ethersproject/pbkdf2/LICENSE.md b/node_modules/@ethersproject/pbkdf2/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/pbkdf2/README.md b/node_modules/@ethersproject/pbkdf2/README.md new file mode 100644 index 0000000..722c23c --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/README.md @@ -0,0 +1,28 @@ +Password-Based Key Derivation Function 2 (pbkdf2) +================================================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains the PBKDF2 function. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + pbkdf2 + +} = require("@ethersproject/pbkdf2"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts new file mode 100644 index 0000000..8f9a0a5 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "pbkdf2/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js new file mode 100644 index 0000000..464bc5b --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "pbkdf2/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js.map b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts b/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts new file mode 100644 index 0000000..d64bbb6 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts @@ -0,0 +1,2 @@ +export { pbkdf2 } from "./pbkdf2"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts.map new file mode 100644 index 0000000..25de5b8 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/index.js b/node_modules/@ethersproject/pbkdf2/lib.esm/index.js new file mode 100644 index 0000000..00bee6f --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/index.js @@ -0,0 +1,2 @@ +export { pbkdf2 } from "./pbkdf2"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/index.js.map b/node_modules/@ethersproject/pbkdf2/lib.esm/index.js.map new file mode 100644 index 0000000..c76b34d --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts new file mode 100644 index 0000000..73bcd8d --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts @@ -0,0 +1,3 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string; +//# sourceMappingURL=pbkdf2.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts.map new file mode 100644 index 0000000..ac97400 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pbkdf2.d.ts","sourceRoot":"","sources":["../src.ts/browser-pbkdf2.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAGpE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAgD9H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js new file mode 100644 index 0000000..e211793 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js @@ -0,0 +1,44 @@ +"use strict"; +import { arrayify, hexlify } from "@ethersproject/bytes"; +import { computeHmac } from "@ethersproject/sha2"; +export function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) { + password = arrayify(password); + salt = arrayify(salt); + let hLen; + let l = 1; + const DK = new Uint8Array(keylen); + const block1 = new Uint8Array(salt.length + 4); + block1.set(salt); + //salt.copy(block1, 0, 0, salt.length) + let r; + let T; + for (let i = 1; i <= l; i++) { + //block1.writeUInt32BE(i, salt.length) + block1[salt.length] = (i >> 24) & 0xff; + block1[salt.length + 1] = (i >> 16) & 0xff; + block1[salt.length + 2] = (i >> 8) & 0xff; + block1[salt.length + 3] = i & 0xff; + //let U = createHmac(password).update(block1).digest(); + let U = arrayify(computeHmac(hashAlgorithm, password, block1)); + if (!hLen) { + hLen = U.length; + T = new Uint8Array(hLen); + l = Math.ceil(keylen / hLen); + r = keylen - (l - 1) * hLen; + } + //U.copy(T, 0, 0, hLen) + T.set(U); + for (let j = 1; j < iterations; j++) { + //U = createHmac(password).update(U).digest(); + U = arrayify(computeHmac(hashAlgorithm, password, U)); + for (let k = 0; k < hLen; k++) + T[k] ^= U[k]; + } + const destPos = (i - 1) * hLen; + const len = (i === l ? r : hLen); + //T.copy(DK, destPos, 0, len) + DK.set(arrayify(T).slice(0, len), destPos); + } + return hexlify(DK); +} +//# sourceMappingURL=pbkdf2.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js.map b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js.map new file mode 100644 index 0000000..bd082d4 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pbkdf2.js","sourceRoot":"","sources":["../src.ts/browser-pbkdf2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAsB,MAAM,qBAAqB,CAAC;AAEtE,MAAM,UAAU,MAAM,CAAC,QAAmB,EAAE,IAAe,EAAE,UAAkB,EAAE,MAAc,EAAE,aAAqB;IAClH,QAAQ,GAAG,QAAQ,CAAC,QAAQ,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AAG,CAAC,CAAC,GAAG,IAAI,CAAA;SAC9B;QAED,uBAAuB;QACvB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAGT,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;YACjC,8CAA8C;YAC9C,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAqB,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE;gBAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;SAC9C;QAGD,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA;QAC9B,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAChC,6BAA6B;QAC7B,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,OAAO,OAAO,CAAC,EAAE,CAAC,CAAA;AACtB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts b/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts new file mode 100644 index 0000000..8f9a0a5 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "pbkdf2/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/_version.js b/node_modules/@ethersproject/pbkdf2/lib/_version.js new file mode 100644 index 0000000..a99211d --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "pbkdf2/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/_version.js.map b/node_modules/@ethersproject/pbkdf2/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts new file mode 100644 index 0000000..2547d72 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts @@ -0,0 +1,3 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string; +//# sourceMappingURL=browser-pbkdf2.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts.map new file mode 100644 index 0000000..1cef99c --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-pbkdf2.d.ts","sourceRoot":"","sources":["../src.ts/browser-pbkdf2.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAGpE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAgD9H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js new file mode 100644 index 0000000..45c6f03 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pbkdf2 = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var sha2_1 = require("@ethersproject/sha2"); +function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) { + password = (0, bytes_1.arrayify)(password); + salt = (0, bytes_1.arrayify)(salt); + var hLen; + var l = 1; + var DK = new Uint8Array(keylen); + var block1 = new Uint8Array(salt.length + 4); + block1.set(salt); + //salt.copy(block1, 0, 0, salt.length) + var r; + var T; + for (var i = 1; i <= l; i++) { + //block1.writeUInt32BE(i, salt.length) + block1[salt.length] = (i >> 24) & 0xff; + block1[salt.length + 1] = (i >> 16) & 0xff; + block1[salt.length + 2] = (i >> 8) & 0xff; + block1[salt.length + 3] = i & 0xff; + //let U = createHmac(password).update(block1).digest(); + var U = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, block1)); + if (!hLen) { + hLen = U.length; + T = new Uint8Array(hLen); + l = Math.ceil(keylen / hLen); + r = keylen - (l - 1) * hLen; + } + //U.copy(T, 0, 0, hLen) + T.set(U); + for (var j = 1; j < iterations; j++) { + //U = createHmac(password).update(U).digest(); + U = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, U)); + for (var k = 0; k < hLen; k++) + T[k] ^= U[k]; + } + var destPos = (i - 1) * hLen; + var len = (i === l ? r : hLen); + //T.copy(DK, destPos, 0, len) + DK.set((0, bytes_1.arrayify)(T).slice(0, len), destPos); + } + return (0, bytes_1.hexlify)(DK); +} +exports.pbkdf2 = pbkdf2; +//# sourceMappingURL=browser-pbkdf2.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js.map b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js.map new file mode 100644 index 0000000..7cd23ac --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-pbkdf2.js","sourceRoot":"","sources":["../src.ts/browser-pbkdf2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAAoE;AACpE,4CAAsE;AAEtE,SAAgB,MAAM,CAAC,QAAmB,EAAE,IAAe,EAAE,UAAkB,EAAE,MAAc,EAAE,aAAqB;IAClH,QAAQ,GAAG,IAAA,gBAAQ,EAAC,QAAQ,CAAC,CAAC;IAC9B,IAAI,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IACtB,IAAI,IAAI,CAAC;IACT,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAM,EAAE,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IACjC,IAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC9C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjB,sCAAsC;IAEtC,IAAI,CAAS,CAAC;IACd,IAAI,CAAa,CAAC;IAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACzB,sCAAsC;QACtC,MAAM,CAAC,IAAI,CAAC,M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AC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA;QAC9B,IAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAChC,6BAA6B;QAC7B,EAAE,CAAC,GAAG,CAAC,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,OAAO,IAAA,eAAO,EAAC,EAAE,CAAC,CAAA;AACtB,CAAC;AAhDD,wBAgDC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/index.d.ts b/node_modules/@ethersproject/pbkdf2/lib/index.d.ts new file mode 100644 index 0000000..d64bbb6 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/index.d.ts @@ -0,0 +1,2 @@ +export { pbkdf2 } from "./pbkdf2"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/index.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib/index.d.ts.map new file mode 100644 index 0000000..25de5b8 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/index.js b/node_modules/@ethersproject/pbkdf2/lib/index.js new file mode 100644 index 0000000..f18cc5c --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/index.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pbkdf2 = void 0; +var pbkdf2_1 = require("./pbkdf2"); +Object.defineProperty(exports, "pbkdf2", { enumerable: true, get: function () { return pbkdf2_1.pbkdf2; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/index.js.map b/node_modules/@ethersproject/pbkdf2/lib/index.js.map new file mode 100644 index 0000000..a8f7b73 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts new file mode 100644 index 0000000..73bcd8d --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts @@ -0,0 +1,3 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string; +//# sourceMappingURL=pbkdf2.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts.map b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts.map new file mode 100644 index 0000000..a475543 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pbkdf2.d.ts","sourceRoot":"","sources":["../src.ts/pbkdf2.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAOpE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAE9H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js new file mode 100644 index 0000000..0cf23f7 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pbkdf2 = void 0; +var crypto_1 = require("crypto"); +var bytes_1 = require("@ethersproject/bytes"); +function bufferify(value) { + return Buffer.from((0, bytes_1.arrayify)(value)); +} +function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) { + return (0, bytes_1.hexlify)((0, crypto_1.pbkdf2Sync)(bufferify(password), bufferify(salt), iterations, keylen, hashAlgorithm)); +} +exports.pbkdf2 = pbkdf2; +//# sourceMappingURL=pbkdf2.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js.map b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js.map new file mode 100644 index 0000000..d621e4c --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pbkdf2.js","sourceRoot":"","sources":["../src.ts/pbkdf2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,iCAA+C;AAE/C,8CAAoE;AAGpE,SAAS,SAAS,CAAC,KAAgB;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,SAAgB,MAAM,CAAC,QAAmB,EAAE,IAAe,EAAE,UAAkB,EAAE,MAAc,EAAE,aAAqB;IAClH,OAAO,IAAA,eAAO,EAAC,IAAA,mBAAO,EAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;AACrG,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/pbkdf2/package.json b/node_modules/@ethersproject/pbkdf2/package.json new file mode 100644 index 0000000..72cd94b --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/package.json @@ -0,0 +1,50 @@ +{ + "_ethers.alias": { + "pbkdf2.js": "browser-pbkdf2.js" + }, + "author": "Richard Moore ", + "browser": { + "./lib/pbkdf2": "./lib/browser-pbkdf2.js" + }, + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/sha2": "^5.5.0" + }, + "description": "The PBKDF2 password-pbased key derivation function for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers", + "pbkdf2" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/pbkdf2", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/pbkdf2", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x581ed2d5d4655f69a2982e995be37dbbe15dc913cb634c0a83e09e82ca323ac4", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/pbkdf2/src.ts/_version.ts b/node_modules/@ethersproject/pbkdf2/src.ts/_version.ts new file mode 100644 index 0000000..3411b9c --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "pbkdf2/5.5.0"; diff --git a/node_modules/@ethersproject/pbkdf2/src.ts/browser-pbkdf2.ts b/node_modules/@ethersproject/pbkdf2/src.ts/browser-pbkdf2.ts new file mode 100644 index 0000000..9203fb8 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/src.ts/browser-pbkdf2.ts @@ -0,0 +1,55 @@ +"use strict"; + +import { arrayify, BytesLike, hexlify } from "@ethersproject/bytes"; +import { computeHmac, SupportedAlgorithm } from "@ethersproject/sha2"; + +export function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string { + password = arrayify(password); + salt = arrayify(salt); + let hLen; + let l = 1; + const DK = new Uint8Array(keylen) + const block1 = new Uint8Array(salt.length + 4) + block1.set(salt); + //salt.copy(block1, 0, 0, salt.length) + + let r: number; + let T: Uint8Array; + + for (let i = 1; i <= l; i++) { + //block1.writeUInt32BE(i, salt.length) + block1[salt.length] = (i >> 24) & 0xff; + block1[salt.length + 1] = (i >> 16) & 0xff; + block1[salt.length + 2] = (i >> 8) & 0xff; + block1[salt.length + 3] = i & 0xff; + + //let U = createHmac(password).update(block1).digest(); + let U = arrayify(computeHmac(hashAlgorithm, password, block1)); + + if (!hLen) { + hLen = U.length + T = new Uint8Array(hLen) + l = Math.ceil(keylen / hLen) + r = keylen - (l - 1) * hLen + } + + //U.copy(T, 0, 0, hLen) + T.set(U); + + + for (let j = 1; j < iterations; j++) { + //U = createHmac(password).update(U).digest(); + U = arrayify(computeHmac(hashAlgorithm, password, U)); + for (let k = 0; k < hLen; k++) T[k] ^= U[k] + } + + + const destPos = (i - 1) * hLen + const len = (i === l ? r : hLen) + //T.copy(DK, destPos, 0, len) + DK.set(arrayify(T).slice(0, len), destPos); + } + + return hexlify(DK) +} + diff --git a/node_modules/@ethersproject/pbkdf2/src.ts/index.ts b/node_modules/@ethersproject/pbkdf2/src.ts/index.ts new file mode 100644 index 0000000..a19a781 --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/src.ts/index.ts @@ -0,0 +1,2 @@ + +export { pbkdf2 } from "./pbkdf2"; diff --git a/node_modules/@ethersproject/pbkdf2/src.ts/pbkdf2.ts b/node_modules/@ethersproject/pbkdf2/src.ts/pbkdf2.ts new file mode 100644 index 0000000..b67190e --- /dev/null +++ b/node_modules/@ethersproject/pbkdf2/src.ts/pbkdf2.ts @@ -0,0 +1,14 @@ +"use strict"; + +import { pbkdf2Sync as _pbkdf2 } from "crypto"; + +import { arrayify, BytesLike, hexlify } from "@ethersproject/bytes"; + + +function bufferify(value: BytesLike): Buffer { + return Buffer.from(arrayify(value)); +} + +export function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string { + return hexlify(_pbkdf2(bufferify(password), bufferify(salt), iterations, keylen, hashAlgorithm)); +} diff --git a/node_modules/@ethersproject/properties/LICENSE.md b/node_modules/@ethersproject/properties/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/properties/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/properties/README.md b/node_modules/@ethersproject/properties/README.md new file mode 100644 index 0000000..a31e298 --- /dev/null +++ b/node_modules/@ethersproject/properties/README.md @@ -0,0 +1,44 @@ +Property Utilities +================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains several useful utility methods for managing simple objects with +defined properties. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/properties/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + defineReadOnly, + + getStatic, + + resolveProperties, + checkProperties, + + shallowCopy, + deepCopy, + + Description, + + // Types + + Deferrable + +} = require("@ethersproject/properties"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/properties/lib.esm/_version.d.ts b/node_modules/@ethersproject/properties/lib.esm/_version.d.ts new file mode 100644 index 0000000..90bb64a --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "properties/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/properties/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..eb4d84f --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/_version.js b/node_modules/@ethersproject/properties/lib.esm/_version.js new file mode 100644 index 0000000..e5e7941 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "properties/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/_version.js.map b/node_modules/@ethersproject/properties/lib.esm/_version.js.map new file mode 100644 index 0000000..2533847 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/index.d.ts b/node_modules/@ethersproject/properties/lib.esm/index.d.ts new file mode 100644 index 0000000..2cc44d4 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/index.d.ts @@ -0,0 +1,17 @@ +export declare function defineReadOnly(object: T, name: K, value: T[K]): void; +export declare function getStatic(ctor: any, key: string): T; +export declare type Deferrable = { + [K in keyof T]: T[K] | Promise; +}; +export declare function resolveProperties(object: Readonly>): Promise; +export declare function checkProperties(object: any, properties: { + [name: string]: boolean; +}): void; +export declare function shallowCopy(object: T): T; +export declare function deepCopy(object: T): T; +export declare class Description { + constructor(info: { + [K in keyof T]: T[K]; + }); +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/index.d.ts.map b/node_modules/@ethersproject/properties/lib.esm/index.d.ts.map new file mode 100644 index 0000000..f6f9f66 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAM1F;AAGD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,CAOtD;AAED,oBAAY,UAAU,CAAC,CAAC,IAAI;KACtB,CAAC,IAAI,MAAM,CAAC,GAAI,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,CAAA;AAKD,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAYtF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,OAAO,CAAA;CAAE,GAAG,IAAI,CAU5F;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAI3C;AAyDD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAExC;AAED,qBAAa,WAAW,CAAC,CAAC,GAAG,GAAG;gBAChB,IAAI,EAAE;SAAI,CAAC,IAAI,MAAM,CAAC,GAAI,CAAC,CAAC,CAAC,CAAC;KAAE;CAK/C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/index.js b/node_modules/@ethersproject/properties/lib.esm/index.js new file mode 100644 index 0000000..7f160b2 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/index.js @@ -0,0 +1,126 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +export function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +// Crawl up the constructor chain to find a static method +export function getStatic(ctor, key) { + for (let i = 0; i < 32; i++) { + if (ctor[key]) { + return ctor[key]; + } + if (!ctor.prototype || typeof (ctor.prototype) !== "object") { + break; + } + ctor = Object.getPrototypeOf(ctor.prototype).constructor; + } + return null; +} +export function resolveProperties(object) { + return __awaiter(this, void 0, void 0, function* () { + const promises = Object.keys(object).map((key) => { + const value = object[key]; + return Promise.resolve(value).then((v) => ({ key: key, value: v })); + }); + const results = yield Promise.all(promises); + return results.reduce((accum, result) => { + accum[(result.key)] = result.value; + return accum; + }, {}); + }); +} +export function checkProperties(object, properties) { + if (!object || typeof (object) !== "object") { + logger.throwArgumentError("invalid object", "object", object); + } + Object.keys(object).forEach((key) => { + if (!properties[key]) { + logger.throwArgumentError("invalid object key - " + key, "transaction:" + key, object); + } + }); +} +export function shallowCopy(object) { + const result = {}; + for (const key in object) { + result[key] = object[key]; + } + return result; +} +const opaque = { bigint: true, boolean: true, "function": true, number: true, string: true }; +function _isFrozen(object) { + // Opaque objects are not mutable, so safe to copy by assignment + if (object === undefined || object === null || opaque[typeof (object)]) { + return true; + } + if (Array.isArray(object) || typeof (object) === "object") { + if (!Object.isFrozen(object)) { + return false; + } + const keys = Object.keys(object); + for (let i = 0; i < keys.length; i++) { + let value = null; + try { + value = object[keys[i]]; + } + catch (error) { + // If accessing a value triggers an error, it is a getter + // designed to do so (e.g. Result) and is therefore "frozen" + continue; + } + if (!_isFrozen(value)) { + return false; + } + } + return true; + } + return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, "object", object); +} +// Returns a new copy of object, such that no properties may be replaced. +// New properties may be added only to objects. +function _deepCopy(object) { + if (_isFrozen(object)) { + return object; + } + // Arrays are mutable, so we need to create a copy + if (Array.isArray(object)) { + return Object.freeze(object.map((item) => deepCopy(item))); + } + if (typeof (object) === "object") { + const result = {}; + for (const key in object) { + const value = object[key]; + if (value === undefined) { + continue; + } + defineReadOnly(result, key, deepCopy(value)); + } + return result; + } + return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, "object", object); +} +export function deepCopy(object) { + return _deepCopy(object); +} +export class Description { + constructor(info) { + for (const key in info) { + this[key] = deepCopy(info[key]); + } + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib.esm/index.js.map b/node_modules/@ethersproject/properties/lib.esm/index.js.map new file mode 100644 index 0000000..bb1a0b7 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,MAAM,UAAU,cAAc,CAAuB,MAAS,EAAE,IAAO,EAAE,KAAW;IAChF,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE;QAChC,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,KAAK;KAClB,CAAC,CAAC;AACP,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,SAAS,CAAI,IAAS,EAAE,GAAW;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QACzB,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;SAAE;QACpC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,OAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE;YAAE,MAAM;SAAE;QACtE,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;KAC5D;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AASD,MAAM,UAAgB,iBAAiB,CAAI,MAA+B;;QACtE,MAAM,QAAQ,GAA2B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACrE,MAAM,KAAK,GAAG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M,CAAC,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IAEzC,kDAAkD;IAClD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACvB,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC9D;IAED,IAAI,OAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;QAC7B,MAAM,MAAM,GAA6B,EAAE,CAAC;QAC5C,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACtB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,IAAI,KAAK,KAAK,SAAS,EAAE;gBAAE,SAAS;aAAE;YACtC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;SAChD;QAED,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,mBAAoB,OAAM,CAAC,MAAM,CAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,QAAQ,CAAI,MAAS;IACjC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,OAAO,WAAW;IACpB,YAAY,IAAgC;QACxC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACd,IAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC1C;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/_version.d.ts b/node_modules/@ethersproject/properties/lib/_version.d.ts new file mode 100644 index 0000000..90bb64a --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "properties/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/_version.d.ts.map b/node_modules/@ethersproject/properties/lib/_version.d.ts.map new file mode 100644 index 0000000..eb4d84f --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/_version.js b/node_modules/@ethersproject/properties/lib/_version.js new file mode 100644 index 0000000..cc60d71 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "properties/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/_version.js.map b/node_modules/@ethersproject/properties/lib/_version.js.map new file mode 100644 index 0000000..dfdfe76 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/index.d.ts b/node_modules/@ethersproject/properties/lib/index.d.ts new file mode 100644 index 0000000..2cc44d4 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/index.d.ts @@ -0,0 +1,17 @@ +export declare function defineReadOnly(object: T, name: K, value: T[K]): void; +export declare function getStatic(ctor: any, key: string): T; +export declare type Deferrable = { + [K in keyof T]: T[K] | Promise; +}; +export declare function resolveProperties(object: Readonly>): Promise; +export declare function checkProperties(object: any, properties: { + [name: string]: boolean; +}): void; +export declare function shallowCopy(object: T): T; +export declare function deepCopy(object: T): T; +export declare class Description { + constructor(info: { + [K in keyof T]: T[K]; + }); +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/index.d.ts.map b/node_modules/@ethersproject/properties/lib/index.d.ts.map new file mode 100644 index 0000000..f6f9f66 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAM1F;AAGD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,CAOtD;AAED,oBAAY,UAAU,CAAC,CAAC,IAAI;KACtB,CAAC,IAAI,MAAM,CAAC,GAAI,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,CAAA;AAKD,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAYtF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,OAAO,CAAA;CAAE,GAAG,IAAI,CAU5F;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAI3C;AAyDD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAExC;AAED,qBAAa,WAAW,CAAC,CAAC,GAAG,GAAG;gBAChB,IAAI,EAAE;SAAI,CAAC,IAAI,MAAM,CAAC,GAAI,CAAC,CAAC,CAAC,CAAC;KAAE;CAK/C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/index.js b/node_modules/@ethersproject/properties/lib/index.js new file mode 100644 index 0000000..41e0b52 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/index.js @@ -0,0 +1,171 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Description = exports.deepCopy = exports.shallowCopy = exports.checkProperties = exports.resolveProperties = exports.getStatic = exports.defineReadOnly = void 0; +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +exports.defineReadOnly = defineReadOnly; +// Crawl up the constructor chain to find a static method +function getStatic(ctor, key) { + for (var i = 0; i < 32; i++) { + if (ctor[key]) { + return ctor[key]; + } + if (!ctor.prototype || typeof (ctor.prototype) !== "object") { + break; + } + ctor = Object.getPrototypeOf(ctor.prototype).constructor; + } + return null; +} +exports.getStatic = getStatic; +function resolveProperties(object) { + return __awaiter(this, void 0, void 0, function () { + var promises, results; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + promises = Object.keys(object).map(function (key) { + var value = object[key]; + return Promise.resolve(value).then(function (v) { return ({ key: key, value: v }); }); + }); + return [4 /*yield*/, Promise.all(promises)]; + case 1: + results = _a.sent(); + return [2 /*return*/, results.reduce(function (accum, result) { + accum[(result.key)] = result.value; + return accum; + }, {})]; + } + }); + }); +} +exports.resolveProperties = resolveProperties; +function checkProperties(object, properties) { + if (!object || typeof (object) !== "object") { + logger.throwArgumentError("invalid object", "object", object); + } + Object.keys(object).forEach(function (key) { + if (!properties[key]) { + logger.throwArgumentError("invalid object key - " + key, "transaction:" + key, object); + } + }); +} +exports.checkProperties = checkProperties; +function shallowCopy(object) { + var result = {}; + for (var key in object) { + result[key] = object[key]; + } + return result; +} +exports.shallowCopy = shallowCopy; +var opaque = { bigint: true, boolean: true, "function": true, number: true, string: true }; +function _isFrozen(object) { + // Opaque objects are not mutable, so safe to copy by assignment + if (object === undefined || object === null || opaque[typeof (object)]) { + return true; + } + if (Array.isArray(object) || typeof (object) === "object") { + if (!Object.isFrozen(object)) { + return false; + } + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++) { + var value = null; + try { + value = object[keys[i]]; + } + catch (error) { + // If accessing a value triggers an error, it is a getter + // designed to do so (e.g. Result) and is therefore "frozen" + continue; + } + if (!_isFrozen(value)) { + return false; + } + } + return true; + } + return logger.throwArgumentError("Cannot deepCopy " + typeof (object), "object", object); +} +// Returns a new copy of object, such that no properties may be replaced. +// New properties may be added only to objects. +function _deepCopy(object) { + if (_isFrozen(object)) { + return object; + } + // Arrays are mutable, so we need to create a copy + if (Array.isArray(object)) { + return Object.freeze(object.map(function (item) { return deepCopy(item); })); + } + if (typeof (object) === "object") { + var result = {}; + for (var key in object) { + var value = object[key]; + if (value === undefined) { + continue; + } + defineReadOnly(result, key, deepCopy(value)); + } + return result; + } + return logger.throwArgumentError("Cannot deepCopy " + typeof (object), "object", object); +} +function deepCopy(object) { + return _deepCopy(object); +} +exports.deepCopy = deepCopy; +var Description = /** @class */ (function () { + function Description(info) { + for (var key in info) { + this[key] = deepCopy(info[key]); + } + } + return Description; +}()); +exports.Description = Description; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/lib/index.js.map b/node_modules/@ethersproject/properties/lib/index.js.map new file mode 100644 index 0000000..eb3f312 --- /dev/null +++ b/node_modules/@ethersproject/properties/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,SAAgB,cAAc,CAAuB,MAAS,EAAE,IAAO,EAAE,KAAW;IAChF,MAAM,CA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AG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,IAAI,KAAK,KAAK,SAAS,EAAE;gBAAE,SAAS;aAAE;YACtC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;SAChD;QAED,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,qBAAoB,OAAM,CAAC,MAAM,CAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9F,CAAC;AAED,SAAgB,QAAQ,CAAI,MAAS;IACjC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAFD,4BAEC;AAED;IACI,qBAAY,IAAgC;QACxC,KAAK,IAAM,GAAG,IAAI,IAAI,EAAE;YACd,IAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC1C;IACL,CAAC;IACL,kBAAC;AAAD,CAAC,AAND,IAMC;AANY,kCAAW"} \ No newline at end of file diff --git a/node_modules/@ethersproject/properties/package.json b/node_modules/@ethersproject/properties/package.json new file mode 100644 index 0000000..225a6b9 --- /dev/null +++ b/node_modules/@ethersproject/properties/package.json @@ -0,0 +1,44 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/logger": "^5.5.0" + }, + "description": "Properties utility functions for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/properties", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/properties", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "auto-build": "npm run build -- -w", + "build": "tsc -p ./tsconfig.json", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x4ff23e9446d99829a59e0ef5ac56b019611b8bfd644cb7ccd2d87671a2821f70", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/properties/src.ts/_version.ts b/node_modules/@ethersproject/properties/src.ts/_version.ts new file mode 100644 index 0000000..8cc02fe --- /dev/null +++ b/node_modules/@ethersproject/properties/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "properties/5.5.0"; diff --git a/node_modules/@ethersproject/properties/src.ts/index.ts b/node_modules/@ethersproject/properties/src.ts/index.ts new file mode 100644 index 0000000..6dc7ead --- /dev/null +++ b/node_modules/@ethersproject/properties/src.ts/index.ts @@ -0,0 +1,129 @@ +"use strict"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export function defineReadOnly(object: T, name: K, value: T[K]): void { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} + +// Crawl up the constructor chain to find a static method +export function getStatic(ctor: any, key: string): T { + for (let i = 0; i < 32; i++) { + if (ctor[key]) { return ctor[key]; } + if (!ctor.prototype || typeof(ctor.prototype) !== "object") { break; } + ctor = Object.getPrototypeOf(ctor.prototype).constructor; + } + return null; +} + +export type Deferrable = { + [ K in keyof T ]: T[K] | Promise; +} + + +type Result = { key: string, value: any}; + +export async function resolveProperties(object: Readonly>): Promise { + const promises: Array> = Object.keys(object).map((key) => { + const value = object[>key]; + return Promise.resolve(value).then((v) => ({ key: key, value: v })); + }); + + const results = await Promise.all(promises); + + return results.reduce((accum, result) => { + accum[(result.key)] = result.value; + return accum; + }, { }); +} + +export function checkProperties(object: any, properties: { [ name: string ]: boolean }): void { + if (!object || typeof(object) !== "object") { + logger.throwArgumentError("invalid object", "object", object); + } + + Object.keys(object).forEach((key) => { + if (!properties[key]) { + logger.throwArgumentError("invalid object key - " + key, "transaction:" + key, object); + } + }); +} + +export function shallowCopy(object: T): T { + const result: any = {}; + for (const key in object) { result[key] = object[key]; } + return result; +} + +const opaque: { [key: string]: boolean } = { bigint: true, boolean: true, "function": true, number: true, string: true }; + +function _isFrozen(object: any): boolean { + + // Opaque objects are not mutable, so safe to copy by assignment + if (object === undefined || object === null || opaque[typeof(object)]) { return true; } + + if (Array.isArray(object) || typeof(object) === "object") { + if (!Object.isFrozen(object)) { return false; } + + const keys = Object.keys(object); + for (let i = 0; i < keys.length; i++) { + let value: any = null; + try { + value = object[keys[i]]; + } catch (error) { + // If accessing a value triggers an error, it is a getter + // designed to do so (e.g. Result) and is therefore "frozen" + continue; + } + + if (!_isFrozen(value)) { return false; } + } + + return true; + } + + return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, "object", object); +} + +// Returns a new copy of object, such that no properties may be replaced. +// New properties may be added only to objects. +function _deepCopy(object: any): any { + + if (_isFrozen(object)) { return object; } + + // Arrays are mutable, so we need to create a copy + if (Array.isArray(object)) { + return Object.freeze(object.map((item) => deepCopy(item))); + } + + if (typeof(object) === "object") { + const result: { [ key: string ]: any } = {}; + for (const key in object) { + const value = object[key]; + if (value === undefined) { continue; } + defineReadOnly(result, key, deepCopy(value)); + } + + return result; + } + + return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, "object", object); +} + +export function deepCopy(object: T): T { + return _deepCopy(object); +} + +export class Description { + constructor(info: { [ K in keyof T ]: T[K] }) { + for (const key in info) { + (this)[key] = deepCopy(info[key]); + } + } +} diff --git a/node_modules/@ethersproject/providers/LICENSE.md b/node_modules/@ethersproject/providers/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/providers/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/providers/README.md b/node_modules/@ethersproject/providers/README.md new file mode 100644 index 0000000..e200aaf --- /dev/null +++ b/node_modules/@ethersproject/providers/README.md @@ -0,0 +1,78 @@ +Ethereum Providers +================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains common Provider classes, utility functions for dealing with providers +and re-exports many of the classes and types needed to implement a custom Provider. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Provider, + BaseProvider, + + JsonRpcProvider, + StaticJsonRpcProvider, + UrlJsonRpcProvider, + + FallbackProvider, + + AlchemyProvider, + CloudflareProvider, + EtherscanProvider, + InfuraProvider, + NodesmithProvider, + + IpcProvider, + + Web3Provider, + + WebSocketProvider, + + JsonRpcSigner, + + getDefaultProvider, + + getNetwork, + + Formatter, + + // Types + + TransactionReceipt, + TransactionRequest, + TransactionResponse, + + Listener, + + ExternalProvider, + + Block, + BlockTag, + EventType, + Filter, + Log, + + JsonRpcFetchFunc, + + Network, + Networkish + +} = require("@ethersproject/providers"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/providers/lib.esm/_version.d.ts b/node_modules/@ethersproject/providers/lib.esm/_version.d.ts new file mode 100644 index 0000000..179a99f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "providers/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/_version.js b/node_modules/@ethersproject/providers/lib.esm/_version.js new file mode 100644 index 0000000..2b44675 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "providers/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/_version.js.map b/node_modules/@ethersproject/providers/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts new file mode 100644 index 0000000..8f0e23a --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts @@ -0,0 +1,17 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { CommunityResourcable } from "./formatter"; +import { WebSocketProvider } from "./websocket-provider"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + readonly apiKey: string; + constructor(network?: Networkish, apiKey?: any); + isCommunityResource(): boolean; +} +export declare class AlchemyProvider extends UrlJsonRpcProvider { + static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: string): ConnectionInfo; + isCommunityResource(): boolean; +} +//# sourceMappingURL=alchemy-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts.map new file mode 100644 index 0000000..f519e6f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider.d.ts","sourceRoot":"","sources":["../src.ts/alchemy-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAMzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAS7D,qBAAa,wBAAyB,SAAQ,iBAAkB,YAAW,oBAAoB;IAC3F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IAU9C,mBAAmB,IAAI,OAAO;CAGjC;AAED,qBAAa,eAAgB,SAAQ,kBAAkB;IAEnD,MAAM,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,wBAAwB;IAIzF,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAQlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc;IAoD/D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js new file mode 100644 index 0000000..27d62b2 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js @@ -0,0 +1,93 @@ +"use strict"; +import { defineReadOnly } from "@ethersproject/properties"; +import { showThrottleMessage } from "./formatter"; +import { WebSocketProvider } from "./websocket-provider"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +// This key was provided to ethers.js by Alchemy to be used by the +// default provider, but it is recommended that for your own +// production environments, that you acquire your own API key at: +// https://dashboard.alchemyapi.io +const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC"; +export class AlchemyWebSocketProvider extends WebSocketProvider { + constructor(network, apiKey) { + const provider = new AlchemyProvider(network, apiKey); + const url = provider.connection.url.replace(/^http/i, "ws") + .replace(".alchemyapi.", ".ws.alchemyapi."); + super(url, provider.network); + defineReadOnly(this, "apiKey", provider.apiKey); + } + isCommunityResource() { + return (this.apiKey === defaultApiKey); + } +} +export class AlchemyProvider extends UrlJsonRpcProvider { + static getWebSocketProvider(network, apiKey) { + return new AlchemyWebSocketProvider(network, apiKey); + } + static getApiKey(apiKey) { + if (apiKey == null) { + return defaultApiKey; + } + if (apiKey && typeof (apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey; + } + static getUrl(network, apiKey) { + let host = null; + switch (network.name) { + case "homestead": + host = "eth-mainnet.alchemyapi.io/v2/"; + break; + case "ropsten": + host = "eth-ropsten.alchemyapi.io/v2/"; + break; + case "rinkeby": + host = "eth-rinkeby.alchemyapi.io/v2/"; + break; + case "goerli": + host = "eth-goerli.alchemyapi.io/v2/"; + break; + case "kovan": + host = "eth-kovan.alchemyapi.io/v2/"; + break; + case "matic": + host = "polygon-mainnet.g.alchemy.com/v2/"; + break; + case "maticmum": + host = "polygon-mumbai.g.alchemy.com/v2/"; + break; + case "arbitrum": + host = "arb-mainnet.g.alchemy.com/v2/"; + break; + case "arbitrum-rinkeby": + host = "arb-rinkeby.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-kovan": + host = "opt-kovan.g.alchemy.com/v2/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return { + allowGzip: true, + url: ("https:/" + "/" + host + apiKey), + throttleCallback: (attempt, url) => { + if (apiKey === defaultApiKey) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + } + isCommunityResource() { + return (this.apiKey === defaultApiKey); + } +} +//# sourceMappingURL=alchemy-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js.map new file mode 100644 index 0000000..5d16342 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider.js","sourceRoot":"","sources":["../src.ts/alchemy-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAwB,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE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SACJ,CAAC;IACN,CAAC;IAED,mBAAmB;QACf,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts new file mode 100644 index 0000000..adbda4c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts @@ -0,0 +1,147 @@ +/// +import { Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { Network, Networkish } from "@ethersproject/networks"; +import { Deferrable } from "@ethersproject/properties"; +import { Transaction } from "@ethersproject/transactions"; +import { Formatter } from "./formatter"; +export declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +export interface EnsResolver { + readonly name: string; + readonly address: string; + getAddress(coinType?: 60): Promise; + getContentHash(): Promise; + getText(key: string): Promise; +} +export interface EnsProvider { + resolveName(name: string): Promise; + lookupAddress(address: string): Promise; + getResolver(name: string): Promise; +} +export interface Avatar { + url: string; + linkage: Array<{ + type: string; + content: string; + }>; +} +export declare class Resolver implements EnsResolver { + readonly provider: BaseProvider; + readonly name: string; + readonly address: string; + readonly _resolvedAddress: null | string; + constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string); + _fetchBytes(selector: string, parameters?: string): Promise; + _getAddress(coinType: number, hexBytes: string): string; + getAddress(coinType?: number): Promise; + getAvatar(): Promise; + getContentHash(): Promise; + getText(key: string): Promise; +} +export declare class BaseProvider extends Provider implements EnsProvider { + _networkPromise: Promise; + _network: Network; + _events: Array; + formatter: Formatter; + _emitted: { + [eventName: string]: number | "pending"; + }; + _pollingInterval: number; + _poller: NodeJS.Timer; + _bootstrapPoll: NodeJS.Timer; + _lastBlockNumber: number; + _fastBlockNumber: number; + _fastBlockNumberPromise: Promise; + _fastQueryDate: number; + _maxInternalBlockNumber: number; + _internalBlockNumber: Promise<{ + blockNumber: number; + reqTime: number; + respTime: number; + }>; + readonly anyNetwork: boolean; + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + constructor(network: Networkish | Promise); + _ready(): Promise; + get ready(): Promise; + static getFormatter(): Formatter; + static getNetwork(network: Networkish): Network; + _getInternalBlockNumber(maxAge: number): Promise; + poll(): Promise; + resetEventsBlock(blockNumber: number): void; + get network(): Network; + detectNetwork(): Promise; + getNetwork(): Promise; + get blockNumber(): number; + get polling(): boolean; + set polling(value: boolean); + get pollingInterval(): number; + set pollingInterval(value: number); + _getFastBlockNumber(): Promise; + _setFastBlockNumber(blockNumber: number): void; + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { + data: string; + from: string; + nonce: number; + to: string; + value: BigNumber; + startBlock: number; + }): Promise; + getBlockNumber(): Promise; + getGasPrice(): Promise; + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse; + sendTransaction(signedTransaction: string | Promise): Promise; + _getTransactionRequest(transaction: Deferrable): Promise; + _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise; + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + estimateGas(transaction: Deferrable): Promise; + _getAddress(addressOrName: string | Promise): Promise; + _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise; + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + getTransaction(transactionHash: string | Promise): Promise; + getTransactionReceipt(transactionHash: string | Promise): Promise; + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + getEtherPrice(): Promise; + _getBlockTag(blockTag: BlockTag | Promise): Promise; + getResolver(name: string): Promise; + _getResolver(name: string): Promise; + resolveName(name: string | Promise): Promise; + lookupAddress(address: string | Promise): Promise; + getAvatar(nameOrAddress: string): Promise; + perform(method: string, params: any): Promise; + _startEvent(event: Event): void; + _stopEvent(event: Event): void; + _addEventListener(eventName: EventType, listener: Listener, once: boolean): this; + on(eventName: EventType, listener: Listener): this; + once(eventName: EventType, listener: Listener): this; + emit(eventName: EventType, ...args: Array): boolean; + listenerCount(eventName?: EventType): number; + listeners(eventName?: EventType): Array; + off(eventName: EventType, listener?: Listener): this; + removeAllListeners(eventName?: EventType): this; +} +//# sourceMappingURL=base-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts.map new file mode 100644 index 0000000..9f0f6c7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base-provider.d.ts","sourceRoot":"","sources":["../src.ts/base-provider.ts"],"names":[],"mappings":";AAEA,OAAO,EACH,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAC5E,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EACvF,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAInE,OAAO,EAAc,O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I;IAI/B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI9B,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;IAQhF,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAIlD,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAKpD,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO;IA4BxD,aAAa,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,MAAM;IAS5C,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC;IAWjD,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI;IAuBpD,kBAAkB,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI;CAmBlD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/base-provider.js b/node_modules/@ethersproject/providers/lib.esm/base-provider.js new file mode 100644 index 0000000..c8ea4f8 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/base-provider.js @@ -0,0 +1,1708 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { ForkEvent, Provider } from "@ethersproject/abstract-provider"; +import { Base58 } from "@ethersproject/basex"; +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { HashZero } from "@ethersproject/constants"; +import { namehash } from "@ethersproject/hash"; +import { getNetwork } from "@ethersproject/networks"; +import { defineReadOnly, getStatic, resolveProperties } from "@ethersproject/properties"; +import { sha256 } from "@ethersproject/sha2"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; +import { fetchJson, poll } from "@ethersproject/web"; +import bech32 from "bech32"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { Formatter } from "./formatter"; +////////////////////////////// +// Event Serializeing +function checkTopic(topic) { + if (topic == null) { + return "null"; + } + if (hexDataLength(topic) !== 32) { + logger.throwArgumentError("invalid topic", "topic", topic); + } + return topic.toLowerCase(); +} +function serializeTopics(topics) { + // Remove trailing null AND-topics; they are redundant + topics = topics.slice(); + while (topics.length > 0 && topics[topics.length - 1] == null) { + topics.pop(); + } + return topics.map((topic) => { + if (Array.isArray(topic)) { + // Only track unique OR-topics + const unique = {}; + topic.forEach((topic) => { + unique[checkTopic(topic)] = true; + }); + // The order of OR-topics does not matter + const sorted = Object.keys(unique); + sorted.sort(); + return sorted.join("|"); + } + else { + return checkTopic(topic); + } + }).join("&"); +} +function deserializeTopics(data) { + if (data === "") { + return []; + } + return data.split(/&/g).map((topic) => { + if (topic === "") { + return []; + } + const comps = topic.split("|").map((topic) => { + return ((topic === "null") ? null : topic); + }); + return ((comps.length === 1) ? comps[0] : comps); + }); +} +function getEventTag(eventName) { + if (typeof (eventName) === "string") { + eventName = eventName.toLowerCase(); + if (hexDataLength(eventName) === 32) { + return "tx:" + eventName; + } + if (eventName.indexOf(":") === -1) { + return eventName; + } + } + else if (Array.isArray(eventName)) { + return "filter:*:" + serializeTopics(eventName); + } + else if (ForkEvent.isForkEvent(eventName)) { + logger.warn("not implemented"); + throw new Error("not implemented"); + } + else if (eventName && typeof (eventName) === "object") { + return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []); + } + throw new Error("invalid event - " + eventName); +} +////////////////////////////// +// Helper Object +function getTime() { + return (new Date()).getTime(); +} +function stall(duration) { + return new Promise((resolve) => { + setTimeout(resolve, duration); + }); +} +////////////////////////////// +// Provider Object +/** + * EventType + * - "block" + * - "poll" + * - "didPoll" + * - "pending" + * - "error" + * - "network" + * - filter + * - topics array + * - transaction hash + */ +const PollableEvents = ["block", "network", "pending", "poll"]; +export class Event { + constructor(tag, listener, once) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "listener", listener); + defineReadOnly(this, "once", once); + } + get event() { + switch (this.type) { + case "tx": + return this.hash; + case "filter": + return this.filter; + } + return this.tag; + } + get type() { + return this.tag.split(":")[0]; + } + get hash() { + const comps = this.tag.split(":"); + if (comps[0] !== "tx") { + return null; + } + return comps[1]; + } + get filter() { + const comps = this.tag.split(":"); + if (comps[0] !== "filter") { + return null; + } + const address = comps[1]; + const topics = deserializeTopics(comps[2]); + const filter = {}; + if (topics.length > 0) { + filter.topics = topics; + } + if (address && address !== "*") { + filter.address = address; + } + return filter; + } + pollable() { + return (this.tag.indexOf(":") >= 0 || PollableEvents.indexOf(this.tag) >= 0); + } +} +; +// https://github.com/satoshilabs/slips/blob/master/slip-0044.md +const coinInfos = { + "0": { symbol: "btc", p2pkh: 0x00, p2sh: 0x05, prefix: "bc" }, + "2": { symbol: "ltc", p2pkh: 0x30, p2sh: 0x32, prefix: "ltc" }, + "3": { symbol: "doge", p2pkh: 0x1e, p2sh: 0x16 }, + "60": { symbol: "eth", ilk: "eth" }, + "61": { symbol: "etc", ilk: "eth" }, + "700": { symbol: "xdai", ilk: "eth" }, +}; +function bytes32ify(value) { + return hexZeroPad(BigNumber.from(value).toHexString(), 32); +} +// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d) +function base58Encode(data) { + return Base58.encode(concat([data, hexDataSlice(sha256(sha256(data)), 0, 4)])); +} +const matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + new RegExp("^(ipfs):/\/(.*)$", "i"), + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; +function _parseString(result) { + try { + return toUtf8String(_parseBytes(result)); + } + catch (error) { } + return null; +} +function _parseBytes(result) { + if (result === "0x") { + return null; + } + const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber(); + const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber(); + return hexDataSlice(result, offset + 32, offset + 32 + length); +} +export class Resolver { + // The resolvedAddress is only for creating a ReverseLookup resolver + constructor(provider, address, name, resolvedAddress) { + defineReadOnly(this, "provider", provider); + defineReadOnly(this, "name", name); + defineReadOnly(this, "address", provider.formatter.address(address)); + defineReadOnly(this, "_resolvedAddress", resolvedAddress); + } + _fetchBytes(selector, parameters) { + return __awaiter(this, void 0, void 0, function* () { + // e.g. keccak256("addr(bytes32,uint256)") + const tx = { + to: this.address, + data: hexConcat([selector, namehash(this.name), (parameters || "0x")]) + }; + try { + return _parseBytes(yield this.provider.call(tx)); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + return null; + } + }); + } + _getAddress(coinType, hexBytes) { + const coinInfo = coinInfos[String(coinType)]; + if (coinInfo == null) { + logger.throwError(`unsupported coin type: ${coinType}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: `getAddress(${coinType})` + }); + } + if (coinInfo.ilk === "eth") { + return this.provider.formatter.address(hexBytes); + } + const bytes = arrayify(hexBytes); + // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + if (coinInfo.p2pkh != null) { + const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/); + if (p2pkh) { + const length = parseInt(p2pkh[1], 16); + if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) { + return base58Encode(concat([[coinInfo.p2pkh], ("0x" + p2pkh[2])])); + } + } + } + // P2SH: OP_HASH160 OP_EQUAL + if (coinInfo.p2sh != null) { + const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/); + if (p2sh) { + const length = parseInt(p2sh[1], 16); + if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) { + return base58Encode(concat([[coinInfo.p2sh], ("0x" + p2sh[2])])); + } + } + } + // Bech32 + if (coinInfo.prefix != null) { + const length = bytes[1]; + // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program + let version = bytes[0]; + if (version === 0x00) { + if (length !== 20 && length !== 32) { + version = -1; + } + } + else { + version = -1; + } + if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) { + const words = bech32.toWords(bytes.slice(2)); + words.unshift(version); + return bech32.encode(coinInfo.prefix, words); + } + } + return null; + } + getAddress(coinType) { + return __awaiter(this, void 0, void 0, function* () { + if (coinType == null) { + coinType = 60; + } + // If Ethereum, use the standard `addr(bytes32)` + if (coinType === 60) { + try { + // keccak256("addr(bytes32)") + const transaction = { + to: this.address, + data: ("0x3b3b57de" + namehash(this.name).substring(2)) + }; + const hexBytes = yield this.provider.call(transaction); + // No address + if (hexBytes === "0x" || hexBytes === HashZero) { + return null; + } + return this.provider.formatter.callAddress(hexBytes); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + throw error; + } + } + // keccak256("addr(bytes32,uint256") + const hexBytes = yield this._fetchBytes("0xf1cb7e06", bytes32ify(coinType)); + // No address + if (hexBytes == null || hexBytes === "0x") { + return null; + } + // Compute the address + const address = this._getAddress(coinType, hexBytes); + if (address == null) { + logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: `getAddress(${coinType})`, + coinType: coinType, + data: hexBytes + }); + } + return address; + }); + } + getAvatar() { + return __awaiter(this, void 0, void 0, function* () { + const linkage = []; + try { + // test data for ricmoo.eth + //const avatar = "eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233"; + const avatar = yield this.getText("avatar"); + if (avatar == null) { + return null; + } + for (let i = 0; i < matchers.length; i++) { + const match = avatar.match(matchers[i]); + if (match == null) { + continue; + } + switch (match[1]) { + case "https": + linkage.push({ type: "url", content: avatar }); + return { linkage, url: avatar }; + case "data": + linkage.push({ type: "data", content: avatar }); + return { linkage, url: avatar }; + case "ipfs": + linkage.push({ type: "ipfs", content: avatar }); + return { linkage, url: `https:/\/gateway.ipfs.io/ipfs/${avatar.substring(7)}` }; + case "erc721": + case "erc1155": { + // Depending on the ERC type, use tokenURI(uint256) or url(uint256) + const selector = (match[1] === "erc721") ? "0xc87b56dd" : "0x0e89341c"; + linkage.push({ type: match[1], content: avatar }); + // The owner of this name + const owner = (this._resolvedAddress || (yield this.getAddress())); + const comps = (match[2] || "").split("/"); + if (comps.length !== 2) { + return null; + } + const addr = yield this.provider.formatter.address(comps[0]); + const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32); + // Check that this account owns the token + if (match[1] === "erc721") { + // ownerOf(uint256 tokenId) + const tokenOwner = this.provider.formatter.callAddress(yield this.provider.call({ + to: addr, data: hexConcat(["0x6352211e", tokenId]) + })); + if (owner !== tokenOwner) { + return null; + } + linkage.push({ type: "owner", content: tokenOwner }); + } + else if (match[1] === "erc1155") { + // balanceOf(address owner, uint256 tokenId) + const balance = BigNumber.from(yield this.provider.call({ + to: addr, data: hexConcat(["0x00fdd58e", hexZeroPad(owner, 32), tokenId]) + })); + if (balance.isZero()) { + return null; + } + linkage.push({ type: "balance", content: balance.toString() }); + } + // Call the token contract for the metadata URL + const tx = { + to: this.provider.formatter.address(comps[0]), + data: hexConcat([selector, tokenId]) + }; + let metadataUrl = _parseString(yield this.provider.call(tx)); + if (metadataUrl == null) { + return null; + } + linkage.push({ type: "metadata-url", content: metadataUrl }); + // ERC-1155 allows a generic {id} in the URL + if (match[1] === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + } + // Get the token metadata + const metadata = yield fetchJson(metadataUrl); + // Pull the image URL out + if (!metadata || typeof (metadata.image) !== "string" || !metadata.image.match(/^(https:\/\/|data:)/i)) { + return null; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + linkage.push({ type: "url", content: metadata.image }); + return { linkage, url: metadata.image }; + } + } + } + } + catch (error) { } + return null; + }); + } + getContentHash() { + return __awaiter(this, void 0, void 0, function* () { + // keccak256("contenthash()") + const hexBytes = yield this._fetchBytes("0xbc1c58d1"); + // No contenthash + if (hexBytes == null || hexBytes === "0x") { + return null; + } + // IPFS (CID: 1, Type: DAG-PB) + const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipfs) { + const length = parseInt(ipfs[3], 16); + if (ipfs[4].length === length * 2) { + return "ipfs:/\/" + Base58.encode("0x" + ipfs[1]); + } + } + // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32) + const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/); + if (swarm) { + if (swarm[1].length === (32 * 2)) { + return "bzz:/\/" + swarm[1]; + } + } + return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getContentHash()", + data: hexBytes + }); + }); + } + getText(key) { + return __awaiter(this, void 0, void 0, function* () { + // The key encoded as parameter to fetchBytes + let keyBytes = toUtf8Bytes(key); + // The nodehash consumes the first slot, so the string pointer targets + // offset 64, with the length at offset 64 and data starting at offset 96 + keyBytes = concat([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]); + // Pad to word-size (32 bytes) + if ((keyBytes.length % 32) !== 0) { + keyBytes = concat([keyBytes, hexZeroPad("0x", 32 - (key.length % 32))]); + } + const hexBytes = yield this._fetchBytes("0x59d1d43c", hexlify(keyBytes)); + if (hexBytes == null || hexBytes === "0x") { + return null; + } + return toUtf8String(hexBytes); + }); + } +} +let defaultFormatter = null; +let nextPollId = 1; +export class BaseProvider extends Provider { + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + constructor(network) { + logger.checkNew(new.target, Provider); + super(); + // Events being listened to + this._events = []; + this._emitted = { block: -2 }; + this.formatter = new.target.getFormatter(); + // If network is any, this Provider allows the underlying + // network to change dynamically, and we auto-detect the + // current network + defineReadOnly(this, "anyNetwork", (network === "any")); + if (this.anyNetwork) { + network = this.detectNetwork(); + } + if (network instanceof Promise) { + this._networkPromise = network; + // Squash any "unhandled promise" errors; that do not need to be handled + network.catch((error) => { }); + // Trigger initial network setting (async) + this._ready().catch((error) => { }); + } + else { + const knownNetwork = getStatic(new.target, "getNetwork")(network); + if (knownNetwork) { + defineReadOnly(this, "_network", knownNetwork); + this.emit("network", knownNetwork, null); + } + else { + logger.throwArgumentError("invalid network", "network", network); + } + } + this._maxInternalBlockNumber = -1024; + this._lastBlockNumber = -2; + this._pollingInterval = 4000; + this._fastQueryDate = 0; + } + _ready() { + return __awaiter(this, void 0, void 0, function* () { + if (this._network == null) { + let network = null; + if (this._networkPromise) { + try { + network = yield this._networkPromise; + } + catch (error) { } + } + // Try the Provider's network detection (this MUST throw if it cannot) + if (network == null) { + network = yield this.detectNetwork(); + } + // This should never happen; every Provider sub-class should have + // suggested a network by here (or have thrown). + if (!network) { + logger.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {}); + } + // Possible this call stacked so do not call defineReadOnly again + if (this._network == null) { + if (this.anyNetwork) { + this._network = network; + } + else { + defineReadOnly(this, "_network", network); + } + this.emit("network", network, null); + } + } + return this._network; + }); + } + // This will always return the most recently established network. + // For "any", this can change (a "network" event is emitted before + // any change is reflected); otherwise this cannot change + get ready() { + return poll(() => { + return this._ready().then((network) => { + return network; + }, (error) => { + // If the network isn't running yet, we will wait + if (error.code === Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { + return undefined; + } + throw error; + }); + }); + } + // @TODO: Remove this and just create a singleton formatter + static getFormatter() { + if (defaultFormatter == null) { + defaultFormatter = new Formatter(); + } + return defaultFormatter; + } + // @TODO: Remove this and just use getNetwork + static getNetwork(network) { + return getNetwork((network == null) ? "homestead" : network); + } + // Fetches the blockNumber, but will reuse any result that is less + // than maxAge old or has been requested since the last request + _getInternalBlockNumber(maxAge) { + return __awaiter(this, void 0, void 0, function* () { + yield this._ready(); + // Allowing stale data up to maxAge old + if (maxAge > 0) { + // While there are pending internal block requests... + while (this._internalBlockNumber) { + // ..."remember" which fetch we started with + const internalBlockNumber = this._internalBlockNumber; + try { + // Check the result is not too stale + const result = yield internalBlockNumber; + if ((getTime() - result.respTime) <= maxAge) { + return result.blockNumber; + } + // Too old; fetch a new value + break; + } + catch (error) { + // The fetch rejected; if we are the first to get the + // rejection, drop through so we replace it with a new + // fetch; all others blocked will then get that fetch + // which won't match the one they "remembered" and loop + if (this._internalBlockNumber === internalBlockNumber) { + break; + } + } + } + } + const reqTime = getTime(); + const checkInternalBlockNumber = resolveProperties({ + blockNumber: this.perform("getBlockNumber", {}), + networkError: this.getNetwork().then((network) => (null), (error) => (error)) + }).then(({ blockNumber, networkError }) => { + if (networkError) { + // Unremember this bad internal block number + if (this._internalBlockNumber === checkInternalBlockNumber) { + this._internalBlockNumber = null; + } + throw networkError; + } + const respTime = getTime(); + blockNumber = BigNumber.from(blockNumber).toNumber(); + if (blockNumber < this._maxInternalBlockNumber) { + blockNumber = this._maxInternalBlockNumber; + } + this._maxInternalBlockNumber = blockNumber; + this._setFastBlockNumber(blockNumber); // @TODO: Still need this? + return { blockNumber, reqTime, respTime }; + }); + this._internalBlockNumber = checkInternalBlockNumber; + // Swallow unhandled exceptions; if needed they are handled else where + checkInternalBlockNumber.catch((error) => { + // Don't null the dead (rejected) fetch, if it has already been updated + if (this._internalBlockNumber === checkInternalBlockNumber) { + this._internalBlockNumber = null; + } + }); + return (yield checkInternalBlockNumber).blockNumber; + }); + } + poll() { + return __awaiter(this, void 0, void 0, function* () { + const pollId = nextPollId++; + // Track all running promises, so we can trigger a post-poll once they are complete + const runners = []; + let blockNumber = null; + try { + blockNumber = yield this._getInternalBlockNumber(100 + this.pollingInterval / 2); + } + catch (error) { + this.emit("error", error); + return; + } + this._setFastBlockNumber(blockNumber); + // Emit a poll event after we have the latest (fast) block number + this.emit("poll", pollId, blockNumber); + // If the block has not changed, meh. + if (blockNumber === this._lastBlockNumber) { + this.emit("didPoll", pollId); + return; + } + // First polling cycle, trigger a "block" events + if (this._emitted.block === -2) { + this._emitted.block = blockNumber - 1; + } + if (Math.abs((this._emitted.block) - blockNumber) > 1000) { + logger.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`); + this.emit("error", logger.makeError("network block skew detected", Logger.errors.NETWORK_ERROR, { + blockNumber: blockNumber, + event: "blockSkew", + previousBlockNumber: this._emitted.block + })); + this.emit("block", blockNumber); + } + else { + // Notify all listener for each block that has passed + for (let i = this._emitted.block + 1; i <= blockNumber; i++) { + this.emit("block", i); + } + } + // The emitted block was updated, check for obsolete events + if (this._emitted.block !== blockNumber) { + this._emitted.block = blockNumber; + Object.keys(this._emitted).forEach((key) => { + // The block event does not expire + if (key === "block") { + return; + } + // The block we were at when we emitted this event + const eventBlockNumber = this._emitted[key]; + // We cannot garbage collect pending transactions or blocks here + // They should be garbage collected by the Provider when setting + // "pending" events + if (eventBlockNumber === "pending") { + return; + } + // Evict any transaction hashes or block hashes over 12 blocks + // old, since they should not return null anyways + if (blockNumber - eventBlockNumber > 12) { + delete this._emitted[key]; + } + }); + } + // First polling cycle + if (this._lastBlockNumber === -2) { + this._lastBlockNumber = blockNumber - 1; + } + // Find all transaction hashes we are waiting on + this._events.forEach((event) => { + switch (event.type) { + case "tx": { + const hash = event.hash; + let runner = this.getTransactionReceipt(hash).then((receipt) => { + if (!receipt || receipt.blockNumber == null) { + return null; + } + this._emitted["t:" + hash] = receipt.blockNumber; + this.emit(hash, receipt); + return null; + }).catch((error) => { this.emit("error", error); }); + runners.push(runner); + break; + } + case "filter": { + const filter = event.filter; + filter.fromBlock = this._lastBlockNumber + 1; + filter.toBlock = blockNumber; + const runner = this.getLogs(filter).then((logs) => { + if (logs.length === 0) { + return; + } + logs.forEach((log) => { + this._emitted["b:" + log.blockHash] = log.blockNumber; + this._emitted["t:" + log.transactionHash] = log.blockNumber; + this.emit(filter, log); + }); + }).catch((error) => { this.emit("error", error); }); + runners.push(runner); + break; + } + } + }); + this._lastBlockNumber = blockNumber; + // Once all events for this loop have been processed, emit "didPoll" + Promise.all(runners).then(() => { + this.emit("didPoll", pollId); + }).catch((error) => { this.emit("error", error); }); + return; + }); + } + // Deprecated; do not use this + resetEventsBlock(blockNumber) { + this._lastBlockNumber = blockNumber - 1; + if (this.polling) { + this.poll(); + } + } + get network() { + return this._network; + } + // This method should query the network if the underlying network + // can change, such as when connected to a JSON-RPC backend + detectNetwork() { + return __awaiter(this, void 0, void 0, function* () { + return logger.throwError("provider does not support network detection", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "provider.detectNetwork" + }); + }); + } + getNetwork() { + return __awaiter(this, void 0, void 0, function* () { + const network = yield this._ready(); + // Make sure we are still connected to the same network; this is + // only an external call for backends which can have the underlying + // network change spontaneously + const currentNetwork = yield this.detectNetwork(); + if (network.chainId !== currentNetwork.chainId) { + // We are allowing network changes, things can get complex fast; + // make sure you know what you are doing if you use "any" + if (this.anyNetwork) { + this._network = currentNetwork; + // Reset all internal block number guards and caches + this._lastBlockNumber = -2; + this._fastBlockNumber = null; + this._fastBlockNumberPromise = null; + this._fastQueryDate = 0; + this._emitted.block = -2; + this._maxInternalBlockNumber = -1024; + this._internalBlockNumber = null; + // The "network" event MUST happen before this method resolves + // so any events have a chance to unregister, so we stall an + // additional event loop before returning from /this/ call + this.emit("network", currentNetwork, network); + yield stall(0); + return this._network; + } + const error = logger.makeError("underlying network changed", Logger.errors.NETWORK_ERROR, { + event: "changed", + network: network, + detectedNetwork: currentNetwork + }); + this.emit("error", error); + throw error; + } + return network; + }); + } + get blockNumber() { + this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => { + this._setFastBlockNumber(blockNumber); + }, (error) => { }); + return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1; + } + get polling() { + return (this._poller != null); + } + set polling(value) { + if (value && !this._poller) { + this._poller = setInterval(() => { this.poll(); }, this.pollingInterval); + if (!this._bootstrapPoll) { + this._bootstrapPoll = setTimeout(() => { + this.poll(); + // We block additional polls until the polling interval + // is done, to prevent overwhelming the poll function + this._bootstrapPoll = setTimeout(() => { + // If polling was disabled, something may require a poke + // since starting the bootstrap poll and it was disabled + if (!this._poller) { + this.poll(); + } + // Clear out the bootstrap so we can do another + this._bootstrapPoll = null; + }, this.pollingInterval); + }, 0); + } + } + else if (!value && this._poller) { + clearInterval(this._poller); + this._poller = null; + } + } + get pollingInterval() { + return this._pollingInterval; + } + set pollingInterval(value) { + if (typeof (value) !== "number" || value <= 0 || parseInt(String(value)) != value) { + throw new Error("invalid polling interval"); + } + this._pollingInterval = value; + if (this._poller) { + clearInterval(this._poller); + this._poller = setInterval(() => { this.poll(); }, this._pollingInterval); + } + } + _getFastBlockNumber() { + const now = getTime(); + // Stale block number, request a newer value + if ((now - this._fastQueryDate) > 2 * this._pollingInterval) { + this._fastQueryDate = now; + this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => { + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + } + return this._fastBlockNumber; + }); + } + return this._fastBlockNumberPromise; + } + _setFastBlockNumber(blockNumber) { + // Older block, maybe a stale request + if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { + return; + } + // Update the time we updated the blocknumber + this._fastQueryDate = getTime(); + // Newer block number, use it + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + this._fastBlockNumberPromise = Promise.resolve(blockNumber); + } + } + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + return this._waitForTransaction(transactionHash, (confirmations == null) ? 1 : confirmations, timeout || 0, null); + }); + } + _waitForTransaction(transactionHash, confirmations, timeout, replaceable) { + return __awaiter(this, void 0, void 0, function* () { + const receipt = yield this.getTransactionReceipt(transactionHash); + // Receipt is already good + if ((receipt ? receipt.confirmations : 0) >= confirmations) { + return receipt; + } + // Poll until the receipt is good... + return new Promise((resolve, reject) => { + const cancelFuncs = []; + let done = false; + const alreadyDone = function () { + if (done) { + return true; + } + done = true; + cancelFuncs.forEach((func) => { func(); }); + return false; + }; + const minedHandler = (receipt) => { + if (receipt.confirmations < confirmations) { + return; + } + if (alreadyDone()) { + return; + } + resolve(receipt); + }; + this.on(transactionHash, minedHandler); + cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); }); + if (replaceable) { + let lastBlockNumber = replaceable.startBlock; + let scannedBlock = null; + const replaceHandler = (blockNumber) => __awaiter(this, void 0, void 0, function* () { + if (done) { + return; + } + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + yield stall(1000); + this.getTransactionCount(replaceable.from).then((nonce) => __awaiter(this, void 0, void 0, function* () { + if (done) { + return; + } + if (nonce <= replaceable.nonce) { + lastBlockNumber = blockNumber; + } + else { + // First check if the transaction was mined + { + const mined = yield this.getTransaction(transactionHash); + if (mined && mined.blockNumber != null) { + return; + } + } + // First time scanning. We start a little earlier for some + // wiggle room here to handle the eventually consistent nature + // of blockchain (e.g. the getTransactionCount was for a + // different block) + if (scannedBlock == null) { + scannedBlock = lastBlockNumber - 3; + if (scannedBlock < replaceable.startBlock) { + scannedBlock = replaceable.startBlock; + } + } + while (scannedBlock <= blockNumber) { + if (done) { + return; + } + const block = yield this.getBlockWithTransactions(scannedBlock); + for (let ti = 0; ti < block.transactions.length; ti++) { + const tx = block.transactions[ti]; + // Successfully mined! + if (tx.hash === transactionHash) { + return; + } + // Matches our transaction from and nonce; its a replacement + if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) { + if (done) { + return; + } + // Get the receipt of the replacement + const receipt = yield this.waitForTransaction(tx.hash, confirmations); + // Already resolved or rejected (prolly a timeout) + if (alreadyDone()) { + return; + } + // The reason we were replaced + let reason = "replaced"; + if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) { + reason = "repriced"; + } + else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) { + reason = "cancelled"; + } + // Explain why we were replaced + reject(logger.makeError("transaction was replaced", Logger.errors.TRANSACTION_REPLACED, { + cancelled: (reason === "replaced" || reason === "cancelled"), + reason, + replacement: this._wrapTransaction(tx), + hash: transactionHash, + receipt + })); + return; + } + } + scannedBlock++; + } + } + if (done) { + return; + } + this.once("block", replaceHandler); + }), (error) => { + if (done) { + return; + } + this.once("block", replaceHandler); + }); + }); + if (done) { + return; + } + this.once("block", replaceHandler); + cancelFuncs.push(() => { + this.removeListener("block", replaceHandler); + }); + } + if (typeof (timeout) === "number" && timeout > 0) { + const timer = setTimeout(() => { + if (alreadyDone()) { + return; + } + reject(logger.makeError("timeout exceeded", Logger.errors.TIMEOUT, { timeout: timeout })); + }, timeout); + if (timer.unref) { + timer.unref(); + } + cancelFuncs.push(() => { clearTimeout(timer); }); + } + }); + }); + } + getBlockNumber() { + return __awaiter(this, void 0, void 0, function* () { + return this._getInternalBlockNumber(0); + }); + } + getGasPrice() { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const result = yield this.perform("getGasPrice", {}); + try { + return BigNumber.from(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getGasPrice", + result, error + }); + } + }); + } + getBalance(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("getBalance", params); + try { + return BigNumber.from(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getBalance", + params, result, error + }); + } + }); + } + getTransactionCount(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("getTransactionCount", params); + try { + return BigNumber.from(result).toNumber(); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getTransactionCount", + params, result, error + }); + } + }); + } + getCode(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("getCode", params); + try { + return hexlify(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getCode", + params, result, error + }); + } + }); + } + getStorageAt(addressOrName, position, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag), + position: Promise.resolve(position).then((p) => hexValue(p)) + }); + const result = yield this.perform("getStorageAt", params); + try { + return hexlify(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getStorageAt", + params, result, error + }); + } + }); + } + // This should be called by any subclass wrapping a TransactionResponse + _wrapTransaction(tx, hash, startBlock) { + if (hash != null && hexDataLength(hash) !== 32) { + throw new Error("invalid response - sendTransaction"); + } + const result = tx; + // Check the hash we expect is the same as the hash the server reported + if (hash != null && tx.hash !== hash) { + logger.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash }); + } + result.wait = (confirms, timeout) => __awaiter(this, void 0, void 0, function* () { + if (confirms == null) { + confirms = 1; + } + if (timeout == null) { + timeout = 0; + } + // Get the details to detect replacement + let replacement = undefined; + if (confirms !== 0 && startBlock != null) { + replacement = { + data: tx.data, + from: tx.from, + nonce: tx.nonce, + to: tx.to, + value: tx.value, + startBlock + }; + } + const receipt = yield this._waitForTransaction(tx.hash, confirms, timeout, replacement); + if (receipt == null && confirms === 0) { + return null; + } + // No longer pending, allow the polling loop to garbage collect this + this._emitted["t:" + tx.hash] = receipt.blockNumber; + if (receipt.status === 0) { + logger.throwError("transaction failed", Logger.errors.CALL_EXCEPTION, { + transactionHash: tx.hash, + transaction: tx, + receipt: receipt + }); + } + return receipt; + }); + return result; + } + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const hexTx = yield Promise.resolve(signedTransaction).then(t => hexlify(t)); + const tx = this.formatter.transaction(signedTransaction); + if (tx.confirmations == null) { + tx.confirmations = 0; + } + const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + try { + const hash = yield this.perform("sendTransaction", { signedTransaction: hexTx }); + return this._wrapTransaction(tx, hash, blockNumber); + } + catch (error) { + error.transaction = tx; + error.transactionHash = tx.hash; + throw error; + } + }); + } + _getTransactionRequest(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const values = yield transaction; + const tx = {}; + ["from", "to"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v) : null)); + }); + ["gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "value"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v) : null)); + }); + ["type"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v : null)); + }); + if (values.accessList) { + tx.accessList = this.formatter.accessList(values.accessList); + } + ["data"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v) : null)); + }); + return this.formatter.transactionRequest(yield resolveProperties(tx)); + }); + } + _getFilter(filter) { + return __awaiter(this, void 0, void 0, function* () { + filter = yield filter; + const result = {}; + if (filter.address != null) { + result.address = this._getAddress(filter.address); + } + ["blockHash", "topics"].forEach((key) => { + if (filter[key] == null) { + return; + } + result[key] = filter[key]; + }); + ["fromBlock", "toBlock"].forEach((key) => { + if (filter[key] == null) { + return; + } + result[key] = this._getBlockTag(filter[key]); + }); + return this.formatter.filter(yield resolveProperties(result)); + }); + } + call(transaction, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("call", params); + try { + return hexlify(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "call", + params, result, error + }); + } + }); + } + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + transaction: this._getTransactionRequest(transaction) + }); + const result = yield this.perform("estimateGas", params); + try { + return BigNumber.from(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "estimateGas", + params, result, error + }); + } + }); + } + _getAddress(addressOrName) { + return __awaiter(this, void 0, void 0, function* () { + addressOrName = yield addressOrName; + if (typeof (addressOrName) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", addressOrName); + } + const address = yield this.resolveName(addressOrName); + if (address == null) { + logger.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, { + operation: `resolveName(${JSON.stringify(addressOrName)})` + }); + } + return address; + }); + } + _getBlock(blockHashOrBlockTag, includeTransactions) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + blockHashOrBlockTag = yield blockHashOrBlockTag; + // If blockTag is a number (not "latest", etc), this is the block number + let blockNumber = -128; + const params = { + includeTransactions: !!includeTransactions + }; + if (isHexString(blockHashOrBlockTag, 32)) { + params.blockHash = blockHashOrBlockTag; + } + else { + try { + params.blockTag = yield this._getBlockTag(blockHashOrBlockTag); + if (isHexString(params.blockTag)) { + blockNumber = parseInt(params.blockTag.substring(2), 16); + } + } + catch (error) { + logger.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); + } + } + return poll(() => __awaiter(this, void 0, void 0, function* () { + const block = yield this.perform("getBlock", params); + // Block was not found + if (block == null) { + // For blockhashes, if we didn't say it existed, that blockhash may + // not exist. If we did see it though, perhaps from a log, we know + // it exists, and this node is just not caught up yet. + if (params.blockHash != null) { + if (this._emitted["b:" + params.blockHash] == null) { + return null; + } + } + // For block tags, if we are asking for a future block, we return null + if (params.blockTag != null) { + if (blockNumber > this._emitted.block) { + return null; + } + } + // Retry on the next block + return undefined; + } + // Add transactions + if (includeTransactions) { + let blockNumber = null; + for (let i = 0; i < block.transactions.length; i++) { + const tx = block.transactions[i]; + if (tx.blockNumber == null) { + tx.confirmations = 0; + } + else if (tx.confirmations == null) { + if (blockNumber == null) { + blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + } + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + } + } + const blockWithTxs = this.formatter.blockWithTransactions(block); + blockWithTxs.transactions = blockWithTxs.transactions.map((tx) => this._wrapTransaction(tx)); + return blockWithTxs; + } + return this.formatter.block(block); + }), { oncePoll: this }); + }); + } + getBlock(blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, false)); + } + getBlockWithTransactions(blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, true)); + } + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + transactionHash = yield transactionHash; + const params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return poll(() => __awaiter(this, void 0, void 0, function* () { + const result = yield this.perform("getTransaction", params); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return null; + } + return undefined; + } + const tx = this.formatter.transactionResponse(result); + if (tx.blockNumber == null) { + tx.confirmations = 0; + } + else if (tx.confirmations == null) { + const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + } + return this._wrapTransaction(tx); + }), { oncePoll: this }); + }); + } + getTransactionReceipt(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + transactionHash = yield transactionHash; + const params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return poll(() => __awaiter(this, void 0, void 0, function* () { + const result = yield this.perform("getTransactionReceipt", params); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return null; + } + return undefined; + } + // "geth-etc" returns receipts before they are ready + if (result.blockHash == null) { + return undefined; + } + const receipt = this.formatter.receipt(result); + if (receipt.blockNumber == null) { + receipt.confirmations = 0; + } + else if (receipt.confirmations == null) { + const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - receipt.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + receipt.confirmations = confirmations; + } + return receipt; + }), { oncePoll: this }); + }); + } + getLogs(filter) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ filter: this._getFilter(filter) }); + const logs = yield this.perform("getLogs", params); + logs.forEach((log) => { + if (log.removed == null) { + log.removed = false; + } + }); + return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs); + }); + } + getEtherPrice() { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + return this.perform("getEtherPrice", {}); + }); + } + _getBlockTag(blockTag) { + return __awaiter(this, void 0, void 0, function* () { + blockTag = yield blockTag; + if (typeof (blockTag) === "number" && blockTag < 0) { + if (blockTag % 1) { + logger.throwArgumentError("invalid BlockTag", "blockTag", blockTag); + } + let blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + blockNumber += blockTag; + if (blockNumber < 0) { + blockNumber = 0; + } + return this.formatter.blockTag(blockNumber); + } + return this.formatter.blockTag(blockTag); + }); + } + getResolver(name) { + return __awaiter(this, void 0, void 0, function* () { + try { + const address = yield this._getResolver(name); + if (address == null) { + return null; + } + return new Resolver(this, address, name); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + return null; + } + }); + } + _getResolver(name) { + return __awaiter(this, void 0, void 0, function* () { + // Get the resolver from the blockchain + const network = yield this.getNetwork(); + // No ENS... + if (!network.ensAddress) { + logger.throwError("network does not support ENS", Logger.errors.UNSUPPORTED_OPERATION, { operation: "ENS", network: network.name }); + } + // keccak256("resolver(bytes32)") + const transaction = { + to: network.ensAddress, + data: ("0x0178b8bf" + namehash(name).substring(2)) + }; + try { + return this.formatter.callAddress(yield this.call(transaction)); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + throw error; + } + }); + } + resolveName(name) { + return __awaiter(this, void 0, void 0, function* () { + name = yield name; + // If it is already an address, nothing to resolve + try { + return Promise.resolve(this.formatter.address(name)); + } + catch (error) { + // If is is a hexstring, the address is bad (See #694) + if (isHexString(name)) { + throw error; + } + } + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid ENS name", "name", name); + } + // Get the addr from the resovler + const resolver = yield this.getResolver(name); + if (!resolver) { + return null; + } + return yield resolver.getAddress(); + }); + } + lookupAddress(address) { + return __awaiter(this, void 0, void 0, function* () { + address = yield address; + address = this.formatter.address(address); + const reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + const resolverAddress = yield this._getResolver(reverseName); + if (!resolverAddress) { + return null; + } + // keccak("name(bytes32)") + let bytes = arrayify(yield this.call({ + to: resolverAddress, + data: ("0x691f3431" + namehash(reverseName).substring(2)) + })); + // Strip off the dynamic string pointer (0x20) + if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { + return null; + } + bytes = bytes.slice(32); + // Not a length-prefixed string + if (bytes.length < 32) { + return null; + } + // Get the length of the string (from the length-prefix) + const length = BigNumber.from(bytes.slice(0, 32)).toNumber(); + bytes = bytes.slice(32); + // Length longer than available data + if (length > bytes.length) { + return null; + } + const name = toUtf8String(bytes.slice(0, length)); + // Make sure the reverse record matches the foward record + const addr = yield this.resolveName(name); + if (addr != address) { + return null; + } + return name; + }); + } + getAvatar(nameOrAddress) { + return __awaiter(this, void 0, void 0, function* () { + let resolver = null; + if (isHexString(nameOrAddress)) { + // Address; reverse lookup + const address = this.formatter.address(nameOrAddress); + const reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + const resolverAddress = yield this._getResolver(reverseName); + if (!resolverAddress) { + return null; + } + resolver = new Resolver(this, resolverAddress, "_", address); + } + else { + // ENS name; forward lookup + resolver = yield this.getResolver(nameOrAddress); + if (!resolver) { + return null; + } + } + const avatar = yield resolver.getAvatar(); + if (avatar == null) { + return null; + } + return avatar.url; + }); + } + perform(method, params) { + return logger.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + _startEvent(event) { + this.polling = (this._events.filter((e) => e.pollable()).length > 0); + } + _stopEvent(event) { + this.polling = (this._events.filter((e) => e.pollable()).length > 0); + } + _addEventListener(eventName, listener, once) { + const event = new Event(getEventTag(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + } + on(eventName, listener) { + return this._addEventListener(eventName, listener, false); + } + once(eventName, listener) { + return this._addEventListener(eventName, listener, true); + } + emit(eventName, ...args) { + let result = false; + let stopped = []; + let eventTag = getEventTag(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag) { + return true; + } + setTimeout(() => { + event.listener.apply(this, args); + }, 0); + result = true; + if (event.once) { + stopped.push(event); + return false; + } + return true; + }); + stopped.forEach((event) => { this._stopEvent(event); }); + return result; + } + listenerCount(eventName) { + if (!eventName) { + return this._events.length; + } + let eventTag = getEventTag(eventName); + return this._events.filter((event) => { + return (event.tag === eventTag); + }).length; + } + listeners(eventName) { + if (eventName == null) { + return this._events.map((event) => event.listener); + } + let eventTag = getEventTag(eventName); + return this._events + .filter((event) => (event.tag === eventTag)) + .map((event) => event.listener); + } + off(eventName, listener) { + if (listener == null) { + return this.removeAllListeners(eventName); + } + const stopped = []; + let found = false; + let eventTag = getEventTag(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag || event.listener != listener) { + return true; + } + if (found) { + return true; + } + found = true; + stopped.push(event); + return false; + }); + stopped.forEach((event) => { this._stopEvent(event); }); + return this; + } + removeAllListeners(eventName) { + let stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + const eventTag = getEventTag(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag) { + return true; + } + stopped.push(event); + return false; + }); + } + stopped.forEach((event) => { this._stopEvent(event); }); + return this; + } +} +//# sourceMappingURL=base-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/base-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/base-provider.js.map new file mode 100644 index 0000000..b8173f1 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/base-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base-provider.js","sourceRoot":"","sources":["../src.ts/base-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAC2E,SAAS,EACxE,QAAQ,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC5I,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,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AAE;YAC3B,KAAK,GAAG,IAAI,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB,CAAC,SAAqB;QACpC,IAAI,OAAO,GAAiB,EAAG,CAAC;QAChC,IAAI,SAAS,IAAI,IAAI,EAAE;YACnB,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAEvB,IAAI,CAAC,OAAO,GAAG,EAAG,CAAC;SACtB;aAAM;YACH,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;gBACzC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;oBAAE,OAAO,IAAI,CAAC;iBAAE;gBAC5C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,KAAK,CAAC;YACjB,CAAC,CAAC,CAAC;SACN;QAED,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts new file mode 100644 index 0000000..f209dd3 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts @@ -0,0 +1,8 @@ +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class CloudflareProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey?: any): string; + perform(method: string, params: any): Promise; +} +//# sourceMappingURL=cloudflare-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts.map new file mode 100644 index 0000000..2a3ef84 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cloudflare-provider.d.ts","sourceRoot":"","sources":["../src.ts/cloudflare-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,qBAAa,kBAAmB,SAAQ,kBAAkB;IAEtD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAOlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM;IAa/C,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CAU3D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js new file mode 100644 index 0000000..a819c0b --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js @@ -0,0 +1,48 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +export class CloudflareProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey) { + if (apiKey != null) { + logger.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); + } + return null; + } + static getUrl(network, apiKey) { + let host = null; + switch (network.name) { + case "homestead": + host = "https://cloudflare-eth.com/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return host; + } + perform(method, params) { + const _super = Object.create(null, { + perform: { get: () => super.perform } + }); + return __awaiter(this, void 0, void 0, function* () { + // The Cloudflare provider does not support eth_blockNumber, + // so we get the latest block and pull it from that + if (method === "getBlockNumber") { + const block = yield _super.perform.call(this, "getBlock", { blockTag: "latest" }); + return block.number; + } + return _super.perform.call(this, method, params); + }); + } +} +//# sourceMappingURL=cloudflare-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js.map new file mode 100644 index 0000000..9489462 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cloudflare-provider.js","sourceRoot":"","sources":["../src.ts/cloudflare-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAGb,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,MAAM,OAAO,kBAAmB,SAAQ,kBAAkB;IAEtD,MAAM,CAAC,SAAS,CAAC,MAAW;QACxB,IAAI,MAAM,IAAI,IAAI,EAAE;YAChB,MAAM,CAAC,kBAAkB,CAAC,qCAAqC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SACtF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,OAAgB,EAAE,MAAY;QACxC,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,QAAQ,OAAO,CAAC,IAAI,EAAE;YAClB,KAAK,WAAW;gBACZ,IAAI,GAAG,6BAA6B,CAAC;gBACrC,MAAM;YACV;gBACG,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAChF;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEK,OAAO,CAAC,MAAc,EAAE,MAAW;;;;;YACrC,4DAA4D;YAC5D,mDAAmD;YACnD,IAAI,MAAM,KAAK,gBAAgB,EAAE;gBAC7B,MAAM,KAAK,GAAG,MAAM,OAAM,OAAO,YAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACtE,OAAO,KAAK,CAAC,MAAM,CAAC;aACvB;YAED,OAAO,OAAM,OAAO,YAAC,MAAM,EAAE,MAAM,EAAE;QACzC,CAAC;KAAA;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts new file mode 100644 index 0000000..44b8294 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts @@ -0,0 +1,18 @@ +import { BlockTag, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Network, Networkish } from "@ethersproject/networks"; +import { BaseProvider } from "./base-provider"; +export declare class EtherscanProvider extends BaseProvider { + readonly baseUrl: string; + readonly apiKey: string; + constructor(network?: Networkish, apiKey?: string); + getBaseUrl(): string; + getUrl(module: string, params: Record): string; + getPostUrl(): string; + getPostData(module: string, params: Record): Record; + fetch(module: string, params: Record, post?: boolean): Promise; + detectNetwork(): Promise; + perform(method: string, params: any): Promise; + getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise>; + isCommunityResource(): boolean; +} +//# sourceMappingURL=etherscan-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts.map new file mode 100644 index 0000000..734d724 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"etherscan-provider.d.ts","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAsB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAW9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiJ/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IASjD,UAAU,IAAI,MAAM;IAkBpB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;IAY9D,UAAU,IAAI,MAAM;IAIpB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAMvE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;IA0ChF,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAmKlD,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAwB1I,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js new file mode 100644 index 0000000..7a3275c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js @@ -0,0 +1,419 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { hexlify, hexValue, isHexString } from "@ethersproject/bytes"; +import { deepCopy, defineReadOnly } from "@ethersproject/properties"; +import { accessListify } from "@ethersproject/transactions"; +import { fetchJson } from "@ethersproject/web"; +import { showThrottleMessage } from "./formatter"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { BaseProvider } from "./base-provider"; +// The transaction has already been sanitized by the calls in Provider +function getTransactionPostData(transaction) { + const result = {}; + for (let key in transaction) { + if (transaction[key] == null) { + continue; + } + let value = transaction[key]; + if (key === "type" && value === 0) { + continue; + } + // Quantity-types require no leading zero, unless 0 + if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) { + value = hexValue(hexlify(value)); + } + else if (key === "accessList") { + value = "[" + accessListify(value).map((set) => { + return `{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`; + }).join(",") + "]"; + } + else { + value = hexlify(value); + } + result[key] = value; + } + return result; +} +function getResult(result) { + // getLogs, getHistory have weird success responses + if (result.status == 0 && (result.message === "No records found" || result.message === "No transactions found")) { + return result.result; + } + if (result.status != 1 || result.message != "OK") { + const error = new Error("invalid response"); + error.result = JSON.stringify(result); + if ((result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + error.throttleRetry = true; + } + throw error; + } + return result.result; +} +function getJsonResult(result) { + // This response indicates we are being throttled + if (result && result.status == 0 && result.message == "NOTOK" && (result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + const error = new Error("throttled response"); + error.result = JSON.stringify(result); + error.throttleRetry = true; + throw error; + } + if (result.jsonrpc != "2.0") { + // @TODO: not any + const error = new Error("invalid response"); + error.result = JSON.stringify(result); + throw error; + } + if (result.error) { + // @TODO: not any + const error = new Error(result.error.message || "unknown error"); + if (result.error.code) { + error.code = result.error.code; + } + if (result.error.data) { + error.data = result.error.data; + } + throw error; + } + return result.result; +} +// The blockTag was normalized as a string by the Provider pre-perform operations +function checkLogTag(blockTag) { + if (blockTag === "pending") { + throw new Error("pending not supported"); + } + if (blockTag === "latest") { + return blockTag; + } + return parseInt(blockTag.substring(2), 16); +} +const defaultApiKey = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"; +function checkError(method, error, transaction) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === Logger.errors.SERVER_ERROR) { + const e = error.error; + // Etherscan keeps changing their string + if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) { + // Etherscan prefixes the data like "Reverted 0x1234" + let data = e.data; + if (data) { + data = "0x" + data.replace(/^.*0x/i, ""); + } + if (isHexString(data)) { + return data; + } + logger.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, { + error, data: "0x" + }); + } + } + // Get the message from any nested error structure + let message = error.message; + if (error.code === Logger.errors.SERVER_ERROR) { + if (error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + } + message = (message || "").toLowerCase(); + // "Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0" + if (message.match(/insufficient funds/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + // "Transaction with the same hash was already imported." + if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) { + logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + // "Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce." + if (message.match(/another transaction with same nonce/)) { + logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + if (message.match(/execution failed due to an exception|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, method, transaction + }); + } + throw error; +} +export class EtherscanProvider extends BaseProvider { + constructor(network, apiKey) { + logger.checkNew(new.target, EtherscanProvider); + super(network); + defineReadOnly(this, "baseUrl", this.getBaseUrl()); + defineReadOnly(this, "apiKey", apiKey || defaultApiKey); + } + getBaseUrl() { + switch (this.network ? this.network.name : "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "ropsten": + return "https:/\/api-ropsten.etherscan.io"; + case "rinkeby": + return "https:/\/api-rinkeby.etherscan.io"; + case "kovan": + return "https:/\/api-kovan.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + default: + } + return logger.throwArgumentError("unsupported network", "network", name); + } + getUrl(module, params) { + const query = Object.keys(params).reduce((accum, key) => { + const value = params[key]; + if (value != null) { + accum += `&${key}=${value}`; + } + return accum; + }, ""); + const apiKey = ((this.apiKey) ? `&apikey=${this.apiKey}` : ""); + return `${this.baseUrl}/api?module=${module}${query}${apiKey}`; + } + getPostUrl() { + return `${this.baseUrl}/api`; + } + getPostData(module, params) { + params.module = module; + params.apikey = this.apiKey; + return params; + } + fetch(module, params, post) { + return __awaiter(this, void 0, void 0, function* () { + const url = (post ? this.getPostUrl() : this.getUrl(module, params)); + const payload = (post ? this.getPostData(module, params) : null); + const procFunc = (module === "proxy") ? getJsonResult : getResult; + this.emit("debug", { + action: "request", + request: url, + provider: this + }); + const connection = { + url: url, + throttleSlotInterval: 1000, + throttleCallback: (attempt, url) => { + if (this.isCommunityResource()) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + let payloadStr = null; + if (payload) { + connection.headers = { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" }; + payloadStr = Object.keys(payload).map((key) => { + return `${key}=${payload[key]}`; + }).join("&"); + } + const result = yield fetchJson(connection, payloadStr, procFunc || getJsonResult); + this.emit("debug", { + action: "response", + request: url, + response: deepCopy(result), + provider: this + }); + return result; + }); + } + detectNetwork() { + return __awaiter(this, void 0, void 0, function* () { + return this.network; + }); + } + perform(method, params) { + const _super = Object.create(null, { + perform: { get: () => super.perform } + }); + return __awaiter(this, void 0, void 0, function* () { + switch (method) { + case "getBlockNumber": + return this.fetch("proxy", { action: "eth_blockNumber" }); + case "getGasPrice": + return this.fetch("proxy", { action: "eth_gasPrice" }); + case "getBalance": + // Returns base-10 result + return this.fetch("account", { + action: "balance", + address: params.address, + tag: params.blockTag + }); + case "getTransactionCount": + return this.fetch("proxy", { + action: "eth_getTransactionCount", + address: params.address, + tag: params.blockTag + }); + case "getCode": + return this.fetch("proxy", { + action: "eth_getCode", + address: params.address, + tag: params.blockTag + }); + case "getStorageAt": + return this.fetch("proxy", { + action: "eth_getStorageAt", + address: params.address, + position: params.position, + tag: params.blockTag + }); + case "sendTransaction": + return this.fetch("proxy", { + action: "eth_sendRawTransaction", + hex: params.signedTransaction + }, true).catch((error) => { + return checkError("sendTransaction", error, params.signedTransaction); + }); + case "getBlock": + if (params.blockTag) { + return this.fetch("proxy", { + action: "eth_getBlockByNumber", + tag: params.blockTag, + boolean: (params.includeTransactions ? "true" : "false") + }); + } + throw new Error("getBlock by blockHash not implemented"); + case "getTransaction": + return this.fetch("proxy", { + action: "eth_getTransactionByHash", + txhash: params.transactionHash + }); + case "getTransactionReceipt": + return this.fetch("proxy", { + action: "eth_getTransactionReceipt", + txhash: params.transactionHash + }); + case "call": { + if (params.blockTag !== "latest") { + throw new Error("EtherscanProvider does not support blockTag for call"); + } + const postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_call"; + try { + return yield this.fetch("proxy", postData, true); + } + catch (error) { + return checkError("call", error, params.transaction); + } + } + case "estimateGas": { + const postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_estimateGas"; + try { + return yield this.fetch("proxy", postData, true); + } + catch (error) { + return checkError("estimateGas", error, params.transaction); + } + } + case "getLogs": { + const args = { action: "getLogs" }; + if (params.filter.fromBlock) { + args.fromBlock = checkLogTag(params.filter.fromBlock); + } + if (params.filter.toBlock) { + args.toBlock = checkLogTag(params.filter.toBlock); + } + if (params.filter.address) { + args.address = params.filter.address; + } + // @TODO: We can handle slightly more complicated logs using the logs API + if (params.filter.topics && params.filter.topics.length > 0) { + if (params.filter.topics.length > 1) { + logger.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); + } + if (params.filter.topics.length === 1) { + const topic0 = params.filter.topics[0]; + if (typeof (topic0) !== "string" || topic0.length !== 66) { + logger.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 }); + } + args.topic0 = topic0; + } + } + const logs = yield this.fetch("logs", args); + // Cache txHash => blockHash + let blocks = {}; + // Add any missing blockHash to the logs + for (let i = 0; i < logs.length; i++) { + const log = logs[i]; + if (log.blockHash != null) { + continue; + } + if (blocks[log.blockNumber] == null) { + const block = yield this.getBlock(log.blockNumber); + if (block) { + blocks[log.blockNumber] = block.hash; + } + } + log.blockHash = blocks[log.blockNumber]; + } + return logs; + } + case "getEtherPrice": + if (this.network.name !== "homestead") { + return 0.0; + } + return parseFloat((yield this.fetch("stats", { action: "ethprice" })).ethusd); + default: + break; + } + return _super.perform.call(this, method, params); + }); + } + // Note: The `page` page parameter only allows pagination within the + // 10,000 window available without a page and offset parameter + // Error: Result window is too large, PageNo x Offset size must + // be less than or equal to 10000 + getHistory(addressOrName, startBlock, endBlock) { + return __awaiter(this, void 0, void 0, function* () { + const params = { + action: "txlist", + address: (yield this.resolveName(addressOrName)), + startblock: ((startBlock == null) ? 0 : startBlock), + endblock: ((endBlock == null) ? 99999999 : endBlock), + sort: "asc" + }; + const result = yield this.fetch("account", params); + return result.map((tx) => { + ["contractAddress", "to"].forEach(function (key) { + if (tx[key] == "") { + delete tx[key]; + } + }); + if (tx.creates == null && tx.contractAddress != null) { + tx.creates = tx.contractAddress; + } + const item = this.formatter.transactionResponse(tx); + if (tx.timeStamp) { + item.timestamp = parseInt(tx.timeStamp); + } + return item; + }); + }); + } + isCommunityResource() { + return (this.apiKey === defaultApiKey); + } +} +//# sourceMappingURL=etherscan-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js.map new file mode 100644 index 0000000..4929ce7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"etherscan-provider.js","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":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AAC,CAAC;iBAAE;gBAC9D,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;IAED,mBAAmB;QACf,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts new file mode 100644 index 0000000..b9f38da --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts @@ -0,0 +1,20 @@ +import { Provider } from "@ethersproject/abstract-provider"; +import { Network } from "@ethersproject/networks"; +import { BaseProvider } from "./base-provider"; +export interface FallbackProviderConfig { + provider: Provider; + priority?: number; + stallTimeout?: number; + weight?: number; +} +export declare class FallbackProvider extends BaseProvider { + readonly providerConfigs: ReadonlyArray; + readonly quorum: number; + _highestBlockNumber: number; + constructor(providers: Array, quorum?: number); + detectNetwork(): Promise; + perform(method: string, params: { + [name: string]: any; + }): Promise; +} +//# sourceMappingURL=fallback-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts.map new file mode 100644 index 0000000..f4cbb06 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fallback-provider.d.ts","sourceRoot":"","sources":["../src.ts/fallback-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAG1F,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAKlD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAsF/C,MAAM,WAAW,sBAAsB;IAEnC,QAAQ,EAAE,QAAQ,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAOlB,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAgSD,qBAAa,gBAAiB,SAAQ,YAAY;IAC9C,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAKxB,mBAAmB,EAAE,MAAM,CAAC;gBAEhB,SAAS,EAAE,KAAK,CAAC,QAAQ,GAAG,sBAAsB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM;IA2D1E,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAKjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAiL/E"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js new file mode 100644 index 0000000..ec8a844 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js @@ -0,0 +1,582 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { Provider } from "@ethersproject/abstract-provider"; +import { BigNumber } from "@ethersproject/bignumber"; +import { isHexString } from "@ethersproject/bytes"; +import { deepCopy, defineReadOnly, shallowCopy } from "@ethersproject/properties"; +import { shuffled } from "@ethersproject/random"; +import { poll } from "@ethersproject/web"; +import { BaseProvider } from "./base-provider"; +import { isCommunityResource } from "./formatter"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +function now() { return (new Date()).getTime(); } +// Returns to network as long as all agree, or null if any is null. +// Throws an error if any two networks do not match. +function checkNetworks(networks) { + let result = null; + for (let i = 0; i < networks.length; i++) { + const network = networks[i]; + // Null! We do not know our network; bail. + if (network == null) { + return null; + } + if (result) { + // Make sure the network matches the previous networks + if (!(result.name === network.name && result.chainId === network.chainId && + ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) { + logger.throwArgumentError("provider mismatch", "networks", networks); + } + } + else { + result = network; + } + } + return result; +} +function median(values, maxDelta) { + values = values.slice().sort(); + const middle = Math.floor(values.length / 2); + // Odd length; take the middle + if (values.length % 2) { + return values[middle]; + } + // Even length; take the average of the two middle + const a = values[middle - 1], b = values[middle]; + if (maxDelta != null && Math.abs(a - b) > maxDelta) { + return null; + } + return (a + b) / 2; +} +function serialize(value) { + if (value === null) { + return "null"; + } + else if (typeof (value) === "number" || typeof (value) === "boolean") { + return JSON.stringify(value); + } + else if (typeof (value) === "string") { + return value; + } + else if (BigNumber.isBigNumber(value)) { + return value.toString(); + } + else if (Array.isArray(value)) { + return JSON.stringify(value.map((i) => serialize(i))); + } + else if (typeof (value) === "object") { + const keys = Object.keys(value); + keys.sort(); + return "{" + keys.map((key) => { + let v = value[key]; + if (typeof (v) === "function") { + v = "[function]"; + } + else { + v = serialize(v); + } + return JSON.stringify(key) + ":" + v; + }).join(",") + "}"; + } + throw new Error("unknown value type: " + typeof (value)); +} +// Next request ID to use for emitting debug info +let nextRid = 1; +; +function stall(duration) { + let cancel = null; + let timer = null; + let promise = (new Promise((resolve) => { + cancel = function () { + if (timer) { + clearTimeout(timer); + timer = null; + } + resolve(); + }; + timer = setTimeout(cancel, duration); + })); + const wait = (func) => { + promise = promise.then(func); + return promise; + }; + function getPromise() { + return promise; + } + return { cancel, getPromise, wait }; +} +const ForwardErrors = [ + Logger.errors.CALL_EXCEPTION, + Logger.errors.INSUFFICIENT_FUNDS, + Logger.errors.NONCE_EXPIRED, + Logger.errors.REPLACEMENT_UNDERPRICED, + Logger.errors.UNPREDICTABLE_GAS_LIMIT +]; +const ForwardProperties = [ + "address", + "args", + "errorArgs", + "errorSignature", + "method", + "transaction", +]; +; +function exposeDebugConfig(config, now) { + const result = { + weight: config.weight + }; + Object.defineProperty(result, "provider", { get: () => config.provider }); + if (config.start) { + result.start = config.start; + } + if (now) { + result.duration = (now - config.start); + } + if (config.done) { + if (config.error) { + result.error = config.error; + } + else { + result.result = config.result || null; + } + } + return result; +} +function normalizedTally(normalize, quorum) { + return function (configs) { + // Count the votes for each result + const tally = {}; + configs.forEach((c) => { + const value = normalize(c.result); + if (!tally[value]) { + tally[value] = { count: 0, result: c.result }; + } + tally[value].count++; + }); + // Check for a quorum on any given result + const keys = Object.keys(tally); + for (let i = 0; i < keys.length; i++) { + const check = tally[keys[i]]; + if (check.count >= quorum) { + return check.result; + } + } + // No quroum + return undefined; + }; +} +function getProcessFunc(provider, method, params) { + let normalize = serialize; + switch (method) { + case "getBlockNumber": + // Return the median value, unless there is (median + 1) is also + // present, in which case that is probably true and the median + // is going to be stale soon. In the event of a malicious node, + // the lie will be true soon enough. + return function (configs) { + const values = configs.map((c) => c.result); + // Get the median block number + let blockNumber = median(configs.map((c) => c.result), 2); + if (blockNumber == null) { + return undefined; + } + blockNumber = Math.ceil(blockNumber); + // If the next block height is present, its prolly safe to use + if (values.indexOf(blockNumber + 1) >= 0) { + blockNumber++; + } + // Don't ever roll back the blockNumber + if (blockNumber >= provider._highestBlockNumber) { + provider._highestBlockNumber = blockNumber; + } + return provider._highestBlockNumber; + }; + case "getGasPrice": + // Return the middle (round index up) value, similar to median + // but do not average even entries and choose the higher. + // Malicious actors must compromise 50% of the nodes to lie. + return function (configs) { + const values = configs.map((c) => c.result); + values.sort(); + return values[Math.floor(values.length / 2)]; + }; + case "getEtherPrice": + // Returns the median price. Malicious actors must compromise at + // least 50% of the nodes to lie (in a meaningful way). + return function (configs) { + return median(configs.map((c) => c.result)); + }; + // No additional normalizing required; serialize is enough + case "getBalance": + case "getTransactionCount": + case "getCode": + case "getStorageAt": + case "call": + case "estimateGas": + case "getLogs": + break; + // We drop the confirmations from transactions as it is approximate + case "getTransaction": + case "getTransactionReceipt": + normalize = function (tx) { + if (tx == null) { + return null; + } + tx = shallowCopy(tx); + tx.confirmations = -1; + return serialize(tx); + }; + break; + // We drop the confirmations from transactions as it is approximate + case "getBlock": + // We drop the confirmations from transactions as it is approximate + if (params.includeTransactions) { + normalize = function (block) { + if (block == null) { + return null; + } + block = shallowCopy(block); + block.transactions = block.transactions.map((tx) => { + tx = shallowCopy(tx); + tx.confirmations = -1; + return tx; + }); + return serialize(block); + }; + } + else { + normalize = function (block) { + if (block == null) { + return null; + } + return serialize(block); + }; + } + break; + default: + throw new Error("unknown method: " + method); + } + // Return the result if and only if the expected quorum is + // satisfied and agreed upon for the final result. + return normalizedTally(normalize, provider.quorum); +} +// If we are doing a blockTag query, we need to make sure the backend is +// caught up to the FallbackProvider, before sending a request to it. +function waitForSync(config, blockNumber) { + return __awaiter(this, void 0, void 0, function* () { + const provider = (config.provider); + if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) { + return provider; + } + return poll(() => { + return new Promise((resolve, reject) => { + setTimeout(function () { + // We are synced + if (provider.blockNumber >= blockNumber) { + return resolve(provider); + } + // We're done; just quit + if (config.cancelled) { + return resolve(null); + } + // Try again, next block + return resolve(undefined); + }, 0); + }); + }, { oncePoll: provider }); + }); +} +function getRunner(config, currentBlockNumber, method, params) { + return __awaiter(this, void 0, void 0, function* () { + let provider = config.provider; + switch (method) { + case "getBlockNumber": + case "getGasPrice": + return provider[method](); + case "getEtherPrice": + if (provider.getEtherPrice) { + return provider.getEtherPrice(); + } + break; + case "getBalance": + case "getTransactionCount": + case "getCode": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider[method](params.address, params.blockTag || "latest"); + case "getStorageAt": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider.getStorageAt(params.address, params.position, params.blockTag || "latest"); + case "getBlock": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider[(params.includeTransactions ? "getBlockWithTransactions" : "getBlock")](params.blockTag || params.blockHash); + case "call": + case "estimateGas": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider[method](params.transaction); + case "getTransaction": + case "getTransactionReceipt": + return provider[method](params.transactionHash); + case "getLogs": { + let filter = params.filter; + if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider.getLogs(filter); + } + } + return logger.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, { + method: method, + params: params + }); + }); +} +export class FallbackProvider extends BaseProvider { + constructor(providers, quorum) { + logger.checkNew(new.target, FallbackProvider); + if (providers.length === 0) { + logger.throwArgumentError("missing providers", "providers", providers); + } + const providerConfigs = providers.map((configOrProvider, index) => { + if (Provider.isProvider(configOrProvider)) { + const stallTimeout = isCommunityResource(configOrProvider) ? 2000 : 750; + const priority = 1; + return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority }); + } + const config = shallowCopy(configOrProvider); + if (config.priority == null) { + config.priority = 1; + } + if (config.stallTimeout == null) { + config.stallTimeout = isCommunityResource(configOrProvider) ? 2000 : 750; + } + if (config.weight == null) { + config.weight = 1; + } + const weight = config.weight; + if (weight % 1 || weight > 512 || weight < 1) { + logger.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight); + } + return Object.freeze(config); + }); + const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0); + if (quorum == null) { + quorum = total / 2; + } + else if (quorum > total) { + logger.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); + } + // Are all providers' networks are known + let networkOrReady = checkNetworks(providerConfigs.map((c) => (c.provider).network)); + // Not all networks are known; we must stall + if (networkOrReady == null) { + networkOrReady = new Promise((resolve, reject) => { + setTimeout(() => { + this.detectNetwork().then(resolve, reject); + }, 0); + }); + } + super(networkOrReady); + // Preserve a copy, so we do not get mutated + defineReadOnly(this, "providerConfigs", Object.freeze(providerConfigs)); + defineReadOnly(this, "quorum", quorum); + this._highestBlockNumber = -1; + } + detectNetwork() { + return __awaiter(this, void 0, void 0, function* () { + const networks = yield Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork())); + return checkNetworks(networks); + }); + } + perform(method, params) { + return __awaiter(this, void 0, void 0, function* () { + // Sending transactions is special; always broadcast it to all backends + if (method === "sendTransaction") { + const results = yield Promise.all(this.providerConfigs.map((c) => { + return c.provider.sendTransaction(params.signedTransaction).then((result) => { + return result.hash; + }, (error) => { + return error; + }); + })); + // Any success is good enough (other errors are likely "already seen" errors + for (let i = 0; i < results.length; i++) { + const result = results[i]; + if (typeof (result) === "string") { + return result; + } + } + // They were all an error; pick the first error + throw results[0]; + } + // We need to make sure we are in sync with our backends, so we need + // to know this before we can make a lot of calls + if (this._highestBlockNumber === -1 && method !== "getBlockNumber") { + yield this.getBlockNumber(); + } + const processFunc = getProcessFunc(this, method, params); + // Shuffle the providers and then sort them by their priority; we + // shallowCopy them since we will store the result in them too + const configs = shuffled(this.providerConfigs.map(shallowCopy)); + configs.sort((a, b) => (a.priority - b.priority)); + const currentBlockNumber = this._highestBlockNumber; + let i = 0; + let first = true; + while (true) { + const t0 = now(); + // Compute the inflight weight (exclude anything past) + let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout))) + .reduce((accum, c) => (accum + c.weight), 0); + // Start running enough to meet quorum + while (inflightWeight < this.quorum && i < configs.length) { + const config = configs[i++]; + const rid = nextRid++; + config.start = now(); + config.staller = stall(config.stallTimeout); + config.staller.wait(() => { config.staller = null; }); + config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => { + config.done = true; + config.result = result; + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + }, (error) => { + config.done = true; + config.error = error; + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + }); + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, null), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + inflightWeight += config.weight; + } + // Wait for anything meaningful to finish or stall out + const waiting = []; + configs.forEach((c) => { + if (c.done || !c.runner) { + return; + } + waiting.push(c.runner); + if (c.staller) { + waiting.push(c.staller.getPromise()); + } + }); + if (waiting.length) { + yield Promise.race(waiting); + } + // Check the quorum and process the results; the process function + // may additionally decide the quorum is not met + const results = configs.filter((c) => (c.done && c.error == null)); + if (results.length >= this.quorum) { + const result = processFunc(results); + if (result !== undefined) { + // Shut down any stallers + configs.forEach(c => { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return result; + } + if (!first) { + yield stall(100).getPromise(); + } + first = false; + } + // No result, check for errors that should be forwarded + const errors = configs.reduce((accum, c) => { + if (!c.done || c.error == null) { + return accum; + } + const code = (c.error).code; + if (ForwardErrors.indexOf(code) >= 0) { + if (!accum[code]) { + accum[code] = { error: c.error, weight: 0 }; + } + accum[code].weight += c.weight; + } + return accum; + }, ({})); + Object.keys(errors).forEach((errorCode) => { + const tally = errors[errorCode]; + if (tally.weight < this.quorum) { + return; + } + // Shut down any stallers + configs.forEach(c => { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + const e = (tally.error); + const props = {}; + ForwardProperties.forEach((name) => { + if (e[name] == null) { + return; + } + props[name] = e[name]; + }); + logger.throwError(e.reason || e.message, errorCode, props); + }); + // All configs have run to completion; we will never get more data + if (configs.filter((c) => !c.done).length === 0) { + break; + } + } + // Shut down any stallers; shouldn't be any + configs.forEach(c => { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return logger.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, { + method: method, + params: params, + //results: configs.map((c) => c.result), + //errors: configs.map((c) => c.error), + results: configs.map((c) => exposeDebugConfig(c)), + provider: this + }); + }); + } +} +//# sourceMappingURL=fallback-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js.map new file mode 100644 index 0000000..38b4110 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fallback-provider.js","sourceRoot":"","sources":["../src.ts/fallback-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAgC,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,SAAS,GAAG,KAAK,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,E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C,CAAC;oBAEH,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAO,SAAS,EAAE,KAAK,CAAC,CAAC;gBACpE,CAAC,CAAC,CAAC;gBAEH,kEAAkE;gBAClE,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;oBAAE,MAAM;iBAAE;aAC9D;YAED,2CAA2C;YAC3C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAChB,IAAI,CAAC,CAAC,OAAO,EAAE;oBAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;iBAAE;gBACtC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;YACvB,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE;gBAC1E,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,MAAM;gBACd,wCAAwC;gBACxC,sCAAsC;gBACtC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;gBACjD,QAAQ,EAAE,IAAI;aACjB,CAAC,CAAC;QACP,CAAC;KAAA;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts b/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts new file mode 100644 index 0000000..8d7f2f6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts @@ -0,0 +1,60 @@ +import { Block, TransactionReceipt, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber } from "@ethersproject/bignumber"; +import { AccessList } from "@ethersproject/transactions"; +export declare type FormatFunc = (value: any) => any; +export declare type FormatFuncs = { + [key: string]: FormatFunc; +}; +export declare type Formats = { + transaction: FormatFuncs; + transactionRequest: FormatFuncs; + receipt: FormatFuncs; + receiptLog: FormatFuncs; + block: FormatFuncs; + blockWithTransactions: FormatFuncs; + filter: FormatFuncs; + filterLog: FormatFuncs; +}; +export declare class Formatter { + readonly formats: Formats; + constructor(); + getDefaultFormats(): Formats; + accessList(accessList: Array): AccessList; + number(number: any): number; + type(number: any): number; + bigNumber(value: any): BigNumber; + boolean(value: any): boolean; + hex(value: any, strict?: boolean): string; + data(value: any, strict?: boolean): string; + address(value: any): string; + callAddress(value: any): string; + contractAddress(value: any): string; + blockTag(blockTag: any): string; + hash(value: any, strict?: boolean): string; + difficulty(value: any): number; + uint256(value: any): string; + _block(value: any, format: any): Block; + block(value: any): Block; + blockWithTransactions(value: any): Block; + transactionRequest(value: any): any; + transactionResponse(transaction: any): TransactionResponse; + transaction(value: any): any; + receiptLog(value: any): any; + receipt(value: any): TransactionReceipt; + topics(value: any): any; + filter(value: any): any; + filterLog(value: any): any; + static check(format: { + [name: string]: FormatFunc; + }, object: any): any; + static allowNull(format: FormatFunc, nullValue?: any): FormatFunc; + static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc; + static arrayOf(format: FormatFunc): FormatFunc; +} +export interface CommunityResourcable { + isCommunityResource(): boolean; +} +export declare function isCommunityResourcable(value: any): value is CommunityResourcable; +export declare function isCommunityResource(value: any): boolean; +export declare function showThrottleMessage(): void; +//# sourceMappingURL=formatter.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts.map new file mode 100644 index 0000000..5815617 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../src.ts/formatter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;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AED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,oBAAoB,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEvD;AAID,wBAAgB,mBAAmB,SAgBlC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/formatter.js b/node_modules/@ethersproject/providers/lib.esm/formatter.js new file mode 100644 index 0000000..0920875 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/formatter.js @@ -0,0 +1,443 @@ +"use strict"; +import { getAddress, getContractAddress } from "@ethersproject/address"; +import { BigNumber } from "@ethersproject/bignumber"; +import { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { AddressZero } from "@ethersproject/constants"; +import { shallowCopy } from "@ethersproject/properties"; +import { accessListify, parse as parseTransaction } from "@ethersproject/transactions"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +export class Formatter { + constructor() { + logger.checkNew(new.target, Formatter); + this.formats = this.getDefaultFormats(); + } + getDefaultFormats() { + const formats = ({}); + const address = this.address.bind(this); + const bigNumber = this.bigNumber.bind(this); + const blockTag = this.blockTag.bind(this); + const data = this.data.bind(this); + const hash = this.hash.bind(this); + const hex = this.hex.bind(this); + const number = this.number.bind(this); + const type = this.type.bind(this); + const strictData = (v) => { return this.data(v, true); }; + formats.transaction = { + hash: hash, + type: type, + accessList: Formatter.allowNull(this.accessList.bind(this), null), + blockHash: Formatter.allowNull(hash, null), + blockNumber: Formatter.allowNull(number, null), + transactionIndex: Formatter.allowNull(number, null), + confirmations: Formatter.allowNull(number, null), + from: address, + // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) + // must be set + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + gasLimit: bigNumber, + to: Formatter.allowNull(address, null), + value: bigNumber, + nonce: number, + data: data, + r: Formatter.allowNull(this.uint256), + s: Formatter.allowNull(this.uint256), + v: Formatter.allowNull(number), + creates: Formatter.allowNull(address, null), + raw: Formatter.allowNull(data), + }; + formats.transactionRequest = { + from: Formatter.allowNull(address), + nonce: Formatter.allowNull(number), + gasLimit: Formatter.allowNull(bigNumber), + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + to: Formatter.allowNull(address), + value: Formatter.allowNull(bigNumber), + data: Formatter.allowNull(strictData), + type: Formatter.allowNull(number), + accessList: Formatter.allowNull(this.accessList.bind(this), null), + }; + formats.receiptLog = { + transactionIndex: number, + blockNumber: number, + transactionHash: hash, + address: address, + topics: Formatter.arrayOf(hash), + data: data, + logIndex: number, + blockHash: hash, + }; + formats.receipt = { + to: Formatter.allowNull(this.address, null), + from: Formatter.allowNull(this.address, null), + contractAddress: Formatter.allowNull(address, null), + transactionIndex: number, + // should be allowNull(hash), but broken-EIP-658 support is handled in receipt + root: Formatter.allowNull(hex), + gasUsed: bigNumber, + logsBloom: Formatter.allowNull(data), + blockHash: hash, + transactionHash: hash, + logs: Formatter.arrayOf(this.receiptLog.bind(this)), + blockNumber: number, + confirmations: Formatter.allowNull(number, null), + cumulativeGasUsed: bigNumber, + effectiveGasPrice: Formatter.allowNull(bigNumber), + status: Formatter.allowNull(number), + type: type + }; + formats.block = { + hash: hash, + parentHash: hash, + number: number, + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + gasLimit: bigNumber, + gasUsed: bigNumber, + miner: address, + extraData: data, + transactions: Formatter.allowNull(Formatter.arrayOf(hash)), + baseFeePerGas: Formatter.allowNull(bigNumber) + }; + formats.blockWithTransactions = shallowCopy(formats.block); + formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))); + formats.filter = { + fromBlock: Formatter.allowNull(blockTag, undefined), + toBlock: Formatter.allowNull(blockTag, undefined), + blockHash: Formatter.allowNull(hash, undefined), + address: Formatter.allowNull(address, undefined), + topics: Formatter.allowNull(this.topics.bind(this), undefined), + }; + formats.filterLog = { + blockNumber: Formatter.allowNull(number), + blockHash: Formatter.allowNull(hash), + transactionIndex: number, + removed: Formatter.allowNull(this.boolean.bind(this)), + address: address, + data: Formatter.allowFalsish(data, "0x"), + topics: Formatter.arrayOf(hash), + transactionHash: hash, + logIndex: number, + }; + return formats; + } + accessList(accessList) { + return accessListify(accessList || []); + } + // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number + // Strict! Used on input. + number(number) { + if (number === "0x") { + return 0; + } + return BigNumber.from(number).toNumber(); + } + type(number) { + if (number === "0x" || number == null) { + return 0; + } + return BigNumber.from(number).toNumber(); + } + // Strict! Used on input. + bigNumber(value) { + return BigNumber.from(value); + } + // Requires a boolean, "true" or "false"; returns a boolean + boolean(value) { + if (typeof (value) === "boolean") { + return value; + } + if (typeof (value) === "string") { + value = value.toLowerCase(); + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + } + throw new Error("invalid boolean - " + value); + } + hex(value, strict) { + if (typeof (value) === "string") { + if (!strict && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexString(value)) { + return value.toLowerCase(); + } + } + return logger.throwArgumentError("invalid hash", "value", value); + } + data(value, strict) { + const result = this.hex(value, strict); + if ((result.length % 2) !== 0) { + throw new Error("invalid data; odd-length - " + value); + } + return result; + } + // Requires an address + // Strict! Used on input. + address(value) { + return getAddress(value); + } + callAddress(value) { + if (!isHexString(value, 32)) { + return null; + } + const address = getAddress(hexDataSlice(value, 12)); + return (address === AddressZero) ? null : address; + } + contractAddress(value) { + return getContractAddress(value); + } + // Strict! Used on input. + blockTag(blockTag) { + if (blockTag == null) { + return "latest"; + } + if (blockTag === "earliest") { + return "0x0"; + } + if (blockTag === "latest" || blockTag === "pending") { + return blockTag; + } + if (typeof (blockTag) === "number" || isHexString(blockTag)) { + return hexValue(blockTag); + } + throw new Error("invalid blockTag"); + } + // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash. + hash(value, strict) { + const result = this.hex(value, strict); + if (hexDataLength(result) !== 32) { + return logger.throwArgumentError("invalid hash", "value", value); + } + return result; + } + // Returns the difficulty as a number, or if too large (i.e. PoA network) null + difficulty(value) { + if (value == null) { + return null; + } + const v = BigNumber.from(value); + try { + return v.toNumber(); + } + catch (error) { } + return null; + } + uint256(value) { + if (!isHexString(value)) { + throw new Error("invalid uint256"); + } + return hexZeroPad(value, 32); + } + _block(value, format) { + if (value.author != null && value.miner == null) { + value.miner = value.author; + } + // The difficulty may need to come from _difficulty in recursed blocks + const difficulty = (value._difficulty != null) ? value._difficulty : value.difficulty; + const result = Formatter.check(format, value); + result._difficulty = ((difficulty == null) ? null : BigNumber.from(difficulty)); + return result; + } + block(value) { + return this._block(value, this.formats.block); + } + blockWithTransactions(value) { + return this._block(value, this.formats.blockWithTransactions); + } + // Strict! Used on input. + transactionRequest(value) { + return Formatter.check(this.formats.transactionRequest, value); + } + transactionResponse(transaction) { + // Rename gas to gasLimit + if (transaction.gas != null && transaction.gasLimit == null) { + transaction.gasLimit = transaction.gas; + } + // Some clients (TestRPC) do strange things like return 0x0 for the + // 0 address; correct this to be a real address + if (transaction.to && BigNumber.from(transaction.to).isZero()) { + transaction.to = "0x0000000000000000000000000000000000000000"; + } + // Rename input to data + if (transaction.input != null && transaction.data == null) { + transaction.data = transaction.input; + } + // If to and creates are empty, populate the creates from the transaction + if (transaction.to == null && transaction.creates == null) { + transaction.creates = this.contractAddress(transaction); + } + if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) { + transaction.accessList = []; + } + const result = Formatter.check(this.formats.transaction, transaction); + if (transaction.chainId != null) { + let chainId = transaction.chainId; + if (isHexString(chainId)) { + chainId = BigNumber.from(chainId).toNumber(); + } + result.chainId = chainId; + } + else { + let chainId = transaction.networkId; + // geth-etc returns chainId + if (chainId == null && result.v == null) { + chainId = transaction.chainId; + } + if (isHexString(chainId)) { + chainId = BigNumber.from(chainId).toNumber(); + } + if (typeof (chainId) !== "number" && result.v != null) { + chainId = (result.v - 35) / 2; + if (chainId < 0) { + chainId = 0; + } + chainId = parseInt(chainId); + } + if (typeof (chainId) !== "number") { + chainId = 0; + } + result.chainId = chainId; + } + // 0x0000... should actually be null + if (result.blockHash && result.blockHash.replace(/0/g, "") === "x") { + result.blockHash = null; + } + return result; + } + transaction(value) { + return parseTransaction(value); + } + receiptLog(value) { + return Formatter.check(this.formats.receiptLog, value); + } + receipt(value) { + const result = Formatter.check(this.formats.receipt, value); + // RSK incorrectly implemented EIP-658, so we munge things a bit here for it + if (result.root != null) { + if (result.root.length <= 4) { + // Could be 0x00, 0x0, 0x01 or 0x1 + const value = BigNumber.from(result.root).toNumber(); + if (value === 0 || value === 1) { + // Make sure if both are specified, they match + if (result.status != null && (result.status !== value)) { + logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); + } + result.status = value; + delete result.root; + } + else { + logger.throwArgumentError("invalid alt-root-status", "value.root", result.root); + } + } + else if (result.root.length !== 66) { + // Must be a valid bytes32 + logger.throwArgumentError("invalid root hash", "value.root", result.root); + } + } + if (result.status != null) { + result.byzantium = true; + } + return result; + } + topics(value) { + if (Array.isArray(value)) { + return value.map((v) => this.topics(v)); + } + else if (value != null) { + return this.hash(value, true); + } + return null; + } + filter(value) { + return Formatter.check(this.formats.filter, value); + } + filterLog(value) { + return Formatter.check(this.formats.filterLog, value); + } + static check(format, object) { + const result = {}; + for (const key in format) { + try { + const value = format[key](object[key]); + if (value !== undefined) { + result[key] = value; + } + } + catch (error) { + error.checkKey = key; + error.checkValue = object[key]; + throw error; + } + } + return result; + } + // if value is null-ish, nullValue is returned + static allowNull(format, nullValue) { + return (function (value) { + if (value == null) { + return nullValue; + } + return format(value); + }); + } + // If value is false-ish, replaceValue is returned + static allowFalsish(format, replaceValue) { + return (function (value) { + if (!value) { + return replaceValue; + } + return format(value); + }); + } + // Requires an Array satisfying check + static arrayOf(format) { + return (function (array) { + if (!Array.isArray(array)) { + throw new Error("not an array"); + } + const result = []; + array.forEach(function (value) { + result.push(format(value)); + }); + return result; + }); + } +} +export function isCommunityResourcable(value) { + return (value && typeof (value.isCommunityResource) === "function"); +} +export function isCommunityResource(value) { + return (isCommunityResourcable(value) && value.isCommunityResource()); +} +// Show the throttle message only once +let throttleMessage = false; +export function showThrottleMessage() { + if (throttleMessage) { + return; + } + throttleMessage = true; + console.log("========= NOTICE ========="); + console.log("Request-Rate Exceeded (this message will not be repeated)"); + console.log(""); + console.log("The default API keys for each service are provided as a highly-throttled,"); + console.log("community resource for low-traffic projects and early prototyping."); + console.log(""); + console.log("While your application will continue to function, we highly recommended"); + console.log("signing up for your own API keys to improve performance, increase your"); + console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."); + console.log(""); + console.log("For more details: https:/\/docs.ethers.io/api-keys/"); + console.log("=========================="); +} +//# sourceMappingURL=formatter.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/formatter.js.map b/node_modules/@ethersproject/providers/lib.esm/formatter.js.map new file mode 100644 index 0000000..159cb72 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/formatter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../src.ts/formatter.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAc,aAAa,EAAE,KAAK,IAAI,gBAAgB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AAC,CAAC,CAAC;IACP,CAAC;CACJ;AAMD,MAAM,UAAU,sBAAsB,CAAC,KAAU;IAC7C,OAAO,CAAC,KAAK,IAAI,OAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,UAAU,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAU;IAC1C,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,sCAAsC;AACtC,IAAI,eAAe,GAAG,KAAK,CAAC;AAC5B,MAAM,UAAU,mBAAmB;IAC/B,IAAI,eAAe,EAAE;QAAE,OAAO;KAAE;IAChC,eAAe,GAAG,IAAI,CAAC;IAEvB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;IAC1E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;IACzF,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;IACvF,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,+EAA+E,CAAC,CAAC;IAC7F,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/index.d.ts b/node_modules/@ethersproject/providers/lib.esm/index.d.ts new file mode 100644 index 0000000..9f7d139 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/index.d.ts @@ -0,0 +1,22 @@ +import { Block, BlockTag, EventType, FeeData, Filter, Log, Listener, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { getNetwork } from "@ethersproject/networks"; +import { Network, Networkish } from "@ethersproject/networks"; +import { BaseProvider, EnsProvider, EnsResolver, Resolver } from "./base-provider"; +import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider"; +import { CloudflareProvider } from "./cloudflare-provider"; +import { EtherscanProvider } from "./etherscan-provider"; +import { FallbackProvider, FallbackProviderConfig } from "./fallback-provider"; +import { IpcProvider } from "./ipc-provider"; +import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; +import { JsonRpcBatchProvider } from "./json-rpc-batch-provider"; +import { NodesmithProvider } from "./nodesmith-provider"; +import { PocketProvider } from "./pocket-provider"; +import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Web3Provider } from "./web3-provider"; +import { WebSocketProvider } from "./websocket-provider"; +import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider"; +import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter"; +declare function getDefaultProvider(network?: Networkish, options?: any): BaseProvider; +export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/index.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/index.d.ts.map new file mode 100644 index 0000000..20686f7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAShI,iBAAS,kBAAkB,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,YAAY,CA2C7E;AAKD,OAAO,EAGH,QAAQ,EACR,YAAY,EAEZ,QAAQ,EAER,kBAAkB,EAKlB,gBAAgB,EAEhB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW,EAMX,aAAa,EAMb,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAMnB,SAAS,EAMT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAEhB,sBAAsB,EAEtB,OAAO,EACP,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,oBAAoB,EACvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/index.js b/node_modules/@ethersproject/providers/lib.esm/index.js new file mode 100644 index 0000000..2648989 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/index.js @@ -0,0 +1,81 @@ +"use strict"; +import { Provider } from "@ethersproject/abstract-provider"; +import { getNetwork } from "@ethersproject/networks"; +import { BaseProvider, Resolver } from "./base-provider"; +import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider"; +import { CloudflareProvider } from "./cloudflare-provider"; +import { EtherscanProvider } from "./etherscan-provider"; +import { FallbackProvider } from "./fallback-provider"; +import { IpcProvider } from "./ipc-provider"; +import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; +import { JsonRpcBatchProvider } from "./json-rpc-batch-provider"; +import { NodesmithProvider } from "./nodesmith-provider"; +import { PocketProvider } from "./pocket-provider"; +import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Web3Provider } from "./web3-provider"; +import { WebSocketProvider } from "./websocket-provider"; +import { Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +//////////////////////// +// Helper Functions +function getDefaultProvider(network, options) { + if (network == null) { + network = "homestead"; + } + // If passed a URL, figure out the right type of provider based on the scheme + if (typeof (network) === "string") { + // @TODO: Add support for IpcProvider; maybe if it ends in ".ipc"? + // Handle http and ws (and their secure variants) + const match = network.match(/^(ws|http)s?:/i); + if (match) { + switch (match[1]) { + case "http": + return new JsonRpcProvider(network); + case "ws": + return new WebSocketProvider(network); + default: + logger.throwArgumentError("unsupported URL scheme", "network", network); + } + } + } + const n = getNetwork(network); + if (!n || !n._defaultProvider) { + logger.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, { + operation: "getDefaultProvider", + network: network + }); + } + return n._defaultProvider({ + FallbackProvider, + AlchemyProvider, + CloudflareProvider, + EtherscanProvider, + InfuraProvider, + JsonRpcProvider, + NodesmithProvider, + PocketProvider, + Web3Provider, + IpcProvider, + }, options); +} +//////////////////////// +// Exports +export { +// Abstract Providers (or Abstract-ish) +Provider, BaseProvider, Resolver, UrlJsonRpcProvider, +/////////////////////// +// Concrete Providers +FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, +/////////////////////// +// Signer +JsonRpcSigner, +/////////////////////// +// Functions +getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, +/////////////////////// +// Objects +Formatter }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/index.js.map b/node_modules/@ethersproject/providers/lib.esm/index.js.map new file mode 100644 index 0000000..192ece6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAQH,QAAQ,EAIX,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAA4B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAA0B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;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CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,EAAE;QAC3B,MAAM,CAAC,UAAU,CAAC,wCAAwC,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;YACrF,SAAS,EAAE,oBAAoB;YAC/B,OAAO,EAAE,OAAO;SACnB,CAAC,CAAC;KACN;IAED,OAAO,CAAC,CAAC,gBAAgB,CAAC;QACtB,gBAAgB;QAEhB,eAAe;QACf,kBAAkB;QAClB,iBAAiB;QACjB,cAAc;QACd,eAAe;QACf,iBAAiB;QACjB,cAAc;QACd,YAAY;QAEZ,WAAW;KACd,EAAE,OAAO,CAAC,CAAC;AAChB,CAAC;AAED,wBAAwB;AACxB,UAAU;AAEV,OAAO;AAEH,uCAAuC;AACvC,QAAQ,EACR,YAAY,EAEZ,QAAQ,EAER,kBAAkB;AAElB,uBAAuB;AACvB,qBAAqB;AAErB,gBAAgB,EAEhB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW;AAGX,uBAAuB;AACvB,SAAS;AAET,aAAa;AAGb,uBAAuB;AACvB,YAAY;AAEZ,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB;AAGnB,uBAAuB;AACvB,UAAU;AAEV,SAAS,EA6BZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts new file mode 100644 index 0000000..2f4e297 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts @@ -0,0 +1,21 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { WebSocketProvider } from "./websocket-provider"; +import { CommunityResourcable } from "./formatter"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + readonly apiKey: string; + readonly projectId: string; + readonly projectSecret: string; + constructor(network?: Networkish, apiKey?: any); + isCommunityResource(): boolean; +} +export declare class InfuraProvider extends UrlJsonRpcProvider { + readonly projectId: string; + readonly projectSecret: string; + static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): ConnectionInfo; + isCommunityResource(): boolean; +} +//# sourceMappingURL=infura-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts.map new file mode 100644 index 0000000..1953cc5 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"infura-provider.d.ts","sourceRoot":"","sources":["../src.ts/infura-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,aAAa,CAAC;AAMxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAK7D,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,oBAAoB;IAC1F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;gBAEnB,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IAiB9C,mBAAmB,IAAI,OAAO;CAGjC;AAED,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,MAAM,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,uBAAuB;IAIxF,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IA8BlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;IA8D5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/infura-provider.js b/node_modules/@ethersproject/providers/lib.esm/infura-provider.js new file mode 100644 index 0000000..e0d8236 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/infura-provider.js @@ -0,0 +1,119 @@ +"use strict"; +import { defineReadOnly } from "@ethersproject/properties"; +import { WebSocketProvider } from "./websocket-provider"; +import { showThrottleMessage } from "./formatter"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +const defaultProjectId = "84842078b09946638c03157f83405213"; +export class InfuraWebSocketProvider extends WebSocketProvider { + constructor(network, apiKey) { + const provider = new InfuraProvider(network, apiKey); + const connection = provider.connection; + if (connection.password) { + logger.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "InfuraProvider.getWebSocketProvider()" + }); + } + const url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/"); + super(url, network); + defineReadOnly(this, "apiKey", provider.projectId); + defineReadOnly(this, "projectId", provider.projectId); + defineReadOnly(this, "projectSecret", provider.projectSecret); + } + isCommunityResource() { + return (this.projectId === defaultProjectId); + } +} +export class InfuraProvider extends UrlJsonRpcProvider { + static getWebSocketProvider(network, apiKey) { + return new InfuraWebSocketProvider(network, apiKey); + } + static getApiKey(apiKey) { + const apiKeyObj = { + apiKey: defaultProjectId, + projectId: defaultProjectId, + projectSecret: null + }; + if (apiKey == null) { + return apiKeyObj; + } + if (typeof (apiKey) === "string") { + apiKeyObj.projectId = apiKey; + } + else if (apiKey.projectSecret != null) { + logger.assertArgument((typeof (apiKey.projectId) === "string"), "projectSecret requires a projectId", "projectId", apiKey.projectId); + logger.assertArgument((typeof (apiKey.projectSecret) === "string"), "invalid projectSecret", "projectSecret", "[REDACTED]"); + apiKeyObj.projectId = apiKey.projectId; + apiKeyObj.projectSecret = apiKey.projectSecret; + } + else if (apiKey.projectId) { + apiKeyObj.projectId = apiKey.projectId; + } + apiKeyObj.apiKey = apiKeyObj.projectId; + return apiKeyObj; + } + static getUrl(network, apiKey) { + let host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "mainnet.infura.io"; + break; + case "ropsten": + host = "ropsten.infura.io"; + break; + case "rinkeby": + host = "rinkeby.infura.io"; + break; + case "kovan": + host = "kovan.infura.io"; + break; + case "goerli": + host = "goerli.infura.io"; + break; + case "matic": + host = "polygon-mainnet.infura.io"; + break; + case "maticmum": + host = "polygon-mumbai.infura.io"; + break; + case "optimism": + host = "optimism-mainnet.infura.io"; + break; + case "optimism-kovan": + host = "optimism-kovan.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-rinkeby": + host = "arbitrum-rinkeby.infura.io"; + break; + default: + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + const connection = { + allowGzip: true, + url: ("https:/" + "/" + host + "/v3/" + apiKey.projectId), + throttleCallback: (attempt, url) => { + if (apiKey.projectId === defaultProjectId) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret; + } + return connection; + } + isCommunityResource() { + return (this.projectId === defaultProjectId); + } +} +//# sourceMappingURL=infura-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/infura-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/infura-provider.js.map new file mode 100644 index 0000000..d570dad --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/infura-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"infura-provider.js","sourceRoot":"","sources":["../src.ts/infura-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAwB,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,gBAAgB,GAAG,kCAAkC,CAAA;AAE3D,MAAM,OAAO,uBAAwB,SAAQ,iBAAiB;IAK1D,YAAY,OAAoB,EAAE,MAAY;QAC1C,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACrD,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;QACvC,IAAI,UAAU,CAAC,QAAQ,EAAE;YACrB,MAAM,CAAC,UAAU,CAAC,8CAA8C,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBACnG,SAAS,EAAE,uCAAuC;aACrD,CAAC,CAAC;SACN;QAED,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC9E,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAEpB,cAAc,CAA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BACjB,CAAC,CAAC;SACV;QAED,MAAM,UAAU,GAAmB;YAC/B,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;YACzD,gBAAgB,EAAE,CAAC,OAAe,EAAE,GAAW,EAAE,EAAE;gBAC/C,IAAI,MAAM,CAAC,SAAS,KAAK,gBAAgB,EAAE;oBACvC,mBAAmB,EAAE,CAAC;iBACzB;gBACD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;SACJ,CAAC;QAEF,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;YACrB,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAA;SAC7C;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,mBAAmB;QACf,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,CAAC;IACjD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts new file mode 100644 index 0000000..798c348 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts @@ -0,0 +1,3 @@ +declare const IpcProvider: any; +export { IpcProvider }; +//# sourceMappingURL=ipc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts.map new file mode 100644 index 0000000..95cc75c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ipc-provider.d.ts","sourceRoot":"","sources":["../src.ts/browser-ipc-provider.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,EAAE,GAAU,CAAC;AAE9B,OAAO,EACH,WAAW,EACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js new file mode 100644 index 0000000..7a24a7f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js @@ -0,0 +1,4 @@ +"use strict"; +const IpcProvider = null; +export { IpcProvider }; +//# sourceMappingURL=ipc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js.map new file mode 100644 index 0000000..ccd82c3 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ipc-provider.js","sourceRoot":"","sources":["../src.ts/browser-ipc-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,MAAM,WAAW,GAAQ,IAAI,CAAC;AAE9B,OAAO,EACH,WAAW,EACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts new file mode 100644 index 0000000..2ad7763 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts @@ -0,0 +1,17 @@ +/// +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare class JsonRpcBatchProvider extends JsonRpcProvider { + _pendingBatchAggregator: NodeJS.Timer; + _pendingBatch: Array<{ + request: { + method: string; + params: Array; + id: number; + jsonrpc: "2.0"; + }; + resolve: (result: any) => void; + reject: (error: Error) => void; + }>; + send(method: string, params: Array): Promise; +} +//# sourceMappingURL=json-rpc-batch-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts.map new file mode 100644 index 0000000..c2efbf0 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-batch-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,qBAAa,oBAAqB,SAAQ,eAAe;IACrD,uBAAuB,EAAE,MAAM,CAAC,KAAK,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC;QACjB,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,KAAK,CAAA;SAAE,CAAC;QAC5E,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;QAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KACjC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAgFzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js new file mode 100644 index 0000000..7db7f78 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js @@ -0,0 +1,74 @@ +import { deepCopy } from "@ethersproject/properties"; +import { fetchJson } from "@ethersproject/web"; +import { JsonRpcProvider } from "./json-rpc-provider"; +// Experimental +export class JsonRpcBatchProvider extends JsonRpcProvider { + send(method, params) { + const request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + if (this._pendingBatch == null) { + this._pendingBatch = []; + } + const inflightRequest = { request, resolve: null, reject: null }; + const promise = new Promise((resolve, reject) => { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this._pendingBatch.push(inflightRequest); + if (!this._pendingBatchAggregator) { + // Schedule batch for next event loop + short duration + this._pendingBatchAggregator = setTimeout(() => { + // Get teh current batch and clear it, so new requests + // go into the next batch + const batch = this._pendingBatch; + this._pendingBatch = null; + this._pendingBatchAggregator = null; + // Get the request as an array of requests + const request = batch.map((inflight) => inflight.request); + this.emit("debug", { + action: "requestBatch", + request: deepCopy(request), + provider: this + }); + return fetchJson(this.connection, JSON.stringify(request)).then((result) => { + this.emit("debug", { + action: "response", + request: request, + response: result, + provider: this + }); + // For each result, feed it to the correct Promise, depending + // on whether it was a success or error + batch.forEach((inflightRequest, index) => { + const payload = result[index]; + if (payload.error) { + const error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + inflightRequest.reject(error); + } + else { + inflightRequest.resolve(payload.result); + } + }); + }, (error) => { + this.emit("debug", { + action: "response", + error: error, + request: request, + provider: this + }); + batch.forEach((inflightRequest) => { + inflightRequest.reject(error); + }); + }); + }, 10); + } + return promise; + } +} +//# sourceMappingURL=json-rpc-batch-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js.map new file mode 100644 index 0000000..7a19ad4 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-batch-provider.js","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;AAEf,MAAM,OAAO,oBAAqB,SAAQ,eAAe;IAQrD,IAAI,CAAC,M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C;SACV;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts new file mode 100644 index 0000000..c3ef0af --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts @@ -0,0 +1,54 @@ +import { Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer"; +import { Bytes } from "@ethersproject/bytes"; +import { Network, Networkish } from "@ethersproject/networks"; +import { Deferrable } from "@ethersproject/properties"; +import { AccessList } from "@ethersproject/transactions"; +import { ConnectionInfo } from "@ethersproject/web"; +import { BaseProvider, Event } from "./base-provider"; +export declare class JsonRpcSigner extends Signer implements TypedDataSigner { + readonly provider: JsonRpcProvider; + _index: number; + _address: string; + constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number); + connect(provider: Provider): JsonRpcSigner; + connectUnchecked(): JsonRpcSigner; + getAddress(): Promise; + sendUncheckedTransaction(transaction: Deferrable): Promise; + signTransaction(transaction: Deferrable): Promise; + sendTransaction(transaction: Deferrable): Promise; + signMessage(message: Bytes | string): Promise; + _legacySignMessage(message: Bytes | string): Promise; + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; + unlock(password: string): Promise; +} +declare class UncheckedJsonRpcSigner extends JsonRpcSigner { + sendTransaction(transaction: Deferrable): Promise; +} +export declare class JsonRpcProvider extends BaseProvider { + readonly connection: ConnectionInfo; + _pendingFilter: Promise; + _nextId: number; + _eventLoopCache: Record>; + get _cache(): Record>; + constructor(url?: ConnectionInfo | string, network?: Networkish); + static defaultUrl(): string; + detectNetwork(): Promise; + _uncachedDetectNetwork(): Promise; + getSigner(addressOrIndex?: string | number): JsonRpcSigner; + getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner; + listAccounts(): Promise>; + send(method: string, params: Array): Promise; + prepareRequest(method: string, params: any): [string, Array]; + perform(method: string, params: any): Promise; + _startEvent(event: Event): void; + _startPending(): void; + _stopEvent(event: Event): void; + static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { + [key: string]: boolean; + }): { + [key: string]: string | AccessList; + }; +} +export {}; +//# sourceMappingURL=json-rpc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts.map new file mode 100644 index 0000000..dd2f5e6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE1G,OAAO,EAAE,KAAK,EAAkC,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAA6B,UAAU,EAA6D,MAAM,2BAA2B,CAAC;AAE7I,OAAO,EAAE,UAAU,EAAiB,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAmB,MAAM,oBAAoB,CAAC;AAMrE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AA6FtD,qBAAa,aAAc,SAAQ,MAAO,YAAW,eAAe;IAChE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;gBAEL,gBAAgB,EAAE,GAAG,EAAE,QAAQ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@ethersproject/providers/lib.esm/json-rpc-provider.js new file mode 100644 index 0000000..df86a3f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js @@ -0,0 +1,590 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { Signer } from "@ethersproject/abstract-signer"; +import { BigNumber } from "@ethersproject/bignumber"; +import { hexlify, hexValue, isHexString } from "@ethersproject/bytes"; +import { _TypedDataEncoder } from "@ethersproject/hash"; +import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import { toUtf8Bytes } from "@ethersproject/strings"; +import { accessListify } from "@ethersproject/transactions"; +import { fetchJson, poll } from "@ethersproject/web"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { BaseProvider } from "./base-provider"; +const errorGas = ["call", "estimateGas"]; +function checkError(method, error, params) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === Logger.errors.SERVER_ERROR) { + const e = error.error; + if (e && e.message.match("reverted") && isHexString(e.data)) { + return e.data; + } + logger.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, { + error, data: "0x" + }); + } + let message = error.message; + if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + message = (message || "").toLowerCase(); + const transaction = params.transaction || params.signedTransaction; + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + // "nonce too low" + if (message.match(/nonce too low/)) { + logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced/)) { + logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/only replay-protected/)) { + logger.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, { + error, method, transaction + }); + } + if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, method, transaction + }); + } + throw error; +} +function timer(timeout) { + return new Promise(function (resolve) { + setTimeout(resolve, timeout); + }); +} +function getResult(payload) { + if (payload.error) { + // @TODO: not any + const error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + throw error; + } + return payload.result; +} +function getLowerCase(value) { + if (value) { + return value.toLowerCase(); + } + return value; +} +const _constructorGuard = {}; +export class JsonRpcSigner extends Signer { + constructor(constructorGuard, provider, addressOrIndex) { + logger.checkNew(new.target, JsonRpcSigner); + super(); + if (constructorGuard !== _constructorGuard) { + throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner"); + } + defineReadOnly(this, "provider", provider); + if (addressOrIndex == null) { + addressOrIndex = 0; + } + if (typeof (addressOrIndex) === "string") { + defineReadOnly(this, "_address", this.provider.formatter.address(addressOrIndex)); + defineReadOnly(this, "_index", null); + } + else if (typeof (addressOrIndex) === "number") { + defineReadOnly(this, "_index", addressOrIndex); + defineReadOnly(this, "_address", null); + } + else { + logger.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); + } + } + connect(provider) { + return logger.throwError("cannot alter JSON-RPC Signer connection", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "connect" + }); + } + connectUnchecked() { + return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index); + } + getAddress() { + if (this._address) { + return Promise.resolve(this._address); + } + return this.provider.send("eth_accounts", []).then((accounts) => { + if (accounts.length <= this._index) { + logger.throwError("unknown account #" + this._index, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress" + }); + } + return this.provider.formatter.address(accounts[this._index]); + }); + } + sendUncheckedTransaction(transaction) { + transaction = shallowCopy(transaction); + const fromAddress = this.getAddress().then((address) => { + if (address) { + address = address.toLowerCase(); + } + return address; + }); + // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user + // wishes to use this, it is easy to specify explicitly, otherwise + // we look it up for them. + if (transaction.gasLimit == null) { + const estimate = shallowCopy(transaction); + estimate.from = fromAddress; + transaction.gasLimit = this.provider.estimateGas(estimate); + } + if (transaction.to != null) { + transaction.to = Promise.resolve(transaction.to).then((to) => __awaiter(this, void 0, void 0, function* () { + if (to == null) { + return null; + } + const address = yield this.provider.resolveName(to); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return address; + })); + } + return resolveProperties({ + tx: resolveProperties(transaction), + sender: fromAddress + }).then(({ tx, sender }) => { + if (tx.from != null) { + if (tx.from.toLowerCase() !== sender) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + } + else { + tx.from = sender; + } + const hexTx = this.provider.constructor.hexlifyTransaction(tx, { from: true }); + return this.provider.send("eth_sendTransaction", [hexTx]).then((hash) => { + return hash; + }, (error) => { + return checkError("sendTransaction", error, hexTx); + }); + }); + } + signTransaction(transaction) { + return logger.throwError("signing transactions is unsupported", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signTransaction" + }); + } + sendTransaction(transaction) { + return __awaiter(this, void 0, void 0, function* () { + // This cannot be mined any earlier than any recent block + const blockNumber = yield this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval); + // Send the transaction + const hash = yield this.sendUncheckedTransaction(transaction); + try { + // Unfortunately, JSON-RPC only provides and opaque transaction hash + // for a response, and we need the actual transaction, so we poll + // for it; it should show up very quickly + return yield poll(() => __awaiter(this, void 0, void 0, function* () { + const tx = yield this.provider.getTransaction(hash); + if (tx === null) { + return undefined; + } + return this.provider._wrapTransaction(tx, hash, blockNumber); + }), { oncePoll: this.provider }); + } + catch (error) { + error.transactionHash = hash; + throw error; + } + }); + } + signMessage(message) { + return __awaiter(this, void 0, void 0, function* () { + const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message); + const address = yield this.getAddress(); + return yield this.provider.send("personal_sign", [hexlify(data), address.toLowerCase()]); + }); + } + _legacySignMessage(message) { + return __awaiter(this, void 0, void 0, function* () { + const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message); + const address = yield this.getAddress(); + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return yield this.provider.send("eth_sign", [address.toLowerCase(), hexlify(data)]); + }); + } + _signTypedData(domain, types, value) { + return __awaiter(this, void 0, void 0, function* () { + // Populate any ENS names (in-place) + const populated = yield _TypedDataEncoder.resolveNames(domain, types, value, (name) => { + return this.provider.resolveName(name); + }); + const address = yield this.getAddress(); + return yield this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ]); + }); + } + unlock(password) { + return __awaiter(this, void 0, void 0, function* () { + const provider = this.provider; + const address = yield this.getAddress(); + return provider.send("personal_unlockAccount", [address.toLowerCase(), password, null]); + }); + } +} +class UncheckedJsonRpcSigner extends JsonRpcSigner { + sendTransaction(transaction) { + return this.sendUncheckedTransaction(transaction).then((hash) => { + return { + hash: hash, + nonce: null, + gasLimit: null, + gasPrice: null, + data: null, + value: null, + chainId: null, + confirmations: 0, + from: null, + wait: (confirmations) => { return this.provider.waitForTransaction(hash, confirmations); } + }; + }); + } +} +const allowedTransactionKeys = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true +}; +export class JsonRpcProvider extends BaseProvider { + constructor(url, network) { + logger.checkNew(new.target, JsonRpcProvider); + let networkOrReady = network; + // The network is unknown, query the JSON-RPC for it + if (networkOrReady == null) { + networkOrReady = new Promise((resolve, reject) => { + setTimeout(() => { + this.detectNetwork().then((network) => { + resolve(network); + }, (error) => { + reject(error); + }); + }, 0); + }); + } + super(networkOrReady); + // Default URL + if (!url) { + url = getStatic(this.constructor, "defaultUrl")(); + } + if (typeof (url) === "string") { + defineReadOnly(this, "connection", Object.freeze({ + url: url + })); + } + else { + defineReadOnly(this, "connection", Object.freeze(shallowCopy(url))); + } + this._nextId = 42; + } + get _cache() { + if (this._eventLoopCache == null) { + this._eventLoopCache = {}; + } + return this._eventLoopCache; + } + static defaultUrl() { + return "http:/\/localhost:8545"; + } + detectNetwork() { + if (!this._cache["detectNetwork"]) { + this._cache["detectNetwork"] = this._uncachedDetectNetwork(); + // Clear this cache at the beginning of the next event loop + setTimeout(() => { + this._cache["detectNetwork"] = null; + }, 0); + } + return this._cache["detectNetwork"]; + } + _uncachedDetectNetwork() { + return __awaiter(this, void 0, void 0, function* () { + yield timer(0); + let chainId = null; + try { + chainId = yield this.send("eth_chainId", []); + } + catch (error) { + try { + chainId = yield this.send("net_version", []); + } + catch (error) { } + } + if (chainId != null) { + const getNetwork = getStatic(this.constructor, "getNetwork"); + try { + return getNetwork(BigNumber.from(chainId).toNumber()); + } + catch (error) { + return logger.throwError("could not detect network", Logger.errors.NETWORK_ERROR, { + chainId: chainId, + event: "invalidNetwork", + serverError: error + }); + } + } + return logger.throwError("could not detect network", Logger.errors.NETWORK_ERROR, { + event: "noNetwork" + }); + }); + } + getSigner(addressOrIndex) { + return new JsonRpcSigner(_constructorGuard, this, addressOrIndex); + } + getUncheckedSigner(addressOrIndex) { + return this.getSigner(addressOrIndex).connectUnchecked(); + } + listAccounts() { + return this.send("eth_accounts", []).then((accounts) => { + return accounts.map((a) => this.formatter.address(a)); + }); + } + send(method, params) { + const request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + this.emit("debug", { + action: "request", + request: deepCopy(request), + provider: this + }); + // We can expand this in the future to any call, but for now these + // are the biggest wins and do not require any serializing parameters. + const cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0); + if (cache && this._cache[method]) { + return this._cache[method]; + } + const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => { + this.emit("debug", { + action: "response", + request: request, + response: result, + provider: this + }); + return result; + }, (error) => { + this.emit("debug", { + action: "response", + error: error, + request: request, + provider: this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(() => { + this._cache[method] = null; + }, 0); + } + return result; + } + prepareRequest(method, params) { + switch (method) { + case "getBlockNumber": + return ["eth_blockNumber", []]; + case "getGasPrice": + return ["eth_gasPrice", []]; + case "getBalance": + return ["eth_getBalance", [getLowerCase(params.address), params.blockTag]]; + case "getTransactionCount": + return ["eth_getTransactionCount", [getLowerCase(params.address), params.blockTag]]; + case "getCode": + return ["eth_getCode", [getLowerCase(params.address), params.blockTag]]; + case "getStorageAt": + return ["eth_getStorageAt", [getLowerCase(params.address), params.position, params.blockTag]]; + case "sendTransaction": + return ["eth_sendRawTransaction", [params.signedTransaction]]; + case "getBlock": + if (params.blockTag) { + return ["eth_getBlockByNumber", [params.blockTag, !!params.includeTransactions]]; + } + else if (params.blockHash) { + return ["eth_getBlockByHash", [params.blockHash, !!params.includeTransactions]]; + } + return null; + case "getTransaction": + return ["eth_getTransactionByHash", [params.transactionHash]]; + case "getTransactionReceipt": + return ["eth_getTransactionReceipt", [params.transactionHash]]; + case "call": { + const hexlifyTransaction = getStatic(this.constructor, "hexlifyTransaction"); + return ["eth_call", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]]; + } + case "estimateGas": { + const hexlifyTransaction = getStatic(this.constructor, "hexlifyTransaction"); + return ["eth_estimateGas", [hexlifyTransaction(params.transaction, { from: true })]]; + } + case "getLogs": + if (params.filter && params.filter.address != null) { + params.filter.address = getLowerCase(params.filter.address); + } + return ["eth_getLogs", [params.filter]]; + default: + break; + } + return null; + } + perform(method, params) { + return __awaiter(this, void 0, void 0, function* () { + // Legacy networks do not like the type field being passed along (which + // is fair), so we delete type if it is 0 and a non-EIP-1559 network + if (method === "call" || method === "estimateGas") { + const tx = params.transaction; + if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) { + // If there are no EIP-1559 properties, it might be non-EIP-a559 + if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) { + const feeData = yield this.getFeeData(); + if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) { + // Network doesn't know about EIP-1559 (and hence type) + params = shallowCopy(params); + params.transaction = shallowCopy(tx); + delete params.transaction.type; + } + } + } + } + const args = this.prepareRequest(method, params); + if (args == null) { + logger.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + try { + return yield this.send(args[0], args[1]); + } + catch (error) { + return checkError(method, error, params); + } + }); + } + _startEvent(event) { + if (event.tag === "pending") { + this._startPending(); + } + super._startEvent(event); + } + _startPending() { + if (this._pendingFilter != null) { + return; + } + const self = this; + const pendingFilter = this.send("eth_newPendingTransactionFilter", []); + this._pendingFilter = pendingFilter; + pendingFilter.then(function (filterId) { + function poll() { + self.send("eth_getFilterChanges", [filterId]).then(function (hashes) { + if (self._pendingFilter != pendingFilter) { + return null; + } + let seq = Promise.resolve(); + hashes.forEach(function (hash) { + // @TODO: This should be garbage collected at some point... How? When? + self._emitted["t:" + hash.toLowerCase()] = "pending"; + seq = seq.then(function () { + return self.getTransaction(hash).then(function (tx) { + self.emit("pending", tx); + return null; + }); + }); + }); + return seq.then(function () { + return timer(1000); + }); + }).then(function () { + if (self._pendingFilter != pendingFilter) { + self.send("eth_uninstallFilter", [filterId]); + return; + } + setTimeout(function () { poll(); }, 0); + return null; + }).catch((error) => { }); + } + poll(); + return filterId; + }).catch((error) => { }); + } + _stopEvent(event) { + if (event.tag === "pending" && this.listenerCount("pending") === 0) { + this._pendingFilter = null; + } + super._stopEvent(event); + } + // Convert an ethers.js transaction into a JSON-RPC transaction + // - gasLimit => gas + // - All values hexlified + // - All numeric values zero-striped + // - All addresses are lowercased + // NOTE: This allows a TransactionRequest, but all values should be resolved + // before this is called + // @TODO: This will likely be removed in future versions and prepareRequest + // will be the preferred method for this. + static hexlifyTransaction(transaction, allowExtra) { + // Check only allowed properties are given + const allowed = shallowCopy(allowedTransactionKeys); + if (allowExtra) { + for (const key in allowExtra) { + if (allowExtra[key]) { + allowed[key] = true; + } + } + } + checkProperties(transaction, allowed); + const result = {}; + // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros. + ["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + const value = hexValue(transaction[key]); + if (key === "gasLimit") { + key = "gas"; + } + result[key] = value; + }); + ["from", "to", "data"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + result[key] = hexlify(transaction[key]); + }); + if (transaction.accessList) { + result["accessList"] = accessListify(transaction.accessList); + } + return result; + } +} +//# sourceMappingURL=json-rpc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js.map new file mode 100644 index 0000000..44615c4 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-provider.js","sourceRoot":"","sources":["../src.ts/json-rpc-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAKb,OAAO,EAAE,MAAM,EAAoD,MAAM,gCAAgC,CAAC;AAC1G,O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gBAAE,OAAO;aAAE;YAChD,MAAM,KAAK,GAAG,QAAQ,CAAO,WAAY,CAAC,GAAG,CAAC,CAAC,CAAC;YAChD,IAAI,GAAG,KAAK,UAAU,EAAE;gBAAE,GAAG,GAAG,KAAK,CAAC;aAAE;YACxC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,UAAS,GAAG;YACvC,IAAU,WAAY,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE;gBAAE,OAAO;aAAE;YAChD,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAO,WAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,IAAU,WAAY,CAAC,UAAU,EAAE;YAC/B,MAAM,CAAC,YAAY,CAAC,GAAG,aAAa,CAAO,WAAY,CAAC,UAAU,CAAC,CAAC;SACvE;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts new file mode 100644 index 0000000..3f20d33 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts @@ -0,0 +1,7 @@ +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class NodesmithProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey?: any): string; +} +//# sourceMappingURL=nodesmith-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts.map new file mode 100644 index 0000000..c0a3493 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodesmith-provider.d.ts","sourceRoot":"","sources":["../src.ts/nodesmith-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAS7D,qBAAa,iBAAkB,SAAQ,kBAAkB;IAErD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAOlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM;CA0BxD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js new file mode 100644 index 0000000..3a4d64d --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js @@ -0,0 +1,41 @@ +/* istanbul ignore file */ +"use strict"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +// Special API key provided by Nodesmith for ethers.js +const defaultApiKey = "ETHERS_JS_SHARED"; +export class NodesmithProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey) { + if (apiKey && typeof (apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey || defaultApiKey; + } + static getUrl(network, apiKey) { + logger.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); + let host = null; + switch (network.name) { + case "homestead": + host = "https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc"; + break; + case "ropsten": + host = "https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc"; + break; + case "rinkeby": + host = "https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc"; + break; + case "goerli": + host = "https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc"; + break; + case "kovan": + host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return (host + "?apiKey=" + apiKey); + } +} +//# sourceMappingURL=nodesmith-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js.map new file mode 100644 index 0000000..125a016 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodesmith-provider.js","sourceRoot":"","sources":["../src.ts/nodesmith-provider.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,YAAY,CAAC;AAGb,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,sDAAsD;AACtD,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IAErD,MAAM,CAAC,SAAS,CAAC,MAAW;QACxB,IAAI,MAAM,IAAI,OAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;YACvC,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SACjE;QACD,OAAO,MAAM,IAAI,aAAa,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,OAAgB,EAAE,MAAY;QACxC,MAAM,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAAC;QAEjG,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,QAAQ,OAAO,CAAC,IAAI,EAAE;YAClB,KAAK,WAAW;gBACZ,IAAI,GAAG,sDAAsD,CAAC;gBAC9D,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,GAAG,sDAAsD,CAAC;gBAC9D,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,GAAG,sDAAsD,CAAC;gBAC9D,MAAM;YACV,KAAK,QAAQ;gBACT,IAAI,GAAG,qDAAqD,CAAC;gBAC7D,MAAM;YACV,KAAK,OAAO;gBACR,IAAI,GAAG,oDAAoD,CAAC;gBAC5D,MAAM;YACV;gBACG,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAChF;QAED,OAAO,CAAC,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;IACxC,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts new file mode 100644 index 0000000..22e4d01 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts @@ -0,0 +1,13 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class PocketProvider extends UrlJsonRpcProvider { + readonly applicationId: string; + readonly applicationSecretKey: string; + readonly loadBalancer: boolean; + constructor(network?: Networkish, apiKey?: any); + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): ConnectionInfo; + isCommunityResource(): boolean; +} +//# sourceMappingURL=pocket-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts.map new file mode 100644 index 0000000..8e1ba38 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pocket-provider.d.ts","sourceRoot":"","sources":["../src.ts/pocket-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAU7D,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;gBAEnB,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IA6B9C,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IA2ClC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;IA2C5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js new file mode 100644 index 0000000..4652fc6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js @@ -0,0 +1,114 @@ +"use strict"; +import { getStatic } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +// These are load-balancer-based application IDs +const defaultApplicationIds = { + homestead: "6004bcd10040261633ade990", + ropsten: "6004bd4d0040261633ade991", + rinkeby: "6004bda20040261633ade994", + goerli: "6004bd860040261633ade992", +}; +export class PocketProvider extends UrlJsonRpcProvider { + constructor(network, apiKey) { + // We need a bit of creativity in the constructor because + // Pocket uses different default API keys based on the network + if (apiKey == null) { + const n = getStatic(new.target, "getNetwork")(network); + if (n) { + const applicationId = defaultApplicationIds[n.name]; + if (applicationId) { + apiKey = { + applicationId: applicationId, + loadBalancer: true + }; + } + } + // If there was any issue above, we don't know this network + if (apiKey == null) { + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + } + super(network, apiKey); + } + static getApiKey(apiKey) { + // Most API Providers allow null to get the default configuration, but + // Pocket requires the network to decide the default provider, so we + // rely on hijacking the constructor to add a sensible default for us + if (apiKey == null) { + logger.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey); + } + const apiKeyObj = { + applicationId: null, + loadBalancer: false, + applicationSecretKey: null + }; + // Parse applicationId and applicationSecretKey + if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + } + else if (apiKey.applicationSecretKey != null) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId); + logger.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]"); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else if (apiKey.applicationId) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else { + logger.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + return apiKeyObj; + } + static getUrl(network, apiKey) { + let host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + let url = null; + if (apiKey.loadBalancer) { + url = `https:/\/${host}/v1/lb/${apiKey.applicationId}`; + } + else { + url = `https:/\/${host}/v1/${apiKey.applicationId}`; + } + const connection = { url }; + // Initialize empty headers + connection.headers = {}; + // Apply application secret key + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey; + } + return connection; + } + isCommunityResource() { + return (this.applicationId === defaultApplicationIds[this.network.name]); + } +} +//# sourceMappingURL=pocket-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js.map new file mode 100644 index 0000000..5dcc5bb --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pocket-provider.js","sourceRoot":"","sources":["../src.ts/pocket-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,gDAAgD;AAChD,MAAM,qBAAqB,GAA2B;IAClD,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,0BAA0B;IACnC,MAAM,EAAE,0BAA0B;CACrC,CAAC;AAEF,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IAKlD,YAAY,OAAoB,EAAE,MAAY;QAC1C,yDAAyD;QACzD,8DAA8D;QAE9D,IAAI,MAAM,IAAI,IAAI,EAAE;YAChB,MAAM,CAAC,GAAG,SAAS,CAAmC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC;YACzF,IAAI,CAAC,EAAE;gBACH,MAAM,aAAa,GAAG,qBAAqB,CAAC,CAAC,CA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AAC;QACf,IAAI,MAAM,CAAC,YAAY,EAAE;YACrB,GAAG,GAAG,YAAa,IAAK,UAAW,MAAM,CAAC,aAAc,EAAE,CAAA;SAC7D;aAAM;YACH,GAAG,GAAG,YAAa,IAAK,OAAQ,MAAM,CAAC,aAAc,EAAE,CAAA;SAC1D;QAED,MAAM,UAAU,GAAmB,EAAE,GAAG,EAAE,CAAC;QAE3C,2BAA2B;QAC3B,UAAU,CAAC,OAAO,GAAG,EAAE,CAAA;QAEvB,+BAA+B;QAC/B,IAAI,MAAM,CAAC,oBAAoB,IAAI,IAAI,EAAE;YACrC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;YACrB,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAA;SACpD;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,mBAAmB;QACf,OAAO,CAAC,IAAI,CAAC,aAAa,KAAK,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts new file mode 100644 index 0000000..1ddde45 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts @@ -0,0 +1,18 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { CommunityResourcable } from "./formatter"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; +export declare class StaticJsonRpcProvider extends JsonRpcProvider { + detectNetwork(): Promise; +} +export declare abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable { + readonly apiKey: any; + constructor(network?: Networkish, apiKey?: any); + _startPending(): void; + isCommunityResource(): boolean; + getSigner(address?: string): JsonRpcSigner; + listAccounts(): Promise>; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): string | ConnectionInfo; +} +//# sourceMappingURL=url-json-rpc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts.map new file mode 100644 index 0000000..74542cd --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"url-json-rpc-provider.d.ts","sourceRoot":"","sources":["../src.ts/url-json-rpc-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAerE,qBAAa,qBAAsB,SAAQ,eAAe;IAChD,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;CAmB1C;AAED,8BAAsB,kBAAmB,SAAQ,qBAAsB,YAAW,oBAAoB;IAClG,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;gBAET,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IAoB9C,aAAa,IAAI,IAAI;IAIrB,mBAAmB,IAAI,OAAO;IAI9B,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa;IAQ1C,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAKtC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAOlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,GAAG,cAAc;CAKxE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js new file mode 100644 index 0000000..bcb31bd --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js @@ -0,0 +1,92 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { defineReadOnly, getStatic } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { JsonRpcProvider } from "./json-rpc-provider"; +// A StaticJsonRpcProvider is useful when you *know* for certain that +// the backend will never change, as it never calls eth_chainId to +// verify its backend. However, if the backend does change, the effects +// are undefined and may include: +// - inconsistent results +// - locking up the UI +// - block skew warnings +// - wrong results +// If the network is not explicit (i.e. auto-detection is expected), the +// node MUST be running and available to respond to requests BEFORE this +// is instantiated. +export class StaticJsonRpcProvider extends JsonRpcProvider { + detectNetwork() { + const _super = Object.create(null, { + detectNetwork: { get: () => super.detectNetwork } + }); + return __awaiter(this, void 0, void 0, function* () { + let network = this.network; + if (network == null) { + network = yield _super.detectNetwork.call(this); + if (!network) { + logger.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {}); + } + // If still not set, set it + if (this._network == null) { + // A static network does not support "any" + defineReadOnly(this, "_network", network); + this.emit("network", network, null); + } + } + return network; + }); + } +} +export class UrlJsonRpcProvider extends StaticJsonRpcProvider { + constructor(network, apiKey) { + logger.checkAbstract(new.target, UrlJsonRpcProvider); + // Normalize the Network and API Key + network = getStatic(new.target, "getNetwork")(network); + apiKey = getStatic(new.target, "getApiKey")(apiKey); + const connection = getStatic(new.target, "getUrl")(network, apiKey); + super(connection, network); + if (typeof (apiKey) === "string") { + defineReadOnly(this, "apiKey", apiKey); + } + else if (apiKey != null) { + Object.keys(apiKey).forEach((key) => { + defineReadOnly(this, key, apiKey[key]); + }); + } + } + _startPending() { + logger.warn("WARNING: API provider does not support pending filters"); + } + isCommunityResource() { + return false; + } + getSigner(address) { + return logger.throwError("API provider does not support signing", Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" }); + } + listAccounts() { + return Promise.resolve([]); + } + // Return a defaultApiKey if null, otherwise validate the API key + static getApiKey(apiKey) { + return apiKey; + } + // Returns the url or connection for the given network and API key. The + // API key will have been sanitized by the getApiKey first, so any validation + // or transformations can be done there. + static getUrl(network, apiKey) { + return logger.throwError("not implemented; sub-classes must override getUrl", Logger.errors.NOT_IMPLEMENTED, { + operation: "getUrl" + }); + } +} +//# sourceMappingURL=url-json-rpc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js.map new file mode 100644 index 0000000..c9b8557 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"url-json-rpc-provider.js","sourceRoot":"","sources":["../src.ts/url-json-rpc-provider.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;;;;;;;;;;AAGb,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAGnC,OAAO,EAAE,eAAe,EAAiB,MAAM,qBAAqB,CAAC;AAIrE,qEAAqE;AACrE,kEAAkE;AAClE,uEAAuE;AACvE,iCAAiC;AACjC,yBAAyB;AACzB,s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,KAAK,QAAQ,EAAE;YAC7B,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SAC1C;aAAM,IAAI,MAAM,IAAI,IAAI,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAChC,cAAc,CAAW,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IAED,aAAa;QACT,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IAC1E,CAAC;IAED,mBAAmB;QACf,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,SAAS,CAAC,OAAgB;QACtB,OAAO,MAAM,CAAC,UAAU,CACpB,uCAAuC,EACvC,MAAM,CAAC,MAAM,CAAC,qBAAqB,EACnC,EAAE,SAAS,EAAE,WAAW,EAAE,CAC7B,CAAC;IACN,CAAC;IAED,YAAY;QACR,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,iEAAiE;IACjE,MAAM,CAAC,SAAS,CAAC,MAAW;QACxB,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,uEAAuE;IACvE,6EAA6E;IAC7E,wCAAwC;IACxC,MAAM,CAAC,MAAM,CAAC,OAAgB,EAAE,MAAW;QACvC,OAAO,MAAM,CAAC,UAAU,CAAC,mDAAmD,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;YACzG,SAAS,EAAE,QAAQ;SACtB,CAAC,CAAC;IACP,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts new file mode 100644 index 0000000..690b300 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts @@ -0,0 +1,28 @@ +import { Networkish } from "@ethersproject/networks"; +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare type ExternalProvider = { + isMetaMask?: boolean; + isStatus?: boolean; + host?: string; + path?: string; + sendAsync?: (request: { + method: string; + params?: Array; + }, callback: (error: any, response: any) => void) => void; + send?: (request: { + method: string; + params?: Array; + }, callback: (error: any, response: any) => void) => void; + request?: (request: { + method: string; + params?: Array; + }) => Promise; +}; +export declare type JsonRpcFetchFunc = (method: string, params?: Array) => Promise; +export declare class Web3Provider extends JsonRpcProvider { + readonly provider: ExternalProvider; + readonly jsonRpcFetchFunc: JsonRpcFetchFunc; + constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish); + send(method: string, params: Array): Promise; +} +//# sourceMappingURL=web3-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts.map new file mode 100644 index 0000000..3196014 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"web3-provider.d.ts","sourceRoot":"","sources":["../src.ts/web3-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAOrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,oBAAY,gBAAgB,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAA;IACrH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAA;IAChH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAC/E,CAAA;AAID,oBAAY,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAgGrF,qBAAa,YAAa,SAAQ,eAAe;IAC7C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAEhC,QAAQ,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,OAAO,CAAC,EAAE,UAAU;IA2C/E,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAGzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/web3-provider.js b/node_modules/@ethersproject/providers/lib.esm/web3-provider.js new file mode 100644 index 0000000..fe006cd --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/web3-provider.js @@ -0,0 +1,132 @@ +"use strict"; +import { deepCopy, defineReadOnly } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { JsonRpcProvider } from "./json-rpc-provider"; +let _nextId = 1; +function buildWeb3LegacyFetcher(provider, sendFunc) { + const fetcher = "Web3LegacyFetcher"; + return function (method, params) { + const request = { + method: method, + params: params, + id: (_nextId++), + jsonrpc: "2.0" + }; + return new Promise((resolve, reject) => { + this.emit("debug", { + action: "request", + fetcher, + request: deepCopy(request), + provider: this + }); + sendFunc(request, (error, response) => { + if (error) { + this.emit("debug", { + action: "response", + fetcher, + error, + request, + provider: this + }); + return reject(error); + } + this.emit("debug", { + action: "response", + fetcher, + request, + response, + provider: this + }); + if (response.error) { + const error = new Error(response.error.message); + error.code = response.error.code; + error.data = response.error.data; + return reject(error); + } + resolve(response.result); + }); + }); + }; +} +function buildEip1193Fetcher(provider) { + return function (method, params) { + if (params == null) { + params = []; + } + const request = { method, params }; + this.emit("debug", { + action: "request", + fetcher: "Eip1193Fetcher", + request: deepCopy(request), + provider: this + }); + return provider.request(request).then((response) => { + this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request, + response, + provider: this + }); + return response; + }, (error) => { + this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request, + error, + provider: this + }); + throw error; + }); + }; +} +export class Web3Provider extends JsonRpcProvider { + constructor(provider, network) { + logger.checkNew(new.target, Web3Provider); + if (provider == null) { + logger.throwArgumentError("missing provider", "provider", provider); + } + let path = null; + let jsonRpcFetchFunc = null; + let subprovider = null; + if (typeof (provider) === "function") { + path = "unknown:"; + jsonRpcFetchFunc = provider; + } + else { + path = provider.host || provider.path || ""; + if (!path && provider.isMetaMask) { + path = "metamask"; + } + subprovider = provider; + if (provider.request) { + if (path === "") { + path = "eip-1193:"; + } + jsonRpcFetchFunc = buildEip1193Fetcher(provider); + } + else if (provider.sendAsync) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider)); + } + else if (provider.send) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider)); + } + else { + logger.throwArgumentError("unsupported provider", "provider", provider); + } + if (!path) { + path = "unknown:"; + } + } + super(path, network); + defineReadOnly(this, "jsonRpcFetchFunc", jsonRpcFetchFunc); + defineReadOnly(this, "provider", subprovider); + } + send(method, params) { + return this.jsonRpcFetchFunc(method, params); + } +} +//# sourceMappingURL=web3-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/web3-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/web3-provider.js.map new file mode 100644 index 0000000..c835133 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/web3-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"web3-provider.js","sourceRoot":"","sources":["../src.ts/web3-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAatD,IAAI,OAAO,GAAG,CAAC,CAAC;AAMhB,SAAS,sBAAsB,CAAC,QAA0B,EAAE,QAAwB;IAChF,MAAM,OAAO,GAAG,mBAAmB,CAAC;IAEpC,OAAO,UAAS,MAAc,EAAE,MAAkB;QAC9C,MAAM,OAAO,GAAG;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC;YACf,OAAO,EAAE,KAAK;SACjB,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBACf,MAAM,EAAE,SAAS;gBACjB,OAAO;gBACP,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;gBAC1B,QAAQ,EAAE,IAAI;aACjB,CAAC,CAAC;YAEH,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK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AC;aACrB;YAED,WAAW,GAAG,QAAQ,CAAC;YAEvB,IAAI,QAAQ,CAAC,OAAO,EAAE;gBAClB,IAAI,IAAI,KAAK,EAAE,EAAE;oBAAE,IAAI,GAAG,WAAW,CAAC;iBAAE;gBACxC,gBAAgB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;aACpD;iBAAM,IAAI,QAAQ,CAAC,SAAS,EAAE;gBAC3B,gBAAgB,GAAG,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;aAC1F;iBAAM,IAAI,QAAQ,CAAC,IAAI,EAAE;gBACtB,gBAAgB,GAAG,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;aACrF;iBAAM;gBACH,MAAM,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aAC3E;YAED,IAAI,CAAC,IAAI,EAAE;gBAAE,IAAI,GAAG,UAAU,CAAC;aAAE;SACpC;QAED,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAErB,cAAc,CAAC,IAAI,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;QAC3D,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,CAAC,MAAc,EAAE,MAAkB;QACnC,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts new file mode 100644 index 0000000..b9cd445 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts @@ -0,0 +1,39 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { Event } from "./base-provider"; +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare type InflightRequest = { + callback: (error: Error, result: any) => void; + payload: string; +}; +export declare type Subscription = { + tag: string; + processFunc: (payload: any) => void; +}; +export declare class WebSocketProvider extends JsonRpcProvider { + readonly _websocket: any; + readonly _requests: { + [name: string]: InflightRequest; + }; + readonly _detectNetwork: Promise; + readonly _subIds: { + [tag: string]: Promise; + }; + readonly _subs: { + [name: string]: Subscription; + }; + _wsReady: boolean; + constructor(url: string, network?: Networkish); + detectNetwork(): Promise; + get pollingInterval(): number; + resetEventsBlock(blockNumber: number): void; + set pollingInterval(value: number); + poll(): Promise; + set polling(value: boolean); + send(method: string, params?: Array): Promise; + static defaultUrl(): string; + _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise; + _startEvent(event: Event): void; + _stopEvent(event: Event): void; + destroy(): Promise; +} +//# sourceMappingURL=websocket-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts.map new file mode 100644 index 0000000..3d761f7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"websocket-provider.d.ts","sourceRoot":"","sources":["../src.ts/websocket-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwBtD,oBAAY,eAAe,GAAG;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW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,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAyBxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js new file mode 100644 index 0000000..61dc0b0 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js @@ -0,0 +1,286 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { BigNumber } from "@ethersproject/bignumber"; +import { defineReadOnly } from "@ethersproject/properties"; +import { JsonRpcProvider } from "./json-rpc-provider"; +import { WebSocket } from "./ws"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +/** + * Notes: + * + * This provider differs a bit from the polling providers. One main + * difference is how it handles consistency. The polling providers + * will stall responses to ensure a consistent state, while this + * WebSocket provider assumes the connected backend will manage this. + * + * For example, if a polling provider emits an event which indicates + * the event occurred in blockhash XXX, a call to fetch that block by + * its hash XXX, if not present will retry until it is present. This + * can occur when querying a pool of nodes that are mildly out of sync + * with each other. + */ +let NextId = 1; +// For more info about the Real-time Event API see: +// https://geth.ethereum.org/docs/rpc/pubsub +export class WebSocketProvider extends JsonRpcProvider { + constructor(url, network) { + // This will be added in the future; please open an issue to expedite + if (network === "any") { + logger.throwError("WebSocketProvider does not support 'any' network yet", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "network:any" + }); + } + super(url, network); + this._pollingInterval = -1; + this._wsReady = false; + defineReadOnly(this, "_websocket", new WebSocket(this.connection.url)); + defineReadOnly(this, "_requests", {}); + defineReadOnly(this, "_subs", {}); + defineReadOnly(this, "_subIds", {}); + defineReadOnly(this, "_detectNetwork", super.detectNetwork()); + // Stall sending requests until the socket is open... + this._websocket.onopen = () => { + this._wsReady = true; + Object.keys(this._requests).forEach((id) => { + this._websocket.send(this._requests[id].payload); + }); + }; + this._websocket.onmessage = (messageEvent) => { + const data = messageEvent.data; + const result = JSON.parse(data); + if (result.id != null) { + const id = String(result.id); + const request = this._requests[id]; + delete this._requests[id]; + if (result.result !== undefined) { + request.callback(null, result.result); + this.emit("debug", { + action: "response", + request: JSON.parse(request.payload), + response: result.result, + provider: this + }); + } + else { + let error = null; + if (result.error) { + error = new Error(result.error.message || "unknown error"); + defineReadOnly(error, "code", result.error.code || null); + defineReadOnly(error, "response", data); + } + else { + error = new Error("unknown error"); + } + request.callback(error, undefined); + this.emit("debug", { + action: "response", + error: error, + request: JSON.parse(request.payload), + provider: this + }); + } + } + else if (result.method === "eth_subscription") { + // Subscription... + const sub = this._subs[result.params.subscription]; + if (sub) { + //this.emit.apply(this, ); + sub.processFunc(result.params.result); + } + } + else { + console.warn("this should not happen"); + } + }; + // This Provider does not actually poll, but we want to trigger + // poll events for things that depend on them (like stalling for + // block and transaction lookups) + const fauxPoll = setInterval(() => { + this.emit("poll"); + }, 1000); + if (fauxPoll.unref) { + fauxPoll.unref(); + } + } + detectNetwork() { + return this._detectNetwork; + } + get pollingInterval() { + return 0; + } + resetEventsBlock(blockNumber) { + logger.throwError("cannot reset events block on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resetEventBlock" + }); + } + set pollingInterval(value) { + logger.throwError("cannot set polling interval on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPollingInterval" + }); + } + poll() { + return __awaiter(this, void 0, void 0, function* () { + return null; + }); + } + set polling(value) { + if (!value) { + return; + } + logger.throwError("cannot set polling on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPolling" + }); + } + send(method, params) { + const rid = NextId++; + return new Promise((resolve, reject) => { + function callback(error, result) { + if (error) { + return reject(error); + } + return resolve(result); + } + const payload = JSON.stringify({ + method: method, + params: params, + id: rid, + jsonrpc: "2.0" + }); + this.emit("debug", { + action: "request", + request: JSON.parse(payload), + provider: this + }); + this._requests[String(rid)] = { callback, payload }; + if (this._wsReady) { + this._websocket.send(payload); + } + }); + } + static defaultUrl() { + return "ws:/\/localhost:8546"; + } + _subscribe(tag, param, processFunc) { + return __awaiter(this, void 0, void 0, function* () { + let subIdPromise = this._subIds[tag]; + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then((param) => { + return this.send("eth_subscribe", param); + }); + this._subIds[tag] = subIdPromise; + } + const subId = yield subIdPromise; + this._subs[subId] = { tag, processFunc }; + }); + } + _startEvent(event) { + switch (event.type) { + case "block": + this._subscribe("block", ["newHeads"], (result) => { + const blockNumber = BigNumber.from(result.number).toNumber(); + this._emitted.block = blockNumber; + this.emit("block", blockNumber); + }); + break; + case "pending": + this._subscribe("pending", ["newPendingTransactions"], (result) => { + this.emit("pending", result); + }); + break; + case "filter": + this._subscribe(event.tag, ["logs", this._getFilter(event.filter)], (result) => { + if (result.removed == null) { + result.removed = false; + } + this.emit(event.filter, this.formatter.filterLog(result)); + }); + break; + case "tx": { + const emitReceipt = (event) => { + const hash = event.hash; + this.getTransactionReceipt(hash).then((receipt) => { + if (!receipt) { + return; + } + this.emit(hash, receipt); + }); + }; + // In case it is already mined + emitReceipt(event); + // To keep things simple, we start up a single newHeads subscription + // to keep an eye out for transactions we are watching for. + // Starting a subscription for an event (i.e. "tx") that is already + // running is (basically) a nop. + this._subscribe("tx", ["newHeads"], (result) => { + this._events.filter((e) => (e.type === "tx")).forEach(emitReceipt); + }); + break; + } + // Nothing is needed + case "debug": + case "poll": + case "willPoll": + case "didPoll": + case "error": + break; + default: + console.log("unhandled:", event); + break; + } + } + _stopEvent(event) { + let tag = event.tag; + if (event.type === "tx") { + // There are remaining transaction event listeners + if (this._events.filter((e) => (e.type === "tx")).length) { + return; + } + tag = "tx"; + } + else if (this.listenerCount(event.event)) { + // There are remaining event listeners + return; + } + const subId = this._subIds[tag]; + if (!subId) { + return; + } + delete this._subIds[tag]; + subId.then((subId) => { + if (!this._subs[subId]) { + return; + } + delete this._subs[subId]; + this.send("eth_unsubscribe", [subId]); + }); + } + destroy() { + return __awaiter(this, void 0, void 0, function* () { + // Wait until we have connected before trying to disconnect + if (this._websocket.readyState === WebSocket.CONNECTING) { + yield (new Promise((resolve) => { + this._websocket.onopen = function () { + resolve(true); + }; + this._websocket.onerror = function () { + resolve(false); + }; + })); + } + // Hangup + // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes + this._websocket.close(1000); + }); + } +} +//# sourceMappingURL=websocket-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js.map b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js.map new file mode 100644 index 0000000..9a60b93 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"websocket-provider.js","sourceRoot":"","sources":["../src.ts/websocket-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC;;;;;;;;;;;;;GAaG;AAEH,IAAI,MAAM,GAA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AO,EAAE,EAAE;oBAC3B,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG;wBACrB,OAAO,CAAC,IAAI,CAAC,CAAC;oBAClB,CAAC,CAAC;oBAEF,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG;wBACtB,OAAO,CAAC,KAAK,CAAC,CAAC;oBACnB,CAAC,CAAC;gBACN,CAAC,CAAC,CAAC,CAAC;aACP;YAED,SAAS;YACT,gFAAgF;YAChF,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;KAAA;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ws.d.ts b/node_modules/@ethersproject/providers/lib.esm/ws.d.ts new file mode 100644 index 0000000..15d79fe --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ws.d.ts @@ -0,0 +1,3 @@ +declare let WS: any; +export { WS as WebSocket }; +//# sourceMappingURL=ws.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ws.d.ts.map b/node_modules/@ethersproject/providers/lib.esm/ws.d.ts.map new file mode 100644 index 0000000..80d6745 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ws.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../src.ts/browser-ws.ts"],"names":[],"mappings":"AAKA,QAAA,IAAI,EAAE,EAAE,GAAU,CAAC;AAenB,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ws.js b/node_modules/@ethersproject/providers/lib.esm/ws.js new file mode 100644 index 0000000..0a05653 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ws.js @@ -0,0 +1,22 @@ +"use strict"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +let WS = null; +try { + WS = WebSocket; + if (WS == null) { + throw new Error("inject please"); + } +} +catch (error) { + const logger = new Logger(version); + WS = function () { + logger.throwError("WebSockets not supported in this environment", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new WebSocket()" + }); + }; +} +//export default WS; +//module.exports = WS; +export { WS as WebSocket }; +//# sourceMappingURL=ws.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib.esm/ws.js.map b/node_modules/@ethersproject/providers/lib.esm/ws.js.map new file mode 100644 index 0000000..2756283 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib.esm/ws.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ws.js","sourceRoot":"","sources":["../src.ts/browser-ws.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,IAAI,EAAE,GAAQ,IAAI,CAAC;AAEnB,IAAI;IACA,EAAE,GAAI,SAAiB,CAAC;IACxB,IAAI,EAAE,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;KAAE;CACxD;AAAC,OAAO,KAAK,EAAE;IACZ,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IACnC,EAAE,GAAG;QACD,MAAM,CAAC,UAAU,CAAC,8CAA8C,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;YACnG,SAAS,EAAE,iBAAiB;SAC/B,CAAC,CAAC;IACP,CAAC,CAAA;CACJ;AACD,oBAAoB;AACpB,sBAAsB;AACtB,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/_version.d.ts b/node_modules/@ethersproject/providers/lib/_version.d.ts new file mode 100644 index 0000000..179a99f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "providers/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/_version.d.ts.map b/node_modules/@ethersproject/providers/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/_version.js b/node_modules/@ethersproject/providers/lib/_version.js new file mode 100644 index 0000000..fe539ba --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "providers/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/_version.js.map b/node_modules/@ethersproject/providers/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts b/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts new file mode 100644 index 0000000..8f0e23a --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts @@ -0,0 +1,17 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { CommunityResourcable } from "./formatter"; +import { WebSocketProvider } from "./websocket-provider"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + readonly apiKey: string; + constructor(network?: Networkish, apiKey?: any); + isCommunityResource(): boolean; +} +export declare class AlchemyProvider extends UrlJsonRpcProvider { + static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: string): ConnectionInfo; + isCommunityResource(): boolean; +} +//# sourceMappingURL=alchemy-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts.map new file mode 100644 index 0000000..f519e6f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider.d.ts","sourceRoot":"","sources":["../src.ts/alchemy-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAMzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAS7D,qBAAa,wBAAyB,SAAQ,iBAAkB,YAAW,oBAAoB;IAC3F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IAU9C,mBAAmB,IAAI,OAAO;CAGjC;AAED,qBAAa,eAAgB,SAAQ,kBAAkB;IAEnD,MAAM,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,wBAAwB;IAIzF,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAQlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc;IAoD/D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/alchemy-provider.js b/node_modules/@ethersproject/providers/lib/alchemy-provider.js new file mode 100644 index 0000000..97366d7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/alchemy-provider.js @@ -0,0 +1,121 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AlchemyProvider = exports.AlchemyWebSocketProvider = void 0; +var properties_1 = require("@ethersproject/properties"); +var formatter_1 = require("./formatter"); +var websocket_provider_1 = require("./websocket-provider"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var url_json_rpc_provider_1 = require("./url-json-rpc-provider"); +// This key was provided to ethers.js by Alchemy to be used by the +// default provider, but it is recommended that for your own +// production environments, that you acquire your own API key at: +// https://dashboard.alchemyapi.io +var defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC"; +var AlchemyWebSocketProvider = /** @class */ (function (_super) { + __extends(AlchemyWebSocketProvider, _super); + function AlchemyWebSocketProvider(network, apiKey) { + var _this = this; + var provider = new AlchemyProvider(network, apiKey); + var url = provider.connection.url.replace(/^http/i, "ws") + .replace(".alchemyapi.", ".ws.alchemyapi."); + _this = _super.call(this, url, provider.network) || this; + (0, properties_1.defineReadOnly)(_this, "apiKey", provider.apiKey); + return _this; + } + AlchemyWebSocketProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + return AlchemyWebSocketProvider; +}(websocket_provider_1.WebSocketProvider)); +exports.AlchemyWebSocketProvider = AlchemyWebSocketProvider; +var AlchemyProvider = /** @class */ (function (_super) { + __extends(AlchemyProvider, _super); + function AlchemyProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + AlchemyProvider.getWebSocketProvider = function (network, apiKey) { + return new AlchemyWebSocketProvider(network, apiKey); + }; + AlchemyProvider.getApiKey = function (apiKey) { + if (apiKey == null) { + return defaultApiKey; + } + if (apiKey && typeof (apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey; + }; + AlchemyProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network.name) { + case "homestead": + host = "eth-mainnet.alchemyapi.io/v2/"; + break; + case "ropsten": + host = "eth-ropsten.alchemyapi.io/v2/"; + break; + case "rinkeby": + host = "eth-rinkeby.alchemyapi.io/v2/"; + break; + case "goerli": + host = "eth-goerli.alchemyapi.io/v2/"; + break; + case "kovan": + host = "eth-kovan.alchemyapi.io/v2/"; + break; + case "matic": + host = "polygon-mainnet.g.alchemy.com/v2/"; + break; + case "maticmum": + host = "polygon-mumbai.g.alchemy.com/v2/"; + break; + case "arbitrum": + host = "arb-mainnet.g.alchemy.com/v2/"; + break; + case "arbitrum-rinkeby": + host = "arb-rinkeby.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-kovan": + host = "opt-kovan.g.alchemy.com/v2/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return { + allowGzip: true, + url: ("https:/" + "/" + host + apiKey), + throttleCallback: function (attempt, url) { + if (apiKey === defaultApiKey) { + (0, formatter_1.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + }; + AlchemyProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + return AlchemyProvider; +}(url_json_rpc_provider_1.UrlJsonRpcProvider)); +exports.AlchemyProvider = AlchemyProvider; +//# sourceMappingURL=alchemy-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/alchemy-provider.js.map b/node_modules/@ethersproject/providers/lib/alchemy-provider.js.map new file mode 100644 index 0000000..9bd7b34 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/alchemy-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider.js","sourceRoot":"","sources":["../src.ts/alchemy-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAGb,wDAA2D;AAG3D,yCAAwE;AACxE,2DAAyD;AAEzD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iEAA6D;AAE7D,kEAAkE;AAClE,4DAA4D;AAC5D,iEAAiE;AACjE,oCAAoC;AAEpC,IAAM,aAAa,GAAG,kCAAkC,CAAA;AAExD;IAA8C,4CAAiB;IAG3D,kCAAY,OAAoB,EAAE,MAAY;QAA9C,iBAQC;QAPG,IAAM,QAAQ,GAAG,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAEtD,IAAM,GAAG,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;aACvB,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;QAE/E,QAAA,kBAAM,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,SAAC;QAC7B,IAAA,2BAAc,EAAC,KAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;;IACpD,CAAC;IAED,sDAAmB,GAAnB;QACI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;IACL,+BAAC;AAAD,CAAC,AAhBD,CAA8C,sCAAiB,GAgB9D;AAhBY,4DAAwB;AAkBrC;IAAqC,mCAAkB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A6B,CAAC;gBACrC,MAAM;YACV;gBACG,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAChF;QAED,OAAO;YACH,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,CAAC;YACtC,gBAAgB,EAAE,UAAC,OAAe,EAAE,GAAW;gBAC3C,IAAI,MAAM,KAAK,aAAa,EAAE;oBAC1B,IAAA,+BAAmB,GAAE,CAAC;iBACzB;gBACD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;SACJ,CAAC;IACN,CAAC;IAED,6CAAmB,GAAnB;QACI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;IACL,sBAAC;AAAD,CAAC,AArED,CAAqC,0CAAkB,GAqEtD;AArEY,0CAAe"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/base-provider.d.ts b/node_modules/@ethersproject/providers/lib/base-provider.d.ts new file mode 100644 index 0000000..adbda4c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/base-provider.d.ts @@ -0,0 +1,147 @@ +/// +import { Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { Network, Networkish } from "@ethersproject/networks"; +import { Deferrable } from "@ethersproject/properties"; +import { Transaction } from "@ethersproject/transactions"; +import { Formatter } from "./formatter"; +export declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +export interface EnsResolver { + readonly name: string; + readonly address: string; + getAddress(coinType?: 60): Promise; + getContentHash(): Promise; + getText(key: string): Promise; +} +export interface EnsProvider { + resolveName(name: string): Promise; + lookupAddress(address: string): Promise; + getResolver(name: string): Promise; +} +export interface Avatar { + url: string; + linkage: Array<{ + type: string; + content: string; + }>; +} +export declare class Resolver implements EnsResolver { + readonly provider: BaseProvider; + readonly name: string; + readonly address: string; + readonly _resolvedAddress: null | string; + constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string); + _fetchBytes(selector: string, parameters?: string): Promise; + _getAddress(coinType: number, hexBytes: string): string; + getAddress(coinType?: number): Promise; + getAvatar(): Promise; + getContentHash(): Promise; + getText(key: string): Promise; +} +export declare class BaseProvider extends Provider implements EnsProvider { + _networkPromise: Promise; + _network: Network; + _events: Array; + formatter: Formatter; + _emitted: { + [eventName: string]: number | "pending"; + }; + _pollingInterval: number; + _poller: NodeJS.Timer; + _bootstrapPoll: NodeJS.Timer; + _lastBlockNumber: number; + _fastBlockNumber: number; + _fastBlockNumberPromise: Promise; + _fastQueryDate: number; + _maxInternalBlockNumber: number; + _internalBlockNumber: Promise<{ + blockNumber: number; + reqTime: number; + respTime: number; + }>; + readonly anyNetwork: boolean; + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + constructor(network: Networkish | Promise); + _ready(): Promise; + get ready(): Promise; + static getFormatter(): Formatter; + static getNetwork(network: Networkish): Network; + _getInternalBlockNumber(maxAge: number): Promise; + poll(): Promise; + resetEventsBlock(blockNumber: number): void; + get network(): Network; + detectNetwork(): Promise; + getNetwork(): Promise; + get blockNumber(): number; + get polling(): boolean; + set polling(value: boolean); + get pollingInterval(): number; + set pollingInterval(value: number); + _getFastBlockNumber(): Promise; + _setFastBlockNumber(blockNumber: number): void; + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { + data: string; + from: string; + nonce: number; + to: string; + value: BigNumber; + startBlock: number; + }): Promise; + getBlockNumber(): Promise; + getGasPrice(): Promise; + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse; + sendTransaction(signedTransaction: string | Promise): Promise; + _getTransactionRequest(transaction: Deferrable): Promise; + _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise; + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + estimateGas(transaction: Deferrable): Promise; + _getAddress(addressOrName: string | Promise): Promise; + _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise; + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + getTransaction(transactionHash: string | Promise): Promise; + getTransactionReceipt(transactionHash: string | Promise): Promise; + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + getEtherPrice(): Promise; + _getBlockTag(blockTag: BlockTag | Promise): Promise; + getResolver(name: string): Promise; + _getResolver(name: string): Promise; + resolveName(name: string | Promise): Promise; + lookupAddress(address: string | Promise): Promise; + getAvatar(nameOrAddress: string): Promise; + perform(method: string, params: any): Promise; + _startEvent(event: Event): void; + _stopEvent(event: Event): void; + _addEventListener(eventName: EventType, listener: Listener, once: boolean): this; + on(eventName: EventType, listener: Listener): this; + once(eventName: EventType, listener: Listener): this; + emit(eventName: EventType, ...args: Array): boolean; + listenerCount(eventName?: EventType): number; + listeners(eventName?: EventType): Array; + off(eventName: EventType, listener?: Listener): this; + removeAllListeners(eventName?: EventType): this; +} +//# sourceMappingURL=base-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/base-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/base-provider.d.ts.map new file mode 100644 index 0000000..9f0f6c7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/base-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base-provider.d.ts","sourceRoot":"","sources":["../src.ts/base-provider.ts"],"names":[],"mappings":";AAEA,OAAO,EACH,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAC5E,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EACvF,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAInE,OAAO,EAAc,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAgD,MAAM,2BAA2B,CAAC;AACrG,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAW1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA+GxC,qBAAa,KAAK;IACd,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAET,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO;IAM1D,IAAI,KAAK,IAAI,SAAS,CAQrB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,IAAI,MAAM,CAIjB;IAED,IAAI,MAAM,IAAI,MAAM,CAYnB;IAED,QAAQ,IAAI,OAAO;CAGtB;AAED,MAAM,WAAW,WAAW;IAGxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAIzB,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,G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.js new file mode 100644 index 0000000..7928025 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/base-provider.js @@ -0,0 +1,2239 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BaseProvider = exports.Resolver = exports.Event = void 0; +var abstract_provider_1 = require("@ethersproject/abstract-provider"); +var basex_1 = require("@ethersproject/basex"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var constants_1 = require("@ethersproject/constants"); +var hash_1 = require("@ethersproject/hash"); +var networks_1 = require("@ethersproject/networks"); +var properties_1 = require("@ethersproject/properties"); +var sha2_1 = require("@ethersproject/sha2"); +var strings_1 = require("@ethersproject/strings"); +var web_1 = require("@ethersproject/web"); +var bech32_1 = __importDefault(require("bech32")); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var formatter_1 = require("./formatter"); +////////////////////////////// +// Event Serializeing +function checkTopic(topic) { + if (topic == null) { + return "null"; + } + if ((0, bytes_1.hexDataLength)(topic) !== 32) { + logger.throwArgumentError("invalid topic", "topic", topic); + } + return topic.toLowerCase(); +} +function serializeTopics(topics) { + // Remove trailing null AND-topics; they are redundant + topics = topics.slice(); + while (topics.length > 0 && topics[topics.length - 1] == null) { + topics.pop(); + } + return topics.map(function (topic) { + if (Array.isArray(topic)) { + // Only track unique OR-topics + var unique_1 = {}; + topic.forEach(function (topic) { + unique_1[checkTopic(topic)] = true; + }); + // The order of OR-topics does not matter + var sorted = Object.keys(unique_1); + sorted.sort(); + return sorted.join("|"); + } + else { + return checkTopic(topic); + } + }).join("&"); +} +function deserializeTopics(data) { + if (data === "") { + return []; + } + return data.split(/&/g).map(function (topic) { + if (topic === "") { + return []; + } + var comps = topic.split("|").map(function (topic) { + return ((topic === "null") ? null : topic); + }); + return ((comps.length === 1) ? comps[0] : comps); + }); +} +function getEventTag(eventName) { + if (typeof (eventName) === "string") { + eventName = eventName.toLowerCase(); + if ((0, bytes_1.hexDataLength)(eventName) === 32) { + return "tx:" + eventName; + } + if (eventName.indexOf(":") === -1) { + return eventName; + } + } + else if (Array.isArray(eventName)) { + return "filter:*:" + serializeTopics(eventName); + } + else if (abstract_provider_1.ForkEvent.isForkEvent(eventName)) { + logger.warn("not implemented"); + throw new Error("not implemented"); + } + else if (eventName && typeof (eventName) === "object") { + return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []); + } + throw new Error("invalid event - " + eventName); +} +////////////////////////////// +// Helper Object +function getTime() { + return (new Date()).getTime(); +} +function stall(duration) { + return new Promise(function (resolve) { + setTimeout(resolve, duration); + }); +} +////////////////////////////// +// Provider Object +/** + * EventType + * - "block" + * - "poll" + * - "didPoll" + * - "pending" + * - "error" + * - "network" + * - filter + * - topics array + * - transaction hash + */ +var PollableEvents = ["block", "network", "pending", "poll"]; +var Event = /** @class */ (function () { + function Event(tag, listener, once) { + (0, properties_1.defineReadOnly)(this, "tag", tag); + (0, properties_1.defineReadOnly)(this, "listener", listener); + (0, properties_1.defineReadOnly)(this, "once", once); + } + Object.defineProperty(Event.prototype, "event", { + get: function () { + switch (this.type) { + case "tx": + return this.hash; + case "filter": + return this.filter; + } + return this.tag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Event.prototype, "type", { + get: function () { + return this.tag.split(":")[0]; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Event.prototype, "hash", { + get: function () { + var comps = this.tag.split(":"); + if (comps[0] !== "tx") { + return null; + } + return comps[1]; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Event.prototype, "filter", { + get: function () { + var comps = this.tag.split(":"); + if (comps[0] !== "filter") { + return null; + } + var address = comps[1]; + var topics = deserializeTopics(comps[2]); + var filter = {}; + if (topics.length > 0) { + filter.topics = topics; + } + if (address && address !== "*") { + filter.address = address; + } + return filter; + }, + enumerable: false, + configurable: true + }); + Event.prototype.pollable = function () { + return (this.tag.indexOf(":") >= 0 || PollableEvents.indexOf(this.tag) >= 0); + }; + return Event; +}()); +exports.Event = Event; +; +// https://github.com/satoshilabs/slips/blob/master/slip-0044.md +var coinInfos = { + "0": { symbol: "btc", p2pkh: 0x00, p2sh: 0x05, prefix: "bc" }, + "2": { symbol: "ltc", p2pkh: 0x30, p2sh: 0x32, prefix: "ltc" }, + "3": { symbol: "doge", p2pkh: 0x1e, p2sh: 0x16 }, + "60": { symbol: "eth", ilk: "eth" }, + "61": { symbol: "etc", ilk: "eth" }, + "700": { symbol: "xdai", ilk: "eth" }, +}; +function bytes32ify(value) { + return (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(value).toHexString(), 32); +} +// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d) +function base58Encode(data) { + return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)])); +} +var matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + new RegExp("^(ipfs):/\/(.*)$", "i"), + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; +function _parseString(result) { + try { + return (0, strings_1.toUtf8String)(_parseBytes(result)); + } + catch (error) { } + return null; +} +function _parseBytes(result) { + if (result === "0x") { + return null; + } + var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, 0, 32)).toNumber(); + var length = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber(); + return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length); +} +var Resolver = /** @class */ (function () { + // The resolvedAddress is only for creating a ReverseLookup resolver + function Resolver(provider, address, name, resolvedAddress) { + (0, properties_1.defineReadOnly)(this, "provider", provider); + (0, properties_1.defineReadOnly)(this, "name", name); + (0, properties_1.defineReadOnly)(this, "address", provider.formatter.address(address)); + (0, properties_1.defineReadOnly)(this, "_resolvedAddress", resolvedAddress); + } + Resolver.prototype._fetchBytes = function (selector, parameters) { + return __awaiter(this, void 0, void 0, function () { + var tx, _a, error_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + tx = { + to: this.address, + data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), (parameters || "0x")]) + }; + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + _a = _parseBytes; + return [4 /*yield*/, this.provider.call(tx)]; + case 2: return [2 /*return*/, _a.apply(void 0, [_b.sent()])]; + case 3: + error_1 = _b.sent(); + if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + return [2 /*return*/, null]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + Resolver.prototype._getAddress = function (coinType, hexBytes) { + var coinInfo = coinInfos[String(coinType)]; + if (coinInfo == null) { + logger.throwError("unsupported coin type: " + coinType, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress(" + coinType + ")" + }); + } + if (coinInfo.ilk === "eth") { + return this.provider.formatter.address(hexBytes); + } + var bytes = (0, bytes_1.arrayify)(hexBytes); + // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + if (coinInfo.p2pkh != null) { + var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/); + if (p2pkh) { + var length_1 = parseInt(p2pkh[1], 16); + if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) { + return base58Encode((0, bytes_1.concat)([[coinInfo.p2pkh], ("0x" + p2pkh[2])])); + } + } + } + // P2SH: OP_HASH160 OP_EQUAL + if (coinInfo.p2sh != null) { + var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/); + if (p2sh) { + var length_2 = parseInt(p2sh[1], 16); + if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) { + return base58Encode((0, bytes_1.concat)([[coinInfo.p2sh], ("0x" + p2sh[2])])); + } + } + } + // Bech32 + if (coinInfo.prefix != null) { + var length_3 = bytes[1]; + // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program + var version_1 = bytes[0]; + if (version_1 === 0x00) { + if (length_3 !== 20 && length_3 !== 32) { + version_1 = -1; + } + } + else { + version_1 = -1; + } + if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) { + var words = bech32_1.default.toWords(bytes.slice(2)); + words.unshift(version_1); + return bech32_1.default.encode(coinInfo.prefix, words); + } + } + return null; + }; + Resolver.prototype.getAddress = function (coinType) { + return __awaiter(this, void 0, void 0, function () { + var transaction, hexBytes_1, error_2, hexBytes, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (coinType == null) { + coinType = 60; + } + if (!(coinType === 60)) return [3 /*break*/, 4]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + transaction = { + to: this.address, + data: ("0x3b3b57de" + (0, hash_1.namehash)(this.name).substring(2)) + }; + return [4 /*yield*/, this.provider.call(transaction)]; + case 2: + hexBytes_1 = _a.sent(); + // No address + if (hexBytes_1 === "0x" || hexBytes_1 === constants_1.HashZero) { + return [2 /*return*/, null]; + } + return [2 /*return*/, this.provider.formatter.callAddress(hexBytes_1)]; + case 3: + error_2 = _a.sent(); + if (error_2.code === logger_1.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + throw error_2; + case 4: return [4 /*yield*/, this._fetchBytes("0xf1cb7e06", bytes32ify(coinType))]; + case 5: + hexBytes = _a.sent(); + // No address + if (hexBytes == null || hexBytes === "0x") { + return [2 /*return*/, null]; + } + address = this._getAddress(coinType, hexBytes); + if (address == null) { + logger.throwError("invalid or unsupported coin data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress(" + coinType + ")", + coinType: coinType, + data: hexBytes + }); + } + return [2 /*return*/, address]; + } + }); + }); + }; + Resolver.prototype.getAvatar = function () { + return __awaiter(this, void 0, void 0, function () { + var linkage, avatar, i, match, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, error_3; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + linkage = []; + _h.label = 1; + case 1: + _h.trys.push([1, 19, , 20]); + return [4 /*yield*/, this.getText("avatar")]; + case 2: + avatar = _h.sent(); + if (avatar == null) { + return [2 /*return*/, null]; + } + i = 0; + _h.label = 3; + case 3: + if (!(i < matchers.length)) return [3 /*break*/, 18]; + match = avatar.match(matchers[i]); + if (match == null) { + return [3 /*break*/, 17]; + } + _a = match[1]; + switch (_a) { + case "https": return [3 /*break*/, 4]; + case "data": return [3 /*break*/, 5]; + case "ipfs": return [3 /*break*/, 6]; + case "erc721": return [3 /*break*/, 7]; + case "erc1155": return [3 /*break*/, 7]; + } + return [3 /*break*/, 17]; + case 4: + linkage.push({ type: "url", content: avatar }); + return [2 /*return*/, { linkage: linkage, url: avatar }]; + case 5: + linkage.push({ type: "data", content: avatar }); + return [2 /*return*/, { linkage: linkage, url: avatar }]; + case 6: + linkage.push({ type: "ipfs", content: avatar }); + return [2 /*return*/, { linkage: linkage, url: "https://gateway.ipfs.io/ipfs/" + avatar.substring(7) }]; + case 7: + selector = (match[1] === "erc721") ? "0xc87b56dd" : "0x0e89341c"; + linkage.push({ type: match[1], content: avatar }); + _b = this._resolvedAddress; + if (_b) return [3 /*break*/, 9]; + return [4 /*yield*/, this.getAddress()]; + case 8: + _b = (_h.sent()); + _h.label = 9; + case 9: + owner = (_b); + comps = (match[2] || "").split("/"); + if (comps.length !== 2) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this.provider.formatter.address(comps[0])]; + case 10: + addr = _h.sent(); + tokenId = (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(comps[1]).toHexString(), 32); + if (!(match[1] === "erc721")) return [3 /*break*/, 12]; + _d = (_c = this.provider.formatter).callAddress; + return [4 /*yield*/, this.provider.call({ + to: addr, data: (0, bytes_1.hexConcat)(["0x6352211e", tokenId]) + })]; + case 11: + tokenOwner = _d.apply(_c, [_h.sent()]); + if (owner !== tokenOwner) { + return [2 /*return*/, null]; + } + linkage.push({ type: "owner", content: tokenOwner }); + return [3 /*break*/, 14]; + case 12: + if (!(match[1] === "erc1155")) return [3 /*break*/, 14]; + _f = (_e = bignumber_1.BigNumber).from; + return [4 /*yield*/, this.provider.call({ + to: addr, data: (0, bytes_1.hexConcat)(["0x00fdd58e", (0, bytes_1.hexZeroPad)(owner, 32), tokenId]) + })]; + case 13: + balance = _f.apply(_e, [_h.sent()]); + if (balance.isZero()) { + return [2 /*return*/, null]; + } + linkage.push({ type: "balance", content: balance.toString() }); + _h.label = 14; + case 14: + tx = { + to: this.provider.formatter.address(comps[0]), + data: (0, bytes_1.hexConcat)([selector, tokenId]) + }; + _g = _parseString; + return [4 /*yield*/, this.provider.call(tx)]; + case 15: + metadataUrl = _g.apply(void 0, [_h.sent()]); + if (metadataUrl == null) { + return [2 /*return*/, null]; + } + linkage.push({ type: "metadata-url", content: metadataUrl }); + // ERC-1155 allows a generic {id} in the URL + if (match[1] === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + } + return [4 /*yield*/, (0, web_1.fetchJson)(metadataUrl)]; + case 16: + metadata = _h.sent(); + // Pull the image URL out + if (!metadata || typeof (metadata.image) !== "string" || !metadata.image.match(/^(https:\/\/|data:)/i)) { + return [2 /*return*/, null]; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + linkage.push({ type: "url", content: metadata.image }); + return [2 /*return*/, { linkage: linkage, url: metadata.image }]; + case 17: + i++; + return [3 /*break*/, 3]; + case 18: return [3 /*break*/, 20]; + case 19: + error_3 = _h.sent(); + return [3 /*break*/, 20]; + case 20: return [2 /*return*/, null]; + } + }); + }); + }; + Resolver.prototype.getContentHash = function () { + return __awaiter(this, void 0, void 0, function () { + var hexBytes, ipfs, length_4, swarm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._fetchBytes("0xbc1c58d1")]; + case 1: + hexBytes = _a.sent(); + // No contenthash + if (hexBytes == null || hexBytes === "0x") { + return [2 /*return*/, null]; + } + ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipfs) { + length_4 = parseInt(ipfs[3], 16); + if (ipfs[4].length === length_4 * 2) { + return [2 /*return*/, "ipfs:/\/" + basex_1.Base58.encode("0x" + ipfs[1])]; + } + } + swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/); + if (swarm) { + if (swarm[1].length === (32 * 2)) { + return [2 /*return*/, "bzz:/\/" + swarm[1]]; + } + } + return [2 /*return*/, logger.throwError("invalid or unsupported content hash data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getContentHash()", + data: hexBytes + })]; + } + }); + }); + }; + Resolver.prototype.getText = function (key) { + return __awaiter(this, void 0, void 0, function () { + var keyBytes, hexBytes; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + keyBytes = (0, strings_1.toUtf8Bytes)(key); + // The nodehash consumes the first slot, so the string pointer targets + // offset 64, with the length at offset 64 and data starting at offset 96 + keyBytes = (0, bytes_1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]); + // Pad to word-size (32 bytes) + if ((keyBytes.length % 32) !== 0) { + keyBytes = (0, bytes_1.concat)([keyBytes, (0, bytes_1.hexZeroPad)("0x", 32 - (key.length % 32))]); + } + return [4 /*yield*/, this._fetchBytes("0x59d1d43c", (0, bytes_1.hexlify)(keyBytes))]; + case 1: + hexBytes = _a.sent(); + if (hexBytes == null || hexBytes === "0x") { + return [2 /*return*/, null]; + } + return [2 /*return*/, (0, strings_1.toUtf8String)(hexBytes)]; + } + }); + }); + }; + return Resolver; +}()); +exports.Resolver = Resolver; +var defaultFormatter = null; +var nextPollId = 1; +var BaseProvider = /** @class */ (function (_super) { + __extends(BaseProvider, _super); + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + function BaseProvider(network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, abstract_provider_1.Provider); + _this = _super.call(this) || this; + // Events being listened to + _this._events = []; + _this._emitted = { block: -2 }; + _this.formatter = _newTarget.getFormatter(); + // If network is any, this Provider allows the underlying + // network to change dynamically, and we auto-detect the + // current network + (0, properties_1.defineReadOnly)(_this, "anyNetwork", (network === "any")); + if (_this.anyNetwork) { + network = _this.detectNetwork(); + } + if (network instanceof Promise) { + _this._networkPromise = network; + // Squash any "unhandled promise" errors; that do not need to be handled + network.catch(function (error) { }); + // Trigger initial network setting (async) + _this._ready().catch(function (error) { }); + } + else { + var knownNetwork = (0, properties_1.getStatic)(_newTarget, "getNetwork")(network); + if (knownNetwork) { + (0, properties_1.defineReadOnly)(_this, "_network", knownNetwork); + _this.emit("network", knownNetwork, null); + } + else { + logger.throwArgumentError("invalid network", "network", network); + } + } + _this._maxInternalBlockNumber = -1024; + _this._lastBlockNumber = -2; + _this._pollingInterval = 4000; + _this._fastQueryDate = 0; + return _this; + } + BaseProvider.prototype._ready = function () { + return __awaiter(this, void 0, void 0, function () { + var network, error_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(this._network == null)) return [3 /*break*/, 7]; + network = null; + if (!this._networkPromise) return [3 /*break*/, 4]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this._networkPromise]; + case 2: + network = _a.sent(); + return [3 /*break*/, 4]; + case 3: + error_4 = _a.sent(); + return [3 /*break*/, 4]; + case 4: + if (!(network == null)) return [3 /*break*/, 6]; + return [4 /*yield*/, this.detectNetwork()]; + case 5: + network = _a.sent(); + _a.label = 6; + case 6: + // This should never happen; every Provider sub-class should have + // suggested a network by here (or have thrown). + if (!network) { + logger.throwError("no network detected", logger_1.Logger.errors.UNKNOWN_ERROR, {}); + } + // Possible this call stacked so do not call defineReadOnly again + if (this._network == null) { + if (this.anyNetwork) { + this._network = network; + } + else { + (0, properties_1.defineReadOnly)(this, "_network", network); + } + this.emit("network", network, null); + } + _a.label = 7; + case 7: return [2 /*return*/, this._network]; + } + }); + }); + }; + Object.defineProperty(BaseProvider.prototype, "ready", { + // This will always return the most recently established network. + // For "any", this can change (a "network" event is emitted before + // any change is reflected); otherwise this cannot change + get: function () { + var _this = this; + return (0, web_1.poll)(function () { + return _this._ready().then(function (network) { + return network; + }, function (error) { + // If the network isn't running yet, we will wait + if (error.code === logger_1.Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { + return undefined; + } + throw error; + }); + }); + }, + enumerable: false, + configurable: true + }); + // @TODO: Remove this and just create a singleton formatter + BaseProvider.getFormatter = function () { + if (defaultFormatter == null) { + defaultFormatter = new formatter_1.Formatter(); + } + return defaultFormatter; + }; + // @TODO: Remove this and just use getNetwork + BaseProvider.getNetwork = function (network) { + return (0, networks_1.getNetwork)((network == null) ? "homestead" : network); + }; + // Fetches the blockNumber, but will reuse any result that is less + // than maxAge old or has been requested since the last request + BaseProvider.prototype._getInternalBlockNumber = function (maxAge) { + return __awaiter(this, void 0, void 0, function () { + var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._ready()]; + case 1: + _a.sent(); + if (!(maxAge > 0)) return [3 /*break*/, 7]; + _a.label = 2; + case 2: + if (!this._internalBlockNumber) return [3 /*break*/, 7]; + internalBlockNumber = this._internalBlockNumber; + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, internalBlockNumber]; + case 4: + result = _a.sent(); + if ((getTime() - result.respTime) <= maxAge) { + return [2 /*return*/, result.blockNumber]; + } + // Too old; fetch a new value + return [3 /*break*/, 7]; + case 5: + error_5 = _a.sent(); + // The fetch rejected; if we are the first to get the + // rejection, drop through so we replace it with a new + // fetch; all others blocked will then get that fetch + // which won't match the one they "remembered" and loop + if (this._internalBlockNumber === internalBlockNumber) { + return [3 /*break*/, 7]; + } + return [3 /*break*/, 6]; + case 6: return [3 /*break*/, 2]; + case 7: + reqTime = getTime(); + checkInternalBlockNumber = (0, properties_1.resolveProperties)({ + blockNumber: this.perform("getBlockNumber", {}), + networkError: this.getNetwork().then(function (network) { return (null); }, function (error) { return (error); }) + }).then(function (_a) { + var blockNumber = _a.blockNumber, networkError = _a.networkError; + if (networkError) { + // Unremember this bad internal block number + if (_this._internalBlockNumber === checkInternalBlockNumber) { + _this._internalBlockNumber = null; + } + throw networkError; + } + var respTime = getTime(); + blockNumber = bignumber_1.BigNumber.from(blockNumber).toNumber(); + if (blockNumber < _this._maxInternalBlockNumber) { + blockNumber = _this._maxInternalBlockNumber; + } + _this._maxInternalBlockNumber = blockNumber; + _this._setFastBlockNumber(blockNumber); // @TODO: Still need this? + return { blockNumber: blockNumber, reqTime: reqTime, respTime: respTime }; + }); + this._internalBlockNumber = checkInternalBlockNumber; + // Swallow unhandled exceptions; if needed they are handled else where + checkInternalBlockNumber.catch(function (error) { + // Don't null the dead (rejected) fetch, if it has already been updated + if (_this._internalBlockNumber === checkInternalBlockNumber) { + _this._internalBlockNumber = null; + } + }); + return [4 /*yield*/, checkInternalBlockNumber]; + case 8: return [2 /*return*/, (_a.sent()).blockNumber]; + } + }); + }); + }; + BaseProvider.prototype.poll = function () { + return __awaiter(this, void 0, void 0, function () { + var pollId, runners, blockNumber, error_6, i; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + pollId = nextPollId++; + runners = []; + blockNumber = null; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this._getInternalBlockNumber(100 + this.pollingInterval / 2)]; + case 2: + blockNumber = _a.sent(); + return [3 /*break*/, 4]; + case 3: + error_6 = _a.sent(); + this.emit("error", error_6); + return [2 /*return*/]; + case 4: + this._setFastBlockNumber(blockNumber); + // Emit a poll event after we have the latest (fast) block number + this.emit("poll", pollId, blockNumber); + // If the block has not changed, meh. + if (blockNumber === this._lastBlockNumber) { + this.emit("didPoll", pollId); + return [2 /*return*/]; + } + // First polling cycle, trigger a "block" events + if (this._emitted.block === -2) { + this._emitted.block = blockNumber - 1; + } + if (Math.abs((this._emitted.block) - blockNumber) > 1000) { + logger.warn("network block skew detected; skipping block events (emitted=" + this._emitted.block + " blockNumber" + blockNumber + ")"); + this.emit("error", logger.makeError("network block skew detected", logger_1.Logger.errors.NETWORK_ERROR, { + blockNumber: blockNumber, + event: "blockSkew", + previousBlockNumber: this._emitted.block + })); + this.emit("block", blockNumber); + } + else { + // Notify all listener for each block that has passed + for (i = this._emitted.block + 1; i <= blockNumber; i++) { + this.emit("block", i); + } + } + // The emitted block was updated, check for obsolete events + if (this._emitted.block !== blockNumber) { + this._emitted.block = blockNumber; + Object.keys(this._emitted).forEach(function (key) { + // The block event does not expire + if (key === "block") { + return; + } + // The block we were at when we emitted this event + var eventBlockNumber = _this._emitted[key]; + // We cannot garbage collect pending transactions or blocks here + // They should be garbage collected by the Provider when setting + // "pending" events + if (eventBlockNumber === "pending") { + return; + } + // Evict any transaction hashes or block hashes over 12 blocks + // old, since they should not return null anyways + if (blockNumber - eventBlockNumber > 12) { + delete _this._emitted[key]; + } + }); + } + // First polling cycle + if (this._lastBlockNumber === -2) { + this._lastBlockNumber = blockNumber - 1; + } + // Find all transaction hashes we are waiting on + this._events.forEach(function (event) { + switch (event.type) { + case "tx": { + var hash_2 = event.hash; + var runner = _this.getTransactionReceipt(hash_2).then(function (receipt) { + if (!receipt || receipt.blockNumber == null) { + return null; + } + _this._emitted["t:" + hash_2] = receipt.blockNumber; + _this.emit(hash_2, receipt); + return null; + }).catch(function (error) { _this.emit("error", error); }); + runners.push(runner); + break; + } + case "filter": { + var filter_1 = event.filter; + filter_1.fromBlock = _this._lastBlockNumber + 1; + filter_1.toBlock = blockNumber; + var runner = _this.getLogs(filter_1).then(function (logs) { + if (logs.length === 0) { + return; + } + logs.forEach(function (log) { + _this._emitted["b:" + log.blockHash] = log.blockNumber; + _this._emitted["t:" + log.transactionHash] = log.blockNumber; + _this.emit(filter_1, log); + }); + }).catch(function (error) { _this.emit("error", error); }); + runners.push(runner); + break; + } + } + }); + this._lastBlockNumber = blockNumber; + // Once all events for this loop have been processed, emit "didPoll" + Promise.all(runners).then(function () { + _this.emit("didPoll", pollId); + }).catch(function (error) { _this.emit("error", error); }); + return [2 /*return*/]; + } + }); + }); + }; + // Deprecated; do not use this + BaseProvider.prototype.resetEventsBlock = function (blockNumber) { + this._lastBlockNumber = blockNumber - 1; + if (this.polling) { + this.poll(); + } + }; + Object.defineProperty(BaseProvider.prototype, "network", { + get: function () { + return this._network; + }, + enumerable: false, + configurable: true + }); + // This method should query the network if the underlying network + // can change, such as when connected to a JSON-RPC backend + BaseProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, logger.throwError("provider does not support network detection", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "provider.detectNetwork" + })]; + }); + }); + }; + BaseProvider.prototype.getNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var network, currentNetwork, error; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._ready()]; + case 1: + network = _a.sent(); + return [4 /*yield*/, this.detectNetwork()]; + case 2: + currentNetwork = _a.sent(); + if (!(network.chainId !== currentNetwork.chainId)) return [3 /*break*/, 5]; + if (!this.anyNetwork) return [3 /*break*/, 4]; + this._network = currentNetwork; + // Reset all internal block number guards and caches + this._lastBlockNumber = -2; + this._fastBlockNumber = null; + this._fastBlockNumberPromise = null; + this._fastQueryDate = 0; + this._emitted.block = -2; + this._maxInternalBlockNumber = -1024; + this._internalBlockNumber = null; + // The "network" event MUST happen before this method resolves + // so any events have a chance to unregister, so we stall an + // additional event loop before returning from /this/ call + this.emit("network", currentNetwork, network); + return [4 /*yield*/, stall(0)]; + case 3: + _a.sent(); + return [2 /*return*/, this._network]; + case 4: + error = logger.makeError("underlying network changed", logger_1.Logger.errors.NETWORK_ERROR, { + event: "changed", + network: network, + detectedNetwork: currentNetwork + }); + this.emit("error", error); + throw error; + case 5: return [2 /*return*/, network]; + } + }); + }); + }; + Object.defineProperty(BaseProvider.prototype, "blockNumber", { + get: function () { + var _this = this; + this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function (blockNumber) { + _this._setFastBlockNumber(blockNumber); + }, function (error) { }); + return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BaseProvider.prototype, "polling", { + get: function () { + return (this._poller != null); + }, + set: function (value) { + var _this = this; + if (value && !this._poller) { + this._poller = setInterval(function () { _this.poll(); }, this.pollingInterval); + if (!this._bootstrapPoll) { + this._bootstrapPoll = setTimeout(function () { + _this.poll(); + // We block additional polls until the polling interval + // is done, to prevent overwhelming the poll function + _this._bootstrapPoll = setTimeout(function () { + // If polling was disabled, something may require a poke + // since starting the bootstrap poll and it was disabled + if (!_this._poller) { + _this.poll(); + } + // Clear out the bootstrap so we can do another + _this._bootstrapPoll = null; + }, _this.pollingInterval); + }, 0); + } + } + else if (!value && this._poller) { + clearInterval(this._poller); + this._poller = null; + } + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BaseProvider.prototype, "pollingInterval", { + get: function () { + return this._pollingInterval; + }, + set: function (value) { + var _this = this; + if (typeof (value) !== "number" || value <= 0 || parseInt(String(value)) != value) { + throw new Error("invalid polling interval"); + } + this._pollingInterval = value; + if (this._poller) { + clearInterval(this._poller); + this._poller = setInterval(function () { _this.poll(); }, this._pollingInterval); + } + }, + enumerable: false, + configurable: true + }); + BaseProvider.prototype._getFastBlockNumber = function () { + var _this = this; + var now = getTime(); + // Stale block number, request a newer value + if ((now - this._fastQueryDate) > 2 * this._pollingInterval) { + this._fastQueryDate = now; + this._fastBlockNumberPromise = this.getBlockNumber().then(function (blockNumber) { + if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) { + _this._fastBlockNumber = blockNumber; + } + return _this._fastBlockNumber; + }); + } + return this._fastBlockNumberPromise; + }; + BaseProvider.prototype._setFastBlockNumber = function (blockNumber) { + // Older block, maybe a stale request + if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { + return; + } + // Update the time we updated the blocknumber + this._fastQueryDate = getTime(); + // Newer block number, use it + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + this._fastBlockNumberPromise = Promise.resolve(blockNumber); + } + }; + BaseProvider.prototype.waitForTransaction = function (transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this._waitForTransaction(transactionHash, (confirmations == null) ? 1 : confirmations, timeout || 0, null)]; + }); + }); + }; + BaseProvider.prototype._waitForTransaction = function (transactionHash, confirmations, timeout, replaceable) { + return __awaiter(this, void 0, void 0, function () { + var receipt; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getTransactionReceipt(transactionHash)]; + case 1: + receipt = _a.sent(); + // Receipt is already good + if ((receipt ? receipt.confirmations : 0) >= confirmations) { + return [2 /*return*/, receipt]; + } + // Poll until the receipt is good... + return [2 /*return*/, new Promise(function (resolve, reject) { + var cancelFuncs = []; + var done = false; + var alreadyDone = function () { + if (done) { + return true; + } + done = true; + cancelFuncs.forEach(function (func) { func(); }); + return false; + }; + var minedHandler = function (receipt) { + if (receipt.confirmations < confirmations) { + return; + } + if (alreadyDone()) { + return; + } + resolve(receipt); + }; + _this.on(transactionHash, minedHandler); + cancelFuncs.push(function () { _this.removeListener(transactionHash, minedHandler); }); + if (replaceable) { + var lastBlockNumber_1 = replaceable.startBlock; + var scannedBlock_1 = null; + var replaceHandler_1 = function (blockNumber) { return __awaiter(_this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (done) { + return [2 /*return*/]; + } + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + return [4 /*yield*/, stall(1000)]; + case 1: + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + _a.sent(); + this.getTransactionCount(replaceable.from).then(function (nonce) { return __awaiter(_this, void 0, void 0, function () { + var mined, block, ti, tx, receipt_1, reason; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (done) { + return [2 /*return*/]; + } + if (!(nonce <= replaceable.nonce)) return [3 /*break*/, 1]; + lastBlockNumber_1 = blockNumber; + return [3 /*break*/, 9]; + case 1: return [4 /*yield*/, this.getTransaction(transactionHash)]; + case 2: + mined = _a.sent(); + if (mined && mined.blockNumber != null) { + return [2 /*return*/]; + } + // First time scanning. We start a little earlier for some + // wiggle room here to handle the eventually consistent nature + // of blockchain (e.g. the getTransactionCount was for a + // different block) + if (scannedBlock_1 == null) { + scannedBlock_1 = lastBlockNumber_1 - 3; + if (scannedBlock_1 < replaceable.startBlock) { + scannedBlock_1 = replaceable.startBlock; + } + } + _a.label = 3; + case 3: + if (!(scannedBlock_1 <= blockNumber)) return [3 /*break*/, 9]; + if (done) { + return [2 /*return*/]; + } + return [4 /*yield*/, this.getBlockWithTransactions(scannedBlock_1)]; + case 4: + block = _a.sent(); + ti = 0; + _a.label = 5; + case 5: + if (!(ti < block.transactions.length)) return [3 /*break*/, 8]; + tx = block.transactions[ti]; + // Successfully mined! + if (tx.hash === transactionHash) { + return [2 /*return*/]; + } + if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce)) return [3 /*break*/, 7]; + if (done) { + return [2 /*return*/]; + } + return [4 /*yield*/, this.waitForTransaction(tx.hash, confirmations)]; + case 6: + receipt_1 = _a.sent(); + // Already resolved or rejected (prolly a timeout) + if (alreadyDone()) { + return [2 /*return*/]; + } + reason = "replaced"; + if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) { + reason = "repriced"; + } + else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) { + reason = "cancelled"; + } + // Explain why we were replaced + reject(logger.makeError("transaction was replaced", logger_1.Logger.errors.TRANSACTION_REPLACED, { + cancelled: (reason === "replaced" || reason === "cancelled"), + reason: reason, + replacement: this._wrapTransaction(tx), + hash: transactionHash, + receipt: receipt_1 + })); + return [2 /*return*/]; + case 7: + ti++; + return [3 /*break*/, 5]; + case 8: + scannedBlock_1++; + return [3 /*break*/, 3]; + case 9: + if (done) { + return [2 /*return*/]; + } + this.once("block", replaceHandler_1); + return [2 /*return*/]; + } + }); + }); }, function (error) { + if (done) { + return; + } + _this.once("block", replaceHandler_1); + }); + return [2 /*return*/]; + } + }); + }); }; + if (done) { + return; + } + _this.once("block", replaceHandler_1); + cancelFuncs.push(function () { + _this.removeListener("block", replaceHandler_1); + }); + } + if (typeof (timeout) === "number" && timeout > 0) { + var timer_1 = setTimeout(function () { + if (alreadyDone()) { + return; + } + reject(logger.makeError("timeout exceeded", logger_1.Logger.errors.TIMEOUT, { timeout: timeout })); + }, timeout); + if (timer_1.unref) { + timer_1.unref(); + } + cancelFuncs.push(function () { clearTimeout(timer_1); }); + } + })]; + } + }); + }); + }; + BaseProvider.prototype.getBlockNumber = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this._getInternalBlockNumber(0)]; + }); + }); + }; + BaseProvider.prototype.getGasPrice = function () { + return __awaiter(this, void 0, void 0, function () { + var result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, this.perform("getGasPrice", {})]; + case 2: + result = _a.sent(); + try { + return [2 /*return*/, bignumber_1.BigNumber.from(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "getGasPrice", + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getBalance = function (addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getBalance", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, bignumber_1.BigNumber.from(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "getBalance", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getTransactionCount = function (addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getTransactionCount", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, bignumber_1.BigNumber.from(result).toNumber()]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "getTransactionCount", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getCode = function (addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getCode", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, (0, bytes_1.hexlify)(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "getCode", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getStorageAt = function (addressOrName, position, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag), + position: Promise.resolve(position).then(function (p) { return (0, bytes_1.hexValue)(p); }) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getStorageAt", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, (0, bytes_1.hexlify)(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "getStorageAt", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + // This should be called by any subclass wrapping a TransactionResponse + BaseProvider.prototype._wrapTransaction = function (tx, hash, startBlock) { + var _this = this; + if (hash != null && (0, bytes_1.hexDataLength)(hash) !== 32) { + throw new Error("invalid response - sendTransaction"); + } + var result = tx; + // Check the hash we expect is the same as the hash the server reported + if (hash != null && tx.hash !== hash) { + logger.throwError("Transaction hash mismatch from Provider.sendTransaction.", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash }); + } + result.wait = function (confirms, timeout) { return __awaiter(_this, void 0, void 0, function () { + var replacement, receipt; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (confirms == null) { + confirms = 1; + } + if (timeout == null) { + timeout = 0; + } + replacement = undefined; + if (confirms !== 0 && startBlock != null) { + replacement = { + data: tx.data, + from: tx.from, + nonce: tx.nonce, + to: tx.to, + value: tx.value, + startBlock: startBlock + }; + } + return [4 /*yield*/, this._waitForTransaction(tx.hash, confirms, timeout, replacement)]; + case 1: + receipt = _a.sent(); + if (receipt == null && confirms === 0) { + return [2 /*return*/, null]; + } + // No longer pending, allow the polling loop to garbage collect this + this._emitted["t:" + tx.hash] = receipt.blockNumber; + if (receipt.status === 0) { + logger.throwError("transaction failed", logger_1.Logger.errors.CALL_EXCEPTION, { + transactionHash: tx.hash, + transaction: tx, + receipt: receipt + }); + } + return [2 /*return*/, receipt]; + } + }); + }); }; + return result; + }; + BaseProvider.prototype.sendTransaction = function (signedTransaction) { + return __awaiter(this, void 0, void 0, function () { + var hexTx, tx, blockNumber, hash, error_7; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, Promise.resolve(signedTransaction).then(function (t) { return (0, bytes_1.hexlify)(t); })]; + case 2: + hexTx = _a.sent(); + tx = this.formatter.transaction(signedTransaction); + if (tx.confirmations == null) { + tx.confirmations = 0; + } + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 3: + blockNumber = _a.sent(); + _a.label = 4; + case 4: + _a.trys.push([4, 6, , 7]); + return [4 /*yield*/, this.perform("sendTransaction", { signedTransaction: hexTx })]; + case 5: + hash = _a.sent(); + return [2 /*return*/, this._wrapTransaction(tx, hash, blockNumber)]; + case 6: + error_7 = _a.sent(); + error_7.transaction = tx; + error_7.transactionHash = tx.hash; + throw error_7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getTransactionRequest = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var values, tx, _a, _b; + var _this = this; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, transaction]; + case 1: + values = _c.sent(); + tx = {}; + ["from", "to"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return (v ? _this._getAddress(v) : null); }); + }); + ["gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "value"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return (v ? bignumber_1.BigNumber.from(v) : null); }); + }); + ["type"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return ((v != null) ? v : null); }); + }); + if (values.accessList) { + tx.accessList = this.formatter.accessList(values.accessList); + } + ["data"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return (v ? (0, bytes_1.hexlify)(v) : null); }); + }); + _b = (_a = this.formatter).transactionRequest; + return [4 /*yield*/, (0, properties_1.resolveProperties)(tx)]; + case 2: return [2 /*return*/, _b.apply(_a, [_c.sent()])]; + } + }); + }); + }; + BaseProvider.prototype._getFilter = function (filter) { + return __awaiter(this, void 0, void 0, function () { + var result, _a, _b; + var _this = this; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, filter]; + case 1: + filter = _c.sent(); + result = {}; + if (filter.address != null) { + result.address = this._getAddress(filter.address); + } + ["blockHash", "topics"].forEach(function (key) { + if (filter[key] == null) { + return; + } + result[key] = filter[key]; + }); + ["fromBlock", "toBlock"].forEach(function (key) { + if (filter[key] == null) { + return; + } + result[key] = _this._getBlockTag(filter[key]); + }); + _b = (_a = this.formatter).filter; + return [4 /*yield*/, (0, properties_1.resolveProperties)(result)]; + case 2: return [2 /*return*/, _b.apply(_a, [_c.sent()])]; + } + }); + }); + }; + BaseProvider.prototype.call = function (transaction, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("call", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, (0, bytes_1.hexlify)(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "call", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.estimateGas = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ + transaction: this._getTransactionRequest(transaction) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("estimateGas", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, bignumber_1.BigNumber.from(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, { + method: "estimateGas", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getAddress = function (addressOrName) { + return __awaiter(this, void 0, void 0, function () { + var address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, addressOrName]; + case 1: + addressOrName = _a.sent(); + if (typeof (addressOrName) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", addressOrName); + } + return [4 /*yield*/, this.resolveName(addressOrName)]; + case 2: + address = _a.sent(); + if (address == null) { + logger.throwError("ENS name not configured", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName(" + JSON.stringify(addressOrName) + ")" + }); + } + return [2 /*return*/, address]; + } + }); + }); + }; + BaseProvider.prototype._getBlock = function (blockHashOrBlockTag, includeTransactions) { + return __awaiter(this, void 0, void 0, function () { + var blockNumber, params, _a, error_8; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _b.sent(); + return [4 /*yield*/, blockHashOrBlockTag]; + case 2: + blockHashOrBlockTag = _b.sent(); + blockNumber = -128; + params = { + includeTransactions: !!includeTransactions + }; + if (!(0, bytes_1.isHexString)(blockHashOrBlockTag, 32)) return [3 /*break*/, 3]; + params.blockHash = blockHashOrBlockTag; + return [3 /*break*/, 6]; + case 3: + _b.trys.push([3, 5, , 6]); + _a = params; + return [4 /*yield*/, this._getBlockTag(blockHashOrBlockTag)]; + case 4: + _a.blockTag = _b.sent(); + if ((0, bytes_1.isHexString)(params.blockTag)) { + blockNumber = parseInt(params.blockTag.substring(2), 16); + } + return [3 /*break*/, 6]; + case 5: + error_8 = _b.sent(); + logger.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); + return [3 /*break*/, 6]; + case 6: return [2 /*return*/, (0, web_1.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var block, blockNumber_1, i, tx, confirmations, blockWithTxs; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.perform("getBlock", params)]; + case 1: + block = _a.sent(); + // Block was not found + if (block == null) { + // For blockhashes, if we didn't say it existed, that blockhash may + // not exist. If we did see it though, perhaps from a log, we know + // it exists, and this node is just not caught up yet. + if (params.blockHash != null) { + if (this._emitted["b:" + params.blockHash] == null) { + return [2 /*return*/, null]; + } + } + // For block tags, if we are asking for a future block, we return null + if (params.blockTag != null) { + if (blockNumber > this._emitted.block) { + return [2 /*return*/, null]; + } + } + // Retry on the next block + return [2 /*return*/, undefined]; + } + if (!includeTransactions) return [3 /*break*/, 8]; + blockNumber_1 = null; + i = 0; + _a.label = 2; + case 2: + if (!(i < block.transactions.length)) return [3 /*break*/, 7]; + tx = block.transactions[i]; + if (!(tx.blockNumber == null)) return [3 /*break*/, 3]; + tx.confirmations = 0; + return [3 /*break*/, 6]; + case 3: + if (!(tx.confirmations == null)) return [3 /*break*/, 6]; + if (!(blockNumber_1 == null)) return [3 /*break*/, 5]; + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 4: + blockNumber_1 = _a.sent(); + _a.label = 5; + case 5: + confirmations = (blockNumber_1 - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + _a.label = 6; + case 6: + i++; + return [3 /*break*/, 2]; + case 7: + blockWithTxs = this.formatter.blockWithTransactions(block); + blockWithTxs.transactions = blockWithTxs.transactions.map(function (tx) { return _this._wrapTransaction(tx); }); + return [2 /*return*/, blockWithTxs]; + case 8: return [2 /*return*/, this.formatter.block(block)]; + } + }); + }); }, { oncePoll: this })]; + } + }); + }); + }; + BaseProvider.prototype.getBlock = function (blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, false)); + }; + BaseProvider.prototype.getBlockWithTransactions = function (blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, true)); + }; + BaseProvider.prototype.getTransaction = function (transactionHash) { + return __awaiter(this, void 0, void 0, function () { + var params; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, transactionHash]; + case 2: + transactionHash = _a.sent(); + params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return [2 /*return*/, (0, web_1.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var result, tx, blockNumber, confirmations; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.perform("getTransaction", params)]; + case 1: + result = _a.sent(); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, undefined]; + } + tx = this.formatter.transactionResponse(result); + if (!(tx.blockNumber == null)) return [3 /*break*/, 2]; + tx.confirmations = 0; + return [3 /*break*/, 4]; + case 2: + if (!(tx.confirmations == null)) return [3 /*break*/, 4]; + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 3: + blockNumber = _a.sent(); + confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + _a.label = 4; + case 4: return [2 /*return*/, this._wrapTransaction(tx)]; + } + }); + }); }, { oncePoll: this })]; + } + }); + }); + }; + BaseProvider.prototype.getTransactionReceipt = function (transactionHash) { + return __awaiter(this, void 0, void 0, function () { + var params; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, transactionHash]; + case 2: + transactionHash = _a.sent(); + params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return [2 /*return*/, (0, web_1.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var result, receipt, blockNumber, confirmations; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.perform("getTransactionReceipt", params)]; + case 1: + result = _a.sent(); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, undefined]; + } + // "geth-etc" returns receipts before they are ready + if (result.blockHash == null) { + return [2 /*return*/, undefined]; + } + receipt = this.formatter.receipt(result); + if (!(receipt.blockNumber == null)) return [3 /*break*/, 2]; + receipt.confirmations = 0; + return [3 /*break*/, 4]; + case 2: + if (!(receipt.confirmations == null)) return [3 /*break*/, 4]; + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 3: + blockNumber = _a.sent(); + confirmations = (blockNumber - receipt.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + receipt.confirmations = confirmations; + _a.label = 4; + case 4: return [2 /*return*/, receipt]; + } + }); + }); }, { oncePoll: this })]; + } + }); + }); + }; + BaseProvider.prototype.getLogs = function (filter) { + return __awaiter(this, void 0, void 0, function () { + var params, logs; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter) })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getLogs", params)]; + case 3: + logs = _a.sent(); + logs.forEach(function (log) { + if (log.removed == null) { + log.removed = false; + } + }); + return [2 /*return*/, formatter_1.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)]; + } + }); + }); + }; + BaseProvider.prototype.getEtherPrice = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [2 /*return*/, this.perform("getEtherPrice", {})]; + } + }); + }); + }; + BaseProvider.prototype._getBlockTag = function (blockTag) { + return __awaiter(this, void 0, void 0, function () { + var blockNumber; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, blockTag]; + case 1: + blockTag = _a.sent(); + if (!(typeof (blockTag) === "number" && blockTag < 0)) return [3 /*break*/, 3]; + if (blockTag % 1) { + logger.throwArgumentError("invalid BlockTag", "blockTag", blockTag); + } + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 2: + blockNumber = _a.sent(); + blockNumber += blockTag; + if (blockNumber < 0) { + blockNumber = 0; + } + return [2 /*return*/, this.formatter.blockTag(blockNumber)]; + case 3: return [2 /*return*/, this.formatter.blockTag(blockTag)]; + } + }); + }); + }; + BaseProvider.prototype.getResolver = function (name) { + return __awaiter(this, void 0, void 0, function () { + var address, error_9; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, this._getResolver(name)]; + case 1: + address = _a.sent(); + if (address == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, new Resolver(this, address, name)]; + case 2: + error_9 = _a.sent(); + if (error_9.code === logger_1.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + return [2 /*return*/, null]; + case 3: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getResolver = function (name) { + return __awaiter(this, void 0, void 0, function () { + var network, transaction, _a, _b, error_10; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + network = _c.sent(); + // No ENS... + if (!network.ensAddress) { + logger.throwError("network does not support ENS", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "ENS", network: network.name }); + } + transaction = { + to: network.ensAddress, + data: ("0x0178b8bf" + (0, hash_1.namehash)(name).substring(2)) + }; + _c.label = 2; + case 2: + _c.trys.push([2, 4, , 5]); + _b = (_a = this.formatter).callAddress; + return [4 /*yield*/, this.call(transaction)]; + case 3: return [2 /*return*/, _b.apply(_a, [_c.sent()])]; + case 4: + error_10 = _c.sent(); + if (error_10.code === logger_1.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + throw error_10; + case 5: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.resolveName = function (name) { + return __awaiter(this, void 0, void 0, function () { + var resolver; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, name]; + case 1: + name = _a.sent(); + // If it is already an address, nothing to resolve + try { + return [2 /*return*/, Promise.resolve(this.formatter.address(name))]; + } + catch (error) { + // If is is a hexstring, the address is bad (See #694) + if ((0, bytes_1.isHexString)(name)) { + throw error; + } + } + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid ENS name", "name", name); + } + return [4 /*yield*/, this.getResolver(name)]; + case 2: + resolver = _a.sent(); + if (!resolver) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, resolver.getAddress()]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + BaseProvider.prototype.lookupAddress = function (address) { + return __awaiter(this, void 0, void 0, function () { + var reverseName, resolverAddress, bytes, _a, length, name, addr; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, address]; + case 1: + address = _b.sent(); + address = this.formatter.address(address); + reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + return [4 /*yield*/, this._getResolver(reverseName)]; + case 2: + resolverAddress = _b.sent(); + if (!resolverAddress) { + return [2 /*return*/, null]; + } + _a = bytes_1.arrayify; + return [4 /*yield*/, this.call({ + to: resolverAddress, + data: ("0x691f3431" + (0, hash_1.namehash)(reverseName).substring(2)) + })]; + case 3: + bytes = _a.apply(void 0, [_b.sent()]); + // Strip off the dynamic string pointer (0x20) + if (bytes.length < 32 || !bignumber_1.BigNumber.from(bytes.slice(0, 32)).eq(32)) { + return [2 /*return*/, null]; + } + bytes = bytes.slice(32); + // Not a length-prefixed string + if (bytes.length < 32) { + return [2 /*return*/, null]; + } + length = bignumber_1.BigNumber.from(bytes.slice(0, 32)).toNumber(); + bytes = bytes.slice(32); + // Length longer than available data + if (length > bytes.length) { + return [2 /*return*/, null]; + } + name = (0, strings_1.toUtf8String)(bytes.slice(0, length)); + return [4 /*yield*/, this.resolveName(name)]; + case 4: + addr = _b.sent(); + if (addr != address) { + return [2 /*return*/, null]; + } + return [2 /*return*/, name]; + } + }); + }); + }; + BaseProvider.prototype.getAvatar = function (nameOrAddress) { + return __awaiter(this, void 0, void 0, function () { + var resolver, address, reverseName, resolverAddress, avatar; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + resolver = null; + if (!(0, bytes_1.isHexString)(nameOrAddress)) return [3 /*break*/, 2]; + address = this.formatter.address(nameOrAddress); + reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + return [4 /*yield*/, this._getResolver(reverseName)]; + case 1: + resolverAddress = _a.sent(); + if (!resolverAddress) { + return [2 /*return*/, null]; + } + resolver = new Resolver(this, resolverAddress, "_", address); + return [3 /*break*/, 4]; + case 2: return [4 /*yield*/, this.getResolver(nameOrAddress)]; + case 3: + // ENS name; forward lookup + resolver = _a.sent(); + if (!resolver) { + return [2 /*return*/, null]; + } + _a.label = 4; + case 4: return [4 /*yield*/, resolver.getAvatar()]; + case 5: + avatar = _a.sent(); + if (avatar == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, avatar.url]; + } + }); + }); + }; + BaseProvider.prototype.perform = function (method, params) { + return logger.throwError(method + " not implemented", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method }); + }; + BaseProvider.prototype._startEvent = function (event) { + this.polling = (this._events.filter(function (e) { return e.pollable(); }).length > 0); + }; + BaseProvider.prototype._stopEvent = function (event) { + this.polling = (this._events.filter(function (e) { return e.pollable(); }).length > 0); + }; + BaseProvider.prototype._addEventListener = function (eventName, listener, once) { + var event = new Event(getEventTag(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + }; + BaseProvider.prototype.on = function (eventName, listener) { + return this._addEventListener(eventName, listener, false); + }; + BaseProvider.prototype.once = function (eventName, listener) { + return this._addEventListener(eventName, listener, true); + }; + BaseProvider.prototype.emit = function (eventName) { + var _this = this; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var result = false; + var stopped = []; + var eventTag = getEventTag(eventName); + this._events = this._events.filter(function (event) { + if (event.tag !== eventTag) { + return true; + } + setTimeout(function () { + event.listener.apply(_this, args); + }, 0); + result = true; + if (event.once) { + stopped.push(event); + return false; + } + return true; + }); + stopped.forEach(function (event) { _this._stopEvent(event); }); + return result; + }; + BaseProvider.prototype.listenerCount = function (eventName) { + if (!eventName) { + return this._events.length; + } + var eventTag = getEventTag(eventName); + return this._events.filter(function (event) { + return (event.tag === eventTag); + }).length; + }; + BaseProvider.prototype.listeners = function (eventName) { + if (eventName == null) { + return this._events.map(function (event) { return event.listener; }); + } + var eventTag = getEventTag(eventName); + return this._events + .filter(function (event) { return (event.tag === eventTag); }) + .map(function (event) { return event.listener; }); + }; + BaseProvider.prototype.off = function (eventName, listener) { + var _this = this; + if (listener == null) { + return this.removeAllListeners(eventName); + } + var stopped = []; + var found = false; + var eventTag = getEventTag(eventName); + this._events = this._events.filter(function (event) { + if (event.tag !== eventTag || event.listener != listener) { + return true; + } + if (found) { + return true; + } + found = true; + stopped.push(event); + return false; + }); + stopped.forEach(function (event) { _this._stopEvent(event); }); + return this; + }; + BaseProvider.prototype.removeAllListeners = function (eventName) { + var _this = this; + var stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + var eventTag_1 = getEventTag(eventName); + this._events = this._events.filter(function (event) { + if (event.tag !== eventTag_1) { + return true; + } + stopped.push(event); + return false; + }); + } + stopped.forEach(function (event) { _this._stopEvent(event); }); + return this; + }; + return BaseProvider; +}(abstract_provider_1.Provider)); +exports.BaseProvider = BaseProvider; +//# sourceMappingURL=base-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/base-provider.js.map b/node_modules/@ethersproject/providers/lib/base-provider.js.map new file mode 100644 index 0000000..eadbbe8 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/base-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base-provider.js","sourceRoot":"","sources":["../src.ts/base-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,sEAG0C;AAC1C,8CAA8C;AAC9C,sDAAmE;AACnE,8CAA4I;AAC5I,sDAAoD;AACpD,4CAA+C;AAC/C,oDAA0E;AAC1E,wDAAqG;AAErG,4CAA6C;AAC7C,kDAAmE;AACnE,0CAAqD;AAErD,kDAA4B;AAE5B,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,yCAAwC;AAExC,8BAA8B;AAC9B,qBAAqB;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OAAO,KAAK,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK,IAAO,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,yCAAkB,GAAlB,UAAmB,SAAqB;QAAxC,iBAkBC;QAjBG,IAAI,OAAO,GAAiB,EAAG,CAAC;QAChC,IAAI,SAAS,IAAI,IAAI,EAAE;YACnB,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAEvB,IAAI,CAAC,OAAO,GAAG,EAAG,CAAC;SACtB;aAAM;YACH,IAAM,UAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAC,KAAK;gBACrC,IAAI,KAAK,CAAC,GAAG,KAAK,UAAQ,EAAE;oBAAE,OAAO,IAAI,CAAC;iBAAE;gBAC5C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,KAAK,CAAC;YACjB,CAAC,CAAC,CAAC;SACN;QAED,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK,IAAO,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,mBAAC;AAAD,CAAC,AAjzCD,CAAkC,4BAAQ,GAizCzC;AAjzCY,oCAAY"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts new file mode 100644 index 0000000..ea20770 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts @@ -0,0 +1,3 @@ +declare const IpcProvider: any; +export { IpcProvider }; +//# sourceMappingURL=browser-ipc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts.map new file mode 100644 index 0000000..708316d --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-ipc-provider.d.ts","sourceRoot":"","sources":["../src.ts/browser-ipc-provider.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,EAAE,GAAU,CAAC;AAE9B,OAAO,EACH,WAAW,EACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js new file mode 100644 index 0000000..094898f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IpcProvider = void 0; +var IpcProvider = null; +exports.IpcProvider = IpcProvider; +//# sourceMappingURL=browser-ipc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js.map b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js.map new file mode 100644 index 0000000..0205e00 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-ipc-provider.js","sourceRoot":"","sources":["../src.ts/browser-ipc-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,IAAM,WAAW,GAAQ,IAAI,CAAC;AAG1B,kCAAW"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-net.d.ts b/node_modules/@ethersproject/providers/lib/browser-net.d.ts new file mode 100644 index 0000000..96ee0f6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-net.d.ts @@ -0,0 +1,2 @@ +export declare function connect(): void; +//# sourceMappingURL=browser-net.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-net.d.ts.map b/node_modules/@ethersproject/providers/lib/browser-net.d.ts.map new file mode 100644 index 0000000..23f075f --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-net.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-net.d.ts","sourceRoot":"","sources":["../src.ts/browser-net.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,SAAM"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-net.js b/node_modules/@ethersproject/providers/lib/browser-net.js new file mode 100644 index 0000000..c039b70 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-net.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.connect = void 0; +function connect() { } +exports.connect = connect; +//# sourceMappingURL=browser-net.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-net.js.map b/node_modules/@ethersproject/providers/lib/browser-net.js.map new file mode 100644 index 0000000..a97cf8c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-net.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-net.js","sourceRoot":"","sources":["../src.ts/browser-net.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,SAAgB,OAAO,KAAK,CAAC;AAA7B,0BAA6B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ws.d.ts b/node_modules/@ethersproject/providers/lib/browser-ws.d.ts new file mode 100644 index 0000000..a9d6598 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ws.d.ts @@ -0,0 +1,3 @@ +declare let WS: any; +export { WS as WebSocket }; +//# sourceMappingURL=browser-ws.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ws.d.ts.map b/node_modules/@ethersproject/providers/lib/browser-ws.d.ts.map new file mode 100644 index 0000000..56b5add --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ws.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-ws.d.ts","sourceRoot":"","sources":["../src.ts/browser-ws.ts"],"names":[],"mappings":"AAKA,QAAA,IAAI,EAAE,EAAE,GAAU,CAAC;AAenB,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ws.js b/node_modules/@ethersproject/providers/lib/browser-ws.js new file mode 100644 index 0000000..2588e01 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ws.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebSocket = void 0; +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var WS = null; +exports.WebSocket = WS; +try { + exports.WebSocket = WS = WebSocket; + if (WS == null) { + throw new Error("inject please"); + } +} +catch (error) { + var logger_2 = new logger_1.Logger(_version_1.version); + exports.WebSocket = WS = function () { + logger_2.throwError("WebSockets not supported in this environment", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new WebSocket()" + }); + }; +} +//# sourceMappingURL=browser-ws.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/browser-ws.js.map b/node_modules/@ethersproject/providers/lib/browser-ws.js.map new file mode 100644 index 0000000..d3f8ff1 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/browser-ws.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-ws.js","sourceRoot":"","sources":["../src.ts/browser-ws.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,gDAA+C;AAC/C,uCAAqC;AAErC,IAAI,EAAE,GAAQ,IAAI,CAAC;AAeJ,uBAAS;AAbxB,IAAI;IACA,oBAAA,EAAE,GAAI,SAAiB,CAAC;IACxB,IAAI,EAAE,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;KAAE;CACxD;AAAC,OAAO,KAAK,EAAE;IACZ,IAAM,QAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;IACnC,oBAAA,EAAE,GAAG;QACD,QAAM,CAAC,UAAU,CAAC,8CAA8C,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;YACnG,SAAS,EAAE,iBAAiB;SAC/B,CAAC,CAAC;IACP,CAAC,CAAA;CACJ"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts b/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts new file mode 100644 index 0000000..f209dd3 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts @@ -0,0 +1,8 @@ +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class CloudflareProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey?: any): string; + perform(method: string, params: any): Promise; +} +//# sourceMappingURL=cloudflare-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts.map new file mode 100644 index 0000000..2a3ef84 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cloudflare-provider.d.ts","sourceRoot":"","sources":["../src.ts/cloudflare-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,qBAAa,kBAAmB,SAAQ,kBAAkB;IAEtD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAOlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM;IAa/C,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CAU3D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/cloudflare-provider.js b/node_modules/@ethersproject/providers/lib/cloudflare-provider.js new file mode 100644 index 0000000..63b2452 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/cloudflare-provider.js @@ -0,0 +1,100 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CloudflareProvider = void 0; +var url_json_rpc_provider_1 = require("./url-json-rpc-provider"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var CloudflareProvider = /** @class */ (function (_super) { + __extends(CloudflareProvider, _super); + function CloudflareProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + CloudflareProvider.getApiKey = function (apiKey) { + if (apiKey != null) { + logger.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); + } + return null; + }; + CloudflareProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network.name) { + case "homestead": + host = "https://cloudflare-eth.com/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return host; + }; + CloudflareProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var block; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(method === "getBlockNumber")) return [3 /*break*/, 2]; + return [4 /*yield*/, _super.prototype.perform.call(this, "getBlock", { blockTag: "latest" })]; + case 1: + block = _a.sent(); + return [2 /*return*/, block.number]; + case 2: return [2 /*return*/, _super.prototype.perform.call(this, method, params)]; + } + }); + }); + }; + return CloudflareProvider; +}(url_json_rpc_provider_1.UrlJsonRpcProvider)); +exports.CloudflareProvider = CloudflareProvider; +//# sourceMappingURL=cloudflare-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/cloudflare-provider.js.map b/node_modules/@ethersproject/providers/lib/cloudflare-provider.js.map new file mode 100644 index 0000000..33a9a99 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/cloudflare-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cloudflare-provider.js","sourceRoot":"","sources":["../src.ts/cloudflare-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGb,iEAA6D;AAE7D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC;IAAwC,sCAAkB;IAA1D;;IAgCA,CAAC;IA9BU,4BAAS,GAAhB,UAAiB,MAAW;QACxB,IAAI,MAAM,IAAI,IAAI,EAAE;YAChB,MAAM,CAAC,kBAAkB,CAAC,qCAAqC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SACtF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,yBAAM,GAAb,UAAc,OAAgB,EAAE,MAAY;QACxC,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,QAAQ,OAAO,CAAC,IAAI,EAAE;YAClB,KAAK,WAAW;gBACZ,IAAI,GAAG,6BAA6B,CAAC;gBACrC,MAAM;YACV;gBACG,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAChF;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEK,oCAAO,GAAb,UAAc,MAAc,EAAE,MAAW;;;;;;6BAGjC,CAAA,MAAM,KAAK,gBAAgB,CAAA,EAA3B,wBAA2B;wBACb,qBAAM,iBAAM,OAAO,YAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAA;;wBAA/D,KAAK,GAAG,SAAuD;wBACrE,sBAAO,KAAK,CAAC,MAAM,EAAC;4BAGxB,sBAAO,iBAAM,OAAO,YAAC,MAAM,EAAE,MAAM,CAAC,EAAC;;;;KACxC;IACL,yBAAC;AAAD,CAAC,AAhCD,CAAwC,0CAAkB,GAgCzD;AAhCY,gDAAkB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts b/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts new file mode 100644 index 0000000..44b8294 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts @@ -0,0 +1,18 @@ +import { BlockTag, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Network, Networkish } from "@ethersproject/networks"; +import { BaseProvider } from "./base-provider"; +export declare class EtherscanProvider extends BaseProvider { + readonly baseUrl: string; + readonly apiKey: string; + constructor(network?: Networkish, apiKey?: string); + getBaseUrl(): string; + getUrl(module: string, params: Record): string; + getPostUrl(): string; + getPostData(module: string, params: Record): Record; + fetch(module: string, params: Record, post?: boolean): Promise; + detectNetwork(): Promise; + perform(method: string, params: any): Promise; + getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise>; + isCommunityResource(): boolean; +} +//# sourceMappingURL=etherscan-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts.map new file mode 100644 index 0000000..734d724 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"etherscan-provider.d.ts","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAA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ider.js new file mode 100644 index 0000000..22c83ac --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/etherscan-provider.js @@ -0,0 +1,524 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EtherscanProvider = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var transactions_1 = require("@ethersproject/transactions"); +var web_1 = require("@ethersproject/web"); +var formatter_1 = require("./formatter"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var base_provider_1 = require("./base-provider"); +// The transaction has already been sanitized by the calls in Provider +function getTransactionPostData(transaction) { + var result = {}; + for (var key in transaction) { + if (transaction[key] == null) { + continue; + } + var value = transaction[key]; + if (key === "type" && value === 0) { + continue; + } + // Quantity-types require no leading zero, unless 0 + if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) { + value = (0, bytes_1.hexValue)((0, bytes_1.hexlify)(value)); + } + else if (key === "accessList") { + value = "[" + (0, transactions_1.accessListify)(value).map(function (set) { + return "{address:\"" + set.address + "\",storageKeys:[\"" + set.storageKeys.join('","') + "\"]}"; + }).join(",") + "]"; + } + else { + value = (0, bytes_1.hexlify)(value); + } + result[key] = value; + } + return result; +} +function getResult(result) { + // getLogs, getHistory have weird success responses + if (result.status == 0 && (result.message === "No records found" || result.message === "No transactions found")) { + return result.result; + } + if (result.status != 1 || result.message != "OK") { + var error = new Error("invalid response"); + error.result = JSON.stringify(result); + if ((result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + error.throttleRetry = true; + } + throw error; + } + return result.result; +} +function getJsonResult(result) { + // This response indicates we are being throttled + if (result && result.status == 0 && result.message == "NOTOK" && (result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + var error = new Error("throttled response"); + error.result = JSON.stringify(result); + error.throttleRetry = true; + throw error; + } + if (result.jsonrpc != "2.0") { + // @TODO: not any + var error = new Error("invalid response"); + error.result = JSON.stringify(result); + throw error; + } + if (result.error) { + // @TODO: not any + var error = new Error(result.error.message || "unknown error"); + if (result.error.code) { + error.code = result.error.code; + } + if (result.error.data) { + error.data = result.error.data; + } + throw error; + } + return result.result; +} +// The blockTag was normalized as a string by the Provider pre-perform operations +function checkLogTag(blockTag) { + if (blockTag === "pending") { + throw new Error("pending not supported"); + } + if (blockTag === "latest") { + return blockTag; + } + return parseInt(blockTag.substring(2), 16); +} +var defaultApiKey = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"; +function checkError(method, error, transaction) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === logger_1.Logger.errors.SERVER_ERROR) { + var e = error.error; + // Etherscan keeps changing their string + if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) { + // Etherscan prefixes the data like "Reverted 0x1234" + var data = e.data; + if (data) { + data = "0x" + data.replace(/^.*0x/i, ""); + } + if ((0, bytes_1.isHexString)(data)) { + return data; + } + logger.throwError("missing revert data in call exception", logger_1.Logger.errors.CALL_EXCEPTION, { + error: error, + data: "0x" + }); + } + } + // Get the message from any nested error structure + var message = error.message; + if (error.code === logger_1.Logger.errors.SERVER_ERROR) { + if (error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + } + message = (message || "").toLowerCase(); + // "Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0" + if (message.match(/insufficient funds/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", logger_1.Logger.errors.INSUFFICIENT_FUNDS, { + error: error, + method: method, + transaction: transaction + }); + } + // "Transaction with the same hash was already imported." + if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) { + logger.throwError("nonce has already been used", logger_1.Logger.errors.NONCE_EXPIRED, { + error: error, + method: method, + transaction: transaction + }); + } + // "Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce." + if (message.match(/another transaction with same nonce/)) { + logger.throwError("replacement fee too low", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, { + error: error, + method: method, + transaction: transaction + }); + } + if (message.match(/execution failed due to an exception|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + method: method, + transaction: transaction + }); + } + throw error; +} +var EtherscanProvider = /** @class */ (function (_super) { + __extends(EtherscanProvider, _super); + function EtherscanProvider(network, apiKey) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, EtherscanProvider); + _this = _super.call(this, network) || this; + (0, properties_1.defineReadOnly)(_this, "baseUrl", _this.getBaseUrl()); + (0, properties_1.defineReadOnly)(_this, "apiKey", apiKey || defaultApiKey); + return _this; + } + EtherscanProvider.prototype.getBaseUrl = function () { + switch (this.network ? this.network.name : "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "ropsten": + return "https:/\/api-ropsten.etherscan.io"; + case "rinkeby": + return "https:/\/api-rinkeby.etherscan.io"; + case "kovan": + return "https:/\/api-kovan.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + default: + } + return logger.throwArgumentError("unsupported network", "network", name); + }; + EtherscanProvider.prototype.getUrl = function (module, params) { + var query = Object.keys(params).reduce(function (accum, key) { + var value = params[key]; + if (value != null) { + accum += "&" + key + "=" + value; + } + return accum; + }, ""); + var apiKey = ((this.apiKey) ? "&apikey=" + this.apiKey : ""); + return this.baseUrl + "/api?module=" + module + query + apiKey; + }; + EtherscanProvider.prototype.getPostUrl = function () { + return this.baseUrl + "/api"; + }; + EtherscanProvider.prototype.getPostData = function (module, params) { + params.module = module; + params.apikey = this.apiKey; + return params; + }; + EtherscanProvider.prototype.fetch = function (module, params, post) { + return __awaiter(this, void 0, void 0, function () { + var url, payload, procFunc, connection, payloadStr, result; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + url = (post ? this.getPostUrl() : this.getUrl(module, params)); + payload = (post ? this.getPostData(module, params) : null); + procFunc = (module === "proxy") ? getJsonResult : getResult; + this.emit("debug", { + action: "request", + request: url, + provider: this + }); + connection = { + url: url, + throttleSlotInterval: 1000, + throttleCallback: function (attempt, url) { + if (_this.isCommunityResource()) { + (0, formatter_1.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + payloadStr = null; + if (payload) { + connection.headers = { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" }; + payloadStr = Object.keys(payload).map(function (key) { + return key + "=" + payload[key]; + }).join("&"); + } + return [4 /*yield*/, (0, web_1.fetchJson)(connection, payloadStr, procFunc || getJsonResult)]; + case 1: + result = _a.sent(); + this.emit("debug", { + action: "response", + request: url, + response: (0, properties_1.deepCopy)(result), + provider: this + }); + return [2 /*return*/, result]; + } + }); + }); + }; + EtherscanProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.network]; + }); + }); + }; + EtherscanProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i, log, block, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _a = method; + switch (_a) { + case "getBlockNumber": return [3 /*break*/, 1]; + case "getGasPrice": return [3 /*break*/, 2]; + case "getBalance": return [3 /*break*/, 3]; + case "getTransactionCount": return [3 /*break*/, 4]; + case "getCode": return [3 /*break*/, 5]; + case "getStorageAt": return [3 /*break*/, 6]; + case "sendTransaction": return [3 /*break*/, 7]; + case "getBlock": return [3 /*break*/, 8]; + case "getTransaction": return [3 /*break*/, 9]; + case "getTransactionReceipt": return [3 /*break*/, 10]; + case "call": return [3 /*break*/, 11]; + case "estimateGas": return [3 /*break*/, 15]; + case "getLogs": return [3 /*break*/, 19]; + case "getEtherPrice": return [3 /*break*/, 26]; + } + return [3 /*break*/, 28]; + case 1: return [2 /*return*/, this.fetch("proxy", { action: "eth_blockNumber" })]; + case 2: return [2 /*return*/, this.fetch("proxy", { action: "eth_gasPrice" })]; + case 3: + // Returns base-10 result + return [2 /*return*/, this.fetch("account", { + action: "balance", + address: params.address, + tag: params.blockTag + })]; + case 4: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getTransactionCount", + address: params.address, + tag: params.blockTag + })]; + case 5: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getCode", + address: params.address, + tag: params.blockTag + })]; + case 6: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getStorageAt", + address: params.address, + position: params.position, + tag: params.blockTag + })]; + case 7: return [2 /*return*/, this.fetch("proxy", { + action: "eth_sendRawTransaction", + hex: params.signedTransaction + }, true).catch(function (error) { + return checkError("sendTransaction", error, params.signedTransaction); + })]; + case 8: + if (params.blockTag) { + return [2 /*return*/, this.fetch("proxy", { + action: "eth_getBlockByNumber", + tag: params.blockTag, + boolean: (params.includeTransactions ? "true" : "false") + })]; + } + throw new Error("getBlock by blockHash not implemented"); + case 9: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getTransactionByHash", + txhash: params.transactionHash + })]; + case 10: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getTransactionReceipt", + txhash: params.transactionHash + })]; + case 11: + if (params.blockTag !== "latest") { + throw new Error("EtherscanProvider does not support blockTag for call"); + } + postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_call"; + _c.label = 12; + case 12: + _c.trys.push([12, 14, , 15]); + return [4 /*yield*/, this.fetch("proxy", postData, true)]; + case 13: return [2 /*return*/, _c.sent()]; + case 14: + error_1 = _c.sent(); + return [2 /*return*/, checkError("call", error_1, params.transaction)]; + case 15: + postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_estimateGas"; + _c.label = 16; + case 16: + _c.trys.push([16, 18, , 19]); + return [4 /*yield*/, this.fetch("proxy", postData, true)]; + case 17: return [2 /*return*/, _c.sent()]; + case 18: + error_2 = _c.sent(); + return [2 /*return*/, checkError("estimateGas", error_2, params.transaction)]; + case 19: + args = { action: "getLogs" }; + if (params.filter.fromBlock) { + args.fromBlock = checkLogTag(params.filter.fromBlock); + } + if (params.filter.toBlock) { + args.toBlock = checkLogTag(params.filter.toBlock); + } + if (params.filter.address) { + args.address = params.filter.address; + } + // @TODO: We can handle slightly more complicated logs using the logs API + if (params.filter.topics && params.filter.topics.length > 0) { + if (params.filter.topics.length > 1) { + logger.throwError("unsupported topic count", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); + } + if (params.filter.topics.length === 1) { + topic0 = params.filter.topics[0]; + if (typeof (topic0) !== "string" || topic0.length !== 66) { + logger.throwError("unsupported topic format", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 }); + } + args.topic0 = topic0; + } + } + return [4 /*yield*/, this.fetch("logs", args)]; + case 20: + logs = _c.sent(); + blocks = {}; + i = 0; + _c.label = 21; + case 21: + if (!(i < logs.length)) return [3 /*break*/, 25]; + log = logs[i]; + if (log.blockHash != null) { + return [3 /*break*/, 24]; + } + if (!(blocks[log.blockNumber] == null)) return [3 /*break*/, 23]; + return [4 /*yield*/, this.getBlock(log.blockNumber)]; + case 22: + block = _c.sent(); + if (block) { + blocks[log.blockNumber] = block.hash; + } + _c.label = 23; + case 23: + log.blockHash = blocks[log.blockNumber]; + _c.label = 24; + case 24: + i++; + return [3 /*break*/, 21]; + case 25: return [2 /*return*/, logs]; + case 26: + if (this.network.name !== "homestead") { + return [2 /*return*/, 0.0]; + } + _b = parseFloat; + return [4 /*yield*/, this.fetch("stats", { action: "ethprice" })]; + case 27: return [2 /*return*/, _b.apply(void 0, [(_c.sent()).ethusd])]; + case 28: return [3 /*break*/, 29]; + case 29: return [2 /*return*/, _super.prototype.perform.call(this, method, params)]; + } + }); + }); + }; + // Note: The `page` page parameter only allows pagination within the + // 10,000 window available without a page and offset parameter + // Error: Result window is too large, PageNo x Offset size must + // be less than or equal to 10000 + EtherscanProvider.prototype.getHistory = function (addressOrName, startBlock, endBlock) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + var _a; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = { + action: "txlist" + }; + return [4 /*yield*/, this.resolveName(addressOrName)]; + case 1: + params = (_a.address = (_b.sent()), + _a.startblock = ((startBlock == null) ? 0 : startBlock), + _a.endblock = ((endBlock == null) ? 99999999 : endBlock), + _a.sort = "asc", + _a); + return [4 /*yield*/, this.fetch("account", params)]; + case 2: + result = _b.sent(); + return [2 /*return*/, result.map(function (tx) { + ["contractAddress", "to"].forEach(function (key) { + if (tx[key] == "") { + delete tx[key]; + } + }); + if (tx.creates == null && tx.contractAddress != null) { + tx.creates = tx.contractAddress; + } + var item = _this.formatter.transactionResponse(tx); + if (tx.timeStamp) { + item.timestamp = parseInt(tx.timeStamp); + } + return item; + })]; + } + }); + }); + }; + EtherscanProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + return EtherscanProvider; +}(base_provider_1.BaseProvider)); +exports.EtherscanProvider = EtherscanProvider; +//# sourceMappingURL=etherscan-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/etherscan-provider.js.map b/node_modules/@ethersproject/providers/lib/etherscan-provider.js.map new file mode 100644 index 0000000..3fb2e51 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/etherscan-provider.js.map @@ -0,0 +1 @@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AAI,CAAC,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;iCAAE;gCAC9D,OAAO,IAAI,CAAC;4BAChB,CAAC,CAAC,EAAC;;;;KACN;IAED,+CAAmB,GAAnB;QACI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;IACL,wBAAC;AAAD,CAAC,AAjSD,CAAuC,4BAAY,GAiSlD;AAjSY,8CAAiB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts b/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts new file mode 100644 index 0000000..b9f38da --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts @@ -0,0 +1,20 @@ +import { Provider } from "@ethersproject/abstract-provider"; +import { Network } from "@ethersproject/networks"; +import { BaseProvider } from "./base-provider"; +export interface FallbackProviderConfig { + provider: Provider; + priority?: number; + stallTimeout?: number; + weight?: number; +} +export declare class FallbackProvider extends BaseProvider { + readonly providerConfigs: ReadonlyArray; + readonly quorum: number; + _highestBlockNumber: number; + constructor(providers: Array, quorum?: number); + detectNetwork(): Promise; + perform(method: string, params: { + [name: string]: any; + }): Promise; +} +//# sourceMappingURL=fallback-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts.map new file mode 100644 index 0000000..f4cbb06 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fallback-provider.d.ts","sourceRoot":"","sources":["../src.ts/fallback-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAG1F,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAKlD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAsF/C,MAAM,WAAW,sBAAsB;IAEnC,QAAQ,EAAE,QAAQ,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAOlB,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAgSD,qBAAa,gBAAiB,SAAQ,YAAY;IAC9C,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAKxB,mBAAmB,EAAE,MAAM,CAAC;gBAEhB,SAAS,EAAE,KAAK,CAAC,QAAQ,GAAG,sBAAsB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM;IA2D1E,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAKjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAiL/E"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/fallback-provider.js b/node_modules/@ethersproject/providers/lib/fallback-provider.js new file mode 100644 index 0000000..727130c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/fallback-provider.js @@ -0,0 +1,697 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FallbackProvider = void 0; +var abstract_provider_1 = require("@ethersproject/abstract-provider"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var random_1 = require("@ethersproject/random"); +var web_1 = require("@ethersproject/web"); +var base_provider_1 = require("./base-provider"); +var formatter_1 = require("./formatter"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function now() { return (new Date()).getTime(); } +// Returns to network as long as all agree, or null if any is null. +// Throws an error if any two networks do not match. +function checkNetworks(networks) { + var result = null; + for (var i = 0; i < networks.length; i++) { + var network = networks[i]; + // Null! We do not know our network; bail. + if (network == null) { + return null; + } + if (result) { + // Make sure the network matches the previous networks + if (!(result.name === network.name && result.chainId === network.chainId && + ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) { + logger.throwArgumentError("provider mismatch", "networks", networks); + } + } + else { + result = network; + } + } + return result; +} +function median(values, maxDelta) { + values = values.slice().sort(); + var middle = Math.floor(values.length / 2); + // Odd length; take the middle + if (values.length % 2) { + return values[middle]; + } + // Even length; take the average of the two middle + var a = values[middle - 1], b = values[middle]; + if (maxDelta != null && Math.abs(a - b) > maxDelta) { + return null; + } + return (a + b) / 2; +} +function serialize(value) { + if (value === null) { + return "null"; + } + else if (typeof (value) === "number" || typeof (value) === "boolean") { + return JSON.stringify(value); + } + else if (typeof (value) === "string") { + return value; + } + else if (bignumber_1.BigNumber.isBigNumber(value)) { + return value.toString(); + } + else if (Array.isArray(value)) { + return JSON.stringify(value.map(function (i) { return serialize(i); })); + } + else if (typeof (value) === "object") { + var keys = Object.keys(value); + keys.sort(); + return "{" + keys.map(function (key) { + var v = value[key]; + if (typeof (v) === "function") { + v = "[function]"; + } + else { + v = serialize(v); + } + return JSON.stringify(key) + ":" + v; + }).join(",") + "}"; + } + throw new Error("unknown value type: " + typeof (value)); +} +// Next request ID to use for emitting debug info +var nextRid = 1; +; +function stall(duration) { + var cancel = null; + var timer = null; + var promise = (new Promise(function (resolve) { + cancel = function () { + if (timer) { + clearTimeout(timer); + timer = null; + } + resolve(); + }; + timer = setTimeout(cancel, duration); + })); + var wait = function (func) { + promise = promise.then(func); + return promise; + }; + function getPromise() { + return promise; + } + return { cancel: cancel, getPromise: getPromise, wait: wait }; +} +var ForwardErrors = [ + logger_1.Logger.errors.CALL_EXCEPTION, + logger_1.Logger.errors.INSUFFICIENT_FUNDS, + logger_1.Logger.errors.NONCE_EXPIRED, + logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, + logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT +]; +var ForwardProperties = [ + "address", + "args", + "errorArgs", + "errorSignature", + "method", + "transaction", +]; +; +function exposeDebugConfig(config, now) { + var result = { + weight: config.weight + }; + Object.defineProperty(result, "provider", { get: function () { return config.provider; } }); + if (config.start) { + result.start = config.start; + } + if (now) { + result.duration = (now - config.start); + } + if (config.done) { + if (config.error) { + result.error = config.error; + } + else { + result.result = config.result || null; + } + } + return result; +} +function normalizedTally(normalize, quorum) { + return function (configs) { + // Count the votes for each result + var tally = {}; + configs.forEach(function (c) { + var value = normalize(c.result); + if (!tally[value]) { + tally[value] = { count: 0, result: c.result }; + } + tally[value].count++; + }); + // Check for a quorum on any given result + var keys = Object.keys(tally); + for (var i = 0; i < keys.length; i++) { + var check = tally[keys[i]]; + if (check.count >= quorum) { + return check.result; + } + } + // No quroum + return undefined; + }; +} +function getProcessFunc(provider, method, params) { + var normalize = serialize; + switch (method) { + case "getBlockNumber": + // Return the median value, unless there is (median + 1) is also + // present, in which case that is probably true and the median + // is going to be stale soon. In the event of a malicious node, + // the lie will be true soon enough. + return function (configs) { + var values = configs.map(function (c) { return c.result; }); + // Get the median block number + var blockNumber = median(configs.map(function (c) { return c.result; }), 2); + if (blockNumber == null) { + return undefined; + } + blockNumber = Math.ceil(blockNumber); + // If the next block height is present, its prolly safe to use + if (values.indexOf(blockNumber + 1) >= 0) { + blockNumber++; + } + // Don't ever roll back the blockNumber + if (blockNumber >= provider._highestBlockNumber) { + provider._highestBlockNumber = blockNumber; + } + return provider._highestBlockNumber; + }; + case "getGasPrice": + // Return the middle (round index up) value, similar to median + // but do not average even entries and choose the higher. + // Malicious actors must compromise 50% of the nodes to lie. + return function (configs) { + var values = configs.map(function (c) { return c.result; }); + values.sort(); + return values[Math.floor(values.length / 2)]; + }; + case "getEtherPrice": + // Returns the median price. Malicious actors must compromise at + // least 50% of the nodes to lie (in a meaningful way). + return function (configs) { + return median(configs.map(function (c) { return c.result; })); + }; + // No additional normalizing required; serialize is enough + case "getBalance": + case "getTransactionCount": + case "getCode": + case "getStorageAt": + case "call": + case "estimateGas": + case "getLogs": + break; + // We drop the confirmations from transactions as it is approximate + case "getTransaction": + case "getTransactionReceipt": + normalize = function (tx) { + if (tx == null) { + return null; + } + tx = (0, properties_1.shallowCopy)(tx); + tx.confirmations = -1; + return serialize(tx); + }; + break; + // We drop the confirmations from transactions as it is approximate + case "getBlock": + // We drop the confirmations from transactions as it is approximate + if (params.includeTransactions) { + normalize = function (block) { + if (block == null) { + return null; + } + block = (0, properties_1.shallowCopy)(block); + block.transactions = block.transactions.map(function (tx) { + tx = (0, properties_1.shallowCopy)(tx); + tx.confirmations = -1; + return tx; + }); + return serialize(block); + }; + } + else { + normalize = function (block) { + if (block == null) { + return null; + } + return serialize(block); + }; + } + break; + default: + throw new Error("unknown method: " + method); + } + // Return the result if and only if the expected quorum is + // satisfied and agreed upon for the final result. + return normalizedTally(normalize, provider.quorum); +} +// If we are doing a blockTag query, we need to make sure the backend is +// caught up to the FallbackProvider, before sending a request to it. +function waitForSync(config, blockNumber) { + return __awaiter(this, void 0, void 0, function () { + var provider; + return __generator(this, function (_a) { + provider = (config.provider); + if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) { + return [2 /*return*/, provider]; + } + return [2 /*return*/, (0, web_1.poll)(function () { + return new Promise(function (resolve, reject) { + setTimeout(function () { + // We are synced + if (provider.blockNumber >= blockNumber) { + return resolve(provider); + } + // We're done; just quit + if (config.cancelled) { + return resolve(null); + } + // Try again, next block + return resolve(undefined); + }, 0); + }); + }, { oncePoll: provider })]; + }); + }); +} +function getRunner(config, currentBlockNumber, method, params) { + return __awaiter(this, void 0, void 0, function () { + var provider, _a, filter; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + provider = config.provider; + _a = method; + switch (_a) { + case "getBlockNumber": return [3 /*break*/, 1]; + case "getGasPrice": return [3 /*break*/, 1]; + case "getEtherPrice": return [3 /*break*/, 2]; + case "getBalance": return [3 /*break*/, 3]; + case "getTransactionCount": return [3 /*break*/, 3]; + case "getCode": return [3 /*break*/, 3]; + case "getStorageAt": return [3 /*break*/, 6]; + case "getBlock": return [3 /*break*/, 9]; + case "call": return [3 /*break*/, 12]; + case "estimateGas": return [3 /*break*/, 12]; + case "getTransaction": return [3 /*break*/, 15]; + case "getTransactionReceipt": return [3 /*break*/, 15]; + case "getLogs": return [3 /*break*/, 16]; + } + return [3 /*break*/, 19]; + case 1: return [2 /*return*/, provider[method]()]; + case 2: + if (provider.getEtherPrice) { + return [2 /*return*/, provider.getEtherPrice()]; + } + return [3 /*break*/, 19]; + case 3: + if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag))) return [3 /*break*/, 5]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 4: + provider = _b.sent(); + _b.label = 5; + case 5: return [2 /*return*/, provider[method](params.address, params.blockTag || "latest")]; + case 6: + if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag))) return [3 /*break*/, 8]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 7: + provider = _b.sent(); + _b.label = 8; + case 8: return [2 /*return*/, provider.getStorageAt(params.address, params.position, params.blockTag || "latest")]; + case 9: + if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag))) return [3 /*break*/, 11]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 10: + provider = _b.sent(); + _b.label = 11; + case 11: return [2 /*return*/, provider[(params.includeTransactions ? "getBlockWithTransactions" : "getBlock")](params.blockTag || params.blockHash)]; + case 12: + if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag))) return [3 /*break*/, 14]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 13: + provider = _b.sent(); + _b.label = 14; + case 14: return [2 /*return*/, provider[method](params.transaction)]; + case 15: return [2 /*return*/, provider[method](params.transactionHash)]; + case 16: + filter = params.filter; + if (!((filter.fromBlock && (0, bytes_1.isHexString)(filter.fromBlock)) || (filter.toBlock && (0, bytes_1.isHexString)(filter.toBlock)))) return [3 /*break*/, 18]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 17: + provider = _b.sent(); + _b.label = 18; + case 18: return [2 /*return*/, provider.getLogs(filter)]; + case 19: return [2 /*return*/, logger.throwError("unknown method error", logger_1.Logger.errors.UNKNOWN_ERROR, { + method: method, + params: params + })]; + } + }); + }); +} +var FallbackProvider = /** @class */ (function (_super) { + __extends(FallbackProvider, _super); + function FallbackProvider(providers, quorum) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, FallbackProvider); + if (providers.length === 0) { + logger.throwArgumentError("missing providers", "providers", providers); + } + var providerConfigs = providers.map(function (configOrProvider, index) { + if (abstract_provider_1.Provider.isProvider(configOrProvider)) { + var stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2000 : 750; + var priority = 1; + return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout: stallTimeout, priority: priority }); + } + var config = (0, properties_1.shallowCopy)(configOrProvider); + if (config.priority == null) { + config.priority = 1; + } + if (config.stallTimeout == null) { + config.stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2000 : 750; + } + if (config.weight == null) { + config.weight = 1; + } + var weight = config.weight; + if (weight % 1 || weight > 512 || weight < 1) { + logger.throwArgumentError("invalid weight; must be integer in [1, 512]", "providers[" + index + "].weight", weight); + } + return Object.freeze(config); + }); + var total = providerConfigs.reduce(function (accum, c) { return (accum + c.weight); }, 0); + if (quorum == null) { + quorum = total / 2; + } + else if (quorum > total) { + logger.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); + } + // Are all providers' networks are known + var networkOrReady = checkNetworks(providerConfigs.map(function (c) { return (c.provider).network; })); + // Not all networks are known; we must stall + if (networkOrReady == null) { + networkOrReady = new Promise(function (resolve, reject) { + setTimeout(function () { + _this.detectNetwork().then(resolve, reject); + }, 0); + }); + } + _this = _super.call(this, networkOrReady) || this; + // Preserve a copy, so we do not get mutated + (0, properties_1.defineReadOnly)(_this, "providerConfigs", Object.freeze(providerConfigs)); + (0, properties_1.defineReadOnly)(_this, "quorum", quorum); + _this._highestBlockNumber = -1; + return _this; + } + FallbackProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var networks; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Promise.all(this.providerConfigs.map(function (c) { return c.provider.getNetwork(); }))]; + case 1: + networks = _a.sent(); + return [2 /*return*/, checkNetworks(networks)]; + } + }); + }); + }; + FallbackProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var results, i_1, result, processFunc, configs, currentBlockNumber, i, first, _loop_1, this_1, state_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(method === "sendTransaction")) return [3 /*break*/, 2]; + return [4 /*yield*/, Promise.all(this.providerConfigs.map(function (c) { + return c.provider.sendTransaction(params.signedTransaction).then(function (result) { + return result.hash; + }, function (error) { + return error; + }); + }))]; + case 1: + results = _a.sent(); + // Any success is good enough (other errors are likely "already seen" errors + for (i_1 = 0; i_1 < results.length; i_1++) { + result = results[i_1]; + if (typeof (result) === "string") { + return [2 /*return*/, result]; + } + } + // They were all an error; pick the first error + throw results[0]; + case 2: + if (!(this._highestBlockNumber === -1 && method !== "getBlockNumber")) return [3 /*break*/, 4]; + return [4 /*yield*/, this.getBlockNumber()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + processFunc = getProcessFunc(this, method, params); + configs = (0, random_1.shuffled)(this.providerConfigs.map(properties_1.shallowCopy)); + configs.sort(function (a, b) { return (a.priority - b.priority); }); + currentBlockNumber = this._highestBlockNumber; + i = 0; + first = true; + _loop_1 = function () { + var t0, inflightWeight, _loop_2, waiting, results, result, errors; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + t0 = now(); + inflightWeight = configs.filter(function (c) { return (c.runner && ((t0 - c.start) < c.stallTimeout)); }) + .reduce(function (accum, c) { return (accum + c.weight); }, 0); + _loop_2 = function () { + var config = configs[i++]; + var rid = nextRid++; + config.start = now(); + config.staller = stall(config.stallTimeout); + config.staller.wait(function () { config.staller = null; }); + config.runner = getRunner(config, currentBlockNumber, method, params).then(function (result) { + config.done = true; + config.result = result; + if (_this.listenerCount("debug")) { + _this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: (0, properties_1.deepCopy)(params) }, + provider: _this + }); + } + }, function (error) { + config.done = true; + config.error = error; + if (_this.listenerCount("debug")) { + _this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: (0, properties_1.deepCopy)(params) }, + provider: _this + }); + } + }); + if (this_1.listenerCount("debug")) { + this_1.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, null), + request: { method: method, params: (0, properties_1.deepCopy)(params) }, + provider: this_1 + }); + } + inflightWeight += config.weight; + }; + // Start running enough to meet quorum + while (inflightWeight < this_1.quorum && i < configs.length) { + _loop_2(); + } + waiting = []; + configs.forEach(function (c) { + if (c.done || !c.runner) { + return; + } + waiting.push(c.runner); + if (c.staller) { + waiting.push(c.staller.getPromise()); + } + }); + if (!waiting.length) return [3 /*break*/, 2]; + return [4 /*yield*/, Promise.race(waiting)]; + case 1: + _b.sent(); + _b.label = 2; + case 2: + results = configs.filter(function (c) { return (c.done && c.error == null); }); + if (!(results.length >= this_1.quorum)) return [3 /*break*/, 5]; + result = processFunc(results); + if (result !== undefined) { + // Shut down any stallers + configs.forEach(function (c) { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return [2 /*return*/, { value: result }]; + } + if (!!first) return [3 /*break*/, 4]; + return [4 /*yield*/, stall(100).getPromise()]; + case 3: + _b.sent(); + _b.label = 4; + case 4: + first = false; + _b.label = 5; + case 5: + errors = configs.reduce(function (accum, c) { + if (!c.done || c.error == null) { + return accum; + } + var code = (c.error).code; + if (ForwardErrors.indexOf(code) >= 0) { + if (!accum[code]) { + accum[code] = { error: c.error, weight: 0 }; + } + accum[code].weight += c.weight; + } + return accum; + }, ({})); + Object.keys(errors).forEach(function (errorCode) { + var tally = errors[errorCode]; + if (tally.weight < _this.quorum) { + return; + } + // Shut down any stallers + configs.forEach(function (c) { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + var e = (tally.error); + var props = {}; + ForwardProperties.forEach(function (name) { + if (e[name] == null) { + return; + } + props[name] = e[name]; + }); + logger.throwError(e.reason || e.message, errorCode, props); + }); + // All configs have run to completion; we will never get more data + if (configs.filter(function (c) { return !c.done; }).length === 0) { + return [2 /*return*/, "break"]; + } + return [2 /*return*/]; + } + }); + }; + this_1 = this; + _a.label = 5; + case 5: + if (!true) return [3 /*break*/, 7]; + return [5 /*yield**/, _loop_1()]; + case 6: + state_1 = _a.sent(); + if (typeof state_1 === "object") + return [2 /*return*/, state_1.value]; + if (state_1 === "break") + return [3 /*break*/, 7]; + return [3 /*break*/, 5]; + case 7: + // Shut down any stallers; shouldn't be any + configs.forEach(function (c) { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return [2 /*return*/, logger.throwError("failed to meet quorum", logger_1.Logger.errors.SERVER_ERROR, { + method: method, + params: params, + //results: configs.map((c) => c.result), + //errors: configs.map((c) => c.error), + results: configs.map(function (c) { return exposeDebugConfig(c); }), + provider: this + })]; + } + }); + }); + }; + return FallbackProvider; +}(base_provider_1.BaseProvider)); +exports.FallbackProvider = FallbackProvider; +//# sourceMappingURL=fallback-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/fallback-provider.js.map b/node_modules/@ethersproject/providers/lib/fallback-provider.js.map new file mode 100644 index 0000000..cf376de --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/fallback-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fallback-provider.js","sourceRoot":"","sources":["../src.ts/fallback-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,sEAA0F;AAC1F,sDAAqD;AACrD,8CAAmD;AAEnD,wDAAkF;AAClF,gDAAiD;AACjD,0CAA0C;AAE1C,iDAA+C;AAC/C,yCAAkD;AAElD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,SAAS,GAAG,KAAK,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAEjD,mEAAmE;AACnE,oDAAoD;AACpD,SAAS,aAAa,CAAC,QAAwB;IAC3C,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE5B,0CAA0C;QAC1C,IAAI,OAAO,IAAI,IAAI,EAAE;YAAE,OAAO,IAAI,CAAC;SAAE;QAErC,IAAI,MAAM,EAAE;YACR,sDAAsD;YACtD,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO;gBACpE,CAAC,CAAC,MAAM,CAAC,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,IAAI,OAA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CAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;6BAAE;4BACtC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;wBACvB,CAAC,CAAC,CAAC;wBAEH,sBAAO,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,eAAM,CAAC,MAAM,CAAC,YAAY,EAAE;gCAC1E,MAAM,EAAE,MAAM;gCACd,MAAM,EAAE,MAAM;gCACd,wCAAwC;gCACxC,sCAAsC;gCACtC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,iBAAiB,CAAC,CAAC,CAAC,EAApB,CAAoB,CAAC;gCACjD,QAAQ,EAAE,IAAI;6BACjB,CAAC,EAAC;;;;KACN;IACL,uBAAC;AAAD,CAAC,AA1PD,CAAsC,4BAAY,GA0PjD;AA1PY,4CAAgB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/formatter.d.ts b/node_modules/@ethersproject/providers/lib/formatter.d.ts new file mode 100644 index 0000000..8d7f2f6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/formatter.d.ts @@ -0,0 +1,60 @@ +import { Block, TransactionReceipt, TransactionResponse } from "@ethersproject/abstract-provider"; +import { BigNumber } from "@ethersproject/bignumber"; +import { AccessList } from "@ethersproject/transactions"; +export declare type FormatFunc = (value: any) => any; +export declare type FormatFuncs = { + [key: string]: FormatFunc; +}; +export declare type Formats = { + transaction: FormatFuncs; + transactionRequest: FormatFuncs; + receipt: FormatFuncs; + receiptLog: FormatFuncs; + block: FormatFuncs; + blockWithTransactions: FormatFuncs; + filter: FormatFuncs; + filterLog: FormatFuncs; +}; +export declare class Formatter { + readonly formats: Formats; + constructor(); + getDefaultFormats(): Formats; + accessList(accessList: Array): AccessList; + number(number: any): number; + type(number: any): number; + bigNumber(value: any): BigNumber; + boolean(value: any): boolean; + hex(value: any, strict?: boolean): string; + data(value: any, strict?: boolean): string; + address(value: any): string; + callAddress(value: any): string; + contractAddress(value: any): string; + blockTag(blockTag: any): string; + hash(value: any, strict?: boolean): string; + difficulty(value: any): number; + uint256(value: any): string; + _block(value: any, format: any): Block; + block(value: any): Block; + blockWithTransactions(value: any): Block; + transactionRequest(value: any): any; + transactionResponse(transaction: any): TransactionResponse; + transaction(value: any): any; + receiptLog(value: any): any; + receipt(value: any): TransactionReceipt; + topics(value: any): any; + filter(value: any): any; + filterLog(value: any): any; + static check(format: { + [name: string]: FormatFunc; + }, object: any): any; + static allowNull(format: FormatFunc, nullValue?: any): FormatFunc; + static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc; + static arrayOf(format: FormatFunc): FormatFunc; +} +export interface CommunityResourcable { + isCommunityResource(): boolean; +} +export declare function isCommunityResourcable(value: any): value is CommunityResourcable; +export declare function isCommunityResource(value: any): boolean; +export declare function showThrottleMessage(): void; +//# sourceMappingURL=formatter.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/formatter.d.ts.map b/node_modules/@ethersproject/providers/lib/formatter.d.ts.map new file mode 100644 index 0000000..5815617 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/formatter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../src.ts/formatter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAElG,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAIrD,OAAO,EAAE,UAAU,EAA4C,MAAM,6BAA6B,CAAC;AAMnG,oBAAY,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE7C,oBAAY,WAAW,GAAG;IAAE,CAAE,GAAG,EAAE,MAAM,GAAI,UAAU,CAAA;CAAE,CAAC;AAE1D,oBAAY,OAAO,GAAG;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,EAAE,WAAW,CAAC;IAChC,OAAO,EAAE,WAA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,GAAG,KAAK;IAKxC,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAInC,mBAAmB,CAAC,WAAW,EAAE,GAAG,GAAG,mBAAmB;IAqE1D,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAI5B,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAI3B,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,kBAAkB;IA+BvC,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAWvB,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAIvB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAI1B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;QAAE,CAAE,IAAI,EAAE,MAAM,GAAI,UAAU,CAAA;KAAE,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG;IAgBxE,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,GAAG,UAAU;IAQjE,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,GAAG,UAAU;IAQtE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU;CAajD;AAED,MAAM,WAAW,oBAAoB;IACjC,mBAAmB,IAAI,OAAO,CAAC;CAClC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,oBAAoB,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEvD;AAID,wBAAgB,mBAAmB,SAgBlC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/formatter.js b/node_modules/@ethersproject/providers/lib/formatter.js new file mode 100644 index 0000000..953231c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/formatter.js @@ -0,0 +1,453 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.showThrottleMessage = exports.isCommunityResource = exports.isCommunityResourcable = exports.Formatter = void 0; +var address_1 = require("@ethersproject/address"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var constants_1 = require("@ethersproject/constants"); +var properties_1 = require("@ethersproject/properties"); +var transactions_1 = require("@ethersproject/transactions"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var Formatter = /** @class */ (function () { + function Formatter() { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, Formatter); + this.formats = this.getDefaultFormats(); + } + Formatter.prototype.getDefaultFormats = function () { + var _this = this; + var formats = ({}); + var address = this.address.bind(this); + var bigNumber = this.bigNumber.bind(this); + var blockTag = this.blockTag.bind(this); + var data = this.data.bind(this); + var hash = this.hash.bind(this); + var hex = this.hex.bind(this); + var number = this.number.bind(this); + var type = this.type.bind(this); + var strictData = function (v) { return _this.data(v, true); }; + formats.transaction = { + hash: hash, + type: type, + accessList: Formatter.allowNull(this.accessList.bind(this), null), + blockHash: Formatter.allowNull(hash, null), + blockNumber: Formatter.allowNull(number, null), + transactionIndex: Formatter.allowNull(number, null), + confirmations: Formatter.allowNull(number, null), + from: address, + // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) + // must be set + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + gasLimit: bigNumber, + to: Formatter.allowNull(address, null), + value: bigNumber, + nonce: number, + data: data, + r: Formatter.allowNull(this.uint256), + s: Formatter.allowNull(this.uint256), + v: Formatter.allowNull(number), + creates: Formatter.allowNull(address, null), + raw: Formatter.allowNull(data), + }; + formats.transactionRequest = { + from: Formatter.allowNull(address), + nonce: Formatter.allowNull(number), + gasLimit: Formatter.allowNull(bigNumber), + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + to: Formatter.allowNull(address), + value: Formatter.allowNull(bigNumber), + data: Formatter.allowNull(strictData), + type: Formatter.allowNull(number), + accessList: Formatter.allowNull(this.accessList.bind(this), null), + }; + formats.receiptLog = { + transactionIndex: number, + blockNumber: number, + transactionHash: hash, + address: address, + topics: Formatter.arrayOf(hash), + data: data, + logIndex: number, + blockHash: hash, + }; + formats.receipt = { + to: Formatter.allowNull(this.address, null), + from: Formatter.allowNull(this.address, null), + contractAddress: Formatter.allowNull(address, null), + transactionIndex: number, + // should be allowNull(hash), but broken-EIP-658 support is handled in receipt + root: Formatter.allowNull(hex), + gasUsed: bigNumber, + logsBloom: Formatter.allowNull(data), + blockHash: hash, + transactionHash: hash, + logs: Formatter.arrayOf(this.receiptLog.bind(this)), + blockNumber: number, + confirmations: Formatter.allowNull(number, null), + cumulativeGasUsed: bigNumber, + effectiveGasPrice: Formatter.allowNull(bigNumber), + status: Formatter.allowNull(number), + type: type + }; + formats.block = { + hash: hash, + parentHash: hash, + number: number, + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + gasLimit: bigNumber, + gasUsed: bigNumber, + miner: address, + extraData: data, + transactions: Formatter.allowNull(Formatter.arrayOf(hash)), + baseFeePerGas: Formatter.allowNull(bigNumber) + }; + formats.blockWithTransactions = (0, properties_1.shallowCopy)(formats.block); + formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))); + formats.filter = { + fromBlock: Formatter.allowNull(blockTag, undefined), + toBlock: Formatter.allowNull(blockTag, undefined), + blockHash: Formatter.allowNull(hash, undefined), + address: Formatter.allowNull(address, undefined), + topics: Formatter.allowNull(this.topics.bind(this), undefined), + }; + formats.filterLog = { + blockNumber: Formatter.allowNull(number), + blockHash: Formatter.allowNull(hash), + transactionIndex: number, + removed: Formatter.allowNull(this.boolean.bind(this)), + address: address, + data: Formatter.allowFalsish(data, "0x"), + topics: Formatter.arrayOf(hash), + transactionHash: hash, + logIndex: number, + }; + return formats; + }; + Formatter.prototype.accessList = function (accessList) { + return (0, transactions_1.accessListify)(accessList || []); + }; + // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number + // Strict! Used on input. + Formatter.prototype.number = function (number) { + if (number === "0x") { + return 0; + } + return bignumber_1.BigNumber.from(number).toNumber(); + }; + Formatter.prototype.type = function (number) { + if (number === "0x" || number == null) { + return 0; + } + return bignumber_1.BigNumber.from(number).toNumber(); + }; + // Strict! Used on input. + Formatter.prototype.bigNumber = function (value) { + return bignumber_1.BigNumber.from(value); + }; + // Requires a boolean, "true" or "false"; returns a boolean + Formatter.prototype.boolean = function (value) { + if (typeof (value) === "boolean") { + return value; + } + if (typeof (value) === "string") { + value = value.toLowerCase(); + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + } + throw new Error("invalid boolean - " + value); + }; + Formatter.prototype.hex = function (value, strict) { + if (typeof (value) === "string") { + if (!strict && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if ((0, bytes_1.isHexString)(value)) { + return value.toLowerCase(); + } + } + return logger.throwArgumentError("invalid hash", "value", value); + }; + Formatter.prototype.data = function (value, strict) { + var result = this.hex(value, strict); + if ((result.length % 2) !== 0) { + throw new Error("invalid data; odd-length - " + value); + } + return result; + }; + // Requires an address + // Strict! Used on input. + Formatter.prototype.address = function (value) { + return (0, address_1.getAddress)(value); + }; + Formatter.prototype.callAddress = function (value) { + if (!(0, bytes_1.isHexString)(value, 32)) { + return null; + } + var address = (0, address_1.getAddress)((0, bytes_1.hexDataSlice)(value, 12)); + return (address === constants_1.AddressZero) ? null : address; + }; + Formatter.prototype.contractAddress = function (value) { + return (0, address_1.getContractAddress)(value); + }; + // Strict! Used on input. + Formatter.prototype.blockTag = function (blockTag) { + if (blockTag == null) { + return "latest"; + } + if (blockTag === "earliest") { + return "0x0"; + } + if (blockTag === "latest" || blockTag === "pending") { + return blockTag; + } + if (typeof (blockTag) === "number" || (0, bytes_1.isHexString)(blockTag)) { + return (0, bytes_1.hexValue)(blockTag); + } + throw new Error("invalid blockTag"); + }; + // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash. + Formatter.prototype.hash = function (value, strict) { + var result = this.hex(value, strict); + if ((0, bytes_1.hexDataLength)(result) !== 32) { + return logger.throwArgumentError("invalid hash", "value", value); + } + return result; + }; + // Returns the difficulty as a number, or if too large (i.e. PoA network) null + Formatter.prototype.difficulty = function (value) { + if (value == null) { + return null; + } + var v = bignumber_1.BigNumber.from(value); + try { + return v.toNumber(); + } + catch (error) { } + return null; + }; + Formatter.prototype.uint256 = function (value) { + if (!(0, bytes_1.isHexString)(value)) { + throw new Error("invalid uint256"); + } + return (0, bytes_1.hexZeroPad)(value, 32); + }; + Formatter.prototype._block = function (value, format) { + if (value.author != null && value.miner == null) { + value.miner = value.author; + } + // The difficulty may need to come from _difficulty in recursed blocks + var difficulty = (value._difficulty != null) ? value._difficulty : value.difficulty; + var result = Formatter.check(format, value); + result._difficulty = ((difficulty == null) ? null : bignumber_1.BigNumber.from(difficulty)); + return result; + }; + Formatter.prototype.block = function (value) { + return this._block(value, this.formats.block); + }; + Formatter.prototype.blockWithTransactions = function (value) { + return this._block(value, this.formats.blockWithTransactions); + }; + // Strict! Used on input. + Formatter.prototype.transactionRequest = function (value) { + return Formatter.check(this.formats.transactionRequest, value); + }; + Formatter.prototype.transactionResponse = function (transaction) { + // Rename gas to gasLimit + if (transaction.gas != null && transaction.gasLimit == null) { + transaction.gasLimit = transaction.gas; + } + // Some clients (TestRPC) do strange things like return 0x0 for the + // 0 address; correct this to be a real address + if (transaction.to && bignumber_1.BigNumber.from(transaction.to).isZero()) { + transaction.to = "0x0000000000000000000000000000000000000000"; + } + // Rename input to data + if (transaction.input != null && transaction.data == null) { + transaction.data = transaction.input; + } + // If to and creates are empty, populate the creates from the transaction + if (transaction.to == null && transaction.creates == null) { + transaction.creates = this.contractAddress(transaction); + } + if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) { + transaction.accessList = []; + } + var result = Formatter.check(this.formats.transaction, transaction); + if (transaction.chainId != null) { + var chainId = transaction.chainId; + if ((0, bytes_1.isHexString)(chainId)) { + chainId = bignumber_1.BigNumber.from(chainId).toNumber(); + } + result.chainId = chainId; + } + else { + var chainId = transaction.networkId; + // geth-etc returns chainId + if (chainId == null && result.v == null) { + chainId = transaction.chainId; + } + if ((0, bytes_1.isHexString)(chainId)) { + chainId = bignumber_1.BigNumber.from(chainId).toNumber(); + } + if (typeof (chainId) !== "number" && result.v != null) { + chainId = (result.v - 35) / 2; + if (chainId < 0) { + chainId = 0; + } + chainId = parseInt(chainId); + } + if (typeof (chainId) !== "number") { + chainId = 0; + } + result.chainId = chainId; + } + // 0x0000... should actually be null + if (result.blockHash && result.blockHash.replace(/0/g, "") === "x") { + result.blockHash = null; + } + return result; + }; + Formatter.prototype.transaction = function (value) { + return (0, transactions_1.parse)(value); + }; + Formatter.prototype.receiptLog = function (value) { + return Formatter.check(this.formats.receiptLog, value); + }; + Formatter.prototype.receipt = function (value) { + var result = Formatter.check(this.formats.receipt, value); + // RSK incorrectly implemented EIP-658, so we munge things a bit here for it + if (result.root != null) { + if (result.root.length <= 4) { + // Could be 0x00, 0x0, 0x01 or 0x1 + var value_1 = bignumber_1.BigNumber.from(result.root).toNumber(); + if (value_1 === 0 || value_1 === 1) { + // Make sure if both are specified, they match + if (result.status != null && (result.status !== value_1)) { + logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); + } + result.status = value_1; + delete result.root; + } + else { + logger.throwArgumentError("invalid alt-root-status", "value.root", result.root); + } + } + else if (result.root.length !== 66) { + // Must be a valid bytes32 + logger.throwArgumentError("invalid root hash", "value.root", result.root); + } + } + if (result.status != null) { + result.byzantium = true; + } + return result; + }; + Formatter.prototype.topics = function (value) { + var _this = this; + if (Array.isArray(value)) { + return value.map(function (v) { return _this.topics(v); }); + } + else if (value != null) { + return this.hash(value, true); + } + return null; + }; + Formatter.prototype.filter = function (value) { + return Formatter.check(this.formats.filter, value); + }; + Formatter.prototype.filterLog = function (value) { + return Formatter.check(this.formats.filterLog, value); + }; + Formatter.check = function (format, object) { + var result = {}; + for (var key in format) { + try { + var value = format[key](object[key]); + if (value !== undefined) { + result[key] = value; + } + } + catch (error) { + error.checkKey = key; + error.checkValue = object[key]; + throw error; + } + } + return result; + }; + // if value is null-ish, nullValue is returned + Formatter.allowNull = function (format, nullValue) { + return (function (value) { + if (value == null) { + return nullValue; + } + return format(value); + }); + }; + // If value is false-ish, replaceValue is returned + Formatter.allowFalsish = function (format, replaceValue) { + return (function (value) { + if (!value) { + return replaceValue; + } + return format(value); + }); + }; + // Requires an Array satisfying check + Formatter.arrayOf = function (format) { + return (function (array) { + if (!Array.isArray(array)) { + throw new Error("not an array"); + } + var result = []; + array.forEach(function (value) { + result.push(format(value)); + }); + return result; + }); + }; + return Formatter; +}()); +exports.Formatter = Formatter; +function isCommunityResourcable(value) { + return (value && typeof (value.isCommunityResource) === "function"); +} +exports.isCommunityResourcable = isCommunityResourcable; +function isCommunityResource(value) { + return (isCommunityResourcable(value) && value.isCommunityResource()); +} +exports.isCommunityResource = isCommunityResource; +// Show the throttle message only once +var throttleMessage = false; +function showThrottleMessage() { + if (throttleMessage) { + return; + } + throttleMessage = true; + console.log("========= NOTICE ========="); + console.log("Request-Rate Exceeded (this message will not be repeated)"); + console.log(""); + console.log("The default API keys for each service are provided as a highly-throttled,"); + console.log("community resource for low-traffic projects and early prototyping."); + console.log(""); + console.log("While your application will continue to function, we highly recommended"); + console.log("signing up for your own API keys to improve performance, increase your"); + console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."); + console.log(""); + console.log("For more details: https:/\/docs.ethers.io/api-keys/"); + console.log("=========================="); +} +exports.showThrottleMessage = showThrottleMessage; +//# sourceMappingURL=formatter.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/formatter.js.map b/node_modules/@ethersproject/providers/lib/formatter.js.map new file mode 100644 index 0000000..77c8044 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/formatter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../src.ts/formatter.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,kDAAwE;AACxE,sDAAqD;AACrD,8CAAsG;AACtG,sDAAuD;AACvD,wDAAwD;AACxD,4DAAmG;AAEnG,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAiBnC;IAGI;;QACI,MAAM,CAAC,QAAQ,aAAa,SAAS,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC5C,CAAC;IAED,qCAAiB,GAAjB;QAAA,iBA8IC;QA7IG,IAAM,OAAO,GAAqB,CAAC,EAAG,CAAC,CAAC;QAExC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElC,IAAM,UAAU,GAAG,UAAC,CAAM,IAAO,OAAO,KAAI,CAA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CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;IACvF,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,+EAA+E,CAAC,CAAC;IAC7F,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAC9C,CAAC;AAhBD,kDAgBC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/index.d.ts b/node_modules/@ethersproject/providers/lib/index.d.ts new file mode 100644 index 0000000..9f7d139 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/index.d.ts @@ -0,0 +1,22 @@ +import { Block, BlockTag, EventType, FeeData, Filter, Log, Listener, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { getNetwork } from "@ethersproject/networks"; +import { Network, Networkish } from "@ethersproject/networks"; +import { BaseProvider, EnsProvider, EnsResolver, Resolver } from "./base-provider"; +import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider"; +import { CloudflareProvider } from "./cloudflare-provider"; +import { EtherscanProvider } from "./etherscan-provider"; +import { FallbackProvider, FallbackProviderConfig } from "./fallback-provider"; +import { IpcProvider } from "./ipc-provider"; +import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; +import { JsonRpcBatchProvider } from "./json-rpc-batch-provider"; +import { NodesmithProvider } from "./nodesmith-provider"; +import { PocketProvider } from "./pocket-provider"; +import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Web3Provider } from "./web3-provider"; +import { WebSocketProvider } from "./websocket-provider"; +import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider"; +import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter"; +declare function getDefaultProvider(network?: Networkish, options?: any): BaseProvider; +export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/index.d.ts.map b/node_modules/@ethersproject/providers/lib/index.d.ts.map new file mode 100644 index 0000000..20686f7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAA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,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAMnB,SAAS,EAMT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAEhB,sBAAsB,EAEtB,OAAO,EACP,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,oBAAoB,EACvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/index.js b/node_modules/@ethersproject/providers/lib/index.js new file mode 100644 index 0000000..21a910b --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/index.js @@ -0,0 +1,92 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0; +var abstract_provider_1 = require("@ethersproject/abstract-provider"); +Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return abstract_provider_1.Provider; } }); +var networks_1 = require("@ethersproject/networks"); +Object.defineProperty(exports, "getNetwork", { enumerable: true, get: function () { return networks_1.getNetwork; } }); +var base_provider_1 = require("./base-provider"); +Object.defineProperty(exports, "BaseProvider", { enumerable: true, get: function () { return base_provider_1.BaseProvider; } }); +Object.defineProperty(exports, "Resolver", { enumerable: true, get: function () { return base_provider_1.Resolver; } }); +var alchemy_provider_1 = require("./alchemy-provider"); +Object.defineProperty(exports, "AlchemyProvider", { enumerable: true, get: function () { return alchemy_provider_1.AlchemyProvider; } }); +Object.defineProperty(exports, "AlchemyWebSocketProvider", { enumerable: true, get: function () { return alchemy_provider_1.AlchemyWebSocketProvider; } }); +var cloudflare_provider_1 = require("./cloudflare-provider"); +Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return cloudflare_provider_1.CloudflareProvider; } }); +var etherscan_provider_1 = require("./etherscan-provider"); +Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return etherscan_provider_1.EtherscanProvider; } }); +var fallback_provider_1 = require("./fallback-provider"); +Object.defineProperty(exports, "FallbackProvider", { enumerable: true, get: function () { return fallback_provider_1.FallbackProvider; } }); +var ipc_provider_1 = require("./ipc-provider"); +Object.defineProperty(exports, "IpcProvider", { enumerable: true, get: function () { return ipc_provider_1.IpcProvider; } }); +var infura_provider_1 = require("./infura-provider"); +Object.defineProperty(exports, "InfuraProvider", { enumerable: true, get: function () { return infura_provider_1.InfuraProvider; } }); +Object.defineProperty(exports, "InfuraWebSocketProvider", { enumerable: true, get: function () { return infura_provider_1.InfuraWebSocketProvider; } }); +var json_rpc_provider_1 = require("./json-rpc-provider"); +Object.defineProperty(exports, "JsonRpcProvider", { enumerable: true, get: function () { return json_rpc_provider_1.JsonRpcProvider; } }); +Object.defineProperty(exports, "JsonRpcSigner", { enumerable: true, get: function () { return json_rpc_provider_1.JsonRpcSigner; } }); +var json_rpc_batch_provider_1 = require("./json-rpc-batch-provider"); +Object.defineProperty(exports, "JsonRpcBatchProvider", { enumerable: true, get: function () { return json_rpc_batch_provider_1.JsonRpcBatchProvider; } }); +var nodesmith_provider_1 = require("./nodesmith-provider"); +Object.defineProperty(exports, "NodesmithProvider", { enumerable: true, get: function () { return nodesmith_provider_1.NodesmithProvider; } }); +var pocket_provider_1 = require("./pocket-provider"); +Object.defineProperty(exports, "PocketProvider", { enumerable: true, get: function () { return pocket_provider_1.PocketProvider; } }); +var url_json_rpc_provider_1 = require("./url-json-rpc-provider"); +Object.defineProperty(exports, "StaticJsonRpcProvider", { enumerable: true, get: function () { return url_json_rpc_provider_1.StaticJsonRpcProvider; } }); +Object.defineProperty(exports, "UrlJsonRpcProvider", { enumerable: true, get: function () { return url_json_rpc_provider_1.UrlJsonRpcProvider; } }); +var web3_provider_1 = require("./web3-provider"); +Object.defineProperty(exports, "Web3Provider", { enumerable: true, get: function () { return web3_provider_1.Web3Provider; } }); +var websocket_provider_1 = require("./websocket-provider"); +Object.defineProperty(exports, "WebSocketProvider", { enumerable: true, get: function () { return websocket_provider_1.WebSocketProvider; } }); +var formatter_1 = require("./formatter"); +Object.defineProperty(exports, "Formatter", { enumerable: true, get: function () { return formatter_1.Formatter; } }); +Object.defineProperty(exports, "isCommunityResourcable", { enumerable: true, get: function () { return formatter_1.isCommunityResourcable; } }); +Object.defineProperty(exports, "isCommunityResource", { enumerable: true, get: function () { return formatter_1.isCommunityResource; } }); +Object.defineProperty(exports, "showThrottleMessage", { enumerable: true, get: function () { return formatter_1.showThrottleMessage; } }); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +//////////////////////// +// Helper Functions +function getDefaultProvider(network, options) { + if (network == null) { + network = "homestead"; + } + // If passed a URL, figure out the right type of provider based on the scheme + if (typeof (network) === "string") { + // @TODO: Add support for IpcProvider; maybe if it ends in ".ipc"? + // Handle http and ws (and their secure variants) + var match = network.match(/^(ws|http)s?:/i); + if (match) { + switch (match[1]) { + case "http": + return new json_rpc_provider_1.JsonRpcProvider(network); + case "ws": + return new websocket_provider_1.WebSocketProvider(network); + default: + logger.throwArgumentError("unsupported URL scheme", "network", network); + } + } + } + var n = (0, networks_1.getNetwork)(network); + if (!n || !n._defaultProvider) { + logger.throwError("unsupported getDefaultProvider network", logger_1.Logger.errors.NETWORK_ERROR, { + operation: "getDefaultProvider", + network: network + }); + } + return n._defaultProvider({ + FallbackProvider: fallback_provider_1.FallbackProvider, + AlchemyProvider: alchemy_provider_1.AlchemyProvider, + CloudflareProvider: cloudflare_provider_1.CloudflareProvider, + EtherscanProvider: etherscan_provider_1.EtherscanProvider, + InfuraProvider: infura_provider_1.InfuraProvider, + JsonRpcProvider: json_rpc_provider_1.JsonRpcProvider, + NodesmithProvider: nodesmith_provider_1.NodesmithProvider, + PocketProvider: pocket_provider_1.PocketProvider, + Web3Provider: web3_provider_1.Web3Provider, + IpcProvider: ipc_provider_1.IpcProvider, + }, options); +} +exports.getDefaultProvider = getDefaultProvider; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/index.js.map b/node_modules/@ethersproject/providers/lib/index.js.map new file mode 100644 index 0000000..8beeb43 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,sEAY0C;AAkFtC,yFAtFA,4BAAQ,OAsFA;AAhFZ,oDAAqD;AAuHjD,2FAvHK,qBAAU,OAuHL;AApHd,iDAAmF;AA8E/E,6FA9EK,4BAAY,OA8EL;AAEZ,yFAhF6C,wBAAQ,OAgF7C;AA9EZ,uDAA+E;AAuF3E,gGAvFK,kCAAe,OAuFL;AACf,yGAxFsB,2CAAwB,OAwFtB;AAvF5B,6DAA2D;AAwFvD,mGAxFK,wCAAkB,OAwFL;AAvFtB,2DAAyD;AAwFrD,kGAxFK,sCAAiB,OAwFL;AAvFrB,yDAA+E;AAkF3E,iGAlFK,oCAAgB,OAkFL;AAjFpB,+CAA6C;AAiGzC,4FAjGK,0BAAW,OAiGL;AAhGf,qDAA4E;AAsFxE,+FAtFK,gCAAc,OAsFL;AACd,wGAvFqB,yCAAuB,OAuFrB;AAtF3B,yDAAqE;AAuFjE,gGAvFK,mCAAe,OAuFL;AAcf,8FArGsB,iCAAa,OAqGtB;AApGjB,qEAAiE;AAuF7D,qGAvFK,8CAAoB,OAuFL;AAtF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,CAAC,CAAC,CAAC,gBAAgB,EAAE;QAC3B,MAAM,CAAC,UAAU,CAAC,wCAAwC,EAAE,eAAM,CAAC,MAAM,CAAC,aAAa,EAAE;YACrF,SAAS,EAAE,oBAAoB;YAC/B,OAAO,EAAE,OAAO;SACnB,CAAC,CAAC;KACN;IAED,OAAO,CAAC,CAAC,gBAAgB,CAAC;QACtB,gBAAgB,sCAAA;QAEhB,eAAe,oCAAA;QACf,kBAAkB,0CAAA;QAClB,iBAAiB,wCAAA;QACjB,cAAc,kCAAA;QACd,eAAe,qCAAA;QACf,iBAAiB,wCAAA;QACjB,cAAc,kCAAA;QACd,YAAY,8BAAA;QAEZ,WAAW,4BAAA;KACd,EAAE,OAAO,CAAC,CAAC;AAChB,CAAC;AA8CG,gDAAkB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/infura-provider.d.ts b/node_modules/@ethersproject/providers/lib/infura-provider.d.ts new file mode 100644 index 0000000..2f4e297 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/infura-provider.d.ts @@ -0,0 +1,21 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { WebSocketProvider } from "./websocket-provider"; +import { CommunityResourcable } from "./formatter"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + readonly apiKey: string; + readonly projectId: string; + readonly projectSecret: string; + constructor(network?: Networkish, apiKey?: any); + isCommunityResource(): boolean; +} +export declare class InfuraProvider extends UrlJsonRpcProvider { + readonly projectId: string; + readonly projectSecret: string; + static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): ConnectionInfo; + isCommunityResource(): boolean; +} +//# sourceMappingURL=infura-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/infura-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/infura-provider.d.ts.map new file mode 100644 index 0000000..1953cc5 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/infura-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"infura-provider.d.ts","sourceRoot":"","sources":["../src.ts/infura-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,aAAa,CAAC;AAMxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAK7D,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,oBAAoB;IAC1F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;gBAEnB,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IAiB9C,mBAAmB,IAAI,OAAO;CAGjC;AAED,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,MAAM,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,uBAAuB;IAIxF,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IA8BlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;IA8D5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/infura-provider.js b/node_modules/@ethersproject/providers/lib/infura-provider.js new file mode 100644 index 0000000..2623218 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/infura-provider.js @@ -0,0 +1,147 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InfuraProvider = exports.InfuraWebSocketProvider = void 0; +var properties_1 = require("@ethersproject/properties"); +var websocket_provider_1 = require("./websocket-provider"); +var formatter_1 = require("./formatter"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var url_json_rpc_provider_1 = require("./url-json-rpc-provider"); +var defaultProjectId = "84842078b09946638c03157f83405213"; +var InfuraWebSocketProvider = /** @class */ (function (_super) { + __extends(InfuraWebSocketProvider, _super); + function InfuraWebSocketProvider(network, apiKey) { + var _this = this; + var provider = new InfuraProvider(network, apiKey); + var connection = provider.connection; + if (connection.password) { + logger.throwError("INFURA WebSocket project secrets unsupported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "InfuraProvider.getWebSocketProvider()" + }); + } + var url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/"); + _this = _super.call(this, url, network) || this; + (0, properties_1.defineReadOnly)(_this, "apiKey", provider.projectId); + (0, properties_1.defineReadOnly)(_this, "projectId", provider.projectId); + (0, properties_1.defineReadOnly)(_this, "projectSecret", provider.projectSecret); + return _this; + } + InfuraWebSocketProvider.prototype.isCommunityResource = function () { + return (this.projectId === defaultProjectId); + }; + return InfuraWebSocketProvider; +}(websocket_provider_1.WebSocketProvider)); +exports.InfuraWebSocketProvider = InfuraWebSocketProvider; +var InfuraProvider = /** @class */ (function (_super) { + __extends(InfuraProvider, _super); + function InfuraProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + InfuraProvider.getWebSocketProvider = function (network, apiKey) { + return new InfuraWebSocketProvider(network, apiKey); + }; + InfuraProvider.getApiKey = function (apiKey) { + var apiKeyObj = { + apiKey: defaultProjectId, + projectId: defaultProjectId, + projectSecret: null + }; + if (apiKey == null) { + return apiKeyObj; + } + if (typeof (apiKey) === "string") { + apiKeyObj.projectId = apiKey; + } + else if (apiKey.projectSecret != null) { + logger.assertArgument((typeof (apiKey.projectId) === "string"), "projectSecret requires a projectId", "projectId", apiKey.projectId); + logger.assertArgument((typeof (apiKey.projectSecret) === "string"), "invalid projectSecret", "projectSecret", "[REDACTED]"); + apiKeyObj.projectId = apiKey.projectId; + apiKeyObj.projectSecret = apiKey.projectSecret; + } + else if (apiKey.projectId) { + apiKeyObj.projectId = apiKey.projectId; + } + apiKeyObj.apiKey = apiKeyObj.projectId; + return apiKeyObj; + }; + InfuraProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "mainnet.infura.io"; + break; + case "ropsten": + host = "ropsten.infura.io"; + break; + case "rinkeby": + host = "rinkeby.infura.io"; + break; + case "kovan": + host = "kovan.infura.io"; + break; + case "goerli": + host = "goerli.infura.io"; + break; + case "matic": + host = "polygon-mainnet.infura.io"; + break; + case "maticmum": + host = "polygon-mumbai.infura.io"; + break; + case "optimism": + host = "optimism-mainnet.infura.io"; + break; + case "optimism-kovan": + host = "optimism-kovan.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-rinkeby": + host = "arbitrum-rinkeby.infura.io"; + break; + default: + logger.throwError("unsupported network", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + var connection = { + allowGzip: true, + url: ("https:/" + "/" + host + "/v3/" + apiKey.projectId), + throttleCallback: function (attempt, url) { + if (apiKey.projectId === defaultProjectId) { + (0, formatter_1.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret; + } + return connection; + }; + InfuraProvider.prototype.isCommunityResource = function () { + return (this.projectId === defaultProjectId); + }; + return InfuraProvider; +}(url_json_rpc_provider_1.UrlJsonRpcProvider)); +exports.InfuraProvider = InfuraProvider; +//# sourceMappingURL=infura-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/infura-provider.js.map b/node_modules/@ethersproject/providers/lib/infura-provider.js.map new file mode 100644 index 0000000..6f41169 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/infura-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"infura-provider.js","sourceRoot":"","sources":["../src.ts/infura-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAGb,wDAA2D;AAG3D,2DAAyD;AACzD,yCAAwE;AAExE,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iEAA6D;AAG7D,IAAM,gBAAgB,GAAG,kCAAkC,CAAA;AAE3D;IAA6C,2CAAiB;IAK1D,iCAAY,OAAoB,EAAE,MAAY;QAA9C,iBAeC;QAdG,IAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACrD,IAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;QACvC,IAAI,UAAU,CAAC,QAAQ,EAAE;YACrB,MAAM,CAAC,UAAU,CAAC,8CAA8C,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBACnG,SAAS,EAAE,uCAAuC;aACrD,CAAC,CAAC;SACN;QAED,IAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO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,GAAG,4BAA4B,CAAC;gBACpC,MAAM;YACV,KAAK,kBAAkB;gBACnB,IAAI,GAAG,4BAA4B,CAAC;gBACpC,MAAM;YACV;gBACI,MAAM,CAAC,UAAU,CAAC,qBAAqB,EAAE,eAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACrE,QAAQ,EAAE,SAAS;oBACnB,KAAK,EAAE,OAAO;iBACjB,CAAC,CAAC;SACV;QAED,IAAM,UAAU,GAAmB;YAC/B,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;YACzD,gBAAgB,EAAE,UAAC,OAAe,EAAE,GAAW;gBAC3C,IAAI,MAAM,CAAC,SAAS,KAAK,gBAAgB,EAAE;oBACvC,IAAA,+BAAmB,GAAE,CAAC;iBACzB;gBACD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;SACJ,CAAC;QAEF,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;YACrB,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAA;SAC7C;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,4CAAmB,GAAnB;QACI,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,CAAC;IACjD,CAAC;IACL,qBAAC;AAAD,CAAC,AAvGD,CAAoC,0CAAkB,GAuGrD;AAvGY,wCAAc"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts b/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts new file mode 100644 index 0000000..21fc4d3 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts @@ -0,0 +1,8 @@ +import { Networkish } from "@ethersproject/networks"; +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare class IpcProvider extends JsonRpcProvider { + readonly path: string; + constructor(path: string, network?: Networkish); + send(method: string, params: Array): Promise; +} +//# sourceMappingURL=ipc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts.map new file mode 100644 index 0000000..60ed50a --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ipc-provider.d.ts","sourceRoot":"","sources":["../src.ts/ipc-provider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,qBAAa,WAAY,SAAQ,eAAe;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU;IAc9C,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CA0CzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ipc-provider.js b/node_modules/@ethersproject/providers/lib/ipc-provider.js new file mode 100644 index 0000000..1a8d544 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ipc-provider.js @@ -0,0 +1,79 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IpcProvider = void 0; +var net_1 = require("net"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var json_rpc_provider_1 = require("./json-rpc-provider"); +var IpcProvider = /** @class */ (function (_super) { + __extends(IpcProvider, _super); + function IpcProvider(path, network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, IpcProvider); + if (path == null) { + logger.throwError("missing path", logger_1.Logger.errors.MISSING_ARGUMENT, { arg: "path" }); + } + _this = _super.call(this, "ipc://" + path, network) || this; + (0, properties_1.defineReadOnly)(_this, "path", path); + return _this; + } + // @TODO: Create a connection to the IPC path and use filters instead of polling for block + IpcProvider.prototype.send = function (method, params) { + // This method is very simple right now. We create a new socket + // connection each time, which may be slower, but the main + // advantage we are aiming for now is security. This simplifies + // multiplexing requests (since we do not need to multiplex). + var _this = this; + var payload = JSON.stringify({ + method: method, + params: params, + id: 42, + jsonrpc: "2.0" + }); + return new Promise(function (resolve, reject) { + var response = Buffer.alloc(0); + var stream = (0, net_1.connect)(_this.path); + stream.on("data", function (data) { + response = Buffer.concat([response, data]); + }); + stream.on("end", function () { + try { + resolve(JSON.parse(response.toString()).result); + // @TODO: Better pull apart the error + stream.destroy(); + } + catch (error) { + reject(error); + stream.destroy(); + } + }); + stream.on("error", function (error) { + reject(error); + stream.destroy(); + }); + stream.write(payload); + stream.end(); + }); + }; + return IpcProvider; +}(json_rpc_provider_1.JsonRpcProvider)); +exports.IpcProvider = IpcProvider; +//# sourceMappingURL=ipc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ipc-provider.js.map b/node_modules/@ethersproject/providers/lib/ipc-provider.js.map new file mode 100644 index 0000000..987d6b1 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ipc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ipc-provider.js","sourceRoot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,CAAC,CAAE,QAAQ,EAAE,IAAI,CAAE,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;gBACb,IAAI;oBACA,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;oBAChD,qCAAqC;oBACrC,MAAM,CAAC,OAAO,EAAE,CAAC;iBACpB;gBAAC,OAAO,KAAK,EAAE;oBACZ,MAAM,CAAC,KAAK,CAAC,CAAC;oBACd,MAAM,CAAC,OAAO,EAAE,CAAC;iBACpB;YACL,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,KAAK;gBACrB,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,MAAM,CAAC,OAAO,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACtB,MAAM,CAAC,GAAG,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC;IACL,kBAAC;AAAD,CAAC,AA3DD,CAAiC,mCAAe,GA2D/C;AA3DY,kCAAW"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts new file mode 100644 index 0000000..2ad7763 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts @@ -0,0 +1,17 @@ +/// +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare class JsonRpcBatchProvider extends JsonRpcProvider { + _pendingBatchAggregator: NodeJS.Timer; + _pendingBatch: Array<{ + request: { + method: string; + params: Array; + id: number; + jsonrpc: "2.0"; + }; + resolve: (result: any) => void; + reject: (error: Error) => void; + }>; + send(method: string, params: Array): Promise; +} +//# sourceMappingURL=json-rpc-batch-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts.map new file mode 100644 index 0000000..c2efbf0 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-batch-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,qBAAa,oBAAqB,SAAQ,eAAe;IACrD,uBAAuB,EAAE,MAAM,CAAC,KAAK,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC;QACjB,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,KAAK,CAAA;SAAE,CAAC;QAC5E,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;QAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KACjC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAgFzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js new file mode 100644 index 0000000..20f35c5 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js @@ -0,0 +1,99 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JsonRpcBatchProvider = void 0; +var properties_1 = require("@ethersproject/properties"); +var web_1 = require("@ethersproject/web"); +var json_rpc_provider_1 = require("./json-rpc-provider"); +// Experimental +var JsonRpcBatchProvider = /** @class */ (function (_super) { + __extends(JsonRpcBatchProvider, _super); + function JsonRpcBatchProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + JsonRpcBatchProvider.prototype.send = function (method, params) { + var _this = this; + var request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + if (this._pendingBatch == null) { + this._pendingBatch = []; + } + var inflightRequest = { request: request, resolve: null, reject: null }; + var promise = new Promise(function (resolve, reject) { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this._pendingBatch.push(inflightRequest); + if (!this._pendingBatchAggregator) { + // Schedule batch for next event loop + short duration + this._pendingBatchAggregator = setTimeout(function () { + // Get teh current batch and clear it, so new requests + // go into the next batch + var batch = _this._pendingBatch; + _this._pendingBatch = null; + _this._pendingBatchAggregator = null; + // Get the request as an array of requests + var request = batch.map(function (inflight) { return inflight.request; }); + _this.emit("debug", { + action: "requestBatch", + request: (0, properties_1.deepCopy)(request), + provider: _this + }); + return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request)).then(function (result) { + _this.emit("debug", { + action: "response", + request: request, + response: result, + provider: _this + }); + // For each result, feed it to the correct Promise, depending + // on whether it was a success or error + batch.forEach(function (inflightRequest, index) { + var payload = result[index]; + if (payload.error) { + var error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + inflightRequest.reject(error); + } + else { + inflightRequest.resolve(payload.result); + } + }); + }, function (error) { + _this.emit("debug", { + action: "response", + error: error, + request: request, + provider: _this + }); + batch.forEach(function (inflightRequest) { + inflightRequest.reject(error); + }); + }); + }, 10); + } + return promise; + }; + return JsonRpcBatchProvider; +}(json_rpc_provider_1.JsonRpcProvider)); +exports.JsonRpcBatchProvider = JsonRpcBatchProvider; +//# sourceMappingURL=json-rpc-batch-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js.map b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js.map new file mode 100644 index 0000000..3ba7722 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-batch-provider.js","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,wDAAqD;AACrD,0CAA+C;AAE/C,yDAAsD;AAEtD,eAAe;AAEf;IAA0C,wCAAe;IAAzD;;IAwFA,CAAC;IAhFG,mCAAI,GAAJ,UAAK,MAAc,EAAE,MAAkB;QAAvC,iBA+EC;QA9EG,IAAM,OAAO,GAAG;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,EAAE,KAAK;SACjB,CAAC;QAEF,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,IAAI,CAAC,aAAa,GAAG,EAAG,CAAC;SAC5B;QAED,IAAM,eAAe,GAAQ,EAAE,OAAO,SAAA,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAEtE,IAAM,OAAO,GAAG,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YACxC,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC;YAClC,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,CAAC,I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CAAC;4BACjC,KAAM,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;4BACvC,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;yBACjC;6BAAM;4BACH,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;yBAC3C;oBACL,CAAC,CAAC,CAAC;gBAEP,CAAC,EAAE,UAAC,KAAK;oBACL,KAAI,CAAC,IAAI,CAAC,OAAO,EAAE;wBACf,MAAM,EAAE,UAAU;wBAClB,KAAK,EAAE,KAAK;wBACZ,OAAO,EAAE,OAAO;wBAChB,QAAQ,EAAE,KAAI;qBACjB,CAAC,CAAC;oBAEH,KAAK,CAAC,OAAO,CAAC,UAAC,eAAe;wBAC1B,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAClC,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YAEP,CAAC,EAAE,EAAE,CAAC,CAAC;SACV;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;IACL,2BAAC;AAAD,CAAC,AAxFD,CAA0C,mCAAe,GAwFxD;AAxFY,oDAAoB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts b/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts new file mode 100644 index 0000000..c3ef0af --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts @@ -0,0 +1,54 @@ +import { Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer"; +import { Bytes } from "@ethersproject/bytes"; +import { Network, Networkish } from "@ethersproject/networks"; +import { Deferrable } from "@ethersproject/properties"; +import { AccessList } from "@ethersproject/transactions"; +import { ConnectionInfo } from "@ethersproject/web"; +import { BaseProvider, Event } from "./base-provider"; +export declare class JsonRpcSigner extends Signer implements TypedDataSigner { + readonly provider: JsonRpcProvider; + _index: number; + _address: string; + constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number); + connect(provider: Provider): JsonRpcSigner; + connectUnchecked(): JsonRpcSigner; + getAddress(): Promise; + sendUncheckedTransaction(transaction: Deferrable): Promise; + signTransaction(transaction: Deferrable): Promise; + sendTransaction(transaction: Deferrable): Promise; + signMessage(message: Bytes | string): Promise; + _legacySignMessage(message: Bytes | string): Promise; + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; + unlock(password: string): Promise; +} +declare class UncheckedJsonRpcSigner extends JsonRpcSigner { + sendTransaction(transaction: Deferrable): Promise; +} +export declare class JsonRpcProvider extends BaseProvider { + readonly connection: ConnectionInfo; + _pendingFilter: Promise; + _nextId: number; + _eventLoopCache: Record>; + get _cache(): Record>; + constructor(url?: ConnectionInfo | string, network?: Networkish); + static defaultUrl(): string; + detectNetwork(): Promise; + _uncachedDetectNetwork(): Promise; + getSigner(addressOrIndex?: string | number): JsonRpcSigner; + getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner; + listAccounts(): Promise>; + send(method: string, params: Array): Promise; + prepareRequest(method: string, params: any): [string, Array]; + perform(method: string, params: any): Promise; + _startEvent(event: Event): void; + _startPending(): void; + _stopEvent(event: Event): void; + static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { + [key: string]: boolean; + }): { + [key: string]: string | AccessList; + }; +} +export {}; +//# sourceMappingURL=json-rpc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts.map new file mode 100644 index 0000000..dd2f5e6 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,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AG,OAAO,CAAC,GAAG,CAAC;IAqDtD,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAE;IA4D7D,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA+BxD,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAK/B,aAAa,IAAI,IAAI;IA2CrB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAgB9B,MAAM,CAAC,kBAAkB,CAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;KAAE;CAgC9I"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-provider.js b/node_modules/@ethersproject/providers/lib/json-rpc-provider.js new file mode 100644 index 0000000..ecac1e7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-provider.js @@ -0,0 +1,763 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JsonRpcProvider = exports.JsonRpcSigner = void 0; +var abstract_signer_1 = require("@ethersproject/abstract-signer"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var hash_1 = require("@ethersproject/hash"); +var properties_1 = require("@ethersproject/properties"); +var strings_1 = require("@ethersproject/strings"); +var transactions_1 = require("@ethersproject/transactions"); +var web_1 = require("@ethersproject/web"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var base_provider_1 = require("./base-provider"); +var errorGas = ["call", "estimateGas"]; +function checkError(method, error, params) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === logger_1.Logger.errors.SERVER_ERROR) { + var e = error.error; + if (e && e.message.match("reverted") && (0, bytes_1.isHexString)(e.data)) { + return e.data; + } + logger.throwError("missing revert data in call exception", logger_1.Logger.errors.CALL_EXCEPTION, { + error: error, + data: "0x" + }); + } + var message = error.message; + if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + message = (message || "").toLowerCase(); + var transaction = params.transaction || params.signedTransaction; + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", logger_1.Logger.errors.INSUFFICIENT_FUNDS, { + error: error, + method: method, + transaction: transaction + }); + } + // "nonce too low" + if (message.match(/nonce too low/)) { + logger.throwError("nonce has already been used", logger_1.Logger.errors.NONCE_EXPIRED, { + error: error, + method: method, + transaction: transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced/)) { + logger.throwError("replacement fee too low", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, { + error: error, + method: method, + transaction: transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/only replay-protected/)) { + logger.throwError("legacy pre-eip-155 transactions not supported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + error: error, + method: method, + transaction: transaction + }); + } + if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + method: method, + transaction: transaction + }); + } + throw error; +} +function timer(timeout) { + return new Promise(function (resolve) { + setTimeout(resolve, timeout); + }); +} +function getResult(payload) { + if (payload.error) { + // @TODO: not any + var error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + throw error; + } + return payload.result; +} +function getLowerCase(value) { + if (value) { + return value.toLowerCase(); + } + return value; +} +var _constructorGuard = {}; +var JsonRpcSigner = /** @class */ (function (_super) { + __extends(JsonRpcSigner, _super); + function JsonRpcSigner(constructorGuard, provider, addressOrIndex) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, JsonRpcSigner); + _this = _super.call(this) || this; + if (constructorGuard !== _constructorGuard) { + throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner"); + } + (0, properties_1.defineReadOnly)(_this, "provider", provider); + if (addressOrIndex == null) { + addressOrIndex = 0; + } + if (typeof (addressOrIndex) === "string") { + (0, properties_1.defineReadOnly)(_this, "_address", _this.provider.formatter.address(addressOrIndex)); + (0, properties_1.defineReadOnly)(_this, "_index", null); + } + else if (typeof (addressOrIndex) === "number") { + (0, properties_1.defineReadOnly)(_this, "_index", addressOrIndex); + (0, properties_1.defineReadOnly)(_this, "_address", null); + } + else { + logger.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); + } + return _this; + } + JsonRpcSigner.prototype.connect = function (provider) { + return logger.throwError("cannot alter JSON-RPC Signer connection", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "connect" + }); + }; + JsonRpcSigner.prototype.connectUnchecked = function () { + return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index); + }; + JsonRpcSigner.prototype.getAddress = function () { + var _this = this; + if (this._address) { + return Promise.resolve(this._address); + } + return this.provider.send("eth_accounts", []).then(function (accounts) { + if (accounts.length <= _this._index) { + logger.throwError("unknown account #" + _this._index, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress" + }); + } + return _this.provider.formatter.address(accounts[_this._index]); + }); + }; + JsonRpcSigner.prototype.sendUncheckedTransaction = function (transaction) { + var _this = this; + transaction = (0, properties_1.shallowCopy)(transaction); + var fromAddress = this.getAddress().then(function (address) { + if (address) { + address = address.toLowerCase(); + } + return address; + }); + // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user + // wishes to use this, it is easy to specify explicitly, otherwise + // we look it up for them. + if (transaction.gasLimit == null) { + var estimate = (0, properties_1.shallowCopy)(transaction); + estimate.from = fromAddress; + transaction.gasLimit = this.provider.estimateGas(estimate); + } + if (transaction.to != null) { + transaction.to = Promise.resolve(transaction.to).then(function (to) { return __awaiter(_this, void 0, void 0, function () { + var address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (to == null) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this.provider.resolveName(to)]; + case 1: + address = _a.sent(); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return [2 /*return*/, address]; + } + }); + }); }); + } + return (0, properties_1.resolveProperties)({ + tx: (0, properties_1.resolveProperties)(transaction), + sender: fromAddress + }).then(function (_a) { + var tx = _a.tx, sender = _a.sender; + if (tx.from != null) { + if (tx.from.toLowerCase() !== sender) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + } + else { + tx.from = sender; + } + var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true }); + return _this.provider.send("eth_sendTransaction", [hexTx]).then(function (hash) { + return hash; + }, function (error) { + return checkError("sendTransaction", error, hexTx); + }); + }); + }; + JsonRpcSigner.prototype.signTransaction = function (transaction) { + return logger.throwError("signing transactions is unsupported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signTransaction" + }); + }; + JsonRpcSigner.prototype.sendTransaction = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var blockNumber, hash, error_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)]; + case 1: + blockNumber = _a.sent(); + return [4 /*yield*/, this.sendUncheckedTransaction(transaction)]; + case 2: + hash = _a.sent(); + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, (0, web_1.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.provider.getTransaction(hash)]; + case 1: + tx = _a.sent(); + if (tx === null) { + return [2 /*return*/, undefined]; + } + return [2 /*return*/, this.provider._wrapTransaction(tx, hash, blockNumber)]; + } + }); + }); }, { oncePoll: this.provider })]; + case 4: + // Unfortunately, JSON-RPC only provides and opaque transaction hash + // for a response, and we need the actual transaction, so we poll + // for it; it should show up very quickly + return [2 /*return*/, _a.sent()]; + case 5: + error_1 = _a.sent(); + error_1.transactionHash = hash; + throw error_1; + case 6: return [2 /*return*/]; + } + }); + }); + }; + JsonRpcSigner.prototype.signMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + var data, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = ((typeof (message) === "string") ? (0, strings_1.toUtf8Bytes)(message) : message); + return [4 /*yield*/, this.getAddress()]; + case 1: + address = _a.sent(); + return [4 /*yield*/, this.provider.send("personal_sign", [(0, bytes_1.hexlify)(data), address.toLowerCase()])]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + JsonRpcSigner.prototype._legacySignMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + var data, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = ((typeof (message) === "string") ? (0, strings_1.toUtf8Bytes)(message) : message); + return [4 /*yield*/, this.getAddress()]; + case 1: + address = _a.sent(); + return [4 /*yield*/, this.provider.send("eth_sign", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])]; + case 2: + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + JsonRpcSigner.prototype._signTypedData = function (domain, types, value) { + return __awaiter(this, void 0, void 0, function () { + var populated, address; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, hash_1._TypedDataEncoder.resolveNames(domain, types, value, function (name) { + return _this.provider.resolveName(name); + })]; + case 1: + populated = _a.sent(); + return [4 /*yield*/, this.getAddress()]; + case 2: + address = _a.sent(); + return [4 /*yield*/, this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ])]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + JsonRpcSigner.prototype.unlock = function (password) { + return __awaiter(this, void 0, void 0, function () { + var provider, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + provider = this.provider; + return [4 /*yield*/, this.getAddress()]; + case 1: + address = _a.sent(); + return [2 /*return*/, provider.send("personal_unlockAccount", [address.toLowerCase(), password, null])]; + } + }); + }); + }; + return JsonRpcSigner; +}(abstract_signer_1.Signer)); +exports.JsonRpcSigner = JsonRpcSigner; +var UncheckedJsonRpcSigner = /** @class */ (function (_super) { + __extends(UncheckedJsonRpcSigner, _super); + function UncheckedJsonRpcSigner() { + return _super !== null && _super.apply(this, arguments) || this; + } + UncheckedJsonRpcSigner.prototype.sendTransaction = function (transaction) { + var _this = this; + return this.sendUncheckedTransaction(transaction).then(function (hash) { + return { + hash: hash, + nonce: null, + gasLimit: null, + gasPrice: null, + data: null, + value: null, + chainId: null, + confirmations: 0, + from: null, + wait: function (confirmations) { return _this.provider.waitForTransaction(hash, confirmations); } + }; + }); + }; + return UncheckedJsonRpcSigner; +}(JsonRpcSigner)); +var allowedTransactionKeys = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true +}; +var JsonRpcProvider = /** @class */ (function (_super) { + __extends(JsonRpcProvider, _super); + function JsonRpcProvider(url, network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, JsonRpcProvider); + var networkOrReady = network; + // The network is unknown, query the JSON-RPC for it + if (networkOrReady == null) { + networkOrReady = new Promise(function (resolve, reject) { + setTimeout(function () { + _this.detectNetwork().then(function (network) { + resolve(network); + }, function (error) { + reject(error); + }); + }, 0); + }); + } + _this = _super.call(this, networkOrReady) || this; + // Default URL + if (!url) { + url = (0, properties_1.getStatic)(_this.constructor, "defaultUrl")(); + } + if (typeof (url) === "string") { + (0, properties_1.defineReadOnly)(_this, "connection", Object.freeze({ + url: url + })); + } + else { + (0, properties_1.defineReadOnly)(_this, "connection", Object.freeze((0, properties_1.shallowCopy)(url))); + } + _this._nextId = 42; + return _this; + } + Object.defineProperty(JsonRpcProvider.prototype, "_cache", { + get: function () { + if (this._eventLoopCache == null) { + this._eventLoopCache = {}; + } + return this._eventLoopCache; + }, + enumerable: false, + configurable: true + }); + JsonRpcProvider.defaultUrl = function () { + return "http:/\/localhost:8545"; + }; + JsonRpcProvider.prototype.detectNetwork = function () { + var _this = this; + if (!this._cache["detectNetwork"]) { + this._cache["detectNetwork"] = this._uncachedDetectNetwork(); + // Clear this cache at the beginning of the next event loop + setTimeout(function () { + _this._cache["detectNetwork"] = null; + }, 0); + } + return this._cache["detectNetwork"]; + }; + JsonRpcProvider.prototype._uncachedDetectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var chainId, error_2, error_3, getNetwork; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, timer(0)]; + case 1: + _a.sent(); + chainId = null; + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 9]); + return [4 /*yield*/, this.send("eth_chainId", [])]; + case 3: + chainId = _a.sent(); + return [3 /*break*/, 9]; + case 4: + error_2 = _a.sent(); + _a.label = 5; + case 5: + _a.trys.push([5, 7, , 8]); + return [4 /*yield*/, this.send("net_version", [])]; + case 6: + chainId = _a.sent(); + return [3 /*break*/, 8]; + case 7: + error_3 = _a.sent(); + return [3 /*break*/, 8]; + case 8: return [3 /*break*/, 9]; + case 9: + if (chainId != null) { + getNetwork = (0, properties_1.getStatic)(this.constructor, "getNetwork"); + try { + return [2 /*return*/, getNetwork(bignumber_1.BigNumber.from(chainId).toNumber())]; + } + catch (error) { + return [2 /*return*/, logger.throwError("could not detect network", logger_1.Logger.errors.NETWORK_ERROR, { + chainId: chainId, + event: "invalidNetwork", + serverError: error + })]; + } + } + return [2 /*return*/, logger.throwError("could not detect network", logger_1.Logger.errors.NETWORK_ERROR, { + event: "noNetwork" + })]; + } + }); + }); + }; + JsonRpcProvider.prototype.getSigner = function (addressOrIndex) { + return new JsonRpcSigner(_constructorGuard, this, addressOrIndex); + }; + JsonRpcProvider.prototype.getUncheckedSigner = function (addressOrIndex) { + return this.getSigner(addressOrIndex).connectUnchecked(); + }; + JsonRpcProvider.prototype.listAccounts = function () { + var _this = this; + return this.send("eth_accounts", []).then(function (accounts) { + return accounts.map(function (a) { return _this.formatter.address(a); }); + }); + }; + JsonRpcProvider.prototype.send = function (method, params) { + var _this = this; + var request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + this.emit("debug", { + action: "request", + request: (0, properties_1.deepCopy)(request), + provider: this + }); + // We can expand this in the future to any call, but for now these + // are the biggest wins and do not require any serializing parameters. + var cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0); + if (cache && this._cache[method]) { + return this._cache[method]; + } + var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function (result) { + _this.emit("debug", { + action: "response", + request: request, + response: result, + provider: _this + }); + return result; + }, function (error) { + _this.emit("debug", { + action: "response", + error: error, + request: request, + provider: _this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(function () { + _this._cache[method] = null; + }, 0); + } + return result; + }; + JsonRpcProvider.prototype.prepareRequest = function (method, params) { + switch (method) { + case "getBlockNumber": + return ["eth_blockNumber", []]; + case "getGasPrice": + return ["eth_gasPrice", []]; + case "getBalance": + return ["eth_getBalance", [getLowerCase(params.address), params.blockTag]]; + case "getTransactionCount": + return ["eth_getTransactionCount", [getLowerCase(params.address), params.blockTag]]; + case "getCode": + return ["eth_getCode", [getLowerCase(params.address), params.blockTag]]; + case "getStorageAt": + return ["eth_getStorageAt", [getLowerCase(params.address), params.position, params.blockTag]]; + case "sendTransaction": + return ["eth_sendRawTransaction", [params.signedTransaction]]; + case "getBlock": + if (params.blockTag) { + return ["eth_getBlockByNumber", [params.blockTag, !!params.includeTransactions]]; + } + else if (params.blockHash) { + return ["eth_getBlockByHash", [params.blockHash, !!params.includeTransactions]]; + } + return null; + case "getTransaction": + return ["eth_getTransactionByHash", [params.transactionHash]]; + case "getTransactionReceipt": + return ["eth_getTransactionReceipt", [params.transactionHash]]; + case "call": { + var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, "hexlifyTransaction"); + return ["eth_call", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]]; + } + case "estimateGas": { + var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, "hexlifyTransaction"); + return ["eth_estimateGas", [hexlifyTransaction(params.transaction, { from: true })]]; + } + case "getLogs": + if (params.filter && params.filter.address != null) { + params.filter.address = getLowerCase(params.filter.address); + } + return ["eth_getLogs", [params.filter]]; + default: + break; + } + return null; + }; + JsonRpcProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var tx, feeData, args, error_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(method === "call" || method === "estimateGas")) return [3 /*break*/, 2]; + tx = params.transaction; + if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero())) return [3 /*break*/, 2]; + if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null)) return [3 /*break*/, 2]; + return [4 /*yield*/, this.getFeeData()]; + case 1: + feeData = _a.sent(); + if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) { + // Network doesn't know about EIP-1559 (and hence type) + params = (0, properties_1.shallowCopy)(params); + params.transaction = (0, properties_1.shallowCopy)(tx); + delete params.transaction.type; + } + _a.label = 2; + case 2: + args = this.prepareRequest(method, params); + if (args == null) { + logger.throwError(method + " not implemented", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, this.send(args[0], args[1])]; + case 4: return [2 /*return*/, _a.sent()]; + case 5: + error_4 = _a.sent(); + return [2 /*return*/, checkError(method, error_4, params)]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + JsonRpcProvider.prototype._startEvent = function (event) { + if (event.tag === "pending") { + this._startPending(); + } + _super.prototype._startEvent.call(this, event); + }; + JsonRpcProvider.prototype._startPending = function () { + if (this._pendingFilter != null) { + return; + } + var self = this; + var pendingFilter = this.send("eth_newPendingTransactionFilter", []); + this._pendingFilter = pendingFilter; + pendingFilter.then(function (filterId) { + function poll() { + self.send("eth_getFilterChanges", [filterId]).then(function (hashes) { + if (self._pendingFilter != pendingFilter) { + return null; + } + var seq = Promise.resolve(); + hashes.forEach(function (hash) { + // @TODO: This should be garbage collected at some point... How? When? + self._emitted["t:" + hash.toLowerCase()] = "pending"; + seq = seq.then(function () { + return self.getTransaction(hash).then(function (tx) { + self.emit("pending", tx); + return null; + }); + }); + }); + return seq.then(function () { + return timer(1000); + }); + }).then(function () { + if (self._pendingFilter != pendingFilter) { + self.send("eth_uninstallFilter", [filterId]); + return; + } + setTimeout(function () { poll(); }, 0); + return null; + }).catch(function (error) { }); + } + poll(); + return filterId; + }).catch(function (error) { }); + }; + JsonRpcProvider.prototype._stopEvent = function (event) { + if (event.tag === "pending" && this.listenerCount("pending") === 0) { + this._pendingFilter = null; + } + _super.prototype._stopEvent.call(this, event); + }; + // Convert an ethers.js transaction into a JSON-RPC transaction + // - gasLimit => gas + // - All values hexlified + // - All numeric values zero-striped + // - All addresses are lowercased + // NOTE: This allows a TransactionRequest, but all values should be resolved + // before this is called + // @TODO: This will likely be removed in future versions and prepareRequest + // will be the preferred method for this. + JsonRpcProvider.hexlifyTransaction = function (transaction, allowExtra) { + // Check only allowed properties are given + var allowed = (0, properties_1.shallowCopy)(allowedTransactionKeys); + if (allowExtra) { + for (var key in allowExtra) { + if (allowExtra[key]) { + allowed[key] = true; + } + } + } + (0, properties_1.checkProperties)(transaction, allowed); + var result = {}; + // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros. + ["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + var value = (0, bytes_1.hexValue)(transaction[key]); + if (key === "gasLimit") { + key = "gas"; + } + result[key] = value; + }); + ["from", "to", "data"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + result[key] = (0, bytes_1.hexlify)(transaction[key]); + }); + if (transaction.accessList) { + result["accessList"] = (0, transactions_1.accessListify)(transaction.accessList); + } + return result; + }; + return JsonRpcProvider; +}(base_provider_1.BaseProvider)); +exports.JsonRpcProvider = JsonRpcProvider; +//# sourceMappingURL=json-rpc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/json-rpc-provider.js.map b/node_modules/@ethersproject/providers/lib/json-rpc-provider.js.map new file mode 100644 index 0000000..9d3ce2d --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/json-rpc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"json-rpc-provider.js","sourceRoot":"","sources":["../src.ts/json-rpc-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKb,kEAA0G;AAC1G,sDAAqD;AACrD,8CAA6E;AAC7E,4CAAwD;AAExD,wDAA6I;AAC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AAQ,EAAO,WAAY,CAAC,GAAG,CAAC,CAAC,CAAC;YAChD,IAAI,GAAG,KAAK,UAAU,EAAE;gBAAE,GAAG,GAAG,KAAK,CAAC;aAAE;YACxC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,UAAS,GAAG;YACvC,IAAU,WAAY,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE;gBAAE,OAAO;aAAE;YAChD,MAAM,CAAC,GAAG,CAAC,GAAG,IAAA,eAAO,EAAO,WAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,IAAU,WAAY,CAAC,UAAU,EAAE;YAC/B,MAAM,CAAC,YAAY,CAAC,GAAG,IAAA,4BAAa,EAAO,WAAY,CAAC,UAAU,CAAC,CAAC;SACvE;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IACL,sBAAC;AAAD,CAAC,AA/VD,CAAqC,4BAAY,GA+VhD;AA/VY,0CAAe"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts b/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts new file mode 100644 index 0000000..3f20d33 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts @@ -0,0 +1,7 @@ +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class NodesmithProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey?: any): string; +} +//# sourceMappingURL=nodesmith-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts.map new file mode 100644 index 0000000..c0a3493 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodesmith-provider.d.ts","sourceRoot":"","sources":["../src.ts/nodesmith-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAS7D,qBAAa,iBAAkB,SAAQ,kBAAkB;IAErD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAOlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM;CA0BxD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/nodesmith-provider.js b/node_modules/@ethersproject/providers/lib/nodesmith-provider.js new file mode 100644 index 0000000..d0b788a --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/nodesmith-provider.js @@ -0,0 +1,64 @@ +/* istanbul ignore file */ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NodesmithProvider = void 0; +var url_json_rpc_provider_1 = require("./url-json-rpc-provider"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +// Special API key provided by Nodesmith for ethers.js +var defaultApiKey = "ETHERS_JS_SHARED"; +var NodesmithProvider = /** @class */ (function (_super) { + __extends(NodesmithProvider, _super); + function NodesmithProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + NodesmithProvider.getApiKey = function (apiKey) { + if (apiKey && typeof (apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey || defaultApiKey; + }; + NodesmithProvider.getUrl = function (network, apiKey) { + logger.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); + var host = null; + switch (network.name) { + case "homestead": + host = "https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc"; + break; + case "ropsten": + host = "https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc"; + break; + case "rinkeby": + host = "https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc"; + break; + case "goerli": + host = "https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc"; + break; + case "kovan": + host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return (host + "?apiKey=" + apiKey); + }; + return NodesmithProvider; +}(url_json_rpc_provider_1.UrlJsonRpcProvider)); +exports.NodesmithProvider = NodesmithProvider; +//# sourceMappingURL=nodesmith-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/nodesmith-provider.js.map b/node_modules/@ethersproject/providers/lib/nodesmith-provider.js.map new file mode 100644 index 0000000..2ca4dff --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/nodesmith-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodesmith-provider.js","sourceRoot":"","sources":["../src.ts/nodesmith-provider.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAGb,iEAA6D;AAE7D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,sDAAsD;AACtD,IAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC;IAAuC,qCAAkB;IAAzD;;IAmCA,CAAC;IAjCU,2BAAS,GAAhB,UAAiB,MAAW;QACxB,IAAI,MAAM,IAAI,OAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;YACvC,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SACjE;QACD,OAAO,MAAM,IAAI,aAAa,CAAC;IACnC,CAAC;IAEM,wBAAM,GAAb,UAAc,OAAgB,EAAE,MAAY;QACxC,MAAM,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAAC;QAEjG,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,QAAQ,OAAO,CAAC,IAAI,EAAE;YAClB,KAAK,WAAW;gBACZ,IAAI,GAAG,sDAAsD,CAAC;gBAC9D,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,GAAG,sDAAsD,CAAC;gBAC9D,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,GAAG,sDAAsD,CAAC;gBAC9D,MAAM;YACV,KAAK,QAAQ;gBACT,IAAI,GAAG,qDAAqD,CAAC;gBAC7D,MAAM;YACV,KAAK,OAAO;gBACR,IAAI,GAAG,oDAAoD,CAAC;gBAC5D,MAAM;YACV;gBACG,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAChF;QAED,OAAO,CAAC,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;IACxC,CAAC;IACL,wBAAC;AAAD,CAAC,AAnCD,CAAuC,0CAAkB,GAmCxD;AAnCY,8CAAiB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts b/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts new file mode 100644 index 0000000..22e4d01 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts @@ -0,0 +1,13 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +export declare class PocketProvider extends UrlJsonRpcProvider { + readonly applicationId: string; + readonly applicationSecretKey: string; + readonly loadBalancer: boolean; + constructor(network?: Networkish, apiKey?: any); + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): ConnectionInfo; + isCommunityResource(): boolean; +} +//# sourceMappingURL=pocket-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts.map new file mode 100644 index 0000000..8e1ba38 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pocket-provider.d.ts","sourceRoot":"","sources":["../src.ts/pocket-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAU7D,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;gBAEnB,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IA6B9C,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IA2ClC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;IA2C5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/pocket-provider.js b/node_modules/@ethersproject/providers/lib/pocket-provider.js new file mode 100644 index 0000000..2f8f049 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/pocket-provider.js @@ -0,0 +1,137 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PocketProvider = void 0; +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var url_json_rpc_provider_1 = require("./url-json-rpc-provider"); +// These are load-balancer-based application IDs +var defaultApplicationIds = { + homestead: "6004bcd10040261633ade990", + ropsten: "6004bd4d0040261633ade991", + rinkeby: "6004bda20040261633ade994", + goerli: "6004bd860040261633ade992", +}; +var PocketProvider = /** @class */ (function (_super) { + __extends(PocketProvider, _super); + function PocketProvider(network, apiKey) { + // We need a bit of creativity in the constructor because + // Pocket uses different default API keys based on the network + var _newTarget = this.constructor; + var _this = this; + if (apiKey == null) { + var n = (0, properties_1.getStatic)(_newTarget, "getNetwork")(network); + if (n) { + var applicationId = defaultApplicationIds[n.name]; + if (applicationId) { + apiKey = { + applicationId: applicationId, + loadBalancer: true + }; + } + } + // If there was any issue above, we don't know this network + if (apiKey == null) { + logger.throwError("unsupported network", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + } + _this = _super.call(this, network, apiKey) || this; + return _this; + } + PocketProvider.getApiKey = function (apiKey) { + // Most API Providers allow null to get the default configuration, but + // Pocket requires the network to decide the default provider, so we + // rely on hijacking the constructor to add a sensible default for us + if (apiKey == null) { + logger.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey); + } + var apiKeyObj = { + applicationId: null, + loadBalancer: false, + applicationSecretKey: null + }; + // Parse applicationId and applicationSecretKey + if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + } + else if (apiKey.applicationSecretKey != null) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId); + logger.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]"); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else if (apiKey.applicationId) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else { + logger.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + return apiKeyObj; + }; + PocketProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + var url = null; + if (apiKey.loadBalancer) { + url = "https://" + host + "/v1/lb/" + apiKey.applicationId; + } + else { + url = "https://" + host + "/v1/" + apiKey.applicationId; + } + var connection = { url: url }; + // Initialize empty headers + connection.headers = {}; + // Apply application secret key + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey; + } + return connection; + }; + PocketProvider.prototype.isCommunityResource = function () { + return (this.applicationId === defaultApplicationIds[this.network.name]); + }; + return PocketProvider; +}(url_json_rpc_provider_1.UrlJsonRpcProvider)); +exports.PocketProvider = PocketProvider; +//# sourceMappingURL=pocket-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/pocket-provider.js.map b/node_modules/@ethersproject/providers/lib/pocket-provider.js.map new file mode 100644 index 0000000..c2ce6b4 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/pocket-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pocket-provider.js","sourceRoot":"","sources":["../src.ts/pocket-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAGb,wDAAsD;AAGtD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iEAA6D;AAE7D,gDAAgD;AAChD,IAAM,qBAAqB,GAA2B;IAClD,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,0BAA0B;IACnC,MAAM,EAAE,0BAA0B;CACrC,CAAC;AAEF;IAAoC,kCAAkB;IAKlD,wBAAY,OAAoB,EAAE,MAAY;QAC1C,yDAAyD;QACzD,8DAA8D;;QAFlE,iBA2BC;QAvBG,IAAI,MAAM,IAAI,IAAI,EAAE;YAChB,IAAM,CAAC,GAAG,IAAA,sBAAS,cAA+C,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC;YACzF,IAAI,CAAC,EAAE;gBACH,IAAM,aAAa,GAAG,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBACpD,IAAI,aAAa,EAAE;oBACf,MAAM,GAAG;wBACL,aAAa,EAAE,aAAa;wBAC5B,YAAY,EAAE,IAAI;qBACrB,CAAC;iBACL;aACJ;YAED,2DAA2D;YAC3D,IAAI,MAAM,IAAI,IAAI,EAAE;gBAChB,MAAM,CAAC,UAAU,CAAC,qBAAqB,EAAE,eAAM,CAAC,MAAM,CAAC,gBAAgB,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AAO,GAAG,EAAE,CAAA;QAEvB,+BAA+B;QAC/B,IAAI,MAAM,CAAC,oBAAoB,IAAI,IAAI,EAAE;YACrC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;YACrB,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAA;SACpD;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,4CAAmB,GAAnB;QACI,OAAO,CAAC,IAAI,CAAC,aAAa,KAAK,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC;IACL,qBAAC;AAAD,CAAC,AA3HD,CAAoC,0CAAkB,GA2HrD;AA3HY,wCAAc"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts new file mode 100644 index 0000000..1ddde45 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts @@ -0,0 +1,18 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { ConnectionInfo } from "@ethersproject/web"; +import { CommunityResourcable } from "./formatter"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; +export declare class StaticJsonRpcProvider extends JsonRpcProvider { + detectNetwork(): Promise; +} +export declare abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable { + readonly apiKey: any; + constructor(network?: Networkish, apiKey?: any); + _startPending(): void; + isCommunityResource(): boolean; + getSigner(address?: string): JsonRpcSigner; + listAccounts(): Promise>; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): string | ConnectionInfo; +} +//# sourceMappingURL=url-json-rpc-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts.map new file mode 100644 index 0000000..74542cd --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"url-json-rpc-provider.d.ts","sourceRoot":"","sources":["../src.ts/url-json-rpc-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAerE,qBAAa,qBAAsB,SAAQ,eAAe;IAChD,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;CAmB1C;AAED,8BAAsB,kBAAmB,SAAQ,qBAAsB,YAAW,oBAAoB;IAClG,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;gBAET,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG;IAoB9C,aAAa,IAAI,IAAI;IAIrB,mBAAmB,IAAI,OAAO;IAI9B,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa;IAQ1C,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAKtC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAOlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,GAAG,cAAc;CAKxE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js new file mode 100644 index 0000000..f535db3 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js @@ -0,0 +1,153 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UrlJsonRpcProvider = exports.StaticJsonRpcProvider = void 0; +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var json_rpc_provider_1 = require("./json-rpc-provider"); +// A StaticJsonRpcProvider is useful when you *know* for certain that +// the backend will never change, as it never calls eth_chainId to +// verify its backend. However, if the backend does change, the effects +// are undefined and may include: +// - inconsistent results +// - locking up the UI +// - block skew warnings +// - wrong results +// If the network is not explicit (i.e. auto-detection is expected), the +// node MUST be running and available to respond to requests BEFORE this +// is instantiated. +var StaticJsonRpcProvider = /** @class */ (function (_super) { + __extends(StaticJsonRpcProvider, _super); + function StaticJsonRpcProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + StaticJsonRpcProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var network; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + network = this.network; + if (!(network == null)) return [3 /*break*/, 2]; + return [4 /*yield*/, _super.prototype.detectNetwork.call(this)]; + case 1: + network = _a.sent(); + if (!network) { + logger.throwError("no network detected", logger_1.Logger.errors.UNKNOWN_ERROR, {}); + } + // If still not set, set it + if (this._network == null) { + // A static network does not support "any" + (0, properties_1.defineReadOnly)(this, "_network", network); + this.emit("network", network, null); + } + _a.label = 2; + case 2: return [2 /*return*/, network]; + } + }); + }); + }; + return StaticJsonRpcProvider; +}(json_rpc_provider_1.JsonRpcProvider)); +exports.StaticJsonRpcProvider = StaticJsonRpcProvider; +var UrlJsonRpcProvider = /** @class */ (function (_super) { + __extends(UrlJsonRpcProvider, _super); + function UrlJsonRpcProvider(network, apiKey) { + var _newTarget = this.constructor; + var _this = this; + logger.checkAbstract(_newTarget, UrlJsonRpcProvider); + // Normalize the Network and API Key + network = (0, properties_1.getStatic)(_newTarget, "getNetwork")(network); + apiKey = (0, properties_1.getStatic)(_newTarget, "getApiKey")(apiKey); + var connection = (0, properties_1.getStatic)(_newTarget, "getUrl")(network, apiKey); + _this = _super.call(this, connection, network) || this; + if (typeof (apiKey) === "string") { + (0, properties_1.defineReadOnly)(_this, "apiKey", apiKey); + } + else if (apiKey != null) { + Object.keys(apiKey).forEach(function (key) { + (0, properties_1.defineReadOnly)(_this, key, apiKey[key]); + }); + } + return _this; + } + UrlJsonRpcProvider.prototype._startPending = function () { + logger.warn("WARNING: API provider does not support pending filters"); + }; + UrlJsonRpcProvider.prototype.isCommunityResource = function () { + return false; + }; + UrlJsonRpcProvider.prototype.getSigner = function (address) { + return logger.throwError("API provider does not support signing", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" }); + }; + UrlJsonRpcProvider.prototype.listAccounts = function () { + return Promise.resolve([]); + }; + // Return a defaultApiKey if null, otherwise validate the API key + UrlJsonRpcProvider.getApiKey = function (apiKey) { + return apiKey; + }; + // Returns the url or connection for the given network and API key. The + // API key will have been sanitized by the getApiKey first, so any validation + // or transformations can be done there. + UrlJsonRpcProvider.getUrl = function (network, apiKey) { + return logger.throwError("not implemented; sub-classes must override getUrl", logger_1.Logger.errors.NOT_IMPLEMENTED, { + operation: "getUrl" + }); + }; + return UrlJsonRpcProvider; +}(StaticJsonRpcProvider)); +exports.UrlJsonRpcProvider = UrlJsonRpcProvider; +//# sourceMappingURL=url-json-rpc-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js.map b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js.map new file mode 100644 index 0000000..1e3bdc4 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js.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IAED,uEAAuE;IACvE,6EAA6E;IAC7E,wCAAwC;IACjC,yBAAM,GAAb,UAAc,OAAgB,EAAE,MAAW;QACvC,OAAO,MAAM,CAAC,UAAU,CAAC,mDAAmD,EAAE,eAAM,CAAC,MAAM,CAAC,eAAe,EAAE;YACzG,SAAS,EAAE,QAAQ;SACtB,CAAC,CAAC;IACP,CAAC;IACL,yBAAC;AAAD,CAAC,AAxDD,CAAiD,qBAAqB,GAwDrE;AAxDqB,gDAAkB"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/web3-provider.d.ts b/node_modules/@ethersproject/providers/lib/web3-provider.d.ts new file mode 100644 index 0000000..690b300 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/web3-provider.d.ts @@ -0,0 +1,28 @@ +import { Networkish } from "@ethersproject/networks"; +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare type ExternalProvider = { + isMetaMask?: boolean; + isStatus?: boolean; + host?: string; + path?: string; + sendAsync?: (request: { + method: string; + params?: Array; + }, callback: (error: any, response: any) => void) => void; + send?: (request: { + method: string; + params?: Array; + }, callback: (error: any, response: any) => void) => void; + request?: (request: { + method: string; + params?: Array; + }) => Promise; +}; +export declare type JsonRpcFetchFunc = (method: string, params?: Array) => Promise; +export declare class Web3Provider extends JsonRpcProvider { + readonly provider: ExternalProvider; + readonly jsonRpcFetchFunc: JsonRpcFetchFunc; + constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish); + send(method: string, params: Array): Promise; +} +//# sourceMappingURL=web3-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/web3-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/web3-provider.d.ts.map new file mode 100644 index 0000000..3196014 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/web3-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"web3-provider.d.ts","sourceRoot":"","sources":["../src.ts/web3-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAA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UAAU;IA2C/E,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAGzD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/web3-provider.js b/node_modules/@ethersproject/providers/lib/web3-provider.js new file mode 100644 index 0000000..08d2804 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/web3-provider.js @@ -0,0 +1,157 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Web3Provider = void 0; +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var json_rpc_provider_1 = require("./json-rpc-provider"); +var _nextId = 1; +function buildWeb3LegacyFetcher(provider, sendFunc) { + var fetcher = "Web3LegacyFetcher"; + return function (method, params) { + var _this = this; + var request = { + method: method, + params: params, + id: (_nextId++), + jsonrpc: "2.0" + }; + return new Promise(function (resolve, reject) { + _this.emit("debug", { + action: "request", + fetcher: fetcher, + request: (0, properties_1.deepCopy)(request), + provider: _this + }); + sendFunc(request, function (error, response) { + if (error) { + _this.emit("debug", { + action: "response", + fetcher: fetcher, + error: error, + request: request, + provider: _this + }); + return reject(error); + } + _this.emit("debug", { + action: "response", + fetcher: fetcher, + request: request, + response: response, + provider: _this + }); + if (response.error) { + var error_1 = new Error(response.error.message); + error_1.code = response.error.code; + error_1.data = response.error.data; + return reject(error_1); + } + resolve(response.result); + }); + }); + }; +} +function buildEip1193Fetcher(provider) { + return function (method, params) { + var _this = this; + if (params == null) { + params = []; + } + var request = { method: method, params: params }; + this.emit("debug", { + action: "request", + fetcher: "Eip1193Fetcher", + request: (0, properties_1.deepCopy)(request), + provider: this + }); + return provider.request(request).then(function (response) { + _this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request: request, + response: response, + provider: _this + }); + return response; + }, function (error) { + _this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request: request, + error: error, + provider: _this + }); + throw error; + }); + }; +} +var Web3Provider = /** @class */ (function (_super) { + __extends(Web3Provider, _super); + function Web3Provider(provider, network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Web3Provider); + if (provider == null) { + logger.throwArgumentError("missing provider", "provider", provider); + } + var path = null; + var jsonRpcFetchFunc = null; + var subprovider = null; + if (typeof (provider) === "function") { + path = "unknown:"; + jsonRpcFetchFunc = provider; + } + else { + path = provider.host || provider.path || ""; + if (!path && provider.isMetaMask) { + path = "metamask"; + } + subprovider = provider; + if (provider.request) { + if (path === "") { + path = "eip-1193:"; + } + jsonRpcFetchFunc = buildEip1193Fetcher(provider); + } + else if (provider.sendAsync) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider)); + } + else if (provider.send) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider)); + } + else { + logger.throwArgumentError("unsupported provider", "provider", provider); + } + if (!path) { + path = "unknown:"; + } + } + _this = _super.call(this, path, network) || this; + (0, properties_1.defineReadOnly)(_this, "jsonRpcFetchFunc", jsonRpcFetchFunc); + (0, properties_1.defineReadOnly)(_this, "provider", subprovider); + return _this; + } + Web3Provider.prototype.send = function (method, params) { + return this.jsonRpcFetchFunc(method, params); + }; + return Web3Provider; +}(json_rpc_provider_1.JsonRpcProvider)); +exports.Web3Provider = Web3Provider; +//# sourceMappingURL=web3-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/web3-provider.js.map b/node_modules/@ethersproject/providers/lib/web3-provider.js.map new file mode 100644 index 0000000..786d304 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/web3-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"web3-provider.js","sourceRoot":"","sources":["../src.ts/web3-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAGb,wDAAqE;AAErE,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,yDAAsD;AAatD,IAAI,OAAO,GAAG,CAAC,CAAC;AAMhB,SAAS,sBAAsB,CAAC,QAA0B,EAAE,QAAwB;IAChF,IAAM,OAAO,GAAG,mBAAmB,CAAC;IAEpC,OAAO,UAAS,MAAc,EAAE,MAAkB;QAA3C,iBAgDN;QA/CG,IAAM,OAAO,GAAG;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC;YACf,OAAO,EAAE,KAAK;SACjB,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,KAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBACf,MAAM,EAAE,SAAS;gBACjB,OAAO,SAAA;gBACP,OAAO,EAAE,IAAA,qBAAQ,EAAC,OAAO,CAAC;gBAC1B,QAAQ,EAAE,KAAI;aACjB,CAAC,CAAC;YAEH,QAAQ,CAAC,OAAO,EAAE,UAAC,KAAK,EAAE,QAAQ;gBAE9B,IAAI,KAAK,EAAE;oBACP,KAAI,CAAC,IAAI,CAAC,OAAO,EAAE;wBACf,MAAM,EAAE,UAAU;wBAClB,OAAO,SAAA;wBACP,KAAK,OAAA;wBACL,OAAO,SAAA;wBACP,QAAQ,EAAE,KAAI;qBACjB,CAA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gBAAgB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;aACpD;iBAAM,IAAI,QAAQ,CAAC,SAAS,EAAE;gBAC3B,gBAAgB,GAAG,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;aAC1F;iBAAM,IAAI,QAAQ,CAAC,IAAI,EAAE;gBACtB,gBAAgB,GAAG,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;aACrF;iBAAM;gBACH,MAAM,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aAC3E;YAED,IAAI,CAAC,IAAI,EAAE;gBAAE,IAAI,GAAG,UAAU,CAAC;aAAE;SACpC;QAED,QAAA,kBAAM,IAAI,EAAE,OAAO,CAAC,SAAC;QAErB,IAAA,2BAAc,EAAC,KAAI,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;QAC3D,IAAA,2BAAc,EAAC,KAAI,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;;IAClD,CAAC;IAED,2BAAI,GAAJ,UAAK,MAAc,EAAE,MAAkB;QACnC,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACL,mBAAC;AAAD,CAAC,AAlDD,CAAkC,mCAAe,GAkDhD;AAlDY,oCAAY"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts b/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts new file mode 100644 index 0000000..b9cd445 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts @@ -0,0 +1,39 @@ +import { Network, Networkish } from "@ethersproject/networks"; +import { Event } from "./base-provider"; +import { JsonRpcProvider } from "./json-rpc-provider"; +export declare type InflightRequest = { + callback: (error: Error, result: any) => void; + payload: string; +}; +export declare type Subscription = { + tag: string; + processFunc: (payload: any) => void; +}; +export declare class WebSocketProvider extends JsonRpcProvider { + readonly _websocket: any; + readonly _requests: { + [name: string]: InflightRequest; + }; + readonly _detectNetwork: Promise; + readonly _subIds: { + [tag: string]: Promise; + }; + readonly _subs: { + [name: string]: Subscription; + }; + _wsReady: boolean; + constructor(url: string, network?: Networkish); + detectNetwork(): Promise; + get pollingInterval(): number; + resetEventsBlock(blockNumber: number): void; + set pollingInterval(value: number); + poll(): Promise; + set polling(value: boolean); + send(method: string, params?: Array): Promise; + static defaultUrl(): string; + _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise; + _startEvent(event: Event): void; + _stopEvent(event: Event): void; + destroy(): Promise; +} +//# sourceMappingURL=websocket-provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts.map b/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts.map new file mode 100644 index 0000000..3d761f7 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"websocket-provider.d.ts","sourceRoot":"","sources":["../src.ts/websocket-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwBtD,oBAAY,eAAe,GAAG;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;CACvC,CAAC;AAMF,qBAAa,iBAAkB,SAAQ,eAAe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"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/websocket-provider.js b/node_modules/@ethersproject/providers/lib/websocket-provider.js new file mode 100644 index 0000000..98b5d6d --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/websocket-provider.js @@ -0,0 +1,367 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebSocketProvider = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var properties_1 = require("@ethersproject/properties"); +var json_rpc_provider_1 = require("./json-rpc-provider"); +var ws_1 = require("./ws"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +/** + * Notes: + * + * This provider differs a bit from the polling providers. One main + * difference is how it handles consistency. The polling providers + * will stall responses to ensure a consistent state, while this + * WebSocket provider assumes the connected backend will manage this. + * + * For example, if a polling provider emits an event which indicates + * the event occurred in blockhash XXX, a call to fetch that block by + * its hash XXX, if not present will retry until it is present. This + * can occur when querying a pool of nodes that are mildly out of sync + * with each other. + */ +var NextId = 1; +// For more info about the Real-time Event API see: +// https://geth.ethereum.org/docs/rpc/pubsub +var WebSocketProvider = /** @class */ (function (_super) { + __extends(WebSocketProvider, _super); + function WebSocketProvider(url, network) { + var _this = this; + // This will be added in the future; please open an issue to expedite + if (network === "any") { + logger.throwError("WebSocketProvider does not support 'any' network yet", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "network:any" + }); + } + _this = _super.call(this, url, network) || this; + _this._pollingInterval = -1; + _this._wsReady = false; + (0, properties_1.defineReadOnly)(_this, "_websocket", new ws_1.WebSocket(_this.connection.url)); + (0, properties_1.defineReadOnly)(_this, "_requests", {}); + (0, properties_1.defineReadOnly)(_this, "_subs", {}); + (0, properties_1.defineReadOnly)(_this, "_subIds", {}); + (0, properties_1.defineReadOnly)(_this, "_detectNetwork", _super.prototype.detectNetwork.call(_this)); + // Stall sending requests until the socket is open... + _this._websocket.onopen = function () { + _this._wsReady = true; + Object.keys(_this._requests).forEach(function (id) { + _this._websocket.send(_this._requests[id].payload); + }); + }; + _this._websocket.onmessage = function (messageEvent) { + var data = messageEvent.data; + var result = JSON.parse(data); + if (result.id != null) { + var id = String(result.id); + var request = _this._requests[id]; + delete _this._requests[id]; + if (result.result !== undefined) { + request.callback(null, result.result); + _this.emit("debug", { + action: "response", + request: JSON.parse(request.payload), + response: result.result, + provider: _this + }); + } + else { + var error = null; + if (result.error) { + error = new Error(result.error.message || "unknown error"); + (0, properties_1.defineReadOnly)(error, "code", result.error.code || null); + (0, properties_1.defineReadOnly)(error, "response", data); + } + else { + error = new Error("unknown error"); + } + request.callback(error, undefined); + _this.emit("debug", { + action: "response", + error: error, + request: JSON.parse(request.payload), + provider: _this + }); + } + } + else if (result.method === "eth_subscription") { + // Subscription... + var sub = _this._subs[result.params.subscription]; + if (sub) { + //this.emit.apply(this, ); + sub.processFunc(result.params.result); + } + } + else { + console.warn("this should not happen"); + } + }; + // This Provider does not actually poll, but we want to trigger + // poll events for things that depend on them (like stalling for + // block and transaction lookups) + var fauxPoll = setInterval(function () { + _this.emit("poll"); + }, 1000); + if (fauxPoll.unref) { + fauxPoll.unref(); + } + return _this; + } + WebSocketProvider.prototype.detectNetwork = function () { + return this._detectNetwork; + }; + Object.defineProperty(WebSocketProvider.prototype, "pollingInterval", { + get: function () { + return 0; + }, + set: function (value) { + logger.throwError("cannot set polling interval on WebSocketProvider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPollingInterval" + }); + }, + enumerable: false, + configurable: true + }); + WebSocketProvider.prototype.resetEventsBlock = function (blockNumber) { + logger.throwError("cannot reset events block on WebSocketProvider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resetEventBlock" + }); + }; + WebSocketProvider.prototype.poll = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, null]; + }); + }); + }; + Object.defineProperty(WebSocketProvider.prototype, "polling", { + set: function (value) { + if (!value) { + return; + } + logger.throwError("cannot set polling on WebSocketProvider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPolling" + }); + }, + enumerable: false, + configurable: true + }); + WebSocketProvider.prototype.send = function (method, params) { + var _this = this; + var rid = NextId++; + return new Promise(function (resolve, reject) { + function callback(error, result) { + if (error) { + return reject(error); + } + return resolve(result); + } + var payload = JSON.stringify({ + method: method, + params: params, + id: rid, + jsonrpc: "2.0" + }); + _this.emit("debug", { + action: "request", + request: JSON.parse(payload), + provider: _this + }); + _this._requests[String(rid)] = { callback: callback, payload: payload }; + if (_this._wsReady) { + _this._websocket.send(payload); + } + }); + }; + WebSocketProvider.defaultUrl = function () { + return "ws:/\/localhost:8546"; + }; + WebSocketProvider.prototype._subscribe = function (tag, param, processFunc) { + return __awaiter(this, void 0, void 0, function () { + var subIdPromise, subId; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + subIdPromise = this._subIds[tag]; + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then(function (param) { + return _this.send("eth_subscribe", param); + }); + this._subIds[tag] = subIdPromise; + } + return [4 /*yield*/, subIdPromise]; + case 1: + subId = _a.sent(); + this._subs[subId] = { tag: tag, processFunc: processFunc }; + return [2 /*return*/]; + } + }); + }); + }; + WebSocketProvider.prototype._startEvent = function (event) { + var _this = this; + switch (event.type) { + case "block": + this._subscribe("block", ["newHeads"], function (result) { + var blockNumber = bignumber_1.BigNumber.from(result.number).toNumber(); + _this._emitted.block = blockNumber; + _this.emit("block", blockNumber); + }); + break; + case "pending": + this._subscribe("pending", ["newPendingTransactions"], function (result) { + _this.emit("pending", result); + }); + break; + case "filter": + this._subscribe(event.tag, ["logs", this._getFilter(event.filter)], function (result) { + if (result.removed == null) { + result.removed = false; + } + _this.emit(event.filter, _this.formatter.filterLog(result)); + }); + break; + case "tx": { + var emitReceipt_1 = function (event) { + var hash = event.hash; + _this.getTransactionReceipt(hash).then(function (receipt) { + if (!receipt) { + return; + } + _this.emit(hash, receipt); + }); + }; + // In case it is already mined + emitReceipt_1(event); + // To keep things simple, we start up a single newHeads subscription + // to keep an eye out for transactions we are watching for. + // Starting a subscription for an event (i.e. "tx") that is already + // running is (basically) a nop. + this._subscribe("tx", ["newHeads"], function (result) { + _this._events.filter(function (e) { return (e.type === "tx"); }).forEach(emitReceipt_1); + }); + break; + } + // Nothing is needed + case "debug": + case "poll": + case "willPoll": + case "didPoll": + case "error": + break; + default: + console.log("unhandled:", event); + break; + } + }; + WebSocketProvider.prototype._stopEvent = function (event) { + var _this = this; + var tag = event.tag; + if (event.type === "tx") { + // There are remaining transaction event listeners + if (this._events.filter(function (e) { return (e.type === "tx"); }).length) { + return; + } + tag = "tx"; + } + else if (this.listenerCount(event.event)) { + // There are remaining event listeners + return; + } + var subId = this._subIds[tag]; + if (!subId) { + return; + } + delete this._subIds[tag]; + subId.then(function (subId) { + if (!_this._subs[subId]) { + return; + } + delete _this._subs[subId]; + _this.send("eth_unsubscribe", [subId]); + }); + }; + WebSocketProvider.prototype.destroy = function () { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(this._websocket.readyState === ws_1.WebSocket.CONNECTING)) return [3 /*break*/, 2]; + return [4 /*yield*/, (new Promise(function (resolve) { + _this._websocket.onopen = function () { + resolve(true); + }; + _this._websocket.onerror = function () { + resolve(false); + }; + }))]; + case 1: + _a.sent(); + _a.label = 2; + case 2: + // Hangup + // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes + this._websocket.close(1000); + return [2 /*return*/]; + } + }); + }); + }; + return WebSocketProvider; +}(json_rpc_provider_1.JsonRpcProvider)); +exports.WebSocketProvider = WebSocketProvider; +//# sourceMappingURL=websocket-provider.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/websocket-provider.js.map b/node_modules/@ethersproject/providers/lib/websocket-provider.js.map new file mode 100644 index 0000000..746534b --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/websocket-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"websocket-provider.js","sourceRoot":"","sources":["../src.ts/websocket-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,sDAAqD;AAErD,wDAA2D;AAG3D,yDAAsD;AACtD,2BAAiC;AAEjC,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC;;;;;;;;;;;;;GAaG;AAEH,IAAI,MAAM,GAAG,CAAC,CAAC;AAaf,mDAAmD;AACnD,8CAA8C;AAE9C;IAAuC,qCAAe;IAalD,2BAAY,GAAW,EAAE,OAAoB;QAA7C,iBAsFC;QArFG,qEAAqE;QACrE,IAAI,OAAO,KAAK,KAAK,EAAE;YACnB,MAAM,CAAC,UAAU,CAAC,sDAAsD,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBAC3G,SAAS,EAAE,aAAa;aAC3B,CAAC,CAAC;SACN;QAED,QAAA,kBAAM,GAAG,EAAE,OAAO,CAAC,SAAC;QACpB,KAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC;QAE3B,KAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAEtB,IAAA,2BAAc,EAAC,KAAI,EAAE,YAAY,EAAE,IAAI,cAAS,CAAC,KAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAA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ib/ws.d.ts b/node_modules/@ethersproject/providers/lib/ws.d.ts new file mode 100644 index 0000000..f7e08bf --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ws.d.ts @@ -0,0 +1,3 @@ +import WebSocket from "ws"; +export { WebSocket }; +//# sourceMappingURL=ws.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ws.d.ts.map b/node_modules/@ethersproject/providers/lib/ws.d.ts.map new file mode 100644 index 0000000..76bbaa1 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ws.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../src.ts/ws.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,IAAI,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ws.js b/node_modules/@ethersproject/providers/lib/ws.js new file mode 100644 index 0000000..1028345 --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ws.js @@ -0,0 +1,9 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebSocket = void 0; +var ws_1 = __importDefault(require("ws")); +exports.WebSocket = ws_1.default; +//# sourceMappingURL=ws.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/lib/ws.js.map b/node_modules/@ethersproject/providers/lib/ws.js.map new file mode 100644 index 0000000..65c1c7c --- /dev/null +++ b/node_modules/@ethersproject/providers/lib/ws.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ws.js","sourceRoot":"","sources":["../src.ts/ws.ts"],"names":[],"mappings":";;;;;;AAAA,0CAA2B;AAElB,oBAFF,YAAS,CAEE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/providers/package.json b/node_modules/@ethersproject/providers/package.json new file mode 100644 index 0000000..8140df3 --- /dev/null +++ b/node_modules/@ethersproject/providers/package.json @@ -0,0 +1,73 @@ +{ + "_ethers.alias": { + "browser-net.d.ts": "", + "browser-net.d.ts.map": "", + "browser-net.js": "", + "browser-net.js.map": "", + "ipc-provider.js": "browser-ipc-provider.js", + "ws.js": "browser-ws.js" + }, + "author": "Richard Moore ", + "browser": { + "./lib/ipc-provider": "./lib/browser-ipc-provider.js", + "./lib/ws": "./lib/browser-ws.js", + "net": "./lib/browser-net.js" + }, + "dependencies": { + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/basex": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/networks": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/random": "^5.5.0", + "@ethersproject/rlp": "^5.5.0", + "@ethersproject/sha2": "^5.5.0", + "@ethersproject/strings": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/web": "^5.5.0", + "bech32": "1.1.4", + "ws": "7.4.6" + }, + "description": "Ethereum Providers for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "50d712d6afc927aaee68b482157598554a45d403", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/providers", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/providers", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x59d23683529e38d6cb2f8e5ade8c42d29da94834566aae5822f6212990330048", + "types": "./lib/index.d.ts", + "version": "5.5.1" +} diff --git a/node_modules/@ethersproject/providers/src.ts/_version.ts b/node_modules/@ethersproject/providers/src.ts/_version.ts new file mode 100644 index 0000000..77ae406 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "providers/5.5.1"; diff --git a/node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts b/node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts new file mode 100644 index 0000000..1ae53e0 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts @@ -0,0 +1,110 @@ +"use strict"; + +import { Network, Networkish } from "@ethersproject/networks"; +import { defineReadOnly } from "@ethersproject/properties"; +import { ConnectionInfo } from "@ethersproject/web"; + +import { CommunityResourcable, showThrottleMessage } from "./formatter"; +import { WebSocketProvider } from "./websocket-provider"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; + +// This key was provided to ethers.js by Alchemy to be used by the +// default provider, but it is recommended that for your own +// production environments, that you acquire your own API key at: +// https://dashboard.alchemyapi.io + +const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC" + +export class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + readonly apiKey: string; + + constructor(network?: Networkish, apiKey?: any) { + const provider = new AlchemyProvider(network, apiKey); + + const url = provider.connection.url.replace(/^http/i, "ws") + .replace(".alchemyapi.", ".ws.alchemyapi."); + + super(url, provider.network); + defineReadOnly(this, "apiKey", provider.apiKey); + } + + isCommunityResource(): boolean { + return (this.apiKey === defaultApiKey); + } +} + +export class AlchemyProvider extends UrlJsonRpcProvider { + + static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider { + return new AlchemyWebSocketProvider(network, apiKey); + } + + static getApiKey(apiKey: any): any { + if (apiKey == null) { return defaultApiKey; } + if (apiKey && typeof(apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey; + } + + static getUrl(network: Network, apiKey: string): ConnectionInfo { + let host = null; + switch (network.name) { + case "homestead": + host = "eth-mainnet.alchemyapi.io/v2/"; + break; + case "ropsten": + host = "eth-ropsten.alchemyapi.io/v2/"; + break; + case "rinkeby": + host = "eth-rinkeby.alchemyapi.io/v2/"; + break; + case "goerli": + host = "eth-goerli.alchemyapi.io/v2/"; + break; + case "kovan": + host = "eth-kovan.alchemyapi.io/v2/"; + break; + case "matic": + host = "polygon-mainnet.g.alchemy.com/v2/"; + break; + case "maticmum": + host = "polygon-mumbai.g.alchemy.com/v2/"; + break; + case "arbitrum": + host = "arb-mainnet.g.alchemy.com/v2/"; + break; + case "arbitrum-rinkeby": + host = "arb-rinkeby.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-kovan": + host = "opt-kovan.g.alchemy.com/v2/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + + return { + allowGzip: true, + url: ("https:/" + "/" + host + apiKey), + throttleCallback: (attempt: number, url: string) => { + if (apiKey === defaultApiKey) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + } + + isCommunityResource(): boolean { + return (this.apiKey === defaultApiKey); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/base-provider.ts b/node_modules/@ethersproject/providers/src.ts/base-provider.ts new file mode 100644 index 0000000..68d2682 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/base-provider.ts @@ -0,0 +1,1880 @@ +"use strict"; + +import { + Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, ForkEvent, + Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse +} from "@ethersproject/abstract-provider"; +import { Base58 } from "@ethersproject/basex"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { HashZero } from "@ethersproject/constants"; +import { namehash } from "@ethersproject/hash"; +import { getNetwork, Network, Networkish } from "@ethersproject/networks"; +import { Deferrable, defineReadOnly, getStatic, resolveProperties } from "@ethersproject/properties"; +import { Transaction } from "@ethersproject/transactions"; +import { sha256 } from "@ethersproject/sha2"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; +import { fetchJson, poll } from "@ethersproject/web"; + +import bech32 from "bech32"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { Formatter } from "./formatter"; + +////////////////////////////// +// Event Serializeing + +function checkTopic(topic: string): string { + if (topic == null) { return "null"; } + if (hexDataLength(topic) !== 32) { + logger.throwArgumentError("invalid topic", "topic", topic); + } + return topic.toLowerCase(); +} + +function serializeTopics(topics: Array>): string { + // Remove trailing null AND-topics; they are redundant + topics = topics.slice(); + while (topics.length > 0 && topics[topics.length - 1] == null) { topics.pop(); } + + return topics.map((topic) => { + if (Array.isArray(topic)) { + + // Only track unique OR-topics + const unique: { [ topic: string ]: boolean } = { } + topic.forEach((topic) => { + unique[checkTopic(topic)] = true; + }); + + // The order of OR-topics does not matter + const sorted = Object.keys(unique); + sorted.sort(); + + return sorted.join("|"); + + } else { + return checkTopic(topic); + } + }).join("&"); +} + +function deserializeTopics(data: string): Array> { + if (data === "") { return [ ]; } + + return data.split(/&/g).map((topic) => { + if (topic === "") { return [ ]; } + + const comps = topic.split("|").map((topic) => { + return ((topic === "null") ? null: topic); + }); + + return ((comps.length === 1) ? comps[0]: comps); + }); +} + +function getEventTag(eventName: EventType): string { + if (typeof(eventName) === "string") { + eventName = eventName.toLowerCase(); + + if (hexDataLength(eventName) === 32) { + return "tx:" + eventName; + } + + if (eventName.indexOf(":") === -1) { + return eventName; + } + + } else if (Array.isArray(eventName)) { + return "filter:*:" + serializeTopics(eventName); + + } else if (ForkEvent.isForkEvent(eventName)) { + logger.warn("not implemented"); + throw new Error("not implemented"); + + } else if (eventName && typeof(eventName) === "object") { + return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []); + } + + throw new Error("invalid event - " + eventName); +} + +////////////////////////////// +// Helper Object + +function getTime() { + return (new Date()).getTime(); +} + +function stall(duration: number): Promise { + return new Promise((resolve) => { + setTimeout(resolve, duration); + }); +} + +////////////////////////////// +// Provider Object + + +/** + * EventType + * - "block" + * - "poll" + * - "didPoll" + * - "pending" + * - "error" + * - "network" + * - filter + * - topics array + * - transaction hash + */ + +const PollableEvents = [ "block", "network", "pending", "poll" ]; + +export class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + + constructor(tag: string, listener: Listener, once: boolean) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "listener", listener); + defineReadOnly(this, "once", once); + } + + get event(): EventType { + switch (this.type) { + case "tx": + return this.hash; + case "filter": + return this.filter; + } + return this.tag; + } + + get type(): string { + return this.tag.split(":")[0] + } + + get hash(): string { + const comps = this.tag.split(":"); + if (comps[0] !== "tx") { return null; } + return comps[1]; + } + + get filter(): Filter { + const comps = this.tag.split(":"); + if (comps[0] !== "filter") { return null; } + const address = comps[1]; + + const topics = deserializeTopics(comps[2]); + const filter: Filter = { }; + + if (topics.length > 0) { filter.topics = topics; } + if (address && address !== "*") { filter.address = address; } + + return filter; + } + + pollable(): boolean { + return (this.tag.indexOf(":") >= 0 || PollableEvents.indexOf(this.tag) >= 0); + } +} + +export interface EnsResolver { + + // Name this Resolver is associated with + readonly name: string; + + // The address of the resolver + readonly address: string; + + // Multichain address resolution (also normal address resolution) + // See: https://eips.ethereum.org/EIPS/eip-2304 + getAddress(coinType?: 60): Promise + + // Contenthash field + // See: https://eips.ethereum.org/EIPS/eip-1577 + getContentHash(): Promise; + + // Storage of text records + // See: https://eips.ethereum.org/EIPS/eip-634 + getText(key: string): Promise; +}; + +export interface EnsProvider { + resolveName(name: string): Promise; + lookupAddress(address: string): Promise; + getResolver(name: string): Promise; +} + +type CoinInfo = { + symbol: string, + ilk?: string, // General family + prefix?: string, // Bech32 prefix + p2pkh?: number, // Pay-to-Public-Key-Hash Version + p2sh?: number, // Pay-to-Script-Hash Version +}; + +// https://github.com/satoshilabs/slips/blob/master/slip-0044.md +const coinInfos: { [ coinType: string ]: CoinInfo } = { + "0": { symbol: "btc", p2pkh: 0x00, p2sh: 0x05, prefix: "bc" }, + "2": { symbol: "ltc", p2pkh: 0x30, p2sh: 0x32, prefix: "ltc" }, + "3": { symbol: "doge", p2pkh: 0x1e, p2sh: 0x16 }, + "60": { symbol: "eth", ilk: "eth" }, + "61": { symbol: "etc", ilk: "eth" }, + "700": { symbol: "xdai", ilk: "eth" }, +}; + +function bytes32ify(value: number): string { + return hexZeroPad(BigNumber.from(value).toHexString(), 32); +} + +// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d) +function base58Encode(data: Uint8Array): string { + return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ])); +} + +export interface Avatar { + url: string; + linkage: Array<{ type: string, content: string }>; +} + +const matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + new RegExp("^(ipfs):/\/(.*)$", "i"), + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; + +function _parseString(result: string): null | string { + try { + return toUtf8String(_parseBytes(result)); + } catch(error) { } + return null; +} + +function _parseBytes(result: string): null | string { + if (result === "0x") { return null; } + + const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber(); + const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber(); + return hexDataSlice(result, offset + 32, offset + 32 + length); +} + + +export class Resolver implements EnsResolver { + readonly provider: BaseProvider; + + readonly name: string; + readonly address: string; + + readonly _resolvedAddress: null | string; + + // The resolvedAddress is only for creating a ReverseLookup resolver + constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string) { + defineReadOnly(this, "provider", provider); + defineReadOnly(this, "name", name); + defineReadOnly(this, "address", provider.formatter.address(address)); + defineReadOnly(this, "_resolvedAddress", resolvedAddress); + } + + async _fetchBytes(selector: string, parameters?: string): Promise { + // e.g. keccak256("addr(bytes32,uint256)") + const tx = { + to: this.address, + data: hexConcat([ selector, namehash(this.name), (parameters || "0x") ]) + }; + + try { + return _parseBytes(await this.provider.call(tx)); + } catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { return null; } + return null; + } + } + + _getAddress(coinType: number, hexBytes: string): string { + const coinInfo = coinInfos[String(coinType)]; + + if (coinInfo == null) { + logger.throwError(`unsupported coin type: ${ coinType }`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: `getAddress(${ coinType })` + }); + } + + if (coinInfo.ilk === "eth") { + return this.provider.formatter.address(hexBytes); + } + + const bytes = arrayify(hexBytes); + + // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + if (coinInfo.p2pkh != null) { + const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/); + if (p2pkh) { + const length = parseInt(p2pkh[1], 16); + if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) { + return base58Encode(concat([ [ coinInfo.p2pkh ], ("0x" + p2pkh[2]) ])); + } + } + } + + // P2SH: OP_HASH160 OP_EQUAL + if (coinInfo.p2sh != null) { + const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/); + if (p2sh) { + const length = parseInt(p2sh[1], 16); + if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) { + return base58Encode(concat([ [ coinInfo.p2sh ], ("0x" + p2sh[2]) ])); + } + } + } + + // Bech32 + if (coinInfo.prefix != null) { + const length = bytes[1]; + + // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program + let version = bytes[0]; + if (version === 0x00) { + if (length !== 20 && length !== 32) { + version = -1; + } + } else { + version = -1; + } + + if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) { + const words = bech32.toWords(bytes.slice(2)); + words.unshift(version); + return bech32.encode(coinInfo.prefix, words); + } + } + + return null; + } + + + async getAddress(coinType?: number): Promise { + if (coinType == null) { coinType = 60; } + + // If Ethereum, use the standard `addr(bytes32)` + if (coinType === 60) { + try { + // keccak256("addr(bytes32)") + const transaction = { + to: this.address, + data: ("0x3b3b57de" + namehash(this.name).substring(2)) + }; + const hexBytes = await this.provider.call(transaction); + + // No address + if (hexBytes === "0x" || hexBytes === HashZero) { return null; } + + return this.provider.formatter.callAddress(hexBytes); + } catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { return null; } + throw error; + } + } + + // keccak256("addr(bytes32,uint256") + const hexBytes = await this._fetchBytes("0xf1cb7e06", bytes32ify(coinType)); + + // No address + if (hexBytes == null || hexBytes === "0x") { return null; } + + // Compute the address + const address = this._getAddress(coinType, hexBytes); + + if (address == null) { + logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: `getAddress(${ coinType })`, + coinType: coinType, + data: hexBytes + }); + } + + return address; + } + + async getAvatar(): Promise { + const linkage: Array<{ type: string, content: string }> = [ ]; + try { + // test data for ricmoo.eth + //const avatar = "eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233"; + const avatar = await this.getText("avatar"); + if (avatar == null) { return null; } + + for (let i = 0; i < matchers.length; i++) { + const match = avatar.match(matchers[i]); + + if (match == null) { continue; } + switch (match[1]) { + case "https": + linkage.push({ type: "url", content: avatar }); + return { linkage, url: avatar }; + + case "data": + linkage.push({ type: "data", content: avatar }); + return { linkage, url: avatar }; + + case "ipfs": + linkage.push({ type: "ipfs", content: avatar }); + return { linkage, url: `https:/\/gateway.ipfs.io/ipfs/${ avatar.substring(7) }` } + + case "erc721": + case "erc1155": { + // Depending on the ERC type, use tokenURI(uint256) or url(uint256) + const selector = (match[1] === "erc721") ? "0xc87b56dd": "0x0e89341c"; + linkage.push({ type: match[1], content: avatar }); + + // The owner of this name + const owner = (this._resolvedAddress || await this.getAddress()); + + const comps = (match[2] || "").split("/"); + if (comps.length !== 2) { return null; } + + const addr = await this.provider.formatter.address(comps[0]); + const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32); + + // Check that this account owns the token + if (match[1] === "erc721") { + // ownerOf(uint256 tokenId) + const tokenOwner = this.provider.formatter.callAddress(await this.provider.call({ + to: addr, data: hexConcat([ "0x6352211e", tokenId ]) + })); + if (owner !== tokenOwner) { return null; } + linkage.push({ type: "owner", content: tokenOwner }); + + } else if (match[1] === "erc1155") { + // balanceOf(address owner, uint256 tokenId) + const balance = BigNumber.from(await this.provider.call({ + to: addr, data: hexConcat([ "0x00fdd58e", hexZeroPad(owner, 32), tokenId ]) + })); + if (balance.isZero()) { return null; } + linkage.push({ type: "balance", content: balance.toString() }); + } + + // Call the token contract for the metadata URL + const tx = { + to: this.provider.formatter.address(comps[0]), + data: hexConcat([ selector, tokenId ]) + }; + let metadataUrl = _parseString(await this.provider.call(tx)) + if (metadataUrl == null) { return null; } + linkage.push({ type: "metadata-url", content: metadataUrl }); + + // ERC-1155 allows a generic {id} in the URL + if (match[1] === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + } + + // Get the token metadata + const metadata = await fetchJson(metadataUrl); + + // Pull the image URL out + if (!metadata || typeof(metadata.image) !== "string" || !metadata.image.match(/^(https:\/\/|data:)/i)) { + return null; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + linkage.push({ type: "url", content: metadata.image }); + + return { linkage, url: metadata.image }; + } + } + } + } catch (error) { } + + return null; + } + + async getContentHash(): Promise { + + // keccak256("contenthash()") + const hexBytes = await this._fetchBytes("0xbc1c58d1"); + + // No contenthash + if (hexBytes == null || hexBytes === "0x") { return null; } + + // IPFS (CID: 1, Type: DAG-PB) + const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipfs) { + const length = parseInt(ipfs[3], 16); + if (ipfs[4].length === length * 2) { + return "ipfs:/\/" + Base58.encode("0x" + ipfs[1]); + } + } + + // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32) + const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/) + if (swarm) { + if (swarm[1].length === (32 * 2)) { + return "bzz:/\/" + swarm[1] + } + } + + return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getContentHash()", + data: hexBytes + }); + } + + async getText(key: string): Promise { + + // The key encoded as parameter to fetchBytes + let keyBytes = toUtf8Bytes(key); + + // The nodehash consumes the first slot, so the string pointer targets + // offset 64, with the length at offset 64 and data starting at offset 96 + keyBytes = concat([ bytes32ify(64), bytes32ify(keyBytes.length), keyBytes ]); + + // Pad to word-size (32 bytes) + if ((keyBytes.length % 32) !== 0) { + keyBytes = concat([ keyBytes, hexZeroPad("0x", 32 - (key.length % 32)) ]) + } + + const hexBytes = await this._fetchBytes("0x59d1d43c", hexlify(keyBytes)); + if (hexBytes == null || hexBytes === "0x") { return null; } + + return toUtf8String(hexBytes); + } +} + +let defaultFormatter: Formatter = null; + +let nextPollId = 1; + +export class BaseProvider extends Provider implements EnsProvider { + _networkPromise: Promise; + _network: Network; + + _events: Array; + + formatter: Formatter; + + // To help mitigate the eventually consistent nature of the blockchain + // we keep a mapping of events we emit. If we emit an event X, we expect + // that a user should be able to query for that event in the callback, + // if the node returns null, we stall the response until we get back a + // meaningful value, since we may be hitting a re-org, or a node that + // has not indexed the event yet. + // Events: + // - t:{hash} - Transaction hash + // - b:{hash} - BlockHash + // - block - The most recent emitted block + _emitted: { [ eventName: string ]: number | "pending" }; + + _pollingInterval: number; + _poller: NodeJS.Timer; + _bootstrapPoll: NodeJS.Timer; + + _lastBlockNumber: number; + + _fastBlockNumber: number; + _fastBlockNumberPromise: Promise; + _fastQueryDate: number; + + _maxInternalBlockNumber: number; + _internalBlockNumber: Promise<{ blockNumber: number, reqTime: number, respTime: number }>; + + readonly anyNetwork: boolean; + + + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + + constructor(network: Networkish | Promise) { + logger.checkNew(new.target, Provider); + + super(); + + // Events being listened to + this._events = []; + + this._emitted = { block: -2 }; + + this.formatter = new.target.getFormatter(); + + // If network is any, this Provider allows the underlying + // network to change dynamically, and we auto-detect the + // current network + defineReadOnly(this, "anyNetwork", (network === "any")); + if (this.anyNetwork) { network = this.detectNetwork(); } + + if (network instanceof Promise) { + this._networkPromise = network; + + // Squash any "unhandled promise" errors; that do not need to be handled + network.catch((error) => { }); + + // Trigger initial network setting (async) + this._ready().catch((error) => { }); + + } else { + const knownNetwork = getStatic<(network: Networkish) => Network>(new.target, "getNetwork")(network); + if (knownNetwork) { + defineReadOnly(this, "_network", knownNetwork); + this.emit("network", knownNetwork, null); + + } else { + logger.throwArgumentError("invalid network", "network", network); + } + } + + this._maxInternalBlockNumber = -1024; + + this._lastBlockNumber = -2; + + this._pollingInterval = 4000; + + this._fastQueryDate = 0; + } + + async _ready(): Promise { + if (this._network == null) { + let network: Network = null; + if (this._networkPromise) { + try { + network = await this._networkPromise; + } catch (error) { } + } + + // Try the Provider's network detection (this MUST throw if it cannot) + if (network == null) { + network = await this.detectNetwork(); + } + + // This should never happen; every Provider sub-class should have + // suggested a network by here (or have thrown). + if (!network) { + logger.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, { }); + } + + // Possible this call stacked so do not call defineReadOnly again + if (this._network == null) { + if (this.anyNetwork) { + this._network = network; + } else { + defineReadOnly(this, "_network", network); + } + this.emit("network", network, null); + } + } + + return this._network; + } + + // This will always return the most recently established network. + // For "any", this can change (a "network" event is emitted before + // any change is reflected); otherwise this cannot change + get ready(): Promise { + return poll(() => { + return this._ready().then((network) => { + return network; + }, (error) => { + // If the network isn't running yet, we will wait + if (error.code === Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { + return undefined; + } + throw error; + }); + }); + } + + // @TODO: Remove this and just create a singleton formatter + static getFormatter(): Formatter { + if (defaultFormatter == null) { + defaultFormatter = new Formatter(); + } + return defaultFormatter; + } + + // @TODO: Remove this and just use getNetwork + static getNetwork(network: Networkish): Network { + return getNetwork((network == null) ? "homestead": network); + } + + // Fetches the blockNumber, but will reuse any result that is less + // than maxAge old or has been requested since the last request + async _getInternalBlockNumber(maxAge: number): Promise { + await this._ready(); + + // Allowing stale data up to maxAge old + if (maxAge > 0) { + + // While there are pending internal block requests... + while (this._internalBlockNumber) { + + // ..."remember" which fetch we started with + const internalBlockNumber = this._internalBlockNumber; + + try { + // Check the result is not too stale + const result = await internalBlockNumber; + if ((getTime() - result.respTime) <= maxAge) { + return result.blockNumber; + } + + // Too old; fetch a new value + break; + + } catch(error) { + + // The fetch rejected; if we are the first to get the + // rejection, drop through so we replace it with a new + // fetch; all others blocked will then get that fetch + // which won't match the one they "remembered" and loop + if (this._internalBlockNumber === internalBlockNumber) { + break; + } + } + } + } + + const reqTime = getTime(); + + const checkInternalBlockNumber = resolveProperties({ + blockNumber: this.perform("getBlockNumber", { }), + networkError: this.getNetwork().then((network) => (null), (error) => (error)) + }).then(({ blockNumber, networkError }) => { + if (networkError) { + // Unremember this bad internal block number + if (this._internalBlockNumber === checkInternalBlockNumber) { + this._internalBlockNumber = null; + } + throw networkError; + } + + const respTime = getTime(); + + blockNumber = BigNumber.from(blockNumber).toNumber(); + if (blockNumber < this._maxInternalBlockNumber) { blockNumber = this._maxInternalBlockNumber; } + + this._maxInternalBlockNumber = blockNumber; + this._setFastBlockNumber(blockNumber); // @TODO: Still need this? + return { blockNumber, reqTime, respTime }; + }); + + this._internalBlockNumber = checkInternalBlockNumber; + + // Swallow unhandled exceptions; if needed they are handled else where + checkInternalBlockNumber.catch((error) => { + // Don't null the dead (rejected) fetch, if it has already been updated + if (this._internalBlockNumber === checkInternalBlockNumber) { + this._internalBlockNumber = null; + } + }); + + return (await checkInternalBlockNumber).blockNumber; + } + + async poll(): Promise { + const pollId = nextPollId++; + + // Track all running promises, so we can trigger a post-poll once they are complete + const runners: Array> = []; + + let blockNumber: number = null; + try { + blockNumber = await this._getInternalBlockNumber(100 + this.pollingInterval / 2); + } catch (error) { + this.emit("error", error); + return; + } + this._setFastBlockNumber(blockNumber); + + // Emit a poll event after we have the latest (fast) block number + this.emit("poll", pollId, blockNumber); + + // If the block has not changed, meh. + if (blockNumber === this._lastBlockNumber) { + this.emit("didPoll", pollId); + return; + } + + // First polling cycle, trigger a "block" events + if (this._emitted.block === -2) { + this._emitted.block = blockNumber - 1; + } + + if (Math.abs(((this._emitted.block)) - blockNumber) > 1000) { + logger.warn(`network block skew detected; skipping block events (emitted=${ this._emitted.block } blockNumber${ blockNumber })`); + this.emit("error", logger.makeError("network block skew detected", Logger.errors.NETWORK_ERROR, { + blockNumber: blockNumber, + event: "blockSkew", + previousBlockNumber: this._emitted.block + })); + this.emit("block", blockNumber); + + } else { + // Notify all listener for each block that has passed + for (let i = (this._emitted.block) + 1; i <= blockNumber; i++) { + this.emit("block", i); + } + } + + // The emitted block was updated, check for obsolete events + if ((this._emitted.block) !== blockNumber) { + this._emitted.block = blockNumber; + + Object.keys(this._emitted).forEach((key) => { + // The block event does not expire + if (key === "block") { return; } + + // The block we were at when we emitted this event + const eventBlockNumber = this._emitted[key]; + + // We cannot garbage collect pending transactions or blocks here + // They should be garbage collected by the Provider when setting + // "pending" events + if (eventBlockNumber === "pending") { return; } + + // Evict any transaction hashes or block hashes over 12 blocks + // old, since they should not return null anyways + if (blockNumber - eventBlockNumber > 12) { + delete this._emitted[key]; + } + }); + } + + // First polling cycle + if (this._lastBlockNumber === -2) { + this._lastBlockNumber = blockNumber - 1; + } + + // Find all transaction hashes we are waiting on + this._events.forEach((event) => { + switch (event.type) { + case "tx": { + const hash = event.hash; + let runner = this.getTransactionReceipt(hash).then((receipt) => { + if (!receipt || receipt.blockNumber == null) { return null; } + this._emitted["t:" + hash] = receipt.blockNumber; + this.emit(hash, receipt); + return null; + }).catch((error: Error) => { this.emit("error", error); }); + + runners.push(runner); + + break; + } + + case "filter": { + const filter = event.filter; + filter.fromBlock = this._lastBlockNumber + 1; + filter.toBlock = blockNumber; + + const runner = this.getLogs(filter).then((logs) => { + if (logs.length === 0) { return; } + logs.forEach((log: Log) => { + this._emitted["b:" + log.blockHash] = log.blockNumber; + this._emitted["t:" + log.transactionHash] = log.blockNumber; + this.emit(filter, log); + }); + }).catch((error: Error) => { this.emit("error", error); }); + runners.push(runner); + + break; + } + } + }); + + this._lastBlockNumber = blockNumber; + + // Once all events for this loop have been processed, emit "didPoll" + Promise.all(runners).then(() => { + this.emit("didPoll", pollId); + }).catch((error) => { this.emit("error", error); }); + + return; + } + + // Deprecated; do not use this + resetEventsBlock(blockNumber: number): void { + this._lastBlockNumber = blockNumber - 1; + if (this.polling) { this.poll(); } + } + + get network(): Network { + return this._network; + } + + // This method should query the network if the underlying network + // can change, such as when connected to a JSON-RPC backend + async detectNetwork(): Promise { + return logger.throwError("provider does not support network detection", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "provider.detectNetwork" + }); + } + + async getNetwork(): Promise { + const network = await this._ready(); + + // Make sure we are still connected to the same network; this is + // only an external call for backends which can have the underlying + // network change spontaneously + const currentNetwork = await this.detectNetwork(); + if (network.chainId !== currentNetwork.chainId) { + + // We are allowing network changes, things can get complex fast; + // make sure you know what you are doing if you use "any" + if (this.anyNetwork) { + this._network = currentNetwork; + + // Reset all internal block number guards and caches + this._lastBlockNumber = -2; + this._fastBlockNumber = null; + this._fastBlockNumberPromise = null; + this._fastQueryDate = 0; + this._emitted.block = -2; + this._maxInternalBlockNumber = -1024; + this._internalBlockNumber = null; + + // The "network" event MUST happen before this method resolves + // so any events have a chance to unregister, so we stall an + // additional event loop before returning from /this/ call + this.emit("network", currentNetwork, network); + await stall(0); + + return this._network; + } + + const error = logger.makeError("underlying network changed", Logger.errors.NETWORK_ERROR, { + event: "changed", + network: network, + detectedNetwork: currentNetwork + }); + + this.emit("error", error); + throw error; + } + + return network; + } + + get blockNumber(): number { + this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => { + this._setFastBlockNumber(blockNumber); + }, (error) => { }); + + return (this._fastBlockNumber != null) ? this._fastBlockNumber: -1; + } + + get polling(): boolean { + return (this._poller != null); + } + + set polling(value: boolean) { + if (value && !this._poller) { + this._poller = setInterval(() => { this.poll(); }, this.pollingInterval); + + if (!this._bootstrapPoll) { + this._bootstrapPoll = setTimeout(() => { + this.poll(); + + // We block additional polls until the polling interval + // is done, to prevent overwhelming the poll function + this._bootstrapPoll = setTimeout(() => { + // If polling was disabled, something may require a poke + // since starting the bootstrap poll and it was disabled + if (!this._poller) { this.poll(); } + + // Clear out the bootstrap so we can do another + this._bootstrapPoll = null; + }, this.pollingInterval); + }, 0); + } + + } else if (!value && this._poller) { + clearInterval(this._poller); + this._poller = null; + } + } + + get pollingInterval(): number { + return this._pollingInterval; + } + + set pollingInterval(value: number) { + if (typeof(value) !== "number" || value <= 0 || parseInt(String(value)) != value) { + throw new Error("invalid polling interval"); + } + + this._pollingInterval = value; + + if (this._poller) { + clearInterval(this._poller); + this._poller = setInterval(() => { this.poll(); }, this._pollingInterval); + } + } + + _getFastBlockNumber(): Promise { + const now = getTime(); + + // Stale block number, request a newer value + if ((now - this._fastQueryDate) > 2 * this._pollingInterval) { + this._fastQueryDate = now; + this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => { + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + } + return this._fastBlockNumber; + }); + } + + return this._fastBlockNumberPromise; + } + + _setFastBlockNumber(blockNumber: number): void { + // Older block, maybe a stale request + if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { return; } + + // Update the time we updated the blocknumber + this._fastQueryDate = getTime(); + + // Newer block number, use it + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + this._fastBlockNumberPromise = Promise.resolve(blockNumber); + } + } + + async waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise { + return this._waitForTransaction(transactionHash, (confirmations == null) ? 1: confirmations, timeout || 0, null); + } + + async _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { data: string, from: string, nonce: number, to: string, value: BigNumber, startBlock: number }): Promise { + const receipt = await this.getTransactionReceipt(transactionHash); + + // Receipt is already good + if ((receipt ? receipt.confirmations: 0) >= confirmations) { return receipt; } + + // Poll until the receipt is good... + return new Promise((resolve, reject) => { + const cancelFuncs: Array<() => void> = []; + + let done = false; + const alreadyDone = function() { + if (done) { return true; } + done = true; + cancelFuncs.forEach((func) => { func(); }); + return false; + }; + + const minedHandler = (receipt: TransactionReceipt) => { + if (receipt.confirmations < confirmations) { return; } + if (alreadyDone()) { return; } + resolve(receipt); + } + this.on(transactionHash, minedHandler); + cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); }); + + if (replaceable) { + let lastBlockNumber = replaceable.startBlock; + let scannedBlock: number = null; + const replaceHandler = async (blockNumber: number) => { + if (done) { return; } + + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + await stall(1000); + + this.getTransactionCount(replaceable.from).then(async (nonce) => { + if (done) { return; } + + if (nonce <= replaceable.nonce) { + lastBlockNumber = blockNumber; + + } else { + // First check if the transaction was mined + { + const mined = await this.getTransaction(transactionHash); + if (mined && mined.blockNumber != null) { return; } + } + + // First time scanning. We start a little earlier for some + // wiggle room here to handle the eventually consistent nature + // of blockchain (e.g. the getTransactionCount was for a + // different block) + if (scannedBlock == null) { + scannedBlock = lastBlockNumber - 3; + if (scannedBlock < replaceable.startBlock) { + scannedBlock = replaceable.startBlock; + } + } + + while (scannedBlock <= blockNumber) { + if (done) { return; } + + const block = await this.getBlockWithTransactions(scannedBlock); + for (let ti = 0; ti < block.transactions.length; ti++) { + const tx = block.transactions[ti]; + + // Successfully mined! + if (tx.hash === transactionHash) { return; } + + // Matches our transaction from and nonce; its a replacement + if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) { + if (done) { return; } + + // Get the receipt of the replacement + const receipt = await this.waitForTransaction(tx.hash, confirmations); + + // Already resolved or rejected (prolly a timeout) + if (alreadyDone()) { return; } + + // The reason we were replaced + let reason = "replaced"; + if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) { + reason = "repriced"; + } else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) { + reason = "cancelled" + } + + // Explain why we were replaced + reject(logger.makeError("transaction was replaced", Logger.errors.TRANSACTION_REPLACED, { + cancelled: (reason === "replaced" || reason === "cancelled"), + reason, + replacement: this._wrapTransaction(tx), + hash: transactionHash, + receipt + })); + + return; + } + } + scannedBlock++; + } + } + + if (done) { return; } + this.once("block", replaceHandler); + + }, (error) => { + if (done) { return; } + this.once("block", replaceHandler); + }); + }; + + if (done) { return; } + this.once("block", replaceHandler); + + cancelFuncs.push(() => { + this.removeListener("block", replaceHandler); + }); + } + + if (typeof(timeout) === "number" && timeout > 0) { + const timer = setTimeout(() => { + if (alreadyDone()) { return; } + reject(logger.makeError("timeout exceeded", Logger.errors.TIMEOUT, { timeout: timeout })); + }, timeout); + if (timer.unref) { timer.unref(); } + + cancelFuncs.push(() => { clearTimeout(timer); }); + } + }); + } + + async getBlockNumber(): Promise { + return this._getInternalBlockNumber(0); + } + + async getGasPrice(): Promise { + await this.getNetwork(); + + const result = await this.perform("getGasPrice", { }); + try { + return BigNumber.from(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getGasPrice", + result, error + }); + } + } + + async getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise { + await this.getNetwork(); + const params = await resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + + const result = await this.perform("getBalance", params); + try { + return BigNumber.from(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getBalance", + params, result, error + }); + } + } + + async getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise { + await this.getNetwork(); + const params = await resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + + const result = await this.perform("getTransactionCount", params); + try { + return BigNumber.from(result).toNumber(); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getTransactionCount", + params, result, error + }); + } + } + + async getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise { + await this.getNetwork(); + const params = await resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + + const result = await this.perform("getCode", params); + try { + return hexlify(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getCode", + params, result, error + }); + } + } + + async getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise { + await this.getNetwork(); + const params = await resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag), + position: Promise.resolve(position).then((p) => hexValue(p)) + }); + const result = await this.perform("getStorageAt", params); + try { + return hexlify(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getStorageAt", + params, result, error + }); + } + } + + // This should be called by any subclass wrapping a TransactionResponse + _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse { + if (hash != null && hexDataLength(hash) !== 32) { throw new Error("invalid response - sendTransaction"); } + + const result = tx; + + // Check the hash we expect is the same as the hash the server reported + if (hash != null && tx.hash !== hash) { + logger.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash }); + } + + result.wait = async (confirms?: number, timeout?: number) => { + if (confirms == null) { confirms = 1; } + if (timeout == null) { timeout = 0; } + + // Get the details to detect replacement + let replacement = undefined; + if (confirms !== 0 && startBlock != null) { + replacement = { + data: tx.data, + from: tx.from, + nonce: tx.nonce, + to: tx.to, + value: tx.value, + startBlock + }; + } + + const receipt = await this._waitForTransaction(tx.hash, confirms, timeout, replacement); + if (receipt == null && confirms === 0) { return null; } + + // No longer pending, allow the polling loop to garbage collect this + this._emitted["t:" + tx.hash] = receipt.blockNumber; + + if (receipt.status === 0) { + logger.throwError("transaction failed", Logger.errors.CALL_EXCEPTION, { + transactionHash: tx.hash, + transaction: tx, + receipt: receipt + }); + } + return receipt; + }; + + return result; + } + + async sendTransaction(signedTransaction: string | Promise): Promise { + await this.getNetwork(); + const hexTx = await Promise.resolve(signedTransaction).then(t => hexlify(t)); + const tx = this.formatter.transaction(signedTransaction); + if (tx.confirmations == null) { tx.confirmations = 0; } + const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + try { + const hash = await this.perform("sendTransaction", { signedTransaction: hexTx }); + return this._wrapTransaction(tx, hash, blockNumber); + } catch (error) { + (error).transaction = tx; + (error).transactionHash = tx.hash; + throw error; + } + } + + async _getTransactionRequest(transaction: Deferrable): Promise { + const values: any = await transaction; + + const tx: any = { }; + + ["from", "to"].forEach((key) => { + if (values[key] == null) { return; } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v): null)) + }); + + ["gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "value"].forEach((key) => { + if (values[key] == null) { return; } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v): null)); + }); + + ["type"].forEach((key) => { + if (values[key] == null) { return; } + tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v: null)); + }); + + if (values.accessList) { + tx.accessList = this.formatter.accessList(values.accessList); + } + + ["data"].forEach((key) => { + if (values[key] == null) { return; } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v): null)); + }); + + return this.formatter.transactionRequest(await resolveProperties(tx)); + } + + async _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise { + filter = await filter; + + const result: any = { }; + + if (filter.address != null) { + result.address = this._getAddress(filter.address); + } + + ["blockHash", "topics"].forEach((key) => { + if ((filter)[key] == null) { return; } + result[key] = (filter)[key]; + }); + + ["fromBlock", "toBlock"].forEach((key) => { + if ((filter)[key] == null) { return; } + result[key] = this._getBlockTag((filter)[key]); + }); + + return this.formatter.filter(await resolveProperties(result)); + } + + async call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise { + await this.getNetwork(); + const params = await resolveProperties({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag) + }); + + const result = await this.perform("call", params); + try { + return hexlify(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "call", + params, result, error + }); + } + } + + async estimateGas(transaction: Deferrable): Promise { + await this.getNetwork(); + const params = await resolveProperties({ + transaction: this._getTransactionRequest(transaction) + }); + + const result = await this.perform("estimateGas", params); + try { + return BigNumber.from(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "estimateGas", + params, result, error + }); + } + } + + async _getAddress(addressOrName: string | Promise): Promise { + addressOrName = await addressOrName; + if (typeof(addressOrName) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", addressOrName); + } + + const address = await this.resolveName(addressOrName); + if (address == null) { + logger.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, { + operation: `resolveName(${ JSON.stringify(addressOrName) })` + }); + } + return address; + } + + async _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise { + await this.getNetwork(); + + blockHashOrBlockTag = await blockHashOrBlockTag; + + // If blockTag is a number (not "latest", etc), this is the block number + let blockNumber = -128; + + const params: { [key: string]: any } = { + includeTransactions: !!includeTransactions + }; + + if (isHexString(blockHashOrBlockTag, 32)) { + params.blockHash = blockHashOrBlockTag; + } else { + try { + params.blockTag = await this._getBlockTag(blockHashOrBlockTag); + if (isHexString(params.blockTag)) { + blockNumber = parseInt(params.blockTag.substring(2), 16); + } + } catch (error) { + logger.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); + } + } + + return poll(async () => { + const block = await this.perform("getBlock", params); + + // Block was not found + if (block == null) { + + // For blockhashes, if we didn't say it existed, that blockhash may + // not exist. If we did see it though, perhaps from a log, we know + // it exists, and this node is just not caught up yet. + if (params.blockHash != null) { + if (this._emitted["b:" + params.blockHash] == null) { return null; } + } + + // For block tags, if we are asking for a future block, we return null + if (params.blockTag != null) { + if (blockNumber > this._emitted.block) { return null; } + } + + // Retry on the next block + return undefined; + } + + // Add transactions + if (includeTransactions) { + let blockNumber: number = null; + for (let i = 0; i < block.transactions.length; i++) { + const tx = block.transactions[i]; + if (tx.blockNumber == null) { + tx.confirmations = 0; + + } else if (tx.confirmations == null) { + if (blockNumber == null) { + blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + } + + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { confirmations = 1; } + tx.confirmations = confirmations; + } + } + + const blockWithTxs: any = this.formatter.blockWithTransactions(block); + blockWithTxs.transactions = blockWithTxs.transactions.map((tx: TransactionResponse) => this._wrapTransaction(tx)); + return blockWithTxs; + } + + return this.formatter.block(block); + + }, { oncePoll: this }); + } + + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise { + return >(this._getBlock(blockHashOrBlockTag, false)); + } + + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise { + return >(this._getBlock(blockHashOrBlockTag, true)); + } + + async getTransaction(transactionHash: string | Promise): Promise { + await this.getNetwork(); + transactionHash = await transactionHash; + + const params = { transactionHash: this.formatter.hash(transactionHash, true) }; + + return poll(async () => { + const result = await this.perform("getTransaction", params); + + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return null; + } + return undefined; + } + + const tx = this.formatter.transactionResponse(result); + + if (tx.blockNumber == null) { + tx.confirmations = 0; + + } else if (tx.confirmations == null) { + const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { confirmations = 1; } + tx.confirmations = confirmations; + } + + return this._wrapTransaction(tx); + }, { oncePoll: this }); + } + + async getTransactionReceipt(transactionHash: string | Promise): Promise { + await this.getNetwork(); + + transactionHash = await transactionHash; + + const params = { transactionHash: this.formatter.hash(transactionHash, true) }; + + return poll(async () => { + const result = await this.perform("getTransactionReceipt", params); + + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return null; + } + return undefined; + } + + // "geth-etc" returns receipts before they are ready + if (result.blockHash == null) { return undefined; } + + const receipt = this.formatter.receipt(result); + + if (receipt.blockNumber == null) { + receipt.confirmations = 0; + + } else if (receipt.confirmations == null) { + const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - receipt.blockNumber) + 1; + if (confirmations <= 0) { confirmations = 1; } + receipt.confirmations = confirmations; + } + + return receipt; + }, { oncePoll: this }); + } + + async getLogs(filter: Filter | FilterByBlockHash | Promise): Promise> { + await this.getNetwork(); + const params = await resolveProperties({ filter: this._getFilter(filter) }); + const logs: Array = await this.perform("getLogs", params); + logs.forEach((log) => { + if (log.removed == null) { log.removed = false; } + }); + return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs); + } + + async getEtherPrice(): Promise { + await this.getNetwork(); + return this.perform("getEtherPrice", { }); + } + + async _getBlockTag(blockTag: BlockTag | Promise): Promise { + blockTag = await blockTag; + + if (typeof(blockTag) === "number" && blockTag < 0) { + if (blockTag % 1) { + logger.throwArgumentError("invalid BlockTag", "blockTag", blockTag); + } + + let blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + blockNumber += blockTag; + if (blockNumber < 0) { blockNumber = 0; } + return this.formatter.blockTag(blockNumber) + } + + return this.formatter.blockTag(blockTag); + } + + + async getResolver(name: string): Promise { + try { + const address = await this._getResolver(name); + if (address == null) { return null; } + return new Resolver(this, address, name); + } catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { return null; } + return null; + } + } + + async _getResolver(name: string): Promise { + // Get the resolver from the blockchain + const network = await this.getNetwork(); + + // No ENS... + if (!network.ensAddress) { + logger.throwError( + "network does not support ENS", + Logger.errors.UNSUPPORTED_OPERATION, + { operation: "ENS", network: network.name } + ); + } + + // keccak256("resolver(bytes32)") + const transaction = { + to: network.ensAddress, + data: ("0x0178b8bf" + namehash(name).substring(2)) + }; + + try { + return this.formatter.callAddress(await this.call(transaction)); + } catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { return null; } + throw error; + } + } + + async resolveName(name: string | Promise): Promise { + name = await name; + + // If it is already an address, nothing to resolve + try { + return Promise.resolve(this.formatter.address(name)); + } catch (error) { + // If is is a hexstring, the address is bad (See #694) + if (isHexString(name)) { throw error; } + } + + if (typeof(name) !== "string") { + logger.throwArgumentError("invalid ENS name", "name", name); + } + + // Get the addr from the resovler + const resolver = await this.getResolver(name); + if (!resolver) { return null; } + + return await resolver.getAddress(); + } + + async lookupAddress(address: string | Promise): Promise { + address = await address; + address = this.formatter.address(address); + + const reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + + const resolverAddress = await this._getResolver(reverseName); + if (!resolverAddress) { return null; } + + // keccak("name(bytes32)") + let bytes = arrayify(await this.call({ + to: resolverAddress, + data: ("0x691f3431" + namehash(reverseName).substring(2)) + })); + + // Strip off the dynamic string pointer (0x20) + if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { return null; } + bytes = bytes.slice(32); + + // Not a length-prefixed string + if (bytes.length < 32) { return null; } + + // Get the length of the string (from the length-prefix) + const length = BigNumber.from(bytes.slice(0, 32)).toNumber(); + bytes = bytes.slice(32); + + // Length longer than available data + if (length > bytes.length) { return null; } + + const name = toUtf8String(bytes.slice(0, length)); + + // Make sure the reverse record matches the foward record + const addr = await this.resolveName(name); + if (addr != address) { return null; } + + return name; + } + + async getAvatar(nameOrAddress: string): Promise { + let resolver: Resolver = null; + if (isHexString(nameOrAddress)) { + // Address; reverse lookup + const address = this.formatter.address(nameOrAddress); + + const reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + + const resolverAddress = await this._getResolver(reverseName); + if (!resolverAddress) { return null; } + + resolver = new Resolver(this, resolverAddress, "_", address); + + } else { + // ENS name; forward lookup + resolver = await this.getResolver(nameOrAddress); + if (!resolver) { return null; } + } + + const avatar = await resolver.getAvatar(); + if (avatar == null) { return null; } + + return avatar.url; + } + + perform(method: string, params: any): Promise { + return logger.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + + _startEvent(event: Event): void { + this.polling = (this._events.filter((e) => e.pollable()).length > 0); + } + + _stopEvent(event: Event): void { + this.polling = (this._events.filter((e) => e.pollable()).length > 0); + } + + _addEventListener(eventName: EventType, listener: Listener, once: boolean): this { + const event = new Event(getEventTag(eventName), listener, once) + this._events.push(event); + this._startEvent(event); + + return this; + } + + on(eventName: EventType, listener: Listener): this { + return this._addEventListener(eventName, listener, false); + } + + once(eventName: EventType, listener: Listener): this { + return this._addEventListener(eventName, listener, true); + } + + + emit(eventName: EventType, ...args: Array): boolean { + let result = false; + + let stopped: Array = [ ]; + + let eventTag = getEventTag(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag) { return true; } + + setTimeout(() => { + event.listener.apply(this, args); + }, 0); + + result = true; + + if (event.once) { + stopped.push(event); + return false; + } + + return true; + }); + + stopped.forEach((event) => { this._stopEvent(event); }); + + return result; + } + + listenerCount(eventName?: EventType): number { + if (!eventName) { return this._events.length; } + + let eventTag = getEventTag(eventName); + return this._events.filter((event) => { + return (event.tag === eventTag); + }).length; + } + + listeners(eventName?: EventType): Array { + if (eventName == null) { + return this._events.map((event) => event.listener); + } + + let eventTag = getEventTag(eventName); + return this._events + .filter((event) => (event.tag === eventTag)) + .map((event) => event.listener); + } + + off(eventName: EventType, listener?: Listener): this { + if (listener == null) { + return this.removeAllListeners(eventName); + } + + const stopped: Array = [ ]; + + let found = false; + + let eventTag = getEventTag(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag || event.listener != listener) { return true; } + if (found) { return true; } + found = true; + stopped.push(event); + return false; + }); + + stopped.forEach((event) => { this._stopEvent(event); }); + + return this; + } + + removeAllListeners(eventName?: EventType): this { + let stopped: Array = [ ]; + if (eventName == null) { + stopped = this._events; + + this._events = [ ]; + } else { + const eventTag = getEventTag(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag) { return true; } + stopped.push(event); + return false; + }); + } + + stopped.forEach((event) => { this._stopEvent(event); }); + + return this; + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/browser-ipc-provider.ts b/node_modules/@ethersproject/providers/src.ts/browser-ipc-provider.ts new file mode 100644 index 0000000..1759a56 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/browser-ipc-provider.ts @@ -0,0 +1,7 @@ +"use strict"; + +const IpcProvider: any = null; + +export { + IpcProvider +}; diff --git a/node_modules/@ethersproject/providers/src.ts/browser-net.ts b/node_modules/@ethersproject/providers/src.ts/browser-net.ts new file mode 100644 index 0000000..a347d85 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/browser-net.ts @@ -0,0 +1,3 @@ +"use strict"; + +export function connect() { } diff --git a/node_modules/@ethersproject/providers/src.ts/browser-ws.ts b/node_modules/@ethersproject/providers/src.ts/browser-ws.ts new file mode 100644 index 0000000..3f6f8db --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/browser-ws.ts @@ -0,0 +1,21 @@ +"use strict"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; + +let WS: any = null; + +try { + WS = (WebSocket as any); + if (WS == null) { throw new Error("inject please"); } +} catch (error) { + const logger = new Logger(version); + WS = function() { + logger.throwError("WebSockets not supported in this environment", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new WebSocket()" + }); + } +} +//export default WS; +//module.exports = WS; +export { WS as WebSocket }; diff --git a/node_modules/@ethersproject/providers/src.ts/cloudflare-provider.ts b/node_modules/@ethersproject/providers/src.ts/cloudflare-provider.ts new file mode 100644 index 0000000..b2c5f84 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/cloudflare-provider.ts @@ -0,0 +1,42 @@ +"use strict"; + +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export class CloudflareProvider extends UrlJsonRpcProvider { + + static getApiKey(apiKey: any): any { + if (apiKey != null) { + logger.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); + } + return null; + } + + static getUrl(network: Network, apiKey?: any): string { + let host = null; + switch (network.name) { + case "homestead": + host = "https://cloudflare-eth.com/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + + return host; + } + + async perform(method: string, params: any): Promise { + // The Cloudflare provider does not support eth_blockNumber, + // so we get the latest block and pull it from that + if (method === "getBlockNumber") { + const block = await super.perform("getBlock", { blockTag: "latest" }); + return block.number; + } + + return super.perform(method, params); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/etherscan-provider.ts b/node_modules/@ethersproject/providers/src.ts/etherscan-provider.ts new file mode 100644 index 0000000..4e8db11 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/etherscan-provider.ts @@ -0,0 +1,450 @@ +"use strict"; + +import { BlockTag, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { hexlify, hexValue, isHexString } from "@ethersproject/bytes"; +import { Network, Networkish } from "@ethersproject/networks"; +import { deepCopy, defineReadOnly } from "@ethersproject/properties"; +import { accessListify } from "@ethersproject/transactions"; +import { ConnectionInfo, fetchJson } from "@ethersproject/web"; + +import { showThrottleMessage } from "./formatter"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { BaseProvider } from "./base-provider"; + + +// The transaction has already been sanitized by the calls in Provider +function getTransactionPostData(transaction: TransactionRequest): Record { + const result: Record = { }; + for (let key in transaction) { + if ((transaction)[key] == null) { continue; } + let value = (transaction)[key]; + if (key === "type" && value === 0) { continue; } + + // Quantity-types require no leading zero, unless 0 + if (({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true })[key]) { + value = hexValue(hexlify(value)); + } else if (key === "accessList") { + value = "[" + accessListify(value).map((set) => { + return `{address:"${ set.address }",storageKeys:["${ set.storageKeys.join('","') }"]}`; + }).join(",") + "]"; + } else { + value = hexlify(value); + } + result[key] = value; + } + return result; +} + +function getResult(result: { status?: number, message?: string, result?: any }): any { + // getLogs, getHistory have weird success responses + if (result.status == 0 && (result.message === "No records found" || result.message === "No transactions found")) { + return result.result; + } + + if (result.status != 1 || result.message != "OK") { + const error: any = new Error("invalid response"); + error.result = JSON.stringify(result); + if ((result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + error.throttleRetry = true; + } + throw error; + } + + return result.result; +} + +function getJsonResult(result: { jsonrpc: string, result?: any, error?: { code?: number, data?: any, message?: string} } ): any { + // This response indicates we are being throttled + if (result && (result).status == 0 && (result).message == "NOTOK" && (result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + const error: any = new Error("throttled response"); + error.result = JSON.stringify(result); + error.throttleRetry = true; + throw error; + } + + if (result.jsonrpc != "2.0") { + // @TODO: not any + const error: any = new Error("invalid response"); + error.result = JSON.stringify(result); + throw error; + } + + if (result.error) { + // @TODO: not any + const error: any = new Error(result.error.message || "unknown error"); + if (result.error.code) { error.code = result.error.code; } + if (result.error.data) { error.data = result.error.data; } + throw error; + } + + return result.result; +} + +// The blockTag was normalized as a string by the Provider pre-perform operations +function checkLogTag(blockTag: string): number | "latest" { + if (blockTag === "pending") { throw new Error("pending not supported"); } + if (blockTag === "latest") { return blockTag; } + + return parseInt(blockTag.substring(2), 16); +} + + +const defaultApiKey = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"; + +function checkError(method: string, error: any, transaction: any): any { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === Logger.errors.SERVER_ERROR) { + const e = error.error; + + // Etherscan keeps changing their string + if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) { + // Etherscan prefixes the data like "Reverted 0x1234" + let data = e.data; + if (data) { data = "0x" + data.replace(/^.*0x/i, ""); } + + if (isHexString(data)) { return data; } + + logger.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, { + error, data: "0x" + }); + } + } + + // Get the message from any nested error structure + let message = error.message; + if (error.code === Logger.errors.SERVER_ERROR) { + if (error.error && typeof(error.error.message) === "string") { + message = error.error.message; + } else if (typeof(error.body) === "string") { + message = error.body; + } else if (typeof(error.responseText) === "string") { + message = error.responseText; + } + } + message = (message || "").toLowerCase(); + + // "Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0" + if (message.match(/insufficient funds/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + + // "Transaction with the same hash was already imported." + if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) { + logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + + // "Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce." + if (message.match(/another transaction with same nonce/)) { + logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + + if (message.match(/execution failed due to an exception|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, method, transaction + }); + } + + throw error; +} + +export class EtherscanProvider extends BaseProvider{ + readonly baseUrl: string; + readonly apiKey: string; + + constructor(network?: Networkish, apiKey?: string) { + logger.checkNew(new.target, EtherscanProvider); + + super(network); + + defineReadOnly(this, "baseUrl", this.getBaseUrl()); + defineReadOnly(this, "apiKey", apiKey || defaultApiKey); + } + + getBaseUrl(): string { + switch(this.network ? this.network.name: "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "ropsten": + return "https:/\/api-ropsten.etherscan.io"; + case "rinkeby": + return "https:/\/api-rinkeby.etherscan.io"; + case "kovan": + return "https:/\/api-kovan.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + default: + } + + return logger.throwArgumentError("unsupported network", "network", name); + } + + getUrl(module: string, params: Record): string { + const query = Object.keys(params).reduce((accum, key) => { + const value = params[key]; + if (value != null) { + accum += `&${ key }=${ value }` + } + return accum + }, ""); + const apiKey = ((this.apiKey) ? `&apikey=${ this.apiKey }`: ""); + return `${ this.baseUrl }/api?module=${ module }${ query }${ apiKey }`; + } + + getPostUrl(): string { + return `${ this.baseUrl }/api`; + } + + getPostData(module: string, params: Record): Record { + params.module = module; + params.apikey = this.apiKey; + return params; + } + + async fetch(module: string, params: Record, post?: boolean): Promise { + const url = (post ? this.getPostUrl(): this.getUrl(module, params)); + const payload = (post ? this.getPostData(module, params): null); + const procFunc = (module === "proxy") ? getJsonResult: getResult; + + this.emit("debug", { + action: "request", + request: url, + provider: this + }); + + const connection: ConnectionInfo = { + url: url, + throttleSlotInterval: 1000, + throttleCallback: (attempt: number, url: string) => { + if (this.isCommunityResource()) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + + let payloadStr: string = null; + if (payload) { + connection.headers = { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" }; + payloadStr = Object.keys(payload).map((key) => { + return `${ key }=${ payload[key] }` + }).join("&"); + } + + const result = await fetchJson(connection, payloadStr, procFunc || getJsonResult); + + this.emit("debug", { + action: "response", + request: url, + response: deepCopy(result), + provider: this + }); + + return result; + } + + async detectNetwork(): Promise { + return this.network; + } + + async perform(method: string, params: any): Promise { + + switch (method) { + case "getBlockNumber": + return this.fetch("proxy", { action: "eth_blockNumber" }); + + case "getGasPrice": + return this.fetch("proxy", { action: "eth_gasPrice" }); + + case "getBalance": + // Returns base-10 result + return this.fetch("account", { + action: "balance", + address: params.address, + tag: params.blockTag + }); + + case "getTransactionCount": + return this.fetch("proxy", { + action: "eth_getTransactionCount", + address: params.address, + tag: params.blockTag + }); + + case "getCode": + return this.fetch("proxy", { + action: "eth_getCode", + address: params.address, + tag: params.blockTag + }); + + case "getStorageAt": + return this.fetch("proxy", { + action: "eth_getStorageAt", + address: params.address, + position: params.position, + tag: params.blockTag + }); + + case "sendTransaction": + return this.fetch("proxy", { + action: "eth_sendRawTransaction", + hex: params.signedTransaction + }, true).catch((error) => { + return checkError("sendTransaction", error, params.signedTransaction); + }); + + case "getBlock": + if (params.blockTag) { + return this.fetch("proxy", { + action: "eth_getBlockByNumber", + tag: params.blockTag, + boolean: (params.includeTransactions ? "true": "false") + }); + } + throw new Error("getBlock by blockHash not implemented"); + + case "getTransaction": + return this.fetch("proxy", { + action: "eth_getTransactionByHash", + txhash: params.transactionHash + }); + + case "getTransactionReceipt": + return this.fetch("proxy", { + action: "eth_getTransactionReceipt", + txhash: params.transactionHash + }); + + case "call": { + if (params.blockTag !== "latest") { + throw new Error("EtherscanProvider does not support blockTag for call"); + } + + const postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_call"; + + try { + return await this.fetch("proxy", postData, true); + } catch (error) { + return checkError("call", error, params.transaction); + } + } + + case "estimateGas": { + const postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_estimateGas"; + + try { + return await this.fetch("proxy", postData, true); + } catch (error) { + return checkError("estimateGas", error, params.transaction); + } + } + + case "getLogs": { + const args: Record = { action: "getLogs" } + + if (params.filter.fromBlock) { + args.fromBlock = checkLogTag(params.filter.fromBlock); + } + + if (params.filter.toBlock) { + args.toBlock = checkLogTag(params.filter.toBlock); + } + + if (params.filter.address) { + args.address = params.filter.address; + } + + // @TODO: We can handle slightly more complicated logs using the logs API + if (params.filter.topics && params.filter.topics.length > 0) { + if (params.filter.topics.length > 1) { + logger.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); + } + + if (params.filter.topics.length === 1) { + const topic0 = params.filter.topics[0]; + if (typeof(topic0) !== "string" || topic0.length !== 66) { + logger.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 }); + } + args.topic0 = topic0; + } + } + + const logs: Array = await this.fetch("logs", args); + + // Cache txHash => blockHash + let blocks: { [tag: string]: string } = {}; + + // Add any missing blockHash to the logs + for (let i = 0; i < logs.length; i++) { + const log = logs[i]; + if (log.blockHash != null) { continue; } + if (blocks[log.blockNumber] == null) { + const block = await this.getBlock(log.blockNumber); + if (block) { + blocks[log.blockNumber] = block.hash; + } + } + log.blockHash = blocks[log.blockNumber]; + } + + return logs; + } + + case "getEtherPrice": + if (this.network.name !== "homestead") { return 0.0; } + return parseFloat((await this.fetch("stats", { action: "ethprice" })).ethusd); + + default: + break; + } + + return super.perform(method, params); + } + + // Note: The `page` page parameter only allows pagination within the + // 10,000 window available without a page and offset parameter + // Error: Result window is too large, PageNo x Offset size must + // be less than or equal to 10000 + async getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise> { + const params = { + action: "txlist", + address: (await this.resolveName(addressOrName)), + startblock: ((startBlock == null) ? 0: startBlock), + endblock: ((endBlock == null) ? 99999999: endBlock), + sort: "asc" + }; + + const result = await this.fetch("account", params); + + return result.map((tx: any) => { + ["contractAddress", "to"].forEach(function(key) { + if (tx[key] == "") { delete tx[key]; } + }); + if (tx.creates == null && tx.contractAddress != null) { + tx.creates = tx.contractAddress; + } + const item = this.formatter.transactionResponse(tx); + if (tx.timeStamp) { item.timestamp = parseInt(tx.timeStamp); } + return item; + }); + } + + isCommunityResource(): boolean { + return (this.apiKey === defaultApiKey); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/fallback-provider.ts b/node_modules/@ethersproject/providers/src.ts/fallback-provider.ts new file mode 100644 index 0000000..0931a6f --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/fallback-provider.ts @@ -0,0 +1,653 @@ +"use strict"; + +import { Block, BlockWithTransactions, Provider } from "@ethersproject/abstract-provider"; +import { BigNumber } from "@ethersproject/bignumber"; +import { isHexString } from "@ethersproject/bytes"; +import { Network } from "@ethersproject/networks"; +import { deepCopy, defineReadOnly, shallowCopy } from "@ethersproject/properties"; +import { shuffled } from "@ethersproject/random"; +import { poll } from "@ethersproject/web"; + +import { BaseProvider } from "./base-provider"; +import { isCommunityResource } from "./formatter"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +function now() { return (new Date()).getTime(); } + +// Returns to network as long as all agree, or null if any is null. +// Throws an error if any two networks do not match. +function checkNetworks(networks: Array): Network { + let result = null; + + for (let i = 0; i < networks.length; i++) { + const network = networks[i]; + + // Null! We do not know our network; bail. + if (network == null) { return null; } + + if (result) { + // Make sure the network matches the previous networks + if (!(result.name === network.name && result.chainId === network.chainId && + ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) { + + logger.throwArgumentError("provider mismatch", "networks", networks); + } + } else { + result = network; + } + } + + return result; +} + +function median(values: Array, maxDelta?: number): number { + values = values.slice().sort(); + const middle = Math.floor(values.length / 2); + + // Odd length; take the middle + if (values.length % 2) { + return values[middle]; + } + + // Even length; take the average of the two middle + const a = values[middle - 1], b = values[middle]; + + if (maxDelta != null && Math.abs(a - b) > maxDelta) { + return null; + } + + return (a + b) / 2; +} + +function serialize(value: any): string { + if (value === null) { + return "null"; + } else if (typeof(value) === "number" || typeof(value) === "boolean") { + return JSON.stringify(value); + } else if (typeof(value) === "string") { + return value; + } else if (BigNumber.isBigNumber(value)) { + return value.toString(); + } else if (Array.isArray(value)) { + return JSON.stringify(value.map((i) => serialize(i))); + } else if (typeof(value) === "object") { + const keys = Object.keys(value); + keys.sort(); + return "{" + keys.map((key) => { + let v = value[key]; + if (typeof(v) === "function") { + v = "[function]"; + } else { + v = serialize(v); + } + return JSON.stringify(key) + ":" + v; + }).join(",") + "}"; + } + + throw new Error("unknown value type: " + typeof(value)); +} + +// Next request ID to use for emitting debug info +let nextRid = 1; + + +export interface FallbackProviderConfig { + // The Provider + provider: Provider; + + // The priority to favour this Provider; lower values are used first (higher priority) + priority?: number; + + // Timeout before also triggering the next provider; this does not stop + // this provider and if its result comes back before a quorum is reached + // it will be incorporated into the vote + // - lower values will cause more network traffic but may result in a + // faster result. + stallTimeout?: number; + + // How much this provider contributes to the quorum; sometimes a specific + // provider may be more reliable or trustworthy than others, but usually + // this should be left as the default + weight?: number; +}; + +// A Staller is used to provide a delay to give a Provider a chance to response +// before asking the next Provider to try. +type Staller = { + wait: (func: () => void) => Promise + getPromise: () => Promise, + cancel: () => void +}; + +function stall(duration: number): Staller { + let cancel: () => void = null; + + let timer: NodeJS.Timer = null; + let promise = >(new Promise((resolve) => { + cancel = function() { + if (timer) { + clearTimeout(timer); + timer = null; + } + resolve(); + } + timer = setTimeout(cancel, duration); + })); + + const wait = (func: () => void) => { + promise = promise.then(func); + return promise; + } + + function getPromise(): Promise { + return promise; + } + + return { cancel, getPromise, wait }; +} + +const ForwardErrors = [ + Logger.errors.CALL_EXCEPTION, + Logger.errors.INSUFFICIENT_FUNDS, + Logger.errors.NONCE_EXPIRED, + Logger.errors.REPLACEMENT_UNDERPRICED, + Logger.errors.UNPREDICTABLE_GAS_LIMIT +]; + +const ForwardProperties = [ + "address", + "args", + "errorArgs", + "errorSignature", + "method", + "transaction", +]; + + +// @TODO: Make this an object with staller and cancel built-in +interface RunningConfig extends FallbackProviderConfig { + start?: number; + done?: boolean; + cancelled?: boolean; + runner?: Promise; + staller?: Staller; + result?: any; + error?: Error; +}; + +function exposeDebugConfig(config: RunningConfig, now?: number): any { + const result: any = { + weight: config.weight + }; + Object.defineProperty(result, "provider", { get: () => config.provider }); + if (config.start) { result.start = config.start; } + if (now) { result.duration = (now - config.start); } + if (config.done) { + if (config.error) { + result.error = config.error; + } else { + result.result = config.result || null; + } + } + return result; +} + +function normalizedTally(normalize: (value: any) => string, quorum: number): (configs: Array) => any { + return function(configs: Array): any { + + // Count the votes for each result + const tally: { [ key: string]: { count: number, result: any } } = { }; + configs.forEach((c) => { + const value = normalize(c.result); + if (!tally[value]) { tally[value] = { count: 0, result: c.result }; } + tally[value].count++; + }); + + // Check for a quorum on any given result + const keys = Object.keys(tally); + for (let i = 0; i < keys.length; i++) { + const check = tally[keys[i]]; + if (check.count >= quorum) { + return check.result; + } + } + + // No quroum + return undefined; + } +} +function getProcessFunc(provider: FallbackProvider, method: string, params: { [ key: string ]: any }): (configs: Array) => any { + + let normalize = serialize; + + switch (method) { + case "getBlockNumber": + // Return the median value, unless there is (median + 1) is also + // present, in which case that is probably true and the median + // is going to be stale soon. In the event of a malicious node, + // the lie will be true soon enough. + return function(configs: Array): number { + const values = configs.map((c) => c.result); + + // Get the median block number + let blockNumber = median(configs.map((c) => c.result), 2); + if (blockNumber == null) { return undefined; } + + blockNumber = Math.ceil(blockNumber); + + // If the next block height is present, its prolly safe to use + if (values.indexOf(blockNumber + 1) >= 0) { blockNumber++; } + + // Don't ever roll back the blockNumber + if (blockNumber >= provider._highestBlockNumber) { + provider._highestBlockNumber = blockNumber; + } + + return provider._highestBlockNumber; + }; + + case "getGasPrice": + // Return the middle (round index up) value, similar to median + // but do not average even entries and choose the higher. + // Malicious actors must compromise 50% of the nodes to lie. + return function(configs: Array): BigNumber { + const values = configs.map((c) => c.result); + values.sort(); + return values[Math.floor(values.length / 2)]; + } + + case "getEtherPrice": + // Returns the median price. Malicious actors must compromise at + // least 50% of the nodes to lie (in a meaningful way). + return function(configs: Array): number { + return median(configs.map((c) => c.result)); + } + + // No additional normalizing required; serialize is enough + case "getBalance": + case "getTransactionCount": + case "getCode": + case "getStorageAt": + case "call": + case "estimateGas": + case "getLogs": + break; + + // We drop the confirmations from transactions as it is approximate + case "getTransaction": + case "getTransactionReceipt": + normalize = function(tx: any): string { + if (tx == null) { return null; } + + tx = shallowCopy(tx); + tx.confirmations = -1; + return serialize(tx); + } + break; + + // We drop the confirmations from transactions as it is approximate + case "getBlock": + // We drop the confirmations from transactions as it is approximate + if (params.includeTransactions) { + normalize = function(block: BlockWithTransactions): string { + if (block == null) { return null; } + + block = shallowCopy(block); + block.transactions = block.transactions.map((tx) => { + tx = shallowCopy(tx); + tx.confirmations = -1; + return tx; + }); + return serialize(block); + }; + } else { + normalize = function(block: Block): string { + if (block == null) { return null; } + return serialize(block); + } + } + break; + + default: + throw new Error("unknown method: " + method); + } + + // Return the result if and only if the expected quorum is + // satisfied and agreed upon for the final result. + return normalizedTally(normalize, provider.quorum); + +} + +// If we are doing a blockTag query, we need to make sure the backend is +// caught up to the FallbackProvider, before sending a request to it. +async function waitForSync(config: RunningConfig, blockNumber: number): Promise { + const provider = (config.provider); + + if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) { + return provider; + } + + return poll(() => { + return new Promise((resolve, reject) => { + setTimeout(function() { + + // We are synced + if (provider.blockNumber >= blockNumber) { return resolve(provider); } + + // We're done; just quit + if (config.cancelled) { return resolve(null); } + + // Try again, next block + return resolve(undefined); + }, 0); + }); + }, { oncePoll: provider }); +} + +async function getRunner(config: RunningConfig, currentBlockNumber: number, method: string, params: { [ key: string]: any }): Promise { + let provider = config.provider; + + switch (method) { + case "getBlockNumber": + case "getGasPrice": + return provider[method](); + case "getEtherPrice": + if ((provider).getEtherPrice) { + return (provider).getEtherPrice(); + } + break; + case "getBalance": + case "getTransactionCount": + case "getCode": + if (params.blockTag && isHexString(params.blockTag)) { + provider = await waitForSync(config, currentBlockNumber) + } + return provider[method](params.address, params.blockTag || "latest"); + case "getStorageAt": + if (params.blockTag && isHexString(params.blockTag)) { + provider = await waitForSync(config, currentBlockNumber) + } + return provider.getStorageAt(params.address, params.position, params.blockTag || "latest"); + case "getBlock": + if (params.blockTag && isHexString(params.blockTag)) { + provider = await waitForSync(config, currentBlockNumber) + } + return provider[(params.includeTransactions ? "getBlockWithTransactions": "getBlock")](params.blockTag || params.blockHash); + case "call": + case "estimateGas": + if (params.blockTag && isHexString(params.blockTag)) { + provider = await waitForSync(config, currentBlockNumber) + } + return provider[method](params.transaction); + case "getTransaction": + case "getTransactionReceipt": + return provider[method](params.transactionHash); + case "getLogs": { + let filter = params.filter; + if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) { + provider = await waitForSync(config, currentBlockNumber) + } + return provider.getLogs(filter); + } + } + + return logger.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, { + method: method, + params: params + }); +} + +export class FallbackProvider extends BaseProvider { + readonly providerConfigs: ReadonlyArray; + readonly quorum: number; + + // Due to the highly asyncronous nature of the blockchain, we need + // to make sure we never unroll the blockNumber due to our random + // sample of backends + _highestBlockNumber: number; + + constructor(providers: Array, quorum?: number) { + logger.checkNew(new.target, FallbackProvider); + + if (providers.length === 0) { + logger.throwArgumentError("missing providers", "providers", providers); + } + + const providerConfigs: Array = providers.map((configOrProvider, index) => { + if (Provider.isProvider(configOrProvider)) { + const stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750; + const priority = 1; + return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority }); + } + + const config: FallbackProviderConfig = shallowCopy(configOrProvider); + + if (config.priority == null) { config.priority = 1; } + if (config.stallTimeout == null) { + config.stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750; + } + if (config.weight == null) { config.weight = 1; } + + const weight = config.weight; + if (weight % 1 || weight > 512 || weight < 1) { + logger.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${ index }].weight`, weight); + } + + return Object.freeze(config); + }); + + const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0); + + if (quorum == null) { + quorum = total / 2; + } else if (quorum > total) { + logger.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); + } + + // Are all providers' networks are known + let networkOrReady: Network | Promise = checkNetworks(providerConfigs.map((c) => ((c.provider)).network)); + + // Not all networks are known; we must stall + if (networkOrReady == null) { + networkOrReady = new Promise((resolve, reject) => { + setTimeout(() => { + this.detectNetwork().then(resolve, reject); + }, 0); + }); + } + + super(networkOrReady); + + // Preserve a copy, so we do not get mutated + defineReadOnly(this, "providerConfigs", Object.freeze(providerConfigs)); + defineReadOnly(this, "quorum", quorum); + + this._highestBlockNumber = -1; + } + + async detectNetwork(): Promise { + const networks = await Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork())); + return checkNetworks(networks); + } + + async perform(method: string, params: { [name: string]: any }): Promise { + // Sending transactions is special; always broadcast it to all backends + if (method === "sendTransaction") { + const results: Array = await Promise.all(this.providerConfigs.map((c) => { + return c.provider.sendTransaction(params.signedTransaction).then((result) => { + return result.hash; + }, (error) => { + return error; + }); + })); + + // Any success is good enough (other errors are likely "already seen" errors + for (let i = 0; i < results.length; i++) { + const result = results[i]; + if (typeof(result) === "string") { return result; } + } + + // They were all an error; pick the first error + throw results[0]; + } + + // We need to make sure we are in sync with our backends, so we need + // to know this before we can make a lot of calls + if (this._highestBlockNumber === -1 && method !== "getBlockNumber") { + await this.getBlockNumber(); + } + + const processFunc = getProcessFunc(this, method, params); + + // Shuffle the providers and then sort them by their priority; we + // shallowCopy them since we will store the result in them too + const configs: Array = shuffled(this.providerConfigs.map(shallowCopy)); + configs.sort((a, b) => (a.priority - b.priority)); + + const currentBlockNumber = this._highestBlockNumber; + + let i = 0; + let first = true; + while (true) { + const t0 = now(); + + // Compute the inflight weight (exclude anything past) + let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout))) + .reduce((accum, c) => (accum + c.weight), 0); + + // Start running enough to meet quorum + while (inflightWeight < this.quorum && i < configs.length) { + const config = configs[i++]; + + const rid = nextRid++; + + config.start = now(); + config.staller = stall(config.stallTimeout); + config.staller.wait(() => { config.staller = null; }); + + config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => { + config.done = true; + config.result = result; + + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + + }, (error) => { + config.done = true; + config.error = error; + + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + }); + + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, null), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + + inflightWeight += config.weight; + } + + // Wait for anything meaningful to finish or stall out + const waiting: Array> = [ ]; + configs.forEach((c) => { + if (c.done || !c.runner) { return; } + waiting.push(c.runner); + if (c.staller) { waiting.push(c.staller.getPromise()); } + }); + + if (waiting.length) { await Promise.race(waiting); } + + // Check the quorum and process the results; the process function + // may additionally decide the quorum is not met + const results = configs.filter((c) => (c.done && c.error == null)); + if (results.length >= this.quorum) { + const result = processFunc(results); + if (result !== undefined) { + // Shut down any stallers + configs.forEach(c => { + if (c.staller) { c.staller.cancel(); } + c.cancelled = true; + }); + return result; + } + if (!first) { await stall(100).getPromise(); } + first = false; + } + + // No result, check for errors that should be forwarded + const errors = configs.reduce((accum, c) => { + if (!c.done || c.error == null) { return accum; } + + const code = ((c.error)).code; + if (ForwardErrors.indexOf(code) >= 0) { + if (!accum[code]) { accum[code] = { error: c.error, weight: 0 }; } + accum[code].weight += c.weight; + } + + return accum; + }, <{ [ code: string ]: { error: Error, weight: number } }>({ })); + + Object.keys(errors).forEach((errorCode: string) => { + const tally = errors[errorCode]; + if (tally.weight < this.quorum) { return; } + + // Shut down any stallers + configs.forEach(c => { + if (c.staller) { c.staller.cancel(); } + c.cancelled = true; + }); + + const e = (tally.error); + + const props: { [ name: string ]: any } = { }; + ForwardProperties.forEach((name) => { + if (e[name] == null) { return; } + props[name] = e[name]; + }); + + logger.throwError(e.reason || e.message, errorCode, props); + }); + + // All configs have run to completion; we will never get more data + if (configs.filter((c) => !c.done).length === 0) { break; } + } + + // Shut down any stallers; shouldn't be any + configs.forEach(c => { + if (c.staller) { c.staller.cancel(); } + c.cancelled = true; + }); + + return logger.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, { + method: method, + params: params, + //results: configs.map((c) => c.result), + //errors: configs.map((c) => c.error), + results: configs.map((c) => exposeDebugConfig(c)), + provider: this + }); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/formatter.ts b/node_modules/@ethersproject/providers/src.ts/formatter.ts new file mode 100644 index 0000000..d90ca33 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/formatter.ts @@ -0,0 +1,523 @@ +"use strict"; + +import { Block, TransactionReceipt, TransactionResponse } from "@ethersproject/abstract-provider"; +import { getAddress, getContractAddress } from "@ethersproject/address"; +import { BigNumber } from "@ethersproject/bignumber"; +import { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { AddressZero } from "@ethersproject/constants"; +import { shallowCopy } from "@ethersproject/properties"; +import { AccessList, accessListify, parse as parseTransaction } from "@ethersproject/transactions"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export type FormatFunc = (value: any) => any; + +export type FormatFuncs = { [ key: string ]: FormatFunc }; + +export type Formats = { + transaction: FormatFuncs, + transactionRequest: FormatFuncs, + receipt: FormatFuncs, + receiptLog: FormatFuncs, + block: FormatFuncs, + blockWithTransactions: FormatFuncs, + filter: FormatFuncs, + filterLog: FormatFuncs, +}; + +export class Formatter { + readonly formats: Formats; + + constructor() { + logger.checkNew(new.target, Formatter); + this.formats = this.getDefaultFormats(); + } + + getDefaultFormats(): Formats { + const formats: Formats = ({ }); + + const address = this.address.bind(this); + const bigNumber = this.bigNumber.bind(this); + const blockTag = this.blockTag.bind(this); + const data = this.data.bind(this); + const hash = this.hash.bind(this); + const hex = this.hex.bind(this); + const number = this.number.bind(this); + const type = this.type.bind(this); + + const strictData = (v: any) => { return this.data(v, true); }; + + formats.transaction = { + hash: hash, + + type: type, + accessList: Formatter.allowNull(this.accessList.bind(this), null), + + blockHash: Formatter.allowNull(hash, null), + blockNumber: Formatter.allowNull(number, null), + transactionIndex: Formatter.allowNull(number, null), + + confirmations: Formatter.allowNull(number, null), + + from: address, + + // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) + // must be set + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + + gasLimit: bigNumber, + to: Formatter.allowNull(address, null), + value: bigNumber, + nonce: number, + data: data, + + r: Formatter.allowNull(this.uint256), + s: Formatter.allowNull(this.uint256), + v: Formatter.allowNull(number), + + creates: Formatter.allowNull(address, null), + + raw: Formatter.allowNull(data), + }; + + formats.transactionRequest = { + from: Formatter.allowNull(address), + nonce: Formatter.allowNull(number), + gasLimit: Formatter.allowNull(bigNumber), + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + to: Formatter.allowNull(address), + value: Formatter.allowNull(bigNumber), + data: Formatter.allowNull(strictData), + type: Formatter.allowNull(number), + accessList: Formatter.allowNull(this.accessList.bind(this), null), + }; + + formats.receiptLog = { + transactionIndex: number, + blockNumber: number, + transactionHash: hash, + address: address, + topics: Formatter.arrayOf(hash), + data: data, + logIndex: number, + blockHash: hash, + }; + + formats.receipt = { + to: Formatter.allowNull(this.address, null), + from: Formatter.allowNull(this.address, null), + contractAddress: Formatter.allowNull(address, null), + transactionIndex: number, + // should be allowNull(hash), but broken-EIP-658 support is handled in receipt + root: Formatter.allowNull(hex), + gasUsed: bigNumber, + logsBloom: Formatter.allowNull(data),// @TODO: should this be data? + blockHash: hash, + transactionHash: hash, + logs: Formatter.arrayOf(this.receiptLog.bind(this)), + blockNumber: number, + confirmations: Formatter.allowNull(number, null), + cumulativeGasUsed: bigNumber, + effectiveGasPrice: Formatter.allowNull(bigNumber), + status: Formatter.allowNull(number), + type: type + }; + + formats.block = { + hash: hash, + parentHash: hash, + number: number, + + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + + gasLimit: bigNumber, + gasUsed: bigNumber, + + miner: address, + extraData: data, + + transactions: Formatter.allowNull(Formatter.arrayOf(hash)), + + baseFeePerGas: Formatter.allowNull(bigNumber) + }; + + formats.blockWithTransactions = shallowCopy(formats.block); + formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))); + + formats.filter = { + fromBlock: Formatter.allowNull(blockTag, undefined), + toBlock: Formatter.allowNull(blockTag, undefined), + blockHash: Formatter.allowNull(hash, undefined), + address: Formatter.allowNull(address, undefined), + topics: Formatter.allowNull(this.topics.bind(this), undefined), + }; + + formats.filterLog = { + blockNumber: Formatter.allowNull(number), + blockHash: Formatter.allowNull(hash), + transactionIndex: number, + + removed: Formatter.allowNull(this.boolean.bind(this)), + + address: address, + data: Formatter.allowFalsish(data, "0x"), + + topics: Formatter.arrayOf(hash), + + transactionHash: hash, + logIndex: number, + }; + + return formats; + } + + accessList(accessList: Array): AccessList { + return accessListify(accessList || []); + } + + // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number + // Strict! Used on input. + number(number: any): number { + if (number === "0x") { return 0; } + return BigNumber.from(number).toNumber(); + } + + type(number: any): number { + if (number === "0x" || number == null) { return 0; } + return BigNumber.from(number).toNumber(); + } + + // Strict! Used on input. + bigNumber(value: any): BigNumber { + return BigNumber.from(value); + } + + // Requires a boolean, "true" or "false"; returns a boolean + boolean(value: any): boolean { + if (typeof(value) === "boolean") { return value; } + if (typeof(value) === "string") { + value = value.toLowerCase(); + if (value === "true") { return true; } + if (value === "false") { return false; } + } + throw new Error("invalid boolean - " + value); + } + + hex(value: any, strict?: boolean): string { + if (typeof(value) === "string") { + if (!strict && value.substring(0, 2) !== "0x") { value = "0x" + value; } + if (isHexString(value)) { + return value.toLowerCase(); + } + } + return logger.throwArgumentError("invalid hash", "value", value); + } + + data(value: any, strict?: boolean): string { + const result = this.hex(value, strict); + if ((result.length % 2) !== 0) { + throw new Error("invalid data; odd-length - " + value); + } + return result; + } + + // Requires an address + // Strict! Used on input. + address(value: any): string { + return getAddress(value); + } + + callAddress(value: any): string { + if (!isHexString(value, 32)) { return null; } + const address = getAddress(hexDataSlice(value, 12)); + return (address === AddressZero) ? null: address; + } + + contractAddress(value: any): string { + return getContractAddress(value); + } + + // Strict! Used on input. + blockTag(blockTag: any): string { + if (blockTag == null) { return "latest"; } + + if (blockTag === "earliest") { return "0x0"; } + + if (blockTag === "latest" || blockTag === "pending") { + return blockTag; + } + + if (typeof(blockTag) === "number" || isHexString(blockTag)) { + return hexValue(blockTag); + } + + throw new Error("invalid blockTag"); + } + + // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash. + hash(value: any, strict?: boolean): string { + const result = this.hex(value, strict); + if (hexDataLength(result) !== 32) { + return logger.throwArgumentError("invalid hash", "value", value); + } + return result; + } + + // Returns the difficulty as a number, or if too large (i.e. PoA network) null + difficulty(value: any): number { + if (value == null) { return null; } + + const v = BigNumber.from(value); + + try { + return v.toNumber(); + } catch (error) { } + + return null; + } + + uint256(value: any): string { + if (!isHexString(value)) { + throw new Error("invalid uint256"); + } + return hexZeroPad(value, 32); + } + + _block(value: any, format: any): Block { + if (value.author != null && value.miner == null) { + value.miner = value.author; + } + // The difficulty may need to come from _difficulty in recursed blocks + const difficulty = (value._difficulty != null) ? value._difficulty: value.difficulty; + const result = Formatter.check(format, value); + result._difficulty = ((difficulty == null) ? null: BigNumber.from(difficulty)); + return result; + } + + block(value: any): Block { + return this._block(value, this.formats.block); + } + + blockWithTransactions(value: any): Block { + return this._block(value, this.formats.blockWithTransactions); + } + + // Strict! Used on input. + transactionRequest(value: any): any { + return Formatter.check(this.formats.transactionRequest, value); + } + + transactionResponse(transaction: any): TransactionResponse { + + // Rename gas to gasLimit + if (transaction.gas != null && transaction.gasLimit == null) { + transaction.gasLimit = transaction.gas; + } + + // Some clients (TestRPC) do strange things like return 0x0 for the + // 0 address; correct this to be a real address + if (transaction.to && BigNumber.from(transaction.to).isZero()) { + transaction.to = "0x0000000000000000000000000000000000000000"; + } + + // Rename input to data + if (transaction.input != null && transaction.data == null) { + transaction.data = transaction.input; + } + + // If to and creates are empty, populate the creates from the transaction + if (transaction.to == null && transaction.creates == null) { + transaction.creates = this.contractAddress(transaction); + } + + if ((transaction.type === 1 || transaction.type === 2)&& transaction.accessList == null) { + transaction.accessList = [ ]; + } + + const result: TransactionResponse = Formatter.check(this.formats.transaction, transaction); + + if (transaction.chainId != null) { + let chainId = transaction.chainId; + + if (isHexString(chainId)) { + chainId = BigNumber.from(chainId).toNumber(); + } + + result.chainId = chainId; + + } else { + let chainId = transaction.networkId; + + // geth-etc returns chainId + if (chainId == null && result.v == null) { + chainId = transaction.chainId; + } + + if (isHexString(chainId)) { + chainId = BigNumber.from(chainId).toNumber(); + } + + if (typeof(chainId) !== "number" && result.v != null) { + chainId = (result.v - 35) / 2; + if (chainId < 0) { chainId = 0; } + chainId = parseInt(chainId); + } + + if (typeof(chainId) !== "number") { chainId = 0; } + + result.chainId = chainId; + } + + // 0x0000... should actually be null + if (result.blockHash && result.blockHash.replace(/0/g, "") === "x") { + result.blockHash = null; + } + + return result; + } + + transaction(value: any): any { + return parseTransaction(value); + } + + receiptLog(value: any): any { + return Formatter.check(this.formats.receiptLog, value); + } + + receipt(value: any): TransactionReceipt { + const result: TransactionReceipt = Formatter.check(this.formats.receipt, value); + + // RSK incorrectly implemented EIP-658, so we munge things a bit here for it + if (result.root != null) { + if (result.root.length <= 4) { + // Could be 0x00, 0x0, 0x01 or 0x1 + const value = BigNumber.from(result.root).toNumber(); + if (value === 0 || value === 1) { + // Make sure if both are specified, they match + if (result.status != null && (result.status !== value)) { + logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); + } + result.status = value; + delete result.root; + } else { + logger.throwArgumentError("invalid alt-root-status", "value.root", result.root); + } + } else if (result.root.length !== 66) { + // Must be a valid bytes32 + logger.throwArgumentError("invalid root hash", "value.root", result.root); + } + } + + if (result.status != null) { + result.byzantium = true; + } + + return result; + } + + topics(value: any): any { + if (Array.isArray(value)) { + return value.map((v) => this.topics(v)); + + } else if (value != null) { + return this.hash(value, true); + } + + return null; + } + + filter(value: any): any { + return Formatter.check(this.formats.filter, value); + } + + filterLog(value: any): any { + return Formatter.check(this.formats.filterLog, value); + } + + static check(format: { [ name: string ]: FormatFunc }, object: any): any { + const result: any = {}; + for (const key in format) { + try { + const value = format[key](object[key]); + if (value !== undefined) { result[key] = value; } + } catch (error) { + error.checkKey = key; + error.checkValue = object[key]; + throw error; + } + } + return result; + } + + // if value is null-ish, nullValue is returned + static allowNull(format: FormatFunc, nullValue?: any): FormatFunc { + return (function(value: any) { + if (value == null) { return nullValue; } + return format(value); + }); + } + + // If value is false-ish, replaceValue is returned + static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc { + return (function(value: any) { + if (!value) { return replaceValue; } + return format(value); + }); + } + + // Requires an Array satisfying check + static arrayOf(format: FormatFunc): FormatFunc { + return (function(array: any): Array { + if (!Array.isArray(array)) { throw new Error("not an array"); } + + const result: any = []; + + array.forEach(function(value) { + result.push(format(value)); + }); + + return result; + }); + } +} + +export interface CommunityResourcable { + isCommunityResource(): boolean; +} + +export function isCommunityResourcable(value: any): value is CommunityResourcable { + return (value && typeof(value.isCommunityResource) === "function"); +} + +export function isCommunityResource(value: any): boolean { + return (isCommunityResourcable(value) && value.isCommunityResource()); +} + +// Show the throttle message only once +let throttleMessage = false; +export function showThrottleMessage() { + if (throttleMessage) { return; } + throttleMessage = true; + + console.log("========= NOTICE =========") + console.log("Request-Rate Exceeded (this message will not be repeated)"); + console.log(""); + console.log("The default API keys for each service are provided as a highly-throttled,"); + console.log("community resource for low-traffic projects and early prototyping."); + console.log(""); + console.log("While your application will continue to function, we highly recommended"); + console.log("signing up for your own API keys to improve performance, increase your"); + console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."); + console.log(""); + console.log("For more details: https:/\/docs.ethers.io/api-keys/"); + console.log("=========================="); +} + diff --git a/node_modules/@ethersproject/providers/src.ts/index.ts b/node_modules/@ethersproject/providers/src.ts/index.ts new file mode 100644 index 0000000..914148c --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/index.ts @@ -0,0 +1,175 @@ +"use strict"; + +import { + Block, + BlockTag, + EventType, + FeeData, + Filter, + Log, + Listener, + Provider, + TransactionReceipt, + TransactionRequest, + TransactionResponse +} from "@ethersproject/abstract-provider"; + +import { getNetwork } from "@ethersproject/networks"; +import { Network, Networkish } from "@ethersproject/networks"; + +import { BaseProvider, EnsProvider, EnsResolver, Resolver } from "./base-provider"; + +import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider"; +import { CloudflareProvider } from "./cloudflare-provider"; +import { EtherscanProvider } from "./etherscan-provider"; +import { FallbackProvider, FallbackProviderConfig } from "./fallback-provider"; +import { IpcProvider } from "./ipc-provider"; +import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; +import { JsonRpcBatchProvider } from "./json-rpc-batch-provider"; +import { NodesmithProvider } from "./nodesmith-provider"; +import { PocketProvider } from "./pocket-provider"; +import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Web3Provider } from "./web3-provider"; +import { WebSocketProvider } from "./websocket-provider"; +import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider"; + +import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +//////////////////////// +// Helper Functions + +function getDefaultProvider(network?: Networkish, options?: any): BaseProvider { + if (network == null) { network = "homestead"; } + + // If passed a URL, figure out the right type of provider based on the scheme + if (typeof(network) === "string") { + // @TODO: Add support for IpcProvider; maybe if it ends in ".ipc"? + + // Handle http and ws (and their secure variants) + const match = network.match(/^(ws|http)s?:/i); + if (match) { + switch (match[1]) { + case "http": + return new JsonRpcProvider(network); + case "ws": + return new WebSocketProvider(network); + default: + logger.throwArgumentError("unsupported URL scheme", "network", network); + } + } + } + + const n = getNetwork(network); + if (!n || !n._defaultProvider) { + logger.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, { + operation: "getDefaultProvider", + network: network + }); + } + + return n._defaultProvider({ + FallbackProvider, + + AlchemyProvider, + CloudflareProvider, + EtherscanProvider, + InfuraProvider, + JsonRpcProvider, + NodesmithProvider, + PocketProvider, + Web3Provider, + + IpcProvider, + }, options); +} + +//////////////////////// +// Exports + +export { + + // Abstract Providers (or Abstract-ish) + Provider, + BaseProvider, + + Resolver, + + UrlJsonRpcProvider, + + /////////////////////// + // Concrete Providers + + FallbackProvider, + + AlchemyProvider, + AlchemyWebSocketProvider, + CloudflareProvider, + EtherscanProvider, + InfuraProvider, + InfuraWebSocketProvider, + JsonRpcProvider, + JsonRpcBatchProvider, + NodesmithProvider, + PocketProvider, + StaticJsonRpcProvider, + Web3Provider, + WebSocketProvider, + + IpcProvider, + + + /////////////////////// + // Signer + + JsonRpcSigner, + + + /////////////////////// + // Functions + + getDefaultProvider, + getNetwork, + isCommunityResource, + isCommunityResourcable, + showThrottleMessage, + + + /////////////////////// + // Objects + + Formatter, + + + /////////////////////// + // Types + + Block, + BlockTag, + EventType, + FeeData, + Filter, + Log, + Listener, + TransactionReceipt, + TransactionRequest, + TransactionResponse, + + ExternalProvider, + JsonRpcFetchFunc, + + FallbackProviderConfig, + + Network, + Networkish, + + EnsProvider, + EnsResolver, + + CommunityResourcable +}; + diff --git a/node_modules/@ethersproject/providers/src.ts/infura-provider.ts b/node_modules/@ethersproject/providers/src.ts/infura-provider.ts new file mode 100644 index 0000000..5db7e16 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/infura-provider.ts @@ -0,0 +1,149 @@ +"use strict"; + +import { Network, Networkish } from "@ethersproject/networks"; +import { defineReadOnly } from "@ethersproject/properties"; +import { ConnectionInfo } from "@ethersproject/web"; + +import { WebSocketProvider } from "./websocket-provider"; +import { CommunityResourcable, showThrottleMessage } from "./formatter"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; + + +const defaultProjectId = "84842078b09946638c03157f83405213" + +export class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + readonly apiKey: string; + readonly projectId: string; + readonly projectSecret: string; + + constructor(network?: Networkish, apiKey?: any) { + const provider = new InfuraProvider(network, apiKey); + const connection = provider.connection; + if (connection.password) { + logger.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "InfuraProvider.getWebSocketProvider()" + }); + } + + const url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/"); + super(url, network); + + defineReadOnly(this, "apiKey", provider.projectId); + defineReadOnly(this, "projectId", provider.projectId); + defineReadOnly(this, "projectSecret", provider.projectSecret); + } + + isCommunityResource(): boolean { + return (this.projectId === defaultProjectId); + } +} + +export class InfuraProvider extends UrlJsonRpcProvider { + readonly projectId: string; + readonly projectSecret: string; + + static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider { + return new InfuraWebSocketProvider(network, apiKey); + } + + static getApiKey(apiKey: any): any { + const apiKeyObj: { apiKey: string, projectId: string, projectSecret: string } = { + apiKey: defaultProjectId, + projectId: defaultProjectId, + projectSecret: null + }; + + if (apiKey == null) { return apiKeyObj; } + + if (typeof(apiKey) === "string") { + apiKeyObj.projectId = apiKey; + + } else if (apiKey.projectSecret != null) { + logger.assertArgument((typeof(apiKey.projectId) === "string"), + "projectSecret requires a projectId", "projectId", apiKey.projectId); + logger.assertArgument((typeof(apiKey.projectSecret) === "string"), + "invalid projectSecret", "projectSecret", "[REDACTED]"); + + apiKeyObj.projectId = apiKey.projectId; + apiKeyObj.projectSecret = apiKey.projectSecret; + + } else if (apiKey.projectId) { + apiKeyObj.projectId = apiKey.projectId; + } + + apiKeyObj.apiKey = apiKeyObj.projectId; + + return apiKeyObj; + } + + static getUrl(network: Network, apiKey: any): ConnectionInfo { + let host: string = null; + switch(network ? network.name: "unknown") { + case "homestead": + host = "mainnet.infura.io"; + break; + case "ropsten": + host = "ropsten.infura.io"; + break; + case "rinkeby": + host = "rinkeby.infura.io"; + break; + case "kovan": + host = "kovan.infura.io"; + break; + case "goerli": + host = "goerli.infura.io"; + break; + case "matic": + host = "polygon-mainnet.infura.io"; + break; + case "maticmum": + host = "polygon-mumbai.infura.io"; + break; + case "optimism": + host = "optimism-mainnet.infura.io"; + break; + case "optimism-kovan": + host = "optimism-kovan.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-rinkeby": + host = "arbitrum-rinkeby.infura.io"; + break; + default: + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + + const connection: ConnectionInfo = { + allowGzip: true, + url: ("https:/" + "/" + host + "/v3/" + apiKey.projectId), + throttleCallback: (attempt: number, url: string) => { + if (apiKey.projectId === defaultProjectId) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret + } + + return connection; + } + + isCommunityResource(): boolean { + return (this.projectId === defaultProjectId); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/ipc-provider.ts b/node_modules/@ethersproject/providers/src.ts/ipc-provider.ts new file mode 100644 index 0000000..c011ee8 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/ipc-provider.ts @@ -0,0 +1,74 @@ +"use strict"; + +import { connect } from "net"; + +import { defineReadOnly } from "@ethersproject/properties"; +import { Networkish } from "@ethersproject/networks"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { JsonRpcProvider } from "./json-rpc-provider"; + + +export class IpcProvider extends JsonRpcProvider { + readonly path: string; + + constructor(path: string, network?: Networkish) { + logger.checkNew(new.target, IpcProvider); + + if (path == null) { + logger.throwError("missing path", Logger.errors.MISSING_ARGUMENT, { arg: "path" }); + } + + super("ipc://" + path, network); + + defineReadOnly(this, "path", path); + } + + // @TODO: Create a connection to the IPC path and use filters instead of polling for block + + send(method: string, params: Array): Promise { + // This method is very simple right now. We create a new socket + // connection each time, which may be slower, but the main + // advantage we are aiming for now is security. This simplifies + // multiplexing requests (since we do not need to multiplex). + + let payload = JSON.stringify({ + method: method, + params: params, + id: 42, + jsonrpc: "2.0" + }); + + return new Promise((resolve, reject) => { + let response = Buffer.alloc(0); + + let stream = connect(this.path); + + stream.on("data", (data) => { + response = Buffer.concat([ response, data ]); + }); + + stream.on("end", () => { + try { + resolve(JSON.parse(response.toString()).result); + // @TODO: Better pull apart the error + stream.destroy(); + } catch (error) { + reject(error); + stream.destroy(); + } + }); + + stream.on("error", (error) => { + reject(error); + stream.destroy(); + }); + + stream.write(payload); + stream.end(); + }); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/json-rpc-batch-provider.ts b/node_modules/@ethersproject/providers/src.ts/json-rpc-batch-provider.ts new file mode 100644 index 0000000..d2bf8c8 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/json-rpc-batch-provider.ts @@ -0,0 +1,97 @@ + +import { deepCopy } from "@ethersproject/properties"; +import { fetchJson } from "@ethersproject/web"; + +import { JsonRpcProvider } from "./json-rpc-provider"; + +// Experimental + +export class JsonRpcBatchProvider extends JsonRpcProvider { + _pendingBatchAggregator: NodeJS.Timer; + _pendingBatch: Array<{ + request: { method: string, params: Array, id: number, jsonrpc: "2.0" }, + resolve: (result: any) => void, + reject: (error: Error) => void + }>; + + send(method: string, params: Array): Promise { + const request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + + if (this._pendingBatch == null) { + this._pendingBatch = [ ]; + } + + const inflightRequest: any = { request, resolve: null, reject: null }; + + const promise = new Promise((resolve, reject) => { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + + this._pendingBatch.push(inflightRequest); + + if (!this._pendingBatchAggregator) { + // Schedule batch for next event loop + short duration + this._pendingBatchAggregator = setTimeout(() => { + + // Get teh current batch and clear it, so new requests + // go into the next batch + const batch = this._pendingBatch; + this._pendingBatch = null; + this._pendingBatchAggregator = null; + + // Get the request as an array of requests + const request = batch.map((inflight) => inflight.request); + + this.emit("debug", { + action: "requestBatch", + request: deepCopy(request), + provider: this + }); + + return fetchJson(this.connection, JSON.stringify(request)).then((result) => { + this.emit("debug", { + action: "response", + request: request, + response: result, + provider: this + }); + + // For each result, feed it to the correct Promise, depending + // on whether it was a success or error + batch.forEach((inflightRequest, index) => { + const payload = result[index]; + if (payload.error) { + const error = new Error(payload.error.message); + (error).code = payload.error.code; + (error).data = payload.error.data; + inflightRequest.reject(error); + } else { + inflightRequest.resolve(payload.result); + } + }); + + }, (error) => { + this.emit("debug", { + action: "response", + error: error, + request: request, + provider: this + }); + + batch.forEach((inflightRequest) => { + inflightRequest.reject(error); + }); + }); + + }, 10); + } + + return promise; + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts b/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts new file mode 100644 index 0000000..3b3df22 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts @@ -0,0 +1,662 @@ +"use strict"; + +// See: https://github.com/ethereum/wiki/wiki/JSON-RPC + +import { Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; +import { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer"; +import { BigNumber } from "@ethersproject/bignumber"; +import { Bytes, hexlify, hexValue, isHexString } from "@ethersproject/bytes"; +import { _TypedDataEncoder } from "@ethersproject/hash"; +import { Network, Networkish } from "@ethersproject/networks"; +import { checkProperties, deepCopy, Deferrable, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import { toUtf8Bytes } from "@ethersproject/strings"; +import { AccessList, accessListify } from "@ethersproject/transactions"; +import { ConnectionInfo, fetchJson, poll } from "@ethersproject/web"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { BaseProvider, Event } from "./base-provider"; + + +const errorGas = [ "call", "estimateGas" ]; + +function checkError(method: string, error: any, params: any): any { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === Logger.errors.SERVER_ERROR) { + const e = error.error; + if (e && e.message.match("reverted") && isHexString(e.data)) { + return e.data; + } + + logger.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, { + error, data: "0x" + }); + } + + let message = error.message; + if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof(error.error.message) === "string") { + message = error.error.message; + } else if (typeof(error.body) === "string") { + message = error.body; + } else if (typeof(error.responseText) === "string") { + message = error.responseText; + } + message = (message || "").toLowerCase(); + + const transaction = params.transaction || params.signedTransaction; + + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + + // "nonce too low" + if (message.match(/nonce too low/)) { + logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced/)) { + logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + + // "replacement transaction underpriced" + if (message.match(/only replay-protected/)) { + logger.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, { + error, method, transaction + }); + } + + if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, method, transaction + }); + } + + throw error; +} + +function timer(timeout: number): Promise { + return new Promise(function(resolve) { + setTimeout(resolve, timeout); + }); +} + +function getResult(payload: { error?: { code?: number, data?: any, message?: string }, result?: any }): any { + if (payload.error) { + // @TODO: not any + const error: any = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + throw error; + } + + return payload.result; +} + +function getLowerCase(value: string): string { + if (value) { return value.toLowerCase(); } + return value; +} + +const _constructorGuard = {}; + +export class JsonRpcSigner extends Signer implements TypedDataSigner { + readonly provider: JsonRpcProvider; + _index: number; + _address: string; + + constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number) { + logger.checkNew(new.target, JsonRpcSigner); + + super(); + + if (constructorGuard !== _constructorGuard) { + throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner"); + } + + defineReadOnly(this, "provider", provider); + + if (addressOrIndex == null) { addressOrIndex = 0; } + + if (typeof(addressOrIndex) === "string") { + defineReadOnly(this, "_address", this.provider.formatter.address(addressOrIndex)); + defineReadOnly(this, "_index", null); + + } else if (typeof(addressOrIndex) === "number") { + defineReadOnly(this, "_index", addressOrIndex); + defineReadOnly(this, "_address", null); + + } else { + logger.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); + } + } + + connect(provider: Provider): JsonRpcSigner { + return logger.throwError("cannot alter JSON-RPC Signer connection", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "connect" + }); + } + + connectUnchecked(): JsonRpcSigner { + return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index); + } + + getAddress(): Promise { + if (this._address) { + return Promise.resolve(this._address); + } + + return this.provider.send("eth_accounts", []).then((accounts) => { + if (accounts.length <= this._index) { + logger.throwError("unknown account #" + this._index, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress" + }); + } + return this.provider.formatter.address(accounts[this._index]) + }); + } + + sendUncheckedTransaction(transaction: Deferrable): Promise { + transaction = shallowCopy(transaction); + + const fromAddress = this.getAddress().then((address) => { + if (address) { address = address.toLowerCase(); } + return address; + }); + + // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user + // wishes to use this, it is easy to specify explicitly, otherwise + // we look it up for them. + if (transaction.gasLimit == null) { + const estimate = shallowCopy(transaction); + estimate.from = fromAddress; + transaction.gasLimit = this.provider.estimateGas(estimate); + } + + if (transaction.to != null) { + transaction.to = Promise.resolve(transaction.to).then(async (to) => { + if (to == null) { return null; } + const address = await this.provider.resolveName(to); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return address; + }); + } + + return resolveProperties({ + tx: resolveProperties(transaction), + sender: fromAddress + }).then(({ tx, sender }) => { + + if (tx.from != null) { + if (tx.from.toLowerCase() !== sender) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + } else { + tx.from = sender; + } + + const hexTx = (this.provider.constructor).hexlifyTransaction(tx, { from: true }); + + return this.provider.send("eth_sendTransaction", [ hexTx ]).then((hash) => { + return hash; + }, (error) => { + return checkError("sendTransaction", error, hexTx); + }); + }); + } + + signTransaction(transaction: Deferrable): Promise { + return logger.throwError("signing transactions is unsupported", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signTransaction" + }); + } + + async sendTransaction(transaction: Deferrable): Promise { + // This cannot be mined any earlier than any recent block + const blockNumber = await this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval); + + // Send the transaction + const hash = await this.sendUncheckedTransaction(transaction); + + try { + // Unfortunately, JSON-RPC only provides and opaque transaction hash + // for a response, and we need the actual transaction, so we poll + // for it; it should show up very quickly + return await poll(async () => { + const tx = await this.provider.getTransaction(hash); + if (tx === null) { return undefined; } + return this.provider._wrapTransaction(tx, hash, blockNumber); + }, { oncePoll: this.provider }); + } catch (error) { + (error).transactionHash = hash; + throw error; + } + } + + async signMessage(message: Bytes | string): Promise { + const data = ((typeof(message) === "string") ? toUtf8Bytes(message): message); + const address = await this.getAddress(); + + return await this.provider.send("personal_sign", [ hexlify(data), address.toLowerCase() ]); + } + + async _legacySignMessage(message: Bytes | string): Promise { + const data = ((typeof(message) === "string") ? toUtf8Bytes(message): message); + const address = await this.getAddress(); + + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return await this.provider.send("eth_sign", [ address.toLowerCase(), hexlify(data) ]); + } + + async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise { + // Populate any ENS names (in-place) + const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => { + return this.provider.resolveName(name); + }); + + const address = await this.getAddress(); + + return await this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ]); + } + + async unlock(password: string): Promise { + const provider = this.provider; + + const address = await this.getAddress(); + + return provider.send("personal_unlockAccount", [ address.toLowerCase(), password, null ]); + } +} + +class UncheckedJsonRpcSigner extends JsonRpcSigner { + sendTransaction(transaction: Deferrable): Promise { + return this.sendUncheckedTransaction(transaction).then((hash) => { + return { + hash: hash, + nonce: null, + gasLimit: null, + gasPrice: null, + data: null, + value: null, + chainId: null, + confirmations: 0, + from: null, + wait: (confirmations?: number) => { return this.provider.waitForTransaction(hash, confirmations); } + }; + }); + } +} + +const allowedTransactionKeys: { [ key: string ]: boolean } = { + chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true +} + +export class JsonRpcProvider extends BaseProvider { + readonly connection: ConnectionInfo; + + _pendingFilter: Promise; + _nextId: number; + + // During any given event loop, the results for a given call will + // all be the same, so we can dedup the calls to save requests and + // bandwidth. @TODO: Try out generalizing this against send? + _eventLoopCache: Record>; + get _cache(): Record> { + if (this._eventLoopCache == null) { + this._eventLoopCache = { }; + } + return this._eventLoopCache; + } + + constructor(url?: ConnectionInfo | string, network?: Networkish) { + logger.checkNew(new.target, JsonRpcProvider); + + let networkOrReady: Networkish | Promise = network; + + // The network is unknown, query the JSON-RPC for it + if (networkOrReady == null) { + networkOrReady = new Promise((resolve, reject) => { + setTimeout(() => { + this.detectNetwork().then((network) => { + resolve(network); + }, (error) => { + reject(error); + }); + }, 0); + }); + } + + super(networkOrReady); + + // Default URL + if (!url) { url = getStatic<() => string>(this.constructor, "defaultUrl")(); } + + if (typeof(url) === "string") { + defineReadOnly(this, "connection",Object.freeze({ + url: url + })); + } else { + defineReadOnly(this, "connection", Object.freeze(shallowCopy(url))); + } + + this._nextId = 42; + } + + static defaultUrl(): string { + return "http:/\/localhost:8545"; + } + + detectNetwork(): Promise { + if (!this._cache["detectNetwork"]) { + this._cache["detectNetwork"] = this._uncachedDetectNetwork(); + + // Clear this cache at the beginning of the next event loop + setTimeout(() => { + this._cache["detectNetwork"] = null; + }, 0); + } + return this._cache["detectNetwork"]; + } + + async _uncachedDetectNetwork(): Promise { + await timer(0); + + let chainId = null; + try { + chainId = await this.send("eth_chainId", [ ]); + } catch (error) { + try { + chainId = await this.send("net_version", [ ]); + } catch (error) { } + } + + if (chainId != null) { + const getNetwork = getStatic<(network: Networkish) => Network>(this.constructor, "getNetwork"); + try { + return getNetwork(BigNumber.from(chainId).toNumber()); + } catch (error) { + return logger.throwError("could not detect network", Logger.errors.NETWORK_ERROR, { + chainId: chainId, + event: "invalidNetwork", + serverError: error + }); + } + } + + return logger.throwError("could not detect network", Logger.errors.NETWORK_ERROR, { + event: "noNetwork" + }); + } + + getSigner(addressOrIndex?: string | number): JsonRpcSigner { + return new JsonRpcSigner(_constructorGuard, this, addressOrIndex); + } + + getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner { + return this.getSigner(addressOrIndex).connectUnchecked(); + } + + listAccounts(): Promise> { + return this.send("eth_accounts", []).then((accounts: Array) => { + return accounts.map((a) => this.formatter.address(a)); + }); + } + + send(method: string, params: Array): Promise { + const request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + + this.emit("debug", { + action: "request", + request: deepCopy(request), + provider: this + }); + + // We can expand this in the future to any call, but for now these + // are the biggest wins and do not require any serializing parameters. + const cache = ([ "eth_chainId", "eth_blockNumber" ].indexOf(method) >= 0); + if (cache && this._cache[method]) { + return this._cache[method]; + } + + const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => { + this.emit("debug", { + action: "response", + request: request, + response: result, + provider: this + }); + + return result; + + }, (error) => { + this.emit("debug", { + action: "response", + error: error, + request: request, + provider: this + }); + + throw error; + }); + + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(() => { + this._cache[method] = null; + }, 0); + } + + return result; + } + + prepareRequest(method: string, params: any): [ string, Array ] { + switch (method) { + case "getBlockNumber": + return [ "eth_blockNumber", [] ]; + + case "getGasPrice": + return [ "eth_gasPrice", [] ]; + + case "getBalance": + return [ "eth_getBalance", [ getLowerCase(params.address), params.blockTag ] ]; + + case "getTransactionCount": + return [ "eth_getTransactionCount", [ getLowerCase(params.address), params.blockTag ] ]; + + case "getCode": + return [ "eth_getCode", [ getLowerCase(params.address), params.blockTag ] ]; + + case "getStorageAt": + return [ "eth_getStorageAt", [ getLowerCase(params.address), params.position, params.blockTag ] ]; + + case "sendTransaction": + return [ "eth_sendRawTransaction", [ params.signedTransaction ] ] + + case "getBlock": + if (params.blockTag) { + return [ "eth_getBlockByNumber", [ params.blockTag, !!params.includeTransactions ] ]; + } else if (params.blockHash) { + return [ "eth_getBlockByHash", [ params.blockHash, !!params.includeTransactions ] ]; + } + return null; + + case "getTransaction": + return [ "eth_getTransactionByHash", [ params.transactionHash ] ]; + + case "getTransactionReceipt": + return [ "eth_getTransactionReceipt", [ params.transactionHash ] ]; + + case "call": { + const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, "hexlifyTransaction"); + return [ "eth_call", [ hexlifyTransaction(params.transaction, { from: true }), params.blockTag ] ]; + } + + case "estimateGas": { + const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, "hexlifyTransaction"); + return [ "eth_estimateGas", [ hexlifyTransaction(params.transaction, { from: true }) ] ]; + } + + case "getLogs": + if (params.filter && params.filter.address != null) { + params.filter.address = getLowerCase(params.filter.address); + } + return [ "eth_getLogs", [ params.filter ] ]; + + default: + break; + } + + return null; + } + + async perform(method: string, params: any): Promise { + // Legacy networks do not like the type field being passed along (which + // is fair), so we delete type if it is 0 and a non-EIP-1559 network + if (method === "call" || method === "estimateGas") { + const tx = params.transaction; + if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) { + // If there are no EIP-1559 properties, it might be non-EIP-a559 + if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) { + const feeData = await this.getFeeData(); + if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) { + // Network doesn't know about EIP-1559 (and hence type) + params = shallowCopy(params); + params.transaction = shallowCopy(tx); + delete params.transaction.type; + } + } + } + } + + const args = this.prepareRequest(method, params); + + if (args == null) { + logger.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + try { + return await this.send(args[0], args[1]) + } catch (error) { + return checkError(method, error, params); + } + } + + _startEvent(event: Event): void { + if (event.tag === "pending") { this._startPending(); } + super._startEvent(event); + } + + _startPending(): void { + if (this._pendingFilter != null) { return; } + const self = this; + + const pendingFilter: Promise = this.send("eth_newPendingTransactionFilter", []); + this._pendingFilter = pendingFilter; + + pendingFilter.then(function(filterId) { + function poll() { + self.send("eth_getFilterChanges", [ filterId ]).then(function(hashes: Array) { + if (self._pendingFilter != pendingFilter) { return null; } + + let seq = Promise.resolve(); + hashes.forEach(function(hash) { + // @TODO: This should be garbage collected at some point... How? When? + self._emitted["t:" + hash.toLowerCase()] = "pending"; + seq = seq.then(function() { + return self.getTransaction(hash).then(function(tx) { + self.emit("pending", tx); + return null; + }); + }); + }); + + return seq.then(function() { + return timer(1000); + }); + }).then(function() { + if (self._pendingFilter != pendingFilter) { + self.send("eth_uninstallFilter", [ filterId ]); + return; + } + setTimeout(function() { poll(); }, 0); + + return null; + }).catch((error: Error) => { }); + } + poll(); + + return filterId; + }).catch((error: Error) => { }); + } + + _stopEvent(event: Event): void { + if (event.tag === "pending" && this.listenerCount("pending") === 0) { + this._pendingFilter = null; + } + super._stopEvent(event); + } + + // Convert an ethers.js transaction into a JSON-RPC transaction + // - gasLimit => gas + // - All values hexlified + // - All numeric values zero-striped + // - All addresses are lowercased + // NOTE: This allows a TransactionRequest, but all values should be resolved + // before this is called + // @TODO: This will likely be removed in future versions and prepareRequest + // will be the preferred method for this. + static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { [key: string]: boolean }): { [key: string]: string | AccessList } { + // Check only allowed properties are given + const allowed = shallowCopy(allowedTransactionKeys); + if (allowExtra) { + for (const key in allowExtra) { + if (allowExtra[key]) { allowed[key] = true; } + } + } + + checkProperties(transaction, allowed); + + const result: { [key: string]: string | AccessList } = {}; + + // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros. + ["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) { + if ((transaction)[key] == null) { return; } + const value = hexValue((transaction)[key]); + if (key === "gasLimit") { key = "gas"; } + result[key] = value; + }); + + ["from", "to", "data"].forEach(function(key) { + if ((transaction)[key] == null) { return; } + result[key] = hexlify((transaction)[key]); + }); + + if ((transaction).accessList) { + result["accessList"] = accessListify((transaction).accessList); + } + + return result; + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/nodesmith-provider.ts b/node_modules/@ethersproject/providers/src.ts/nodesmith-provider.ts new file mode 100644 index 0000000..f712b9b --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/nodesmith-provider.ts @@ -0,0 +1,50 @@ +/* istanbul ignore file */ + +"use strict"; + +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +// Special API key provided by Nodesmith for ethers.js +const defaultApiKey = "ETHERS_JS_SHARED"; + +export class NodesmithProvider extends UrlJsonRpcProvider { + + static getApiKey(apiKey: any): any { + if (apiKey && typeof(apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey || defaultApiKey; + } + + static getUrl(network: Network, apiKey?: any): string { + logger.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); + + let host = null; + switch (network.name) { + case "homestead": + host = "https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc"; + break; + case "ropsten": + host = "https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc"; + break; + case "rinkeby": + host = "https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc"; + break; + case "goerli": + host = "https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc"; + break; + case "kovan": + host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + + return (host + "?apiKey=" + apiKey); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/pocket-provider.ts b/node_modules/@ethersproject/providers/src.ts/pocket-provider.ts new file mode 100644 index 0000000..11993b5 --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/pocket-provider.ts @@ -0,0 +1,144 @@ +"use strict"; + +import { Network, Networkish } from "@ethersproject/networks"; +import { getStatic } from "@ethersproject/properties"; +import { ConnectionInfo } from "@ethersproject/web"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; + +// These are load-balancer-based application IDs +const defaultApplicationIds: Record = { + homestead: "6004bcd10040261633ade990", + ropsten: "6004bd4d0040261633ade991", + rinkeby: "6004bda20040261633ade994", + goerli: "6004bd860040261633ade992", +}; + +export class PocketProvider extends UrlJsonRpcProvider { + readonly applicationId: string; + readonly applicationSecretKey: string; + readonly loadBalancer: boolean; + + constructor(network?: Networkish, apiKey?: any) { + // We need a bit of creativity in the constructor because + // Pocket uses different default API keys based on the network + + if (apiKey == null) { + const n = getStatic<(network: Networkish) => Network>(new.target, "getNetwork")(network); + if (n) { + const applicationId = defaultApplicationIds[n.name]; + if (applicationId) { + apiKey = { + applicationId: applicationId, + loadBalancer: true + }; + } + } + + // If there was any issue above, we don't know this network + if (apiKey == null) { + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + + } + + super(network, apiKey); + } + + static getApiKey(apiKey: any): any { + // Most API Providers allow null to get the default configuration, but + // Pocket requires the network to decide the default provider, so we + // rely on hijacking the constructor to add a sensible default for us + + if (apiKey == null) { + logger.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey); + } + + const apiKeyObj: { applicationId: string, applicationSecretKey: string, loadBalancer: boolean } = { + applicationId: null, + loadBalancer: false, + applicationSecretKey: null + }; + + // Parse applicationId and applicationSecretKey + if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + + } else if (apiKey.applicationSecretKey != null) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), + "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId); + logger.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), + "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]"); + + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + + } else if (apiKey.applicationId) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), + "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId); + + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + + } else { + logger.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + + return apiKeyObj; + } + + static getUrl(network: Network, apiKey: any): ConnectionInfo { + let host: string = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + + let url = null; + if (apiKey.loadBalancer) { + url = `https:/\/${ host }/v1/lb/${ apiKey.applicationId }` + } else { + url = `https:/\/${ host }/v1/${ apiKey.applicationId }` + } + + const connection: ConnectionInfo = { url }; + + // Initialize empty headers + connection.headers = {} + + // Apply application secret key + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey + } + + return connection; + } + + isCommunityResource(): boolean { + return (this.applicationId === defaultApplicationIds[this.network.name]); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/url-json-rpc-provider.ts b/node_modules/@ethersproject/providers/src.ts/url-json-rpc-provider.ts new file mode 100644 index 0000000..cbb924e --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/url-json-rpc-provider.ts @@ -0,0 +1,106 @@ + +"use strict"; + +import { Network, Networkish } from "@ethersproject/networks"; +import { defineReadOnly, getStatic } from "@ethersproject/properties"; +import { ConnectionInfo } from "@ethersproject/web"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { CommunityResourcable } from "./formatter"; +import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider"; + +type getUrlFunc = (network: Network, apiKey: string) => string | ConnectionInfo; + +// A StaticJsonRpcProvider is useful when you *know* for certain that +// the backend will never change, as it never calls eth_chainId to +// verify its backend. However, if the backend does change, the effects +// are undefined and may include: +// - inconsistent results +// - locking up the UI +// - block skew warnings +// - wrong results +// If the network is not explicit (i.e. auto-detection is expected), the +// node MUST be running and available to respond to requests BEFORE this +// is instantiated. +export class StaticJsonRpcProvider extends JsonRpcProvider { + async detectNetwork(): Promise { + let network = this.network; + if (network == null) { + network = await super.detectNetwork(); + + if (!network) { + logger.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, { }); + } + + // If still not set, set it + if (this._network == null) { + // A static network does not support "any" + defineReadOnly(this, "_network", network); + + this.emit("network", network, null); + } + } + return network; + } +} + +export abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable { + readonly apiKey: any; + + constructor(network?: Networkish, apiKey?: any) { + logger.checkAbstract(new.target, UrlJsonRpcProvider); + + // Normalize the Network and API Key + network = getStatic<(network: Networkish) => Network>(new.target, "getNetwork")(network); + apiKey = getStatic<(apiKey: string) => string>(new.target, "getApiKey")(apiKey); + + const connection = getStatic(new.target, "getUrl")(network, apiKey); + + super(connection, network); + + if (typeof(apiKey) === "string") { + defineReadOnly(this, "apiKey", apiKey); + } else if (apiKey != null) { + Object.keys(apiKey).forEach((key) => { + defineReadOnly(this, key, apiKey[key]); + }); + } + } + + _startPending(): void { + logger.warn("WARNING: API provider does not support pending filters"); + } + + isCommunityResource(): boolean { + return false; + } + + getSigner(address?: string): JsonRpcSigner { + return logger.throwError( + "API provider does not support signing", + Logger.errors.UNSUPPORTED_OPERATION, + { operation: "getSigner" } + ); + } + + listAccounts(): Promise> { + return Promise.resolve([]); + } + + // Return a defaultApiKey if null, otherwise validate the API key + static getApiKey(apiKey: any): any { + return apiKey; + } + + // Returns the url or connection for the given network and API key. The + // API key will have been sanitized by the getApiKey first, so any validation + // or transformations can be done there. + static getUrl(network: Network, apiKey: any): string | ConnectionInfo { + return logger.throwError("not implemented; sub-classes must override getUrl", Logger.errors.NOT_IMPLEMENTED, { + operation: "getUrl" + }); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/web3-provider.ts b/node_modules/@ethersproject/providers/src.ts/web3-provider.ts new file mode 100644 index 0000000..9c337af --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/web3-provider.ts @@ -0,0 +1,171 @@ +"use strict"; + +import { Networkish } from "@ethersproject/networks"; +import { deepCopy, defineReadOnly } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { JsonRpcProvider } from "./json-rpc-provider"; + +// Exported Types +export type ExternalProvider = { + isMetaMask?: boolean; + isStatus?: boolean; + host?: string; + path?: string; + sendAsync?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void + send?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void + request?: (request: { method: string, params?: Array }) => Promise +} + +let _nextId = 1; + +export type JsonRpcFetchFunc = (method: string, params?: Array) => Promise; + +type Web3LegacySend = (request: any, callback: (error: Error, response: any) => void) => void; + +function buildWeb3LegacyFetcher(provider: ExternalProvider, sendFunc: Web3LegacySend) : JsonRpcFetchFunc { + const fetcher = "Web3LegacyFetcher"; + + return function(method: string, params: Array): Promise { + const request = { + method: method, + params: params, + id: (_nextId++), + jsonrpc: "2.0" + }; + + return new Promise((resolve, reject) => { + this.emit("debug", { + action: "request", + fetcher, + request: deepCopy(request), + provider: this + }); + + sendFunc(request, (error, response) => { + + if (error) { + this.emit("debug", { + action: "response", + fetcher, + error, + request, + provider: this + }); + + return reject(error); + } + + this.emit("debug", { + action: "response", + fetcher, + request, + response, + provider: this + }); + + if (response.error) { + const error = new Error(response.error.message); + (error).code = response.error.code; + (error).data = response.error.data; + return reject(error); + } + + resolve(response.result); + }); + }); + } +} + +function buildEip1193Fetcher(provider: ExternalProvider): JsonRpcFetchFunc { + return function(method: string, params: Array): Promise { + if (params == null) { params = [ ]; } + + const request = { method, params }; + + this.emit("debug", { + action: "request", + fetcher: "Eip1193Fetcher", + request: deepCopy(request), + provider: this + }); + + return provider.request(request).then((response) => { + this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request, + response, + provider: this + }); + + return response; + + }, (error) => { + this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request, + error, + provider: this + }); + + throw error; + }); + } +} + +export class Web3Provider extends JsonRpcProvider { + readonly provider: ExternalProvider; + readonly jsonRpcFetchFunc: JsonRpcFetchFunc; + + constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish) { + logger.checkNew(new.target, Web3Provider); + + if (provider == null) { + logger.throwArgumentError("missing provider", "provider", provider); + } + + let path: string = null; + let jsonRpcFetchFunc: JsonRpcFetchFunc = null; + let subprovider: ExternalProvider = null; + + if (typeof(provider) === "function") { + path = "unknown:"; + jsonRpcFetchFunc = provider; + + } else { + path = provider.host || provider.path || ""; + if (!path && provider.isMetaMask) { + path = "metamask"; + } + + subprovider = provider; + + if (provider.request) { + if (path === "") { path = "eip-1193:"; } + jsonRpcFetchFunc = buildEip1193Fetcher(provider); + } else if (provider.sendAsync) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider)); + } else if (provider.send) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider)); + } else { + logger.throwArgumentError("unsupported provider", "provider", provider); + } + + if (!path) { path = "unknown:"; } + } + + super(path, network); + + defineReadOnly(this, "jsonRpcFetchFunc", jsonRpcFetchFunc); + defineReadOnly(this, "provider", subprovider); + } + + send(method: string, params: Array): Promise { + return this.jsonRpcFetchFunc(method, params); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/websocket-provider.ts b/node_modules/@ethersproject/providers/src.ts/websocket-provider.ts new file mode 100644 index 0000000..d38817a --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/websocket-provider.ts @@ -0,0 +1,325 @@ +"use strict"; + +import { BigNumber } from "@ethersproject/bignumber"; +import { Network, Networkish } from "@ethersproject/networks"; +import { defineReadOnly } from "@ethersproject/properties"; + +import { Event } from "./base-provider"; +import { JsonRpcProvider } from "./json-rpc-provider"; +import { WebSocket } from "./ws"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +/** + * Notes: + * + * This provider differs a bit from the polling providers. One main + * difference is how it handles consistency. The polling providers + * will stall responses to ensure a consistent state, while this + * WebSocket provider assumes the connected backend will manage this. + * + * For example, if a polling provider emits an event which indicates + * the event occurred in blockhash XXX, a call to fetch that block by + * its hash XXX, if not present will retry until it is present. This + * can occur when querying a pool of nodes that are mildly out of sync + * with each other. + */ + +let NextId = 1; + +export type InflightRequest = { + callback: (error: Error, result: any) => void; + payload: string; +}; + +export type Subscription = { + tag: string; + processFunc: (payload: any) => void; +}; + + +// For more info about the Real-time Event API see: +// https://geth.ethereum.org/docs/rpc/pubsub + +export class WebSocketProvider extends JsonRpcProvider { + readonly _websocket: any; + readonly _requests: { [ name: string ]: InflightRequest }; + readonly _detectNetwork: Promise; + + // Maps event tag to subscription ID (we dedupe identical events) + readonly _subIds: { [ tag: string ]: Promise }; + + // Maps Subscription ID to Subscription + readonly _subs: { [ name: string ]: Subscription }; + + _wsReady: boolean; + + constructor(url: string, network?: Networkish) { + // This will be added in the future; please open an issue to expedite + if (network === "any") { + logger.throwError("WebSocketProvider does not support 'any' network yet", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "network:any" + }); + } + + super(url, network); + this._pollingInterval = -1; + + this._wsReady = false; + + defineReadOnly(this, "_websocket", new WebSocket(this.connection.url)); + defineReadOnly(this, "_requests", { }); + defineReadOnly(this, "_subs", { }); + defineReadOnly(this, "_subIds", { }); + defineReadOnly(this, "_detectNetwork", super.detectNetwork()); + + // Stall sending requests until the socket is open... + this._websocket.onopen = () => { + this._wsReady = true; + Object.keys(this._requests).forEach((id) => { + this._websocket.send(this._requests[id].payload); + }); + }; + + this._websocket.onmessage = (messageEvent: { data: string }) => { + const data = messageEvent.data; + const result = JSON.parse(data); + if (result.id != null) { + const id = String(result.id); + const request = this._requests[id]; + delete this._requests[id]; + + if (result.result !== undefined) { + request.callback(null, result.result); + + this.emit("debug", { + action: "response", + request: JSON.parse(request.payload), + response: result.result, + provider: this + }); + + } else { + let error: Error = null; + if (result.error) { + error = new Error(result.error.message || "unknown error"); + defineReadOnly(error, "code", result.error.code || null); + defineReadOnly(error, "response", data); + } else { + error = new Error("unknown error"); + } + + request.callback(error, undefined); + + this.emit("debug", { + action: "response", + error: error, + request: JSON.parse(request.payload), + provider: this + }); + + } + + } else if (result.method === "eth_subscription") { + // Subscription... + const sub = this._subs[result.params.subscription]; + if (sub) { + //this.emit.apply(this, ); + sub.processFunc(result.params.result) + } + + } else { + console.warn("this should not happen"); + } + }; + + // This Provider does not actually poll, but we want to trigger + // poll events for things that depend on them (like stalling for + // block and transaction lookups) + const fauxPoll = setInterval(() => { + this.emit("poll"); + }, 1000); + if (fauxPoll.unref) { fauxPoll.unref(); } + } + + detectNetwork(): Promise { + return this._detectNetwork; + } + + get pollingInterval(): number { + return 0; + } + + resetEventsBlock(blockNumber: number): void { + logger.throwError("cannot reset events block on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resetEventBlock" + }); + } + + set pollingInterval(value: number) { + logger.throwError("cannot set polling interval on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPollingInterval" + }); + } + + async poll(): Promise { + return null; + } + + set polling(value: boolean) { + if (!value) { return; } + + logger.throwError("cannot set polling on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPolling" + }); + } + + send(method: string, params?: Array): Promise { + const rid = NextId++; + + return new Promise((resolve, reject) => { + function callback(error: Error, result: any) { + if (error) { return reject(error); } + return resolve(result); + } + + const payload = JSON.stringify({ + method: method, + params: params, + id: rid, + jsonrpc: "2.0" + }); + + this.emit("debug", { + action: "request", + request: JSON.parse(payload), + provider: this + }); + + this._requests[String(rid)] = { callback, payload }; + + if (this._wsReady) { this._websocket.send(payload); } + }); + } + + static defaultUrl(): string { + return "ws:/\/localhost:8546"; + } + + async _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise { + let subIdPromise = this._subIds[tag]; + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then((param) => { + return this.send("eth_subscribe", param); + }); + this._subIds[tag] = subIdPromise; + } + const subId = await subIdPromise; + this._subs[subId] = { tag, processFunc }; + } + + _startEvent(event: Event): void { + switch (event.type) { + case "block": + this._subscribe("block", [ "newHeads" ], (result: any) => { + const blockNumber = BigNumber.from(result.number).toNumber(); + this._emitted.block = blockNumber; + this.emit("block", blockNumber); + }); + break; + + case "pending": + this._subscribe("pending", [ "newPendingTransactions" ], (result: any) => { + this.emit("pending", result); + }); + break; + + case "filter": + this._subscribe(event.tag, [ "logs", this._getFilter(event.filter) ], (result: any) => { + if (result.removed == null) { result.removed = false; } + this.emit(event.filter, this.formatter.filterLog(result)); + }); + break; + + case "tx": { + const emitReceipt = (event: Event) => { + const hash = event.hash; + this.getTransactionReceipt(hash).then((receipt) => { + if (!receipt) { return; } + this.emit(hash, receipt); + }); + }; + + // In case it is already mined + emitReceipt(event); + + // To keep things simple, we start up a single newHeads subscription + // to keep an eye out for transactions we are watching for. + // Starting a subscription for an event (i.e. "tx") that is already + // running is (basically) a nop. + this._subscribe("tx", [ "newHeads" ], (result: any) => { + this._events.filter((e) => (e.type === "tx")).forEach(emitReceipt); + }); + break; + } + + // Nothing is needed + case "debug": + case "poll": + case "willPoll": + case "didPoll": + case "error": + break; + + default: + console.log("unhandled:", event); + break; + } + } + + _stopEvent(event: Event): void { + let tag = event.tag; + + if (event.type === "tx") { + // There are remaining transaction event listeners + if (this._events.filter((e) => (e.type === "tx")).length) { + return; + } + tag = "tx"; + } else if (this.listenerCount(event.event)) { + // There are remaining event listeners + return; + } + + const subId = this._subIds[tag]; + if (!subId) { return; } + + delete this._subIds[tag]; + subId.then((subId) => { + if (!this._subs[subId]) { return; } + delete this._subs[subId]; + this.send("eth_unsubscribe", [ subId ]); + }); + } + + async destroy(): Promise { + // Wait until we have connected before trying to disconnect + if (this._websocket.readyState === WebSocket.CONNECTING) { + await (new Promise((resolve) => { + this._websocket.onopen = function() { + resolve(true); + }; + + this._websocket.onerror = function() { + resolve(false); + }; + })); + } + + // Hangup + // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes + this._websocket.close(1000); + } +} diff --git a/node_modules/@ethersproject/providers/src.ts/ws.ts b/node_modules/@ethersproject/providers/src.ts/ws.ts new file mode 100644 index 0000000..b3b7a2e --- /dev/null +++ b/node_modules/@ethersproject/providers/src.ts/ws.ts @@ -0,0 +1,3 @@ +import WebSocket from "ws"; + +export { WebSocket } diff --git a/node_modules/@ethersproject/providers/thirdparty.d.ts b/node_modules/@ethersproject/providers/thirdparty.d.ts new file mode 100644 index 0000000..89a5155 --- /dev/null +++ b/node_modules/@ethersproject/providers/thirdparty.d.ts @@ -0,0 +1,10 @@ +declare module "ws" { + export interface WebSocker { + send(): void; + onopen: () => void; + onmessage: (messageEvent: { target: any, type: string, data: string }) => void + } + + export default WebSocket; +} + diff --git a/node_modules/@ethersproject/random/LICENSE.md b/node_modules/@ethersproject/random/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/random/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/random/README.md b/node_modules/@ethersproject/random/README.md new file mode 100644 index 0000000..0ab3743 --- /dev/null +++ b/node_modules/@ethersproject/random/README.md @@ -0,0 +1,31 @@ +Random Value Utilities +====================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains functions to assist with random numbers. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/bytes/#byte-manipulation--random-bytes). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + shuffled, + + randomBytes + +} = require("@ethersproject/random"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/random/lib.esm/_version.d.ts b/node_modules/@ethersproject/random/lib.esm/_version.d.ts new file mode 100644 index 0000000..6957ad8 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "random/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/random/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/_version.js b/node_modules/@ethersproject/random/lib.esm/_version.js new file mode 100644 index 0000000..553e942 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "random/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/_version.js.map b/node_modules/@ethersproject/random/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/index.d.ts b/node_modules/@ethersproject/random/lib.esm/index.d.ts new file mode 100644 index 0000000..b464ff9 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/index.d.ts @@ -0,0 +1,3 @@ +export { randomBytes } from "./random"; +export { shuffled } from "./shuffle"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/index.d.ts.map b/node_modules/@ethersproject/random/lib.esm/index.d.ts.map new file mode 100644 index 0000000..b0c7499 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/index.js b/node_modules/@ethersproject/random/lib.esm/index.js new file mode 100644 index 0000000..74b0146 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/index.js @@ -0,0 +1,4 @@ +"use strict"; +export { randomBytes } from "./random"; +export { shuffled } from "./shuffle"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/index.js.map b/node_modules/@ethersproject/random/lib.esm/index.js.map new file mode 100644 index 0000000..1720229 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/random.d.ts b/node_modules/@ethersproject/random/lib.esm/random.d.ts new file mode 100644 index 0000000..6065693 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/random.d.ts @@ -0,0 +1,2 @@ +export declare function randomBytes(length: number): Uint8Array; +//# sourceMappingURL=random.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/random.d.ts.map b/node_modules/@ethersproject/random/lib.esm/random.d.ts.map new file mode 100644 index 0000000..afea81a --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/random.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src.ts/browser-random.ts"],"names":[],"mappings":"AAsCA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAQtD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/random.js b/node_modules/@ethersproject/random/lib.esm/random.js new file mode 100644 index 0000000..f07e550 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/random.js @@ -0,0 +1,46 @@ +"use strict"; +import { arrayify } from "@ethersproject/bytes"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +// Debugging line for testing browser lib in node +//const window = { crypto: { getRandomValues: () => { } } }; +let anyGlobal = null; +try { + anyGlobal = window; + if (anyGlobal == null) { + throw new Error("try next"); + } +} +catch (error) { + try { + anyGlobal = global; + if (anyGlobal == null) { + throw new Error("try next"); + } + } + catch (error) { + anyGlobal = {}; + } +} +let crypto = anyGlobal.crypto || anyGlobal.msCrypto; +if (!crypto || !crypto.getRandomValues) { + logger.warn("WARNING: Missing strong random number source"); + crypto = { + getRandomValues: function (buffer) { + return logger.throwError("no secure random source avaialble", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "crypto.getRandomValues" + }); + } + }; +} +export function randomBytes(length) { + if (length <= 0 || length > 1024 || (length % 1) || length != length) { + logger.throwArgumentError("invalid length", "length", length); + } + const result = new Uint8Array(length); + crypto.getRandomValues(result); + return arrayify(result); +} +; +//# sourceMappingURL=random.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/random.js.map b/node_modules/@ethersproject/random/lib.esm/random.js.map new file mode 100644 index 0000000..7897549 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/random.js.map @@ -0,0 +1 @@ +{"version":3,"file":"random.js","sourceRoot":"","sources":["../src.ts/browser-random.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,iDAAiD;AACjD,4DAA4D;AAE5D,IAAI,SAAS,GAAQ,IAAI,CAAC;AAC1B,IAAI;IACA,SAAS,GAAI,MAAc,CAAC;IAC5B,IAAI,SAAS,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;KAAE;CAC1D;AAAC,OAAO,KAAK,EAAE;IACZ,IAAI;QACA,SAAS,GAAI,MAAc,CAAC;QAC5B,IAAI,SAAS,IAAI,IAAI,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;SAAE;KAC1D;IAAC,OAAO,KAAK,EAAE;QACZ,SAAS,GAAG,EAAG,CAAC;KACnB;CACJ;AAED,IAAI,MAAM,GAAQ,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC;AACzD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;IAEpC,MAAM,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;IAE5D,MAAM,GAAG;QACL,eAAe,EAAE,UAAS,MAAkB;YACxC,OAAO,MAAM,CAAC,UAAU,CAAC,mCAAmC,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBAC/F,SAAS,EAAE,wBAAwB;aACtC,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;CACL;AAED,MAAM,UAAU,WAAW,CAAC,MAAc;IACtC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM,IAAI,MAAM,EAAE;QAClE,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KACjE;IAED,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAAA,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts b/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts new file mode 100644 index 0000000..89835b1 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts @@ -0,0 +1,2 @@ +export declare function shuffled(array: Array): Array; +//# sourceMappingURL=shuffle.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts.map b/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts.map new file mode 100644 index 0000000..92d1144 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../src.ts/shuffle.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAWtD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/shuffle.js b/node_modules/@ethersproject/random/lib.esm/shuffle.js new file mode 100644 index 0000000..7da5935 --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/shuffle.js @@ -0,0 +1,12 @@ +"use strict"; +export function shuffled(array) { + array = array.slice(); + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + const tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + return array; +} +//# sourceMappingURL=shuffle.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib.esm/shuffle.js.map b/node_modules/@ethersproject/random/lib.esm/shuffle.js.map new file mode 100644 index 0000000..c8f9cdb --- /dev/null +++ b/node_modules/@ethersproject/random/lib.esm/shuffle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shuffle.js","sourceRoot":"","sources":["../src.ts/shuffle.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,MAAM,UAAU,QAAQ,CAAC,KAAiB;IACtC,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAEtB,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACrB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;KAClB;IAED,OAAO,KAAK,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/_version.d.ts b/node_modules/@ethersproject/random/lib/_version.d.ts new file mode 100644 index 0000000..6957ad8 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "random/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/_version.d.ts.map b/node_modules/@ethersproject/random/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/_version.js b/node_modules/@ethersproject/random/lib/_version.js new file mode 100644 index 0000000..c4a0d30 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "random/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/_version.js.map b/node_modules/@ethersproject/random/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/@ethersproject/random/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/browser-random.d.ts b/node_modules/@ethersproject/random/lib/browser-random.d.ts new file mode 100644 index 0000000..1862266 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/browser-random.d.ts @@ -0,0 +1,2 @@ +export declare function randomBytes(length: number): Uint8Array; +//# sourceMappingURL=browser-random.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/browser-random.d.ts.map b/node_modules/@ethersproject/random/lib/browser-random.d.ts.map new file mode 100644 index 0000000..0e49c01 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/browser-random.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-random.d.ts","sourceRoot":"","sources":["../src.ts/browser-random.ts"],"names":[],"mappings":"AAsCA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAQtD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/browser-random.js b/node_modules/@ethersproject/random/lib/browser-random.js new file mode 100644 index 0000000..9be7202 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/browser-random.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.randomBytes = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +// Debugging line for testing browser lib in node +//const window = { crypto: { getRandomValues: () => { } } }; +var anyGlobal = null; +try { + anyGlobal = window; + if (anyGlobal == null) { + throw new Error("try next"); + } +} +catch (error) { + try { + anyGlobal = global; + if (anyGlobal == null) { + throw new Error("try next"); + } + } + catch (error) { + anyGlobal = {}; + } +} +var crypto = anyGlobal.crypto || anyGlobal.msCrypto; +if (!crypto || !crypto.getRandomValues) { + logger.warn("WARNING: Missing strong random number source"); + crypto = { + getRandomValues: function (buffer) { + return logger.throwError("no secure random source avaialble", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "crypto.getRandomValues" + }); + } + }; +} +function randomBytes(length) { + if (length <= 0 || length > 1024 || (length % 1) || length != length) { + logger.throwArgumentError("invalid length", "length", length); + } + var result = new Uint8Array(length); + crypto.getRandomValues(result); + return (0, bytes_1.arrayify)(result); +} +exports.randomBytes = randomBytes; +; +//# sourceMappingURL=browser-random.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/browser-random.js.map b/node_modules/@ethersproject/random/lib/browser-random.js.map new file mode 100644 index 0000000..567a6e0 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/browser-random.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-random.js","s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,CAAC;KACjE;IAED,IAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,IAAA,gBAAQ,EAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AARD,kCAQC;AAAA,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/index.d.ts b/node_modules/@ethersproject/random/lib/index.d.ts new file mode 100644 index 0000000..b464ff9 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/index.d.ts @@ -0,0 +1,3 @@ +export { randomBytes } from "./random"; +export { shuffled } from "./shuffle"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/index.d.ts.map b/node_modules/@ethersproject/random/lib/index.d.ts.map new file mode 100644 index 0000000..b0c7499 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/index.js b/node_modules/@ethersproject/random/lib/index.js new file mode 100644 index 0000000..25787cc --- /dev/null +++ b/node_modules/@ethersproject/random/lib/index.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.shuffled = exports.randomBytes = void 0; +var random_1 = require("./random"); +Object.defineProperty(exports, "randomBytes", { enumerable: true, get: function () { return random_1.randomBytes; } }); +var shuffle_1 = require("./shuffle"); +Object.defineProperty(exports, "shuffled", { enumerable: true, get: function () { return shuffle_1.shuffled; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/index.js.map b/node_modules/@ethersproject/random/lib/index.js.map new file mode 100644 index 0000000..7967720 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AACpB,qCAAqC;AAA5B,mGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/random.d.ts b/node_modules/@ethersproject/random/lib/random.d.ts new file mode 100644 index 0000000..6065693 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/random.d.ts @@ -0,0 +1,2 @@ +export declare function randomBytes(length: number): Uint8Array; +//# sourceMappingURL=random.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/random.d.ts.map b/node_modules/@ethersproject/random/lib/random.d.ts.map new file mode 100644 index 0000000..33770ca --- /dev/null +++ b/node_modules/@ethersproject/random/lib/random.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src.ts/random.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAEtD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/random.js b/node_modules/@ethersproject/random/lib/random.js new file mode 100644 index 0000000..9cb86d3 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/random.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.randomBytes = void 0; +var crypto_1 = require("crypto"); +var bytes_1 = require("@ethersproject/bytes"); +function randomBytes(length) { + return (0, bytes_1.arrayify)((0, crypto_1.randomBytes)(length)); +} +exports.randomBytes = randomBytes; +//# sourceMappingURL=random.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/random.js.map b/node_modules/@ethersproject/random/lib/random.js.map new file mode 100644 index 0000000..46cabf5 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/random.js.map @@ -0,0 +1 @@ +{"version":3,"file":"random.js","sourceRoot":"","sources":["../src.ts/random.ts"],"names":[],"mappings":";;;AAAA,iCAAqD;AAErD,8CAAgD;AAEhD,SAAgB,WAAW,CAAC,MAAc;IACtC,OAAO,IAAA,gBAAQ,EAAC,IAAA,oBAAY,EAAC,MAAM,CAAC,CAAC,CAAC;AAC1C,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/shuffle.d.ts b/node_modules/@ethersproject/random/lib/shuffle.d.ts new file mode 100644 index 0000000..89835b1 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/shuffle.d.ts @@ -0,0 +1,2 @@ +export declare function shuffled(array: Array): Array; +//# sourceMappingURL=shuffle.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/shuffle.d.ts.map b/node_modules/@ethersproject/random/lib/shuffle.d.ts.map new file mode 100644 index 0000000..92d1144 --- /dev/null +++ b/node_modules/@ethersproject/random/lib/shuffle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../src.ts/shuffle.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAWtD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/shuffle.js b/node_modules/@ethersproject/random/lib/shuffle.js new file mode 100644 index 0000000..d3b524f --- /dev/null +++ b/node_modules/@ethersproject/random/lib/shuffle.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.shuffled = void 0; +function shuffled(array) { + array = array.slice(); + for (var i = array.length - 1; i > 0; i--) { + var j = Math.floor(Math.random() * (i + 1)); + var tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + return array; +} +exports.shuffled = shuffled; +//# sourceMappingURL=shuffle.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/random/lib/shuffle.js.map b/node_modules/@ethersproject/random/lib/shuffle.js.map new file mode 100644 index 0000000..56657da --- /dev/null +++ b/node_modules/@ethersproject/random/lib/shuffle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shuffle.js","sourceRoot":"","sources":["../src.ts/shuffle.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,SAAgB,QAAQ,CAAC,KAAiB;IACtC,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAEtB,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,IAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACrB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;KAClB;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAXD,4BAWC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/random/package.json b/node_modules/@ethersproject/random/package.json new file mode 100644 index 0000000..350b720 --- /dev/null +++ b/node_modules/@ethersproject/random/package.json @@ -0,0 +1,50 @@ +{ + "_ethers.alias": { + "random.js": "browser-random.js" + }, + "author": "Richard Moore ", + "browser": { + "./lib/random": "./lib/browser-random.js" + }, + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + }, + "description": "Random utility functions for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers", + "random" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/random", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/random", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x7aa2c8778d5c2cf19a3051d6ff38c0655923b5024158c727d92a08033b9f6845", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/random/src.ts/_version.ts b/node_modules/@ethersproject/random/src.ts/_version.ts new file mode 100644 index 0000000..3fdd855 --- /dev/null +++ b/node_modules/@ethersproject/random/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "random/5.5.0"; diff --git a/node_modules/@ethersproject/random/src.ts/browser-random.ts b/node_modules/@ethersproject/random/src.ts/browser-random.ts new file mode 100644 index 0000000..d169f78 --- /dev/null +++ b/node_modules/@ethersproject/random/src.ts/browser-random.ts @@ -0,0 +1,47 @@ +"use strict"; + +import { arrayify } from "@ethersproject/bytes"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +// Debugging line for testing browser lib in node +//const window = { crypto: { getRandomValues: () => { } } }; + +let anyGlobal: any = null; +try { + anyGlobal = (window as any); + if (anyGlobal == null) { throw new Error("try next"); } +} catch (error) { + try { + anyGlobal = (global as any); + if (anyGlobal == null) { throw new Error("try next"); } + } catch (error) { + anyGlobal = { }; + } +} + +let crypto: any = anyGlobal.crypto || anyGlobal.msCrypto; +if (!crypto || !crypto.getRandomValues) { + + logger.warn("WARNING: Missing strong random number source"); + + crypto = { + getRandomValues: function(buffer: Uint8Array): Uint8Array { + return logger.throwError("no secure random source avaialble", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "crypto.getRandomValues" + }); + } + }; +} + +export function randomBytes(length: number): Uint8Array { + if (length <= 0 || length > 1024 || (length % 1) || length != length) { + logger.throwArgumentError("invalid length", "length", length); + } + + const result = new Uint8Array(length); + crypto.getRandomValues(result); + return arrayify(result); +}; diff --git a/node_modules/@ethersproject/random/src.ts/index.ts b/node_modules/@ethersproject/random/src.ts/index.ts new file mode 100644 index 0000000..fb11db4 --- /dev/null +++ b/node_modules/@ethersproject/random/src.ts/index.ts @@ -0,0 +1,4 @@ +"use strict"; + +export { randomBytes } from "./random"; +export { shuffled } from "./shuffle"; diff --git a/node_modules/@ethersproject/random/src.ts/random.ts b/node_modules/@ethersproject/random/src.ts/random.ts new file mode 100644 index 0000000..1f7dca0 --- /dev/null +++ b/node_modules/@ethersproject/random/src.ts/random.ts @@ -0,0 +1,7 @@ +import { randomBytes as _randomBytes } from "crypto"; + +import { arrayify } from "@ethersproject/bytes"; + +export function randomBytes(length: number): Uint8Array { + return arrayify(_randomBytes(length)); +} diff --git a/node_modules/@ethersproject/random/src.ts/shuffle.ts b/node_modules/@ethersproject/random/src.ts/shuffle.ts new file mode 100644 index 0000000..7092259 --- /dev/null +++ b/node_modules/@ethersproject/random/src.ts/shuffle.ts @@ -0,0 +1,14 @@ +"use strict"; + +export function shuffled(array: Array): Array { + array = array.slice(); + + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + const tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + + return array; +} diff --git a/node_modules/@ethersproject/rlp/LICENSE.md b/node_modules/@ethersproject/rlp/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/rlp/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/rlp/README.md b/node_modules/@ethersproject/rlp/README.md new file mode 100644 index 0000000..bffb363 --- /dev/null +++ b/node_modules/@ethersproject/rlp/README.md @@ -0,0 +1,30 @@ +Recursive-Length Prefix Coder +============================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains functions for encoding and decoding RLP data. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/encoding/#rlp--methods). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + encode, + decode + +} = require("@ethersproject/rlp"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts b/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts new file mode 100644 index 0000000..b825fbf --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "rlp/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/_version.js b/node_modules/@ethersproject/rlp/lib.esm/_version.js new file mode 100644 index 0000000..d5a25d1 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "rlp/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/_version.js.map b/node_modules/@ethersproject/rlp/lib.esm/_version.js.map new file mode 100644 index 0000000..4854997 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/index.d.ts b/node_modules/@ethersproject/rlp/lib.esm/index.d.ts new file mode 100644 index 0000000..fec4e35 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/index.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function encode(object: any): string; +export declare function decode(data: BytesLike): any; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/index.d.ts.map b/node_modules/@ethersproject/rlp/lib.esm/index.d.ts.map new file mode 100644 index 0000000..59057d4 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAwB,MAAM,sBAAsB,CAAC;AA8DjF,wBAAgB,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAE1C;AA8ED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG,CAO3C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/index.js b/node_modules/@ethersproject/rlp/lib.esm/index.js new file mode 100644 index 0000000..a56722c --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/index.js @@ -0,0 +1,120 @@ +"use strict"; +//See: https://github.com/ethereum/wiki/wiki/RLP +import { arrayify, hexlify, isBytesLike } from "@ethersproject/bytes"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +function arrayifyInteger(value) { + const result = []; + while (value) { + result.unshift(value & 0xff); + value >>= 8; + } + return result; +} +function unarrayifyInteger(data, offset, length) { + let result = 0; + for (let i = 0; i < length; i++) { + result = (result * 256) + data[offset + i]; + } + return result; +} +function _encode(object) { + if (Array.isArray(object)) { + let payload = []; + object.forEach(function (child) { + payload = payload.concat(_encode(child)); + }); + if (payload.length <= 55) { + payload.unshift(0xc0 + payload.length); + return payload; + } + const length = arrayifyInteger(payload.length); + length.unshift(0xf7 + length.length); + return length.concat(payload); + } + if (!isBytesLike(object)) { + logger.throwArgumentError("RLP object must be BytesLike", "object", object); + } + const data = Array.prototype.slice.call(arrayify(object)); + if (data.length === 1 && data[0] <= 0x7f) { + return data; + } + else if (data.length <= 55) { + data.unshift(0x80 + data.length); + return data; + } + const length = arrayifyInteger(data.length); + length.unshift(0xb7 + length.length); + return length.concat(data); +} +export function encode(object) { + return hexlify(_encode(object)); +} +function _decodeChildren(data, offset, childOffset, length) { + const result = []; + while (childOffset < offset + 1 + length) { + const decoded = _decode(data, childOffset); + result.push(decoded.result); + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + logger.throwError("child data too short", Logger.errors.BUFFER_OVERRUN, {}); + } + } + return { consumed: (1 + length), result: result }; +} +// returns { consumed: number, result: Object } +function _decode(data, offset) { + if (data.length === 0) { + logger.throwError("data too short", Logger.errors.BUFFER_OVERRUN, {}); + } + // Array with extra length prefix + if (data[offset] >= 0xf8) { + const lengthLength = data[offset] - 0xf7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data short segment too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + logger.throwError("data long segment too short", Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length); + } + else if (data[offset] >= 0xc0) { + const length = data[offset] - 0xc0; + if (offset + 1 + length > data.length) { + logger.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1, length); + } + else if (data[offset] >= 0xb8) { + const lengthLength = data[offset] - 0xb7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + logger.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length)); + return { consumed: (1 + lengthLength + length), result: result }; + } + else if (data[offset] >= 0x80) { + const length = data[offset] - 0x80; + if (offset + 1 + length > data.length) { + logger.throwError("data too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const result = hexlify(data.slice(offset + 1, offset + 1 + length)); + return { consumed: (1 + length), result: result }; + } + return { consumed: 1, result: hexlify(data[offset]) }; +} +export function decode(data) { + const bytes = arrayify(data); + const decoded = _decode(bytes, 0); + if (decoded.consumed !== bytes.length) { + logger.throwArgumentError("invalid rlp data", "data", data); + } + return decoded.result; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib.esm/index.js.map b/node_modules/@ethersproject/rlp/lib.esm/index.js.map new file mode 100644 index 0000000..ebc21b2 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.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lp/lib/_version.d.ts new file mode 100644 index 0000000..b825fbf --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "rlp/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/_version.d.ts.map b/node_modules/@ethersproject/rlp/lib/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/_version.js b/node_modules/@ethersproject/rlp/lib/_version.js new file mode 100644 index 0000000..39b4266 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "rlp/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/_version.js.map b/node_modules/@ethersproject/rlp/lib/_version.js.map new file mode 100644 index 0000000..b3a3dff --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/index.d.ts b/node_modules/@ethersproject/rlp/lib/index.d.ts new file mode 100644 index 0000000..fec4e35 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/index.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function encode(object: any): string; +export declare function decode(data: BytesLike): any; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/index.d.ts.map b/node_modules/@ethersproject/rlp/lib/index.d.ts.map new file mode 100644 index 0000000..59057d4 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAwB,MAAM,sBAAsB,CAAC;AA8DjF,wBAAgB,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAE1C;AA8ED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG,CAO3C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/index.js b/node_modules/@ethersproject/rlp/lib/index.js new file mode 100644 index 0000000..a7141fe --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/index.js @@ -0,0 +1,124 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +//See: https://github.com/ethereum/wiki/wiki/RLP +var bytes_1 = require("@ethersproject/bytes"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function arrayifyInteger(value) { + var result = []; + while (value) { + result.unshift(value & 0xff); + value >>= 8; + } + return result; +} +function unarrayifyInteger(data, offset, length) { + var result = 0; + for (var i = 0; i < length; i++) { + result = (result * 256) + data[offset + i]; + } + return result; +} +function _encode(object) { + if (Array.isArray(object)) { + var payload_1 = []; + object.forEach(function (child) { + payload_1 = payload_1.concat(_encode(child)); + }); + if (payload_1.length <= 55) { + payload_1.unshift(0xc0 + payload_1.length); + return payload_1; + } + var length_1 = arrayifyInteger(payload_1.length); + length_1.unshift(0xf7 + length_1.length); + return length_1.concat(payload_1); + } + if (!(0, bytes_1.isBytesLike)(object)) { + logger.throwArgumentError("RLP object must be BytesLike", "object", object); + } + var data = Array.prototype.slice.call((0, bytes_1.arrayify)(object)); + if (data.length === 1 && data[0] <= 0x7f) { + return data; + } + else if (data.length <= 55) { + data.unshift(0x80 + data.length); + return data; + } + var length = arrayifyInteger(data.length); + length.unshift(0xb7 + length.length); + return length.concat(data); +} +function encode(object) { + return (0, bytes_1.hexlify)(_encode(object)); +} +exports.encode = encode; +function _decodeChildren(data, offset, childOffset, length) { + var result = []; + while (childOffset < offset + 1 + length) { + var decoded = _decode(data, childOffset); + result.push(decoded.result); + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + logger.throwError("child data too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + } + return { consumed: (1 + length), result: result }; +} +// returns { consumed: number, result: Object } +function _decode(data, offset) { + if (data.length === 0) { + logger.throwError("data too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + // Array with extra length prefix + if (data[offset] >= 0xf8) { + var lengthLength = data[offset] - 0xf7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data short segment too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var length_2 = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length_2 > data.length) { + logger.throwError("data long segment too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2); + } + else if (data[offset] >= 0xc0) { + var length_3 = data[offset] - 0xc0; + if (offset + 1 + length_3 > data.length) { + logger.throwError("data array too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1, length_3); + } + else if (data[offset] >= 0xb8) { + var lengthLength = data[offset] - 0xb7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data array too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var length_4 = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length_4 > data.length) { + logger.throwError("data array too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var result = (0, bytes_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4)); + return { consumed: (1 + lengthLength + length_4), result: result }; + } + else if (data[offset] >= 0x80) { + var length_5 = data[offset] - 0x80; + if (offset + 1 + length_5 > data.length) { + logger.throwError("data too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var result = (0, bytes_1.hexlify)(data.slice(offset + 1, offset + 1 + length_5)); + return { consumed: (1 + length_5), result: result }; + } + return { consumed: 1, result: (0, bytes_1.hexlify)(data[offset]) }; +} +function decode(data) { + var bytes = (0, bytes_1.arrayify)(data); + var decoded = _decode(bytes, 0); + if (decoded.consumed !== bytes.length) { + logger.throwArgumentError("invalid rlp data", "data", data); + } + return decoded.result; +} +exports.decode = decode; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/lib/index.js.map b/node_modules/@ethersproject/rlp/lib/index.js.map new file mode 100644 index 0000000..f383ee8 --- /dev/null +++ b/node_modules/@ethersproject/rlp/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,gDAAgD;AAEhD,8CAAiF;AAEjF,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,SAAS,eAAe,CAAC,KAAa;IAClC,IAAM,MAAM,GAAG,EAAE,CAAC;IAClB,OAAO,KAAK,EAAE;QACV,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;QAC7B,KAAK,KAAK,CAAC,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAgB,EAAE,MAAc,EAAE,MAAc;IACvE,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7B,MAAM,GAAG,CAAC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AAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,IAAA,eAAO,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED,SAAgB,MAAM,CAAC,IAAe;IAClC,IAAM,KAAK,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAC7B,IAAM,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAClC,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,EAAE;QACnC,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KAC/D;IACD,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC;AAPD,wBAOC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/rlp/package.json b/node_modules/@ethersproject/rlp/package.json new file mode 100644 index 0000000..c331620 --- /dev/null +++ b/node_modules/@ethersproject/rlp/package.json @@ -0,0 +1,44 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + }, + "description": "Recursive-Length Prefix (RLP) coder.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers", + "rlp" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/rlp", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/rlp", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x3a18e443290623d16781f485fde8b646180e1a7a03bdf1cc0d918c709ec97db2", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/rlp/src.ts/_version.ts b/node_modules/@ethersproject/rlp/src.ts/_version.ts new file mode 100644 index 0000000..b4c031f --- /dev/null +++ b/node_modules/@ethersproject/rlp/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "rlp/5.5.0"; diff --git a/node_modules/@ethersproject/rlp/src.ts/index.ts b/node_modules/@ethersproject/rlp/src.ts/index.ts new file mode 100644 index 0000000..8485e3a --- /dev/null +++ b/node_modules/@ethersproject/rlp/src.ts/index.ts @@ -0,0 +1,155 @@ +"use strict"; + +//See: https://github.com/ethereum/wiki/wiki/RLP + +import { arrayify, BytesLike, hexlify, isBytesLike } from "@ethersproject/bytes"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +function arrayifyInteger(value: number): Array { + const result = []; + while (value) { + result.unshift(value & 0xff); + value >>= 8; + } + return result; +} + +function unarrayifyInteger(data: Uint8Array, offset: number, length: number): number { + let result = 0; + for (let i = 0; i < length; i++) { + result = (result * 256) + data[offset + i]; + } + return result; +} + +function _encode(object: Array | string): Array { + if (Array.isArray(object)) { + let payload: Array = []; + object.forEach(function(child) { + payload = payload.concat(_encode(child)); + }); + + if (payload.length <= 55) { + payload.unshift(0xc0 + payload.length) + return payload; + } + + const length = arrayifyInteger(payload.length); + length.unshift(0xf7 + length.length); + + return length.concat(payload); + + } + + if (!isBytesLike(object)) { + logger.throwArgumentError("RLP object must be BytesLike", "object", object); + } + + const data: Array = Array.prototype.slice.call(arrayify(object)); + + if (data.length === 1 && data[0] <= 0x7f) { + return data; + + } else if (data.length <= 55) { + data.unshift(0x80 + data.length); + return data; + } + + const length = arrayifyInteger(data.length); + length.unshift(0xb7 + length.length); + + return length.concat(data); +} + +export function encode(object: any): string { + return hexlify(_encode(object)); +} + +type Decoded = { + result: any; + consumed: number; +}; + +function _decodeChildren(data: Uint8Array, offset: number, childOffset: number, length: number): Decoded { + const result = []; + + while (childOffset < offset + 1 + length) { + const decoded = _decode(data, childOffset); + + result.push(decoded.result); + + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + logger.throwError("child data too short", Logger.errors.BUFFER_OVERRUN, { }); + } + } + + return {consumed: (1 + length), result: result}; +} + +// returns { consumed: number, result: Object } +function _decode(data: Uint8Array, offset: number): { consumed: number, result: any } { + if (data.length === 0) { + logger.throwError("data too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + // Array with extra length prefix + if (data[offset] >= 0xf8) { + const lengthLength = data[offset] - 0xf7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data short segment too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + const length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + logger.throwError("data long segment too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length); + + } else if (data[offset] >= 0xc0) { + const length = data[offset] - 0xc0; + if (offset + 1 + length > data.length) { + logger.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + return _decodeChildren(data, offset, offset + 1, length); + + } else if (data[offset] >= 0xb8) { + const lengthLength = data[offset] - 0xb7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + const length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + logger.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length)); + return { consumed: (1 + lengthLength + length), result: result } + + } else if (data[offset] >= 0x80) { + const length = data[offset] - 0x80; + if (offset + 1 + length > data.length) { + logger.throwError("data too short", Logger.errors.BUFFER_OVERRUN, { }); + } + + const result = hexlify(data.slice(offset + 1, offset + 1 + length)); + return { consumed: (1 + length), result: result } + } + return { consumed: 1, result: hexlify(data[offset]) }; +} + +export function decode(data: BytesLike): any { + const bytes = arrayify(data); + const decoded = _decode(bytes, 0); + if (decoded.consumed !== bytes.length) { + logger.throwArgumentError("invalid rlp data", "data", data); + } + return decoded.result; +} + diff --git a/node_modules/@ethersproject/sha2/LICENSE.md b/node_modules/@ethersproject/sha2/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/sha2/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/sha2/README.md b/node_modules/@ethersproject/sha2/README.md new file mode 100644 index 0000000..901e51f --- /dev/null +++ b/node_modules/@ethersproject/sha2/README.md @@ -0,0 +1,38 @@ +SHA2 Hash Functions +=================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for common cryptographic hashes and HMAC. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + ripemd160, + + sha256, + sha512, + + computeHmac, + + // Enums + + SupportedAlgorithm + +} = require("@ethersproject/sha2"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts b/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts new file mode 100644 index 0000000..032ac77 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "sha2/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/_version.js b/node_modules/@ethersproject/sha2/lib.esm/_version.js new file mode 100644 index 0000000..d18c8be --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "sha2/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/_version.js.map b/node_modules/@ethersproject/sha2/lib.esm/_version.js.map new file mode 100644 index 0000000..33a652d --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/index.d.ts b/node_modules/@ethersproject/sha2/lib.esm/index.d.ts new file mode 100644 index 0000000..3a04ec0 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/index.d.ts @@ -0,0 +1,4 @@ +import { computeHmac, ripemd160, sha256, sha512 } from "./sha2"; +import { SupportedAlgorithm } from "./types"; +export { computeHmac, ripemd160, sha256, sha512, SupportedAlgorithm }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/index.d.ts.map b/node_modules/@ethersproject/sha2/lib.esm/index.d.ts.map new file mode 100644 index 0000000..1bdb9f7 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EACH,WAAW,EAEX,SAAS,EAET,MAAM,EACN,MAAM,EAEN,kBAAkB,EACrB,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/index.js b/node_modules/@ethersproject/sha2/lib.esm/index.js new file mode 100644 index 0000000..b4fb354 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/index.js @@ -0,0 +1,4 @@ +import { computeHmac, ripemd160, sha256, sha512 } from "./sha2"; +import { SupportedAlgorithm } from "./types"; +export { computeHmac, ripemd160, sha256, sha512, SupportedAlgorithm }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/index.js.map b/node_modules/@ethersproject/sha2/lib.esm/index.js.map new file mode 100644 index 0000000..1ee9694 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EACH,WAAW,EAEX,SAAS,EAET,MAAM,EACN,MAAM,EAEN,kBAAkB,EACrB,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts b/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts new file mode 100644 index 0000000..3ace707 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts @@ -0,0 +1,7 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { SupportedAlgorithm } from "./types"; +export declare function ripemd160(data: BytesLike): string; +export declare function sha256(data: BytesLike): string; +export declare function sha512(data: BytesLike): string; +export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; +//# sourceMappingURL=sha2.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts.map b/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts.map new file mode 100644 index 0000000..bd88ade --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sha2.d.ts","sourceRoot":"","sources":["../src.ts/browser-sha2.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEjD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CASlG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/sha2.js b/node_modules/@ethersproject/sha2/lib.esm/sha2.js new file mode 100644 index 0000000..6ecbafe --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/sha2.js @@ -0,0 +1,27 @@ +"use strict"; +import hash from "hash.js"; +//const _ripemd160 = _hash.ripemd160; +import { arrayify } from "@ethersproject/bytes"; +import { SupportedAlgorithm } from "./types"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +export function ripemd160(data) { + return "0x" + (hash.ripemd160().update(arrayify(data)).digest("hex")); +} +export function sha256(data) { + return "0x" + (hash.sha256().update(arrayify(data)).digest("hex")); +} +export function sha512(data) { + return "0x" + (hash.sha512().update(arrayify(data)).digest("hex")); +} +export function computeHmac(algorithm, key, data) { + if (!SupportedAlgorithm[algorithm]) { + logger.throwError("unsupported algorithm " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "hmac", + algorithm: algorithm + }); + } + return "0x" + hash.hmac(hash[algorithm], arrayify(key)).update(arrayify(data)).digest("hex"); +} +//# sourceMappingURL=sha2.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/sha2.js.map b/node_modules/@ethersproject/sha2/lib.esm/sha2.js.map new file mode 100644 index 0000000..d4fa44b --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/sha2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sha2.js","sourceRoot":"","sources":["../src.ts/browser-sha2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,qCAAqC;AAErC,OAAO,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,MAAM,UAAU,SAAS,CAAC,IAAe;IACrC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAe;IAClC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAe;IAClC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAA6B,EAAE,GAAc,EAAE,IAAe;IACtF,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE;QAChC,MAAM,CAAC,UAAU,CAAC,wBAAwB,GAAG,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;YACzF,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,SAAS;SACvB,CAAC,CAAC;KACN;IAED,OAAO,IAAI,GAAG,IAAI,CAAC,IAAI,CAAO,IAAK,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACxG,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/types.d.ts b/node_modules/@ethersproject/sha2/lib.esm/types.d.ts new file mode 100644 index 0000000..458baee --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/types.d.ts @@ -0,0 +1,5 @@ +export declare enum SupportedAlgorithm { + sha256 = "sha256", + sha512 = "sha512" +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/types.d.ts.map b/node_modules/@ethersproject/sha2/lib.esm/types.d.ts.map new file mode 100644 index 0000000..57ad20a --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAAG,MAAM,WAAW;IAAE,MAAM,WAAW;CAAE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/types.js b/node_modules/@ethersproject/sha2/lib.esm/types.js new file mode 100644 index 0000000..cf79cb4 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/types.js @@ -0,0 +1,7 @@ +export var SupportedAlgorithm; +(function (SupportedAlgorithm) { + SupportedAlgorithm["sha256"] = "sha256"; + SupportedAlgorithm["sha512"] = "sha512"; +})(SupportedAlgorithm || (SupportedAlgorithm = {})); +; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib.esm/types.js.map b/node_modules/@ethersproject/sha2/lib.esm/types.js.map new file mode 100644 index 0000000..c596013 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib.esm/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAA2D;AAAvE,WAAY,kBAAkB;IAAG,uCAAiB,CAAA;IAAE,uCAAiB,CAAA;AAAC,CAAC,EAA3D,kBAAkB,KAAlB,kBAAkB,QAAyC;AAAA,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/_version.d.ts b/node_modules/@ethersproject/sha2/lib/_version.d.ts new file mode 100644 index 0000000..032ac77 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "sha2/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/_version.d.ts.map b/node_modules/@ethersproject/sha2/lib/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/_version.js b/node_modules/@ethersproject/sha2/lib/_version.js new file mode 100644 index 0000000..d81b890 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "sha2/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/_version.js.map b/node_modules/@ethersproject/sha2/lib/_version.js.map new file mode 100644 index 0000000..9d275b7 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts b/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts new file mode 100644 index 0000000..4076c92 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts @@ -0,0 +1,7 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { SupportedAlgorithm } from "./types"; +export declare function ripemd160(data: BytesLike): string; +export declare function sha256(data: BytesLike): string; +export declare function sha512(data: BytesLike): string; +export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; +//# sourceMappingURL=browser-sha2.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts.map b/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts.map new file mode 100644 index 0000000..5596101 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-sha2.d.ts","sourceRoot":"","sources":["../src.ts/browser-sha2.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEjD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CASlG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/browser-sha2.js b/node_modules/@ethersproject/sha2/lib/browser-sha2.js new file mode 100644 index 0000000..2288fac --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/browser-sha2.js @@ -0,0 +1,36 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.computeHmac = exports.sha512 = exports.sha256 = exports.ripemd160 = void 0; +var hash_js_1 = __importDefault(require("hash.js")); +//const _ripemd160 = _hash.ripemd160; +var bytes_1 = require("@ethersproject/bytes"); +var types_1 = require("./types"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function ripemd160(data) { + return "0x" + (hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest("hex")); +} +exports.ripemd160 = ripemd160; +function sha256(data) { + return "0x" + (hash_js_1.default.sha256().update((0, bytes_1.arrayify)(data)).digest("hex")); +} +exports.sha256 = sha256; +function sha512(data) { + return "0x" + (hash_js_1.default.sha512().update((0, bytes_1.arrayify)(data)).digest("hex")); +} +exports.sha512 = sha512; +function computeHmac(algorithm, key, data) { + if (!types_1.SupportedAlgorithm[algorithm]) { + logger.throwError("unsupported algorithm " + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "hmac", + algorithm: algorithm + }); + } + return "0x" + hash_js_1.default.hmac(hash_js_1.default[algorithm], (0, bytes_1.arrayify)(key)).update((0, bytes_1.arrayify)(data)).digest("hex"); +} +exports.computeHmac = computeHmac; +//# sourceMappingURL=browser-sha2.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/browser-sha2.js.map b/node_modules/@ethersproject/sha2/lib/browser-sha2.js.map new file mode 100644 index 0000000..a9259ab --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/browser-sha2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-sha2.js","sourceRoot":"","sources":["../src.ts/browser-sha2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb,oDAA2B;AAC3B,qCAAqC;AAErC,8CAA2D;AAE3D,iCAA6C;AAE7C,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,SAAgB,SAAS,CAAC,IAAe;IACrC,OAAO,IAAI,GAAG,CAAC,iBAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1E,CAAC;AAFD,8BAEC;AAED,SAAgB,MAAM,CAAC,IAAe;IAClC,OAAO,IAAI,GAAG,CAAC,iBAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACvE,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,IAAe;IAClC,OAAO,IAAI,GAAG,CAAC,iBAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACvE,CAAC;AAFD,wBAEC;AAED,SAAgB,WAAW,CAAC,SAA6B,EAAE,GAAc,EAAE,IAAe;IACtF,IAAI,CAAC,0BAAkB,CAAC,SAAS,CAAC,EAAE;QAChC,MAAM,CAAC,UAAU,CAAC,wBAAwB,GAAG,SAAS,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;YACzF,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,SAAS;SACvB,CAAC,CAAC;KACN;IAED,OAAO,IAAI,GAAG,iBAAI,CAAC,IAAI,CAAO,iBAAK,CAAC,SAAS,CAAC,EAAE,IAAA,gBAAQ,EAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACxG,CAAC;AATD,kCASC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/index.d.ts b/node_modules/@ethersproject/sha2/lib/index.d.ts new file mode 100644 index 0000000..3a04ec0 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/index.d.ts @@ -0,0 +1,4 @@ +import { computeHmac, ripemd160, sha256, sha512 } from "./sha2"; +import { SupportedAlgorithm } from "./types"; +export { computeHmac, ripemd160, sha256, sha512, SupportedAlgorithm }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/index.d.ts.map b/node_modules/@ethersproject/sha2/lib/index.d.ts.map new file mode 100644 index 0000000..1bdb9f7 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EACH,WAAW,EAEX,SAAS,EAET,MAAM,EACN,MAAM,EAEN,kBAAkB,EACrB,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/index.js b/node_modules/@ethersproject/sha2/lib/index.js new file mode 100644 index 0000000..0c3c296 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/index.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SupportedAlgorithm = exports.sha512 = exports.sha256 = exports.ripemd160 = exports.computeHmac = void 0; +var sha2_1 = require("./sha2"); +Object.defineProperty(exports, "computeHmac", { enumerable: true, get: function () { return sha2_1.computeHmac; } }); +Object.defineProperty(exports, "ripemd160", { enumerable: true, get: function () { return sha2_1.ripemd160; } }); +Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha2_1.sha256; } }); +Object.defineProperty(exports, "sha512", { enumerable: true, get: function () { return sha2_1.sha512; } }); +var types_1 = require("./types"); +Object.defineProperty(exports, "SupportedAlgorithm", { enumerable: true, get: function () { return types_1.SupportedAlgorithm; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/index.js.map b/node_modules/@ethersproject/sha2/lib/index.js.map new file mode 100644 index 0000000..cb5f68a --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":";;;AAAA,+BAAgE;AAK5D,4FALK,kBAAW,OAKL;AAEX,0FAPkB,gBAAS,OAOlB;AAET,uFAT6B,aAAM,OAS7B;AACN,uFAVqC,aAAM,OAUrC;AARV,iCAA6C;AAUzC,mGAVK,0BAAkB,OAUL"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/sha2.d.ts b/node_modules/@ethersproject/sha2/lib/sha2.d.ts new file mode 100644 index 0000000..3ace707 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/sha2.d.ts @@ -0,0 +1,7 @@ +import { BytesLike } from "@ethersproject/bytes"; +import { SupportedAlgorithm } from "./types"; +export declare function ripemd160(data: BytesLike): string; +export declare function sha256(data: BytesLike): string; +export declare function sha512(data: BytesLike): string; +export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; +//# sourceMappingURL=sha2.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/sha2.d.ts.map b/node_modules/@ethersproject/sha2/lib/sha2.d.ts.map new file mode 100644 index 0000000..c7eaf25 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/sha2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sha2.d.ts","sourceRoot":"","sources":["../src.ts/sha2.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEjD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9C;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAUlG"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/sha2.js b/node_modules/@ethersproject/sha2/lib/sha2.js new file mode 100644 index 0000000..673270e --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/sha2.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.computeHmac = exports.sha512 = exports.sha256 = exports.ripemd160 = void 0; +var crypto_1 = require("crypto"); +var bytes_1 = require("@ethersproject/bytes"); +var types_1 = require("./types"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function ripemd160(data) { + return "0x" + (0, crypto_1.createHash)("ripemd160").update(Buffer.from((0, bytes_1.arrayify)(data))).digest("hex"); +} +exports.ripemd160 = ripemd160; +function sha256(data) { + return "0x" + (0, crypto_1.createHash)("sha256").update(Buffer.from((0, bytes_1.arrayify)(data))).digest("hex"); +} +exports.sha256 = sha256; +function sha512(data) { + return "0x" + (0, crypto_1.createHash)("sha512").update(Buffer.from((0, bytes_1.arrayify)(data))).digest("hex"); +} +exports.sha512 = sha512; +function computeHmac(algorithm, key, data) { + /* istanbul ignore if */ + if (!types_1.SupportedAlgorithm[algorithm]) { + logger.throwError("unsupported algorithm - " + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "computeHmac", + algorithm: algorithm + }); + } + return "0x" + (0, crypto_1.createHmac)(algorithm, Buffer.from((0, bytes_1.arrayify)(key))).update(Buffer.from((0, bytes_1.arrayify)(data))).digest("hex"); +} +exports.computeHmac = computeHmac; +//# sourceMappingURL=sha2.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/sha2.js.map b/node_modules/@ethersproject/sha2/lib/sha2.js.map new file mode 100644 index 0000000..9fd1540 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/sha2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"s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,mBAAU,EAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACtH,CAAC;AAVD,kCAUC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/types.d.ts b/node_modules/@ethersproject/sha2/lib/types.d.ts new file mode 100644 index 0000000..458baee --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/types.d.ts @@ -0,0 +1,5 @@ +export declare enum SupportedAlgorithm { + sha256 = "sha256", + sha512 = "sha512" +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/types.d.ts.map b/node_modules/@ethersproject/sha2/lib/types.d.ts.map new file mode 100644 index 0000000..57ad20a --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAAG,MAAM,WAAW;IAAE,MAAM,WAAW;CAAE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/types.js b/node_modules/@ethersproject/sha2/lib/types.js new file mode 100644 index 0000000..276987a --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/types.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SupportedAlgorithm = void 0; +var SupportedAlgorithm; +(function (SupportedAlgorithm) { + SupportedAlgorithm["sha256"] = "sha256"; + SupportedAlgorithm["sha512"] = "sha512"; +})(SupportedAlgorithm = exports.SupportedAlgorithm || (exports.SupportedAlgorithm = {})); +; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/lib/types.js.map b/node_modules/@ethersproject/sha2/lib/types.js.map new file mode 100644 index 0000000..b76d215 --- /dev/null +++ b/node_modules/@ethersproject/sha2/lib/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAA2D;AAAvE,WAAY,kBAAkB;IAAG,uCAAiB,CAAA;IAAE,uCAAiB,CAAA;AAAC,CAAC,EAA3D,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAAyC;AAAA,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/sha2/package.json b/node_modules/@ethersproject/sha2/package.json new file mode 100644 index 0000000..cf265d5 --- /dev/null +++ b/node_modules/@ethersproject/sha2/package.json @@ -0,0 +1,50 @@ +{ + "_ethers.alias": { + "sha2.js": "browser-sha2.js" + }, + "author": "Richard Moore ", + "browser": { + "./lib/sha2": "./lib/browser-sha2.js" + }, + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "hash.js": "1.1.7" + }, + "description": "The SHA2 family hash functions and HMAC functions for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/sha2", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/sha2", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x07b87d006dce28d562d86a6fa9b1ff89183c48f2f1461d8fa41d67366d0546cc", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/sha2/src.ts/_version.ts b/node_modules/@ethersproject/sha2/src.ts/_version.ts new file mode 100644 index 0000000..5e39b04 --- /dev/null +++ b/node_modules/@ethersproject/sha2/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "sha2/5.5.0"; diff --git a/node_modules/@ethersproject/sha2/src.ts/browser-sha2.ts b/node_modules/@ethersproject/sha2/src.ts/browser-sha2.ts new file mode 100644 index 0000000..f72ac95 --- /dev/null +++ b/node_modules/@ethersproject/sha2/src.ts/browser-sha2.ts @@ -0,0 +1,36 @@ +"use strict"; + +import hash from "hash.js"; +//const _ripemd160 = _hash.ripemd160; + +import { arrayify, BytesLike } from "@ethersproject/bytes"; + +import { SupportedAlgorithm } from "./types"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export function ripemd160(data: BytesLike): string { + return "0x" + (hash.ripemd160().update(arrayify(data)).digest("hex")); +} + +export function sha256(data: BytesLike): string { + return "0x" + (hash.sha256().update(arrayify(data)).digest("hex")); +} + +export function sha512(data: BytesLike): string { + return "0x" + (hash.sha512().update(arrayify(data)).digest("hex")); +} + +export function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string { + if (!SupportedAlgorithm[algorithm]) { + logger.throwError("unsupported algorithm " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "hmac", + algorithm: algorithm + }); + } + + return "0x" + hash.hmac((hash)[algorithm], arrayify(key)).update(arrayify(data)).digest("hex"); +} + diff --git a/node_modules/@ethersproject/sha2/src.ts/index.ts b/node_modules/@ethersproject/sha2/src.ts/index.ts new file mode 100644 index 0000000..ac50daa --- /dev/null +++ b/node_modules/@ethersproject/sha2/src.ts/index.ts @@ -0,0 +1,14 @@ +import { computeHmac, ripemd160, sha256, sha512 } from "./sha2"; + +import { SupportedAlgorithm } from "./types"; + +export { + computeHmac, + + ripemd160, + + sha256, + sha512, + + SupportedAlgorithm +} diff --git a/node_modules/@ethersproject/sha2/src.ts/sha2.ts b/node_modules/@ethersproject/sha2/src.ts/sha2.ts new file mode 100644 index 0000000..71a202a --- /dev/null +++ b/node_modules/@ethersproject/sha2/src.ts/sha2.ts @@ -0,0 +1,36 @@ +"use strict"; + +import { createHash, createHmac } from "crypto"; + +import { arrayify, BytesLike } from "@ethersproject/bytes"; + +import { SupportedAlgorithm } from "./types"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export function ripemd160(data: BytesLike): string { + return "0x" + createHash("ripemd160").update(Buffer.from(arrayify(data))).digest("hex") +} + +export function sha256(data: BytesLike): string { + return "0x" + createHash("sha256").update(Buffer.from(arrayify(data))).digest("hex") +} + +export function sha512(data: BytesLike): string { + return "0x" + createHash("sha512").update(Buffer.from(arrayify(data))).digest("hex") +} + +export function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string { + /* istanbul ignore if */ + if (!SupportedAlgorithm[algorithm]) { + logger.throwError("unsupported algorithm - " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "computeHmac", + algorithm: algorithm + }); + } + + return "0x" + createHmac(algorithm, Buffer.from(arrayify(key))).update(Buffer.from(arrayify(data))).digest("hex"); +} + diff --git a/node_modules/@ethersproject/sha2/src.ts/types.ts b/node_modules/@ethersproject/sha2/src.ts/types.ts new file mode 100644 index 0000000..7560be8 --- /dev/null +++ b/node_modules/@ethersproject/sha2/src.ts/types.ts @@ -0,0 +1,2 @@ +export enum SupportedAlgorithm { sha256 = "sha256", sha512 = "sha512" }; + diff --git a/node_modules/@ethersproject/sha2/thirdparty.d.ts b/node_modules/@ethersproject/sha2/thirdparty.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/@ethersproject/signing-key/LICENSE.md b/node_modules/@ethersproject/signing-key/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/signing-key/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/signing-key/README.md b/node_modules/@ethersproject/signing-key/README.md new file mode 100644 index 0000000..dbd6a02 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/README.md @@ -0,0 +1,30 @@ +Signing Key +=========== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It is responsible for secp256-k1 signing, verifying and recovery operations. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/signing-key/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + SigningKey, + + computePublicKey, + recoverPublicKey + +} = require("@ethersproject/signing-key"); +``` + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts b/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts new file mode 100644 index 0000000..babe06b --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "signing-key/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..cfa4fb8 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/_version.js b/node_modules/@ethersproject/signing-key/lib.esm/_version.js new file mode 100644 index 0000000..f60509a --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "signing-key/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/_version.js.map b/node_modules/@ethersproject/signing-key/lib.esm/_version.js.map new file mode 100644 index 0000000..c25a48c --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts new file mode 100644 index 0000000..cda6878 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts @@ -0,0 +1,3 @@ +//This file generated by rollup-pre-alias.config.js; do NOT modify +declare const EC: any; +export { EC }; \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts.map b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts.map new file mode 100644 index 0000000..902c23d --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elliptic.d.ts","sourceRoot":"","sources":["../src.ts/browser-elliptic.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js new file mode 100644 index 0000000..83c3ea3 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js @@ -0,0 +1,2478 @@ +import BN from 'bn.js'; +import hash from 'hash.js'; + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; +} + +function getDefaultExportFromNamespaceIfPresent (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; +} + +function getDefaultExportFromNamespaceIfNotNamed (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; +} + +function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var a = Object.defineProperty({}, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; +} + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} + +var minimalisticAssert = assert; + +function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; + +var utils_1 = createCommonjsModule(function (module, exports) { +'use strict'; + +var utils = exports; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } else { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } + return res; +} +utils.toArray = toArray; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; +}; +}); + +var utils_1$1 = createCommonjsModule(function (module, exports) { +'use strict'; + +var utils = exports; + + + + +utils.assert = minimalisticAssert; +utils.toArray = utils_1.toArray; +utils.zero2 = utils_1.zero2; +utils.toHex = utils_1.toHex; +utils.encode = utils_1.encode; + +// Represent num in a w-NAF form +function getNAF(num, w, bits) { + var naf = new Array(Math.max(num.bitLength(), bits) + 1); + naf.fill(0); + + var ws = 1 << (w + 1); + var k = num.clone(); + + for (var i = 0; i < naf.length; i++) { + var z; + var mod = k.andln(ws - 1); + if (k.isOdd()) { + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + + naf[i] = z; + k.iushrn(1); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [], + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + var m8; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new BN(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; +}); + +'use strict'; + + + +var getNAF = utils_1$1.getNAF; +var getJSF = utils_1$1.getJSF; +var assert$1 = utils_1$1.assert; + +function BaseCurve(type, conf) { + this.type = type; + this.p = new BN(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); + + // Useful for many curves + this.zero = new BN(0).toRed(this.red); + this.one = new BN(1).toRed(this.red); + this.two = new BN(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new BN(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + this._bitLength = this.n ? this.n.bitLength() : 0; + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } +} +var base = BaseCurve; + +BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert$1(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1, this._bitLength); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + var j; + var nafW; + for (j = 0; j < naf.length; j += doubles.step) { + nafW = 0; + for (var l = j + doubles.step - 1; l >= j; l--) + nafW = (nafW << 1) + naf[l]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (j = 0; j < repr.length; j++) { + nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); +}; + +BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w, this._bitLength); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var l = 0; i >= 0 && naf[i] === 0; i--) + l++; + if (i >= 0) + l++; + acc = acc.dblp(l); + + if (i < 0) + break; + var z = naf[i]; + assert$1(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; +}; + +BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + var i; + var j; + var p; + for (i = 0; i < len; i++) { + p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength); + naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b], /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3, /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (j = 0; j < len; j++) { + var z = tmp[j]; + p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); +}; + +function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; +} +BaseCurve.BasePoint = BasePoint; + +BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); +}; + +BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); +}; + +BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils_1$1.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert$1(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert$1(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); +}; + +BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); +}; + +BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)); +}; + +BasePoint.prototype.encode = function encode(enc, compact) { + return utils_1$1.encode(this._encode(compact), enc); +}; + +BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null, + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; +}; + +BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); +}; + +BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles, + }; +}; + +BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res, + }; +}; + +BasePoint.prototype._getBeta = function _getBeta() { + return null; +}; + +BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; +}; + +var inherits_browser = createCommonjsModule(function (module) { +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; +} +}); + +'use strict'; + + + + + + +var assert$2 = utils_1$1.assert; + +function ShortCurve(conf) { + base.call(this, 'short', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits_browser(ShortCurve, base); +var short_1 = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new BN(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new BN(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert$2(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new BN(vec.a, 16), + b: new BN(vec.b, 16), + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis, + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : BN.mont(num); + var tinv = new BN(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new BN(1); + var y1 = new BN(0); + var x2 = new BN(0); + var y2 = new BN(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 }, + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; + }; + +function Point(curve, x, y, isRed) { + base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits_browser(Point, base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul), + }, + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1), + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1), + }, + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)), + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)), + }, + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new BN(k, 16); + if (this.isInfinity()) + return this; + else if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate), + }, + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new BN(0); + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = new BN(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits_browser(JPoint, base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + var i; + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new BN(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +var curve_1 = createCommonjsModule(function (module, exports) { +'use strict'; + +var curve = exports; + +curve.base = base; +curve.short = short_1; +curve.mont = /*RicMoo:ethers:require(./mont)*/(null); +curve.edwards = /*RicMoo:ethers:require(./edwards)*/(null); +}); + +var curves_1 = createCommonjsModule(function (module, exports) { +'use strict'; + +var curves = exports; + + + + + +var assert = utils_1$1.assert; + +function PresetCurve(options) { + if (options.type === 'short') + this.curve = new curve_1.short(options); + else if (options.type === 'edwards') + this.curve = new curve_1.edwards(options); + else + this.curve = new curve_1.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); +} +curves.PresetCurve = PresetCurve; + +function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve, + }); + return curve; + }, + }); +} + +defineCurve('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: hash.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811', + ], +}); + +defineCurve('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: hash.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', + ], +}); + +defineCurve('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: hash.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', + ], +}); + +defineCurve('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: hash.sha384, + gRed: false, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + + '5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', + ], +}); + +defineCurve('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: hash.sha512, + gRed: false, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + + '3fad0761 353c7086 a272c240 88be9476 9fd16650', + ], +}); + +defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '9', + ], +}); + +defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658', + ], +}); + +var pre; +try { + pre = /*RicMoo:ethers:require(./precomputed/secp256k1)*/(null).crash(); +} catch (e) { + pre = undefined; +} + +defineCurve('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: hash.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3', + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15', + }, + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre, + ], +}); +}); + +'use strict'; + + + + + +function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + + this._reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + + var entropy = utils_1.toArray(options.entropy, options.entropyEnc || 'hex'); + var nonce = utils_1.toArray(options.nonce, options.nonceEnc || 'hex'); + var pers = utils_1.toArray(options.pers, options.persEnc || 'hex'); + minimalisticAssert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); +} +var hmacDrbg = HmacDRBG; + +HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this._reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 +}; + +HmacDRBG.prototype._hmac = function hmac() { + return new hash.hmac(this.hash, this.K); +}; + +HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); +}; + +HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils_1.toArray(entropy, entropyEnc); + add = utils_1.toArray(add, addEnc); + + minimalisticAssert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this._reseed = 1; +}; + +HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this._reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils_1.toArray(add, addEnc || 'hex'); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this._reseed++; + return utils_1.encode(res, enc); +}; + +'use strict'; + + + +var assert$3 = utils_1$1.assert; + +function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); +} +var key = KeyPair; + +KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc, + }); +}; + +KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc, + }); +}; + +KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; +}; + +KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); +}; + +KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; +}; + +KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new BN(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); +}; + +KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + // Montgomery points only have an `x` coordinate. + // Weierstrass/Edwards points on the other hand have both `x` and + // `y` coordinates. + if (this.ec.curve.type === 'mont') { + assert$3(key.x, 'Need x coordinate'); + } else if (this.ec.curve.type === 'short' || + this.ec.curve.type === 'edwards') { + assert$3(key.x && key.y, 'Need both x and y coordinate'); + } + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); +}; + +// ECDH +KeyPair.prototype.derive = function derive(pub) { + if(!pub.validate()) { + assert$3(pub.validate(), 'public point not validated'); + } + return pub.mul(this.priv).getX(); +}; + +// ECDSA +KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); +}; + +KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); +}; + +KeyPair.prototype.inspect = function inspect() { + return ''; +}; + +'use strict'; + + + + +var assert$4 = utils_1$1.assert; + +function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert$4(options.r && options.s, 'Signature without r or s'); + this.r = new BN(options.r, 16); + this.s = new BN(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; +} +var signature = Signature; + +function Position() { + this.place = 0; +} + +function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + + // Indefinite length or overflow + if (octetLen === 0 || octetLen > 4) { + return false; + } + + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + val >>>= 0; + } + + // Leading zeroes + if (val <= 0x7f) { + return false; + } + + p.place = off; + return val; +} + +function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); +} + +Signature.prototype._importDER = function _importDER(data, enc) { + data = utils_1$1.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if (len === false) { + return false; + } + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + if (rlen === false) { + return false; + } + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (slen === false) { + return false; + } + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0) { + if (r[1] & 0x80) { + r = r.slice(1); + } else { + // Leading zeroes + return false; + } + } + if (s[0] === 0) { + if (s[1] & 0x80) { + s = s.slice(1); + } else { + // Leading zeroes + return false; + } + } + + this.r = new BN(r); + this.s = new BN(s); + this.recoveryParam = null; + + return true; +}; + +function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); +} + +Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils_1$1.encode(res, enc); +}; + +'use strict'; + + + + + +var rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); }); +var assert$5 = utils_1$1.assert; + + + + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert$5(Object.prototype.hasOwnProperty.call(curves_1, options), + 'Unknown curve ' + options); + + options = curves_1[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof curves_1.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +var ec = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new key(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return key.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return key.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new hmacDrbg({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + entropy: options.entropy || rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || 'utf8', + nonce: this.n.toArray(), + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + for (;;) { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } +}; + +EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new hmacDrbg({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new BN(1)); + + for (var iter = 0; ; iter++) { + var k = options.k ? + options.k(iter) : + new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature$1, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature$1 = new signature(signature$1, 'hex'); + + // Perform primitive values validation + var r = signature$1.r; + var s = signature$1.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + var p; + + if (!this.curve._maxwellTrick) { + p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature$1, j, enc) { + assert$5((3 & j) === j, 'The recovery param is more than two bits'); + signature$1 = new signature(signature$1, enc); + + var n = this.n; + var e = new BN(msg); + var r = signature$1.r; + var s = signature$1.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature$1.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature$1, Q, enc) { + signature$1 = new signature(signature$1, enc); + if (signature$1.recoveryParam !== null) + return signature$1.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature$1, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; + +var elliptic_1 = createCommonjsModule(function (module, exports) { +'use strict'; + +var elliptic = exports; + +elliptic.version = /*RicMoo:ethers*/{ version: "6.5.4" }.version; +elliptic.utils = utils_1$1; +elliptic.rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); }); +elliptic.curve = curve_1; +elliptic.curves = curves_1; + +// Protocols +elliptic.ec = ec; +elliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null); +}); + +var EC$1 = elliptic_1.ec; + +export { EC$1 as EC }; +//# sourceMappingURL=elliptic.js.map diff --git a/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js.map b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js.map new file mode 100644 index 0000000..33404c3 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elliptic.js","sources":["../../../node_modules/minimalistic-assert/index.js","../../../node_modules/minimalistic-crypto-utils/lib/utils.js","../../../node_modules/elliptic/lib/elliptic/utils.js","../../../node_modules/elliptic/lib/elliptic/curve/base.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/elliptic/lib/elliptic/curve/short.js","../../../node_modules/elliptic/lib/elliptic/curve/index.js","../../../node_modules/elliptic/lib/elliptic/curves.js","../../../node_modules/hmac-drbg/lib/hmac-drbg.js","../../../node_modules/elliptic/lib/elliptic/ec/key.js","../../../node_modules/elliptic/lib/elliptic/ec/signature.js","../../../node_modules/elliptic/lib/elliptic/ec/index.js","../../../node_modules/elliptic/lib/elliptic.js","elliptic.js"],"sourcesContent":["module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","import _ec from \"elliptic\";\nvar EC = _ec.ec;\nexport { EC };\n//# sourceMappingURL=elliptic.js.map"],"names":["minAssert","minUtils","utils","assert","Base","inherits","require$$0","require$$1","curve","curves","KeyPair","HmacDRBG","Signature","signature","require$$2","require$$3","EC","_ec"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAc,GAAG,MAAM,CAAC;AACxB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;AAC1B,EAAE,IAAI,CAAC,GAAG;AACV,IAAI,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,kBAAkB,CAAC,CAAC;AAC/C,CAAC;AACD;AACA,MAAM,CAAC,KAAK,GAAG,SAAS,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE;AAC/C,EAAE,IAAI,CAAC,IAAI,CAAC;AACZ,IAAI,MAAM,IAAI,KA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CAAC,EAAE;AAChB,MAAM,SAAS;AACf,KAAK;AACL;AACA,IAAI,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AACpB,MAAM,OAAO,CAAC,CAAC;AACf,GAAG;AACH,EAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;AAC1D,CAAC;;;AClPD,YAAY,CAAC;AACb;AACA,IAAI,QAAQ,GAAG,OAAO,CAAC;AACvB;AACA,QAAQ,CAAC,OAAO,wCAA6B,CAAC,OAAO,CAAC;AACtD,QAAQ,CAAC,KAAK,GAAGP,SAA2B,CAAC;AAC7C,QAAQ,CAAC,IAAI,qFAAqB,CAAC;AACnC,QAAQ,CAAC,KAAK,GAAGC,OAA2B,CAAC;AAC7C,QAAQ,CAAC,MAAM,GAAGO,QAA4B,CAAC;AAC/C;AACA;AACA,QAAQ,CAAC,EAAE,GAAGC,EAAwB,CAAC;AACvC,QAAQ,CAAC,KAAK,oDAA8B;;;ACXzC,IAACC,IAAE,GAAGC,UAAG,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts b/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts new file mode 100644 index 0000000..23fb6b9 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts @@ -0,0 +1,16 @@ +import { BytesLike, Signature, SignatureLike } from "@ethersproject/bytes"; +export declare class SigningKey { + readonly curve: string; + readonly privateKey: string; + readonly publicKey: string; + readonly compressedPublicKey: string; + readonly _isSigningKey: boolean; + constructor(privateKey: BytesLike); + _addPoint(other: BytesLike): string; + signDigest(digest: BytesLike): Signature; + computeSharedSecret(otherKey: BytesLike): string; + static isSigningKey(value: any): value is SigningKey; +} +export declare function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string; +export declare function computePublicKey(key: BytesLike, compressed?: boolean): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts.map b/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts.map new file mode 100644 index 0000000..56ff59a --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAuB,SAAS,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAe1H,qBAAa,UAAU;IAEnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAIrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;gBAEpB,UAAU,EAAE,SAAS;IAajC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAMnC,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS;IAcxC,mBAAmB,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM;IAMhD,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,UAAU;CAGvD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAIpF;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAoB7E"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/index.js b/node_modules/@ethersproject/signing-key/lib.esm/index.js new file mode 100644 index 0000000..32c8a3d --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/index.js @@ -0,0 +1,79 @@ +"use strict"; +import { EC } from "./elliptic"; +import { arrayify, hexlify, hexZeroPad, splitSignature } from "@ethersproject/bytes"; +import { defineReadOnly } from "@ethersproject/properties"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +let _curve = null; +function getCurve() { + if (!_curve) { + _curve = new EC("secp256k1"); + } + return _curve; +} +export class SigningKey { + constructor(privateKey) { + defineReadOnly(this, "curve", "secp256k1"); + defineReadOnly(this, "privateKey", hexlify(privateKey)); + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + defineReadOnly(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); + defineReadOnly(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); + defineReadOnly(this, "_isSigningKey", true); + } + _addPoint(other) { + const p0 = getCurve().keyFromPublic(arrayify(this.publicKey)); + const p1 = getCurve().keyFromPublic(arrayify(other)); + return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); + } + signDigest(digest) { + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + const digestBytes = arrayify(digest); + if (digestBytes.length !== 32) { + logger.throwArgumentError("bad digest length", "digest", digest); + } + const signature = keyPair.sign(digestBytes, { canonical: true }); + return splitSignature({ + recoveryParam: signature.recoveryParam, + r: hexZeroPad("0x" + signature.r.toString(16), 32), + s: hexZeroPad("0x" + signature.s.toString(16), 32), + }); + } + computeSharedSecret(otherKey) { + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey))); + return hexZeroPad("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); + } + static isSigningKey(value) { + return !!(value && value._isSigningKey); + } +} +export function recoverPublicKey(digest, signature) { + const sig = splitSignature(signature); + const rs = { r: arrayify(sig.r), s: arrayify(sig.s) }; + return "0x" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode("hex", false); +} +export function computePublicKey(key, compressed) { + const bytes = arrayify(key); + if (bytes.length === 32) { + const signingKey = new SigningKey(bytes); + if (compressed) { + return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); + } + return signingKey.publicKey; + } + else if (bytes.length === 33) { + if (compressed) { + return hexlify(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); + } + else if (bytes.length === 65) { + if (!compressed) { + return hexlify(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); + } + return logger.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib.esm/index.js.map b/node_modules/@ethersproject/signing-key/lib.esm/index.js.map new file mode 100644 index 0000000..e715813 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAa,OAAO,EAAE,UAAU,EAA4B,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC1H,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,IAAI,MAAM,GAAO,IAAI,CAAA;AACrB,SAAS,QAAQ;IACb,IAAI,CAAC,MAAM,EAAE;QACT,MAAM,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;KAChC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,OAAO,UAAU;IAYnB,YAAY,UAAqB;QAC7B,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAE3C,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QA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MAAM,UAAU,gBAAgB,CAAC,GAAc,EAAE,UAAoB;IACjE,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAE5B,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,EAAE;QACrB,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,UAAU,EAAE;YACZ,OAAO,IAAI,GAAG,QAAQ,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SACzE;QACD,OAAO,UAAU,CAAC,SAAS,CAAC;KAE/B;SAAM,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,EAAE;QAC5B,IAAI,UAAU,EAAE;YAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;SAAE;QAC1C,OAAO,IAAI,GAAG,QAAQ,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAEzE;SAAM,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,EAAE;QAC5B,IAAI,CAAC,UAAU,EAAE;YAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;SAAE;QAC3C,OAAO,IAAI,GAAG,QAAQ,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACxE;IAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/_version.d.ts b/node_modules/@ethersproject/signing-key/lib/_version.d.ts new file mode 100644 index 0000000..babe06b --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "signing-key/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/_version.d.ts.map b/node_modules/@ethersproject/signing-key/lib/_version.d.ts.map new file mode 100644 index 0000000..cfa4fb8 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/_version.js b/node_modules/@ethersproject/signing-key/lib/_version.js new file mode 100644 index 0000000..8aa28f3 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "signing-key/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/_version.js.map b/node_modules/@ethersproject/signing-key/lib/_version.js.map new file mode 100644 index 0000000..527926e --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts new file mode 100644 index 0000000..a826152 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts @@ -0,0 +1 @@ +//# sourceMappingURL=browser-elliptic.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts.map b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts.map new file mode 100644 index 0000000..530906b --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-elliptic.d.ts","sourceRoot":"","sources":["../src.ts/browser-elliptic.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js new file mode 100644 index 0000000..6e42974 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js @@ -0,0 +1,2 @@ +// Empty File for build process +//# sourceMappingURL=browser-elliptic.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js.map b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js.map new file mode 100644 index 0000000..2ecdb51 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-elliptic.js","sourceRoot":"","sources":["../src.ts/browser-elliptic.ts"],"names":[],"mappings":"AACA,+BAA+B"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts b/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts new file mode 100644 index 0000000..2eb5bf0 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts @@ -0,0 +1,4 @@ +import _ec from "elliptic"; +import EC = _ec.ec; +export { EC }; +//# sourceMappingURL=elliptic.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts.map b/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts.map new file mode 100644 index 0000000..2cc1ae6 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elliptic.d.ts","sourceRoot":"","sources":["../src.ts/elliptic.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;AAEnB,OAAO,EAAE,EAAE,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/elliptic.js b/node_modules/@ethersproject/signing-key/lib/elliptic.js new file mode 100644 index 0000000..1ed1eb5 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/elliptic.js @@ -0,0 +1,10 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EC = void 0; +var elliptic_1 = __importDefault(require("elliptic")); +var EC = elliptic_1.default.ec; +exports.EC = EC; +//# sourceMappingURL=elliptic.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/elliptic.js.map b/node_modules/@ethersproject/signing-key/lib/elliptic.js.map new file mode 100644 index 0000000..55d65e2 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/elliptic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elliptic.js","sourceRoot":"","sources":["../src.ts/elliptic.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA2B;AAC3B,IAAO,EAAE,GAAG,kBAAG,CAAC,EAAE,CAAC;AAEV,gBAAE"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/index.d.ts b/node_modules/@ethersproject/signing-key/lib/index.d.ts new file mode 100644 index 0000000..23fb6b9 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/index.d.ts @@ -0,0 +1,16 @@ +import { BytesLike, Signature, SignatureLike } from "@ethersproject/bytes"; +export declare class SigningKey { + readonly curve: string; + readonly privateKey: string; + readonly publicKey: string; + readonly compressedPublicKey: string; + readonly _isSigningKey: boolean; + constructor(privateKey: BytesLike); + _addPoint(other: BytesLike): string; + signDigest(digest: BytesLike): Signature; + computeSharedSecret(otherKey: BytesLike): string; + static isSigningKey(value: any): value is SigningKey; +} +export declare function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string; +export declare function computePublicKey(key: BytesLike, compressed?: boolean): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/index.d.ts.map b/node_modules/@ethersproject/signing-key/lib/index.d.ts.map new file mode 100644 index 0000000..56ff59a --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAuB,SAAS,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAe1H,qBAAa,UAAU;IAEnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAIrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;gBAEpB,UAAU,EAAE,SAAS;IAajC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAMnC,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS;IAcxC,mBAAmB,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM;IAMhD,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,UAAU;CAGvD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAIpF;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAoB7E"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/index.js b/node_modules/@ethersproject/signing-key/lib/index.js new file mode 100644 index 0000000..e35f078 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/index.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.computePublicKey = exports.recoverPublicKey = exports.SigningKey = void 0; +var elliptic_1 = require("./elliptic"); +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var _curve = null; +function getCurve() { + if (!_curve) { + _curve = new elliptic_1.EC("secp256k1"); + } + return _curve; +} +var SigningKey = /** @class */ (function () { + function SigningKey(privateKey) { + (0, properties_1.defineReadOnly)(this, "curve", "secp256k1"); + (0, properties_1.defineReadOnly)(this, "privateKey", (0, bytes_1.hexlify)(privateKey)); + var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); + (0, properties_1.defineReadOnly)(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); + (0, properties_1.defineReadOnly)(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); + (0, properties_1.defineReadOnly)(this, "_isSigningKey", true); + } + SigningKey.prototype._addPoint = function (other) { + var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey)); + var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other)); + return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); + }; + SigningKey.prototype.signDigest = function (digest) { + var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); + var digestBytes = (0, bytes_1.arrayify)(digest); + if (digestBytes.length !== 32) { + logger.throwArgumentError("bad digest length", "digest", digest); + } + var signature = keyPair.sign(digestBytes, { canonical: true }); + return (0, bytes_1.splitSignature)({ + recoveryParam: signature.recoveryParam, + r: (0, bytes_1.hexZeroPad)("0x" + signature.r.toString(16), 32), + s: (0, bytes_1.hexZeroPad)("0x" + signature.s.toString(16), 32), + }); + }; + SigningKey.prototype.computeSharedSecret = function (otherKey) { + var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); + var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey))); + return (0, bytes_1.hexZeroPad)("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); + }; + SigningKey.isSigningKey = function (value) { + return !!(value && value._isSigningKey); + }; + return SigningKey; +}()); +exports.SigningKey = SigningKey; +function recoverPublicKey(digest, signature) { + var sig = (0, bytes_1.splitSignature)(signature); + var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) }; + return "0x" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest), rs, sig.recoveryParam).encode("hex", false); +} +exports.recoverPublicKey = recoverPublicKey; +function computePublicKey(key, compressed) { + var bytes = (0, bytes_1.arrayify)(key); + if (bytes.length === 32) { + var signingKey = new SigningKey(bytes); + if (compressed) { + return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); + } + return signingKey.publicKey; + } + else if (bytes.length === 33) { + if (compressed) { + return (0, bytes_1.hexlify)(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); + } + else if (bytes.length === 65) { + if (!compressed) { + return (0, bytes_1.hexlify)(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); + } + return logger.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); +} +exports.computePublicKey = computePublicKey; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/lib/index.js.map b/node_modules/@ethersproject/signing-key/lib/index.js.map new file mode 100644 index 0000000..d21f8ed --- /dev/null +++ b/node_modules/@ethersproject/signing-key/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,uCAAgC;AAEhC,8CAA0H;AAC1H,wDAA2D;AAE3D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,IAAI,MAAM,GAAO,IAAI,CAAA;AACrB,SAAS,QAAQ;IACb,IAAI,CAAC,MAAM,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AAE,OAAO,IAAA,eAAO,EAAC,KAAK,CAAC,CAAC;SAAE;QAC3C,OAAO,IAAI,GAAG,QAAQ,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACxE;IAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;AAC3F,CAAC;AApBD,4CAoBC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/signing-key/package.json b/node_modules/@ethersproject/signing-key/package.json new file mode 100644 index 0000000..c6835ce --- /dev/null +++ b/node_modules/@ethersproject/signing-key/package.json @@ -0,0 +1,50 @@ +{ + "_ethers.alias": { + "elliptic.js": "browser-elliptic.js" + }, + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + }, + "description": "Elliptic curve library functions for the secp256k1 curve.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/signing-key", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/signing-key", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x9e61d2950f60b2f90be25d609141fb557629e5fa95b69cfa90aed534c467c561", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/signing-key/src.ts/_version.ts b/node_modules/@ethersproject/signing-key/src.ts/_version.ts new file mode 100644 index 0000000..540f30d --- /dev/null +++ b/node_modules/@ethersproject/signing-key/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "signing-key/5.5.0"; diff --git a/node_modules/@ethersproject/signing-key/src.ts/browser-elliptic.ts b/node_modules/@ethersproject/signing-key/src.ts/browser-elliptic.ts new file mode 100644 index 0000000..76291ac --- /dev/null +++ b/node_modules/@ethersproject/signing-key/src.ts/browser-elliptic.ts @@ -0,0 +1,2 @@ + +// Empty File for build process diff --git a/node_modules/@ethersproject/signing-key/src.ts/elliptic.ts b/node_modules/@ethersproject/signing-key/src.ts/elliptic.ts new file mode 100644 index 0000000..2c08ede --- /dev/null +++ b/node_modules/@ethersproject/signing-key/src.ts/elliptic.ts @@ -0,0 +1,4 @@ +import _ec from "elliptic"; +import EC = _ec.ec; + +export { EC } diff --git a/node_modules/@ethersproject/signing-key/src.ts/index.ts b/node_modules/@ethersproject/signing-key/src.ts/index.ts new file mode 100644 index 0000000..7c4cca8 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/src.ts/index.ts @@ -0,0 +1,103 @@ +"use strict"; + +import { EC } from "./elliptic"; + +import { arrayify, BytesLike, hexlify, hexZeroPad, Signature, SignatureLike, splitSignature } from "@ethersproject/bytes"; +import { defineReadOnly } from "@ethersproject/properties"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +let _curve: EC = null +function getCurve() { + if (!_curve) { + _curve = new EC("secp256k1"); + } + return _curve; +} + +export class SigningKey { + + readonly curve: string; + + readonly privateKey: string; + readonly publicKey: string; + readonly compressedPublicKey: string; + + //readonly address: string; + + readonly _isSigningKey: boolean; + + constructor(privateKey: BytesLike) { + defineReadOnly(this, "curve", "secp256k1"); + + defineReadOnly(this, "privateKey", hexlify(privateKey)); + + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + + defineReadOnly(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); + defineReadOnly(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); + + defineReadOnly(this, "_isSigningKey", true); + } + + _addPoint(other: BytesLike): string { + const p0 = getCurve().keyFromPublic(arrayify(this.publicKey)); + const p1 = getCurve().keyFromPublic(arrayify(other)); + return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); + } + + signDigest(digest: BytesLike): Signature { + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + const digestBytes = arrayify(digest); + if (digestBytes.length !== 32) { + logger.throwArgumentError("bad digest length", "digest", digest); + } + const signature = keyPair.sign(digestBytes, { canonical: true }); + return splitSignature({ + recoveryParam: signature.recoveryParam, + r: hexZeroPad("0x" + signature.r.toString(16), 32), + s: hexZeroPad("0x" + signature.s.toString(16), 32), + }) + } + + computeSharedSecret(otherKey: BytesLike): string { + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey))); + return hexZeroPad("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); + } + + static isSigningKey(value: any): value is SigningKey { + return !!(value && value._isSigningKey); + } +} + +export function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string { + const sig = splitSignature(signature); + const rs = { r: arrayify(sig.r), s: arrayify(sig.s) }; + return "0x" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode("hex", false); +} + +export function computePublicKey(key: BytesLike, compressed?: boolean): string { + const bytes = arrayify(key); + + if (bytes.length === 32) { + const signingKey = new SigningKey(bytes); + if (compressed) { + return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); + } + return signingKey.publicKey; + + } else if (bytes.length === 33) { + if (compressed) { return hexlify(bytes); } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); + + } else if (bytes.length === 65) { + if (!compressed) { return hexlify(bytes); } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); + } + + return logger.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); +} + diff --git a/node_modules/@ethersproject/signing-key/thirdparty.d.ts b/node_modules/@ethersproject/signing-key/thirdparty.d.ts new file mode 100644 index 0000000..b7c9f70 --- /dev/null +++ b/node_modules/@ethersproject/signing-key/thirdparty.d.ts @@ -0,0 +1,70 @@ +declare module "bn.js" { + export class BN { + constructor(value: string | number, radix?: number); + + add(other: BN): BN; + sub(other: BN): BN; + div(other: BN): BN; + mod(other: BN): BN; + mul(other: BN): BN; + + pow(other: BN): BN; + maskn(other: number): BN; + + eq(other: BN): boolean; + lt(other: BN): boolean; + lte(other: BN): boolean; + gt(other: BN): boolean; + gte(other: BN): boolean; + + isZero(): boolean; + + toTwos(other: number): BN; + fromTwos(other: number): BN; + + toString(radix: number): string; + toNumber(): number; + toArray(endian: string, width: number): Uint8Array; + encode(encoding: string, compact: boolean): Uint8Array; + } +} + +declare module "elliptic" { + import { BN } from "bn.js"; + export type BasicSignature = { + r: Uint8Array; + s: Uint8Array; + }; + + export type Signature = { + r: BN, + s: BN, + recoveryParam: number + } + + interface Point { + add(point: Point): Point; + encodeCompressed(enc: string): string + } + + interface KeyPair { + sign(message: Uint8Array, options: { canonical?: boolean }): Signature; + getPublic(compressed: boolean, encoding?: string): string; + getPublic(): BN; + getPrivate(encoding?: string): string; + encode(encoding: string, compressed: boolean): string; + derive(publicKey: BN): BN; + pub: Point; + priv: BN; + } + + export class ec { + constructor(curveName: string); + + n: BN; + + keyFromPublic(publicKey: Uint8Array): KeyPair; + keyFromPrivate(privateKey: Uint8Array): KeyPair; + recoverPubKey(data: Uint8Array, signature: BasicSignature, recoveryParam: number): KeyPair; + } +} diff --git a/node_modules/@ethersproject/solidity/LICENSE.md b/node_modules/@ethersproject/solidity/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/solidity/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/solidity/README.md b/node_modules/@ethersproject/solidity/README.md new file mode 100644 index 0000000..a15f1ec --- /dev/null +++ b/node_modules/@ethersproject/solidity/README.md @@ -0,0 +1,31 @@ +Solidity Packed-Encoding Utilities +================================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains functions to perform Solidity-specific packed (i.e. non-standard) +encoding operations. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/#utils--solidity-hashing). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + pack, + keccak256, + sha256 + +} = require("@ethersproject/solidity"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/solidity/lib.esm/_version.d.ts b/node_modules/@ethersproject/solidity/lib.esm/_version.d.ts new file mode 100644 index 0000000..674e9ff --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "solidity/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/solidity/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7ec6ea1 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/_version.js b/node_modules/@ethersproject/solidity/lib.esm/_version.js new file mode 100644 index 0000000..319ca1a --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "solidity/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/_version.js.map b/node_modules/@ethersproject/solidity/lib.esm/_version.js.map new file mode 100644 index 0000000..5e52401 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/index.d.ts b/node_modules/@ethersproject/solidity/lib.esm/index.d.ts new file mode 100644 index 0000000..8a222be --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/index.d.ts @@ -0,0 +1,4 @@ +export declare function pack(types: ReadonlyArray, values: ReadonlyArray): string; +export declare function keccak256(types: ReadonlyArray, values: ReadonlyArray): string; +export declare function sha256(types: ReadonlyArray, values: ReadonlyArray): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/index.d.ts.map b/node_modules/@ethersproject/solidity/lib.esm/index.d.ts.map new file mode 100644 index 0000000..05cedf3 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAmFA,wBAAgB,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,UAS5E;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,UAEjF;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,UAE9E"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/index.js b/node_modules/@ethersproject/solidity/lib.esm/index.js new file mode 100644 index 0000000..0de1231 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/index.js @@ -0,0 +1,91 @@ +"use strict"; +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, concat, hexlify, zeroPad } from "@ethersproject/bytes"; +import { keccak256 as hashKeccak256 } from "@ethersproject/keccak256"; +import { sha256 as hashSha256 } from "@ethersproject/sha2"; +import { toUtf8Bytes } from "@ethersproject/strings"; +const regexBytes = new RegExp("^bytes([0-9]+)$"); +const regexNumber = new RegExp("^(u?int)([0-9]*)$"); +const regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$"); +const Zeros = "0000000000000000000000000000000000000000000000000000000000000000"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +function _pack(type, value, isArray) { + switch (type) { + case "address": + if (isArray) { + return zeroPad(value, 32); + } + return arrayify(value); + case "string": + return toUtf8Bytes(value); + case "bytes": + return arrayify(value); + case "bool": + value = (value ? "0x01" : "0x00"); + if (isArray) { + return zeroPad(value, 32); + } + return arrayify(value); + } + let match = type.match(regexNumber); + if (match) { + //let signed = (match[1] === "int") + let size = parseInt(match[2] || "256"); + if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) { + logger.throwArgumentError("invalid number type", "type", type); + } + if (isArray) { + size = 256; + } + value = BigNumber.from(value).toTwos(size); + return zeroPad(value, size / 8); + } + match = type.match(regexBytes); + if (match) { + const size = parseInt(match[1]); + if (String(size) !== match[1] || size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes type", "type", type); + } + if (arrayify(value).byteLength !== size) { + logger.throwArgumentError(`invalid value for ${type}`, "value", value); + } + if (isArray) { + return arrayify((value + Zeros).substring(0, 66)); + } + return value; + } + match = type.match(regexArray); + if (match && Array.isArray(value)) { + const baseType = match[1]; + const count = parseInt(match[2] || String(value.length)); + if (count != value.length) { + logger.throwArgumentError(`invalid array length for ${type}`, "value", value); + } + const result = []; + value.forEach(function (value) { + result.push(_pack(baseType, value, true)); + }); + return concat(result); + } + return logger.throwArgumentError("invalid type", "type", type); +} +// @TODO: Array Enum +export function pack(types, values) { + if (types.length != values.length) { + logger.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values); + } + const tight = []; + types.forEach(function (type, index) { + tight.push(_pack(type, values[index])); + }); + return hexlify(concat(tight)); +} +export function keccak256(types, values) { + return hashKeccak256(pack(types, values)); +} +export function sha256(types, values) { + return hashSha256(pack(types, values)); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib.esm/index.js.map b/node_modules/@ethersproject/solidity/lib.esm/index.js.map new file mode 100644 index 0000000..b2d6374 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC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M,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAA4B,EAAE,MAA0B;IAC9E,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAA4B,EAAE,MAA0B;IAC3E,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/_version.d.ts b/node_modules/@ethersproject/solidity/lib/_version.d.ts new file mode 100644 index 0000000..674e9ff --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "solidity/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/_version.d.ts.map b/node_modules/@ethersproject/solidity/lib/_version.d.ts.map new file mode 100644 index 0000000..7ec6ea1 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/_version.js b/node_modules/@ethersproject/solidity/lib/_version.js new file mode 100644 index 0000000..41714a5 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "solidity/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/_version.js.map b/node_modules/@ethersproject/solidity/lib/_version.js.map new file mode 100644 index 0000000..fca74f2 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/index.d.ts b/node_modules/@ethersproject/solidity/lib/index.d.ts new file mode 100644 index 0000000..8a222be --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/index.d.ts @@ -0,0 +1,4 @@ +export declare function pack(types: ReadonlyArray, values: ReadonlyArray): string; +export declare function keccak256(types: ReadonlyArray, values: ReadonlyArray): string; +export declare function sha256(types: ReadonlyArray, values: ReadonlyArray): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/index.d.ts.map b/node_modules/@ethersproject/solidity/lib/index.d.ts.map new file mode 100644 index 0000000..05cedf3 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAmFA,wBAAgB,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,UAS5E;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,UAEjF;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,UAE9E"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/index.js b/node_modules/@ethersproject/solidity/lib/index.js new file mode 100644 index 0000000..fb0571d --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/index.js @@ -0,0 +1,96 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sha256 = exports.keccak256 = exports.pack = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var keccak256_1 = require("@ethersproject/keccak256"); +var sha2_1 = require("@ethersproject/sha2"); +var strings_1 = require("@ethersproject/strings"); +var regexBytes = new RegExp("^bytes([0-9]+)$"); +var regexNumber = new RegExp("^(u?int)([0-9]*)$"); +var regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$"); +var Zeros = "0000000000000000000000000000000000000000000000000000000000000000"; +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function _pack(type, value, isArray) { + switch (type) { + case "address": + if (isArray) { + return (0, bytes_1.zeroPad)(value, 32); + } + return (0, bytes_1.arrayify)(value); + case "string": + return (0, strings_1.toUtf8Bytes)(value); + case "bytes": + return (0, bytes_1.arrayify)(value); + case "bool": + value = (value ? "0x01" : "0x00"); + if (isArray) { + return (0, bytes_1.zeroPad)(value, 32); + } + return (0, bytes_1.arrayify)(value); + } + var match = type.match(regexNumber); + if (match) { + //let signed = (match[1] === "int") + var size = parseInt(match[2] || "256"); + if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) { + logger.throwArgumentError("invalid number type", "type", type); + } + if (isArray) { + size = 256; + } + value = bignumber_1.BigNumber.from(value).toTwos(size); + return (0, bytes_1.zeroPad)(value, size / 8); + } + match = type.match(regexBytes); + if (match) { + var size = parseInt(match[1]); + if (String(size) !== match[1] || size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes type", "type", type); + } + if ((0, bytes_1.arrayify)(value).byteLength !== size) { + logger.throwArgumentError("invalid value for " + type, "value", value); + } + if (isArray) { + return (0, bytes_1.arrayify)((value + Zeros).substring(0, 66)); + } + return value; + } + match = type.match(regexArray); + if (match && Array.isArray(value)) { + var baseType_1 = match[1]; + var count = parseInt(match[2] || String(value.length)); + if (count != value.length) { + logger.throwArgumentError("invalid array length for " + type, "value", value); + } + var result_1 = []; + value.forEach(function (value) { + result_1.push(_pack(baseType_1, value, true)); + }); + return (0, bytes_1.concat)(result_1); + } + return logger.throwArgumentError("invalid type", "type", type); +} +// @TODO: Array Enum +function pack(types, values) { + if (types.length != values.length) { + logger.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values); + } + var tight = []; + types.forEach(function (type, index) { + tight.push(_pack(type, values[index])); + }); + return (0, bytes_1.hexlify)((0, bytes_1.concat)(tight)); +} +exports.pack = pack; +function keccak256(types, values) { + return (0, keccak256_1.keccak256)(pack(types, values)); +} +exports.keccak256 = keccak256; +function sha256(types, values) { + return (0, sha2_1.sha256)(pack(types, values)); +} +exports.sha256 = sha256; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/lib/index.js.map b/node_modules/@ethersproject/solidity/lib/index.js.map new file mode 100644 index 0000000..147a547 --- /dev/null +++ b/node_modules/@ethersproject/solidity/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,sDAAqD;AACrD,8CAA0E;AAC1E,sDAAsE;AACtE,4CAA2D;AAC3D,kDAAqD;AAErD,IAAM,UAAU,GAAG,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACjD,IAAM,WAAW,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACpD,IAAM,UAAU,GAAG,IAAI,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAEtD,IAAM,KAAK,GAAG,kEAAkE,CAAC;AAEjF,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAGnC,SAAS,KAAK,CAAC,IAAY,EAAE,KAAU,EAAE,OAAiB;IACtD,QAAO,IAAI,EAAE;QACT,KAAK,SAA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AAK;YACxB,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,cAAM,EAAC,QAAM,CAAC,CAAC;KACzB;IAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;AAClE,CAAC;AAED,oBAAoB;AAEpB,SAAgB,IAAI,CAAC,KAA4B,EAAE,MAA0B;IACzE,IAAI,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;QAC/B,MAAM,CAAC,kBAAkB,CAAC,oDAAoD,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;KACpG;IACD,IAAM,KAAK,GAAsB,EAAE,CAAC;IACpC,KAAK,CAAC,OAAO,CAAC,UAAS,IAAI,EAAE,KAAK;QAC9B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,OAAO,IAAA,eAAO,EAAC,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;AAClC,CAAC;AATD,oBASC;AAED,SAAgB,SAAS,CAAC,KAA4B,EAAE,MAA0B;IAC9E,OAAO,IAAA,qBAAa,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9C,CAAC;AAFD,8BAEC;AAED,SAAgB,MAAM,CAAC,KAA4B,EAAE,MAA0B;IAC3E,OAAO,IAAA,aAAU,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3C,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/solidity/package.json b/node_modules/@ethersproject/solidity/package.json new file mode 100644 index 0000000..49d8cd5 --- /dev/null +++ b/node_modules/@ethersproject/solidity/package.json @@ -0,0 +1,47 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/sha2": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + }, + "description": "Solidity coder for non-standard (tight) packing.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/solidity", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/solidity", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x72e3ad8bb65e4252fc2e9fa7061433c76e106b6bc33d5b67fdcce15dbc491df8", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/solidity/src.ts/_version.ts b/node_modules/@ethersproject/solidity/src.ts/_version.ts new file mode 100644 index 0000000..f5b946c --- /dev/null +++ b/node_modules/@ethersproject/solidity/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "solidity/5.5.0"; diff --git a/node_modules/@ethersproject/solidity/src.ts/index.ts b/node_modules/@ethersproject/solidity/src.ts/index.ts new file mode 100644 index 0000000..2ad661e --- /dev/null +++ b/node_modules/@ethersproject/solidity/src.ts/index.ts @@ -0,0 +1,101 @@ +"use strict"; + +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, concat, hexlify, zeroPad } from "@ethersproject/bytes"; +import { keccak256 as hashKeccak256 } from "@ethersproject/keccak256"; +import { sha256 as hashSha256 } from "@ethersproject/sha2"; +import { toUtf8Bytes } from "@ethersproject/strings"; + +const regexBytes = new RegExp("^bytes([0-9]+)$"); +const regexNumber = new RegExp("^(u?int)([0-9]*)$"); +const regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$"); + +const Zeros = "0000000000000000000000000000000000000000000000000000000000000000"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + + +function _pack(type: string, value: any, isArray?: boolean): Uint8Array { + switch(type) { + case "address": + if (isArray) { return zeroPad(value, 32); } + return arrayify(value); + case "string": + return toUtf8Bytes(value); + case "bytes": + return arrayify(value); + case "bool": + value = (value ? "0x01": "0x00"); + if (isArray) { return zeroPad(value, 32); } + return arrayify(value); + } + + let match = type.match(regexNumber); + if (match) { + //let signed = (match[1] === "int") + let size = parseInt(match[2] || "256") + + if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) { + logger.throwArgumentError("invalid number type", "type", type) + } + + if (isArray) { size = 256; } + + value = BigNumber.from(value).toTwos(size); + + return zeroPad(value, size / 8); + } + + match = type.match(regexBytes); + if (match) { + const size = parseInt(match[1]); + + if (String(size) !== match[1] || size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes type", "type", type) + } + if (arrayify(value).byteLength !== size) { + logger.throwArgumentError(`invalid value for ${ type }`, "value", value) + } + if (isArray) { return arrayify((value + Zeros).substring(0, 66)); } + return value; + } + + match = type.match(regexArray); + if (match && Array.isArray(value)) { + const baseType = match[1]; + const count = parseInt(match[2] || String(value.length)); + if (count != value.length) { + logger.throwArgumentError(`invalid array length for ${ type }`, "value", value) + } + const result: Array = []; + value.forEach(function(value) { + result.push(_pack(baseType, value, true)); + }); + return concat(result); + } + + return logger.throwArgumentError("invalid type", "type", type) +} + +// @TODO: Array Enum + +export function pack(types: ReadonlyArray, values: ReadonlyArray) { + if (types.length != values.length) { + logger.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values) + } + const tight: Array = []; + types.forEach(function(type, index) { + tight.push(_pack(type, values[index])); + }); + return hexlify(concat(tight)); +} + +export function keccak256(types: ReadonlyArray, values: ReadonlyArray) { + return hashKeccak256(pack(types, values)); +} + +export function sha256(types: ReadonlyArray, values: ReadonlyArray) { + return hashSha256(pack(types, values)); +} diff --git a/node_modules/@ethersproject/strings/LICENSE.md b/node_modules/@ethersproject/strings/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/strings/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/strings/README.md b/node_modules/@ethersproject/strings/README.md new file mode 100644 index 0000000..f00aaa4 --- /dev/null +++ b/node_modules/@ethersproject/strings/README.md @@ -0,0 +1,47 @@ +String Manipulation Utilities +============================= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains functions to safely convert between UTF-8 data, strings and Bytes32 strings +(i.e. "short strings"). + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/strings/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + toUtf8Bytes, + toUtf8CodePoints, + toUtf8String, + + formatBytes32String, + parseBytes32String, + + nameprep + + // Enums + + Utf8ErrorFuncs, + Utf8ErrorReason, + + UnicodeNormalizationForm + + // Types + + Utf8ErrorFunc, + +} = require("@ethersproject/strings"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/strings/lib.esm/_version.d.ts b/node_modules/@ethersproject/strings/lib.esm/_version.d.ts new file mode 100644 index 0000000..c1269a7 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "strings/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/strings/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/_version.js b/node_modules/@ethersproject/strings/lib.esm/_version.js new file mode 100644 index 0000000..51ae5f6 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "strings/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/_version.js.map b/node_modules/@ethersproject/strings/lib.esm/_version.js.map new file mode 100644 index 0000000..2d391d7 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts b/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts new file mode 100644 index 0000000..52cb7d6 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function formatBytes32String(text: string): string; +export declare function parseBytes32String(bytes: BytesLike): string; +//# sourceMappingURL=bytes32.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts.map b/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts.map new file mode 100644 index 0000000..7325c33 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes32.d.ts","sourceRoot":"","sources":["../src.ts/bytes32.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AAK5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAa3D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/bytes32.js b/node_modules/@ethersproject/strings/lib.esm/bytes32.js new file mode 100644 index 0000000..65391f0 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/bytes32.js @@ -0,0 +1,32 @@ +"use strict"; +import { HashZero } from "@ethersproject/constants"; +import { arrayify, concat, hexlify } from "@ethersproject/bytes"; +import { toUtf8Bytes, toUtf8String } from "./utf8"; +export function formatBytes32String(text) { + // Get the bytes + const bytes = toUtf8Bytes(text); + // Check we have room for null-termination + if (bytes.length > 31) { + throw new Error("bytes32 string must be less than 32 bytes"); + } + // Zero-pad (implicitly null-terminates) + return hexlify(concat([bytes, HashZero]).slice(0, 32)); +} +export function parseBytes32String(bytes) { + const data = arrayify(bytes); + // Must be 32 bytes with a null-termination + if (data.length !== 32) { + throw new Error("invalid bytes32 - not 32 bytes long"); + } + if (data[31] !== 0) { + throw new Error("invalid bytes32 string - no null terminator"); + } + // Find the null termination + let length = 31; + while (data[length - 1] === 0) { + length--; + } + // Determine the string value + return toUtf8String(data.slice(0, length)); +} +//# sourceMappingURL=bytes32.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/bytes32.js.map b/node_modules/@ethersproject/strings/lib.esm/bytes32.js.map new file mode 100644 index 0000000..f4d3e6c --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/bytes32.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes32.js","sourceRoot":"","sources":["../src.ts/bytes32.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAa,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGnD,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAE5C,gBAAgB;IAChB,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAEhC,0CAA0C;IAC1C,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAAE;IAExF,wCAAwC;IACxC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAE,KAAK,EAAE,QAAQ,CAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAgB;IAC/C,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE7B,2CAA2C;IAC3C,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAAE;IACnF,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAAE;IAEvF,4BAA4B;IAC5B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,CAAC;KAAE;IAE5C,6BAA6B;IAC7B,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/C,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/idna.d.ts b/node_modules/@ethersproject/strings/lib.esm/idna.d.ts new file mode 100644 index 0000000..d3acedc --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/idna.d.ts @@ -0,0 +1,5 @@ +export declare function _nameprepTableA1(codepoint: number): boolean; +export declare function _nameprepTableB2(codepoint: number): Array; +export declare function _nameprepTableC(codepoint: number): boolean; +export declare function nameprep(value: string): string; +//# sourceMappingURL=idna.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/idna.d.ts.map b/node_modules/@ethersproject/strings/lib.esm/idna.d.ts.map new file mode 100644 index 0000000..d1c33f9 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/idna.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"idna.d.ts","sourceRoot":"","sources":["../src.ts/idna.ts"],"names":[],"mappings":"AAoIA,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAcjE;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAsD9C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/idna.js b/node_modules/@ethersproject/strings/lib.esm/idna.js new file mode 100644 index 0000000..56a28a2 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/idna.js @@ -0,0 +1,188 @@ +"use strict"; +import { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from "./utf8"; +function bytes2(data) { + if ((data.length % 4) !== 0) { + throw new Error("bad data"); + } + let result = []; + for (let i = 0; i < data.length; i += 4) { + result.push(parseInt(data.substring(i, i + 4), 16)); + } + return result; +} +function createTable(data, func) { + if (!func) { + func = function (value) { return [parseInt(value, 16)]; }; + } + let lo = 0; + let result = {}; + data.split(",").forEach((pair) => { + let comps = pair.split(":"); + lo += parseInt(comps[0], 16); + result[lo] = func(comps[1]); + }); + return result; +} +function createRangeTable(data) { + let hi = 0; + return data.split(",").map((v) => { + let comps = v.split("-"); + if (comps.length === 1) { + comps[1] = "0"; + } + else if (comps[1] === "") { + comps[1] = "1"; + } + let lo = hi + parseInt(comps[0], 16); + hi = parseInt(comps[1], 16); + return { l: lo, h: hi }; + }); +} +function matchMap(value, ranges) { + let lo = 0; + for (let i = 0; i < ranges.length; i++) { + let range = ranges[i]; + lo += range.l; + if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) { + if (range.e && range.e.indexOf(value - lo) !== -1) { + continue; + } + return range; + } + } + return null; +} +const Table_A_1_ranges = createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"); +// @TODO: Make this relative... +const Table_B_1_flags = "ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); +const Table_B_2_ranges = [ + { h: 25, s: 32, l: 65 }, + { h: 30, s: 32, e: [23], l: 127 }, + { h: 54, s: 1, e: [48], l: 64, d: 2 }, + { h: 14, s: 1, l: 57, d: 2 }, + { h: 44, s: 1, l: 17, d: 2 }, + { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 }, + { h: 16, s: 1, l: 68, d: 2 }, + { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 }, + { h: 26, s: 32, e: [17], l: 435 }, + { h: 22, s: 1, l: 71, d: 2 }, + { h: 15, s: 80, l: 40 }, + { h: 31, s: 32, l: 16 }, + { h: 32, s: 1, l: 80, d: 2 }, + { h: 52, s: 1, l: 42, d: 2 }, + { h: 12, s: 1, l: 55, d: 2 }, + { h: 40, s: 1, e: [38], l: 15, d: 2 }, + { h: 14, s: 1, l: 48, d: 2 }, + { h: 37, s: 48, l: 49 }, + { h: 148, s: 1, l: 6351, d: 2 }, + { h: 88, s: 1, l: 160, d: 2 }, + { h: 15, s: 16, l: 704 }, + { h: 25, s: 26, l: 854 }, + { h: 25, s: 32, l: 55915 }, + { h: 37, s: 40, l: 1247 }, + { h: 25, s: -119711, l: 53248 }, + { h: 25, s: -119763, l: 52 }, + { h: 25, s: -119815, l: 52 }, + { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 }, + { h: 25, s: -119919, l: 52 }, + { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 }, + { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 }, + { h: 25, s: -120075, l: 52 }, + { h: 25, s: -120127, l: 52 }, + { h: 25, s: -120179, l: 52 }, + { h: 25, s: -120231, l: 52 }, + { h: 25, s: -120283, l: 52 }, + { h: 25, s: -120335, l: 52 }, + { h: 24, s: -119543, e: [17], l: 56 }, + { h: 24, s: -119601, e: [17], l: 58 }, + { h: 24, s: -119659, e: [17], l: 58 }, + { h: 24, s: -119717, e: [17], l: 58 }, + { h: 24, s: -119775, e: [17], l: 58 } +]; +const Table_B_2_lut_abs = createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"); +const Table_B_2_lut_rel = createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"); +const Table_B_2_complex = createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D", bytes2); +const Table_C_ranges = createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001"); +function flatten(values) { + return values.reduce((accum, value) => { + value.forEach((value) => { accum.push(value); }); + return accum; + }, []); +} +export function _nameprepTableA1(codepoint) { + return !!matchMap(codepoint, Table_A_1_ranges); +} +export function _nameprepTableB2(codepoint) { + let range = matchMap(codepoint, Table_B_2_ranges); + if (range) { + return [codepoint + range.s]; + } + let codes = Table_B_2_lut_abs[codepoint]; + if (codes) { + return codes; + } + let shift = Table_B_2_lut_rel[codepoint]; + if (shift) { + return [codepoint + shift[0]]; + } + let complex = Table_B_2_complex[codepoint]; + if (complex) { + return complex; + } + return null; +} +export function _nameprepTableC(codepoint) { + return !!matchMap(codepoint, Table_C_ranges); +} +export function nameprep(value) { + // This allows platforms with incomplete normalize to bypass + // it for very basic names which the built-in toLowerCase + // will certainly handle correctly + if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { + return value.toLowerCase(); + } + // Get the code points (keeping the current normalization) + let codes = toUtf8CodePoints(value); + codes = flatten(codes.map((code) => { + // Substitute Table B.1 (Maps to Nothing) + if (Table_B_1_flags.indexOf(code) >= 0) { + return []; + } + if (code >= 0xfe00 && code <= 0xfe0f) { + return []; + } + // Substitute Table B.2 (Case Folding) + let codesTableB2 = _nameprepTableB2(code); + if (codesTableB2) { + return codesTableB2; + } + // No Substitution + return [code]; + })); + // Normalize using form KC + codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC); + // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9 + codes.forEach((code) => { + if (_nameprepTableC(code)) { + throw new Error("STRINGPREP_CONTAINS_PROHIBITED"); + } + }); + // Prohibit Unassigned Code Points (Table A.1) + codes.forEach((code) => { + if (_nameprepTableA1(code)) { + throw new Error("STRINGPREP_CONTAINS_UNASSIGNED"); + } + }); + // IDNA extras + let name = _toUtf8String(codes); + // IDNA: 4.2.3.1 + if (name.substring(0, 1) === "-" || name.substring(2, 4) === "--" || name.substring(name.length - 1) === "-") { + throw new Error("invalid hyphen"); + } + // IDNA: 4.2.4 + if (name.length > 63) { + throw new Error("too long"); + } + return name; +} +//# sourceMappingURL=idna.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/idna.js.map b/node_modules/@ethersproject/strings/lib.esm/idna.js.map new file mode 100644 index 0000000..b25d52e --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/idna.js.map @@ -0,0 +1 @@ +{"version":3,"file":"idna.js","sourceRoot":"","sources":["../src.ts/idna.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAYnF,SAAS,MAAM,CAAC,IAAY;IACxB,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;KAAE;IAC7D,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,E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IAAI,CAAC,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACrD;IACL,CAAC,CAAC,CAAC;IAEH,cAAc;IACd,IAAI,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAEhC,gBAAgB;IAChB,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QAC1G,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACrC;IAED,cAAc;IACd,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;KAAE;IAItD,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/index.d.ts b/node_modules/@ethersproject/strings/lib.esm/index.d.ts new file mode 100644 index 0000000..419be18 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/index.d.ts @@ -0,0 +1,5 @@ +import { formatBytes32String, parseBytes32String } from "./bytes32"; +import { nameprep } from "./idna"; +import { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from "./utf8"; +export { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason, UnicodeNormalizationForm, formatBytes32String, parseBytes32String, nameprep }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/index.d.ts.map b/node_modules/@ethersproject/strings/lib.esm/index.d.ts.map new file mode 100644 index 0000000..e7fd468 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,wBAAwB,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAErK,OAAO,EACH,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EAEZ,aAAa,EACb,cAAc,EACd,eAAe,EAEf,wBAAwB,EAExB,mBAAmB,EACnB,kBAAkB,EAElB,QAAQ,EACX,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/index.js b/node_modules/@ethersproject/strings/lib.esm/index.js new file mode 100644 index 0000000..f6b60f7 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/index.js @@ -0,0 +1,6 @@ +"use strict"; +import { formatBytes32String, parseBytes32String } from "./bytes32"; +import { nameprep } from "./idna"; +import { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFuncs, Utf8ErrorReason } from "./utf8"; +export { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, Utf8ErrorReason, UnicodeNormalizationForm, formatBytes32String, parseBytes32String, nameprep }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/index.js.map b/node_modules/@ethersproject/strings/lib.esm/index.js.map new file mode 100644 index 0000000..167579a --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,wBAAwB,EAAiB,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAErK,OAAO,EACH,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EAGZ,cAAc,EACd,eAAe,EAEf,wBAAwB,EAExB,mBAAmB,EACnB,kBAAkB,EAElB,QAAQ,EACX,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts b/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts new file mode 100644 index 0000000..e13133f --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts @@ -0,0 +1,27 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare enum UnicodeNormalizationForm { + current = "", + NFC = "NFC", + NFD = "NFD", + NFKC = "NFKC", + NFKD = "NFKD" +} +export declare enum Utf8ErrorReason { + UNEXPECTED_CONTINUE = "unexpected continuation byte", + BAD_PREFIX = "bad codepoint prefix", + OVERRUN = "string overrun", + MISSING_CONTINUE = "missing continuation byte", + OUT_OF_RANGE = "out of UTF-8 range", + UTF16_SURROGATE = "UTF-16 surrogate", + OVERLONG = "overlong representation" +} +export declare type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number; +export declare const Utf8ErrorFuncs: { + [name: string]: Utf8ErrorFunc; +}; +export declare function toUtf8Bytes(str: string, form?: UnicodeNormalizationForm): Uint8Array; +export declare function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string; +export declare function _toUtf8String(codePoints: Array): string; +export declare function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string; +export declare function toUtf8CodePoints(str: string, form?: UnicodeNormalizationForm): Array; +//# sourceMappingURL=utf8.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts.map b/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts.map new file mode 100644 index 0000000..a97f173 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../src.ts/utf8.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,oBAAY,wBAAwB;IAChC,OAAO,KAAM;IACb,GAAG,QAAa;IAChB,GAAG,QAAa;IAChB,IAAI,SAAa;IACjB,IAAI,SAAa;CACpB;AAED,oBAAY,eAAe;IAGvB,mBAAmB,iCAAmC;IAItD,UAAU,yBAAoC;IAI9C,OAAO,mBAAiC;IAIxC,gBAAgB,8BAAmC;IAKnD,YAAY,uBAAgC;IAK5C,eAAe,qBAA2B;IAK1C,QAAQ,4BAAyC;CACpD;AAGD,oBAAY,aAAa,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AA4CxJ,eAAO,MAAM,cAAc,EAAE;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,aAAa,CAAA;CAI5D,CAAC;AAqGH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,wBAA2D,GAAG,UAAU,CAyCtH;AAOD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAwBtF;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAW/D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAE9E;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,wBAA2D,GAAG,KAAK,CAAC,MAAM,CAAC,CAE9H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/utf8.js b/node_modules/@ethersproject/strings/lib.esm/utf8.js new file mode 100644 index 0000000..340d38d --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/utf8.js @@ -0,0 +1,248 @@ +"use strict"; +import { arrayify } from "@ethersproject/bytes"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +/////////////////////////////// +export var UnicodeNormalizationForm; +(function (UnicodeNormalizationForm) { + UnicodeNormalizationForm["current"] = ""; + UnicodeNormalizationForm["NFC"] = "NFC"; + UnicodeNormalizationForm["NFD"] = "NFD"; + UnicodeNormalizationForm["NFKC"] = "NFKC"; + UnicodeNormalizationForm["NFKD"] = "NFKD"; +})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {})); +; +export var Utf8ErrorReason; +(function (Utf8ErrorReason) { + // A continuation byte was present where there was nothing to continue + // - offset = the index the codepoint began in + Utf8ErrorReason["UNEXPECTED_CONTINUE"] = "unexpected continuation byte"; + // An invalid (non-continuation) byte to start a UTF-8 codepoint was found + // - offset = the index the codepoint began in + Utf8ErrorReason["BAD_PREFIX"] = "bad codepoint prefix"; + // The string is too short to process the expected codepoint + // - offset = the index the codepoint began in + Utf8ErrorReason["OVERRUN"] = "string overrun"; + // A missing continuation byte was expected but not found + // - offset = the index the continuation byte was expected at + Utf8ErrorReason["MISSING_CONTINUE"] = "missing continuation byte"; + // The computed code point is outside the range for UTF-8 + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; outside the UTF-8 range + Utf8ErrorReason["OUT_OF_RANGE"] = "out of UTF-8 range"; + // UTF-8 strings may not contain UTF-16 surrogate pairs + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range + Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate"; + // The string is an overlong representation + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; already bounds checked + Utf8ErrorReason["OVERLONG"] = "overlong representation"; +})(Utf8ErrorReason || (Utf8ErrorReason = {})); +; +function errorFunc(reason, offset, bytes, output, badCodepoint) { + return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes); +} +function ignoreFunc(reason, offset, bytes, output, badCodepoint) { + // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes + if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { + let i = 0; + for (let o = offset + 1; o < bytes.length; o++) { + if (bytes[o] >> 6 !== 0x02) { + break; + } + i++; + } + return i; + } + // This byte runs us past the end of the string, so just jump to the end + // (but the first byte was read already read and therefore skipped) + if (reason === Utf8ErrorReason.OVERRUN) { + return bytes.length - offset - 1; + } + // Nothing to skip + return 0; +} +function replaceFunc(reason, offset, bytes, output, badCodepoint) { + // Overlong representations are otherwise "valid" code points; just non-deistingtished + if (reason === Utf8ErrorReason.OVERLONG) { + output.push(badCodepoint); + return 0; + } + // Put the replacement character into the output + output.push(0xfffd); + // Otherwise, process as if ignoring errors + return ignoreFunc(reason, offset, bytes, output, badCodepoint); +} +// Common error handing strategies +export const Utf8ErrorFuncs = Object.freeze({ + error: errorFunc, + ignore: ignoreFunc, + replace: replaceFunc +}); +// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 +function getUtf8CodePoints(bytes, onError) { + if (onError == null) { + onError = Utf8ErrorFuncs.error; + } + bytes = arrayify(bytes); + const result = []; + let i = 0; + // Invalid bytes are ignored + while (i < bytes.length) { + const c = bytes[i++]; + // 0xxx xxxx + if (c >> 7 === 0) { + result.push(c); + continue; + } + // Multibyte; how many bytes left for this character? + let extraLength = null; + let overlongMask = null; + // 110x xxxx 10xx xxxx + if ((c & 0xe0) === 0xc0) { + extraLength = 1; + overlongMask = 0x7f; + // 1110 xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf0) === 0xe0) { + extraLength = 2; + overlongMask = 0x7ff; + // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf8) === 0xf0) { + extraLength = 3; + overlongMask = 0xffff; + } + else { + if ((c & 0xc0) === 0x80) { + i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result); + } + else { + i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result); + } + continue; + } + // Do we have enough bytes in our data? + if (i - 1 + extraLength >= bytes.length) { + i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result); + continue; + } + // Remove the length prefix from the char + let res = c & ((1 << (8 - extraLength - 1)) - 1); + for (let j = 0; j < extraLength; j++) { + let nextChar = bytes[i]; + // Invalid continuation byte + if ((nextChar & 0xc0) != 0x80) { + i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result); + res = null; + break; + } + ; + res = (res << 6) | (nextChar & 0x3f); + i++; + } + // See above loop for invalid continuation byte + if (res === null) { + continue; + } + // Maximum code point + if (res > 0x10ffff) { + i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Reserved for UTF-16 surrogate halves + if (res >= 0xd800 && res <= 0xdfff) { + i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Check for overlong sequences (more bytes than needed) + if (res <= overlongMask) { + i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res); + continue; + } + result.push(res); + } + return result; +} +// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array +export function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) { + if (form != UnicodeNormalizationForm.current) { + logger.checkNormalize(); + str = str.normalize(form); + } + let result = []; + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c < 0x80) { + result.push(c); + } + else if (c < 0x800) { + result.push((c >> 6) | 0xc0); + result.push((c & 0x3f) | 0x80); + } + else if ((c & 0xfc00) == 0xd800) { + i++; + const c2 = str.charCodeAt(i); + if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) { + throw new Error("invalid utf-8 string"); + } + // Surrogate Pair + const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + result.push((pair >> 18) | 0xf0); + result.push(((pair >> 12) & 0x3f) | 0x80); + result.push(((pair >> 6) & 0x3f) | 0x80); + result.push((pair & 0x3f) | 0x80); + } + else { + result.push((c >> 12) | 0xe0); + result.push(((c >> 6) & 0x3f) | 0x80); + result.push((c & 0x3f) | 0x80); + } + } + return arrayify(result); +} +; +function escapeChar(value) { + const hex = ("0000" + value.toString(16)); + return "\\u" + hex.substring(hex.length - 4); +} +export function _toEscapedUtf8String(bytes, onError) { + return '"' + getUtf8CodePoints(bytes, onError).map((codePoint) => { + if (codePoint < 256) { + switch (codePoint) { + case 8: return "\\b"; + case 9: return "\\t"; + case 10: return "\\n"; + case 13: return "\\r"; + case 34: return "\\\""; + case 92: return "\\\\"; + } + if (codePoint >= 32 && codePoint < 127) { + return String.fromCharCode(codePoint); + } + } + if (codePoint <= 0xffff) { + return escapeChar(codePoint); + } + codePoint -= 0x10000; + return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00); + }).join("") + '"'; +} +export function _toUtf8String(codePoints) { + return codePoints.map((codePoint) => { + if (codePoint <= 0xffff) { + return String.fromCharCode(codePoint); + } + codePoint -= 0x10000; + return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00)); + }).join(""); +} +export function toUtf8String(bytes, onError) { + return _toUtf8String(getUtf8CodePoints(bytes, onError)); +} +export function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) { + return getUtf8CodePoints(toUtf8Bytes(str, form)); +} +//# sourceMappingURL=utf8.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib.esm/utf8.js.map b/node_modules/@ethersproject/strings/lib.esm/utf8.js.map new file mode 100644 index 0000000..68e8ba1 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib.esm/utf8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../src.ts/utf8.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,+BAA+B;AAE/B,MAAM,CAAN,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,wCAAa,CAAA;IACb,uCAAgB,CAAA;IAChB,uCAAgB,CAAA;IAChB,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;AACrB,CAAC,EANW,wBAAwB,KAAxB,wBAAwB,QAMnC;AAAA,CAAC;AAEF,MAAM,CAAN,IAAY,eA+BX;AA/BD,WAAY,eAAe;IACvB,sEAAsE;IACtE,8CAA8C;IAC9C,uEAAsD,CAAA;IAEtD,0EAA0E;IAC1E,8CAA8C;IAC9C,sDAA8C,CAAA;IAE9C,4DAA4D;IAC5D,8CAA8C;IAC9C,6CAAwC,CAAA;IAExC,yDAAyD;IACzD,6DAA6D;IAC7D,iEAAmD,CAAA;IAEnD,yDAAyD;IACzD,2CAA2C;IAC3C,mEAAmE;IACnE,sDAA4C,CAAA;IAE5C,uDAAuD;IACvD,2CAA2C;IAC3C,6EAA6E;IAC7E,uDAA0C,CAAA;IAE1C,2CAA2C;IAC3C,2CAA2C;IAC3C,kEAAkE;IA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,SAAS,CAAC,CAAC;SAChC;QAED,SAAS,IAAI,OAAO,CAAC;QACrB,OAAO,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;IACvG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAyB;IACnD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QAChC,IAAI,SAAS,IAAI,MAAM,EAAE;YACrB,OAAO,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;SACzC;QACD,SAAS,IAAI,OAAO,CAAC;QACrB,OAAO,MAAM,CAAC,YAAY,CACtB,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,EACtC,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,CACjC,CAAC;IACN,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAgB,EAAE,OAAuB;IAClE,OAAO,aAAa,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW,EAAE,OAAiC,wBAAwB,CAAC,OAAO;IAC3G,OAAO,iBAAiB,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/_version.d.ts b/node_modules/@ethersproject/strings/lib/_version.d.ts new file mode 100644 index 0000000..c1269a7 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "strings/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/_version.d.ts.map b/node_modules/@ethersproject/strings/lib/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/_version.js b/node_modules/@ethersproject/strings/lib/_version.js new file mode 100644 index 0000000..f9af641 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "strings/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/_version.js.map b/node_modules/@ethersproject/strings/lib/_version.js.map new file mode 100644 index 0000000..0ce0fea --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/bytes32.d.ts b/node_modules/@ethersproject/strings/lib/bytes32.d.ts new file mode 100644 index 0000000..52cb7d6 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/bytes32.d.ts @@ -0,0 +1,4 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare function formatBytes32String(text: string): string; +export declare function parseBytes32String(bytes: BytesLike): string; +//# sourceMappingURL=bytes32.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/bytes32.d.ts.map b/node_modules/@ethersproject/strings/lib/bytes32.d.ts.map new file mode 100644 index 0000000..7325c33 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/bytes32.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes32.d.ts","sourceRoot":"","sources":["../src.ts/bytes32.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AAK5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAa3D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/bytes32.js b/node_modules/@ethersproject/strings/lib/bytes32.js new file mode 100644 index 0000000..827822c --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/bytes32.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseBytes32String = exports.formatBytes32String = void 0; +var constants_1 = require("@ethersproject/constants"); +var bytes_1 = require("@ethersproject/bytes"); +var utf8_1 = require("./utf8"); +function formatBytes32String(text) { + // Get the bytes + var bytes = (0, utf8_1.toUtf8Bytes)(text); + // Check we have room for null-termination + if (bytes.length > 31) { + throw new Error("bytes32 string must be less than 32 bytes"); + } + // Zero-pad (implicitly null-terminates) + return (0, bytes_1.hexlify)((0, bytes_1.concat)([bytes, constants_1.HashZero]).slice(0, 32)); +} +exports.formatBytes32String = formatBytes32String; +function parseBytes32String(bytes) { + var data = (0, bytes_1.arrayify)(bytes); + // Must be 32 bytes with a null-termination + if (data.length !== 32) { + throw new Error("invalid bytes32 - not 32 bytes long"); + } + if (data[31] !== 0) { + throw new Error("invalid bytes32 string - no null terminator"); + } + // Find the null termination + var length = 31; + while (data[length - 1] === 0) { + length--; + } + // Determine the string value + return (0, utf8_1.toUtf8String)(data.slice(0, length)); +} +exports.parseBytes32String = parseBytes32String; +//# sourceMappingURL=bytes32.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/bytes32.js.map b/node_modules/@ethersproject/strings/lib/bytes32.js.map new file mode 100644 index 0000000..d773fb0 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/bytes32.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes32.js","sourceRoot":"","sources":["../src.ts/bytes32.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,sDAAoD;AACpD,8CAA4E;AAE5E,+BAAmD;AAGnD,SAAgB,mBAAmB,CAAC,IAAY;IAE5C,gBAAgB;IAChB,IAAM,KAAK,GAAG,IAAA,kBAAW,EAAC,IAAI,CAAC,CAAC;IAEhC,0CAA0C;IAC1C,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAAE;IAExF,wCAAwC;IACxC,OAAO,IAAA,eAAO,EAAC,IAAA,cAAM,EAAC,CAAE,KAAK,EAAE,oBAAQ,CAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC;AAVD,kDAUC;AAED,SAAgB,kBAAkB,CAAC,KAAgB;IAC/C,IAAM,IAAI,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE7B,2CAA2C;IAC3C,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAAE;IACnF,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAAE;IAEvF,4BAA4B;IAC5B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,CAAC;KAAE;IAE5C,6BAA6B;IAC7B,OAAO,IAAA,mBAAY,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/C,CAAC;AAbD,gDAaC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/idna.d.ts b/node_modules/@ethersproject/strings/lib/idna.d.ts new file mode 100644 index 0000000..d3acedc --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/idna.d.ts @@ -0,0 +1,5 @@ +export declare function _nameprepTableA1(codepoint: number): boolean; +export declare function _nameprepTableB2(codepoint: number): Array; +export declare function _nameprepTableC(codepoint: number): boolean; +export declare function nameprep(value: string): string; +//# sourceMappingURL=idna.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/idna.d.ts.map b/node_modules/@ethersproject/strings/lib/idna.d.ts.map new file mode 100644 index 0000000..d1c33f9 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/idna.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"idna.d.ts","sourceRoot":"","sources":["../src.ts/idna.ts"],"names":[],"mappings":"AAoIA,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAcjE;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAsD9C"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/idna.js b/node_modules/@ethersproject/strings/lib/idna.js new file mode 100644 index 0000000..911858a --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/idna.js @@ -0,0 +1,194 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.nameprep = exports._nameprepTableC = exports._nameprepTableB2 = exports._nameprepTableA1 = void 0; +var utf8_1 = require("./utf8"); +function bytes2(data) { + if ((data.length % 4) !== 0) { + throw new Error("bad data"); + } + var result = []; + for (var i = 0; i < data.length; i += 4) { + result.push(parseInt(data.substring(i, i + 4), 16)); + } + return result; +} +function createTable(data, func) { + if (!func) { + func = function (value) { return [parseInt(value, 16)]; }; + } + var lo = 0; + var result = {}; + data.split(",").forEach(function (pair) { + var comps = pair.split(":"); + lo += parseInt(comps[0], 16); + result[lo] = func(comps[1]); + }); + return result; +} +function createRangeTable(data) { + var hi = 0; + return data.split(",").map(function (v) { + var comps = v.split("-"); + if (comps.length === 1) { + comps[1] = "0"; + } + else if (comps[1] === "") { + comps[1] = "1"; + } + var lo = hi + parseInt(comps[0], 16); + hi = parseInt(comps[1], 16); + return { l: lo, h: hi }; + }); +} +function matchMap(value, ranges) { + var lo = 0; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + lo += range.l; + if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) { + if (range.e && range.e.indexOf(value - lo) !== -1) { + continue; + } + return range; + } + } + return null; +} +var Table_A_1_ranges = createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"); +// @TODO: Make this relative... +var Table_B_1_flags = "ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function (v) { return parseInt(v, 16); }); +var Table_B_2_ranges = [ + { h: 25, s: 32, l: 65 }, + { h: 30, s: 32, e: [23], l: 127 }, + { h: 54, s: 1, e: [48], l: 64, d: 2 }, + { h: 14, s: 1, l: 57, d: 2 }, + { h: 44, s: 1, l: 17, d: 2 }, + { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 }, + { h: 16, s: 1, l: 68, d: 2 }, + { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 }, + { h: 26, s: 32, e: [17], l: 435 }, + { h: 22, s: 1, l: 71, d: 2 }, + { h: 15, s: 80, l: 40 }, + { h: 31, s: 32, l: 16 }, + { h: 32, s: 1, l: 80, d: 2 }, + { h: 52, s: 1, l: 42, d: 2 }, + { h: 12, s: 1, l: 55, d: 2 }, + { h: 40, s: 1, e: [38], l: 15, d: 2 }, + { h: 14, s: 1, l: 48, d: 2 }, + { h: 37, s: 48, l: 49 }, + { h: 148, s: 1, l: 6351, d: 2 }, + { h: 88, s: 1, l: 160, d: 2 }, + { h: 15, s: 16, l: 704 }, + { h: 25, s: 26, l: 854 }, + { h: 25, s: 32, l: 55915 }, + { h: 37, s: 40, l: 1247 }, + { h: 25, s: -119711, l: 53248 }, + { h: 25, s: -119763, l: 52 }, + { h: 25, s: -119815, l: 52 }, + { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 }, + { h: 25, s: -119919, l: 52 }, + { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 }, + { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 }, + { h: 25, s: -120075, l: 52 }, + { h: 25, s: -120127, l: 52 }, + { h: 25, s: -120179, l: 52 }, + { h: 25, s: -120231, l: 52 }, + { h: 25, s: -120283, l: 52 }, + { h: 25, s: -120335, l: 52 }, + { h: 24, s: -119543, e: [17], l: 56 }, + { h: 24, s: -119601, e: [17], l: 58 }, + { h: 24, s: -119659, e: [17], l: 58 }, + { h: 24, s: -119717, e: [17], l: 58 }, + { h: 24, s: -119775, e: [17], l: 58 } +]; +var Table_B_2_lut_abs = createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"); +var Table_B_2_lut_rel = createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"); +var Table_B_2_complex = createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D", bytes2); +var Table_C_ranges = createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001"); +function flatten(values) { + return values.reduce(function (accum, value) { + value.forEach(function (value) { accum.push(value); }); + return accum; + }, []); +} +function _nameprepTableA1(codepoint) { + return !!matchMap(codepoint, Table_A_1_ranges); +} +exports._nameprepTableA1 = _nameprepTableA1; +function _nameprepTableB2(codepoint) { + var range = matchMap(codepoint, Table_B_2_ranges); + if (range) { + return [codepoint + range.s]; + } + var codes = Table_B_2_lut_abs[codepoint]; + if (codes) { + return codes; + } + var shift = Table_B_2_lut_rel[codepoint]; + if (shift) { + return [codepoint + shift[0]]; + } + var complex = Table_B_2_complex[codepoint]; + if (complex) { + return complex; + } + return null; +} +exports._nameprepTableB2 = _nameprepTableB2; +function _nameprepTableC(codepoint) { + return !!matchMap(codepoint, Table_C_ranges); +} +exports._nameprepTableC = _nameprepTableC; +function nameprep(value) { + // This allows platforms with incomplete normalize to bypass + // it for very basic names which the built-in toLowerCase + // will certainly handle correctly + if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { + return value.toLowerCase(); + } + // Get the code points (keeping the current normalization) + var codes = (0, utf8_1.toUtf8CodePoints)(value); + codes = flatten(codes.map(function (code) { + // Substitute Table B.1 (Maps to Nothing) + if (Table_B_1_flags.indexOf(code) >= 0) { + return []; + } + if (code >= 0xfe00 && code <= 0xfe0f) { + return []; + } + // Substitute Table B.2 (Case Folding) + var codesTableB2 = _nameprepTableB2(code); + if (codesTableB2) { + return codesTableB2; + } + // No Substitution + return [code]; + })); + // Normalize using form KC + codes = (0, utf8_1.toUtf8CodePoints)((0, utf8_1._toUtf8String)(codes), utf8_1.UnicodeNormalizationForm.NFKC); + // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9 + codes.forEach(function (code) { + if (_nameprepTableC(code)) { + throw new Error("STRINGPREP_CONTAINS_PROHIBITED"); + } + }); + // Prohibit Unassigned Code Points (Table A.1) + codes.forEach(function (code) { + if (_nameprepTableA1(code)) { + throw new Error("STRINGPREP_CONTAINS_UNASSIGNED"); + } + }); + // IDNA extras + var name = (0, utf8_1._toUtf8String)(codes); + // IDNA: 4.2.3.1 + if (name.substring(0, 1) === "-" || name.substring(2, 4) === "--" || name.substring(name.length - 1) === "-") { + throw new Error("invalid hyphen"); + } + // IDNA: 4.2.4 + if (name.length > 63) { + throw new Error("too long"); + } + return name; +} +exports.nameprep = nameprep; +//# sourceMappingURL=idna.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/idna.js.map b/node_modules/@ethersproject/strings/lib/idna.js.map new file mode 100644 index 0000000..0cd5757 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/idna.js.map @@ -0,0 +1 @@ +{"version":3,"file":"idna.js","sourceRoot":"","sources":["../src.ts/idna.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+BAAmF;AAYnF,SAAS,MAAM,CAAC,IAAY;IACxB,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;KAAE;IAC7D,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KACvD;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,IAAuC;IACtE,IAAI,CAAC,IA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AC,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QAC1G,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACrC;IAED,cAAc;IACd,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;KAAE;IAItD,OAAO,IAAI,CAAC;AAChB,CAAC;AAtDD,4BAsDC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/index.d.ts b/node_modules/@ethersproject/strings/lib/index.d.ts new file mode 100644 index 0000000..419be18 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/index.d.ts @@ -0,0 +1,5 @@ +import { formatBytes32String, parseBytes32String } from "./bytes32"; +import { nameprep } from "./idna"; +import { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from "./utf8"; +export { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason, UnicodeNormalizationForm, formatBytes32String, parseBytes32String, nameprep }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/index.d.ts.map b/node_modules/@ethersproject/strings/lib/index.d.ts.map new file mode 100644 index 0000000..e7fd468 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,wBAAwB,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAErK,OAAO,EACH,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EAEZ,aAAa,EACb,cAAc,EACd,eAAe,EAEf,wBAAwB,EAExB,mBAAmB,EACnB,kBAAkB,EAElB,QAAQ,EACX,CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/index.js b/node_modules/@ethersproject/strings/lib/index.js new file mode 100644 index 0000000..a266861 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/index.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.nameprep = exports.parseBytes32String = exports.formatBytes32String = exports.UnicodeNormalizationForm = exports.Utf8ErrorReason = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports._toEscapedUtf8String = void 0; +var bytes32_1 = require("./bytes32"); +Object.defineProperty(exports, "formatBytes32String", { enumerable: true, get: function () { return bytes32_1.formatBytes32String; } }); +Object.defineProperty(exports, "parseBytes32String", { enumerable: true, get: function () { return bytes32_1.parseBytes32String; } }); +var idna_1 = require("./idna"); +Object.defineProperty(exports, "nameprep", { enumerable: true, get: function () { return idna_1.nameprep; } }); +var utf8_1 = require("./utf8"); +Object.defineProperty(exports, "_toEscapedUtf8String", { enumerable: true, get: function () { return utf8_1._toEscapedUtf8String; } }); +Object.defineProperty(exports, "toUtf8Bytes", { enumerable: true, get: function () { return utf8_1.toUtf8Bytes; } }); +Object.defineProperty(exports, "toUtf8CodePoints", { enumerable: true, get: function () { return utf8_1.toUtf8CodePoints; } }); +Object.defineProperty(exports, "toUtf8String", { enumerable: true, get: function () { return utf8_1.toUtf8String; } }); +Object.defineProperty(exports, "UnicodeNormalizationForm", { enumerable: true, get: function () { return utf8_1.UnicodeNormalizationForm; } }); +Object.defineProperty(exports, "Utf8ErrorFuncs", { enumerable: true, get: function () { return utf8_1.Utf8ErrorFuncs; } }); +Object.defineProperty(exports, "Utf8ErrorReason", { enumerable: true, get: function () { return utf8_1.Utf8ErrorReason; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/index.js.map b/node_modules/@ethersproject/strings/lib/index.js.map new file mode 100644 index 0000000..8022cad --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,qCAAoE;AAgBhE,oGAhBK,6BAAmB,OAgBL;AACnB,mGAjB0B,4BAAkB,OAiB1B;AAhBtB,+BAAkC;AAkB9B,yFAlBK,eAAQ,OAkBL;AAjBZ,+BAAqK;AAGjK,qGAHK,2BAAoB,OAGL;AACpB,4FAJ2B,kBAAW,OAI3B;AACX,iGALwC,uBAAgB,OAKxC;AAChB,6FAN0D,mBAAY,OAM1D;AAMZ,yGAZwE,+BAAwB,OAYxE;AAHxB,+FATiH,qBAAc,OASjH;AACd,gGAViI,sBAAe,OAUjI"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/utf8.d.ts b/node_modules/@ethersproject/strings/lib/utf8.d.ts new file mode 100644 index 0000000..e13133f --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/utf8.d.ts @@ -0,0 +1,27 @@ +import { BytesLike } from "@ethersproject/bytes"; +export declare enum UnicodeNormalizationForm { + current = "", + NFC = "NFC", + NFD = "NFD", + NFKC = "NFKC", + NFKD = "NFKD" +} +export declare enum Utf8ErrorReason { + UNEXPECTED_CONTINUE = "unexpected continuation byte", + BAD_PREFIX = "bad codepoint prefix", + OVERRUN = "string overrun", + MISSING_CONTINUE = "missing continuation byte", + OUT_OF_RANGE = "out of UTF-8 range", + UTF16_SURROGATE = "UTF-16 surrogate", + OVERLONG = "overlong representation" +} +export declare type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number; +export declare const Utf8ErrorFuncs: { + [name: string]: Utf8ErrorFunc; +}; +export declare function toUtf8Bytes(str: string, form?: UnicodeNormalizationForm): Uint8Array; +export declare function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string; +export declare function _toUtf8String(codePoints: Array): string; +export declare function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string; +export declare function toUtf8CodePoints(str: string, form?: UnicodeNormalizationForm): Array; +//# sourceMappingURL=utf8.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/utf8.d.ts.map b/node_modules/@ethersproject/strings/lib/utf8.d.ts.map new file mode 100644 index 0000000..a97f173 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/utf8.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../src.ts/utf8.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,oBAAY,wBAAwB;IAChC,OAAO,KAAM;IACb,GAAG,QAAa;IAChB,GAAG,QAAa;IAChB,IAAI,SAAa;IACjB,IAAI,SAAa;CACpB;AAED,oBAAY,eAAe;IAGvB,mBAAmB,iCAAmC;IAItD,UAAU,yBAAoC;IAI9C,OAAO,mBAAiC;IAIxC,gBAAgB,8BAAmC;IAKnD,YAAY,uBAAgC;IAK5C,eAAe,qBAA2B;IAK1C,QAAQ,4BAAyC;CACpD;AAGD,oBAAY,aAAa,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AA4CxJ,eAAO,MAAM,cAAc,EAAE;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,aAAa,CAAA;CAI5D,CAAC;AAqGH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,wBAA2D,GAAG,UAAU,CAyCtH;AAOD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAwBtF;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAW/D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAE9E;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,wBAA2D,GAAG,KAAK,CAAC,MAAM,CAAC,CAE9H"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/utf8.js b/node_modules/@ethersproject/strings/lib/utf8.js new file mode 100644 index 0000000..ecdd72d --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/utf8.js @@ -0,0 +1,257 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toUtf8CodePoints = exports.toUtf8String = exports._toUtf8String = exports._toEscapedUtf8String = exports.toUtf8Bytes = exports.Utf8ErrorFuncs = exports.Utf8ErrorReason = exports.UnicodeNormalizationForm = void 0; +var bytes_1 = require("@ethersproject/bytes"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +/////////////////////////////// +var UnicodeNormalizationForm; +(function (UnicodeNormalizationForm) { + UnicodeNormalizationForm["current"] = ""; + UnicodeNormalizationForm["NFC"] = "NFC"; + UnicodeNormalizationForm["NFD"] = "NFD"; + UnicodeNormalizationForm["NFKC"] = "NFKC"; + UnicodeNormalizationForm["NFKD"] = "NFKD"; +})(UnicodeNormalizationForm = exports.UnicodeNormalizationForm || (exports.UnicodeNormalizationForm = {})); +; +var Utf8ErrorReason; +(function (Utf8ErrorReason) { + // A continuation byte was present where there was nothing to continue + // - offset = the index the codepoint began in + Utf8ErrorReason["UNEXPECTED_CONTINUE"] = "unexpected continuation byte"; + // An invalid (non-continuation) byte to start a UTF-8 codepoint was found + // - offset = the index the codepoint began in + Utf8ErrorReason["BAD_PREFIX"] = "bad codepoint prefix"; + // The string is too short to process the expected codepoint + // - offset = the index the codepoint began in + Utf8ErrorReason["OVERRUN"] = "string overrun"; + // A missing continuation byte was expected but not found + // - offset = the index the continuation byte was expected at + Utf8ErrorReason["MISSING_CONTINUE"] = "missing continuation byte"; + // The computed code point is outside the range for UTF-8 + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; outside the UTF-8 range + Utf8ErrorReason["OUT_OF_RANGE"] = "out of UTF-8 range"; + // UTF-8 strings may not contain UTF-16 surrogate pairs + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range + Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate"; + // The string is an overlong representation + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; already bounds checked + Utf8ErrorReason["OVERLONG"] = "overlong representation"; +})(Utf8ErrorReason = exports.Utf8ErrorReason || (exports.Utf8ErrorReason = {})); +; +function errorFunc(reason, offset, bytes, output, badCodepoint) { + return logger.throwArgumentError("invalid codepoint at offset " + offset + "; " + reason, "bytes", bytes); +} +function ignoreFunc(reason, offset, bytes, output, badCodepoint) { + // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes + if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { + var i = 0; + for (var o = offset + 1; o < bytes.length; o++) { + if (bytes[o] >> 6 !== 0x02) { + break; + } + i++; + } + return i; + } + // This byte runs us past the end of the string, so just jump to the end + // (but the first byte was read already read and therefore skipped) + if (reason === Utf8ErrorReason.OVERRUN) { + return bytes.length - offset - 1; + } + // Nothing to skip + return 0; +} +function replaceFunc(reason, offset, bytes, output, badCodepoint) { + // Overlong representations are otherwise "valid" code points; just non-deistingtished + if (reason === Utf8ErrorReason.OVERLONG) { + output.push(badCodepoint); + return 0; + } + // Put the replacement character into the output + output.push(0xfffd); + // Otherwise, process as if ignoring errors + return ignoreFunc(reason, offset, bytes, output, badCodepoint); +} +// Common error handing strategies +exports.Utf8ErrorFuncs = Object.freeze({ + error: errorFunc, + ignore: ignoreFunc, + replace: replaceFunc +}); +// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 +function getUtf8CodePoints(bytes, onError) { + if (onError == null) { + onError = exports.Utf8ErrorFuncs.error; + } + bytes = (0, bytes_1.arrayify)(bytes); + var result = []; + var i = 0; + // Invalid bytes are ignored + while (i < bytes.length) { + var c = bytes[i++]; + // 0xxx xxxx + if (c >> 7 === 0) { + result.push(c); + continue; + } + // Multibyte; how many bytes left for this character? + var extraLength = null; + var overlongMask = null; + // 110x xxxx 10xx xxxx + if ((c & 0xe0) === 0xc0) { + extraLength = 1; + overlongMask = 0x7f; + // 1110 xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf0) === 0xe0) { + extraLength = 2; + overlongMask = 0x7ff; + // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf8) === 0xf0) { + extraLength = 3; + overlongMask = 0xffff; + } + else { + if ((c & 0xc0) === 0x80) { + i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result); + } + else { + i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result); + } + continue; + } + // Do we have enough bytes in our data? + if (i - 1 + extraLength >= bytes.length) { + i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result); + continue; + } + // Remove the length prefix from the char + var res = c & ((1 << (8 - extraLength - 1)) - 1); + for (var j = 0; j < extraLength; j++) { + var nextChar = bytes[i]; + // Invalid continuation byte + if ((nextChar & 0xc0) != 0x80) { + i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result); + res = null; + break; + } + ; + res = (res << 6) | (nextChar & 0x3f); + i++; + } + // See above loop for invalid continuation byte + if (res === null) { + continue; + } + // Maximum code point + if (res > 0x10ffff) { + i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Reserved for UTF-16 surrogate halves + if (res >= 0xd800 && res <= 0xdfff) { + i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Check for overlong sequences (more bytes than needed) + if (res <= overlongMask) { + i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res); + continue; + } + result.push(res); + } + return result; +} +// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array +function toUtf8Bytes(str, form) { + if (form === void 0) { form = UnicodeNormalizationForm.current; } + if (form != UnicodeNormalizationForm.current) { + logger.checkNormalize(); + str = str.normalize(form); + } + var result = []; + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + if (c < 0x80) { + result.push(c); + } + else if (c < 0x800) { + result.push((c >> 6) | 0xc0); + result.push((c & 0x3f) | 0x80); + } + else if ((c & 0xfc00) == 0xd800) { + i++; + var c2 = str.charCodeAt(i); + if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) { + throw new Error("invalid utf-8 string"); + } + // Surrogate Pair + var pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + result.push((pair >> 18) | 0xf0); + result.push(((pair >> 12) & 0x3f) | 0x80); + result.push(((pair >> 6) & 0x3f) | 0x80); + result.push((pair & 0x3f) | 0x80); + } + else { + result.push((c >> 12) | 0xe0); + result.push(((c >> 6) & 0x3f) | 0x80); + result.push((c & 0x3f) | 0x80); + } + } + return (0, bytes_1.arrayify)(result); +} +exports.toUtf8Bytes = toUtf8Bytes; +; +function escapeChar(value) { + var hex = ("0000" + value.toString(16)); + return "\\u" + hex.substring(hex.length - 4); +} +function _toEscapedUtf8String(bytes, onError) { + return '"' + getUtf8CodePoints(bytes, onError).map(function (codePoint) { + if (codePoint < 256) { + switch (codePoint) { + case 8: return "\\b"; + case 9: return "\\t"; + case 10: return "\\n"; + case 13: return "\\r"; + case 34: return "\\\""; + case 92: return "\\\\"; + } + if (codePoint >= 32 && codePoint < 127) { + return String.fromCharCode(codePoint); + } + } + if (codePoint <= 0xffff) { + return escapeChar(codePoint); + } + codePoint -= 0x10000; + return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00); + }).join("") + '"'; +} +exports._toEscapedUtf8String = _toEscapedUtf8String; +function _toUtf8String(codePoints) { + return codePoints.map(function (codePoint) { + if (codePoint <= 0xffff) { + return String.fromCharCode(codePoint); + } + codePoint -= 0x10000; + return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00)); + }).join(""); +} +exports._toUtf8String = _toUtf8String; +function toUtf8String(bytes, onError) { + return _toUtf8String(getUtf8CodePoints(bytes, onError)); +} +exports.toUtf8String = toUtf8String; +function toUtf8CodePoints(str, form) { + if (form === void 0) { form = UnicodeNormalizationForm.current; } + return getUtf8CodePoints(toUtf8Bytes(str, form)); +} +exports.toUtf8CodePoints = toUtf8CodePoints; +//# sourceMappingURL=utf8.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/lib/utf8.js.map b/node_modules/@ethersproject/strings/lib/utf8.js.map new file mode 100644 index 0000000..70111d6 --- /dev/null +++ b/node_modules/@ethersproject/strings/lib/utf8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../src.ts/utf8.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8CAA2D;AAE3D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,+BAA+B;AAE/B,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,wCAAa,CAAA;IACb,uCAAgB,CAAA;IAChB,uCAAgB,CAAA;IAChB,yCAAiB,CA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,CAAC,GAAG,MAAM,CAAC,CACjC,CAAC;IACN,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChB,CAAC;AAXD,sCAWC;AAED,SAAgB,YAAY,CAAC,KAAgB,EAAE,OAAuB;IAClE,OAAO,aAAa,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5D,CAAC;AAFD,oCAEC;AAED,SAAgB,gBAAgB,CAAC,GAAW,EAAE,IAAiE;IAAjE,qBAAA,EAAA,OAAiC,wBAAwB,CAAC,OAAO;IAC3G,OAAO,iBAAiB,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACrD,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/strings/package.json b/node_modules/@ethersproject/strings/package.json new file mode 100644 index 0000000..c081d47 --- /dev/null +++ b/node_modules/@ethersproject/strings/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + }, + "description": "String utility functions.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers", + "strings", + "utf8" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/strings", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/strings", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0xf21979740bced4ac1b76c72b037dea706dd7b0805449756a938f19d19f940a0c", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/strings/src.ts/_version.ts b/node_modules/@ethersproject/strings/src.ts/_version.ts new file mode 100644 index 0000000..ec182c1 --- /dev/null +++ b/node_modules/@ethersproject/strings/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "strings/5.5.0"; diff --git a/node_modules/@ethersproject/strings/src.ts/bytes32.ts b/node_modules/@ethersproject/strings/src.ts/bytes32.ts new file mode 100644 index 0000000..0d79431 --- /dev/null +++ b/node_modules/@ethersproject/strings/src.ts/bytes32.ts @@ -0,0 +1,35 @@ +"use strict"; + +import { HashZero } from "@ethersproject/constants"; +import { arrayify, BytesLike, concat, hexlify } from "@ethersproject/bytes"; + +import { toUtf8Bytes, toUtf8String } from "./utf8"; + + +export function formatBytes32String(text: string): string { + + // Get the bytes + const bytes = toUtf8Bytes(text); + + // Check we have room for null-termination + if (bytes.length > 31) { throw new Error("bytes32 string must be less than 32 bytes"); } + + // Zero-pad (implicitly null-terminates) + return hexlify(concat([ bytes, HashZero ]).slice(0, 32)); +} + +export function parseBytes32String(bytes: BytesLike): string { + const data = arrayify(bytes); + + // Must be 32 bytes with a null-termination + if (data.length !== 32) { throw new Error("invalid bytes32 - not 32 bytes long"); } + if (data[31] !== 0) { throw new Error("invalid bytes32 string - no null terminator"); } + + // Find the null termination + let length = 31; + while (data[length - 1] === 0) { length--; } + + // Determine the string value + return toUtf8String(data.slice(0, length)); +} + diff --git a/node_modules/@ethersproject/strings/src.ts/idna.ts b/node_modules/@ethersproject/strings/src.ts/idna.ts new file mode 100644 index 0000000..dc6f111 --- /dev/null +++ b/node_modules/@ethersproject/strings/src.ts/idna.ts @@ -0,0 +1,212 @@ +"use strict"; + +import { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from "./utf8"; + +type Ranged = { + l: number, // Lo value + h: number, // High value (less the lo) + d?: number, // Delta/stride (default: 1) + s?: number, // Shift (default: 1) + e?: Array // Exceptions to skip +}; + +type Table = { [ src: number ]: Array }; + +function bytes2(data: string): Array { + if ((data.length % 4) !== 0) { throw new Error("bad data"); } + let result = []; + for (let i = 0; i < data.length; i += 4) { + result.push(parseInt(data.substring(i, i + 4), 16)); + } + return result; +} + +function createTable(data: string, func?: (value: string) => Array): Table { + if (!func) { + func = function(value: string) { return [ parseInt(value, 16) ]; } + } + + let lo = 0; + + let result: Table = { }; + data.split(",").forEach((pair) => { + let comps = pair.split(":"); + lo += parseInt(comps[0], 16); + result[lo] = func(comps[1]); + }); + + return result; +} + +function createRangeTable(data: string): Array { + let hi = 0; + return data.split(",").map((v) => { + let comps = v.split("-"); + if (comps.length === 1) { + comps[1] = "0"; + } else if (comps[1] === "") { + comps[1] = "1"; + } + + let lo = hi + parseInt(comps[0], 16); + hi = parseInt(comps[1], 16); + return { l: lo, h: hi }; + }); +} + +function matchMap(value: number, ranges: Array): Ranged { + let lo = 0; + for (let i = 0; i < ranges.length; i++) { + let range = ranges[i]; + lo += range.l; + if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) { + if (range.e && range.e.indexOf(value - lo) !== -1) { continue; } + return range; + } + } + return null; +} + +const Table_A_1_ranges = createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"); + +// @TODO: Make this relative... +const Table_B_1_flags = "ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); + +const Table_B_2_ranges: Array = [ + { h: 25, s: 32, l: 65 }, + { h: 30, s: 32, e: [ 23 ], l: 127 }, + { h: 54, s: 1, e: [ 48 ], l: 64, d: 2 }, + { h: 14, s: 1, l: 57, d: 2 }, + { h: 44, s: 1, l: 17, d: 2 }, + { h: 10, s: 1, e: [ 2, 6, 8 ], l: 61, d: 2 }, + { h: 16, s: 1, l: 68, d: 2 }, + { h: 84, s: 1, e: [ 18, 24, 66 ], l: 19, d: 2 }, + { h: 26, s: 32, e: [ 17 ], l: 435 }, + { h: 22, s: 1, l: 71, d: 2 }, + { h: 15, s: 80, l: 40 }, + { h: 31, s: 32, l: 16 }, + { h: 32, s: 1, l: 80, d: 2 }, + { h: 52, s: 1, l: 42, d: 2 }, + { h: 12, s: 1, l: 55, d: 2 }, + { h: 40, s: 1, e: [ 38 ], l: 15, d: 2 }, + { h: 14, s: 1, l: 48, d: 2 }, + { h: 37, s: 48, l: 49 }, + { h: 148, s: 1, l: 6351, d: 2 }, + { h: 88, s: 1, l: 160, d: 2 }, + { h: 15, s: 16, l: 704 }, + { h: 25, s: 26, l: 854 }, + { h: 25, s: 32, l: 55915 }, + { h: 37, s: 40, l: 1247 }, + { h: 25, s: -119711, l: 53248 }, + { h: 25, s: -119763, l: 52 }, + { h: 25, s: -119815, l: 52 }, + { h: 25, s: -119867, e: [ 1, 4, 5, 7, 8, 11, 12, 17 ], l: 52 }, + { h: 25, s: -119919, l: 52 }, + { h: 24, s: -119971, e: [ 2, 7, 8, 17 ], l: 52 }, + { h: 24, s: -120023, e: [ 2, 7, 13, 15, 16, 17 ], l: 52 }, + { h: 25, s: -120075, l: 52 }, + { h: 25, s: -120127, l: 52 }, + { h: 25, s: -120179, l: 52 }, + { h: 25, s: -120231, l: 52 }, + { h: 25, s: -120283, l: 52 }, + { h: 25, s: -120335, l: 52 }, + { h: 24, s: -119543, e: [ 17 ], l: 56 }, + { h: 24, s: -119601, e: [ 17 ], l: 58 }, + { h: 24, s: -119659, e: [ 17 ], l: 58 }, + { h: 24, s: -119717, e: [ 17 ], l: 58 }, + { h: 24, s: -119775, e: [ 17 ], l: 58 } +]; +const Table_B_2_lut_abs = createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"); +const Table_B_2_lut_rel = createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"); +const Table_B_2_complex = createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D", bytes2); + +const Table_C_ranges = createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001"); + + +function flatten(values: Array>): Array { + return values.reduce((accum, value) => { + value.forEach((value) => { accum.push(value); }); + return accum; + }, [ ]); +} + +export function _nameprepTableA1(codepoint: number): boolean { + return !!matchMap(codepoint, Table_A_1_ranges); +} + +export function _nameprepTableB2(codepoint: number): Array { + let range = matchMap(codepoint, Table_B_2_ranges); + if (range) { return [ codepoint + range.s ]; } + + let codes = Table_B_2_lut_abs[codepoint]; + if (codes) { return codes; } + + let shift = Table_B_2_lut_rel[codepoint]; + if (shift) { return [ codepoint + shift[0] ]; } + + let complex = Table_B_2_complex[codepoint]; + if (complex) { return complex; } + + return null; +} + +export function _nameprepTableC(codepoint: number): boolean { + return !!matchMap(codepoint, Table_C_ranges); +} + +export function nameprep(value: string): string { + + // This allows platforms with incomplete normalize to bypass + // it for very basic names which the built-in toLowerCase + // will certainly handle correctly + if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { return value.toLowerCase(); } + + // Get the code points (keeping the current normalization) + let codes = toUtf8CodePoints(value); + + codes = flatten(codes.map((code) => { + // Substitute Table B.1 (Maps to Nothing) + if (Table_B_1_flags.indexOf(code) >= 0) { return [ ]; } + if (code >= 0xfe00 && code <= 0xfe0f) { return [ ]; } + + // Substitute Table B.2 (Case Folding) + let codesTableB2 = _nameprepTableB2(code); + if (codesTableB2) { return codesTableB2; } + + // No Substitution + return [ code ]; + })); + + // Normalize using form KC + codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC); + + // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9 + codes.forEach((code) => { + if (_nameprepTableC(code)) { + throw new Error("STRINGPREP_CONTAINS_PROHIBITED"); + } + }); + + // Prohibit Unassigned Code Points (Table A.1) + codes.forEach((code) => { + if (_nameprepTableA1(code)) { + throw new Error("STRINGPREP_CONTAINS_UNASSIGNED"); + } + }); + + // IDNA extras + let name = _toUtf8String(codes); + + // IDNA: 4.2.3.1 + if (name.substring(0, 1) === "-" || name.substring(2, 4) === "--" || name.substring(name.length - 1) === "-") { + throw new Error("invalid hyphen"); + } + + // IDNA: 4.2.4 + if (name.length > 63) { throw new Error("too long"); } + + + + return name; +} + diff --git a/node_modules/@ethersproject/strings/src.ts/index.ts b/node_modules/@ethersproject/strings/src.ts/index.ts new file mode 100644 index 0000000..4984d67 --- /dev/null +++ b/node_modules/@ethersproject/strings/src.ts/index.ts @@ -0,0 +1,23 @@ +"use strict"; + +import { formatBytes32String, parseBytes32String } from "./bytes32"; +import { nameprep } from "./idna"; +import { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from "./utf8"; + +export { + _toEscapedUtf8String, + toUtf8Bytes, + toUtf8CodePoints, + toUtf8String, + + Utf8ErrorFunc, + Utf8ErrorFuncs, + Utf8ErrorReason, + + UnicodeNormalizationForm, + + formatBytes32String, + parseBytes32String, + + nameprep +} diff --git a/node_modules/@ethersproject/strings/src.ts/utf8.ts b/node_modules/@ethersproject/strings/src.ts/utf8.ts new file mode 100644 index 0000000..2d52dec --- /dev/null +++ b/node_modules/@ethersproject/strings/src.ts/utf8.ts @@ -0,0 +1,295 @@ +"use strict"; + +import { arrayify, BytesLike } from "@ethersproject/bytes"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +/////////////////////////////// + +export enum UnicodeNormalizationForm { + current = "", + NFC = "NFC", + NFD = "NFD", + NFKC = "NFKC", + NFKD = "NFKD" +}; + +export enum Utf8ErrorReason { + // A continuation byte was present where there was nothing to continue + // - offset = the index the codepoint began in + UNEXPECTED_CONTINUE = "unexpected continuation byte", + + // An invalid (non-continuation) byte to start a UTF-8 codepoint was found + // - offset = the index the codepoint began in + BAD_PREFIX = "bad codepoint prefix", + + // The string is too short to process the expected codepoint + // - offset = the index the codepoint began in + OVERRUN = "string overrun", + + // A missing continuation byte was expected but not found + // - offset = the index the continuation byte was expected at + MISSING_CONTINUE = "missing continuation byte", + + // The computed code point is outside the range for UTF-8 + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; outside the UTF-8 range + OUT_OF_RANGE = "out of UTF-8 range", + + // UTF-8 strings may not contain UTF-16 surrogate pairs + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range + UTF16_SURROGATE = "UTF-16 surrogate", + + // The string is an overlong representation + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; already bounds checked + OVERLONG = "overlong representation", +}; + + +export type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number; + +function errorFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number { + return logger.throwArgumentError(`invalid codepoint at offset ${ offset }; ${ reason }`, "bytes", bytes); +} + +function ignoreFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number { + + // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes + if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { + let i = 0; + for (let o = offset + 1; o < bytes.length; o++) { + if (bytes[o] >> 6 !== 0x02) { break; } + i++; + } + return i; + } + + // This byte runs us past the end of the string, so just jump to the end + // (but the first byte was read already read and therefore skipped) + if (reason === Utf8ErrorReason.OVERRUN) { + return bytes.length - offset - 1; + } + + // Nothing to skip + return 0; +} + +function replaceFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number { + + // Overlong representations are otherwise "valid" code points; just non-deistingtished + if (reason === Utf8ErrorReason.OVERLONG) { + output.push(badCodepoint); + return 0; + } + + // Put the replacement character into the output + output.push(0xfffd); + + // Otherwise, process as if ignoring errors + return ignoreFunc(reason, offset, bytes, output, badCodepoint); +} + +// Common error handing strategies +export const Utf8ErrorFuncs: { [ name: string ]: Utf8ErrorFunc } = Object.freeze({ + error: errorFunc, + ignore: ignoreFunc, + replace: replaceFunc +}); + +// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 +function getUtf8CodePoints(bytes: BytesLike, onError?: Utf8ErrorFunc): Array { + if (onError == null) { onError = Utf8ErrorFuncs.error; } + + bytes = arrayify(bytes); + + const result: Array = []; + let i = 0; + + // Invalid bytes are ignored + while(i < bytes.length) { + + const c = bytes[i++]; + + // 0xxx xxxx + if (c >> 7 === 0) { + result.push(c); + continue; + } + + // Multibyte; how many bytes left for this character? + let extraLength = null; + let overlongMask = null; + + // 110x xxxx 10xx xxxx + if ((c & 0xe0) === 0xc0) { + extraLength = 1; + overlongMask = 0x7f; + + // 1110 xxxx 10xx xxxx 10xx xxxx + } else if ((c & 0xf0) === 0xe0) { + extraLength = 2; + overlongMask = 0x7ff; + + // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx + } else if ((c & 0xf8) === 0xf0) { + extraLength = 3; + overlongMask = 0xffff; + + } else { + if ((c & 0xc0) === 0x80) { + i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result); + } else { + i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result); + } + continue; + } + + // Do we have enough bytes in our data? + if (i - 1 + extraLength >= bytes.length) { + i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result); + continue; + } + + // Remove the length prefix from the char + let res = c & ((1 << (8 - extraLength - 1)) - 1); + + for (let j = 0; j < extraLength; j++) { + let nextChar = bytes[i]; + + // Invalid continuation byte + if ((nextChar & 0xc0) != 0x80) { + i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result); + res = null; + break; + }; + + res = (res << 6) | (nextChar & 0x3f); + i++; + } + + // See above loop for invalid continuation byte + if (res === null) { continue; } + + // Maximum code point + if (res > 0x10ffff) { + i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res); + continue; + } + + // Reserved for UTF-16 surrogate halves + if (res >= 0xd800 && res <= 0xdfff) { + i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res); + continue; + } + + // Check for overlong sequences (more bytes than needed) + if (res <= overlongMask) { + i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res); + continue; + } + + result.push(res); + } + + return result; +} + +// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array +export function toUtf8Bytes(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Uint8Array { + + if (form != UnicodeNormalizationForm.current) { + logger.checkNormalize(); + str = str.normalize(form); + } + + let result = []; + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + + if (c < 0x80) { + result.push(c); + + } else if (c < 0x800) { + result.push((c >> 6) | 0xc0); + result.push((c & 0x3f) | 0x80); + + } else if ((c & 0xfc00) == 0xd800) { + i++; + const c2 = str.charCodeAt(i); + + if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) { + throw new Error("invalid utf-8 string"); + } + + // Surrogate Pair + const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + result.push((pair >> 18) | 0xf0); + result.push(((pair >> 12) & 0x3f) | 0x80); + result.push(((pair >> 6) & 0x3f) | 0x80); + result.push((pair & 0x3f) | 0x80); + + } else { + result.push((c >> 12) | 0xe0); + result.push(((c >> 6) & 0x3f) | 0x80); + result.push((c & 0x3f) | 0x80); + } + } + + return arrayify(result); +}; + +function escapeChar(value: number) { + const hex = ("0000" + value.toString(16)); + return "\\u" + hex.substring(hex.length - 4); +} + +export function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string { + return '"' + getUtf8CodePoints(bytes, onError).map((codePoint) => { + if (codePoint < 256) { + switch (codePoint) { + case 8: return "\\b"; + case 9: return "\\t"; + case 10: return "\\n" + case 13: return "\\r"; + case 34: return "\\\""; + case 92: return "\\\\"; + } + + if (codePoint >= 32 && codePoint < 127) { + return String.fromCharCode(codePoint); + } + } + + if (codePoint <= 0xffff) { + return escapeChar(codePoint); + } + + codePoint -= 0x10000; + return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00); + }).join("") + '"'; +} + +export function _toUtf8String(codePoints: Array): string { + return codePoints.map((codePoint) => { + if (codePoint <= 0xffff) { + return String.fromCharCode(codePoint); + } + codePoint -= 0x10000; + return String.fromCharCode( + (((codePoint >> 10) & 0x3ff) + 0xd800), + ((codePoint & 0x3ff) + 0xdc00) + ); + }).join(""); +} + +export function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string { + return _toUtf8String(getUtf8CodePoints(bytes, onError)); +} + +export function toUtf8CodePoints(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Array { + return getUtf8CodePoints(toUtf8Bytes(str, form)); +} diff --git a/node_modules/@ethersproject/transactions/LICENSE.md b/node_modules/@ethersproject/transactions/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/transactions/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/transactions/README.md b/node_modules/@ethersproject/transactions/README.md new file mode 100644 index 0000000..63099df --- /dev/null +++ b/node_modules/@ethersproject/transactions/README.md @@ -0,0 +1,38 @@ +Ethereum Transaction Utilities +============================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains various functions for encoding and decoding serialized transactios. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/transactions/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + computeAddress, + recoverAddress, + + serialize, + parse, + + // Types + + Transaction, + UnsignedTransaction + +} = require("@ethersproject/abi"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts b/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts new file mode 100644 index 0000000..19c8d02 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "transactions/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/_version.js b/node_modules/@ethersproject/transactions/lib.esm/_version.js new file mode 100644 index 0000000..725bead --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "transactions/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/_version.js.map b/node_modules/@ethersproject/transactions/lib.esm/_version.js.map new file mode 100644 index 0000000..a4db61b --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/index.d.ts b/node_modules/@ethersproject/transactions/lib.esm/index.d.ts new file mode 100644 index 0000000..011ecc2 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/index.d.ts @@ -0,0 +1,49 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike, SignatureLike } from "@ethersproject/bytes"; +export declare type AccessList = Array<{ + address: string; + storageKeys: Array; +}>; +export declare type AccessListish = AccessList | Array<[string, Array]> | Record>; +export declare enum TransactionTypes { + legacy = 0, + eip2930 = 1, + eip1559 = 2 +} +export declare type UnsignedTransaction = { + to?: string; + nonce?: number; + gasLimit?: BigNumberish; + gasPrice?: BigNumberish; + data?: BytesLike; + value?: BigNumberish; + chainId?: number; + type?: number | null; + accessList?: AccessListish; + maxPriorityFeePerGas?: BigNumberish; + maxFeePerGas?: BigNumberish; +}; +export interface Transaction { + hash?: string; + to?: string; + from?: string; + nonce: number; + gasLimit: BigNumber; + gasPrice?: BigNumber; + data: string; + value: BigNumber; + chainId: number; + r?: string; + s?: string; + v?: number; + type?: number | null; + accessList?: AccessList; + maxPriorityFeePerGas?: BigNumber; + maxFeePerGas?: BigNumber; +} +export declare function computeAddress(key: BytesLike | string): string; +export declare function recoverAddress(digest: BytesLike, signature: SignatureLike): string; +export declare function accessListify(value: AccessListish): AccessList; +export declare function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string; +export declare function parse(rawTransaction: BytesLike): Transaction; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/index.d.ts.map b/node_modules/@ethersproject/transactions/lib.esm/index.d.ts.map new file mode 100644 index 0000000..5d82ed6 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAAyF,aAAa,EAA+B,MAAM,sBAAsB,CAAC;AAc9L,oBAAY,UAAU,GAAG,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,CAAC;AAGhF,oBAAY,aAAa,GAAG,UAAU,GACV,KAAK,CAAC,CAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAE,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAE1D,oBAAY,gBAAgB;IACxB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,OAAO,IAAI;CACd;AAED,oBAAY,mBAAmB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,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WAAW,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,MAAM,CAuB7F;AA0JD,wBAAgB,KAAK,CAAC,cAAc,EAAE,SAAS,GAAG,WAAW,CAoB5D"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/index.js b/node_modules/@ethersproject/transactions/lib.esm/index.js new file mode 100644 index 0000000..5c97f5d --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib.esm/index.js @@ -0,0 +1,389 @@ +"use strict"; +import { getAddress } from "@ethersproject/address"; +import { BigNumber } from "@ethersproject/bignumber"; +import { arrayify, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, splitSignature, stripZeros, } from "@ethersproject/bytes"; +import { Zero } from "@ethersproject/constants"; +import { keccak256 } from "@ethersproject/keccak256"; +import { checkProperties } from "@ethersproject/properties"; +import * as RLP from "@ethersproject/rlp"; +import { computePublicKey, recoverPublicKey } from "@ethersproject/signing-key"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +export var TransactionTypes; +(function (TransactionTypes) { + TransactionTypes[TransactionTypes["legacy"] = 0] = "legacy"; + TransactionTypes[TransactionTypes["eip2930"] = 1] = "eip2930"; + TransactionTypes[TransactionTypes["eip1559"] = 2] = "eip1559"; +})(TransactionTypes || (TransactionTypes = {})); +; +/////////////////////////////// +function handleAddress(value) { + if (value === "0x") { + return null; + } + return getAddress(value); +} +function handleNumber(value) { + if (value === "0x") { + return Zero; + } + return BigNumber.from(value); +} +// Legacy Transaction Fields +const transactionFields = [ + { name: "nonce", maxLength: 32, numeric: true }, + { name: "gasPrice", maxLength: 32, numeric: true }, + { name: "gasLimit", maxLength: 32, numeric: true }, + { name: "to", length: 20 }, + { name: "value", maxLength: 32, numeric: true }, + { name: "data" }, +]; +const allowedTransactionKeys = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, type: true, value: true +}; +export function computeAddress(key) { + const publicKey = computePublicKey(key); + return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12)); +} +export function recoverAddress(digest, signature) { + return computeAddress(recoverPublicKey(arrayify(digest), signature)); +} +function formatNumber(value, name) { + const result = stripZeros(BigNumber.from(value).toHexString()); + if (result.length > 32) { + logger.throwArgumentError("invalid length for " + name, ("transaction:" + name), value); + } + return result; +} +function accessSetify(addr, storageKeys) { + return { + address: getAddress(addr), + storageKeys: (storageKeys || []).map((storageKey, index) => { + if (hexDataLength(storageKey) !== 32) { + logger.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey); + } + return storageKey.toLowerCase(); + }) + }; +} +export function accessListify(value) { + if (Array.isArray(value)) { + return value.map((set, index) => { + if (Array.isArray(set)) { + if (set.length > 2) { + logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", `value[${index}]`, set); + } + return accessSetify(set[0], set[1]); + } + return accessSetify(set.address, set.storageKeys); + }); + } + const result = Object.keys(value).map((addr) => { + const storageKeys = value[addr].reduce((accum, storageKey) => { + accum[storageKey] = true; + return accum; + }, {}); + return accessSetify(addr, Object.keys(storageKeys).sort()); + }); + result.sort((a, b) => (a.address.localeCompare(b.address))); + return result; +} +function formatAccessList(value) { + return accessListify(value).map((set) => [set.address, set.storageKeys]); +} +function _serializeEip1559(transaction, signature) { + // If there is an explicit gasPrice, make sure it matches the + // EIP-1559 fees; otherwise they may not understand what they + // think they are setting in terms of fee. + if (transaction.gasPrice != null) { + const gasPrice = BigNumber.from(transaction.gasPrice); + const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0); + if (!gasPrice.eq(maxFeePerGas)) { + logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + gasPrice, maxFeePerGas + }); + } + } + const fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), + formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? getAddress(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + const sig = splitSignature(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push(stripZeros(sig.r)); + fields.push(stripZeros(sig.s)); + } + return hexConcat(["0x02", RLP.encode(fields)]); +} +function _serializeEip2930(transaction, signature) { + const fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.gasPrice || 0, "gasPrice"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? getAddress(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + const sig = splitSignature(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push(stripZeros(sig.r)); + fields.push(stripZeros(sig.s)); + } + return hexConcat(["0x01", RLP.encode(fields)]); +} +// Legacy Transactions and EIP-155 +function _serialize(transaction, signature) { + checkProperties(transaction, allowedTransactionKeys); + const raw = []; + transactionFields.forEach(function (fieldInfo) { + let value = transaction[fieldInfo.name] || ([]); + const options = {}; + if (fieldInfo.numeric) { + options.hexPad = "left"; + } + value = arrayify(hexlify(value, options)); + // Fixed-width field + if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + // Variable-width (with a maximum) + if (fieldInfo.maxLength) { + value = stripZeros(value); + if (value.length > fieldInfo.maxLength) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + } + raw.push(hexlify(value)); + }); + let chainId = 0; + if (transaction.chainId != null) { + // A chainId was provided; if non-zero we'll use EIP-155 + chainId = transaction.chainId; + if (typeof (chainId) !== "number") { + logger.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + } + } + else if (signature && !isBytesLike(signature) && signature.v > 28) { + // No chainId provided, but the signature is signing with EIP-155; derive chainId + chainId = Math.floor((signature.v - 35) / 2); + } + // We have an EIP-155 transaction (chainId was specified and non-zero) + if (chainId !== 0) { + raw.push(hexlify(chainId)); // @TODO: hexValue? + raw.push("0x"); + raw.push("0x"); + } + // Requesting an unsigned transaction + if (!signature) { + return RLP.encode(raw); + } + // The splitSignature will ensure the transaction has a recoveryParam in the + // case that the signTransaction function only adds a v. + const sig = splitSignature(signature); + // We pushed a chainId and null r, s on for hashing only; remove those + let v = 27 + sig.recoveryParam; + if (chainId !== 0) { + raw.pop(); + raw.pop(); + raw.pop(); + v += chainId * 2 + 8; + // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it! + if (sig.v > 28 && sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + } + else if (sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + raw.push(hexlify(v)); + raw.push(stripZeros(arrayify(sig.r))); + raw.push(stripZeros(arrayify(sig.s))); + return RLP.encode(raw); +} +export function serialize(transaction, signature) { + // Legacy and EIP-155 Transactions + if (transaction.type == null || transaction.type === 0) { + if (transaction.accessList != null) { + logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + } + return _serialize(transaction, signature); + } + // Typed Transactions (EIP-2718) + switch (transaction.type) { + case 1: + return _serializeEip2930(transaction, signature); + case 2: + return _serializeEip1559(transaction, signature); + default: + break; + } + return logger.throwError(`unsupported transaction type: ${transaction.type}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "serializeTransaction", + transactionType: transaction.type + }); +} +function _parseEipSignature(tx, fields, serialize) { + try { + const recid = handleNumber(fields[0]).toNumber(); + if (recid !== 0 && recid !== 1) { + throw new Error("bad recid"); + } + tx.v = recid; + } + catch (error) { + logger.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + } + tx.r = hexZeroPad(fields[1], 32); + tx.s = hexZeroPad(fields[2], 32); + try { + const digest = keccak256(serialize(tx)); + tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); + } + catch (error) { + console.log(error); + } +} +function _parseEip1559(payload) { + const transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 9 && transaction.length !== 12) { + logger.throwArgumentError("invalid component count for transaction type: 2", "payload", hexlify(payload)); + } + const maxPriorityFeePerGas = handleNumber(transaction[2]); + const maxFeePerGas = handleNumber(transaction[3]); + const tx = { + type: 2, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + maxPriorityFeePerGas: maxPriorityFeePerGas, + maxFeePerGas: maxFeePerGas, + gasPrice: null, + gasLimit: handleNumber(transaction[4]), + to: handleAddress(transaction[5]), + value: handleNumber(transaction[6]), + data: transaction[7], + accessList: accessListify(transaction[8]), + }; + // Unsigned EIP-1559 Transaction + if (transaction.length === 9) { + return tx; + } + tx.hash = keccak256(payload); + _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); + return tx; +} +function _parseEip2930(payload) { + const transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 8 && transaction.length !== 11) { + logger.throwArgumentError("invalid component count for transaction type: 1", "payload", hexlify(payload)); + } + const tx = { + type: 1, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + gasPrice: handleNumber(transaction[2]), + gasLimit: handleNumber(transaction[3]), + to: handleAddress(transaction[4]), + value: handleNumber(transaction[5]), + data: transaction[6], + accessList: accessListify(transaction[7]) + }; + // Unsigned EIP-2930 Transaction + if (transaction.length === 8) { + return tx; + } + tx.hash = keccak256(payload); + _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); + return tx; +} +// Legacy Transactions and EIP-155 +function _parse(rawTransaction) { + const transaction = RLP.decode(rawTransaction); + if (transaction.length !== 9 && transaction.length !== 6) { + logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + } + const tx = { + nonce: handleNumber(transaction[0]).toNumber(), + gasPrice: handleNumber(transaction[1]), + gasLimit: handleNumber(transaction[2]), + to: handleAddress(transaction[3]), + value: handleNumber(transaction[4]), + data: transaction[5], + chainId: 0 + }; + // Legacy unsigned transaction + if (transaction.length === 6) { + return tx; + } + try { + tx.v = BigNumber.from(transaction[6]).toNumber(); + } + catch (error) { + console.log(error); + return tx; + } + tx.r = hexZeroPad(transaction[7], 32); + tx.s = hexZeroPad(transaction[8], 32); + if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) { + // EIP-155 unsigned transaction + tx.chainId = tx.v; + tx.v = 0; + } + else { + // Signed Transaction + tx.chainId = Math.floor((tx.v - 35) / 2); + if (tx.chainId < 0) { + tx.chainId = 0; + } + let recoveryParam = tx.v - 27; + const raw = transaction.slice(0, 6); + if (tx.chainId !== 0) { + raw.push(hexlify(tx.chainId)); + raw.push("0x"); + raw.push("0x"); + recoveryParam -= tx.chainId * 2 + 8; + } + const digest = keccak256(RLP.encode(raw)); + try { + tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam }); + } + catch (error) { + console.log(error); + } + tx.hash = keccak256(rawTransaction); + } + tx.type = null; + return tx; +} +export function parse(rawTransaction) { + const payload = arrayify(rawTransaction); + // Legacy and EIP-155 Transactions + if (payload[0] > 0x7f) { + return _parse(payload); + } + // Typed Transaction (EIP-2718) + switch (payload[0]) { + case 1: + return _parseEip2930(payload); + case 2: + return _parseEip1559(payload); + default: + break; + } + return logger.throwError(`unsupported transaction type: ${payload[0]}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "parseTransaction", + transactionType: payload[0] + }); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib.esm/index.js.map b/node_modules/@ethersproject/transactions/lib.esm/index.js.map new file mode 100644 index 0000000..ff9c4d7 --- /dev/null +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IAED,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;IAEf,OAAO,EAAE,CAAC;AACd,CAAC;AAGD,MAAM,UAAU,KAAK,CAAC,cAAyB;IAC3C,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEzC,kCAAkC;IAClC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;KAAE;IAElD,+BAA+B;IAC/B,QAAQ,OAAO,CAAC,CAAC,CAAC,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;QAClC,KAAK,CAAC;YACF,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;QAClC;YACI,MAAM;KACb;IAED,OAAO,MAAM,CAAC,UAAU,CAAC,iCAAkC,OAAO,CAAC,CAAC,CAAE,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;QAC3G,SAAS,EAAE,kBAAkB;QAC7B,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;KAC9B,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/_version.d.ts b/node_modules/@ethersproject/transactions/lib/_version.d.ts new file mode 100644 index 0000000..19c8d02 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "transactions/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/_version.d.ts.map b/node_modules/@ethersproject/transactions/lib/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/_version.js b/node_modules/@ethersproject/transactions/lib/_version.js new file mode 100644 index 0000000..86eec8b --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "transactions/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/_version.js.map b/node_modules/@ethersproject/transactions/lib/_version.js.map new file mode 100644 index 0000000..cb386e2 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/index.d.ts b/node_modules/@ethersproject/transactions/lib/index.d.ts new file mode 100644 index 0000000..011ecc2 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/index.d.ts @@ -0,0 +1,49 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { BytesLike, SignatureLike } from "@ethersproject/bytes"; +export declare type AccessList = Array<{ + address: string; + storageKeys: Array; +}>; +export declare type AccessListish = AccessList | Array<[string, Array]> | Record>; +export declare enum TransactionTypes { + legacy = 0, + eip2930 = 1, + eip1559 = 2 +} +export declare type UnsignedTransaction = { + to?: string; + nonce?: number; + gasLimit?: BigNumberish; + gasPrice?: BigNumberish; + data?: BytesLike; + value?: BigNumberish; + chainId?: number; + type?: number | null; + accessList?: AccessListish; + maxPriorityFeePerGas?: BigNumberish; + maxFeePerGas?: BigNumberish; +}; +export interface Transaction { + hash?: string; + to?: string; + from?: string; + nonce: number; + gasLimit: BigNumber; + gasPrice?: BigNumber; + data: string; + value: BigNumber; + chainId: number; + r?: string; + s?: string; + v?: number; + type?: number | null; + accessList?: AccessList; + maxPriorityFeePerGas?: BigNumber; + maxFeePerGas?: BigNumber; +} +export declare function computeAddress(key: BytesLike | string): string; +export declare function recoverAddress(digest: BytesLike, signature: SignatureLike): string; +export declare function accessListify(value: AccessListish): AccessList; +export declare function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string; +export declare function parse(rawTransaction: BytesLike): Transaction; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/index.d.ts.map b/node_modules/@ethersproject/transactions/lib/index.d.ts.map new file mode 100644 index 0000000..5d82ed6 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAAyF,aAAa,EAA+B,MAAM,sBAAsB,CAAC;AAc9L,oBAAY,UAAU,GAAG,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,CAAC;AAGhF,oBAAY,aAAa,GAAG,UAAU,GACV,KAAK,CAAC,CAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAE,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAE1D,oBAAY,gBAAgB;IACxB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,OAAO,IAAI;CACd;AAED,oBAAY,mBAAmB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAA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ethersproject/transactions/lib/index.js new file mode 100644 index 0000000..a9c75ad --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/index.js @@ -0,0 +1,416 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parse = exports.serialize = exports.accessListify = exports.recoverAddress = exports.computeAddress = exports.TransactionTypes = void 0; +var address_1 = require("@ethersproject/address"); +var bignumber_1 = require("@ethersproject/bignumber"); +var bytes_1 = require("@ethersproject/bytes"); +var constants_1 = require("@ethersproject/constants"); +var keccak256_1 = require("@ethersproject/keccak256"); +var properties_1 = require("@ethersproject/properties"); +var RLP = __importStar(require("@ethersproject/rlp")); +var signing_key_1 = require("@ethersproject/signing-key"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var TransactionTypes; +(function (TransactionTypes) { + TransactionTypes[TransactionTypes["legacy"] = 0] = "legacy"; + TransactionTypes[TransactionTypes["eip2930"] = 1] = "eip2930"; + TransactionTypes[TransactionTypes["eip1559"] = 2] = "eip1559"; +})(TransactionTypes = exports.TransactionTypes || (exports.TransactionTypes = {})); +; +/////////////////////////////// +function handleAddress(value) { + if (value === "0x") { + return null; + } + return (0, address_1.getAddress)(value); +} +function handleNumber(value) { + if (value === "0x") { + return constants_1.Zero; + } + return bignumber_1.BigNumber.from(value); +} +// Legacy Transaction Fields +var transactionFields = [ + { name: "nonce", maxLength: 32, numeric: true }, + { name: "gasPrice", maxLength: 32, numeric: true }, + { name: "gasLimit", maxLength: 32, numeric: true }, + { name: "to", length: 20 }, + { name: "value", maxLength: 32, numeric: true }, + { name: "data" }, +]; +var allowedTransactionKeys = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, type: true, value: true +}; +function computeAddress(key) { + var publicKey = (0, signing_key_1.computePublicKey)(key); + return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12)); +} +exports.computeAddress = computeAddress; +function recoverAddress(digest, signature) { + return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature)); +} +exports.recoverAddress = recoverAddress; +function formatNumber(value, name) { + var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString()); + if (result.length > 32) { + logger.throwArgumentError("invalid length for " + name, ("transaction:" + name), value); + } + return result; +} +function accessSetify(addr, storageKeys) { + return { + address: (0, address_1.getAddress)(addr), + storageKeys: (storageKeys || []).map(function (storageKey, index) { + if ((0, bytes_1.hexDataLength)(storageKey) !== 32) { + logger.throwArgumentError("invalid access list storageKey", "accessList[" + addr + ":" + index + "]", storageKey); + } + return storageKey.toLowerCase(); + }) + }; +} +function accessListify(value) { + if (Array.isArray(value)) { + return value.map(function (set, index) { + if (Array.isArray(set)) { + if (set.length > 2) { + logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value[" + index + "]", set); + } + return accessSetify(set[0], set[1]); + } + return accessSetify(set.address, set.storageKeys); + }); + } + var result = Object.keys(value).map(function (addr) { + var storageKeys = value[addr].reduce(function (accum, storageKey) { + accum[storageKey] = true; + return accum; + }, {}); + return accessSetify(addr, Object.keys(storageKeys).sort()); + }); + result.sort(function (a, b) { return (a.address.localeCompare(b.address)); }); + return result; +} +exports.accessListify = accessListify; +function formatAccessList(value) { + return accessListify(value).map(function (set) { return [set.address, set.storageKeys]; }); +} +function _serializeEip1559(transaction, signature) { + // If there is an explicit gasPrice, make sure it matches the + // EIP-1559 fees; otherwise they may not understand what they + // think they are setting in terms of fee. + if (transaction.gasPrice != null) { + var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice); + var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0); + if (!gasPrice.eq(maxFeePerGas)) { + logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + gasPrice: gasPrice, + maxFeePerGas: maxFeePerGas + }); + } + } + var fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), + formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? (0, address_1.getAddress)(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + var sig = (0, bytes_1.splitSignature)(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push((0, bytes_1.stripZeros)(sig.r)); + fields.push((0, bytes_1.stripZeros)(sig.s)); + } + return (0, bytes_1.hexConcat)(["0x02", RLP.encode(fields)]); +} +function _serializeEip2930(transaction, signature) { + var fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.gasPrice || 0, "gasPrice"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? (0, address_1.getAddress)(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + var sig = (0, bytes_1.splitSignature)(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push((0, bytes_1.stripZeros)(sig.r)); + fields.push((0, bytes_1.stripZeros)(sig.s)); + } + return (0, bytes_1.hexConcat)(["0x01", RLP.encode(fields)]); +} +// Legacy Transactions and EIP-155 +function _serialize(transaction, signature) { + (0, properties_1.checkProperties)(transaction, allowedTransactionKeys); + var raw = []; + transactionFields.forEach(function (fieldInfo) { + var value = transaction[fieldInfo.name] || ([]); + var options = {}; + if (fieldInfo.numeric) { + options.hexPad = "left"; + } + value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options)); + // Fixed-width field + if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + // Variable-width (with a maximum) + if (fieldInfo.maxLength) { + value = (0, bytes_1.stripZeros)(value); + if (value.length > fieldInfo.maxLength) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + } + raw.push((0, bytes_1.hexlify)(value)); + }); + var chainId = 0; + if (transaction.chainId != null) { + // A chainId was provided; if non-zero we'll use EIP-155 + chainId = transaction.chainId; + if (typeof (chainId) !== "number") { + logger.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + } + } + else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) { + // No chainId provided, but the signature is signing with EIP-155; derive chainId + chainId = Math.floor((signature.v - 35) / 2); + } + // We have an EIP-155 transaction (chainId was specified and non-zero) + if (chainId !== 0) { + raw.push((0, bytes_1.hexlify)(chainId)); // @TODO: hexValue? + raw.push("0x"); + raw.push("0x"); + } + // Requesting an unsigned transaction + if (!signature) { + return RLP.encode(raw); + } + // The splitSignature will ensure the transaction has a recoveryParam in the + // case that the signTransaction function only adds a v. + var sig = (0, bytes_1.splitSignature)(signature); + // We pushed a chainId and null r, s on for hashing only; remove those + var v = 27 + sig.recoveryParam; + if (chainId !== 0) { + raw.pop(); + raw.pop(); + raw.pop(); + v += chainId * 2 + 8; + // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it! + if (sig.v > 28 && sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + } + else if (sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + raw.push((0, bytes_1.hexlify)(v)); + raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r))); + raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s))); + return RLP.encode(raw); +} +function serialize(transaction, signature) { + // Legacy and EIP-155 Transactions + if (transaction.type == null || transaction.type === 0) { + if (transaction.accessList != null) { + logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + } + return _serialize(transaction, signature); + } + // Typed Transactions (EIP-2718) + switch (transaction.type) { + case 1: + return _serializeEip2930(transaction, signature); + case 2: + return _serializeEip1559(transaction, signature); + default: + break; + } + return logger.throwError("unsupported transaction type: " + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "serializeTransaction", + transactionType: transaction.type + }); +} +exports.serialize = serialize; +function _parseEipSignature(tx, fields, serialize) { + try { + var recid = handleNumber(fields[0]).toNumber(); + if (recid !== 0 && recid !== 1) { + throw new Error("bad recid"); + } + tx.v = recid; + } + catch (error) { + logger.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + } + tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32); + tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32); + try { + var digest = (0, keccak256_1.keccak256)(serialize(tx)); + tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); + } + catch (error) { + console.log(error); + } +} +function _parseEip1559(payload) { + var transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 9 && transaction.length !== 12) { + logger.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, bytes_1.hexlify)(payload)); + } + var maxPriorityFeePerGas = handleNumber(transaction[2]); + var maxFeePerGas = handleNumber(transaction[3]); + var tx = { + type: 2, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + maxPriorityFeePerGas: maxPriorityFeePerGas, + maxFeePerGas: maxFeePerGas, + gasPrice: null, + gasLimit: handleNumber(transaction[4]), + to: handleAddress(transaction[5]), + value: handleNumber(transaction[6]), + data: transaction[7], + accessList: accessListify(transaction[8]), + }; + // Unsigned EIP-1559 Transaction + if (transaction.length === 9) { + return tx; + } + tx.hash = (0, keccak256_1.keccak256)(payload); + _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); + return tx; +} +function _parseEip2930(payload) { + var transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 8 && transaction.length !== 11) { + logger.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, bytes_1.hexlify)(payload)); + } + var tx = { + type: 1, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + gasPrice: handleNumber(transaction[2]), + gasLimit: handleNumber(transaction[3]), + to: handleAddress(transaction[4]), + value: handleNumber(transaction[5]), + data: transaction[6], + accessList: accessListify(transaction[7]) + }; + // Unsigned EIP-2930 Transaction + if (transaction.length === 8) { + return tx; + } + tx.hash = (0, keccak256_1.keccak256)(payload); + _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); + return tx; +} +// Legacy Transactions and EIP-155 +function _parse(rawTransaction) { + var transaction = RLP.decode(rawTransaction); + if (transaction.length !== 9 && transaction.length !== 6) { + logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + } + var tx = { + nonce: handleNumber(transaction[0]).toNumber(), + gasPrice: handleNumber(transaction[1]), + gasLimit: handleNumber(transaction[2]), + to: handleAddress(transaction[3]), + value: handleNumber(transaction[4]), + data: transaction[5], + chainId: 0 + }; + // Legacy unsigned transaction + if (transaction.length === 6) { + return tx; + } + try { + tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber(); + } + catch (error) { + console.log(error); + return tx; + } + tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32); + tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32); + if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) { + // EIP-155 unsigned transaction + tx.chainId = tx.v; + tx.v = 0; + } + else { + // Signed Transaction + tx.chainId = Math.floor((tx.v - 35) / 2); + if (tx.chainId < 0) { + tx.chainId = 0; + } + var recoveryParam = tx.v - 27; + var raw = transaction.slice(0, 6); + if (tx.chainId !== 0) { + raw.push((0, bytes_1.hexlify)(tx.chainId)); + raw.push("0x"); + raw.push("0x"); + recoveryParam -= tx.chainId * 2 + 8; + } + var digest = (0, keccak256_1.keccak256)(RLP.encode(raw)); + try { + tx.from = recoverAddress(digest, { r: (0, bytes_1.hexlify)(tx.r), s: (0, bytes_1.hexlify)(tx.s), recoveryParam: recoveryParam }); + } + catch (error) { + console.log(error); + } + tx.hash = (0, keccak256_1.keccak256)(rawTransaction); + } + tx.type = null; + return tx; +} +function parse(rawTransaction) { + var payload = (0, bytes_1.arrayify)(rawTransaction); + // Legacy and EIP-155 Transactions + if (payload[0] > 0x7f) { + return _parse(payload); + } + // Typed Transaction (EIP-2718) + switch (payload[0]) { + case 1: + return _parseEip2930(payload); + case 2: + return _parseEip1559(payload); + default: + break; + } + return logger.throwError("unsupported transaction type: " + payload[0], logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "parseTransaction", + transactionType: payload[0] + }); +} +exports.parse = parse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/lib/index.js.map b/node_modules/@ethersproject/transactions/lib/index.js.map new file mode 100644 index 0000000..afc6fa4 --- /dev/null +++ b/node_modules/@ethersproject/transactions/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;AAEb,kDAAoD;AACpD,sDAAmE;AACn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CAAC,CAAC;KAAE;IAElD,+BAA+B;IAC/B,QAAQ,OAAO,CAAC,CAAC,CAAC,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;QAClC,KAAK,CAAC;YACF,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;QAClC;YACI,MAAM;KACb;IAED,OAAO,MAAM,CAAC,UAAU,CAAC,mCAAkC,OAAO,CAAC,CAAC,CAAI,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;QAC3G,SAAS,EAAE,kBAAkB;QAC7B,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;KAC9B,CAAC,CAAC;AACP,CAAC;AApBD,sBAoBC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/transactions/package.json b/node_modules/@ethersproject/transactions/package.json new file mode 100644 index 0000000..bca226d --- /dev/null +++ b/node_modules/@ethersproject/transactions/package.json @@ -0,0 +1,50 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/rlp": "^5.5.0", + "@ethersproject/signing-key": "^5.5.0" + }, + "description": "Utilities for decoding and encoding Ethereum transaction for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/transactions", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/transactions", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x2a703ae00409bf0122dd97bf8b4f33f71009dc9df625ff0dd0c391ef25189d65", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/transactions/src.ts/_version.ts b/node_modules/@ethersproject/transactions/src.ts/_version.ts new file mode 100644 index 0000000..f612dbe --- /dev/null +++ b/node_modules/@ethersproject/transactions/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "transactions/5.5.0"; diff --git a/node_modules/@ethersproject/transactions/src.ts/index.ts b/node_modules/@ethersproject/transactions/src.ts/index.ts new file mode 100644 index 0000000..c994deb --- /dev/null +++ b/node_modules/@ethersproject/transactions/src.ts/index.ts @@ -0,0 +1,503 @@ +"use strict"; + +import { getAddress } from "@ethersproject/address"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { arrayify, BytesLike, DataOptions, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, SignatureLike, splitSignature, stripZeros, } from "@ethersproject/bytes"; +import { Zero } from "@ethersproject/constants"; +import { keccak256 } from "@ethersproject/keccak256"; +import { checkProperties } from "@ethersproject/properties"; +import * as RLP from "@ethersproject/rlp"; +import { computePublicKey, recoverPublicKey } from "@ethersproject/signing-key"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +/////////////////////////////// +// Exported Types + +export type AccessList = Array<{ address: string, storageKeys: Array }>; + +// Input allows flexibility in describing an access list +export type AccessListish = AccessList | + Array<[ string, Array ]> | + Record>; + +export enum TransactionTypes { + legacy = 0, + eip2930 = 1, + eip1559 = 2, +}; + +export type UnsignedTransaction = { + to?: string; + nonce?: number; + + gasLimit?: BigNumberish; + gasPrice?: BigNumberish; + + data?: BytesLike; + value?: BigNumberish; + chainId?: number; + + // Typed-Transaction features + type?: number | null; + + // EIP-2930; Type 1 & EIP-1559; Type 2 + accessList?: AccessListish; + + // EIP-1559; Type 2 + maxPriorityFeePerGas?: BigNumberish; + maxFeePerGas?: BigNumberish; +} + +export interface Transaction { + hash?: string; + + to?: string; + from?: string; + nonce: number; + + gasLimit: BigNumber; + gasPrice?: BigNumber; + + data: string; + value: BigNumber; + chainId: number; + + r?: string; + s?: string; + v?: number; + + // Typed-Transaction features + type?: number | null; + + // EIP-2930; Type 1 & EIP-1559; Type 2 + accessList?: AccessList; + + // EIP-1559; Type 2 + maxPriorityFeePerGas?: BigNumber; + maxFeePerGas?: BigNumber; +} + +/////////////////////////////// + +function handleAddress(value: string): string { + if (value === "0x") { return null; } + return getAddress(value); +} + +function handleNumber(value: string): BigNumber { + if (value === "0x") { return Zero; } + return BigNumber.from(value); +} + +// Legacy Transaction Fields +const transactionFields = [ + { name: "nonce", maxLength: 32, numeric: true }, + { name: "gasPrice", maxLength: 32, numeric: true }, + { name: "gasLimit", maxLength: 32, numeric: true }, + { name: "to", length: 20 }, + { name: "value", maxLength: 32, numeric: true }, + { name: "data" }, +]; + +const allowedTransactionKeys: { [ key: string ]: boolean } = { + chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, type: true, value: true +} + +export function computeAddress(key: BytesLike | string): string { + const publicKey = computePublicKey(key); + return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12)); +} + +export function recoverAddress(digest: BytesLike, signature: SignatureLike): string { + return computeAddress(recoverPublicKey(arrayify(digest), signature)); +} + +function formatNumber(value: BigNumberish, name: string): Uint8Array { + const result = stripZeros(BigNumber.from(value).toHexString()); + if (result.length > 32) { + logger.throwArgumentError("invalid length for " + name, ("transaction:" + name), value); + } + return result; +} + +function accessSetify(addr: string, storageKeys: Array): { address: string,storageKeys: Array } { + return { + address: getAddress(addr), + storageKeys: (storageKeys || []).map((storageKey, index) => { + if (hexDataLength(storageKey) !== 32) { + logger.throwArgumentError("invalid access list storageKey", `accessList[${ addr }:${ index }]`, storageKey) + } + return storageKey.toLowerCase(); + }) + }; +} + +export function accessListify(value: AccessListish): AccessList { + if (Array.isArray(value)) { + return (] | { address: string, storageKeys: Array}>>value).map((set, index) => { + if (Array.isArray(set)) { + if (set.length > 2) { + logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", `value[${ index }]`, set); + } + return accessSetify(set[0], set[1]) + } + return accessSetify(set.address, set.storageKeys); + }); + } + + const result: Array<{ address: string, storageKeys: Array }> = Object.keys(value).map((addr) => { + const storageKeys: Record = value[addr].reduce((accum, storageKey) => { + accum[storageKey] = true; + return accum; + }, >{ }); + return accessSetify(addr, Object.keys(storageKeys).sort()) + }); + result.sort((a, b) => (a.address.localeCompare(b.address))); + return result; +} + +function formatAccessList(value: AccessListish): Array<[ string, Array ]> { + return accessListify(value).map((set) => [ set.address, set.storageKeys ]); +} + +function _serializeEip1559(transaction: UnsignedTransaction, signature?: SignatureLike): string { + // If there is an explicit gasPrice, make sure it matches the + // EIP-1559 fees; otherwise they may not understand what they + // think they are setting in terms of fee. + if (transaction.gasPrice != null) { + const gasPrice = BigNumber.from(transaction.gasPrice); + const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0); + if (!gasPrice.eq(maxFeePerGas)) { + logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + gasPrice, maxFeePerGas + }); + } + } + + const fields: any = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), + formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? getAddress(transaction.to): "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + + if (signature) { + const sig = splitSignature(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push(stripZeros(sig.r)); + fields.push(stripZeros(sig.s)); + } + + return hexConcat([ "0x02", RLP.encode(fields)]); +} + +function _serializeEip2930(transaction: UnsignedTransaction, signature?: SignatureLike): string { + const fields: any = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.gasPrice || 0, "gasPrice"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? getAddress(transaction.to): "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + + if (signature) { + const sig = splitSignature(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push(stripZeros(sig.r)); + fields.push(stripZeros(sig.s)); + } + + return hexConcat([ "0x01", RLP.encode(fields)]); +} + +// Legacy Transactions and EIP-155 +function _serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string { + checkProperties(transaction, allowedTransactionKeys); + + const raw: Array = []; + + transactionFields.forEach(function(fieldInfo) { + let value = (transaction)[fieldInfo.name] || ([]); + const options: DataOptions = { }; + if (fieldInfo.numeric) { options.hexPad = "left"; } + value = arrayify(hexlify(value, options)); + + // Fixed-width field + if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + + // Variable-width (with a maximum) + if (fieldInfo.maxLength) { + value = stripZeros(value); + if (value.length > fieldInfo.maxLength) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value ); + } + } + + raw.push(hexlify(value)); + }); + + let chainId = 0; + if (transaction.chainId != null) { + // A chainId was provided; if non-zero we'll use EIP-155 + chainId = transaction.chainId; + + if (typeof(chainId) !== "number") { + logger.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + } + + } else if (signature && !isBytesLike(signature) && signature.v > 28) { + // No chainId provided, but the signature is signing with EIP-155; derive chainId + chainId = Math.floor((signature.v - 35) / 2); + } + + // We have an EIP-155 transaction (chainId was specified and non-zero) + if (chainId !== 0) { + raw.push(hexlify(chainId)); // @TODO: hexValue? + raw.push("0x"); + raw.push("0x"); + } + + // Requesting an unsigned transaction + if (!signature) { + return RLP.encode(raw); + } + + // The splitSignature will ensure the transaction has a recoveryParam in the + // case that the signTransaction function only adds a v. + const sig = splitSignature(signature); + + // We pushed a chainId and null r, s on for hashing only; remove those + let v = 27 + sig.recoveryParam + if (chainId !== 0) { + raw.pop(); + raw.pop(); + raw.pop(); + v += chainId * 2 + 8; + + // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it! + if (sig.v > 28 && sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + } else if (sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + + raw.push(hexlify(v)); + raw.push(stripZeros(arrayify(sig.r))); + raw.push(stripZeros(arrayify(sig.s))); + + return RLP.encode(raw); +} + +export function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string { + // Legacy and EIP-155 Transactions + if (transaction.type == null || transaction.type === 0) { + if (transaction.accessList != null) { + logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + } + return _serialize(transaction, signature); + } + + // Typed Transactions (EIP-2718) + switch (transaction.type) { + case 1: + return _serializeEip2930(transaction, signature); + case 2: + return _serializeEip1559(transaction, signature); + default: + break; + } + + return logger.throwError(`unsupported transaction type: ${ transaction.type }`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "serializeTransaction", + transactionType: transaction.type + }); +} + +function _parseEipSignature(tx: Transaction, fields: Array, serialize: (tx: UnsignedTransaction) => string): void { + try { + const recid = handleNumber(fields[0]).toNumber(); + if (recid !== 0 && recid !== 1) { throw new Error("bad recid"); } + tx.v = recid; + } catch (error) { + logger.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + } + + tx.r = hexZeroPad(fields[1], 32); + tx.s = hexZeroPad(fields[2], 32); + + try { + const digest = keccak256(serialize(tx)); + tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); + } catch (error) { + console.log(error); + } +} + +function _parseEip1559(payload: Uint8Array): Transaction { + const transaction = RLP.decode(payload.slice(1)); + + if (transaction.length !== 9 && transaction.length !== 12) { + logger.throwArgumentError("invalid component count for transaction type: 2", "payload", hexlify(payload)); + } + + const maxPriorityFeePerGas = handleNumber(transaction[2]); + const maxFeePerGas = handleNumber(transaction[3]); + const tx: Transaction = { + type: 2, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + maxPriorityFeePerGas: maxPriorityFeePerGas, + maxFeePerGas: maxFeePerGas, + gasPrice: null, + gasLimit: handleNumber(transaction[4]), + to: handleAddress(transaction[5]), + value: handleNumber(transaction[6]), + data: transaction[7], + accessList: accessListify(transaction[8]), + }; + + // Unsigned EIP-1559 Transaction + if (transaction.length === 9) { return tx; } + + tx.hash = keccak256(payload); + + _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); + + return tx; +} + +function _parseEip2930(payload: Uint8Array): Transaction { + const transaction = RLP.decode(payload.slice(1)); + + if (transaction.length !== 8 && transaction.length !== 11) { + logger.throwArgumentError("invalid component count for transaction type: 1", "payload", hexlify(payload)); + } + + const tx: Transaction = { + type: 1, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + gasPrice: handleNumber(transaction[2]), + gasLimit: handleNumber(transaction[3]), + to: handleAddress(transaction[4]), + value: handleNumber(transaction[5]), + data: transaction[6], + accessList: accessListify(transaction[7]) + }; + + // Unsigned EIP-2930 Transaction + if (transaction.length === 8) { return tx; } + + tx.hash = keccak256(payload); + + _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); + + return tx; +} + +// Legacy Transactions and EIP-155 +function _parse(rawTransaction: Uint8Array): Transaction { + const transaction = RLP.decode(rawTransaction); + + if (transaction.length !== 9 && transaction.length !== 6) { + logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + } + + const tx: Transaction = { + nonce: handleNumber(transaction[0]).toNumber(), + gasPrice: handleNumber(transaction[1]), + gasLimit: handleNumber(transaction[2]), + to: handleAddress(transaction[3]), + value: handleNumber(transaction[4]), + data: transaction[5], + chainId: 0 + }; + + // Legacy unsigned transaction + if (transaction.length === 6) { return tx; } + + try { + tx.v = BigNumber.from(transaction[6]).toNumber(); + + } catch (error) { + console.log(error); + return tx; + } + + tx.r = hexZeroPad(transaction[7], 32); + tx.s = hexZeroPad(transaction[8], 32); + + if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) { + // EIP-155 unsigned transaction + tx.chainId = tx.v; + tx.v = 0; + + } else { + // Signed Transaction + + tx.chainId = Math.floor((tx.v - 35) / 2); + if (tx.chainId < 0) { tx.chainId = 0; } + + let recoveryParam = tx.v - 27; + + const raw = transaction.slice(0, 6); + + if (tx.chainId !== 0) { + raw.push(hexlify(tx.chainId)); + raw.push("0x"); + raw.push("0x"); + recoveryParam -= tx.chainId * 2 + 8; + } + + const digest = keccak256(RLP.encode(raw)); + try { + tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam }); + } catch (error) { + console.log(error); + } + + tx.hash = keccak256(rawTransaction); + } + + tx.type = null; + + return tx; +} + + +export function parse(rawTransaction: BytesLike): Transaction { + const payload = arrayify(rawTransaction); + + // Legacy and EIP-155 Transactions + if (payload[0] > 0x7f) { return _parse(payload); } + + // Typed Transaction (EIP-2718) + switch (payload[0]) { + case 1: + return _parseEip2930(payload); + case 2: + return _parseEip1559(payload); + default: + break; + } + + return logger.throwError(`unsupported transaction type: ${ payload[0] }`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "parseTransaction", + transactionType: payload[0] + }); +} + diff --git a/node_modules/@ethersproject/units/LICENSE.md b/node_modules/@ethersproject/units/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/units/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/units/README.md b/node_modules/@ethersproject/units/README.md new file mode 100644 index 0000000..140220f --- /dev/null +++ b/node_modules/@ethersproject/units/README.md @@ -0,0 +1,36 @@ +Ethereum Unit Conversion Utilities +================================== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains functions to convert between string representations and numeric +representations of numbers, including those out of the range of JavaScript. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/display-logic/). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + formatUnits, + parseUnits, + + formatEther, + parseEther, + + commify + +} = require("@ethersproject/units"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/units/lib.esm/_version.d.ts b/node_modules/@ethersproject/units/lib.esm/_version.d.ts new file mode 100644 index 0000000..465ae68 --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "units/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/units/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/_version.js b/node_modules/@ethersproject/units/lib.esm/_version.js new file mode 100644 index 0000000..07599fb --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "units/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/_version.js.map b/node_modules/@ethersproject/units/lib.esm/_version.js.map new file mode 100644 index 0000000..2b36b38 --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/index.d.ts b/node_modules/@ethersproject/units/lib.esm/index.d.ts new file mode 100644 index 0000000..eb7e66d --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/index.d.ts @@ -0,0 +1,7 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +export declare function commify(value: string | number): string; +export declare function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string; +export declare function parseUnits(value: string, unitName?: BigNumberish): BigNumber; +export declare function formatEther(wei: BigNumberish): string; +export declare function parseEther(ether: string): BigNumber; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/index.d.ts.map b/node_modules/@ethersproject/units/lib.esm/index.d.ts.map new file mode 100644 index 0000000..b63548b --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBnE,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAuCtD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CAMzF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAS5E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAErD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAEnD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/index.js b/node_modules/@ethersproject/units/lib.esm/index.js new file mode 100644 index 0000000..43cda85 --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/index.js @@ -0,0 +1,84 @@ +"use strict"; +import { formatFixed, parseFixed } from "@ethersproject/bignumber"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +const names = [ + "wei", + "kwei", + "mwei", + "gwei", + "szabo", + "finney", + "ether", +]; +// Some environments have issues with RegEx that contain back-tracking, so we cannot +// use them. +export function commify(value) { + const comps = String(value).split("."); + if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") { + logger.throwArgumentError("invalid value", "value", value); + } + // Make sure we have at least one whole digit (0 if none) + let whole = comps[0]; + let negative = ""; + if (whole.substring(0, 1) === "-") { + negative = "-"; + whole = whole.substring(1); + } + // Make sure we have at least 1 whole digit with no leading zeros + while (whole.substring(0, 1) === "0") { + whole = whole.substring(1); + } + if (whole === "") { + whole = "0"; + } + let suffix = ""; + if (comps.length === 2) { + suffix = "." + (comps[1] || "0"); + } + while (suffix.length > 2 && suffix[suffix.length - 1] === "0") { + suffix = suffix.substring(0, suffix.length - 1); + } + const formatted = []; + while (whole.length) { + if (whole.length <= 3) { + formatted.unshift(whole); + break; + } + else { + const index = whole.length - 3; + formatted.unshift(whole.substring(index)); + whole = whole.substring(0, index); + } + } + return negative + formatted.join(",") + suffix; +} +export function formatUnits(value, unitName) { + if (typeof (unitName) === "string") { + const index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return formatFixed(value, (unitName != null) ? unitName : 18); +} +export function parseUnits(value, unitName) { + if (typeof (value) !== "string") { + logger.throwArgumentError("value must be a string", "value", value); + } + if (typeof (unitName) === "string") { + const index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return parseFixed(value, (unitName != null) ? unitName : 18); +} +export function formatEther(wei) { + return formatUnits(wei, 18); +} +export function parseEther(ether) { + return parseUnits(ether, 18); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib.esm/index.js.map b/node_modules/@ethersproject/units/lib.esm/index.js.map new file mode 100644 index 0000000..dc4a967 --- /dev/null +++ b/node_modules/@ethersproject/units/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,MAAM,KAAK,GAAG;IAC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D,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,EAAE;QAC5B,MAAM,CAAC,kBAAkB,CAAC,wBAAwB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KACvE;IACD,IAAI,OAAM,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAAE,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC;SAAE;KAC9C;IACD,OAAO,UAAU,CAAC,KAAK,EAAE,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA,CAAC,CAAC,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAiB;IACzC,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAa;IACpC,OAAO,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/_version.d.ts b/node_modules/@ethersproject/units/lib/_version.d.ts new file mode 100644 index 0000000..465ae68 --- /dev/null +++ b/node_modules/@ethersproject/units/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "units/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/_version.d.ts.map b/node_modules/@ethersproject/units/lib/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/node_modules/@ethersproject/units/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/_version.js b/node_modules/@ethersproject/units/lib/_version.js new file mode 100644 index 0000000..dad01a8 --- /dev/null +++ b/node_modules/@ethersproject/units/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "units/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/_version.js.map b/node_modules/@ethersproject/units/lib/_version.js.map new file mode 100644 index 0000000..2f9c571 --- /dev/null +++ b/node_modules/@ethersproject/units/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/index.d.ts b/node_modules/@ethersproject/units/lib/index.d.ts new file mode 100644 index 0000000..eb7e66d --- /dev/null +++ b/node_modules/@ethersproject/units/lib/index.d.ts @@ -0,0 +1,7 @@ +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +export declare function commify(value: string | number): string; +export declare function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string; +export declare function parseUnits(value: string, unitName?: BigNumberish): BigNumber; +export declare function formatEther(wei: BigNumberish): string; +export declare function parseEther(ether: string): BigNumber; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/index.d.ts.map b/node_modules/@ethersproject/units/lib/index.d.ts.map new file mode 100644 index 0000000..b63548b --- /dev/null +++ b/node_modules/@ethersproject/units/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBnE,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAuCtD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CAMzF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAS5E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAErD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAEnD"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/index.js b/node_modules/@ethersproject/units/lib/index.js new file mode 100644 index 0000000..dcbf23a --- /dev/null +++ b/node_modules/@ethersproject/units/lib/index.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseEther = exports.formatEther = exports.parseUnits = exports.formatUnits = exports.commify = void 0; +var bignumber_1 = require("@ethersproject/bignumber"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var names = [ + "wei", + "kwei", + "mwei", + "gwei", + "szabo", + "finney", + "ether", +]; +// Some environments have issues with RegEx that contain back-tracking, so we cannot +// use them. +function commify(value) { + var comps = String(value).split("."); + if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") { + logger.throwArgumentError("invalid value", "value", value); + } + // Make sure we have at least one whole digit (0 if none) + var whole = comps[0]; + var negative = ""; + if (whole.substring(0, 1) === "-") { + negative = "-"; + whole = whole.substring(1); + } + // Make sure we have at least 1 whole digit with no leading zeros + while (whole.substring(0, 1) === "0") { + whole = whole.substring(1); + } + if (whole === "") { + whole = "0"; + } + var suffix = ""; + if (comps.length === 2) { + suffix = "." + (comps[1] || "0"); + } + while (suffix.length > 2 && suffix[suffix.length - 1] === "0") { + suffix = suffix.substring(0, suffix.length - 1); + } + var formatted = []; + while (whole.length) { + if (whole.length <= 3) { + formatted.unshift(whole); + break; + } + else { + var index = whole.length - 3; + formatted.unshift(whole.substring(index)); + whole = whole.substring(0, index); + } + } + return negative + formatted.join(",") + suffix; +} +exports.commify = commify; +function formatUnits(value, unitName) { + if (typeof (unitName) === "string") { + var index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return (0, bignumber_1.formatFixed)(value, (unitName != null) ? unitName : 18); +} +exports.formatUnits = formatUnits; +function parseUnits(value, unitName) { + if (typeof (value) !== "string") { + logger.throwArgumentError("value must be a string", "value", value); + } + if (typeof (unitName) === "string") { + var index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return (0, bignumber_1.parseFixed)(value, (unitName != null) ? unitName : 18); +} +exports.parseUnits = parseUnits; +function formatEther(wei) { + return formatUnits(wei, 18); +} +exports.formatEther = formatEther; +function parseEther(ether) { + return parseUnits(ether, 18); +} +exports.parseEther = parseEther; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/units/lib/index.js.map b/node_modules/@ethersproject/units/lib/index.js.map new file mode 100644 index 0000000..492bf55 --- /dev/null +++ b/node_modules/@ethersproject/units/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,sDAAmE;AAEnE,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,IAAM,KAAK,GAAG;IACV,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,OAAO;CACV,CAAC;AAGF,oFAAoF;AACpF,YAAY;AACZ,SAAgB,OAAO,CAAC,KAAsB;IAC1C,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEvC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IA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AAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAAE,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC;SAAE;KAC9C;IACD,OAAO,IAAA,sBAAU,EAAC,KAAK,EAAE,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA,CAAC,CAAC,EAAE,CAAC,CAAC;AAChE,CAAC;AATD,gCASC;AAED,SAAgB,WAAW,CAAC,GAAiB;IACzC,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAFD,kCAEC;AAED,SAAgB,UAAU,CAAC,KAAa;IACpC,OAAO,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/units/package.json b/node_modules/@ethersproject/units/package.json new file mode 100644 index 0000000..8e2b341 --- /dev/null +++ b/node_modules/@ethersproject/units/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/constants": "^5.5.0", + "@ethersproject/logger": "^5.5.0" + }, + "description": "Unit conversion functions for Ethereum.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers", + "units", + "conversion" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/units", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/units", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x556c2f67aa5bfbf0cb1436f4d6d62fe25403fd58a958d7d8e0b06903091dedb5", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/units/src.ts/_version.ts b/node_modules/@ethersproject/units/src.ts/_version.ts new file mode 100644 index 0000000..e99564d --- /dev/null +++ b/node_modules/@ethersproject/units/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "units/5.5.0"; diff --git a/node_modules/@ethersproject/units/src.ts/index.ts b/node_modules/@ethersproject/units/src.ts/index.ts new file mode 100644 index 0000000..5b2cdad --- /dev/null +++ b/node_modules/@ethersproject/units/src.ts/index.ts @@ -0,0 +1,90 @@ +"use strict"; + +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { formatFixed, parseFixed } from "@ethersproject/bignumber"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +const names = [ + "wei", + "kwei", + "mwei", + "gwei", + "szabo", + "finney", + "ether", +]; + + +// Some environments have issues with RegEx that contain back-tracking, so we cannot +// use them. +export function commify(value: string | number): string { + const comps = String(value).split("."); + + if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") { + logger.throwArgumentError("invalid value", "value", value); + } + + // Make sure we have at least one whole digit (0 if none) + let whole = comps[0]; + + let negative = ""; + if (whole.substring(0, 1) === "-") { + negative = "-"; + whole = whole.substring(1); + } + + // Make sure we have at least 1 whole digit with no leading zeros + while (whole.substring(0, 1) === "0") { whole = whole.substring(1); } + if (whole === "") { whole = "0"; } + + let suffix = ""; + if (comps.length === 2) { suffix = "." + (comps[1] || "0"); } + while (suffix.length > 2 && suffix[suffix.length - 1] === "0") { + suffix = suffix.substring(0, suffix.length - 1); + } + + const formatted = []; + while (whole.length) { + if (whole.length <= 3) { + formatted.unshift(whole); + break; + } else { + const index = whole.length - 3; + formatted.unshift(whole.substring(index)); + whole = whole.substring(0, index); + } + } + + return negative + formatted.join(",") + suffix; +} + +export function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string { + if (typeof(unitName) === "string") { + const index = names.indexOf(unitName); + if (index !== -1) { unitName = 3 * index; } + } + return formatFixed(value, (unitName != null) ? unitName: 18); +} + +export function parseUnits(value: string, unitName?: BigNumberish): BigNumber { + if (typeof(value) !== "string") { + logger.throwArgumentError("value must be a string", "value", value); + } + if (typeof(unitName) === "string") { + const index = names.indexOf(unitName); + if (index !== -1) { unitName = 3 * index; } + } + return parseFixed(value, (unitName != null) ? unitName: 18); +} + +export function formatEther(wei: BigNumberish): string { + return formatUnits(wei, 18); +} + +export function parseEther(ether: string): BigNumber { + return parseUnits(ether, 18); +} + diff --git a/node_modules/@ethersproject/wallet/LICENSE.md b/node_modules/@ethersproject/wallet/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/wallet/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/wallet/README.md b/node_modules/@ethersproject/wallet/README.md new file mode 100644 index 0000000..d6fea3e --- /dev/null +++ b/node_modules/@ethersproject/wallet/README.md @@ -0,0 +1,32 @@ +Ethereum Wallet +=============== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains the class to manage a private key and signing for a standard +externally-owned account. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/signer/#Wallet). + + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + Wallet, + + verifyMessage + +} = require("@ethersproject/wallet"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts b/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts new file mode 100644 index 0000000..ff5ab7c --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "wallet/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/_version.js b/node_modules/@ethersproject/wallet/lib.esm/_version.js new file mode 100644 index 0000000..53e0271 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "wallet/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/_version.js.map b/node_modules/@ethersproject/wallet/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/index.d.ts b/node_modules/@ethersproject/wallet/lib.esm/index.d.ts new file mode 100644 index 0000000..2c2723c --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/index.d.ts @@ -0,0 +1,33 @@ +import { Provider, TransactionRequest } from "@ethersproject/abstract-provider"; +import { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer"; +import { Bytes, BytesLike, SignatureLike } from "@ethersproject/bytes"; +import { Mnemonic } from "@ethersproject/hdnode"; +import { SigningKey } from "@ethersproject/signing-key"; +import { ProgressCallback } from "@ethersproject/json-wallets"; +import { Wordlist } from "@ethersproject/wordlists"; +export declare class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner { + readonly address: string; + readonly provider: Provider; + readonly _signingKey: () => SigningKey; + readonly _mnemonic: () => Mnemonic; + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider); + get mnemonic(): Mnemonic; + get privateKey(): string; + get publicKey(): string; + getAddress(): Promise; + connect(provider: Provider): Wallet; + signTransaction(transaction: TransactionRequest): Promise; + signMessage(message: Bytes | string): Promise; + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; + encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise; + /** + * Static methods to create Wallet instances. + */ + static createRandom(options?: any): Wallet; + static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; + static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet; + static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet; +} +export declare function verifyMessage(message: Bytes | string, signature: SignatureLike): string; +export declare function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/index.d.ts.map b/node_modules/@ethersproject/wallet/lib.esm/index.d.ts.map new file mode 100644 index 0000000..bce0ba5 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClI,OAAO,EAAY,KAAK,EAAE,SAAS,EAAoD,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEnI,OAAO,EAA0C,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIzF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAA6D,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE1H,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAepD,qBAAa,MAAO,SAAQ,MAAO,YAAW,sBAAsB,EAAE,eAAe;IAEjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAI5B,QAAQ,CAAC,WAAW,EAAE,MAAM,UAAU,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,QAAQ,CAAC;gBAEvB,UAAU,EAAE,SAAS,GAAG,sBAAsB,GAAG,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAiE5F,IAAI,QAAQ,IAAI,QAAQ,CAA6B;IACrD,IAAI,UAAU,IAAI,MAAM,CAA0C;IAClE,IAAI,SAAS,IAAI,MAAM,CAAyC;IAEhE,UAAU,IAAI,OAAO,CAAC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,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAEnK"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/index.js b/node_modules/@ethersproject/wallet/lib.esm/index.js new file mode 100644 index 0000000..0eb48d1 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/index.js @@ -0,0 +1,177 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { getAddress } from "@ethersproject/address"; +import { Provider } from "@ethersproject/abstract-provider"; +import { Signer } from "@ethersproject/abstract-signer"; +import { arrayify, concat, hexDataSlice, isHexString, joinSignature } from "@ethersproject/bytes"; +import { hashMessage, _TypedDataEncoder } from "@ethersproject/hash"; +import { defaultPath, HDNode, entropyToMnemonic } from "@ethersproject/hdnode"; +import { keccak256 } from "@ethersproject/keccak256"; +import { defineReadOnly, resolveProperties } from "@ethersproject/properties"; +import { randomBytes } from "@ethersproject/random"; +import { SigningKey } from "@ethersproject/signing-key"; +import { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore } from "@ethersproject/json-wallets"; +import { computeAddress, recoverAddress, serialize } from "@ethersproject/transactions"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +function isAccount(value) { + return (value != null && isHexString(value.privateKey, 32) && value.address != null); +} +function hasMnemonic(value) { + const mnemonic = value.mnemonic; + return (mnemonic && mnemonic.phrase); +} +export class Wallet extends Signer { + constructor(privateKey, provider) { + logger.checkNew(new.target, Wallet); + super(); + if (isAccount(privateKey)) { + const signingKey = new SigningKey(privateKey.privateKey); + defineReadOnly(this, "_signingKey", () => signingKey); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + if (this.address !== getAddress(privateKey.address)) { + logger.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); + } + if (hasMnemonic(privateKey)) { + const srcMnemonic = privateKey.mnemonic; + defineReadOnly(this, "_mnemonic", () => ({ + phrase: srcMnemonic.phrase, + path: srcMnemonic.path || defaultPath, + locale: srcMnemonic.locale || "en" + })); + const mnemonic = this.mnemonic; + const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path); + if (computeAddress(node.privateKey) !== this.address) { + logger.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); + } + } + else { + defineReadOnly(this, "_mnemonic", () => null); + } + } + else { + if (SigningKey.isSigningKey(privateKey)) { + /* istanbul ignore if */ + if (privateKey.curve !== "secp256k1") { + logger.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); + } + defineReadOnly(this, "_signingKey", () => privateKey); + } + else { + // A lot of common tools do not prefix private keys with a 0x (see: #1166) + if (typeof (privateKey) === "string") { + if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { + privateKey = "0x" + privateKey; + } + } + const signingKey = new SigningKey(privateKey); + defineReadOnly(this, "_signingKey", () => signingKey); + } + defineReadOnly(this, "_mnemonic", () => null); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + } + /* istanbul ignore if */ + if (provider && !Provider.isProvider(provider)) { + logger.throwArgumentError("invalid provider", "provider", provider); + } + defineReadOnly(this, "provider", provider || null); + } + get mnemonic() { return this._mnemonic(); } + get privateKey() { return this._signingKey().privateKey; } + get publicKey() { return this._signingKey().publicKey; } + getAddress() { + return Promise.resolve(this.address); + } + connect(provider) { + return new Wallet(this, provider); + } + signTransaction(transaction) { + return resolveProperties(transaction).then((tx) => { + if (tx.from != null) { + if (getAddress(tx.from) !== this.address) { + logger.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); + } + delete tx.from; + } + const signature = this._signingKey().signDigest(keccak256(serialize(tx))); + return serialize(tx, signature); + }); + } + signMessage(message) { + return __awaiter(this, void 0, void 0, function* () { + return joinSignature(this._signingKey().signDigest(hashMessage(message))); + }); + } + _signTypedData(domain, types, value) { + return __awaiter(this, void 0, void 0, function* () { + // Populate any ENS names + const populated = yield _TypedDataEncoder.resolveNames(domain, types, value, (name) => { + if (this.provider == null) { + logger.throwError("cannot resolve ENS names without a provider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName", + value: name + }); + } + return this.provider.resolveName(name); + }); + return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value))); + }); + } + encrypt(password, options, progressCallback) { + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (progressCallback && typeof (progressCallback) !== "function") { + throw new Error("invalid callback"); + } + if (!options) { + options = {}; + } + return encryptKeystore(this, password, options, progressCallback); + } + /** + * Static methods to create Wallet instances. + */ + static createRandom(options) { + let entropy = randomBytes(16); + if (!options) { + options = {}; + } + if (options.extraEntropy) { + entropy = arrayify(hexDataSlice(keccak256(concat([entropy, options.extraEntropy])), 0, 16)); + } + const mnemonic = entropyToMnemonic(entropy, options.locale); + return Wallet.fromMnemonic(mnemonic, options.path, options.locale); + } + static fromEncryptedJson(json, password, progressCallback) { + return decryptJsonWallet(json, password, progressCallback).then((account) => { + return new Wallet(account); + }); + } + static fromEncryptedJsonSync(json, password) { + return new Wallet(decryptJsonWalletSync(json, password)); + } + static fromMnemonic(mnemonic, path, wordlist) { + if (!path) { + path = defaultPath; + } + return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path)); + } +} +export function verifyMessage(message, signature) { + return recoverAddress(hashMessage(message), signature); +} +export function verifyTypedData(domain, types, value, signature) { + return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib.esm/index.js.map b/node_modules/@ethersproject/wallet/lib.esm/index.js.map new file mode 100644 index 0000000..56c1f76 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAsB,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAA0B,MAAM,EAAoD,MAAM,gCAAgC,CAAC;AAClI,OAAO,EAAE,QAAQ,EAAoB,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAiB,MAAM,sBAAsB,CAAC;AACnI,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAY,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,eAAe,EAAoB,MAAM,6BAA6B,CAAC;AAC1H,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAuB,MAAM,6BAA6B,CAAC;AAG7G,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,SAAS,SAA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,CAAC,YAAY,CAAC,QAAgB,EAAE,IAAa,EAAE,QAAmB;QACpE,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,GAAG,WAAW,CAAC;SAAE;QAClC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACtF,CAAC;CACJ;AAED,MAAM,UAAU,aAAa,CAAC,OAAuB,EAAE,SAAwB;IAC3E,OAAO,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAuB,EAAE,KAA4C,EAAE,KAA0B,EAAE,SAAwB;IACvJ,OAAO,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/_version.d.ts b/node_modules/@ethersproject/wallet/lib/_version.d.ts new file mode 100644 index 0000000..ff5ab7c --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "wallet/5.5.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/_version.d.ts.map b/node_modules/@ethersproject/wallet/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/_version.js b/node_modules/@ethersproject/wallet/lib/_version.js new file mode 100644 index 0000000..e2eb567 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "wallet/5.5.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/_version.js.map b/node_modules/@ethersproject/wallet/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/index.d.ts b/node_modules/@ethersproject/wallet/lib/index.d.ts new file mode 100644 index 0000000..2c2723c --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/index.d.ts @@ -0,0 +1,33 @@ +import { Provider, TransactionRequest } from "@ethersproject/abstract-provider"; +import { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer"; +import { Bytes, BytesLike, SignatureLike } from "@ethersproject/bytes"; +import { Mnemonic } from "@ethersproject/hdnode"; +import { SigningKey } from "@ethersproject/signing-key"; +import { ProgressCallback } from "@ethersproject/json-wallets"; +import { Wordlist } from "@ethersproject/wordlists"; +export declare class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner { + readonly address: string; + readonly provider: Provider; + readonly _signingKey: () => SigningKey; + readonly _mnemonic: () => Mnemonic; + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider); + get mnemonic(): Mnemonic; + get privateKey(): string; + get publicKey(): string; + getAddress(): Promise; + connect(provider: Provider): Wallet; + signTransaction(transaction: TransactionRequest): Promise; + signMessage(message: Bytes | string): Promise; + _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; + encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise; + /** + * Static methods to create Wallet instances. + */ + static createRandom(options?: any): Wallet; + static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; + static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet; + static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet; +} +export declare function verifyMessage(message: Bytes | string, signature: SignatureLike): string; +export declare function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/index.d.ts.map b/node_modules/@ethersproject/wallet/lib/index.d.ts.map new file mode 100644 index 0000000..bce0ba5 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClI,OAAO,EAAY,KAAK,EAAE,SAAS,EAAoD,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEnI,OAAO,EAA0C,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIzF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAA6D,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE1H,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAepD,qBAAa,MAAO,SAAQ,MAAO,YAAW,sBAAsB,EAAE,eAAe;IAEjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAI5B,QAAQ,CAAC,WAAW,EAAE,MAAM,UAAU,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE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,CAAC,EAAE,QAAQ,GAAG,MAAM;CAIpF;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAEvF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAEnK"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/index.js b/node_modules/@ethersproject/wallet/lib/index.js new file mode 100644 index 0000000..d48027a --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/index.js @@ -0,0 +1,251 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.verifyTypedData = exports.verifyMessage = exports.Wallet = void 0; +var address_1 = require("@ethersproject/address"); +var abstract_provider_1 = require("@ethersproject/abstract-provider"); +var abstract_signer_1 = require("@ethersproject/abstract-signer"); +var bytes_1 = require("@ethersproject/bytes"); +var hash_1 = require("@ethersproject/hash"); +var hdnode_1 = require("@ethersproject/hdnode"); +var keccak256_1 = require("@ethersproject/keccak256"); +var properties_1 = require("@ethersproject/properties"); +var random_1 = require("@ethersproject/random"); +var signing_key_1 = require("@ethersproject/signing-key"); +var json_wallets_1 = require("@ethersproject/json-wallets"); +var transactions_1 = require("@ethersproject/transactions"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function isAccount(value) { + return (value != null && (0, bytes_1.isHexString)(value.privateKey, 32) && value.address != null); +} +function hasMnemonic(value) { + var mnemonic = value.mnemonic; + return (mnemonic && mnemonic.phrase); +} +var Wallet = /** @class */ (function (_super) { + __extends(Wallet, _super); + function Wallet(privateKey, provider) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Wallet); + _this = _super.call(this) || this; + if (isAccount(privateKey)) { + var signingKey_1 = new signing_key_1.SigningKey(privateKey.privateKey); + (0, properties_1.defineReadOnly)(_this, "_signingKey", function () { return signingKey_1; }); + (0, properties_1.defineReadOnly)(_this, "address", (0, transactions_1.computeAddress)(_this.publicKey)); + if (_this.address !== (0, address_1.getAddress)(privateKey.address)) { + logger.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); + } + if (hasMnemonic(privateKey)) { + var srcMnemonic_1 = privateKey.mnemonic; + (0, properties_1.defineReadOnly)(_this, "_mnemonic", function () { return ({ + phrase: srcMnemonic_1.phrase, + path: srcMnemonic_1.path || hdnode_1.defaultPath, + locale: srcMnemonic_1.locale || "en" + }); }); + var mnemonic = _this.mnemonic; + var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path); + if ((0, transactions_1.computeAddress)(node.privateKey) !== _this.address) { + logger.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); + } + } + else { + (0, properties_1.defineReadOnly)(_this, "_mnemonic", function () { return null; }); + } + } + else { + if (signing_key_1.SigningKey.isSigningKey(privateKey)) { + /* istanbul ignore if */ + if (privateKey.curve !== "secp256k1") { + logger.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); + } + (0, properties_1.defineReadOnly)(_this, "_signingKey", function () { return privateKey; }); + } + else { + // A lot of common tools do not prefix private keys with a 0x (see: #1166) + if (typeof (privateKey) === "string") { + if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { + privateKey = "0x" + privateKey; + } + } + var signingKey_2 = new signing_key_1.SigningKey(privateKey); + (0, properties_1.defineReadOnly)(_this, "_signingKey", function () { return signingKey_2; }); + } + (0, properties_1.defineReadOnly)(_this, "_mnemonic", function () { return null; }); + (0, properties_1.defineReadOnly)(_this, "address", (0, transactions_1.computeAddress)(_this.publicKey)); + } + /* istanbul ignore if */ + if (provider && !abstract_provider_1.Provider.isProvider(provider)) { + logger.throwArgumentError("invalid provider", "provider", provider); + } + (0, properties_1.defineReadOnly)(_this, "provider", provider || null); + return _this; + } + Object.defineProperty(Wallet.prototype, "mnemonic", { + get: function () { return this._mnemonic(); }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Wallet.prototype, "privateKey", { + get: function () { return this._signingKey().privateKey; }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Wallet.prototype, "publicKey", { + get: function () { return this._signingKey().publicKey; }, + enumerable: false, + configurable: true + }); + Wallet.prototype.getAddress = function () { + return Promise.resolve(this.address); + }; + Wallet.prototype.connect = function (provider) { + return new Wallet(this, provider); + }; + Wallet.prototype.signTransaction = function (transaction) { + var _this = this; + return (0, properties_1.resolveProperties)(transaction).then(function (tx) { + if (tx.from != null) { + if ((0, address_1.getAddress)(tx.from) !== _this.address) { + logger.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); + } + delete tx.from; + } + var signature = _this._signingKey().signDigest((0, keccak256_1.keccak256)((0, transactions_1.serialize)(tx))); + return (0, transactions_1.serialize)(tx, signature); + }); + }; + Wallet.prototype.signMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message)))]; + }); + }); + }; + Wallet.prototype._signTypedData = function (domain, types, value) { + return __awaiter(this, void 0, void 0, function () { + var populated; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, hash_1._TypedDataEncoder.resolveNames(domain, types, value, function (name) { + if (_this.provider == null) { + logger.throwError("cannot resolve ENS names without a provider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName", + value: name + }); + } + return _this.provider.resolveName(name); + })]; + case 1: + populated = _a.sent(); + return [2 /*return*/, (0, bytes_1.joinSignature)(this._signingKey().signDigest(hash_1._TypedDataEncoder.hash(populated.domain, types, populated.value)))]; + } + }); + }); + }; + Wallet.prototype.encrypt = function (password, options, progressCallback) { + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (progressCallback && typeof (progressCallback) !== "function") { + throw new Error("invalid callback"); + } + if (!options) { + options = {}; + } + return (0, json_wallets_1.encryptKeystore)(this, password, options, progressCallback); + }; + /** + * Static methods to create Wallet instances. + */ + Wallet.createRandom = function (options) { + var entropy = (0, random_1.randomBytes)(16); + if (!options) { + options = {}; + } + if (options.extraEntropy) { + entropy = (0, bytes_1.arrayify)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([entropy, options.extraEntropy])), 0, 16)); + } + var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, options.locale); + return Wallet.fromMnemonic(mnemonic, options.path, options.locale); + }; + Wallet.fromEncryptedJson = function (json, password, progressCallback) { + return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function (account) { + return new Wallet(account); + }); + }; + Wallet.fromEncryptedJsonSync = function (json, password) { + return new Wallet((0, json_wallets_1.decryptJsonWalletSync)(json, password)); + }; + Wallet.fromMnemonic = function (mnemonic, path, wordlist) { + if (!path) { + path = hdnode_1.defaultPath; + } + return new Wallet(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path)); + }; + return Wallet; +}(abstract_signer_1.Signer)); +exports.Wallet = Wallet; +function verifyMessage(message, signature) { + return (0, transactions_1.recoverAddress)((0, hash_1.hashMessage)(message), signature); +} +exports.verifyMessage = verifyMessage; +function verifyTypedData(domain, types, value, signature) { + return (0, transactions_1.recoverAddress)(hash_1._TypedDataEncoder.hash(domain, types, value), signature); +} +exports.verifyTypedData = verifyTypedData; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/lib/index.js.map b/node_modules/@ethersproject/wallet/lib/index.js.map new file mode 100644 index 0000000..4fd6192 --- /dev/null +++ b/node_modules/@ethersproject/wallet/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,kDAAoD;AACpD,sEAAgF;AAChF,kEAAkI;AAClI,8CAAmI;AACnI,4CAAqE;AACrE,gDAAyF;AACzF,sDAAqD;AACrD,wDAA8E;AAC9E,gDAAoD;AACpD,0DAAwD;AACxD,4DAA0H;AAC1H,4DAA6G;AAG7G,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,SAAS,SAAS,CAAC,KAAU;IACzB,OAAO,CAAC,KAAK,IAAI,IAAI,IAAI,IAAA,mBAAW,EAAC,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;AACzF,CAAC;AAED,SAAS,WAAW,CAAC,KAAU;IAC3B,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAED;IAA4B,0BAAM;IAU9B,gBAAY,UAA2D,EAAE,QAAmB;;QAA5F,iBA+DC;QA9DG,MAAM,CAAC,QAAQ,aAAa,MAAM,CAAC,CAAC;QAEpC,QAAA,iBAAO,SAAC;QAER,IAAI,SAAS,CAAC,UAAU,CAAC,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,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACtF,CAAC;IACL,aAAC;AAAD,CAAC,AAtKD,CAA4B,wBAAM,GAsKjC;AAtKY,wBAAM;AAwKnB,SAAgB,aAAa,CAAC,OAAuB,EAAE,SAAwB;IAC3E,OAAO,IAAA,6BAAc,EAAC,IAAA,kBAAW,EAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAC3D,CAAC;AAFD,sCAEC;AAED,SAAgB,eAAe,CAAC,MAAuB,EAAE,KAA4C,EAAE,KAA0B,EAAE,SAAwB;IACvJ,OAAO,IAAA,6BAAc,EAAC,wBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACnF,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/wallet/package.json b/node_modules/@ethersproject/wallet/package.json new file mode 100644 index 0000000..fe917a8 --- /dev/null +++ b/node_modules/@ethersproject/wallet/package.json @@ -0,0 +1,56 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-provider": "^5.5.0", + "@ethersproject/abstract-signer": "^5.5.0", + "@ethersproject/address": "^5.5.0", + "@ethersproject/bignumber": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/hash": "^5.5.0", + "@ethersproject/hdnode": "^5.5.0", + "@ethersproject/json-wallets": "^5.5.0", + "@ethersproject/keccak256": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/random": "^5.5.0", + "@ethersproject/signing-key": "^5.5.0", + "@ethersproject/transactions": "^5.5.0", + "@ethersproject/wordlists": "^5.5.0" + }, + "description": "Classes for managing, encrypting and decrypting Ethereum private keys as a Signer for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/wallet", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/wallet", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x769743426d97a1e3f789a1b72ec8ae71b8bb1b3bfefd9f4c75474573ded1f502", + "types": "./lib/index.d.ts", + "version": "5.5.0" +} diff --git a/node_modules/@ethersproject/wallet/src.ts/_version.ts b/node_modules/@ethersproject/wallet/src.ts/_version.ts new file mode 100644 index 0000000..6cecdf2 --- /dev/null +++ b/node_modules/@ethersproject/wallet/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "wallet/5.5.0"; diff --git a/node_modules/@ethersproject/wallet/src.ts/index.ts b/node_modules/@ethersproject/wallet/src.ts/index.ts new file mode 100644 index 0000000..b95512f --- /dev/null +++ b/node_modules/@ethersproject/wallet/src.ts/index.ts @@ -0,0 +1,204 @@ +"use strict"; + +import { getAddress } from "@ethersproject/address"; +import { Provider, TransactionRequest } from "@ethersproject/abstract-provider"; +import { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer"; +import { arrayify, Bytes, BytesLike, concat, hexDataSlice, isHexString, joinSignature, SignatureLike } from "@ethersproject/bytes"; +import { hashMessage, _TypedDataEncoder } from "@ethersproject/hash"; +import { defaultPath, HDNode, entropyToMnemonic, Mnemonic } from "@ethersproject/hdnode"; +import { keccak256 } from "@ethersproject/keccak256"; +import { defineReadOnly, resolveProperties } from "@ethersproject/properties"; +import { randomBytes } from "@ethersproject/random"; +import { SigningKey } from "@ethersproject/signing-key"; +import { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore, ProgressCallback } from "@ethersproject/json-wallets"; +import { computeAddress, recoverAddress, serialize, UnsignedTransaction } from "@ethersproject/transactions"; +import { Wordlist } from "@ethersproject/wordlists"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +function isAccount(value: any): value is ExternallyOwnedAccount { + return (value != null && isHexString(value.privateKey, 32) && value.address != null); +} + +function hasMnemonic(value: any): value is { mnemonic: Mnemonic } { + const mnemonic = value.mnemonic; + return (mnemonic && mnemonic.phrase); +} + +export class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner { + + readonly address: string; + readonly provider: Provider; + + // Wrapping the _signingKey and _mnemonic in a getter function prevents + // leaking the private key in console.log; still, be careful! :) + readonly _signingKey: () => SigningKey; + readonly _mnemonic: () => Mnemonic; + + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider) { + logger.checkNew(new.target, Wallet); + + super(); + + if (isAccount(privateKey)) { + const signingKey = new SigningKey(privateKey.privateKey); + defineReadOnly(this, "_signingKey", () => signingKey); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + + if (this.address !== getAddress(privateKey.address)) { + logger.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); + } + + if (hasMnemonic(privateKey)) { + const srcMnemonic = privateKey.mnemonic; + defineReadOnly(this, "_mnemonic", () => ( + { + phrase: srcMnemonic.phrase, + path: srcMnemonic.path || defaultPath, + locale: srcMnemonic.locale || "en" + } + )); + const mnemonic = this.mnemonic; + const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path); + if (computeAddress(node.privateKey) !== this.address) { + logger.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); + } + } else { + defineReadOnly(this, "_mnemonic", (): Mnemonic => null); + } + + + } else { + if (SigningKey.isSigningKey(privateKey)) { + /* istanbul ignore if */ + if (privateKey.curve !== "secp256k1") { + logger.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); + } + defineReadOnly(this, "_signingKey", () => (privateKey)); + + } else { + // A lot of common tools do not prefix private keys with a 0x (see: #1166) + if (typeof(privateKey) === "string") { + if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { + privateKey = "0x" + privateKey; + } + } + + const signingKey = new SigningKey(privateKey); + defineReadOnly(this, "_signingKey", () => signingKey); + } + + defineReadOnly(this, "_mnemonic", (): Mnemonic => null); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + } + + /* istanbul ignore if */ + if (provider && !Provider.isProvider(provider)) { + logger.throwArgumentError("invalid provider", "provider", provider); + } + + defineReadOnly(this, "provider", provider || null); + } + + get mnemonic(): Mnemonic { return this._mnemonic(); } + get privateKey(): string { return this._signingKey().privateKey; } + get publicKey(): string { return this._signingKey().publicKey; } + + getAddress(): Promise { + return Promise.resolve(this.address); + } + + connect(provider: Provider): Wallet { + return new Wallet(this, provider); + } + + signTransaction(transaction: TransactionRequest): Promise { + return resolveProperties(transaction).then((tx) => { + if (tx.from != null) { + if (getAddress(tx.from) !== this.address) { + logger.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); + } + delete tx.from; + } + + const signature = this._signingKey().signDigest(keccak256(serialize(tx))); + return serialize(tx, signature); + }); + } + + async signMessage(message: Bytes | string): Promise { + return joinSignature(this._signingKey().signDigest(hashMessage(message))); + } + + async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise { + // Populate any ENS names + const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => { + if (this.provider == null) { + logger.throwError("cannot resolve ENS names without a provider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName", + value: name + }); + } + return this.provider.resolveName(name); + }); + + return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value))); + } + + encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise { + if (typeof(options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + + if (progressCallback && typeof(progressCallback) !== "function") { + throw new Error("invalid callback"); + } + + if (!options) { options = {}; } + + return encryptKeystore(this, password, options, progressCallback); + } + + + /** + * Static methods to create Wallet instances. + */ + static createRandom(options?: any): Wallet { + let entropy: Uint8Array = randomBytes(16); + + if (!options) { options = { }; } + + if (options.extraEntropy) { + entropy = arrayify(hexDataSlice(keccak256(concat([ entropy, options.extraEntropy ])), 0, 16)); + } + + const mnemonic = entropyToMnemonic(entropy, options.locale); + return Wallet.fromMnemonic(mnemonic, options.path, options.locale); + } + + static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise { + return decryptJsonWallet(json, password, progressCallback).then((account) => { + return new Wallet(account); + }); + } + + static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet { + return new Wallet(decryptJsonWalletSync(json, password)); + } + + static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet { + if (!path) { path = defaultPath; } + return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path)); + } +} + +export function verifyMessage(message: Bytes | string, signature: SignatureLike): string { + return recoverAddress(hashMessage(message), signature); +} + +export function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string { + return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature); +} diff --git a/node_modules/@ethersproject/web/LICENSE.md b/node_modules/@ethersproject/web/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/web/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/web/README.md b/node_modules/@ethersproject/web/README.md new file mode 100644 index 0000000..5ed09d1 --- /dev/null +++ b/node_modules/@ethersproject/web/README.md @@ -0,0 +1,39 @@ +Web Utilities +============= + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +It contains functions to abstract safely and responsibly connecting to the web, +including exponential back-off. + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/web/). + +Importing +--------- + +Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers), +but for those with more specific needs, individual components can be imported. + +```javascript +const { + + fetchJson, + + poll, + + // Types + ConnectionInfo, + FetchJsonResponse, + + PollOptions, + OncePollable, + OnceBlockable + +} = require("@ethersproject/web"); +``` + + +License +------- + +MIT License diff --git a/node_modules/@ethersproject/web/lib.esm/_version.d.ts b/node_modules/@ethersproject/web/lib.esm/_version.d.ts new file mode 100644 index 0000000..c19b705 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "web/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/_version.d.ts.map b/node_modules/@ethersproject/web/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/_version.js b/node_modules/@ethersproject/web/lib.esm/_version.js new file mode 100644 index 0000000..93d1544 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "web/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/_version.js.map b/node_modules/@ethersproject/web/lib.esm/_version.js.map new file mode 100644 index 0000000..4854997 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/geturl.d.ts b/node_modules/@ethersproject/web/lib.esm/geturl.d.ts new file mode 100644 index 0000000..5259bc5 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/geturl.d.ts @@ -0,0 +1,4 @@ +import type { GetUrlResponse, Options } from "./types"; +export { GetUrlResponse, Options }; +export declare function getUrl(href: string, options?: Options): Promise; +//# sourceMappingURL=geturl.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/geturl.d.ts.map b/node_modules/@ethersproject/web/lib.esm/geturl.d.ts.map new file mode 100644 index 0000000..69d1214 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/geturl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"geturl.d.ts","sourceRoot":"","sources":["../src.ts/browser-geturl.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AAEnC,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAqCrF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/geturl.js b/node_modules/@ethersproject/web/lib.esm/geturl.js new file mode 100644 index 0000000..f88f0a5 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/geturl.js @@ -0,0 +1,51 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { arrayify } from "@ethersproject/bytes"; +export function getUrl(href, options) { + return __awaiter(this, void 0, void 0, function* () { + if (options == null) { + options = {}; + } + const request = { + method: (options.method || "GET"), + headers: (options.headers || {}), + body: (options.body || undefined), + }; + if (options.skipFetchSetup !== true) { + request.mode = "cors"; // no-cors, cors, *same-origin + request.cache = "no-cache"; // *default, no-cache, reload, force-cache, only-if-cached + request.credentials = "same-origin"; // include, *same-origin, omit + request.redirect = "follow"; // manual, *follow, error + request.referrer = "client"; // no-referrer, *client + } + ; + const response = yield fetch(href, request); + const body = yield response.arrayBuffer(); + const headers = {}; + if (response.headers.forEach) { + response.headers.forEach((value, key) => { + headers[key.toLowerCase()] = value; + }); + } + else { + ((response.headers).keys)().forEach((key) => { + headers[key.toLowerCase()] = response.headers.get(key); + }); + } + return { + headers: headers, + statusCode: response.status, + statusMessage: response.statusText, + body: arrayify(new Uint8Array(body)), + }; + }); +} +//# sourceMappingURL=geturl.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/geturl.js.map b/node_modules/@ethersproject/web/lib.esm/geturl.js.map new file mode 100644 index 0000000..10a8e03 ---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,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;YACvC,CAAC,CAAC,CAAC;SACN;aAAM;YACmB,CAAO,CAAC,QAAQ,CAAC,OAAO,CAAE,CAAC,IAAI,CAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACtE,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC3D,CAAC,CAAC,CAAC;SACN;QAED,OAAO;YACH,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,QAAQ,CAAC,MAAM;YAC3B,aAAa,EAAE,QAAQ,CAAC,UAAU;YAClC,IAAI,EAAE,QAAQ,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;SACvC,CAAA;IACL,CAAC;CAAA"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/index.d.ts b/node_modules/@ethersproject/web/lib.esm/index.d.ts new file mode 100644 index 0000000..abf7196 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/index.d.ts @@ -0,0 +1,39 @@ +export declare type ConnectionInfo = { + url: string; + headers?: { + [key: string]: string | number; + }; + user?: string; + password?: string; + allowInsecureAuthentication?: boolean; + allowGzip?: boolean; + throttleLimit?: number; + throttleSlotInterval?: number; + throttleCallback?: (attempt: number, url: string) => Promise; + timeout?: number; +}; +export interface OnceBlockable { + once(eventName: "block", handler: () => void): void; +} +export interface OncePollable { + once(eventName: "poll", handler: () => void): void; +} +export declare type PollOptions = { + timeout?: number; + floor?: number; + ceiling?: number; + interval?: number; + retryLimit?: number; + onceBlock?: OnceBlockable; + oncePoll?: OncePollable; +}; +export declare type FetchJsonResponse = { + statusCode: number; + headers: { + [header: string]: string; + }; +}; +export declare function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise; +export declare function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise; +export declare function poll(func: () => Promise, options?: PollOptions): Promise; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/index.d.ts.map b/node_modules/@ethersproject/web/lib.esm/index.d.ts.map new file mode 100644 index 0000000..4857d66 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAqCA,oBAAY,cAAc,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAE5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC1B,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACtD;AAED,oBAAY,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAA;CAC1B,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QAAE,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;CAC3C,CAAC;AAWF,wBAAgB,UAAU,CAAC,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAmQlL;AAED,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CA2C1J;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAgEjF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/index.js b/node_modules/@ethersproject/web/lib.esm/index.js new file mode 100644 index 0000000..c4b33cb --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/index.js @@ -0,0 +1,392 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { decode as base64Decode, encode as base64Encode } from "@ethersproject/base64"; +import { hexlify, isBytesLike } from "@ethersproject/bytes"; +import { shallowCopy } from "@ethersproject/properties"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { getUrl } from "./geturl"; +function staller(duration) { + return new Promise((resolve) => { + setTimeout(resolve, duration); + }); +} +function bodyify(value, type) { + if (value == null) { + return null; + } + if (typeof (value) === "string") { + return value; + } + if (isBytesLike(value)) { + if (type && (type.split("/")[0] === "text" || type.split(";")[0].trim() === "application/json")) { + try { + return toUtf8String(value); + } + catch (error) { } + ; + } + return hexlify(value); + } + return value; +} +// This API is still a work in progress; the future changes will likely be: +// - ConnectionInfo => FetchDataRequest +// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array } +// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified) +// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T +// For this reason, it should be considered internal until the API is finalized +export function _fetchData(connection, body, processFunc) { + // How many times to retry in the event of a throttle + const attemptLimit = (typeof (connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit : 12; + logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); + const throttleCallback = ((typeof (connection) === "object") ? connection.throttleCallback : null); + const throttleSlotInterval = ((typeof (connection) === "object" && typeof (connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval : 100); + logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); + const headers = {}; + let url = null; + // @TODO: Allow ConnectionInfo to override some of these values + const options = { + method: "GET", + }; + let allow304 = false; + let timeout = 2 * 60 * 1000; + if (typeof (connection) === "string") { + url = connection; + } + else if (typeof (connection) === "object") { + if (connection == null || connection.url == null) { + logger.throwArgumentError("missing URL", "connection.url", connection); + } + url = connection.url; + if (typeof (connection.timeout) === "number" && connection.timeout > 0) { + timeout = connection.timeout; + } + if (connection.headers) { + for (const key in connection.headers) { + headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) }; + if (["if-none-match", "if-modified-since"].indexOf(key.toLowerCase()) >= 0) { + allow304 = true; + } + } + } + options.allowGzip = !!connection.allowGzip; + if (connection.user != null && connection.password != null) { + if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) { + logger.throwError("basic authentication requires a secure https url", Logger.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" }); + } + const authorization = connection.user + ":" + connection.password; + headers["authorization"] = { + key: "Authorization", + value: "Basic " + base64Encode(toUtf8Bytes(authorization)) + }; + } + } + const reData = new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$", "i"); + const dataMatch = ((url) ? url.match(reData) : null); + if (dataMatch) { + try { + const response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": dataMatch[1] }, + body: base64Decode(dataMatch[2]) + }; + let result = response.body; + if (processFunc) { + result = processFunc(response.body, response); + } + return Promise.resolve(result); + } + catch (error) { + logger.throwError("processing response error", Logger.errors.SERVER_ERROR, { + body: bodyify(dataMatch[1], dataMatch[2]), + error: error, + requestBody: null, + requestMethod: "GET", + url: url + }); + } + } + if (body) { + options.method = "POST"; + options.body = body; + if (headers["content-type"] == null) { + headers["content-type"] = { key: "Content-Type", value: "application/octet-stream" }; + } + if (headers["content-length"] == null) { + headers["content-length"] = { key: "Content-Length", value: String(body.length) }; + } + } + const flatHeaders = {}; + Object.keys(headers).forEach((key) => { + const header = headers[key]; + flatHeaders[header.key] = header.value; + }); + options.headers = flatHeaders; + const runningTimeout = (function () { + let timer = null; + const promise = new Promise(function (resolve, reject) { + if (timeout) { + timer = setTimeout(() => { + if (timer == null) { + return; + } + timer = null; + reject(logger.makeError("timeout", Logger.errors.TIMEOUT, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + timeout: timeout, + url: url + })); + }, timeout); + } + }); + const cancel = function () { + if (timer == null) { + return; + } + clearTimeout(timer); + timer = null; + }; + return { promise, cancel }; + })(); + const runningFetch = (function () { + return __awaiter(this, void 0, void 0, function* () { + for (let attempt = 0; attempt < attemptLimit; attempt++) { + let response = null; + try { + response = yield getUrl(url, options); + if (attempt < attemptLimit) { + if (response.statusCode === 301 || response.statusCode === 302) { + // Redirection; for now we only support absolute locataions + const location = response.headers.location || ""; + if (options.method === "GET" && location.match(/^https:/)) { + url = response.headers.location; + continue; + } + } + else if (response.statusCode === 429) { + // Exponential back-off throttling + let tryAgain = true; + if (throttleCallback) { + tryAgain = yield throttleCallback(attempt, url); + } + if (tryAgain) { + let stall = 0; + const retryAfter = response.headers["retry-after"]; + if (typeof (retryAfter) === "string" && retryAfter.match(/^[1-9][0-9]*$/)) { + stall = parseInt(retryAfter) * 1000; + } + else { + stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + } + //console.log("Stalling 429"); + yield staller(stall); + continue; + } + } + } + } + catch (error) { + response = error.response; + if (response == null) { + runningTimeout.cancel(); + logger.throwError("missing response", Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + serverError: error, + url: url + }); + } + } + let body = response.body; + if (allow304 && response.statusCode === 304) { + body = null; + } + else if (response.statusCode < 200 || response.statusCode >= 300) { + runningTimeout.cancel(); + logger.throwError("bad response", Logger.errors.SERVER_ERROR, { + status: response.statusCode, + headers: response.headers, + body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)), + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + if (processFunc) { + try { + const result = yield processFunc(body, response); + runningTimeout.cancel(); + return result; + } + catch (error) { + // Allow the processFunc to trigger a throttle + if (error.throttleRetry && attempt < attemptLimit) { + let tryAgain = true; + if (throttleCallback) { + tryAgain = yield throttleCallback(attempt, url); + } + if (tryAgain) { + const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + //console.log("Stalling callback"); + yield staller(timeout); + continue; + } + } + runningTimeout.cancel(); + logger.throwError("processing response error", Logger.errors.SERVER_ERROR, { + body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)), + error: error, + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + } + runningTimeout.cancel(); + // If we had a processFunc, it either returned a T or threw above. + // The "body" is now a Uint8Array. + return body; + } + return logger.throwError("failed response", Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + }); + })(); + return Promise.race([runningTimeout.promise, runningFetch]); +} +export function fetchJson(connection, json, processFunc) { + let processJsonFunc = (value, response) => { + let result = null; + if (value != null) { + try { + result = JSON.parse(toUtf8String(value)); + } + catch (error) { + logger.throwError("invalid JSON", Logger.errors.SERVER_ERROR, { + body: value, + error: error + }); + } + } + if (processFunc) { + result = processFunc(result, response); + } + return result; + }; + // If we have json to send, we must + // - add content-type of application/json (unless already overridden) + // - convert the json to bytes + let body = null; + if (json != null) { + body = toUtf8Bytes(json); + // Create a connection with the content-type set for JSON + const updated = (typeof (connection) === "string") ? ({ url: connection }) : shallowCopy(connection); + if (updated.headers) { + const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === "content-type")).length) !== 0; + if (!hasContentType) { + updated.headers = shallowCopy(updated.headers); + updated.headers["content-type"] = "application/json"; + } + } + else { + updated.headers = { "content-type": "application/json" }; + } + connection = updated; + } + return _fetchData(connection, body, processJsonFunc); +} +export function poll(func, options) { + if (!options) { + options = {}; + } + options = shallowCopy(options); + if (options.floor == null) { + options.floor = 0; + } + if (options.ceiling == null) { + options.ceiling = 10000; + } + if (options.interval == null) { + options.interval = 250; + } + return new Promise(function (resolve, reject) { + let timer = null; + let done = false; + // Returns true if cancel was successful. Unsuccessful cancel means we're already done. + const cancel = () => { + if (done) { + return false; + } + done = true; + if (timer) { + clearTimeout(timer); + } + return true; + }; + if (options.timeout) { + timer = setTimeout(() => { + if (cancel()) { + reject(new Error("timeout")); + } + }, options.timeout); + } + const retryLimit = options.retryLimit; + let attempt = 0; + function check() { + return func().then(function (result) { + // If we have a result, or are allowed null then we're done + if (result !== undefined) { + if (cancel()) { + resolve(result); + } + } + else if (options.oncePoll) { + options.oncePoll.once("poll", check); + } + else if (options.onceBlock) { + options.onceBlock.once("block", check); + // Otherwise, exponential back-off (up to 10s) our next request + } + else if (!done) { + attempt++; + if (attempt > retryLimit) { + if (cancel()) { + reject(new Error("retry limit reached")); + } + return; + } + let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt))); + if (timeout < options.floor) { + timeout = options.floor; + } + if (timeout > options.ceiling) { + timeout = options.ceiling; + } + setTimeout(check, timeout); + } + return null; + }, function (error) { + if (cancel()) { + reject(error); + } + }); + } + check(); + }); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/index.js.map b/node_modules/@ethersproject/web/lib.esm/index.js.map new file mode 100644 index 0000000..154c8be --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,C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,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAAE;oBAE7D,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;iBAC9B;gBAED,OAAO,IAAI,CAAC;YAChB,CAAC,EAAE,UAAS,KAAK;gBACb,IAAI,MAAM,EAAE,EAAE;oBAAE,MAAM,CAAC,KAAK,CAAC,CAAC;iBAAE;YACpC,CAAC,CAAC,CAAC;QACP,CAAC;QACD,KAAK,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/types.d.ts b/node_modules/@ethersproject/web/lib.esm/types.d.ts new file mode 100644 index 0000000..8d2591e --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/types.d.ts @@ -0,0 +1,18 @@ +export declare type GetUrlResponse = { + statusCode: number; + statusMessage: string; + headers: { + [key: string]: string; + }; + body: Uint8Array; +}; +export declare type Options = { + method?: string; + allowGzip?: boolean; + body?: Uint8Array; + headers?: { + [key: string]: string; + }; + skipFetchSetup?: boolean; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/types.d.ts.map b/node_modules/@ethersproject/web/lib.esm/types.d.ts.map new file mode 100644 index 0000000..f993c04 --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE;QAAE,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;IACrC,IAAI,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE;QAAE,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/types.js b/node_modules/@ethersproject/web/lib.esm/types.js new file mode 100644 index 0000000..f50a4bb --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/types.js @@ -0,0 +1,3 @@ +"use strict"; +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib.esm/types.js.map b/node_modules/@ethersproject/web/lib.esm/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/node_modules/@ethersproject/web/lib.esm/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/_version.d.ts b/node_modules/@ethersproject/web/lib/_version.d.ts new file mode 100644 index 0000000..c19b705 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "web/5.5.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/_version.d.ts.map b/node_modules/@ethersproject/web/lib/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/_version.js b/node_modules/@ethersproject/web/lib/_version.js new file mode 100644 index 0000000..7f2d77b --- /dev/null +++ b/node_modules/@ethersproject/web/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "web/5.5.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/_version.js.map b/node_modules/@ethersproject/web/lib/_version.js.map new file mode 100644 index 0000000..b3a3dff --- /dev/null +++ b/node_modules/@ethersproject/web/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/browser-geturl.d.ts b/node_modules/@ethersproject/web/lib/browser-geturl.d.ts new file mode 100644 index 0000000..8107a7c --- /dev/null +++ b/node_modules/@ethersproject/web/lib/browser-geturl.d.ts @@ -0,0 +1,4 @@ +import type { GetUrlResponse, Options } from "./types"; +export { GetUrlResponse, Options }; +export declare function getUrl(href: string, options?: Options): Promise; +//# sourceMappingURL=browser-geturl.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/browser-geturl.d.ts.map b/node_modules/@ethersproject/web/lib/browser-geturl.d.ts.map new file mode 100644 index 0000000..dd936dd --- /dev/null +++ b/node_modules/@ethersproject/web/lib/browser-geturl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-geturl.d.ts","sourceRoot":"","sources":["../src.ts/browser-geturl.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AAEnC,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAqCrF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/browser-geturl.js b/node_modules/@ethersproject/web/lib/browser-geturl.js new file mode 100644 index 0000000..a62bf55 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/browser-geturl.js @@ -0,0 +1,91 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getUrl = void 0; +var bytes_1 = require("@ethersproject/bytes"); +function getUrl(href, options) { + return __awaiter(this, void 0, void 0, function () { + var request, response, body, headers; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (options == null) { + options = {}; + } + request = { + method: (options.method || "GET"), + headers: (options.headers || {}), + body: (options.body || undefined), + }; + if (options.skipFetchSetup !== true) { + request.mode = "cors"; // no-cors, cors, *same-origin + request.cache = "no-cache"; // *default, no-cache, reload, force-cache, only-if-cached + request.credentials = "same-origin"; // include, *same-origin, omit + request.redirect = "follow"; // manual, *follow, error + request.referrer = "client"; // no-referrer, *client + } + ; + return [4 /*yield*/, fetch(href, request)]; + case 1: + response = _a.sent(); + return [4 /*yield*/, response.arrayBuffer()]; + case 2: + body = _a.sent(); + headers = {}; + if (response.headers.forEach) { + response.headers.forEach(function (value, key) { + headers[key.toLowerCase()] = value; + }); + } + else { + ((response.headers).keys)().forEach(function (key) { + headers[key.toLowerCase()] = response.headers.get(key); + }); + } + return [2 /*return*/, { + headers: headers, + statusCode: response.status, + statusMessage: response.statusText, + body: (0, bytes_1.arrayify)(new Uint8Array(body)), + }]; + } + }); + }); +} +exports.getUrl = getUrl; +//# sourceMappingURL=browser-geturl.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/browser-geturl.js.map b/node_modules/@ethersproject/web/lib/browser-geturl.js.map new file mode 100644 index 0000000..f5f5d96 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/browser-geturl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-geturl.js","sourceRoot":"","sources":["../src.ts/browser-geturl.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,8CAAgD;AAMhD,SAAsB,MAAM,CAAC,IAAY,EAAE,OAAiB;;;;;;oBACxD,IAAI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,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;wBAC3D,CAAC,CAAC,CAAC;qBACN;oBAED,sBAAO;4BACH,OAAO,EAAE,OAAO;4BAChB,UAAU,EAAE,QAAQ,CAAC,MAAM;4BAC3B,aAAa,EAAE,QAAQ,CAAC,UAAU;4BAClC,IAAI,EAAE,IAAA,gBAAQ,EAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;yBACvC,EAAA;;;;CACJ;AArCD,wBAqCC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/geturl.d.ts b/node_modules/@ethersproject/web/lib/geturl.d.ts new file mode 100644 index 0000000..5259bc5 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/geturl.d.ts @@ -0,0 +1,4 @@ +import type { GetUrlResponse, Options } from "./types"; +export { GetUrlResponse, Options }; +export declare function getUrl(href: string, options?: Options): Promise; +//# sourceMappingURL=geturl.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/geturl.d.ts.map b/node_modules/@ethersproject/web/lib/geturl.d.ts.map new file mode 100644 index 0000000..127be6a --- /dev/null +++ b/node_modules/@ethersproject/web/lib/geturl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"geturl.d.ts","sourceRoot":"","sources":["../src.ts/geturl.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAMvD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AAmDnC,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CA6CrF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/geturl.js b/node_modules/@ethersproject/web/lib/geturl.js new file mode 100644 index 0000000..71ccf37 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/geturl.js @@ -0,0 +1,148 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getUrl = void 0; +var http_1 = __importDefault(require("http")); +var https_1 = __importDefault(require("https")); +var zlib_1 = require("zlib"); +var url_1 = require("url"); +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +function getResponse(request) { + return new Promise(function (resolve, reject) { + request.once("response", function (resp) { + var response = { + statusCode: resp.statusCode, + statusMessage: resp.statusMessage, + headers: Object.keys(resp.headers).reduce(function (accum, name) { + var value = resp.headers[name]; + if (Array.isArray(value)) { + value = value.join(", "); + } + accum[name] = value; + return accum; + }, {}), + body: null + }; + //resp.setEncoding("utf8"); + resp.on("data", function (chunk) { + if (response.body == null) { + response.body = new Uint8Array(0); + } + response.body = (0, bytes_1.concat)([response.body, chunk]); + }); + resp.on("end", function () { + if (response.headers["content-encoding"] === "gzip") { + //const size = response.body.length; + response.body = (0, bytes_1.arrayify)((0, zlib_1.gunzipSync)(response.body)); + //console.log("Delta:", response.body.length - size, Buffer.from(response.body).toString()); + } + resolve(response); + }); + resp.on("error", function (error) { + /* istanbul ignore next */ + error.response = response; + reject(error); + }); + }); + request.on("error", function (error) { reject(error); }); + }); +} +// The URL.parse uses null instead of the empty string +function nonnull(value) { + if (value == null) { + return ""; + } + return value; +} +function getUrl(href, options) { + return __awaiter(this, void 0, void 0, function () { + var url, request, req, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (options == null) { + options = {}; + } + url = (0, url_1.parse)(href); + request = { + protocol: nonnull(url.protocol), + hostname: nonnull(url.hostname), + port: nonnull(url.port), + path: (nonnull(url.pathname) + nonnull(url.search)), + method: (options.method || "GET"), + headers: (0, properties_1.shallowCopy)(options.headers || {}), + }; + if (options.allowGzip) { + request.headers["accept-encoding"] = "gzip"; + } + req = null; + switch (nonnull(url.protocol)) { + case "http:": + req = http_1.default.request(request); + break; + case "https:": + req = https_1.default.request(request); + break; + default: + /* istanbul ignore next */ + logger.throwError("unsupported protocol " + url.protocol, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + protocol: url.protocol, + operation: "request" + }); + } + if (options.body) { + req.write(Buffer.from(options.body)); + } + req.end(); + return [4 /*yield*/, getResponse(req)]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); +} +exports.getUrl = getUrl; +//# sourceMappingURL=geturl.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/geturl.js.map b/node_modules/@ethersproject/web/lib/geturl.js.map new file mode 100644 index 0000000..bbef417 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/geturl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geturl.js","sourceRoot":"","sources":["../src.ts/geturl.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,8CAAwB;AACxB,gDAA0B;AAC1B,6BAAkC;AAClC,2BAA2B;AAE3B,8CAAwD;AACxD,wDAAwD;AAIxD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAInC,SAAS,WAAW,CAAC,OAA2B;IAC5C,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QAC/B,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAC,IAA0B;YAChD,IAAM,QAAQ,GAAmB;gBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAC,KAAK,EAAE,IAAI;oBAClD,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBAC/B,IAAI,KAAK,CAAC,O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0BAAyB,GAAG,CAAC,QAAW,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gCAC7F,QAAQ,EAAE,GAAG,CAAC,QAAQ;gCACtB,SAAS,EAAE,SAAS;6BACvB,CAAC,CAAC;qBACV;oBAED,IAAI,OAAO,CAAC,IAAI,EAAE;wBACd,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;qBACxC;oBACD,GAAG,CAAC,GAAG,EAAE,CAAC;oBAEO,qBAAM,WAAW,CAAC,GAAG,CAAC,EAAA;;oBAAjC,QAAQ,GAAG,SAAsB;oBACvC,sBAAO,QAAQ,EAAC;;;;CACnB;AA7CD,wBA6CC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/index.d.ts b/node_modules/@ethersproject/web/lib/index.d.ts new file mode 100644 index 0000000..abf7196 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/index.d.ts @@ -0,0 +1,39 @@ +export declare type ConnectionInfo = { + url: string; + headers?: { + [key: string]: string | number; + }; + user?: string; + password?: string; + allowInsecureAuthentication?: boolean; + allowGzip?: boolean; + throttleLimit?: number; + throttleSlotInterval?: number; + throttleCallback?: (attempt: number, url: string) => Promise; + timeout?: number; +}; +export interface OnceBlockable { + once(eventName: "block", handler: () => void): void; +} +export interface OncePollable { + once(eventName: "poll", handler: () => void): void; +} +export declare type PollOptions = { + timeout?: number; + floor?: number; + ceiling?: number; + interval?: number; + retryLimit?: number; + onceBlock?: OnceBlockable; + oncePoll?: OncePollable; +}; +export declare type FetchJsonResponse = { + statusCode: number; + headers: { + [header: string]: string; + }; +}; +export declare function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise; +export declare function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise; +export declare function poll(func: () => Promise, options?: PollOptions): Promise; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/index.d.ts.map b/node_modules/@ethersproject/web/lib/index.d.ts.map new file mode 100644 index 0000000..4857d66 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAqCA,oBAAY,cAAc,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAE5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC1B,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACtD;AAED,oBAAY,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAA;CAC1B,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QAAE,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;CAC3C,CAAC;AAWF,wBAAgB,UAAU,CAAC,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAmQlL;AAED,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CA2C1J;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAgEjF"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/index.js b/node_modules/@ethersproject/web/lib/index.js new file mode 100644 index 0000000..39ec9f8 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/index.js @@ -0,0 +1,451 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.poll = exports.fetchJson = exports._fetchData = void 0; +var base64_1 = require("@ethersproject/base64"); +var bytes_1 = require("@ethersproject/bytes"); +var properties_1 = require("@ethersproject/properties"); +var strings_1 = require("@ethersproject/strings"); +var logger_1 = require("@ethersproject/logger"); +var _version_1 = require("./_version"); +var logger = new logger_1.Logger(_version_1.version); +var geturl_1 = require("./geturl"); +function staller(duration) { + return new Promise(function (resolve) { + setTimeout(resolve, duration); + }); +} +function bodyify(value, type) { + if (value == null) { + return null; + } + if (typeof (value) === "string") { + return value; + } + if ((0, bytes_1.isBytesLike)(value)) { + if (type && (type.split("/")[0] === "text" || type.split(";")[0].trim() === "application/json")) { + try { + return (0, strings_1.toUtf8String)(value); + } + catch (error) { } + ; + } + return (0, bytes_1.hexlify)(value); + } + return value; +} +// This API is still a work in progress; the future changes will likely be: +// - ConnectionInfo => FetchDataRequest +// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array } +// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified) +// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T +// For this reason, it should be considered internal until the API is finalized +function _fetchData(connection, body, processFunc) { + // How many times to retry in the event of a throttle + var attemptLimit = (typeof (connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit : 12; + logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); + var throttleCallback = ((typeof (connection) === "object") ? connection.throttleCallback : null); + var throttleSlotInterval = ((typeof (connection) === "object" && typeof (connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval : 100); + logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); + var headers = {}; + var url = null; + // @TODO: Allow ConnectionInfo to override some of these values + var options = { + method: "GET", + }; + var allow304 = false; + var timeout = 2 * 60 * 1000; + if (typeof (connection) === "string") { + url = connection; + } + else if (typeof (connection) === "object") { + if (connection == null || connection.url == null) { + logger.throwArgumentError("missing URL", "connection.url", connection); + } + url = connection.url; + if (typeof (connection.timeout) === "number" && connection.timeout > 0) { + timeout = connection.timeout; + } + if (connection.headers) { + for (var key in connection.headers) { + headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) }; + if (["if-none-match", "if-modified-since"].indexOf(key.toLowerCase()) >= 0) { + allow304 = true; + } + } + } + options.allowGzip = !!connection.allowGzip; + if (connection.user != null && connection.password != null) { + if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) { + logger.throwError("basic authentication requires a secure https url", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" }); + } + var authorization = connection.user + ":" + connection.password; + headers["authorization"] = { + key: "Authorization", + value: "Basic " + (0, base64_1.encode)((0, strings_1.toUtf8Bytes)(authorization)) + }; + } + } + var reData = new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$", "i"); + var dataMatch = ((url) ? url.match(reData) : null); + if (dataMatch) { + try { + var response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": dataMatch[1] }, + body: (0, base64_1.decode)(dataMatch[2]) + }; + var result = response.body; + if (processFunc) { + result = processFunc(response.body, response); + } + return Promise.resolve(result); + } + catch (error) { + logger.throwError("processing response error", logger_1.Logger.errors.SERVER_ERROR, { + body: bodyify(dataMatch[1], dataMatch[2]), + error: error, + requestBody: null, + requestMethod: "GET", + url: url + }); + } + } + if (body) { + options.method = "POST"; + options.body = body; + if (headers["content-type"] == null) { + headers["content-type"] = { key: "Content-Type", value: "application/octet-stream" }; + } + if (headers["content-length"] == null) { + headers["content-length"] = { key: "Content-Length", value: String(body.length) }; + } + } + var flatHeaders = {}; + Object.keys(headers).forEach(function (key) { + var header = headers[key]; + flatHeaders[header.key] = header.value; + }); + options.headers = flatHeaders; + var runningTimeout = (function () { + var timer = null; + var promise = new Promise(function (resolve, reject) { + if (timeout) { + timer = setTimeout(function () { + if (timer == null) { + return; + } + timer = null; + reject(logger.makeError("timeout", logger_1.Logger.errors.TIMEOUT, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + timeout: timeout, + url: url + })); + }, timeout); + } + }); + var cancel = function () { + if (timer == null) { + return; + } + clearTimeout(timer); + timer = null; + }; + return { promise: promise, cancel: cancel }; + })(); + var runningFetch = (function () { + return __awaiter(this, void 0, void 0, function () { + var attempt, response, location_1, tryAgain, stall, retryAfter, error_1, body_1, result, error_2, tryAgain, timeout_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + attempt = 0; + _a.label = 1; + case 1: + if (!(attempt < attemptLimit)) return [3 /*break*/, 20]; + response = null; + _a.label = 2; + case 2: + _a.trys.push([2, 9, , 10]); + return [4 /*yield*/, (0, geturl_1.getUrl)(url, options)]; + case 3: + response = _a.sent(); + if (!(attempt < attemptLimit)) return [3 /*break*/, 8]; + if (!(response.statusCode === 301 || response.statusCode === 302)) return [3 /*break*/, 4]; + location_1 = response.headers.location || ""; + if (options.method === "GET" && location_1.match(/^https:/)) { + url = response.headers.location; + return [3 /*break*/, 19]; + } + return [3 /*break*/, 8]; + case 4: + if (!(response.statusCode === 429)) return [3 /*break*/, 8]; + tryAgain = true; + if (!throttleCallback) return [3 /*break*/, 6]; + return [4 /*yield*/, throttleCallback(attempt, url)]; + case 5: + tryAgain = _a.sent(); + _a.label = 6; + case 6: + if (!tryAgain) return [3 /*break*/, 8]; + stall = 0; + retryAfter = response.headers["retry-after"]; + if (typeof (retryAfter) === "string" && retryAfter.match(/^[1-9][0-9]*$/)) { + stall = parseInt(retryAfter) * 1000; + } + else { + stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + } + //console.log("Stalling 429"); + return [4 /*yield*/, staller(stall)]; + case 7: + //console.log("Stalling 429"); + _a.sent(); + return [3 /*break*/, 19]; + case 8: return [3 /*break*/, 10]; + case 9: + error_1 = _a.sent(); + response = error_1.response; + if (response == null) { + runningTimeout.cancel(); + logger.throwError("missing response", logger_1.Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + serverError: error_1, + url: url + }); + } + return [3 /*break*/, 10]; + case 10: + body_1 = response.body; + if (allow304 && response.statusCode === 304) { + body_1 = null; + } + else if (response.statusCode < 200 || response.statusCode >= 300) { + runningTimeout.cancel(); + logger.throwError("bad response", logger_1.Logger.errors.SERVER_ERROR, { + status: response.statusCode, + headers: response.headers, + body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)), + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + if (!processFunc) return [3 /*break*/, 18]; + _a.label = 11; + case 11: + _a.trys.push([11, 13, , 18]); + return [4 /*yield*/, processFunc(body_1, response)]; + case 12: + result = _a.sent(); + runningTimeout.cancel(); + return [2 /*return*/, result]; + case 13: + error_2 = _a.sent(); + if (!(error_2.throttleRetry && attempt < attemptLimit)) return [3 /*break*/, 17]; + tryAgain = true; + if (!throttleCallback) return [3 /*break*/, 15]; + return [4 /*yield*/, throttleCallback(attempt, url)]; + case 14: + tryAgain = _a.sent(); + _a.label = 15; + case 15: + if (!tryAgain) return [3 /*break*/, 17]; + timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + //console.log("Stalling callback"); + return [4 /*yield*/, staller(timeout_1)]; + case 16: + //console.log("Stalling callback"); + _a.sent(); + return [3 /*break*/, 19]; + case 17: + runningTimeout.cancel(); + logger.throwError("processing response error", logger_1.Logger.errors.SERVER_ERROR, { + body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)), + error: error_2, + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + return [3 /*break*/, 18]; + case 18: + runningTimeout.cancel(); + // If we had a processFunc, it either returned a T or threw above. + // The "body" is now a Uint8Array. + return [2 /*return*/, body_1]; + case 19: + attempt++; + return [3 /*break*/, 1]; + case 20: return [2 /*return*/, logger.throwError("failed response", logger_1.Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + })]; + } + }); + }); + })(); + return Promise.race([runningTimeout.promise, runningFetch]); +} +exports._fetchData = _fetchData; +function fetchJson(connection, json, processFunc) { + var processJsonFunc = function (value, response) { + var result = null; + if (value != null) { + try { + result = JSON.parse((0, strings_1.toUtf8String)(value)); + } + catch (error) { + logger.throwError("invalid JSON", logger_1.Logger.errors.SERVER_ERROR, { + body: value, + error: error + }); + } + } + if (processFunc) { + result = processFunc(result, response); + } + return result; + }; + // If we have json to send, we must + // - add content-type of application/json (unless already overridden) + // - convert the json to bytes + var body = null; + if (json != null) { + body = (0, strings_1.toUtf8Bytes)(json); + // Create a connection with the content-type set for JSON + var updated = (typeof (connection) === "string") ? ({ url: connection }) : (0, properties_1.shallowCopy)(connection); + if (updated.headers) { + var hasContentType = (Object.keys(updated.headers).filter(function (k) { return (k.toLowerCase() === "content-type"); }).length) !== 0; + if (!hasContentType) { + updated.headers = (0, properties_1.shallowCopy)(updated.headers); + updated.headers["content-type"] = "application/json"; + } + } + else { + updated.headers = { "content-type": "application/json" }; + } + connection = updated; + } + return _fetchData(connection, body, processJsonFunc); +} +exports.fetchJson = fetchJson; +function poll(func, options) { + if (!options) { + options = {}; + } + options = (0, properties_1.shallowCopy)(options); + if (options.floor == null) { + options.floor = 0; + } + if (options.ceiling == null) { + options.ceiling = 10000; + } + if (options.interval == null) { + options.interval = 250; + } + return new Promise(function (resolve, reject) { + var timer = null; + var done = false; + // Returns true if cancel was successful. Unsuccessful cancel means we're already done. + var cancel = function () { + if (done) { + return false; + } + done = true; + if (timer) { + clearTimeout(timer); + } + return true; + }; + if (options.timeout) { + timer = setTimeout(function () { + if (cancel()) { + reject(new Error("timeout")); + } + }, options.timeout); + } + var retryLimit = options.retryLimit; + var attempt = 0; + function check() { + return func().then(function (result) { + // If we have a result, or are allowed null then we're done + if (result !== undefined) { + if (cancel()) { + resolve(result); + } + } + else if (options.oncePoll) { + options.oncePoll.once("poll", check); + } + else if (options.onceBlock) { + options.onceBlock.once("block", check); + // Otherwise, exponential back-off (up to 10s) our next request + } + else if (!done) { + attempt++; + if (attempt > retryLimit) { + if (cancel()) { + reject(new Error("retry limit reached")); + } + return; + } + var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt))); + if (timeout < options.floor) { + timeout = options.floor; + } + if (timeout > options.ceiling) { + timeout = options.ceiling; + } + setTimeout(check, timeout); + } + return null; + }, function (error) { + if (cancel()) { + reject(error); + } + }); + } + check(); + }); +} +exports.poll = poll; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/index.js.map b/node_modules/@ethersproject/web/lib/index.js.map new file mode 100644 index 0000000..717808f --- /dev/null +++ b/node_modules/@ethersproject/web/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,gDAAuF;AACvF,8CAA4D;AAC5D,wDAAwD;AACxD,kDAAmE;AAEnE,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,mCAA2D;AAE3D,SAAS,OAAO,CAAC,QAAgB;IAC7B,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO;QACvB,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,OAAO,CAAC,KAAU,EAAE,IAAY;IACrC,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;KAAE;IAEnC,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAEjD,IAAI,IAAA,mBAAW,EAAC,KAAK,CAAC,EAAE;QACpB,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,kBAAkB,CAAC,EAAE;YAC7F,IAAI;gBACA,OAAO,IAAA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C;yBAAE;wBAC3D,OAAO;qBACV;oBAED,IAAI,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;oBACxF,IAAI,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE;wBAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;qBAAE;oBACzD,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE;wBAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAAE;oBAE7D,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;iBAC9B;gBAED,OAAO,IAAI,CAAC;YAChB,CAAC,EAAE,UAAS,KAAK;gBACb,IAAI,MAAM,EAAE,EAAE;oBAAE,MAAM,CAAC,KAAK,CAAC,CAAC;iBAAE;YACpC,CAAC,CAAC,CAAC;QACP,CAAC;QACD,KAAK,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACP,CAAC;AAhED,oBAgEC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/types.d.ts b/node_modules/@ethersproject/web/lib/types.d.ts new file mode 100644 index 0000000..8d2591e --- /dev/null +++ b/node_modules/@ethersproject/web/lib/types.d.ts @@ -0,0 +1,18 @@ +export declare type GetUrlResponse = { + statusCode: number; + statusMessage: string; + headers: { + [key: string]: string; + }; + body: Uint8Array; +}; +export declare type Options = { + method?: string; + allowGzip?: boolean; + body?: Uint8Array; + headers?: { + [key: string]: string; + }; + skipFetchSetup?: boolean; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/types.d.ts.map b/node_modules/@ethersproject/web/lib/types.d.ts.map new file mode 100644 index 0000000..f993c04 --- /dev/null +++ b/node_modules/@ethersproject/web/lib/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE;QAAE,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;IACrC,IAAI,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE;QAAE,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/types.js b/node_modules/@ethersproject/web/lib/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/@ethersproject/web/lib/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@ethersproject/web/lib/types.js.map b/node_modules/@ethersproject/web/lib/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/node_modules/@ethersproject/web/lib/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src.ts/types.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@ethersproject/web/package.json b/node_modules/@ethersproject/web/package.json new file mode 100644 index 0000000..6f4106d --- /dev/null +++ b/node_modules/@ethersproject/web/package.json @@ -0,0 +1,52 @@ +{ + "_ethers.alias": { + "geturl.js": "browser-geturl.js" + }, + "author": "Richard Moore ", + "browser": { + "./lib/geturl": "./lib/browser-geturl.js" + }, + "dependencies": { + "@ethersproject/base64": "^5.5.0", + "@ethersproject/bytes": "^5.5.0", + "@ethersproject/logger": "^5.5.0", + "@ethersproject/properties": "^5.5.0", + "@ethersproject/strings": "^5.5.0" + }, + "description": "Utility fucntions for managing web requests for ethers.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "eb432aa1f44ad2cc268d000b266eae9b03db1d17", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "@ethersproject/web", + "publishConfig": { + "access": "public" + }, + "repository": { + "directory": "packages/web", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x111d1874bfaa91100367dfc7b0d920f66787685d2c5aa45903eb1b6ba627a757", + "types": "./lib/index.d.ts", + "version": "5.5.1" +} diff --git a/node_modules/@ethersproject/web/src.ts/_version.ts b/node_modules/@ethersproject/web/src.ts/_version.ts new file mode 100644 index 0000000..19983d3 --- /dev/null +++ b/node_modules/@ethersproject/web/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "web/5.5.1"; diff --git a/node_modules/@ethersproject/web/src.ts/browser-geturl.ts b/node_modules/@ethersproject/web/src.ts/browser-geturl.ts new file mode 100644 index 0000000..7770da7 --- /dev/null +++ b/node_modules/@ethersproject/web/src.ts/browser-geturl.ts @@ -0,0 +1,46 @@ +"use strict"; + +import { arrayify } from "@ethersproject/bytes"; + +import type { GetUrlResponse, Options } from "./types"; + +export { GetUrlResponse, Options }; + +export async function getUrl(href: string, options?: Options): Promise { + if (options == null) { options = { }; } + + const request: RequestInit = { + method: (options.method || "GET"), + headers: (options.headers || { }), + body: (options.body || undefined), + }; + + if (options.skipFetchSetup !== true) { + request.mode = "cors"; // no-cors, cors, *same-origin + request.cache = "no-cache"; // *default, no-cache, reload, force-cache, only-if-cached + request.credentials = "same-origin"; // include, *same-origin, omit + request.redirect = "follow"; // manual, *follow, error + request.referrer = "client"; // no-referrer, *client + }; + + const response = await fetch(href, request); + const body = await response.arrayBuffer(); + + const headers: { [ name: string ]: string } = { }; + if (response.headers.forEach) { + response.headers.forEach((value, key) => { + headers[key.toLowerCase()] = value; + }); + } else { + (<() => Array>(((response.headers)).keys))().forEach((key) => { + headers[key.toLowerCase()] = response.headers.get(key); + }); + } + + return { + headers: headers, + statusCode: response.status, + statusMessage: response.statusText, + body: arrayify(new Uint8Array(body)), + } +} diff --git a/node_modules/@ethersproject/web/src.ts/geturl.ts b/node_modules/@ethersproject/web/src.ts/geturl.ts new file mode 100644 index 0000000..286ccdf --- /dev/null +++ b/node_modules/@ethersproject/web/src.ts/geturl.ts @@ -0,0 +1,114 @@ +"use strict"; + +import http from "http"; +import https from "https"; +import { gunzipSync } from "zlib"; +import { parse } from "url" + +import { arrayify, concat } from "@ethersproject/bytes"; +import { shallowCopy } from "@ethersproject/properties"; + +import type { GetUrlResponse, Options } from "./types"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +export { GetUrlResponse, Options }; + +function getResponse(request: http.ClientRequest): Promise { + return new Promise((resolve, reject) => { + request.once("response", (resp: http.IncomingMessage) => { + const response: GetUrlResponse = { + statusCode: resp.statusCode, + statusMessage: resp.statusMessage, + headers: Object.keys(resp.headers).reduce((accum, name) => { + let value = resp.headers[name]; + if (Array.isArray(value)) { + value = value.join(", "); + } + accum[name] = value; + return accum; + }, <{ [ name: string ]: string }>{ }), + body: null + }; + //resp.setEncoding("utf8"); + + resp.on("data", (chunk: Uint8Array) => { + if (response.body == null) { response.body = new Uint8Array(0); } + response.body = concat([ response.body, chunk ]); + }); + + resp.on("end", () => { + if (response.headers["content-encoding"] === "gzip") { + //const size = response.body.length; + response.body = arrayify(gunzipSync(response.body)); + //console.log("Delta:", response.body.length - size, Buffer.from(response.body).toString()); + } + resolve(response); + }); + + resp.on("error", (error) => { + /* istanbul ignore next */ + (error).response = response; + reject(error); + }); + }); + + request.on("error", (error) => { reject(error); }); + }); +} + +// The URL.parse uses null instead of the empty string +function nonnull(value: string): string { + if (value == null) { return ""; } + return value; +} + +export async function getUrl(href: string, options?: Options): Promise { + if (options == null) { options = { }; } + + // @TODO: Once we drop support for node 8, we can pass the href + // directly into request and skip adding the components + // to this request object + const url = parse(href); + + const request = { + protocol: nonnull(url.protocol), + hostname: nonnull(url.hostname), + port: nonnull(url.port), + path: (nonnull(url.pathname) + nonnull(url.search)), + + method: (options.method || "GET"), + headers: shallowCopy(options.headers || { }), + }; + + if (options.allowGzip) { + request.headers["accept-encoding"] = "gzip"; + } + + let req: http.ClientRequest = null; + switch (nonnull(url.protocol)) { + case "http:": + req = http.request(request); + break; + case "https:": + req = https.request(request); + break; + default: + /* istanbul ignore next */ + logger.throwError(`unsupported protocol ${ url.protocol }`, Logger.errors.UNSUPPORTED_OPERATION, { + protocol: url.protocol, + operation: "request" + }); + } + + if (options.body) { + req.write(Buffer.from(options.body)); + } + req.end(); + + const response = await getResponse(req); + return response; +} + diff --git a/node_modules/@ethersproject/web/src.ts/index.ts b/node_modules/@ethersproject/web/src.ts/index.ts new file mode 100644 index 0000000..4d78ef0 --- /dev/null +++ b/node_modules/@ethersproject/web/src.ts/index.ts @@ -0,0 +1,458 @@ +"use strict"; + +import { decode as base64Decode, encode as base64Encode } from "@ethersproject/base64"; +import { hexlify, isBytesLike } from "@ethersproject/bytes"; +import { shallowCopy } from "@ethersproject/properties"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { getUrl, GetUrlResponse, Options } from "./geturl"; + +function staller(duration: number): Promise { + return new Promise((resolve) => { + setTimeout(resolve, duration); + }); +} + +function bodyify(value: any, type: string): string { + if (value == null) { return null; } + + if (typeof(value) === "string") { return value; } + + if (isBytesLike(value)) { + if (type && (type.split("/")[0] === "text" || type.split(";")[0].trim() === "application/json")) { + try { + return toUtf8String(value); + } catch (error) { }; + } + return hexlify(value); + } + + return value; +} + +// Exported Types +export type ConnectionInfo = { + url: string, + headers?: { [key: string]: string | number } + + user?: string, + password?: string, + + allowInsecureAuthentication?: boolean, + allowGzip?: boolean, + + throttleLimit?: number, + throttleSlotInterval?: number; + throttleCallback?: (attempt: number, url: string) => Promise, + + timeout?: number, +}; + +export interface OnceBlockable { + once(eventName: "block", handler: () => void): void; +} + +export interface OncePollable { + once(eventName: "poll", handler: () => void): void; +} + +export type PollOptions = { + timeout?: number, + floor?: number, + ceiling?: number, + interval?: number, + retryLimit?: number, + onceBlock?: OnceBlockable + oncePoll?: OncePollable +}; + +export type FetchJsonResponse = { + statusCode: number; + headers: { [ header: string ]: string }; +}; + + +type Header = { key: string, value: string }; + +// This API is still a work in progress; the future changes will likely be: +// - ConnectionInfo => FetchDataRequest +// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array } +// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified) +// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T +// For this reason, it should be considered internal until the API is finalized +export function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise { + + // How many times to retry in the event of a throttle + const attemptLimit = (typeof(connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit: 12; + logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), + "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); + + const throttleCallback = ((typeof(connection) === "object") ? connection.throttleCallback: null); + const throttleSlotInterval = ((typeof(connection) === "object" && typeof(connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval: 100); + logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), + "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); + + const headers: { [key: string]: Header } = { }; + + let url: string = null; + + // @TODO: Allow ConnectionInfo to override some of these values + const options: Options = { + method: "GET", + }; + + let allow304 = false; + + let timeout = 2 * 60 * 1000; + + if (typeof(connection) === "string") { + url = connection; + + } else if (typeof(connection) === "object") { + if (connection == null || connection.url == null) { + logger.throwArgumentError("missing URL", "connection.url", connection); + } + + url = connection.url; + + if (typeof(connection.timeout) === "number" && connection.timeout > 0) { + timeout = connection.timeout; + } + + if (connection.headers) { + for (const key in connection.headers) { + headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) }; + if (["if-none-match", "if-modified-since"].indexOf(key.toLowerCase()) >= 0) { + allow304 = true; + } + } + } + + options.allowGzip = !!connection.allowGzip; + + if (connection.user != null && connection.password != null) { + if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) { + logger.throwError( + "basic authentication requires a secure https url", + Logger.errors.INVALID_ARGUMENT, + { argument: "url", url: url, user: connection.user, password: "[REDACTED]" } + ); + } + + const authorization = connection.user + ":" + connection.password; + headers["authorization"] = { + key: "Authorization", + value: "Basic " + base64Encode(toUtf8Bytes(authorization)) + }; + } + } + const reData = new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$", "i"); + const dataMatch = ((url) ? url.match(reData): null); + if (dataMatch) { + try { + const response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": dataMatch[1] }, + body: base64Decode(dataMatch[2]) + }; + + let result: T = response.body; + if (processFunc) { + result = processFunc(response.body, response); + } + return Promise.resolve(result); + + } catch (error) { + logger.throwError("processing response error", Logger.errors.SERVER_ERROR, { + body: bodyify(dataMatch[1], dataMatch[2]), + error: error, + requestBody: null, + requestMethod: "GET", + url: url + }); + } + } + + if (body) { + options.method = "POST"; + options.body = body; + if (headers["content-type"] == null) { + headers["content-type"] = { key: "Content-Type", value: "application/octet-stream" }; + } + if (headers["content-length"] == null) { + headers["content-length"] = { key: "Content-Length", value: String(body.length) }; + } + } + + const flatHeaders: { [ key: string ]: string } = { }; + Object.keys(headers).forEach((key) => { + const header = headers[key]; + flatHeaders[header.key] = header.value; + }); + options.headers = flatHeaders; + + const runningTimeout = (function() { + let timer: NodeJS.Timer = null; + const promise: Promise = new Promise(function(resolve, reject) { + if (timeout) { + timer = setTimeout(() => { + if (timer == null) { return; } + timer = null; + + reject(logger.makeError("timeout", Logger.errors.TIMEOUT, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + timeout: timeout, + url: url + })); + }, timeout); + } + }); + + const cancel = function() { + if (timer == null) { return; } + clearTimeout(timer); + timer = null; + } + + return { promise, cancel }; + })(); + + const runningFetch = (async function() { + + for (let attempt = 0; attempt < attemptLimit; attempt++) { + let response: GetUrlResponse = null; + + try { + response = await getUrl(url, options); + + if (attempt < attemptLimit) { + if (response.statusCode === 301 || response.statusCode === 302) { + // Redirection; for now we only support absolute locataions + const location = response.headers.location || ""; + if (options.method === "GET" && location.match(/^https:/)) { + url = response.headers.location; + continue; + } + + } else if (response.statusCode === 429) { + // Exponential back-off throttling + let tryAgain = true; + if (throttleCallback) { + tryAgain = await throttleCallback(attempt, url); + } + + if (tryAgain) { + let stall = 0; + + const retryAfter = response.headers["retry-after"]; + if (typeof(retryAfter) === "string" && retryAfter.match(/^[1-9][0-9]*$/)) { + stall = parseInt(retryAfter) * 1000; + } else { + stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + } + + //console.log("Stalling 429"); + await staller(stall); + continue; + } + } + } + + } catch (error) { + response = (error).response; + if (response == null) { + runningTimeout.cancel(); + logger.throwError("missing response", Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + serverError: error, + url: url + }); + } + } + + + let body = response.body; + + if (allow304 && response.statusCode === 304) { + body = null; + + } else if (response.statusCode < 200 || response.statusCode >= 300) { + runningTimeout.cancel(); + logger.throwError("bad response", Logger.errors.SERVER_ERROR, { + status: response.statusCode, + headers: response.headers, + body: bodyify(body, ((response.headers) ? response.headers["content-type"]: null)), + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + + if (processFunc) { + try { + const result = await processFunc(body, response); + runningTimeout.cancel(); + return result; + + } catch (error) { + // Allow the processFunc to trigger a throttle + if (error.throttleRetry && attempt < attemptLimit) { + let tryAgain = true; + if (throttleCallback) { + tryAgain = await throttleCallback(attempt, url); + } + + if (tryAgain) { + const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + //console.log("Stalling callback"); + await staller(timeout); + continue; + } + } + + runningTimeout.cancel(); + logger.throwError("processing response error", Logger.errors.SERVER_ERROR, { + body: bodyify(body, ((response.headers) ? response.headers["content-type"]: null)), + error: error, + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + } + + runningTimeout.cancel(); + + // If we had a processFunc, it either returned a T or threw above. + // The "body" is now a Uint8Array. + return (body); + } + + return logger.throwError("failed response", Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + })(); + + return Promise.race([ runningTimeout.promise, runningFetch ]); +} + +export function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise { + let processJsonFunc = (value: Uint8Array, response: FetchJsonResponse) => { + let result: any = null; + if (value != null) { + try { + result = JSON.parse(toUtf8String(value)); + } catch (error) { + logger.throwError("invalid JSON", Logger.errors.SERVER_ERROR, { + body: value, + error: error + }); + } + } + + if (processFunc) { + result = processFunc(result, response); + } + + return result; + } + + // If we have json to send, we must + // - add content-type of application/json (unless already overridden) + // - convert the json to bytes + let body: Uint8Array = null; + if (json != null) { + body = toUtf8Bytes(json); + + // Create a connection with the content-type set for JSON + const updated: ConnectionInfo = (typeof(connection) === "string") ? ({ url: connection }): shallowCopy(connection); + if (updated.headers) { + const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === "content-type")).length) !== 0; + if (!hasContentType) { + updated.headers = shallowCopy(updated.headers); + updated.headers["content-type"] = "application/json"; + } + } else { + updated.headers = { "content-type": "application/json" }; + } + connection = updated; + } + + return _fetchData(connection, body, processJsonFunc); +} + +export function poll(func: () => Promise, options?: PollOptions): Promise { + if (!options) { options = {}; } + options = shallowCopy(options); + if (options.floor == null) { options.floor = 0; } + if (options.ceiling == null) { options.ceiling = 10000; } + if (options.interval == null) { options.interval = 250; } + + return new Promise(function(resolve, reject) { + + let timer: NodeJS.Timer = null; + let done: boolean = false; + + // Returns true if cancel was successful. Unsuccessful cancel means we're already done. + const cancel = (): boolean => { + if (done) { return false; } + done = true; + if (timer) { clearTimeout(timer); } + return true; + }; + + if (options.timeout) { + timer = setTimeout(() => { + if (cancel()) { reject(new Error("timeout")); } + }, options.timeout) + } + + const retryLimit = options.retryLimit; + + let attempt = 0; + function check() { + return func().then(function(result) { + + // If we have a result, or are allowed null then we're done + if (result !== undefined) { + if (cancel()) { resolve(result); } + + } else if (options.oncePoll) { + options.oncePoll.once("poll", check); + + } else if (options.onceBlock) { + options.onceBlock.once("block", check); + + // Otherwise, exponential back-off (up to 10s) our next request + } else if (!done) { + attempt++; + if (attempt > retryLimit) { + if (cancel()) { reject(new Error("retry limit reached")); } + return; + } + + let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt))); + if (timeout < options.floor) { timeout = options.floor; } + if (timeout > options.ceiling) { timeout = options.ceiling; } + + setTimeout(check, timeout); + } + + return null; + }, function(error) { + if (cancel()) { reject(error); } + }); + } + check(); + }); +} + diff --git a/node_modules/@ethersproject/web/src.ts/types.ts b/node_modules/@ethersproject/web/src.ts/types.ts new file mode 100644 index 0000000..3c80dc8 --- /dev/null +++ b/node_modules/@ethersproject/web/src.ts/types.ts @@ -0,0 +1,17 @@ +"use strict"; + +export type GetUrlResponse = { + statusCode: number; + statusMessage: string; + headers: { [ key: string] : string }; + body: Uint8Array; +}; + +export type Options = { + method?: string; + allowGzip?: boolean; + body?: Uint8Array; + headers?: { [ key: string] : string }; + skipFetchSetup?: boolean; +}; + diff --git a/node_modules/@ethersproject/web/thirdparty.d.ts b/node_modules/@ethersproject/web/thirdparty.d.ts new file mode 100644 index 0000000..689c7e6 --- /dev/null +++ b/node_modules/@ethersproject/web/thirdparty.d.ts @@ -0,0 +1,4 @@ +declare module "node-fetch" { + function fetch(url: string, options: any): Promise; + export default fetch; +} diff --git a/node_modules/@ethersproject/wordlists/LICENSE.md b/node_modules/@ethersproject/wordlists/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/@ethersproject/wordlists/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@ethersproject/wordlists/README.md b/node_modules/@ethersproject/wordlists/README.md new file mode 100644 index 0000000..ac3cec4 --- /dev/null +++ b/node_modules/@ethersproject/wordlists/README.md @@ -0,0 +1,31 @@ +BIP39 Wordlists +=============== + +This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js). + +Supported Languages: + +- **en** - English +- **es** - Spanish +- **fr** - French +- **it** - Italian +- **ja** - Japanese +- **ko** - Korean +- **zh_cn** - Chinese (simplified) +- **zh_tw** - Chinese (traditional) + +For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/wordlists/). + + +Browser +------- + +In the browser distribution file, only the English word list is included in the +root `ethers` pacakge. To include additional word lists, they must be added using +additional ` +``` + +Keys +---- + +All keys must be 128 bits (16 bytes), 192 bits (24 bytes) or 256 bits (32 bytes) long. + +The library work with `Array`, `Uint8Array` and `Buffer` objects as well as any *array-like* object (i.e. must have a `length` property, and have a valid byte value for each entry). + +```javascript +// 128-bit, 192-bit and 256-bit keys +var key_128 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; +var key_192 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23]; +var key_256 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31]; + +// or, you may use Uint8Array: +var key_128_array = new Uint8Array(key_128); +var key_192_array = new Uint8Array(key_192); +var key_258_array = new Uint8Array(key_256); + +// or, you may use Buffer in node.js: +var key_128_buffer = new Buffer(key_128); +var key_192_buffer = new Buffer(key_192); +var key_258_buffer = new Buffer(key_256); +``` + + +To generate keys from simple-to-remember passwords, consider using a password-based key-derivation function such as [scrypt](https://www.npmjs.com/package/scrypt-js) or [bcrypt](https://www.npmjs.com/search?q=bcrypt). + + +Common Modes of Operation +------------------------- + +There are several modes of operations, each with various pros and cons. In general though, the **CBC** and **CTR** modes are recommended. The **ECB is NOT recommended.**, and is included primarily for completeness. + +### CTR - Counter (recommended) + +```javascript +// An example 128-bit key (16 bytes * 8 bits/byte = 128 bits) +var key = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]; + +// Convert text to bytes +var text = 'Text may be any length you wish, no padding is required.'; +var textBytes = aesjs.utils.utf8.toBytes(text); + +// The counter is optional, and if omitted will begin at 1 +var aesCtr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter(5)); +var encryptedBytes = aesCtr.encrypt(textBytes); + +// To print or store the binary data, you may convert it to hex +var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes); +console.log(encryptedHex); +// "a338eda3874ed884b6199150d36f49988c90f5c47fe7792b0cf8c7f77eeffd87 +// ea145b73e82aefcf2076f881c88879e4e25b1d7b24ba2788" + +// When ready to decrypt the hex string, convert it back to bytes +var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex); + +// The counter mode of operation maintains internal state, so to +// decrypt a new instance must be instantiated. +var aesCtr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter(5)); +var decryptedBytes = aesCtr.decrypt(encryptedBytes); + +// Convert our bytes back into text +var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes); +console.log(decryptedText); +// "Text may be any length you wish, no padding is required." +``` + + +### CBC - Cipher-Block Chaining (recommended) + +```javascript +// An example 128-bit key +var key = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]; + +// The initialization vector (must be 16 bytes) +var iv = [ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,35, 36 ]; + +// Convert text to bytes (text must be a multiple of 16 bytes) +var text = 'TextMustBe16Byte'; +var textBytes = aesjs.utils.utf8.toBytes(text); + +var aesCbc = new aesjs.ModeOfOperation.cbc(key, iv); +var encryptedBytes = aesCbc.encrypt(textBytes); + +// To print or store the binary data, you may convert it to hex +var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes); +console.log(encryptedHex); +// "104fb073f9a131f2cab49184bb864ca2" + +// When ready to decrypt the hex string, convert it back to bytes +var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex); + +// The cipher-block chaining mode of operation maintains internal +// state, so to decrypt a new instance must be instantiated. +var aesCbc = new aesjs.ModeOfOperation.cbc(key, iv); +var decryptedBytes = aesCbc.decrypt(encryptedBytes); + +// Convert our bytes back into text +var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes); +console.log(decryptedText); +// "TextMustBe16Byte" +``` + + +### CFB - Cipher Feedback + +```javascript +// An example 128-bit key +var key = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]; + +// The initialization vector (must be 16 bytes) +var iv = [ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,35, 36 ]; + +// Convert text to bytes (must be a multiple of the segment size you choose below) +var text = 'TextMustBeAMultipleOfSegmentSize'; +var textBytes = aesjs.utils.utf8.toBytes(text); + +// The segment size is optional, and defaults to 1 +var segmentSize = 8; +var aesCfb = new aesjs.ModeOfOperation.cfb(key, iv, segmentSize); +var encryptedBytes = aesCfb.encrypt(textBytes); + +// To print or store the binary data, you may convert it to hex +var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes); +console.log(encryptedHex); +// "55e3af2638c560b4fdb9d26a630733ea60197ec23deb85b1f60f71f10409ce27" + +// When ready to decrypt the hex string, convert it back to bytes +var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex); + +// The cipher feedback mode of operation maintains internal state, +// so to decrypt a new instance must be instantiated. +var aesCfb = new aesjs.ModeOfOperation.cfb(key, iv, 8); +var decryptedBytes = aesCfb.decrypt(encryptedBytes); + +// Convert our bytes back into text +var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes); +console.log(decryptedText); +// "TextMustBeAMultipleOfSegmentSize" +``` + + +### OFB - Output Feedback + +```javascript +// An example 128-bit key +var key = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]; + +// The initialization vector (must be 16 bytes) +var iv = [ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,35, 36 ]; + +// Convert text to bytes +var text = 'Text may be any length you wish, no padding is required.'; +var textBytes = aesjs.utils.utf8.toBytes(text); + +var aesOfb = new aesjs.ModeOfOperation.ofb(key, iv); +var encryptedBytes = aesOfb.encrypt(textBytes); + +// To print or store the binary data, you may convert it to hex +var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes); +console.log(encryptedHex); +// "55e3af2655dd72b9f32456042f39bae9accff6259159e608be55a1aa313c598d +// b4b18406d89c83841c9d1af13b56de8eda8fcfe9ec8e75e8" + +// When ready to decrypt the hex string, convert it back to bytes +var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex); + +// The output feedback mode of operation maintains internal state, +// so to decrypt a new instance must be instantiated. +var aesOfb = new aesjs.ModeOfOperation.ofb(key, iv); +var decryptedBytes = aesOfb.decrypt(encryptedBytes); + +// Convert our bytes back into text +var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes); +console.log(decryptedText); +// "Text may be any length you wish, no padding is required." +``` + + +### ECB - Electronic Codebook (NOT recommended) + +This mode is **not** recommended. Since, for a given key, the same plaintext block in produces the same ciphertext block out, this mode of operation can leak data, such as patterns. For more details and examples, see the Wikipedia article, [Electronic Codebook](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_.28ECB.29). + +```javascript +// An example 128-bit key +var key = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]; + +// Convert text to bytes +var text = 'TextMustBe16Byte'; +var textBytes = aesjs.utils.utf8.toBytes(text); + +var aesEcb = new aesjs.ModeOfOperation.ecb(key); +var encryptedBytes = aesEcb.encrypt(textBytes); + +// To print or store the binary data, you may convert it to hex +var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes); +console.log(encryptedHex); +// "a7d93b35368519fac347498dec18b458" + +// When ready to decrypt the hex string, convert it back to bytes +var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex); + +// Since electronic codebook does not store state, we can +// reuse the same instance. +//var aesEcb = new aesjs.ModeOfOperation.ecb(key); +var decryptedBytes = aesEcb.decrypt(encryptedBytes); + +// Convert our bytes back into text +var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes); +console.log(decryptedText); +// "TextMustBe16Byte" +``` + + + +Block Cipher +------------ + +You should usually use one of the above common modes of operation. Using the block cipher algorithm directly is also possible using **ECB** as that mode of operation is merely a thin wrapper. + +But this might be useful to experiment with custom modes of operation or play with block cipher algorithms. + +```javascript + +// the AES block cipher algorithm works on 16 byte bloca ks, no more, no less +var text = "ABlockIs16Bytes!"; +var textAsBytes = aesjs.utils.utf8.toBytes(text) +console.log(textAsBytes); +// [65, 66, 108, 111, 99, 107, 73, 115, 49, 54, 66, 121, 116, 101, 115, 33] + +// create an instance of the block cipher algorithm +var key = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3]; +var aes = new aesjs.AES(key); + +// encrypt... +var encryptedBytes = aes.encrypt(textAsBytes); +console.log(encryptedBytes); +// [136, 15, 199, 174, 118, 133, 233, 177, 143, 47, 42, 211, 96, 55, 107, 109] + +// To print or store the binary data, you may convert it to hex +var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes); +console.log(encryptedHex); +// "880fc7ae7685e9b18f2f2ad360376b6d" + +// When ready to decrypt the hex string, convert it back to bytes +var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex); + +// decrypt... +var decryptedBytes = aes.decrypt(encryptedBytes); +console.log(decryptedBytes); +// [65, 66, 108, 111, 99, 107, 73, 115, 49, 54, 66, 121, 116, 101, 115, 33] + + +// decode the bytes back into our original text +var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes); +console.log(decryptedText); +// "ABlockIs16Bytes!" +``` + + +Notes +===== + +What is a Key +------------- + +This seems to be a point of confusion for many people new to using encryption. You can think of the key as the *"password"*. However, these algorithms require the *"password"* to be a specific length. + +With AES, there are three possible key lengths, 128-bit (16 bytes), 192-bit (24 bytes) or 256-bit (32 bytes). When you create an AES object, the key size is automatically detected, so it is important to pass in a key of the correct length. + +Often, you wish to provide a password of arbitrary length, for example, something easy to remember or write down. In these cases, you must come up with a way to transform the password into a key of a specific length. A **Password-Based Key Derivation Function** (PBKDF) is an algorithm designed for this exact purpose. + +Here is an example, using the popular (possibly obsolete?) pbkdf2: + +```javascript +var pbkdf2 = require('pbkdf2'); + +var key_128 = pbkdf2.pbkdf2Sync('password', 'salt', 1, 128 / 8, 'sha512'); +var key_192 = pbkdf2.pbkdf2Sync('password', 'salt', 1, 192 / 8, 'sha512'); +var key_256 = pbkdf2.pbkdf2Sync('password', 'salt', 1, 256 / 8, 'sha512'); +``` + +Another possibility, is to use a hashing function, such as SHA256 to hash the password, but this method is vulnerable to [Rainbow Attacks](http://en.wikipedia.org/wiki/Rainbow_table), unless you use a [salt](http://en.wikipedia.org/wiki/Salt_(cryptography)). + +Performance +----------- + +Todo... + +Tests +----- + +A test suite has been generated (`test/test-vectors.json`) from a known correct implementation, [pycrypto](https://www.dlitz.net/software/pycrypto/). To generate new test vectors, run `python generate-tests.py`. + +To run the node.js test suite: + +``` +npm test +``` + +To run the web browser tests, open the `test/test.html` file in your browser. + +FAQ +--- + +#### How do I get a question I have added? + +E-mail me at aes-js@ricmoo.com with any questions, suggestions, comments, et cetera. + + +Donations +--------- + +Obviously, it's all licensed under the MIT license, so use it as you wish; but if you'd like to buy me a coffee, I won't complain. =) + +- Bitcoin - `1K1Ax9t6uJmjE4X5xcoVuyVTsiLrYRqe2P` +- Ethereum - `0x70bDC274028F3f391E398dF8e3977De64FEcBf04` diff --git a/node_modules/aes-js/bower.json b/node_modules/aes-js/bower.json new file mode 100644 index 0000000..63b313d --- /dev/null +++ b/node_modules/aes-js/bower.json @@ -0,0 +1,32 @@ +{ + "name": "aes-js", + "description": "A pure JavaScript implementation of the AES block cipher and all common modes of operation.", + "main": "index.js", + "authors": [ + "Richard Moore " + ], + "license": "MIT", + "keywords": [ + "aes", + "aes-ctr", + "aes-ofb", + "aes-ecb", + "aes-cbc", + "aes-cfb", + "encrypt", + "decrypt", + "block", + "cipher" + ], + "homepage": "https://github.com/ricmoo/aes-js", + "moduleType": [ + "globals" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/aes-js/generate-tests.py b/node_modules/aes-js/generate-tests.py new file mode 100644 index 0000000..3e3bcc9 --- /dev/null +++ b/node_modules/aes-js/generate-tests.py @@ -0,0 +1,127 @@ +# The MIT License (MIT) +# +# Copyright (c) 2014 Richard Moore +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + + +# This file is a modified version of the test suite for pyaes (https://www.github.com/ricmoo/pyaes/) + + +import json + +class NoIndent(object): + def __init__(self, value): + self.value = value + +def default(o, encoder=json.JSONEncoder()): + if isinstance(o, NoIndent): + return '__' + json.dumps(o.value) + '__' + return encoder.default(o) + + +import os, time + +Tests = [] + +# compare against a known working implementation +from Crypto.Cipher import AES as KAES +from Crypto.Util import Counter as KCounter +for mode in [ 'CBC', 'CTR', 'CFB', 'ECB', 'OFB' ]: + + (tt_ksetup, tt_kencrypt, tt_kdecrypt) = (0.0, 0.0, 0.0) + (tt_setup, tt_encrypt, tt_decrypt) = (0.0, 0.0, 0.0) + count = 0 + + for key_size in (128, 192, 256): + + for test in xrange(1, 8): + key = os.urandom(key_size // 8) + + iv = None + segment_size = None + + if mode == 'CBC': + iv = os.urandom(16) + + text_length = [None, 16, 16, 16, 32, 48, 64, 64, 64][test] + if test == 1: + plaintext = [ '' ] + else: + plaintext = [ os.urandom(text_length) for x in xrange(0, test) ] + + kaes = KAES.new(key, KAES.MODE_CBC, IV = iv) + kaes2 = KAES.new(key, KAES.MODE_CBC, IV = iv) + + elif mode == 'CFB': + iv = os.urandom(16) + plaintext = [ os.urandom(test * 5) for x in xrange(0, test) ] + + kaes = KAES.new(key, KAES.MODE_CFB, IV = iv, segment_size = test * 8) + kaes2 = KAES.new(key, KAES.MODE_CFB, IV = iv, segment_size = test * 8) + + segment_size = test + + elif mode == 'ECB': + text_length = [None, 16, 16, 16, 32, 48, 64, 64, 64][test] + if test == 1: + plaintext = [ '' ] + else: + plaintext = [ os.urandom(text_length) for x in xrange(0, test) ] + + kaes = KAES.new(key, KAES.MODE_ECB) + kaes2 = KAES.new(key, KAES.MODE_ECB) + + elif mode == 'OFB': + iv = os.urandom(16) + plaintext = [ os.urandom(16) for x in xrange(0, test) ] + + kaes = KAES.new(key, KAES.MODE_OFB, IV = iv) + kaes2 = KAES.new(key, KAES.MODE_OFB, IV = iv) + + elif mode == 'CTR': + text_length = [None, 3, 16, 127, 128, 129, 1500, 10000, 100000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008][test] + if test < 6: + plaintext = [ os.urandom(text_length) ] + else: + plaintext = [ os.urandom(text_length) for x in xrange(0, test) ] + + kaes = KAES.new(key, KAES.MODE_CTR, counter = KCounter.new(128, initial_value = 0)) + kaes2 = KAES.new(key, KAES.MODE_CTR, counter = KCounter.new(128, initial_value = 0)) + + count += 1 + + kenc = [kaes.encrypt(p) for p in plaintext] + + iv_enc = None + if iv: + iv_enc = NoIndent([ord(x) for x in iv]) + Tests.append(dict( + encrypted = [NoIndent([ord(x) for x in chunk]) for chunk in kenc], + iv = iv_enc, + key = NoIndent([ord(x) for x in key]), + modeOfOperation = mode.lower(), + plaintext = [NoIndent([ord(x) for x in chunk]) for chunk in plaintext], + segmentSize = segment_size, + )) + + dt1 = [kaes2.decrypt(k) for k in kenc] + +print json.dumps(Tests, indent = 4, sort_keys = True, default = default).replace('"__', '').replace('__"', '') + diff --git a/node_modules/aes-js/index.js b/node_modules/aes-js/index.js new file mode 100644 index 0000000..6fbdfe7 --- /dev/null +++ b/node_modules/aes-js/index.js @@ -0,0 +1,798 @@ +"use strict"; + +(function(root) { + + function checkInt(value) { + return (parseInt(value) === value); + } + + function checkInts(arrayish) { + if (!checkInt(arrayish.length)) { return false; } + + for (var i = 0; i < arrayish.length; i++) { + if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) { + return false; + } + } + + return true; + } + + function coerceArray(arg, copy) { + + // ArrayBuffer view + if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') { + + if (copy) { + if (arg.slice) { + arg = arg.slice(); + } else { + arg = Array.prototype.slice.call(arg); + } + } + + return arg; + } + + // It's an array; check it is a valid representation of a byte + if (Array.isArray(arg)) { + if (!checkInts(arg)) { + throw new Error('Array contains invalid value: ' + arg); + } + + return new Uint8Array(arg); + } + + // Something else, but behaves like an array (maybe a Buffer? Arguments?) + if (checkInt(arg.length) && checkInts(arg)) { + return new Uint8Array(arg); + } + + throw new Error('unsupported array-like object'); + } + + function createArray(length) { + return new Uint8Array(length); + } + + function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) { + if (sourceStart != null || sourceEnd != null) { + if (sourceArray.slice) { + sourceArray = sourceArray.slice(sourceStart, sourceEnd); + } else { + sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd); + } + } + targetArray.set(sourceArray, targetStart); + } + + + + var convertUtf8 = (function() { + function toBytes(text) { + var result = [], i = 0; + text = encodeURI(text); + while (i < text.length) { + var c = text.charCodeAt(i++); + + // if it is a % sign, encode the following 2 bytes as a hex value + if (c === 37) { + result.push(parseInt(text.substr(i, 2), 16)) + i += 2; + + // otherwise, just the actual byte + } else { + result.push(c) + } + } + + return coerceArray(result); + } + + function fromBytes(bytes) { + var result = [], i = 0; + + while (i < bytes.length) { + var c = bytes[i]; + + if (c < 128) { + result.push(String.fromCharCode(c)); + i++; + } else if (c > 191 && c < 224) { + result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f))); + i += 2; + } else { + result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f))); + i += 3; + } + } + + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + var convertHex = (function() { + function toBytes(text) { + var result = []; + for (var i = 0; i < text.length; i += 2) { + result.push(parseInt(text.substr(i, 2), 16)); + } + + return result; + } + + // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html + var Hex = '0123456789abcdef'; + + function fromBytes(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i++) { + var v = bytes[i]; + result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]); + } + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + + // Number of rounds by keysize + var numberOfRounds = {16: 10, 24: 12, 32: 14} + + // Round constant words + var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91]; + + // S-box and Inverse S-box (S is for Substitution) + var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76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, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]; + + // Transformations for encryption + var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a]; + var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616]; + var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16]; + var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c]; + + // Transformations for decryption + var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742]; + var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857]; + var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8]; + var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0]; + + // Transformations for decryption key expansion + var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]; + var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697]; + var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46]; + var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d]; + + function convertToInt32(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i += 4) { + result.push( + (bytes[i ] << 24) | + (bytes[i + 1] << 16) | + (bytes[i + 2] << 8) | + bytes[i + 3] + ); + } + return result; + } + + var AES = function(key) { + if (!(this instanceof AES)) { + throw Error('AES must be instanitated with `new`'); + } + + Object.defineProperty(this, 'key', { + value: coerceArray(key, true) + }); + + this._prepare(); + } + + + AES.prototype._prepare = function() { + + var rounds = numberOfRounds[this.key.length]; + if (rounds == null) { + throw new Error('invalid key size (must be 16, 24 or 32 bytes)'); + } + + // encryption round keys + this._Ke = []; + + // decryption round keys + this._Kd = []; + + for (var i = 0; i <= rounds; i++) { + this._Ke.push([0, 0, 0, 0]); + this._Kd.push([0, 0, 0, 0]); + } + + var roundKeyCount = (rounds + 1) * 4; + var KC = this.key.length / 4; + + // convert the key into ints + var tk = convertToInt32(this.key); + + // copy values into round key arrays + var index; + for (var i = 0; i < KC; i++) { + index = i >> 2; + this._Ke[index][i % 4] = tk[i]; + this._Kd[rounds - index][i % 4] = tk[i]; + } + + // key expansion (fips-197 section 5.2) + var rconpointer = 0; + var t = KC, tt; + while (t < roundKeyCount) { + tt = tk[KC - 1]; + tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^ + (S[(tt >> 8) & 0xFF] << 16) ^ + (S[ tt & 0xFF] << 8) ^ + S[(tt >> 24) & 0xFF] ^ + (rcon[rconpointer] << 24)); + rconpointer += 1; + + // key expansion (for non-256 bit) + if (KC != 8) { + for (var i = 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + + // key expansion for 256-bit keys is "slightly different" (fips-197) + } else { + for (var i = 1; i < (KC / 2); i++) { + tk[i] ^= tk[i - 1]; + } + tt = tk[(KC / 2) - 1]; + + tk[KC / 2] ^= (S[ tt & 0xFF] ^ + (S[(tt >> 8) & 0xFF] << 8) ^ + (S[(tt >> 16) & 0xFF] << 16) ^ + (S[(tt >> 24) & 0xFF] << 24)); + + for (var i = (KC / 2) + 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + } + + // copy values into round key arrays + var i = 0, r, c; + while (i < KC && t < roundKeyCount) { + r = t >> 2; + c = t % 4; + this._Ke[r][c] = tk[i]; + this._Kd[rounds - r][c] = tk[i++]; + t++; + } + } + + // inverse-cipher-ify the decryption round key (fips-197 section 5.3) + for (var r = 1; r < rounds; r++) { + for (var c = 0; c < 4; c++) { + tt = this._Kd[r][c]; + this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^ + U2[(tt >> 16) & 0xFF] ^ + U3[(tt >> 8) & 0xFF] ^ + U4[ tt & 0xFF]); + } + } + } + + AES.prototype.encrypt = function(plaintext) { + if (plaintext.length != 16) { + throw new Error('invalid plaintext size (must be 16 bytes)'); + } + + var rounds = this._Ke.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(plaintext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Ke[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T1[(t[ i ] >> 24) & 0xff] ^ + T2[(t[(i + 1) % 4] >> 16) & 0xff] ^ + T3[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T4[ t[(i + 3) % 4] & 0xff] ^ + this._Ke[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Ke[rounds][i]; + result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + } + + AES.prototype.decrypt = function(ciphertext) { + if (ciphertext.length != 16) { + throw new Error('invalid ciphertext size (must be 16 bytes)'); + } + + var rounds = this._Kd.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(ciphertext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Kd[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T5[(t[ i ] >> 24) & 0xff] ^ + T6[(t[(i + 3) % 4] >> 16) & 0xff] ^ + T7[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T8[ t[(i + 1) % 4] & 0xff] ^ + this._Kd[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Kd[rounds][i]; + result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + } + + + /** + * Mode Of Operation - Electonic Codebook (ECB) + */ + var ModeOfOperationECB = function(key) { + if (!(this instanceof ModeOfOperationECB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Electronic Code Block"; + this.name = "ecb"; + + this._aes = new AES(key); + } + + ModeOfOperationECB.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + block = this._aes.encrypt(block); + copyArray(block, ciphertext, i); + } + + return ciphertext; + } + + ModeOfOperationECB.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + copyArray(block, plaintext, i); + } + + return plaintext; + } + + + /** + * Mode Of Operation - Cipher Block Chaining (CBC) + */ + var ModeOfOperationCBC = function(key, iv) { + if (!(this instanceof ModeOfOperationCBC)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Block Chaining"; + this.name = "cbc"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastCipherblock = coerceArray(iv, true); + + this._aes = new AES(key); + } + + ModeOfOperationCBC.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + + for (var j = 0; j < 16; j++) { + block[j] ^= this._lastCipherblock[j]; + } + + this._lastCipherblock = this._aes.encrypt(block); + copyArray(this._lastCipherblock, ciphertext, i); + } + + return ciphertext; + } + + ModeOfOperationCBC.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + + for (var j = 0; j < 16; j++) { + plaintext[i + j] = block[j] ^ this._lastCipherblock[j]; + } + + copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16); + } + + return plaintext; + } + + + /** + * Mode Of Operation - Cipher Feedback (CFB) + */ + var ModeOfOperationCFB = function(key, iv, segmentSize) { + if (!(this instanceof ModeOfOperationCFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Feedback"; + this.name = "cfb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 size)'); + } + + if (!segmentSize) { segmentSize = 1; } + + this.segmentSize = segmentSize; + + this._shiftRegister = coerceArray(iv, true); + + this._aes = new AES(key); + } + + ModeOfOperationCFB.prototype.encrypt = function(plaintext) { + if ((plaintext.length % this.segmentSize) != 0) { + throw new Error('invalid plaintext size (must be segmentSize bytes)'); + } + + var encrypted = coerceArray(plaintext, true); + + var xorSegment; + for (var i = 0; i < encrypted.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + for (var j = 0; j < this.segmentSize; j++) { + encrypted[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return encrypted; + } + + ModeOfOperationCFB.prototype.decrypt = function(ciphertext) { + if ((ciphertext.length % this.segmentSize) != 0) { + throw new Error('invalid ciphertext size (must be segmentSize bytes)'); + } + + var plaintext = coerceArray(ciphertext, true); + + var xorSegment; + for (var i = 0; i < plaintext.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + + for (var j = 0; j < this.segmentSize; j++) { + plaintext[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return plaintext; + } + + /** + * Mode Of Operation - Output Feedback (OFB) + */ + var ModeOfOperationOFB = function(key, iv) { + if (!(this instanceof ModeOfOperationOFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Output Feedback"; + this.name = "ofb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastPrecipher = coerceArray(iv, true); + this._lastPrecipherIndex = 16; + + this._aes = new AES(key); + } + + ModeOfOperationOFB.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._lastPrecipherIndex === 16) { + this._lastPrecipher = this._aes.encrypt(this._lastPrecipher); + this._lastPrecipherIndex = 0; + } + encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++]; + } + + return encrypted; + } + + // Decryption is symetric + ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt; + + + /** + * Counter object for CTR common mode of operation + */ + var Counter = function(initialValue) { + if (!(this instanceof Counter)) { + throw Error('Counter must be instanitated with `new`'); + } + + // We allow 0, but anything false-ish uses the default 1 + if (initialValue !== 0 && !initialValue) { initialValue = 1; } + + if (typeof(initialValue) === 'number') { + this._counter = createArray(16); + this.setValue(initialValue); + + } else { + this.setBytes(initialValue); + } + } + + Counter.prototype.setValue = function(value) { + if (typeof(value) !== 'number' || parseInt(value) != value) { + throw new Error('invalid counter value (must be an integer)'); + } + + for (var index = 15; index >= 0; --index) { + this._counter[index] = value % 256; + value = value >> 8; + } + } + + Counter.prototype.setBytes = function(bytes) { + bytes = coerceArray(bytes, true); + + if (bytes.length != 16) { + throw new Error('invalid counter bytes size (must be 16 bytes)'); + } + + this._counter = bytes; + }; + + Counter.prototype.increment = function() { + for (var i = 15; i >= 0; i--) { + if (this._counter[i] === 255) { + this._counter[i] = 0; + } else { + this._counter[i]++; + break; + } + } + } + + + /** + * Mode Of Operation - Counter (CTR) + */ + var ModeOfOperationCTR = function(key, counter) { + if (!(this instanceof ModeOfOperationCTR)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Counter"; + this.name = "ctr"; + + if (!(counter instanceof Counter)) { + counter = new Counter(counter) + } + + this._counter = counter; + + this._remainingCounter = null; + this._remainingCounterIndex = 16; + + this._aes = new AES(key); + } + + ModeOfOperationCTR.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._remainingCounterIndex === 16) { + this._remainingCounter = this._aes.encrypt(this._counter._counter); + this._remainingCounterIndex = 0; + this._counter.increment(); + } + encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++]; + } + + return encrypted; + } + + // Decryption is symetric + ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt; + + + /////////////////////// + // Padding + + // See:https://tools.ietf.org/html/rfc2315 + function pkcs7pad(data) { + data = coerceArray(data, true); + var padder = 16 - (data.length % 16); + var result = createArray(data.length + padder); + copyArray(data, result); + for (var i = data.length; i < result.length; i++) { + result[i] = padder; + } + return result; + } + + function pkcs7strip(data) { + data = coerceArray(data, true); + if (data.length < 16) { throw new Error('PKCS#7 invalid length'); } + + var padder = data[data.length - 1]; + if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); } + + var length = data.length - padder; + for (var i = 0; i < padder; i++) { + if (data[length + i] !== padder) { + throw new Error('PKCS#7 invalid padding byte'); + } + } + + var result = createArray(length); + copyArray(data, result, 0, 0, length); + return result; + } + + /////////////////////// + // Exporting + + + // The block cipher + var aesjs = { + AES: AES, + Counter: Counter, + + ModeOfOperation: { + ecb: ModeOfOperationECB, + cbc: ModeOfOperationCBC, + cfb: ModeOfOperationCFB, + ofb: ModeOfOperationOFB, + ctr: ModeOfOperationCTR + }, + + utils: { + hex: convertHex, + utf8: convertUtf8 + }, + + padding: { + pkcs7: { + pad: pkcs7pad, + strip: pkcs7strip + } + }, + + _arrayTest: { + coerceArray: coerceArray, + createArray: createArray, + copyArray: copyArray, + } + }; + + + // node.js + if (typeof exports !== 'undefined') { + module.exports = aesjs + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(define) === 'function' && define.amd) { + define(aesjs); + + // Web Browsers + } else { + + // If there was an existing library at "aesjs" make sure it's still available + if (root.aesjs) { + aesjs._aesjs = root.aesjs; + } + + root.aesjs = aesjs; + } + + +})(this); diff --git a/node_modules/aes-js/package.json b/node_modules/aes-js/package.json new file mode 100644 index 0000000..81023a9 --- /dev/null +++ b/node_modules/aes-js/package.json @@ -0,0 +1,34 @@ +{ + "name": "aes-js", + "version": "3.0.0", + "bugs": { + "url": "http://github.com/ricmoo/aes-js/issues", + "email": "github@ricmoo.com" + }, + "description": "A pure JavaScript implementation of the AES block cipher and all common modes of operation.", + "devDependencies": { + "nodeunit": "0.9.1" + }, + "main": "index.js", + "scripts": { + "test": "./node_modules/.bin/nodeunit test/index.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/ricmoo/aes-js.git" + }, + "keywords": [ + "aes", + "aes-ctr", + "aes-ofb", + "aes-ecb", + "aes-cbc", + "aes-cfb", + "encrypt", + "decrypt", + "block", + "cipher" + ], + "author": "Richard Moore ", + "license": "MIT" +} diff --git a/node_modules/aes-js/run-readme.py b/node_modules/aes-js/run-readme.py new file mode 100644 index 0000000..7f8d948 --- /dev/null +++ b/node_modules/aes-js/run-readme.py @@ -0,0 +1,15 @@ +import re + +reJavaScript = re.compile('```javascript((.|\n)*?)```') +readmeData = file('README.md').read() + +print 'const aesjs = require("./index.js");' +for (example, nl) in reJavaScript.findall(readmeData): + print 'console.log("=====================");' + print '(function() {' + print ' try {' + print 'console.log(%r)' % example + for line in example.split('\n'): + print (' ' * 8) + line + print ' } catch (error) { console.log("ERROR: ", error); }' + print '})();' diff --git a/node_modules/aes-js/test/index.js b/node_modules/aes-js/test/index.js new file mode 100644 index 0000000..87f25e7 --- /dev/null +++ b/node_modules/aes-js/test/index.js @@ -0,0 +1,12 @@ + +function populateTests(tests) { + for (var key in tests) { + module.exports[key] = tests[key]; + } +} + +populateTests(require('./test-aes.js')); +populateTests(require('./test-counter.js')); +populateTests(require('./test-buffer.js')); +populateTests(require('./test-errors.js')); +populateTests(require('./test-padding.js')); diff --git a/node_modules/aes-js/test/test-aes.js b/node_modules/aes-js/test/test-aes.js new file mode 100644 index 0000000..fbfe401 --- /dev/null +++ b/node_modules/aes-js/test/test-aes.js @@ -0,0 +1,83 @@ +var nodeunit = require('nodeunit'); + +var aes = require('../index'); + +function bufferEquals(a, b) { + if (a.length != b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] != b[i]) { return false; } + } + return true; +} + +function makeTest(options) { + + var modeOfOperation = options.modeOfOperation; + var mo = aes.ModeOfOperation[modeOfOperation]; + + var plaintext = []; + for (var i = 0; i < options.plaintext.length; i++) { + plaintext.push(new Buffer(options.plaintext[i])); + } + + var key = new Buffer(options.key); + + var iv = null; + if (options.iv) { iv = new Buffer(options.iv); } + + var segmentSize = 0; + if (options.segmentSize) { segmentSize = options.segmentSize; } + + var ciphertext = []; + for (var i = 0; i < options.encrypted.length; i++) { + ciphertext.push(new Buffer(options.encrypted[i])); + } + + + return function (test) { + var func; + switch (modeOfOperation) { + case 'ecb': + func = function() { return new mo(key); } + break; + case 'cfb': + func = function() { return new mo(key, iv, segmentSize); } + break; + case 'ofb': + case 'cbc': + func = function() { return new mo(key, iv); } + break; + case 'ctr': + func = function() { return new mo(key, new aes.Counter(0)); } + break; + default: + throw new Error('unknwon mode of operation') + } + + var encrypter = func(), decrypter = func(); + var totalDiffers = 0; + for (var i = 0; i < plaintext.length; i++) { + var ciphertext2 = encrypter.encrypt(plaintext[i]); + test.ok(bufferEquals(ciphertext2, ciphertext[i]), "encrypt failed to match test vector"); + + var plaintext2 = decrypter.decrypt(ciphertext2); + test.ok(bufferEquals(plaintext2, plaintext[i]), "decrypt failed to match original text"); + } + + test.done(); + }; +}; + + +var testVectors = require('./test-vectors.json'); + +var Tests = {}; +var counts = {} +for (var i = 0; i < testVectors.length; i++) { + var test = testVectors[i]; + name = test.modeOfOperation + '-' + test.key.length; + counts[name] = (counts[name] || 0) + 1; + Tests['test-' + name + '-' + counts[name]] = makeTest(test); +} + +module.exports = Tests; diff --git a/node_modules/aes-js/test/test-buffer.js b/node_modules/aes-js/test/test-buffer.js new file mode 100644 index 0000000..78b9ea6 --- /dev/null +++ b/node_modules/aes-js/test/test-buffer.js @@ -0,0 +1,44 @@ +'use strict'; + +var nodeunit = require('nodeunit'); + +var slowCreateBuffer = require('../index')._arrayTest.coerceArray; + +var testArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; +var testBuffer = new Buffer(testArray); + +// We mimic some weird non-array-but-sortof-like-an-array object that people on +// obscure browsers seem to have problems with, for the purpose of testing our +// slowCreateBuffer. +function WeirdBuffer(data) { + this.length = data.length; + for (var i = 0; i < data.length; i++) { + this[i] = data[i]; + } +} + +function buffersEqual(a, b) { + if (a.length !== b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} + +module.exports = { + "test-slowCreate": function(test) { + //var result = new AES(testArray).key; + var result = slowCreateBuffer(testArray); + test.ok(buffersEqual(testArray, result), 'bufferCreate failed to match input array'); + + result = slowCreateBuffer(testBuffer); + test.ok(buffersEqual(testBuffer, result), 'bufferCreate failed to match input array'); + + result = slowCreateBuffer(new WeirdBuffer(testArray)); + test.ok(buffersEqual(testBuffer, result), 'bufferCreate failed to match input array'); + + test.done(); + }, +}; diff --git a/node_modules/aes-js/test/test-counter.js b/node_modules/aes-js/test/test-counter.js new file mode 100644 index 0000000..f6643b0 --- /dev/null +++ b/node_modules/aes-js/test/test-counter.js @@ -0,0 +1,73 @@ +var nodeunit = require('nodeunit'); + +var aes = require('../index'); + +function bufferEquals(a, b) { + if (a.length != b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] != b[i]) { return false; } + } + return true; +} + +function makeTest (options) { + return function(test) { + var result = new Buffer(options.incrementResult, 'hex'); + + if (options.hasOwnProperty('nullish')) { + var counter = new aes.Counter(options.nullish); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to initialize with a nullish thing") + } + + if (options.hasOwnProperty('number')) { + + var counter = new aes.Counter(options.number); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to initialize with a number") + + counter.setValue(options.number); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to reset to a number") + + counter = new aes.Counter(); + counter.setValue(options.number); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to reset to a number") + } + + if (options.bytes) { + var bytes = new Buffer(options.bytes, 'hex'); + + var counter = new aes.Counter(bytes); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to initialize with bytes") + + counter.setBytes(bytes); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to reset with bytes") + + counter = new aes.Counter(); + counter.setBytes(bytes); + counter.increment(); + test.ok(bufferEquals(counter._counter, result), "counter failed to reset with bytes") + } + + test.done(); + }; +} + +module.exports = { + 'test-counter-nullish-null': makeTest({nullish: null, incrementResult: "00000000000000000000000000000002"}), + 'test-counter-nullish-undefined': makeTest({nullish: undefined, incrementResult: "00000000000000000000000000000002"}), + 'test-counter-number-0': makeTest({number: 0, incrementResult: "00000000000000000000000000000001"}), + 'test-counter-number-1': makeTest({number: 1, incrementResult: "00000000000000000000000000000002"}), + 'test-counter-number-254': makeTest({number: 254, incrementResult: "000000000000000000000000000000ff"}), + 'test-counter-number-255': makeTest({number: 255, incrementResult: "00000000000000000000000000000100"}), + 'test-counter-number-256': makeTest({number: 256, incrementResult: "00000000000000000000000000000101"}), + 'test-counter-bytes-0000': makeTest({bytes: "00000000000000000000000000000000", incrementResult: "00000000000000000000000000000001"}), + 'test-counter-bytes-00ff': makeTest({bytes: "000000000000000000000000000000ff", incrementResult: "00000000000000000000000000000100"}), + 'test-counter-bytes-ffff': makeTest({bytes: "ffffffffffffffffffffffffffffffff", incrementResult: "00000000000000000000000000000000"}), + 'test-counter-bytes-dead': makeTest({bytes: "deadbeefdeadbeefdeadbeefdeadbeef", incrementResult: "deadbeefdeadbeefdeadbeefdeadbef0"}), +}; + diff --git a/node_modules/aes-js/test/test-errors.js b/node_modules/aes-js/test/test-errors.js new file mode 100644 index 0000000..9876328 --- /dev/null +++ b/node_modules/aes-js/test/test-errors.js @@ -0,0 +1,198 @@ +'use strict'; + +var nodeunit = require('nodeunit'); + +var aes = require('../index'); + +function newBuffer(length) { + var buffer = new Buffer(length); + buffer.fill(42); + return buffer; +} + +// Invalid key sizes to try +var keySizes = [0, 1, 2, 7, 8, 9, 15, 17, 23, 25, 31, 33, 100]; + +module.exports = { + "test-errors-key-size": function(test) { + for (var i = 0; i < keySizes.length; i++) { + test.throws(function() { + var moo = new aes.ModeOfOperation.ecb(newBuffer(keySizes[i])); + }, function(error) { + return (error.message === 'invalid key size (must be 16, 24 or 32 bytes)'); + }, + 'invalid key size failed to throw an error'); + } + + test.done(); + }, + + "test-errors-iv-size": function(test) { + var ivSizes = [0, 15, 17, 100]; + for (var i = 0; i < 3; i++) { + var keySize = newBuffer(16 + i * 8); + + for (var j = 0; j < ivSizes.length; j++) { + test.throws(function() { + var moo = new aes.ModeOfOperation.cbc(newBuffer(keySize), newBuffer(ivSizes[j])); + }, function(error) { + return (error.message === 'invalid initialation vector size (must be 16 bytes)'); + }, + 'invalid iv size for cbc failed to throw an error'); + + test.throws(function() { + var moo = new aes.ModeOfOperation.ofb(newBuffer(keySize), newBuffer(ivSizes[j])); + }, function(error) { + return (error.message === 'invalid initialation vector size (must be 16 bytes)'); + }, + 'invalid iv size for ofb failed to throw an error'); + } + } + + test.done(); + }, + + "test-errors-segment-size": function(test) { + var key = newBuffer(16); + var iv = newBuffer(16); + for (var i = 1; i < 17; i++) { + for (var j = 1; j < 17; j++) { + if ((j % i) === 0) { continue; } + + var moo = new aes.ModeOfOperation.cfb(key, iv, i); + + test.throws(function() { + moo.encrypt(newBuffer(j)); + }, function(error) { + return (error.message === 'invalid plaintext size (must be segmentSize bytes)'); + }, + 'invalid plaintext (invalid segment size) failed to throw an error ' + i + ' ' + j); + } + } + + test.done(); + }, + + "test-errors-text-size": function(test) { + var textSizes = [1, 2, 15, 17, 31, 33]; + + for (var i = 0; i < 3; i++) { + var key = newBuffer(16 + i * 8); + for (var j = 0; j < textSizes.length; j++) { + for (var k = 0; k < 2; k++) { + var text = newBuffer(textSizes[j]); + if (k === 0) { + var moo = new aes.ModeOfOperation.ecb(key); + } else { + var moo = new aes.ModeOfOperation.cbc(key, newBuffer(16)); + } + + test.throws(function() { + moo.encrypt(text); + }, function(error) { + return (error.message === 'invalid plaintext size (must be multiple of 16 bytes)'); + }, + 'invalid text size failed to throw an error'); + } + } + } + + for (var i = 0; i < 3; i++) { + var key = newBuffer(16 + i * 8); + for (var j = 0; j < textSizes.length; j++) { + for (var k = 0; k < 2; k++) { + var text = newBuffer(textSizes[j]); + if (k === 0) { + var moo = new aes.ModeOfOperation.ecb(key); + } else { + var moo = new aes.ModeOfOperation.cbc(key, newBuffer(16)); + } + + test.throws(function() { + moo.decrypt(text); + }, function(error) { + return (error.message === 'invalid ciphertext size (must be multiple of 16 bytes)'); + }, + 'invalid text size failed to throw an error'); + } + } + } + + test.done(); + }, + + "test-errors-counter": function(test) { + var textSizes = [0, 1, 2, 15, 17]; + for (var i = 0; i < textSizes.length; i++) { + test.throws(function() { + var counter = new aes.Counter(newBuffer(textSizes[i])); + }, function(error) { + return (error.message === 'invalid counter bytes size (must be 16 bytes)'); + }, + 'invalid counter size (bytes.length != 16) failed to throw an error'); + + var counter = new aes.Counter(); + test.throws(function() { + counter.setBytes(newBuffer(textSizes[i])); + }, function(error) { + return (error.message === 'invalid counter bytes size (must be 16 bytes)'); + }, + 'invalid counter setBytes (bytes.length != 16) failed to throw an error'); + + var counter = new aes.Counter(); + test.throws(function() { + counter.setValue(newBuffer(textSizes[i])); + }, function(error) { + return (error.message === 'invalid counter value (must be an integer)'); + }, + 'invalid counter setValue (Array) failed to throw an error'); + } + + test.throws(function() { + var counter = new aes.Counter(1.5); + }, function(error) { + return (error.message === 'invalid counter value (must be an integer)'); + }, + 'invalid counter value (non-integer number) failed to throw an error'); + + var counter = new aes.Counter(); + test.throws(function() { + counter.setValue(1.5); + }, function(error) { + return (error.message === 'invalid counter value (must be an integer)'); + }, + 'invalid counter setValue (non-integer number) failed to throw an error'); + + var badThings = [0, 1.5, 1]; + for (var i = 0; i < badThings.length; i++) { + var counter = new aes.Counter(); + test.throws(function() { + counter.setBytes(badThings[i]); + }, function(error) { + return (error.message === 'unsupported array-like object'); + }, + 'invalid counter setBytes (numbers) failed to throw an error'); + } + + var badThings = [1.5, 'foobar', {}]; + for (var i = 0; i < badThings.length; i++) { + var counter = new aes.Counter(); + test.throws(function() { + counter.setBytes(badThings[i]); + }, function(error) { + return (error.message === 'unsupported array-like object'); + }, + 'invalid counter setBytes (' + badThings[i] + ') failed to throw an error'); + + var counter = new aes.Counter(); + test.throws(function() { + counter.setValue(badThings[i]); + }, function(error) { + return (error.message === 'invalid counter value (must be an integer)'); + }, + 'invalid counter setValue (' + badThings[i] + ') failed to throw an error'); + } + + test.done(); + }, +}; diff --git a/node_modules/aes-js/test/test-padding.js b/node_modules/aes-js/test/test-padding.js new file mode 100644 index 0000000..1390b3d --- /dev/null +++ b/node_modules/aes-js/test/test-padding.js @@ -0,0 +1,35 @@ +'use strict'; + +var nodeunit = require('nodeunit'); + +var aes = require('../index.js'); + +function bufferEqual(a, b) { + if (a.length != b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; +} + +module.exports = { + "test-padding": function(test) { + for (var size = 0; size < 100; size++) { + + // Create a random piece of data + var data = []; + for (var i = 0; i < size; i++) { data.push(42); } + + // Pad it + var padded = aes.padding.pkcs7.pad(data); + test.ok((padded.length % 16) === 0, "Failed to pad to block size"); + test.ok(data.length <= padded.length && padded.length <= data.length + 16, "Padding went awry"); + test.ok(padded[padded.length - 1] >= 1 && padded[padded.length - 1] <= 16, "Failed to pad to block size"); + + // Trim it + var trimmed = aes.padding.pkcs7.strip(padded); + test.ok(bufferEqual(data, trimmed), "Failed to trim to original data"); + } + test.done(); + } +} diff --git a/node_modules/aes-js/test/test-vectors.json b/node_modules/aes-js/test/test-vectors.json new file mode 100644 index 0000000..0a42b8e --- /dev/null +++ b/node_modules/aes-js/test/test-vectors.json @@ -0,0 +1,1832 @@ +[ + { + "encrypted": [ + [] + ], + "iv": [210, 94, 20, 139, 33, 227, 182, 169, 65, 136, 208, 188, 198, 212, 91, 88], + "key": [155, 70, 225, 213, 103, 248, 2, 82, 206, 37, 109, 25, 73, 34, 9, 27], + "modeOfOperation": "cbc", + "plaintext": [ + [] + ], + "segmentSize": null + }, + { + "encrypted": [ + [215, 238, 74, 62, 188, 204, 110, 226, 60, 165, 249, 53, 192, 105, 170, 242], + [11, 46, 168, 90, 158, 182, 37, 132, 9, 110, 109, 228, 252, 198, 9, 2] + ], + "iv": [235, 86, 206, 143, 225, 253, 82, 192, 220, 64, 112, 106, 26, 194, 193, 218], + "key": [101, 134, 119, 140, 213, 160, 234, 3, 148, 221, 195, 153, 240, 69, 253, 255], + "modeOfOperation": "cbc", + "plaintext": [ + [168, 8, 221, 252, 21, 193, 149, 122, 213, 17, 252, 154, 186, 66, 168, 129], + [173, 10, 220, 38, 56, 150, 251, 88, 72, 82, 231, 198, 251, 106, 85, 180] + ], + "segmentSize": null + }, + { + "encrypted": [ + [226, 179, 163, 28, 230, 161, 191, 34, 39, 100, 105, 25, 244, 78, 240, 99], + [33, 11, 203, 63, 219, 15, 48, 203, 0, 196, 102, 232, 214, 210, 209, 78], + [249, 138, 137, 76, 193, 1, 197, 19, 186, 51, 222, 119, 8, 237, 2, 36] + ], + "iv": [38, 214, 178, 226, 63, 53, 231, 78, 67, 95, 26, 11, 84, 22, 240, 171], + "key": [234, 35, 86, 91, 230, 79, 117, 166, 4, 89, 179, 189, 153, 133, 158, 22], + "modeOfOperation": "cbc", + "plaintext": [ + [37, 148, 91, 192, 147, 133, 18, 181, 134, 232, 8, 243, 180, 76, 196, 156], + [146, 159, 177, 185, 29, 138, 209, 45, 144, 151, 35, 199, 2, 58, 194, 95], + [153, 131, 129, 136, 62, 69, 189, 61, 112, 133, 101, 67, 185, 141, 97, 157] + ], + "segmentSize": null + }, + { + "encrypted": [ + [118, 5, 203, 203, 176, 147, 173, 54, 106, 157, 21, 100, 1, 185, 192, 81, 147, 28, 3, 18, 66, 107, 19, 182, 113, 255, 157, 179, 150, 215, 119, 79], + [210, 68, 227, 172, 214, 85, 66, 175, 212, 28, 155, 77, 137, 188, 9, 126, 78, 189, 11, 201, 151, 197, 178, 173, 141, 49, 32, 102, 215, 189, 183, 248], + [178, 120, 152, 215, 149, 158, 152, 125, 72, 79, 202, 185, 72, 174, 8, 27, 148, 205, 43, 90, 26, 63, 213, 78, 165, 172, 181, 60, 221, 143, 224, 178], + [0, 130, 208, 66, 133, 244, 199, 87, 137, 139, 90, 24, 116, 187, 74, 89, 169, 181, 125, 102, 108, 219, 54, 16, 127, 145, 164, 227, 11, 152, 143, 239] + ], + "iv": [172, 151, 4, 112, 6, 7, 156, 246, 189, 136, 109, 132, 152, 96, 15, 218], + "key": [229, 28, 121, 206, 142, 216, 7, 14, 217, 209, 147, 248, 151, 51, 107, 177], + "modeOfOperation": "cbc", + "plaintext": [ + [5, 164, 69, 34, 194, 125, 232, 102, 208, 136, 26, 94, 35, 236, 219, 163, 24, 105, 239, 198, 178, 61, 184, 125, 207, 100, 220, 239, 247, 208, 220, 121], + [43, 109, 194, 38, 209, 242, 142, 128, 133, 15, 194, 46, 179, 80, 154, 192, 173, 241, 141, 80, 134, 1, 65, 184, 26, 99, 235, 98, 190, 134, 2, 90], + [93, 205, 130, 161, 66, 55, 132, 166, 126, 220, 11, 124, 249, 87, 222, 194, 150, 54, 142, 47, 43, 203, 178, 254, 1, 45, 225, 132, 246, 219, 135, 177], + [79, 174, 188, 232, 182, 202, 51, 9, 130, 71, 129, 168, 16, 134, 156, 136, 191, 246, 232, 43, 139, 241, 65, 14, 185, 185, 221, 182, 242, 86, 192, 221] + ], + "segmentSize": null + }, + { + "encrypted": [ + [79, 123, 208, 228, 162, 179, 137, 233, 1, 174, 115, 140, 166, 153, 42, 42, 191, 252, 37, 91, 178, 70, 17, 196, 44, 166, 35, 192, 72, 202, 217, 13, 88, 13, 32, 14, 138, 85, 170, 178, 121, 22, 79, 196, 241, 53, 118, 21], + [31, 66, 236, 12, 118, 57, 163, 179, 82, 123, 22, 39, 250, 243, 59, 174, 69, 235, 170, 146, 131, 117, 182, 235, 112, 148, 37, 101, 33, 80, 2, 141, 14, 58, 129, 171, 158, 84, 59, 53, 143, 143, 91, 5, 225, 215, 166, 249], + [126, 117, 3, 145, 4, 208, 179, 76, 249, 83, 243, 33, 237, 220, 207, 181, 82, 43, 102, 219, 38, 49, 65, 254, 221, 141, 154, 187, 39, 252, 57, 81, 175, 169, 23, 9, 185, 186, 123, 72, 160, 165, 12, 8, 120, 7, 209, 240], + [119, 232, 246, 66, 177, 71, 238, 160, 150, 181, 37, 254, 31, 141, 37, 74, 223, 85, 69, 38, 23, 140, 152, 18, 177, 198, 113, 8, 251, 9, 155, 139, 230, 225, 207, 189, 58, 231, 205, 84, 213, 32, 6, 221, 64, 219, 31, 181], + [145, 161, 231, 112, 21, 127, 174, 39, 100, 219, 75, 24, 46, 26, 142, 144, 101, 133, 242, 70, 191, 252, 211, 100, 217, 171, 107, 137, 47, 149, 124, 14, 225, 152, 72, 168, 51, 104, 203, 27, 7, 199, 249, 101, 19, 85, 233, 110] + ], + "iv": [238, 139, 239, 60, 149, 184, 148, 75, 43, 217, 219, 158, 98, 31, 40, 169], + "key": [20, 195, 1, 206, 103, 117, 189, 95, 165, 91, 61, 16, 159, 138, 199, 65], + "modeOfOperation": "cbc", + "plaintext": [ + [133, 24, 124, 110, 200, 41, 8, 167, 76, 125, 156, 7, 62, 129, 164, 52, 198, 16, 208, 57, 68, 29, 192, 60, 151, 172, 181, 44, 27, 175, 251, 140, 134, 108, 60, 22, 9, 31, 161, 67, 125, 80, 4, 207, 46, 95, 200, 244], + [137, 224, 139, 155, 42, 12, 97, 18, 92, 248, 47, 22, 13, 102, 31, 105, 97, 201, 192, 249, 128, 1, 54, 24, 131, 167, 14, 251, 237, 116, 222, 32, 245, 39, 191, 210, 173, 36, 1, 208, 23, 135, 150, 31, 27, 187, 46, 168], + [120, 94, 244, 180, 200, 97, 212, 239, 241, 160, 137, 207, 2, 246, 241, 29, 192, 227, 123, 79, 99, 166, 71, 2, 186, 253, 101, 65, 137, 18, 39, 222, 40, 177, 248, 15, 6, 208, 166, 28, 31, 10, 66, 83, 198, 216, 200, 139], + [40, 205, 120, 180, 20, 199, 142, 28, 209, 96, 5, 184, 242, 171, 113, 187, 72, 235, 66, 134, 241, 69, 151, 233, 120, 143, 35, 30, 86, 25, 199, 51, 192, 166, 111, 192, 195, 11, 72, 155, 147, 135, 36, 33, 28, 176, 99, 89], + [126, 183, 175, 211, 46, 36, 198, 11, 157, 190, 4, 184, 152, 206, 200, 28, 146, 205, 128, 32, 88, 187, 201, 102, 101, 201, 104, 46, 216, 99, 59, 151, 175, 48, 81, 189, 11, 81, 215, 195, 87, 250, 181, 94, 151, 105, 56, 51] + ], + "segmentSize": null + }, + { + "encrypted": [ + [152, 251, 225, 147, 85, 133, 122, 98, 167, 84, 44, 165, 30, 178, 150, 180, 117, 162, 238, 88, 24, 94, 39, 17, 185, 126, 196, 121, 44, 37, 219, 200, 161, 101, 225, 176, 102, 249, 14, 220, 146, 118, 249, 170, 49, 187, 146, 141, 65, 207, 191, 136, 57, 90, 161, 121, 88, 124, 241, 103, 108, 94, 177, 99], + [174, 206, 141, 80, 229, 191, 228, 77, 213, 2, 49, 95, 66, 208, 131, 116, 3, 63, 178, 18, 49, 111, 43, 249, 96, 44, 158, 78, 247, 6, 57, 182, 201, 125, 170, 232, 125, 9, 69, 164, 31, 22, 151, 164, 160, 104, 37, 77, 14, 115, 24, 236, 138, 245, 78, 92, 144, 76, 85, 82, 243, 70, 211, 166], + [0, 76, 225, 39, 215, 173, 200, 205, 132, 87, 39, 121, 194, 13, 189, 60, 22, 77, 10, 192, 242, 189, 26, 237, 245, 117, 8, 105, 56, 45, 184, 170, 49, 180, 152, 32, 142, 171, 147, 129, 135, 20, 108, 29, 182, 0, 62, 19, 89, 80, 189, 59, 179, 10, 213, 247, 193, 60, 245, 164, 234, 90, 52, 218], + [122, 191, 238, 213, 141, 145, 36, 110, 165, 217, 4, 36, 86, 214, 242, 208, 164, 127, 118, 149, 104, 59, 216, 14, 162, 97, 127, 124, 15, 223, 67, 235, 168, 140, 163, 29, 190, 136, 190, 234, 20, 163, 22, 209, 98, 49, 138, 209, 130, 132, 103, 165, 116, 241, 25, 159, 37, 237, 8, 74, 200, 129, 210, 217], + [80, 229, 9, 222, 88, 57, 92, 56, 208, 71, 169, 142, 237, 169, 19, 224, 228, 249, 107, 79, 78, 199, 52, 191, 155, 226, 217, 198, 176, 153, 195, 240, 198, 204, 247, 218, 253, 22, 149, 223, 107, 68, 129, 172, 70, 240, 22, 153, 202, 58, 126, 93, 26, 0, 115, 78, 101, 115, 208, 193, 123, 155, 54, 107], + [158, 93, 68, 26, 96, 91, 124, 28, 60, 61, 228, 68, 129, 201, 90, 20, 49, 121, 30, 150, 166, 95, 7, 160, 197, 219, 104, 255, 243, 182, 198, 202, 34, 11, 58, 133, 178, 108, 115, 128, 148, 126, 227, 11, 204, 49, 57, 60, 94, 13, 131, 207, 1, 12, 193, 84, 170, 172, 182, 50, 142, 221, 41, 95] + ], + "iv": [122, 198, 138, 104, 85, 71, 100, 10, 168, 65, 109, 26, 222, 167, 186, 209], + "key": [138, 33, 231, 192, 31, 103, 7, 156, 93, 110, 212, 18, 70, 22, 83, 43], + "modeOfOperation": "cbc", + "plaintext": [ + [124, 190, 18, 35, 20, 83, 222, 71, 86, 247, 132, 69, 43, 52, 18, 219, 190, 45, 127, 122, 215, 250, 9, 214, 252, 232, 5, 29, 142, 0, 182, 58, 132, 90, 58, 94, 26, 169, 10, 240, 5, 250, 120, 77, 39, 48, 137, 136, 214, 157, 113, 89, 223, 83, 177, 157, 124, 146, 213, 16, 205, 122, 203, 194], + [134, 163, 252, 76, 61, 100, 178, 61, 8, 92, 14, 59, 237, 49, 116, 99, 136, 97, 239, 226, 125, 249, 95, 214, 145, 130, 143, 194, 103, 150, 108, 165, 189, 218, 55, 188, 128, 53, 136, 254, 147, 83, 144, 53, 239, 227, 197, 91, 161, 203, 129, 164, 181, 194, 183, 254, 76, 96, 135, 199, 79, 160, 120, 103], + [253, 150, 129, 218, 9, 195, 234, 97, 15, 145, 103, 246, 42, 164, 229, 250, 196, 198, 72, 205, 144, 218, 66, 102, 88, 247, 8, 152, 55, 172, 21, 57, 131, 176, 77, 172, 14, 195, 65, 246, 51, 232, 157, 22, 45, 188, 2, 244, 201, 204, 179, 212, 122, 170, 231, 27, 118, 221, 255, 104, 52, 251, 214, 120], + [183, 128, 35, 110, 130, 98, 47, 78, 154, 110, 3, 80, 7, 204, 109, 25, 174, 91, 69, 208, 179, 34, 76, 147, 199, 232, 177, 140, 114, 251, 181, 177, 108, 107, 244, 112, 5, 199, 237, 18, 169, 128, 9, 223, 180, 21, 6, 220, 104, 32, 213, 213, 88, 180, 25, 97, 148, 190, 237, 164, 133, 155, 11, 249], + [39, 10, 221, 197, 61, 98, 199, 219, 227, 221, 25, 32, 235, 9, 76, 13, 139, 174, 142, 111, 163, 109, 44, 126, 182, 93, 51, 197, 57, 91, 55, 78, 173, 148, 208, 65, 161, 165, 74, 92, 131, 213, 247, 231, 6, 243, 43, 9, 44, 210, 64, 209, 172, 143, 35, 233, 83, 125, 15, 71, 232, 24, 193, 0], + [118, 97, 45, 62, 152, 77, 58, 77, 188, 146, 44, 187, 248, 208, 20, 127, 196, 73, 117, 106, 56, 22, 7, 193, 195, 44, 95, 169, 199, 151, 174, 49, 81, 168, 184, 146, 37, 184, 247, 62, 60, 30, 111, 8, 5, 122, 183, 15, 143, 185, 152, 174, 143, 37, 13, 133, 86, 162, 149, 99, 142, 127, 179, 190] + ], + "segmentSize": null + }, + { + "encrypted": [ + [191, 102, 113, 97, 171, 41, 1, 230, 3, 228, 68, 71, 143, 156, 152, 30, 115, 83, 25, 223, 121, 229, 77, 249, 115, 21, 63, 217, 68, 85, 239, 155, 233, 241, 238, 168, 116, 88, 131, 22, 24, 52, 35, 202, 179, 99, 44, 215, 157, 97, 152, 213, 43, 241, 100, 85, 172, 3, 20, 141, 39, 183, 109, 240], + [171, 153, 42, 104, 144, 64, 16, 117, 172, 154, 131, 33, 8, 136, 123, 242, 159, 136, 134, 80, 66, 160, 82, 45, 51, 247, 100, 29, 202, 85, 139, 163, 185, 191, 52, 151, 19, 63, 190, 163, 106, 7, 3, 176, 65, 5, 66, 158, 36, 73, 214, 109, 76, 223, 73, 196, 93, 119, 159, 195, 21, 75, 211, 90], + [156, 61, 53, 177, 76, 134, 108, 136, 194, 174, 86, 33, 144, 212, 71, 95, 52, 93, 249, 151, 122, 227, 234, 239, 23, 140, 232, 169, 218, 179, 204, 192, 10, 86, 177, 96, 172, 187, 198, 229, 213, 249, 121, 36, 52, 176, 86, 138, 252, 31, 107, 99, 200, 61, 32, 166, 118, 206, 100, 114, 185, 142, 30, 118], + [73, 142, 172, 171, 219, 105, 189, 234, 11, 32, 25, 252, 147, 23, 159, 120, 132, 7, 212, 83, 228, 108, 1, 83, 98, 241, 238, 120, 60, 106, 0, 163, 41, 127, 111, 176, 200, 125, 131, 192, 193, 6, 252, 74, 172, 216, 156, 43, 60, 184, 151, 116, 82, 238, 152, 50, 76, 60, 221, 126, 130, 187, 33, 21], + [55, 27, 33, 99, 169, 231, 153, 27, 75, 103, 214, 16, 85, 255, 21, 191, 171, 194, 109, 161, 112, 3, 202, 35, 9, 53, 86, 254, 98, 223, 207, 13, 239, 51, 133, 170, 242, 33, 142, 248, 120, 104, 180, 215, 197, 115, 158, 189, 203, 135, 96, 160, 195, 45, 226, 133, 244, 158, 44, 17, 149, 83, 103, 193], + [121, 182, 75, 228, 80, 14, 176, 176, 245, 66, 152, 55, 137, 11, 127, 49, 14, 29, 195, 241, 9, 41, 175, 161, 22, 246, 145, 187, 219, 178, 168, 241, 13, 102, 152, 7, 237, 51, 178, 18, 199, 106, 232, 107, 213, 156, 166, 203, 88, 209, 34, 82, 219, 238, 247, 9, 67, 176, 82, 161, 164, 89, 200, 127], + [215, 84, 175, 208, 105, 173, 32, 162, 139, 40, 83, 97, 98, 47, 66, 33, 107, 106, 170, 172, 9, 232, 255, 242, 46, 12, 237, 238, 99, 121, 120, 15, 77, 230, 40, 185, 176, 41, 126, 79, 8, 27, 85, 100, 20, 16, 201, 222, 188, 79, 239, 130, 71, 18, 174, 44, 101, 33, 243, 38, 23, 32, 223, 192] + ], + "iv": [164, 37, 29, 253, 82, 190, 184, 186, 31, 147, 238, 62, 109, 54, 163, 31], + "key": [217, 241, 41, 85, 133, 142, 26, 70, 63, 42, 0, 87, 152, 116, 244, 75], + "modeOfOperation": "cbc", + "plaintext": [ + [103, 10, 254, 0, 115, 148, 40, 234, 253, 146, 66, 3, 187, 17, 190, 127, 34, 118, 221, 148, 57, 149, 191, 80, 235, 11, 67, 171, 66, 106, 122, 188, 124, 29, 214, 242, 165, 253, 55, 132, 218, 121, 253, 129, 23, 143, 45, 141, 105, 184, 15, 107, 154, 172, 188, 166, 132, 28, 28, 27, 152, 198, 223, 1], + [9, 176, 39, 188, 4, 98, 254, 127, 154, 59, 24, 66, 123, 236, 176, 130, 222, 200, 250, 42, 98, 158, 92, 184, 236, 130, 27, 244, 95, 241, 7, 198, 41, 123, 189, 246, 194, 73, 134, 209, 22, 220, 227, 140, 196, 254, 19, 40, 224, 255, 143, 120, 231, 136, 253, 72, 250, 128, 35, 221, 5, 208, 218, 23], + [33, 21, 7, 97, 127, 105, 162, 86, 38, 102, 102, 152, 1, 165, 117, 255, 42, 130, 218, 179, 16, 169, 195, 154, 104, 18, 174, 161, 35, 199, 9, 38, 188, 59, 163, 63, 218, 73, 242, 8, 17, 248, 204, 170, 196, 30, 240, 32, 172, 48, 102, 241, 237, 122, 4, 2, 148, 156, 249, 60, 2, 254, 106, 189], + [197, 125, 71, 110, 103, 76, 6, 102, 166, 49, 245, 17, 46, 206, 29, 93, 110, 3, 114, 33, 50, 16, 40, 101, 247, 30, 249, 87, 97, 249, 169, 82, 52, 251, 121, 172, 104, 37, 106, 101, 144, 85, 112, 88, 70, 112, 186, 184, 185, 169, 111, 121, 76, 245, 131, 109, 227, 245, 156, 172, 12, 238, 103, 105], + [101, 189, 29, 150, 250, 225, 208, 223, 96, 226, 232, 58, 249, 195, 93, 251, 196, 79, 107, 234, 254, 149, 192, 163, 95, 236, 233, 252, 207, 145, 252, 87, 168, 239, 17, 242, 206, 47, 245, 192, 5, 113, 15, 98, 167, 60, 168, 246, 44, 58, 162, 108, 224, 92, 146, 14, 215, 194, 215, 71, 32, 114, 214, 229], + [16, 130, 206, 7, 156, 58, 220, 228, 48, 172, 58, 98, 58, 131, 3, 67, 138, 198, 240, 192, 187, 134, 9, 190, 45, 201, 185, 218, 120, 166, 184, 241, 70, 144, 216, 2, 71, 99, 128, 100, 1, 17, 200, 68, 127, 141, 112, 255, 204, 115, 180, 163, 192, 131, 145, 86, 57, 28, 83, 106, 42, 201, 20, 132], + [159, 204, 227, 234, 24, 132, 157, 69, 223, 217, 158, 205, 183, 237, 99, 100, 12, 37, 235, 126, 88, 142, 253, 45, 85, 234, 47, 28, 46, 22, 173, 241, 111, 78, 177, 163, 213, 66, 44, 233, 52, 78, 237, 207, 154, 174, 126, 14, 70, 228, 251, 163, 218, 134, 80, 72, 181, 31, 242, 0, 119, 85, 150, 64] + ], + "segmentSize": null + }, + { + "encrypted": [ + [] + ], + "iv": [239, 223, 181, 236, 61, 118, 254, 53, 251, 59, 113, 4, 2, 58, 69, 100], + "key": [58, 69, 185, 228, 20, 175, 122, 156, 194, 103, 53, 209, 61, 20, 147, 253, 222, 177, 125, 54, 3, 84, 13, 168], + "modeOfOperation": "cbc", + "plaintext": [ + [] + ], + "segmentSize": null + }, + { + "encrypted": [ + [2, 197, 123, 18, 178, 88, 117, 73, 193, 222, 40, 130, 130, 147, 153, 146], + [32, 229, 1, 242, 186, 14, 49, 191, 18, 252, 92, 43, 138, 114, 166, 139] + ], + "iv": [226, 204, 91, 23, 222, 112, 95, 88, 129, 196, 199, 242, 49, 82, 149, 154], + "key": [56, 151, 213, 91, 53, 235, 92, 171, 48, 84, 156, 189, 46, 190, 76, 75, 110, 36, 69, 24, 51, 63, 72, 94], + "modeOfOperation": "cbc", + "plaintext": [ + [65, 96, 9, 2, 43, 13, 183, 15, 104, 71, 44, 20, 19, 119, 245, 128], + [95, 183, 253, 145, 243, 132, 161, 191, 143, 215, 91, 116, 200, 76, 251, 232] + ], + "segmentSize": null + }, + { + "encrypted": [ + [98, 119, 122, 233, 148, 249, 196, 87, 45, 192, 234, 111, 189, 238, 111, 202], + [24, 40, 234, 132, 152, 80, 58, 111, 119, 247, 98, 17, 182, 139, 12, 229], + [217, 35, 34, 18, 8, 132, 197, 47, 83, 198, 166, 119, 144, 141, 186, 105] + ], + "iv": [219, 249, 171, 131, 91, 202, 129, 27, 18, 26, 126, 101, 53, 73, 180, 21], + "key": [116, 153, 11, 0, 170, 48, 112, 137, 135, 205, 239, 233, 72, 205, 220, 27, 106, 65, 73, 66, 97, 239, 229, 16], + "modeOfOperation": "cbc", + "plaintext": [ + [31, 215, 187, 191, 120, 179, 202, 206, 55, 52, 88, 233, 146, 101, 134, 74], + [117, 84, 108, 183, 118, 250, 90, 72, 0, 187, 79, 131, 99, 209, 68, 195], + [37, 190, 190, 11, 93, 115, 75, 179, 140, 160, 23, 111, 51, 6, 188, 23] + ], + "segmentSize": null + }, + { + "encrypted": [ + [59, 184, 76, 226, 246, 7, 153, 67, 103, 107, 230, 215, 152, 106, 216, 25, 49, 185, 155, 90, 147, 213, 125, 74, 48, 67, 235, 244, 139, 179, 62, 46], + [0, 135, 251, 57, 121, 72, 120, 197, 232, 12, 110, 184, 113, 235, 211, 77, 124, 170, 215, 23, 136, 77, 146, 148, 43, 122, 159, 166, 208, 148, 178, 143], + [155, 248, 77, 105, 64, 55, 135, 193, 36, 85, 137, 160, 44, 103, 65, 14, 75, 42, 193, 164, 181, 3, 148, 41, 195, 129, 102, 176, 243, 185, 224, 199], + [78, 9, 151, 94, 151, 57, 44, 143, 229, 218, 119, 29, 43, 245, 220, 191, 76, 23, 71, 193, 216, 231, 20, 220, 98, 228, 127, 191, 130, 87, 237, 92] + ], + "iv": [62, 201, 74, 59, 23, 100, 123, 62, 188, 93, 70, 192, 35, 58, 27, 234], + "key": [4, 23, 102, 145, 158, 60, 216, 186, 162, 190, 217, 57, 174, 21, 168, 172, 167, 114, 115, 54, 208, 224, 54, 110], + "modeOfOperation": "cbc", + "plaintext": [ + [203, 88, 237, 226, 175, 143, 191, 0, 255, 41, 70, 118, 40, 120, 37, 43, 142, 240, 218, 144, 23, 206, 128, 153, 53, 47, 61, 67, 73, 160, 210, 178], + [52, 232, 73, 0, 62, 150, 175, 81, 235, 34, 235, 163, 130, 94, 98, 65, 96, 251, 90, 223, 189, 131, 116, 16, 96, 18, 74, 23, 173, 227, 209, 187], + [169, 77, 20, 157, 40, 128, 143, 181, 183, 204, 24, 91, 84, 207, 3, 131, 205, 68, 108, 248, 104, 91, 11, 15, 116, 127, 228, 33, 98, 227, 134, 88], + [220, 226, 246, 202, 59, 38, 167, 113, 19, 124, 42, 243, 209, 30, 81, 63, 53, 3, 162, 195, 101, 204, 226, 180, 144, 134, 117, 99, 79, 197, 13, 102] + ], + "segmentSize": null + }, + { + "encrypted": [ + [190, 12, 28, 200, 31, 102, 215, 82, 15, 74, 59, 72, 29, 135, 37, 210, 46, 20, 99, 104, 4, 124, 74, 253, 75, 157, 1, 27, 162, 20, 16, 62, 206, 32, 229, 220, 39, 65, 88, 204, 227, 55, 117, 143, 112, 174, 66, 20], + [91, 130, 35, 148, 0, 10, 225, 117, 71, 156, 13, 139, 237, 236, 176, 38, 69, 250, 169, 225, 154, 78, 234, 111, 22, 101, 110, 210, 73, 215, 190, 77, 244, 240, 204, 161, 130, 224, 246, 170, 223, 107, 248, 42, 124, 41, 196, 18], + [75, 60, 144, 133, 215, 215, 169, 91, 209, 3, 5, 161, 234, 124, 114, 47, 35, 3, 3, 75, 179, 226, 188, 198, 38, 117, 161, 229, 133, 19, 175, 90, 135, 223, 242, 124, 138, 41, 118, 243, 56, 1, 68, 121, 152, 53, 152, 132], + [195, 159, 235, 107, 110, 206, 148, 200, 87, 20, 203, 54, 65, 254, 254, 77, 92, 50, 2, 0, 66, 12, 54, 250, 219, 59, 184, 216, 10, 247, 229, 75, 26, 34, 61, 101, 109, 211, 124, 97, 165, 115, 146, 18, 60, 25, 170, 22], + [132, 184, 92, 131, 114, 30, 177, 224, 52, 150, 118, 61, 134, 163, 165, 91, 169, 22, 14, 117, 99, 154, 176, 239, 146, 147, 15, 146, 5, 16, 167, 74, 231, 3, 205, 41, 244, 153, 146, 127, 119, 122, 229, 109, 244, 33, 240, 1] + ], + "iv": [160, 123, 104, 33, 26, 102, 195, 92, 38, 175, 232, 171, 223, 35, 95, 38], + "key": [73, 178, 104, 140, 234, 153, 113, 217, 249, 90, 176, 173, 47, 137, 26, 99, 171, 191, 101, 6, 188, 147, 105, 164], + "modeOfOperation": "cbc", + "plaintext": [ + [218, 65, 74, 112, 27, 40, 125, 77, 108, 20, 165, 197, 100, 85, 213, 154, 254, 197, 240, 217, 167, 131, 26, 56, 176, 206, 34, 119, 167, 189, 0, 28, 199, 114, 85, 110, 25, 152, 108, 7, 30, 65, 186, 89, 237, 145, 37, 7], + [49, 234, 172, 137, 224, 123, 31, 123, 80, 100, 127, 203, 58, 107, 224, 218, 240, 166, 76, 3, 154, 178, 176, 206, 68, 40, 93, 222, 154, 100, 109, 139, 12, 117, 143, 181, 78, 148, 25, 102, 44, 18, 28, 20, 110, 188, 76, 165], + [91, 22, 196, 127, 11, 5, 169, 219, 155, 94, 103, 65, 129, 95, 185, 95, 113, 195, 123, 221, 104, 124, 123, 89, 57, 203, 148, 33, 171, 62, 248, 143, 160, 38, 231, 130, 91, 15, 184, 229, 235, 168, 218, 72, 237, 140, 253, 254], + [243, 213, 172, 60, 245, 198, 246, 125, 43, 209, 193, 3, 193, 227, 142, 94, 147, 173, 210, 209, 229, 72, 96, 213, 34, 107, 26, 28, 198, 48, 3, 28, 47, 197, 198, 103, 59, 101, 193, 173, 98, 73, 177, 89, 39, 66, 41, 11], + [177, 68, 152, 235, 54, 203, 184, 41, 100, 53, 227, 187, 48, 163, 225, 140, 228, 36, 186, 10, 63, 82, 175, 98, 222, 109, 99, 4, 72, 81, 200, 241, 125, 254, 130, 126, 112, 14, 198, 111, 178, 134, 8, 214, 166, 160, 219, 77] + ], + "segmentSize": null + }, + { + "encrypted": [ + [224, 65, 85, 5, 113, 88, 115, 246, 84, 227, 13, 52, 10, 17, 37, 136, 49, 136, 218, 181, 149, 19, 24, 197, 99, 131, 199, 81, 121, 113, 64, 94, 22, 3, 144, 234, 177, 165, 21, 185, 20, 40, 119, 116, 205, 148, 70, 82, 179, 157, 42, 23, 49, 90, 105, 162, 92, 47, 215, 92, 231, 125, 185, 188], + [156, 85, 220, 59, 210, 16, 70, 152, 230, 58, 220, 162, 145, 198, 59, 151, 2, 141, 182, 48, 146, 42, 159, 103, 114, 161, 37, 181, 165, 70, 192, 117, 18, 217, 77, 12, 65, 24, 45, 96, 202, 208, 204, 9, 127, 160, 83, 159, 188, 4, 12, 156, 245, 131, 168, 176, 36, 78, 69, 189, 48, 226, 112, 8], + [188, 164, 130, 74, 210, 176, 201, 156, 80, 36, 147, 172, 1, 249, 191, 45, 244, 89, 197, 103, 157, 105, 61, 91, 139, 167, 183, 22, 162, 194, 177, 138, 233, 237, 28, 91, 4, 195, 171, 64, 243, 59, 211, 5, 182, 248, 222, 39, 96, 110, 232, 160, 121, 44, 61, 86, 232, 125, 12, 167, 247, 89, 217, 204], + [112, 67, 74, 216, 213, 251, 241, 124, 77, 235, 23, 209, 142, 217, 244, 92, 35, 107, 185, 104, 1, 240, 100, 117, 86, 0, 200, 61, 94, 190, 191, 202, 166, 120, 174, 121, 89, 98, 199, 87, 62, 188, 8, 17, 203, 237, 41, 2, 44, 253, 245, 162, 198, 176, 131, 22, 167, 113, 24, 224, 230, 26, 189, 83], + [231, 167, 230, 95, 37, 157, 130, 189, 147, 59, 209, 231, 233, 132, 51, 16, 57, 66, 92, 179, 173, 224, 105, 239, 155, 10, 186, 88, 197, 79, 31, 214, 83, 143, 126, 249, 134, 17, 202, 89, 237, 132, 206, 200, 109, 62, 167, 179, 212, 137, 191, 202, 147, 20, 126, 229, 241, 223, 173, 58, 174, 1, 73, 148], + [29, 98, 138, 100, 144, 240, 78, 202, 15, 104, 29, 6, 159, 98, 232, 213, 68, 185, 89, 14, 221, 246, 96, 255, 238, 87, 39, 152, 4, 81, 7, 94, 53, 194, 159, 154, 228, 233, 131, 122, 34, 209, 167, 104, 23, 248, 239, 121, 253, 192, 215, 59, 3, 124, 154, 134, 251, 10, 171, 3, 1, 154, 243, 73] + ], + "iv": [60, 12, 228, 207, 131, 156, 5, 185, 161, 242, 156, 224, 114, 224, 16, 53], + "key": [133, 187, 142, 139, 253, 51, 187, 102, 139, 78, 251, 216, 248, 213, 238, 27, 197, 245, 55, 53, 239, 89, 78, 224], + "modeOfOperation": "cbc", + "plaintext": [ + [113, 209, 55, 178, 183, 87, 73, 157, 112, 85, 142, 180, 158, 145, 75, 227, 191, 47, 29, 42, 115, 95, 5, 107, 249, 41, 17, 135, 124, 208, 119, 220, 97, 196, 7, 79, 14, 110, 106, 171, 84, 7, 132, 228, 254, 110, 19, 201, 62, 25, 189, 134, 154, 200, 11, 232, 103, 231, 95, 39, 200, 14, 15, 196], + [254, 113, 154, 66, 82, 13, 140, 126, 201, 16, 244, 30, 113, 132, 255, 242, 193, 221, 117, 238, 32, 251, 11, 220, 20, 39, 238, 209, 45, 128, 164, 187, 151, 225, 57, 213, 104, 9, 205, 138, 21, 184, 11, 199, 172, 169, 245, 142, 209, 229, 237, 14, 111, 105, 73, 183, 248, 5, 133, 125, 3, 77, 162, 249], + [28, 79, 163, 50, 200, 157, 140, 106, 26, 98, 93, 8, 101, 243, 203, 190, 113, 99, 10, 102, 127, 194, 118, 172, 102, 23, 59, 164, 72, 203, 75, 251, 99, 150, 224, 86, 243, 2, 159, 120, 226, 75, 33, 163, 90, 142, 128, 229, 58, 201, 206, 92, 250, 166, 201, 146, 176, 144, 167, 45, 196, 179, 79, 122], + [98, 153, 244, 15, 59, 145, 218, 220, 27, 60, 120, 93, 212, 57, 110, 148, 121, 248, 40, 237, 149, 36, 50, 150, 75, 252, 151, 82, 154, 6, 23, 42, 217, 214, 47, 189, 92, 247, 132, 25, 82, 19, 26, 147, 98, 149, 71, 235, 231, 47, 2, 164, 155, 245, 179, 170, 52, 17, 225, 92, 85, 126, 152, 6], + [240, 45, 188, 155, 156, 95, 223, 137, 161, 148, 131, 124, 253, 231, 219, 207, 117, 14, 194, 22, 254, 122, 210, 187, 210, 201, 155, 118, 106, 109, 222, 127, 56, 7, 43, 163, 207, 32, 142, 233, 217, 15, 136, 69, 74, 190, 233, 2, 138, 85, 144, 201, 147, 85, 0, 129, 82, 192, 80, 220, 212, 47, 95, 47], + [30, 79, 58, 46, 32, 128, 158, 123, 102, 100, 219, 19, 24, 161, 243, 30, 66, 213, 42, 252, 178, 67, 102, 168, 202, 14, 108, 234, 109, 75, 233, 17, 243, 216, 249, 159, 203, 151, 31, 7, 104, 189, 149, 185, 20, 247, 242, 105, 237, 235, 197, 74, 201, 154, 44, 39, 43, 121, 127, 172, 233, 158, 3, 234] + ], + "segmentSize": null + }, + { + "encrypted": [ + [187, 96, 43, 71, 215, 240, 152, 94, 218, 138, 181, 120, 140, 115, 184, 43, 222, 99, 70, 71, 87, 10, 66, 244, 165, 172, 188, 42, 241, 43, 221, 223, 112, 211, 122, 131, 176, 44, 222, 16, 110, 132, 74, 121, 162, 168, 110, 33, 113, 30, 21, 117, 201, 129, 188, 197, 51, 223, 68, 234, 118, 127, 213, 114], + [179, 244, 141, 166, 183, 75, 20, 85, 233, 179, 118, 189, 255, 187, 167, 81, 157, 125, 152, 11, 6, 91, 11, 41, 77, 152, 60, 212, 18, 87, 26, 43, 194, 251, 199, 155, 26, 238, 83, 9, 151, 12, 29, 182, 90, 164, 235, 229, 106, 203, 102, 79, 87, 114, 78, 182, 12, 249, 213, 64, 184, 164, 53, 31], + [132, 130, 0, 125, 127, 251, 111, 203, 75, 250, 100, 19, 35, 148, 215, 243, 3, 25, 95, 140, 104, 107, 179, 49, 108, 233, 127, 143, 125, 158, 195, 50, 124, 204, 155, 213, 183, 62, 131, 151, 189, 239, 141, 16, 13, 185, 79, 228, 5, 165, 137, 156, 46, 1, 170, 205, 216, 142, 139, 114, 10, 129, 124, 213], + [148, 205, 155, 185, 47, 19, 71, 8, 72, 44, 136, 186, 176, 45, 88, 247, 68, 163, 132, 190, 104, 29, 216, 25, 116, 127, 121, 249, 81, 249, 98, 184, 94, 74, 49, 62, 90, 231, 219, 114, 10, 19, 168, 162, 107, 170, 148, 59, 71, 46, 107, 234, 253, 133, 2, 51, 204, 142, 247, 3, 219, 213, 71, 94], + [64, 197, 23, 188, 236, 95, 20, 175, 19, 80, 116, 18, 90, 27, 52, 110, 226, 170, 84, 184, 48, 15, 66, 157, 121, 59, 70, 82, 103, 124, 47, 96, 40, 205, 190, 30, 180, 180, 71, 191, 31, 130, 17, 59, 48, 209, 9, 78, 0, 248, 73, 223, 179, 33, 171, 70, 230, 231, 200, 134, 236, 241, 207, 66], + [96, 226, 124, 139, 239, 23, 179, 123, 130, 131, 127, 104, 198, 62, 41, 250, 10, 230, 132, 198, 92, 31, 214, 147, 110, 95, 234, 121, 164, 235, 110, 9, 22, 17, 4, 130, 53, 141, 17, 240, 140, 95, 167, 122, 77, 52, 182, 230, 130, 61, 28, 33, 81, 238, 125, 38, 202, 173, 100, 173, 186, 64, 247, 251], + [92, 229, 246, 243, 190, 181, 119, 87, 244, 123, 204, 154, 179, 0, 116, 253, 154, 244, 26, 34, 248, 130, 133, 168, 213, 51, 227, 158, 120, 188, 79, 209, 149, 25, 245, 7, 230, 47, 253, 10, 20, 16, 173, 188, 29, 176, 149, 88, 193, 204, 93, 192, 84, 187, 255, 81, 25, 11, 149, 23, 199, 242, 48, 65] + ], + "iv": [99, 137, 115, 15, 13, 199, 28, 168, 101, 51, 124, 173, 144, 143, 204, 97], + "key": [252, 226, 69, 168, 172, 99, 86, 112, 141, 106, 15, 177, 104, 248, 174, 106, 138, 229, 208, 194, 0, 251, 101, 250], + "modeOfOperation": "cbc", + "plaintext": [ + [222, 94, 189, 184, 210, 173, 113, 147, 74, 210, 92, 11, 139, 205, 57, 54, 147, 6, 179, 226, 17, 71, 52, 69, 211, 220, 122, 80, 52, 72, 229, 203, 206, 58, 21, 243, 11, 238, 126, 218, 195, 1, 211, 233, 237, 51, 141, 150, 122, 1, 81, 214, 89, 242, 161, 34, 254, 237, 235, 85, 18, 209, 163, 21], + [211, 146, 62, 70, 223, 187, 73, 242, 75, 32, 0, 186, 44, 10, 15, 220, 253, 20, 179, 41, 120, 156, 87, 18, 35, 234, 205, 141, 161, 56, 211, 153, 206, 78, 234, 187, 38, 179, 125, 129, 98, 99, 141, 255, 17, 81, 33, 184, 115, 199, 128, 191, 235, 60, 66, 214, 4, 222, 96, 2, 43, 116, 220, 106], + [23, 23, 226, 39, 94, 197, 21, 190, 18, 131, 209, 248, 31, 28, 242, 195, 19, 126, 37, 15, 228, 185, 132, 169, 252, 54, 161, 181, 12, 221, 55, 181, 4, 49, 150, 38, 17, 43, 229, 202, 199, 98, 23, 154, 138, 242, 206, 54, 184, 98, 183, 30, 52, 211, 162, 139, 58, 230, 209, 56, 189, 94, 116, 81], + [66, 85, 176, 101, 92, 204, 122, 245, 133, 198, 19, 214, 108, 239, 57, 205, 99, 163, 107, 152, 141, 21, 252, 54, 191, 109, 223, 8, 240, 196, 42, 68, 221, 45, 10, 192, 218, 56, 203, 241, 123, 7, 80, 222, 131, 246, 28, 55, 148, 67, 164, 158, 128, 102, 99, 76, 241, 157, 201, 81, 148, 53, 73, 121], + [167, 209, 251, 243, 239, 143, 35, 251, 204, 192, 143, 8, 130, 85, 103, 30, 157, 227, 101, 101, 90, 35, 250, 55, 84, 194, 209, 251, 60, 169, 152, 177, 228, 35, 225, 227, 173, 234, 93, 172, 180, 232, 80, 22, 84, 163, 90, 169, 228, 114, 201, 118, 172, 10, 231, 141, 82, 167, 238, 25, 161, 208, 195, 236], + [109, 82, 96, 204, 101, 155, 197, 200, 22, 168, 145, 238, 232, 60, 65, 205, 212, 24, 2, 112, 150, 182, 201, 154, 239, 169, 36, 77, 20, 18, 102, 217, 214, 193, 3, 78, 196, 233, 47, 137, 41, 59, 246, 152, 31, 95, 54, 202, 53, 116, 148, 55, 216, 156, 50, 198, 98, 136, 74, 182, 63, 102, 107, 81], + [91, 203, 157, 43, 231, 244, 77, 104, 142, 138, 80, 110, 55, 182, 232, 214, 39, 162, 191, 175, 195, 67, 99, 120, 49, 146, 254, 1, 220, 169, 233, 29, 111, 125, 204, 241, 226, 33, 16, 106, 93, 111, 233, 184, 150, 87, 43, 33, 222, 243, 182, 132, 73, 109, 228, 49, 94, 18, 237, 95, 185, 46, 245, 85] + ], + "segmentSize": null + }, + { + "encrypted": [ + [] + ], + "iv": [154, 49, 235, 194, 249, 107, 199, 226, 240, 22, 34, 214, 233, 44, 210, 255], + "key": [219, 248, 217, 40, 209, 92, 221, 179, 28, 201, 25, 35, 94, 202, 209, 131, 27, 192, 164, 53, 62, 12, 255, 215, 149, 22, 163, 238, 67, 4, 188, 201], + "modeOfOperation": "cbc", + "plaintext": [ + [] + ], + "segmentSize": null + }, + { + "encrypted": [ + [130, 163, 238, 120, 146, 107, 246, 135, 197, 155, 92, 151, 145, 41, 182, 214], + [73, 149, 221, 76, 30, 210, 36, 189, 247, 29, 38, 196, 209, 229, 16, 17] + ], + "iv": [228, 208, 189, 88, 14, 204, 94, 135, 246, 209, 6, 147, 145, 105, 3, 138], + "key": [152, 63, 43, 166, 57, 162, 34, 174, 78, 254, 190, 140, 248, 56, 190, 108, 132, 98, 182, 166, 77, 57, 92, 138, 14, 238, 224, 132, 130, 221, 36, 250], + "modeOfOperation": "cbc", + "plaintext": [ + [82, 232, 125, 46, 187, 43, 168, 219, 220, 166, 68, 108, 106, 15, 30, 77], + [39, 51, 87, 9, 95, 230, 40, 82, 94, 101, 53, 34, 183, 69, 8, 193] + ], + "segmentSize": null + }, + { + "encrypted": [ + [250, 35, 102, 230, 240, 69, 29, 132, 42, 149, 96, 29, 44, 211, 224, 156], + [41, 117, 170, 92, 94, 2, 71, 216, 31, 93, 220, 20, 112, 112, 23, 250], + [49, 90, 156, 219, 235, 14, 166, 108, 208, 183, 125, 45, 124, 248, 9, 149] + ], + "iv": [45, 167, 246, 137, 90, 206, 55, 65, 107, 248, 200, 103, 6, 1, 84, 128], + "key": [59, 11, 11, 214, 152, 172, 174, 219, 62, 0, 139, 118, 62, 176, 35, 134, 60, 30, 150, 58, 73, 219, 127, 74, 217, 14, 54, 140, 224, 108, 231, 78], + "modeOfOperation": "cbc", + "plaintext": [ + [191, 182, 55, 185, 106, 99, 238, 201, 170, 105, 113, 234, 30, 108, 238, 218], + [108, 188, 153, 5, 184, 36, 176, 52, 41, 143, 97, 253, 216, 208, 254, 122], + [210, 68, 137, 66, 95, 112, 143, 246, 71, 253, 223, 105, 95, 170, 1, 248] + ], + "segmentSize": null + }, + { + "encrypted": [ + [74, 38, 236, 116, 98, 136, 111, 245, 148, 37, 109, 48, 231, 56, 105, 94, 9, 98, 199, 113, 213, 56, 240, 157, 36, 22, 28, 56, 5, 201, 21, 148], + [126, 241, 217, 27, 186, 85, 171, 213, 29, 113, 110, 20, 150, 84, 79, 7, 164, 189, 197, 163, 147, 252, 178, 150, 131, 160, 23, 214, 15, 148, 118, 13], + [74, 199, 54, 165, 184, 102, 254, 57, 123, 107, 63, 221, 204, 202, 232, 136, 165, 117, 240, 103, 33, 214, 184, 196, 81, 96, 36, 227, 64, 94, 50, 56], + [157, 132, 16, 201, 162, 7, 34, 236, 103, 175, 90, 190, 149, 61, 105, 92, 94, 197, 90, 104, 47, 198, 248, 83, 241, 54, 139, 204, 236, 244, 177, 169] + ], + "iv": [135, 191, 116, 144, 226, 64, 173, 145, 149, 187, 98, 149, 189, 205, 98, 91], + "key": [219, 31, 27, 151, 69, 71, 116, 189, 233, 196, 57, 111, 130, 253, 214, 238, 233, 40, 27, 87, 197, 49, 154, 143, 23, 125, 64, 221, 190, 23, 65, 241], + "modeOfOperation": "cbc", + "plaintext": [ + [63, 101, 174, 132, 120, 155, 129, 101, 4, 230, 26, 224, 15, 101, 154, 20, 109, 52, 4, 179, 53, 249, 197, 155, 130, 178, 31, 49, 107, 200, 107, 10], + [32, 163, 124, 110, 17, 51, 144, 132, 201, 103, 180, 68, 76, 84, 142, 192, 220, 163, 182, 122, 152, 216, 143, 64, 143, 115, 16, 106, 30, 81, 241, 245], + [16, 41, 243, 85, 41, 31, 215, 61, 53, 44, 253, 255, 233, 6, 150, 80, 94, 131, 136, 214, 143, 250, 49, 225, 226, 231, 243, 135, 106, 172, 26, 107], + [224, 55, 150, 211, 186, 181, 243, 116, 34, 65, 246, 91, 30, 171, 67, 37, 100, 101, 97, 77, 122, 234, 166, 127, 19, 124, 108, 184, 233, 110, 11, 23] + ], + "segmentSize": null + }, + { + "encrypted": [ + [155, 117, 90, 5, 109, 166, 134, 250, 103, 138, 44, 137, 211, 163, 63, 108, 3, 182, 159, 64, 26, 88, 35, 161, 18, 27, 169, 51, 76, 101, 179, 122, 9, 73, 230, 214, 247, 181, 37, 79, 40, 158, 210, 246, 255, 120, 47, 209], + [195, 186, 34, 246, 25, 45, 106, 195, 231, 129, 216, 32, 11, 26, 64, 29, 47, 18, 62, 43, 17, 159, 110, 111, 181, 13, 144, 127, 233, 154, 151, 45, 220, 85, 98, 2, 207, 19, 55, 2, 30, 22, 137, 75, 200, 252, 248, 168], + [79, 7, 203, 214, 89, 50, 178, 157, 208, 195, 93, 136, 63, 120, 252, 64, 192, 108, 65, 240, 122, 148, 195, 176, 4, 141, 49, 181, 220, 76, 210, 57, 109, 155, 241, 14, 244, 123, 87, 220, 64, 77, 234, 217, 186, 123, 134, 35], + [247, 36, 189, 254, 121, 21, 72, 165, 189, 212, 196, 175, 31, 97, 120, 11, 107, 146, 0, 133, 192, 12, 205, 125, 152, 57, 76, 26, 69, 252, 218, 23, 63, 35, 153, 166, 62, 74, 127, 23, 95, 72, 194, 119, 94, 104, 88, 48], + [1, 204, 202, 150, 246, 240, 4, 76, 55, 86, 163, 40, 101, 30, 196, 68, 165, 167, 87, 85, 247, 78, 125, 57, 235, 5, 172, 215, 201, 185, 65, 76, 89, 193, 85, 173, 111, 229, 251, 1, 228, 65, 189, 37, 26, 84, 50, 255] + ], + "iv": [53, 143, 213, 76, 206, 106, 166, 60, 217, 46, 66, 71, 160, 50, 205, 235], + "key": [247, 27, 74, 230, 208, 197, 156, 197, 25, 92, 113, 64, 106, 117, 115, 29, 43, 244, 203, 161, 235, 59, 42, 182, 12, 81, 190, 169, 33, 181, 77, 30], + "modeOfOperation": "cbc", + "plaintext": [ + [79, 173, 131, 78, 90, 163, 126, 129, 230, 78, 253, 177, 93, 123, 109, 240, 127, 52, 193, 11, 13, 42, 167, 191, 218, 228, 53, 133, 145, 13, 134, 206, 83, 25, 214, 36, 111, 103, 193, 2, 29, 28, 74, 220, 107, 83, 147, 61], + [246, 32, 255, 254, 1, 207, 179, 60, 252, 142, 251, 135, 217, 206, 10, 0, 32, 57, 45, 217, 53, 123, 161, 24, 134, 89, 53, 25, 72, 178, 90, 39, 118, 30, 134, 227, 60, 44, 194, 83, 166, 140, 12, 166, 20, 81, 37, 204], + [43, 151, 95, 80, 154, 178, 68, 143, 228, 117, 113, 196, 163, 142, 28, 106, 234, 184, 218, 140, 188, 251, 77, 72, 103, 87, 4, 126, 135, 51, 247, 249, 233, 44, 209, 55, 59, 157, 231, 250, 43, 1, 8, 66, 167, 152, 163, 8], + [53, 31, 127, 145, 90, 93, 100, 4, 208, 65, 49, 99, 108, 82, 95, 31, 101, 106, 85, 51, 108, 3, 75, 221, 143, 164, 1, 220, 18, 245, 88, 173, 63, 32, 209, 168, 59, 206, 148, 249, 37, 147, 55, 165, 254, 101, 169, 167], + [248, 133, 101, 236, 82, 233, 38, 31, 226, 18, 212, 239, 190, 39, 170, 62, 103, 128, 223, 134, 30, 186, 39, 240, 195, 94, 59, 213, 218, 76, 52, 71, 187, 8, 151, 216, 81, 223, 107, 136, 11, 100, 170, 23, 175, 145, 77, 196] + ], + "segmentSize": null + }, + { + "encrypted": [ + [138, 237, 22, 54, 232, 140, 238, 86, 160, 133, 169, 241, 248, 196, 253, 129, 21, 89, 2, 40, 67, 116, 230, 81, 18, 38, 6, 5, 49, 118, 53, 219, 84, 223, 208, 223, 21, 67, 72, 107, 207, 194, 28, 194, 79, 67, 127, 90, 40, 111, 207, 157, 57, 206, 247, 135, 21, 230, 55, 53, 108, 94, 124, 11], + [14, 219, 110, 43, 110, 203, 241, 87, 49, 132, 156, 122, 96, 30, 230, 4, 9, 244, 73, 152, 246, 181, 195, 109, 31, 174, 48, 191, 163, 188, 82, 156, 203, 87, 107, 242, 142, 180, 180, 197, 51, 233, 14, 107, 37, 77, 185, 60, 176, 178, 123, 152, 88, 143, 100, 159, 245, 92, 64, 147, 7, 184, 97, 250], + [246, 17, 139, 236, 36, 217, 77, 122, 134, 22, 154, 43, 120, 232, 87, 81, 106, 2, 29, 75, 179, 215, 67, 197, 235, 40, 229, 149, 156, 36, 53, 26, 169, 16, 35, 85, 30, 34, 70, 211, 140, 93, 180, 45, 170, 115, 174, 27, 168, 236, 121, 9, 225, 1, 44, 105, 228, 180, 172, 149, 202, 91, 105, 54], + [115, 145, 27, 83, 49, 216, 244, 3, 43, 246, 168, 50, 197, 138, 70, 27, 174, 120, 227, 162, 193, 10, 245, 79, 90, 244, 79, 180, 80, 25, 66, 124, 41, 219, 103, 68, 249, 155, 81, 237, 232, 103, 180, 95, 52, 97, 110, 197, 146, 163, 239, 245, 116, 102, 0, 139, 125, 200, 164, 238, 27, 152, 36, 132], + [18, 187, 142, 112, 226, 214, 241, 127, 209, 41, 198, 13, 189, 134, 196, 211, 29, 24, 142, 150, 65, 56, 226, 8, 182, 160, 42, 232, 96, 31, 250, 99, 232, 208, 39, 109, 25, 36, 161, 135, 41, 163, 166, 158, 208, 86, 18, 44, 60, 161, 160, 115, 10, 60, 167, 39, 106, 33, 27, 95, 229, 39, 70, 223], + [166, 57, 109, 37, 223, 204, 190, 75, 140, 46, 184, 180, 158, 58, 18, 6, 188, 191, 40, 99, 89, 211, 16, 36, 119, 83, 139, 188, 234, 17, 196, 202, 212, 128, 147, 193, 37, 230, 197, 218, 77, 169, 199, 116, 103, 218, 86, 47, 101, 178, 217, 21, 94, 251, 174, 199, 203, 132, 164, 179, 162, 196, 44, 190] + ], + "iv": [59, 119, 75, 39, 125, 3, 118, 6, 62, 186, 14, 89, 181, 205, 133, 181], + "key": [161, 49, 22, 114, 218, 210, 70, 17, 215, 109, 75, 251, 160, 254, 129, 125, 249, 250, 200, 135, 117, 176, 162, 111, 67, 47, 165, 28, 252, 58, 28, 216], + "modeOfOperation": "cbc", + "plaintext": [ + [84, 199, 202, 56, 151, 15, 81, 6, 13, 21, 4, 120, 102, 50, 129, 144, 140, 177, 160, 92, 113, 212, 238, 223, 54, 54, 207, 171, 39, 221, 166, 33, 138, 147, 235, 125, 173, 146, 59, 117, 37, 22, 163, 112, 127, 164, 242, 188, 242, 244, 139, 246, 239, 21, 32, 81, 173, 129, 58, 66, 194, 2, 245, 10], + [181, 66, 89, 26, 107, 196, 149, 13, 222, 120, 185, 229, 121, 148, 181, 97, 86, 119, 50, 217, 228, 210, 99, 230, 205, 148, 232, 8, 5, 138, 69, 246, 7, 41, 156, 133, 75, 7, 78, 234, 120, 203, 252, 134, 112, 10, 191, 227, 217, 67, 90, 137, 252, 9, 102, 15, 191, 226, 68, 231, 92, 166, 133, 89], + [66, 217, 61, 70, 101, 182, 205, 20, 135, 107, 183, 153, 247, 130, 165, 183, 237, 239, 39, 158, 248, 204, 136, 69, 90, 42, 67, 233, 47, 192, 153, 3, 165, 248, 41, 34, 49, 55, 70, 72, 141, 91, 154, 212, 22, 239, 245, 37, 198, 106, 140, 36, 70, 212, 59, 192, 50, 26, 103, 70, 54, 155, 54, 103], + [231, 119, 93, 90, 64, 73, 17, 138, 13, 48, 137, 155, 78, 254, 33, 11, 98, 254, 29, 241, 110, 123, 155, 160, 98, 139, 11, 182, 250, 15, 4, 211, 241, 38, 106, 129, 115, 53, 71, 27, 174, 249, 171, 214, 177, 68, 245, 138, 64, 61, 92, 247, 253, 157, 197, 144, 4, 250, 121, 251, 250, 80, 247, 50], + [111, 211, 188, 179, 84, 212, 49, 38, 222, 122, 68, 201, 66, 103, 157, 199, 202, 63, 5, 188, 67, 204, 232, 102, 88, 33, 36, 165, 184, 193, 9, 77, 18, 216, 7, 150, 224, 33, 111, 91, 135, 130, 224, 98, 59, 198, 152, 232, 119, 193, 82, 57, 106, 76, 253, 48, 133, 12, 9, 84, 208, 39, 159, 72], + [51, 0, 69, 163, 121, 149, 202, 18, 99, 214, 105, 5, 175, 157, 89, 198, 144, 13, 237, 175, 78, 227, 79, 238, 233, 85, 135, 64, 23, 182, 22, 252, 225, 155, 99, 103, 61, 76, 78, 182, 253, 33, 115, 185, 195, 40, 1, 181, 187, 199, 45, 113, 128, 184, 2, 99, 17, 187, 72, 244, 236, 243, 225, 230] + ], + "segmentSize": null + }, + { + "encrypted": [ + [178, 1, 205, 27, 24, 65, 236, 86, 10, 122, 204, 157, 186, 226, 8, 161, 119, 200, 213, 35, 161, 36, 1, 86, 110, 127, 29, 251, 31, 197, 81, 242, 140, 52, 58, 171, 48, 94, 209, 43, 122, 214, 86, 48, 158, 170, 178, 66, 104, 54, 13, 110, 217, 187, 229, 184, 179, 27, 42, 36, 95, 1, 101, 133], + [62, 17, 72, 232, 120, 157, 239, 12, 32, 60, 112, 65, 203, 185, 17, 90, 96, 77, 84, 241, 66, 191, 130, 77, 76, 221, 135, 176, 202, 184, 223, 221, 55, 78, 133, 205, 179, 58, 248, 57, 64, 137, 105, 95, 195, 117, 84, 228, 56, 198, 111, 198, 70, 176, 28, 239, 19, 123, 140, 35, 202, 81, 228, 113], + [165, 104, 22, 87, 180, 47, 56, 142, 173, 105, 248, 102, 203, 95, 244, 38, 191, 159, 238, 77, 15, 174, 165, 115, 200, 92, 191, 215, 91, 222, 65, 46, 100, 163, 250, 64, 221, 178, 163, 124, 217, 7, 74, 12, 170, 141, 247, 90, 155, 209, 61, 201, 74, 205, 252, 72, 0, 58, 102, 205, 59, 113, 225, 229], + [225, 204, 248, 58, 230, 100, 250, 167, 44, 186, 185, 168, 165, 102, 54, 78, 38, 233, 133, 70, 98, 78, 34, 61, 128, 138, 180, 154, 27, 175, 155, 203, 15, 222, 90, 159, 198, 157, 92, 25, 54, 2, 107, 172, 232, 79, 182, 110, 250, 9, 163, 122, 119, 31, 15, 136, 159, 86, 71, 208, 159, 24, 207, 212], + [64, 38, 139, 43, 191, 227, 157, 209, 115, 129, 92, 250, 90, 126, 2, 135, 102, 202, 27, 31, 83, 208, 249, 199, 235, 155, 123, 177, 123, 71, 27, 182, 13, 33, 45, 122, 25, 70, 10, 92, 66, 75, 245, 118, 201, 63, 99, 191, 48, 163, 224, 221, 224, 212, 84, 247, 61, 181, 243, 203, 185, 3, 101, 128], + [23, 206, 15, 238, 125, 78, 181, 133, 32, 32, 251, 146, 195, 49, 37, 101, 170, 84, 23, 79, 38, 69, 154, 67, 195, 156, 225, 231, 214, 17, 223, 103, 101, 117, 133, 88, 125, 4, 239, 39, 152, 101, 211, 208, 113, 77, 122, 115, 175, 62, 105, 31, 229, 229, 60, 57, 245, 5, 128, 116, 98, 97, 73, 212], + [67, 60, 54, 173, 67, 139, 176, 78, 183, 145, 42, 94, 105, 25, 242, 20, 93, 136, 64, 26, 113, 121, 195, 132, 229, 159, 134, 40, 246, 193, 198, 62, 39, 38, 25, 136, 230, 13, 169, 153, 223, 131, 89, 26, 148, 64, 132, 77, 123, 35, 47, 106, 141, 109, 170, 7, 198, 250, 93, 217, 17, 152, 123, 244] + ], + "iv": [137, 51, 189, 131, 174, 76, 58, 118, 164, 116, 105, 183, 10, 235, 12, 92], + "key": [102, 215, 255, 123, 134, 86, 10, 46, 24, 139, 25, 9, 39, 116, 68, 174, 172, 206, 22, 230, 62, 241, 198, 40, 93, 241, 200, 118, 130, 98, 248, 47], + "modeOfOperation": "cbc", + "plaintext": [ + [113, 205, 35, 143, 75, 17, 236, 130, 189, 121, 239, 83, 195, 122, 67, 225, 104, 114, 4, 128, 2, 173, 28, 41, 67, 151, 119, 176, 157, 80, 112, 28, 254, 72, 105, 179, 136, 151, 210, 230, 40, 255, 98, 63, 124, 239, 13, 225, 184, 24, 52, 101, 34, 139, 143, 89, 22, 47, 122, 165, 209, 225, 236, 54], + [61, 252, 142, 119, 234, 36, 141, 25, 214, 77, 195, 88, 95, 244, 123, 210, 89, 154, 66, 15, 66, 38, 9, 169, 47, 134, 75, 208, 170, 100, 59, 127, 211, 82, 199, 17, 0, 51, 207, 26, 184, 183, 231, 9, 229, 8, 25, 60, 199, 105, 224, 114, 199, 8, 126, 118, 18, 220, 209, 199, 228, 41, 142, 165], + [22, 255, 93, 251, 220, 64, 22, 75, 9, 90, 100, 16, 68, 251, 194, 19, 108, 33, 251, 103, 30, 202, 93, 179, 159, 15, 205, 108, 143, 99, 211, 143, 75, 202, 175, 96, 205, 181, 18, 79, 171, 33, 108, 240, 11, 162, 142, 97, 117, 175, 194, 143, 18, 65, 48, 158, 71, 128, 233, 16, 73, 239, 32, 111], + [159, 31, 52, 221, 247, 189, 125, 82, 220, 171, 38, 206, 51, 240, 199, 219, 240, 49, 48, 138, 76, 214, 235, 216, 97, 111, 244, 221, 14, 238, 116, 156, 95, 188, 94, 44, 221, 65, 114, 106, 68, 129, 17, 190, 89, 245, 18, 59, 200, 163, 180, 149, 107, 178, 13, 237, 68, 66, 92, 145, 15, 97, 107, 128], + [140, 4, 125, 176, 240, 178, 101, 57, 48, 255, 16, 254, 18, 167, 103, 111, 112, 104, 208, 228, 192, 135, 16, 37, 21, 111, 31, 50, 155, 144, 124, 106, 222, 86, 82, 30, 90, 18, 144, 176, 220, 13, 143, 100, 245, 169, 121, 45, 130, 112, 229, 88, 250, 246, 60, 190, 186, 253, 151, 235, 166, 196, 138, 119], + [72, 119, 76, 183, 142, 48, 121, 143, 74, 12, 202, 251, 186, 132, 236, 31, 120, 175, 153, 73, 14, 100, 237, 158, 89, 167, 186, 152, 84, 90, 214, 106, 143, 92, 9, 153, 72, 187, 58, 10, 140, 208, 87, 61, 4, 249, 175, 65, 62, 128, 108, 210, 21, 150, 166, 122, 86, 186, 113, 59, 7, 123, 64, 115], + [154, 6, 201, 210, 42, 163, 41, 112, 74, 168, 78, 71, 107, 75, 111, 181, 67, 145, 230, 128, 151, 152, 250, 254, 45, 163, 159, 56, 220, 162, 82, 30, 6, 222, 100, 153, 32, 184, 173, 47, 86, 52, 202, 71, 156, 4, 194, 40, 21, 135, 40, 232, 250, 81, 68, 38, 249, 71, 214, 152, 1, 62, 69, 58] + ], + "segmentSize": null + }, + { + "encrypted": [ + [67, 15, 44] + ], + "iv": null, + "key": [131, 117, 6, 35, 178, 249, 37, 228, 134, 129, 172, 48, 110, 6, 233, 103], + "modeOfOperation": "ctr", + "plaintext": [ + [198, 171, 132] + ], + "segmentSize": null + }, + { + "encrypted": [ + [151, 9, 116, 223, 153, 154, 152, 165, 104, 32, 158, 217, 11, 209, 74, 236] + ], + "iv": null, + "key": [9, 131, 134, 220, 205, 148, 111, 180, 77, 89, 63, 197, 82, 176, 121, 115], + "modeOfOperation": "ctr", + "plaintext": [ + [20, 142, 236, 114, 255, 7, 245, 251, 223, 138, 221, 141, 210, 188, 209, 233] + ], + "segmentSize": null + }, + { + "encrypted": [ + [228, 254, 4, 106, 58, 51, 3, 114, 120, 110, 18, 26, 168, 173, 67, 187, 162, 90, 129, 18, 170, 100, 191, 156, 56, 75, 128, 141, 173, 83, 171, 177, 66, 61, 182, 177, 214, 129, 81, 13, 221, 241, 251, 100, 210, 72, 111, 178, 147, 22, 157, 49, 12, 203, 35, 133, 65, 38, 194, 39, 53, 248, 176, 203, 151, 136, 248, 21, 249, 252, 147, 240, 251, 232, 191, 213, 224, 181, 217, 30, 73, 22, 126, 101, 58, 67, 212, 107, 196, 179, 124, 230, 82, 140, 238, 226, 83, 248, 245, 195, 8, 185, 59, 46, 98, 81, 222, 203, 113, 181, 0, 206, 250, 92, 241, 97, 154, 247, 43, 74, 140, 98, 136, 108, 170, 123, 117] + ], + "iv": null, + "key": [54, 35, 114, 145, 95, 67, 82, 169, 137, 201, 23, 22, 27, 55, 175, 226], + "modeOfOperation": "ctr", + "plaintext": [ + [90, 215, 79, 236, 241, 49, 31, 92, 81, 1, 84, 34, 65, 115, 78, 29, 51, 178, 82, 191, 152, 116, 196, 6, 149, 1, 3, 24, 72, 212, 251, 229, 70, 228, 84, 57, 115, 5, 100, 233, 56, 140, 17, 102, 116, 63, 227, 146, 127, 201, 76, 110, 123, 82, 71, 166, 102, 145, 81, 193, 154, 229, 26, 218, 153, 34, 231, 3, 159, 24, 231, 220, 64, 193, 221, 23, 249, 72, 206, 29, 45, 211, 182, 247, 252, 60, 16, 214, 206, 63, 149, 184, 169, 95, 147, 142, 237, 115, 115, 183, 96, 233, 8, 90, 100, 208, 161, 90, 45, 247, 62, 252, 94, 12, 137, 115, 186, 129, 149, 118, 243, 234, 46, 34, 81, 82, 59] + ], + "segmentSize": null + }, + { + "encrypted": [ + [14, 11, 40, 99, 71, 239, 215, 49, 226, 216, 152, 179, 37, 243, 213, 28, 15, 51, 211, 82, 208, 244, 255, 179, 239, 46, 0, 124, 203, 177, 210, 165, 96, 166, 60, 99, 225, 233, 138, 212, 82, 129, 9, 132, 101, 1, 166, 125, 25, 215, 74, 94, 8, 67, 73, 12, 15, 118, 116, 139, 32, 75, 15, 96, 252, 248, 210, 1, 128, 188, 248, 144, 171, 97, 164, 172, 97, 72, 59, 159, 131, 92, 127, 253, 15, 237, 193, 213, 15, 135, 228, 86, 242, 66, 27, 19, 109, 20, 190, 85, 125, 164, 181, 202, 146, 5, 28, 154, 65, 181, 149, 85, 249, 159, 63, 148, 26, 187, 166, 37, 4, 201, 107, 198, 103, 84, 95, 118] + ], + "iv": null, + "key": [125, 39, 76, 130, 49, 102, 239, 37, 107, 58, 82, 176, 254, 194, 221, 18], + "modeOfOperation": "ctr", + "plaintext": [ + [214, 44, 128, 36, 122, 182, 47, 206, 197, 222, 135, 6, 218, 228, 230, 120, 132, 175, 241, 130, 107, 123, 78, 247, 195, 47, 69, 215, 198, 46, 150, 81, 100, 111, 92, 239, 3, 126, 200, 184, 87, 5, 195, 178, 113, 76, 64, 1, 41, 228, 224, 32, 138, 80, 187, 134, 113, 210, 168, 61, 47, 4, 221, 4, 181, 242, 205, 88, 103, 90, 122, 30, 21, 3, 100, 239, 24, 250, 97, 204, 39, 137, 255, 254, 90, 165, 154, 47, 206, 101, 157, 175, 196, 203, 127, 229, 241, 53, 129, 23, 12, 12, 116, 228, 166, 66, 252, 171, 82, 216, 240, 255, 128, 59, 249, 170, 229, 180, 47, 195, 51, 21, 30, 223, 83, 32, 145, 205] + ], + "segmentSize": null + }, + { + "encrypted": [ + [142, 31, 169, 42, 24, 69, 45, 60, 20, 38, 231, 44, 78, 226, 182, 32, 250, 36, 131, 210, 97, 95, 12, 155, 243, 97, 117, 229, 35, 68, 58, 79, 127, 126, 159, 101, 108, 119, 49, 143, 33, 237, 67, 121, 216, 84, 219, 41, 237, 28, 216, 96, 249, 226, 91, 62, 139, 18, 134, 75, 110, 127, 115, 102, 224, 138, 235, 145, 65, 188, 240, 101, 96, 232, 213, 178, 229, 150, 162, 218, 151, 155, 148, 139, 59, 76, 254, 212, 9, 67, 33, 76, 223, 76, 157, 27, 15, 197, 188, 20, 100, 106, 193, 32, 195, 243, 193, 71, 5, 17, 238, 183, 151, 174, 46, 71, 211, 77, 29, 181, 80, 193, 113, 239, 71, 96, 213, 10, 69] + ], + "iv": null, + "key": [129, 164, 104, 238, 135, 189, 78, 252, 130, 23, 253, 65, 228, 58, 130, 183], + "modeOfOperation": "ctr", + "plaintext": [ + [114, 76, 183, 7, 80, 17, 171, 97, 50, 173, 213, 220, 103, 1, 145, 230, 158, 210, 111, 222, 233, 100, 115, 110, 152, 62, 75, 120, 186, 150, 118, 250, 13, 24, 172, 208, 163, 4, 193, 136, 105, 188, 137, 162, 74, 240, 145, 4, 110, 115, 237, 130, 11, 92, 117, 141, 208, 137, 245, 5, 116, 98, 250, 82, 41, 201, 75, 187, 104, 95, 38, 65, 149, 32, 255, 10, 241, 88, 75, 249, 200, 27, 208, 108, 255, 89, 113, 223, 13, 69, 21, 62, 222, 101, 180, 57, 235, 193, 46, 26, 94, 152, 150, 121, 33, 82, 59, 69, 224, 239, 76, 205, 13, 9, 168, 35, 110, 65, 108, 183, 38, 88, 11, 100, 180, 121, 234, 107, 130] + ], + "segmentSize": null + }, + { + "encrypted": [ + [116, 140, 101, 132, 174, 122, 31, 33, 150, 125, 112, 8, 136, 171, 209, 242, 50, 140, 182, 254, 44, 167, 216, 218, 57, 93, 78, 198, 82, 101, 105, 246, 59, 77, 164, 22, 44, 211, 159, 62, 135, 107, 68, 161, 174, 241, 35, 52, 58, 235, 158, 34, 225, 139, 78, 74, 117, 173, 218, 127, 21, 228, 225, 114, 210, 155, 232, 160, 190, 73, 23, 211, 29, 105, 176, 242, 5, 233, 26, 106, 8, 165, 42, 222, 84, 177, 249, 146, 21, 63, 105, 137, 33, 61, 141, 53, 181, 183, 196, 107, 228, 10, 108, 150, 187, 44, 194, 87, 39, 246, 235, 82, 66, 142, 76, 203, 188, 216, 128, 254, 226, 10, 93, 32, 3, 125, 107, 21, 149, 95, 119, 197, 149, 65, 201, 86, 146, 58, 212, 13, 44, 240, 135, 36, 44, 225, 37, 48, 253, 86, 219, 87, 161, 149, 73, 54, 165, 237, 188, 97, 54, 106, 213, 33, 152, 199, 166, 143, 109, 86, 7, 242, 11, 74, 94, 121, 224, 12, 146, 199, 90, 173, 249, 254, 51, 34, 108, 246, 40, 34, 168, 199, 38, 145, 204, 150, 71, 20, 46, 30, 7, 130, 135, 224, 220, 114, 138, 183, 39, 71, 222, 164, 25, 233, 114, 8, 202, 147, 249, 107, 7, 138, 60, 149, 171, 235, 116, 241, 28, 211, 9, 70, 174, 25, 202, 34, 210, 241, 103, 171, 167, 240, 178, 157, 1, 188, 238, 129, 197, 226, 59, 107, 65, 187, 53, 63, 20, 108, 13, 18, 105, 18, 20, 185, 23, 223, 204, 124, 8, 187, 81, 84, 100, 236, 83, 135, 16, 78, 103, 76, 85, 144, 201, 166, 53, 215, 40, 40, 2, 202, 239, 141, 234, 80, 207, 58, 212, 82, 106, 110, 161, 130, 174, 125, 144, 132, 165, 174, 127, 210, 62, 238, 75, 158, 189, 134, 26, 227, 235, 223, 150, 255, 29, 90, 123, 23, 251, 18, 117, 215, 231, 221, 239, 90, 101, 238, 39, 85, 108, 37, 138, 94, 151, 142, 95, 27, 218, 123, 125, 76, 234, 70, 106, 82, 122, 232, 192, 100, 64, 161, 16, 31, 73, 159, 34, 77, 242, 157, 7, 185, 175, 202, 206, 255, 163, 242, 23, 48, 113, 160, 54, 128, 8, 231, 241, 228, 201, 113, 40, 157, 130, 24, 221, 167, 240, 222, 42, 88, 73, 230, 227, 84, 231, 85, 205, 219, 215, 50, 57, 122, 219, 238, 183, 239, 176, 149, 91, 15, 89, 110, 121, 26, 220, 163, 122, 199, 198, 164, 200, 167, 147, 92, 66, 5, 79, 235, 38, 108, 47, 202, 43, 198, 208, 87, 253, 126, 249, 47, 253, 253, 132, 116, 233, 191, 188, 80, 216, 64, 226, 159, 197, 175, 27, 249, 147, 119, 177, 63, 139, 159, 146, 34, 202, 211, 165, 217, 110, 203, 14, 16, 227, 26, 97, 129, 21, 159, 21, 243, 228, 185, 230, 224, 138, 168, 99, 219, 248, 65, 166, 142, 2, 230, 186, 177, 95, 106, 55, 219, 40, 219, 70, 167, 251, 63, 150, 13, 63, 215, 100, 187, 240, 125, 181, 64, 210, 250, 45, 96, 0, 138, 96, 11, 34, 122, 50, 48, 234, 227, 190, 201, 156, 240, 141, 181, 190, 47, 171, 102, 26, 107, 244, 131, 170, 5, 233, 248, 74, 177, 15, 77, 63, 40, 230, 242, 243, 4, 104, 62, 114, 213, 188, 67, 169, 4, 242, 177, 161, 48, 226, 134, 37, 222, 92, 244, 230, 18, 191, 108, 193, 34, 243, 137, 179, 231, 163, 221, 134, 246, 107, 35, 193, 244, 147, 230, 108, 128, 49, 13, 193, 45, 86, 1, 185, 49, 238, 108, 99, 128, 118, 161, 49, 98, 17, 168, 123, 68, 219, 120, 78, 31, 88, 193, 178, 212, 48, 239, 213, 192, 10, 106, 137, 61, 153, 157, 15, 133, 244, 216, 253, 38, 212, 134, 27, 74, 19, 48, 18, 157, 40, 10, 124, 99, 74, 105, 254, 91, 143, 155, 154, 132, 2, 1, 198, 141, 94, 171, 105, 56, 238, 99, 8, 65, 129, 61, 207, 92, 35, 141, 128, 48, 208, 251, 106, 44, 203, 150, 154, 211, 182, 114, 197, 165, 80, 59, 36, 190, 73, 46, 143, 69, 26, 185, 111, 169, 68, 239, 87, 178, 30, 86, 86, 114, 1, 157, 173, 58, 144, 16, 157, 76, 4, 48, 148, 123, 119, 45, 245, 204, 248, 253, 108, 161, 124, 4, 144, 71, 241, 146, 109, 237, 65, 251, 130, 97, 134, 207, 152, 196, 64, 247, 138, 118, 78, 69, 250, 73, 221, 75, 214, 252, 23, 232, 21, 60, 15, 184, 238, 253, 181, 195, 95, 121, 228, 172, 37, 20, 130, 165, 23, 102, 123, 41, 15, 75, 198, 26, 72, 73, 134, 53, 190, 144, 172, 170, 225, 8, 27, 195, 60, 25, 252, 206, 171, 82, 45, 47, 252, 94, 25, 175, 206, 147, 99, 93, 75, 221, 115, 85, 135, 95, 159, 246, 101, 32, 42, 135, 41, 46, 155, 79, 63, 129, 200, 62, 166, 222, 32, 10, 20, 145, 79, 85, 102, 124, 52, 67, 24, 227, 132, 183, 94, 199, 184, 189, 76, 39, 167, 14, 5, 26, 243, 53, 120, 13, 43, 219, 188, 156, 58, 4, 118, 145, 32, 82, 174, 181, 61, 228, 15, 77, 194, 2, 4, 186, 232, 26, 53, 168, 64, 2, 106, 221, 238, 41, 127, 201, 227, 43, 177, 85, 209, 100, 244, 24, 54, 86, 223, 159, 24, 72, 89, 128, 45, 111, 54, 229, 42, 233, 162, 92, 39, 28, 185, 82, 232, 64, 37, 190, 230, 236, 180, 170, 42, 242, 244, 80, 159, 174, 49, 39, 53, 224, 8, 8, 226, 216, 52, 102, 201, 225, 28, 249, 85, 60, 92, 149, 55, 18, 134, 80, 75, 106, 123, 64, 185, 176, 32, 11, 231, 5, 43, 129, 148, 60, 240, 102, 157, 127, 211, 196, 197, 204, 193, 65, 138, 156, 203, 68, 21, 45, 113, 143, 134, 115, 186, 52, 64, 12, 64, 158, 22, 127, 205, 234, 28, 248, 198, 232, 152, 198, 132, 147, 143, 227, 115, 243, 225, 204, 212, 138, 112, 245, 226, 199, 57, 32, 111, 237, 185, 110, 119, 108, 185, 93, 15, 69, 17, 208, 46, 148, 245, 82, 220, 243, 200, 206, 236, 99, 130, 72, 70, 232, 175, 133, 41, 219, 231, 174, 125, 51, 51, 99, 11, 108, 149, 165, 152, 219, 27, 87, 11, 167, 70, 180, 92, 10, 9, 243, 200, 85, 104, 51, 69, 173, 67, 217, 61, 165, 124, 85, 192, 152, 232, 17, 251, 191, 158, 218, 98, 74, 91, 100, 36, 37, 38, 232, 63, 221, 142, 119, 108, 117, 156, 84, 229, 9, 168, 6, 107, 142, 214, 94, 130, 96, 50, 43, 222, 97, 101, 37, 119, 204, 102, 166, 151, 84, 43, 173, 7, 121, 73, 70, 141, 5, 185, 220, 232, 59, 31, 27, 173, 100, 62, 238, 224, 89, 123, 209, 83, 33, 177, 138, 230, 65, 10, 217, 216, 63, 12, 75, 167, 156, 102, 177, 190, 10, 105, 239, 125, 17, 27, 48, 141, 220, 232, 144, 245, 180, 97, 234, 54, 6, 187, 152, 83, 82, 215, 6, 57, 205, 35, 78, 88, 101, 78, 83, 236, 194, 114, 20, 98, 107, 178, 6, 19, 88, 254, 41, 205, 51, 166, 51, 54, 216, 63, 130, 188, 18, 154, 214, 100, 152, 134, 28, 109, 189, 118, 153, 124, 67, 16, 86, 180, 200, 195, 174, 122, 146, 17, 166, 103, 26, 80, 46, 101, 6, 230, 138, 166, 63, 150, 41, 33, 49, 120, 199, 91, 151, 141, 176, 134, 130, 41, 27, 189, 85, 60, 151, 86, 252, 203, 73, 168, 236, 103, 237, 62, 216, 79, 117, 139, 171, 21, 160, 158, 43, 232, 52, 31, 158, 94, 33, 56, 88, 223, 176, 228, 219, 26, 68, 161, 112, 241, 233, 61, 177, 225, 156, 140, 114, 169, 181, 144, 41, 36, 160, 8, 78, 99, 133, 26, 114, 247, 224, 95, 111, 159, 252, 207, 234, 1, 37, 225, 41, 103, 8, 237, 81, 219, 56, 228, 101, 94, 154, 124, 72, 33, 26, 61, 65, 139, 168, 99, 31, 149, 179, 172, 171, 40, 196, 239, 213, 197, 176, 74, 202, 242, 16, 245, 237, 229, 182, 140, 50, 130, 131, 53, 26, 254, 2, 49, 187, 227, 78, 223, 55, 112, 8, 146, 101, 120, 119, 150, 213, 204, 146, 232, 23, 95, 101, 111, 185, 41, 199, 59, 37, 115, 77, 4, 140, 138, 18, 43, 72, 129, 221, 115, 189, 235, 179, 77, 134, 227, 246, 211, 114, 204, 254, 20, 241, 1, 150, 127, 66, 238, 97, 209, 143, 231, 232, 121, 249, 88, 199, 80, 26, 108, 71, 15, 76, 19, 239, 197, 7, 43, 176, 145, 199, 30, 226, 18, 218, 5, 254, 73, 112, 79, 248, 255, 193, 252, 227, 114, 156, 125, 85, 190, 162, 137, 60], + [74, 11, 146, 68, 224, 89, 50, 217, 64, 156, 117, 251, 210, 187, 132, 141, 232, 110, 89, 91, 199, 4, 194, 103, 188, 55, 222, 61, 210, 210, 30, 176, 233, 47, 131, 130, 84, 100, 181, 253, 167, 48, 164, 43, 69, 240, 183, 26, 119, 41, 110, 130, 185, 174, 45, 22, 128, 251, 110, 41, 96, 77, 197, 224, 175, 1, 14, 244, 52, 77, 229, 228, 131, 135, 84, 78, 240, 61, 190, 64, 108, 105, 217, 12, 53, 244, 25, 55, 216, 17, 156, 101, 213, 1, 111, 59, 127, 42, 32, 200, 212, 59, 3, 27, 122, 197, 237, 203, 36, 212, 45, 201, 59, 3, 179, 169, 191, 68, 82, 97, 8, 13, 38, 222, 112, 215, 127, 197, 104, 134, 75, 206, 150, 163, 97, 180, 91, 19, 20, 70, 23, 98, 10, 201, 239, 236, 113, 116, 102, 6, 23, 226, 55, 179, 127, 194, 213, 109, 18, 210, 111, 243, 7, 194, 236, 181, 93, 231, 170, 2, 203, 100, 241, 159, 95, 161, 196, 234, 77, 86, 252, 132, 56, 105, 157, 51, 46, 112, 72, 165, 187, 24, 46, 232, 182, 231, 160, 168, 166, 198, 195, 150, 17, 28, 100, 139, 56, 179, 89, 123, 2, 243, 95, 184, 220, 248, 15, 115, 185, 10, 197, 10, 71, 166, 31, 7, 91, 181, 248, 55, 130, 3, 65, 47, 39, 25, 88, 236, 151, 65, 241, 198, 204, 79, 104, 133, 28, 210, 88, 20, 0, 219, 3, 17, 223, 88, 3, 70, 10, 60, 171, 90, 128, 189, 192, 234, 120, 134, 129, 27, 69, 28, 90, 24, 225, 159, 163, 139, 86, 66, 139, 187, 203, 230, 96, 126, 107, 30, 113, 195, 117, 67, 197, 43, 80, 50, 32, 221, 111, 60, 50, 132, 136, 50, 229, 54, 245, 167, 192, 193, 96, 231, 81, 211, 6, 190, 97, 135, 160, 248, 248, 30, 28, 145, 145, 40, 56, 85, 253, 132, 53, 96, 183, 213, 5, 226, 249, 220, 39, 162, 65, 105, 226, 74, 194, 23, 243, 190, 166, 95, 145, 93, 110, 176, 50, 207, 23, 250, 5, 136, 23, 130, 131, 73, 244, 126, 86, 157, 85, 223, 113, 203, 240, 171, 165, 119, 156, 176, 221, 178, 71, 162, 93, 148, 59, 166, 119, 194, 86, 1, 122, 45, 167, 129, 123, 144, 244, 191, 118, 154, 31, 225, 165, 54, 25, 243, 171, 30, 179, 128, 123, 119, 140, 211, 178, 113, 36, 196, 132, 32, 51, 113, 226, 62, 254, 241, 129, 94, 253, 229, 24, 181, 155, 115, 52, 19, 139, 14, 61, 181, 70, 190, 68, 145, 82, 84, 169, 78, 116, 167, 221, 35, 137, 239, 29, 92, 56, 187, 0, 6, 157, 52, 208, 212, 132, 90, 72, 190, 220, 135, 183, 118, 66, 51, 38, 117, 69, 93, 87, 148, 194, 217, 220, 208, 234, 177, 124, 244, 97, 105, 97, 233, 1, 149, 169, 158, 63, 59, 183, 94, 144, 91, 43, 171, 165, 194, 24, 129, 148, 72, 82, 14, 76, 55, 119, 247, 174, 176, 15, 61, 86, 236, 67, 202, 48, 73, 21, 177, 116, 39, 210, 148, 195, 213, 133, 168, 162, 142, 247, 149, 224, 209, 150, 220, 176, 214, 105, 182, 44, 188, 17, 157, 57, 222, 163, 178, 222, 238, 66, 75, 47, 110, 165, 109, 200, 158, 39, 158, 24, 116, 145, 56, 68, 229, 176, 125, 136, 116, 193, 179, 246, 201, 103, 126, 83, 167, 199, 125, 161, 243, 35, 89, 151, 209, 221, 202, 76, 8, 232, 154, 209, 166, 78, 255, 19, 204, 115, 252, 247, 95, 208, 152, 13, 123, 90, 80, 39, 218, 28, 78, 144, 251, 94, 200, 133, 159, 10, 137, 34, 61, 22, 64, 185, 64, 187, 228, 131, 216, 204, 33, 40, 149, 31, 48, 36, 72, 114, 76, 186, 63, 172, 15, 180, 43, 101, 212, 184, 35, 19, 123, 223, 144, 168, 82, 221, 148, 48, 254, 124, 121, 62, 131, 121, 183, 65, 123, 204, 114, 201, 101, 135, 130, 76, 77, 36, 190, 122, 100, 232, 9, 176, 121, 247, 45, 135, 195, 7, 195, 11, 37, 242, 218, 122, 224, 121, 20, 50, 224, 233, 124, 166, 15, 84, 150, 84, 71, 170, 187, 154, 8, 14, 104, 232, 186, 201, 78, 237, 29, 129, 207, 113, 168, 253, 52, 215, 166, 157, 82, 39, 126, 255, 83, 159, 210, 41, 17, 171, 224, 215, 144, 12, 72, 159, 0, 217, 195, 153, 99, 2, 222, 192, 50, 25, 109, 254, 225, 54, 46, 255, 118, 198, 2, 78, 245, 25, 198, 237, 33, 137, 203, 169, 163, 76, 12, 171, 8, 187, 110, 63, 208, 214, 125, 210, 201, 38, 19, 134, 210, 115, 130, 203, 205, 66, 35, 2, 234, 10, 111, 97, 156, 140, 94, 54, 60, 148, 228, 125, 224, 29, 217, 244, 203, 142, 240, 102, 101, 198, 217, 3, 75, 120, 156, 176, 7, 77, 50, 102, 172, 191, 162, 47, 129, 22, 61, 233, 62, 125, 39, 144, 165, 232, 204, 212, 27, 182, 96, 125, 203, 151, 11, 225, 68, 81, 215, 155, 132, 195, 218, 5, 177, 161, 35, 224, 10, 56, 195, 33, 61, 141, 24, 70, 165, 125, 118, 60, 247, 128, 33, 96, 97, 72, 46, 231, 127, 206, 107, 200, 197, 195, 10, 215, 68, 22, 248, 233, 7, 32, 15, 199, 114, 198, 167, 78, 132, 175, 202, 58, 3, 227, 0, 191, 170, 29, 151, 141, 177, 192, 216, 0, 234, 38, 50, 169, 3, 149, 146, 99, 96, 151, 46, 36, 79, 101, 168, 2, 23, 63, 148, 3, 190, 21, 40, 238, 158, 84, 75, 9, 185, 210, 198, 140, 108, 184, 244, 19, 217, 30, 146, 122, 123, 235, 220, 98, 44, 138, 246, 23, 209, 89, 148, 156, 202, 88, 122, 236, 141, 130, 78, 208, 116, 240, 77, 162, 48, 125, 164, 33, 137, 194, 76, 105, 78, 188, 144, 214, 19, 54, 101, 38, 101, 58, 26, 146, 86, 167, 211, 183, 46, 197, 117, 147, 127, 98, 197, 52, 40, 123, 30, 74, 4, 6, 161, 142, 187, 55, 81, 200, 42, 23, 176, 171, 170, 177, 143, 71, 147, 135, 9, 167, 157, 186, 111, 80, 57, 199, 178, 88, 41, 227, 125, 229, 109, 246, 156, 105, 59, 35, 2, 9, 221, 143, 176, 117, 103, 142, 96, 50, 52, 243, 71, 6, 198, 196, 3, 173, 237, 5, 48, 6, 155, 11, 196, 218, 147, 57, 173, 90, 176, 136, 4, 89, 24, 111, 146, 114, 240, 48, 78, 182, 139, 56, 209, 23, 142, 7, 215, 137, 46, 135, 213, 93, 234, 117, 9, 248, 103, 195, 15, 249, 71, 90, 65, 127, 203, 226, 200, 50, 90, 207, 142, 237, 249, 251, 76, 219, 222, 253, 253, 200, 158, 237, 41, 110, 12, 142, 233, 117, 31, 169, 81, 150, 166, 16, 227, 163, 91, 20, 245, 107, 230, 179, 226, 183, 25, 110, 51, 206, 61, 58, 219, 71, 212, 61, 6, 226, 243, 57, 137, 224, 8, 31, 48, 115, 127, 225, 157, 154, 92, 251, 251, 18, 113, 209, 8, 132, 123, 136, 248, 44, 137, 15, 208, 199, 99, 115, 216, 61, 14, 49, 36, 2, 220, 187, 78, 118, 211, 50, 7, 201, 48, 164, 151, 55, 210, 236, 193, 41, 60, 0, 53, 29, 65, 82, 245, 226, 33, 18, 71, 160, 31, 198, 175, 93, 219, 54, 180, 118, 93, 5, 130, 32, 162, 100, 24, 174, 71, 41, 18, 187, 19, 168, 200, 138, 32, 127, 211, 91, 121, 174, 215, 183, 80, 134, 54, 108, 204, 100, 121, 25, 213, 0, 0, 87, 159, 161, 110, 230, 79, 187, 59, 241, 99, 219, 16, 57, 237, 254, 172, 49, 164, 246, 165, 144, 223, 38, 38, 216, 41, 109, 47, 186, 124, 33, 192, 212, 116, 42, 56, 237, 146, 124, 236, 70, 180, 56, 106, 136, 115, 100, 225, 68, 29, 204, 22, 173, 64, 63, 93, 80, 251, 226, 72, 152, 9, 216, 53, 90, 173, 217, 235, 32, 17, 225, 196, 169, 7, 87, 121, 178, 3, 24, 95, 169, 91, 142, 58, 153, 170, 221, 58, 232, 67, 201, 177, 146, 208, 28, 249, 116, 133, 120, 172, 95, 8, 184, 236, 140, 77, 72, 198, 40, 14, 69, 18, 145, 101, 196, 40, 32, 88, 221, 157, 234, 83, 1, 183, 249, 53, 1, 186, 71, 177, 210, 229, 132, 45, 137, 187, 135, 26, 140, 108, 245, 228, 84, 179, 46, 168, 41, 133, 163, 76, 29, 234, 171, 134, 230, 21, 34, 119, 127, 156, 29, 22, 181, 232, 125, 3, 136, 174, 25, 51, 38, 153, 231, 104, 108, 195, 43, 167, 138, 54, 185, 57, 192, 7, 98, 191, 69, 111, 246, 194, 232, 96, 252, 171, 174, 127, 133, 232, 125, 83, 132, 229, 4, 42, 20, 244, 109, 172], + [93, 153, 88, 255, 223, 147, 158, 101, 139, 107, 181, 51, 113, 239, 247, 225, 138, 135, 193, 31, 42, 169, 58, 222, 195, 103, 228, 233, 61, 219, 148, 183, 208, 117, 143, 161, 173, 151, 208, 105, 214, 133, 3, 201, 107, 139, 28, 75, 233, 180, 4, 36, 149, 12, 52, 151, 108, 114, 176, 54, 128, 191, 149, 14, 62, 112, 19, 88, 115, 93, 37, 240, 65, 240, 155, 133, 113, 100, 192, 9, 141, 156, 132, 160, 243, 73, 220, 40, 141, 105, 132, 208, 43, 62, 151, 230, 187, 242, 221, 194, 18, 137, 84, 65, 41, 173, 102, 251, 215, 71, 89, 133, 177, 179, 198, 152, 20, 144, 8, 125, 26, 166, 238, 163, 12, 209, 182, 169, 100, 81, 161, 249, 163, 123, 202, 105, 51, 80, 152, 152, 181, 195, 239, 184, 116, 53, 198, 86, 157, 129, 223, 151, 176, 88, 78, 4, 201, 120, 74, 30, 207, 66, 25, 125, 60, 107, 151, 61, 102, 46, 100, 144, 189, 181, 159, 141, 118, 38, 237, 9, 37, 154, 161, 101, 41, 28, 36, 206, 50, 4, 45, 34, 108, 235, 106, 114, 175, 154, 31, 147, 132, 47, 41, 228, 182, 197, 103, 185, 160, 165, 136, 239, 26, 154, 181, 79, 147, 234, 7, 16, 224, 114, 8, 159, 187, 103, 166, 28, 130, 133, 73, 246, 158, 160, 23, 156, 203, 210, 202, 174, 250, 236, 22, 31, 65, 240, 252, 187, 94, 180, 175, 165, 199, 216, 211, 104, 166, 26, 210, 48, 113, 36, 42, 218, 221, 142, 2, 58, 48, 148, 250, 243, 1, 36, 140, 64, 59, 7, 15, 192, 118, 177, 26, 199, 116, 128, 156, 69, 245, 252, 25, 104, 147, 250, 78, 188, 202, 197, 153, 149, 142, 44, 219, 116, 59, 11, 190, 90, 239, 50, 216, 140, 203, 88, 29, 99, 11, 150, 22, 206, 154, 216, 27, 149, 15, 48, 86, 227, 251, 55, 174, 215, 116, 170, 155, 47, 226, 156, 99, 204, 16, 25, 169, 150, 117, 61, 176, 237, 62, 51, 231, 246, 183, 223, 190, 1, 209, 82, 255, 28, 133, 22, 202, 164, 47, 218, 246, 148, 129, 99, 18, 113, 168, 248, 219, 116, 221, 24, 92, 186, 52, 150, 62, 81, 150, 115, 102, 197, 154, 164, 235, 215, 45, 246, 131, 210, 97, 249, 185, 25, 248, 29, 112, 64, 39, 232, 168, 135, 236, 84, 224, 213, 19, 93, 79, 234, 177, 108, 34, 139, 111, 13, 229, 24, 95, 188, 76, 248, 125, 106, 94, 251, 70, 166, 0, 224, 85, 12, 42, 47, 86, 72, 123, 206, 226, 122, 52, 119, 249, 22, 224, 179, 76, 125, 153, 196, 231, 53, 142, 145, 110, 147, 96, 222, 96, 203, 73, 79, 230, 253, 247, 216, 173, 126, 139, 233, 207, 137, 97, 74, 210, 212, 203, 200, 68, 90, 93, 70, 11, 18, 138, 140, 83, 204, 4, 161, 229, 11, 136, 22, 237, 189, 12, 204, 211, 152, 163, 241, 49, 135, 82, 7, 160, 23, 1, 240, 53, 61, 10, 223, 181, 0, 199, 146, 215, 47, 150, 36, 2, 128, 46, 83, 252, 47, 177, 24, 97, 7, 197, 209, 236, 220, 42, 230, 145, 128, 67, 31, 57, 89, 200, 158, 63, 115, 119, 201, 56, 15, 36, 146, 36, 35, 204, 142, 138, 131, 44, 76, 102, 27, 48, 79, 184, 249, 174, 59, 184, 133, 94, 105, 74, 187, 96, 104, 103, 192, 8, 201, 189, 142, 77, 122, 153, 187, 116, 187, 38, 15, 210, 175, 139, 50, 6, 31, 160, 37, 98, 156, 71, 167, 184, 89, 50, 198, 134, 67, 149, 31, 197, 19, 171, 192, 211, 67, 41, 41, 7, 201, 161, 242, 25, 106, 77, 116, 250, 86, 182, 196, 140, 172, 95, 13, 115, 28, 48, 175, 105, 163, 120, 43, 89, 15, 155, 97, 209, 166, 88, 115, 78, 229, 246, 141, 48, 37, 56, 26, 82, 11, 111, 65, 239, 113, 58, 176, 150, 247, 148, 242, 197, 255, 90, 174, 212, 237, 9, 241, 140, 55, 121, 210, 26, 210, 122, 35, 190, 242, 151, 207, 211, 192, 177, 10, 36, 78, 253, 190, 100, 29, 158, 70, 224, 3, 180, 159, 234, 205, 108, 53, 217, 9, 73, 57, 234, 220, 204, 224, 140, 205, 30, 56, 178, 131, 14, 255, 144, 15, 234, 50, 210, 63, 254, 33, 60, 167, 76, 116, 50, 129, 196, 44, 154, 232, 52, 236, 103, 29, 152, 229, 181, 236, 143, 126, 44, 175, 109, 0, 124, 40, 162, 6, 46, 174, 4, 66, 206, 213, 118, 120, 243, 122, 242, 34, 40, 176, 30, 108, 47, 22, 119, 214, 237, 174, 228, 143, 22, 35, 35, 103, 193, 234, 76, 98, 7, 0, 147, 167, 214, 213, 85, 164, 26, 63, 249, 6, 154, 77, 106, 2, 75, 185, 240, 52, 26, 217, 127, 203, 84, 73, 255, 45, 51, 84, 94, 178, 206, 20, 88, 1, 147, 93, 201, 32, 212, 69, 66, 156, 90, 15, 182, 62, 245, 32, 235, 161, 131, 19, 82, 183, 186, 2, 73, 172, 244, 219, 99, 162, 106, 164, 213, 194, 181, 102, 119, 145, 13, 231, 40, 129, 148, 121, 200, 131, 142, 98, 87, 0, 86, 214, 66, 148, 127, 139, 8, 31, 101, 135, 239, 159, 183, 191, 93, 103, 42, 88, 59, 249, 39, 74, 254, 223, 35, 52, 118, 151, 40, 48, 214, 20, 6, 120, 180, 193, 219, 233, 168, 184, 29, 105, 212, 203, 67, 145, 126, 236, 22, 172, 138, 72, 20, 110, 158, 90, 147, 175, 93, 102, 236, 93, 121, 209, 43, 173, 133, 240, 231, 49, 249, 117, 98, 20, 235, 247, 27, 247, 222, 5, 242, 242, 57, 9, 56, 115, 140, 187, 59, 46, 16, 251, 177, 80, 65, 193, 10, 74, 162, 117, 176, 104, 67, 237, 208, 111, 32, 141, 151, 143, 151, 132, 192, 62, 13, 247, 213, 229, 216, 155, 151, 211, 215, 19, 226, 232, 24, 108, 10, 219, 142, 244, 146, 244, 17, 140, 123, 239, 2, 127, 85, 244, 110, 126, 123, 32, 195, 36, 226, 84, 25, 202, 210, 230, 169, 228, 162, 34, 247, 132, 95, 212, 248, 131, 36, 198, 121, 56, 27, 131, 70, 22, 160, 136, 228, 137, 225, 52, 10, 131, 71, 78, 168, 33, 157, 116, 235, 123, 109, 196, 90, 96, 175, 168, 42, 39, 25, 10, 241, 85, 25, 188, 244, 25, 208, 151, 221, 66, 106, 38, 119, 74, 57, 142, 175, 89, 210, 81, 141, 195, 241, 4, 77, 55, 123, 214, 147, 158, 29, 28, 253, 128, 13, 140, 244, 228, 201, 233, 98, 152, 55, 124, 174, 236, 159, 139, 163, 212, 10, 23, 49, 250, 60, 2, 176, 232, 63, 129, 166, 115, 30, 148, 47, 23, 145, 166, 8, 29, 64, 11, 104, 255, 13, 219, 48, 165, 40, 37, 47, 58, 145, 217, 177, 1, 158, 35, 15, 198, 227, 24, 184, 78, 227, 7, 128, 6, 87, 255, 61, 14, 149, 228, 177, 238, 228, 27, 60, 190, 248, 155, 75, 11, 236, 16, 198, 86, 66, 21, 86, 185, 70, 42, 9, 168, 218, 63, 250, 154, 65, 58, 123, 81, 102, 91, 48, 128, 163, 147, 44, 222, 142, 85, 94, 131, 230, 82, 64, 88, 38, 141, 53, 108, 43, 245, 54, 206, 67, 230, 227, 133, 27, 25, 136, 132, 14, 96, 39, 10, 236, 47, 165, 178, 68, 122, 57, 16, 24, 10, 191, 24, 1, 105, 81, 95, 104, 77, 158, 181, 241, 178, 194, 49, 72, 88, 64, 160, 93, 16, 179, 182, 144, 44, 190, 38, 37, 78, 143, 22, 158, 148, 162, 155, 148, 98, 117, 189, 75, 144, 36, 136, 121, 59, 17, 101, 143, 152, 145, 207, 242, 189, 31, 243, 252, 106, 220, 37, 93, 177, 24, 150, 82, 48, 43, 56, 164, 252, 204, 186, 130, 192, 74, 87, 201, 170, 57, 248, 105, 245, 162, 28, 220, 36, 58, 17, 109, 45, 7, 205, 227, 202, 156, 76, 148, 42, 255, 180, 154, 80, 94, 102, 18, 165, 87, 34, 58, 101, 64, 77, 201, 129, 123, 42, 42, 168, 204, 253, 223, 171, 192, 22, 183, 67, 231, 103, 134, 83, 161, 214, 253, 86, 77, 161, 223, 90, 213, 54, 103, 211, 177, 174, 252, 131, 198, 60, 67, 27, 19, 18, 121, 13, 240, 109, 87, 11, 25, 160, 36, 241, 237, 239, 202, 150, 217, 246, 245, 61, 39, 230, 120, 181, 210, 143, 103, 163, 231, 63, 218, 109, 138, 117, 234, 248, 154, 158, 47, 200, 169, 35, 63, 113, 54, 134, 37, 107, 176, 199, 49, 136, 39, 210, 22, 191, 165, 76, 8, 219, 40, 227, 255, 249, 99, 119, 63, 202, 83, 162, 217, 6, 133, 34, 145, 0, 174, 1, 83, 100, 15, 118, 203, 211, 108, 124, 142, 68], + [71, 243, 24, 156, 48, 7, 206, 127, 94, 249, 114, 233, 171, 60, 169, 80, 83, 101, 79, 239, 86, 200, 3, 172, 128, 60, 167, 212, 74, 220, 218, 171, 20, 235, 233, 39, 86, 209, 123, 39, 245, 231, 205, 23, 85, 218, 146, 166, 43, 138, 211, 70, 126, 133, 250, 203, 247, 226, 168, 65, 64, 176, 106, 183, 110, 250, 54, 129, 203, 216, 39, 106, 230, 170, 40, 99, 141, 21, 203, 26, 42, 185, 188, 122, 33, 218, 181, 226, 122, 32, 23, 77, 193, 53, 194, 83, 47, 244, 185, 247, 146, 64, 240, 219, 158, 29, 9, 250, 237, 68, 145, 141, 213, 140, 199, 79, 184, 236, 40, 70, 62, 35, 16, 64, 92, 29, 171, 217, 65, 147, 128, 30, 230, 170, 105, 114, 161, 63, 180, 107, 54, 27, 69, 239, 18, 16, 179, 30, 106, 120, 221, 176, 154, 226, 168, 155, 29, 194, 204, 84, 252, 222, 243, 200, 137, 127, 147, 82, 112, 25, 235, 203, 104, 70, 233, 206, 47, 65, 247, 30, 117, 229, 173, 64, 120, 215, 179, 137, 214, 249, 153, 90, 55, 229, 148, 247, 239, 1, 246, 52, 149, 111, 6, 140, 122, 116, 135, 142, 51, 157, 216, 149, 85, 5, 105, 76, 92, 11, 126, 213, 237, 206, 31, 240, 37, 169, 36, 248, 38, 81, 254, 69, 188, 246, 193, 228, 0, 127, 63, 64, 71, 75, 77, 95, 56, 206, 18, 170, 253, 66, 27, 127, 102, 12, 84, 128, 234, 223, 2, 186, 234, 143, 183, 58, 157, 119, 2, 145, 180, 177, 247, 94, 117, 241, 156, 190, 145, 164, 193, 114, 56, 238, 135, 118, 22, 133, 190, 205, 169, 117, 98, 201, 66, 99, 9, 11, 53, 119, 205, 176, 100, 142, 132, 25, 122, 231, 6, 189, 81, 193, 115, 5, 80, 153, 136, 177, 226, 254, 159, 247, 121, 168, 230, 58, 208, 192, 123, 88, 6, 181, 238, 141, 51, 98, 14, 180, 205, 224, 147, 202, 124, 226, 224, 246, 139, 58, 217, 186, 103, 3, 37, 223, 176, 148, 58, 56, 250, 170, 168, 195, 236, 202, 243, 236, 223, 58, 251, 218, 46, 174, 76, 200, 12, 235, 3, 236, 243, 126, 112, 172, 161, 11, 88, 210, 251, 198, 243, 39, 20, 116, 25, 21, 41, 82, 92, 12, 34, 225, 200, 25, 189, 168, 127, 254, 228, 83, 42, 146, 103, 200, 17, 195, 7, 144, 145, 178, 102, 69, 42, 119, 38, 79, 247, 167, 164, 63, 113, 89, 214, 13, 214, 152, 194, 69, 103, 140, 143, 205, 125, 51, 172, 231, 139, 201, 24, 132, 90, 39, 211, 178, 102, 89, 205, 124, 122, 139, 87, 237, 226, 105, 112, 225, 20, 129, 102, 255, 229, 255, 40, 201, 176, 65, 111, 56, 93, 211, 27, 159, 69, 122, 249, 134, 10, 106, 50, 217, 247, 243, 130, 115, 33, 241, 80, 58, 85, 186, 94, 142, 204, 128, 56, 206, 18, 251, 218, 2, 221, 222, 130, 42, 156, 34, 21, 18, 208, 121, 252, 157, 88, 54, 117, 107, 26, 251, 129, 121, 241, 52, 9, 24, 211, 52, 253, 39, 20, 229, 5, 127, 240, 5, 223, 214, 216, 59, 133, 80, 193, 187, 7, 39, 237, 165, 13, 42, 79, 254, 215, 188, 145, 206, 64, 166, 8, 50, 46, 172, 180, 159, 29, 10, 168, 232, 154, 33, 151, 245, 83, 103, 93, 91, 243, 160, 10, 187, 143, 20, 255, 210, 165, 164, 61, 71, 240, 164, 48, 214, 182, 59, 146, 132, 108, 130, 199, 214, 187, 237, 225, 100, 130, 200, 162, 243, 79, 227, 240, 205, 111, 153, 75, 220, 216, 120, 11, 41, 6, 194, 29, 79, 6, 255, 240, 250, 56, 62, 251, 186, 84, 56, 27, 252, 32, 164, 20, 46, 195, 12, 136, 56, 244, 253, 167, 41, 179, 120, 200, 180, 173, 73, 175, 34, 149, 223, 75, 0, 169, 58, 168, 100, 178, 8, 127, 5, 108, 11, 224, 233, 239, 48, 71, 103, 208, 164, 87, 138, 21, 121, 70, 178, 56, 83, 64, 7, 211, 167, 63, 63, 6, 62, 188, 108, 65, 89, 143, 168, 38, 37, 47, 20, 225, 103, 235, 115, 217, 88, 70, 68, 156, 243, 17, 179, 35, 160, 255, 101, 227, 176, 52, 49, 167, 191, 81, 235, 169, 52, 106, 157, 127, 226, 172, 239, 14, 210, 14, 26, 170, 62, 69, 85, 23, 245, 89, 99, 143, 246, 101, 70, 252, 190, 90, 198, 92, 252, 232, 98, 98, 225, 167, 242, 78, 70, 26, 241, 19, 156, 37, 226, 135, 183, 49, 73, 121, 146, 4, 105, 191, 96, 147, 175, 32, 236, 18, 192, 105, 46, 242, 210, 84, 233, 11, 193, 101, 166, 236, 0, 75, 81, 129, 10, 194, 97, 236, 176, 94, 9, 97, 161, 67, 165, 1, 95, 242, 155, 14, 204, 150, 56, 99, 68, 228, 7, 30, 25, 195, 7, 120, 201, 1, 189, 61, 125, 51, 110, 218, 124, 206, 240, 127, 112, 60, 13, 103, 236, 131, 138, 147, 121, 9, 105, 193, 213, 159, 246, 229, 1, 106, 20, 177, 174, 216, 119, 128, 5, 160, 59, 103, 210, 33, 241, 86, 183, 247, 229, 162, 127, 120, 52, 253, 169, 63, 42, 157, 92, 148, 39, 78, 188, 133, 237, 29, 3, 198, 92, 67, 47, 229, 173, 128, 65, 183, 45, 206, 178, 234, 152, 157, 163, 112, 67, 67, 28, 186, 192, 177, 101, 54, 63, 58, 12, 122, 20, 157, 71, 119, 203, 36, 11, 9, 118, 81, 151, 156, 216, 47, 163, 153, 60, 71, 145, 81, 157, 240, 239, 22, 179, 213, 39, 59, 168, 188, 245, 145, 185, 93, 121, 183, 104, 49, 163, 128, 176, 140, 156, 187, 182, 165, 112, 210, 155, 96, 219, 106, 143, 184, 65, 204, 174, 78, 234, 112, 77, 182, 206, 207, 48, 61, 27, 189, 5, 23, 223, 37, 227, 30, 218, 123, 65, 220, 229, 118, 117, 86, 43, 217, 26, 217, 144, 5, 206, 152, 9, 94, 45, 41, 219, 78, 231, 80, 48, 31, 142, 200, 143, 8, 9, 249, 185, 34, 97, 90, 236, 142, 123, 201, 99, 0, 47, 94, 212, 156, 112, 18, 104, 62, 92, 220, 14, 163, 71, 212, 185, 211, 0, 200, 243, 154, 188, 118, 102, 58, 235, 35, 68, 114, 169, 11, 117, 232, 190, 21, 94, 178, 152, 205, 196, 57, 176, 115, 123, 45, 9, 152, 32, 211, 67, 85, 48, 234, 103, 38, 56, 94, 36, 230, 187, 210, 224, 12, 140, 41, 203, 179, 102, 220, 119, 115, 244, 208, 133, 148, 158, 79, 127, 252, 45, 62, 111, 57, 186, 102, 58, 156, 6, 172, 175, 185, 213, 124, 167, 128, 64, 27, 76, 54, 168, 57, 1, 231, 231, 191, 77, 74, 22, 123, 217, 229, 253, 90, 240, 248, 55, 32, 229, 141, 55, 155, 203, 147, 79, 125, 214, 32, 249, 106, 99, 111, 221, 174, 95, 55, 13, 204, 140, 251, 98, 105, 214, 8, 47, 105, 240, 172, 241, 104, 117, 125, 133, 43, 204, 232, 12, 120, 102, 193, 136, 240, 76, 8, 45, 208, 92, 217, 195, 50, 229, 200, 210, 97, 168, 203, 179, 6, 142, 196, 24, 98, 13, 113, 203, 207, 230, 87, 179, 120, 170, 78, 151, 164, 202, 47, 83, 251, 224, 110, 238, 102, 111, 1, 56, 38, 203, 195, 92, 222, 26, 203, 58, 63, 234, 149, 69, 114, 159, 75, 217, 11, 32, 239, 62, 40, 150, 236, 17, 137, 57, 105, 171, 172, 4, 206, 27, 46, 35, 18, 89, 214, 157, 174, 108, 95, 162, 187, 255, 232, 185, 123, 38, 200, 32, 247, 222, 226, 129, 198, 101, 245, 165, 26, 4, 14, 118, 233, 152, 2, 0, 5, 116, 124, 161, 34, 71, 194, 233, 98, 66, 152, 125, 202, 92, 186, 185, 30, 66, 177, 36, 171, 124, 73, 243, 86, 201, 223, 147, 169, 73, 235, 86, 197, 9, 78, 193, 160, 191, 167, 106, 111, 49, 14, 119, 215, 29, 170, 135, 43, 159, 11, 80, 145, 143, 141, 191, 191, 151, 254, 220, 196, 128, 143, 211, 47, 35, 81, 49, 141, 151, 206, 150, 29, 23, 132, 133, 128, 145, 107, 216, 155, 55, 31, 99, 233, 213, 0, 38, 180, 76, 187, 132, 92, 99, 74, 202, 93, 126, 245, 2, 76, 208, 200, 214, 237, 172, 37, 251, 251, 84, 127, 137, 67, 200, 28, 93, 159, 14, 246, 82, 53, 53, 45, 135, 14, 35, 70, 35, 242, 166, 12, 33, 213, 150, 57, 170, 86, 35, 28, 218, 131, 172, 140, 27, 102, 227, 176, 114, 239, 7, 1, 33, 109, 64, 170, 200, 174, 49, 252, 135, 139, 0, 51, 247, 0, 137, 243, 165, 53, 110, 176, 115, 131, 184, 22, 209, 131, 62, 159, 187, 255, 255, 230, 183, 212, 88], + [75, 55, 159, 126, 177, 183, 44, 223, 28, 165, 193, 198, 170, 219, 212, 148, 2, 9, 154, 244, 50, 77, 176, 164, 82, 67, 61, 190, 181, 44, 136, 194, 69, 92, 16, 57, 223, 254, 253, 188, 109, 241, 173, 103, 22, 91, 158, 164, 161, 134, 144, 82, 43, 216, 29, 52, 124, 154, 98, 20, 152, 127, 43, 174, 218, 108, 84, 45, 23, 205, 111, 27, 237, 86, 209, 122, 225, 228, 226, 132, 132, 8, 15, 59, 201, 99, 186, 76, 126, 12, 248, 239, 210, 100, 229, 26, 204, 54, 36, 23, 17, 246, 17, 124, 139, 74, 229, 135, 55, 238, 235, 0, 67, 48, 205, 154, 81, 168, 220, 237, 63, 66, 190, 221, 92, 104, 77, 68, 153, 198, 177, 50, 252, 6, 38, 45, 156, 116, 58, 57, 187, 67, 141, 185, 212, 215, 248, 23, 157, 210, 29, 4, 232, 41, 103, 108, 227, 155, 138, 192, 179, 228, 63, 217, 214, 85, 50, 73, 125, 6, 203, 105, 70, 236, 43, 114, 175, 125, 91, 237, 200, 151, 17, 157, 66, 54, 157, 146, 237, 75, 61, 198, 44, 175, 186, 8, 38, 137, 126, 21, 36, 12, 71, 150, 219, 211, 90, 88, 187, 130, 18, 107, 204, 222, 129, 154, 172, 141, 15, 139, 121, 189, 125, 191, 174, 64, 39, 237, 43, 82, 56, 158, 195, 36, 194, 157, 180, 161, 185, 6, 179, 171, 76, 147, 182, 13, 109, 81, 149, 43, 237, 1, 123, 217, 198, 181, 234, 49, 157, 218, 99, 206, 203, 24, 28, 17, 43, 169, 7, 205, 151, 150, 110, 40, 213, 98, 244, 19, 4, 11, 77, 47, 136, 243, 34, 149, 179, 115, 66, 120, 227, 34, 20, 163, 255, 38, 205, 152, 51, 77, 21, 243, 192, 147, 238, 2, 122, 122, 75, 13, 82, 10, 59, 93, 45, 234, 44, 228, 102, 114, 240, 77, 247, 176, 212, 249, 205, 212, 219, 68, 9, 104, 91, 55, 237, 204, 17, 92, 183, 251, 8, 104, 126, 37, 22, 73, 231, 19, 79, 70, 122, 155, 35, 69, 7, 27, 141, 233, 38, 156, 28, 208, 59, 218, 151, 137, 187, 101, 34, 225, 53, 58, 210, 48, 76, 123, 251, 189, 158, 253, 82, 33, 168, 84, 240, 120, 59, 16, 184, 184, 228, 11, 130, 170, 231, 109, 242, 105, 39, 169, 198, 204, 95, 251, 146, 254, 226, 107, 58, 104, 87, 63, 204, 29, 105, 41, 165, 61, 245, 46, 98, 179, 56, 99, 33, 179, 137, 59, 239, 192, 141, 83, 1, 27, 180, 76, 176, 61, 255, 15, 211, 84, 117, 132, 168, 82, 145, 104, 16, 129, 196, 118, 176, 164, 46, 14, 112, 155, 84, 198, 5, 98, 118, 12, 138, 136, 255, 190, 27, 152, 51, 226, 29, 229, 18, 138, 127, 4, 163, 95, 188, 23, 102, 60, 148, 38, 112, 103, 132, 41, 135, 84, 171, 2, 94, 191, 57, 166, 188, 213, 211, 148, 202, 31, 177, 11, 162, 113, 127, 160, 132, 35, 177, 46, 99, 34, 219, 220, 135, 208, 187, 203, 198, 39, 249, 153, 149, 149, 12, 222, 206, 233, 218, 185, 136, 49, 8, 248, 11, 93, 196, 167, 125, 196, 139, 15, 245, 218, 116, 104, 235, 74, 121, 206, 129, 134, 182, 1, 101, 133, 151, 7, 235, 17, 93, 164, 168, 152, 244, 194, 59, 124, 70, 112, 64, 148, 170, 194, 57, 55, 176, 135, 148, 59, 46, 157, 202, 171, 114, 112, 179, 64, 181, 148, 219, 192, 250, 133, 111, 13, 96, 94, 134, 25, 17, 239, 179, 158, 64, 162, 162, 12, 97, 166, 103, 176, 89, 17, 163, 103, 20, 147, 183, 14, 216, 88, 217, 39, 79, 221, 181, 227, 58, 125, 235, 67, 77, 3, 3, 36, 56, 119, 163, 239, 188, 135, 230, 98, 25, 32, 15, 222, 40, 48, 69, 0, 22, 141, 208, 237, 59, 225, 206, 178, 57, 130, 15, 7, 33, 91, 181, 105, 67, 179, 30, 134, 251, 251, 7, 253, 226, 146, 112, 34, 127, 46, 39, 86, 116, 230, 32, 49, 211, 75, 33, 222, 56, 170, 222, 65, 59, 12, 179, 73, 35, 235, 44, 251, 50, 222, 4, 215, 141, 105, 1, 241, 244, 127, 6, 77, 225, 2, 123, 13, 225, 156, 40, 56, 26, 243, 147, 168, 250, 156, 60, 9, 205, 62, 226, 3, 3, 4, 243, 162, 222, 254, 38, 133, 160, 118, 141, 41, 36, 45, 143, 231, 161, 124, 221, 61, 79, 46, 213, 104, 17, 17, 108, 224, 137, 246, 158, 76, 99, 154, 185, 83, 46, 82, 1, 73, 190, 156, 132, 199, 44, 6, 90, 36, 148, 16, 24, 194, 20, 217, 122, 155, 130, 164, 185, 105, 167, 198, 240, 194, 251, 15, 247, 159, 119, 160, 197, 62, 62, 0, 166, 129, 190, 26, 95, 235, 240, 81, 70, 221, 115, 109, 17, 158, 247, 195, 10, 54, 99, 124, 230, 146, 250, 86, 35, 139, 111, 131, 48, 150, 85, 246, 216, 80, 121, 28, 95, 99, 255, 14, 120, 193, 236, 239, 236, 245, 19, 224, 190, 32, 192, 4, 117, 15, 222, 23, 26, 26, 79, 240, 213, 201, 115, 105, 157, 144, 155, 80, 26, 213, 60, 173, 213, 138, 86, 177, 236, 48, 90, 166, 202, 197, 179, 198, 27, 67, 70, 191, 229, 6, 10, 188, 225, 137, 229, 197, 170, 148, 97, 194, 212, 169, 109, 155, 53, 88, 96, 213, 233, 139, 214, 165, 51, 31, 102, 34, 202, 221, 148, 12, 145, 210, 78, 222, 232, 124, 163, 185, 198, 238, 78, 206, 160, 149, 190, 124, 53, 250, 105, 115, 252, 34, 11, 73, 32, 190, 18, 191, 149, 233, 133, 71, 40, 84, 71, 140, 159, 237, 53, 89, 185, 195, 212, 95, 175, 219, 9, 12, 218, 135, 151, 44, 78, 186, 102, 54, 93, 110, 88, 210, 1, 114, 141, 27, 40, 166, 77, 169, 255, 126, 131, 220, 69, 168, 197, 18, 85, 208, 183, 66, 0, 165, 255, 107, 217, 145, 53, 29, 73, 148, 32, 193, 112, 70, 215, 46, 76, 65, 243, 71, 164, 22, 4, 209, 11, 66, 204, 210, 40, 136, 166, 45, 221, 235, 187, 200, 29, 183, 251, 230, 154, 70, 178, 90, 5, 245, 201, 125, 219, 232, 168, 11, 220, 255, 132, 50, 72, 80, 252, 162, 224, 101, 134, 118, 87, 172, 62, 63, 159, 171, 13, 114, 214, 202, 145, 173, 74, 74, 228, 152, 74, 35, 22, 121, 196, 116, 59, 190, 210, 67, 138, 109, 63, 65, 124, 62, 158, 111, 167, 160, 24, 7, 198, 82, 233, 16, 110, 229, 32, 55, 185, 36, 158, 36, 11, 25, 66, 139, 6, 115, 82, 250, 154, 154, 12, 183, 52, 230, 157, 9, 8, 106, 197, 209, 54, 6, 37, 218, 154, 206, 199, 214, 244, 105, 117, 20, 202, 20, 234, 19, 187, 68, 89, 184, 66, 81, 227, 194, 63, 13, 5, 26, 0, 174, 106, 154, 87, 140, 207, 135, 147, 253, 159, 54, 244, 39, 34, 84, 25, 127, 49, 136, 17, 49, 0, 248, 241, 238, 186, 9, 77, 205, 119, 107, 217, 7, 229, 130, 186, 36, 190, 248, 128, 220, 157, 109, 28, 72, 157, 143, 120, 94, 168, 81, 70, 121, 255, 195, 218, 28, 243, 182, 128, 133, 19, 28, 255, 97, 177, 157, 219, 55, 193, 159, 151, 196, 105, 11, 150, 230, 225, 126, 225, 234, 242, 242, 190, 144, 121, 21, 4, 175, 90, 23, 153, 161, 132, 57, 116, 119, 141, 25, 217, 81, 160, 79, 160, 202, 98, 28, 129, 100, 182, 101, 17, 74, 18, 162, 97, 89, 125, 102, 6, 68, 48, 62, 206, 158, 35, 249, 64, 98, 207, 210, 200, 154, 28, 120, 250, 12, 184, 97, 254, 135, 119, 106, 69, 21, 30, 228, 188, 101, 55, 59, 134, 72, 157, 188, 139, 95, 86, 214, 63, 116, 100, 140, 171, 39, 43, 91, 138, 189, 75, 134, 245, 111, 111, 100, 146, 39, 205, 115, 207, 80, 38, 77, 100, 3, 144, 191, 5, 200, 254, 134, 1, 69, 120, 169, 128, 182, 147, 3, 19, 172, 164, 3, 55, 233, 63, 183, 201, 66, 83, 111, 72, 6, 134, 111, 95, 158, 184, 182, 16, 123, 191, 79, 65, 7, 99, 237, 80, 62, 84, 124, 187, 210, 192, 143, 55, 141, 98, 162, 174, 193, 254, 60, 86, 132, 123, 246, 23, 232, 59, 41, 151, 234, 9, 199, 181, 131, 95, 2, 27, 1, 196, 243, 170, 223, 5, 104, 125, 3, 12, 9, 235, 40, 178, 85, 164, 142, 35, 52, 153, 63, 182, 219, 22, 109, 54, 207, 23, 54, 28, 75, 124, 82, 75, 2, 162, 211, 35, 56, 89, 168, 237, 56, 15, 16, 187, 133, 56, 92, 33, 236, 179, 239, 205, 157, 68, 129, 68, 220, 160, 216, 239, 181], + [191, 215, 21, 214, 190, 38, 9, 162, 60, 55, 41, 92, 249, 38, 22, 84, 67, 167, 123, 38, 237, 254, 160, 10, 100, 3, 76, 87, 20, 252, 121, 230, 8, 225, 253, 146, 137, 151, 189, 207, 240, 89, 183, 154, 2, 78, 7, 234, 28, 1, 69, 8, 17, 173, 26, 193, 149, 77, 150, 222, 221, 70, 113, 244, 93, 152, 237, 228, 88, 124, 207, 194, 76, 156, 82, 235, 223, 248, 99, 112, 143, 208, 161, 60, 244, 242, 193, 233, 53, 128, 53, 114, 157, 222, 74, 220, 189, 204, 20, 253, 156, 239, 174, 188, 137, 105, 110, 185, 59, 106, 47, 179, 72, 89, 8, 214, 75, 238, 113, 176, 216, 40, 242, 150, 126, 18, 241, 202, 92, 12, 91, 154, 119, 90, 56, 34, 50, 227, 40, 76, 56, 180, 220, 45, 196, 99, 17, 81, 75, 89, 120, 25, 185, 24, 159, 38, 62, 151, 130, 136, 26, 42, 64, 230, 173, 136, 5, 154, 3, 215, 67, 177, 116, 200, 183, 179, 225, 244, 169, 149, 178, 100, 157, 10, 215, 85, 77, 142, 138, 9, 14, 154, 200, 46, 56, 202, 70, 1, 67, 232, 11, 40, 226, 102, 188, 163, 101, 122, 204, 92, 106, 73, 31, 21, 110, 46, 161, 176, 183, 61, 129, 168, 247, 203, 60, 38, 19, 85, 241, 44, 154, 57, 175, 217, 211, 67, 89, 198, 29, 207, 149, 35, 251, 112, 204, 58, 100, 66, 200, 122, 51, 92, 221, 91, 253, 73, 167, 183, 168, 115, 123, 151, 91, 91, 70, 39, 15, 0, 40, 199, 206, 215, 65, 151, 106, 165, 77, 84, 168, 241, 182, 168, 163, 227, 229, 37, 49, 155, 102, 89, 24, 100, 219, 49, 144, 20, 98, 78, 150, 34, 140, 145, 255, 195, 217, 243, 234, 86, 107, 125, 50, 69, 8, 152, 143, 179, 157, 247, 66, 110, 43, 10, 208, 138, 130, 193, 86, 54, 62, 45, 120, 124, 196, 107, 134, 229, 79, 192, 95, 87, 159, 145, 228, 71, 205, 22, 8, 132, 215, 204, 54, 82, 253, 212, 23, 84, 80, 225, 247, 97, 225, 229, 222, 16, 141, 137, 132, 216, 143, 145, 36, 21, 35, 127, 117, 10, 204, 212, 12, 16, 54, 248, 224, 190, 35, 34, 45, 206, 75, 229, 125, 143, 82, 148, 19, 160, 69, 31, 179, 135, 210, 189, 131, 185, 207, 12, 14, 122, 38, 85, 52, 90, 89, 127, 17, 150, 216, 85, 9, 16, 138, 154, 56, 201, 227, 136, 172, 40, 104, 57, 20, 234, 4, 98, 93, 86, 252, 64, 42, 209, 253, 215, 191, 238, 110, 156, 107, 114, 17, 202, 236, 220, 67, 64, 115, 180, 29, 119, 102, 223, 56, 192, 175, 4, 229, 140, 100, 255, 57, 255, 221, 233, 117, 48, 63, 25, 100, 103, 51, 219, 118, 238, 209, 86, 167, 1, 213, 150, 99, 23, 2, 12, 120, 195, 11, 218, 38, 152, 211, 140, 29, 75, 254, 108, 151, 88, 226, 92, 193, 205, 148, 188, 193, 130, 241, 174, 223, 61, 153, 44, 50, 155, 174, 41, 95, 100, 70, 189, 205, 65, 161, 139, 61, 218, 138, 139, 109, 123, 211, 230, 198, 91, 122, 75, 220, 246, 218, 175, 4, 99, 153, 32, 156, 43, 191, 161, 32, 219, 133, 244, 171, 198, 181, 136, 228, 6, 182, 131, 89, 124, 101, 214, 80, 35, 178, 245, 94, 253, 35, 61, 0, 136, 245, 94, 155, 151, 222, 74, 125, 249, 240, 133, 246, 41, 48, 255, 146, 134, 121, 163, 164, 252, 82, 177, 96, 77, 196, 123, 124, 124, 19, 128, 67, 24, 254, 245, 216, 65, 62, 8, 77, 197, 201, 250, 151, 61, 244, 17, 84, 190, 51, 21, 44, 184, 99, 134, 28, 172, 228, 174, 206, 225, 57, 12, 112, 28, 83, 238, 88, 162, 20, 12, 143, 47, 133, 48, 235, 164, 30, 235, 100, 170, 159, 34, 118, 95, 35, 57, 249, 176, 25, 37, 125, 10, 180, 168, 105, 161, 72, 49, 212, 112, 148, 228, 14, 221, 138, 30, 52, 99, 158, 154, 109, 190, 111, 214, 174, 62, 185, 181, 223, 247, 186, 187, 88, 204, 36, 182, 156, 224, 23, 111, 253, 31, 15, 31, 226, 128, 246, 4, 224, 202, 227, 160, 9, 177, 157, 56, 23, 24, 55, 213, 82, 191, 194, 33, 206, 249, 173, 240, 75, 92, 7, 163, 135, 8, 5, 201, 201, 184, 79, 66, 126, 159, 188, 224, 61, 86, 56, 71, 94, 52, 92, 38, 126, 154, 207, 143, 5, 113, 161, 204, 61, 68, 91, 41, 108, 58, 218, 110, 249, 176, 118, 48, 20, 43, 78, 53, 114, 221, 106, 13, 28, 18, 179, 132, 4, 100, 94, 171, 9, 246, 189, 122, 25, 61, 3, 141, 235, 224, 204, 185, 150, 182, 245, 200, 108, 179, 189, 8, 103, 208, 223, 4, 73, 176, 119, 211, 38, 182, 204, 135, 165, 170, 59, 147, 14, 63, 80, 107, 121, 200, 9, 224, 12, 58, 40, 225, 225, 73, 147, 131, 16, 174, 37, 138, 8, 233, 251, 4, 127, 76, 230, 41, 80, 211, 246, 17, 125, 136, 118, 125, 32, 235, 19, 201, 35, 241, 79, 233, 187, 247, 255, 3, 142, 63, 152, 84, 182, 107, 112, 159, 93, 28, 39, 101, 247, 104, 124, 206, 48, 81, 30, 172, 56, 158, 183, 29, 190, 116, 178, 66, 16, 85, 111, 222, 169, 216, 0, 208, 35, 162, 1, 104, 6, 139, 101, 103, 1, 53, 250, 124, 167, 115, 88, 200, 158, 45, 223, 139, 6, 64, 138, 82, 246, 100, 141, 71, 100, 85, 245, 31, 11, 235, 206, 79, 117, 156, 93, 47, 106, 154, 113, 37, 107, 156, 216, 97, 109, 37, 230, 138, 121, 237, 6, 95, 70, 7, 20, 92, 58, 37, 129, 200, 50, 251, 116, 237, 161, 30, 122, 239, 116, 20, 94, 34, 49, 46, 85, 6, 74, 73, 73, 12, 7, 48, 87, 144, 184, 109, 114, 94, 39, 140, 17, 10, 31, 187, 79, 75, 163, 24, 237, 214, 220, 105, 224, 220, 27, 146, 57, 108, 184, 77, 189, 11, 38, 19, 135, 207, 39, 79, 185, 55, 177, 108, 6, 16, 112, 64, 78, 129, 228, 157, 242, 51, 47, 239, 193, 87, 218, 116, 237, 46, 99, 197, 147, 95, 11, 202, 106, 73, 3, 185, 138, 147, 25, 225, 185, 73, 200, 118, 155, 241, 211, 16, 15, 38, 240, 183, 142, 83, 156, 20, 200, 79, 197, 51, 71, 42, 96, 116, 136, 137, 47, 98, 234, 26, 254, 47, 173, 2, 244, 201, 100, 42, 149, 237, 209, 205, 8, 144, 9, 243, 171, 69, 130, 27, 177, 60, 25, 7, 93, 197, 162, 225, 18, 250, 114, 253, 95, 62, 5, 218, 60, 21, 230, 31, 245, 129, 0, 60, 54, 211, 132, 53, 24, 68, 74, 179, 237, 21, 227, 236, 91, 166, 179, 10, 162, 57, 208, 23, 124, 214, 19, 251, 26, 105, 227, 92, 95, 87, 197, 67, 11, 8, 219, 253, 234, 184, 81, 127, 189, 228, 130, 18, 87, 129, 175, 172, 68, 207, 4, 146, 151, 242, 237, 155, 82, 237, 244, 40, 96, 45, 246, 14, 139, 46, 231, 163, 71, 80, 121, 55, 64, 238, 91, 89, 88, 94, 35, 138, 159, 14, 75, 19, 247, 154, 28, 234, 126, 174, 65, 25, 186, 78, 186, 44, 157, 55, 127, 17, 39, 143, 63, 33, 81, 152, 68, 25, 70, 140, 153, 240, 171, 113, 211, 78, 28, 129, 131, 78, 131, 160, 206, 124, 250, 4, 25, 143, 213, 38, 172, 7, 222, 180, 181, 226, 87, 241, 169, 134, 145, 76, 95, 241, 101, 231, 77, 0, 68, 209, 67, 160, 173, 158, 215, 10, 223, 54, 72, 211, 123, 252, 247, 125, 91, 247, 82, 112, 118, 20, 105, 23, 129, 164, 115, 245, 98, 151, 217, 94, 73, 39, 192, 184, 142, 153, 170, 219, 45, 29, 131, 155, 226, 200, 62, 79, 68, 15, 218, 2, 210, 77, 54, 17, 96, 205, 144, 0, 37, 77, 224, 149, 185, 183, 108, 108, 171, 71, 22, 34, 158, 37, 76, 231, 147, 190, 210, 55, 229, 158, 102, 162, 105, 133, 29, 223, 49, 55, 190, 187, 24, 146, 231, 28, 14, 117, 200, 85, 135, 17, 193, 30, 14, 194, 98, 199, 49, 150, 241, 43, 138, 198, 228, 72, 95, 223, 217, 100, 109, 182, 29, 78, 178, 112, 137, 247, 82, 97, 231, 171, 223, 74, 118, 153, 57, 85, 70, 210, 55, 21, 93, 183, 33, 100, 85, 195, 132, 171, 166, 3, 116, 211, 137, 255, 124, 216, 89, 43, 93, 154, 37, 85, 7, 93, 193, 158, 11, 125, 71, 74, 250, 160, 8, 89, 25, 118, 222, 10, 2, 56, 24, 211, 152, 43, 82, 185, 79, 153, 239, 45, 105, 232, 11, 90, 229, 214, 33, 94] + ], + "iv": null, + "key": [40, 49, 76, 76, 158, 217, 111, 1, 164, 114, 236, 72, 212, 87, 41, 21], + "modeOfOperation": "ctr", + "plaintext": [ + [34, 130, 138, 120, 153, 21, 109, 218, 172, 58, 94, 76, 249, 10, 27, 138, 33, 212, 182, 139, 166, 174, 218, 24, 206, 16, 242, 224, 13, 77, 190, 127, 201, 41, 115, 95, 119, 60, 141, 29, 212, 49, 13, 124, 206, 162, 100, 84, 208, 234, 51, 181, 82, 75, 39, 136, 220, 26, 208, 78, 248, 182, 249, 26, 142, 197, 18, 79, 75, 179, 222, 153, 203, 128, 163, 30, 112, 172, 113, 209, 248, 55, 17, 93, 238, 98, 95, 150, 64, 192, 202, 12, 51, 81, 221, 89, 86, 36, 142, 245, 17, 225, 131, 28, 134, 215, 192, 45, 131, 26, 250, 4, 152, 179, 163, 17, 181, 206, 161, 94, 24, 195, 41, 105, 185, 58, 100, 91, 93, 108, 118, 186, 98, 185, 44, 170, 9, 220, 173, 148, 147, 207, 90, 238, 23, 155, 64, 211, 135, 53, 169, 4, 111, 158, 129, 79, 157, 15, 114, 72, 159, 167, 166, 185, 228, 61, 187, 245, 216, 226, 155, 132, 227, 140, 193, 39, 83, 171, 153, 240, 173, 1, 147, 125, 251, 131, 13, 203, 253, 234, 230, 49, 102, 153, 28, 72, 152, 240, 26, 224, 38, 124, 194, 28, 129, 158, 175, 148, 50, 96, 144, 46, 191, 152, 75, 170, 120, 224, 215, 3, 3, 137, 175, 115, 76, 115, 112, 10, 147, 207, 24, 10, 207, 233, 107, 226, 34, 68, 188, 41, 34, 237, 239, 119, 149, 113, 108, 150, 121, 192, 255, 19, 203, 122, 99, 164, 252, 221, 49, 2, 58, 68, 113, 255, 123, 217, 29, 33, 120, 9, 157, 251, 180, 149, 66, 156, 201, 117, 51, 1, 108, 213, 232, 146, 120, 213, 106, 24, 21, 235, 94, 43, 200, 248, 223, 44, 190, 225, 234, 56, 94, 109, 191, 151, 89, 222, 208, 56, 65, 81, 102, 114, 125, 253, 56, 59, 239, 125, 196, 153, 139, 14, 7, 3, 141, 194, 15, 103, 191, 196, 69, 38, 23, 232, 189, 88, 162, 143, 232, 124, 124, 250, 167, 219, 56, 236, 1, 63, 89, 237, 174, 219, 155, 42, 86, 120, 231, 127, 201, 236, 62, 231, 137, 107, 37, 136, 248, 198, 237, 154, 243, 248, 27, 214, 109, 171, 179, 190, 248, 180, 224, 56, 46, 132, 218, 57, 164, 26, 38, 175, 197, 170, 230, 190, 152, 47, 39, 210, 186, 208, 146, 211, 249, 188, 84, 234, 107, 233, 14, 240, 49, 234, 62, 230, 80, 68, 64, 210, 240, 72, 187, 204, 87, 213, 55, 129, 193, 41, 212, 206, 205, 197, 138, 220, 181, 166, 123, 96, 253, 183, 128, 200, 250, 230, 249, 138, 99, 6, 67, 179, 184, 212, 2, 46, 220, 239, 183, 51, 38, 79, 99, 33, 222, 187, 222, 162, 195, 11, 146, 119, 82, 158, 87, 230, 185, 247, 145, 158, 117, 79, 240, 84, 207, 38, 17, 80, 134, 71, 68, 7, 207, 224, 250, 208, 113, 178, 95, 206, 138, 112, 188, 137, 124, 16, 72, 107, 249, 61, 31, 48, 48, 86, 199, 224, 204, 3, 81, 35, 192, 118, 113, 243, 10, 86, 197, 3, 253, 125, 136, 23, 232, 66, 187, 33, 161, 68, 203, 16, 86, 40, 207, 214, 113, 23, 190, 135, 252, 12, 83, 202, 83, 22, 166, 200, 136, 173, 207, 43, 42, 146, 239, 58, 209, 41, 59, 220, 101, 173, 205, 209, 172, 236, 119, 176, 201, 254, 143, 215, 3, 217, 152, 201, 105, 233, 96, 219, 170, 34, 66, 75, 96, 113, 74, 186, 62, 175, 70, 133, 21, 37, 93, 17, 16, 13, 126, 59, 134, 246, 6, 133, 70, 171, 207, 164, 143, 133, 214, 71, 91, 141, 59, 204, 140, 22, 242, 49, 192, 210, 3, 218, 244, 174, 3, 187, 99, 72, 187, 139, 186, 145, 159, 139, 81, 251, 152, 140, 96, 131, 160, 84, 240, 149, 176, 103, 57, 169, 212, 203, 100, 211, 142, 126, 180, 201, 82, 97, 25, 47, 194, 209, 204, 241, 28, 82, 254, 99, 215, 235, 249, 42, 250, 162, 172, 46, 23, 69, 0, 129, 208, 182, 160, 28, 186, 93, 211, 77, 121, 144, 76, 21, 107, 142, 37, 61, 31, 50, 227, 189, 75, 176, 89, 61, 169, 134, 83, 114, 213, 222, 144, 39, 97, 4, 107, 248, 4, 15, 15, 242, 145, 126, 211, 7, 90, 150, 146, 236, 231, 40, 166, 236, 151, 102, 200, 117, 255, 40, 253, 16, 253, 192, 76, 158, 21, 252, 125, 7, 69, 58, 137, 87, 229, 228, 203, 222, 112, 38, 15, 7, 182, 84, 193, 205, 144, 217, 19, 184, 211, 231, 179, 183, 200, 63, 155, 10, 148, 243, 214, 132, 188, 143, 230, 10, 32, 216, 41, 35, 217, 64, 49, 165, 88, 66, 207, 53, 247, 130, 117, 222, 146, 47, 101, 138, 90, 100, 79, 96, 74, 160, 204, 135, 164, 218, 38, 207, 224, 113, 123, 120, 217, 38, 84, 31, 79, 16, 109, 134, 122, 153, 97, 55, 55, 19, 2, 22, 149, 71, 161, 229, 98, 104, 64, 213, 245, 166, 138, 150, 151, 201, 185, 223, 62, 234, 27, 176, 102, 38, 250, 4, 155, 69, 83, 69, 239, 205, 8, 144, 22, 1, 157, 32, 227, 205, 138, 247, 230, 40, 165, 160, 126, 115, 222, 40, 153, 32, 186, 29, 203, 23, 227, 215, 134, 124, 183, 11, 99, 177, 198, 191, 115, 239, 17, 218, 80, 197, 1, 25, 239, 224, 210, 191, 156, 37, 103, 101, 66, 23, 150, 27, 226, 181, 235, 4, 122, 177, 59, 248, 93, 204, 150, 230, 4, 40, 71, 78, 243, 30, 252, 164, 72, 169, 195, 114, 91, 12, 168, 104, 72, 154, 77, 181, 65, 36, 173, 99, 87, 94, 114, 145, 107, 147, 13, 59, 193, 167, 125, 184, 82, 196, 230, 59, 211, 136, 78, 90, 160, 74, 68, 255, 80, 159, 149, 106, 246, 246, 233, 225, 60, 230, 66, 44, 101, 8, 95, 118, 85, 181, 93, 35, 69, 231, 253, 149, 247, 214, 64, 56, 117, 19, 144, 45, 216, 230, 215, 149, 249, 114, 134, 109, 185, 88, 124, 202, 156, 81, 138, 105, 110, 39, 145, 156, 155, 132, 188, 28, 137, 57, 183, 166, 213, 165, 65, 212, 74, 139, 97, 85, 142, 138, 220, 229, 66, 137, 127, 3, 234, 66, 59, 154, 200, 238, 140, 172, 211, 250, 15, 222, 156, 15, 40, 32, 78, 119, 78, 33, 107, 135, 135, 6, 66, 176, 211, 143, 153, 206, 98, 59, 168, 137, 225, 9, 43, 218, 209, 151, 105, 25, 215, 51, 10, 12, 253, 122, 67, 10, 76, 174, 145, 245, 41, 73, 0, 98, 255, 231, 99, 86, 200, 105, 101, 158, 112, 84, 134, 208, 206, 129, 128, 73, 183, 216, 123, 133, 193, 136, 33, 213, 8, 20, 5, 49, 60, 244, 192, 108, 143, 243, 94, 109, 99, 102, 127, 20, 97, 64, 197, 172, 17, 244, 86, 23, 116, 226, 84, 223, 31, 108, 11, 117, 41, 192, 223, 100, 134, 20, 93, 201, 83, 245, 87, 21, 109, 168, 189, 241, 109, 165, 89, 210, 85, 9, 35, 32, 54, 193, 18, 169, 252, 27, 134, 213, 21, 114, 24, 228, 247, 92, 250, 73, 33, 238, 85, 21, 231, 65, 10, 162, 123, 24, 100, 134, 70, 73, 109, 255, 222, 121, 217, 90, 98, 161, 212, 198, 154, 38, 2, 158, 233, 215, 166, 156, 135, 153, 149, 75, 101, 222, 128, 121, 88, 121, 196, 172, 203, 194, 197, 83, 111, 222, 24, 227, 101, 5, 17, 1, 124, 246, 222, 245, 127, 245, 114, 224, 116, 165, 112, 150, 142, 51, 133, 162, 11, 136, 106, 213, 21, 252, 91, 38, 161, 22, 209, 41, 173, 148, 72, 234, 132, 6, 94, 139, 48, 114, 12, 253, 164, 67, 113, 250, 110, 106, 255, 204, 152, 203, 145, 140, 17, 226, 69, 95, 35, 180, 102, 241, 161, 165, 197, 156, 144, 8, 1, 13, 120, 255, 180, 144, 157, 176, 23, 48, 84, 118, 40, 203, 135, 163, 37, 255, 179, 47, 203, 108, 188, 87, 32, 203, 230, 35, 156, 211, 210, 54, 62, 109, 215, 241, 35, 108, 50, 2, 39, 120, 9, 145, 147, 188, 200, 151, 84, 207, 168, 215, 245, 47, 245, 27, 36, 122, 214, 3, 206, 230, 53, 235, 64, 81, 41, 236, 139, 1, 3, 59, 183, 251, 203, 103, 144, 114, 6, 25, 129, 100, 150, 167, 122, 241, 42, 205, 248, 39, 94, 192, 236, 7, 18, 216, 228, 240, 134, 119, 140, 34, 113, 37, 135, 150, 89, 196, 191, 248, 86, 127, 207, 205, 197, 241, 170, 192, 237, 3, 125, 163, 76, 242, 121, 23, 11, 54, 6, 251, 251, 236, 198, 48, 19, 91, 170, 214, 226, 121, 137, 146, 177, 243, 105, 66, 49, 244, 246, 96, 35, 114, 35, 103, 89, 208, 184, 205, 222, 218], + [55, 138, 33, 227, 177, 221, 92, 79, 250, 191, 28, 146, 244, 202, 25, 3, 85, 176, 65, 154, 251, 113, 33, 62, 158, 134, 172, 117, 87, 73, 100, 171, 236, 99, 236, 73, 60, 117, 219, 146, 171, 173, 1, 236, 163, 78, 201, 119, 100, 53, 215, 194, 235, 176, 180, 199, 206, 126, 171, 162, 183, 4, 242, 29, 179, 64, 248, 29, 63, 195, 183, 9, 62, 190, 113, 145, 187, 252, 86, 12, 104, 191, 0, 166, 116, 212, 156, 209, 94, 149, 84, 109, 80, 218, 2, 108, 252, 229, 196, 75, 184, 248, 183, 212, 148, 112, 89, 192, 35, 25, 110, 230, 205, 22, 135, 115, 52, 117, 78, 143, 254, 83, 53, 221, 39, 24, 80, 79, 188, 138, 169, 225, 150, 72, 227, 81, 0, 68, 166, 214, 114, 135, 107, 214, 2, 221, 228, 11, 78, 32, 231, 91, 5, 101, 105, 151, 117, 114, 74, 4, 237, 221, 134, 83, 165, 224, 113, 41, 96, 75, 167, 94, 110, 74, 227, 34, 3, 221, 168, 38, 242, 22, 15, 46, 216, 27, 130, 100, 164, 216, 165, 1, 17, 7, 2, 253, 59, 148, 113, 197, 29, 41, 234, 208, 191, 89, 80, 198, 234, 137, 45, 201, 145, 250, 234, 169, 122, 36, 40, 148, 109, 28, 20, 140, 212, 214, 99, 106, 187, 82, 145, 99, 195, 101, 28, 27, 144, 180, 85, 235, 97, 160, 64, 173, 191, 198, 85, 82, 249, 9, 156, 132, 122, 133, 164, 158, 121, 144, 80, 162, 80, 48, 112, 158, 235, 103, 0, 146, 3, 93, 192, 241, 80, 57, 173, 249, 247, 77, 5, 65, 64, 79, 76, 194, 77, 93, 176, 84, 65, 76, 165, 241, 178, 232, 232, 234, 126, 134, 47, 132, 105, 92, 134, 24, 38, 9, 91, 232, 173, 7, 24, 253, 35, 191, 29, 250, 196, 24, 160, 160, 207, 39, 167, 18, 58, 59, 170, 241, 204, 168, 68, 97, 32, 218, 206, 147, 214, 127, 65, 197, 57, 77, 121, 141, 92, 46, 211, 227, 158, 133, 40, 255, 183, 190, 202, 70, 154, 31, 212, 121, 68, 243, 6, 85, 188, 181, 85, 62, 185, 192, 42, 73, 228, 60, 84, 101, 67, 9, 84, 62, 201, 147, 37, 116, 217, 45, 30, 190, 44, 217, 37, 106, 206, 75, 214, 136, 1, 181, 171, 74, 149, 103, 152, 12, 185, 169, 115, 45, 41, 111, 201, 125, 46, 52, 234, 213, 60, 116, 117, 54, 28, 201, 52, 13, 221, 44, 43, 13, 195, 78, 171, 206, 214, 60, 182, 70, 189, 239, 195, 66, 233, 103, 174, 21, 48, 29, 219, 225, 221, 207, 232, 13, 123, 247, 254, 227, 36, 127, 165, 150, 184, 73, 219, 234, 63, 225, 42, 195, 56, 23, 206, 234, 228, 60, 234, 100, 88, 142, 41, 199, 182, 120, 15, 102, 147, 226, 134, 174, 172, 100, 34, 227, 74, 122, 177, 251, 10, 195, 179, 61, 250, 209, 137, 52, 231, 157, 76, 41, 50, 145, 126, 191, 216, 164, 60, 204, 169, 67, 142, 197, 182, 38, 21, 176, 212, 221, 188, 98, 158, 215, 151, 133, 210, 75, 10, 236, 89, 215, 215, 128, 200, 184, 69, 223, 134, 106, 99, 65, 117, 234, 57, 164, 143, 134, 46, 215, 124, 151, 122, 105, 111, 186, 44, 24, 177, 133, 115, 122, 110, 107, 111, 154, 89, 60, 85, 160, 26, 69, 72, 166, 237, 159, 55, 181, 139, 171, 115, 71, 245, 68, 168, 64, 109, 23, 188, 162, 117, 4, 80, 15, 110, 168, 80, 63, 87, 22, 162, 45, 229, 211, 188, 219, 85, 158, 36, 37, 192, 55, 209, 42, 90, 186, 247, 118, 1, 240, 205, 30, 198, 170, 212, 165, 36, 200, 133, 246, 49, 21, 14, 152, 114, 170, 238, 127, 28, 214, 120, 48, 207, 59, 26, 155, 192, 62, 48, 99, 114, 28, 25, 179, 93, 14, 213, 104, 4, 157, 124, 238, 234, 97, 246, 3, 153, 255, 253, 33, 139, 48, 1, 175, 123, 235, 149, 61, 163, 205, 31, 177, 224, 210, 166, 52, 150, 43, 224, 243, 3, 193, 43, 148, 176, 62, 166, 75, 48, 231, 206, 102, 71, 165, 29, 165, 34, 77, 87, 163, 179, 196, 59, 60, 217, 196, 146, 133, 208, 234, 128, 205, 208, 225, 144, 27, 34, 157, 253, 38, 81, 116, 143, 250, 85, 8, 128, 86, 121, 253, 65, 125, 207, 106, 67, 16, 188, 254, 33, 73, 232, 128, 189, 102, 118, 150, 26, 162, 229, 181, 189, 26, 123, 113, 57, 63, 230, 105, 32, 156, 185, 194, 130, 143, 208, 219, 241, 205, 181, 133, 224, 67, 13, 154, 112, 48, 222, 107, 86, 178, 45, 225, 55, 169, 73, 224, 32, 252, 36, 77, 86, 171, 247, 135, 6, 93, 204, 143, 39, 90, 228, 28, 170, 65, 28, 183, 249, 159, 3, 14, 214, 163, 67, 206, 253, 92, 227, 172, 83, 230, 249, 137, 5, 85, 72, 155, 81, 233, 165, 168, 18, 63, 156, 36, 9, 150, 23, 39, 180, 187, 153, 147, 74, 39, 100, 241, 1, 185, 191, 223, 101, 230, 32, 182, 201, 84, 145, 174, 253, 53, 136, 49, 178, 22, 12, 48, 248, 100, 241, 158, 169, 145, 54, 95, 237, 126, 164, 188, 21, 94, 141, 136, 131, 185, 220, 131, 48, 91, 23, 73, 248, 89, 239, 231, 164, 223, 214, 204, 165, 87, 253, 60, 139, 194, 169, 175, 31, 32, 253, 102, 72, 48, 116, 52, 119, 80, 68, 129, 129, 212, 217, 219, 105, 144, 102, 105, 195, 121, 68, 234, 153, 4, 253, 89, 54, 131, 124, 147, 22, 23, 212, 83, 104, 74, 47, 156, 205, 207, 239, 142, 127, 244, 66, 42, 5, 74, 13, 137, 105, 199, 156, 55, 36, 25, 162, 87, 131, 66, 96, 218, 163, 113, 17, 165, 73, 115, 117, 138, 176, 120, 124, 228, 8, 243, 30, 206, 61, 179, 16, 207, 79, 235, 185, 148, 253, 212, 14, 132, 251, 107, 146, 237, 143, 34, 6, 127, 39, 8, 36, 60, 248, 115, 182, 89, 130, 93, 197, 235, 145, 15, 64, 235, 148, 137, 226, 77, 75, 80, 203, 26, 75, 4, 21, 80, 71, 85, 123, 4, 128, 209, 193, 132, 170, 19, 107, 254, 81, 17, 15, 54, 92, 125, 33, 186, 97, 149, 234, 137, 3, 71, 114, 69, 127, 95, 210, 20, 60, 229, 182, 89, 52, 106, 68, 197, 69, 150, 188, 75, 105, 137, 150, 156, 23, 50, 108, 3, 255, 179, 194, 232, 82, 248, 86, 72, 25, 54, 138, 214, 147, 37, 135, 236, 141, 64, 248, 214, 249, 155, 117, 163, 155, 113, 90, 107, 120, 57, 51, 179, 199, 192, 132, 97, 43, 33, 202, 190, 95, 178, 11, 213, 253, 163, 212, 168, 166, 240, 218, 232, 81, 156, 227, 77, 58, 148, 152, 180, 185, 54, 0, 119, 202, 38, 4, 140, 76, 135, 177, 251, 85, 172, 43, 134, 236, 71, 135, 64, 228, 18, 111, 153, 158, 22, 31, 203, 0, 180, 195, 125, 193, 84, 240, 69, 131, 159, 124, 144, 33, 136, 102, 246, 14, 195, 152, 71, 106, 209, 125, 135, 237, 131, 211, 156, 57, 215, 50, 176, 47, 47, 108, 170, 137, 11, 63, 249, 134, 234, 39, 53, 70, 236, 114, 193, 136, 124, 225, 128, 228, 177, 231, 163, 123, 180, 196, 19, 148, 96, 44, 186, 86, 111, 140, 117, 111, 112, 161, 85, 124, 90, 174, 119, 224, 99, 129, 212, 1, 239, 239, 21, 249, 169, 204, 243, 174, 165, 233, 226, 227, 98, 63, 167, 140, 239, 226, 54, 174, 64, 102, 159, 20, 87, 165, 103, 173, 141, 86, 87, 137, 183, 130, 133, 253, 223, 177, 202, 108, 228, 190, 163, 200, 109, 95, 51, 159, 124, 250, 105, 205, 57, 54, 134, 73, 1, 24, 176, 105, 133, 53, 213, 7, 224, 142, 78, 122, 221, 252, 122, 80, 125, 243, 117, 89, 141, 223, 255, 34, 10, 94, 137, 76, 7, 73, 168, 176, 144, 97, 226, 122, 248, 31, 174, 127, 12, 211, 47, 117, 67, 29, 72, 14, 207, 101, 24, 219, 49, 185, 19, 168, 214, 215, 15, 214, 178, 147, 128, 165, 248, 109, 171, 195, 159, 76, 200, 4, 209, 108, 98, 101, 235, 194, 6, 88, 93, 51, 116, 131, 118, 173, 187, 201, 105, 142, 124, 254, 132, 94, 14, 11, 122, 146, 9, 149, 234, 12, 59, 249, 135, 30, 208, 164, 147, 246, 231, 155, 87, 51, 112, 254, 139, 41, 221, 34, 174, 194, 67, 189, 33, 182, 199, 13, 86, 175, 205, 172, 139, 222, 36, 250, 113, 225, 76, 121, 12, 90, 6, 63, 214, 161, 241, 216, 62, 133, 23, 66, 151, 185, 110, 235, 48, 58, 128, 76, 210, 211, 95, 171, 104, 70, 173, 160, 225, 137, 111, 128, 185], + [188, 71, 130, 35, 137, 71, 222, 2, 209, 37, 178, 89, 1, 95, 221, 222, 189, 181, 184, 101, 168, 208, 80, 5, 249, 140, 162, 183, 188, 239, 12, 98, 15, 150, 31, 200, 101, 163, 230, 171, 125, 79, 223, 54, 141, 144, 126, 142, 174, 139, 100, 220, 139, 131, 56, 224, 38, 73, 85, 215, 192, 54, 171, 97, 184, 99, 126, 230, 227, 53, 185, 236, 111, 218, 27, 89, 193, 225, 1, 201, 94, 56, 2, 250, 238, 229, 207, 75, 108, 41, 58, 150, 245, 199, 88, 13, 178, 15, 44, 230, 141, 226, 21, 103, 110, 36, 59, 158, 191, 5, 92, 163, 144, 244, 210, 248, 113, 164, 65, 169, 93, 176, 184, 200, 214, 207, 185, 43, 192, 234, 37, 56, 18, 133, 150, 20, 178, 22, 20, 170, 209, 219, 137, 120, 181, 237, 172, 133, 7, 32, 30, 215, 34, 171, 253, 54, 237, 185, 111, 125, 230, 80, 53, 175, 180, 119, 33, 130, 19, 158, 180, 245, 39, 205, 21, 186, 48, 38, 144, 60, 52, 62, 139, 134, 235, 252, 162, 49, 215, 172, 41, 238, 65, 199, 123, 236, 31, 106, 117, 13, 48, 117, 134, 3, 123, 52, 123, 60, 151, 69, 248, 229, 233, 181, 150, 163, 135, 42, 109, 72, 55, 34, 8, 240, 77, 219, 75, 130, 109, 25, 147, 97, 228, 35, 189, 173, 189, 234, 34, 1, 244, 131, 17, 215, 139, 151, 26, 141, 221, 220, 44, 100, 15, 244, 238, 201, 65, 172, 219, 158, 47, 252, 145, 1, 141, 117, 212, 152, 134, 131, 157, 4, 238, 220, 171, 104, 137, 165, 7, 145, 33, 76, 182, 72, 221, 22, 229, 213, 38, 73, 201, 6, 223, 1, 174, 203, 110, 66, 201, 209, 50, 48, 126, 66, 106, 112, 167, 218, 231, 180, 155, 55, 16, 41, 253, 72, 114, 180, 41, 202, 105, 54, 200, 19, 63, 116, 154, 82, 199, 38, 34, 115, 46, 218, 52, 193, 176, 201, 75, 170, 166, 224, 19, 84, 3, 21, 160, 143, 165, 220, 71, 25, 250, 11, 77, 222, 180, 62, 54, 254, 239, 170, 164, 136, 73, 161, 19, 52, 47, 27, 26, 127, 80, 56, 38, 56, 135, 84, 127, 9, 244, 58, 16, 111, 166, 9, 203, 8, 230, 101, 113, 46, 255, 59, 196, 34, 161, 3, 243, 199, 158, 235, 47, 10, 18, 142, 17, 162, 8, 252, 96, 10, 247, 237, 184, 216, 194, 0, 147, 231, 184, 117, 98, 15, 67, 187, 69, 139, 209, 235, 223, 224, 164, 232, 129, 10, 232, 122, 85, 228, 247, 158, 117, 166, 234, 16, 238, 187, 246, 17, 12, 187, 152, 66, 71, 80, 5, 7, 203, 67, 250, 188, 228, 201, 39, 111, 184, 119, 42, 246, 138, 43, 123, 73, 115, 195, 72, 147, 167, 145, 173, 42, 83, 108, 103, 105, 155, 127, 53, 206, 233, 104, 51, 169, 68, 165, 227, 38, 215, 69, 212, 56, 141, 215, 182, 190, 106, 72, 65, 105, 239, 128, 8, 186, 25, 25, 194, 148, 117, 178, 210, 39, 99, 21, 109, 34, 226, 166, 106, 51, 153, 243, 52, 234, 7, 208, 121, 58, 27, 228, 159, 253, 22, 223, 232, 213, 50, 64, 148, 117, 109, 110, 223, 169, 175, 73, 54, 86, 209, 22, 213, 181, 86, 77, 173, 19, 46, 175, 155, 100, 21, 30, 114, 93, 153, 105, 123, 232, 17, 199, 151, 133, 185, 209, 170, 31, 211, 247, 200, 66, 159, 37, 196, 120, 181, 238, 121, 82, 192, 25, 216, 239, 248, 250, 21, 238, 252, 235, 7, 57, 54, 156, 211, 116, 159, 149, 19, 131, 244, 32, 220, 167, 5, 195, 192, 82, 33, 66, 34, 227, 57, 247, 213, 129, 250, 25, 186, 234, 134, 171, 90, 176, 46, 168, 134, 19, 165, 133, 172, 204, 78, 238, 12, 188, 216, 226, 123, 55, 32, 110, 213, 157, 219, 41, 119, 141, 174, 47, 230, 105, 169, 185, 233, 108, 195, 58, 0, 44, 15, 159, 72, 79, 255, 46, 92, 72, 85, 242, 4, 68, 5, 95, 90, 238, 153, 156, 132, 6, 230, 109, 201, 35, 156, 112, 195, 133, 173, 17, 110, 171, 99, 33, 121, 225, 181, 10, 182, 141, 171, 154, 89, 178, 233, 192, 5, 88, 124, 70, 76, 84, 57, 153, 184, 162, 210, 33, 99, 141, 132, 246, 220, 237, 172, 62, 155, 193, 92, 55, 93, 128, 120, 53, 232, 139, 76, 213, 3, 242, 215, 149, 35, 237, 98, 20, 99, 54, 223, 48, 159, 44, 251, 58, 5, 149, 87, 217, 75, 103, 23, 16, 212, 47, 243, 251, 223, 86, 90, 132, 131, 215, 138, 119, 59, 125, 184, 15, 185, 148, 121, 76, 88, 115, 93, 10, 59, 161, 125, 1, 9, 145, 221, 238, 230, 23, 235, 230, 14, 249, 179, 100, 204, 104, 193, 76, 240, 88, 218, 162, 160, 73, 82, 222, 241, 194, 16, 225, 238, 56, 10, 213, 128, 131, 49, 54, 85, 141, 132, 255, 205, 118, 24, 23, 89, 1, 245, 172, 48, 224, 17, 202, 126, 246, 224, 226, 38, 144, 100, 181, 89, 207, 130, 8, 69, 102, 181, 209, 51, 157, 224, 49, 142, 249, 6, 30, 155, 204, 52, 60, 14, 224, 3, 129, 159, 43, 203, 116, 28, 217, 251, 151, 75, 175, 223, 87, 181, 183, 206, 226, 47, 92, 114, 14, 92, 234, 173, 250, 186, 138, 154, 75, 31, 226, 134, 194, 129, 2, 204, 127, 134, 189, 67, 111, 152, 46, 19, 47, 146, 173, 24, 213, 86, 3, 11, 107, 177, 133, 63, 32, 5, 13, 156, 17, 7, 47, 151, 224, 2, 215, 229, 15, 32, 8, 56, 42, 105, 175, 206, 5, 104, 254, 255, 22, 101, 88, 214, 70, 58, 70, 17, 180, 209, 62, 211, 188, 124, 124, 231, 174, 59, 211, 170, 44, 181, 122, 199, 113, 52, 16, 3, 49, 255, 144, 245, 235, 55, 52, 26, 195, 78, 38, 63, 155, 16, 7, 57, 224, 143, 76, 172, 132, 77, 30, 220, 82, 94, 245, 235, 99, 201, 60, 88, 128, 79, 63, 102, 64, 212, 72, 50, 9, 70, 188, 12, 249, 239, 103, 17, 252, 103, 95, 50, 125, 174, 126, 28, 135, 94, 3, 72, 188, 60, 13, 99, 163, 222, 128, 2, 2, 181, 31, 176, 93, 241, 38, 6, 99, 136, 247, 174, 32, 104, 164, 63, 251, 156, 144, 253, 17, 203, 234, 139, 18, 51, 254, 220, 93, 199, 212, 21, 232, 160, 244, 246, 172, 150, 142, 202, 85, 182, 223, 204, 225, 155, 122, 204, 112, 252, 82, 81, 244, 32, 6, 229, 179, 32, 134, 65, 192, 218, 216, 248, 223, 152, 195, 228, 169, 195, 123, 129, 235, 76, 224, 192, 194, 59, 170, 207, 19, 77, 74, 70, 187, 14, 238, 186, 42, 230, 168, 37, 119, 70, 163, 173, 233, 116, 58, 38, 234, 28, 54, 13, 39, 60, 246, 140, 198, 43, 86, 253, 128, 165, 190, 80, 129, 30, 146, 125, 203, 26, 100, 119, 7, 127, 146, 141, 34, 38, 190, 33, 42, 252, 109, 245, 22, 48, 166, 106, 142, 59, 21, 32, 69, 68, 196, 216, 151, 41, 66, 18, 223, 71, 54, 97, 223, 237, 52, 224, 11, 65, 146, 28, 124, 24, 161, 114, 93, 24, 253, 50, 11, 10, 78, 37, 202, 90, 98, 161, 176, 157, 13, 131, 148, 22, 242, 34, 174, 123, 166, 136, 113, 254, 194, 133, 187, 183, 38, 8, 127, 211, 22, 188, 22, 247, 40, 177, 136, 214, 204, 217, 78, 169, 155, 185, 112, 81, 5, 123, 52, 74, 28, 168, 190, 36, 109, 210, 190, 65, 15, 1, 183, 73, 94, 4, 26, 226, 0, 246, 49, 147, 196, 111, 67, 99, 38, 90, 1, 175, 228, 216, 121, 160, 193, 178, 71, 253, 215, 187, 103, 213, 242, 241, 205, 108, 134, 40, 34, 128, 170, 141, 109, 31, 17, 251, 126, 162, 155, 31, 46, 69, 169, 237, 217, 235, 163, 114, 253, 224, 89, 46, 151, 252, 13, 224, 51, 146, 94, 65, 137, 115, 58, 222, 57, 51, 62, 101, 22, 32, 2, 179, 128, 158, 192, 190, 222, 153, 72, 239, 252, 206, 21, 89, 255, 183, 124, 23, 239, 121, 210, 148, 52, 8, 92, 160, 199, 153, 199, 149, 45, 151, 97, 41, 222, 130, 64, 69, 84, 81, 196, 196, 134, 243, 84, 7, 150, 223, 156, 159, 132, 33, 134, 91, 79, 11, 183, 178, 101, 215, 227, 143, 71, 231, 221, 40, 58, 55, 144, 13, 85, 51, 128, 168, 124, 194, 28, 5, 237, 129, 34, 118, 145, 116, 195, 115, 129, 202, 229, 132, 136, 37, 225, 147, 87, 157, 208, 106, 218, 238, 62, 111, 130, 251, 110, 66, 87, 56, 191, 113, 109, 41, 27, 98, 237, 228, 229, 149, 29, 43, 142, 220, 231], + [121, 143, 37, 218, 234, 144, 26, 5, 241, 181, 142, 254, 21, 9, 2, 248, 76, 56, 63, 143, 17, 189, 224, 170, 201, 179, 246, 208, 92, 30, 51, 21, 165, 43, 221, 102, 209, 67, 242, 93, 88, 209, 94, 141, 16, 194, 202, 186, 41, 67, 168, 102, 12, 107, 72, 213, 202, 220, 25, 229, 200, 241, 48, 32, 114, 29, 195, 229, 48, 154, 1, 30, 233, 155, 17, 7, 231, 80, 254, 157, 154, 162, 117, 116, 251, 54, 152, 78, 17, 63, 223, 209, 66, 25, 91, 73, 39, 202, 247, 46, 27, 170, 104, 17, 253, 120, 12, 198, 150, 60, 212, 242, 41, 144, 45, 49, 250, 1, 1, 81, 236, 255, 75, 99, 105, 162, 106, 147, 115, 152, 204, 2, 204, 26, 251, 82, 51, 63, 34, 249, 70, 34, 156, 113, 238, 27, 60, 90, 188, 247, 242, 175, 132, 62, 71, 81, 119, 12, 167, 32, 207, 129, 166, 189, 214, 203, 217, 186, 142, 98, 122, 237, 187, 11, 54, 172, 78, 204, 12, 152, 144, 63, 70, 176, 46, 170, 189, 186, 240, 255, 200, 182, 243, 198, 149, 137, 233, 83, 111, 85, 143, 228, 41, 41, 62, 195, 90, 34, 159, 104, 200, 203, 105, 28, 233, 118, 200, 161, 126, 88, 129, 202, 132, 214, 107, 218, 156, 188, 72, 121, 237, 251, 22, 75, 194, 113, 11, 249, 26, 173, 252, 123, 85, 17, 110, 193, 202, 8, 5, 194, 85, 255, 182, 104, 174, 52, 175, 138, 4, 192, 245, 160, 130, 119, 163, 226, 6, 178, 150, 123, 30, 61, 193, 250, 208, 200, 10, 113, 107, 16, 124, 103, 203, 11, 208, 130, 149, 126, 66, 27, 151, 89, 32, 99, 138, 98, 32, 88, 185, 212, 179, 187, 179, 195, 204, 86, 187, 223, 211, 34, 90, 254, 201, 51, 224, 219, 72, 231, 86, 39, 116, 59, 66, 159, 209, 101, 29, 188, 107, 232, 186, 206, 133, 209, 12, 63, 229, 246, 162, 9, 101, 183, 228, 53, 1, 56, 69, 228, 27, 75, 148, 15, 46, 163, 141, 123, 143, 255, 181, 46, 156, 187, 252, 41, 137, 95, 177, 37, 153, 71, 209, 159, 12, 101, 76, 64, 190, 158, 222, 65, 141, 251, 184, 190, 88, 97, 111, 150, 2, 144, 236, 10, 115, 188, 158, 69, 184, 92, 48, 222, 9, 107, 141, 202, 128, 198, 149, 149, 78, 157, 236, 58, 145, 115, 6, 13, 122, 207, 64, 120, 24, 227, 98, 248, 101, 129, 115, 51, 212, 141, 33, 17, 176, 193, 162, 138, 135, 148, 241, 57, 61, 54, 202, 51, 239, 68, 124, 210, 150, 224, 103, 19, 179, 147, 41, 166, 246, 245, 67, 55, 52, 12, 83, 123, 156, 62, 227, 36, 89, 184, 13, 70, 209, 248, 254, 34, 125, 105, 219, 113, 5, 87, 42, 6, 154, 155, 177, 63, 135, 48, 121, 252, 164, 71, 236, 158, 24, 120, 220, 64, 75, 231, 97, 16, 62, 101, 131, 18, 209, 7, 124, 13, 17, 246, 141, 177, 105, 249, 175, 14, 99, 91, 30, 52, 237, 177, 183, 244, 153, 143, 173, 149, 131, 39, 164, 65, 77, 42, 203, 108, 229, 205, 0, 55, 236, 78, 175, 112, 153, 79, 152, 7, 218, 226, 33, 61, 204, 16, 116, 172, 107, 182, 139, 44, 117, 164, 32, 179, 138, 116, 211, 143, 187, 238, 95, 19, 7, 178, 245, 145, 109, 20, 6, 156, 25, 155, 32, 106, 92, 7, 102, 235, 116, 36, 150, 117, 239, 109, 157, 84, 28, 177, 212, 137, 70, 152, 43, 30, 222, 86, 118, 82, 117, 101, 106, 146, 171, 208, 205, 32, 113, 111, 24, 51, 209, 159, 216, 128, 234, 233, 244, 1, 43, 105, 20, 201, 207, 183, 94, 204, 90, 222, 166, 101, 231, 67, 178, 226, 148, 174, 158, 156, 154, 241, 94, 47, 149, 81, 75, 165, 141, 247, 61, 239, 184, 182, 180, 62, 169, 209, 166, 179, 44, 180, 39, 103, 124, 252, 145, 101, 18, 146, 153, 86, 14, 219, 94, 144, 7, 57, 125, 9, 195, 97, 209, 231, 225, 70, 10, 130, 85, 2, 183, 77, 192, 78, 179, 12, 79, 80, 188, 154, 34, 118, 144, 148, 140, 216, 198, 58, 250, 139, 92, 208, 223, 124, 155, 255, 75, 226, 65, 46, 73, 5, 246, 237, 70, 93, 79, 4, 58, 66, 77, 22, 36, 108, 36, 200, 240, 163, 119, 2, 159, 3, 178, 72, 169, 41, 247, 13, 130, 197, 23, 90, 20, 207, 36, 241, 179, 105, 112, 206, 55, 213, 151, 13, 14, 229, 71, 239, 143, 68, 156, 142, 128, 78, 200, 14, 144, 106, 182, 134, 184, 220, 56, 83, 15, 108, 128, 219, 39, 32, 60, 27, 184, 219, 18, 39, 24, 70, 118, 60, 143, 134, 68, 119, 125, 225, 137, 21, 164, 164, 229, 155, 136, 187, 82, 22, 152, 156, 46, 9, 225, 225, 146, 38, 167, 189, 16, 54, 192, 23, 219, 29, 111, 33, 186, 60, 69, 72, 5, 114, 136, 45, 49, 3, 142, 141, 190, 196, 229, 186, 249, 214, 20, 84, 154, 21, 151, 117, 132, 247, 25, 239, 193, 35, 226, 24, 204, 193, 229, 23, 69, 179, 33, 182, 96, 13, 225, 176, 163, 152, 211, 84, 46, 228, 203, 181, 152, 15, 6, 51, 145, 108, 170, 235, 169, 99, 34, 203, 160, 243, 80, 128, 181, 237, 55, 185, 228, 25, 13, 99, 55, 148, 169, 183, 41, 145, 4, 238, 97, 169, 134, 246, 106, 94, 4, 88, 35, 223, 182, 95, 22, 124, 123, 37, 125, 80, 225, 15, 19, 169, 109, 118, 229, 212, 106, 93, 239, 233, 247, 49, 50, 133, 194, 160, 183, 249, 2, 124, 138, 111, 65, 11, 247, 93, 102, 55, 218, 243, 227, 151, 218, 4, 18, 65, 128, 194, 191, 131, 38, 248, 48, 141, 238, 51, 132, 104, 77, 15, 45, 142, 185, 100, 130, 44, 134, 187, 240, 231, 29, 10, 64, 180, 168, 40, 162, 139, 201, 236, 32, 52, 236, 29, 63, 208, 31, 218, 34, 161, 157, 97, 240, 2, 63, 152, 100, 207, 219, 217, 7, 55, 66, 6, 198, 142, 136, 28, 132, 233, 116, 236, 90, 246, 252, 158, 98, 122, 240, 125, 162, 216, 227, 32, 97, 39, 22, 52, 249, 43, 51, 241, 57, 85, 131, 216, 130, 12, 109, 127, 11, 27, 195, 4, 230, 45, 58, 193, 186, 109, 178, 0, 145, 192, 181, 34, 207, 38, 118, 1, 36, 240, 86, 8, 73, 208, 170, 215, 124, 11, 139, 48, 118, 171, 71, 122, 220, 101, 38, 186, 98, 123, 47, 175, 64, 32, 75, 67, 167, 171, 243, 191, 4, 22, 158, 4, 233, 172, 214, 186, 214, 48, 249, 84, 134, 109, 80, 177, 226, 238, 103, 60, 85, 168, 169, 250, 168, 215, 69, 99, 59, 128, 179, 187, 147, 71, 14, 163, 95, 79, 168, 0, 21, 87, 144, 108, 166, 29, 74, 179, 182, 52, 212, 34, 64, 204, 34, 241, 2, 217, 177, 74, 208, 243, 61, 182, 211, 80, 116, 165, 181, 211, 144, 174, 73, 54, 78, 168, 47, 205, 247, 92, 18, 6, 137, 10, 27, 79, 166, 207, 130, 112, 89, 225, 10, 163, 162, 213, 34, 236, 27, 210, 224, 110, 36, 142, 143, 99, 38, 58, 20, 43, 63, 66, 222, 250, 213, 81, 119, 204, 78, 134, 110, 108, 98, 191, 226, 170, 85, 50, 93, 158, 105, 212, 204, 170, 106, 55, 155, 56, 103, 176, 7, 114, 22, 18, 98, 68, 154, 238, 235, 106, 171, 151, 205, 251, 205, 188, 86, 22, 98, 193, 140, 135, 181, 5, 71, 31, 184, 168, 203, 73, 185, 77, 140, 94, 114, 78, 80, 24, 181, 217, 116, 246, 115, 253, 3, 153, 192, 133, 127, 172, 115, 81, 156, 166, 27, 76, 77, 174, 94, 136, 225, 244, 148, 28, 43, 133, 75, 102, 238, 188, 175, 201, 91, 42, 124, 127, 83, 55, 95, 74, 228, 182, 125, 213, 33, 82, 160, 176, 170, 178, 211, 42, 79, 74, 174, 135, 129, 48, 9, 122, 220, 253, 17, 9, 20, 99, 194, 27, 34, 17, 161, 233, 49, 203, 216, 180, 172, 138, 50, 205, 243, 200, 183, 16, 239, 74, 72, 56, 234, 84, 52, 127, 154, 29, 109, 202, 219, 69, 71, 104, 36, 246, 55, 227, 154, 86, 120, 6, 41, 178, 74, 163, 137, 12, 140, 193, 41, 10, 11, 105, 237, 40, 157, 212, 250, 18, 108, 57, 42, 172, 86, 6, 110, 227, 52, 169, 49, 171, 41, 105, 50, 60, 210, 203, 221, 1, 49, 198, 33, 139, 46, 103, 23, 127, 83, 155, 59, 221, 162, 1, 69, 255, 243, 2, 147, 141, 170, 28, 31, 101, 183, 166, 158, 168, 45, 3, 133, 74, 249, 245, 254, 240, 27, 206, 179, 99, 155, 247], + [137, 154, 29, 153, 94, 88, 214, 169, 254, 143, 5, 133, 242, 31, 86, 40, 100, 112, 196, 74, 32, 175, 243, 109, 108, 61, 44, 172, 248, 20, 38, 158, 74, 153, 160, 114, 191, 78, 220, 51, 137, 236, 70, 111, 195, 64, 47, 220, 199, 244, 89, 232, 16, 184, 227, 37, 70, 7, 127, 221, 137, 158, 173, 8, 121, 67, 172, 192, 15, 34, 179, 97, 59, 167, 20, 44, 206, 156, 128, 186, 229, 44, 172, 196, 141, 176, 31, 244, 220, 58, 218, 227, 31, 80, 96, 150, 177, 237, 59, 239, 72, 199, 24, 160, 79, 34, 186, 212, 12, 196, 241, 255, 191, 75, 93, 114, 98, 56, 56, 247, 225, 220, 75, 222, 110, 17, 58, 126, 156, 7, 208, 109, 109, 110, 230, 245, 172, 64, 225, 99, 244, 124, 55, 58, 247, 247, 84, 88, 89, 69, 7, 22, 253, 239, 74, 206, 142, 14, 126, 143, 174, 118, 220, 86, 246, 237, 0, 206, 98, 213, 75, 186, 116, 131, 179, 230, 21, 209, 4, 65, 150, 190, 250, 222, 24, 112, 6, 23, 127, 241, 168, 82, 208, 126, 184, 132, 115, 156, 154, 23, 10, 38, 183, 161, 238, 189, 248, 91, 234, 216, 175, 248, 112, 83, 150, 200, 67, 178, 145, 81, 95, 170, 199, 238, 230, 49, 142, 98, 175, 135, 209, 59, 68, 242, 207, 221, 10, 53, 96, 82, 211, 106, 223, 92, 157, 88, 204, 19, 28, 166, 120, 158, 92, 232, 39, 229, 230, 83, 16, 235, 232, 80, 126, 122, 19, 142, 123, 122, 85, 57, 39, 206, 187, 225, 242, 47, 93, 160, 32, 145, 109, 61, 128, 131, 50, 156, 110, 205, 98, 36, 48, 98, 11, 123, 164, 59, 213, 239, 182, 167, 145, 55, 223, 227, 236, 130, 200, 220, 185, 214, 174, 156, 69, 25, 159, 241, 51, 73, 110, 232, 242, 93, 198, 106, 112, 91, 6, 84, 177, 167, 166, 103, 89, 26, 37, 69, 177, 96, 124, 28, 237, 13, 244, 248, 201, 197, 134, 20, 185, 45, 195, 70, 202, 74, 157, 15, 33, 29, 222, 253, 53, 99, 249, 194, 137, 247, 230, 246, 102, 64, 238, 161, 37, 60, 119, 104, 44, 82, 51, 242, 4, 69, 36, 245, 186, 144, 232, 89, 222, 212, 208, 168, 52, 201, 191, 210, 115, 109, 130, 74, 118, 59, 171, 54, 127, 229, 33, 144, 107, 195, 242, 168, 104, 168, 217, 147, 115, 211, 26, 126, 39, 106, 119, 22, 12, 251, 114, 98, 21, 189, 208, 163, 15, 210, 180, 88, 152, 85, 91, 229, 126, 34, 177, 55, 2, 53, 54, 151, 57, 64, 41, 160, 37, 49, 82, 135, 219, 153, 227, 212, 85, 134, 235, 208, 220, 217, 179, 109, 118, 53, 106, 158, 116, 5, 163, 159, 66, 112, 79, 238, 75, 99, 192, 26, 178, 203, 47, 45, 37, 193, 206, 79, 16, 221, 98, 145, 124, 2, 99, 81, 178, 131, 76, 251, 5, 243, 189, 36, 206, 235, 199, 8, 198, 90, 223, 71, 73, 42, 184, 226, 189, 228, 92, 109, 76, 214, 58, 251, 241, 163, 176, 238, 160, 18, 170, 116, 82, 165, 168, 227, 205, 114, 111, 193, 175, 197, 157, 6, 194, 175, 214, 178, 73, 130, 10, 66, 199, 230, 184, 212, 167, 161, 67, 177, 116, 30, 171, 129, 154, 140, 216, 248, 52, 45, 209, 35, 236, 150, 89, 9, 103, 98, 147, 116, 42, 227, 13, 67, 77, 249, 206, 182, 65, 189, 55, 194, 189, 30, 57, 173, 160, 160, 243, 102, 205, 82, 196, 19, 51, 196, 135, 94, 233, 76, 150, 207, 178, 59, 14, 162, 47, 147, 153, 134, 9, 247, 12, 25, 22, 83, 68, 102, 82, 155, 222, 153, 2, 101, 116, 55, 54, 231, 89, 42, 159, 168, 229, 167, 16, 182, 221, 101, 36, 77, 17, 161, 212, 105, 154, 87, 206, 177, 193, 72, 208, 197, 66, 210, 97, 174, 59, 153, 103, 70, 249, 138, 117, 100, 211, 41, 13, 68, 227, 98, 19, 50, 75, 235, 60, 228, 82, 3, 112, 141, 81, 98, 197, 94, 1, 211, 189, 124, 175, 54, 183, 17, 62, 121, 175, 156, 74, 155, 41, 72, 177, 235, 69, 73, 17, 150, 52, 7, 14, 127, 51, 238, 179, 69, 65, 26, 235, 171, 32, 33, 19, 136, 226, 37, 214, 50, 154, 159, 165, 233, 154, 11, 137, 8, 99, 228, 104, 18, 191, 18, 60, 61, 152, 128, 189, 216, 220, 194, 151, 154, 231, 145, 153, 73, 41, 14, 29, 165, 102, 55, 253, 9, 235, 5, 28, 149, 153, 127, 173, 200, 224, 245, 49, 114, 206, 160, 13, 192, 249, 54, 186, 72, 98, 255, 222, 126, 122, 167, 221, 87, 45, 79, 84, 253, 217, 9, 71, 89, 148, 231, 162, 252, 46, 6, 78, 231, 250, 76, 46, 204, 23, 38, 29, 143, 142, 236, 115, 185, 63, 251, 40, 118, 173, 102, 160, 171, 9, 228, 152, 216, 136, 246, 204, 36, 221, 92, 206, 43, 22, 62, 215, 114, 105, 41, 35, 34, 62, 170, 36, 72, 110, 74, 47, 26, 109, 168, 111, 117, 105, 88, 216, 191, 55, 117, 2, 197, 206, 212, 191, 62, 123, 22, 187, 187, 123, 20, 117, 42, 41, 218, 8, 83, 76, 3, 43, 135, 235, 191, 70, 71, 145, 123, 114, 134, 175, 81, 16, 23, 37, 145, 246, 214, 23, 107, 21, 15, 138, 154, 154, 187, 152, 119, 176, 109, 15, 231, 173, 237, 248, 54, 28, 247, 241, 173, 219, 25, 205, 236, 196, 37, 168, 221, 226, 240, 60, 135, 62, 216, 37, 30, 143, 234, 224, 72, 211, 203, 178, 231, 27, 98, 238, 138, 183, 138, 103, 111, 181, 187, 39, 83, 8, 168, 93, 178, 167, 106, 66, 49, 34, 118, 144, 73, 242, 190, 170, 211, 41, 48, 103, 178, 64, 137, 229, 238, 188, 101, 121, 127, 168, 189, 195, 167, 158, 207, 78, 89, 142, 31, 6, 151, 231, 100, 130, 25, 119, 131, 18, 94, 20, 202, 82, 178, 242, 163, 15, 211, 55, 148, 164, 158, 17, 102, 203, 23, 100, 163, 84, 211, 208, 157, 113, 41, 32, 15, 181, 164, 158, 131, 106, 189, 202, 119, 208, 10, 128, 34, 85, 50, 190, 138, 12, 74, 61, 22, 110, 230, 4, 160, 204, 95, 170, 162, 245, 114, 209, 199, 8, 167, 118, 20, 21, 93, 19, 10, 210, 93, 19, 28, 34, 255, 40, 12, 120, 4, 63, 67, 121, 52, 34, 156, 141, 11, 172, 34, 57, 68, 7, 38, 230, 10, 148, 4, 247, 166, 122, 162, 159, 248, 41, 218, 245, 51, 61, 74, 52, 199, 152, 32, 224, 229, 254, 202, 214, 31, 188, 71, 234, 100, 151, 31, 213, 117, 102, 67, 216, 226, 168, 63, 135, 38, 182, 50, 255, 8, 171, 199, 154, 222, 48, 19, 194, 237, 169, 51, 211, 68, 93, 130, 218, 40, 81, 49, 38, 55, 133, 180, 180, 149, 140, 112, 73, 212, 128, 168, 165, 142, 9, 253, 15, 49, 107, 197, 131, 101, 64, 89, 79, 183, 227, 22, 204, 247, 168, 233, 148, 30, 221, 126, 237, 98, 110, 237, 229, 87, 134, 212, 238, 123, 86, 233, 49, 88, 92, 61, 91, 119, 117, 209, 147, 68, 65, 176, 12, 249, 241, 116, 255, 216, 173, 93, 63, 252, 186, 141, 249, 253, 245, 89, 117, 63, 145, 152, 142, 18, 49, 86, 118, 198, 12, 249, 237, 181, 91, 186, 120, 48, 99, 54, 218, 91, 114, 201, 197, 134, 131, 255, 10, 18, 82, 103, 136, 87, 188, 113, 115, 187, 123, 70, 31, 20, 186, 9, 71, 72, 209, 105, 148, 108, 244, 220, 156, 176, 176, 246, 243, 209, 69, 51, 151, 35, 232, 78, 130, 0, 74, 133, 78, 204, 80, 231, 248, 67, 5, 47, 59, 4, 111, 127, 47, 85, 61, 189, 151, 182, 218, 46, 120, 16, 156, 26, 23, 1, 7, 89, 250, 167, 22, 97, 175, 237, 54, 202, 104, 83, 105, 240, 203, 146, 147, 227, 73, 53, 0, 177, 68, 158, 105, 131, 140, 185, 246, 195, 34, 172, 98, 104, 115, 82, 133, 55, 48, 241, 68, 211, 80, 39, 150, 194, 81, 143, 28, 214, 71, 149, 63, 66, 243, 185, 197, 220, 245, 242, 60, 237, 56, 2, 60, 124, 245, 71, 134, 148, 137, 62, 15, 7, 35, 164, 186, 140, 143, 163, 127, 53, 29, 138, 86, 103, 109, 71, 51, 249, 19, 109, 148, 10, 170, 196, 65, 81, 178, 191, 184, 229, 184, 58, 27, 93, 253, 157, 56, 240, 170, 47, 126, 202, 221, 18, 145, 232, 152, 139, 142, 108, 59, 223, 117, 150, 23, 86, 21, 49, 52, 0, 122, 65, 160, 39, 1, 221, 200, 27, 245, 85, 6, 182, 255, 131, 27, 23, 49, 136, 34, 78, 88, 30], + [211, 44, 165, 87, 67, 114, 207, 234, 226, 243, 254, 55, 186, 89, 164, 4, 144, 234, 158, 190, 16, 25, 113, 246, 145, 29, 43, 247, 86, 162, 14, 112, 27, 164, 112, 77, 59, 11, 11, 98, 246, 56, 88, 56, 159, 102, 27, 48, 98, 246, 98, 39, 48, 202, 226, 20, 104, 106, 138, 36, 237, 26, 202, 161, 25, 168, 207, 207, 140, 37, 21, 157, 232, 216, 236, 56, 213, 138, 148, 82, 224, 71, 53, 154, 221, 68, 217, 37, 189, 23, 93, 191, 94, 128, 238, 149, 230, 183, 166, 111, 39, 225, 204, 91, 200, 138, 163, 149, 139, 215, 85, 134, 166, 135, 61, 82, 236, 29, 46, 189, 169, 205, 191, 188, 170, 160, 9, 4, 28, 37, 21, 162, 98, 164, 99, 18, 158, 34, 31, 156, 209, 136, 190, 117, 76, 225, 226, 193, 203, 234, 117, 112, 22, 51, 96, 178, 2, 160, 234, 58, 167, 47, 42, 145, 179, 160, 213, 232, 79, 136, 101, 136, 45, 83, 217, 102, 206, 2, 115, 122, 222, 96, 227, 226, 37, 158, 238, 183, 105, 160, 97, 93, 5, 195, 200, 131, 107, 205, 246, 92, 72, 47, 230, 223, 35, 59, 213, 198, 210, 174, 26, 70, 15, 189, 114, 156, 107, 223, 206, 160, 27, 212, 193, 198, 141, 238, 149, 232, 203, 121, 96, 205, 96, 31, 234, 71, 222, 101, 33, 101, 251, 232, 119, 169, 215, 40, 143, 155, 219, 158, 182, 92, 20, 93, 37, 155, 150, 220, 69, 239, 149, 209, 74, 56, 18, 229, 126, 56, 17, 67, 195, 109, 191, 16, 7, 122, 83, 235, 198, 165, 153, 160, 174, 115, 222, 149, 136, 50, 56, 97, 61, 78, 13, 11, 59, 165, 105, 202, 141, 113, 240, 63, 219, 195, 251, 104, 161, 24, 104, 92, 25, 185, 157, 8, 153, 231, 54, 97, 225, 212, 47, 222, 252, 188, 221, 247, 40, 3, 114, 186, 178, 4, 233, 181, 73, 252, 105, 70, 58, 171, 39, 18, 108, 176, 15, 9, 193, 33, 247, 159, 32, 228, 71, 132, 169, 66, 25, 38, 3, 211, 133, 76, 225, 56, 205, 219, 185, 228, 182, 52, 137, 152, 176, 224, 79, 206, 227, 125, 55, 216, 47, 140, 226, 172, 32, 1, 155, 105, 24, 113, 80, 31, 217, 222, 159, 88, 54, 115, 71, 226, 80, 50, 52, 17, 119, 163, 7, 188, 77, 152, 104, 15, 25, 12, 58, 77, 140, 103, 178, 169, 213, 7, 15, 27, 82, 227, 11, 255, 160, 139, 166, 237, 100, 139, 184, 132, 5, 111, 253, 100, 111, 200, 62, 13, 142, 64, 117, 172, 198, 172, 174, 187, 59, 233, 79, 232, 34, 180, 254, 50, 118, 107, 63, 103, 103, 191, 104, 133, 219, 106, 31, 151, 129, 11, 200, 94, 210, 13, 22, 54, 249, 204, 242, 120, 120, 133, 42, 159, 152, 217, 218, 188, 142, 52, 62, 75, 182, 209, 194, 124, 186, 146, 56, 164, 245, 69, 133, 253, 243, 171, 128, 92, 240, 96, 57, 92, 174, 45, 165, 196, 30, 190, 111, 8, 54, 146, 241, 40, 207, 182, 128, 50, 171, 234, 109, 234, 118, 240, 196, 90, 169, 51, 155, 240, 36, 238, 233, 98, 19, 229, 106, 174, 165, 22, 187, 230, 41, 232, 129, 130, 230, 225, 92, 121, 255, 2, 101, 74, 220, 127, 65, 113, 217, 223, 121, 47, 212, 219, 234, 188, 211, 195, 18, 198, 123, 1, 248, 57, 92, 90, 90, 52, 136, 113, 145, 205, 169, 122, 110, 124, 238, 162, 213, 181, 190, 237, 253, 128, 37, 206, 101, 86, 156, 194, 22, 83, 160, 108, 46, 191, 37, 232, 112, 220, 122, 128, 23, 154, 63, 35, 162, 213, 193, 135, 23, 135, 226, 105, 72, 13, 24, 75, 168, 72, 245, 84, 12, 175, 1, 146, 19, 37, 240, 208, 26, 127, 232, 15, 22, 124, 136, 159, 200, 32, 33, 55, 130, 107, 190, 78, 225, 208, 200, 120, 8, 132, 144, 102, 212, 165, 115, 73, 140, 7, 139, 197, 170, 50, 96, 195, 146, 112, 184, 29, 20, 76, 91, 157, 13, 222, 236, 12, 19, 177, 169, 64, 20, 214, 133, 106, 12, 51, 168, 179, 95, 40, 102, 58, 131, 65, 49, 198, 43, 91, 224, 243, 227, 25, 120, 68, 62, 233, 87, 208, 131, 120, 134, 213, 164, 96, 163, 239, 148, 131, 206, 243, 235, 49, 228, 209, 153, 66, 162, 225, 196, 34, 7, 128, 4, 106, 75, 65, 36, 198, 34, 172, 76, 102, 65, 160, 64, 155, 12, 197, 145, 9, 14, 139, 55, 15, 98, 101, 178, 148, 182, 23, 113, 8, 155, 152, 211, 25, 89, 116, 232, 46, 23, 145, 112, 94, 136, 179, 215, 198, 10, 114, 198, 200, 35, 103, 26, 42, 93, 54, 52, 108, 174, 6, 107, 188, 188, 236, 246, 99, 91, 172, 219, 38, 65, 216, 221, 112, 70, 172, 117, 220, 85, 41, 90, 141, 37, 65, 86, 230, 120, 231, 252, 77, 233, 15, 49, 195, 151, 71, 190, 213, 46, 254, 223, 10, 125, 119, 106, 51, 191, 24, 139, 234, 182, 111, 98, 164, 15, 194, 14, 49, 82, 166, 182, 159, 185, 13, 197, 134, 237, 242, 119, 143, 141, 54, 128, 243, 132, 120, 45, 219, 16, 7, 104, 142, 149, 55, 200, 231, 150, 95, 10, 179, 194, 239, 29, 84, 87, 214, 30, 221, 203, 201, 60, 117, 27, 228, 137, 4, 26, 74, 241, 180, 141, 110, 119, 241, 236, 24, 10, 146, 235, 33, 217, 94, 223, 8, 62, 171, 212, 1, 232, 158, 218, 210, 55, 228, 23, 220, 154, 177, 19, 58, 104, 26, 98, 21, 147, 62, 242, 39, 131, 254, 169, 68, 9, 216, 32, 84, 61, 226, 92, 80, 89, 204, 137, 251, 156, 26, 243, 54, 124, 250, 172, 215, 229, 120, 126, 37, 176, 51, 90, 137, 175, 39, 129, 26, 221, 96, 63, 133, 254, 140, 116, 109, 14, 127, 194, 155, 239, 231, 55, 225, 206, 79, 128, 239, 23, 0, 45, 41, 31, 60, 49, 4, 210, 120, 119, 190, 218, 248, 205, 43, 157, 112, 69, 114, 241, 105, 159, 185, 227, 39, 17, 6, 251, 120, 134, 253, 212, 4, 237, 45, 227, 218, 35, 82, 24, 52, 88, 22, 222, 88, 114, 184, 31, 201, 231, 98, 66, 32, 87, 180, 41, 199, 127, 178, 165, 75, 20, 97, 196, 166, 229, 184, 226, 142, 72, 187, 240, 212, 32, 29, 126, 232, 133, 115, 142, 115, 12, 8, 144, 213, 60, 90, 139, 65, 150, 108, 103, 63, 69, 228, 16, 18, 142, 92, 116, 136, 196, 161, 180, 165, 29, 227, 201, 51, 207, 102, 124, 229, 215, 232, 38, 175, 50, 209, 163, 214, 239, 142, 103, 114, 66, 87, 198, 32, 140, 243, 209, 188, 97, 21, 44, 150, 222, 251, 41, 112, 218, 163, 207, 13, 155, 52, 13, 153, 71, 202, 57, 237, 72, 109, 51, 177, 203, 146, 58, 115, 230, 76, 195, 92, 147, 138, 73, 153, 172, 153, 128, 154, 238, 63, 29, 91, 217, 201, 91, 45, 230, 27, 190, 152, 34, 84, 176, 143, 64, 217, 190, 0, 248, 236, 243, 213, 245, 106, 60, 8, 154, 98, 125, 70, 246, 202, 12, 114, 55, 144, 185, 28, 101, 125, 215, 131, 218, 229, 94, 207, 194, 51, 4, 184, 222, 189, 188, 204, 141, 2, 172, 215, 117, 124, 161, 194, 189, 134, 155, 6, 84, 94, 207, 114, 135, 229, 189, 202, 87, 155, 32, 178, 58, 22, 187, 110, 148, 18, 77, 13, 86, 139, 49, 180, 49, 86, 146, 201, 78, 143, 166, 41, 174, 227, 112, 181, 171, 104, 224, 203, 16, 196, 76, 160, 189, 173, 27, 166, 202, 7, 191, 207, 77, 130, 234, 76, 208, 250, 92, 75, 210, 92, 210, 3, 59, 33, 189, 152, 13, 37, 220, 71, 101, 82, 240, 100, 93, 167, 3, 37, 14, 90, 38, 160, 71, 153, 21, 195, 23, 45, 166, 114, 32, 195, 88, 219, 176, 191, 11, 52, 166, 50, 187, 192, 66, 48, 166, 6, 170, 198, 98, 113, 45, 247, 153, 220, 90, 148, 3, 104, 149, 161, 234, 175, 175, 23, 190, 93, 195, 149, 206, 221, 223, 48, 78, 14, 211, 206, 80, 2, 108, 56, 150, 66, 37, 142, 93, 62, 78, 184, 100, 74, 177, 97, 201, 20, 174, 121, 98, 106, 29, 168, 60, 221, 45, 163, 203, 97, 22, 162, 15, 209, 196, 169, 237, 4, 12, 14, 201, 149, 84, 38, 129, 196, 109, 101, 82, 195, 220, 236, 54, 146, 107, 200, 15, 156, 106, 42, 101, 172, 105, 202, 109, 71, 24, 184, 120, 140, 125, 197, 109, 115, 79, 51, 58, 233, 186, 137, 185, 174, 53, 135, 140, 99, 89, 56, 225, 141, 106, 183, 142, 197, 164, 53, 62, 237] + ], + "segmentSize": null + }, + { + "encrypted": [ + [55, 134, 60, 41, 123, 175, 232, 15, 232, 24, 237, 145, 91, 211, 155, 113, 13, 96, 7, 166, 220, 75, 73, 247, 135, 124, 182, 38, 174, 67, 121, 151, 144, 117, 71, 214, 181, 117, 10, 218, 192, 31, 231, 44, 4, 228, 11, 227, 197, 236, 47, 61, 239, 86, 164, 168, 136, 220, 36, 144, 153, 1, 100, 105, 12, 158, 247, 157, 205, 83, 94, 216, 208, 97, 126, 166, 205, 253, 141, 37, 182, 252, 202, 174, 90, 36, 223, 187, 47, 17, 83, 121, 235, 167, 28, 22, 117, 170, 152, 134, 31, 16, 192, 89, 244, 37, 175, 59, 251, 137, 141, 138, 159, 217, 96, 242, 54, 65, 55, 228, 245, 84, 56, 58, 151, 151, 35, 201, 4, 152, 170, 0, 172, 9, 197, 138, 191, 156, 210, 23, 71, 26, 156, 184, 32, 13, 214, 59, 23, 176, 253, 31, 120, 181, 91, 4, 119, 1, 172, 10, 190, 81, 170, 54, 114, 11, 74, 47, 225, 111, 135, 167, 158, 164, 57, 66, 34, 242, 150, 60, 79, 126, 117, 7, 19, 161, 117, 171, 235, 55, 38, 16, 189, 33, 18, 142, 54, 151, 203, 254, 47, 121, 65, 33, 160, 55, 98, 253, 221, 28, 26, 5, 188, 229, 202, 206, 98, 158, 50, 129, 210, 7, 246, 137, 137, 125, 68, 136, 60, 2, 49, 222, 88, 136, 156, 249, 151, 181, 225, 90, 222, 132, 81, 31, 80, 229, 148, 199, 22, 181, 182, 230, 117, 152, 108, 211, 111, 117, 77, 25, 203, 20, 181, 63, 1, 34, 164, 126, 107, 205, 227, 105, 81, 134, 160, 247, 122, 36, 135, 131, 231, 135, 244, 129, 246, 220, 139, 226, 184, 234, 22, 208, 127, 157, 41, 223, 145, 106, 52, 19, 92, 38, 214, 114, 228, 222, 0, 178, 214, 21, 197, 101, 229, 58, 210, 55, 108, 28, 243, 135, 95, 146, 211, 181, 39, 56, 42, 14, 112, 9, 180, 15, 211, 31, 73, 101, 239, 80, 55, 56, 154, 32, 203, 231, 205, 124, 139, 201, 223, 72, 236, 201, 215, 124, 189, 236, 179, 74, 90, 206, 53, 124, 172, 73, 200, 87, 92, 50, 67, 253, 79, 116, 245, 62, 52, 55, 127, 247, 12, 114, 197, 124, 9, 170, 23, 155, 115, 207, 19, 204, 65, 228, 245, 51, 189, 15, 80, 191, 150, 198, 231, 61, 173, 202, 84, 195, 41, 35, 35, 127, 151, 154, 205, 147, 38, 224, 158, 169, 1, 76, 30, 98, 103, 227, 89, 50, 219, 182, 131, 249, 137, 221, 153, 184, 208, 7, 169, 103, 131, 99, 191, 89, 124, 199, 158, 75, 252, 165, 94, 236, 132, 229, 107, 55, 37, 105, 24, 88, 73, 143, 27, 191, 91, 151, 1, 16, 50, 24, 237, 201, 192, 177, 4, 188, 151, 52, 118, 185, 255, 159, 220, 242, 153, 206, 146, 135, 219, 92, 100, 162, 163, 236, 33, 85, 85, 183, 2, 43, 238, 185, 50, 244, 182, 106, 44, 75, 54, 99, 65, 96, 74, 84, 182, 3, 60, 211, 75, 229, 0, 30, 26, 240, 137, 102, 159, 121, 2, 46, 147, 87, 179, 133, 226, 16, 242, 140, 111, 63, 29, 38, 199, 228, 86, 184, 67, 83, 180, 191, 139, 79, 116, 3, 221, 172, 180, 33, 80, 138, 157, 106, 204, 192, 124, 143, 123, 97, 50, 191, 225, 96, 84, 80, 15, 35, 64, 247, 123, 122, 148, 6, 212, 249, 245, 132, 158, 147, 58, 45, 208, 196, 175, 86, 103, 131, 58, 241, 202, 229, 129, 106, 72, 41, 124, 236, 232, 176, 57, 82, 87, 244, 218, 179, 122, 212, 232, 111, 49, 160, 130, 107, 125, 195, 80, 62, 222, 249, 108, 216, 150, 146, 194, 171, 58, 114, 54, 92, 39, 65, 249, 181, 50, 42, 90, 126, 41, 96, 186, 152, 52, 247, 168, 113, 159, 180, 160, 181, 75, 141, 152, 155, 221, 154, 180, 3, 57, 255, 75, 215, 53, 168, 170, 199, 164, 28, 0, 58, 176, 91, 187, 42, 129, 84, 11, 9, 168, 250, 43, 47, 140, 170, 97, 217, 82, 110, 235, 52, 137, 248, 48, 20, 155, 82, 196, 235, 189, 124, 187, 13, 246, 16, 169, 119, 93, 147, 146, 223, 21, 107, 88, 134, 89, 71, 178, 189, 193, 93, 192, 213, 168, 232, 213, 240, 60, 82, 50, 96, 165, 62, 184, 207, 232, 30, 200, 204, 104, 103, 213, 249, 193, 19, 245, 223, 255, 91, 68, 215, 5, 27, 79, 190, 165, 23, 73, 22, 36, 90, 160, 84, 154, 87, 210, 134, 197, 9, 228, 39, 121, 37, 104, 15, 157, 43, 242, 221, 140, 96, 28, 67, 137, 177, 213, 51, 18, 98, 0, 210, 133, 25, 33, 36, 56, 160, 125, 216, 131, 189, 51, 158, 153, 252, 1, 97, 18, 244, 104, 165, 3, 155, 196, 149, 44, 139, 70, 25, 36, 73, 162, 42, 185, 174, 6, 225, 38, 241, 79, 116, 67, 22, 161, 189, 108, 113, 62, 113, 233, 162, 226, 15, 234, 201, 151, 187, 232, 129, 30, 195, 185, 226, 107, 119, 0, 41, 242, 41, 223, 113, 31, 51, 166, 190, 68, 158, 53, 72, 173, 136, 35, 254, 175, 60, 109, 83, 251, 143, 29, 72, 232, 184, 150, 172, 128, 54, 67, 232, 96, 255, 72, 2, 175, 144, 249, 194, 5, 85, 205, 74, 153, 252, 150, 144, 45, 160, 109, 187, 140, 76, 134, 33, 171, 142, 42, 199, 28, 95, 212, 164, 136, 62, 176, 31, 81, 249, 165, 113, 76, 27, 162, 200, 68, 216, 27, 15, 211, 9, 55, 100, 18, 151, 167, 17, 73, 171, 171, 85, 118, 69, 7, 162, 77, 71, 96, 177, 164, 41, 188, 92, 100, 142, 243, 197, 222, 218, 45, 95, 108, 165, 202, 103, 246, 57, 245, 210, 154, 162, 142, 182, 18, 13, 124, 32, 245, 174, 96, 139, 177, 29, 143, 214, 135, 247, 117, 38, 243, 55, 97, 99, 227, 153, 213, 20, 20, 238, 76, 217, 145, 166, 90, 20, 232, 207, 0, 147, 6, 32, 20, 205, 174, 42, 219, 172, 13, 138, 197, 62, 116, 6, 142, 173, 19, 19, 54, 191, 184, 83, 73, 202, 188, 59, 139, 98, 136, 101, 77, 67, 218, 113, 103, 231, 17, 20, 137, 77, 21, 97, 72, 214, 206, 193, 26, 53, 52, 34, 198, 223, 61, 198, 127, 176, 216, 211, 235, 241, 17, 215, 113, 75, 230, 34, 89, 225, 76, 247, 163, 164, 183, 13, 210, 187, 42, 185, 208, 196, 220, 245, 157, 214, 172, 17, 171, 101, 137, 68, 5, 138, 55, 129, 224, 179, 30, 0, 110, 49, 66, 147, 17, 103, 49, 46, 41, 45, 187, 238, 187, 46, 174, 122, 96, 16, 199, 247, 41, 150, 238, 241, 237, 188, 42, 230, 202, 158, 162, 144, 77, 172, 191, 104, 61, 158, 173, 58, 180, 58, 133, 157, 118, 89, 131, 74, 45, 26, 3, 241, 151, 44, 18, 113, 100, 92, 72, 224, 55, 69, 1, 66, 246, 148, 241, 76, 188, 251, 109, 126, 9, 210, 81, 231, 112, 166, 122, 50, 149, 114, 239, 114, 28, 73, 1, 191, 233, 166, 140, 118, 182, 183, 83, 16, 4, 7, 174, 200, 233, 247, 73, 176, 249, 215, 66, 114, 55, 82, 254, 202, 173, 189, 130, 243, 196, 221, 93, 234, 116, 60, 109, 52, 29, 25, 10, 164, 237, 50, 82, 121, 194, 87, 212, 117, 183, 152, 136, 1, 252, 44, 139, 55, 50, 71, 171, 185, 94, 54, 207, 38, 94, 239, 163, 253, 170, 110, 174, 137, 43, 217, 253, 124, 12, 86, 246, 87, 85, 222, 81, 52, 10, 127, 248, 138, 106, 235, 145, 91, 46, 81, 180, 181, 99, 62, 29, 84, 213, 195, 42, 57, 158, 95, 215, 127, 74, 78, 149, 41, 201, 37, 150, 112, 154, 198, 90, 163, 130, 19, 96, 92, 49, 117, 198, 78, 187, 230, 243, 132, 129, 36, 10, 10, 62, 26, 36, 148, 163, 72, 157, 39, 192, 253, 153, 86, 221, 146, 19, 192, 123, 244, 76, 0, 187, 29, 155, 13, 55, 54, 86, 47, 106, 130, 154, 90, 71, 247, 224, 186, 230, 224, 121, 63, 118, 241, 127, 101, 80, 19, 97, 103, 145, 21, 188, 2, 72, 160, 64, 213, 8, 246, 39, 76, 201, 231, 240, 211, 198, 80, 231, 80, 165, 149, 22, 241, 229, 74, 146, 26, 25, 69, 174, 190, 14, 240, 82, 76, 131, 113, 0, 187, 19, 162, 193, 56, 209, 117, 84, 30, 13, 97, 151, 190, 116, 245, 15, 71, 128, 133, 105, 23, 115, 86, 126, 192, 109, 37, 254, 35, 32, 223, 248, 198, 152, 254, 255, 209, 181, 184, 177, 121, 103, 61, 236, 212, 169, 141, 172, 238, 6, 45, 28, 195, 191, 76, 73, 163, 53, 76, 84, 115, 209, 51, 83, 219, 125, 233, 103, 176, 8, 193, 50, 4, 136, 100, 140, 162, 69, 53, 76, 25, 234, 167, 165, 226, 172, 164, 205, 72, 11, 148, 154, 56, 71, 8, 6, 146, 40, 223, 17, 160, 41, 72, 95, 30, 10, 238, 88, 169, 24, 129, 110, 20, 254, 147, 232, 64, 236, 15, 254, 63, 99, 58, 30, 242, 47, 145, 162, 76, 142, 93, 117, 63, 14, 203, 182, 254, 120, 80, 215, 125, 104, 236, 63, 178, 209, 161, 94, 244, 28, 68, 210, 232, 37, 202, 137, 5, 188, 126, 138, 57, 90, 89, 158, 169, 110, 221, 147, 73, 253, 211, 234, 17, 212, 20, 61, 6, 45, 0, 220, 124, 101, 8, 128, 212, 119, 183, 38, 139, 110, 180, 47, 25, 209, 24, 211, 73, 114, 138, 23, 76, 43, 94, 126, 47, 250, 198, 179, 32, 80, 49, 160, 215, 178, 151, 178, 144, 164, 229, 41, 206, 126, 186, 140, 123, 95, 132, 243, 242, 27, 151, 74, 221, 188, 1, 197, 62, 52, 156, 4, 190, 250, 26, 76, 42, 152, 17, 76, 211, 19, 86, 148, 194, 156, 181, 64, 149, 210, 175, 208, 54, 107, 14, 27, 188, 100, 64, 208, 219, 146, 150, 196, 118, 145, 109, 234, 252, 248, 49, 12, 197, 69, 141, 89, 235, 188, 83, 166, 211, 22, 138, 36, 186, 115, 119, 72, 82, 43, 7, 8, 184, 169, 95, 152, 101, 177, 85, 171, 153, 14, 112, 77, 48, 83, 137, 71, 151, 185, 189, 146, 142, 147, 162, 179, 12, 195, 238, 168, 167, 53, 122, 174, 138, 114, 9, 254, 99, 79, 105, 13, 146, 215, 68, 139, 101, 81, 94, 250, 210, 7, 233, 127, 18, 199, 101, 182, 216, 109, 210, 134, 43, 47, 175, 60, 57, 14, 241, 86, 125, 218, 17, 1, 15, 104, 98, 115, 72, 203, 146, 254, 153, 218, 213, 20, 113, 120, 210, 202, 170, 16, 73, 191, 191, 62, 154, 97, 145, 72, 194, 8, 168, 68, 105, 52, 43, 234, 65, 134, 133, 37, 19, 147, 13, 66, 210, 20, 104, 35, 188, 11, 152, 70, 129, 139, 158, 65, 206, 189, 249, 69, 165, 190, 42, 57, 101, 231, 46, 131, 185, 102, 166, 15, 36, 82, 186, 194, 30, 53, 59, 138, 63, 124, 219, 139, 246, 150, 181, 26, 208, 148, 164, 132, 202, 90, 170, 184, 205, 148, 16, 245, 39, 173, 254, 194, 153, 66, 112, 215, 0, 215, 213, 91, 231, 191, 233, 108, 177, 148, 148, 97, 172, 233, 70, 178, 58, 91, 142, 46, 21, 165, 10, 141, 8, 177, 37, 174, 250, 81, 17, 114, 155, 141, 135, 232, 8, 117, 192, 199, 245, 19, 45, 95, 254, 127, 51, 50, 110, 198, 54, 54, 129, 77, 41, 190, 181, 205, 2, 7, 124, 196, 103, 88, 72, 6, 46, 65, 238, 184, 220, 207, 19, 157, 179, 17, 130, 2, 134, 215, 111, 94, 100, 38, 32, 152, 65, 212, 85, 0, 61, 102, 208, 178, 233, 216, 183, 43, 253, 244, 66, 223, 190, 72, 149, 237, 92, 7, 141, 48, 65, 99, 174, 114, 85, 126, 207, 34, 42, 177, 193, 255, 71, 124, 243, 101, 8, 117, 0, 52, 155, 174, 18, 46, 192, 26, 230, 62, 107, 212, 206, 187, 234, 220, 248, 158, 238, 86, 54, 219, 217, 14, 141, 83, 78, 44, 243, 52, 230, 250, 175, 11, 131, 250, 73, 198, 255, 117, 73, 197, 114, 142, 64, 21, 38, 47, 207, 204, 251, 213, 204, 134, 26, 113, 69, 159, 149, 219, 4, 80, 249, 197, 196, 31, 198, 186, 63, 24, 254, 182, 153, 193, 57, 14, 156, 86, 220, 207, 167, 156, 150, 213, 248, 79, 194, 19, 39, 155, 141, 142, 205, 248, 190, 109, 126, 165, 216, 150, 124, 109, 81, 213, 3, 78, 83, 76, 85, 83, 112, 181, 24, 62, 64, 3, 43, 88, 200, 198, 199, 92, 204, 230, 40, 140, 215, 46, 69, 244, 167, 253, 31, 91, 165, 119, 164, 229, 155, 107, 109, 136, 211, 108, 56, 182, 230, 115, 42, 208, 103, 122, 17, 166, 29, 190, 152, 161, 205, 205, 8, 28, 101, 161, 240, 35, 46, 244, 10, 56, 167, 152, 120, 134, 221, 133, 13, 71, 40, 179, 216, 156, 154, 24, 117, 169, 172, 145, 55, 178, 5, 36, 241, 174, 108, 75, 146, 141, 208, 205, 219, 192, 209, 85, 166, 3, 227, 152, 6, 250, 251, 163, 233, 180, 182, 87, 175, 6, 90, 52, 109, 234, 210, 51, 137, 17, 42, 103, 121, 78, 205, 33, 124, 113, 133, 85, 180, 26, 179, 255, 39, 8, 117, 186, 176, 118, 228, 219, 87, 234, 125, 194, 120, 26, 88, 21, 50, 231, 104, 16, 247, 132, 245, 153, 209, 182, 170, 25, 216, 142, 65, 135, 209, 231, 9, 97, 73, 35, 198, 212, 222, 218, 165, 242, 243, 218, 145, 175, 237, 134, 212, 86, 244, 34, 151, 51, 161, 47, 84, 36, 41, 28, 145, 23, 251, 125, 204, 185, 67, 217, 1, 212, 232, 171, 255, 186, 178, 114, 211, 69, 89, 145, 67, 187, 43, 189, 162, 87, 245, 70, 192, 181, 25, 211, 178, 9, 224, 41, 46, 250, 192, 132, 161, 134, 138, 109, 169, 207, 246, 140, 196, 147, 180, 120, 75, 150, 96, 24, 131, 152, 29, 6, 183, 66, 132, 202, 196, 157, 25, 192, 12, 191, 206, 11, 28, 119, 95, 225, 179, 181, 254, 251, 85, 212, 152, 34, 208, 84, 7, 76, 55, 24, 138, 151, 50, 96, 247, 129, 5, 230, 80, 129, 140, 163, 88, 30, 239, 107, 246, 253, 161, 73, 199, 85, 180, 123, 32, 138, 228, 163, 237, 159, 180, 115, 84, 155, 169, 193, 181, 73, 205, 198, 208, 167, 15, 95, 239, 33, 227, 92, 132, 253, 107, 224, 161, 108, 102, 218, 205, 192, 203, 28, 112, 23, 215, 120, 188, 247, 162, 202, 101, 221, 106, 223, 158, 240, 116, 84, 13, 187, 238, 223, 109, 164, 186, 115, 225, 108, 246, 54, 225, 181, 235, 141, 171, 91, 104, 100, 20, 151, 174, 241, 124, 165, 229, 47, 136, 80, 19, 31, 174, 202, 58, 59, 37, 130, 222, 160, 34, 158, 79, 223, 169, 19, 234, 203, 169, 155, 72, 249, 191, 78, 207, 89, 160, 211, 9, 160, 13, 178, 114, 124, 243, 241, 221, 141, 146, 146, 155, 65, 82, 155, 197, 96, 152, 4, 236, 58, 95, 164, 124, 76, 131, 99, 58, 135, 13, 240, 22, 63, 40, 82, 26, 177, 52, 120, 210, 5, 8, 222, 20, 224, 59, 253, 226, 81, 198, 194, 219, 139, 190, 153, 12, 50, 198, 154, 180, 54, 46, 66, 197, 18, 206, 231, 148, 109, 33, 7, 214, 197, 13, 146, 197, 137, 126, 147, 36, 244, 188, 166, 249, 23, 203, 91, 131, 133, 119, 125, 162, 242, 204, 111, 126, 72, 167, 223, 56, 127, 77, 205, 188, 155, 238, 102, 238, 9, 212, 212, 22, 232, 239, 11, 70, 207, 173, 55, 41, 44, 29, 201, 133, 235, 108, 204, 22, 25, 29, 39, 160, 144, 10, 20, 6, 57, 17, 137, 114, 186, 75, 93, 30, 23, 32, 226, 154, 239, 164, 3, 211, 154, 179, 71, 82, 167, 221, 187, 18, 175, 164, 167, 49, 12, 229, 77, 145, 137, 143, 122, 138, 252, 207, 233, 100, 148, 15, 254, 224, 107, 187, 182, 144, 105, 227, 59, 181, 162, 200, 176, 128, 237, 74, 229, 81, 150, 46, 11, 144, 38, 47, 37, 158, 237, 204, 118, 198, 29, 168, 207, 223, 75, 37, 32, 183, 39, 74, 56, 93, 74, 189, 85, 189, 115, 231, 245, 228, 76, 232, 117, 242, 166, 219, 154, 66, 96, 39, 119, 135, 201, 47, 122, 24, 21, 219, 27, 229, 64, 74, 40, 165, 28, 21, 212, 135, 230, 64, 10, 22, 187, 174, 38, 156, 152, 83, 54, 48, 23, 38, 53, 77, 22, 132, 74, 154, 163, 179, 236, 17, 103, 109, 202, 164, 248, 9, 129, 208, 6, 162, 41, 238, 18, 187, 71, 237, 27, 4, 142, 242, 243, 149, 73, 248, 155, 31, 194, 177, 182, 10, 123, 169, 83, 92, 214, 172, 166, 63, 141, 200, 207, 95, 109, 91, 200, 50, 213, 5, 174, 49, 232, 132, 106, 223, 31, 171, 56, 82, 12, 108, 9, 183, 27, 146, 135, 50, 239, 111, 206, 2, 195, 178, 137, 146, 215, 220, 28, 249, 84, 193, 70, 225, 230, 55, 221, 121, 84, 79, 117, 30, 231, 251, 225, 126, 61, 109, 201, 217, 203, 29, 204, 32, 40, 219, 123, 64, 88, 151, 234, 152, 198, 166, 129, 26, 220, 21, 150, 155, 175, 200, 5, 77, 230, 151, 49, 154, 94, 176, 134, 158, 153, 224, 219, 191, 148, 94, 120, 228, 64, 24, 139, 143, 197, 109, 110, 191, 112, 204, 195, 23, 249, 70, 68, 83, 166, 93, 122, 147, 68, 226, 226, 32, 198, 216, 220, 8, 159, 76, 77, 48, 103, 125, 36, 147, 92, 88, 195, 71, 202, 103, 69, 183, 44, 65, 62, 122, 246, 209, 37, 96, 226, 64, 51, 188, 26, 194, 38, 245, 232, 39, 246, 123, 230, 161, 90, 224, 90, 18, 43, 98, 204, 197, 179, 112, 218, 18, 208, 52, 143, 58, 252, 126, 241, 16, 83, 227, 37, 37, 228, 13, 161, 28, 246, 41, 164, 235, 85, 174, 78, 27, 219, 75, 50, 243, 191, 24, 205, 88, 240, 114, 212, 112, 15, 42, 4, 17, 229, 27, 190, 185, 3, 7, 154, 37, 225, 238, 122, 234, 43, 226, 195, 251, 147, 118, 189, 117, 171, 176, 125, 235, 10, 82, 203, 120, 142, 103, 77, 29, 176, 221, 188, 72, 160, 197, 105, 190, 196, 80, 69, 111, 194, 75, 243, 70, 178, 171, 122, 135, 189, 124, 187, 149, 80, 199, 4, 129, 14, 77, 178, 225, 115, 39, 182, 167, 194, 85, 222, 125, 118, 147, 253, 51, 208, 93, 60, 119, 75, 8, 251, 134, 124, 44, 254, 127, 84, 3, 94, 248, 143, 43, 22, 241, 14, 252, 184, 177, 80, 68, 79, 210, 0, 242, 252, 236, 193, 177, 100, 108, 123, 136, 53, 44, 82, 105, 174, 78, 217, 57, 222, 194, 183, 72, 98, 164, 136, 29, 166, 46, 50, 142, 51, 9, 122, 124, 123, 152, 18, 173, 77, 205, 29, 38, 98, 17, 52, 111, 216, 147, 94, 87, 72, 205, 6, 44, 31, 177, 169, 34, 225, 185, 48, 190, 214, 40, 96, 24, 246, 12, 19, 235, 129, 18, 100, 138, 27, 195, 1, 70, 183, 92, 94, 1, 40, 213, 98, 26, 61, 14, 63, 94, 214, 63, 252, 54, 211, 10, 143, 110, 155, 58, 144, 204, 20, 61, 92, 40, 117, 235, 194, 93, 63, 221, 13, 239, 179, 244, 236, 102, 19, 213, 190, 59, 28, 118, 229, 76, 14, 226, 251, 196, 61, 156, 7, 165, 195, 20, 233, 52, 216, 181, 28, 124, 113, 106, 44, 156, 158, 248, 130, 249, 40, 66, 176, 17, 30, 134, 65, 234, 19, 189, 98, 106, 49, 196, 186, 168, 233, 24, 176, 86, 211, 115, 236, 251, 35, 245, 124, 120, 72, 32, 254, 2, 65, 126, 203, 61, 149, 94, 5, 205, 71, 231, 80, 131, 77, 237, 238, 179, 205, 128, 190, 24, 149, 255, 77, 164, 99, 131, 193, 197, 43, 158, 231, 170, 149, 91, 114, 199, 126, 182, 190, 180, 180, 30, 202, 220, 67, 1, 68, 148, 202, 147, 140, 165, 63, 41, 121, 0, 141, 94, 164, 212, 192, 104, 48, 83, 101, 52, 195, 240, 53, 174, 241, 112, 197, 33, 41, 184, 125, 66, 166, 80, 224, 48, 23, 161, 143, 189, 70, 198, 144, 3, 6, 216, 164, 187, 33, 102, 31, 229, 128, 104, 36, 125, 234, 191, 68, 195, 8, 237, 43, 42, 24, 117, 58, 148, 229, 121, 173, 12, 34, 201, 138, 15, 4, 139, 220, 181, 70, 72, 130, 150, 250, 235, 16, 156, 96, 119, 50, 44, 44, 224, 116, 237, 226, 17, 170, 146, 86, 183, 182, 57, 178, 245, 82, 44, 254, 128, 22, 217, 197, 249, 181, 202, 0, 213, 41, 140, 203, 58, 34, 117, 237, 58, 76, 89, 91, 101, 52, 238, 95, 209, 14, 97, 184, 77, 35, 27, 107, 81, 42, 204, 109, 56, 119, 48, 42, 68, 127, 81, 176, 86, 110, 151, 229, 39, 5, 68, 249, 69, 241, 213, 34, 95, 194, 177, 232, 38, 173, 245, 193, 212, 128, 142, 248, 217, 91, 1, 51, 158, 57, 198, 40, 190, 56, 184, 65, 30, 177, 47, 110, 160, 177, 68, 9, 237, 212, 171, 255, 141, 207, 122, 145, 144, 245, 217, 6, 213, 103, 202, 216, 222, 199, 39, 134, 243, 255, 25, 151, 67, 248, 68, 81, 107, 116, 147, 46, 58, 168, 93, 202, 86, 231, 125, 35, 187, 183, 245, 142, 204, 91, 65, 5, 31, 252, 63, 242, 97, 84, 137, 151, 141, 32, 38, 79, 245, 144, 90, 181, 242, 130, 130, 17, 112, 77, 82, 215, 167, 49, 156, 15, 8, 1, 226, 240, 90, 216, 252, 251, 151, 173, 164, 28, 106, 139, 162, 141, 17, 121, 170, 40, 174, 89, 46, 239, 173, 107, 39, 186, 164, 106, 44, 51, 249, 117, 61, 205, 116, 57, 8, 106, 82, 54, 215, 40, 219, 125, 5, 152, 8, 162, 5, 14, 79, 76, 128, 142, 170, 222, 158, 58, 110, 215, 25, 68, 95, 188, 232, 111, 22, 16, 175, 64, 244, 233, 60, 9, 139, 109, 156, 211, 248, 252, 183, 100, 1, 231, 3, 236, 227, 80, 199, 103, 29, 175, 172, 230, 162, 45, 43, 218, 96, 184, 229, 218, 134, 103, 57, 30, 163, 144, 173, 155, 10, 152, 53, 139, 126, 189, 117, 72, 208, 115, 193, 212, 190, 117, 200, 92, 206, 121, 89, 106, 196, 153, 122, 237, 22, 117, 49, 168, 50, 105, 41, 249, 96, 18, 159, 215, 58, 198, 167, 191, 65, 224, 252, 130, 54, 14, 160, 134, 200, 208, 79, 50, 145, 159, 229, 126, 31, 18, 216, 246, 55, 52, 249, 101, 148, 3, 124, 207, 101, 254, 191, 152, 108, 149, 175, 227, 250, 116, 99, 105, 225, 122, 145, 8, 237, 64, 126, 188, 103, 3, 219, 237, 175, 129, 250, 62, 177, 161, 220, 80, 123, 208, 242, 87, 20, 27, 177, 230, 107, 215, 34, 6, 138, 61, 227, 157, 139, 210, 94, 103, 239, 250, 120, 201, 240, 80, 118, 187, 126, 48, 63, 224, 231, 104, 246, 78, 125, 166, 29, 148, 3, 55, 30, 47, 227, 114, 222, 110, 24, 171, 253, 109, 154, 233, 220, 243, 144, 138, 243, 91, 69, 80, 12, 37, 90, 5, 39, 156, 66, 156, 244, 31, 38, 67, 90, 108, 100, 204, 48, 0, 132, 70, 209, 15, 42, 109, 118, 9, 171, 123, 84, 110, 223, 236, 72, 164, 171, 90, 2, 228, 34, 88, 156, 15, 158, 3, 215, 252, 97, 142, 211, 235, 141, 116, 250, 137, 159, 121, 152, 211, 252, 226, 178, 144, 191, 117, 13, 67, 247, 226, 103, 57, 100, 68, 189, 141, 124, 120, 153, 248, 57, 105, 58, 243, 153, 21, 69, 187, 2, 16, 254, 155, 240, 157, 102, 78, 89, 155, 171, 89, 52, 26, 220, 175, 69, 112, 121, 36, 137, 237, 73, 132, 10, 64, 1, 54, 56, 232, 190, 171, 35, 199, 32, 45, 113, 206, 158, 35, 116, 107, 182, 52, 213, 55, 17, 90, 116, 110, 62, 237, 31, 55, 175, 165, 127, 23, 27, 213, 170, 219, 66, 233, 249, 91, 143, 181, 3, 175, 194, 205, 182, 215, 120, 29, 71, 109, 178, 144, 237, 47, 147, 121, 247, 138, 174, 199, 215, 115, 242, 220, 13, 3, 241, 62, 247, 220, 132, 145, 10, 211, 50, 201, 96, 226, 18, 249, 62, 254, 156, 221, 227, 18, 149, 240, 177, 75, 100, 40, 39, 55, 208, 218, 84, 70, 157, 134, 27, 172, 141, 187, 44, 178, 43, 43, 233, 175, 90, 64, 6, 96, 58, 205, 58, 73, 46, 161, 43, 80, 130, 219, 91, 204, 219, 32, 11, 47, 144, 9, 241, 149, 11, 95, 41, 224, 152, 88, 51, 105, 96, 237, 238, 43, 152, 177, 169, 162, 5, 248, 3, 57, 168, 91, 0, 10, 152, 108, 20, 205, 242, 125, 181, 197, 115, 74, 202, 22, 43, 87, 39, 154, 11, 7, 184, 72, 170, 17, 21, 66, 180, 192, 118, 109, 158, 21, 85, 38, 212, 8, 110, 233, 56, 197, 122, 189, 207, 79, 225, 119, 0, 117, 238, 123, 14, 9, 92, 1, 91, 53, 163, 154, 97, 109, 73, 227, 57, 122, 94, 78, 36, 182, 78, 173, 249, 115, 222, 235, 15, 22, 27, 38, 107, 226, 225, 154, 96, 96, 109, 161, 107, 165, 81, 192, 87, 65, 106, 94, 122, 158, 2, 206, 224, 235, 20, 169, 188, 217, 181, 7, 144, 7, 26, 219, 137, 238, 4, 233, 159, 103, 96, 204, 130, 15, 46, 80, 227, 114, 99, 53, 77, 119, 186, 42, 33, 130, 59, 177, 161, 24, 57, 207, 194, 176, 200, 232, 53, 35, 100, 118, 228, 147, 235, 186, 26, 221, 75, 44, 196, 92, 141, 121, 213, 47, 138, 215, 87, 69, 221, 106, 61, 164, 137, 207, 221, 186, 6, 97, 250, 124, 251, 254, 86, 18, 69, 102, 57, 83, 101, 126, 218, 31, 156, 174, 60, 16, 174, 209, 116, 103, 16, 78, 135, 12, 123, 66, 4, 242, 66, 125, 39, 23, 25, 215, 52, 136, 204, 231, 103, 27, 164, 213, 244, 254, 235, 210, 140, 106, 87, 228, 178, 88, 48, 113, 199, 95, 165, 234, 239, 243, 38, 19, 20, 169, 132, 48, 47, 181, 127, 9, 184, 178, 107, 244, 16, 82, 178, 44, 221, 192, 76, 178, 31, 189, 162, 43, 87, 225, 28, 67, 159, 139, 83, 104, 117, 81, 161, 90, 87, 45, 38, 233, 245, 17, 189, 142, 202, 171, 243, 204, 226, 35, 7, 78, 91, 42, 113, 252, 248, 238, 195, 80, 193, 190, 157, 192, 183, 194, 76, 5, 156, 134, 90, 146, 246, 162, 243, 66, 79, 187, 192, 0, 143, 157, 220, 117, 131, 219, 72, 107, 179, 147, 67, 96, 73, 222, 214, 156, 204, 166, 134, 46, 57, 230, 221, 23, 118, 217, 12, 144, 37, 112, 139, 223, 122, 57, 132, 215, 28, 223, 255, 155, 207, 249, 19, 66, 115, 216, 145, 225, 83, 133, 169, 245, 192, 138, 66, 56, 77, 54, 125, 62, 59, 234, 8, 102, 172, 145, 156, 221, 243, 238, 41, 13, 5, 98, 219, 21, 1, 120, 194, 185, 58, 245, 156, 184, 252, 21, 234, 210, 120, 138, 147, 231, 39, 108, 26, 60, 7, 7, 103, 221, 123, 109, 117, 246, 248, 183, 249, 77, 175, 212, 44, 176, 219, 137, 76, 141, 44, 184, 60, 27, 111, 166, 23, 247, 1, 73, 17, 114, 120, 203, 210, 94, 16, 246, 102, 68, 30, 199, 110, 237, 120, 154, 199, 177, 135, 182, 32, 229, 76, 193, 255, 102, 155, 237, 162, 99, 0, 53, 23, 8, 168, 156, 121, 242, 198, 253, 187, 0, 118, 254, 29, 26, 187, 170, 72, 74, 93, 11, 237, 191, 212, 53, 32, 82, 124, 57, 4, 37, 209, 127, 174, 33, 37, 216, 237, 198, 244, 74, 172, 249, 203, 92, 155, 214, 105, 191, 173, 47, 38, 69, 149, 47, 137, 49, 190, 242, 93, 28, 38, 25, 44, 41, 204, 252, 150, 104, 138, 8, 9, 239, 217, 166, 189, 205, 85, 83, 48, 7, 10, 106, 98, 104, 40, 177, 124, 17, 194, 214, 190, 216, 74, 161, 60, 91, 104, 116, 172, 160, 147, 227, 23, 116, 3, 178, 24, 94, 42, 186, 18, 150, 207, 134, 79, 113, 122, 184, 94, 6, 144, 190, 181, 199, 122, 8, 98, 89, 158, 240, 170, 105, 133, 38, 240, 87, 224, 226, 110, 202, 30, 212, 251, 233, 47, 246, 149, 17, 153, 19, 82, 17, 186, 166, 226, 167, 195, 60, 255, 26, 189, 187, 178, 157, 70, 254, 201, 146, 30, 211, 231, 69, 23, 147, 245, 175, 24, 74, 40, 7, 50, 7, 175, 11, 184, 184, 224, 244, 84, 143, 4, 193, 175, 105, 46, 37, 166, 171, 18, 31, 13, 232, 46, 51, 245, 125, 89, 95, 161, 106, 165, 191, 93, 64, 1, 92, 248, 213, 81, 7, 169, 123, 35, 91, 114, 20, 236, 16, 154, 250, 64, 80, 87, 0, 99, 10, 61, 110, 4, 250, 16, 212, 73, 33, 70, 205, 122, 222, 212, 140, 163, 31, 42, 217, 255, 65, 251, 148, 194, 54, 108, 94, 215, 165, 13, 179, 42, 241, 46, 174, 82, 130, 156, 16, 81, 134, 48, 226, 65, 183, 229, 97, 219, 184, 121, 99, 114, 181, 210, 50, 179, 14, 236, 72, 24, 17, 138, 16, 43, 187, 135, 199, 114, 255, 182, 59, 161, 251, 247, 190, 208, 201, 14, 21, 98, 248, 189, 79, 245, 245, 153, 189, 174, 162, 245, 78, 41, 93, 29, 227, 246, 118, 203, 23, 67, 204, 193, 176, 35, 22, 245, 242, 85, 75, 188, 214, 165, 142, 71, 164, 89, 164, 203, 120, 76, 185, 113, 229, 14, 216, 158, 119, 135, 199, 106, 197, 35, 29, 76, 54, 82, 130, 28, 247, 26, 131, 250, 112, 172, 251, 115, 61, 66, 198, 86, 122, 198, 37, 152, 253, 194, 140, 144, 205, 110, 244, 107, 50, 204, 112, 32, 28, 94, 146, 11, 13, 102, 126, 1, 111, 2, 27, 56, 201, 157, 142, 252, 30, 152, 195, 120, 168, 233, 52, 25, 58, 188, 180, 114, 46, 12, 179, 248, 154, 191, 240, 238, 9, 2, 96, 181, 182, 225, 2, 92, 98, 102, 22, 163, 16, 219, 121, 40, 21, 115, 140, 145, 169, 237, 27, 20, 65, 20, 49, 73, 48, 165, 218, 32, 133, 10, 11, 95, 141, 156, 38, 114, 227, 117, 246, 19, 89, 13, 111, 197, 136, 45, 46, 224, 167, 119, 132, 31, 96, 153, 134, 86, 172, 24, 49, 198, 40, 196, 1, 40, 119, 145, 254, 15, 35, 206, 44, 22, 172, 54, 222, 75, 238, 160, 103, 16, 2, 115, 55, 60, 239, 222, 251, 7, 172, 52, 127, 140, 156, 214, 100, 186, 117, 205, 187, 58, 50, 1, 171, 92, 122, 117, 67, 239, 101, 109, 253, 255, 164, 13, 204, 147, 54, 218, 68, 166, 251, 227, 199, 16, 55, 114, 103, 70, 237, 210, 85, 80, 121, 54, 7, 203, 125, 126, 230, 198, 196, 139, 251, 96, 150, 189, 183, 73, 71, 114, 194, 125, 182, 100, 135, 209, 196, 133, 0, 232, 250, 184, 25, 47, 146, 189, 64, 17, 192, 158, 2, 245, 170, 244, 150, 235, 175, 16, 240, 230, 57, 144, 169, 130, 237, 69, 91, 46, 87, 197, 150, 142, 111, 236, 140, 144, 48, 212, 98, 44, 145, 2, 124, 73, 88, 84, 134, 243, 92, 107, 160, 91, 23, 34, 233, 45, 221, 153, 219, 186, 92, 103, 249, 20, 65, 159, 215, 32, 117, 91, 213, 203, 117, 243, 231, 184, 137, 177, 161, 55, 231, 248, 188, 139, 83, 194, 234, 17, 247, 15, 54, 171, 117, 74, 188, 166, 248, 48, 167, 116, 204, 27, 92, 48, 195, 99, 49, 203, 190, 43, 49, 120, 123, 153, 235, 151, 141, 247, 246, 138, 143, 146, 246, 96, 115, 19, 77, 187, 186, 48, 73, 121, 47, 166, 41, 183, 151, 24, 172, 154, 208, 171, 156, 151, 37, 242, 15, 98, 177, 123, 236, 247, 46, 249, 95, 126, 68, 177, 34, 178, 178, 245, 151, 63, 151, 45, 26, 120, 105, 18, 178, 14, 56, 101, 74, 165, 248, 24, 222, 95, 33, 64, 123, 80, 124, 10, 239, 144, 110, 155, 55, 127, 144, 249, 232, 122, 65, 208, 5, 255, 58, 49, 8, 18, 234, 68, 237, 127, 153, 92, 42, 176, 168, 16, 101, 37, 125, 85, 161, 60, 28, 96, 93, 233, 155, 167, 39, 204, 42, 162, 64, 100, 186, 104, 127, 191, 129, 91, 136, 56, 246, 181, 12, 230, 139, 180, 82, 57, 33, 115, 92, 125, 200, 156, 62, 198, 27, 183, 85, 28, 23, 112, 245, 139, 182, 28, 222, 213, 100, 148, 171, 201, 130, 9, 108, 162, 170, 222, 166, 109, 80, 137, 209, 145, 43, 63, 62, 47, 51, 101, 109, 222, 46, 49, 178, 175, 110, 77, 151, 73, 26, 228, 4, 44, 246, 167, 25, 130, 26, 26, 199, 117, 37, 196, 239, 46, 159, 104, 34, 218, 253, 149, 68, 200, 180, 189, 97, 119, 197, 111, 11, 51, 150, 94, 111, 231, 210, 47, 107, 167, 39, 68, 0, 147, 41, 221, 138, 151, 138, 220, 164, 75, 14, 22, 102, 35, 84, 252, 47, 181, 66, 222, 159, 68, 92, 225, 38, 124, 164, 36, 39, 58, 8, 172, 29, 239, 190, 24, 38, 235, 76, 59, 202, 110, 23, 10, 91, 17, 197, 128, 249, 119, 210, 228, 186, 8, 36, 196, 24, 104, 99, 207, 88, 26, 123, 61, 152, 183, 50, 201, 122, 44, 38, 25, 225, 110, 215, 239, 220, 107, 243, 223, 78, 242, 205, 18, 255, 70, 170, 247, 118, 25, 249, 20, 127, 114, 209, 30, 60, 147, 45, 36, 243, 22, 60, 16, 31, 245, 89, 177, 235, 177, 154, 44, 238, 240, 219, 243, 115, 108, 163, 201, 224, 173, 102, 178, 141, 48, 243, 73, 49, 204, 66, 103, 97, 16, 14, 97, 96, 129, 247, 223, 18, 56, 143, 186, 238, 45, 219, 248, 185, 175, 181, 57, 60, 84, 28, 143, 100, 3, 97, 113, 1, 8, 250, 94, 152, 126, 1, 165, 130, 190, 53, 73, 163, 247, 12, 246, 231, 7, 218, 31, 14, 6, 155, 133, 248, 208, 147, 106, 143, 100, 228, 127, 197, 134, 92, 0, 194, 49, 176, 114, 225, 2, 12, 115, 86, 22, 152, 185, 143, 17, 143, 239, 234, 8, 162, 83, 51, 216, 60, 75, 182, 222, 106, 145, 147, 230, 162, 102, 104, 51, 206, 24, 179, 54, 188, 188, 85, 141, 214, 181, 0, 41, 235, 255, 140, 238, 7, 186, 187, 191, 21, 38, 108, 108, 214, 191, 238, 103, 77, 68, 216, 218, 2, 142, 74, 242, 241, 66, 92, 201, 19, 71, 7, 220, 51, 125, 71, 237, 90, 179, 78, 114, 59, 159, 209, 51, 251, 24, 3, 103, 103, 158, 229, 181, 120, 111, 130, 221, 139, 195, 43, 181, 4, 33, 68, 141, 61, 87, 18, 59, 177, 244, 153, 173, 69, 163, 44, 159, 50, 194, 72, 95, 244, 251, 46, 45, 73, 185, 145, 71, 105, 58, 52, 113, 124, 119, 42, 222, 226, 93, 117, 138, 107, 232, 213, 243, 0, 164, 214, 93, 181, 163, 3, 149, 40, 34, 225, 57, 172, 156, 41, 86, 189, 30, 168, 189, 38, 37, 238, 172, 46, 189, 72, 44, 145, 6, 58, 213, 192, 140, 220, 76, 27, 2, 225, 195, 1, 173, 179, 170, 85, 85, 206, 90, 27, 2, 172, 133, 59, 4, 219, 2, 219, 12, 165, 85, 181, 16, 166, 138, 202, 40, 37, 157, 135, 93, 139, 100, 242, 195, 183, 69, 1, 154, 133, 149, 36, 199, 51, 216, 194, 255, 63, 150, 188, 73, 176, 54, 35, 66, 182, 242, 160, 96, 131, 188, 197, 9, 201, 192, 131, 136, 218, 220, 92, 40, 8, 113, 174, 159, 50, 242, 250, 125, 102, 230, 152, 18, 191, 47, 168, 195, 236, 143, 203, 253, 199, 42, 151, 57, 9, 249, 75, 40, 50, 182, 214, 140, 168, 92, 171, 218, 80, 229, 154, 96, 102, 1, 232, 7, 196, 97, 216, 218, 42, 183, 251, 18, 163, 103, 181, 142, 40, 47, 78, 246, 159, 194, 115, 233, 113, 39, 199, 114, 5, 125, 151, 248, 188, 146, 242, 106, 4, 85, 34, 103, 116, 235, 8, 144, 251, 84, 188, 71, 27, 156, 249, 168, 255, 41, 217, 201, 140, 111, 126, 219, 64, 71, 65, 184, 240, 15, 75, 80, 114, 43, 156, 215, 244, 218, 158, 23, 232, 48, 128, 138, 99, 228, 175, 209, 100, 99, 78, 163, 85, 137, 8, 88, 222, 5, 85, 91, 198, 131, 81, 200, 132, 116, 37, 122, 53, 229, 12, 254, 246, 9, 9, 169, 154, 150, 77, 45, 222, 214, 241, 226, 167, 242, 137, 43, 23, 138, 214, 196, 88, 57, 206, 155, 178, 252, 197, 248, 187, 134, 193, 131, 222, 21, 72, 65, 104, 36, 248, 202, 212, 170, 202, 29, 121, 46, 161, 167, 89, 62, 82, 239, 81, 6, 154, 206, 197, 18, 54, 72, 97, 202, 255, 167, 27, 146, 37, 110, 44, 93, 160, 213, 5, 121, 183, 190, 201, 15, 229, 82, 146, 209, 212, 191, 109, 65, 27, 6, 92, 40, 134, 204, 123, 232, 97, 251, 125, 1, 50, 172, 77, 167, 235, 216, 93, 252, 125, 35, 178, 254, 137, 167, 138, 220, 169, 178, 73, 230, 0, 224, 223, 81, 9, 30, 21, 90, 116, 55, 128, 75, 171, 67, 164, 2, 185, 39, 60, 142, 86, 83, 91, 194, 159, 23, 169, 88, 169, 106, 189, 59, 206, 23, 248, 147, 217, 196, 169, 243, 23, 253, 172, 242, 145, 57, 106, 231, 201, 53, 103, 235, 66, 132, 147, 241, 204, 229, 143, 213, 52, 6, 132, 128, 133, 252, 187, 166, 139, 163, 67, 92, 41, 100, 27, 60, 244, 7, 32, 114, 161, 26, 121, 190, 177, 235, 139, 18, 58, 198, 119, 174, 72, 13, 250, 111, 249, 53, 61, 222, 85, 186, 100, 166, 174, 49, 29, 125, 46, 156, 105, 187, 252, 204, 108, 139, 17, 108, 63, 213, 216, 199, 46, 62, 128, 88, 17, 234, 65, 177, 227, 204, 234, 9, 168, 114, 132, 154, 160, 138, 131, 237, 102, 230, 85, 192, 174, 159, 175, 189, 105, 192, 55, 15, 177, 43, 0, 54, 93, 176, 22, 68, 63, 181, 164, 205, 87, 250, 228, 81, 101, 43, 15, 48, 210, 191, 249, 229, 69, 42, 204, 39, 19, 223, 115, 73, 58, 56, 150, 75, 46, 181, 133, 76, 38, 30, 203, 68, 216, 211, 147, 71, 32, 52, 157, 246, 225, 198, 213, 23, 128, 180, 56, 238, 99, 131, 104, 34, 107, 70, 145, 154, 193, 235, 39, 69, 214, 164, 11, 215, 179, 155, 174, 128, 161, 142, 247, 97, 191, 169, 234, 247, 62, 88, 133, 156, 102, 53, 68, 32, 58, 95, 97, 238, 48, 195, 241, 192, 36, 43, 19, 136, 116, 99, 175, 101, 228, 2, 69, 196, 194, 163, 207, 136, 142, 101, 202, 89, 239, 100, 174, 165, 138, 238, 248, 101, 222, 87, 192, 232, 82, 147, 52, 185, 205, 35, 218, 23, 12, 21, 176, 28, 181, 149, 246, 149, 162, 208, 93, 196, 59, 38, 119, 155, 178, 64, 111, 222, 122, 125, 92, 7, 52, 47, 76, 24, 121, 64, 66, 149, 61, 2, 180, 252, 198, 99, 93, 97, 57, 109, 244, 154, 58, 196, 14, 62, 66, 116, 142, 196, 90, 220, 3, 217, 105, 56, 201, 77, 130, 228, 139, 14, 37, 204, 185, 247, 67, 25, 137, 75, 182, 176, 166, 202, 220, 149, 45, 52, 246, 57, 152, 135, 94, 47, 184, 151, 239, 53, 54, 140, 197, 203, 251, 107, 166, 148, 77, 47, 225, 199, 90, 228, 235, 102, 158, 90, 99, 89, 132, 116, 70, 1, 27, 192, 96, 54, 148, 35, 160, 209, 64, 96, 8, 84, 28, 49, 128, 188, 124, 52, 156, 91, 42, 84, 210, 224, 206, 109, 31, 202, 244, 6, 22, 126, 133, 154, 3, 105, 242, 207, 33, 2, 50, 106, 80, 45, 86, 118, 241, 40, 83, 103, 62, 206, 181, 54, 217, 236, 240, 73, 227, 157, 50, 191, 150, 45, 67, 133, 173, 5, 82, 255, 243, 148, 122, 34, 138, 221, 164, 159, 173, 157, 225, 107, 140, 115, 204, 250, 62, 129, 185, 139, 251, 246, 217, 214, 159, 180, 57, 91, 66, 239, 213, 137, 131, 8, 133, 167, 94, 209, 106, 19, 234, 182, 6, 52, 182, 179, 111, 241, 125, 47, 147, 193, 186, 254, 110, 19, 165, 107, 128, 138, 40, 199, 94, 32, 97, 188, 111, 204, 52, 197, 114, 4, 46, 14, 2, 9, 77, 8, 6, 101, 158, 49, 37, 39, 37, 221, 254, 193, 32, 159, 146, 193, 210, 67, 126, 216, 114, 70, 115, 176, 225, 53, 113, 169, 20, 107, 231, 213, 128, 157, 199, 173, 110, 25, 216, 222, 49, 72, 15, 37, 127, 185, 248, 138, 102, 193, 49, 118, 202, 97, 16, 93, 199, 138, 188, 41, 22, 105, 109, 137, 18, 179, 231, 2, 86, 187, 65, 229, 248, 162, 179, 212, 39, 91, 32, 255, 21, 131, 121, 213, 118, 177, 1, 213, 253, 154, 191, 132, 186, 31, 185, 136, 12, 104, 130, 208, 148, 150, 250, 126, 212, 159, 33, 239, 58, 218, 76, 78, 82, 140, 61, 215, 86, 254, 196, 121, 241, 227, 30, 243, 245, 190, 241, 38, 53, 201, 13, 215, 112, 219, 227, 10, 4, 70, 139, 224, 236, 242, 34, 157, 49, 172, 76, 120, 16, 45, 158, 74, 85, 2, 68, 150, 251, 232, 112, 161, 40, 68, 204, 209, 92, 54, 110, 160, 210, 188, 244, 135, 161, 215, 121, 221, 201, 39, 196, 19, 196, 60, 233, 118, 213, 21, 139, 138, 136, 219, 104, 188, 88, 198, 162, 161, 200, 83, 97, 203, 43, 244, 57, 254, 13, 121, 217, 19, 158, 139, 20, 86, 175, 25, 178, 88, 193, 186, 206, 35, 20, 7, 13, 240, 96, 173, 100, 127, 81, 133, 95, 8, 50, 168, 236, 193, 152, 224, 171, 213, 165, 124, 49, 140, 20, 237, 160, 2, 97, 173, 130, 60, 98, 244, 140, 186, 167, 30, 138, 48, 54, 84, 97, 154, 98, 203, 44, 58, 77, 128, 17, 6, 182, 212, 214, 174, 98, 125, 106, 186, 58, 208, 6, 70, 102, 201, 67, 172, 60, 173, 50, 240, 118, 207, 130, 163, 176, 153, 247, 223, 93, 189, 198, 161, 197, 151, 47, 123, 142, 133, 140, 132, 249, 109, 31, 101, 21, 49, 158, 89, 177, 21, 190, 184, 105, 88, 32, 252, 168, 127, 42, 231, 172, 105, 209, 44, 170, 102, 142, 47, 162, 219, 119, 187, 70, 246, 151, 237, 43, 187, 6, 154, 17, 71, 42, 77, 169, 186, 88, 35, 167, 88, 64, 189, 158, 42, 169, 82, 143, 95, 218, 190, 104, 142, 124, 101, 233, 209, 63, 125, 221, 66, 182, 149, 68, 231, 70, 147, 218, 39, 237, 233, 221, 144, 45, 114, 237, 125, 130, 25, 209, 182, 104, 125, 63, 108, 4, 210, 139, 19, 2, 125, 145, 114, 105, 112, 34, 162, 66, 22, 80, 12, 217, 167, 212, 68, 5, 56, 150, 88, 13, 183, 115, 135, 14, 63, 180, 202, 229, 63, 213, 104, 102, 233, 59, 106, 230, 120, 56, 130, 72, 180, 146, 233, 20, 224, 161, 177, 20, 140, 162, 228, 187, 230, 83, 31, 43, 19, 188, 117, 154, 53, 245, 207, 110, 167, 165, 247, 168, 37, 40, 205, 203, 225, 128, 182, 241, 135, 4, 212, 156, 217, 108, 79, 159, 16, 123, 184, 175, 200, 2, 101, 167, 216, 57, 238, 176, 251, 12, 58, 56, 87, 124, 13, 249, 39, 93, 229, 107, 186, 24, 119, 30, 165, 101, 253, 231, 90, 186, 79, 153, 142, 119, 95, 92, 92, 165, 22, 64, 135, 121, 124, 56, 227, 68, 101, 214, 86, 137, 76, 6, 56, 67, 211, 136, 150, 213, 7, 8, 203, 11, 36, 252, 63, 135, 221, 245, 154, 198, 91, 173, 75, 176, 94, 122, 32, 112, 21, 156, 121, 199, 215, 188, 116, 242, 249, 218, 55, 39, 146, 108, 215, 19, 43, 148, 156, 70, 190, 153, 71, 15, 240, 237, 97, 40, 125, 74, 92, 22, 110, 66, 244, 32, 190, 248, 9, 101, 196, 100, 13, 222, 9, 66, 68, 67, 245, 12, 167, 41, 227, 172, 117, 6, 89, 234, 255, 78, 158, 37, 232, 30, 57, 201, 126, 206, 122, 18, 238, 60, 167, 84, 182, 165, 201, 78, 206, 71, 150, 149, 182, 91, 61, 239, 195, 155, 102, 177, 205, 136, 56, 64, 163, 92, 248, 169, 130, 29, 254, 38, 250, 86, 233, 111, 112, 49, 76, 180, 101, 238, 169, 149, 6, 128, 192, 212, 69, 77, 117, 176, 55, 62, 231, 242, 106, 7, 100, 160, 129, 108, 56, 148, 30, 2, 133, 3, 70, 101, 185, 74, 72, 38, 82, 59, 15, 127, 101, 60, 146, 39, 80, 147, 251, 147, 246, 185, 253, 118, 119, 20, 171, 87, 26, 135, 130, 57, 205, 206, 132, 79, 214, 88, 120, 8, 81, 8, 155, 172, 55, 107, 13, 181, 218, 154, 64, 185, 231, 79, 145, 124, 28, 225, 93, 54, 241, 139, 223, 15, 226, 130, 29, 254, 68, 184, 103, 128, 128, 47, 133, 40, 116, 88, 216, 55, 33, 99, 46, 91, 167, 197, 233, 90, 79, 157, 10, 234, 48, 15, 48, 131, 151, 142, 140, 107, 186, 149, 39, 105, 27, 73, 175, 172, 229, 54, 145, 157, 74, 83, 157, 73, 125, 237, 33, 70, 174, 120, 49, 70, 34, 138, 181, 185, 217, 92, 86, 246, 171, 89, 154, 119, 49, 235, 87, 70, 229, 170, 72, 147, 35, 158, 206, 93, 142, 87, 74, 210, 169, 35, 142, 54, 188, 28, 63, 161, 182, 79, 190, 202, 201, 43, 194, 59, 15, 247, 61, 230, 55, 22, 246, 41, 114, 134, 132, 20, 39, 44, 242, 125, 10, 244, 76, 143, 135, 222, 150, 38, 40, 124, 121, 231, 135, 142, 190, 75, 198, 143, 120, 159, 233, 72, 212, 238, 31, 249, 105, 212, 14, 117, 255, 237, 72, 120, 58, 131, 201, 18, 67, 166, 200, 154, 238, 219, 167, 90, 213, 15, 184, 54, 61, 244, 218, 42, 111, 143, 163, 164, 75, 156, 133, 228, 212, 87, 16, 25, 88, 164, 36, 95, 223, 39, 14, 133, 34, 217, 243, 142, 97, 134, 38, 47, 190, 38, 210, 26, 87, 131, 196, 75, 222, 3, 19, 227, 243, 183, 46, 129, 201, 161, 145, 190, 192, 73, 220, 162, 249, 132, 173, 102, 223, 53, 246, 112, 120, 206, 193, 110, 221, 37, 108, 209, 113, 190, 98, 49, 23, 79, 197, 97, 148, 151, 2, 125, 126, 10, 38, 111, 121, 40, 132, 5, 195, 99, 76, 59, 90, 116, 128, 139, 178, 57, 65, 159, 231, 176, 168, 55, 58, 160, 58, 64, 253, 201, 143, 120, 6, 82, 184, 208, 41, 245, 216, 105, 227, 160, 4, 51, 65, 183, 74, 116, 244, 6, 50, 93, 55, 236, 92, 129, 86, 229, 91, 89, 39, 224, 129, 226, 123, 219, 102, 116, 99, 124, 230, 236, 229, 103, 223, 246, 222, 113, 233, 119, 141, 85, 51, 125, 49, 39, 122, 23, 84, 220, 82, 10, 144, 94, 207, 88, 10, 191, 85, 90, 66, 136, 192, 254, 10, 213, 229, 234, 184, 99, 33, 73, 132, 92, 178, 194, 123, 246, 168, 23, 99, 241, 90, 27, 44, 17, 165, 122, 232, 200, 132, 82, 142, 51, 112, 214, 96, 116, 19, 218, 122, 121, 83, 152, 222, 110, 92, 70, 71, 91, 201, 46, 37, 86, 191, 221, 153, 196, 190, 201, 194, 216, 83, 185, 192, 227, 108, 209, 191, 11, 196, 106, 21, 82, 181, 159, 86, 57, 36, 230, 109, 40, 23, 109, 27, 193, 224, 146, 147, 9, 225, 42, 109, 48, 165, 196, 232, 139, 131, 35, 35, 206, 199, 20, 223, 105, 196, 224, 177, 113, 77, 246, 49, 111, 255, 137, 24, 102, 134, 126, 68, 155, 38, 184, 73, 127, 251, 205, 182, 175, 179, 203, 80, 47, 236, 165, 178, 158, 252, 129, 106, 14, 40, 107, 228, 247, 95, 106, 167, 178, 138, 97, 5, 205, 176, 196, 178, 80, 251, 104, 142, 178, 75, 165, 142, 207, 2, 166, 1, 48, 199, 131, 197, 79, 239, 33, 160, 170, 134, 37, 12, 18, 85, 50, 111, 188, 28, 167, 72, 247, 40, 122, 31, 187, 136, 6, 64, 2, 103, 41, 5, 49, 157, 99, 245, 39, 128, 108, 100, 25, 138, 217, 124, 245, 107, 238, 163, 149, 111, 2, 27, 41, 33, 178, 115, 247, 172, 173, 130, 185, 132, 114, 23, 8, 74, 185, 181, 252, 226, 23, 108, 80, 87, 141, 235, 62, 76, 136, 239, 107, 243, 183, 105, 195, 235, 129, 202, 197, 191, 192, 81, 176, 70, 129, 125, 109, 31, 115, 53, 108, 238, 145, 140, 39, 235, 159, 29, 253, 52, 240, 186, 194, 205, 142, 182, 164, 190, 130, 38, 235, 209, 186, 36, 132, 208, 198, 42, 207, 48, 235, 53, 62, 12, 171, 57, 101, 68, 102, 177, 50, 44, 40, 107, 61, 54, 21, 65, 167, 65, 46, 42, 145, 226, 153, 123, 73, 90, 177, 78, 173, 25, 149, 101, 95, 54, 187, 168, 202, 147, 94, 139, 73, 90, 4, 19, 191, 22, 44, 231, 146, 3, 30, 95, 44, 37, 174, 239, 216, 125, 159, 22, 224, 16, 74, 219, 125, 130, 5, 84, 22, 2, 204, 222, 128, 95, 129, 112, 115, 227, 237, 50, 212, 86, 219, 54, 39, 217, 87, 209, 27, 57, 201, 223, 165, 157, 120, 147, 208, 244, 30, 77, 215, 185, 185, 213, 1, 24, 16, 151, 123, 182, 14, 55, 173, 75, 230, 122, 56, 229, 248, 14, 134, 206, 213, 193, 249, 112, 73, 67, 195, 194, 202, 107, 217, 214, 128, 216, 41, 250, 71, 24, 110, 154, 73, 223, 201, 175, 205, 193, 4, 90, 105, 149, 198, 48, 129, 231, 177, 149, 231, 62, 112, 6, 181, 117, 110, 0, 229, 26, 64, 226, 155, 61, 138, 51, 177, 191, 169, 48, 207, 231, 179, 231, 109, 117, 124, 7, 61, 117, 220, 209, 121, 120, 31, 56, 65, 185, 74, 173, 116, 84, 165, 167, 18, 209, 220, 120, 197, 85, 124, 252, 239, 138, 149, 219, 96, 229, 177, 85, 18, 41, 235, 149, 145, 209, 85, 182, 230, 79, 15, 120, 234, 174, 13, 31, 160, 77, 186, 190, 108, 201, 193, 246, 242, 193, 169, 49, 198, 75, 74, 109, 32, 44, 206, 151, 235, 112, 74, 166, 55, 244, 216, 118, 74, 155, 142, 178, 105, 230, 252, 216, 249, 128, 108, 54, 111, 94, 232, 151, 42, 163, 123, 169, 129, 33, 56, 205, 35, 57, 234, 187, 203, 45, 199, 95, 141, 254, 209, 5, 85, 88, 203, 119, 172, 146, 199, 94, 176, 185, 144, 51, 230, 116, 97, 158, 48, 247, 160, 194, 34, 221, 112, 6, 176, 250, 164, 201, 102, 226, 214, 118, 170, 238, 197, 189, 100, 134, 26, 106, 149, 214, 163, 107, 129, 136, 131, 179, 254, 212, 105, 115, 64, 46, 114, 209, 174, 126, 246, 207, 179, 238, 248, 230, 146, 220, 191, 84, 53, 28, 1, 27, 111, 106, 11, 149, 238, 83, 20, 109, 22, 86, 111, 189, 120, 114, 211, 184, 154, 137, 35, 92, 155, 156, 104, 98, 21, 152, 186, 189, 146, 220, 189, 31, 180, 21, 20, 134, 143, 250, 196, 147, 109, 42, 22, 8, 198, 83, 36, 124, 158, 240, 112, 171, 180, 149, 215, 238, 96, 115, 205, 156, 150, 100, 187, 63, 62, 205, 33, 250, 67, 46, 212, 66, 152, 163, 209, 37, 60, 105, 65, 252, 190, 216, 227, 101, 242, 232, 162, 219, 59, 103, 6, 174, 69, 218, 154, 212, 169, 139, 58, 101, 145, 47, 131, 34, 233, 166, 56, 176, 62, 126, 1, 203, 63, 42, 40, 178, 107, 119, 162, 238, 202, 105, 120, 123, 22, 145, 122, 250, 166, 182, 172, 94, 15, 154, 110, 157, 92, 25, 130, 241, 120, 184, 84, 199, 99, 17, 186, 93, 6, 139, 235, 69, 120, 240, 178, 147, 138, 23, 40, 146, 63, 51, 41, 11, 72, 135, 4, 91, 110, 80, 105, 97, 90, 135, 157, 190, 30, 21, 149, 235, 163, 127, 44, 222, 86, 195, 130, 62, 202, 247, 77, 100, 173, 2, 172, 215, 154, 11, 105, 142, 195, 81, 79, 58, 145, 44, 213, 119, 146, 23, 144, 73, 57, 97, 182, 16, 189, 73, 81, 82, 187, 229, 247, 78, 118, 9, 20, 65, 59, 113, 231, 176, 229, 248, 105, 125, 34, 50, 222, 1, 13, 244, 20, 94, 210, 213, 77, 210, 161, 250, 58, 82, 174, 9, 145, 176, 251, 120, 146, 47, 4, 89, 252, 34, 109, 121, 67, 196, 170, 170, 135, 209, 43, 91, 221, 237, 115, 99, 36, 206, 54, 174, 143, 43, 200, 75, 127, 200, 181, 43, 37, 215, 43, 153, 105, 244, 75, 225, 49, 88, 18, 250, 210, 163, 157, 161, 8, 102, 195, 54, 60, 27, 113, 98, 66, 11, 92, 148, 70, 130, 172, 216, 237, 75, 4, 176, 166, 143, 116, 212, 158, 81, 197, 150, 69, 170, 241, 2, 158, 170, 245, 40, 172, 236, 35, 34, 140, 149, 68, 89, 242, 190, 231, 7, 168, 220, 8, 86, 59, 159, 55, 102, 186, 185, 70, 138, 10, 142, 38, 116, 145, 189, 238, 175, 243, 240, 173, 98, 87, 126, 195, 102, 123, 228, 116, 34, 79, 214, 202, 255, 19, 46, 71, 90, 216, 74, 62, 111, 29, 5, 23, 103, 120, 211, 189, 125, 235, 81, 207, 110, 247, 45, 5, 204, 96, 37, 156, 114, 68, 60, 39, 199, 199, 159, 226, 120, 113, 242, 14, 180, 123, 241, 228, 45, 70, 209, 232, 247, 234, 218, 67, 241, 91, 21, 191, 161, 163, 33, 95, 93, 207, 46, 23, 127, 17, 218, 96, 20, 152, 241, 225, 94, 35, 9, 9, 151, 108, 71, 131, 124, 242, 7, 70, 116, 197, 253, 224, 39, 195, 213, 126, 226, 35, 87, 25, 232, 179, 60, 180, 222, 79, 93, 17, 134, 252, 12, 170, 216, 179, 28, 65, 92, 29, 163, 116, 126, 120, 1, 216, 122, 133, 203, 225, 163, 206, 177, 18, 189, 116, 235, 47, 96, 19, 15, 9, 135, 254, 59, 130, 98, 230, 168, 55, 157, 28, 63, 206, 1, 69, 37, 152, 231, 204, 222, 56, 57, 143, 164, 160, 138, 125, 166, 100, 45, 99, 240, 100, 239, 188, 154, 171, 57, 119, 118, 182, 20, 8, 94, 20, 240, 94, 33, 154, 37, 230, 210, 29, 248, 92, 56, 153, 147, 82, 63, 109, 207, 218, 107, 93, 44, 212, 30, 88, 188, 55, 252, 101, 167, 113, 243, 208, 41, 71, 213, 154, 111, 190, 234, 151, 21, 65, 150, 141, 90, 94, 115, 179, 54, 12, 13, 110, 138, 104, 125, 37, 89, 223, 126, 12, 18, 220, 120, 188, 67, 210, 223, 37, 101, 134, 232, 66, 24, 132, 247, 255, 230, 17, 182, 93, 185, 28, 146, 118, 79, 183, 73, 46, 134, 125, 242, 83, 45, 220, 9, 231, 133, 134, 150, 204, 108, 31, 208, 38, 42, 83, 235, 126, 175, 72, 122, 204, 27, 57, 24, 63, 221, 57, 152, 125, 130, 216, 159, 6, 207, 85, 188, 233, 73, 60, 103, 57, 181, 125, 185, 167, 167, 172, 122, 114, 224, 144, 191, 116, 172, 148, 107, 9, 23, 233, 51, 76, 209, 55, 99, 165, 72, 234, 188, 175, 93, 192, 146, 181, 73, 146, 254, 241, 140, 213, 249, 245, 2, 67, 154, 193, 176, 216, 137, 185, 188, 26, 162, 134, 63, 214, 114, 61, 83, 120, 228, 2, 148, 77, 113, 203, 165, 148, 222, 111, 53, 40, 230, 90, 17, 228, 66, 42, 10, 10, 80, 177, 144, 6, 165, 235, 68, 21, 128, 21, 117, 152, 11, 133, 40, 54, 149, 250, 44, 158, 225, 211, 218, 221, 169, 17, 8, 162, 45, 101, 121, 162, 101, 218, 64, 135, 14, 203, 170, 67, 148, 18, 174, 113, 34, 58, 29, 5, 206, 223, 110, 194, 7, 167, 72, 211, 57, 51, 9, 102, 114, 138, 199, 163, 20, 193, 202, 234, 145, 8, 196, 111, 243, 86, 106, 36, 220, 39, 24, 110, 221, 187, 126, 99, 253, 128, 148, 67, 12, 77, 55, 106, 66, 204, 221, 57, 135, 52, 36, 3, 142, 123, 221, 14, 127, 26, 223, 185, 253, 45, 112, 52, 36, 202, 149, 172, 105, 15, 72, 68, 105, 252, 27, 139, 218, 16, 121, 13, 77, 24, 162, 77, 32, 93, 164, 182, 73, 38, 178, 175, 69, 215, 248, 96, 167, 55, 102, 168, 122, 195, 99, 82, 2, 79, 228, 195, 218, 128, 75, 66, 125, 84, 34, 133, 188, 94, 114, 76, 149, 165, 138, 131, 148, 99, 158, 69, 234, 211, 101, 203, 132, 160, 43, 71, 220, 13, 189, 0, 175, 89, 6, 27, 60, 137, 49, 82, 179, 47, 177, 238, 220, 87, 233, 88, 159, 110, 229, 2, 102, 114, 247, 210, 42, 135, 76, 92, 69, 99, 51, 248, 97, 1, 49, 107, 255, 177, 142, 214, 188, 152, 135, 131, 149, 21, 115, 25, 115, 201, 149, 78, 55, 91, 32, 2, 153, 209, 245, 33, 113, 2, 118, 84, 3, 139, 248, 148, 38, 213, 189, 113, 226, 19, 60, 150, 63, 238, 35, 172, 34, 237, 218, 88, 57, 173, 67, 166, 246, 208, 168, 89, 166, 241, 99, 83, 23, 64, 220, 58, 215, 139, 123, 176, 41, 65, 69, 18, 50, 82, 208, 13, 135, 160, 6, 11, 71, 87, 77, 93, 79, 173, 137, 49, 213, 88, 208, 180, 123, 252, 37, 184, 8, 114, 178, 214, 151, 29, 65, 53, 97, 84, 23, 159, 232, 136, 47, 239, 135, 163, 44, 226, 6, 226, 21, 8, 70, 210, 227, 105, 232, 17, 42, 94, 166, 18, 34, 18, 94, 174, 96, 214, 109, 228, 141, 240, 174, 103, 211, 221, 132, 145, 58, 196, 5, 64, 244, 49, 45, 113, 241, 33, 128, 61, 33, 95, 51, 14, 206, 238, 57, 249, 5, 57, 140, 169, 222, 132, 188, 50, 54, 244, 44, 56, 231, 173, 235, 120, 130, 246, 232, 127, 150, 26, 232, 139, 86, 2, 5, 233, 92, 41, 186, 57, 26, 97, 143, 43, 63, 247, 53, 128, 123, 184, 114, 230, 88, 223, 49, 183, 75, 118, 143, 130, 233, 157, 224, 92, 14, 243, 123, 47, 50, 109, 38, 93, 215, 206, 60, 72, 202, 160, 119, 85, 214, 132, 174, 35, 31, 75, 42, 32, 219], + [193, 52, 137, 65, 118, 236, 220, 47, 43, 203, 69, 31, 77, 106, 2, 141, 80, 223, 130, 92, 81, 56, 126, 55, 216, 124, 190, 20, 220, 37, 141, 142, 187, 245, 230, 94, 156, 121, 184, 52, 204, 112, 108, 170, 100, 89, 182, 44, 103, 101, 86, 54, 151, 62, 230, 95, 6, 146, 64, 104, 191, 21, 116, 70, 166, 253, 125, 156, 10, 251, 102, 251, 73, 167, 83, 157, 184, 127, 10, 210, 252, 116, 190, 243, 222, 170, 205, 123, 226, 88, 111, 121, 48, 174, 52, 152, 156, 255, 18, 250, 12, 29, 182, 128, 119, 242, 195, 171, 26, 160, 3, 198, 110, 72, 4, 54, 86, 250, 241, 9, 142, 198, 60, 72, 87, 196, 191, 212, 89, 91, 222, 163, 203, 142, 99, 229, 124, 66, 124, 9, 239, 254, 18, 37, 10, 149, 81, 156, 7, 73, 95, 21, 52, 237, 212, 251, 40, 12, 223, 114, 192, 254, 202, 173, 39, 106, 132, 231, 100, 141, 221, 92, 81, 185, 238, 234, 162, 25, 220, 125, 77, 206, 13, 153, 193, 24, 150, 134, 73, 230, 228, 90, 176, 205, 64, 199, 65, 126, 230, 228, 182, 104, 18, 27, 106, 163, 100, 241, 99, 107, 148, 216, 172, 9, 206, 35, 156, 120, 30, 173, 9, 7, 249, 49, 70, 184, 198, 15, 4, 15, 115, 101, 151, 43, 97, 67, 219, 83, 17, 6, 138, 227, 229, 117, 138, 124, 46, 4, 243, 96, 168, 176, 208, 96, 74, 89, 55, 22, 212, 213, 185, 220, 49, 208, 207, 109, 243, 77, 163, 130, 172, 193, 147, 74, 177, 64, 136, 102, 170, 168, 196, 37, 82, 101, 150, 214, 39, 245, 141, 223, 159, 23, 7, 144, 182, 106, 115, 114, 234, 145, 56, 231, 126, 211, 140, 39, 186, 27, 104, 34, 151, 193, 74, 160, 249, 241, 30, 70, 175, 241, 182, 141, 127, 49, 113, 50, 233, 161, 4, 43, 109, 163, 25, 135, 70, 130, 9, 44, 58, 231, 107, 153, 124, 199, 152, 151, 66, 130, 151, 11, 129, 7, 24, 212, 51, 105, 103, 32, 43, 48, 52, 246, 105, 13, 51, 17, 91, 162, 210, 240, 88, 54, 46, 30, 134, 137, 72, 123, 182, 186, 120, 254, 207, 63, 216, 18, 112, 244, 67, 252, 125, 136, 18, 146, 124, 196, 180, 213, 138, 200, 135, 5, 217, 185, 119, 42, 255, 55, 190, 28, 250, 36, 108, 63, 58, 55, 27, 17, 113, 233, 201, 88, 61, 254, 54, 231, 180, 67, 39, 10, 86, 78, 115, 3, 207, 222, 59, 36, 243, 190, 176, 108, 216, 229, 117, 194, 62, 105, 130, 186, 148, 92, 134, 50, 10, 98, 192, 201, 0, 53, 218, 47, 14, 75, 28, 160, 181, 52, 47, 179, 20, 169, 190, 175, 185, 206, 164, 154, 130, 30, 32, 53, 93, 124, 194, 135, 32, 227, 253, 58, 210, 160, 222, 196, 143, 157, 62, 144, 111, 13, 165, 113, 182, 233, 195, 73, 94, 2, 23, 180, 209, 243, 246, 52, 204, 50, 175, 241, 207, 136, 148, 85, 20, 141, 188, 152, 67, 128, 124, 87, 32, 185, 13, 55, 247, 1, 119, 129, 212, 118, 169, 202, 87, 208, 94, 162, 132, 207, 39, 167, 104, 224, 196, 243, 74, 227, 22, 115, 54, 169, 181, 54, 72, 117, 98, 134, 115, 91, 108, 235, 226, 78, 239, 210, 53, 39, 117, 246, 144, 64, 245, 214, 3, 57, 25, 123, 1, 24, 179, 191, 140, 245, 49, 13, 57, 56, 209, 188, 193, 90, 113, 158, 202, 235, 224, 105, 69, 105, 203, 33, 189, 137, 215, 7, 254, 139, 115, 93, 27, 38, 84, 110, 60, 78, 87, 71, 205, 60, 179, 255, 65, 24, 205, 122, 142, 227, 107, 207, 224, 54, 232, 234, 180, 119, 96, 71, 241, 180, 172, 148, 113, 108, 13, 116, 229, 190, 180, 150, 214, 205, 10, 136, 16, 24, 8, 105, 214, 38, 162, 254, 146, 227, 232, 226, 64, 245, 93, 146, 177, 54, 13, 146, 44, 66, 3, 89, 161, 75, 27, 250, 25, 159, 255, 118, 232, 38, 171, 209, 10, 37, 215, 212, 74, 8, 136, 57, 70, 168, 221, 22, 145, 167, 137, 113, 224, 209, 18, 250, 112, 191, 206, 130, 173, 203, 138, 193, 38, 192, 172, 34, 87, 207, 86, 24, 200, 200, 27, 162, 228, 56, 73, 177, 36, 99, 238, 45, 190, 45, 27, 193, 241, 140, 161, 180, 175, 181, 222, 211, 143, 139, 43, 46, 145, 59, 133, 199, 222, 152, 89, 136, 142, 145, 79, 193, 110, 8, 203, 62, 218, 250, 50, 62, 242, 63, 236, 166, 250, 68, 119, 55, 91, 185, 202, 239, 135, 33, 108, 60, 195, 197, 143, 177, 156, 179, 199, 69, 174, 85, 111, 139, 31, 198, 7, 85, 46, 138, 162, 99, 108, 11, 136, 117, 162, 151, 77, 57, 59, 134, 107, 81, 166, 135, 56, 161, 95, 84, 103, 73, 22, 59, 177, 223, 1, 184, 49, 191, 174, 164, 143, 112, 254, 4, 160, 24, 19, 102, 131, 24, 46, 106, 205, 221, 237, 244, 61, 153, 216, 94, 96, 209, 215, 118, 86, 225, 82, 28, 108, 75, 201, 212, 204, 48, 222, 45, 136, 211, 12, 238, 72, 163, 255, 134, 47, 3, 179, 27, 224, 196, 15, 0, 114, 169, 94, 77, 218, 236, 112, 160, 210, 217, 230, 56, 68, 186, 184, 109, 155, 24, 113, 111, 120, 111, 128, 248, 90, 78, 82, 141, 162, 79, 96, 239, 126, 89, 112, 26, 127, 189, 49, 0, 238, 209, 183, 103, 191, 104, 168, 24, 97, 128, 39, 130, 98, 234, 86, 108, 211, 84, 4, 133, 28, 9, 127, 53, 13, 32, 55, 184, 136, 24, 16, 86, 132, 79, 82, 252, 97, 110, 122, 155, 108, 134, 148, 126, 45, 118, 120, 28, 121, 27, 171, 10, 160, 134, 38, 204, 149, 76, 221, 87, 239, 96, 229, 22, 81, 107, 11, 235, 81, 159, 160, 177, 126, 44, 9, 164, 75, 234, 87, 134, 21, 249, 237, 21, 182, 254, 157, 245, 113, 56, 214, 38, 26, 138, 163, 252, 174, 89, 19, 203, 135, 79, 189, 212, 7, 138, 79, 10, 255, 189, 46, 108, 14, 13, 97, 237, 21, 192, 63, 158, 100, 79, 81, 193, 149, 132, 108, 94, 48, 182, 114, 175, 43, 65, 7, 198, 119, 201, 141, 122, 181, 238, 92, 33, 105, 228, 68, 49, 195, 30, 218, 148, 68, 218, 6, 33, 35, 150, 39, 255, 251, 239, 241, 245, 164, 32, 233, 212, 59, 208, 124, 183, 247, 80, 239, 7, 163, 12, 35, 152, 9, 217, 252, 126, 170, 124, 27, 22, 244, 36, 235, 46, 150, 218, 207, 146, 217, 104, 244, 132, 222, 81, 67, 127, 87, 208, 236, 137, 138, 96, 253, 181, 164, 58, 160, 152, 111, 7, 128, 195, 5, 146, 141, 30, 59, 133, 4, 231, 236, 106, 10, 216, 149, 85, 78, 195, 173, 126, 161, 94, 171, 163, 190, 238, 68, 69, 71, 120, 184, 211, 40, 92, 100, 89, 37, 7, 31, 37, 145, 17, 129, 139, 48, 69, 217, 62, 159, 100, 34, 137, 236, 213, 28, 93, 59, 135, 75, 128, 228, 45, 206, 88, 49, 123, 0, 226, 95, 170, 234, 111, 165, 221, 99, 173, 253, 13, 96, 57, 196, 241, 231, 218, 165, 77, 82, 148, 18, 154, 159, 190, 252, 158, 138, 153, 10, 172, 27, 233, 57, 147, 178, 179, 68, 212, 136, 13, 26, 221, 222, 112, 52, 112, 132, 154, 211, 161, 59, 148, 139, 109, 157, 211, 165, 15, 185, 142, 84, 194, 10, 210, 147, 89, 55, 101, 150, 143, 156, 134, 154, 130, 171, 202, 157, 170, 152, 67, 25, 49, 221, 228, 131, 43, 40, 253, 219, 114, 248, 49, 142, 242, 17, 236, 30, 165, 91, 64, 232, 97, 27, 81, 131, 210, 111, 157, 175, 36, 179, 203, 156, 50, 100, 223, 96, 169, 196, 240, 39, 131, 187, 156, 145, 165, 9, 206, 155, 231, 186, 242, 27, 184, 68, 0, 165, 34, 233, 179, 80, 161, 97, 208, 253, 77, 48, 107, 143, 126, 183, 156, 239, 102, 204, 199, 205, 191, 14, 5, 202, 23, 220, 159, 147, 107, 118, 129, 67, 195, 108, 56, 103, 252, 82, 192, 145, 202, 135, 178, 232, 135, 214, 89, 6, 247, 124, 24, 218, 158, 115, 226, 89, 38, 52, 194, 125, 246, 57, 1, 226, 90, 187, 206, 174, 52, 139, 138, 44, 228, 16, 182, 47, 241, 237, 248, 200, 240, 225, 9, 103, 167, 35, 222, 27, 35, 133, 171, 129, 114, 90, 251, 85, 217, 63, 61, 233, 157, 81, 59, 78, 216, 56, 201, 54, 226, 113, 17, 183, 116, 41, 219, 115, 249, 33, 142, 244, 30, 237, 71, 188, 10, 123, 151, 43, 121, 26, 48, 13, 194, 184, 107, 207, 170, 33, 40, 176, 60, 68, 216, 41, 26, 206, 30, 34, 90, 44, 159, 199, 8, 8, 13, 170, 20, 158, 151, 223, 229, 14, 128, 138, 7, 59, 254, 195, 199, 26, 129, 20, 218, 163, 131, 238, 141, 110, 250, 160, 62, 13, 119, 109, 176, 31, 152, 190, 131, 116, 48, 134, 215, 212, 188, 192, 87, 104, 54, 223, 38, 177, 53, 55, 47, 242, 63, 205, 25, 110, 112, 173, 27, 182, 70, 209, 189, 71, 65, 63, 13, 76, 201, 150, 252, 195, 94, 78, 212, 169, 87, 162, 137, 191, 29, 178, 89, 182, 131, 62, 100, 32, 112, 8, 146, 79, 211, 48, 93, 89, 49, 136, 25, 34, 49, 100, 134, 182, 143, 80, 54, 187, 71, 19, 7, 210, 10, 22, 4, 127, 248, 2, 23, 43, 58, 28, 146, 230, 15, 253, 112, 99, 42, 131, 223, 168, 3, 129, 72, 247, 12, 147, 75, 91, 118, 180, 109, 216, 89, 91, 121, 52, 207, 4, 47, 142, 136, 189, 190, 5, 22, 132, 81, 207, 155, 182, 245, 17, 140, 57, 108, 25, 27, 92, 178, 14, 3, 113, 243, 96, 124, 62, 87, 121, 4, 253, 106, 7, 203, 27, 210, 39, 220, 103, 108, 5, 86, 166, 159, 139, 81, 255, 20, 109, 9, 77, 53, 87, 63, 93, 106, 48, 50, 140, 208, 150, 22, 238, 20, 241, 183, 61, 192, 86, 184, 186, 211, 47, 137, 238, 62, 128, 170, 146, 83, 62, 174, 219, 12, 212, 168, 222, 122, 182, 44, 32, 244, 235, 161, 71, 253, 142, 2, 155, 216, 181, 173, 64, 251, 173, 145, 235, 201, 8, 100, 84, 70, 129, 168, 59, 106, 59, 21, 157, 45, 23, 85, 122, 182, 64, 219, 235, 221, 238, 75, 66, 213, 153, 3, 136, 80, 146, 60, 116, 60, 174, 226, 139, 49, 7, 122, 135, 197, 59, 129, 102, 55, 201, 21, 107, 8, 223, 99, 198, 180, 187, 239, 137, 122, 148, 133, 253, 110, 63, 58, 218, 104, 152, 174, 70, 107, 79, 34, 2, 5, 238, 100, 165, 97, 237, 123, 211, 33, 146, 37, 234, 149, 200, 191, 72, 8, 160, 60, 40, 75, 82, 241, 223, 213, 135, 21, 188, 14, 85, 90, 194, 119, 213, 252, 224, 222, 193, 45, 215, 69, 14, 212, 146, 216, 219, 35, 55, 252, 175, 170, 209, 203, 212, 47, 205, 129, 109, 234, 230, 215, 249, 215, 33, 133, 29, 4, 15, 0, 106, 252, 101, 122, 29, 66, 149, 235, 119, 146, 16, 148, 173, 175, 83, 69, 230, 104, 132, 161, 140, 196, 30, 58, 183, 109, 196, 103, 99, 221, 110, 195, 30, 7, 106, 127, 97, 216, 145, 148, 62, 111, 101, 103, 100, 251, 4, 56, 11, 198, 63, 44, 182, 11, 6, 133, 10, 57, 211, 218, 243, 69, 18, 55, 113, 137, 56, 152, 51, 71, 216, 223, 166, 188, 0, 24, 7, 125, 179, 190, 216, 193, 98, 180, 69, 223, 23, 200, 58, 64, 150, 79, 218, 244, 78, 31, 138, 9, 105, 205, 197, 20, 220, 202, 115, 117, 0, 81, 198, 251, 29, 207, 248, 35, 87, 214, 155, 101, 17, 29, 39, 102, 116, 41, 108, 204, 233, 166, 26, 61, 239, 183, 187, 68, 59, 63, 166, 210, 79, 3, 111, 90, 194, 44, 208, 152, 73, 225, 234, 83, 55, 34, 127, 215, 118, 100, 74, 100, 33, 43, 94, 88, 252, 129, 89, 16, 89, 195, 52, 178, 70, 36, 250, 117, 131, 157, 203, 128, 96, 67, 155, 94, 75, 60, 45, 139, 75, 92, 131, 70, 85, 101, 178, 235, 93, 86, 23, 159, 212, 196, 71, 145, 220, 198, 216, 94, 232, 184, 115, 64, 187, 78, 174, 153, 139, 243, 88, 57, 88, 248, 37, 250, 247, 157, 31, 190, 204, 197, 194, 82, 36, 71, 11, 49, 161, 66, 214, 185, 74, 168, 100, 129, 174, 217, 238, 239, 117, 212, 17, 131, 10, 29, 31, 224, 195, 34, 11, 150, 101, 136, 246, 147, 228, 114, 152, 46, 161, 51, 137, 55, 78, 152, 224, 180, 107, 209, 221, 16, 166, 67, 51, 173, 148, 169, 141, 232, 46, 12, 249, 126, 48, 63, 237, 61, 226, 25, 34, 71, 157, 248, 74, 101, 8, 205, 23, 112, 154, 201, 86, 124, 102, 132, 221, 244, 211, 27, 19, 159, 211, 66, 31, 236, 29, 23, 127, 22, 58, 227, 176, 3, 117, 234, 120, 24, 206, 160, 253, 123, 209, 103, 55, 173, 99, 194, 137, 238, 156, 227, 37, 178, 70, 104, 161, 213, 150, 206, 20, 36, 226, 33, 100, 4, 241, 71, 160, 255, 13, 115, 56, 229, 44, 42, 28, 97, 101, 77, 111, 33, 233, 225, 40, 224, 51, 214, 37, 87, 118, 225, 145, 34, 17, 37, 48, 123, 85, 140, 135, 64, 88, 241, 244, 156, 103, 6, 109, 135, 59, 77, 158, 196, 96, 254, 219, 26, 217, 38, 13, 7, 52, 135, 119, 25, 226, 252, 38, 99, 110, 202, 206, 36, 209, 99, 175, 194, 68, 211, 39, 239, 135, 188, 151, 35, 59, 212, 79, 126, 75, 3, 199, 227, 229, 122, 194, 217, 241, 245, 239, 200, 87, 115, 103, 232, 244, 51, 212, 230, 217, 34, 80, 252, 140, 51, 110, 43, 213, 46, 224, 116, 31, 69, 169, 120, 67, 16, 243, 143, 241, 169, 198, 234, 183, 96, 175, 255, 250, 246, 28, 249, 223, 54, 254, 248, 158, 144, 216, 40, 138, 164, 71, 4, 251, 38, 215, 58, 171, 220, 60, 137, 23, 28, 152, 168, 181, 215, 151, 183, 150, 220, 101, 126, 10, 83, 91, 1, 251, 27, 150, 16, 248, 237, 83, 170, 30, 36, 162, 231, 148, 7, 26, 198, 166, 107, 166, 147, 110, 47, 119, 246, 190, 76, 230, 141, 222, 254, 54, 201, 167, 28, 184, 125, 19, 148, 70, 189, 33, 0, 160, 84, 80, 239, 65, 118, 154, 12, 150, 61, 151, 202, 121, 153, 232, 221, 145, 128, 245, 174, 101, 149, 139, 17, 10, 177, 24, 74, 250, 36, 234, 14, 248, 239, 129, 191, 107, 165, 239, 15, 196, 82, 208, 211, 134, 21, 169, 18, 199, 116, 126, 248, 38, 137, 90, 105, 147, 255, 249, 41, 106, 166, 15, 148, 155, 120, 138, 101, 113, 53, 227, 237, 10, 138, 60, 5, 120, 119, 66, 75, 6, 24, 10, 21, 118, 219, 189, 192, 131, 106, 49, 25, 30, 41, 145, 15, 189, 204, 172, 125, 103, 237, 13, 176, 114, 148, 65, 99, 114, 124, 32, 104, 81, 250, 8, 73, 218, 251, 52, 16, 195, 229, 144, 72, 207, 104, 105, 166, 34, 109, 183, 140, 248, 101, 191, 85, 30, 77, 167, 251, 219, 9, 54, 2, 173, 117, 11, 180, 16, 201, 20, 198, 90, 197, 173, 143, 182, 66, 77, 216, 40, 89, 204, 23, 176, 113, 0, 117, 39, 153, 124, 145, 105, 135, 156, 178, 220, 251, 242, 213, 75, 54, 74, 66, 60, 77, 73, 230, 69, 43, 193, 26, 165, 208, 3, 112, 253, 92, 102, 153, 48, 171, 237, 248, 86, 204, 55, 200, 239, 76, 222, 108, 97, 98, 169, 158, 116, 120, 112, 168, 79, 54, 78, 52, 18, 132, 175, 38, 182, 48, 21, 192, 9, 12, 200, 110, 109, 178, 68, 202, 194, 84, 220, 76, 163, 170, 167, 62, 65, 201, 13, 121, 45, 144, 62, 131, 198, 114, 31, 239, 192, 29, 121, 33, 205, 128, 215, 110, 236, 18, 44, 103, 152, 111, 191, 73, 113, 227, 58, 197, 77, 207, 84, 242, 29, 51, 161, 126, 76, 190, 25, 181, 218, 238, 169, 230, 77, 147, 77, 219, 232, 176, 195, 167, 23, 143, 113, 140, 244, 111, 37, 125, 2, 136, 37, 125, 180, 205, 189, 137, 237, 146, 10, 135, 227, 126, 17, 34, 1, 242, 15, 17, 211, 18, 243, 151, 49, 148, 76, 118, 94, 130, 87, 224, 79, 249, 128, 184, 34, 177, 249, 1, 91, 189, 20, 221, 238, 88, 216, 180, 153, 194, 128, 106, 98, 138, 82, 154, 18, 70, 140, 82, 106, 51, 181, 32, 50, 165, 107, 172, 153, 136, 170, 197, 169, 10, 8, 41, 155, 4, 82, 62, 12, 89, 61, 23, 59, 169, 72, 166, 44, 116, 48, 1, 49, 218, 193, 95, 44, 113, 8, 192, 213, 54, 65, 43, 165, 220, 196, 139, 252, 107, 19, 65, 37, 119, 76, 55, 254, 117, 219, 219, 74, 179, 220, 51, 16, 159, 10, 229, 197, 94, 21, 152, 224, 165, 138, 45, 153, 54, 13, 147, 230, 61, 104, 255, 42, 41, 67, 194, 87, 200, 198, 173, 78, 44, 103, 143, 168, 68, 104, 165, 200, 13, 241, 115, 119, 222, 41, 36, 110, 194, 214, 233, 190, 244, 179, 9, 4, 118, 38, 160, 45, 21, 184, 8, 196, 239, 249, 131, 250, 19, 167, 126, 104, 151, 73, 237, 120, 238, 89, 76, 109, 127, 16, 194, 94, 40, 81, 245, 187, 118, 83, 60, 26, 27, 245, 241, 135, 206, 223, 23, 24, 228, 96, 132, 29, 194, 105, 112, 14, 86, 46, 76, 49, 125, 68, 144, 201, 157, 131, 243, 10, 233, 179, 166, 37, 219, 104, 55, 240, 102, 232, 114, 90, 239, 203, 35, 96, 128, 14, 175, 157, 152, 115, 68, 137, 69, 253, 116, 47, 89, 6, 193, 224, 210, 198, 133, 162, 187, 30, 125, 201, 65, 206, 187, 13, 180, 35, 232, 142, 21, 230, 108, 26, 173, 135, 246, 104, 76, 171, 201, 211, 6, 28, 10, 131, 212, 121, 57, 12, 121, 231, 210, 241, 105, 45, 35, 6, 133, 21, 203, 197, 24, 112, 13, 37, 29, 6, 225, 56, 153, 51, 137, 251, 247, 59, 238, 32, 250, 36, 253, 9, 244, 28, 125, 32, 250, 13, 152, 151, 98, 172, 230, 168, 187, 34, 144, 194, 252, 12, 122, 137, 125, 10, 149, 177, 48, 44, 222, 206, 78, 196, 7, 237, 221, 106, 47, 233, 100, 102, 25, 182, 228, 128, 238, 208, 191, 207, 204, 213, 164, 95, 74, 243, 92, 74, 164, 135, 104, 72, 11, 74, 55, 94, 91, 26, 89, 239, 212, 7, 4, 50, 70, 33, 134, 167, 3, 224, 209, 51, 43, 55, 100, 238, 152, 134, 204, 54, 248, 151, 14, 92, 70, 8, 80, 179, 235, 215, 183, 237, 80, 41, 189, 26, 60, 103, 134, 137, 249, 160, 232, 254, 69, 238, 133, 181, 127, 164, 99, 115, 116, 79, 52, 244, 23, 9, 171, 16, 207, 172, 241, 229, 139, 99, 148, 119, 250, 205, 160, 163, 112, 2, 143, 75, 169, 18, 209, 76, 93, 175, 219, 33, 29, 43, 174, 54, 129, 105, 164, 165, 60, 168, 95, 37, 183, 72, 196, 62, 33, 91, 63, 102, 174, 163, 168, 237, 32, 50, 203, 227, 188, 93, 199, 166, 70, 13, 201, 68, 194, 154, 156, 60, 4, 12, 244, 186, 110, 163, 208, 244, 254, 94, 41, 43, 52, 238, 71, 161, 78, 175, 252, 78, 254, 154, 236, 128, 218, 1, 231, 62, 194, 138, 136, 226, 53, 209, 108, 9, 181, 201, 208, 68, 235, 198, 129, 204, 113, 40, 0, 122, 171, 113, 148, 142, 18, 160, 241, 16, 28, 190, 109, 16, 248, 121, 212, 0, 185, 196, 248, 108, 34, 16, 199, 83, 252, 19, 238, 117, 131, 30, 164, 183, 206, 23, 72, 175, 245, 167, 89, 83, 163, 33, 21, 12, 58, 86, 80, 96, 21, 85, 235, 217, 254, 230, 137, 184, 131, 57, 40, 77, 12, 148, 186, 108, 193, 215, 222, 61, 254, 79, 113, 84, 148, 250, 93, 247, 80, 180, 129, 45, 185, 55, 106, 38, 228, 245, 200, 217, 100, 88, 57, 30, 250, 223, 82, 127, 58, 62, 173, 212, 174, 35, 104, 205, 175, 222, 128, 122, 112, 169, 19, 163, 171, 136, 54, 59, 156, 24, 254, 136, 149, 194, 113, 117, 115, 96, 188, 242, 222, 218, 250, 1, 85, 177, 231, 68, 104, 145, 142, 223, 154, 120, 60, 117, 226, 49, 139, 119, 132, 167, 191, 138, 225, 123, 143, 176, 211, 57, 130, 219, 88, 169, 211, 214, 153, 189, 201, 222, 172, 85, 101, 24, 101, 243, 122, 171, 229, 213, 29, 198, 177, 40, 47, 23, 12, 99, 151, 26, 38, 65, 101, 202, 207, 144, 120, 149, 142, 66, 156, 91, 36, 79, 80, 0, 229, 32, 54, 205, 236, 236, 36, 91, 129, 246, 2, 56, 230, 106, 175, 74, 6, 183, 66, 219, 206, 18, 140, 150, 65, 6, 146, 82, 162, 188, 10, 211, 109, 1, 110, 245, 133, 218, 216, 36, 25, 21, 84, 119, 64, 154, 14, 95, 149, 97, 201, 150, 23, 56, 138, 201, 249, 36, 245, 214, 44, 83, 52, 32, 238, 57, 74, 165, 33, 121, 130, 238, 164, 90, 168, 164, 108, 219, 90, 183, 118, 127, 233, 209, 12, 128, 143, 53, 54, 252, 243, 52, 90, 115, 36, 51, 106, 145, 249, 182, 79, 36, 71, 227, 211, 66, 163, 66, 126, 75, 203, 245, 53, 18, 152, 91, 143, 127, 97, 208, 122, 186, 54, 217, 119, 73, 165, 211, 171, 155, 99, 68, 254, 208, 144, 47, 54, 240, 31, 44, 142, 9, 88, 31, 14, 193, 160, 225, 140, 60, 17, 235, 172, 10, 227, 89, 182, 15, 54, 223, 209, 76, 118, 90, 30, 65, 131, 180, 240, 121, 96, 117, 150, 179, 60, 137, 124, 33, 22, 232, 4, 226, 191, 251, 200, 6, 112, 189, 10, 185, 62, 136, 227, 81, 10, 160, 182, 168, 127, 23, 53, 244, 102, 20, 130, 202, 192, 230, 167, 169, 81, 163, 117, 204, 103, 56, 146, 62, 45, 105, 60, 14, 22, 180, 94, 195, 160, 116, 17, 203, 28, 19, 106, 205, 106, 22, 7, 254, 212, 198, 72, 234, 155, 177, 107, 61, 9, 84, 82, 100, 107, 234, 59, 252, 212, 243, 192, 60, 164, 120, 119, 58, 36, 120, 116, 35, 14, 31, 124, 185, 229, 60, 0, 177, 8, 206, 211, 19, 52, 236, 14, 188, 226, 231, 206, 129, 1, 174, 125, 246, 230, 54, 139, 16, 4, 151, 51, 171, 25, 89, 44, 68, 90, 137, 203, 160, 250, 202, 83, 15, 89, 149, 188, 99, 104, 22, 150, 23, 123, 254, 166, 189, 179, 28, 50, 143, 111, 30, 113, 81, 114, 216, 154, 77, 160, 47, 193, 171, 128, 90, 220, 167, 74, 238, 154, 119, 8, 72, 8, 173, 59, 46, 215, 83, 180, 4, 174, 140, 96, 2, 173, 38, 203, 115, 221, 100, 13, 148, 73, 193, 32, 125, 251, 139, 227, 97, 94, 17, 89, 22, 152, 66, 105, 243, 38, 115, 16, 89, 148, 187, 225, 36, 25, 186, 58, 231, 160, 56, 14, 249, 229, 180, 117, 120, 174, 45, 248, 202, 208, 116, 144, 240, 118, 184, 115, 20, 206, 160, 58, 2, 73, 166, 189, 253, 177, 168, 146, 251, 235, 139, 230, 75, 118, 140, 18, 176, 115, 183, 56, 213, 224, 125, 0, 12, 40, 12, 57, 39, 69, 97, 234, 15, 85, 212, 3, 200, 75, 249, 91, 181, 176, 103, 115, 249, 79, 33, 159, 2, 62, 60, 72, 203, 188, 21, 37, 84, 92, 174, 100, 102, 227, 33, 175, 61, 37, 245, 80, 3, 53, 224, 245, 79, 150, 125, 227, 118, 39, 2, 54, 226, 218, 40, 25, 5, 158, 228, 81, 248, 27, 58, 176, 173, 92, 128, 80, 223, 236, 6, 184, 233, 124, 96, 28, 83, 255, 82, 68, 72, 93, 207, 96, 24, 10, 162, 234, 181, 68, 36, 70, 208, 216, 210, 184, 174, 124, 136, 98, 134, 99, 5, 187, 45, 120, 220, 38, 132, 57, 170, 37, 34, 176, 130, 222, 166, 75, 117, 20, 167, 162, 129, 59, 128, 225, 170, 215, 101, 242, 141, 1, 222, 45, 47, 28, 167, 242, 110, 242, 139, 122, 241, 21, 180, 215, 69, 124, 193, 67, 218, 196, 194, 226, 138, 93, 108, 220, 80, 45, 243, 2, 43, 71, 31, 37, 217, 68, 3, 3, 24, 36, 34, 188, 67, 180, 207, 198, 183, 79, 150, 57, 67, 205, 87, 241, 72, 202, 82, 236, 192, 248, 154, 17, 151, 105, 3, 70, 255, 87, 67, 92, 5, 194, 60, 110, 254, 113, 248, 234, 17, 28, 80, 159, 205, 32, 235, 41, 195, 2, 18, 7, 213, 180, 232, 68, 6, 212, 100, 115, 165, 236, 197, 51, 133, 39, 139, 165, 213, 102, 202, 254, 33, 15, 144, 64, 123, 99, 97, 148, 29, 104, 68, 247, 171, 9, 99, 148, 70, 195, 51, 171, 191, 135, 3, 224, 230, 247, 249, 216, 253, 34, 111, 239, 231, 245, 126, 248, 79, 234, 94, 170, 32, 249, 128, 168, 14, 165, 117, 146, 93, 37, 196, 96, 113, 220, 240, 147, 128, 138, 252, 22, 203, 180, 208, 27, 179, 80, 103, 222, 15, 237, 191, 203, 65, 27, 237, 135, 132, 165, 126, 71, 51, 50, 46, 160, 24, 107, 182, 71, 30, 242, 237, 208, 11, 139, 212, 50, 1, 217, 69, 151, 54, 183, 97, 49, 32, 203, 9, 82, 135, 92, 220, 157, 148, 128, 156, 176, 32, 253, 12, 68, 244, 207, 20, 224, 154, 46, 204, 45, 186, 106, 66, 9, 99, 174, 225, 196, 83, 215, 244, 74, 177, 219, 181, 77, 149, 233, 189, 44, 204, 34, 15, 55, 58, 190, 247, 64, 50, 99, 249, 49, 76, 189, 169, 161, 2, 247, 93, 165, 225, 44, 54, 192, 130, 108, 123, 177, 108, 122, 84, 83, 31, 37, 68, 199, 255, 147, 15, 127, 138, 48, 209, 237, 114, 44, 145, 50, 119, 109, 9, 163, 163, 226, 185, 164, 28, 174, 81, 250, 96, 124, 182, 62, 12, 114, 174, 6, 234, 164, 40, 94, 235, 70, 148, 11, 55, 170, 192, 193, 52, 224, 129, 49, 148, 211, 80, 143, 155, 82, 254, 41, 136, 82, 248, 243, 229, 133, 1, 51, 33, 54, 20, 180, 175, 140, 235, 81, 195, 24, 232, 0, 160, 134, 32, 221, 140, 150, 29, 245, 223, 235, 187, 77, 123, 253, 148, 110, 39, 146, 97, 48, 3, 7, 88, 80, 58, 46, 23, 158, 83, 170, 244, 135, 12, 194, 138, 189, 164, 175, 163, 173, 141, 205, 192, 80, 133, 58, 209, 11, 13, 114, 122, 109, 95, 129, 212, 250, 142, 254, 180, 67, 47, 32, 10, 190, 184, 83, 137, 39, 120, 135, 237, 215, 27, 198, 62, 200, 200, 233, 60, 248, 220, 104, 88, 254, 23, 94, 183, 125, 25, 24, 43, 94, 224, 85, 17, 38, 162, 190, 174, 57, 57, 24, 155, 27, 229, 131, 184, 57, 72, 57, 250, 55, 97, 71, 24, 132, 64, 153, 44, 36, 34, 108, 247, 2, 203, 56, 212, 117, 60, 167, 141, 48, 17, 174, 51, 228, 232, 169, 192, 216, 186, 127, 35, 177, 191, 231, 168, 176, 116, 199, 10, 229, 0, 122, 29, 241, 161, 116, 163, 76, 55, 65, 52, 209, 27, 120, 255, 184, 91, 45, 153, 191, 145, 223, 220, 245, 218, 128, 226, 221, 88, 157, 179, 121, 1, 33, 133, 141, 164, 170, 119, 180, 137, 36, 22, 9, 8, 185, 48, 154, 87, 197, 172, 93, 38, 1, 229, 36, 143, 185, 118, 190, 119, 135, 226, 42, 201, 164, 120, 234, 112, 233, 153, 212, 86, 58, 110, 3, 35, 252, 181, 32, 207, 200, 222, 253, 125, 67, 226, 244, 45, 253, 149, 203, 46, 116, 53, 7, 51, 180, 232, 144, 70, 135, 155, 253, 121, 149, 49, 151, 201, 52, 80, 49, 236, 11, 161, 5, 27, 146, 38, 73, 112, 168, 160, 176, 73, 205, 217, 134, 223, 65, 7, 179, 231, 41, 167, 46, 67, 43, 102, 168, 188, 222, 72, 49, 74, 93, 195, 10, 42, 152, 82, 9, 69, 170, 225, 188, 199, 175, 56, 255, 123, 37, 198, 253, 79, 98, 65, 113, 18, 74, 31, 235, 172, 80, 164, 117, 63, 36, 6, 3, 205, 251, 56, 255, 74, 142, 226, 2, 203, 23, 219, 222, 90, 41, 244, 186, 238, 10, 198, 62, 106, 252, 225, 95, 38, 11, 21, 149, 205, 87, 114, 155, 136, 210, 191, 87, 62, 251, 214, 117, 127, 141, 121, 7, 28, 42, 21, 211, 21, 239, 16, 210, 134, 254, 12, 227, 179, 65, 239, 98, 207, 49, 230, 138, 111, 222, 123, 104, 227, 178, 54, 83, 93, 164, 130, 115, 231, 46, 62, 60, 241, 244, 113, 196, 59, 14, 163, 211, 79, 255, 121, 213, 46, 32, 89, 96, 228, 50, 103, 35, 95, 250, 224, 25, 73, 150, 98, 183, 165, 230, 16, 102, 127, 62, 80, 188, 246, 105, 207, 22, 116, 52, 30, 109, 216, 43, 80, 251, 214, 178, 208, 105, 163, 177, 106, 196, 86, 91, 108, 128, 89, 160, 220, 248, 78, 144, 160, 136, 4, 170, 155, 75, 50, 75, 138, 117, 91, 177, 50, 24, 76, 155, 183, 144, 187, 67, 60, 35, 102, 77, 42, 126, 35, 250, 106, 249, 114, 14, 194, 168, 248, 149, 137, 229, 201, 42, 164, 8, 34, 60, 36, 240, 0, 190, 77, 51, 233, 174, 220, 4, 168, 28, 47, 45, 123, 181, 53, 240, 14, 199, 48, 137, 104, 34, 40, 112, 169, 248, 230, 152, 99, 104, 130, 255, 227, 0, 104, 233, 111, 124, 121, 223, 87, 25, 9, 86, 233, 181, 47, 108, 8, 47, 249, 76, 211, 76, 5, 239, 141, 53, 237, 188, 32, 180, 242, 242, 200, 119, 140, 154, 214, 111, 158, 189, 51, 137, 40, 83, 35, 214, 172, 175, 132, 112, 149, 26, 5, 188, 38, 63, 226, 153, 8, 179, 219, 194, 136, 101, 129, 171, 34, 214, 20, 206, 172, 43, 99, 131, 79, 255, 255, 210, 204, 146, 50, 108, 75, 241, 100, 113, 59, 167, 151, 90, 113, 246, 63, 125, 164, 113, 106, 191, 227, 107, 252, 226, 175, 155, 76, 170, 235, 45, 36, 137, 201, 219, 120, 240, 192, 36, 160, 8, 236, 87, 88, 130, 55, 189, 117, 21, 237, 177, 47, 160, 178, 28, 249, 70, 16, 23, 166, 224, 31, 59, 112, 204, 237, 61, 127, 122, 75, 36, 242, 89, 152, 34, 70, 114, 26, 224, 13, 109, 124, 142, 231, 153, 135, 215, 200, 106, 3, 106, 100, 134, 237, 176, 114, 68, 231, 42, 74, 112, 90, 164, 75, 100, 160, 227, 183, 212, 181, 108, 100, 232, 5, 190, 99, 159, 218, 191, 227, 64, 143, 198, 55, 83, 206, 189, 137, 188, 0, 6, 147, 253, 140, 62, 226, 84, 140, 212, 22, 88, 182, 240, 32, 105, 138, 8, 248, 197, 222, 10, 181, 246, 64, 7, 170, 20, 121, 171, 206, 205, 128, 142, 185, 143, 78, 77, 84, 169, 181, 214, 197, 187, 98, 95, 234, 72, 71, 0, 88, 9, 106, 138, 116, 119, 170, 60, 19, 38, 90, 129, 159, 135, 73, 134, 154, 220, 200, 225, 184, 185, 113, 213, 80, 89, 255, 87, 118, 47, 48, 212, 155, 244, 110, 31, 59, 106, 202, 27, 195, 139, 124, 198, 18, 79, 199, 13, 187, 139, 20, 183, 8, 14, 70, 210, 221, 173, 61, 64, 197, 159, 230, 28, 192, 111, 58, 197, 130, 152, 129, 179, 139, 206, 238, 33, 169, 139, 140, 223, 39, 14, 218, 75, 231, 126, 72, 94, 23, 81, 198, 104, 168, 26, 173, 53, 246, 232, 177, 5, 255, 135, 70, 153, 28, 85, 230, 2, 118, 229, 87, 169, 222, 175, 191, 68, 149, 236, 113, 152, 174, 207, 44, 48, 99, 112, 122, 61, 114, 165, 8, 180, 77, 10, 107, 230, 70, 197, 0, 113, 76, 216, 26, 16, 87, 73, 207, 223, 18, 42, 203, 120, 11, 99, 137, 9, 57, 201, 55, 237, 218, 172, 133, 7, 133, 161, 97, 116, 237, 38, 91, 129, 247, 43, 106, 9, 103, 14, 81, 18, 232, 118, 6, 203, 66, 141, 85, 211, 53, 227, 250, 117, 42, 155, 31, 140, 18, 83, 0, 203, 64, 46, 92, 90, 228, 207, 139, 249, 224, 124, 206, 39, 52, 185, 10, 58, 98, 105, 232, 59, 207, 237, 170, 187, 245, 80, 208, 168, 154, 213, 9, 60, 72, 66, 114, 200, 91, 81, 28, 230, 133, 1, 94, 108, 199, 206, 13, 91, 123, 125, 139, 218, 220, 165, 208, 162, 29, 62, 77, 149, 151, 173, 111, 119, 99, 41, 96, 152, 59, 141, 201, 90, 23, 55, 182, 35, 246, 113, 175, 102, 10, 130, 194, 114, 86, 41, 233, 9, 178, 93, 142, 50, 174, 83, 152, 66, 96, 246, 4, 51, 163, 186, 76, 21, 173, 75, 15, 146, 38, 167, 188, 162, 108, 36, 130, 183, 130, 41, 225, 209, 46, 130, 116, 149, 33, 25, 114, 124, 148, 18, 51, 198, 19, 194, 174, 240, 22, 158, 87, 190, 224, 163, 60, 24, 229, 125, 145, 248, 252, 163, 155, 47, 216, 248, 38, 105, 40, 6, 7, 46, 207, 143, 134, 119, 78, 104, 61, 35, 204, 113, 126, 141, 106, 36, 109, 231, 171, 35, 11, 37, 193, 92, 189, 205, 64, 216, 2, 209, 95, 28, 18, 165, 15, 86, 145, 39, 218, 23, 138, 101, 154, 199, 187, 165, 191, 60, 122, 59, 190, 10, 58, 240, 62, 67, 144, 71, 89, 87, 221, 247, 233, 175, 120, 205, 218, 24, 242, 170, 199, 13, 119, 130, 92, 157, 29, 17, 190, 162, 48, 31, 176, 99, 139, 209, 173, 151, 97, 222, 167, 240, 210, 219, 86, 180, 18, 196, 98, 123, 114, 242, 233, 166, 92, 225, 61, 37, 179, 110, 167, 33, 242, 150, 103, 105, 73, 132, 50, 221, 39, 142, 125, 95, 236, 144, 118, 7, 113, 172, 126, 236, 16, 79, 23, 119, 254, 155, 131, 83, 50, 5, 69, 120, 165, 231, 234, 0, 22, 24, 176, 193, 76, 137, 108, 139, 249, 237, 105, 160, 6, 29, 194, 39, 157, 185, 162, 46, 35, 35, 179, 57, 41, 251, 83, 1, 42, 17, 177, 229, 207, 122, 56, 201, 171, 128, 223, 17, 78, 186, 217, 9, 41, 69, 130, 47, 67, 105, 157, 154, 46, 119, 142, 167, 102, 115, 96, 231, 144, 202, 225, 207, 35, 192, 26, 109, 19, 228, 208, 98, 225, 203, 4, 151, 8, 255, 242, 59, 216, 228, 80, 211, 134, 76, 249, 120, 81, 162, 120, 164, 130, 87, 254, 127, 99, 59, 7, 1, 218, 191, 147, 160, 235, 128, 127, 8, 214, 251, 230, 161, 116, 191, 199, 240, 163, 182, 118, 129, 147, 87, 156, 176, 77, 98, 74, 215, 186, 122, 123, 80, 19, 225, 65, 253, 37, 122, 227, 173, 58, 73, 138, 95, 225, 102, 129, 66, 118, 93, 192, 155, 65, 154, 7, 231, 91, 110, 107, 130, 41, 225, 131, 99, 99, 197, 235, 123, 62, 118, 154, 103, 41, 28, 248, 39, 247, 64, 20, 224, 229, 200, 213, 68, 201, 246, 17, 114, 37, 153, 29, 159, 44, 28, 36, 246, 249, 135, 245, 147, 178, 53, 63, 82, 135, 236, 185, 1, 127, 115, 60, 155, 91, 40, 181, 114, 108, 216, 197, 207, 214, 186, 37, 242, 51, 2, 23, 158, 77, 136, 219, 106, 27, 111, 76, 97, 35, 182, 10, 114, 19, 190, 109, 253, 253, 54, 206, 135, 217, 90, 215, 50, 161, 186, 176, 143, 156, 154, 239, 52, 18, 9, 206, 133, 64, 100, 201, 37, 249, 117, 189, 157, 18, 132, 212, 141, 33, 182, 7, 99, 154, 160, 170, 148, 253, 105, 17, 83, 160, 117, 182, 120, 216, 241, 144, 176, 223, 228, 151, 120, 213, 1, 9, 102, 48, 227, 245, 179, 18, 177, 135, 228, 142, 18, 203, 77, 88, 46, 164, 142, 99, 31, 179, 252, 146, 80, 205, 112, 32, 168, 79, 187, 152, 92, 89, 201, 61, 118, 18, 117, 140, 199, 169, 31, 105, 60, 26, 195, 199, 130, 182, 245, 99, 38, 194, 22, 240, 164, 60, 58, 5, 53, 195, 17, 110, 38, 176, 223, 143, 223, 156, 142, 90, 228, 24, 135, 118, 224, 194, 230, 149, 208, 38, 232, 236, 29, 255, 92, 88, 47, 186, 98, 128, 33, 69, 129, 67, 145, 163, 241, 201, 221, 79, 165, 159, 227, 233, 191, 52, 52, 213, 130, 160, 233, 176, 220, 57, 18, 41, 3, 130, 14, 4, 16, 64, 67, 68, 160, 213, 223, 239, 17, 109, 11, 200, 226, 94, 55, 195, 19, 103, 148, 195, 130, 173, 69, 90, 92, 110, 120, 190, 96, 43, 13, 112, 239, 155, 162, 79, 231, 180, 65, 15, 212, 111, 164, 212, 219, 11, 16, 48, 152, 71, 209, 233, 65, 187, 146, 221, 161, 133, 59, 216, 231, 229, 159, 83, 134, 74, 55, 232, 129, 195, 202, 151, 167, 92, 85, 132, 28, 153, 133, 182, 48, 46, 207, 102, 252, 126, 37, 49, 174, 222, 120, 231, 167, 238, 200, 46, 210, 179, 147, 231, 96, 236, 141, 159, 92, 171, 180, 62, 28, 145, 30, 144, 212, 114, 193, 18, 140, 1, 200, 206, 18, 153, 215, 251, 200, 2, 46, 8, 128, 76, 161, 159, 212, 246, 223, 246, 206, 22, 255, 2, 210, 240, 239, 87, 225, 62, 219, 70, 244, 55, 14, 252, 50, 156, 36, 121, 151, 111, 28, 83, 95, 188, 250, 243, 181, 235, 173, 253, 103, 246, 243, 39, 11, 73, 254, 66, 1, 74, 80, 252, 40, 26, 107, 130, 185, 171, 79, 56, 250, 249, 8, 225, 192, 103, 129, 10, 63, 23, 230, 65, 11, 33, 221, 187, 6, 70, 17, 156, 34, 178, 254, 75, 118, 202, 208, 65, 164, 51, 172, 151, 37, 87, 151, 49, 215, 186, 122, 133, 176, 23, 5, 212, 117, 132, 84, 125, 148, 52, 120, 63, 162, 115, 79, 24, 156, 207, 173, 253, 202, 229, 252, 45, 87, 77, 211, 129, 96, 15, 186, 87, 231, 204, 39, 99, 125, 6, 151, 254, 255, 229, 70, 182, 95, 171, 90, 203, 41, 39, 90, 44, 122, 151, 126, 208, 215, 114, 37, 39, 185, 145, 54, 168, 10, 14, 84, 194, 57, 48, 53, 211, 82, 213, 99, 38, 72, 123, 253, 213, 132, 249, 201, 25, 219, 247, 200, 19, 195, 198, 173, 87, 90, 14, 132, 203, 191, 230, 195, 170, 143, 161, 219, 220, 173, 97, 63, 25, 155, 253, 136, 4, 24, 151, 121, 57, 32, 251, 109, 237, 115, 33, 176, 65, 248, 142, 183, 11, 60, 64, 203, 26, 22, 17, 48, 145, 46, 65, 248, 241, 94, 194, 171, 24, 93, 85, 110, 48, 91, 116, 255, 245, 116, 105, 75, 180, 207, 12, 149, 108, 215, 82, 90, 235, 245, 101, 232, 134, 193, 92, 75, 98, 246, 202, 5, 141, 97, 161, 232, 250, 39, 46, 30, 189, 162, 184, 21, 115, 241, 106, 94, 213, 246, 30, 85, 31, 66, 19, 112, 93, 253, 240, 42, 133, 250, 235, 20, 237, 235, 184, 51, 175, 33, 44, 232, 176, 24, 135, 53, 209, 93, 97, 238, 87, 4, 67, 200, 251, 3, 223, 125, 147, 109, 1, 239, 60, 117, 79, 209, 37, 138, 112, 174, 142, 87, 29, 197, 195, 251, 233, 243, 223, 249, 148, 62, 245, 36, 57, 156, 246, 58, 68, 92, 139, 45, 143, 16, 17, 151, 83, 157, 236, 115, 245, 212, 22, 64, 243, 1, 127, 154, 135, 123, 185, 44, 112, 121, 226, 233, 157, 150, 70, 95, 31, 96, 8, 18, 88, 249, 113, 242, 152, 216, 31, 243, 208, 8, 165, 101, 196, 225, 237, 206, 26, 239, 170, 109, 49, 237, 187, 7, 138, 213, 160, 123, 80, 17, 8, 206, 68, 20, 17, 113, 113, 113, 40, 158, 90, 77, 30, 198, 20, 188, 17, 77, 149, 13, 176, 141, 82, 63, 107, 40, 141, 176, 122, 106, 43, 126, 187, 229, 31, 147, 115, 119, 85, 246, 214, 242, 237, 234, 251, 16, 43, 198, 125, 43, 128, 160, 175, 31, 180, 95, 255, 170, 221, 50, 224, 195, 1, 105, 104, 101, 30, 6, 39, 61, 24, 62, 17, 254, 62, 14, 15, 32, 184, 149, 214, 86, 155, 38, 71, 187, 79, 190, 130, 25, 248, 13, 38, 197, 167, 98, 28, 174, 250, 67, 171, 252, 173, 230, 34, 174, 100, 20, 173, 26, 35, 112, 123, 62, 250, 250, 241, 55, 124, 120, 224, 95, 63, 2, 206, 95, 115, 199, 89, 128, 166, 5, 73, 163, 195, 173, 235, 126, 206, 70, 103, 94, 76, 135, 120, 92, 32, 52, 39, 214, 25, 205, 42, 82, 250, 235, 205, 26, 228, 84, 27, 246, 35, 152, 61, 91, 144, 167, 6, 32, 148, 93, 158, 130, 48, 153, 107, 89, 161, 187, 197, 171, 21, 134, 39, 152, 103, 154, 42, 225, 77, 156, 85, 240, 19, 44, 18, 242, 251, 40, 211, 145, 230, 191, 38, 182, 184, 221, 87, 72, 129, 143, 231, 9, 140, 225, 23, 91, 59, 197, 108, 254, 95, 126, 205, 89, 8, 201, 171, 229, 251, 158, 241, 72, 245, 164, 92, 27, 194, 72, 255, 244, 12, 159, 233, 184, 196, 191, 2, 106, 188, 185, 214, 121, 42, 54, 219, 75, 97, 233, 241, 145, 225, 241, 94, 129, 163, 254, 253, 28, 254, 35, 95, 207, 33, 182, 181, 167, 255, 216, 236, 131, 202, 184, 218, 7, 197, 225, 119, 227, 167, 9, 195, 190, 24, 229, 53, 26, 85, 170, 162, 42, 17, 206, 132, 174, 112, 31, 84, 124, 0, 23, 64, 172, 177, 174, 41, 165, 175, 74, 252, 148, 87, 143, 15, 233, 67, 229, 233, 180, 115, 21, 212, 148, 227, 158, 237, 88, 164, 24, 126, 170, 9, 239, 213, 120, 254, 146, 219, 193, 230, 113, 60, 189, 26, 183, 216, 245, 180, 187, 80, 100, 210, 243, 254, 181, 106, 64, 249, 245, 100, 44, 235, 227, 69, 168, 228, 45, 0, 117, 224, 62, 61, 68, 223, 213, 251, 35, 206, 144, 194, 216, 230, 219, 25, 49, 109, 105, 199, 239, 95, 209, 128, 200, 33, 26, 137, 29, 229, 242, 43, 29, 127, 231, 159, 132, 252, 184, 170, 252, 166, 162, 227, 173, 94, 181, 7, 80, 6, 246, 73, 33, 110, 152, 198, 229, 133, 47, 219, 194, 27, 31, 4, 183, 192, 33, 192, 235, 98, 149, 50, 114, 133, 180, 155, 163, 166, 28, 36, 172, 69, 56, 223, 116, 146, 237, 65, 231, 123, 177, 220, 35, 34, 238, 48, 48, 188, 170, 95, 133, 239, 215, 56, 126, 122, 237, 91, 66, 187, 100, 63, 32, 144, 51, 94, 82, 26, 184, 20, 23, 69, 153, 250, 178, 36, 175, 45, 47, 0, 154, 179, 132, 139, 85, 202, 147, 170, 47, 244, 93, 76, 148, 93, 77, 25, 232, 40, 206, 85, 182, 89, 200, 44, 53, 211, 48, 103, 20, 140, 165, 76, 3, 247, 109, 79, 47, 7, 17, 70, 170, 143, 65, 252, 141, 181, 191, 102, 26, 27, 24, 36, 214, 49, 143, 51, 41, 90, 61, 115, 204, 124, 192, 46, 145, 237, 202, 72, 132, 37, 55, 164, 225, 111, 227, 114, 166, 134, 9, 195, 221, 176, 94, 167, 17, 200, 87, 211, 101, 204, 234, 198, 111, 179, 3, 50, 113, 211, 173, 163, 71, 56, 31, 61, 132, 113, 2, 225, 188, 56, 141, 250, 5, 157, 182, 8, 209, 98, 53, 123, 139, 9, 65, 24, 30, 145, 125, 139, 191, 167, 23, 148, 112, 239, 227, 91, 96, 178, 210, 241, 177, 8, 68, 100, 3, 90, 237, 28, 127, 103, 146, 198, 109, 142, 169, 162, 16, 91, 136, 133, 248, 21, 173, 168, 168, 140, 230, 199, 140, 139, 155, 97, 177, 175, 199, 188, 173, 56, 60, 201, 104, 112, 83, 89, 13, 205, 218, 95, 111, 213, 204, 130, 115, 162, 30, 71, 117, 5, 167, 3, 57, 29, 194, 96, 177, 136, 160, 140, 161, 10, 1, 76, 62, 134, 126, 102, 77, 19, 134, 130, 169, 69, 6, 73, 62, 235, 70, 105, 215, 46, 117, 152, 177, 55, 78, 53, 44, 224, 225, 208, 196, 41, 28, 191, 107, 1, 230, 106, 68, 15, 188, 185, 243, 127, 124, 104, 24, 144, 32, 90, 17, 121, 10, 240, 96, 98, 218, 75, 57, 91, 107, 73, 184, 180, 104, 138, 223, 26, 60, 35, 106, 161, 194, 62, 205, 140, 38, 186, 248, 196, 228, 242, 101, 210, 46, 93, 226, 84, 46, 194, 76, 94, 15, 140, 171, 89, 22, 108, 216, 89, 219, 220, 48, 243, 178, 135, 148, 255, 176, 50, 178, 161, 114, 2, 218, 119, 9, 229, 71, 236, 108, 185, 36, 121, 143, 214, 148, 233, 232, 153, 70, 229, 221, 164, 110, 196, 254, 173, 217, 64, 50, 157, 96, 162, 105, 156, 155, 241, 105, 143, 214, 130, 120, 223, 205, 199, 1, 51, 131, 208, 12, 84, 101, 130, 12, 137, 75, 89, 50, 231, 101, 15, 73, 197, 89, 192, 244, 203, 30, 189, 138, 55, 100, 78, 188, 92, 66, 158, 173, 193, 195, 0, 14, 163, 225, 186, 167, 16, 244, 73, 19, 22, 168, 168, 225, 86, 13, 212, 250, 195, 191, 145, 47, 110, 3, 140, 141, 252, 210, 183, 166, 163, 185, 229, 231, 229, 133, 253, 135, 92, 170, 154, 2, 76, 105, 236, 30, 112, 93, 227, 67, 82, 140, 23, 80, 212, 80, 3, 62, 70, 119, 236, 232, 68, 192, 243, 55, 42, 97, 147, 72, 38, 104, 157, 203, 137, 153, 67, 197, 78, 240, 145, 47, 115, 70, 220, 150, 134, 97, 197, 209, 111, 136, 134, 102, 208, 53, 196, 208, 38, 21, 85, 132, 12, 95, 158, 127, 65, 47, 25, 6, 49, 203, 20, 223, 219, 135, 12, 71, 35, 59, 8, 201, 249, 61, 222, 80, 252, 9, 144, 216, 4, 57, 229, 146, 56, 109, 65, 73, 14, 212, 55, 224, 209, 29, 234, 229, 223, 164, 109, 207, 10, 88, 33, 235, 239, 176, 36, 192, 176, 221, 161, 172, 225, 149, 254, 42, 97, 208, 97, 135, 170, 91, 252, 185, 249, 215, 122, 44, 190, 175, 210, 114, 252, 152, 28, 173, 175, 67, 184, 31, 47, 231, 237, 247, 119, 114, 223, 207, 244, 152, 143, 121, 72, 194, 143, 213, 118, 81, 225, 220, 78, 250, 184, 129, 29, 85, 195, 7, 212, 151, 142, 137, 94, 213, 83, 153, 179, 39, 183, 210, 202, 97, 153, 73, 106, 74, 161, 120, 128, 9, 239, 228, 195, 63, 75, 96, 68, 151, 86, 158, 242, 231, 125, 120, 47, 110, 158, 89, 183, 208, 217, 126, 143, 240, 126, 247, 168, 176, 250, 39, 90, 96, 108, 141, 43, 156, 191, 165, 173, 176, 29, 4, 159, 198, 54, 189, 190, 62, 139, 18, 54, 28, 216, 144, 230, 203, 86, 252, 100, 153, 249, 121, 83, 146, 221, 234, 70, 108, 210, 227, 46, 241, 52, 103, 138, 36, 173, 33, 23, 149, 6, 109, 31, 190, 18, 253, 140, 129, 70, 41, 107, 54, 188, 68, 24, 93, 141, 154, 173, 121, 234, 190, 126, 235, 150, 81, 100, 181, 74, 221, 150, 248, 26, 253, 123, 2, 19, 127, 85, 88, 30, 226, 104, 226, 214, 190, 95, 21, 171, 45, 113, 138, 231, 54, 66, 99, 149, 62, 38, 82, 195, 23, 68, 20, 47, 26, 161, 192, 67, 42, 35, 61, 103, 127, 201, 224, 118, 246, 238, 165, 249, 52, 102, 30, 12, 87, 79, 49, 47, 10, 0, 79, 98, 169, 192, 182, 21, 11, 36, 104, 133, 207, 68, 121, 17, 44, 151, 43, 78, 28, 242, 128, 223, 191, 116, 191, 161, 2, 68, 78, 50, 201, 215, 55, 25, 51, 247, 225, 69, 212, 26, 111, 4, 78, 132, 199, 44, 57, 181, 208, 227, 164, 102, 190, 30, 221, 46, 144, 78, 56, 245, 31, 152, 216, 243, 242, 224, 6, 174, 161, 77, 17, 9, 111, 244, 182, 170, 5, 89, 44, 59, 231, 79, 48, 85, 120, 247, 18, 26, 203, 87, 53, 191, 119, 193, 27, 119, 133, 130, 50, 156, 23, 211, 107, 114, 105, 18, 159, 159, 169, 154, 16, 180, 7, 231, 24, 16, 198, 182, 200, 134, 8, 12, 104, 146, 254, 173, 162, 151, 140, 91, 123, 78, 199, 74, 161, 79, 61, 184, 187, 145, 74, 118, 236, 133, 217, 37, 191, 137, 250, 254, 225, 237, 140, 119, 131, 201, 239, 204, 107, 235, 1, 170, 74, 244, 216, 232, 235, 157, 218, 199, 121, 128, 74, 168, 105, 203, 74, 149, 243, 181, 44, 150, 53, 146, 203, 22, 131, 159, 84, 250, 47, 180, 68, 90, 215, 64, 75, 218, 72, 188, 25, 133, 23, 12, 145, 197, 137, 222, 190, 155, 49, 90, 129, 136, 229, 76, 162, 97, 34, 159, 115, 159, 97, 110, 75, 92, 200, 112, 132, 8, 52, 66, 149, 125, 22, 68, 252, 144, 133, 69, 82, 54, 186, 255, 53, 17, 181, 29, 51, 120, 175, 178, 106, 114, 207, 137, 100, 180, 103, 173, 209, 88, 145, 135, 170, 12, 213, 56, 166, 42, 171, 255, 185, 14, 62, 102, 135, 134, 107, 136, 48, 139, 236, 140, 26, 146, 6, 245, 231, 87, 242, 206, 187, 221, 113, 226, 83, 19, 1, 67, 104, 211, 173, 99, 214, 39, 24, 41, 216, 164, 154, 211, 193, 90, 82, 66, 52, 61, 221, 137, 97, 29, 171, 124, 118, 124, 72, 125, 197, 47, 251, 31, 42, 63, 55, 100, 86, 239, 4, 251, 33, 235, 87, 195, 16, 68, 210, 33, 128, 254, 112, 47, 47, 35, 64, 253, 188, 56, 28, 83, 121, 156, 136, 240, 221, 217, 108, 71, 20, 85, 68, 21, 135, 87, 63, 221, 124, 133, 149, 111, 111, 158, 211, 137, 255, 137, 116, 165, 111, 191, 226, 42, 111, 224, 125, 34, 241, 201, 117, 136, 89, 147, 164, 160, 75, 249, 252, 54, 115, 41, 131, 212, 110, 156, 86, 170, 109, 224, 126, 247, 236, 250, 224, 220, 52, 150, 230, 178, 0, 129, 54, 232, 254, 153, 239, 135, 56, 77, 185, 93, 184, 132, 14, 51, 132, 53, 15, 229, 232, 130, 203, 75, 73, 70, 198, 140, 129, 1, 0, 206, 230, 240, 47, 103, 246, 62, 169, 241, 58, 219, 159, 246, 138, 101, 87, 204, 182, 179, 148, 93, 16, 172, 2, 227, 181, 128, 4, 217, 210, 9, 32, 150, 54, 141, 115, 193, 66, 94, 233, 230, 157, 91, 160, 16, 108, 219, 185, 247, 97, 155, 25, 85, 172, 145, 120, 91, 161, 179, 217, 223, 94, 78, 250, 217, 152, 138, 178, 238, 23, 54, 44, 169, 23, 26, 215, 113, 106, 192, 120, 140, 76, 222, 185, 194, 152, 166, 165, 229, 217, 241, 154, 177, 157, 230, 207, 170, 240, 100, 95, 82, 138, 70, 8, 187, 15, 165, 41, 196, 216, 254, 230, 136, 15, 109, 201, 49, 56, 185, 181, 108, 246, 64, 227, 88, 45, 1, 200, 22, 7, 254, 164, 8, 137, 26, 179, 196, 188, 152, 102, 55, 48, 202, 104, 16, 164, 46, 222, 57, 127, 179, 177, 14, 75, 100, 172, 196, 52, 216, 230, 21, 195, 22, 191, 127, 5, 113, 200, 66, 155, 106, 240, 38, 64, 163, 247, 114, 18, 81, 47, 201, 220, 158, 72, 73, 168, 6, 76, 122, 67, 82, 35, 148, 21, 64, 246, 0, 86, 33, 82, 90, 200, 207, 57, 135, 240, 75, 170, 205, 163, 169, 59, 66, 107, 152, 187, 197, 248, 12, 150, 139, 12, 169, 119, 115, 91, 179, 144, 5, 159, 239, 151, 103, 190, 221, 180, 185, 248, 156, 27, 253, 12, 243, 168, 184, 19, 96, 96, 101, 249, 67, 153, 112, 225, 153, 66, 100, 211, 181, 118, 127, 231, 154, 254, 99, 87, 248, 176, 166, 236, 11, 84, 97, 120, 89, 211, 128, 145, 160, 111, 182, 124, 97, 95, 91, 224, 53, 145, 253, 8, 143, 165, 107, 159, 93, 46, 18, 98, 195, 39, 180, 209, 197, 91, 168, 245, 97, 81, 71, 11, 54, 153, 10, 207, 250, 150, 7, 185, 253, 119, 154, 218, 239, 252, 250, 234, 246, 41, 118, 139, 164, 243, 125, 8, 85, 12, 110, 117, 176, 18, 69, 25, 12, 37, 33, 135, 240, 250, 60, 207, 151, 65, 221, 196, 93, 195, 240, 247, 152, 140, 224, 204, 88, 38, 103, 105, 219, 123, 25, 217, 54, 138, 214, 109, 56, 142, 90, 84, 100, 214, 29, 201, 80, 34, 87, 89, 102, 242, 112, 123, 205, 104, 71, 50, 186, 207, 25, 162, 135, 143, 223, 198, 165, 254, 0, 69, 231, 51, 123, 50, 186, 102, 18, 38, 124, 181, 254, 131, 21, 173, 133, 174, 88, 232, 111, 70, 88, 131, 161, 144, 8, 116, 117, 226, 191, 125, 227, 220, 14, 35, 110, 47, 142, 209, 25, 110, 167, 86, 200, 124, 61, 200, 241, 173, 42, 98, 17, 199, 190, 41, 133, 171, 212, 49, 217, 79, 3, 84, 164, 157, 118, 243, 56, 190, 158, 209, 117, 76, 227, 227, 113, 204, 57, 117, 100, 29, 182, 251, 118, 140, 203, 6, 87, 1, 199, 184, 94, 149, 245, 49, 85, 74, 212, 108, 42, 16, 99, 14, 242, 155, 185, 157, 54, 162, 42, 26, 150, 149, 78, 101, 61, 99, 81, 80, 160, 130, 127, 127, 2, 126, 92, 94, 146, 45, 91, 87, 147, 177, 250, 239, 236, 152, 127, 193, 42, 19, 178, 111, 46, 187, 114, 225, 143, 73, 207, 100, 87, 250, 68, 210, 63, 239, 243, 179, 123, 208, 232, 191, 5, 110, 29, 54, 250, 69, 60, 195, 63, 160, 90, 175, 241, 225, 28, 172, 170, 65, 84, 9, 174, 184, 148, 60, 157, 249, 145, 152, 216, 219, 133, 236, 233, 130, 166, 136, 161, 183, 167, 135, 77, 199, 247, 156, 234, 3, 251, 229, 195, 111, 161, 158, 79, 25, 12, 54, 211, 68, 116, 49, 27, 145, 37, 190, 102, 216, 248, 33, 6, 9, 114, 210, 126, 95, 165, 179, 51, 68, 136, 71, 199, 172, 158, 108, 181, 111, 102, 117, 207, 27, 139, 160, 9, 94, 108, 107, 4, 170, 4, 38, 48, 101, 76, 161, 231, 68, 61, 198, 10, 62, 236, 89, 44, 61, 69, 235, 177, 55, 127, 189, 243, 128, 185, 71, 116, 69, 235, 208, 129, 243, 200, 90, 128, 8, 172, 239, 72, 31, 75, 204, 178, 243, 5, 186, 2, 99, 82, 245, 69, 64, 31, 87, 85, 100, 101, 111, 1, 130, 241, 251, 41, 163, 59, 190, 96, 134, 185, 211, 203, 134, 74, 4, 23, 182, 53, 249, 183, 171, 181, 27, 28, 140, 104, 69, 48, 159, 26, 163, 31, 93, 194, 68, 254, 227, 153, 111, 142, 133, 176, 130, 50, 238, 193, 89, 232, 127, 135, 160, 240, 87, 183, 221, 37, 156, 48, 244, 186, 181, 159, 116, 26, 81, 131, 209, 7, 211, 210, 66, 250, 238, 135, 136, 16, 135, 58, 28, 46, 189, 43, 115, 230, 57, 31, 71, 173, 237, 70, 218, 186, 178, 143, 93, 45, 123, 95, 159, 35, 243, 98, 149, 206, 134, 91, 239, 4, 171, 96, 79, 155, 56, 115, 38, 61, 131, 138, 173, 16, 74, 241, 131, 26, 8, 64, 32, 6, 208, 156, 125, 169, 153, 57, 214, 145, 176, 254, 208, 93, 59, 32, 57, 238, 56, 204, 75, 23, 41, 43, 187, 232, 91, 97, 1, 198, 185, 171, 235, 67, 124, 1, 71, 97, 194, 95, 219, 71, 149, 54, 180, 206, 222, 224, 198, 205, 191, 147, 123, 106, 0, 202, 54, 164, 56, 76, 168, 82, 9, 89, 55, 80, 213, 248, 13, 92, 75, 201, 76, 117, 227, 105, 164, 119, 178, 153, 44, 64, 168, 255, 57, 193, 100, 105, 106, 214, 208, 12, 221, 11, 135, 219, 219, 127, 144, 12, 180, 100, 194, 122, 177, 214, 204, 125, 45, 238, 128, 200, 198, 210, 146, 152, 9, 133, 55, 60, 85, 57, 123, 248, 224, 61, 233, 24, 229, 176, 100, 180, 117, 13, 140, 55, 29, 109, 48, 148, 65, 117, 73, 146, 13, 229, 213, 88, 163, 154, 19, 132, 36, 132, 233, 115, 177, 20, 128, 185, 73, 189, 63, 93, 156, 123, 160, 148, 126, 51, 55, 26, 50, 65, 158, 65, 67, 194, 246, 115, 228, 246, 151, 4, 63, 206, 113, 65, 2, 154, 67, 187, 235, 225, 211, 105, 220, 125, 64, 96, 59, 191, 218, 192, 127, 104, 203, 21, 94, 1, 225, 115, 250, 25, 46, 40, 103, 144, 243, 157, 159, 147, 180, 183, 190, 200, 31, 217, 242, 212, 245, 204, 6, 96, 159, 215, 227, 132, 180, 7, 47, 19, 224, 71, 25, 133, 66, 30, 161, 174, 221, 81, 82, 111, 189, 194, 52, 22, 182, 227, 18, 28, 204, 10, 70, 116, 4, 194, 15, 168, 79, 85, 197, 214, 191, 88, 183, 86, 153, 170, 143, 64, 5, 115, 215, 106, 62, 247, 94, 254, 143, 21, 154, 140, 99, 139, 138, 119, 83, 123, 105, 139, 158, 141, 86, 158, 135, 17, 132, 234, 43, 128, 104, 119, 70, 218, 62, 84, 42, 85, 34, 2, 135, 1, 183, 189, 38, 186, 250, 65, 8, 208, 29, 143, 228, 166, 212, 101, 181, 88, 170, 178, 100, 110, 225, 139, 166, 235, 198, 167, 12, 175, 169, 105, 229, 146, 222, 105, 60, 231, 233, 129, 188, 63, 52, 13, 208, 168, 52, 0, 34, 108, 54, 77, 101, 4, 87, 94, 211, 146, 135, 87, 191, 72, 232, 159, 115, 169, 175, 189, 108, 233, 119, 16, 230, 203, 136, 225, 221, 227, 172, 101, 234, 182, 151, 40, 132, 142, 107, 247, 189, 145, 105, 244, 143, 72, 67, 247, 60, 213, 35, 112, 85, 1, 127, 70, 100, 110, 95, 168, 128, 41, 114, 142, 52, 146, 45, 224, 173, 127, 207, 143, 2, 104, 70, 165, 56, 2, 5, 157, 134, 101, 225, 74, 4, 132, 183, 157, 54, 229, 139, 80, 248, 33, 168, 118, 251, 25, 146, 46, 228, 77, 200, 53, 157, 55, 192, 22, 190, 169, 129, 73, 94, 123, 49, 18, 79, 83, 175, 77, 11, 241, 103, 63, 61, 30, 14, 42, 65, 31, 169, 222, 237, 129, 25, 136, 99, 231, 213, 140, 147, 188, 100, 172, 111, 19, 12, 194, 167, 10, 199, 77, 230, 25, 33, 110, 93, 6, 194, 243, 221, 38, 69, 90, 103, 188, 66], + [210, 77, 129, 70, 187, 211, 97, 27, 5, 189, 96, 3, 111, 31, 115, 251, 68, 190, 233, 93, 131, 130, 108, 165, 212, 113, 76, 225, 146, 7, 79, 224, 187, 203, 188, 169, 40, 159, 153, 208, 215, 212, 49, 44, 136, 103, 44, 160, 7, 155, 100, 125, 9, 41, 51, 167, 43, 36, 246, 248, 168, 160, 134, 228, 204, 254, 229, 245, 147, 200, 19, 163, 132, 152, 104, 174, 60, 29, 0, 1, 184, 225, 83, 89, 61, 241, 137, 90, 214, 228, 126, 207, 119, 92, 147, 126, 3, 102, 50, 225, 150, 87, 221, 90, 202, 246, 29, 96, 255, 214, 38, 246, 189, 222, 129, 233, 37, 141, 125, 99, 126, 61, 246, 11, 154, 124, 16, 10, 135, 84, 115, 11, 215, 213, 96, 102, 40, 60, 25, 215, 145, 76, 218, 138, 176, 38, 179, 164, 41, 170, 56, 134, 19, 161, 64, 54, 184, 12, 222, 73, 163, 151, 150, 49, 61, 185, 37, 252, 185, 59, 76, 224, 6, 68, 22, 124, 108, 69, 63, 8, 198, 198, 64, 94, 145, 60, 227, 99, 130, 235, 22, 131, 95, 108, 199, 113, 135, 204, 57, 88, 57, 116, 255, 64, 43, 100, 103, 216, 208, 122, 31, 227, 57, 30, 84, 106, 67, 198, 140, 178, 123, 125, 91, 77, 68, 139, 232, 142, 185, 69, 231, 119, 167, 206, 143, 136, 231, 207, 18, 113, 33, 171, 50, 77, 159, 11, 74, 189, 85, 133, 243, 197, 237, 55, 230, 115, 120, 172, 42, 133, 132, 197, 212, 155, 253, 73, 120, 163, 77, 245, 241, 45, 128, 29, 177, 178, 1, 222, 247, 6, 100, 51, 52, 24, 202, 102, 63, 242, 40, 26, 106, 59, 73, 218, 5, 19, 237, 106, 22, 72, 26, 60, 221, 66, 48, 141, 168, 205, 82, 163, 243, 126, 179, 66, 20, 233, 203, 234, 28, 48, 219, 150, 199, 7, 211, 154, 254, 5, 247, 187, 148, 161, 21, 120, 117, 104, 83, 228, 100, 79, 40, 37, 201, 108, 13, 66, 90, 12, 43, 185, 1, 191, 230, 88, 167, 108, 61, 126, 57, 37, 158, 204, 48, 75, 231, 56, 166, 30, 252, 135, 251, 57, 240, 138, 2, 198, 6, 2, 175, 19, 106, 103, 135, 245, 177, 213, 66, 40, 66, 129, 173, 168, 180, 14, 55, 208, 133, 8, 83, 155, 82, 231, 0, 153, 149, 190, 4, 126, 13, 96, 1, 187, 152, 124, 131, 54, 63, 123, 196, 10, 211, 59, 228, 238, 19, 116, 216, 118, 217, 183, 141, 236, 66, 248, 5, 19, 153, 47, 177, 227, 202, 237, 80, 93, 118, 228, 175, 188, 27, 91, 4, 183, 204, 44, 54, 179, 114, 72, 38, 241, 4, 48, 182, 120, 186, 215, 63, 67, 102, 101, 180, 1, 245, 140, 123, 218, 23, 250, 23, 131, 217, 175, 39, 180, 118, 60, 155, 135, 156, 164, 242, 175, 243, 89, 17, 105, 50, 60, 235, 163, 219, 65, 140, 144, 69, 100, 26, 50, 221, 177, 230, 253, 114, 184, 136, 58, 76, 140, 205, 159, 181, 58, 79, 40, 185, 129, 91, 196, 181, 33, 164, 217, 161, 112, 229, 147, 153, 136, 234, 173, 20, 64, 78, 219, 164, 215, 46, 13, 96, 99, 21, 78, 108, 230, 252, 35, 88, 141, 12, 193, 141, 137, 135, 234, 84, 163, 216, 111, 226, 85, 194, 160, 84, 203, 93, 245, 71, 181, 13, 99, 170, 81, 141, 62, 84, 39, 55, 128, 252, 126, 41, 25, 17, 232, 74, 180, 177, 39, 248, 95, 211, 187, 75, 198, 249, 222, 222, 208, 204, 255, 137, 154, 204, 95, 182, 145, 113, 227, 153, 34, 71, 208, 73, 118, 139, 28, 125, 98, 70, 7, 70, 141, 119, 162, 24, 189, 154, 140, 184, 238, 220, 233, 193, 210, 236, 154, 170, 149, 203, 213, 229, 98, 43, 101, 84, 75, 83, 13, 76, 33, 97, 221, 131, 189, 106, 207, 68, 243, 242, 76, 49, 20, 144, 199, 179, 201, 175, 42, 239, 115, 78, 158, 42, 6, 106, 61, 56, 240, 254, 109, 241, 40, 83, 42, 254, 208, 56, 110, 227, 148, 246, 250, 76, 245, 149, 212, 210, 20, 98, 14, 29, 127, 154, 25, 143, 26, 132, 116, 124, 15, 105, 30, 50, 193, 86, 71, 242, 43, 102, 201, 90, 152, 169, 83, 244, 92, 121, 34, 4, 158, 162, 16, 47, 221, 180, 200, 104, 209, 230, 202, 36, 227, 112, 200, 55, 223, 172, 247, 151, 62, 81, 144, 55, 180, 3, 156, 123, 180, 76, 56, 204, 248, 129, 132, 10, 198, 99, 44, 132, 230, 109, 4, 243, 20, 186, 84, 158, 90, 10, 66, 164, 159, 64, 70, 153, 175, 117, 169, 199, 48, 206, 118, 130, 168, 239, 82, 70, 6, 211, 98, 124, 46, 197, 186, 151, 21, 125, 165, 67, 97, 215, 215, 4, 193, 164, 83, 140, 119, 71, 10, 140, 209, 92, 32, 4, 123, 5, 163, 117, 246, 30, 254, 114, 145, 242, 119, 212, 99, 51, 133, 176, 229, 40, 35, 45, 195, 88, 197, 247, 232, 103, 29, 108, 20, 192, 174, 9, 179, 221, 151, 166, 56, 170, 6, 119, 97, 63, 119, 77, 17, 76, 200, 212, 76, 91, 84, 1, 32, 122, 244, 77, 184, 166, 179, 65, 150, 138, 3, 136, 252, 203, 63, 123, 237, 128, 208, 138, 58, 237, 189, 177, 40, 46, 119, 59, 39, 190, 216, 164, 148, 153, 188, 11, 131, 9, 113, 119, 247, 127, 53, 71, 219, 9, 41, 120, 242, 116, 114, 158, 3, 57, 171, 232, 239, 123, 172, 116, 57, 99, 233, 111, 175, 51, 236, 1, 30, 202, 32, 135, 61, 53, 27, 137, 59, 152, 146, 73, 121, 117, 171, 96, 30, 79, 240, 184, 100, 62, 154, 76, 101, 85, 23, 128, 13, 40, 219, 213, 167, 173, 123, 56, 165, 186, 77, 16, 46, 55, 155, 106, 117, 180, 93, 24, 212, 137, 138, 112, 99, 112, 125, 162, 193, 69, 70, 162, 145, 96, 152, 246, 162, 108, 199, 132, 67, 203, 65, 97, 165, 125, 56, 190, 40, 243, 132, 112, 124, 107, 194, 144, 28, 200, 104, 249, 129, 114, 190, 206, 109, 142, 120, 10, 82, 191, 106, 167, 189, 191, 207, 1, 196, 165, 213, 128, 238, 19, 23, 44, 139, 242, 255, 223, 245, 217, 87, 44, 108, 162, 181, 97, 246, 181, 250, 242, 211, 94, 107, 196, 41, 246, 112, 139, 36, 214, 124, 153, 69, 160, 112, 130, 99, 123, 81, 217, 192, 134, 63, 184, 219, 28, 154, 20, 222, 11, 23, 138, 211, 194, 123, 108, 216, 107, 22, 230, 174, 134, 238, 23, 167, 173, 149, 133, 184, 84, 47, 253, 18, 153, 220, 212, 93, 170, 163, 250, 6, 22, 17, 165, 234, 48, 143, 130, 240, 139, 76, 57, 132, 170, 170, 230, 214, 170, 205, 100, 32, 105, 221, 5, 207, 143, 135, 113, 199, 2, 251, 56, 149, 47, 22, 151, 240, 28, 9, 179, 34, 25, 77, 188, 229, 62, 145, 17, 62, 141, 97, 21, 119, 129, 34, 128, 69, 117, 233, 90, 244, 201, 6, 166, 14, 193, 123, 121, 105, 240, 19, 198, 41, 236, 195, 141, 72, 254, 3, 150, 136, 133, 133, 236, 101, 78, 50, 171, 196, 231, 174, 166, 168, 20, 211, 122, 153, 176, 121, 0, 151, 214, 50, 190, 253, 131, 130, 243, 211, 11, 235, 119, 9, 203, 16, 115, 208, 213, 223, 167, 37, 71, 193, 227, 111, 125, 100, 208, 176, 55, 151, 83, 85, 56, 124, 177, 160, 182, 160, 221, 104, 149, 114, 167, 30, 98, 204, 113, 195, 158, 149, 144, 16, 216, 10, 58, 222, 17, 214, 195, 84, 144, 118, 27, 236, 31, 243, 16, 205, 253, 197, 199, 3, 59, 230, 50, 180, 112, 236, 66, 138, 68, 177, 44, 226, 6, 188, 175, 234, 218, 207, 107, 125, 209, 84, 135, 165, 50, 47, 154, 17, 242, 19, 235, 150, 176, 174, 28, 236, 239, 132, 138, 240, 150, 36, 126, 9, 127, 126, 171, 246, 40, 128, 216, 137, 16, 41, 136, 48, 238, 222, 223, 17, 190, 172, 44, 223, 108, 110, 88, 17, 124, 237, 39, 122, 103, 246, 250, 238, 142, 140, 252, 118, 161, 235, 22, 15, 188, 71, 213, 16, 79, 216, 156, 158, 201, 90, 0, 125, 170, 226, 23, 94, 87, 181, 39, 116, 229, 183, 14, 215, 147, 203, 10, 61, 207, 77, 195, 43, 92, 107, 153, 11, 243, 225, 50, 109, 95, 21, 181, 121, 168, 48, 168, 141, 25, 106, 79, 207, 151, 206, 147, 179, 159, 191, 92, 128, 79, 214, 127, 58, 61, 252, 143, 145, 186, 234, 78, 191, 187, 3, 207, 219, 16, 8, 209, 48, 170, 239, 64, 193, 116, 103, 101, 68, 42, 119, 103, 222, 168, 45, 14, 164, 180, 20, 218, 40, 157, 147, 236, 1, 128, 156, 35, 89, 109, 164, 105, 130, 208, 117, 194, 252, 147, 95, 241, 49, 252, 184, 88, 209, 230, 38, 62, 191, 17, 150, 173, 208, 9, 111, 91, 84, 171, 191, 247, 105, 182, 245, 65, 229, 94, 38, 110, 236, 152, 18, 123, 203, 11, 221, 127, 64, 211, 82, 162, 186, 22, 28, 73, 34, 159, 188, 5, 70, 162, 200, 231, 182, 72, 173, 19, 107, 97, 24, 27, 44, 59, 203, 129, 198, 13, 240, 191, 64, 18, 221, 32, 240, 192, 177, 230, 234, 244, 206, 89, 179, 220, 13, 132, 247, 203, 232, 183, 154, 181, 242, 193, 131, 86, 227, 209, 12, 249, 175, 171, 219, 39, 75, 6, 202, 36, 192, 247, 253, 233, 169, 48, 11, 116, 253, 54, 116, 152, 206, 170, 190, 82, 144, 219, 88, 180, 98, 188, 43, 81, 86, 68, 130, 87, 129, 62, 243, 9, 199, 209, 208, 25, 60, 137, 3, 23, 195, 56, 64, 178, 10, 28, 217, 79, 33, 146, 97, 188, 173, 120, 62, 217, 118, 71, 82, 97, 55, 98, 79, 35, 46, 34, 43, 147, 130, 58, 131, 225, 63, 47, 192, 102, 18, 96, 132, 35, 235, 249, 111, 12, 93, 123, 223, 37, 13, 195, 85, 46, 116, 114, 200, 0, 215, 120, 90, 190, 172, 76, 142, 17, 138, 76, 171, 46, 136, 34, 0, 137, 109, 179, 103, 38, 234, 208, 138, 4, 109, 128, 139, 169, 249, 246, 193, 189, 73, 56, 112, 1, 1, 100, 242, 113, 81, 23, 162, 16, 175, 153, 222, 99, 249, 124, 231, 170, 105, 195, 86, 79, 57, 249, 97, 195, 238, 26, 196, 140, 50, 142, 182, 180, 236, 5, 217, 201, 243, 34, 72, 66, 150, 111, 44, 91, 118, 3, 127, 129, 144, 106, 107, 197, 249, 137, 124, 245, 226, 221, 217, 109, 94, 49, 79, 162, 47, 38, 113, 218, 56, 5, 107, 223, 97, 3, 128, 35, 165, 116, 158, 40, 243, 12, 112, 231, 221, 227, 29, 127, 95, 129, 169, 134, 226, 217, 214, 189, 94, 218, 242, 99, 232, 182, 30, 231, 193, 248, 92, 160, 233, 38, 66, 252, 135, 95, 161, 44, 31, 181, 242, 61, 30, 17, 240, 234, 173, 161, 231, 97, 157, 119, 82, 48, 148, 101, 211, 166, 70, 1, 218, 207, 26, 87, 70, 67, 239, 11, 55, 66, 42, 157, 41, 15, 178, 79, 75, 231, 82, 17, 98, 166, 136, 92, 5, 17, 131, 45, 122, 123, 232, 7, 27, 153, 79, 87, 175, 10, 141, 145, 69, 71, 104, 77, 33, 229, 56, 8, 234, 230, 178, 239, 64, 67, 149, 233, 138, 189, 241, 129, 25, 54, 99, 92, 167, 188, 50, 59, 48, 114, 117, 107, 226, 108, 55, 210, 173, 124, 165, 97, 118, 246, 204, 22, 18, 235, 98, 72, 145, 211, 29, 199, 94, 190, 243, 100, 196, 217, 86, 31, 215, 250, 101, 9, 224, 156, 7, 16, 202, 34, 95, 5, 241, 105, 214, 132, 202, 68, 19, 236, 91, 5, 71, 179, 80, 184, 200, 252, 96, 202, 182, 142, 198, 158, 124, 44, 178, 97, 245, 108, 164, 6, 97, 64, 189, 143, 232, 84, 167, 198, 45, 88, 208, 99, 102, 128, 95, 30, 130, 48, 220, 211, 216, 214, 77, 22, 81, 179, 247, 111, 164, 189, 229, 54, 52, 104, 129, 153, 159, 166, 216, 221, 52, 84, 84, 43, 222, 197, 49, 133, 168, 14, 163, 94, 67, 253, 31, 26, 92, 5, 183, 132, 255, 187, 35, 176, 167, 113, 242, 246, 29, 130, 29, 153, 97, 90, 133, 3, 43, 230, 102, 124, 240, 136, 45, 230, 39, 254, 93, 172, 101, 223, 251, 63, 88, 105, 17, 106, 171, 90, 27, 71, 233, 19, 118, 223, 65, 48, 81, 159, 147, 34, 106, 243, 184, 4, 12, 142, 151, 34, 190, 47, 116, 236, 56, 157, 130, 155, 66, 147, 81, 48, 95, 106, 68, 89, 190, 246, 160, 247, 21, 33, 92, 254, 177, 86, 191, 204, 160, 227, 155, 91, 0, 90, 160, 215, 64, 1, 129, 3, 62, 60, 60, 0, 125, 41, 6, 105, 160, 158, 48, 211, 192, 101, 199, 251, 139, 116, 20, 65, 183, 173, 164, 194, 31, 30, 18, 107, 200, 66, 84, 31, 160, 44, 162, 183, 217, 244, 176, 66, 129, 67, 159, 184, 99, 131, 245, 220, 131, 70, 218, 229, 69, 98, 47, 9, 70, 55, 91, 251, 110, 234, 240, 110, 27, 91, 167, 123, 207, 235, 197, 77, 17, 255, 235, 17, 78, 160, 219, 133, 197, 24, 86, 102, 201, 25, 167, 193, 119, 4, 94, 64, 105, 90, 57, 191, 140, 185, 115, 0, 208, 148, 175, 102, 56, 138, 181, 27, 245, 234, 200, 173, 14, 160, 71, 110, 100, 184, 206, 204, 163, 239, 117, 253, 160, 124, 116, 242, 111, 147, 96, 15, 76, 125, 92, 5, 67, 26, 63, 45, 114, 163, 69, 50, 82, 82, 86, 240, 78, 48, 140, 50, 51, 186, 42, 229, 95, 119, 209, 15, 185, 199, 188, 91, 231, 204, 146, 95, 206, 62, 127, 3, 218, 54, 39, 80, 53, 222, 239, 32, 241, 97, 115, 33, 49, 115, 80, 59, 222, 30, 249, 156, 93, 250, 22, 126, 47, 26, 2, 128, 67, 135, 81, 0, 79, 195, 66, 122, 148, 32, 231, 193, 58, 13, 22, 80, 81, 122, 88, 66, 158, 140, 115, 85, 16, 65, 235, 195, 82, 148, 114, 103, 85, 152, 242, 234, 85, 230, 34, 216, 101, 77, 186, 173, 252, 228, 125, 183, 55, 221, 121, 186, 176, 120, 235, 77, 42, 250, 19, 204, 105, 167, 192, 155, 154, 217, 158, 219, 185, 220, 96, 122, 75, 18, 105, 235, 149, 25, 214, 125, 225, 93, 111, 115, 147, 205, 90, 61, 31, 26, 106, 205, 82, 193, 47, 70, 44, 34, 83, 183, 6, 115, 246, 68, 59, 152, 196, 98, 72, 6, 205, 140, 144, 139, 4, 120, 250, 120, 81, 96, 31, 79, 170, 212, 137, 34, 118, 110, 223, 117, 84, 79, 125, 120, 0, 157, 2, 236, 184, 68, 252, 62, 85, 21, 112, 110, 161, 245, 72, 33, 137, 248, 94, 87, 187, 245, 148, 138, 43, 15, 106, 166, 91, 222, 158, 54, 43, 249, 238, 246, 1, 222, 195, 71, 110, 76, 114, 103, 75, 213, 204, 64, 177, 180, 166, 234, 94, 146, 145, 86, 57, 227, 226, 202, 232, 137, 137, 207, 206, 233, 16, 125, 10, 138, 62, 36, 25, 143, 133, 132, 29, 40, 2, 192, 102, 199, 226, 170, 202, 129, 189, 252, 141, 185, 159, 24, 131, 109, 160, 138, 182, 98, 225, 182, 32, 171, 106, 2, 224, 80, 112, 93, 45, 67, 75, 69, 8, 136, 60, 0, 160, 97, 109, 113, 195, 196, 225, 78, 239, 79, 192, 27, 79, 94, 51, 179, 141, 155, 11, 53, 193, 88, 55, 197, 193, 240, 37, 58, 186, 192, 22, 154, 54, 19, 85, 101, 165, 153, 85, 189, 113, 56, 169, 46, 252, 209, 73, 35, 145, 123, 86, 10, 220, 178, 182, 117, 175, 18, 117, 114, 185, 118, 75, 6, 238, 67, 124, 168, 229, 217, 31, 9, 237, 129, 48, 138, 164, 23, 164, 141, 176, 53, 71, 138, 195, 17, 26, 180, 43, 81, 121, 214, 53, 5, 70, 130, 198, 82, 104, 168, 162, 244, 242, 64, 208, 247, 99, 186, 113, 57, 155, 156, 71, 144, 57, 185, 98, 147, 247, 173, 237, 209, 19, 99, 4, 6, 69, 102, 23, 173, 171, 52, 223, 63, 121, 29, 111, 88, 75, 247, 85, 28, 111, 82, 216, 193, 186, 45, 240, 2, 87, 193, 144, 248, 159, 114, 206, 12, 236, 226, 53, 54, 27, 150, 20, 106, 117, 59, 146, 239, 93, 6, 3, 46, 186, 205, 70, 116, 6, 79, 192, 28, 148, 80, 170, 227, 174, 188, 42, 252, 4, 44, 29, 7, 158, 62, 62, 139, 0, 167, 11, 64, 4, 67, 75, 112, 52, 131, 116, 161, 148, 65, 87, 152, 169, 10, 198, 149, 117, 234, 186, 92, 198, 109, 58, 63, 28, 131, 210, 41, 244, 157, 44, 116, 229, 70, 240, 178, 202, 47, 31, 18, 254, 219, 31, 33, 0, 204, 59, 144, 147, 47, 241, 23, 69, 173, 90, 178, 169, 1, 24, 5, 69, 154, 2, 226, 41, 25, 254, 209, 5, 93, 205, 102, 203, 54, 166, 167, 137, 133, 179, 249, 229, 229, 126, 162, 85, 173, 42, 119, 53, 88, 65, 210, 21, 129, 135, 129, 16, 47, 215, 95, 28, 113, 54, 11, 56, 200, 252, 200, 104, 69, 210, 243, 155, 152, 200, 226, 127, 168, 213, 36, 152, 195, 153, 236, 66, 97, 117, 169, 19, 118, 52, 37, 100, 24, 163, 196, 32, 119, 116, 136, 117, 199, 51, 184, 48, 59, 135, 8, 92, 140, 112, 103, 212, 211, 236, 160, 45, 53, 200, 147, 36, 222, 179, 215, 62, 234, 217, 244, 118, 20, 252, 30, 16, 35, 156, 231, 131, 52, 101, 236, 251, 106, 236, 2, 26, 69, 33, 160, 167, 14, 94, 158, 161, 140, 76, 191, 146, 14, 72, 23, 139, 127, 44, 170, 148, 196, 181, 104, 252, 137, 21, 244, 201, 7, 224, 233, 77, 155, 195, 159, 110, 49, 58, 157, 75, 75, 200, 4, 159, 254, 58, 246, 202, 230, 254, 232, 98, 50, 73, 108, 61, 247, 55, 9, 204, 171, 167, 61, 10, 102, 230, 43, 168, 33, 164, 68, 2, 202, 254, 245, 8, 216, 157, 188, 31, 52, 73, 9, 83, 8, 5, 253, 204, 246, 184, 170, 2, 168, 98, 116, 254, 177, 199, 181, 148, 237, 45, 53, 114, 83, 128, 59, 4, 129, 25, 235, 118, 199, 191, 47, 158, 35, 11, 226, 80, 81, 222, 216, 97, 85, 211, 208, 31, 62, 19, 19, 143, 246, 165, 137, 219, 230, 93, 99, 250, 163, 200, 96, 105, 234, 36, 200, 61, 54, 140, 216, 15, 100, 11, 113, 54, 226, 199, 77, 8, 2, 193, 127, 84, 73, 3, 39, 89, 161, 141, 85, 138, 115, 238, 145, 173, 98, 65, 213, 185, 249, 251, 175, 210, 100, 253, 249, 241, 183, 103, 252, 184, 19, 119, 247, 23, 72, 14, 216, 205, 67, 35, 178, 5, 187, 250, 151, 238, 172, 6, 83, 117, 75, 224, 130, 136, 142, 67, 154, 121, 188, 99, 121, 99, 135, 89, 73, 30, 116, 227, 71, 96, 74, 200, 227, 121, 220, 166, 37, 167, 123, 49, 52, 169, 27, 114, 180, 174, 7, 77, 72, 199, 14, 240, 136, 205, 224, 220, 122, 56, 149, 43, 85, 28, 139, 166, 202, 230, 71, 116, 28, 218, 103, 168, 208, 119, 236, 25, 99, 125, 167, 91, 250, 188, 97, 123, 239, 206, 167, 254, 187, 217, 224, 155, 212, 213, 247, 244, 219, 3, 231, 238, 82, 74, 21, 165, 101, 151, 199, 121, 107, 245, 70, 244, 18, 99, 38, 138, 246, 115, 246, 2, 255, 81, 33, 0, 251, 255, 208, 218, 32, 240, 9, 85, 186, 100, 36, 165, 64, 123, 180, 4, 219, 128, 44, 121, 218, 142, 153, 159, 28, 20, 25, 247, 193, 144, 121, 228, 66, 123, 55, 19, 73, 120, 116, 153, 136, 165, 141, 27, 149, 38, 194, 89, 254, 106, 245, 202, 79, 21, 125, 238, 177, 48, 228, 162, 63, 20, 112, 164, 46, 125, 156, 174, 169, 15, 146, 215, 42, 6, 1, 143, 178, 235, 19, 118, 18, 139, 151, 123, 250, 145, 120, 221, 20, 50, 214, 184, 244, 70, 14, 183, 69, 137, 255, 177, 61, 13, 151, 160, 154, 255, 156, 53, 80, 232, 121, 57, 106, 141, 44, 218, 165, 52, 90, 55, 157, 166, 204, 223, 248, 250, 213, 154, 67, 181, 251, 166, 236, 111, 21, 216, 93, 237, 118, 223, 197, 85, 18, 167, 246, 124, 120, 211, 202, 217, 249, 57, 167, 125, 9, 210, 87, 232, 70, 152, 131, 82, 31, 107, 35, 170, 52, 120, 191, 131, 46, 234, 233, 25, 110, 90, 138, 204, 121, 209, 153, 34, 10, 40, 240, 119, 132, 221, 240, 162, 175, 43, 113, 47, 194, 223, 189, 118, 174, 209, 213, 164, 211, 222, 63, 71, 245, 148, 204, 19, 241, 23, 228, 49, 201, 218, 70, 213, 65, 158, 93, 3, 198, 49, 228, 253, 141, 78, 78, 60, 235, 93, 197, 80, 51, 189, 125, 250, 208, 134, 229, 247, 0, 72, 158, 217, 211, 112, 16, 12, 59, 182, 141, 201, 40, 235, 101, 140, 86, 131, 27, 238, 91, 193, 205, 77, 157, 114, 227, 17, 143, 204, 159, 253, 162, 141, 178, 53, 92, 115, 91, 200, 9, 203, 187, 113, 184, 135, 169, 145, 84, 40, 171, 176, 142, 56, 227, 137, 215, 98, 52, 75, 108, 46, 127, 63, 95, 169, 228, 187, 89, 248, 86, 137, 63, 53, 42, 26, 205, 240, 130, 62, 164, 230, 255, 89, 21, 241, 198, 32, 162, 108, 118, 115, 1, 100, 52, 51, 143, 80, 100, 103, 252, 105, 144, 139, 151, 142, 160, 173, 243, 143, 102, 209, 125, 169, 40, 128, 136, 9, 53, 217, 200, 184, 53, 111, 92, 209, 63, 94, 8, 87, 246, 98, 108, 109, 46, 9, 103, 225, 166, 1, 50, 171, 195, 173, 45, 190, 236, 26, 43, 41, 243, 207, 248, 59, 15, 39, 110, 96, 121, 5, 129, 2, 76, 13, 155, 251, 134, 32, 133, 114, 207, 205, 17, 215, 135, 64, 171, 157, 218, 84, 164, 62, 117, 201, 177, 23, 86, 21, 46, 106, 125, 86, 102, 98, 152, 189, 45, 233, 39, 216, 244, 31, 153, 202, 156, 7, 58, 242, 144, 105, 204, 108, 229, 33, 140, 116, 217, 106, 94, 204, 235, 90, 28, 254, 21, 110, 16, 106, 20, 189, 217, 145, 38, 4, 80, 19, 237, 101, 55, 228, 92, 38, 101, 6, 28, 47, 243, 233, 186, 73, 222, 12, 93, 166, 126, 27, 252, 251, 86, 230, 32, 170, 48, 104, 138, 54, 206, 198, 167, 235, 190, 249, 216, 45, 80, 35, 93, 146, 136, 19, 93, 197, 79, 72, 225, 156, 153, 178, 205, 169, 160, 6, 153, 228, 205, 211, 151, 56, 157, 241, 195, 211, 6, 162, 113, 124, 247, 179, 65, 18, 90, 120, 8, 34, 101, 118, 167, 6, 62, 198, 143, 7, 108, 149, 18, 218, 216, 218, 209, 44, 231, 175, 58, 24, 16, 148, 180, 9, 16, 175, 230, 170, 64, 88, 60, 54, 14, 6, 80, 225, 156, 104, 135, 176, 194, 106, 125, 242, 9, 140, 112, 24, 96, 143, 98, 18, 101, 66, 9, 30, 214, 210, 168, 17, 153, 207, 230, 59, 248, 151, 179, 220, 104, 202, 250, 39, 10, 180, 204, 81, 193, 25, 125, 232, 117, 28, 7, 228, 165, 119, 131, 71, 46, 17, 57, 158, 86, 174, 140, 60, 244, 81, 214, 182, 157, 238, 220, 195, 171, 135, 68, 206, 141, 20, 204, 66, 160, 15, 28, 255, 92, 123, 212, 18, 147, 160, 21, 51, 191, 181, 169, 130, 245, 65, 138, 177, 244, 91, 61, 37, 25, 64, 193, 37, 20, 179, 148, 26, 41, 170, 143, 114, 235, 59, 25, 48, 46, 150, 171, 177, 28, 174, 139, 230, 48, 134, 13, 53, 175, 145, 128, 60, 81, 45, 72, 39, 251, 237, 62, 178, 22, 186, 130, 245, 61, 183, 220, 14, 169, 77, 92, 195, 67, 54, 163, 214, 108, 123, 43, 137, 27, 58, 180, 58, 147, 207, 103, 169, 158, 226, 105, 117, 41, 110, 236, 48, 225, 198, 25, 75, 71, 95, 56, 21, 83, 162, 211, 158, 153, 246, 126, 162, 97, 130, 87, 7, 50, 213, 186, 62, 36, 95, 7, 163, 32, 78, 94, 189, 23, 213, 93, 189, 183, 46, 138, 132, 147, 66, 204, 189, 224, 210, 126, 10, 95, 155, 8, 29, 68, 5, 51, 229, 131, 192, 0, 230, 50, 58, 91, 4, 55, 0, 156, 229, 205, 141, 112, 193, 195, 140, 18, 118, 97, 23, 156, 67, 73, 96, 36, 151, 216, 79, 19, 229, 100, 209, 78, 183, 229, 160, 169, 162, 37, 129, 149, 11, 250, 183, 202, 83, 15, 236, 208, 231, 170, 138, 32, 222, 101, 184, 208, 92, 119, 225, 238, 177, 141, 245, 162, 174, 136, 1, 211, 92, 228, 51, 224, 20, 143, 108, 158, 241, 117, 58, 83, 122, 75, 236, 85, 118, 195, 161, 170, 63, 45, 219, 187, 95, 91, 65, 53, 51, 246, 172, 189, 241, 40, 188, 210, 170, 125, 54, 114, 79, 224, 148, 235, 28, 247, 57, 202, 245, 188, 167, 176, 137, 2, 49, 106, 252, 247, 214, 107, 111, 132, 96, 98, 8, 62, 125, 167, 105, 224, 26, 58, 163, 183, 94, 195, 248, 193, 167, 88, 46, 193, 124, 88, 242, 150, 41, 124, 36, 215, 61, 182, 77, 254, 110, 224, 134, 83, 166, 149, 151, 150, 93, 217, 225, 49, 227, 91, 140, 167, 124, 121, 127, 127, 4, 45, 108, 215, 100, 133, 129, 191, 70, 57, 102, 208, 21, 238, 167, 15, 215, 29, 255, 121, 140, 212, 70, 13, 139, 109, 190, 188, 225, 96, 101, 144, 149, 115, 107, 105, 79, 243, 206, 87, 234, 164, 204, 223, 198, 228, 151, 29, 44, 155, 17, 84, 27, 68, 156, 196, 240, 23, 166, 71, 68, 221, 107, 244, 201, 224, 51, 73, 165, 84, 10, 96, 236, 104, 62, 10, 157, 31, 185, 202, 119, 89, 220, 13, 79, 251, 218, 178, 203, 252, 155, 44, 44, 54, 36, 248, 98, 160, 6, 84, 139, 118, 122, 244, 137, 208, 49, 48, 130, 147, 209, 95, 219, 10, 93, 143, 101, 48, 78, 138, 6, 77, 234, 201, 88, 220, 34, 136, 124, 99, 132, 45, 249, 255, 226, 241, 215, 87, 211, 67, 49, 121, 239, 155, 182, 30, 200, 215, 132, 246, 98, 141, 21, 97, 111, 237, 28, 13, 12, 76, 29, 64, 113, 46, 23, 9, 14, 44, 143, 239, 252, 237, 64, 11, 254, 139, 44, 65, 17, 167, 249, 160, 204, 25, 196, 215, 215, 49, 81, 152, 195, 55, 105, 234, 24, 57, 236, 185, 143, 54, 101, 173, 2, 117, 202, 31, 157, 132, 112, 188, 61, 6, 225, 42, 51, 58, 163, 213, 238, 15, 37, 34, 93, 120, 248, 63, 53, 47, 9, 236, 242, 138, 134, 92, 157, 46, 116, 191, 226, 58, 49, 105, 41, 228, 138, 107, 153, 59, 143, 225, 46, 253, 184, 204, 127, 38, 101, 107, 166, 8, 28, 219, 44, 158, 11, 3, 181, 86, 180, 83, 92, 144, 66, 172, 243, 228, 194, 200, 72, 94, 68, 159, 33, 67, 236, 220, 114, 13, 210, 146, 203, 209, 179, 153, 131, 106, 87, 68, 73, 37, 77, 214, 197, 18, 36, 239, 165, 150, 237, 123, 60, 94, 29, 191, 236, 66, 32, 66, 7, 57, 237, 137, 13, 234, 124, 53, 19, 27, 212, 77, 188, 131, 193, 253, 133, 119, 72, 170, 77, 37, 95, 145, 244, 229, 77, 231, 131, 141, 200, 26, 79, 247, 253, 212, 232, 184, 140, 139, 93, 205, 112, 251, 38, 66, 217, 12, 137, 123, 93, 174, 32, 214, 197, 170, 127, 19, 118, 220, 80, 107, 203, 76, 216, 83, 172, 248, 233, 3, 216, 156, 10, 244, 242, 191, 161, 140, 127, 147, 180, 82, 93, 41, 232, 81, 128, 109, 33, 224, 250, 187, 187, 57, 166, 234, 108, 154, 192, 187, 63, 111, 252, 242, 105, 57, 163, 68, 127, 163, 67, 139, 180, 115, 252, 105, 70, 64, 237, 254, 170, 8, 252, 218, 40, 211, 52, 50, 41, 243, 62, 181, 0, 219, 139, 244, 186, 83, 141, 158, 234, 232, 96, 194, 244, 175, 68, 146, 85, 232, 68, 173, 55, 11, 103, 74, 199, 151, 241, 26, 2, 248, 247, 203, 61, 220, 238, 105, 98, 133, 121, 31, 170, 119, 206, 108, 33, 192, 32, 252, 81, 94, 172, 97, 236, 126, 139, 62, 12, 162, 233, 244, 10, 200, 3, 225, 136, 221, 119, 67, 190, 170, 10, 168, 7, 184, 5, 141, 245, 195, 48, 155, 195, 111, 205, 94, 168, 165, 135, 116, 246, 176, 123, 36, 72, 142, 250, 82, 212, 198, 47, 38, 61, 126, 62, 216, 208, 80, 167, 224, 166, 199, 125, 40, 0, 203, 173, 2, 166, 132, 60, 175, 235, 235, 171, 39, 165, 121, 65, 81, 50, 10, 64, 44, 231, 250, 217, 37, 35, 10, 144, 184, 36, 243, 178, 183, 71, 88, 201, 114, 81, 210, 123, 55, 84, 237, 117, 251, 176, 12, 93, 176, 199, 131, 61, 8, 240, 134, 92, 33, 237, 202, 43, 29, 57, 13, 108, 116, 97, 254, 108, 175, 25, 154, 104, 107, 47, 170, 230, 47, 27, 197, 189, 236, 231, 45, 69, 142, 82, 134, 110, 226, 235, 14, 17, 63, 105, 16, 147, 251, 155, 195, 131, 70, 240, 149, 152, 196, 153, 250, 108, 159, 92, 224, 172, 225, 131, 87, 185, 200, 65, 154, 212, 240, 56, 9, 141, 83, 215, 106, 34, 205, 224, 118, 249, 86, 209, 253, 52, 233, 76, 54, 140, 108, 161, 214, 8, 123, 110, 170, 224, 25, 170, 99, 74, 68, 134, 11, 37, 47, 43, 116, 162, 188, 89, 52, 66, 183, 201, 185, 180, 176, 177, 177, 59, 40, 193, 214, 52, 152, 173, 46, 111, 221, 176, 20, 167, 2, 175, 171, 180, 78, 238, 240, 171, 187, 234, 148, 52, 169, 148, 2, 121, 162, 83, 82, 171, 61, 175, 186, 216, 220, 76, 199, 156, 162, 66, 18, 245, 228, 41, 240, 125, 38, 99, 227, 115, 134, 161, 77, 58, 50, 189, 245, 90, 3, 93, 197, 162, 145, 79, 61, 68, 58, 234, 108, 130, 142, 58, 119, 41, 141, 22, 174, 128, 197, 194, 49, 9, 193, 19, 229, 203, 19, 200, 118, 244, 78, 135, 79, 42, 217, 31, 175, 9, 152, 153, 58, 248, 126, 69, 188, 249, 194, 22, 89, 27, 252, 228, 55, 129, 236, 46, 166, 26, 251, 30, 95, 178, 70, 97, 219, 154, 149, 20, 119, 200, 48, 163, 250, 62, 43, 158, 149, 208, 222, 245, 157, 143, 179, 251, 80, 63, 19, 150, 177, 27, 72, 255, 121, 202, 92, 5, 182, 68, 37, 118, 57, 33, 206, 105, 252, 153, 139, 252, 156, 192, 212, 35, 74, 0, 99, 47, 62, 219, 158, 22, 71, 196, 155, 159, 180, 108, 94, 154, 45, 127, 102, 224, 214, 25, 102, 112, 166, 65, 145, 105, 45, 103, 33, 170, 145, 2, 190, 164, 57, 76, 38, 60, 87, 35, 196, 57, 21, 212, 122, 129, 182, 93, 18, 97, 121, 62, 248, 32, 73, 138, 249, 156, 195, 146, 205, 247, 129, 120, 133, 145, 195, 159, 101, 159, 178, 110, 100, 43, 174, 25, 233, 169, 187, 187, 199, 200, 43, 84, 190, 254, 21, 45, 70, 127, 230, 20, 181, 233, 75, 12, 237, 3, 5, 187, 89, 51, 99, 112, 189, 67, 52, 139, 171, 0, 140, 222, 197, 247, 200, 232, 110, 172, 120, 210, 9, 138, 65, 251, 161, 43, 127, 170, 141, 149, 203, 93, 231, 150, 32, 31, 22, 189, 107, 18, 137, 112, 84, 14, 170, 255, 206, 249, 237, 62, 18, 85, 18, 32, 237, 132, 36, 107, 189, 34, 141, 201, 243, 47, 114, 149, 69, 221, 239, 55, 214, 214, 102, 176, 38, 89, 53, 251, 54, 247, 154, 190, 109, 125, 208, 25, 237, 56, 54, 59, 42, 241, 79, 75, 161, 16, 44, 67, 17, 30, 141, 53, 211, 26, 140, 1, 226, 245, 171, 197, 138, 13, 110, 221, 126, 207, 34, 7, 66, 202, 19, 168, 152, 180, 93, 73, 214, 83, 120, 81, 106, 23, 67, 122, 63, 101, 214, 173, 161, 174, 75, 142, 16, 1, 185, 240, 13, 73, 87, 42, 107, 28, 208, 228, 67, 182, 197, 255, 251, 216, 227, 227, 24, 47, 69, 75, 231, 56, 167, 78, 125, 92, 65, 187, 231, 58, 40, 55, 253, 47, 97, 92, 227, 127, 45, 175, 224, 45, 180, 202, 74, 29, 246, 98, 7, 117, 79, 12, 134, 161, 159, 199, 62, 200, 181, 130, 60, 73, 177, 132, 229, 85, 153, 254, 109, 128, 115, 139, 26, 55, 101, 117, 116, 56, 203, 239, 104, 152, 201, 180, 211, 120, 124, 26, 180, 208, 194, 208, 65, 17, 65, 231, 12, 65, 195, 136, 65, 232, 75, 140, 84, 33, 145, 202, 227, 5, 230, 230, 66, 29, 255, 93, 77, 243, 242, 5, 7, 92, 210, 71, 212, 62, 237, 83, 242, 87, 114, 171, 187, 174, 32, 150, 69, 214, 201, 180, 112, 93, 151, 39, 93, 113, 47, 24, 198, 232, 116, 53, 211, 217, 129, 177, 253, 4, 156, 233, 3, 59, 66, 91, 238, 236, 97, 187, 152, 68, 208, 83, 8, 34, 157, 7, 106, 10, 94, 133, 190, 37, 135, 189, 146, 82, 197, 156, 222, 63, 204, 22, 220, 72, 231, 42, 226, 229, 33, 89, 41, 54, 123, 9, 237, 218, 39, 241, 137, 141, 244, 49, 164, 73, 180, 118, 213, 87, 173, 100, 153, 98, 185, 235, 160, 237, 83, 129, 110, 37, 6, 147, 133, 56, 241, 168, 139, 25, 79, 157, 217, 59, 152, 25, 12, 194, 5, 95, 172, 109, 101, 142, 205, 3, 202, 149, 20, 23, 0, 6, 159, 161, 211, 60, 34, 153, 118, 216, 144, 104, 158, 219, 81, 235, 134, 7, 237, 12, 10, 15, 233, 94, 177, 154, 80, 121, 251, 226, 30, 255, 7, 189, 164, 246, 172, 235, 132, 211, 74, 244, 103, 67, 32, 216, 51, 154, 54, 53, 32, 81, 156, 187, 57, 41, 222, 218, 169, 139, 100, 33, 194, 241, 9, 142, 32, 177, 136, 7, 139, 93, 8, 120, 202, 61, 52, 34, 241, 153, 127, 156, 23, 27, 101, 205, 140, 82, 85, 159, 160, 73, 237, 25, 83, 105, 126, 39, 221, 133, 20, 173, 199, 74, 168, 253, 7, 252, 21, 166, 13, 143, 179, 77, 110, 88, 102, 81, 155, 248, 139, 102, 37, 119, 180, 215, 130, 31, 170, 211, 255, 132, 198, 26, 217, 66, 43, 100, 164, 132, 201, 138, 180, 61, 47, 8, 20, 199, 127, 5, 229, 164, 234, 140, 132, 148, 60, 94, 147, 242, 92, 140, 234, 237, 2, 59, 231, 68, 48, 156, 90, 213, 107, 210, 68, 234, 103, 95, 206, 2, 125, 209, 22, 168, 239, 219, 76, 46, 79, 204, 140, 95, 66, 196, 160, 76, 191, 90, 71, 10, 165, 9, 254, 149, 103, 255, 238, 152, 163, 171, 247, 56, 136, 180, 206, 101, 130, 80, 175, 242, 48, 12, 171, 91, 130, 130, 64, 68, 29, 98, 142, 64, 139, 52, 222, 97, 123, 142, 166, 93, 174, 89, 206, 203, 244, 76, 151, 241, 39, 249, 255, 47, 36, 136, 151, 71, 167, 12, 74, 161, 223, 178, 140, 173, 55, 113, 59, 33, 232, 30, 85, 230, 62, 24, 113, 65, 113, 177, 215, 84, 158, 75, 237, 198, 104, 94, 95, 133, 128, 58, 85, 123, 119, 243, 108, 164, 19, 154, 75, 223, 152, 34, 246, 14, 40, 113, 130, 128, 102, 30, 136, 78, 83, 207, 254, 51, 208, 94, 71, 250, 136, 118, 121, 223, 231, 234, 204, 249, 206, 148, 57, 66, 24, 118, 89, 87, 115, 0, 68, 150, 133, 202, 117, 174, 105, 41, 251, 64, 107, 55, 36, 3, 74, 98, 47, 224, 183, 244, 141, 23, 93, 161, 150, 211, 209, 166, 157, 196, 173, 229, 204, 37, 75, 134, 156, 25, 118, 149, 201, 241, 238, 116, 236, 252, 13, 17, 177, 173, 166, 231, 185, 205, 219, 230, 45, 251, 40, 18, 148, 195, 253, 166, 131, 92, 72, 65, 40, 215, 173, 221, 203, 35, 146, 209, 83, 110, 47, 6, 123, 6, 233, 182, 200, 200, 166, 220, 147, 47, 224, 37, 203, 170, 51, 198, 181, 69, 191, 95, 181, 143, 218, 116, 243, 218, 242, 12, 95, 44, 87, 7, 89, 27, 232, 240, 68, 43, 180, 205, 110, 161, 4, 33, 242, 42, 154, 166, 148, 239, 110, 16, 64, 150, 234, 161, 255, 103, 0, 76, 181, 234, 189, 25, 4, 77, 255, 10, 57, 145, 126, 232, 214, 234, 223, 28, 2, 175, 179, 3, 86, 224, 88, 80, 40, 218, 241, 162, 16, 2, 188, 223, 75, 155, 99, 194, 238, 140, 50, 172, 2, 101, 10, 119, 44, 240, 222, 55, 156, 78, 40, 31, 73, 3, 61, 109, 247, 130, 128, 11, 123, 203, 125, 174, 174, 148, 23, 179, 22, 233, 130, 61, 25, 237, 26, 163, 149, 90, 27, 130, 152, 36, 128, 75, 204, 93, 117, 23, 104, 175, 213, 145, 205, 225, 39, 219, 57, 161, 136, 47, 19, 158, 164, 159, 245, 118, 149, 254, 84, 7, 196, 43, 70, 118, 208, 237, 211, 112, 180, 71, 98, 229, 2, 219, 9, 25, 37, 155, 48, 81, 226, 10, 91, 35, 217, 124, 64, 9, 97, 251, 133, 163, 129, 139, 18, 174, 61, 230, 132, 132, 176, 106, 138, 32, 125, 80, 92, 28, 143, 188, 141, 174, 99, 16, 32, 22, 113, 142, 127, 243, 153, 233, 255, 4, 126, 109, 110, 99, 236, 60, 39, 210, 63, 12, 58, 202, 147, 67, 148, 94, 173, 136, 94, 130, 155, 11, 24, 19, 183, 248, 113, 9, 86, 47, 58, 95, 128, 226, 68, 160, 69, 111, 26, 203, 208, 221, 197, 123, 48, 82, 41, 254, 218, 143, 229, 0, 17, 187, 80, 123, 16, 36, 174, 92, 186, 212, 21, 113, 94, 219, 168, 93, 28, 111, 19, 50, 150, 104, 84, 36, 209, 252, 37, 201, 121, 192, 204, 23, 215, 107, 68, 101, 102, 191, 221, 66, 184, 17, 33, 73, 52, 88, 166, 226, 173, 245, 53, 19, 53, 227, 121, 82, 158, 109, 217, 209, 159, 150, 39, 60, 156, 247, 70, 202, 181, 149, 236, 49, 232, 76, 70, 228, 45, 117, 5, 241, 41, 19, 94, 3, 129, 81, 158, 104, 162, 4, 70, 206, 116, 93, 72, 168, 88, 243, 246, 216, 102, 41, 244, 255, 192, 229, 55, 75, 22, 104, 88, 226, 138, 61, 14, 65, 29, 13, 181, 162, 118, 222, 245, 179, 54, 255, 191, 146, 244, 10, 147, 233, 150, 230, 120, 159, 63, 90, 189, 205, 57, 140, 251, 121, 58, 55, 129, 99, 224, 142, 31, 251, 152, 83, 72, 164, 89, 87, 184, 98, 174, 204, 142, 161, 109, 153, 3, 74, 95, 109, 50, 183, 111, 125, 224, 150, 52, 246, 212, 237, 128, 27, 85, 219, 149, 195, 70, 153, 255, 95, 203, 109, 160, 173, 190, 189, 62, 51, 191, 226, 12, 213, 64, 236, 70, 84, 149, 181, 246, 133, 192, 76, 246, 52, 172, 98, 6, 3, 147, 249, 153, 216, 83, 229, 157, 249, 200, 160, 16, 119, 123, 131, 42, 105, 102, 45, 207, 45, 192, 214, 124, 188, 62, 233, 252, 111, 12, 97, 157, 121, 174, 201, 225, 132, 190, 53, 72, 54, 242, 174, 217, 63, 134, 161, 92, 150, 20, 5, 138, 112, 218, 189, 239, 53, 200, 253, 145, 23, 193, 59, 23, 142, 240, 211, 103, 74, 3, 34, 7, 109, 19, 135, 206, 171, 242, 103, 153, 105, 74, 252, 179, 150, 38, 21, 210, 37, 73, 105, 190, 39, 173, 120, 179, 9, 249, 55, 130, 104, 228, 121, 145, 91, 75, 100, 236, 196, 86, 213, 101, 170, 253, 230, 206, 29, 15, 154, 76, 245, 52, 27, 144, 126, 16, 102, 175, 146, 129, 44, 25, 53, 14, 65, 32, 216, 185, 73, 152, 99, 232, 167, 236, 168, 247, 181, 192, 244, 173, 3, 182, 20, 76, 69, 185, 213, 168, 117, 237, 136, 105, 167, 14, 63, 96, 186, 2, 127, 184, 121, 217, 167, 172, 181, 236, 28, 47, 200, 230, 92, 160, 55, 121, 16, 191, 154, 112, 178, 6, 203, 93, 119, 211, 177, 162, 152, 62, 51, 23, 86, 174, 89, 105, 114, 30, 57, 137, 167, 30, 230, 109, 159, 167, 199, 32, 114, 143, 62, 150, 28, 253, 223, 200, 34, 189, 130, 33, 224, 16, 44, 174, 221, 19, 201, 135, 152, 40, 72, 230, 40, 122, 238, 110, 17, 183, 177, 236, 6, 56, 241, 192, 123, 135, 194, 60, 101, 43, 237, 127, 40, 28, 232, 127, 106, 203, 55, 226, 107, 210, 157, 44, 143, 144, 177, 67, 159, 138, 95, 26, 141, 180, 58, 218, 81, 31, 178, 128, 9, 179, 167, 140, 47, 198, 188, 144, 100, 87, 28, 211, 1, 44, 192, 89, 198, 164, 174, 16, 29, 5, 237, 173, 180, 108, 3, 15, 58, 41, 60, 40, 253, 27, 46, 155, 158, 219, 227, 211, 74, 137, 50, 87, 15, 225, 19, 35, 149, 26, 180, 211, 104, 24, 89, 7, 243, 112, 65, 64, 201, 139, 40, 213, 226, 107, 156, 120, 169, 138, 236, 33, 103, 8, 243, 27, 99, 174, 54, 110, 79, 226, 116, 49, 16, 33, 36, 134, 71, 78, 233, 19, 180, 249, 240, 33, 198, 7, 134, 49, 179, 144, 220, 155, 244, 208, 125, 84, 137, 104, 178, 123, 134, 214, 212, 89, 15, 181, 168, 66, 20, 155, 40, 249, 3, 191, 220, 236, 248, 246, 109, 170, 31, 163, 1, 15, 138, 237, 107, 179, 191, 76, 247, 210, 76, 18, 33, 49, 145, 134, 199, 24, 227, 226, 118, 183, 107, 64, 39, 127, 30, 204, 247, 187, 242, 236, 77, 148, 201, 152, 109, 156, 189, 12, 228, 19, 152, 229, 13, 221, 166, 249, 73, 13, 149, 53, 147, 180, 0, 239, 231, 58, 24, 179, 47, 87, 158, 116, 213, 129, 182, 47, 112, 126, 103, 141, 226, 206, 226, 150, 92, 32, 119, 200, 22, 9, 201, 239, 115, 77, 98, 80, 137, 28, 219, 210, 196, 50, 190, 75, 253, 46, 213, 106, 163, 243, 180, 79, 60, 42, 140, 21, 164, 17, 219, 20, 10, 4, 237, 81, 62, 122, 68, 241, 7, 175, 228, 214, 143, 33, 178, 31, 109, 247, 182, 212, 4, 144, 84, 125, 221, 185, 240, 99, 193, 226, 140, 129, 197, 206, 4, 241, 155, 21, 8, 48, 224, 69, 128, 181, 79, 66, 91, 171, 86, 149, 47, 222, 211, 149, 41, 113, 170, 172, 159, 180, 35, 234, 21, 151, 146, 226, 83, 243, 151, 180, 237, 23, 146, 191, 7, 253, 177, 93, 146, 177, 127, 29, 25, 21, 140, 128, 168, 90, 248, 84, 240, 93, 122, 20, 84, 41, 179, 52, 84, 235, 31, 194, 156, 29, 147, 109, 239, 165, 81, 251, 139, 128, 185, 178, 213, 107, 234, 165, 241, 183, 215, 182, 136, 212, 155, 81, 58, 34, 184, 7, 65, 140, 26, 83, 70, 236, 183, 147, 136, 74, 9, 33, 212, 162, 177, 93, 200, 147, 102, 15, 25, 76, 17, 218, 28, 207, 29, 25, 180, 17, 32, 198, 44, 71, 13, 38, 107, 158, 120, 141, 163, 84, 78, 122, 119, 153, 6, 67, 55, 205, 216, 49, 250, 84, 216, 226, 166, 68, 192, 114, 110, 255, 249, 125, 191, 215, 49, 247, 48, 199, 134, 46, 15, 31, 64, 24, 60, 94, 107, 206, 113, 31, 93, 238, 92, 51, 42, 178, 203, 29, 83, 95, 42, 210, 242, 133, 233, 43, 237, 10, 108, 29, 100, 247, 83, 94, 68, 234, 5, 139, 43, 164, 96, 102, 231, 35, 218, 114, 67, 80, 202, 138, 213, 18, 103, 251, 75, 206, 77, 91, 152, 189, 13, 169, 107, 235, 143, 250, 83, 221, 238, 250, 105, 147, 248, 161, 255, 206, 192, 73, 87, 234, 191, 151, 211, 252, 19, 42, 156, 236, 60, 46, 154, 216, 19, 24, 64, 122, 106, 100, 171, 50, 152, 36, 124, 190, 89, 186, 98, 137, 0, 61, 241, 175, 216, 224, 30, 210, 130, 140, 62, 71, 163, 87, 178, 61, 220, 10, 116, 199, 82, 224, 50, 168, 19, 114, 118, 171, 136, 179, 76, 252, 63, 204, 211, 42, 214, 210, 20, 253, 220, 106, 67, 86, 101, 88, 158, 221, 92, 156, 13, 94, 31, 11, 251, 168, 183, 241, 51, 194, 129, 62, 78, 200, 186, 97, 31, 58, 173, 190, 215, 11, 169, 221, 15, 80, 82, 154, 51, 225, 226, 135, 15, 128, 162, 56, 78, 42, 51, 186, 212, 149, 217, 82, 207, 208, 173, 139, 165, 142, 207, 188, 132, 135, 251, 97, 138, 21, 139, 62, 249, 113, 85, 26, 219, 212, 95, 183, 26, 226, 155, 126, 100, 28, 134, 170, 111, 188, 225, 115, 222, 229, 14, 135, 91, 222, 15, 106, 243, 239, 142, 219, 64, 8, 251, 145, 239, 237, 8, 152, 34, 57, 242, 194, 96, 232, 30, 45, 134, 199, 144, 105, 218, 105, 185, 133, 60, 234, 202, 13, 37, 237, 132, 115, 189, 222, 139, 70, 236, 89, 188, 140, 151, 223, 111, 144, 134, 221, 14, 201, 163, 56, 41, 32, 2, 218, 127, 23, 17, 9, 70, 248, 216, 185, 225, 22, 52, 107, 23, 25, 159, 108, 161, 195, 53, 95, 68, 165, 17, 186, 163, 146, 214, 82, 245, 97, 99, 43, 79, 9, 80, 70, 247, 135, 127, 231, 12, 19, 37, 29, 135, 102, 160, 175, 160, 32, 6, 44, 100, 240, 26, 129, 29, 238, 109, 95, 59, 230, 126, 151, 159, 218, 125, 58, 211, 52, 179, 25, 105, 8, 14, 53, 122, 112, 41, 143, 124, 107, 246, 198, 46, 143, 247, 232, 181, 53, 181, 19, 155, 217, 63, 110, 2, 17, 150, 27, 254, 150, 207, 123, 174, 162, 110, 198, 115, 247, 142, 112, 4, 177, 134, 22, 87, 129, 164, 209, 33, 99, 108, 34, 39, 61, 111, 146, 20, 1, 198, 223, 151, 153, 212, 88, 62, 71, 155, 149, 163, 14, 81, 253, 183, 128, 89, 231, 85, 27, 79, 199, 180, 141, 13, 228, 95, 68, 83, 184, 175, 62, 110, 113, 162, 213, 147, 219, 70, 48, 86, 208, 217, 246, 83, 171, 207, 69, 106, 17, 147, 121, 76, 255, 201, 236, 76, 67, 197, 144, 134, 50, 52, 37, 239, 96, 151, 254, 65, 209, 194, 181, 151, 238, 137, 86, 142, 105, 182, 171, 8, 163, 207, 217, 78, 35, 12, 202, 130, 15, 22, 175, 19, 34, 218, 251, 181, 153, 55, 190, 119, 164, 172, 113, 192, 134, 242, 93, 201, 112, 18, 85, 199, 84, 25, 171, 57, 150, 97, 14, 225, 156, 121, 81, 162, 242, 216, 224, 223, 75, 3, 6, 19, 217, 142, 104, 156, 222, 124, 11, 9, 210, 119, 12, 66, 99, 164, 76, 153, 103, 226, 61, 98, 118, 18, 54, 96, 133, 64, 244, 179, 60, 103, 202, 94, 205, 153, 106, 232, 251, 99, 135, 240, 29, 220, 51, 248, 42, 117, 5, 25, 119, 38, 97, 229, 198, 241, 161, 110, 147, 228, 151, 78, 210, 213, 125, 113, 215, 193, 26, 85, 198, 194, 21, 128, 114, 102, 210, 115, 40, 61, 3, 130, 94, 108, 78, 163, 90, 191, 145, 186, 177, 198, 17, 59, 42, 41, 33, 29, 2, 176, 99, 220, 251, 132, 187, 40, 66, 176, 97, 181, 160, 221, 139, 8, 24, 24, 95, 223, 2, 223, 58, 219, 171, 205, 181, 176, 142, 6, 200, 168, 185, 255, 217, 203, 87, 3, 76, 23, 234, 62, 216, 182, 228, 93, 47, 116, 76, 192, 244, 6, 6, 102, 157, 162, 167, 97, 141, 159, 112, 222, 193, 234, 178, 100, 233, 176, 116, 156, 198, 78, 149, 71, 105, 192, 78, 17, 53, 249, 130, 54, 163, 61, 74, 115, 165, 212, 196, 90, 5, 11, 228, 238, 100, 0, 170, 0, 201, 252, 236, 88, 217, 71, 60, 131, 114, 53, 185, 83, 249, 74, 71, 48, 214, 219, 35, 225, 232, 9, 101, 229, 149, 139, 158, 210, 110, 73, 28, 70, 227, 177, 56, 36, 175, 41, 12, 38, 29, 9, 240, 83, 80, 229, 231, 0, 119, 208, 24, 29, 210, 231, 186, 76, 189, 31, 112, 28, 181, 140, 6, 54, 205, 9, 147, 220, 16, 200, 30, 16, 64, 172, 204, 70, 248, 206, 201, 127, 201, 59, 4, 224, 97, 39, 49, 231, 220, 40, 134, 145, 152, 199, 1, 184, 8, 182, 178, 42, 71, 18, 84, 129, 28, 248, 104, 115, 119, 130, 66, 128, 154, 201, 65, 108, 175, 154, 194, 87, 14, 51, 86, 128, 81, 182, 185, 21, 192, 53, 61, 106, 132, 87, 64, 194, 95, 118, 241, 37, 38, 19, 207, 155, 153, 124, 166, 224, 106, 172, 21, 234, 200, 213, 200, 12, 15, 81, 69, 208, 8, 116, 191, 53, 205, 144, 220, 224, 224, 243, 33, 150, 36, 45, 5, 227, 193, 11, 242, 143, 166, 216, 81, 15, 2, 121, 39, 98, 44, 48, 113, 238, 27, 25, 190, 127, 141, 79, 26, 133, 44, 233, 111, 18, 23, 198, 123, 89, 240, 182, 87, 219, 183, 139, 236, 183, 245, 66, 255, 161, 225, 214, 21, 95, 255, 135, 138, 226, 166, 146, 149, 46, 220, 147, 30, 30, 13, 23, 221, 210, 125, 250, 56, 254, 168, 150, 102, 12, 221, 14, 22, 81, 161, 49, 226, 148, 67, 188, 149, 22, 150, 28, 246, 55, 228, 210, 35, 216, 172, 77, 162, 129, 73, 4, 6, 48, 168, 68, 254, 84, 106, 196, 105, 180, 245, 79, 87, 137, 147, 209, 12, 156, 83, 32, 184, 41, 55, 215, 189, 228, 95, 217, 120, 178, 253, 4, 251, 75, 213, 189, 164, 1, 1, 245, 184, 106, 241, 239, 201, 84, 8, 188, 208, 17, 26, 8, 76, 172, 113, 151, 117, 165, 90, 122, 5, 19, 195, 30, 213, 131, 90, 32, 198, 91, 253, 231, 87, 109, 112, 141, 163, 34, 153, 66, 226, 215, 143, 141, 231, 110, 210, 98, 231, 246, 121, 167, 157, 96, 113, 109, 207, 198, 145, 89, 21, 199, 164, 160, 203, 204, 166, 110, 137, 29, 183, 183, 160, 31, 245, 251, 209, 168, 236, 17, 236, 42, 14, 80, 95, 170, 134, 16, 64, 218, 30, 255, 190, 33, 77, 195, 120, 63, 137, 128, 132, 111, 113, 64, 210, 224, 254, 154, 93, 196, 38, 239, 109, 117, 105, 213, 215, 159, 16, 199, 195, 69, 199, 105, 62, 245, 124, 132, 50, 138, 61, 152, 195, 201, 97, 234, 249, 204, 247, 151, 58, 48, 198, 205, 98, 190, 130, 53, 213, 168, 66, 154, 10, 72, 71, 214, 146, 197, 179, 231, 82, 140, 32, 119, 244, 218, 232, 132, 224, 193, 64, 249, 252, 216, 74, 30, 183, 54, 217, 208, 148, 157, 237, 54, 142, 124, 110, 137, 52, 141, 136, 9, 13, 255, 230, 161, 30, 182, 177, 59, 238, 205, 125, 43, 202, 13, 185, 99, 120, 163, 184, 63, 116, 6, 176, 216, 24, 176, 115, 24, 255, 200, 126, 84, 193, 200, 79, 101, 194, 16, 108, 225, 91, 205, 65, 249, 199, 82, 148, 3, 15, 99, 91, 213, 130, 111, 189, 221, 136, 87, 193, 92, 8, 106, 49, 6, 63, 46, 222, 223, 250, 19, 73, 5, 107, 85, 53, 212, 235, 194, 198, 115, 37, 221, 203, 172, 248, 88, 62, 193, 164, 143, 108, 93, 57, 129, 147, 133, 57, 18, 215, 147, 27, 70, 111, 79, 30, 69, 207, 253, 10, 87, 21, 93, 245, 136, 146, 50, 119, 18, 27, 62, 106, 187, 92, 8, 200, 19, 114, 205, 62, 161, 20, 82, 253, 26, 95, 147, 161, 37, 164, 240, 15, 253, 31, 54, 12, 184, 131, 192, 32, 7, 20, 57, 255, 125, 98, 48, 190, 219, 159, 126, 121, 224, 235, 241, 139, 55, 12, 12, 128, 46, 150, 240, 250, 127, 56, 159, 209, 146, 199, 26, 247, 60, 82, 233, 249, 223, 35, 194, 3, 47, 65, 122, 90, 9, 176, 165, 2, 252, 27, 59, 73, 29, 17, 243, 35, 59, 110, 137, 63, 4, 12, 14, 34, 171, 147, 177, 67, 247, 98, 235, 244, 24, 98, 71, 76, 254, 149, 61, 28, 159, 160, 242, 140, 201, 120, 37, 106, 109, 134, 122, 239, 248, 48, 127, 129, 135, 88, 101, 209, 100, 254, 39, 51, 82, 165, 223, 131, 215, 102, 164, 249, 49, 122, 236, 125, 251, 8, 131, 68, 132, 123, 129, 146, 21, 211, 44, 2, 21, 90, 230, 206, 204, 201, 113, 43, 123, 224, 211, 245, 240, 244, 133, 58, 20, 253, 120, 233, 220, 213, 55, 5, 235, 53, 224, 3, 101, 209, 152, 221, 108, 0, 205, 37, 229, 53, 234, 12, 174, 93, 249, 205, 39, 113, 195, 63, 183, 148, 55, 112, 6, 141, 132, 162, 196, 208, 64, 185, 241, 111, 219, 249, 254, 88, 217, 239, 77, 189, 129, 34, 40, 121, 221, 72, 127, 85, 242, 68, 148, 130, 36, 125, 6, 188, 27, 174, 222, 27, 46, 27, 204, 189, 29, 76, 78, 242, 250, 200, 135, 6, 206, 1, 175, 9, 104, 38, 0, 77, 153, 222, 178, 75, 29, 174, 193, 146, 193, 137, 148, 221, 7, 81, 121, 28, 220, 134, 205, 191, 85, 10, 204, 93, 185, 129, 60, 164, 66, 17, 167, 155, 92, 52, 133, 100, 93, 238, 130, 216, 43, 99, 144, 105, 198, 48, 171, 211, 92, 201, 12, 69, 109, 141, 1, 195, 73, 211, 1, 207, 142, 171, 145, 138, 128, 146, 219, 58, 247, 188, 239, 174, 112, 23, 30, 186, 41, 151, 157, 156, 123, 162, 10, 159, 162, 208, 106, 112, 251, 91, 235, 252, 50, 177, 23, 38, 118, 139, 226, 117, 225, 38, 44, 11, 98, 108, 66, 199, 252, 48, 114, 71, 58, 33, 28, 126, 242, 168, 100, 100, 32, 49, 56, 190, 100, 218, 18, 225, 208, 33, 37, 98, 48, 201, 103, 45, 40, 92, 163, 13, 20, 50, 102, 208, 116, 210, 106, 72, 216, 243, 38, 129, 143, 213, 170, 61, 219, 135, 99, 34, 80, 3, 217, 174, 27, 230, 14, 153, 120, 24, 104, 253, 71, 146, 160, 250, 147, 56, 247, 190, 202, 189, 224, 64, 73, 229, 176, 94, 251, 51, 107, 181, 244, 159, 49, 119, 234, 96, 18, 130, 177, 249, 211, 104, 73, 137, 128, 231, 245, 0, 147, 86, 140, 92, 123, 107, 156, 85, 4, 35, 243, 243, 83, 206, 222, 102, 73, 126, 26, 221, 22, 62, 95, 52, 35, 203, 189, 128, 51, 129, 227, 26, 213, 180, 48, 14, 33, 63, 216, 165, 62, 195, 217, 108, 136, 20, 108, 154, 194, 56, 254, 217, 57, 116, 18, 2, 104, 196, 134, 242, 229, 19, 247, 54, 192, 208, 15, 163, 186, 136, 168, 6, 238, 36, 54, 164, 238, 157, 186, 195, 249, 51, 225, 82, 130, 130, 222, 10, 233, 73, 203, 119, 73, 71, 93, 201, 189, 173, 233, 109, 196, 100, 229, 158, 225, 37, 209, 196, 39, 204, 125, 2, 223, 220, 87, 98, 63, 249, 54, 8, 106, 69, 222, 48, 196, 17, 35, 145, 181, 38, 45, 102, 176, 112, 187, 144, 157, 49, 176, 62, 184, 106, 228, 157, 129, 160, 57, 163, 242, 174, 154, 13, 253, 195, 201, 105, 188, 122, 43, 175, 224, 42, 5, 78, 109, 43, 85, 66, 96, 183, 173, 72, 228, 134, 38, 198, 58, 136, 96, 102, 199, 195, 115, 197, 164, 28, 58, 208, 61, 15, 29, 141, 110, 143, 6, 141, 62, 72, 45, 75, 169, 222, 15, 47, 8, 158, 74, 33, 120, 25, 97, 152, 126, 132, 35, 51, 86, 113, 77, 50, 171, 242, 250, 197, 220, 68, 10, 108, 89, 238, 128, 246, 167, 146, 49, 17, 113, 23, 190, 36, 7, 6, 108, 88, 21, 45, 65, 225, 54, 169, 162, 65, 182, 224, 24, 165, 230, 113, 157, 72, 167, 204, 124, 230, 41, 221, 108, 20, 45, 202, 22, 48, 148, 224, 201, 252, 248, 133, 182, 174, 2, 249, 156, 18, 241, 198, 60, 22, 241, 239, 2, 232, 252, 30, 80, 97, 75, 79, 164, 102, 132, 207, 34, 85, 23, 87, 36, 174, 33, 192, 33, 88, 47, 26, 67, 78, 2, 73, 217, 141, 232, 214, 219, 183, 179, 24, 92, 4, 20, 49, 19, 221, 141, 41, 202, 181, 117, 38, 68, 200, 140, 254, 125, 254, 189, 179, 1, 98, 90, 54, 83, 107, 196, 55, 178, 121, 29, 174, 44, 189, 35, 211, 159, 29, 201, 70, 220, 68, 108, 197, 245, 51, 141, 67, 3, 14, 61, 164, 53, 243, 127, 174, 123, 43, 98, 25, 208, 249, 45, 174, 18, 82, 17, 248, 90, 30, 91, 118, 230, 78, 84, 147, 152, 73, 120, 61, 167, 190, 245, 206, 39, 242, 83, 77, 174, 32, 52, 118, 1, 13, 245, 198, 201, 153, 35, 13, 161, 99, 55, 148, 4, 28, 93, 114, 155, 83, 169, 152, 129, 153, 147, 165, 71, 168, 3, 107, 144, 127, 58, 238, 69, 170, 30, 200, 115, 231, 19, 144, 56, 26, 56, 182, 125, 171, 198, 9, 161, 242, 9, 11, 192, 203, 212, 85, 223, 219, 24, 10, 250, 222, 109, 110, 152, 143, 82, 144, 102, 170, 244, 242, 8, 0, 134, 1, 66, 95, 153, 48, 64, 250, 115, 161, 129, 153, 41, 199, 239, 39, 135, 129, 153, 155, 247, 142, 197, 8, 146, 176, 231, 184, 106, 96, 4, 56, 84, 15, 153, 100, 188, 203, 35, 123, 85, 112, 150, 129, 77, 252, 230, 157, 52, 71, 253, 183, 248, 20, 26, 213, 210, 190, 153, 158, 32, 240, 19, 9, 164, 118, 253, 35, 110, 210, 238, 82, 189, 211, 39, 107, 5, 72, 9, 104, 205, 73, 72, 211, 164, 119, 242, 110, 97, 24, 94, 137, 230, 6, 130, 116, 135, 124, 249, 202, 24, 93, 84, 118, 242, 157, 51, 188, 180, 170, 74, 139, 252, 120, 27, 204, 191, 30, 135, 117, 162, 73, 221, 69, 91, 149, 107, 28, 254, 234, 44, 203, 246, 224, 183, 213, 152, 72, 28, 178, 196, 34, 252, 130, 19, 21, 192, 255, 239, 98, 115, 243, 7, 170, 170, 10, 172, 15, 198, 16, 173, 214, 254, 194, 213, 233, 41, 60, 87, 224, 3, 1, 22, 47, 19, 229, 74, 251, 174, 142, 163, 78, 109, 205, 171, 107, 171, 108, 111, 166, 207, 117, 183, 201, 147, 157, 241, 114, 167, 23, 92, 97, 140, 220, 121, 80, 72], + [131, 184, 160, 5, 207, 250, 133, 241, 33, 200, 32, 174, 141, 75, 116, 160, 225, 146, 234, 63, 202, 39, 123, 137, 100, 115, 168, 124, 156, 92, 0, 172, 26, 21, 141, 190, 125, 234, 176, 155, 198, 210, 36, 133, 80, 166, 158, 119, 7, 187, 247, 186, 128, 228, 79, 74, 158, 165, 133, 244, 0, 160, 225, 53, 188, 28, 80, 220, 159, 42, 100, 157, 73, 49, 179, 145, 69, 125, 214, 8, 28, 86, 243, 214, 212, 33, 121, 5, 110, 25, 86, 68, 111, 204, 43, 159, 243, 54, 68, 135, 162, 157, 228, 194, 236, 130, 6, 66, 76, 63, 24, 126, 129, 180, 103, 228, 183, 10, 148, 146, 197, 86, 199, 252, 142, 23, 140, 70, 120, 195, 145, 67, 166, 209, 4, 60, 249, 144, 234, 231, 32, 229, 156, 7, 236, 168, 2, 196, 62, 42, 73, 90, 138, 226, 29, 170, 13, 4, 242, 18, 6, 183, 13, 126, 8, 244, 206, 247, 31, 141, 39, 227, 96, 254, 143, 244, 249, 54, 46, 109, 17, 236, 208, 9, 90, 135, 56, 87, 231, 94, 55, 4, 185, 28, 239, 39, 87, 135, 106, 254, 90, 117, 41, 9, 131, 212, 199, 91, 105, 89, 131, 197, 142, 234, 146, 214, 156, 223, 255, 23, 229, 102, 2, 25, 210, 58, 178, 218, 88, 121, 140, 20, 172, 159, 109, 25, 95, 183, 150, 242, 108, 9, 203, 36, 70, 171, 122, 200, 191, 103, 229, 200, 132, 13, 255, 185, 111, 229, 201, 97, 86, 47, 116, 238, 237, 119, 135, 177, 204, 160, 91, 41, 129, 125, 89, 108, 151, 127, 141, 231, 79, 62, 208, 66, 132, 202, 242, 176, 57, 154, 182, 145, 168, 215, 199, 159, 124, 2, 115, 66, 226, 58, 16, 79, 92, 250, 233, 72, 27, 128, 139, 30, 4, 150, 200, 155, 241, 13, 226, 186, 228, 197, 145, 33, 132, 53, 67, 124, 141, 70, 247, 226, 64, 245, 218, 107, 60, 49, 2, 235, 139, 76, 179, 173, 71, 111, 39, 216, 239, 28, 165, 226, 83, 255, 117, 42, 155, 83, 43, 69, 5, 224, 186, 46, 29, 233, 31, 172, 90, 145, 153, 170, 67, 113, 10, 48, 6, 4, 228, 2, 143, 32, 182, 91, 248, 248, 71, 59, 180, 77, 210, 11, 219, 69, 6, 246, 169, 9, 173, 111, 251, 13, 139, 2, 233, 146, 221, 132, 237, 14, 100, 174, 189, 26, 105, 171, 137, 181, 28, 131, 233, 170, 89, 26, 148, 210, 233, 217, 40, 233, 183, 29, 179, 93, 254, 230, 184, 44, 78, 112, 119, 56, 239, 195, 63, 45, 248, 88, 250, 215, 163, 173, 177, 13, 212, 251, 231, 174, 103, 22, 236, 2, 154, 140, 134, 103, 80, 236, 251, 64, 194, 74, 165, 221, 59, 137, 241, 123, 243, 219, 179, 224, 63, 144, 172, 58, 193, 204, 215, 29, 37, 191, 177, 179, 118, 106, 246, 0, 195, 237, 225, 59, 49, 73, 233, 12, 24, 174, 248, 111, 232, 15, 152, 12, 13, 222, 114, 121, 67, 197, 199, 162, 200, 228, 132, 46, 49, 218, 194, 187, 140, 69, 113, 169, 90, 156, 16, 164, 108, 176, 239, 220, 189, 74, 74, 157, 54, 138, 22, 60, 113, 119, 121, 175, 176, 212, 245, 219, 243, 57, 160, 29, 25, 127, 53, 136, 5, 37, 238, 35, 156, 25, 245, 178, 23, 183, 102, 255, 88, 99, 217, 100, 135, 107, 172, 150, 72, 215, 125, 154, 105, 128, 46, 173, 33, 229, 134, 148, 43, 216, 233, 17, 213, 29, 52, 138, 40, 212, 138, 126, 215, 10, 84, 162, 39, 51, 22, 188, 196, 240, 103, 102, 67, 153, 246, 92, 219, 75, 34, 115, 40, 40, 125, 188, 202, 227, 106, 182, 166, 111, 55, 183, 215, 114, 131, 111, 245, 141, 106, 115, 77, 44, 235, 38, 182, 39, 151, 105, 5, 239, 29, 6, 19, 119, 144, 32, 1, 211, 193, 8, 188, 115, 163, 64, 234, 198, 188, 50, 40, 115, 7, 11, 237, 113, 5, 151, 223, 13, 19, 75, 114, 188, 155, 151, 6, 52, 110, 246, 171, 212, 241, 106, 227, 121, 146, 185, 16, 127, 167, 120, 184, 236, 131, 191, 202, 38, 251, 73, 232, 40, 51, 215, 16, 146, 10, 166, 158, 117, 235, 177, 3, 186, 87, 168, 0, 235, 66, 145, 243, 200, 96, 30, 61, 21, 252, 201, 5, 217, 127, 206, 164, 4, 148, 139, 246, 197, 219, 225, 41, 145, 152, 40, 99, 251, 135, 73, 244, 18, 33, 31, 52, 116, 191, 12, 109, 4, 184, 53, 208, 151, 140, 84, 183, 70, 11, 25, 91, 122, 2, 188, 22, 25, 31, 16, 26, 221, 95, 34, 226, 46, 7, 54, 201, 171, 213, 40, 135, 43, 227, 139, 6, 182, 157, 93, 63, 111, 204, 124, 55, 170, 246, 84, 111, 205, 56, 12, 36, 233, 30, 188, 137, 138, 98, 191, 80, 52, 23, 32, 76, 187, 210, 24, 63, 190, 98, 149, 254, 183, 211, 199, 252, 235, 111, 181, 216, 204, 182, 10, 75, 91, 34, 253, 192, 158, 114, 137, 222, 255, 54, 199, 110, 243, 202, 75, 84, 226, 170, 32, 3, 66, 89, 51, 172, 9, 29, 159, 31, 167, 148, 97, 93, 49, 44, 247, 166, 31, 94, 219, 199, 44, 240, 238, 8, 150, 79, 154, 116, 175, 101, 82, 136, 198, 57, 235, 134, 2, 86, 182, 82, 222, 152, 5, 166, 187, 53, 190, 242, 109, 68, 42, 78, 65, 97, 82, 78, 73, 6, 198, 13, 47, 171, 211, 250, 180, 22, 154, 54, 46, 57, 129, 240, 224, 215, 146, 57, 214, 238, 230, 163, 43, 58, 232, 130, 195, 163, 195, 156, 119, 36, 47, 72, 125, 165, 198, 253, 187, 71, 229, 69, 194, 204, 9, 109, 124, 123, 200, 57, 236, 36, 168, 176, 243, 114, 169, 231, 88, 11, 10, 153, 253, 112, 112, 88, 173, 121, 105, 8, 108, 191, 146, 86, 55, 219, 201, 117, 171, 3, 116, 242, 199, 233, 249, 203, 1, 91, 42, 83, 99, 89, 93, 54, 129, 215, 143, 77, 44, 211, 60, 154, 132, 117, 223, 16, 31, 91, 94, 148, 5, 63, 127, 119, 49, 62, 167, 77, 224, 103, 223, 250, 4, 116, 225, 115, 118, 216, 59, 174, 217, 132, 0, 216, 216, 75, 139, 136, 85, 82, 226, 253, 203, 54, 226, 232, 80, 251, 32, 66, 60, 78, 132, 96, 87, 26, 199, 196, 221, 9, 189, 245, 149, 128, 157, 195, 64, 226, 26, 156, 48, 206, 236, 151, 150, 212, 25, 83, 62, 125, 149, 143, 144, 75, 180, 237, 248, 40, 64, 180, 113, 202, 83, 145, 54, 18, 87, 109, 47, 75, 70, 51, 90, 235, 23, 123, 37, 3, 87, 241, 249, 127, 173, 107, 36, 163, 147, 229, 106, 2, 6, 154, 142, 157, 158, 84, 36, 131, 246, 22, 63, 151, 95, 61, 118, 37, 179, 93, 7, 229, 81, 130, 5, 50, 33, 153, 136, 121, 23, 168, 94, 156, 214, 253, 186, 164, 70, 200, 158, 142, 19, 45, 166, 229, 197, 1, 191, 136, 78, 76, 122, 113, 228, 80, 138, 92, 82, 72, 91, 50, 32, 241, 155, 185, 179, 152, 16, 75, 165, 245, 67, 29, 133, 176, 144, 43, 162, 26, 98, 66, 252, 35, 55, 84, 97, 87, 30, 189, 60, 225, 9, 68, 204, 249, 177, 193, 213, 64, 12, 44, 134, 207, 92, 104, 32, 194, 64, 160, 216, 142, 99, 182, 236, 167, 66, 242, 127, 35, 241, 216, 90, 101, 32, 173, 100, 16, 212, 74, 153, 192, 1, 15, 149, 208, 93, 125, 118, 54, 17, 250, 142, 177, 51, 119, 178, 161, 123, 226, 21, 99, 193, 216, 200, 65, 96, 120, 5, 229, 65, 81, 247, 121, 229, 6, 202, 113, 33, 110, 108, 94, 105, 206, 222, 156, 24, 73, 61, 57, 97, 201, 170, 145, 41, 205, 219, 26, 58, 46, 75, 179, 116, 224, 4, 6, 125, 233, 62, 63, 112, 248, 159, 134, 137, 127, 187, 109, 12, 239, 67, 122, 102, 11, 92, 197, 6, 163, 189, 107, 75, 59, 248, 40, 102, 50, 32, 226, 242, 220, 187, 144, 250, 161, 90, 121, 224, 101, 226, 94, 209, 194, 144, 206, 222, 69, 73, 148, 62, 88, 181, 223, 219, 149, 26, 191, 221, 97, 182, 244, 199, 32, 254, 7, 206, 13, 184, 49, 129, 222, 178, 176, 206, 252, 62, 212, 29, 18, 59, 134, 247, 189, 16, 60, 199, 199, 87, 31, 214, 70, 158, 95, 55, 159, 104, 240, 55, 129, 132, 200, 206, 75, 4, 51, 153, 29, 136, 160, 75, 135, 46, 24, 18, 2, 249, 214, 70, 32, 70, 200, 92, 69, 129, 50, 217, 78, 47, 226, 3, 186, 104, 172, 131, 91, 254, 77, 66, 146, 150, 117, 99, 134, 143, 220, 152, 96, 97, 153, 133, 54, 65, 142, 126, 206, 182, 217, 45, 41, 6, 97, 102, 85, 162, 136, 70, 191, 155, 20, 162, 57, 113, 69, 141, 245, 200, 34, 53, 42, 240, 24, 159, 3, 85, 230, 54, 100, 96, 195, 119, 211, 125, 8, 244, 186, 184, 175, 81, 169, 221, 2, 70, 251, 156, 136, 208, 195, 186, 52, 165, 171, 151, 138, 38, 100, 192, 46, 68, 72, 215, 182, 118, 59, 121, 67, 127, 34, 106, 45, 0, 101, 191, 69, 9, 215, 172, 28, 228, 64, 216, 55, 195, 148, 254, 85, 17, 226, 39, 95, 123, 26, 181, 69, 133, 130, 164, 12, 52, 120, 225, 208, 11, 231, 65, 7, 103, 203, 109, 242, 8, 200, 13, 80, 201, 106, 78, 124, 76, 177, 35, 117, 64, 143, 85, 75, 113, 43, 166, 61, 181, 181, 139, 214, 18, 63, 51, 176, 14, 164, 42, 222, 52, 116, 147, 44, 226, 177, 49, 97, 50, 219, 157, 181, 169, 171, 209, 19, 23, 162, 66, 175, 69, 216, 249, 7, 223, 100, 108, 239, 227, 1, 187, 96, 224, 182, 16, 255, 157, 129, 217, 241, 251, 212, 79, 227, 114, 152, 168, 38, 10, 180, 244, 98, 66, 158, 198, 232, 192, 197, 38, 230, 11, 37, 165, 111, 66, 88, 102, 8, 139, 166, 196, 41, 183, 200, 106, 71, 205, 208, 167, 144, 51, 205, 125, 65, 55, 157, 221, 171, 99, 118, 221, 237, 37, 78, 225, 110, 2, 53, 62, 143, 156, 46, 154, 217, 123, 19, 83, 102, 134, 68, 141, 186, 20, 149, 254, 188, 1, 230, 86, 233, 208, 136, 139, 2, 9, 135, 83, 119, 7, 119, 136, 111, 195, 166, 66, 7, 51, 59, 139, 251, 246, 190, 255, 233, 162, 161, 151, 119, 190, 6, 99, 51, 211, 29, 99, 252, 72, 65, 183, 5, 51, 200, 99, 9, 131, 117, 187, 115, 224, 36, 101, 99, 68, 79, 150, 50, 228, 27, 74, 11, 58, 65, 91, 190, 64, 45, 206, 26, 193, 148, 87, 145, 114, 45, 226, 186, 233, 86, 157, 221, 50, 124, 231, 167, 66, 14, 35, 150, 97, 48, 248, 125, 236, 146, 88, 190, 158, 178, 25, 150, 141, 119, 25, 176, 134, 14, 108, 208, 207, 237, 182, 123, 149, 114, 89, 222, 80, 58, 22, 106, 7, 129, 105, 252, 194, 75, 68, 219, 248, 30, 91, 83, 89, 225, 131, 190, 110, 229, 6, 220, 136, 77, 95, 9, 116, 217, 124, 226, 137, 127, 87, 217, 156, 170, 242, 51, 242, 162, 124, 233, 230, 7, 75, 98, 28, 143, 247, 253, 58, 105, 136, 73, 105, 232, 193, 120, 25, 31, 45, 130, 173, 186, 139, 28, 111, 227, 96, 9, 75, 42, 152, 147, 51, 132, 138, 120, 27, 34, 250, 48, 135, 71, 216, 52, 86, 16, 128, 65, 233, 76, 65, 201, 248, 215, 191, 235, 150, 32, 90, 115, 34, 165, 194, 136, 177, 185, 83, 244, 96, 60, 254, 179, 164, 76, 137, 10, 163, 98, 38, 205, 108, 28, 97, 161, 243, 130, 204, 108, 206, 43, 30, 238, 250, 218, 249, 9, 181, 166, 238, 185, 161, 230, 102, 227, 57, 70, 233, 138, 172, 37, 39, 208, 17, 196, 45, 114, 60, 221, 110, 9, 173, 105, 109, 111, 28, 85, 217, 146, 54, 156, 94, 109, 0, 166, 167, 51, 248, 175, 15, 68, 198, 58, 126, 191, 9, 157, 24, 102, 203, 122, 53, 39, 72, 121, 14, 70, 206, 218, 86, 171, 190, 132, 92, 207, 22, 241, 122, 211, 154, 27, 233, 172, 45, 243, 135, 251, 51, 153, 25, 251, 151, 213, 211, 57, 233, 146, 81, 93, 228, 150, 65, 163, 92, 56, 101, 192, 128, 246, 151, 159, 140, 212, 118, 64, 4, 207, 63, 234, 50, 74, 68, 125, 58, 174, 118, 209, 23, 149, 254, 204, 48, 139, 100, 128, 147, 128, 198, 177, 128, 58, 96, 112, 53, 145, 197, 89, 242, 171, 107, 23, 33, 56, 208, 205, 58, 147, 189, 18, 41, 109, 183, 250, 145, 217, 156, 161, 132, 80, 210, 164, 182, 80, 203, 109, 224, 215, 77, 11, 12, 160, 253, 103, 173, 207, 10, 147, 132, 93, 11, 86, 69, 115, 38, 100, 4, 205, 153, 80, 172, 111, 167, 201, 114, 98, 167, 162, 72, 79, 208, 213, 147, 126, 133, 101, 112, 220, 168, 170, 230, 195, 123, 122, 179, 89, 115, 113, 94, 115, 225, 56, 52, 24, 232, 82, 58, 142, 110, 98, 135, 215, 225, 20, 80, 6, 181, 160, 244, 92, 15, 97, 171, 215, 199, 70, 76, 24, 208, 47, 151, 180, 76, 87, 209, 61, 86, 139, 38, 203, 123, 240, 191, 223, 124, 211, 26, 12, 250, 8, 102, 51, 88, 44, 156, 197, 91, 110, 221, 61, 76, 19, 140, 129, 16, 137, 51, 19, 34, 73, 139, 181, 19, 49, 200, 235, 137, 172, 182, 144, 166, 33, 9, 94, 253, 77, 135, 69, 22, 200, 70, 219, 170, 167, 109, 47, 137, 35, 62, 43, 175, 255, 9, 82, 188, 32, 54, 75, 89, 0, 78, 191, 200, 250, 156, 241, 28, 91, 60, 20, 130, 47, 116, 204, 177, 186, 112, 196, 235, 80, 131, 84, 189, 250, 121, 162, 106, 112, 47, 66, 145, 203, 44, 79, 103, 28, 152, 150, 171, 104, 236, 67, 81, 188, 198, 242, 243, 11, 90, 185, 254, 119, 65, 13, 12, 68, 241, 116, 10, 77, 177, 152, 9, 204, 69, 251, 229, 119, 169, 65, 30, 44, 206, 49, 215, 161, 207, 36, 225, 12, 221, 31, 15, 131, 130, 107, 11, 86, 117, 141, 195, 119, 248, 87, 53, 177, 214, 171, 11, 133, 52, 99, 63, 85, 59, 52, 32, 238, 178, 127, 199, 191, 166, 254, 255, 196, 166, 101, 115, 13, 155, 203, 188, 97, 228, 239, 156, 14, 117, 100, 127, 211, 252, 57, 101, 39, 40, 89, 218, 253, 6, 90, 160, 246, 108, 25, 56, 104, 202, 222, 89, 183, 249, 119, 171, 163, 40, 121, 202, 123, 171, 5, 213, 178, 194, 218, 141, 126, 3, 199, 208, 218, 170, 156, 227, 208, 20, 18, 48, 0, 162, 134, 78, 5, 61, 176, 181, 51, 50, 32, 114, 10, 37, 226, 212, 162, 146, 115, 99, 117, 51, 196, 126, 255, 197, 175, 98, 251, 42, 47, 136, 46, 70, 142, 53, 207, 220, 247, 155, 100, 228, 185, 243, 74, 82, 177, 77, 1, 214, 161, 219, 56, 248, 4, 42, 247, 8, 106, 3, 131, 133, 66, 98, 132, 234, 65, 146, 222, 255, 70, 154, 74, 223, 95, 238, 3, 2, 136, 53, 37, 88, 7, 149, 143, 200, 253, 177, 29, 97, 235, 160, 169, 78, 194, 245, 234, 217, 84, 80, 31, 110, 132, 58, 194, 64, 181, 220, 42, 65, 50, 0, 93, 166, 46, 142, 95, 196, 96, 117, 54, 243, 83, 67, 41, 75, 147, 162, 141, 118, 119, 131, 83, 193, 138, 134, 84, 142, 129, 147, 250, 103, 136, 183, 227, 220, 222, 61, 154, 245, 42, 100, 13, 200, 171, 187, 108, 65, 205, 167, 233, 200, 131, 94, 136, 76, 126, 171, 36, 105, 231, 217, 240, 6, 25, 146, 56, 228, 61, 179, 178, 98, 182, 77, 247, 122, 202, 39, 58, 64, 82, 246, 52, 9, 141, 72, 155, 46, 241, 117, 209, 9, 199, 149, 123, 89, 188, 88, 108, 104, 129, 129, 44, 214, 170, 3, 96, 42, 186, 87, 58, 56, 32, 245, 126, 200, 157, 113, 58, 28, 65, 245, 251, 252, 247, 49, 196, 191, 108, 235, 85, 132, 105, 17, 192, 36, 88, 115, 116, 224, 250, 242, 73, 190, 134, 44, 68, 26, 82, 208, 37, 116, 58, 208, 214, 65, 131, 31, 184, 63, 152, 15, 168, 186, 5, 38, 179, 57, 246, 220, 189, 196, 14, 146, 65, 138, 67, 60, 70, 225, 208, 79, 41, 209, 178, 41, 47, 59, 203, 235, 12, 41, 161, 68, 208, 87, 162, 13, 32, 160, 232, 76, 155, 8, 154, 59, 191, 88, 162, 224, 28, 26, 118, 109, 207, 202, 169, 183, 23, 229, 8, 52, 150, 42, 3, 206, 86, 140, 80, 221, 222, 212, 129, 237, 5, 219, 231, 148, 33, 35, 25, 136, 82, 51, 165, 6, 55, 137, 143, 0, 160, 190, 239, 74, 78, 195, 93, 193, 254, 187, 218, 100, 194, 172, 153, 31, 252, 243, 157, 174, 194, 144, 133, 137, 59, 161, 48, 192, 153, 222, 247, 142, 116, 184, 131, 83, 20, 97, 190, 123, 73, 12, 73, 227, 201, 22, 233, 248, 14, 192, 255, 75, 248, 19, 54, 10, 165, 214, 130, 160, 46, 244, 60, 27, 205, 109, 203, 240, 24, 136, 209, 117, 127, 216, 201, 114, 61, 135, 97, 167, 111, 124, 191, 60, 26, 103, 37, 228, 212, 115, 209, 96, 25, 150, 166, 194, 150, 187, 168, 22, 120, 124, 244, 53, 216, 118, 91, 141, 155, 41, 199, 90, 71, 42, 240, 15, 148, 30, 165, 190, 53, 147, 184, 191, 201, 179, 112, 41, 159, 197, 184, 238, 10, 113, 96, 76, 135, 82, 243, 237, 169, 168, 16, 201, 27, 235, 133, 76, 118, 60, 246, 63, 163, 73, 73, 168, 78, 152, 46, 251, 135, 130, 170, 31, 117, 232, 0, 66, 168, 153, 229, 23, 92, 131, 195, 112, 66, 47, 82, 17, 6, 51, 162, 82, 116, 216, 36, 171, 177, 171, 188, 9, 179, 10, 149, 129, 65, 155, 100, 26, 85, 247, 246, 86, 234, 53, 196, 221, 167, 203, 148, 96, 10, 245, 173, 233, 95, 131, 23, 217, 94, 46, 211, 24, 234, 238, 219, 115, 146, 49, 111, 82, 127, 77, 208, 146, 165, 109, 175, 11, 153, 174, 210, 240, 87, 83, 123, 195, 155, 220, 122, 10, 83, 73, 41, 147, 184, 212, 242, 197, 93, 199, 34, 128, 0, 49, 124, 25, 176, 76, 170, 104, 200, 4, 53, 58, 104, 127, 191, 108, 65, 104, 57, 178, 96, 236, 44, 152, 160, 234, 156, 68, 236, 135, 103, 127, 131, 209, 28, 231, 82, 36, 161, 85, 85, 11, 143, 56, 115, 60, 9, 195, 44, 65, 75, 134, 164, 174, 130, 143, 212, 207, 19, 120, 182, 168, 211, 44, 98, 190, 143, 155, 249, 182, 235, 212, 1, 132, 189, 26, 83, 101, 91, 73, 48, 120, 192, 162, 220, 195, 96, 13, 208, 90, 15, 227, 152, 176, 210, 53, 10, 90, 107, 16, 175, 107, 121, 231, 209, 15, 125, 253, 132, 158, 225, 209, 52, 198, 20, 92, 64, 56, 234, 156, 6, 61, 15, 123, 136, 127, 91, 203, 97, 168, 142, 190, 166, 114, 121, 242, 17, 254, 212, 56, 186, 47, 206, 112, 234, 69, 15, 240, 95, 163, 77, 210, 254, 137, 250, 212, 123, 218, 71, 242, 173, 167, 142, 26, 80, 217, 172, 139, 109, 114, 123, 225, 187, 50, 228, 217, 118, 59, 87, 172, 41, 122, 108, 204, 28, 117, 166, 232, 190, 61, 247, 102, 124, 94, 228, 121, 142, 141, 173, 162, 55, 227, 235, 167, 109, 216, 42, 50, 84, 13, 205, 251, 161, 194, 120, 53, 76, 1, 48, 223, 114, 55, 57, 154, 63, 142, 54, 95, 118, 114, 237, 125, 156, 4, 133, 234, 138, 85, 253, 81, 155, 187, 165, 178, 128, 3, 216, 205, 44, 223, 166, 153, 105, 138, 199, 196, 44, 233, 116, 160, 204, 100, 109, 216, 70, 87, 97, 163, 172, 228, 208, 221, 179, 23, 251, 202, 11, 44, 245, 225, 210, 162, 139, 93, 144, 248, 137, 152, 24, 113, 101, 101, 104, 148, 240, 52, 1, 112, 91, 98, 142, 235, 127, 26, 1, 118, 246, 57, 100, 179, 19, 179, 231, 197, 71, 111, 210, 50, 153, 175, 247, 208, 234, 71, 78, 45, 110, 237, 196, 36, 64, 178, 129, 27, 8, 47, 126, 17, 169, 176, 219, 158, 226, 133, 14, 76, 131, 55, 49, 0, 186, 140, 72, 158, 187, 80, 227, 163, 114, 107, 146, 22, 49, 170, 215, 32, 202, 67, 119, 47, 20, 134, 80, 205, 169, 51, 193, 63, 27, 132, 134, 8, 104, 76, 120, 232, 111, 222, 29, 72, 95, 212, 30, 39, 183, 199, 176, 51, 255, 36, 231, 182, 140, 75, 35, 211, 200, 247, 179, 97, 71, 146, 192, 151, 102, 236, 34, 53, 191, 247, 192, 45, 38, 119, 105, 91, 90, 168, 167, 162, 104, 50, 158, 50, 142, 101, 148, 13, 184, 19, 99, 197, 85, 213, 97, 58, 150, 145, 239, 34, 194, 14, 62, 221, 49, 65, 118, 84, 231, 209, 199, 237, 97, 200, 191, 212, 229, 16, 48, 28, 13, 55, 228, 124, 197, 175, 30, 203, 190, 181, 96, 124, 41, 19, 4, 91, 253, 58, 186, 147, 136, 44, 83, 136, 179, 8, 150, 198, 187, 130, 50, 64, 41, 135, 38, 106, 78, 250, 40, 247, 74, 158, 71, 199, 249, 11, 214, 177, 197, 127, 75, 110, 95, 64, 125, 238, 159, 102, 227, 24, 170, 224, 252, 130, 4, 242, 21, 197, 145, 189, 59, 222, 56, 220, 232, 80, 125, 130, 136, 65, 106, 148, 74, 44, 254, 105, 144, 109, 174, 14, 72, 186, 242, 161, 249, 83, 236, 85, 47, 247, 239, 178, 78, 170, 241, 170, 72, 205, 105, 29, 39, 196, 214, 173, 226, 148, 160, 109, 53, 130, 103, 20, 229, 2, 101, 253, 166, 131, 208, 193, 2, 224, 230, 213, 158, 151, 200, 89, 214, 95, 97, 168, 122, 102, 124, 136, 23, 226, 148, 115, 221, 184, 210, 175, 85, 70, 105, 139, 65, 128, 245, 193, 131, 133, 205, 169, 165, 174, 8, 17, 101, 221, 20, 130, 90, 206, 81, 85, 248, 238, 255, 110, 125, 176, 68, 238, 220, 81, 85, 111, 241, 17, 143, 86, 125, 238, 75, 243, 18, 90, 121, 39, 60, 191, 113, 176, 207, 16, 37, 98, 177, 125, 124, 107, 144, 33, 150, 187, 240, 162, 124, 122, 32, 208, 14, 127, 148, 204, 251, 141, 20, 208, 128, 6, 241, 144, 159, 145, 226, 203, 255, 48, 15, 88, 197, 224, 200, 130, 142, 228, 222, 238, 127, 24, 200, 78, 48, 106, 20, 128, 250, 232, 127, 179, 130, 148, 94, 90, 42, 170, 166, 193, 150, 83, 42, 43, 90, 208, 151, 21, 207, 198, 199, 229, 196, 164, 249, 207, 0, 198, 159, 6, 40, 192, 222, 52, 203, 180, 194, 138, 140, 149, 73, 7, 196, 187, 163, 206, 141, 253, 152, 115, 126, 140, 117, 247, 227, 133, 238, 215, 160, 102, 141, 200, 17, 233, 52, 69, 254, 190, 238, 27, 193, 181, 26, 35, 106, 144, 227, 140, 112, 148, 91, 201, 23, 155, 169, 99, 152, 132, 109, 145, 32, 190, 156, 118, 168, 237, 103, 28, 117, 111, 18, 41, 255, 120, 105, 229, 11, 22, 164, 29, 214, 250, 42, 110, 158, 181, 127, 120, 65, 7, 231, 219, 47, 3, 54, 123, 34, 174, 157, 175, 159, 37, 215, 70, 49, 35, 181, 196, 18, 208, 95, 244, 214, 184, 117, 62, 53, 147, 117, 155, 151, 0, 10, 5, 75, 61, 69, 175, 110, 221, 76, 241, 6, 123, 184, 239, 109, 116, 177, 85, 73, 150, 75, 6, 25, 205, 208, 183, 13, 134, 243, 215, 22, 181, 212, 142, 112, 111, 120, 222, 150, 64, 235, 5, 122, 136, 96, 90, 55, 22, 235, 132, 131, 49, 231, 122, 175, 145, 9, 202, 202, 44, 160, 162, 80, 124, 82, 19, 30, 16, 67, 119, 79, 51, 176, 29, 169, 112, 172, 213, 231, 187, 24, 62, 186, 63, 242, 39, 77, 176, 144, 123, 250, 86, 13, 188, 151, 221, 38, 134, 42, 169, 96, 61, 31, 183, 143, 97, 238, 211, 101, 193, 12, 71, 249, 200, 62, 177, 61, 186, 106, 146, 59, 0, 40, 209, 71, 135, 161, 219, 128, 9, 24, 122, 191, 232, 80, 111, 12, 0, 21, 70, 91, 65, 210, 152, 98, 145, 46, 184, 110, 128, 20, 24, 173, 102, 42, 186, 38, 73, 47, 252, 66, 125, 164, 202, 160, 165, 236, 67, 200, 222, 140, 45, 55, 250, 207, 173, 48, 96, 237, 14, 48, 232, 190, 7, 1, 34, 93, 123, 19, 11, 208, 169, 49, 122, 96, 19, 32, 138, 159, 178, 91, 150, 87, 15, 2, 141, 137, 177, 105, 6, 195, 85, 223, 206, 0, 76, 202, 195, 210, 195, 116, 91, 31, 229, 37, 39, 249, 88, 82, 191, 13, 97, 251, 214, 59, 231, 232, 140, 67, 233, 122, 51, 52, 63, 2, 230, 120, 158, 48, 251, 15, 42, 104, 14, 206, 193, 201, 32, 243, 202, 234, 86, 228, 235, 174, 157, 45, 34, 87, 39, 121, 142, 205, 161, 63, 117, 45, 228, 178, 41, 47, 212, 222, 223, 79, 140, 52, 166, 72, 47, 94, 7, 19, 211, 164, 147, 167, 208, 134, 210, 207, 37, 207, 215, 225, 253, 133, 204, 70, 127, 144, 142, 54, 54, 44, 145, 222, 118, 38, 103, 196, 104, 4, 107, 0, 70, 198, 84, 127, 68, 32, 7, 203, 109, 154, 134, 179, 129, 121, 161, 103, 27, 8, 239, 190, 250, 59, 7, 198, 253, 126, 166, 157, 144, 184, 88, 211, 49, 238, 244, 243, 225, 133, 204, 235, 120, 36, 232, 103, 195, 89, 218, 62, 111, 121, 170, 45, 37, 161, 251, 194, 36, 199, 245, 35, 235, 90, 9, 114, 35, 24, 211, 119, 175, 77, 140, 154, 129, 69, 49, 166, 18, 89, 197, 23, 84, 45, 26, 20, 36, 197, 159, 48, 0, 135, 64, 166, 29, 53, 169, 243, 199, 136, 203, 6, 217, 114, 154, 177, 168, 181, 6, 219, 42, 211, 29, 150, 150, 22, 99, 104, 218, 191, 236, 43, 83, 125, 198, 56, 227, 91, 33, 81, 167, 139, 85, 123, 160, 143, 196, 97, 232, 231, 241, 51, 14, 99, 106, 220, 231, 78, 178, 231, 118, 138, 149, 27, 201, 48, 126, 226, 145, 183, 250, 8, 74, 252, 52, 247, 66, 70, 51, 244, 42, 123, 182, 108, 96, 188, 9, 30, 56, 29, 14, 63, 163, 24, 87, 69, 135, 205, 124, 46, 240, 109, 158, 242, 253, 212, 109, 62, 236, 241, 228, 239, 92, 93, 109, 208, 39, 238, 36, 50, 211, 93, 25, 136, 239, 23, 30, 55, 149, 142, 125, 128, 61, 217, 31, 252, 138, 110, 93, 93, 203, 21, 239, 212, 226, 214, 10, 119, 53, 60, 220, 204, 177, 141, 247, 73, 219, 215, 70, 23, 186, 236, 5, 230, 233, 51, 164, 101, 208, 27, 219, 87, 245, 242, 41, 59, 39, 213, 202, 240, 176, 35, 179, 164, 213, 173, 142, 4, 3, 179, 115, 19, 153, 87, 117, 144, 20, 23, 31, 241, 21, 57, 187, 242, 125, 51, 160, 143, 36, 163, 44, 135, 62, 192, 156, 43, 102, 246, 187, 176, 141, 132, 13, 224, 45, 161, 117, 77, 233, 21, 202, 81, 189, 181, 138, 168, 52, 137, 78, 209, 153, 166, 175, 87, 34, 152, 154, 25, 53, 102, 177, 131, 170, 141, 65, 242, 139, 179, 71, 240, 166, 251, 216, 59, 223, 154, 24, 26, 236, 4, 146, 10, 53, 230, 154, 43, 146, 234, 146, 18, 200, 86, 77, 68, 91, 35, 188, 48, 69, 65, 32, 22, 231, 121, 227, 75, 183, 156, 166, 104, 74, 37, 8, 100, 118, 89, 52, 166, 80, 169, 76, 167, 226, 50, 195, 13, 148, 124, 123, 77, 9, 182, 214, 156, 110, 85, 36, 49, 39, 51, 239, 149, 22, 247, 149, 50, 76, 220, 60, 176, 13, 61, 146, 73, 38, 9, 62, 9, 182, 168, 112, 8, 105, 148, 40, 4, 178, 209, 169, 101, 90, 209, 43, 201, 222, 233, 104, 142, 121, 131, 158, 51, 240, 232, 51, 38, 215, 195, 104, 226, 152, 200, 120, 25, 112, 92, 233, 99, 41, 149, 95, 7, 23, 214, 147, 41, 59, 59, 161, 88, 1, 207, 117, 85, 12, 245, 182, 205, 29, 121, 237, 222, 142, 42, 117, 113, 250, 212, 12, 185, 192, 21, 222, 109, 177, 112, 112, 196, 184, 247, 153, 61, 207, 162, 93, 226, 189, 173, 46, 163, 34, 37, 160, 20, 158, 99, 156, 222, 17, 216, 109, 195, 133, 183, 210, 142, 30, 7, 245, 173, 240, 221, 176, 131, 251, 217, 207, 142, 2, 3, 94, 113, 173, 48, 25, 121, 197, 60, 1, 225, 96, 15, 126, 63, 248, 24, 175, 231, 76, 131, 58, 62, 61, 210, 188, 161, 51, 197, 71, 68, 190, 244, 205, 109, 183, 168, 89, 160, 240, 54, 238, 250, 239, 208, 58, 206, 133, 131, 129, 43, 168, 144, 56, 7, 183, 178, 188, 150, 221, 71, 213, 91, 125, 141, 113, 180, 137, 39, 22, 82, 3, 166, 197, 180, 171, 71, 240, 86, 15, 161, 176, 88, 247, 237, 203, 123, 187, 186, 47, 177, 231, 107, 39, 36, 255, 230, 15, 112, 133, 116, 45, 124, 73, 129, 142, 195, 8, 54, 206, 231, 194, 143, 94, 97, 121, 251, 192, 254, 180, 134, 103, 72, 82, 81, 196, 80, 251, 193, 131, 47, 242, 35, 215, 47, 134, 17, 83, 214, 85, 182, 170, 5, 45, 209, 102, 218, 9, 156, 248, 239, 163, 99, 223, 125, 188, 27, 126, 140, 195, 43, 238, 49, 74, 64, 226, 69, 101, 60, 112, 49, 40, 212, 152, 43, 184, 60, 102, 168, 123, 126, 19, 29, 50, 96, 194, 11, 119, 104, 39, 54, 242, 178, 15, 200, 226, 65, 12, 225, 51, 111, 188, 107, 149, 237, 51, 9, 58, 217, 122, 217, 84, 165, 87, 123, 128, 150, 51, 3, 91, 158, 44, 252, 152, 219, 203, 255, 200, 186, 63, 209, 158, 225, 155, 217, 40, 1, 200, 58, 146, 250, 120, 200, 240, 84, 52, 163, 151, 6, 228, 151, 57, 168, 184, 99, 206, 89, 20, 58, 136, 25, 70, 117, 115, 31, 131, 46, 174, 182, 92, 208, 43, 142, 19, 208, 211, 101, 4, 228, 39, 23, 55, 17, 33, 43, 28, 57, 111, 49, 230, 78, 79, 105, 165, 8, 217, 12, 76, 201, 184, 122, 118, 255, 120, 25, 119, 40, 107, 184, 172, 26, 160, 237, 81, 201, 226, 235, 211, 39, 37, 200, 166, 115, 62, 160, 84, 2, 33, 185, 6, 102, 27, 196, 66, 40, 198, 214, 140, 125, 42, 0, 170, 183, 151, 59, 170, 4, 127, 89, 176, 3, 250, 27, 227, 170, 168, 181, 218, 157, 64, 226, 197, 113, 43, 89, 99, 27, 93, 202, 77, 39, 163, 10, 187, 25, 20, 104, 19, 220, 79, 167, 117, 39, 246, 210, 4, 200, 136, 128, 88, 201, 115, 113, 62, 254, 136, 51, 179, 127, 70, 171, 158, 108, 60, 153, 171, 113, 209, 233, 57, 15, 147, 192, 236, 205, 203, 192, 218, 15, 59, 9, 155, 209, 184, 95, 203, 192, 3, 30, 111, 85, 43, 200, 11, 204, 148, 152, 27, 157, 167, 198, 181, 34, 138, 197, 229, 13, 226, 109, 158, 1, 36, 197, 17, 231, 131, 59, 131, 44, 30, 30, 88, 110, 49, 248, 236, 11, 29, 73, 100, 203, 100, 228, 57, 89, 66, 58, 139, 253, 108, 209, 91, 0, 159, 71, 11, 158, 25, 122, 147, 218, 149, 95, 224, 238, 156, 248, 144, 111, 128, 53, 100, 148, 59, 164, 95, 183, 30, 112, 1, 153, 5, 9, 87, 213, 60, 154, 98, 98, 9, 12, 30, 91, 236, 20, 104, 0, 236, 240, 83, 38, 209, 127, 223, 86, 227, 128, 45, 226, 168, 85, 177, 184, 32, 253, 80, 227, 14, 31, 253, 117, 99, 103, 164, 108, 7, 51, 64, 223, 17, 233, 241, 134, 161, 142, 166, 160, 250, 212, 143, 154, 85, 72, 98, 175, 145, 190, 53, 153, 169, 174, 153, 254, 149, 75, 176, 70, 10, 6, 34, 192, 72, 123, 133, 184, 132, 99, 209, 219, 154, 110, 123, 132, 155, 74, 34, 98, 76, 66, 17, 110, 35, 3, 124, 200, 196, 194, 91, 104, 123, 122, 109, 249, 172, 45, 108, 54, 90, 74, 247, 250, 33, 192, 250, 28, 248, 222, 9, 118, 47, 41, 65, 135, 213, 97, 14, 82, 224, 65, 123, 115, 155, 170, 35, 155, 141, 209, 87, 238, 43, 68, 135, 209, 139, 216, 23, 86, 244, 81, 44, 101, 190, 82, 180, 67, 175, 131, 235, 247, 49, 205, 225, 111, 11, 53, 60, 227, 218, 172, 1, 72, 21, 62, 64, 142, 235, 4, 78, 1, 67, 124, 169, 80, 22, 255, 33, 55, 116, 198, 145, 245, 199, 212, 15, 22, 220, 125, 226, 35, 199, 188, 22, 82, 178, 112, 217, 83, 99, 136, 97, 77, 14, 154, 107, 250, 118, 177, 41, 171, 142, 218, 31, 63, 85, 125, 196, 132, 63, 138, 169, 206, 190, 138, 115, 23, 122, 144, 244, 181, 227, 147, 163, 25, 27, 148, 223, 102, 198, 114, 45, 3, 207, 26, 57, 77, 222, 219, 18, 234, 41, 190, 96, 166, 116, 235, 16, 70, 212, 19, 109, 78, 37, 212, 131, 103, 181, 173, 75, 245, 30, 168, 24, 255, 8, 69, 207, 248, 19, 202, 239, 136, 105, 169, 174, 207, 170, 151, 64, 194, 163, 166, 116, 180, 242, 207, 228, 78, 66, 17, 205, 40, 118, 237, 34, 15, 88, 92, 178, 23, 4, 82, 115, 238, 58, 139, 187, 118, 148, 128, 85, 10, 231, 185, 51, 116, 101, 235, 3, 128, 240, 112, 153, 20, 202, 118, 0, 43, 13, 164, 155, 190, 73, 34, 80, 27, 108, 78, 141, 215, 224, 205, 15, 30, 202, 105, 56, 132, 245, 222, 199, 15, 226, 50, 51, 102, 14, 245, 199, 63, 174, 132, 169, 94, 128, 126, 168, 88, 210, 219, 61, 131, 124, 133, 36, 82, 177, 4, 148, 178, 31, 125, 159, 79, 253, 28, 186, 241, 170, 5, 197, 127, 78, 122, 9, 136, 167, 236, 93, 18, 32, 113, 18, 224, 172, 122, 153, 241, 42, 100, 154, 70, 254, 41, 156, 77, 3, 46, 86, 80, 62, 17, 60, 120, 178, 81, 13, 205, 49, 128, 174, 84, 5, 184, 79, 126, 126, 205, 112, 195, 111, 205, 179, 84, 181, 142, 97, 184, 154, 19, 41, 47, 139, 187, 201, 20, 195, 102, 43, 226, 25, 110, 179, 132, 242, 53, 164, 196, 138, 4, 158, 127, 173, 244, 64, 217, 202, 245, 228, 222, 182, 74, 202, 146, 71, 142, 193, 149, 52, 159, 73, 186, 92, 3, 85, 249, 171, 96, 170, 120, 145, 16, 112, 136, 39, 216, 5, 138, 149, 245, 225, 97, 46, 195, 41, 151, 65, 141, 97, 106, 157, 24, 17, 26, 212, 77, 72, 136, 216, 239, 34, 63, 104, 245, 193, 79, 78, 116, 96, 117, 156, 187, 126, 143, 55, 29, 42, 45, 61, 147, 252, 127, 250, 192, 156, 89, 246, 42, 207, 240, 104, 241, 112, 239, 231, 28, 52, 169, 207, 27, 228, 241, 137, 234, 189, 105, 180, 140, 109, 234, 171, 45, 25, 192, 146, 64, 18, 192, 197, 118, 0, 123, 205, 18, 130, 210, 172, 100, 40, 174, 219, 160, 240, 165, 34, 10, 46, 253, 46, 56, 199, 124, 204, 152, 14, 101, 91, 74, 218, 212, 74, 41, 198, 165, 211, 45, 100, 0, 211, 231, 95, 49, 151, 68, 123, 176, 183, 114, 1, 165, 191, 110, 124, 110, 117, 229, 195, 192, 118, 51, 199, 170, 14, 127, 247, 92, 253, 137, 12, 63, 180, 82, 103, 246, 143, 177, 58, 208, 245, 134, 216, 202, 71, 10, 31, 151, 100, 127, 126, 229, 216, 69, 228, 141, 5, 235, 141, 225, 81, 226, 106, 238, 202, 158, 41, 188, 51, 61, 24, 169, 150, 35, 244, 82, 80, 58, 77, 40, 71, 49, 50, 158, 176, 207, 199, 216, 165, 144, 252, 64, 140, 140, 87, 165, 182, 6, 196, 146, 39, 121, 106, 191, 202, 52, 147, 74, 134, 67, 201, 34, 255, 217, 40, 98, 92, 154, 21, 203, 144, 66, 113, 101, 249, 115, 71, 170, 205, 30, 114, 217, 90, 166, 45, 85, 4, 54, 156, 183, 250, 11, 31, 189, 171, 53, 224, 122, 96, 63, 135, 88, 126, 113, 248, 108, 203, 17, 59, 240, 54, 248, 222, 178, 64, 250, 112, 202, 155, 116, 215, 141, 0, 218, 170, 246, 4, 113, 225, 161, 12, 87, 47, 42, 156, 235, 236, 100, 99, 20, 69, 179, 241, 190, 222, 241, 126, 107, 165, 78, 250, 193, 123, 1, 216, 218, 79, 204, 233, 104, 186, 77, 239, 106, 224, 204, 115, 20, 65, 73, 181, 156, 80, 121, 16, 201, 56, 209, 95, 183, 161, 95, 202, 126, 193, 112, 211, 170, 36, 44, 198, 100, 10, 119, 14, 188, 195, 253, 191, 95, 183, 254, 98, 75, 45, 246, 56, 122, 134, 232, 51, 109, 1, 235, 125, 64, 59, 202, 142, 159, 192, 133, 208, 24, 91, 229, 230, 18, 209, 85, 10, 26, 42, 97, 241, 201, 103, 154, 116, 186, 212, 215, 105, 50, 221, 114, 29, 95, 73, 189, 221, 199, 188, 1, 229, 26, 89, 92, 87, 27, 42, 43, 121, 189, 211, 114, 49, 125, 241, 143, 30, 228, 166, 31, 208, 238, 110, 165, 141, 48, 123, 124, 156, 69, 33, 66, 79, 14, 8, 31, 215, 30, 132, 102, 115, 250, 170, 87, 28, 110, 50, 89, 185, 213, 131, 212, 52, 190, 166, 0, 160, 253, 221, 178, 173, 209, 119, 169, 216, 97, 227, 4, 36, 63, 119, 163, 100, 73, 145, 163, 18, 131, 19, 211, 136, 108, 17, 25, 39, 150, 116, 150, 171, 48, 209, 128, 213, 90, 140, 61, 17, 183, 236, 18, 173, 163, 97, 220, 4, 144, 158, 143, 82, 44, 16, 191, 105, 185, 63, 48, 44, 167, 228, 79, 157, 68, 87, 171, 215, 49, 16, 13, 70, 32, 177, 149, 230, 133, 223, 179, 236, 66, 56, 130, 148, 32, 48, 243, 105, 201, 90, 223, 47, 114, 42, 50, 72, 21, 102, 103, 212, 232, 229, 233, 219, 122, 247, 173, 86, 218, 218, 128, 222, 173, 248, 215, 76, 134, 114, 220, 183, 82, 250, 78, 159, 133, 240, 79, 116, 59, 29, 6, 102, 77, 93, 148, 234, 192, 145, 9, 156, 153, 138, 34, 209, 55, 116, 110, 210, 173, 33, 246, 18, 106, 194, 175, 21, 213, 97, 213, 0, 141, 65, 130, 243, 24, 115, 239, 244, 164, 12, 25, 130, 129, 174, 25, 221, 155, 239, 245, 161, 150, 32, 31, 190, 119, 29, 244, 39, 133, 78, 248, 253, 157, 197, 14, 50, 152, 40, 246, 90, 217, 215, 194, 54, 46, 16, 43, 28, 183, 105, 140, 9, 75, 75, 152, 28, 242, 22, 57, 93, 120, 100, 91, 25, 249, 96, 98, 234, 176, 237, 224, 58, 157, 142, 193, 222, 183, 17, 3, 81, 54, 71, 200, 194, 48, 56, 127, 66, 68, 15, 31, 82, 198, 68, 209, 136, 255, 4, 88, 10, 14, 67, 213, 149, 160, 73, 179, 113, 93, 52, 110, 124, 18, 201, 60, 125, 142, 195, 1, 38, 80, 1, 135, 209, 168, 141, 117, 225, 55, 171, 195, 168, 124, 226, 71, 136, 29, 95, 232, 153, 143, 68, 131, 196, 86, 126, 19, 184, 228, 125, 102, 45, 24, 108, 126, 136, 36, 241, 203, 249, 170, 100, 102, 218, 1, 204, 182, 237, 76, 21, 59, 46, 214, 101, 121, 252, 114, 222, 0, 60, 17, 168, 74, 57, 80, 246, 157, 126, 119, 116, 100, 62, 77, 176, 210, 122, 233, 101, 13, 176, 234, 25, 197, 59, 144, 35, 153, 191, 201, 54, 41, 207, 3, 83, 233, 62, 218, 137, 58, 153, 112, 127, 123, 96, 89, 186, 212, 195, 181, 194, 155, 89, 226, 164, 45, 112, 50, 187, 149, 137, 240, 202, 195, 204, 215, 162, 156, 20, 172, 218, 23, 159, 9, 55, 4, 31, 59, 100, 69, 110, 86, 94, 41, 252, 168, 249, 155, 35, 24, 63, 114, 1, 185, 203, 67, 79, 168, 157, 12, 191, 26, 99, 71, 130, 208, 73, 211, 147, 10, 201, 30, 193, 137, 236, 18, 214, 50, 33, 70, 240, 235, 104, 168, 165, 2, 97, 153, 242, 152, 37, 252, 79, 119, 252, 194, 65, 83, 100, 240, 78, 89, 196, 36, 127, 223, 48, 101, 186, 61, 114, 10, 96, 169, 172, 146, 252, 124, 208, 6, 233, 71, 246, 84, 96, 130, 199, 122, 206, 186, 23, 253, 255, 109, 34, 91, 137, 175, 235, 221, 87, 247, 33, 182, 137, 154, 227, 55, 217, 168, 81, 233, 60, 240, 111, 10, 210, 112, 241, 155, 99, 154, 148, 202, 69, 179, 148, 158, 75, 252, 165, 255, 109, 133, 131, 166, 116, 59, 148, 231, 187, 131, 210, 82, 72, 76, 158, 197, 173, 0, 109, 171, 156, 14, 19, 222, 45, 169, 165, 234, 174, 142, 55, 13, 238, 102, 130, 78, 86, 25, 240, 116, 210, 110, 7, 122, 232, 94, 53, 108, 94, 6, 106, 161, 117, 111, 19, 121, 246, 177, 26, 41, 7, 99, 161, 22, 221, 163, 215, 71, 225, 167, 96, 147, 118, 4, 127, 219, 242, 199, 137, 66, 106, 151, 206, 241, 173, 244, 100, 44, 238, 25, 36, 39, 124, 56, 167, 199, 251, 111, 55, 97, 230, 183, 214, 50, 99, 216, 0, 163, 116, 49, 173, 188, 153, 84, 128, 100, 15, 140, 63, 251, 153, 212, 100, 207, 124, 8, 250, 178, 191, 228, 220, 42, 19, 2, 128, 238, 194, 218, 25, 104, 132, 101, 206, 209, 255, 96, 152, 219, 214, 216, 168, 162, 226, 98, 0, 203, 153, 112, 224, 171, 96, 88, 116, 225, 125, 214, 182, 109, 134, 92, 28, 142, 18, 137, 35, 78, 186, 51, 184, 71, 1, 7, 147, 151, 221, 1, 56, 64, 7, 61, 154, 6, 139, 187, 92, 116, 104, 242, 172, 8, 196, 78, 100, 177, 15, 157, 101, 44, 140, 248, 75, 59, 227, 87, 62, 160, 113, 163, 50, 181, 24, 206, 108, 83, 175, 190, 4, 99, 171, 102, 3, 227, 231, 8, 105, 157, 35, 157, 113, 180, 241, 47, 97, 191, 220, 47, 52, 90, 255, 238, 136, 243, 59, 22, 129, 191, 205, 60, 222, 169, 244, 200, 204, 104, 223, 93, 1, 250, 231, 189, 211, 74, 233, 195, 104, 209, 231, 134, 157, 75, 119, 172, 69, 6, 59, 104, 29, 167, 118, 144, 89, 0, 205, 194, 179, 11, 171, 191, 163, 236, 48, 178, 201, 47, 81, 46, 240, 160, 244, 116, 29, 140, 115, 3, 119, 252, 163, 170, 46, 86, 234, 203, 1, 7, 35, 116, 118, 66, 119, 136, 154, 73, 132, 125, 13, 33, 185, 150, 242, 172, 135, 245, 141, 228, 40, 4, 179, 66, 27, 67, 138, 247, 170, 166, 61, 231, 52, 162, 225, 148, 137, 135, 160, 27, 252, 160, 238, 8, 130, 131, 112, 48, 118, 63, 214, 243, 4, 159, 104, 247, 219, 67, 77, 188, 213, 38, 178, 16, 16, 4, 184, 116, 170, 10, 214, 42, 8, 222, 112, 32, 92, 83, 246, 161, 36, 39, 23, 80, 231, 1, 48, 93, 72, 97, 94, 195, 255, 3, 150, 197, 111, 136, 108, 199, 142, 51, 69, 198, 176, 221, 190, 90, 60, 219, 212, 117, 197, 247, 109, 97, 112, 92, 15, 118, 210, 142, 11, 175, 62, 153, 28, 34, 162, 171, 36, 26, 98, 28, 185, 92, 35, 252, 185, 153, 222, 116, 153, 60, 156, 87, 216, 166, 13, 158, 175, 144, 251, 142, 27, 145, 218, 58, 122, 132, 68, 35, 85, 84, 254, 220, 149, 13, 14, 47, 21, 152, 173, 241, 15, 205, 124, 220, 117, 23, 202, 200, 11, 128, 107, 43, 86, 84, 84, 141, 189, 201, 133, 2, 190, 182, 72, 208, 143, 134, 117, 22, 57, 205, 198, 66, 236, 32, 114, 22, 60, 152, 110, 91, 248, 109, 101, 3, 51, 144, 63, 112, 254, 203, 91, 16, 230, 13, 60, 35, 215, 65, 26, 12, 139, 132, 187, 99, 168, 23, 7, 165, 23, 105, 61, 103, 210, 40, 92, 62, 162, 167, 129, 190, 129, 1, 232, 95, 109, 52, 115, 20, 18, 204, 138, 99, 231, 78, 237, 92, 127, 247, 50, 73, 26, 31, 255, 63, 28, 34, 119, 181, 63, 120, 176, 179, 118, 106, 12, 218, 45, 13, 105, 143, 31, 176, 163, 71, 218, 160, 18, 212, 12, 161, 244, 212, 229, 23, 29, 155, 227, 162, 118, 224, 52, 52, 32, 104, 54, 214, 30, 87, 0, 188, 14, 86, 240, 152, 12, 193, 31, 21, 231, 21, 16, 50, 134, 195, 243, 183, 47, 58, 119, 153, 133, 126, 159, 20, 32, 185, 40, 160, 48, 186, 19, 218, 86, 25, 220, 186, 45, 170, 79, 16, 187, 132, 110, 184, 191, 64, 198, 97, 6, 236, 56, 155, 222, 28, 138, 168, 217, 199, 104, 136, 159, 229, 205, 94, 184, 202, 32, 10, 210, 202, 40, 61, 41, 217, 180, 238, 42, 135, 83, 58, 148, 188, 241, 191, 95, 127, 161, 193, 45, 143, 241, 101, 71, 148, 177, 158, 118, 47, 14, 253, 49, 110, 74, 4, 124, 92, 229, 160, 58, 30, 18, 13, 55, 20, 13, 73, 176, 233, 165, 237, 82, 247, 238, 101, 119, 115, 255, 155, 44, 8, 35, 253, 149, 56, 90, 45, 88, 128, 28, 114, 95, 114, 237, 12, 33, 105, 114, 100, 9, 101, 22, 76, 151, 38, 216, 74, 245, 215, 23, 19, 66, 31, 3, 150, 135, 116, 107, 90, 232, 247, 81, 142, 243, 5, 25, 21, 84, 238, 0, 191, 82, 186, 244, 252, 77, 104, 231, 128, 60, 171, 37, 61, 17, 3, 160, 141, 165, 193, 131, 30, 16, 180, 236, 79, 109, 169, 194, 86, 41, 192, 127, 172, 191, 42, 20, 180, 102, 159, 34, 142, 176, 164, 218, 255, 121, 81, 72, 231, 110, 144, 9, 64, 244, 154, 198, 166, 31, 229, 166, 24, 137, 196, 183, 119, 167, 194, 37, 196, 21, 239, 53, 174, 176, 205, 144, 93, 121, 200, 13, 102, 154, 152, 31, 182, 190, 195, 169, 209, 40, 1, 145, 47, 74, 193, 108, 169, 7, 2, 164, 159, 41, 10, 146, 39, 215, 242, 43, 244, 51, 90, 166, 255, 138, 10, 5, 47, 164, 125, 59, 36, 134, 147, 218, 180, 107, 37, 117, 244, 36, 105, 158, 108, 147, 144, 155, 104, 237, 234, 140, 212, 240, 93, 36, 170, 155, 129, 150, 219, 54, 247, 253, 200, 83, 180, 243, 159, 0, 5, 177, 65, 160, 120, 62, 153, 202, 185, 142, 153, 8, 103, 244, 128, 139, 22, 208, 27, 226, 171, 63, 197, 36, 220, 19, 119, 174, 89, 203, 86, 123, 85, 19, 115, 72, 80, 254, 160, 157, 139, 59, 121, 165, 62, 251, 115, 9, 56, 142, 12, 139, 108, 150, 218, 235, 82, 223, 55, 12, 211, 152, 243, 34, 236, 60, 7, 183, 142, 7, 153, 150, 64, 171, 37, 226, 204, 226, 87, 113, 167, 110, 150, 132, 18, 215, 225, 245, 175, 92, 89, 3, 47, 195, 25, 34, 188, 14, 17, 13, 123, 70, 136, 192, 24, 142, 92, 52, 173, 153, 225, 104, 39, 36, 61, 145, 93, 3, 142, 51, 71, 76, 59, 125, 143, 214, 235, 154, 28, 181, 254, 54, 246, 176, 131, 91, 143, 138, 193, 74, 129, 88, 201, 3, 80, 4, 52, 91, 61, 46, 66, 254, 102, 199, 121, 145, 23, 249, 208, 5, 7, 53, 56, 68, 45, 169, 137, 247, 36, 27, 38, 136, 89, 29, 151, 255, 152, 200, 239, 155, 139, 18, 30, 19, 182, 184, 57, 9, 176, 113, 104, 131, 153, 223, 162, 211, 153, 70, 45, 187, 158, 213, 51, 237, 241, 223, 182, 176, 2, 176, 6, 120, 39, 62, 0, 90, 90, 83, 24, 199, 152, 143, 178, 223, 1, 241, 199, 93, 62, 32, 180, 188, 50, 200, 118, 147, 30, 229, 112, 103, 176, 160, 49, 154, 197, 193, 227, 169, 148, 221, 23, 108, 7, 0, 100, 0, 249, 233, 249, 78, 54, 59, 133, 43, 183, 106, 181, 186, 126, 88, 73, 29, 120, 35, 193, 28, 180, 114, 239, 89, 6, 21, 32, 153, 242, 234, 237, 142, 61, 17, 0, 128, 92, 184, 178, 180, 128, 61, 127, 165, 45, 237, 182, 201, 165, 46, 212, 133, 40, 253, 227, 119, 112, 225, 106, 61, 84, 211, 249, 240, 238, 185, 173, 221, 54, 186, 223, 0, 246, 201, 254, 7, 50, 111, 54, 208, 182, 196, 163, 48, 84, 142, 153, 73, 102, 55, 215, 249, 146, 153, 174, 196, 198, 149, 193, 86, 48, 214, 185, 198, 161, 216, 102, 208, 159, 169, 157, 202, 16, 206, 14, 0, 4, 204, 186, 113, 173, 175, 201, 200, 2, 201, 83, 167, 118, 83, 10, 207, 146, 88, 187, 254, 233, 240, 15, 62, 129, 23, 66, 205, 104, 175, 64, 209, 59, 186, 212, 143, 139, 184, 51, 153, 78, 253, 245, 154, 158, 154, 124, 62, 103, 46, 140, 140, 157, 94, 74, 126, 213, 167, 170, 233, 135, 104, 158, 105, 83, 114, 140, 119, 111, 186, 255, 146, 62, 20, 254, 85, 71, 6, 154, 210, 255, 10, 202, 97, 60, 70, 250, 14, 237, 40, 157, 24, 20, 97, 220, 159, 123, 179, 50, 203, 212, 53, 254, 99, 90, 42, 179, 154, 15, 187, 178, 46, 128, 190, 27, 124, 205, 68, 139, 135, 124, 152, 3, 83, 119, 101, 180, 57, 140, 193, 249, 231, 165, 174, 9, 114, 9, 164, 54, 101, 63, 33, 83, 43, 76, 155, 13, 62, 22, 78, 59, 200, 53, 140, 105, 211, 37, 82, 213, 166, 70, 92, 151, 148, 210, 28, 40, 50, 157, 113, 160, 166, 150, 202, 223, 151, 144, 89, 27, 227, 33, 20, 117, 233, 218, 197, 65, 195, 105, 184, 200, 205, 198, 120, 114, 224, 102, 99, 19, 108, 30, 204, 177, 36, 151, 45, 45, 198, 76, 19, 217, 181, 18, 170, 253, 231, 241, 210, 136, 140, 193, 29, 248, 255, 223, 27, 191, 116, 252, 149, 74, 196, 46, 104, 12, 230, 139, 223, 136, 96, 58, 179, 232, 74, 148, 35, 167, 119, 49, 123, 179, 184, 104, 173, 197, 14, 236, 49, 31, 106, 134, 191, 143, 250, 120, 111, 200, 100, 169, 34, 70, 7, 129, 55, 216, 57, 56, 106, 205, 125, 234, 100, 241, 91, 46, 108, 31, 13, 232, 224, 117, 99, 108, 171, 138, 96, 247, 206, 203, 211, 56, 121, 81, 165, 231, 76, 81, 13, 249, 68, 172, 215, 157, 60, 244, 93, 103, 72, 194, 53, 222, 33, 166, 173, 212, 69, 211, 201, 92, 233, 192, 105, 4, 129, 138, 206, 146, 168, 45, 236, 167, 37, 245, 72, 177, 166, 78, 247, 170, 102, 57, 94, 137, 121, 68, 252, 183, 207, 158, 150, 162, 103, 202, 224, 228, 30, 249, 118, 43, 33, 37, 180, 28, 67, 121, 92, 9, 214, 165, 46, 129, 213, 236, 61, 146, 131, 237, 43, 99, 94, 240, 96, 62, 37, 175, 149, 13, 242, 100, 194, 51, 1, 121, 219, 193, 22, 232, 233, 44, 2, 32, 153, 35, 145, 228, 230, 104, 206, 138, 103, 180, 241, 251, 58, 142, 1, 138, 107, 16, 183, 11, 158, 246, 203, 65, 174, 243, 46, 145, 96, 30, 24, 141, 45, 138, 70, 74, 135, 169, 15, 223, 55, 221, 240, 179, 190, 123, 29, 133, 52, 243, 145, 28, 100, 210, 129, 134, 60, 150, 90, 236, 235, 21, 92, 62, 123, 78, 220, 166, 153, 227, 8, 54, 248, 10, 238, 83, 160, 95, 15, 155, 214, 227, 251, 5, 116, 191, 130, 177, 168, 13, 68, 68, 11, 220, 45, 251, 90, 17, 45, 145, 215, 64, 164, 226, 151, 170, 226, 5, 97, 1, 211, 84, 138, 47, 95, 97, 116, 92, 172, 253, 77, 10, 239, 114, 106, 202, 243, 208, 231, 183, 81, 38, 77, 48, 204, 94, 168, 253, 195, 145, 239, 252, 142, 229, 194, 223, 159, 94, 203, 188, 22, 159, 191, 222, 7, 121, 161, 240, 8, 145, 144, 234, 129, 84, 205, 61, 202, 209, 186, 181, 67, 224, 48, 172, 81, 8, 37, 68, 30, 146, 131, 69, 39, 98, 50, 239, 130, 212, 142, 105, 170, 232, 10, 152, 224, 63, 122, 90, 176, 88, 83, 47, 21, 41, 25, 174, 239, 151, 77, 173, 79, 135, 177, 242, 112, 164, 205, 159, 66, 167, 43, 116, 182, 14, 115, 13, 167, 234, 32, 40, 9, 237, 55, 100, 22, 84, 153, 202, 194, 46, 196, 219, 175, 159, 138, 57, 168, 132, 160, 144, 47, 32, 37, 61, 96, 20, 197, 166, 136, 164, 227, 208, 130, 198, 41, 50, 110, 208, 150, 19, 7, 145, 125, 102, 194, 155, 246, 40, 95, 238, 160, 231, 70, 35, 61, 126, 201, 76, 178, 166, 12, 91, 215, 3, 63, 162, 214, 124, 146, 73, 17, 158, 225, 13, 129, 141, 244, 255, 65, 123, 53, 138, 100, 187, 235, 114, 66, 125, 164, 103, 193, 31, 110, 195, 192, 21, 237, 138, 222, 2, 204, 185, 65, 190, 68, 209, 117, 130, 222, 109, 210, 156, 229, 82, 104, 193, 150, 173, 99, 228, 29, 153, 138, 119, 187, 67, 213, 210, 73, 173, 15, 236, 215, 215, 224, 109, 17, 83, 193, 77, 116, 114, 130, 198, 84, 157, 107, 154, 188, 88, 164, 46, 10, 61, 110, 251, 25, 150, 62, 244, 205, 176, 198, 125, 23, 83, 56, 27, 40, 35, 208, 210, 24, 225, 230, 207, 221, 174, 162, 103, 21, 135, 38, 23, 231, 245, 234, 221, 112, 1, 155, 21, 15, 111, 35, 33, 208, 243, 230, 103, 186, 43, 245, 238, 185, 170, 101, 8, 135, 1, 59, 251, 73, 61, 140, 11, 110, 113, 10, 129, 213, 26, 178, 237, 113, 175, 112, 179, 85, 31, 212, 190, 59, 77, 1, 208, 85, 187, 228, 222, 238, 22, 54, 41, 11, 147, 41, 108, 232, 43, 200, 197, 129, 169, 70, 143, 120, 130, 45, 215, 51, 248, 87, 247, 229, 192, 129, 221, 7, 25, 17, 174, 154, 252, 206, 125, 197, 243, 105, 10, 28, 104, 228, 52, 173, 117, 74, 245, 199, 235, 1, 212, 96, 36, 49, 228, 126, 145, 53, 234, 64, 159, 159, 208, 64, 159, 113, 157, 126, 168, 70, 108, 169, 211, 66, 252, 25, 136, 36, 95, 94, 143, 93, 44, 72, 143, 213, 78, 38, 58, 216, 165, 15, 21, 109, 193, 226, 232, 170, 221, 38, 149, 23, 101, 25, 161, 1, 152, 154, 150, 81, 144, 156, 157, 85, 93, 47, 8, 114, 162, 65, 186, 252, 123, 85, 133, 116, 244, 69, 123, 109, 150, 206, 98, 28, 229, 209, 251, 63, 57, 95, 147, 99, 103, 184, 36, 141, 49, 99, 93, 97, 41, 174, 25, 249, 8, 7, 7, 158, 38, 144, 13, 138, 72, 17, 112, 81, 14, 205, 133, 143, 216, 113, 25, 149, 77, 183, 160, 121, 255, 204, 37, 204, 197, 111, 97, 251, 54, 85, 195, 139, 70, 0, 196, 129, 165, 215, 158, 74, 196, 81, 106, 156, 132, 35, 187, 197, 66, 204, 235, 209, 192, 209, 94, 89, 135, 100, 232, 59, 98, 78, 216, 162, 101, 202, 141, 107, 116, 102, 140, 32, 139, 41, 206, 207, 110, 218, 214, 165, 181, 50, 36, 179, 74, 223, 251, 192, 252, 249, 51, 55, 28, 73, 93, 221, 206, 132, 250, 176, 68, 254, 50, 83, 111, 150, 203, 52, 32, 233, 204, 51, 54, 66, 189, 174, 204, 53, 146, 197, 191, 124, 134, 92, 52, 84, 11, 245, 219, 107, 95, 72, 13, 15, 4, 119, 193, 197, 219, 234, 86, 244, 6, 80, 194, 9, 239, 61, 203, 231, 94, 118, 205, 127, 140, 207, 168, 189, 85, 49, 92, 191, 83, 85, 177, 133, 133, 234, 21, 236, 36, 96, 134, 121, 49, 239, 174, 149, 228, 34, 168, 15, 68, 118, 178, 85, 220, 171, 40, 160, 254, 66, 138, 193, 119, 205, 11, 241, 99, 82, 195, 183, 170, 160, 167, 45, 11, 251, 172, 102, 131, 249, 147, 147, 164, 134, 10, 63, 91, 236, 128, 58, 243, 224, 134, 183, 68, 3, 176, 159, 11, 248, 148, 237, 159, 216, 2, 25, 216, 110, 122, 235, 216, 68, 222, 1, 125, 107, 17, 247, 79, 203, 208, 31, 54, 227, 59, 244, 92, 128, 163, 190, 171, 191, 153, 119, 192, 167, 211, 29, 39, 134, 126, 40, 74, 209, 150, 196, 74, 226, 161, 82, 171, 244, 137, 96, 187, 218, 29, 208, 128, 188, 175, 13, 114, 78, 120, 146, 75, 194, 142, 170, 222, 93, 159, 203, 204, 255, 80, 81, 31, 73, 166, 170, 138, 242, 243, 189, 120, 145, 192, 144, 136, 210, 103, 138, 50, 170, 206, 150, 102, 239, 245, 11, 232, 202, 215, 105, 188, 132, 107, 63, 226, 254, 215, 146, 12, 97, 180, 53, 18, 30, 104, 58, 33, 149, 52, 11, 208, 35, 120, 33, 50, 237, 211, 136, 144, 8, 232, 120, 251, 57, 32, 4, 122, 200, 75, 224, 198, 156, 87, 48, 201, 106, 54, 110, 153, 247, 30, 124, 201, 251, 76, 220, 152, 233, 63, 235, 85, 6, 59, 194, 219, 226, 55, 250, 224, 107, 104, 52, 90, 148, 24, 181, 180, 21, 145, 184, 61, 7, 18, 224, 2, 236, 1, 51, 77, 100, 209, 52, 237, 242, 178, 54, 18, 20, 237, 114, 83, 9, 118, 232, 185, 213, 30, 135, 21, 197, 137, 70, 48, 172, 141, 175, 69, 244, 20, 112, 64, 174, 216, 250, 13, 115, 92, 196, 53, 81, 243, 59, 115, 201, 172, 181, 107, 195, 26, 185, 211, 191, 93, 145, 100, 130, 140, 180, 171, 26, 196, 214, 28, 137, 201, 197, 220, 34, 249, 139, 131, 32, 46, 176, 218, 101, 78, 37, 141, 162, 98, 123, 34, 221, 46, 75, 58, 32, 32, 43, 150, 60, 222, 41, 160, 248, 183, 1, 156, 11, 240, 237, 27, 201, 176, 79, 236, 69, 147, 32, 108, 57, 56, 159, 220, 62, 185, 35, 198, 118, 188, 125, 205, 165, 37, 204, 254, 87, 42, 136, 104, 113, 197, 37, 190, 88, 54, 151, 115, 44, 125, 24, 199, 3, 41, 78, 67, 70, 59, 148, 128, 222, 137, 52, 192, 214, 69, 126, 177, 98, 179, 83, 69, 195], + [179, 250, 7, 145, 27, 186, 110, 180, 110, 62, 68, 57, 66, 163, 15, 210, 18, 154, 226, 131, 167, 170, 112, 192, 72, 177, 73, 172, 116, 197, 75, 95, 192, 53, 43, 49, 155, 0, 143, 70, 21, 33, 107, 123, 85, 46, 164, 238, 31, 52, 202, 148, 232, 1, 102, 127, 26, 182, 101, 157, 113, 253, 27, 217, 200, 160, 103, 115, 169, 156, 99, 166, 181, 54, 161, 55, 240, 169, 58, 83, 10, 78, 180, 78, 125, 221, 148, 31, 58, 116, 153, 5, 112, 45, 251, 252, 181, 45, 76, 170, 69, 211, 133, 189, 65, 185, 28, 215, 83, 2, 134, 153, 233, 2, 189, 23, 158, 79, 203, 192, 136, 171, 38, 216, 167, 249, 125, 48, 74, 178, 111, 166, 178, 110, 92, 202, 187, 70, 51, 57, 233, 133, 131, 8, 46, 142, 107, 152, 80, 128, 91, 74, 158, 242, 192, 11, 120, 195, 144, 103, 251, 66, 71, 165, 60, 55, 3, 238, 228, 59, 68, 168, 194, 172, 248, 64, 249, 141, 160, 2, 51, 206, 253, 254, 123, 150, 219, 250, 116, 144, 154, 201, 59, 21, 142, 131, 181, 178, 128, 7, 55, 70, 130, 91, 108, 93, 93, 158, 224, 86, 42, 71, 150, 188, 133, 148, 181, 149, 238, 193, 62, 62, 156, 135, 98, 104, 149, 110, 84, 250, 218, 207, 170, 63, 120, 1, 142, 140, 9, 118, 214, 162, 152, 194, 255, 131, 225, 255, 41, 75, 51, 109, 166, 167, 59, 186, 21, 118, 27, 201, 163, 26, 178, 109, 139, 59, 129, 151, 109, 162, 165, 184, 247, 121, 41, 74, 94, 133, 140, 11, 219, 55, 76, 206, 200, 83, 9, 74, 229, 168, 149, 137, 4, 143, 213, 202, 57, 26, 186, 51, 102, 215, 146, 12, 89, 254, 151, 125, 20, 251, 61, 255, 236, 81, 28, 216, 146, 140, 136, 251, 42, 39, 77, 44, 27, 83, 35, 171, 95, 173, 215, 207, 219, 54, 141, 188, 45, 209, 143, 89, 21, 38, 246, 144, 97, 54, 129, 142, 108, 120, 42, 250, 112, 188, 88, 39, 64, 178, 89, 232, 227, 75, 113, 121, 3, 127, 23, 144, 24, 25, 151, 208, 252, 64, 187, 210, 50, 101, 192, 75, 104, 225, 253, 156, 49, 124, 80, 47, 130, 140, 94, 178, 49, 225, 8, 246, 32, 46, 215, 98, 186, 66, 240, 247, 225, 157, 147, 236, 172, 53, 205, 142, 80, 241, 9, 4, 198, 4, 116, 182, 102, 139, 52, 88, 64, 28, 81, 210, 16, 34, 171, 6, 245, 246, 46, 67, 140, 244, 13, 27, 57, 10, 55, 154, 179, 212, 154, 186, 9, 177, 10, 154, 55, 151, 99, 0, 0, 153, 6, 22, 80, 71, 63, 219, 78, 177, 47, 147, 180, 98, 254, 52, 133, 233, 30, 49, 45, 149, 94, 222, 97, 133, 118, 39, 227, 150, 171, 240, 49, 154, 213, 34, 185, 159, 122, 228, 205, 255, 44, 114, 235, 126, 244, 116, 159, 221, 72, 181, 69, 110, 47, 212, 225, 63, 46, 5, 196, 241, 77, 104, 140, 161, 69, 66, 205, 130, 202, 145, 240, 205, 118, 217, 53, 233, 198, 162, 131, 111, 3, 135, 133, 240, 164, 73, 188, 2, 115, 226, 48, 62, 75, 178, 154, 59, 124, 112, 23, 111, 6, 19, 18, 49, 103, 220, 225, 41, 159, 239, 146, 160, 97, 223, 102, 98, 79, 65, 236, 209, 16, 35, 168, 7, 5, 69, 26, 21, 12, 244, 195, 91, 26, 63, 204, 191, 103, 32, 111, 162, 169, 51, 42, 75, 69, 82, 231, 125, 250, 238, 209, 176, 176, 24, 200, 51, 135, 97, 220, 58, 3, 149, 128, 101, 37, 28, 198, 32, 42, 55, 142, 84, 120, 200, 227, 5, 89, 150, 240, 96, 35, 239, 165, 137, 208, 137, 220, 90, 211, 32, 89, 139, 116, 132, 198, 253, 55, 216, 211, 110, 166, 124, 41, 110, 59, 18, 185, 224, 23, 204, 167, 153, 20, 153, 111, 56, 197, 252, 248, 224, 215, 3, 80, 90, 17, 94, 64, 27, 53, 188, 190, 233, 121, 50, 251, 253, 180, 4, 47, 154, 22, 45, 16, 79, 244, 165, 108, 100, 15, 52, 107, 121, 160, 161, 185, 169, 244, 79, 101, 62, 44, 245, 232, 169, 67, 107, 7, 162, 55, 185, 41, 66, 43, 216, 35, 37, 14, 51, 90, 29, 84, 132, 112, 11, 76, 223, 103, 31, 210, 169, 245, 138, 37, 183, 49, 22, 201, 110, 213, 1, 137, 92, 205, 202, 169, 218, 215, 107, 110, 167, 201, 82, 220, 91, 95, 105, 202, 52, 54, 178, 110, 102, 244, 40, 220, 94, 246, 89, 46, 65, 57, 45, 210, 177, 9, 74, 157, 233, 200, 187, 7, 213, 111, 200, 110, 245, 74, 33, 208, 3, 126, 75, 169, 203, 113, 229, 91, 50, 196, 181, 139, 107, 48, 142, 121, 87, 85, 234, 47, 64, 81, 224, 105, 62, 155, 250, 30, 88, 162, 141, 3, 215, 99, 220, 197, 32, 181, 217, 113, 60, 255, 10, 221, 220, 184, 64, 206, 129, 204, 30, 179, 231, 34, 70, 226, 207, 224, 241, 126, 154, 217, 9, 16, 55, 223, 168, 79, 32, 253, 164, 200, 183, 173, 7, 84, 44, 184, 249, 140, 178, 15, 249, 52, 188, 7, 164, 164, 43, 76, 220, 82, 38, 1, 134, 38, 93, 192, 126, 68, 190, 1, 250, 56, 114, 139, 159, 41, 63, 25, 142, 66, 2, 168, 90, 4, 136, 35, 31, 117, 191, 228, 20, 166, 183, 7, 126, 230, 185, 176, 96, 59, 224, 47, 10, 27, 114, 112, 244, 66, 106, 45, 84, 36, 140, 136, 0, 77, 34, 135, 143, 84, 207, 63, 238, 206, 86, 135, 84, 155, 125, 98, 62, 21, 158, 107, 213, 2, 204, 246, 181, 71, 241, 132, 250, 169, 36, 195, 226, 48, 39, 158, 199, 104, 84, 179, 180, 47, 47, 119, 73, 189, 238, 246, 203, 13, 215, 153, 0, 205, 240, 183, 221, 227, 228, 12, 28, 5, 11, 31, 17, 217, 25, 222, 206, 250, 112, 136, 136, 19, 153, 1, 66, 65, 234, 122, 82, 31, 197, 85, 204, 90, 246, 10, 92, 232, 139, 154, 97, 121, 40, 168, 111, 39, 71, 131, 245, 105, 148, 17, 177, 95, 71, 149, 62, 161, 31, 17, 34, 105, 83, 188, 162, 127, 18, 198, 211, 235, 39, 72, 192, 142, 90, 36, 175, 75, 20, 3, 167, 88, 95, 137, 84, 38, 219, 58, 184, 46, 239, 91, 114, 68, 91, 128, 197, 113, 120, 17, 179, 108, 164, 60, 125, 4, 74, 119, 169, 133, 203, 4, 233, 246, 8, 209, 229, 110, 175, 18, 238, 23, 144, 161, 120, 2, 4, 123, 249, 8, 218, 116, 18, 133, 196, 51, 67, 81, 208, 222, 79, 131, 179, 231, 241, 159, 251, 96, 17, 148, 179, 251, 45, 13, 71, 244, 71, 211, 172, 84, 137, 13, 55, 254, 169, 108, 43, 153, 17, 118, 213, 205, 210, 221, 62, 128, 19, 107, 123, 225, 128, 218, 140, 111, 93, 13, 209, 160, 85, 167, 57, 19, 225, 177, 175, 39, 180, 180, 101, 187, 200, 167, 180, 193, 95, 134, 199, 168, 68, 196, 228, 169, 143, 99, 9, 83, 4, 171, 204, 118, 80, 112, 82, 142, 5, 198, 61, 222, 185, 213, 118, 8, 30, 43, 63, 178, 129, 230, 94, 87, 247, 227, 104, 105, 5, 4, 3, 148, 131, 209, 158, 163, 172, 77, 48, 78, 205, 39, 75, 203, 89, 91, 181, 165, 198, 193, 207, 13, 174, 48, 56, 73, 108, 29, 37, 106, 248, 211, 21, 226, 158, 90, 171, 250, 116, 243, 82, 17, 56, 92, 56, 49, 39, 152, 36, 214, 224, 33, 101, 112, 121, 254, 21, 201, 30, 237, 76, 42, 224, 136, 64, 126, 156, 204, 204, 212, 235, 162, 122, 11, 78, 26, 160, 40, 98, 133, 40, 209, 126, 200, 242, 5, 254, 67, 29, 105, 78, 42, 248, 72, 6, 116, 72, 115, 68, 162, 243, 131, 5, 210, 88, 244, 12, 8, 118, 192, 28, 70, 50, 233, 189, 28, 206, 47, 16, 251, 58, 249, 243, 61, 45, 247, 1, 229, 232, 100, 179, 50, 247, 15, 252, 217, 228, 47, 155, 171, 158, 176, 246, 170, 14, 253, 240, 255, 232, 212, 48, 76, 13, 167, 31, 141, 162, 108, 88, 236, 126, 182, 121, 126, 23, 229, 166, 168, 97, 144, 221, 138, 41, 180, 161, 249, 154, 176, 204, 43, 149, 83, 68, 254, 68, 188, 150, 115, 127, 94, 26, 9, 0, 191, 62, 159, 130, 6, 220, 37, 184, 52, 239, 223, 81, 180, 205, 165, 76, 57, 58, 179, 138, 60, 46, 198, 145, 18, 130, 249, 73, 73, 31, 124, 86, 125, 89, 180, 65, 124, 134, 150, 250, 12, 57, 254, 25, 148, 13, 211, 126, 61, 73, 167, 91, 5, 32, 148, 162, 47, 184, 68, 235, 122, 91, 8, 98, 163, 113, 231, 166, 220, 24, 25, 113, 134, 2, 79, 176, 72, 38, 213, 132, 23, 206, 249, 217, 35, 190, 198, 136, 153, 198, 248, 249, 231, 249, 215, 122, 219, 118, 250, 156, 104, 100, 16, 194, 41, 110, 207, 36, 38, 181, 195, 64, 106, 134, 21, 65, 153, 170, 83, 34, 135, 0, 223, 39, 133, 112, 89, 114, 210, 177, 203, 31, 225, 224, 224, 147, 109, 103, 213, 137, 1, 185, 101, 27, 5, 38, 79, 158, 235, 120, 240, 249, 44, 226, 74, 143, 47, 22, 105, 252, 85, 45, 18, 71, 127, 196, 165, 72, 174, 126, 20, 38, 0, 75, 59, 100, 146, 167, 101, 80, 64, 101, 224, 116, 166, 148, 151, 123, 199, 94, 35, 153, 53, 157, 169, 148, 39, 118, 202, 182, 193, 27, 92, 84, 240, 211, 28, 1, 192, 239, 120, 55, 82, 161, 208, 53, 106, 129, 4, 235, 178, 85, 126, 215, 67, 158, 81, 157, 147, 61, 183, 180, 29, 55, 245, 84, 231, 181, 222, 65, 249, 133, 56, 184, 149, 83, 67, 152, 6, 175, 11, 108, 144, 190, 91, 25, 76, 25, 219, 21, 39, 155, 181, 6, 139, 30, 153, 96, 9, 107, 196, 6, 231, 207, 96, 223, 8, 81, 252, 149, 92, 151, 80, 164, 85, 107, 196, 55, 228, 0, 33, 235, 123, 171, 221, 223, 158, 96, 164, 36, 191, 229, 144, 76, 211, 160, 39, 56, 180, 20, 178, 177, 140, 38, 162, 198, 163, 215, 45, 149, 240, 175, 135, 200, 9, 52, 1, 203, 161, 247, 8, 126, 179, 58, 132, 8, 22, 8, 35, 150, 3, 221, 184, 219, 192, 192, 50, 135, 105, 7, 188, 138, 250, 130, 150, 90, 141, 204, 214, 252, 53, 107, 44, 95, 220, 44, 16, 31, 238, 250, 213, 255, 35, 219, 239, 147, 126, 12, 249, 181, 191, 0, 154, 12, 193, 69, 56, 98, 248, 67, 92, 123, 21, 8, 183, 193, 146, 222, 182, 201, 217, 104, 83, 26, 7, 236, 100, 136, 64, 118, 91, 33, 158, 108, 125, 192, 237, 151, 145, 41, 127, 82, 131, 115, 66, 91, 242, 117, 234, 6, 234, 23, 94, 103, 118, 81, 47, 207, 151, 30, 146, 101, 42, 84, 188, 33, 158, 226, 213, 117, 39, 37, 111, 137, 223, 172, 101, 109, 56, 153, 82, 91, 27, 32, 211, 90, 180, 2, 96, 231, 96, 185, 29, 249, 3, 67, 53, 85, 38, 132, 34, 37, 177, 57, 200, 57, 157, 111, 76, 4, 11, 117, 157, 37, 93, 248, 74, 243, 143, 39, 74, 233, 187, 140, 84, 69, 225, 79, 223, 129, 188, 130, 180, 100, 62, 238, 89, 56, 16, 37, 85, 65, 109, 168, 166, 96, 233, 69, 125, 190, 119, 209, 59, 6, 114, 126, 171, 109, 177, 124, 50, 125, 13, 242, 71, 228, 57, 75, 22, 149, 248, 246, 17, 160, 86, 68, 51, 208, 31, 199, 0, 247, 213, 153, 7, 31, 189, 45, 80, 105, 240, 17, 173, 99, 169, 129, 71, 14, 209, 26, 185, 91, 226, 123, 208, 234, 146, 228, 129, 236, 99, 221, 128, 198, 160, 117, 157, 152, 149, 107, 174, 51, 226, 128, 4, 240, 73, 122, 168, 165, 148, 120, 186, 33, 240, 5, 156, 46, 77, 152, 16, 196, 27, 56, 219, 49, 139, 56, 54, 191, 70, 88, 26, 101, 8, 19, 157, 128, 174, 248, 15, 140, 200, 74, 107, 37, 101, 112, 226, 156, 79, 226, 212, 179, 238, 213, 44, 1, 163, 7, 195, 96, 48, 253, 54, 177, 181, 53, 251, 56, 234, 146, 101, 28, 19, 236, 85, 203, 115, 116, 190, 124, 70, 206, 195, 233, 36, 9, 81, 63, 192, 107, 93, 158, 95, 179, 27, 105, 145, 241, 43, 225, 202, 182, 23, 122, 89, 233, 171, 182, 82, 156, 9, 192, 118, 177, 134, 220, 152, 147, 49, 203, 245, 94, 230, 29, 150, 187, 133, 139, 153, 27, 10, 212, 180, 138, 28, 38, 105, 5, 82, 90, 167, 213, 183, 224, 17, 110, 86, 82, 50, 76, 103, 45, 234, 67, 193, 151, 52, 0, 141, 137, 187, 11, 119, 11, 4, 245, 193, 52, 36, 68, 229, 248, 31, 104, 51, 169, 132, 213, 132, 110, 36, 236, 82, 242, 17, 77, 247, 68, 232, 97, 42, 145, 133, 213, 41, 191, 246, 227, 100, 42, 239, 119, 212, 52, 242, 79, 108, 104, 64, 102, 172, 22, 186, 203, 214, 6, 23, 131, 129, 117, 113, 128, 188, 176, 149, 159, 0, 112, 209, 65, 152, 5, 17, 140, 156, 138, 64, 229, 6, 247, 183, 134, 41, 226, 139, 24, 116, 147, 112, 61, 26, 251, 173, 50, 32, 209, 123, 234, 166, 12, 114, 236, 215, 202, 73, 110, 57, 42, 28, 160, 29, 176, 4, 207, 172, 185, 63, 5, 58, 55, 243, 125, 165, 240, 117, 249, 119, 189, 142, 156, 248, 13, 26, 137, 194, 94, 75, 209, 95, 83, 246, 110, 55, 189, 124, 254, 36, 218, 54, 65, 144, 246, 213, 167, 166, 181, 147, 202, 208, 213, 109, 188, 44, 54, 36, 106, 163, 27, 165, 234, 194, 72, 11, 1, 175, 25, 221, 11, 236, 245, 180, 153, 174, 57, 97, 34, 134, 155, 248, 235, 216, 181, 214, 180, 137, 9, 253, 141, 201, 95, 26, 216, 245, 102, 168, 214, 123, 96, 243, 219, 57, 246, 159, 139, 168, 50, 89, 117, 229, 113, 117, 209, 92, 208, 188, 136, 114, 71, 254, 36, 55, 200, 227, 240, 69, 236, 189, 243, 213, 23, 78, 5, 87, 213, 52, 135, 165, 202, 131, 1, 39, 64, 167, 179, 188, 40, 92, 210, 60, 222, 103, 195, 165, 198, 145, 42, 246, 103, 130, 60, 1, 111, 199, 17, 147, 236, 197, 240, 180, 114, 157, 135, 17, 118, 121, 108, 48, 225, 84, 253, 78, 131, 90, 231, 38, 174, 97, 178, 148, 185, 228, 237, 65, 39, 166, 9, 91, 127, 101, 186, 235, 34, 4, 15, 170, 50, 58, 115, 197, 231, 243, 208, 158, 12, 26, 182, 173, 188, 79, 123, 225, 82, 71, 69, 117, 254, 63, 145, 126, 250, 22, 232, 184, 226, 144, 236, 90, 0, 121, 220, 240, 227, 216, 37, 57, 157, 116, 208, 238, 16, 168, 243, 238, 18, 120, 82, 45, 53, 163, 84, 92, 149, 234, 177, 14, 24, 179, 111, 190, 165, 27, 56, 81, 11, 133, 165, 205, 224, 240, 160, 31, 75, 88, 152, 227, 163, 6, 117, 207, 237, 99, 194, 167, 184, 221, 94, 42, 240, 199, 40, 56, 110, 231, 140, 235, 9, 245, 114, 59, 208, 192, 149, 149, 196, 235, 179, 204, 65, 221, 16, 209, 83, 1, 174, 127, 136, 68, 172, 218, 20, 186, 1, 70, 51, 117, 141, 118, 168, 231, 177, 43, 4, 0, 124, 78, 108, 132, 197, 118, 107, 132, 115, 58, 134, 83, 103, 33, 46, 162, 219, 232, 133, 148, 130, 88, 76, 110, 56, 151, 42, 226, 16, 31, 57, 141, 43, 163, 2, 93, 66, 108, 238, 17, 244, 22, 123, 219, 248, 30, 8, 217, 43, 148, 177, 50, 50, 254, 81, 167, 236, 12, 144, 249, 131, 153, 122, 67, 254, 125, 13, 60, 114, 18, 7, 108, 36, 205, 31, 102, 144, 127, 24, 138, 58, 141, 112, 248, 132, 8, 128, 37, 50, 124, 8, 60, 235, 225, 31, 127, 222, 242, 41, 188, 128, 46, 7, 119, 30, 95, 107, 170, 135, 98, 217, 16, 129, 246, 246, 197, 61, 146, 161, 182, 56, 163, 33, 144, 185, 223, 137, 50, 62, 93, 53, 235, 234, 219, 0, 123, 174, 31, 103, 101, 246, 80, 22, 4, 110, 57, 52, 198, 98, 184, 81, 79, 137, 232, 195, 157, 125, 86, 65, 45, 186, 14, 40, 180, 163, 89, 40, 65, 173, 7, 159, 27, 159, 221, 140, 131, 57, 161, 31, 16, 185, 142, 58, 231, 185, 175, 206, 178, 87, 123, 217, 72, 182, 126, 183, 232, 251, 175, 147, 249, 77, 239, 83, 124, 136, 204, 129, 153, 75, 30, 116, 139, 132, 41, 64, 206, 122, 255, 211, 205, 239, 146, 34, 6, 225, 194, 65, 48, 172, 237, 51, 73, 198, 8, 122, 82, 100, 53, 92, 125, 140, 25, 101, 64, 118, 92, 253, 149, 203, 165, 109, 233, 44, 103, 196, 183, 42, 192, 72, 166, 47, 154, 163, 20, 233, 119, 22, 143, 109, 205, 42, 5, 35, 109, 53, 239, 251, 85, 189, 242, 78, 68, 117, 243, 63, 94, 109, 249, 234, 78, 47, 3, 192, 27, 201, 120, 218, 152, 246, 17, 140, 97, 1, 31, 114, 6, 189, 150, 172, 3, 122, 38, 145, 207, 211, 108, 211, 91, 65, 185, 145, 151, 192, 243, 1, 177, 138, 152, 224, 112, 69, 227, 80, 210, 172, 18, 42, 152, 198, 89, 121, 143, 98, 150, 24, 99, 162, 128, 176, 134, 117, 33, 13, 132, 97, 204, 80, 40, 220, 81, 7, 199, 188, 87, 167, 69, 93, 206, 217, 129, 132, 49, 176, 248, 68, 61, 251, 155, 204, 3, 222, 223, 156, 255, 143, 189, 166, 61, 126, 122, 154, 214, 252, 231, 38, 5, 188, 112, 112, 232, 229, 175, 51, 168, 24, 120, 255, 55, 204, 57, 8, 10, 1, 196, 50, 192, 39, 240, 111, 195, 150, 31, 163, 91, 122, 132, 198, 222, 132, 202, 193, 179, 159, 135, 199, 219, 9, 16, 108, 66, 232, 170, 170, 75, 164, 229, 227, 4, 83, 188, 135, 52, 167, 61, 69, 120, 27, 184, 223, 89, 213, 103, 235, 164, 167, 15, 29, 5, 60, 53, 164, 122, 181, 194, 143, 69, 65, 173, 145, 222, 159, 94, 155, 15, 99, 132, 68, 150, 58, 244, 50, 152, 91, 255, 247, 194, 80, 161, 7, 215, 244, 28, 155, 48, 90, 54, 188, 227, 67, 235, 64, 69, 171, 141, 223, 185, 225, 207, 67, 10, 204, 25, 220, 104, 225, 14, 72, 204, 55, 37, 253, 205, 40, 162, 136, 28, 209, 160, 39, 247, 142, 20, 249, 61, 247, 190, 147, 39, 112, 252, 27, 59, 240, 213, 166, 172, 191, 113, 84, 105, 88, 187, 41, 130, 204, 20, 71, 198, 123, 192, 73, 133, 239, 69, 192, 213, 61, 54, 192, 93, 248, 136, 24, 252, 214, 222, 96, 198, 54, 140, 222, 65, 189, 107, 71, 184, 50, 64, 239, 237, 85, 97, 156, 53, 12, 49, 70, 246, 219, 101, 197, 62, 71, 170, 173, 177, 217, 43, 77, 27, 221, 116, 166, 227, 206, 135, 142, 161, 165, 134, 49, 17, 86, 153, 10, 135, 18, 255, 125, 230, 158, 40, 173, 69, 167, 209, 180, 134, 42, 139, 243, 72, 38, 132, 52, 128, 165, 185, 224, 78, 143, 176, 63, 102, 85, 35, 253, 118, 249, 36, 127, 81, 145, 29, 89, 156, 178, 170, 71, 88, 23, 17, 49, 233, 40, 109, 195, 96, 59, 19, 33, 227, 135, 89, 230, 36, 27, 178, 130, 169, 154, 169, 198, 139, 28, 0, 27, 93, 37, 173, 201, 133, 189, 116, 148, 187, 182, 229, 114, 250, 76, 127, 251, 144, 129, 78, 41, 250, 17, 83, 192, 105, 92, 222, 153, 87, 230, 18, 240, 216, 78, 171, 69, 58, 97, 131, 160, 152, 100, 21, 93, 62, 8, 7, 226, 65, 178, 160, 29, 142, 234, 205, 196, 92, 143, 174, 30, 143, 124, 226, 64, 159, 184, 105, 51, 133, 19, 54, 141, 124, 174, 173, 235, 105, 62, 17, 52, 202, 112, 245, 152, 239, 172, 60, 252, 209, 136, 141, 211, 119, 249, 4, 96, 182, 98, 156, 174, 167, 171, 153, 47, 61, 236, 210, 132, 237, 85, 1, 164, 181, 8, 10, 51, 8, 129, 250, 218, 42, 104, 87, 20, 12, 198, 203, 120, 52, 29, 221, 166, 72, 153, 84, 1, 46, 186, 134, 2, 64, 45, 247, 225, 129, 209, 192, 89, 190, 116, 232, 34, 205, 86, 109, 246, 44, 145, 43, 96, 101, 185, 217, 177, 96, 191, 157, 117, 119, 90, 164, 110, 124, 198, 16, 192, 215, 226, 55, 75, 139, 0, 188, 134, 172, 194, 82, 137, 39, 229, 126, 3, 229, 174, 72, 245, 54, 141, 253, 198, 213, 120, 63, 194, 171, 90, 198, 120, 245, 137, 225, 70, 161, 157, 45, 70, 69, 218, 219, 29, 89, 119, 219, 233, 141, 62, 186, 44, 138, 227, 238, 242, 175, 73, 105, 140, 218, 107, 0, 148, 82, 192, 55, 66, 123, 29, 77, 60, 241, 91, 147, 86, 88, 61, 188, 66, 46, 202, 209, 81, 69, 177, 50, 135, 162, 55, 114, 249, 2, 201, 2, 109, 230, 87, 95, 4, 28, 198, 130, 78, 220, 165, 27, 66, 218, 111, 29, 128, 183, 43, 158, 194, 252, 86, 82, 14, 241, 130, 156, 20, 35, 186, 4, 211, 47, 230, 28, 95, 152, 162, 175, 109, 65, 75, 238, 224, 240, 39, 71, 18, 7, 115, 170, 241, 214, 254, 93, 64, 200, 180, 96, 42, 2, 137, 212, 142, 49, 211, 129, 217, 51, 73, 118, 170, 157, 136, 134, 71, 147, 61, 35, 162, 232, 221, 197, 11, 190, 9, 200, 235, 212, 208, 183, 45, 169, 57, 39, 48, 154, 162, 51, 222, 80, 174, 27, 129, 89, 103, 98, 134, 196, 226, 225, 230, 245, 70, 253, 67, 127, 153, 71, 91, 8, 251, 186, 104, 73, 189, 239, 27, 87, 144, 215, 173, 213, 100, 187, 172, 240, 235, 48, 123, 19, 240, 78, 131, 34, 101, 122, 94, 50, 103, 102, 125, 1, 165, 77, 1, 50, 62, 44, 69, 65, 11, 42, 103, 81, 230, 114, 10, 21, 22, 242, 125, 77, 66, 180, 179, 34, 202, 227, 12, 249, 132, 47, 77, 144, 47, 72, 212, 77, 13, 247, 43, 75, 137, 29, 45, 125, 137, 156, 40, 8, 145, 121, 128, 64, 20, 41, 69, 47, 160, 55, 227, 79, 172, 171, 159, 236, 60, 103, 141, 6, 151, 134, 179, 226, 229, 208, 3, 201, 82, 31, 143, 199, 172, 101, 149, 56, 35, 213, 137, 214, 251, 19, 102, 116, 198, 207, 36, 244, 19, 217, 155, 2, 28, 70, 211, 80, 214, 206, 145, 22, 157, 36, 97, 189, 76, 127, 236, 124, 173, 139, 230, 177, 115, 196, 231, 160, 246, 89, 78, 19, 84, 18, 77, 125, 85, 30, 185, 142, 54, 203, 69, 112, 75, 126, 185, 10, 196, 0, 75, 172, 101, 119, 64, 14, 222, 109, 155, 196, 80, 13, 90, 253, 137, 152, 3, 204, 98, 250, 49, 137, 84, 201, 218, 40, 42, 103, 130, 56, 18, 129, 241, 93, 201, 39, 176, 2, 159, 223, 154, 165, 160, 243, 162, 22, 216, 213, 162, 72, 215, 195, 145, 111, 250, 120, 217, 126, 238, 185, 75, 13, 55, 210, 81, 167, 62, 236, 23, 59, 71, 148, 146, 140, 253, 77, 154, 166, 86, 153, 244, 97, 14, 89, 219, 47, 161, 136, 29, 50, 27, 35, 114, 55, 167, 109, 175, 70, 221, 24, 252, 38, 199, 20, 22, 88, 254, 40, 64, 111, 203, 4, 169, 190, 15, 6, 66, 111, 160, 54, 19, 130, 254, 31, 2, 147, 34, 0, 125, 248, 50, 174, 67, 211, 52, 10, 250, 174, 42, 195, 221, 28, 64, 155, 81, 243, 127, 132, 230, 134, 94, 21, 52, 9, 127, 74, 213, 77, 25, 240, 46, 169, 167, 4, 227, 181, 72, 31, 103, 19, 71, 236, 17, 1, 152, 129, 87, 115, 201, 88, 18, 8, 180, 65, 67, 142, 133, 44, 241, 73, 94, 128, 236, 255, 246, 121, 222, 67, 42, 25, 234, 71, 108, 248, 135, 62, 143, 71, 151, 164, 148, 105, 80, 202, 164, 71, 2, 115, 22, 114, 242, 187, 87, 9, 234, 186, 132, 6, 43, 242, 107, 102, 52, 234, 48, 132, 235, 145, 251, 165, 253, 31, 194, 7, 146, 199, 242, 35, 242, 58, 210, 11, 41, 163, 189, 194, 105, 35, 187, 207, 37, 179, 178, 25, 204, 31, 93, 43, 97, 37, 12, 135, 255, 107, 152, 194, 52, 150, 14, 247, 71, 102, 172, 149, 182, 109, 150, 154, 189, 41, 109, 250, 63, 180, 127, 207, 80, 150, 170, 131, 20, 13, 1, 239, 99, 130, 214, 64, 165, 122, 150, 235, 219, 212, 10, 171, 103, 243, 211, 134, 222, 170, 53, 176, 238, 23, 153, 230, 12, 37, 17, 198, 133, 142, 182, 134, 198, 27, 248, 175, 105, 83, 195, 252, 158, 224, 34, 213, 208, 82, 53, 70, 148, 38, 41, 88, 71, 242, 119, 67, 125, 159, 241, 156, 248, 171, 111, 81, 248, 61, 5, 34, 250, 236, 102, 69, 184, 118, 199, 225, 21, 22, 113, 45, 115, 77, 217, 119, 88, 204, 247, 165, 184, 94, 148, 177, 238, 29, 143, 218, 4, 37, 60, 209, 108, 114, 209, 159, 110, 138, 74, 234, 237, 248, 37, 136, 184, 24, 140, 213, 255, 253, 28, 191, 84, 26, 65, 48, 144, 242, 63, 200, 3, 101, 204, 7, 25, 22, 245, 140, 189, 99, 140, 18, 179, 109, 17, 81, 138, 38, 165, 158, 229, 39, 152, 38, 169, 145, 52, 40, 243, 174, 41, 172, 242, 63, 181, 126, 237, 41, 105, 128, 174, 72, 144, 185, 118, 10, 108, 156, 170, 199, 182, 135, 216, 154, 139, 79, 187, 95, 152, 194, 18, 0, 99, 126, 93, 170, 87, 70, 79, 52, 47, 60, 49, 66, 193, 14, 100, 74, 203, 132, 48, 137, 13, 201, 231, 147, 121, 159, 222, 82, 118, 152, 221, 108, 9, 55, 159, 146, 219, 88, 76, 174, 14, 165, 152, 188, 120, 104, 2, 228, 42, 126, 42, 60, 249, 136, 134, 250, 133, 70, 77, 255, 145, 171, 223, 243, 99, 191, 30, 188, 124, 114, 183, 57, 31, 52, 136, 211, 157, 18, 215, 18, 56, 207, 163, 115, 68, 126, 130, 134, 26, 124, 88, 235, 131, 81, 18, 197, 234, 116, 158, 23, 42, 53, 82, 224, 78, 16, 218, 143, 74, 17, 71, 112, 84, 108, 221, 183, 110, 123, 70, 110, 210, 216, 48, 14, 69, 126, 205, 110, 175, 101, 99, 183, 227, 57, 38, 49, 118, 249, 99, 175, 216, 222, 22, 117, 55, 223, 195, 247, 55, 27, 188, 229, 156, 207, 109, 132, 224, 81, 197, 11, 52, 192, 196, 169, 189, 157, 39, 98, 215, 97, 229, 45, 157, 181, 16, 238, 226, 179, 128, 47, 112, 20, 160, 140, 164, 72, 105, 204, 136, 164, 188, 116, 141, 255, 18, 83, 18, 8, 0, 5, 211, 204, 168, 127, 57, 7, 232, 52, 245, 167, 104, 207, 247, 214, 146, 228, 119, 112, 61, 206, 46, 40, 102, 230, 111, 246, 202, 49, 27, 176, 176, 180, 119, 21, 0, 67, 220, 1, 0, 223, 1, 244, 234, 205, 40, 69, 131, 90, 197, 101, 1, 54, 89, 162, 166, 181, 2, 139, 94, 248, 88, 229, 74, 157, 175, 31, 98, 254, 42, 156, 64, 9, 145, 237, 133, 208, 115, 157, 121, 181, 236, 138, 146, 6, 72, 97, 171, 87, 160, 146, 188, 172, 131, 146, 104, 17, 217, 15, 172, 30, 246, 180, 231, 131, 111, 184, 56, 26, 228, 145, 98, 252, 236, 246, 88, 21, 142, 205, 127, 124, 233, 36, 104, 2, 110, 105, 144, 5, 194, 213, 39, 174, 132, 221, 120, 246, 65, 151, 240, 13, 83, 122, 117, 90, 13, 51, 236, 203, 20, 160, 252, 192, 235, 221, 140, 28, 140, 130, 2, 198, 97, 107, 228, 116, 217, 106, 94, 68, 138, 134, 230, 224, 182, 136, 92, 198, 181, 142, 11, 255, 230, 30, 177, 128, 170, 181, 37, 145, 207, 224, 199, 143, 174, 175, 146, 133, 252, 232, 246, 215, 172, 134, 174, 235, 85, 191, 222, 68, 185, 212, 219, 132, 61, 187, 216, 36, 248, 165, 127, 166, 160, 113, 0, 57, 112, 186, 53, 185, 225, 108, 165, 217, 222, 69, 217, 67, 23, 253, 107, 226, 96, 57, 75, 228, 244, 58, 84, 142, 28, 24, 89, 161, 158, 248, 157, 154, 68, 133, 251, 1, 216, 254, 229, 49, 187, 15, 220, 21, 9, 169, 212, 249, 50, 173, 59, 137, 158, 189, 221, 250, 105, 177, 125, 152, 15, 133, 57, 83, 32, 253, 139, 29, 28, 0, 151, 28, 29, 240, 154, 3, 206, 18, 179, 127, 99, 168, 168, 2, 12, 247, 169, 209, 150, 248, 46, 199, 116, 26, 217, 106, 122, 140, 226, 22, 108, 83, 75, 103, 231, 44, 208, 174, 55, 236, 61, 42, 240, 118, 83, 176, 78, 40, 237, 78, 100, 221, 54, 200, 202, 3, 200, 173, 73, 130, 108, 90, 83, 232, 48, 50, 255, 143, 208, 66, 243, 11, 25, 112, 41, 11, 44, 238, 25, 20, 102, 35, 71, 151, 189, 66, 216, 43, 221, 166, 52, 109, 2, 98, 213, 102, 135, 197, 221, 181, 58, 0, 116, 199, 5, 82, 72, 184, 219, 81, 218, 227, 164, 197, 84, 191, 244, 228, 182, 49, 172, 158, 149, 104, 26, 60, 60, 5, 141, 153, 12, 193, 134, 70, 67, 214, 17, 19, 238, 151, 240, 83, 128, 128, 177, 252, 185, 59, 9, 130, 241, 21, 77, 180, 88, 41, 48, 34, 55, 201, 255, 50, 155, 136, 78, 211, 102, 43, 56, 65, 41, 25, 92, 234, 17, 37, 231, 69, 248, 39, 185, 8, 180, 253, 112, 128, 28, 138, 222, 51, 8, 133, 203, 70, 243, 19, 205, 41, 111, 124, 172, 64, 71, 10, 38, 173, 27, 6, 195, 53, 117, 208, 36, 132, 178, 219, 247, 2, 27, 82, 93, 41, 124, 179, 209, 202, 184, 102, 221, 213, 104, 174, 34, 250, 81, 150, 125, 222, 204, 115, 237, 215, 8, 8, 245, 118, 87, 86, 83, 148, 246, 171, 59, 114, 91, 245, 181, 149, 7, 141, 99, 190, 159, 229, 230, 238, 24, 24, 166, 187, 109, 14, 113, 103, 112, 218, 229, 109, 147, 137, 249, 83, 147, 182, 127, 150, 243, 180, 160, 199, 254, 228, 119, 72, 245, 82, 124, 7, 72, 233, 2, 221, 64, 177, 36, 1, 126, 211, 206, 107, 73, 200, 129, 213, 56, 105, 224, 21, 217, 101, 54, 90, 214, 179, 176, 64, 196, 50, 66, 56, 135, 15, 10, 130, 170, 85, 125, 126, 185, 23, 231, 103, 231, 161, 203, 165, 64, 104, 61, 179, 249, 30, 20, 226, 30, 254, 202, 20, 106, 212, 127, 245, 48, 175, 201, 107, 65, 149, 50, 125, 235, 137, 36, 79, 247, 126, 199, 124, 125, 255, 124, 196, 12, 220, 64, 194, 87, 3, 202, 32, 131, 244, 209, 236, 216, 162, 129, 109, 74, 29, 210, 189, 201, 81, 212, 242, 94, 204, 15, 156, 150, 155, 30, 43, 131, 120, 223, 113, 5, 7, 157, 14, 111, 154, 158, 235, 174, 101, 92, 133, 227, 178, 154, 217, 31, 244, 195, 125, 211, 200, 23, 91, 11, 240, 83, 28, 2, 209, 178, 27, 42, 246, 226, 187, 9, 136, 60, 43, 27, 172, 33, 231, 21, 245, 11, 125, 7, 251, 222, 81, 188, 197, 102, 42, 57, 174, 9, 200, 120, 120, 124, 245, 121, 100, 141, 26, 155, 92, 185, 95, 17, 245, 191, 138, 33, 209, 130, 79, 40, 128, 218, 175, 205, 183, 214, 122, 125, 121, 172, 68, 52, 46, 34, 221, 205, 158, 29, 68, 34, 154, 238, 90, 88, 228, 2, 76, 2, 11, 43, 54, 66, 238, 92, 213, 166, 206, 144, 35, 148, 198, 184, 19, 130, 59, 93, 11, 55, 239, 99, 28, 58, 251, 6, 134, 234, 174, 244, 185, 44, 96, 235, 161, 154, 89, 188, 152, 134, 235, 252, 49, 61, 195, 109, 78, 161, 54, 70, 55, 82, 51, 23, 106, 77, 124, 111, 198, 180, 229, 119, 27, 81, 161, 131, 39, 51, 149, 22, 212, 21, 209, 251, 64, 106, 40, 194, 51, 188, 83, 44, 42, 150, 44, 36, 228, 226, 24, 248, 249, 19, 65, 160, 56, 45, 25, 51, 186, 34, 16, 120, 225, 117, 229, 153, 237, 16, 178, 105, 13, 201, 130, 216, 103, 0, 37, 251, 230, 4, 195, 186, 2, 237, 146, 37, 222, 163, 59, 251, 26, 65, 11, 55, 118, 41, 83, 188, 29, 99, 12, 18, 150, 135, 42, 6, 10, 3, 250, 12, 45, 168, 12, 235, 84, 190, 192, 90, 167, 192, 178, 218, 110, 15, 195, 118, 172, 238, 247, 179, 145, 175, 107, 145, 33, 234, 55, 215, 144, 147, 5, 220, 106, 18, 169, 163, 75, 235, 9, 147, 83, 59, 51, 148, 148, 98, 207, 83, 103, 134, 190, 152, 111, 154, 209, 27, 164, 94, 173, 197, 93, 180, 131, 17, 107, 223, 162, 197, 104, 77, 117, 188, 145, 220, 51, 150, 166, 189, 146, 240, 2, 55, 115, 184, 235, 58, 71, 229, 131, 183, 76, 248, 200, 196, 85, 254, 247, 39, 184, 188, 116, 164, 192, 163, 176, 244, 220, 157, 120, 87, 101, 89, 104, 242, 225, 126, 19, 120, 73, 42, 115, 112, 194, 16, 23, 249, 89, 75, 154, 12, 17, 200, 189, 31, 181, 29, 178, 152, 103, 225, 98, 76, 209, 145, 244, 238, 72, 151, 160, 9, 96, 38, 238, 158, 174, 237, 67, 91, 249, 194, 130, 134, 52, 169, 198, 233, 86, 181, 117, 195, 221, 226, 210, 151, 235, 127, 31, 225, 235, 4, 155, 21, 39, 134, 76, 216, 161, 168, 37, 39, 214, 203, 46, 56, 105, 196, 141, 51, 179, 33, 26, 80, 138, 245, 36, 164, 4, 218, 217, 44, 205, 15, 78, 41, 14, 31, 193, 43, 47, 223, 149, 60, 194, 54, 181, 28, 196, 1, 81, 134, 77, 73, 53, 103, 202, 18, 134, 7, 227, 93, 189, 82, 0, 203, 135, 237, 135, 61, 160, 205, 16, 152, 152, 70, 113, 129, 202, 240, 68, 196, 123, 29, 8, 181, 44, 48, 250, 124, 105, 216, 105, 219, 61, 37, 109, 127, 81, 182, 47, 1, 142, 144, 254, 188, 95, 164, 52, 143, 171, 246, 52, 36, 237, 80, 74, 131, 76, 157, 112, 182, 83, 237, 103, 194, 47, 21, 46, 70, 140, 25, 11, 93, 229, 242, 146, 101, 78, 9, 186, 179, 176, 232, 180, 41, 160, 50, 132, 68, 240, 106, 80, 96, 126, 212, 22, 253, 4, 185, 117, 199, 87, 232, 233, 188, 206, 121, 61, 178, 133, 254, 178, 110, 15, 148, 163, 162, 45, 193, 107, 182, 32, 67, 130, 123, 125, 35, 109, 103, 156, 232, 103, 166, 166, 210, 82, 155, 126, 5, 105, 42, 52, 255, 18, 29, 128, 161, 224, 209, 125, 3, 0, 56, 135, 216, 167, 155, 48, 161, 243, 64, 226, 167, 104, 201, 162, 226, 245, 91, 220, 109, 124, 102, 76, 224, 44, 130, 209, 141, 213, 245, 237, 75, 207, 232, 27, 25, 220, 104, 205, 173, 221, 215, 56, 162, 9, 130, 253, 132, 98, 14, 50, 104, 49, 102, 43, 235, 0, 51, 184, 19, 93, 69, 130, 52, 240, 1, 6, 31, 17, 222, 97, 17, 56, 35, 139, 38, 144, 147, 169, 157, 165, 75, 165, 157, 8, 165, 234, 218, 252, 215, 126, 160, 23, 44, 5, 60, 104, 181, 140, 192, 73, 246, 148, 64, 91, 148, 244, 132, 61, 247, 86, 210, 84, 235, 58, 184, 253, 167, 240, 150, 94, 119, 207, 237, 69, 102, 45, 75, 175, 46, 146, 76, 235, 77, 111, 217, 221, 123, 64, 235, 186, 119, 199, 196, 254, 14, 55, 244, 205, 68, 102, 21, 221, 113, 239, 21, 79, 171, 70, 174, 228, 2, 110, 54, 183, 245, 203, 192, 233, 132, 159, 247, 44, 100, 112, 227, 228, 251, 143, 97, 157, 138, 188, 198, 245, 89, 106, 215, 205, 74, 73, 162, 204, 128, 29, 34, 135, 108, 31, 3, 178, 247, 162, 222, 51, 46, 0, 167, 151, 239, 247, 86, 38, 72, 148, 133, 245, 151, 66, 88, 217, 191, 3, 189, 96, 153, 40, 232, 83, 77, 42, 134, 8, 126, 182, 170, 240, 159, 5, 116, 205, 49, 35, 40, 246, 31, 19, 21, 153, 84, 208, 4, 64, 224, 154, 102, 106, 51, 47, 19, 95, 128, 14, 89, 207, 247, 252, 46, 180, 13, 56, 194, 132, 0, 39, 145, 81, 104, 215, 40, 144, 21, 151, 221, 181, 67, 114, 218, 131, 156, 182, 9, 202, 114, 124, 175, 235, 17, 201, 203, 189, 206, 40, 120, 225, 64, 146, 1, 213, 236, 83, 171, 143, 112, 226, 96, 168, 81, 52, 59, 189, 41, 225, 171, 175, 1, 125, 230, 99, 131, 73, 189, 20, 11, 89, 142, 187, 192, 100, 195, 85, 91, 110, 9, 40, 248, 254, 180, 224, 220, 0, 1, 112, 23, 153, 149, 136, 143, 238, 117, 89, 94, 193, 22, 35, 235, 198, 27, 110, 128, 155, 172, 135, 0, 7, 116, 119, 117, 187, 80, 186, 61, 248, 27, 79, 89, 221, 234, 80, 95, 17, 35, 247, 23, 163, 182, 11, 63, 51, 132, 199, 119, 168, 159, 92, 253, 215, 50, 203, 222, 103, 195, 23, 131, 107, 28, 157, 220, 41, 71, 36, 84, 10, 118, 99, 163, 241, 209, 230, 234, 144, 60, 31, 31, 76, 40, 37, 170, 171, 96, 149, 159, 53, 31, 76, 101, 224, 162, 89, 28, 186, 67, 186, 219, 183, 161, 245, 163, 104, 90, 201, 226, 66, 242, 65, 168, 51, 68, 227, 171, 88, 179, 182, 215, 138, 212, 226, 74, 111, 234, 6, 254, 85, 118, 255, 197, 119, 172, 56, 207, 248, 115, 3, 125, 10, 156, 131, 89, 136, 95, 40, 28, 234, 62, 216, 219, 49, 195, 97, 96, 255, 21, 250, 23, 224, 82, 237, 91, 113, 92, 82, 51, 34, 189, 182, 2, 253, 164, 207, 76, 21, 4, 177, 200, 162, 215, 87, 248, 219, 141, 89, 220, 124, 12, 82, 14, 194, 197, 15, 130, 205, 49, 51, 144, 36, 126, 250, 113, 186, 229, 204, 79, 196, 210, 71, 130, 0, 245, 185, 194, 244, 99, 84, 50, 107, 201, 60, 202, 19, 222, 4, 103, 114, 189, 164, 110, 155, 38, 190, 220, 80, 219, 195, 248, 50, 203, 194, 176, 244, 231, 158, 49, 180, 22, 238, 57, 26, 187, 4, 229, 12, 75, 219, 198, 18, 246, 86, 200, 203, 144, 216, 43, 29, 108, 211, 60, 130, 121, 196, 155, 150, 100, 189, 187, 105, 93, 134, 55, 62, 13, 59, 238, 122, 2, 152, 175, 21, 118, 222, 6, 149, 190, 203, 40, 68, 134, 9, 135, 109, 235, 156, 210, 128, 129, 51, 179, 8, 27, 51, 80, 99, 131, 104, 209, 178, 180, 96, 190, 68, 223, 90, 126, 104, 235, 86, 60, 134, 75, 98, 176, 191, 88, 209, 165, 87, 122, 45, 105, 236, 57, 56, 186, 99, 134, 47, 95, 226, 35, 190, 28, 201, 208, 145, 211, 189, 90, 232, 219, 110, 209, 123, 208, 4, 134, 251, 112, 133, 232, 138, 64, 56, 251, 164, 107, 50, 206, 198, 85, 159, 36, 65, 114, 142, 83, 250, 127, 193, 113, 110, 173, 234, 30, 86, 28, 2, 185, 231, 169, 164, 67, 132, 206, 82, 93, 95, 178, 255, 201, 230, 84, 88, 232, 119, 215, 109, 147, 176, 172, 172, 253, 51, 66, 154, 4, 107, 95, 134, 241, 73, 53, 43, 172, 9, 202, 158, 148, 78, 221, 54, 78, 39, 148, 167, 139, 122, 90, 173, 179, 234, 119, 25, 120, 70, 127, 208, 223, 128, 234, 112, 182, 53, 123, 99, 97, 156, 225, 217, 182, 195, 169, 122, 106, 11, 28, 191, 206, 20, 199, 75, 104, 148, 213, 213, 219, 202, 209, 4, 219, 157, 166, 199, 28, 94, 120, 234, 28, 108, 136, 36, 183, 169, 17, 85, 89, 9, 57, 81, 143, 162, 80, 18, 35, 188, 244, 74, 73, 245, 94, 196, 186, 3, 197, 213, 50, 81, 199, 16, 44, 39, 232, 169, 66, 127, 90, 235, 59, 162, 191, 161, 160, 180, 121, 176, 122, 152, 122, 160, 32, 168, 124, 143, 205, 134, 128, 27, 31, 70, 200, 174, 75, 106, 211, 143, 11, 213, 221, 140, 88, 56, 45, 105, 83, 194, 122, 183, 190, 180, 97, 185, 213, 177, 145, 222, 99, 73, 124, 255, 26, 36, 82, 78, 216, 151, 127, 7, 160, 144, 120, 229, 62, 51, 0, 212, 57, 233, 76, 219, 73, 77, 32, 21, 2, 160, 199, 143, 196, 159, 67, 184, 8, 89, 11, 127, 45, 228, 55, 190, 86, 84, 143, 191, 187, 161, 27, 107, 28, 172, 137, 168, 172, 194, 29, 183, 20, 20, 167, 222, 177, 12, 216, 25, 195, 23, 89, 69, 237, 181, 8, 77, 130, 37, 73, 204, 87, 221, 169, 213, 246, 138, 36, 246, 226, 74, 250, 208, 206, 188, 49, 227, 33, 249, 227, 42, 148, 223, 21, 245, 152, 169, 20, 195, 253, 112, 221, 78, 115, 141, 48, 221, 112, 229, 75, 59, 149, 117, 3, 122, 189, 233, 97, 43, 190, 70, 202, 187, 210, 56, 27, 110, 85, 56, 58, 185, 74, 218, 243, 135, 168, 217, 40, 148, 171, 0, 94, 181, 229, 124, 200, 3, 163, 208, 31, 178, 42, 123, 187, 195, 87, 200, 255, 189, 181, 200, 89, 45, 156, 92, 214, 199, 7, 128, 39, 48, 214, 233, 234, 15, 125, 244, 106, 151, 128, 44, 71, 97, 186, 66, 236, 91, 140, 39, 123, 6, 90, 253, 22, 45, 100, 187, 5, 160, 201, 170, 221, 218, 193, 223, 114, 178, 243, 45, 63, 220, 193, 167, 35, 175, 70, 213, 133, 151, 106, 19, 218, 209, 22, 189, 103, 25, 172, 2, 72, 236, 43, 47, 44, 111, 53, 187, 186, 60, 135, 2, 135, 7, 72, 127, 133, 40, 227, 238, 5, 218, 233, 159, 103, 250, 71, 221, 80, 119, 34, 111, 201, 219, 100, 102, 140, 136, 211, 39, 123, 190, 219, 134, 109, 51, 50, 47, 43, 163, 177, 186, 232, 28, 193, 27, 237, 247, 125, 253, 164, 157, 76, 91, 226, 228, 228, 198, 139, 181, 173, 233, 47, 90, 223, 252, 9, 50, 19, 139, 70, 221, 17, 0, 166, 6, 67, 234, 0, 210, 233, 255, 18, 237, 9, 106, 66, 65, 127, 170, 27, 118, 85, 129, 106, 61, 213, 43, 171, 211, 148, 196, 250, 187, 52, 222, 166, 129, 230, 143, 119, 159, 28, 151, 243, 33, 230, 143, 27, 19, 102, 204, 172, 93, 91, 112, 12, 119, 206, 163, 130, 200, 227, 49, 211, 174, 66, 203, 241, 24, 147, 32, 215, 199, 226, 191, 120, 197, 239, 75, 192, 87, 17, 71, 70, 100, 72, 91, 64, 185, 125, 17, 155, 85, 243, 81, 1, 127, 112, 77, 198, 247, 135, 159, 216, 52, 27, 96, 186, 167, 250, 30, 29, 42, 225, 26, 37, 254, 81, 44, 214, 92, 149, 85, 5, 186, 7, 228, 245, 65, 212, 66, 8, 102, 140, 185, 39, 237, 115, 139, 75, 237, 224, 249, 178, 65, 125, 101, 57, 38, 55, 215, 141, 127, 70, 1, 13, 211, 85, 252, 220, 67, 122, 191, 191, 237, 53, 210, 54, 90, 37, 98, 128, 171, 60, 153, 142, 203, 71, 210, 32, 126, 132, 47, 142, 59, 234, 48, 234, 61, 70, 80, 165, 212, 222, 179, 66, 219, 130, 94, 178, 172, 10, 42, 20, 125, 113, 60, 72, 170, 185, 14, 191, 48, 127, 18, 201, 184, 222, 9, 99, 103, 217, 229, 32, 180, 55, 19, 214, 65, 18, 219, 131, 171, 4, 198, 39, 148, 86, 210, 47, 236, 66, 112, 101, 40, 247, 35, 107, 100, 142, 233, 160, 193, 60, 235, 210, 51, 233, 183, 12, 36, 247, 161, 36, 69, 151, 94, 248, 226, 6, 113, 54, 16, 67, 153, 123, 242, 106, 63, 89, 108, 90, 169, 101, 100, 159, 157, 236, 232, 93, 78, 135, 187, 102, 150, 76, 44, 73, 226, 143, 142, 206, 156, 45, 89, 37, 158, 104, 122, 79, 140, 226, 168, 151, 86, 229, 211, 215, 92, 146, 255, 226, 49, 176, 96, 239, 185, 194, 116, 215, 73, 142, 172, 28, 171, 106, 56, 37, 115, 248, 98, 252, 47, 121, 239, 222, 184, 50, 104, 66, 63, 128, 153, 104, 145, 152, 14, 116, 44, 142, 189, 136, 13, 199, 42, 116, 10, 218, 149, 123, 110, 144, 209, 107, 232, 210, 30, 175, 171, 121, 240, 87, 188, 196, 24, 208, 74, 27, 33, 67, 16, 222, 182, 107, 33, 116, 89, 21, 226, 197, 130, 38, 18, 55, 26, 54, 227, 225, 80, 134, 98, 164, 160, 103, 151, 93, 95, 187, 63, 247, 39, 54, 142, 114, 204, 221, 227, 8, 130, 127, 67, 168, 20, 34, 174, 238, 78, 191, 75, 145, 210, 149, 216, 102, 85, 174, 166, 147, 233, 236, 128, 215, 241, 225, 84, 227, 1, 189, 230, 67, 187, 57, 153, 19, 62, 250, 156, 235, 167, 179, 227, 49, 148, 122, 240, 173, 151, 169, 134, 150, 20, 73, 198, 103, 89, 88, 86, 124, 112, 155, 137, 51, 26, 41, 170, 225, 206, 50, 190, 160, 179, 249, 179, 114, 44, 223, 84, 4, 83, 117, 224, 118, 237, 173, 192, 161, 201, 16, 157, 246, 75, 245, 70, 4, 214, 44, 59, 20, 221, 144, 11, 119, 105, 10, 20, 189, 142, 28, 74, 232, 90, 121, 157, 234, 210, 250, 48, 172, 26, 101, 180, 167, 22, 175, 191, 25, 175, 56, 106, 25, 58, 104, 221, 200, 218, 174, 18, 235, 76, 91, 91, 18, 45, 88, 173, 95, 103, 141, 96, 58, 212, 3, 41, 53, 98, 238, 135, 46, 216, 166, 130, 13, 111, 237, 196, 167, 106, 118, 77, 199, 196, 155, 112, 253, 49, 106, 201, 48, 102, 154, 136, 17, 135, 39, 147, 173, 50, 56, 218, 0, 30, 169, 173, 51, 52, 26, 57, 224, 99, 93, 152, 22, 86, 179, 174, 60, 134, 68, 162, 86, 95, 49, 68, 188, 162, 62, 85, 126, 109, 131, 130, 93, 68, 47, 206, 35, 198, 133, 49, 65, 199, 27, 218, 36, 220, 106, 51, 56, 107, 123, 222, 179, 77, 234, 97, 250, 206, 116, 167, 21, 159, 122, 237, 154, 8, 80, 16, 215, 66, 230, 98, 36, 194, 144, 162, 124, 46, 82, 139, 180, 243, 56, 77, 125, 97, 69, 22, 149, 161, 151, 222, 154, 233, 194, 142, 84, 211, 254, 237, 224, 3, 39, 80, 3, 51, 128, 239, 2, 157, 71, 177, 104, 234, 53, 141, 16, 238, 197, 186, 206, 134, 49, 219, 118, 211, 31, 210, 77, 102, 27, 228, 120, 28, 44, 137, 190, 94, 244, 54, 152, 7, 114, 230, 95, 20, 248, 71, 1, 164, 216, 126, 89, 40, 239, 180, 43, 122, 32, 55, 99, 210, 221, 251, 203, 24, 201, 170, 129, 234, 87, 66, 114, 211, 51, 188, 252, 108, 89, 93, 102, 38, 135, 91, 76, 153, 116, 232, 197, 226, 96, 179, 140, 84, 150, 132, 230, 54, 39, 236, 2, 175, 60, 72, 163, 8, 128, 146, 227, 122, 41, 130, 164, 54, 64, 27, 202, 213, 82, 149, 17, 145, 162, 30, 250, 135, 203, 158, 197, 106, 96, 89, 47, 125, 212, 9, 52, 172, 196, 88, 145, 182, 11, 113, 230, 64, 43, 40, 55, 138, 21, 82, 38, 253, 160, 6, 215, 76, 2, 125, 5, 57, 147, 21, 41, 135, 73, 56, 149, 247, 125, 140, 78, 79, 146, 233, 210, 67, 13, 92, 211, 246, 15, 41, 176, 152, 178, 179, 115, 78, 248, 250, 20, 24, 153, 17, 52, 106, 3, 194, 90, 113, 185, 139, 103, 241, 22, 211, 86, 219, 127, 202, 97, 229, 63, 111, 186, 218, 142, 50, 79, 233, 57, 92, 6, 127, 175, 125, 143, 204, 183, 164, 55, 10, 248, 215, 225, 87, 90, 38, 80, 213, 86, 15, 169, 40, 80, 247, 107, 18, 192, 205, 206, 188, 229, 199, 238, 212, 155, 55, 208, 219, 177, 117, 234, 43, 231, 136, 251, 55, 6, 55, 71, 120, 78, 255, 198, 96, 138, 136, 206, 44, 189, 13, 27, 232, 121, 191, 47, 138, 126, 13, 227, 88, 126, 145, 22, 175, 49, 229, 234, 48, 217, 221, 90, 15, 247, 185, 78, 212, 211, 219, 3, 254, 236, 192, 165, 195, 188, 33, 81, 101, 75, 121, 104, 192, 86, 237, 77, 42, 129, 207, 40, 67, 234, 69, 210, 232, 22, 235, 46, 120, 135, 56, 47, 249, 162, 39, 29, 218, 38, 6, 5, 177, 206, 14, 109, 88, 73, 46, 130, 34, 52, 44, 95, 246, 136, 171, 176, 113, 35, 240, 217, 207, 230, 177, 73, 246, 60, 83, 206, 116, 170, 172, 244, 39, 215, 148, 225, 129, 186, 244, 46, 80, 57, 7, 188, 173, 74, 29, 31, 81, 6, 140, 126, 59, 49, 43, 225, 121, 202, 196, 224, 17, 251, 204, 100, 58, 93, 239, 116, 153, 156, 183, 234, 190, 241, 83, 177, 64, 171, 129, 116, 42, 102, 237, 188, 150, 7, 111, 98, 129, 29, 176, 7, 47, 91, 167, 151, 132, 112, 164, 177, 156, 193, 45, 155, 7, 81, 57, 149, 187, 74, 182, 202, 232, 46, 127, 135, 210, 239, 199, 26, 72, 71, 175, 25, 86, 73, 63, 95, 252, 171, 208, 1, 124, 210, 94, 182, 10, 212, 142, 191, 83, 201, 238, 47, 232, 210, 51, 244, 220, 57, 235, 239, 177, 71, 116, 64, 0, 156, 19, 28, 199, 165, 102, 2, 64, 75, 15, 202, 79, 230, 203, 99, 55, 115, 54, 224, 141, 230, 159, 59, 8, 79, 206, 8, 138, 209, 44, 52, 43, 239, 11, 223, 176, 182, 233, 64, 142, 102, 214, 134, 87, 83, 206, 94, 189, 23, 18, 162, 230, 225, 87, 79, 172, 61, 104, 102, 80, 23, 208, 194, 48, 51, 195, 106, 58, 92, 126, 76, 118, 12, 12, 207, 147, 209, 185, 78, 89, 109, 173, 66, 218, 98, 101, 185, 67, 82, 31, 80, 203, 244, 186, 193, 125, 151, 79, 251, 32, 137, 203, 118, 94, 39, 155, 11, 142, 132, 56, 8, 245, 57, 29, 31, 171, 131, 150, 120, 23, 109, 222, 167, 25, 126, 5, 183, 253, 68, 8, 174, 180, 121, 100, 213, 220, 11, 214, 97, 250, 83, 107, 250, 240, 66, 29, 127, 144, 177, 206, 41, 186, 88, 76, 78, 114, 73, 133, 68, 150, 250, 252, 104, 152, 76, 164, 77, 211, 108, 110, 200, 146, 112, 240, 149, 2, 121, 196, 134, 163, 23, 145, 28, 199, 233, 224, 138, 99, 169, 186, 146, 24, 237, 212, 151, 12, 76, 32, 219, 137, 140, 17, 54, 254, 248, 15, 29, 91, 33, 15, 130, 152, 48, 71, 252, 45, 202, 196, 1, 124, 62, 230, 129, 93, 184, 147, 19, 10, 90, 236, 146, 30, 48, 33, 89, 58, 152, 196, 98, 204, 79, 99, 169, 223, 66, 122, 4, 245, 220, 124, 248, 239, 213, 104, 247, 173, 69, 20, 93, 230, 238, 113, 218, 179, 132, 25, 217, 82, 50, 140, 184, 55, 60, 9, 164, 31, 85, 105, 135, 171, 52, 119, 232, 142, 164, 34, 176, 1, 39, 91, 197, 207, 187, 94, 143, 110, 13, 145, 44, 8, 111, 158, 98, 6, 70, 35, 31, 184, 29, 79, 252, 35, 128, 183, 38, 40, 182, 97, 96, 48, 63, 227, 113, 189, 252, 139, 163, 58, 47, 174, 96, 163, 160, 112, 240, 181, 28, 227, 198, 58, 161, 141, 202, 98, 220, 36, 178, 112, 147, 123, 129, 166, 234, 51, 21, 177, 198, 229, 124, 208, 249, 6, 179, 191, 179, 12, 220, 121, 110, 239, 33, 24, 48, 249, 80, 161, 36, 192, 205, 178, 93, 124, 135, 118, 130, 117, 84, 171, 119, 185, 95, 26, 219, 181, 159, 83, 55, 61, 10, 87, 111, 20, 42, 54, 160, 100, 12, 197, 109, 157, 145, 121, 125, 146, 187, 40, 242, 176, 251, 102, 31, 249, 193, 246, 51, 19, 134, 58, 67, 203, 5, 74, 53, 40, 207, 48, 242, 3, 54, 221, 237, 26, 89, 127, 116, 27, 190, 169, 85, 245, 26, 141, 79, 124, 145, 103, 114, 200, 152, 35, 206, 84, 160, 5, 213, 5, 174, 190, 32, 172, 59, 156, 170, 232, 208, 82, 94, 54, 113, 105, 232, 12, 118, 76, 84, 17, 186, 21, 163, 116, 252, 229, 184, 212, 149, 231, 171, 255, 86, 115, 204, 165, 0, 35, 120, 46, 88, 159, 41, 13, 47, 231, 98, 53, 98, 46, 101, 81, 93, 167, 163, 23, 68, 103, 63, 102, 12, 46, 22, 93, 48, 125, 189, 152, 154, 202, 189, 98, 212, 229, 202, 242, 16, 190, 253, 71, 19, 11, 222, 78, 129, 65, 9, 186, 253, 7, 113, 71, 150, 139, 191, 235, 200, 236, 38, 131, 6, 38, 102, 68, 62, 99, 123, 240, 236, 63, 23, 61, 15, 52, 21, 145, 111, 91, 64, 216, 73, 208, 212, 29, 39, 246, 60, 131, 39, 66, 133, 202, 203, 244, 160, 192, 202, 113, 179, 22, 48, 213, 14, 212, 62, 150, 184, 122, 21, 20, 12, 223, 97, 21, 133, 52, 194, 141, 228, 137, 82, 51, 93, 69, 226, 126, 107, 163, 94, 202, 251, 225, 35, 56, 137, 98, 45, 123, 37, 111, 114, 203, 107, 123, 73, 231, 100, 172, 91, 205, 168, 150, 53, 94, 253, 82, 226, 31, 244, 188, 219, 147, 145, 135, 221, 252, 186, 212, 158, 114, 47, 69, 214, 159, 136, 95, 82, 93, 242, 204, 184, 66, 221, 94, 70, 220, 5, 114, 240, 149, 70, 77, 201, 31, 11, 213, 150, 150, 75, 159, 18, 95, 152, 74, 193, 51, 128, 66, 174, 73, 169, 200, 144, 140, 109, 196, 234, 23, 235, 74, 47, 109, 235, 255, 170, 50, 82, 40, 58, 255, 115, 182, 122, 61, 252, 126, 117, 119, 43, 9, 57, 162, 61, 196, 4, 75, 135, 235, 126, 22, 147, 175, 54, 15, 183, 33, 131, 96, 153, 145, 1, 30, 137, 230, 10, 191, 236, 142, 106, 204, 63, 206, 221, 15, 211, 66, 72, 52, 143, 35, 117, 229, 22, 232, 130, 144, 2, 170, 180, 84, 154, 147, 232, 66, 30, 188, 119, 185, 25, 1, 181, 240, 100, 208, 40, 170, 175, 15, 235, 111, 95, 153, 13, 181, 154, 120, 189, 116, 220, 183, 217, 145, 128, 96, 175, 39, 140, 183, 109, 231, 157, 115, 185, 251, 170, 178, 29, 174, 164, 244, 196, 82, 154, 179, 67, 231, 89, 35, 255, 111, 59, 125, 112, 176, 158, 150, 224, 198, 120, 183, 221, 48, 10, 174, 111, 252, 149, 77, 197, 186, 240, 100, 216, 175, 32, 15, 129, 243, 191, 242, 162, 53, 247, 239, 26, 239, 223, 95, 169, 157, 35, 227, 29, 34, 165, 113, 22, 50, 174, 41, 203, 57, 210, 86, 68, 99, 239, 138, 194, 14, 95, 208, 160, 6, 62, 61, 203, 230, 182, 21, 98, 213, 14, 30, 36, 228, 21, 252, 235, 238, 119, 81, 50, 6, 162, 208, 189, 229, 133, 27, 144, 192, 87, 95, 107, 206, 127, 85, 65, 91, 213, 73, 17, 106, 200, 162, 182, 194, 105, 135, 65, 103, 176, 179, 205, 230, 217, 18, 144, 169, 23, 15, 130, 86, 50, 207, 37, 47, 194, 38, 134, 158, 163, 50, 46, 178, 132, 127, 248, 178, 226, 80, 225, 52, 225, 121, 167, 203, 252, 135, 174, 69, 0, 37, 53, 92, 78, 225, 151, 237, 207, 72, 81, 242, 88, 10, 190, 2, 46, 221, 177, 199, 242, 203, 182, 72, 234, 156, 201, 86, 179, 88, 95, 229, 149, 114, 57, 194, 62, 45, 80, 244, 147, 180, 248, 240, 249, 89, 253, 64, 78, 114, 195, 138, 49, 3, 182, 145, 103, 93, 115, 15, 214, 249, 191, 203, 51, 17, 97, 11, 1, 57, 174, 162, 48, 169, 15, 172, 46, 180, 100, 144, 123, 242, 25, 104, 6, 33, 106, 210, 157, 163, 45, 63, 233, 210, 123, 203, 171, 108, 88, 100, 119, 120, 254, 218, 190, 20, 202, 219, 203, 189, 119, 207, 40, 184, 124, 236, 40, 213, 248, 191, 251, 53, 105, 35, 164, 86, 110, 132, 215, 59, 28, 4, 61, 70, 97, 237, 41, 253, 225, 24, 163, 226, 20, 144, 109, 65, 142, 63, 133, 238, 178, 70, 229, 64, 96, 86, 94, 116, 134, 137, 94, 227, 20, 34, 210, 88, 66, 143, 73, 219, 8, 59, 200, 40, 166, 31, 88, 79, 85, 2, 195, 114, 135, 11, 166, 19, 184, 179, 252, 56, 71, 238, 7, 15, 206, 32, 229, 12, 167, 63, 4, 254, 221, 225, 151, 251, 5, 206, 51, 221, 128, 142, 114, 73, 171, 76, 66, 210, 93, 239, 245, 147, 145, 219, 181, 147, 39, 187, 160, 37, 248, 211, 93, 124, 5, 9, 1, 210, 160, 175, 195, 2, 26, 243, 126, 104, 151, 89, 83, 86, 147, 251, 220, 72, 241, 199, 110, 103, 10, 190, 50, 230, 24, 245, 216, 50, 64, 193, 116, 54, 60, 76, 178, 209, 87, 77, 31, 130, 255, 175, 227, 48, 241, 5, 223, 255, 78, 4, 235, 171, 187, 100, 238, 114, 57, 238, 53, 4, 215, 40, 196, 51, 182, 77, 130, 22, 14, 192, 77, 165, 11, 72, 98, 153, 88, 58, 131, 152, 31, 104, 174, 11, 5, 23, 85, 66, 17, 210, 29, 185, 30, 210, 180, 212, 167, 106, 248, 98, 110, 148, 105, 16, 34, 65, 116, 80, 37, 167, 122, 7, 182, 96, 62, 22, 87, 168, 178, 30, 19, 40, 214, 164, 152, 169, 136, 77, 242, 39, 85, 237, 218, 213, 126, 165, 22, 15, 198, 84, 10, 215, 203, 166, 157, 203, 29, 52, 78, 73, 92, 165, 49, 228, 54, 102, 174, 254, 55, 80, 22, 252, 104, 225, 244, 247, 73, 184, 81, 152, 248, 128, 40, 82, 50, 114, 167, 0, 104, 247, 75, 76, 1, 106, 133, 132, 124, 125, 27, 155, 70, 108, 238, 79, 149, 142, 131, 44, 21, 62, 224, 79, 111, 191, 253, 188, 38, 32, 248, 173, 53, 252, 132, 202, 164, 187, 31, 192, 218, 200, 98, 201, 211, 212, 221, 57, 164, 175, 197, 108, 44, 47, 47, 12, 1, 15, 57, 64, 164, 222, 242, 23, 83, 205, 91, 139, 138, 161, 194, 235, 168, 240, 52, 119, 202, 196, 6, 49, 76, 103, 207, 180, 173, 23, 78, 126, 44, 228, 171, 101, 196], + [180, 168, 253, 81, 225, 24, 137, 56, 49, 41, 41, 75, 187, 113, 54, 117, 20, 51, 29, 24, 141, 116, 46, 94, 90, 218, 64, 120, 62, 146, 92, 81, 155, 149, 106, 138, 7, 147, 93, 149, 64, 148, 183, 117, 68, 205, 17, 200, 139, 253, 144, 212, 73, 179, 27, 189, 218, 76, 107, 233, 186, 82, 48, 36, 225, 116, 146, 106, 241, 14, 213, 197, 10, 57, 159, 247, 230, 92, 75, 22, 198, 30, 100, 118, 112, 18, 10, 81, 223, 4, 170, 140, 222, 95, 31, 84, 147, 23, 88, 233, 192, 188, 32, 117, 62, 154, 218, 82, 167, 171, 134, 55, 221, 195, 211, 175, 247, 0, 199, 166, 217, 188, 144, 97, 116, 106, 44, 60, 131, 37, 115, 176, 215, 160, 80, 142, 4, 67, 163, 139, 217, 222, 238, 201, 18, 217, 22, 171, 227, 187, 88, 3, 238, 57, 97, 60, 89, 254, 141, 232, 124, 56, 14, 183, 208, 168, 213, 73, 159, 214, 187, 251, 74, 3, 58, 6, 172, 151, 250, 238, 142, 94, 0, 222, 221, 199, 107, 59, 206, 73, 86, 81, 120, 205, 127, 169, 82, 208, 110, 95, 99, 70, 9, 212, 113, 91, 231, 96, 168, 13, 232, 148, 99, 239, 246, 138, 152, 86, 147, 122, 35, 102, 139, 155, 9, 62, 14, 174, 112, 143, 147, 141, 122, 7, 30, 18, 43, 90, 17, 90, 117, 7, 123, 70, 180, 201, 120, 212, 19, 29, 255, 192, 178, 14, 160, 84, 5, 27, 63, 70, 173, 214, 90, 2, 192, 51, 72, 133, 183, 37, 218, 120, 66, 219, 132, 239, 137, 232, 197, 64, 199, 192, 232, 116, 133, 218, 184, 137, 103, 252, 68, 228, 231, 249, 228, 209, 222, 32, 34, 53, 105, 232, 223, 47, 61, 63, 92, 125, 158, 243, 221, 233, 73, 40, 180, 133, 242, 21, 58, 158, 227, 123, 226, 181, 116, 96, 11, 99, 83, 124, 146, 19, 196, 104, 89, 54, 240, 90, 112, 163, 97, 236, 106, 233, 49, 41, 96, 137, 201, 136, 42, 165, 174, 176, 140, 114, 238, 131, 108, 118, 35, 130, 13, 71, 166, 112, 244, 128, 236, 243, 224, 51, 129, 81, 115, 186, 40, 20, 223, 234, 142, 78, 65, 51, 109, 97, 13, 172, 180, 102, 229, 221, 57, 211, 121, 151, 141, 251, 196, 166, 250, 178, 135, 246, 33, 153, 255, 27, 229, 113, 69, 165, 70, 105, 106, 77, 42, 63, 203, 107, 102, 19, 198, 130, 216, 86, 222, 12, 165, 61, 2, 110, 239, 208, 143, 193, 105, 21, 214, 51, 52, 46, 158, 128, 4, 231, 162, 181, 211, 33, 39, 4, 26, 103, 61, 167, 158, 65, 118, 3, 130, 79, 155, 101, 144, 152, 194, 174, 237, 177, 220, 22, 16, 246, 254, 21, 137, 214, 174, 75, 87, 149, 151, 103, 49, 75, 76, 120, 162, 171, 188, 168, 130, 107, 43, 187, 62, 248, 204, 193, 196, 185, 4, 138, 188, 232, 165, 26, 74, 194, 116, 69, 161, 210, 113, 3, 234, 125, 29, 189, 211, 212, 145, 96, 96, 108, 27, 237, 25, 128, 196, 112, 33, 90, 255, 159, 56, 56, 229, 32, 72, 9, 141, 46, 131, 205, 121, 196, 99, 198, 140, 222, 48, 67, 79, 58, 69, 150, 94, 100, 69, 181, 228, 153, 2, 193, 199, 248, 217, 171, 24, 74, 119, 87, 62, 152, 220, 162, 23, 123, 92, 127, 226, 145, 183, 175, 36, 105, 35, 70, 153, 16, 205, 234, 179, 51, 244, 200, 8, 111, 25, 191, 1, 80, 69, 135, 208, 162, 146, 192, 164, 161, 217, 77, 240, 177, 25, 253, 123, 220, 68, 80, 36, 222, 109, 16, 86, 73, 69, 121, 36, 160, 127, 98, 83, 22, 118, 15, 126, 71, 187, 91, 231, 84, 128, 252, 72, 235, 40, 95, 234, 240, 6, 76, 25, 60, 184, 6, 86, 106, 255, 198, 160, 55, 93, 238, 254, 124, 215, 204, 237, 231, 189, 173, 85, 141, 115, 123, 23, 221, 58, 182, 43, 207, 119, 136, 250, 12, 204, 77, 231, 93, 244, 81, 185, 40, 202, 196, 102, 9, 93, 95, 179, 11, 181, 116, 121, 58, 144, 67, 11, 46, 139, 131, 255, 163, 22, 194, 36, 54, 200, 75, 134, 138, 166, 155, 105, 220, 212, 36, 59, 206, 88, 60, 131, 73, 255, 154, 100, 53, 63, 145, 218, 226, 3, 125, 181, 132, 194, 207, 31, 84, 210, 209, 247, 94, 224, 0, 27, 143, 72, 199, 16, 121, 11, 96, 240, 149, 251, 183, 21, 100, 127, 15, 77, 182, 37, 200, 159, 145, 88, 124, 42, 131, 114, 145, 88, 147, 149, 95, 120, 244, 185, 180, 52, 76, 55, 251, 119, 63, 18, 79, 69, 213, 67, 167, 148, 14, 232, 99, 253, 155, 251, 108, 2, 52, 45, 207, 85, 96, 191, 225, 202, 94, 181, 205, 63, 202, 217, 138, 170, 241, 162, 68, 65, 73, 50, 233, 218, 162, 17, 0, 60, 124, 139, 114, 202, 157, 156, 173, 172, 16, 146, 179, 12, 63, 19, 75, 78, 146, 78, 165, 202, 183, 206, 38, 1, 114, 128, 203, 175, 173, 41, 38, 67, 115, 110, 176, 179, 126, 7, 153, 53, 164, 242, 158, 103, 179, 181, 237, 61, 191, 179, 84, 148, 226, 108, 1, 53, 233, 129, 129, 82, 14, 187, 108, 171, 161, 3, 50, 167, 160, 10, 202, 197, 207, 145, 207, 165, 141, 112, 255, 173, 231, 159, 101, 111, 113, 26, 148, 127, 32, 166, 91, 225, 162, 139, 94, 158, 190, 213, 77, 41, 97, 237, 253, 145, 167, 85, 177, 67, 66, 16, 222, 0, 10, 157, 98, 126, 2, 253, 35, 95, 169, 173, 21, 153, 250, 145, 120, 61, 9, 96, 197, 105, 91, 224, 48, 59, 157, 247, 163, 120, 210, 106, 176, 154, 0, 44, 81, 216, 244, 48, 0, 24, 110, 95, 186, 176, 75, 252, 230, 36, 75, 141, 37, 22, 157, 26, 112, 234, 216, 202, 220, 212, 164, 221, 3, 162, 139, 167, 79, 150, 47, 229, 42, 155, 139, 215, 61, 186, 214, 231, 233, 123, 67, 114, 217, 249, 55, 132, 54, 26, 144, 133, 230, 137, 136, 115, 244, 187, 20, 175, 121, 137, 95, 115, 192, 221, 15, 25, 6, 21, 178, 46, 199, 26, 71, 62, 162, 131, 57, 42, 126, 74, 79, 254, 77, 202, 119, 57, 163, 49, 16, 181, 192, 32, 152, 72, 143, 113, 104, 241, 55, 238, 146, 83, 19, 203, 141, 8, 27, 0, 16, 142, 133, 129, 196, 39, 10, 67, 111, 14, 211, 146, 155, 108, 1, 88, 164, 13, 103, 230, 252, 44, 86, 133, 54, 87, 120, 232, 153, 207, 63, 70, 34, 2, 47, 105, 99, 190, 174, 135, 178, 183, 121, 131, 182, 228, 105, 102, 57, 130, 79, 70, 40, 49, 116, 6, 84, 142, 43, 236, 131, 109, 46, 17, 25, 251, 105, 138, 52, 226, 31, 244, 23, 184, 214, 49, 220, 199, 110, 224, 138, 45, 100, 122, 50, 165, 221, 113, 28, 176, 241, 109, 74, 131, 83, 198, 95, 43, 227, 10, 91, 239, 198, 240, 77, 253, 63, 188, 13, 33, 101, 180, 75, 137, 146, 136, 157, 201, 158, 231, 120, 147, 35, 13, 149, 171, 115, 12, 25, 249, 166, 106, 234, 239, 96, 24, 168, 35, 71, 176, 234, 111, 230, 62, 248, 89, 191, 153, 4, 119, 46, 88, 49, 193, 153, 76, 180, 189, 65, 132, 13, 188, 214, 137, 218, 127, 100, 216, 174, 213, 146, 237, 51, 137, 143, 108, 254, 141, 0, 67, 55, 18, 89, 107, 29, 130, 166, 76, 46, 2, 32, 157, 102, 254, 97, 154, 188, 239, 101, 155, 221, 106, 236, 27, 21, 56, 127, 214, 195, 111, 78, 235, 131, 247, 102, 205, 56, 210, 12, 111, 166, 239, 61, 204, 75, 156, 202, 227, 126, 246, 177, 178, 96, 77, 124, 101, 208, 39, 251, 0, 187, 3, 131, 215, 118, 51, 185, 249, 80, 28, 219, 222, 255, 208, 119, 81, 215, 129, 254, 237, 243, 65, 108, 15, 195, 93, 76, 115, 17, 232, 14, 183, 30, 71, 94, 178, 108, 145, 115, 44, 255, 128, 195, 124, 218, 203, 63, 166, 43, 178, 92, 101, 226, 122, 135, 173, 94, 122, 80, 65, 143, 96, 102, 110, 230, 101, 74, 120, 176, 56, 9, 109, 63, 156, 187, 15, 30, 91, 173, 16, 142, 77, 218, 10, 235, 153, 251, 189, 218, 121, 232, 243, 112, 34, 109, 136, 187, 6, 15, 92, 77, 221, 81, 19, 103, 141, 62, 156, 230, 225, 230, 51, 23, 92, 195, 9, 197, 44, 48, 170, 192, 199, 164, 50, 225, 76, 74, 46, 191, 160, 72, 47, 7, 26, 241, 63, 19, 243, 166, 207, 241, 27, 239, 50, 254, 214, 100, 175, 120, 45, 0, 38, 59, 240, 94, 134, 151, 219, 161, 155, 246, 89, 86, 221, 35, 97, 88, 227, 46, 13, 93, 155, 183, 212, 40, 3, 219, 189, 50, 152, 248, 252, 205, 6, 235, 150, 45, 9, 199, 28, 85, 11, 134, 64, 50, 110, 176, 219, 199, 241, 80, 13, 217, 223, 29, 245, 216, 196, 205, 183, 156, 62, 52, 23, 98, 90, 240, 149, 116, 123, 63, 138, 105, 250, 9, 191, 209, 32, 239, 234, 23, 196, 253, 152, 93, 101, 20, 86, 8, 70, 168, 104, 7, 83, 97, 126, 59, 193, 212, 253, 25, 71, 172, 158, 172, 2, 244, 127, 88, 212, 58, 239, 39, 179, 169, 102, 201, 146, 145, 39, 157, 242, 140, 235, 126, 210, 60, 169, 83, 214, 38, 55, 185, 137, 69, 65, 248, 211, 65, 41, 198, 179, 224, 27, 173, 117, 186, 135, 182, 163, 234, 98, 15, 213, 101, 73, 20, 208, 191, 100, 22, 194, 70, 216, 222, 2, 91, 122, 141, 9, 69, 155, 39, 176, 47, 79, 51, 169, 89, 32, 60, 203, 99, 189, 89, 213, 229, 51, 237, 96, 249, 118, 244, 198, 32, 64, 157, 228, 227, 249, 242, 123, 65, 173, 126, 71, 217, 12, 128, 77, 126, 222, 94, 64, 163, 116, 41, 215, 199, 103, 50, 16, 117, 144, 3, 46, 253, 217, 215, 139, 165, 245, 67, 158, 247, 236, 91, 72, 101, 171, 146, 255, 125, 147, 69, 31, 103, 182, 94, 13, 71, 130, 212, 75, 196, 219, 218, 74, 157, 15, 18, 86, 169, 107, 195, 75, 82, 246, 205, 255, 231, 132, 231, 241, 21, 184, 213, 219, 126, 146, 164, 141, 147, 41, 245, 225, 241, 152, 86, 195, 122, 151, 62, 3, 240, 142, 57, 221, 141, 91, 95, 245, 8, 29, 177, 109, 189, 244, 76, 157, 245, 11, 73, 168, 33, 172, 142, 125, 215, 107, 94, 52, 21, 220, 82, 125, 210, 113, 178, 80, 99, 127, 94, 116, 99, 194, 209, 62, 222, 115, 116, 229, 109, 123, 183, 242, 23, 86, 97, 240, 192, 243, 241, 58, 186, 244, 216, 50, 205, 78, 69, 69, 243, 167, 230, 169, 131, 41, 113, 61, 103, 181, 20, 52, 26, 244, 108, 115, 0, 84, 58, 166, 15, 157, 209, 64, 13, 247, 95, 156, 182, 10, 125, 141, 226, 214, 37, 46, 172, 249, 84, 11, 131, 113, 49, 238, 201, 191, 161, 224, 59, 237, 86, 140, 204, 200, 34, 198, 142, 179, 15, 52, 137, 138, 21, 154, 76, 222, 161, 74, 2, 43, 115, 150, 24, 255, 20, 141, 169, 183, 185, 140, 117, 219, 247, 58, 86, 239, 76, 27, 74, 245, 157, 210, 164, 38, 170, 117, 32, 192, 105, 151, 42, 200, 155, 30, 99, 173, 247, 181, 37, 186, 21, 250, 127, 40, 225, 70, 198, 29, 62, 44, 15, 20, 22, 81, 244, 125, 190, 24, 28, 27, 126, 249, 179, 171, 218, 210, 186, 133, 27, 126, 197, 108, 169, 125, 4, 224, 108, 55, 145, 134, 8, 74, 186, 127, 161, 9, 207, 135, 19, 138, 62, 36, 109, 152, 117, 8, 187, 20, 17, 218, 97, 193, 31, 132, 26, 125, 115, 124, 236, 227, 205, 50, 249, 166, 160, 56, 176, 132, 161, 45, 114, 71, 235, 203, 43, 185, 96, 104, 132, 69, 42, 180, 154, 158, 140, 212, 70, 63, 220, 165, 162, 30, 101, 115, 108, 194, 139, 138, 50, 218, 143, 234, 81, 198, 35, 107, 242, 64, 91, 248, 129, 246, 208, 159, 58, 237, 147, 248, 197, 149, 33, 55, 199, 10, 134, 99, 170, 242, 18, 7, 152, 173, 162, 198, 122, 183, 250, 161, 247, 162, 17, 242, 64, 217, 46, 66, 70, 232, 200, 120, 186, 218, 253, 170, 179, 33, 66, 110, 113, 28, 71, 163, 103, 244, 207, 239, 73, 209, 90, 22, 122, 160, 90, 35, 189, 119, 168, 155, 122, 134, 97, 127, 87, 104, 165, 231, 146, 92, 165, 25, 153, 212, 176, 57, 76, 170, 173, 32, 221, 164, 2, 144, 168, 91, 63, 218, 236, 217, 208, 208, 110, 236, 54, 80, 2, 222, 79, 152, 254, 29, 255, 158, 13, 173, 211, 222, 218, 202, 178, 228, 170, 207, 16, 125, 140, 106, 178, 227, 107, 102, 127, 53, 159, 243, 31, 56, 46, 171, 198, 244, 135, 207, 60, 165, 239, 200, 19, 210, 136, 206, 154, 75, 124, 244, 155, 158, 96, 88, 109, 114, 38, 88, 180, 249, 84, 15, 74, 221, 3, 213, 90, 219, 48, 238, 130, 98, 239, 7, 138, 193, 49, 118, 142, 149, 53, 133, 163, 152, 2, 34, 35, 48, 93, 199, 160, 52, 225, 83, 233, 229, 222, 200, 31, 126, 157, 141, 157, 62, 131, 255, 94, 177, 189, 185, 145, 175, 38, 126, 7, 160, 190, 193, 134, 48, 239, 51, 212, 153, 23, 79, 227, 119, 248, 115, 229, 221, 176, 69, 40, 214, 14, 58, 190, 153, 137, 23, 183, 87, 23, 170, 80, 191, 80, 238, 152, 138, 57, 239, 78, 29, 106, 173, 130, 72, 27, 40, 185, 209, 197, 155, 33, 33, 37, 163, 178, 138, 85, 120, 63, 245, 125, 42, 141, 160, 245, 201, 37, 182, 125, 21, 56, 33, 97, 193, 128, 164, 47, 218, 122, 124, 125, 247, 196, 117, 245, 243, 213, 57, 118, 247, 93, 51, 27, 181, 112, 152, 240, 231, 41, 26, 138, 210, 209, 194, 30, 196, 103, 65, 204, 0, 140, 152, 116, 186, 200, 42, 23, 78, 187, 88, 235, 12, 211, 190, 109, 196, 222, 143, 235, 19, 181, 119, 181, 71, 82, 62, 17, 133, 117, 196, 32, 156, 144, 31, 93, 64, 55, 252, 119, 119, 171, 186, 9, 199, 226, 16, 252, 210, 182, 235, 127, 240, 254, 186, 9, 28, 227, 62, 171, 251, 27, 9, 237, 126, 220, 154, 7, 113, 247, 20, 214, 242, 104, 147, 147, 54, 1, 207, 107, 211, 177, 34, 101, 100, 242, 48, 136, 209, 251, 178, 22, 10, 66, 177, 16, 69, 137, 209, 40, 219, 251, 103, 237, 51, 68, 71, 205, 49, 54, 40, 119, 150, 19, 47, 191, 37, 7, 150, 16, 183, 70, 166, 147, 53, 157, 95, 238, 104, 173, 59, 232, 44, 171, 131, 122, 17, 168, 129, 166, 37, 9, 213, 65, 230, 36, 242, 198, 13, 122, 171, 127, 162, 244, 193, 49, 222, 69, 66, 72, 143, 248, 101, 64, 53, 52, 202, 3, 152, 245, 190, 243, 28, 72, 23, 19, 2, 203, 203, 190, 38, 97, 159, 249, 59, 50, 151, 49, 233, 136, 26, 97, 82, 69, 12, 61, 195, 118, 216, 34, 61, 172, 237, 239, 218, 165, 57, 57, 85, 76, 189, 192, 243, 41, 64, 212, 64, 45, 189, 56, 10, 93, 250, 43, 227, 186, 249, 31, 171, 21, 211, 143, 116, 185, 94, 189, 52, 139, 244, 22, 129, 206, 175, 22, 250, 31, 44, 15, 106, 190, 227, 0, 142, 244, 70, 93, 122, 93, 2, 86, 234, 116, 187, 157, 242, 124, 69, 201, 174, 249, 244, 6, 118, 109, 158, 215, 101, 73, 219, 83, 239, 211, 228, 19, 197, 230, 47, 143, 215, 123, 62, 68, 102, 8, 98, 244, 251, 120, 206, 63, 168, 94, 87, 110, 130, 224, 249, 93, 73, 186, 62, 80, 250, 249, 128, 103, 80, 17, 51, 31, 135, 133, 49, 142, 250, 150, 203, 188, 28, 33, 106, 203, 9, 134, 134, 187, 129, 13, 76, 220, 179, 161, 66, 104, 75, 216, 105, 91, 172, 33, 140, 150, 145, 233, 17, 131, 15, 176, 133, 211, 31, 61, 51, 163, 120, 233, 68, 19, 129, 123, 61, 9, 164, 49, 237, 7, 177, 139, 88, 70, 97, 134, 4, 170, 90, 154, 46, 35, 162, 4, 121, 23, 113, 102, 104, 139, 128, 1, 127, 169, 41, 51, 206, 128, 72, 61, 202, 147, 225, 186, 167, 53, 198, 143, 40, 151, 221, 215, 57, 14, 85, 103, 242, 250, 20, 168, 114, 175, 64, 159, 75, 158, 204, 33, 238, 96, 176, 59, 83, 239, 49, 191, 154, 109, 68, 91, 16, 201, 5, 87, 127, 224, 144, 158, 128, 182, 9, 153, 235, 209, 52, 32, 77, 137, 18, 152, 34, 240, 195, 200, 149, 50, 29, 201, 31, 116, 180, 79, 151, 19, 180, 121, 217, 224, 209, 239, 112, 214, 199, 104, 57, 162, 130, 109, 16, 25, 89, 106, 166, 10, 71, 114, 128, 130, 56, 194, 134, 76, 21, 107, 253, 103, 126, 11, 166, 1, 136, 95, 252, 230, 167, 150, 15, 242, 242, 167, 178, 182, 95, 244, 160, 194, 14, 167, 52, 78, 99, 119, 238, 202, 167, 106, 52, 94, 250, 206, 209, 250, 246, 73, 160, 36, 101, 191, 99, 28, 95, 59, 53, 28, 160, 21, 62, 117, 228, 34, 244, 152, 74, 160, 178, 124, 216, 103, 208, 142, 120, 181, 80, 219, 164, 74, 233, 186, 83, 240, 18, 213, 190, 144, 208, 206, 122, 225, 10, 85, 138, 161, 108, 190, 13, 80, 54, 219, 18, 242, 197, 38, 25, 233, 91, 66, 203, 208, 92, 185, 113, 73, 96, 233, 8, 181, 243, 140, 126, 153, 83, 105, 74, 153, 80, 72, 152, 23, 182, 90, 102, 95, 2, 176, 177, 57, 24, 144, 95, 215, 245, 133, 164, 90, 170, 72, 80, 74, 173, 92, 208, 100, 184, 245, 88, 70, 47, 63, 153, 77, 154, 46, 199, 76, 41, 26, 148, 96, 114, 112, 95, 124, 96, 163, 214, 196, 131, 205, 86, 212, 84, 135, 49, 95, 236, 253, 195, 133, 138, 28, 95, 138, 59, 1, 181, 37, 191, 146, 205, 33, 45, 92, 156, 232, 190, 90, 39, 13, 201, 253, 213, 107, 56, 147, 205, 53, 250, 162, 249, 31, 235, 140, 55, 206, 251, 76, 213, 125, 207, 131, 172, 95, 222, 251, 209, 123, 151, 18, 223, 142, 146, 13, 244, 122, 197, 104, 213, 174, 92, 143, 134, 17, 26, 169, 126, 209, 42, 69, 102, 134, 57, 190, 4, 207, 76, 0, 4, 165, 111, 250, 52, 62, 209, 76, 82, 14, 217, 185, 78, 122, 153, 35, 164, 11, 33, 48, 0, 146, 207, 6, 45, 183, 163, 145, 6, 158, 177, 158, 165, 43, 239, 116, 188, 82, 96, 6, 15, 236, 124, 57, 236, 126, 113, 221, 64, 175, 121, 143, 9, 100, 81, 238, 172, 8, 4, 196, 231, 74, 172, 27, 103, 151, 246, 2, 228, 225, 219, 96, 165, 148, 86, 137, 223, 25, 103, 205, 209, 201, 192, 198, 132, 168, 52, 245, 238, 18, 102, 52, 214, 53, 233, 87, 249, 196, 255, 27, 193, 97, 92, 177, 6, 123, 114, 13, 87, 203, 216, 13, 61, 229, 190, 132, 45, 168, 24, 162, 181, 251, 173, 36, 205, 199, 49, 124, 251, 103, 97, 234, 111, 86, 23, 69, 25, 135, 173, 62, 175, 143, 91, 123, 149, 181, 104, 167, 14, 164, 42, 39, 117, 108, 190, 54, 246, 162, 134, 10, 49, 252, 197, 58, 117, 177, 81, 245, 162, 11, 172, 72, 161, 72, 189, 197, 200, 191, 70, 103, 76, 84, 161, 65, 55, 203, 225, 172, 143, 61, 139, 48, 228, 196, 178, 177, 122, 226, 21, 208, 7, 213, 190, 78, 182, 225, 48, 37, 113, 192, 23, 42, 72, 15, 165, 135, 100, 66, 248, 12, 68, 237, 217, 204, 181, 26, 128, 255, 12, 212, 169, 37, 124, 26, 245, 251, 94, 69, 106, 57, 239, 158, 160, 170, 201, 28, 91, 167, 248, 137, 155, 42, 128, 252, 175, 47, 33, 84, 23, 23, 143, 136, 182, 124, 78, 102, 248, 222, 139, 207, 116, 142, 240, 45, 190, 172, 72, 136, 242, 201, 174, 190, 122, 94, 128, 219, 210, 201, 75, 194, 29, 144, 38, 67, 182, 208, 229, 93, 42, 31, 6, 131, 150, 181, 123, 6, 101, 142, 188, 234, 82, 39, 12, 162, 35, 68, 31, 27, 71, 53, 198, 129, 204, 143, 166, 125, 156, 206, 136, 3, 25, 17, 135, 245, 247, 151, 90, 218, 177, 182, 162, 167, 37, 106, 59, 191, 107, 198, 193, 82, 214, 177, 45, 30, 187, 28, 223, 68, 81, 104, 70, 165, 186, 109, 126, 90, 191, 67, 169, 23, 125, 215, 248, 4, 34, 183, 124, 155, 1, 143, 204, 126, 36, 102, 38, 152, 20, 19, 107, 235, 12, 154, 69, 2, 223, 189, 219, 175, 83, 184, 181, 139, 131, 216, 26, 206, 17, 163, 193, 239, 191, 156, 194, 55, 79, 195, 21, 130, 10, 16, 82, 2, 242, 49, 213, 121, 136, 198, 133, 150, 43, 230, 120, 231, 4, 184, 109, 22, 145, 148, 53, 36, 233, 147, 112, 116, 25, 137, 129, 24, 197, 228, 113, 171, 228, 229, 76, 123, 191, 139, 5, 173, 168, 138, 167, 84, 68, 23, 246, 122, 197, 40, 182, 127, 130, 103, 58, 172, 137, 141, 97, 164, 57, 36, 142, 23, 237, 61, 211, 197, 43, 207, 191, 110, 123, 238, 113, 44, 126, 162, 65, 83, 98, 54, 121, 214, 198, 182, 253, 177, 15, 44, 90, 168, 154, 236, 63, 254, 111, 60, 75, 93, 206, 4, 232, 203, 107, 172, 129, 175, 172, 42, 68, 129, 11, 201, 125, 30, 182, 227, 50, 53, 59, 163, 211, 181, 107, 105, 58, 152, 87, 42, 120, 185, 81, 161, 25, 216, 24, 76, 34, 51, 82, 127, 163, 55, 18, 47, 168, 43, 47, 54, 86, 81, 86, 30, 133, 55, 27, 40, 33, 81, 238, 79, 234, 40, 191, 45, 161, 242, 41, 253, 201, 178, 177, 200, 210, 182, 86, 1, 215, 90, 101, 147, 176, 15, 254, 17, 37, 27, 199, 189, 135, 1, 148, 31, 77, 78, 120, 112, 35, 220, 169, 90, 177, 11, 35, 193, 190, 175, 223, 36, 47, 59, 44, 24, 194, 11, 230, 20, 22, 182, 180, 170, 222, 96, 10, 131, 94, 140, 44, 96, 74, 124, 143, 75, 208, 241, 179, 218, 181, 47, 134, 38, 190, 83, 189, 12, 108, 103, 59, 224, 187, 77, 30, 245, 4, 171, 123, 119, 114, 77, 168, 168, 131, 114, 33, 106, 252, 147, 11, 236, 250, 226, 230, 228, 253, 148, 34, 198, 229, 127, 127, 194, 125, 253, 102, 203, 186, 118, 72, 54, 42, 29, 160, 5, 106, 89, 225, 172, 158, 219, 29, 200, 227, 190, 205, 96, 251, 204, 9, 35, 157, 92, 226, 203, 142, 171, 24, 58, 189, 234, 136, 252, 215, 39, 89, 80, 220, 44, 110, 97, 248, 230, 101, 4, 181, 231, 142, 39, 150, 190, 174, 46, 251, 96, 80, 250, 82, 50, 91, 115, 72, 249, 226, 70, 49, 1, 133, 162, 108, 220, 108, 51, 22, 112, 113, 143, 249, 106, 70, 164, 208, 187, 235, 174, 188, 134, 192, 224, 97, 217, 132, 182, 224, 48, 145, 138, 242, 127, 196, 124, 200, 160, 165, 87, 186, 52, 69, 251, 11, 232, 248, 211, 146, 197, 52, 127, 212, 15, 113, 55, 109, 58, 33, 27, 124, 10, 116, 234, 9, 124, 169, 57, 159, 12, 96, 217, 156, 117, 29, 38, 203, 172, 109, 219, 184, 135, 106, 129, 147, 127, 62, 207, 34, 14, 23, 9, 186, 158, 52, 8, 168, 2, 2, 121, 166, 26, 194, 178, 113, 131, 55, 174, 214, 16, 127, 15, 98, 5, 145, 230, 77, 125, 128, 138, 237, 180, 54, 29, 162, 251, 23, 237, 96, 116, 242, 145, 5, 151, 55, 135, 15, 113, 105, 167, 226, 52, 65, 34, 110, 182, 53, 53, 4, 198, 13, 204, 35, 97, 8, 105, 132, 200, 249, 104, 117, 17, 202, 84, 199, 81, 58, 133, 198, 204, 85, 143, 21, 97, 3, 52, 247, 194, 196, 106, 167, 76, 24, 19, 148, 28, 182, 140, 62, 115, 252, 174, 83, 38, 249, 255, 133, 220, 120, 114, 134, 114, 184, 17, 181, 42, 109, 12, 239, 141, 206, 82, 16, 161, 197, 88, 173, 178, 186, 27, 171, 243, 126, 97, 2, 135, 155, 36, 3, 236, 51, 160, 225, 143, 53, 35, 73, 183, 111, 153, 60, 45, 177, 109, 177, 231, 106, 72, 194, 115, 65, 82, 181, 145, 54, 44, 240, 131, 45, 5, 88, 225, 93, 243, 191, 99, 109, 26, 110, 235, 55, 236, 40, 86, 9, 17, 126, 56, 109, 64, 218, 176, 168, 50, 188, 216, 70, 84, 86, 25, 106, 184, 39, 179, 107, 216, 51, 166, 73, 63, 193, 121, 87, 164, 47, 6, 68, 248, 249, 168, 186, 82, 253, 75, 255, 132, 156, 20, 66, 3, 180, 189, 237, 74, 29, 102, 124, 66, 187, 151, 167, 145, 245, 224, 101, 92, 254, 24, 189, 145, 207, 57, 25, 195, 215, 222, 114, 140, 237, 138, 149, 10, 80, 236, 192, 141, 247, 57, 244, 110, 103, 50, 40, 51, 137, 21, 49, 202, 110, 71, 222, 35, 215, 113, 61, 30, 47, 238, 139, 15, 68, 192, 195, 198, 120, 103, 236, 73, 44, 154, 234, 200, 73, 156, 243, 142, 105, 37, 3, 202, 11, 158, 171, 79, 150, 110, 184, 96, 206, 233, 108, 213, 129, 50, 198, 107, 51, 45, 234, 135, 6, 216, 49, 147, 149, 127, 81, 231, 107, 239, 88, 204, 99, 103, 88, 83, 223, 89, 214, 153, 183, 106, 118, 163, 162, 99, 74, 147, 182, 85, 129, 3, 180, 208, 69, 11, 111, 193, 185, 218, 48, 169, 39, 46, 172, 81, 136, 169, 252, 67, 245, 254, 82, 208, 140, 201, 59, 165, 9, 106, 243, 28, 101, 211, 205, 250, 212, 198, 237, 11, 131, 157, 95, 83, 161, 171, 226, 28, 118, 142, 147, 95, 247, 30, 109, 78, 3, 134, 67, 246, 98, 225, 192, 153, 206, 61, 82, 207, 7, 135, 176, 30, 33, 3, 117, 25, 121, 11, 133, 211, 122, 31, 237, 112, 152, 81, 129, 255, 192, 246, 82, 37, 58, 221, 210, 138, 7, 245, 248, 213, 111, 52, 120, 254, 232, 80, 165, 196, 116, 229, 37, 154, 136, 230, 165, 101, 63, 233, 213, 87, 102, 102, 153, 41, 78, 225, 166, 242, 3, 50, 219, 253, 172, 151, 159, 98, 52, 234, 63, 17, 8, 52, 197, 223, 242, 9, 198, 90, 131, 173, 231, 179, 119, 9, 131, 230, 85, 98, 112, 94, 190, 163, 56, 16, 255, 134, 207, 16, 226, 93, 203, 218, 61, 139, 110, 169, 189, 90, 44, 66, 164, 68, 197, 14, 141, 186, 160, 201, 49, 36, 42, 174, 114, 118, 134, 52, 116, 127, 213, 113, 197, 24, 201, 113, 73, 125, 253, 121, 78, 163, 62, 151, 18, 133, 253, 121, 138, 0, 103, 175, 144, 79, 221, 33, 131, 244, 223, 103, 145, 148, 179, 50, 134, 233, 120, 206, 8, 61, 187, 51, 236, 250, 145, 127, 41, 19, 245, 188, 65, 244, 251, 182, 239, 238, 160, 146, 235, 164, 53, 123, 72, 237, 23, 110, 42, 166, 67, 68, 121, 173, 84, 210, 86, 29, 117, 210, 210, 251, 20, 87, 77, 90, 12, 30, 129, 68, 254, 220, 177, 236, 183, 76, 36, 181, 179, 78, 186, 13, 31, 61, 118, 175, 86, 175, 29, 40, 212, 122, 147, 242, 165, 2, 22, 6, 242, 68, 96, 103, 214, 198, 163, 136, 23, 221, 217, 240, 226, 0, 9, 231, 61, 203, 68, 21, 170, 64, 191, 105, 34, 51, 8, 41, 185, 73, 34, 192, 245, 130, 207, 10, 225, 120, 203, 14, 37, 100, 9, 55, 55, 194, 240, 41, 111, 159, 70, 121, 62, 184, 103, 113, 249, 252, 148, 11, 42, 145, 230, 241, 175, 175, 0, 191, 180, 95, 93, 101, 100, 220, 254, 113, 104, 218, 80, 32, 137, 180, 61, 22, 174, 252, 109, 3, 9, 62, 118, 34, 194, 224, 213, 137, 62, 15, 161, 11, 176, 46, 185, 128, 19, 36, 8, 172, 217, 12, 52, 83, 211, 51, 7, 124, 27, 162, 50, 244, 222, 75, 79, 122, 188, 177, 163, 31, 131, 91, 151, 169, 19, 31, 80, 173, 177, 47, 99, 252, 33, 198, 159, 222, 204, 102, 46, 130, 162, 219, 206, 35, 116, 88, 57, 71, 194, 226, 170, 185, 249, 151, 160, 205, 203, 205, 71, 243, 36, 212, 182, 254, 237, 127, 161, 119, 24, 61, 10, 214, 78, 58, 9, 11, 53, 119, 54, 171, 111, 143, 124, 203, 143, 24, 121, 171, 142, 150, 7, 185, 47, 89, 230, 115, 102, 194, 24, 76, 194, 179, 2, 239, 207, 123, 187, 145, 242, 145, 44, 203, 219, 37, 49, 64, 200, 166, 106, 166, 72, 255, 66, 17, 221, 147, 251, 17, 6, 40, 42, 211, 115, 252, 96, 72, 91, 255, 191, 202, 2, 245, 149, 135, 153, 2, 231, 141, 161, 30, 129, 103, 163, 58, 125, 9, 33, 236, 239, 56, 220, 77, 8, 178, 165, 136, 45, 96, 209, 201, 227, 40, 10, 47, 20, 250, 133, 80, 14, 235, 89, 211, 196, 11, 39, 106, 25, 252, 13, 174, 46, 168, 139, 227, 143, 167, 99, 106, 30, 82, 172, 159, 137, 181, 95, 142, 49, 229, 160, 145, 226, 111, 186, 255, 249, 194, 149, 106, 128, 42, 132, 191, 188, 183, 58, 77, 108, 251, 5, 33, 139, 142, 161, 115, 230, 213, 199, 3, 154, 5, 239, 8, 245, 68, 156, 164, 229, 169, 32, 198, 4, 254, 82, 215, 33, 118, 114, 219, 220, 208, 137, 236, 241, 175, 104, 86, 13, 114, 254, 110, 163, 243, 223, 169, 110, 251, 90, 180, 219, 12, 60, 246, 131, 6, 69, 113, 58, 33, 148, 141, 50, 139, 125, 237, 110, 23, 179, 134, 37, 23, 136, 119, 35, 85, 251, 59, 217, 173, 145, 209, 236, 171, 198, 51, 106, 247, 217, 225, 112, 12, 248, 129, 53, 163, 0, 200, 112, 65, 26, 62, 195, 185, 180, 217, 148, 223, 18, 42, 6, 250, 190, 29, 61, 245, 190, 183, 50, 102, 121, 118, 159, 196, 230, 225, 42, 215, 0, 118, 17, 51, 214, 157, 173, 154, 147, 211, 231, 178, 34, 189, 185, 183, 185, 79, 214, 8, 55, 23, 107, 192, 61, 40, 114, 102, 153, 138, 161, 146, 38, 247, 167, 131, 204, 198, 147, 232, 155, 9, 180, 67, 236, 230, 216, 58, 189, 190, 103, 73, 62, 70, 133, 202, 147, 108, 107, 130, 57, 255, 98, 208, 115, 53, 11, 155, 14, 182, 192, 80, 143, 152, 16, 24, 173, 116, 149, 248, 127, 31, 142, 225, 235, 214, 56, 126, 249, 70, 248, 164, 201, 97, 60, 143, 125, 191, 249, 178, 50, 80, 93, 88, 222, 254, 56, 230, 154, 186, 19, 130, 243, 89, 49, 197, 70, 202, 184, 131, 183, 191, 155, 135, 85, 237, 47, 50, 189, 48, 180, 181, 42, 184, 183, 7, 216, 236, 180, 113, 108, 89, 196, 122, 219, 45, 23, 42, 61, 3, 45, 127, 169, 104, 34, 216, 250, 178, 87, 17, 111, 173, 19, 94, 231, 131, 66, 165, 10, 194, 203, 168, 60, 110, 145, 153, 188, 17, 97, 42, 22, 101, 119, 14, 91, 27, 199, 94, 86, 85, 28, 158, 165, 84, 208, 180, 73, 232, 61, 2, 153, 74, 162, 254, 236, 139, 87, 203, 227, 121, 18, 136, 94, 20, 90, 144, 152, 251, 101, 158, 14, 106, 3, 50, 208, 75, 124, 89, 250, 209, 190, 174, 213, 74, 26, 3, 3, 202, 58, 56, 44, 44, 35, 129, 38, 29, 66, 144, 244, 0, 235, 240, 245, 210, 28, 83, 174, 170, 7, 219, 252, 160, 252, 122, 185, 173, 146, 237, 27, 123, 94, 66, 194, 98, 10, 28, 8, 18, 177, 20, 177, 107, 49, 121, 99, 11, 196, 172, 30, 4, 43, 108, 204, 93, 179, 65, 131, 166, 111, 246, 231, 29, 97, 126, 124, 39, 145, 174, 90, 148, 177, 204, 25, 15, 160, 176, 127, 165, 147, 113, 168, 151, 242, 34, 207, 204, 173, 16, 79, 36, 154, 44, 217, 166, 216, 75, 107, 208, 228, 245, 58, 95, 135, 14, 54, 28, 34, 225, 224, 41, 129, 249, 31, 4, 43, 119, 174, 30, 132, 242, 197, 243, 156, 49, 212, 233, 254, 9, 24, 218, 68, 38, 220, 187, 51, 29, 57, 142, 33, 102, 23, 143, 208, 108, 165, 112, 142, 76, 237, 228, 220, 73, 176, 199, 65, 77, 122, 230, 127, 230, 93, 80, 36, 168, 216, 130, 149, 245, 175, 204, 95, 214, 20, 231, 12, 110, 98, 71, 250, 98, 205, 186, 78, 199, 212, 230, 50, 94, 203, 115, 200, 210, 11, 82, 22, 223, 116, 203, 241, 233, 233, 37, 87, 188, 202, 18, 104, 84, 227, 237, 29, 78, 202, 120, 206, 127, 222, 181, 74, 137, 209, 161, 177, 54, 205, 187, 213, 176, 141, 28, 215, 242, 127, 176, 51, 221, 120, 227, 98, 237, 213, 5, 50, 234, 141, 250, 27, 244, 58, 63, 255, 171, 55, 58, 228, 96, 97, 122, 84, 150, 48, 203, 65, 174, 207, 6, 9, 107, 76, 37, 73, 103, 149, 75, 88, 165, 59, 47, 227, 0, 174, 61, 119, 195, 181, 52, 177, 26, 99, 157, 46, 103, 254, 22, 138, 34, 120, 5, 8, 209, 26, 89, 135, 83, 32, 176, 202, 208, 83, 20, 119, 239, 81, 5, 46, 240, 29, 143, 120, 41, 172, 12, 142, 160, 150, 225, 119, 69, 58, 225, 251, 107, 249, 248, 240, 184, 136, 122, 35, 20, 221, 86, 216, 213, 253, 139, 136, 10, 57, 81, 231, 234, 1, 214, 146, 91, 210, 82, 82, 203, 187, 80, 4, 213, 128, 76, 157, 56, 70, 40, 61, 210, 229, 92, 139, 205, 143, 118, 179, 170, 141, 171, 196, 16, 82, 236, 156, 99, 92, 175, 113, 236, 93, 229, 209, 107, 13, 176, 47, 165, 142, 88, 209, 110, 107, 59, 161, 150, 86, 10, 50, 174, 28, 202, 57, 38, 241, 1, 147, 142, 250, 179, 102, 170, 207, 213, 25, 133, 111, 82, 237, 16, 93, 41, 142, 89, 208, 136, 88, 127, 83, 209, 147, 97, 225, 222, 234, 25, 242, 57, 84, 148, 76, 34, 238, 175, 122, 90, 137, 225, 154, 168, 126, 140, 233, 202, 105, 16, 142, 6, 135, 36, 196, 221, 152, 54, 157, 221, 54, 153, 255, 240, 179, 27, 156, 130, 117, 216, 32, 83, 99, 24, 225, 54, 144, 186, 5, 65, 130, 35, 52, 184, 181, 216, 163, 188, 212, 56, 234, 189, 179, 125, 62, 178, 104, 37, 29, 76, 112, 129, 63, 58, 239, 23, 130, 172, 113, 209, 152, 121, 148, 55, 25, 97, 203, 2, 112, 130, 80, 112, 172, 236, 105, 245, 194, 150, 250, 33, 17, 207, 78, 172, 162, 32, 22, 28, 58, 114, 121, 77, 96, 207, 186, 106, 81, 111, 23, 111, 89, 34, 57, 21, 176, 162, 81, 95, 189, 110, 229, 126, 106, 200, 193, 120, 210, 4, 99, 80, 243, 128, 82, 188, 134, 69, 242, 135, 157, 110, 154, 129, 181, 42, 235, 155, 172, 62, 62, 69, 247, 66, 80, 97, 95, 35, 55, 177, 217, 110, 124, 24, 127, 245, 232, 112, 156, 121, 227, 183, 164, 46, 41, 207, 126, 152, 142, 195, 120, 227, 170, 195, 245, 11, 57, 156, 108, 151, 51, 199, 249, 84, 180, 49, 85, 184, 56, 92, 247, 21, 83, 163, 108, 227, 50, 199, 14, 177, 73, 66, 241, 184, 190, 209, 79, 71, 224, 137, 163, 208, 248, 160, 12, 85, 115, 62, 246, 159, 22, 196, 34, 53, 206, 62, 127, 74, 107, 73, 42, 31, 65, 249, 104, 31, 5, 239, 127, 214, 146, 182, 27, 194, 112, 0, 10, 210, 124, 117, 191, 63, 212, 166, 31, 87, 236, 9, 218, 182, 147, 7, 111, 211, 59, 164, 83, 241, 197, 164, 97, 87, 176, 60, 47, 4, 28, 75, 251, 22, 128, 1, 62, 146, 58, 87, 173, 239, 130, 142, 165, 188, 152, 15, 90, 40, 109, 115, 9, 195, 122, 81, 98, 148, 88, 86, 78, 113, 237, 67, 87, 87, 53, 75, 87, 226, 72, 151, 4, 208, 188, 16, 240, 166, 163, 62, 217, 79, 162, 56, 148, 50, 5, 182, 59, 233, 152, 254, 66, 246, 30, 21, 107, 195, 195, 161, 164, 33, 109, 230, 238, 121, 77, 85, 178, 103, 150, 96, 168, 84, 64, 70, 190, 172, 173, 195, 167, 33, 230, 71, 6, 73, 144, 111, 69, 255, 119, 136, 169, 22, 22, 164, 182, 250, 161, 126, 248, 22, 44, 4, 12, 85, 211, 7, 219, 133, 112, 179, 125, 74, 133, 171, 65, 233, 74, 109, 103, 117, 149, 139, 149, 148, 243, 77, 32, 146, 156, 41, 22, 243, 50, 211, 131, 214, 133, 152, 36, 95, 27, 232, 155, 164, 189, 193, 224, 10, 189, 187, 231, 188, 38, 236, 181, 196, 111, 40, 236, 223, 113, 194, 197, 101, 75, 189, 213, 234, 17, 102, 200, 29, 154, 227, 4, 134, 212, 237, 170, 116, 57, 251, 161, 217, 212, 91, 226, 63, 152, 126, 174, 200, 12, 211, 74, 162, 233, 176, 111, 122, 119, 59, 197, 149, 123, 230, 135, 216, 64, 107, 238, 34, 54, 48, 56, 4, 88, 85, 163, 116, 155, 22, 72, 180, 198, 221, 26, 106, 185, 41, 5, 100, 96, 151, 198, 222, 139, 80, 177, 66, 116, 12, 141, 132, 59, 93, 201, 162, 208, 243, 106, 81, 22, 227, 18, 47, 138, 253, 160, 159, 182, 47, 197, 65, 165, 215, 71, 22, 65, 80, 135, 105, 210, 8, 37, 212, 253, 221, 155, 175, 35, 217, 196, 36, 84, 241, 27, 237, 106, 59, 48, 253, 119, 7, 25, 83, 198, 204, 240, 130, 5, 55, 4, 115, 139, 102, 230, 32, 19, 47, 176, 230, 206, 244, 95, 94, 104, 41, 14, 229, 83, 170, 73, 147, 253, 90, 221, 33, 125, 244, 169, 39, 18, 138, 205, 255, 51, 136, 152, 90, 71, 86, 204, 248, 108, 69, 39, 128, 161, 9, 221, 230, 8, 211, 64, 214, 125, 52, 175, 154, 60, 218, 156, 204, 128, 110, 112, 195, 120, 87, 144, 4, 115, 198, 249, 106, 250, 162, 248, 175, 225, 51, 62, 31, 184, 1, 150, 54, 3, 113, 205, 63, 100, 82, 176, 86, 32, 254, 37, 203, 51, 230, 84, 171, 65, 1, 182, 198, 172, 175, 41, 192, 238, 15, 177, 249, 65, 58, 163, 31, 113, 124, 36, 40, 170, 60, 3, 143, 57, 32, 95, 27, 17, 206, 39, 61, 231, 21, 25, 83, 208, 157, 98, 37, 75, 180, 108, 22, 78, 88, 172, 35, 164, 194, 179, 204, 97, 155, 188, 204, 77, 140, 125, 49, 215, 173, 84, 28, 53, 168, 61, 66, 77, 189, 86, 156, 184, 154, 85, 220, 184, 53, 163, 242, 64, 56, 58, 184, 237, 133, 72, 253, 133, 178, 192, 139, 226, 0, 138, 41, 79, 101, 154, 151, 118, 59, 199, 105, 157, 10, 63, 65, 191, 254, 67, 143, 107, 233, 206, 106, 25, 27, 120, 243, 245, 224, 175, 203, 243, 122, 145, 56, 181, 145, 37, 189, 211, 71, 180, 211, 72, 8, 155, 128, 245, 50, 223, 188, 175, 204, 82, 191, 14, 120, 176, 254, 94, 86, 173, 254, 98, 60, 1, 236, 163, 96, 109, 194, 58, 233, 200, 94, 249, 184, 217, 68, 68, 116, 63, 16, 38, 19, 11, 73, 23, 222, 151, 176, 193, 215, 172, 89, 203, 240, 41, 144, 21, 19, 255, 181, 54, 206, 130, 127, 188, 232, 109, 214, 93, 250, 172, 19, 15, 242, 135, 45, 163, 60, 184, 7, 167, 76, 207, 247, 230, 67, 181, 95, 178, 102, 103, 49, 116, 56, 56, 183, 23, 74, 214, 12, 86, 157, 31, 222, 87, 38, 194, 5, 221, 141, 162, 120, 138, 117, 59, 153, 158, 214, 67, 107, 237, 98, 130, 247, 144, 147, 175, 251, 79, 130, 160, 1, 51, 3, 183, 218, 128, 19, 252, 156, 189, 48, 166, 134, 184, 33, 38, 58, 178, 223, 17, 9, 12, 223, 9, 130, 224, 187, 19, 226, 11, 144, 99, 90, 7, 53, 147, 144, 230, 40, 131, 224, 235, 118, 167, 31, 219, 66, 225, 135, 4, 123, 97, 113, 40, 157, 84, 63, 138, 253, 187, 155, 125, 95, 103, 29, 192, 230, 31, 150, 202, 173, 227, 145, 193, 17, 87, 105, 151, 188, 32, 85, 97, 155, 32, 88, 183, 244, 59, 136, 44, 138, 124, 210, 235, 245, 67, 131, 139, 139, 15, 113, 50, 167, 20, 111, 228, 182, 149, 241, 26, 158, 185, 231, 86, 90, 136, 146, 43, 167, 79, 239, 140, 200, 173, 220, 206, 10, 83, 124, 10, 137, 103, 254, 166, 115, 210, 120, 213, 52, 52, 112, 67, 135, 249, 4, 217, 151, 115, 11, 61, 253, 204, 18, 249, 34, 157, 111, 217, 195, 217, 249, 182, 24, 125, 37, 43, 26, 244, 92, 9, 183, 158, 164, 163, 181, 254, 41, 224, 174, 37, 225, 237, 67, 221, 37, 232, 131, 61, 44, 153, 111, 16, 93, 122, 234, 21, 174, 63, 56, 31, 220, 182, 234, 70, 201, 8, 69, 152, 114, 42, 150, 142, 60, 186, 22, 56, 66, 191, 194, 188, 176, 158, 221, 46, 159, 197, 184, 231, 77, 46, 152, 72, 116, 240, 147, 55, 100, 122, 45, 60, 64, 141, 72, 109, 19, 192, 251, 143, 119, 172, 25, 238, 19, 127, 161, 187, 5, 184, 159, 152, 13, 116, 60, 169, 176, 183, 129, 188, 232, 98, 73, 124, 145, 227, 248, 170, 103, 216, 255, 44, 192, 54, 229, 222, 170, 170, 248, 65, 75, 155, 95, 92, 136, 86, 139, 92, 85, 132, 22, 201, 128, 35, 13, 13, 166, 209, 242, 16, 77, 161, 66, 191, 6, 67, 218, 209, 56, 46, 160, 97, 166, 29, 107, 123, 166, 172, 36, 207, 93, 35, 59, 216, 126, 20, 160, 31, 10, 188, 154, 77, 158, 181, 173, 168, 110, 77, 230, 135, 195, 246, 6, 144, 199, 169, 75, 200, 250, 183, 231, 188, 174, 35, 92, 35, 76, 216, 15, 131, 158, 179, 66, 214, 111, 247, 154, 1, 191, 137, 170, 242, 43, 24, 21, 168, 159, 83, 163, 92, 194, 83, 214, 120, 43, 115, 212, 237, 146, 229, 21, 197, 110, 123, 23, 220, 88, 215, 160, 82, 17, 90, 224, 163, 255, 63, 113, 217, 252, 55, 2, 142, 94, 238, 252, 188, 184, 216, 172, 204, 130, 119, 219, 42, 147, 182, 199, 81, 49, 153, 125, 236, 148, 83, 13, 168, 219, 9, 237, 238, 43, 146, 134, 71, 82, 37, 156, 77, 160, 104, 146, 87, 227, 36, 84, 124, 194, 46, 72, 103, 145, 79, 207, 175, 33, 186, 49, 188, 32, 248, 124, 46, 158, 236, 218, 80, 176, 93, 84, 7, 115, 232, 54, 116, 107, 155, 204, 169, 144, 213, 143, 198, 202, 146, 251, 242, 220, 157, 243, 190, 187, 106, 98, 224, 51, 172, 236, 39, 212, 62, 245, 92, 54, 150, 19, 5, 180, 146, 145, 211, 238, 61, 123, 76, 139, 144, 206, 145, 254, 205, 84, 84, 233, 179, 253, 155, 36, 192, 13, 175, 233, 95, 61, 255, 26, 236, 192, 131, 186, 237, 139, 105, 131, 53, 69, 20, 127, 110, 102, 141, 110, 17, 64, 99, 248, 42, 230, 99, 170, 168, 11, 69, 133, 220, 33, 22, 59, 92, 148, 167, 66, 231, 20, 184, 230, 82, 190, 85, 21, 111, 197, 141, 209, 99, 76, 53, 88, 93, 128, 155, 78, 102, 198, 212, 143, 172, 79, 184, 121, 178, 242, 214, 243, 140, 100, 149, 238, 215, 73, 79, 6, 229, 115, 172, 20, 147, 177, 237, 190, 155, 167, 100, 81, 227, 78, 73, 133, 207, 234, 203, 55, 209, 209, 80, 145, 71, 90, 139, 206, 68, 153, 121, 189, 57, 225, 14, 12, 97, 237, 24, 121, 62, 143, 245, 193, 219, 208, 7, 163, 164, 61, 206, 112, 199, 117, 133, 171, 140, 117, 131, 58, 241, 66, 48, 92, 242, 97, 118, 225, 52, 209, 115, 245, 22, 126, 229, 232, 7, 188, 55, 7, 192, 154, 105, 128, 142, 216, 44, 201, 174, 87, 231, 211, 16, 107, 191, 144, 23, 201, 185, 68, 27, 207, 170, 49, 167, 70, 209, 187, 129, 8, 246, 203, 244, 228, 252, 131, 145, 102, 88, 244, 211, 2, 3, 245, 106, 193, 135, 92, 110, 8, 158, 144, 88, 51, 217, 147, 18, 115, 7, 214, 111, 23, 7, 110, 208, 222, 41, 145, 230, 123, 76, 41, 189, 108, 26, 30, 97, 139, 234, 14, 58, 170, 84, 170, 80, 8, 233, 204, 88, 2, 103, 63, 31, 94, 134, 20, 143, 184, 44, 23, 168, 147, 228, 165, 180, 132, 60, 12, 11, 143, 254, 163, 78, 99, 98, 166, 208, 52, 25, 206, 3, 124, 45, 236, 94, 234, 61, 67, 141, 179, 146, 35, 226, 145, 237, 226, 119, 55, 81, 47, 68, 194, 12, 165, 12, 253, 78, 197, 179, 107, 221, 131, 239, 23, 153, 73, 161, 32, 21, 7, 230, 223, 128, 31, 103, 200, 54, 37, 234, 236, 153, 173, 239, 89, 51, 108, 30, 183, 242, 64, 246, 197, 254, 51, 186, 59, 167, 59, 188, 188, 70, 22, 142, 241, 133, 103, 31, 38, 55, 154, 78, 156, 211, 246, 250, 157, 158, 37, 243, 173, 51, 199, 144, 20, 63, 4, 92, 70, 244, 234, 94, 218, 221, 12, 97, 26, 197, 104, 118, 78, 251, 185, 99, 116, 6, 108, 156, 154, 140, 57, 114, 157, 43, 27, 129, 96, 130, 130, 111, 83, 193, 30, 215, 99, 32, 61, 231, 102, 18, 187, 239, 202, 35, 250, 214, 6, 130, 182, 220, 37, 201, 41, 7, 28, 135, 99, 92, 167, 49, 41, 231, 126, 145, 26, 13, 12, 207, 176, 225, 117, 72, 52, 55, 138, 166, 156, 69, 241, 84, 184, 44, 164, 33, 91, 213, 82, 75, 175, 90, 51, 55, 51, 122, 110, 130, 90, 83, 46, 218, 9, 61, 94, 220, 153, 231, 47, 20, 192, 223, 109, 22, 20, 235, 84, 234, 116, 255, 129, 252, 39, 133, 24, 177, 14, 92, 167, 56, 69, 156, 230, 42, 182, 162, 55, 14, 218, 106, 154, 202, 101, 80, 67, 230, 3, 153, 78, 121, 236, 216, 26, 176, 96, 120, 197, 48, 191, 4, 225, 53, 55, 246, 92, 223, 245, 189, 245, 4, 74, 232, 23, 160, 217, 206, 237, 190, 228, 62, 40, 218, 240, 6, 199, 131, 25, 113, 163, 151, 162, 7, 155, 219, 118, 255, 238, 140, 183, 14, 86, 159, 244, 218, 209, 80, 141, 179, 251, 212, 74, 24, 210, 5, 222, 112, 140, 20, 77, 49, 34, 21, 25, 210, 244, 161, 22, 167, 119, 26, 161, 136, 0, 129, 229, 149, 127, 226, 106, 144, 227, 174, 86, 20, 22, 151, 13, 193, 5, 155, 117, 13, 110, 235, 237, 132, 100, 119, 157, 170, 196, 122, 164, 27, 196, 240, 46, 246, 224, 183, 31, 180, 236, 170, 7, 61, 150, 21, 109, 51, 185, 25, 57, 190, 214, 94, 75, 8, 168, 82, 122, 87, 123, 193, 31, 59, 230, 45, 214, 218, 75, 229, 194, 228, 207, 176, 156, 218, 208, 181, 192, 76, 241, 151, 234, 75, 72, 73, 120, 15, 66, 225, 203, 15, 110, 189, 223, 146, 60, 64, 52, 153, 187, 217, 3, 73, 114, 79, 163, 27, 202, 74, 99, 115, 72, 147, 171, 111, 252, 193, 100, 167, 89, 40, 22, 97, 168, 94, 109, 65, 205, 19, 4, 122, 222, 107, 179, 5, 111, 79, 31, 172, 250, 95, 104, 129, 139, 127, 89, 164, 152, 42, 20, 139, 30, 173, 156, 66, 62, 27, 149, 101, 95, 15, 128, 50, 142, 163, 251, 54, 120, 216, 103, 100, 84, 132, 34, 91, 50, 255, 58, 155, 147, 18, 121, 159, 211, 0, 182, 197, 16, 153, 110, 28, 244, 248, 14, 126, 177, 118, 128, 124, 136, 207, 88, 28, 128, 203, 96, 32, 202, 48, 189, 253, 77, 221, 64, 74, 90, 41, 10, 201, 131, 177, 25, 173, 97, 165, 83, 117, 240, 171, 170, 35, 34, 118, 47, 107, 250, 43, 53, 183, 128, 198, 182, 207, 181, 91, 147, 190, 179, 12, 11, 139, 189, 34, 162, 203, 93, 7, 169, 34, 166, 241, 7, 145, 181, 71, 103, 36, 88, 233, 21, 9, 200, 98, 41, 75, 240, 71, 139, 114, 184, 56, 199, 232, 136, 52, 123, 21, 171, 217, 223, 52, 135, 99, 252, 154, 157, 234, 248, 110, 178, 32, 138, 171, 180, 38, 131, 82, 230, 227, 200, 157, 225, 202, 26, 85, 189, 127, 55, 244, 121, 28, 105, 219, 117, 134, 172, 151, 7, 251, 175, 24, 168, 164, 174, 226, 160, 175, 123, 139, 16, 193, 123, 202, 75, 0, 147, 78, 182, 41, 124, 135, 84, 194, 164, 160, 212, 96, 11, 182, 206, 145, 107, 238, 59, 220, 153, 27, 255, 79, 25, 76, 107, 137, 214, 83, 219, 216, 123, 145, 208, 211, 162, 47, 167, 28, 183, 33, 228, 182, 3, 101, 103, 229, 209, 255, 166, 189, 252, 233, 122, 79, 197, 147, 222, 157, 204, 212, 9, 68, 120, 177, 229, 46, 166, 249, 165, 170, 166, 239, 135, 195, 7, 177, 66, 194, 148, 40, 253, 159, 74, 178, 113, 101, 206, 139, 205, 215, 137, 107, 138, 160, 84, 35, 216, 60, 89, 51, 52, 47, 197, 228, 105, 0, 15, 168, 33, 136, 215, 245, 128, 115, 10, 55, 107, 9, 148, 33, 134, 85, 49, 22, 186, 146, 213, 70, 124, 61, 163, 94, 231, 224, 216, 164, 208, 190, 172, 6, 157, 147, 136, 99, 102, 203, 29, 27, 234, 208, 13, 68, 243, 38, 253, 100, 156, 18, 66, 43, 78, 185, 194, 41, 154, 53, 111, 230, 158, 177, 52, 240, 161, 234, 201, 54, 71, 75, 46, 10, 190, 68, 167, 135, 130, 210, 252, 10, 177, 100, 9, 165, 62, 59, 90, 67, 1, 48, 194, 26, 121, 196, 55, 247, 255, 4, 63, 22, 247, 120, 75, 160, 94, 117, 186, 6, 125, 211, 49, 237, 15, 249, 156, 70, 4, 10, 210, 97, 9, 113, 203, 251, 111, 129, 224, 167, 84, 250, 70, 184, 157, 95, 29, 164, 112, 168, 129, 67, 207, 139, 39, 223, 144, 99, 210, 31, 35, 61, 228, 165, 15, 77, 71, 64, 49, 245, 198, 115, 6, 68, 239, 75, 236, 157, 108, 9, 232, 36, 117, 187, 43, 78, 230, 64, 52, 158, 198, 183, 147, 134, 216, 133, 58, 139, 212, 113, 101, 213, 200, 74, 45, 115, 46, 138, 228, 11, 65, 214, 59, 240, 216, 247, 139, 139, 219, 187, 214, 103, 160, 53, 160, 27, 252, 143, 245, 231, 240, 10, 157, 33, 54, 142, 17, 64, 0, 185, 244, 66, 104, 79, 165, 90, 34, 239, 137, 90, 239, 219, 154, 136, 203, 12, 36, 175, 40, 99, 127, 106, 123, 116, 142, 15, 203, 185, 123, 39, 197, 192, 121, 74, 244, 45, 156, 204, 47, 105, 58, 21, 252, 152, 18, 203, 244, 92, 147, 28, 243, 250, 16, 78, 80, 141, 81, 210, 194, 21, 162, 78, 146, 60, 128, 175, 129, 169, 73, 14, 146, 74, 142, 192, 236, 22, 170, 186, 232, 42, 198, 144, 0, 99, 156, 99, 179, 10, 119, 22, 136, 8, 141, 159, 250, 109, 11, 155, 221, 90, 109, 225, 75, 144, 168, 179, 190, 139, 95, 213, 35, 103, 145, 146, 200, 122, 234, 182, 102, 106, 60, 5, 85, 19, 254, 207, 90, 5, 79, 56, 189, 132, 125, 226, 193, 236, 157, 0, 251, 11, 38, 89, 43, 114, 235, 138, 111, 212, 6, 65, 98, 48, 121, 113, 28, 1, 100, 3, 2, 51, 131, 92, 254, 86, 24, 235, 56, 211, 123, 143, 170, 235, 145, 111, 148, 184, 148, 164, 125, 146, 100, 17, 255, 80, 1, 84, 19, 241, 23, 62, 16, 86, 213, 137, 233, 118, 188, 66, 43, 133, 125, 180, 156, 239, 127, 184, 137, 35, 145, 210, 250, 72, 88, 171, 249, 117, 172, 203, 124, 66, 131, 48, 46, 180, 138, 26, 229, 213, 57, 245, 54, 206, 171, 31, 217, 41, 75, 180, 218, 24, 99, 179, 19, 187, 63, 182, 78, 235, 244, 33, 47, 81, 97, 108, 34, 134, 75, 75, 167, 38, 101, 167, 52, 15, 97, 196, 238, 245, 85, 177, 61, 73, 35, 67, 12, 226, 228, 203, 122, 251, 221, 13, 76, 168, 4, 62, 79, 120, 139, 7, 36, 22, 23, 135, 135, 241, 166, 236, 118, 218, 4, 212, 149, 162, 100, 60, 83, 130, 76, 28, 112, 31, 64, 218, 225, 58, 86, 249, 221, 137, 55, 88, 199, 61, 243, 219, 205, 221, 154, 207, 109, 247, 171, 25, 46, 150, 110, 142, 19, 229, 29, 166, 179, 41, 36, 220, 127, 77, 104, 103, 175, 203, 255, 6, 47, 244, 209, 201, 212, 1, 209, 166, 171, 47, 224, 0, 95, 125, 73, 80, 87, 176, 187, 98, 8, 95, 65, 152, 0, 203, 15, 81, 122, 247, 6, 208, 141, 88, 180, 159, 102, 29, 82, 73, 198, 152, 167, 190, 178, 43, 61, 248, 39, 12, 6, 119, 122, 168, 82, 40, 175, 237, 61, 128, 8, 23, 4, 132, 64, 210, 9, 111, 45, 194, 242, 17, 202, 64, 120, 187, 228, 96, 151, 166, 225, 255, 108, 79, 58, 38, 235, 156, 59, 199, 245, 32, 181, 143, 26, 140, 196, 46, 56, 149, 209, 204, 210, 16, 74, 24, 119, 145, 231, 241, 41, 240, 124, 163, 49, 255, 57, 20, 97, 108, 121, 26, 195, 151, 54, 24, 83, 187, 199, 174, 195, 85, 239, 158, 213, 238, 211, 211, 29, 228, 237, 218, 51, 239, 253, 229, 179, 204, 184, 183, 149, 19, 124, 17, 116, 55, 48, 173, 108, 178, 195, 209, 67, 227, 221, 164, 174, 16, 253, 152, 190, 207, 92, 254, 142, 185, 240, 82, 241, 169, 208, 173, 222, 165, 225, 93, 219, 229, 205, 29, 71, 7, 17, 227, 5, 198, 67, 186, 143, 79, 64, 131, 66, 90, 151, 79, 179, 71, 107, 113, 249, 130, 58, 238, 7, 183, 71, 153, 104, 213, 117, 124, 75, 192, 150, 219, 32, 26, 187, 211, 46, 78, 175, 7, 171, 3, 143, 75, 4, 195, 18, 126, 175, 78, 13, 145, 198, 151, 255, 177, 175, 42, 28, 122, 30, 42, 213, 107, 85, 5, 84, 170, 13, 160, 123, 101, 60, 145, 121, 162, 161, 64, 249, 143, 119, 176, 12, 43, 221, 90, 188, 165, 170, 0, 34, 146, 80, 119, 50, 15, 166, 162, 11, 174, 180, 172, 145, 208, 197, 2, 55, 201, 27, 23, 214, 237, 107, 83, 185, 128, 35, 86, 137, 87, 58, 240, 240, 174, 170, 22, 188, 250, 188, 237, 167, 130, 29, 59, 211, 5, 144, 161, 41, 209, 76, 101, 85, 241, 152, 76, 93, 173, 205, 213, 101, 45, 40, 54, 9, 127, 10, 162, 98, 161, 193, 100, 65, 224, 92, 200, 31, 238, 165, 111, 228, 211, 82, 137, 207, 113, 24, 69, 42, 119, 41, 210, 128, 252, 204, 228, 18, 128, 140, 73, 231, 111, 15, 16, 71, 167, 180, 109, 254, 255, 15, 230, 76, 204, 44, 186, 20, 73, 107, 25, 103, 127, 148, 165, 217, 175, 169, 123, 24, 148, 222, 113, 178, 154, 162, 195, 28, 175, 81, 125, 53, 198, 46, 219, 214, 59, 230, 162, 138, 190, 187, 241, 247, 89, 81, 162, 251, 139, 148, 115, 195, 36, 1, 22, 126, 209, 69, 25, 164, 67, 130, 3, 151, 229, 91, 164, 251, 165, 158, 216, 79, 154, 249, 10, 121, 84, 23, 16, 246, 146, 208, 154, 49, 197, 102, 137, 70, 86, 179, 9, 198, 53, 23, 190, 140, 61, 31, 98, 169, 246, 218, 223, 11, 59, 5, 98, 7, 98, 170, 214, 71, 148, 24, 182, 252, 138, 145, 99, 187, 108, 120, 19, 220, 182, 128, 163, 124, 180, 154, 109, 203, 110, 2, 98, 115, 186, 38, 88, 180, 57, 181, 189, 180, 191, 218, 182, 132, 139, 254, 225, 42, 7, 91, 27, 127, 214, 83, 8, 230, 71, 132, 248, 75, 44, 182, 242, 189, 158, 208, 161, 74, 121, 230, 103, 24, 96, 186, 91, 50, 46, 138, 183, 128, 238, 12, 48, 36, 15, 83, 111, 253, 4, 24, 99, 22, 99, 66, 214, 214, 166, 161, 226, 213, 211, 201, 13, 34, 242, 157, 96, 203, 87, 53, 79, 222, 150, 154, 159, 188, 191, 42, 109, 234, 149, 234, 137, 84, 19, 36, 73, 220, 229, 130, 191, 95, 78, 193, 236, 12, 216, 200, 153, 159, 211, 139, 192, 82, 66, 159, 33, 195, 81, 68, 125, 178, 145, 101, 219, 255, 54, 99, 216, 173, 156, 9, 140, 73, 75, 25, 58, 146, 127, 122, 171, 164, 31, 141, 4, 20, 196, 115, 137, 53, 110, 74, 44, 10, 9, 73, 49, 200, 177, 110, 85, 135, 35, 60, 75, 249, 230, 4, 120, 50, 164, 75, 255, 167, 254, 93, 227, 170, 21, 164, 85, 67, 108, 74, 41, 152, 200, 103, 17, 115, 171, 142, 92, 117, 121, 200, 196, 198, 219, 130, 192, 76, 152, 185, 220, 155, 138, 159, 180, 2, 28, 158, 74, 214, 77, 240, 12, 37, 156, 90, 36, 132, 143, 52, 193, 133, 96, 184, 218, 180, 18, 43, 180, 116, 224, 233, 127, 54, 143, 240, 193, 115, 220, 231, 147, 210, 179, 20, 100, 179, 22, 146, 76, 227, 63, 49, 198, 17, 166, 4, 95, 148, 195, 200, 247, 209, 238, 120, 190, 255, 89, 226, 11, 22, 203, 223, 214, 193, 219, 65, 255, 213, 56, 6, 175, 172, 151, 165, 248, 222, 165, 135, 73, 31, 26, 170, 42, 51, 14, 148, 21, 63, 97, 31, 250, 73, 31, 119, 179, 169, 205, 239, 121, 71, 121, 90, 66, 184, 120, 141, 25, 245, 70, 108, 100, 254, 109, 127, 96, 118, 121, 164, 25, 143, 97, 199, 207, 30, 171, 46, 154, 239, 138, 102, 29, 3, 34, 13, 3, 39, 129, 203, 189, 49, 47, 247, 112, 110, 214, 210, 230, 247, 150, 100, 151, 78, 182, 196, 17, 184, 22, 143, 23, 181, 188, 50, 118, 180, 147, 114, 149, 112, 161, 10, 208, 53, 26, 120, 231, 160, 59, 104, 80, 37, 77, 85, 157, 225, 200, 61, 0, 248, 200, 204, 82, 69, 252, 104, 222, 68, 190, 204, 143, 182, 210, 10, 198, 8, 94, 129, 244, 54], + [71, 146, 77, 198, 235, 3, 120, 240, 147, 54, 21, 160, 182, 185, 28, 55, 241, 54, 75, 93, 119, 172, 178, 134, 121, 147, 78, 74, 142, 90, 212, 58, 250, 154, 117, 7, 107, 236, 102, 85, 231, 199, 159, 103, 178, 239, 66, 248, 120, 182, 149, 195, 159, 132, 151, 43, 148, 60, 65, 237, 212, 158, 189, 62, 138, 181, 23, 199, 57, 210, 213, 211, 181, 26, 187, 191, 153, 85, 1, 25, 60, 73, 36, 188, 139, 14, 56, 182, 14, 39, 164, 32, 104, 112, 41, 25, 96, 158, 192, 26, 45, 237, 223, 151, 109, 118, 25, 81, 32, 237, 241, 208, 174, 195, 171, 59, 124, 202, 141, 255, 153, 24, 228, 160, 228, 21, 40, 10, 218, 148, 181, 198, 106, 94, 237, 144, 59, 130, 58, 169, 11, 77, 59, 15, 34, 72, 160, 47, 87, 207, 84, 33, 135, 184, 9, 90, 33, 97, 252, 210, 21, 250, 22, 193, 255, 137, 154, 110, 196, 199, 55, 152, 47, 62, 237, 92, 149, 42, 218, 202, 230, 217, 12, 191, 139, 2, 19, 41, 182, 147, 57, 225, 88, 250, 31, 111, 42, 235, 165, 62, 95, 217, 60, 134, 251, 186, 175, 126, 149, 222, 208, 97, 98, 113, 19, 252, 182, 90, 236, 229, 208, 236, 78, 77, 255, 98, 73, 223, 0, 43, 251, 91, 19, 154, 124, 82, 54, 57, 152, 134, 110, 94, 77, 77, 210, 246, 124, 52, 68, 128, 153, 141, 32, 189, 177, 64, 20, 241, 178, 249, 62, 167, 223, 208, 49, 88, 21, 71, 193, 51, 114, 184, 135, 161, 55, 91, 48, 154, 73, 229, 96, 173, 93, 178, 145, 205, 10, 41, 16, 111, 104, 126, 198, 5, 74, 210, 211, 226, 11, 7, 51, 121, 217, 42, 27, 175, 56, 94, 254, 183, 45, 58, 159, 61, 15, 51, 159, 2, 151, 240, 243, 31, 204, 87, 115, 168, 182, 190, 83, 101, 28, 91, 138, 134, 175, 95, 24, 47, 141, 205, 14, 7, 0, 48, 30, 153, 186, 142, 76, 166, 178, 1, 3, 101, 16, 126, 217, 153, 244, 8, 214, 75, 133, 242, 202, 98, 90, 40, 173, 175, 80, 95, 117, 54, 141, 253, 118, 72, 209, 176, 150, 234, 45, 176, 25, 2, 65, 144, 97, 211, 141, 160, 219, 79, 82, 206, 84, 121, 58, 39, 64, 51, 13, 235, 199, 58, 57, 40, 164, 29, 107, 205, 108, 183, 220, 139, 173, 81, 5, 47, 133, 45, 165, 79, 118, 245, 233, 155, 135, 243, 174, 142, 85, 241, 82, 142, 252, 126, 103, 2, 48, 118, 6, 15, 241, 240, 200, 196, 95, 235, 7, 29, 1, 52, 89, 111, 60, 164, 202, 96, 75, 68, 175, 153, 47, 173, 90, 147, 185, 249, 231, 128, 150, 111, 39, 180, 203, 118, 82, 62, 181, 105, 136, 178, 155, 7, 167, 202, 22, 84, 19, 178, 244, 248, 13, 218, 207, 245, 57, 181, 107, 77, 163, 75, 61, 166, 135, 204, 12, 95, 205, 181, 245, 59, 38, 110, 193, 251, 4, 243, 35, 248, 128, 166, 213, 209, 249, 172, 224, 130, 117, 159, 60, 254, 129, 68, 168, 129, 149, 110, 242, 240, 171, 90, 41, 146, 223, 62, 210, 234, 139, 78, 37, 139, 177, 130, 131, 44, 123, 85, 8, 252, 60, 72, 70, 71, 58, 7, 153, 57, 141, 148, 228, 116, 119, 181, 169, 201, 17, 56, 79, 85, 84, 109, 105, 229, 142, 62, 84, 154, 117, 114, 72, 172, 53, 146, 131, 97, 211, 103, 61, 91, 75, 14, 88, 141, 60, 178, 119, 191, 156, 150, 57, 147, 112, 99, 11, 161, 19, 60, 220, 130, 253, 139, 123, 32, 249, 146, 22, 105, 50, 16, 150, 94, 60, 129, 61, 251, 70, 193, 126, 39, 67, 197, 47, 86, 180, 193, 241, 70, 156, 204, 152, 23, 130, 216, 126, 163, 180, 208, 247, 166, 137, 237, 13, 149, 95, 226, 151, 165, 112, 243, 48, 234, 167, 36, 137, 214, 174, 187, 6, 164, 138, 24, 43, 254, 38, 219, 104, 29, 120, 196, 250, 94, 97, 217, 234, 155, 48, 9, 116, 137, 205, 16, 229, 99, 1, 185, 240, 165, 34, 72, 57, 11, 199, 148, 100, 53, 124, 127, 231, 212, 42, 244, 138, 245, 194, 212, 86, 171, 88, 34, 42, 226, 74, 27, 56, 168, 184, 190, 7, 226, 91, 128, 176, 51, 203, 40, 146, 101, 183, 64, 91, 221, 160, 175, 70, 177, 85, 226, 131, 91, 131, 12, 25, 115, 233, 124, 38, 13, 148, 89, 130, 172, 19, 127, 119, 21, 116, 76, 114, 130, 135, 182, 42, 53, 200, 167, 149, 32, 109, 186, 128, 150, 151, 134, 228, 106, 173, 146, 166, 8, 103, 46, 172, 111, 72, 75, 50, 52, 249, 198, 242, 195, 119, 97, 36, 162, 209, 170, 78, 2, 242, 68, 181, 69, 112, 238, 159, 248, 27, 129, 175, 88, 219, 161, 162, 148, 104, 5, 157, 49, 40, 234, 30, 48, 253, 126, 178, 167, 162, 35, 93, 61, 77, 38, 17, 196, 114, 64, 237, 114, 153, 106, 115, 153, 28, 164, 92, 185, 58, 75, 149, 95, 151, 32, 19, 163, 169, 83, 112, 4, 191, 167, 179, 43, 26, 216, 245, 187, 227, 121, 56, 204, 37, 158, 198, 218, 23, 176, 145, 145, 49, 55, 87, 186, 44, 3, 248, 191, 207, 159, 238, 229, 18, 74, 7, 78, 43, 115, 192, 99, 150, 199, 81, 228, 181, 235, 66, 132, 36, 125, 130, 147, 145, 67, 221, 241, 210, 21, 149, 99, 9, 107, 46, 12, 91, 60, 160, 155, 232, 235, 173, 219, 102, 155, 236, 178, 128, 254, 95, 206, 42, 103, 4, 155, 218, 45, 33, 50, 182, 130, 185, 199, 31, 95, 81, 207, 64, 126, 41, 204, 43, 98, 15, 52, 139, 66, 21, 188, 138, 171, 179, 11, 108, 5, 76, 144, 161, 200, 73, 81, 178, 223, 255, 63, 170, 243, 216, 3, 255, 137, 215, 31, 105, 237, 199, 107, 83, 104, 244, 19, 155, 168, 144, 56, 137, 171, 180, 27, 75, 3, 48, 53, 181, 241, 29, 91, 245, 237, 123, 201, 133, 91, 45, 246, 210, 112, 213, 92, 138, 35, 212, 110, 167, 103, 218, 208, 41, 54, 182, 229, 37, 112, 247, 32, 143, 139, 5, 213, 52, 85, 74, 121, 173, 27, 150, 38, 131, 95, 162, 111, 104, 140, 211, 178, 235, 175, 118, 55, 157, 216, 29, 13, 234, 48, 181, 144, 44, 168, 217, 156, 206, 251, 155, 158, 219, 156, 91, 24, 215, 71, 164, 221, 89, 239, 131, 195, 41, 167, 196, 47, 171, 79, 78, 215, 56, 141, 208, 93, 164, 80, 139, 126, 95, 128, 145, 230, 28, 16, 69, 112, 95, 225, 104, 225, 128, 246, 124, 110, 54, 90, 212, 219, 113, 27, 37, 76, 64, 44, 222, 87, 228, 48, 2, 217, 128, 60, 123, 237, 72, 9, 235, 56, 247, 68, 210, 0, 241, 35, 251, 235, 10, 242, 48, 10, 175, 176, 159, 208, 231, 168, 47, 46, 62, 143, 106, 62, 203, 58, 176, 38, 68, 64, 92, 18, 183, 143, 119, 58, 115, 216, 235, 181, 156, 126, 126, 117, 73, 147, 162, 36, 120, 1, 186, 183, 74, 253, 226, 102, 190, 203, 88, 193, 238, 39, 59, 104, 205, 155, 223, 140, 8, 172, 245, 64, 175, 177, 117, 1, 105, 146, 29, 192, 194, 254, 143, 107, 235, 195, 184, 233, 103, 108, 211, 178, 149, 147, 22, 108, 125, 39, 177, 236, 54, 82, 225, 144, 215, 67, 43, 62, 213, 169, 52, 104, 40, 63, 248, 137, 83, 198, 163, 105, 66, 93, 38, 25, 78, 215, 2, 38, 93, 59, 194, 50, 186, 47, 70, 224, 23, 50, 190, 115, 55, 106, 168, 200, 129, 130, 207, 149, 192, 253, 204, 126, 184, 215, 112, 244, 64, 112, 29, 220, 34, 98, 37, 146, 103, 67, 83, 105, 170, 145, 206, 170, 105, 88, 225, 200, 212, 242, 207, 144, 146, 90, 108, 63, 148, 249, 89, 127, 81, 93, 247, 169, 254, 171, 209, 8, 21, 232, 215, 41, 96, 133, 245, 38, 83, 191, 141, 111, 64, 60, 56, 184, 166, 196, 164, 73, 117, 134, 206, 116, 21, 147, 181, 80, 191, 79, 185, 174, 61, 195, 121, 219, 246, 161, 218, 141, 113, 101, 82, 5, 32, 132, 48, 60, 93, 6, 133, 170, 161, 176, 18, 214, 182, 205, 128, 56, 147, 64, 142, 72, 71, 105, 196, 235, 108, 185, 147, 0, 173, 75, 130, 173, 210, 13, 158, 191, 22, 58, 249, 246, 147, 151, 128, 222, 126, 207, 164, 169, 22, 111, 74, 54, 35, 50, 55, 86, 158, 223, 100, 246, 96, 6, 127, 93, 142, 221, 20, 39, 44, 170, 69, 230, 137, 32, 104, 212, 138, 179, 214, 5, 111, 164, 5, 53, 114, 100, 51, 149, 249, 72, 55, 208, 29, 207, 243, 60, 251, 124, 151, 11, 116, 135, 207, 226, 160, 103, 81, 15, 86, 96, 72, 154, 125, 112, 255, 221, 181, 72, 137, 234, 200, 2, 198, 119, 248, 200, 48, 84, 251, 225, 237, 98, 104, 170, 195, 158, 106, 137, 21, 67, 183, 42, 201, 225, 119, 149, 212, 45, 206, 7, 158, 98, 174, 128, 198, 46, 4, 164, 10, 192, 105, 189, 125, 124, 168, 10, 110, 104, 20, 97, 60, 147, 245, 190, 157, 142, 145, 46, 244, 193, 47, 23, 52, 103, 10, 217, 133, 244, 221, 145, 26, 159, 59, 250, 8, 36, 150, 126, 204, 58, 33, 94, 49, 185, 168, 41, 237, 165, 234, 40, 31, 205, 169, 124, 63, 134, 236, 65, 64, 136, 213, 47, 122, 175, 83, 17, 133, 142, 45, 43, 129, 87, 106, 118, 197, 135, 102, 224, 132, 6, 125, 89, 106, 82, 131, 68, 45, 227, 62, 19, 130, 25, 130, 215, 87, 71, 169, 200, 166, 226, 168, 124, 0, 95, 67, 68, 85, 231, 84, 11, 101, 149, 224, 54, 153, 97, 154, 229, 91, 60, 80, 89, 193, 173, 33, 240, 132, 15, 193, 201, 92, 209, 48, 91, 67, 103, 149, 147, 40, 65, 115, 83, 73, 243, 99, 57, 140, 201, 151, 69, 68, 76, 217, 30, 250, 215, 145, 177, 13, 63, 178, 107, 216, 61, 90, 2, 161, 25, 54, 135, 252, 210, 229, 70, 176, 228, 82, 84, 181, 227, 184, 103, 243, 146, 190, 100, 130, 17, 96, 7, 151, 95, 201, 71, 3, 94, 132, 121, 46, 209, 5, 114, 251, 131, 151, 45, 126, 142, 126, 49, 42, 97, 85, 66, 200, 37, 238, 73, 2, 219, 174, 84, 75, 18, 126, 254, 102, 210, 99, 109, 150, 98, 63, 238, 184, 98, 124, 215, 81, 131, 166, 160, 112, 24, 104, 59, 55, 61, 124, 32, 35, 201, 252, 202, 253, 166, 170, 142, 56, 134, 82, 7, 199, 211, 148, 211, 25, 244, 74, 125, 76, 10, 109, 201, 140, 231, 41, 209, 15, 130, 43, 185, 189, 228, 106, 232, 237, 234, 22, 120, 251, 188, 20, 118, 96, 197, 204, 235, 128, 239, 31, 127, 3, 161, 246, 32, 14, 254, 204, 186, 123, 21, 141, 33, 83, 201, 149, 63, 242, 0, 146, 84, 125, 117, 179, 123, 169, 248, 63, 163, 208, 235, 41, 164, 13, 194, 49, 93, 158, 167, 64, 187, 211, 171, 158, 214, 56, 21, 61, 85, 19, 65, 231, 212, 211, 28, 4, 121, 41, 48, 166, 31, 133, 13, 156, 134, 120, 224, 242, 127, 56, 154, 165, 55, 254, 176, 206, 8, 200, 171, 193, 180, 149, 223, 60, 219, 118, 255, 251, 11, 81, 234, 149, 225, 91, 40, 161, 254, 178, 88, 150, 148, 7, 220, 87, 114, 176, 233, 242, 116, 40, 89, 241, 21, 89, 113, 106, 182, 234, 225, 162, 172, 84, 22, 136, 159, 48, 110, 173, 218, 123, 197, 241, 192, 196, 37, 175, 91, 30, 128, 56, 170, 96, 44, 14, 133, 52, 255, 175, 55, 60, 187, 78, 80, 204, 91, 230, 205, 81, 121, 2, 107, 29, 160, 127, 115, 86, 244, 223, 200, 97, 248, 236, 94, 153, 206, 255, 4, 38, 21, 158, 221, 15, 71, 137, 94, 31, 204, 209, 171, 68, 50, 252, 202, 18, 178, 155, 135, 244, 187, 85, 253, 240, 229, 4, 155, 236, 90, 42, 199, 119, 238, 198, 234, 190, 8, 12, 202, 79, 37, 117, 234, 198, 3, 33, 239, 167, 129, 133, 138, 16, 12, 195, 125, 195, 3, 72, 117, 236, 112, 73, 225, 166, 76, 142, 7, 217, 225, 141, 54, 114, 235, 230, 180, 236, 37, 195, 249, 160, 47, 152, 13, 243, 222, 124, 18, 208, 86, 23, 169, 113, 55, 243, 40, 41, 143, 168, 194, 124, 3, 3, 131, 131, 95, 81, 96, 33, 87, 135, 158, 87, 51, 34, 251, 224, 204, 61, 92, 118, 240, 251, 145, 182, 88, 163, 6, 57, 237, 253, 21, 239, 128, 206, 254, 104, 28, 56, 60, 107, 6, 159, 41, 151, 98, 155, 225, 134, 32, 111, 204, 21, 152, 108, 160, 252, 144, 122, 197, 154, 166, 26, 23, 180, 17, 10, 180, 87, 121, 179, 141, 231, 42, 70, 72, 81, 60, 56, 206, 124, 110, 91, 201, 60, 117, 31, 230, 130, 250, 168, 163, 188, 12, 84, 183, 14, 50, 125, 192, 133, 94, 183, 168, 210, 252, 239, 24, 113, 99, 41, 218, 14, 141, 40, 210, 120, 224, 95, 54, 218, 225, 15, 53, 60, 65, 248, 8, 166, 214, 129, 67, 10, 26, 215, 164, 27, 243, 1, 229, 119, 17, 125, 21, 141, 94, 161, 253, 41, 27, 206, 175, 5, 55, 127, 111, 198, 69, 184, 46, 21, 51, 142, 88, 110, 106, 196, 232, 25, 96, 160, 26, 104, 244, 252, 215, 48, 39, 17, 212, 163, 166, 234, 243, 240, 95, 3, 61, 122, 55, 80, 36, 98, 12, 96, 122, 162, 62, 168, 135, 225, 206, 208, 210, 178, 41, 251, 163, 81, 11, 231, 138, 174, 206, 192, 199, 43, 51, 113, 154, 75, 222, 188, 84, 5, 26, 22, 105, 163, 168, 53, 102, 142, 115, 111, 87, 90, 39, 165, 222, 101, 189, 81, 74, 17, 226, 172, 43, 219, 73, 54, 9, 214, 69, 166, 210, 54, 194, 111, 41, 143, 104, 168, 237, 34, 21, 21, 58, 157, 162, 227, 149, 151, 76, 76, 129, 202, 39, 42, 131, 242, 40, 101, 146, 27, 247, 90, 101, 134, 82, 167, 203, 199, 242, 253, 177, 5, 135, 48, 144, 224, 10, 127, 136, 33, 188, 14, 137, 136, 195, 141, 46, 243, 44, 183, 59, 184, 72, 91, 212, 175, 179, 108, 161, 147, 140, 2, 178, 191, 180, 152, 155, 27, 50, 12, 192, 154, 243, 124, 215, 147, 157, 38, 176, 87, 208, 206, 65, 40, 37, 41, 143, 214, 74, 3, 62, 132, 35, 131, 156, 161, 205, 39, 163, 45, 184, 19, 182, 80, 52, 131, 29, 124, 43, 23, 44, 168, 198, 101, 193, 207, 28, 23, 250, 100, 151, 2, 8, 228, 246, 112, 112, 26, 66, 26, 160, 201, 236, 12, 159, 177, 201, 161, 23, 196, 57, 212, 110, 88, 146, 179, 137, 80, 34, 128, 120, 187, 40, 221, 93, 41, 15, 104, 148, 155, 1, 84, 250, 88, 156, 129, 44, 45, 19, 32, 144, 136, 132, 209, 129, 228, 242, 65, 201, 175, 43, 155, 240, 119, 131, 48, 46, 5, 155, 112, 9, 87, 118, 81, 38, 90, 222, 221, 167, 85, 13, 39, 161, 144, 51, 167, 118, 7, 230, 95, 206, 123, 236, 94, 150, 182, 197, 63, 75, 221, 20, 197, 213, 242, 179, 196, 248, 211, 107, 68, 108, 21, 169, 235, 39, 96, 148, 112, 191, 110, 70, 209, 156, 126, 229, 222, 209, 52, 222, 213, 91, 0, 26, 149, 69, 228, 122, 126, 229, 216, 230, 145, 217, 174, 114, 34, 95, 111, 91, 10, 169, 208, 145, 129, 149, 112, 161, 240, 166, 168, 9, 115, 65, 45, 10, 123, 166, 39, 198, 136, 108, 67, 30, 59, 194, 178, 54, 163, 32, 242, 72, 78, 18, 136, 219, 29, 174, 142, 98, 9, 217, 233, 226, 8, 170, 229, 119, 200, 95, 155, 237, 126, 124, 224, 103, 163, 161, 191, 182, 208, 77, 108, 112, 245, 206, 83, 205, 224, 168, 81, 231, 77, 20, 149, 162, 26, 5, 140, 8, 254, 82, 104, 208, 243, 215, 249, 117, 99, 175, 77, 253, 119, 197, 151, 184, 152, 206, 8, 60, 99, 101, 201, 66, 111, 143, 132, 61, 213, 249, 115, 217, 130, 40, 118, 159, 62, 49, 14, 179, 224, 38, 249, 28, 53, 91, 49, 86, 166, 229, 49, 216, 246, 249, 169, 213, 195, 45, 118, 230, 232, 218, 25, 113, 188, 218, 88, 57, 71, 181, 186, 64, 39, 238, 176, 21, 139, 119, 222, 65, 54, 111, 174, 70, 109, 34, 87, 198, 216, 227, 206, 179, 10, 181, 115, 147, 206, 35, 163, 224, 158, 44, 250, 129, 252, 144, 113, 137, 189, 4, 221, 69, 85, 249, 27, 132, 98, 229, 80, 138, 176, 243, 86, 0, 211, 197, 78, 69, 119, 8, 202, 151, 208, 65, 219, 239, 223, 93, 211, 59, 132, 154, 213, 83, 209, 175, 114, 27, 21, 164, 155, 72, 248, 249, 176, 152, 223, 74, 251, 71, 62, 21, 249, 107, 41, 198, 186, 179, 242, 154, 142, 128, 57, 246, 153, 229, 225, 124, 180, 140, 188, 145, 211, 135, 239, 152, 113, 66, 172, 110, 50, 24, 168, 119, 159, 88, 32, 192, 31, 172, 241, 104, 99, 131, 130, 135, 109, 123, 2, 8, 2, 123, 163, 32, 241, 140, 187, 251, 189, 38, 111, 220, 140, 179, 114, 180, 138, 2, 208, 191, 42, 4, 137, 203, 25, 119, 30, 235, 209, 49, 42, 230, 50, 0, 180, 138, 162, 59, 11, 235, 57, 164, 38, 42, 7, 232, 100, 178, 213, 85, 216, 194, 14, 105, 139, 20, 135, 245, 117, 181, 251, 223, 75, 66, 215, 135, 170, 113, 112, 153, 155, 149, 25, 197, 38, 151, 204, 188, 65, 198, 252, 237, 218, 93, 108, 129, 66, 180, 36, 159, 185, 88, 32, 180, 65, 117, 219, 23, 244, 241, 168, 14, 76, 31, 95, 31, 93, 85, 104, 46, 32, 86, 28, 26, 205, 108, 97, 153, 240, 104, 92, 62, 208, 240, 217, 128, 175, 108, 62, 59, 228, 233, 40, 75, 236, 237, 119, 73, 144, 253, 243, 99, 194, 142, 227, 14, 189, 74, 202, 134, 53, 157, 79, 2, 204, 136, 166, 14, 94, 101, 98, 182, 153, 134, 74, 218, 29, 217, 163, 111, 188, 68, 213, 32, 34, 246, 175, 91, 51, 211, 83, 59, 36, 56, 26, 34, 157, 24, 178, 243, 250, 38, 151, 144, 163, 24, 41, 23, 201, 120, 183, 39, 145, 156, 96, 24, 81, 88, 167, 213, 29, 97, 6, 45, 205, 153, 29, 49, 210, 247, 103, 74, 73, 56, 24, 176, 219, 218, 201, 71, 66, 77, 238, 90, 218, 98, 236, 114, 79, 95, 49, 84, 123, 138, 81, 116, 75, 242, 51, 233, 190, 48, 207, 26, 213, 200, 117, 53, 249, 85, 34, 4, 117, 33, 88, 0, 38, 214, 162, 156, 76, 115, 83, 141, 163, 67, 86, 76, 132, 175, 13, 250, 221, 190, 244, 235, 117, 71, 151, 73, 55, 217, 80, 117, 201, 201, 194, 181, 21, 114, 211, 199, 234, 63, 7, 107, 214, 121, 189, 215, 170, 14, 241, 203, 211, 42, 52, 150, 92, 162, 73, 207, 112, 254, 178, 195, 157, 88, 184, 59, 62, 26, 40, 218, 85, 189, 51, 106, 202, 172, 233, 219, 124, 172, 228, 94, 106, 138, 45, 130, 137, 171, 64, 116, 236, 211, 48, 108, 111, 5, 139, 115, 88, 2, 244, 20, 32, 216, 73, 27, 197, 38, 134, 178, 211, 127, 169, 189, 73, 184, 165, 214, 106, 55, 174, 54, 19, 80, 209, 178, 78, 10, 0, 56, 110, 158, 43, 126, 1, 22, 99, 191, 230, 137, 179, 59, 175, 237, 49, 202, 145, 76, 51, 175, 103, 39, 196, 0, 177, 26, 12, 106, 107, 22, 13, 170, 59, 40, 176, 146, 81, 131, 210, 106, 112, 100, 144, 180, 138, 180, 214, 106, 69, 91, 75, 69, 218, 255, 95, 224, 76, 111, 244, 62, 6, 133, 66, 91, 204, 196, 108, 68, 157, 134, 41, 62, 252, 208, 192, 122, 175, 105, 232, 45, 22, 168, 243, 115, 172, 45, 207, 198, 92, 72, 168, 176, 235, 232, 51, 89, 178, 31, 224, 6, 94, 237, 85, 23, 244, 241, 185, 51, 112, 133, 186, 124, 196, 31, 209, 95, 16, 50, 105, 19, 7, 76, 211, 140, 93, 6, 207, 41, 7, 208, 116, 139, 11, 148, 122, 199, 186, 163, 145, 203, 30, 145, 17, 127, 237, 51, 187, 151, 254, 156, 233, 133, 172, 231, 88, 163, 10, 105, 54, 89, 186, 157, 34, 235, 85, 213, 193, 137, 120, 212, 103, 73, 208, 128, 153, 78, 127, 159, 187, 117, 85, 42, 67, 184, 226, 169, 61, 96, 40, 56, 253, 91, 78, 226, 234, 216, 115, 236, 120, 10, 59, 45, 197, 225, 146, 242, 164, 119, 23, 61, 134, 82, 120, 48, 86, 231, 236, 132, 221, 173, 16, 198, 16, 114, 95, 131, 25, 64, 86, 58, 140, 243, 207, 184, 190, 105, 97, 81, 58, 170, 237, 173, 195, 184, 31, 244, 121, 158, 231, 234, 8, 253, 136, 139, 6, 10, 251, 42, 115, 158, 154, 106, 68, 165, 195, 48, 40, 207, 128, 173, 179, 99, 103, 46, 33, 234, 63, 5, 83, 13, 221, 76, 194, 168, 247, 49, 251, 90, 11, 53, 74, 20, 182, 238, 1, 239, 195, 200, 24, 243, 239, 82, 81, 110, 221, 241, 37, 162, 102, 93, 142, 160, 143, 249, 6, 173, 122, 179, 217, 188, 156, 128, 144, 167, 93, 158, 40, 148, 229, 208, 22, 177, 53, 194, 81, 159, 188, 112, 106, 58, 228, 206, 214, 30, 151, 42, 153, 165, 55, 248, 106, 154, 210, 204, 130, 75, 58, 19, 230, 228, 177, 197, 91, 34, 62, 26, 165, 192, 111, 162, 143, 158, 128, 12, 66, 39, 186, 14, 78, 79, 149, 217, 51, 169, 153, 230, 73, 211, 219, 140, 185, 91, 218, 236, 253, 9, 129, 154, 11, 102, 141, 243, 116, 201, 35, 152, 122, 250, 173, 250, 224, 182, 201, 100, 154, 74, 213, 153, 118, 113, 138, 131, 146, 170, 114, 248, 36, 79, 166, 211, 29, 94, 28, 33, 55, 120, 20, 82, 150, 109, 108, 66, 160, 126, 206, 150, 23, 149, 88, 123, 211, 229, 16, 235, 208, 18, 63, 150, 128, 135, 41, 47, 226, 204, 79, 204, 13, 171, 245, 44, 21, 224, 199, 225, 230, 155, 171, 127, 40, 6, 68, 204, 251, 55, 145, 244, 14, 202, 61, 117, 125, 112, 187, 238, 89, 92, 135, 63, 90, 173, 202, 16, 224, 179, 8, 104, 21, 15, 129, 153, 243, 49, 228, 145, 142, 153, 68, 102, 165, 171, 66, 133, 228, 40, 248, 90, 253, 33, 65, 190, 193, 252, 82, 193, 112, 2, 91, 254, 237, 151, 70, 25, 133, 72, 195, 223, 197, 175, 44, 5, 150, 132, 235, 194, 145, 155, 190, 127, 173, 129, 32, 119, 0, 235, 128, 209, 118, 4, 252, 26, 169, 62, 29, 37, 131, 12, 236, 88, 27, 14, 112, 237, 222, 248, 171, 32, 1, 124, 125, 179, 53, 138, 16, 157, 71, 185, 5, 114, 81, 57, 248, 115, 174, 7, 78, 204, 68, 117, 127, 144, 199, 117, 1, 26, 200, 238, 214, 51, 41, 30, 75, 218, 140, 45, 68, 115, 95, 161, 42, 217, 51, 105, 151, 70, 203, 166, 171, 213, 164, 123, 254, 128, 203, 221, 11, 64, 90, 112, 94, 101, 133, 209, 58, 25, 155, 236, 220, 215, 202, 147, 244, 209, 182, 117, 204, 1, 22, 212, 125, 239, 150, 84, 248, 25, 175, 237, 163, 184, 149, 4, 198, 119, 95, 110, 166, 161, 170, 156, 56, 71, 205, 133, 176, 19, 229, 132, 84, 115, 164, 137, 24, 145, 187, 23, 231, 202, 187, 56, 143, 183, 92, 73, 20, 88, 1, 134, 251, 70, 24, 16, 208, 130, 193, 221, 213, 52, 48, 91, 244, 195, 92, 160, 122, 87, 222, 21, 178, 213, 107, 125, 76, 47, 218, 171, 14, 52, 112, 73, 226, 192, 56, 155, 139, 165, 166, 18, 16, 63, 154, 244, 123, 222, 199, 203, 136, 13, 23, 210, 158, 130, 69, 225, 193, 243, 214, 196, 45, 8, 69, 125, 72, 109, 239, 173, 128, 130, 173, 5, 24, 87, 5, 199, 42, 230, 7, 241, 119, 55, 178, 225, 0, 116, 193, 76, 30, 4, 198, 39, 56, 185, 185, 162, 201, 77, 45, 227, 17, 246, 158, 244, 181, 241, 34, 182, 154, 87, 3, 197, 248, 23, 192, 17, 207, 197, 79, 251, 27, 209, 213, 30, 70, 245, 72, 252, 45, 7, 53, 148, 56, 230, 4, 126, 64, 235, 153, 154, 50, 240, 131, 118, 215, 90, 160, 235, 92, 223, 80, 200, 11, 108, 81, 186, 240, 141, 117, 100, 135, 221, 186, 32, 252, 210, 169, 255, 226, 75, 101, 31, 224, 110, 224, 54, 160, 10, 61, 129, 249, 56, 213, 43, 12, 190, 114, 209, 243, 247, 52, 159, 164, 174, 209, 81, 74, 42, 183, 50, 37, 70, 70, 3, 245, 182, 201, 233, 84, 248, 193, 46, 175, 15, 171, 109, 218, 91, 31, 193, 192, 12, 56, 58, 9, 8, 19, 151, 178, 231, 172, 48, 94, 70, 201, 218, 229, 101, 223, 59, 28, 171, 247, 105, 112, 220, 79, 223, 30, 46, 219, 99, 193, 250, 72, 205, 116, 59, 161, 229, 102, 113, 144, 45, 75, 244, 228, 170, 167, 73, 232, 203, 173, 165, 128, 239, 23, 209, 205, 53, 56, 201, 108, 216, 31, 68, 209, 58, 244, 6, 150, 185, 153, 35, 75, 77, 16, 243, 222, 210, 84, 76, 29, 61, 203, 61, 73, 247, 219, 93, 48, 248, 230, 58, 210, 212, 145, 82, 27, 83, 17, 88, 127, 61, 149, 71, 69, 222, 224, 63, 246, 197, 206, 25, 164, 23, 130, 200, 213, 153, 123, 31, 122, 124, 245, 138, 143, 130, 200, 86, 220, 211, 141, 223, 244, 54, 176, 78, 149, 133, 117, 98, 137, 185, 242, 189, 184, 237, 224, 184, 148, 191, 31, 179, 248, 183, 205, 6, 130, 4, 37, 248, 16, 111, 7, 228, 34, 1, 14, 254, 111, 32, 225, 251, 70, 86, 176, 67, 206, 65, 9, 228, 224, 1, 12, 45, 107, 197, 14, 78, 173, 231, 249, 195, 28, 188, 212, 67, 228, 152, 252, 218, 240, 147, 10, 34, 60, 62, 253, 254, 224, 178, 242, 234, 241, 35, 38, 245, 44, 113, 111, 165, 226, 33, 122, 23, 153, 253, 230, 99, 79, 5, 14, 13, 138, 75, 133, 229, 42, 78, 193, 90, 158, 81, 86, 221, 145, 186, 120, 203, 74, 135, 162, 144, 29, 30, 90, 230, 30, 255, 64, 164, 163, 168, 85, 1, 99, 13, 208, 61, 174, 250, 26, 39, 239, 134, 125, 10, 179, 152, 205, 148, 174, 42, 205, 241, 158, 149, 166, 181, 74, 182, 246, 130, 8, 40, 197, 190, 190, 9, 147, 8, 23, 121, 190, 191, 203, 216, 12, 17, 188, 10, 14, 93, 76, 122, 125, 208, 207, 19, 145, 236, 56, 184, 187, 220, 105, 172, 133, 232, 249, 162, 127, 124, 69, 89, 86, 107, 93, 251, 108, 10, 202, 113, 110, 118, 74, 56, 114, 188, 189, 187, 147, 56, 184, 12, 75, 125, 171, 56, 18, 253, 119, 33, 32, 186, 48, 152, 228, 207, 100, 33, 247, 226, 20, 255, 96, 165, 205, 199, 198, 127, 171, 123, 44, 145, 156, 195, 197, 182, 254, 186, 183, 19, 93, 81, 123, 17, 14, 214, 130, 32, 197, 131, 212, 38, 156, 80, 83, 174, 78, 249, 252, 238, 142, 79, 119, 72, 152, 50, 16, 73, 60, 136, 55, 94, 112, 198, 68, 12, 188, 203, 66, 168, 89, 76, 198, 210, 18, 242, 163, 79, 250, 232, 227, 137, 35, 146, 240, 63, 124, 119, 199, 219, 119, 143, 92, 1, 53, 5, 118, 200, 176, 127, 179, 74, 30, 58, 177, 226, 111, 84, 23, 186, 35, 83, 247, 67, 251, 76, 231, 167, 81, 109, 163, 42, 241, 77, 88, 225, 135, 233, 251, 226, 253, 28, 242, 105, 227, 8, 143, 140, 207, 65, 164, 211, 152, 32, 250, 173, 133, 1, 79, 43, 58, 169, 41, 103, 15, 50, 73, 9, 8, 192, 244, 138, 109, 184, 210, 102, 166, 190, 225, 15, 19, 117, 14, 223, 114, 59, 90, 19, 88, 241, 73, 133, 74, 242, 204, 4, 162, 0, 93, 243, 176, 67, 82, 71, 85, 7, 161, 53, 5, 37, 117, 78, 158, 220, 201, 155, 5, 185, 67, 226, 124, 197, 84, 97, 80, 65, 48, 74, 185, 20, 107, 116, 7, 150, 160, 226, 245, 203, 171, 220, 95, 142, 202, 172, 169, 18, 86, 182, 207, 150, 19, 12, 26, 208, 162, 171, 150, 78, 54, 107, 107, 140, 104, 113, 75, 111, 147, 148, 119, 243, 145, 166, 75, 252, 134, 129, 147, 156, 18, 174, 120, 151, 4, 154, 99, 107, 206, 251, 94, 40, 109, 186, 191, 132, 49, 209, 202, 12, 226, 156, 158, 228, 30, 171, 56, 164, 153, 176, 56, 32, 142, 53, 177, 154, 90, 73, 159, 195, 39, 8, 148, 114, 108, 245, 65, 252, 113, 166, 99, 187, 93, 37, 248, 106, 40, 219, 254, 183, 155, 82, 203, 82, 54, 61, 121, 99, 82, 185, 104, 230, 122, 127, 77, 90, 59, 141, 22, 145, 120, 182, 1, 28, 39, 49, 69, 165, 191, 147, 242, 43, 81, 97, 71, 21, 78, 90, 17, 213, 244, 80, 162, 34, 238, 139, 191, 36, 143, 198, 112, 231, 187, 231, 131, 137, 239, 166, 28, 64, 238, 156, 236, 3, 3, 116, 51, 236, 101, 228, 116, 40, 81, 52, 61, 238, 202, 142, 45, 85, 224, 229, 31, 249, 169, 101, 246, 167, 73, 180, 54, 41, 173, 160, 76, 47, 121, 60, 112, 192, 228, 189, 245, 172, 82, 90, 89, 210, 59, 214, 219, 144, 147, 224, 156, 201, 34, 51, 85, 42, 126, 174, 134, 45, 92, 133, 230, 87, 113, 136, 25, 206, 83, 224, 167, 56, 98, 170, 13, 113, 140, 39, 6, 212, 27, 82, 173, 160, 112, 148, 239, 137, 122, 74, 124, 230, 204, 155, 2, 49, 216, 54, 53, 224, 147, 140, 32, 143, 165, 212, 237, 91, 79, 213, 126, 218, 9, 90, 149, 34, 190, 226, 207, 86, 234, 190, 137, 237, 14, 69, 100, 169, 22, 23, 71, 91, 155, 28, 131, 225, 70, 219, 209, 116, 147, 2, 84, 241, 196, 154, 207, 46, 104, 25, 214, 157, 177, 147, 241, 96, 254, 214, 89, 19, 252, 200, 20, 73, 97, 241, 28, 113, 163, 211, 108, 32, 25, 114, 152, 77, 113, 56, 13, 246, 191, 35, 234, 48, 221, 102, 63, 133, 143, 60, 120, 249, 124, 37, 52, 180, 207, 134, 31, 202, 176, 212, 181, 210, 29, 58, 117, 54, 121, 8, 10, 211, 152, 138, 38, 245, 242, 123, 139, 160, 206, 161, 67, 35, 185, 186, 89, 29, 214, 137, 244, 150, 141, 13, 40, 101, 12, 47, 155, 168, 237, 155, 78, 23, 199, 53, 33, 101, 71, 92, 136, 177, 161, 161, 52, 104, 249, 189, 249, 132, 107, 21, 162, 19, 236, 33, 148, 118, 111, 168, 89, 126, 244, 220, 58, 82, 108, 242, 148, 188, 207, 25, 230, 206, 249, 151, 162, 185, 186, 192, 196, 209, 33, 23, 173, 146, 169, 205, 11, 69, 134, 179, 153, 178, 236, 206, 10, 133, 66, 133, 38, 9, 91, 58, 110, 114, 186, 65, 188, 136, 181, 140, 244, 139, 105, 215, 162, 89, 37, 90, 112, 78, 135, 197, 191, 202, 250, 214, 78, 110, 44, 134, 104, 4, 109, 82, 16, 120, 205, 60, 243, 72, 238, 191, 26, 163, 217, 40, 173, 100, 30, 5, 63, 230, 91, 156, 246, 187, 22, 44, 165, 201, 49, 48, 141, 41, 24, 199, 81, 232, 145, 245, 148, 79, 87, 240, 226, 87, 62, 49, 243, 161, 66, 111, 93, 105, 244, 60, 133, 107, 49, 249, 198, 237, 199, 190, 107, 55, 182, 155, 248, 170, 9, 35, 183, 95, 52, 229, 155, 179, 159, 195, 13, 138, 30, 91, 22, 181, 144, 215, 39, 151, 198, 76, 202, 236, 205, 37, 117, 85, 139, 185, 212, 185, 121, 66, 204, 249, 60, 119, 136, 12, 93, 195, 88, 16, 45, 34, 152, 206, 199, 254, 203, 163, 143, 226, 77, 48, 252, 53, 63, 102, 110, 103, 241, 10, 111, 46, 37, 146, 74, 207, 0, 59, 108, 12, 56, 92, 182, 107, 60, 222, 215, 171, 221, 151, 255, 73, 12, 45, 84, 142, 194, 26, 255, 83, 22, 93, 208, 190, 39, 127, 0, 48, 126, 36, 159, 205, 152, 49, 152, 68, 58, 209, 127, 222, 63, 177, 186, 45, 116, 200, 23, 128, 220, 62, 110, 168, 47, 229, 52, 220, 122, 21, 52, 255, 64, 98, 131, 55, 122, 87, 8, 32, 60, 123, 32, 92, 114, 249, 221, 141, 184, 0, 92, 133, 244, 26, 127, 175, 52, 44, 227, 35, 5, 91, 225, 156, 201, 52, 157, 28, 131, 252, 226, 80, 57, 198, 175, 244, 54, 104, 163, 174, 176, 99, 231, 226, 63, 89, 31, 219, 58, 25, 167, 56, 208, 96, 247, 224, 128, 33, 195, 191, 255, 83, 60, 182, 35, 56, 157, 172, 124, 199, 221, 78, 95, 158, 15, 47, 210, 140, 186, 72, 135, 224, 234, 168, 185, 172, 12, 149, 123, 231, 46, 215, 103, 117, 101, 245, 152, 37, 1, 147, 215, 29, 140, 161, 148, 79, 115, 224, 250, 17, 214, 126, 165, 64, 9, 62, 37, 154, 197, 182, 184, 214, 244, 147, 59, 214, 198, 204, 72, 14, 88, 4, 95, 69, 161, 68, 70, 13, 89, 145, 69, 168, 235, 155, 71, 21, 26, 49, 10, 176, 23, 12, 137, 197, 150, 234, 228, 147, 104, 13, 188, 47, 150, 187, 195, 83, 40, 78, 110, 152, 241, 189, 17, 210, 112, 73, 114, 231, 25, 69, 179, 146, 12, 90, 179, 93, 88, 44, 105, 254, 13, 11, 116, 238, 56, 108, 94, 116, 91, 251, 50, 207, 200, 25, 125, 43, 253, 171, 163, 233, 35, 178, 71, 228, 80, 154, 150, 75, 51, 220, 255, 143, 230, 132, 81, 242, 34, 41, 189, 110, 80, 203, 186, 235, 176, 137, 227, 222, 4, 153, 127, 97, 242, 44, 230, 221, 8, 173, 133, 37, 84, 160, 31, 246, 35, 17, 214, 169, 133, 228, 93, 228, 139, 190, 171, 160, 61, 249, 37, 172, 79, 109, 9, 98, 30, 224, 41, 44, 69, 228, 146, 123, 28, 173, 16, 141, 194, 96, 177, 238, 61, 242, 204, 97, 13, 4, 247, 235, 238, 48, 217, 72, 49, 71, 125, 107, 159, 39, 227, 143, 220, 248, 56, 170, 148, 63, 63, 213, 158, 150, 206, 147, 132, 207, 75, 95, 139, 76, 171, 4, 191, 173, 249, 220, 0, 58, 253, 128, 25, 172, 155, 90, 13, 178, 190, 66, 87, 251, 189, 56, 38, 140, 17, 174, 7, 172, 255, 27, 119, 80, 133, 22, 169, 66, 13, 126, 49, 227, 201, 91, 135, 109, 245, 205, 199, 208, 136, 36, 27, 211, 148, 108, 47, 241, 58, 40, 195, 63, 74, 67, 44, 245, 182, 21, 45, 224, 188, 115, 80, 230, 234, 202, 58, 167, 248, 162, 205, 221, 29, 108, 30, 46, 38, 57, 118, 213, 47, 87, 253, 50, 252, 194, 104, 71, 21, 33, 244, 0, 248, 39, 85, 11, 106, 176, 106, 74, 71, 70, 148, 229, 105, 84, 63, 147, 169, 46, 20, 60, 97, 209, 52, 181, 247, 48, 155, 85, 227, 158, 76, 84, 67, 112, 2, 127, 83, 157, 206, 142, 63, 125, 128, 36, 11, 45, 133, 67, 223, 134, 33, 28, 41, 71, 133, 221, 66, 54, 8, 86, 52, 113, 41, 155, 57, 250, 24, 64, 227, 8, 26, 173, 90, 39, 237, 210, 160, 73, 47, 166, 226, 54, 147, 29, 138, 45, 131, 252, 67, 162, 189, 190, 85, 127, 204, 197, 222, 186, 6, 100, 126, 167, 162, 129, 202, 167, 243, 241, 53, 244, 140, 31, 84, 196, 42, 215, 75, 60, 253, 125, 63, 87, 179, 144, 220, 244, 3, 192, 0, 136, 62, 38, 174, 185, 51, 92, 104, 45, 246, 253, 161, 2, 84, 98, 230, 159, 216, 153, 206, 123, 254, 99, 50, 137, 212, 157, 231, 229, 77, 174, 178, 13, 65, 86, 59, 135, 168, 109, 193, 177, 161, 160, 229, 118, 94, 177, 180, 254, 22, 237, 66, 42, 198, 196, 7, 129, 87, 53, 144, 76, 149, 97, 183, 76, 245, 191, 150, 127, 71, 137, 186, 229, 3, 214, 64, 146, 26, 161, 11, 137, 199, 28, 30, 236, 66, 116, 179, 48, 165, 206, 99, 114, 18, 115, 88, 57, 209, 94, 216, 49, 206, 86, 16, 58, 113, 97, 69, 214, 237, 40, 108, 247, 138, 142, 128, 162, 57, 200, 149, 186, 83, 148, 180, 133, 106, 70, 210, 146, 29, 191, 133, 130, 223, 168, 111, 203, 254, 187, 142, 161, 201, 50, 82, 110, 54, 200, 118, 45, 86, 192, 107, 33, 117, 177, 67, 124, 132, 221, 3, 229, 9, 145, 184, 55, 59, 186, 110, 151, 1, 107, 178, 219, 142, 244, 241, 149, 20, 231, 192, 117, 54, 102, 60, 223, 231, 31, 41, 56, 11, 72, 160, 115, 52, 212, 26, 101, 206, 135, 92, 50, 237, 163, 241, 242, 46, 163, 70, 116, 75, 69, 225, 25, 120, 213, 9, 159, 40, 123, 57, 186, 115, 177, 58, 197, 153, 163, 131, 244, 115, 219, 114, 91, 32, 59, 171, 100, 40, 29, 9, 93, 57, 248, 5, 56, 99, 187, 119, 7, 20, 173, 40, 203, 13, 208, 29, 229, 21, 134, 47, 109, 207, 5, 158, 170, 45, 53, 156, 164, 106, 61, 143, 54, 182, 174, 154, 187, 93, 170, 53, 225, 157, 182, 220, 58, 216, 235, 94, 28, 105, 170, 82, 73, 57, 139, 39, 27, 75, 112, 223, 252, 222, 180, 123, 28, 77, 178, 4, 194, 11, 239, 207, 47, 144, 249, 156, 49, 225, 7, 223, 42, 62, 70, 251, 64, 43, 199, 164, 148, 230, 81, 129, 115, 67, 178, 16, 239, 164, 4, 122, 65, 89, 151, 18, 56, 29, 94, 185, 161, 145, 116, 105, 83, 50, 153, 73, 144, 26, 189, 200, 46, 176, 141, 202, 239, 185, 3, 239, 100, 93, 12, 64, 82, 78, 33, 185, 153, 76, 151, 1, 55, 155, 187, 178, 156, 36, 198, 71, 183, 150, 210, 36, 150, 14, 80, 40, 205, 204, 119, 222, 209, 217, 114, 192, 131, 215, 154, 27, 98, 138, 135, 175, 161, 111, 57, 176, 100, 49, 122, 179, 166, 202, 212, 54, 143, 79, 136, 41, 120, 110, 69, 33, 110, 175, 36, 45, 40, 188, 78, 217, 46, 163, 135, 3, 187, 202, 14, 93, 180, 232, 84, 151, 215, 77, 144, 217, 156, 235, 154, 92, 34, 86, 220, 129, 117, 186, 0, 98, 132, 18, 235, 241, 219, 39, 153, 224, 131, 224, 62, 114, 137, 114, 124, 61, 221, 160, 215, 163, 168, 132, 241, 72, 5, 44, 189, 54, 92, 183, 250, 140, 89, 94, 64, 68, 108, 12, 148, 238, 173, 246, 37, 155, 60, 94, 206, 38, 149, 118, 155, 209, 68, 114, 131, 82, 50, 161, 86, 117, 137, 135, 198, 30, 104, 122, 104, 32, 5, 233, 33, 211, 254, 239, 103, 231, 90, 220, 106, 165, 126, 255, 155, 197, 67, 228, 76, 76, 29, 224, 91, 183, 103, 126, 117, 49, 12, 164, 36, 115, 31, 103, 158, 25, 46, 195, 149, 213, 42, 44, 11, 44, 46, 132, 103, 21, 141, 23, 159, 74, 99, 55, 142, 137, 83, 96, 22, 80, 148, 73, 53, 168, 50, 165, 194, 53, 41, 11, 227, 9, 118, 130, 84, 130, 19, 71, 40, 199, 238, 233, 241, 93, 7, 249, 131, 80, 198, 103, 220, 21, 182, 175, 182, 141, 13, 168, 166, 162, 19, 8, 83, 44, 46, 162, 233, 108, 2, 112, 64, 162, 237, 138, 174, 149, 229, 8, 154, 9, 128, 131, 229, 108, 9, 66, 161, 124, 141, 172, 172, 134, 219, 81, 220, 19, 203, 252, 128, 188, 191, 179, 222, 48, 135, 189, 118, 131, 171, 141, 15, 100, 87, 161, 181, 178, 86, 234, 236, 72, 131, 191, 127, 234, 10, 18, 150, 142, 146, 43, 89, 71, 9, 156, 129, 184, 90, 2, 73, 71, 91, 252, 213, 240, 191, 206, 206, 184, 68, 5, 182, 241, 239, 231, 204, 29, 179, 6, 70, 4, 90, 66, 113, 237, 80, 83, 234, 88, 218, 137, 9, 146, 32, 180, 122, 160, 249, 42, 242, 12, 53, 162, 238, 53, 55, 149, 74, 79, 190, 225, 131, 59, 29, 208, 3, 124, 35, 72, 137, 139, 39, 252, 5, 187, 116, 231, 229, 39, 88, 76, 152, 236, 211, 111, 168, 240, 32, 58, 59, 65, 88, 188, 32, 114, 31, 182, 9, 36, 246, 178, 255, 110, 50, 124, 77, 72, 125, 5, 181, 24, 143, 133, 48, 5, 112, 176, 50, 59, 47, 22, 159, 235, 35, 103, 151, 30, 169, 83, 1, 169, 231, 22, 11, 60, 75, 139, 70, 191, 149, 48, 82, 139, 141, 7, 100, 227, 180, 158, 52, 86, 133, 145, 28, 244, 69, 147, 112, 145, 229, 146, 98, 89, 135, 230, 45, 122, 219, 215, 25, 217, 52, 144, 211, 134, 139, 220, 180, 73, 31, 40, 78, 111, 155, 180, 113, 72, 37, 91, 177, 252, 14, 85, 174, 152, 209, 240, 168, 217, 250, 202, 243, 252, 67, 116, 97, 68, 73, 156, 139, 49, 206, 117, 253, 60, 50, 39, 71, 5, 146, 14, 141, 134, 6, 228, 199, 195, 186, 149, 106, 201, 251, 86, 110, 142, 235, 253, 60, 40, 174, 205, 183, 91, 246, 149, 212, 187, 14, 231, 207, 171, 118, 241, 171, 240, 103, 199, 232, 71, 174, 144, 1, 81, 181, 98, 52, 206, 225, 137, 101, 249, 13, 70, 204, 199, 1, 183, 137, 67, 11, 54, 191, 168, 200, 239, 55, 54, 255, 232, 25, 1, 148, 245, 109, 75, 19, 239, 191, 115, 215, 24, 139, 80, 140, 189, 89, 150, 58, 92, 238, 200, 140, 219, 182, 193, 12, 174, 93, 253, 213, 65, 55, 218, 29, 250, 118, 81, 11, 91, 41, 148, 126, 226, 225, 171, 188, 222, 35, 172, 31, 229, 114, 202, 173, 148, 16, 161, 104, 105, 139, 105, 112, 213, 42, 137, 177, 99, 221, 148, 3, 81, 238, 203, 172, 247, 118, 22, 234, 101, 112, 166, 247, 148, 91, 247, 179, 223, 38, 191, 31, 194, 225, 132, 115, 21, 61, 162, 169, 2, 246, 111, 0, 177, 104, 106, 36, 121, 104, 89, 118, 183, 1, 11, 234, 47, 152, 4, 45, 177, 22, 214, 42, 70, 101, 206, 225, 126, 10, 254, 163, 143, 62, 37, 232, 125, 133, 90, 137, 126, 84, 241, 218, 243, 242, 36, 74, 28, 194, 179, 246, 190, 161, 227, 103, 230, 191, 23, 42, 15, 208, 211, 15, 202, 150, 79, 215, 164, 87, 58, 232, 49, 236, 41, 72, 217, 133, 134, 63, 174, 6, 61, 130, 56, 114, 2, 246, 71, 230, 173, 65, 162, 45, 1, 197, 128, 162, 132, 221, 242, 141, 151, 231, 206, 12, 105, 132, 228, 150, 231, 33, 155, 153, 1, 222, 251, 205, 228, 113, 215, 120, 253, 206, 119, 143, 20, 36, 208, 226, 28, 221, 25, 131, 227, 251, 8, 214, 214, 66, 162, 225, 160, 236, 252, 177, 32, 7, 154, 73, 54, 39, 61, 200, 164, 120, 211, 126, 94, 144, 244, 78, 23, 232, 124, 157, 196, 31, 103, 94, 200, 220, 107, 28, 227, 126, 80, 177, 74, 60, 35, 8, 0, 246, 116, 70, 147, 219, 170, 168, 199, 226, 96, 10, 50, 98, 140, 50, 220, 42, 20, 168, 154, 239, 100, 181, 54, 220, 89, 18, 126, 192, 140, 246, 175, 25, 139, 56, 212, 54, 57, 252, 131, 89, 1, 249, 38, 67, 45, 203, 118, 175, 197, 250, 37, 115, 233, 164, 244, 83, 76, 238, 210, 109, 120, 137, 250, 32, 66, 112, 221, 135, 95, 231, 138, 180, 162, 170, 90, 120, 241, 113, 210, 111, 176, 133, 113, 67, 254, 38, 46, 81, 46, 81, 218, 227, 74, 221, 244, 15, 176, 168, 208, 127, 222, 151, 218, 76, 179, 91, 138, 166, 206, 143, 142, 233, 24, 212, 96, 46, 134, 34, 4, 173, 23, 198, 253, 105, 105, 93, 227, 49, 219, 52, 216, 181, 81, 59, 159, 152, 219, 123, 249, 58, 212, 227, 64, 192, 158, 237, 176, 103, 175, 249, 166, 46, 198, 236, 12, 58, 48, 11, 135, 2, 120, 137, 5, 212, 115, 24, 131, 12, 254, 252, 144, 30, 16, 100, 76, 179, 171, 20, 118, 116, 74, 15, 97, 10, 150, 163, 219, 15, 123, 123, 57, 250, 92, 24, 76, 171, 171, 101, 74, 74, 146, 151, 48, 188, 237, 36, 247, 120, 14, 118, 211, 229, 44, 3, 189, 107, 85, 210, 194, 101, 67, 79, 28, 26, 70, 6, 249, 227, 167, 94, 55, 47, 86, 223, 110, 37, 80, 80, 124, 84, 141, 242, 253, 138, 169, 224, 57, 223, 173, 4, 64, 218, 213, 110, 246, 101, 152, 210, 78, 108, 85, 24, 11, 165, 159, 98, 145, 1, 236, 41, 198, 106, 238, 232, 185, 219, 157, 22, 233, 94, 104, 72, 11, 165, 4, 105, 111, 100, 248, 61, 189, 50, 251, 12, 246, 237, 73, 7, 19, 246, 13, 205, 199, 193, 55, 234, 139, 122, 139, 45, 25, 68, 62, 214, 39, 225, 186, 136, 217, 246, 43, 109, 135, 135, 71, 222, 92, 106, 47, 158, 80, 237, 80, 80, 12, 123, 64, 23, 127, 249, 35, 95, 152, 96, 230, 44, 229, 126, 45, 197, 194, 29, 181, 228, 179, 198, 146, 181, 210, 99, 49, 39, 139, 182, 23, 46, 173, 156, 0, 89, 117, 207, 74, 168, 157, 103, 237, 243, 0, 27, 247, 162, 135, 7, 4, 109, 198, 48, 102, 156, 193, 178, 41, 193, 125, 85, 120, 243, 60, 179, 247, 21, 10, 137, 114, 241, 89, 34, 233, 138, 13, 126, 14, 55, 237, 231, 72, 10, 21, 80, 167, 224, 142, 88, 102, 61, 246, 43, 78, 113, 122, 186, 71, 188, 163, 53, 150, 231, 251, 43, 28, 64, 106, 153, 132, 135, 174, 0, 161, 136, 150, 24, 50, 164, 245, 158, 9, 63, 247, 158, 217, 48, 63, 74, 76, 141, 212, 248, 252, 225, 31, 131, 242, 19, 246, 173, 80, 9, 202, 50, 189, 21, 13, 91, 236, 228, 147, 19, 196, 114, 199, 212, 57, 208, 99, 71, 248, 125, 177, 157, 195, 191, 30, 202, 245, 63, 133, 65, 98, 89, 236, 90, 160, 123, 4, 10, 248, 231, 125, 181, 176, 92, 214, 225, 220, 92, 129, 40, 158, 68, 240, 5, 55, 229, 70, 200, 68, 64, 249, 96, 117, 12, 127, 54, 63, 24, 89, 21, 78, 208, 112, 138, 57, 112, 24, 241, 19, 152, 186, 2, 155, 171, 245, 66, 125, 1, 64, 13, 76, 15, 156, 205, 178, 158, 168, 220, 41, 113, 52, 91, 247, 193, 68, 226, 18, 199, 189, 42, 196, 194, 60, 222, 24, 57, 182, 97, 220, 60, 35, 99, 208, 98, 90, 155, 82, 227, 59, 186, 228, 56, 80, 238, 160, 123, 179, 89, 212, 220, 31, 135, 171, 135, 197, 129, 40, 8, 233, 124, 88, 51, 16, 4, 144, 165, 52, 24, 191, 120, 182, 158, 65, 80, 1, 227, 205, 208, 255, 134, 109, 79, 49, 106, 241, 208, 247, 6, 42, 39, 119, 235, 58, 213, 253, 34, 10, 168, 186, 128, 175, 219, 161, 46, 200, 234, 152, 211, 120, 165, 175, 163, 184, 45, 13, 141, 216, 159, 196, 192, 83, 1, 27, 67, 223, 120, 72, 81, 141, 35, 10, 230, 113, 197, 17, 120, 90, 237, 82, 85, 129, 219, 182, 30, 241, 3, 162, 158, 212, 210, 182, 131, 0, 82, 173, 195, 226, 211, 81, 86, 181, 50, 129, 196, 203, 140, 111, 164, 128, 240, 107, 54, 5, 110, 108, 125, 164, 71, 78, 23, 51, 164, 73, 112, 148, 72, 193, 238, 255, 37, 146, 122, 73, 147, 117, 171, 69, 167, 79, 85, 13, 201, 0, 61, 15, 135, 6, 97, 104, 49, 159, 209, 146, 30, 23, 192, 209, 81, 66, 91, 80, 116, 188, 52, 14, 171, 185, 63, 191, 184, 246, 21, 3, 232, 247, 115, 65, 255, 25, 212, 192, 163, 93, 208, 67, 26, 165, 181, 234, 187, 154, 176, 242, 129, 59, 150, 253, 43, 219, 172, 36, 224, 103, 242, 162, 185, 21, 92, 198, 188, 123, 230, 170, 213, 23, 248, 231, 21, 6, 122, 18, 97, 87, 104, 249, 153, 213, 117, 99, 34, 116, 195, 239, 28, 193, 30, 226, 60, 30, 154, 179, 72, 143, 127, 233, 55, 52, 93, 114, 225, 74, 121, 182, 2, 32, 193, 208, 70, 196, 0, 208, 99, 0, 125, 46, 252, 183, 140, 233, 7, 32, 56, 124, 46, 78, 26, 132, 55, 114, 255, 158, 96, 59, 126, 202, 203, 98, 231, 22, 139, 137, 62, 148, 185, 232, 157, 62, 169, 223, 33, 133, 137, 18, 71, 86, 30, 197, 232, 68, 249, 62, 95, 137, 203, 244, 246, 195, 104, 144, 240, 124, 7, 24, 80, 204, 155, 51, 201, 164, 135, 227, 229, 141, 135, 84, 234, 211, 223, 120, 146, 127, 112, 48, 143, 249, 117, 9, 77, 84, 78, 196, 156, 87, 177, 15, 255, 82, 133, 83, 56, 110, 232, 81, 74, 57, 252, 240, 114, 33, 81, 117, 208, 70, 131, 196, 146, 44, 33, 222, 9, 206, 170, 255, 93, 223, 24, 157, 50, 83, 151, 237, 65, 120, 2, 173, 253, 124, 177, 112, 19, 94, 8, 131, 95, 221, 41, 139, 97, 247, 178, 134, 167, 134, 93, 61, 253, 179, 141, 116, 68, 148, 137, 202, 52, 116, 157, 52, 57, 102, 51, 152, 145, 161, 93, 98, 252, 230, 155, 122, 95, 81, 249, 47, 52, 51, 178, 231, 127, 163, 230, 74, 97, 94, 217, 127, 57, 94, 115, 120, 154, 14, 7, 101, 133, 143, 183, 179, 157, 228, 98, 145, 238, 104, 134, 136, 246, 3, 166, 6, 129, 25, 1, 97, 207, 203, 70, 24, 184, 109, 219, 47, 46, 160, 142, 83, 112, 232, 197, 171, 35, 240, 201, 237, 69, 160, 238, 64, 235, 101, 132, 176, 224, 188, 236, 206, 205, 113, 20, 44, 91, 128, 115, 234, 216, 210, 63, 155, 162, 83, 27, 177, 206, 64, 147, 212, 229, 194, 194, 114, 11, 150, 14, 199, 80, 185, 164, 85, 72, 73, 132, 209, 237, 150, 135, 141, 163, 179, 19, 100, 83, 168, 130, 233, 175, 83, 238, 168, 210, 148, 65, 35, 49, 116, 224, 145, 88, 209, 184, 137, 111, 219, 58, 208, 138, 109, 171, 37, 187, 134, 3, 23, 107, 59, 170, 77, 61, 69, 198, 140, 17, 139, 53, 146, 233, 5, 45, 59, 182, 116, 176, 18, 161, 92, 190, 66, 63, 99, 25, 146, 120, 109, 231, 170, 60, 114, 158, 74, 199, 1, 110, 18, 10, 51, 110, 177, 181, 94, 210, 73, 112, 113, 39, 74, 194, 79, 65, 180, 97, 7, 112, 87, 216, 134, 114, 84, 206, 139, 246, 33, 101, 228, 36, 24, 66, 231, 151, 174, 66, 28, 220, 78, 183, 12, 144, 251, 229, 219, 219, 254, 101, 202, 78, 217, 19, 127, 41, 149, 166, 48, 132, 33, 109, 236, 201, 89, 34, 69, 46, 63, 98, 1, 123, 165, 16, 93, 244, 207, 90, 194, 180, 254, 177, 84, 164, 79, 210, 73, 129, 205, 244, 221, 168, 223, 244, 239, 150, 229, 245, 23, 45, 135, 88, 134, 201, 214, 147, 162, 178, 36, 166, 12, 228, 20, 84, 43, 10, 235, 161, 59, 207, 148, 53, 195, 37, 204, 103, 106, 196, 238, 224, 239, 255, 30, 178, 35, 157, 240, 76, 174, 73, 106, 252, 61, 124, 236, 209, 99, 159, 125, 16, 16, 41, 13, 60, 43, 195, 163, 114, 220, 142, 216, 173, 5, 126, 6, 170, 250, 31, 74, 241, 225, 33, 50, 72, 230, 205, 121, 27, 92, 4, 151, 4, 173, 22, 170, 37, 97, 78, 155, 154, 244, 113, 13, 196, 53, 156, 93, 228, 165, 111, 228, 45, 117, 93, 38, 239, 188, 250, 139, 58, 148, 207, 168, 62, 73, 23, 71, 50, 144, 27, 212, 84, 109, 147, 83, 166, 128, 182, 209, 71, 27, 80, 185, 145, 219, 77, 82, 115, 224, 72, 28, 28, 49, 131, 28, 227, 102, 150, 178, 210, 50, 48, 223, 38, 94, 42, 94, 177, 50, 34, 144, 117, 186, 108, 214, 244, 143, 215, 240, 82, 134, 157, 43, 228, 158, 173, 27, 230, 30, 253, 54, 240, 184, 196, 181, 129, 118, 39, 131, 3, 207, 171, 152, 151, 74, 45, 9, 52, 119, 173, 33, 149, 140, 193, 148, 10, 45, 130, 199, 162, 81, 97, 138, 9, 103, 226, 113, 141, 201, 207, 20, 177, 249, 118, 149, 240, 20, 102, 220, 226, 146, 35, 157, 85, 68, 107, 166, 42, 199, 41, 231, 178, 53, 191, 93, 254, 193, 183, 20, 175, 179, 49, 236, 207, 200, 151, 0, 103, 91, 33, 101, 192, 128, 175, 108, 201, 125, 246, 143, 0, 217, 201, 211, 183, 116, 205, 194, 26, 125, 172, 249, 150, 123, 86, 218, 210, 122, 207, 60, 158, 71, 219, 216, 65, 33, 244, 212, 208, 158, 32, 177, 7, 170, 229, 119, 145, 125, 225, 163, 45, 168, 186, 242, 90, 81, 73, 17, 166, 208, 61, 29, 212, 197, 29, 230, 39, 78, 26, 31, 204, 59, 174, 155, 141, 231, 210, 129, 16, 251, 218, 199, 199, 4, 161, 143, 231, 167, 221, 14, 248, 126, 252, 235, 240, 8, 22, 171, 188, 64, 71, 191, 60, 228, 251, 153, 208, 232, 179, 85, 156, 102, 204, 17, 41, 99, 0, 216, 79, 16, 252, 120, 95, 142, 69, 201, 125, 236, 102, 113, 177, 164, 246, 233, 218, 107, 163, 33, 154, 116, 124, 75, 20, 227, 29, 200, 189, 82, 165, 48, 214, 150, 161, 220, 15, 12, 155, 135, 101, 211, 226, 170, 34, 69, 199, 132, 20, 97, 188, 79, 219, 253, 148, 103, 247, 140, 223, 159, 141, 134, 227, 180, 50, 113, 135, 169, 128, 144, 70, 52, 217, 114, 157, 104, 57, 37, 45, 244, 234, 28, 54, 206, 111, 138, 211, 188, 81, 53, 35, 1, 228, 7, 129, 210, 148, 152, 133, 161, 68, 180, 191, 52, 93, 135, 12, 26, 45, 132, 132, 205, 230, 199, 224, 80, 110, 144, 40, 2, 147, 90, 55, 39, 245, 71, 119, 45, 62, 96, 25, 242, 21, 4, 239, 40, 139, 233, 211, 133, 116, 36, 115, 237, 7, 248, 253, 216, 141, 49, 30, 176, 200, 230, 168, 185, 146, 13, 130, 78, 92, 170, 1, 241, 145, 20, 82, 33, 133, 217, 177, 233, 38, 21, 15, 56, 231, 64, 119, 21, 44, 39, 97, 144, 166, 162, 37, 115, 235, 42, 146, 34, 196, 32, 204, 72, 47, 57, 34, 240, 163, 169, 223, 81, 214, 76, 83, 151, 55, 165, 57, 45, 18, 33, 189, 50, 161, 180, 163, 156, 73, 16, 254, 231, 159, 86, 95, 223, 136, 227, 228, 225, 149, 252, 170, 13, 98, 213, 110, 150, 31, 85, 156, 97, 230, 229, 133, 56, 162, 172, 162, 6, 118, 247, 20, 76, 139, 53, 106, 103, 3, 103, 217, 145, 193, 109, 16, 213, 84, 34, 70, 195, 177, 96, 83, 7, 16, 207, 172, 245, 75, 154, 100, 38, 136, 228, 189, 196, 84, 31, 206, 56, 194, 198, 111, 75, 109, 195, 75, 129, 56, 91, 197, 78, 250, 54, 243, 51, 206, 109, 31, 203, 29, 94, 237, 4, 218, 49, 129, 182, 200, 245, 21, 171, 45, 188, 38, 172, 108, 91, 95, 91, 163, 152, 29, 169, 40, 175, 63, 226, 195, 209, 169, 136, 187, 161, 56, 113, 206, 185, 128, 21, 44, 72, 28, 42, 26, 67, 217, 113, 40, 160, 24, 120, 197, 59, 188, 215, 222, 3, 106, 217, 201, 216, 117, 201, 156, 81, 71, 248, 181, 205, 251, 74, 225, 206, 125, 109, 148, 183, 43, 173, 247, 70, 179, 109, 149, 53, 239, 145, 99, 123, 35, 103, 28, 26, 138, 17, 172, 121, 255, 80, 163, 201, 33, 201, 47, 125, 199, 3, 225, 122, 214, 41, 142, 188, 77, 236, 225, 40, 243, 209, 208, 249, 203, 209, 122, 114, 174, 135, 132, 120, 22, 28, 93, 1, 214, 33, 48, 48, 174, 26, 146, 113, 30, 149, 103, 76, 69, 249, 178, 22, 126, 140, 82, 164, 64, 54, 172, 59, 132, 241, 10, 200, 99, 193, 215, 89, 35, 93, 20, 83, 29, 83, 150, 71, 152, 59, 73, 237, 67, 40, 203, 53, 247, 185, 67, 49, 220, 92, 143, 24, 167, 14, 57, 252, 88, 48, 37, 180, 34, 230, 189, 52, 249, 140, 236, 219, 26, 223, 85, 126, 50, 34, 70, 200, 111, 37, 132, 135, 182, 121, 11, 186, 126, 177, 57, 205, 104, 96, 171, 62, 23, 188, 232, 144, 61, 185, 76, 27, 13, 141, 183, 94, 169, 244, 77, 13, 164, 75, 112, 88, 4, 210, 153, 66, 16, 178, 144, 170, 190, 25, 42, 221, 217, 123, 60, 152, 129, 11, 95, 179, 77, 64, 224, 230, 164, 194, 2, 4, 109, 2, 44, 155, 247, 225, 134, 224, 56, 252, 145, 239, 215, 108, 141, 122, 22, 100, 170, 215, 152, 208, 251, 90, 200, 72, 96, 153, 25, 54, 5, 170, 215, 66, 8, 76, 7, 229, 74, 111, 206, 163, 5, 247, 128, 12, 250, 118, 194, 99, 33, 1, 35, 192, 28, 43, 68, 2, 184, 144, 164, 229, 105, 40, 207, 139, 65, 134, 219, 18, 3, 76, 252, 182, 66, 194, 38, 103, 235, 0, 183, 12, 107, 227, 128, 213, 191, 99, 62, 236, 94, 64, 71, 232, 29, 151, 138, 225, 143, 161, 241, 225, 89, 10, 208, 50, 232, 219, 187, 20, 89, 162, 123, 37, 12, 97, 106, 252, 251, 241, 154, 123, 246, 146, 79, 19, 157, 82, 36, 246, 145, 9, 47, 236, 243, 245, 237, 228, 109, 14, 5, 229, 65, 109, 242, 107, 31, 26, 204, 223, 27, 2, 47, 61, 137, 136, 178, 226, 50, 9, 48, 31, 44, 228, 202, 252, 93, 250, 190, 188, 210, 115, 87, 244, 56, 105, 145, 55, 90, 169, 138, 114, 15, 62, 113, 62, 66, 91, 127, 102, 142, 102, 168, 152, 251, 40, 122, 46, 102, 235, 145, 136, 69, 148, 144, 5, 68, 206, 243, 116, 141, 96, 143, 118, 106, 202, 13, 151, 135, 43, 229, 95, 7, 32, 131] + ], + "iv": null, + "key": [74, 18, 84, 175, 227, 15, 202, 248, 133, 227, 165, 127, 150, 232, 234, 97], + "modeOfOperation": "ctr", + "plaintext": [ + [170, 94, 185, 29, 86, 74, 131, 217, 106, 234, 9, 67, 101, 234, 183, 251, 157, 136, 70, 61, 216, 93, 171, 230, 159, 196, 190, 65, 72, 60, 134, 98, 243, 232, 245, 102, 92, 72, 202, 9, 187, 76, 214, 54, 226, 48, 177, 13, 57, 196, 84, 50, 196, 42, 209, 164, 141, 13, 11, 167, 250, 107, 226, 113, 184, 104, 185, 207, 106, 187, 59, 181, 124, 57, 213, 4, 209, 58, 231, 119, 253, 137, 198, 18, 150, 231, 232, 2, 210, 238, 89, 83, 4, 225, 106, 23, 250, 204, 136, 0, 214, 103, 62, 33, 55, 126, 134, 84, 166, 238, 79, 14, 27, 80, 207, 92, 83, 150, 233, 49, 187, 186, 84, 38, 176, 198, 238, 228, 104, 44, 106, 35, 60, 208, 81, 82, 144, 94, 228, 3, 76, 30, 175, 178, 118, 33, 135, 151, 218, 24, 218, 154, 247, 144, 192, 11, 253, 2, 117, 195, 89, 174, 194, 71, 58, 235, 255, 103, 210, 251, 31, 120, 68, 146, 158, 249, 21, 50, 241, 232, 253, 113, 226, 182, 86, 25, 198, 195, 249, 136, 149, 174, 92, 224, 214, 214, 32, 112, 166, 252, 36, 67, 90, 201, 38, 130, 226, 231, 90, 146, 159, 211, 40, 83, 115, 218, 27, 247, 122, 93, 73, 39, 44, 71, 243, 44, 196, 169, 177, 227, 120, 75, 130, 30, 0, 182, 74, 77, 55, 1, 196, 230, 148, 192, 210, 70, 188, 93, 130, 24, 30, 9, 255, 74, 99, 120, 82, 204, 16, 221, 43, 113, 32, 9, 127, 254, 169, 23, 122, 52, 62, 239, 235, 142, 15, 142, 104, 248, 29, 152, 109, 118, 9, 171, 91, 52, 211, 64, 240, 160, 127, 94, 154, 237, 211, 190, 217, 119, 33, 181, 29, 196, 217, 246, 211, 255, 215, 74, 159, 36, 79, 3, 56, 167, 89, 174, 74, 74, 7, 41, 62, 171, 223, 104, 239, 210, 152, 153, 30, 202, 6, 196, 21, 178, 8, 19, 184, 65, 139, 139, 189, 135, 70, 25, 56, 55, 35, 201, 131, 217, 214, 183, 49, 93, 44, 226, 165, 72, 203, 108, 96, 96, 0, 165, 46, 234, 245, 47, 158, 146, 133, 133, 163, 153, 106, 196, 188, 61, 52, 190, 118, 211, 165, 251, 56, 183, 183, 167, 125, 213, 70, 120, 149, 138, 10, 21, 182, 209, 127, 19, 29, 101, 42, 146, 225, 142, 255, 56, 206, 83, 103, 0, 57, 89, 96, 22, 22, 73, 61, 138, 230, 237, 84, 35, 221, 32, 114, 96, 239, 55, 70, 48, 189, 56, 114, 106, 48, 225, 88, 155, 10, 42, 174, 222, 223, 36, 74, 130, 134, 83, 124, 235, 14, 208, 35, 97, 253, 161, 58, 79, 91, 150, 138, 212, 223, 178, 196, 151, 249, 226, 174, 1, 96, 155, 35, 91, 88, 35, 171, 106, 192, 241, 231, 36, 13, 152, 146, 126, 130, 76, 16, 247, 194, 173, 105, 178, 132, 36, 250, 19, 162, 23, 169, 188, 124, 208, 110, 156, 150, 243, 15, 191, 101, 1, 57, 189, 221, 140, 101, 215, 135, 166, 56, 101, 229, 232, 96, 75, 21, 132, 242, 17, 71, 94, 251, 168, 75, 215, 200, 211, 44, 113, 175, 17, 34, 94, 106, 71, 85, 178, 30, 169, 147, 22, 146, 219, 111, 88, 237, 68, 34, 87, 134, 94, 120, 106, 203, 71, 162, 112, 165, 32, 200, 110, 105, 153, 253, 64, 95, 187, 175, 70, 247, 22, 214, 184, 38, 250, 34, 210, 66, 107, 158, 43, 149, 234, 211, 165, 197, 212, 244, 160, 181, 218, 42, 178, 171, 10, 136, 106, 212, 69, 68, 163, 165, 199, 218, 56, 77, 114, 78, 227, 156, 41, 55, 153, 158, 174, 50, 163, 117, 90, 253, 93, 63, 251, 216, 153, 22, 11, 42, 227, 58, 229, 79, 223, 231, 46, 206, 52, 135, 178, 205, 54, 186, 165, 64, 60, 66, 40, 136, 124, 31, 248, 229, 6, 134, 20, 88, 28, 26, 90, 238, 225, 213, 168, 32, 156, 2, 36, 24, 136, 48, 218, 116, 155, 113, 229, 168, 92, 20, 92, 104, 233, 249, 63, 69, 249, 109, 72, 210, 8, 146, 124, 199, 123, 218, 240, 48, 208, 155, 201, 11, 21, 207, 90, 251, 196, 65, 233, 72, 2, 89, 233, 40, 142, 247, 43, 240, 44, 144, 108, 184, 211, 56, 243, 89, 182, 151, 195, 28, 8, 254, 83, 82, 14, 115, 204, 175, 78, 74, 78, 81, 54, 150, 97, 44, 33, 56, 131, 69, 238, 22, 43, 254, 165, 11, 195, 97, 229, 146, 40, 157, 44, 248, 130, 198, 71, 35, 20, 16, 15, 154, 61, 226, 66, 149, 46, 150, 189, 19, 119, 158, 184, 246, 62, 177, 215, 233, 175, 132, 215, 108, 137, 205, 210, 28, 20, 204, 17, 52, 156, 217, 91, 228, 201, 213, 240, 141, 219, 104, 235, 122, 190, 163, 209, 41, 157, 127, 86, 61, 127, 131, 82, 153, 7, 45, 240, 221, 246, 56, 160, 240, 122, 238, 219, 166, 226, 144, 67, 194, 15, 65, 157, 212, 179, 181, 76, 61, 198, 21, 15, 230, 94, 94, 154, 39, 157, 164, 140, 38, 55, 53, 242, 238, 218, 0, 251, 118, 146, 10, 63, 120, 7, 242, 179, 241, 125, 69, 191, 107, 53, 136, 45, 165, 119, 4, 188, 138, 150, 45, 251, 23, 168, 71, 178, 232, 87, 132, 184, 100, 9, 25, 113, 79, 227, 101, 23, 45, 207, 185, 92, 110, 103, 236, 16, 45, 189, 124, 182, 132, 197, 150, 126, 65, 18, 227, 43, 199, 122, 200, 119, 106, 4, 30, 110, 32, 4, 85, 35, 139, 92, 180, 50, 232, 45, 154, 67, 24, 14, 180, 57, 0, 146, 194, 54, 127, 36, 229, 134, 248, 172, 226, 58, 197, 120, 147, 191, 77, 132, 122, 43, 218, 228, 130, 85, 137, 236, 215, 167, 128, 51, 180, 167, 61, 73, 233, 139, 95, 200, 250, 36, 192, 57, 203, 33, 177, 245, 191, 189, 197, 217, 85, 35, 216, 123, 69, 158, 242, 149, 245, 146, 148, 121, 48, 47, 144, 58, 121, 191, 94, 211, 18, 58, 85, 230, 2, 247, 128, 76, 170, 162, 132, 164, 214, 89, 45, 208, 89, 5, 246, 126, 125, 221, 65, 186, 179, 99, 87, 159, 102, 52, 14, 40, 200, 136, 177, 74, 117, 96, 182, 215, 19, 17, 21, 175, 249, 227, 11, 77, 158, 147, 140, 86, 169, 8, 199, 227, 20, 214, 244, 16, 231, 139, 85, 163, 55, 41, 93, 140, 232, 90, 1, 160, 216, 69, 73, 195, 198, 198, 23, 228, 85, 23, 70, 251, 102, 22, 12, 25, 180, 227, 136, 217, 156, 134, 113, 116, 213, 235, 45, 33, 183, 98, 50, 223, 127, 31, 18, 66, 44, 170, 224, 143, 53, 116, 36, 120, 220, 164, 13, 170, 232, 133, 152, 153, 102, 9, 129, 10, 43, 196, 137, 196, 251, 39, 115, 130, 36, 171, 217, 144, 151, 214, 164, 159, 176, 244, 7, 209, 236, 203, 94, 134, 225, 146, 142, 237, 254, 91, 191, 51, 54, 173, 246, 222, 96, 200, 234, 111, 198, 87, 183, 159, 98, 135, 165, 120, 40, 203, 132, 163, 170, 193, 172, 245, 71, 210, 23, 230, 76, 248, 239, 223, 24, 23, 110, 152, 56, 8, 44, 191, 202, 162, 82, 85, 5, 139, 52, 165, 150, 147, 59, 88, 255, 115, 199, 194, 32, 100, 96, 245, 179, 16, 188, 6, 23, 88, 82, 249, 100, 184, 176, 136, 90, 250, 21, 53, 147, 110, 159, 157, 50, 168, 24, 89, 236, 185, 112, 41, 14, 171, 87, 32, 61, 136, 33, 237, 136, 8, 212, 214, 182, 2, 182, 170, 228, 248, 223, 92, 179, 36, 184, 124, 73, 146, 149, 164, 161, 236, 188, 226, 124, 127, 130, 70, 253, 249, 34, 137, 39, 118, 47, 45, 142, 140, 84, 250, 150, 19, 185, 230, 223, 128, 18, 148, 74, 230, 4, 102, 99, 213, 11, 196, 26, 153, 237, 59, 201, 245, 224, 15, 231, 200, 62, 76, 45, 175, 231, 250, 140, 171, 13, 178, 122, 157, 196, 20, 102, 128, 227, 49, 168, 30, 196, 123, 60, 139, 243, 140, 138, 217, 239, 136, 8, 161, 96, 82, 156, 50, 87, 168, 239, 7, 172, 3, 167, 137, 17, 189, 116, 247, 57, 36, 4, 47, 191, 88, 211, 52, 78, 95, 16, 243, 195, 74, 90, 131, 89, 253, 142, 138, 129, 85, 105, 101, 97, 180, 87, 98, 206, 205, 157, 226, 195, 59, 16, 202, 224, 115, 249, 201, 176, 227, 2, 237, 48, 241, 183, 186, 167, 132, 253, 123, 21, 166, 31, 136, 38, 54, 29, 63, 131, 114, 141, 237, 57, 249, 192, 40, 185, 149, 207, 67, 188, 31, 63, 213, 249, 184, 224, 108, 56, 24, 151, 115, 62, 25, 178, 145, 54, 136, 224, 78, 229, 206, 108, 26, 42, 139, 14, 150, 42, 58, 82, 90, 242, 47, 126, 215, 52, 135, 175, 246, 197, 111, 120, 57, 31, 119, 22, 93, 100, 167, 29, 102, 166, 139, 194, 118, 156, 217, 16, 100, 11, 192, 209, 195, 224, 246, 47, 162, 163, 117, 112, 107, 135, 67, 168, 241, 159, 254, 207, 186, 218, 168, 245, 220, 87, 118, 130, 151, 154, 9, 85, 222, 85, 121, 58, 12, 30, 166, 143, 168, 23, 127, 48, 8, 215, 253, 232, 70, 78, 7, 7, 126, 220, 93, 78, 68, 226, 80, 21, 55, 93, 111, 157, 183, 1, 206, 187, 90, 107, 21, 71, 189, 63, 172, 135, 86, 224, 242, 120, 172, 144, 148, 89, 172, 56, 247, 67, 45, 170, 99, 13, 236, 208, 135, 72, 133, 143, 252, 154, 227, 161, 175, 225, 58, 166, 127, 92, 148, 119, 194, 84, 184, 32, 3, 194, 78, 153, 160, 126, 173, 78, 20, 213, 42, 58, 161, 124, 211, 255, 192, 226, 155, 175, 97, 94, 107, 196, 72, 246, 117, 116, 189, 190, 242, 144, 57, 168, 12, 193, 3, 24, 64, 140, 16, 81, 77, 160, 253, 175, 226, 50, 8, 63, 138, 38, 24, 104, 218, 101, 88, 17, 122, 161, 26, 211, 246, 67, 243, 60, 208, 40, 145, 254, 85, 95, 53, 90, 233, 245, 129, 219, 90, 243, 56, 224, 185, 157, 91, 77, 129, 3, 202, 179, 119, 89, 45, 1, 120, 203, 150, 91, 80, 147, 234, 21, 4, 60, 107, 59, 44, 10, 42, 103, 81, 206, 238, 73, 115, 254, 119, 144, 8, 161, 188, 231, 104, 239, 249, 165, 35, 198, 21, 143, 70, 11, 157, 74, 196, 198, 133, 110, 41, 39, 34, 51, 128, 137, 126, 139, 25, 122, 112, 51, 209, 79, 110, 191, 181, 28, 98, 166, 99, 197, 108, 158, 172, 213, 177, 235, 237, 60, 164, 47, 64, 253, 114, 220, 135, 43, 132, 42, 196, 79, 236, 215, 95, 48, 162, 167, 31, 120, 57, 148, 241, 253, 34, 242, 97, 84, 85, 207, 20, 225, 135, 191, 188, 201, 22, 132, 42, 5, 29, 64, 119, 188, 242, 207, 132, 216, 215, 73, 161, 196, 199, 195, 243, 116, 170, 168, 71, 62, 87, 42, 46, 43, 245, 70, 166, 140, 189, 188, 72, 39, 208, 153, 206, 230, 106, 54, 123, 84, 71, 95, 214, 189, 19, 86, 211, 218, 99, 118, 204, 234, 2, 162, 54, 31, 62, 157, 51, 98, 182, 15, 227, 0, 55, 50, 59, 204, 218, 192, 131, 88, 95, 212, 184, 234, 102, 249, 191, 35, 210, 115, 244, 186, 90, 81, 123, 172, 105, 226, 191, 179, 203, 12, 237, 115, 73, 231, 0, 175, 229, 5, 91, 169, 44, 26, 108, 235, 78, 174, 175, 62, 207, 131, 91, 76, 112, 3, 211, 137, 239, 19, 145, 163, 160, 160, 242, 180, 143, 157, 30, 249, 156, 30, 66, 135, 86, 122, 90, 205, 150, 225, 77, 81, 184, 200, 125, 239, 105, 252, 98, 240, 251, 84, 88, 74, 36, 111, 8, 255, 208, 82, 172, 177, 57, 39, 200, 230, 149, 240, 126, 132, 236, 111, 223, 252, 255, 33, 147, 55, 105, 10, 245, 252, 254, 233, 168, 103, 87, 136, 153, 88, 15, 7, 40, 211, 238, 97, 166, 116, 149, 205, 173, 123, 237, 176, 241, 26, 147, 78, 187, 97, 171, 120, 99, 110, 218, 193, 3, 179, 36, 133, 62, 218, 136, 116, 35, 174, 226, 245, 201, 15, 126, 179, 192, 228, 197, 20, 75, 83, 171, 107, 71, 225, 104, 158, 207, 170, 171, 144, 192, 84, 99, 98, 202, 25, 215, 106, 158, 132, 100, 120, 234, 103, 153, 75, 94, 126, 61, 12, 5, 205, 238, 231, 217, 128, 112, 234, 166, 233, 44, 102, 39, 162, 16, 16, 198, 225, 213, 67, 254, 159, 205, 48, 201, 116, 195, 45, 244, 193, 134, 125, 34, 203, 66, 188, 39, 151, 132, 172, 25, 16, 124, 41, 162, 46, 158, 255, 5, 137, 107, 189, 206, 183, 83, 85, 105, 143, 82, 24, 115, 223, 210, 96, 205, 242, 38, 122, 82, 135, 141, 229, 9, 76, 67, 87, 209, 100, 27, 24, 184, 125, 48, 141, 4, 113, 8, 154, 56, 120, 96, 198, 102, 222, 65, 38, 143, 144, 210, 100, 192, 139, 61, 178, 98, 99, 206, 212, 230, 50, 58, 161, 17, 191, 119, 104, 47, 202, 211, 245, 131, 103, 225, 162, 221, 227, 23, 196, 66, 227, 150, 242, 244, 18, 96, 216, 207, 18, 136, 239, 210, 74, 18, 66, 119, 189, 208, 251, 116, 173, 38, 187, 62, 248, 88, 224, 152, 153, 146, 150, 52, 77, 163, 251, 218, 98, 187, 234, 112, 82, 204, 143, 121, 208, 219, 209, 12, 195, 102, 147, 227, 145, 165, 170, 43, 250, 103, 225, 17, 82, 134, 107, 167, 184, 183, 141, 238, 158, 9, 153, 182, 60, 228, 229, 206, 216, 202, 140, 189, 127, 142, 148, 37, 131, 49, 81, 224, 18, 237, 88, 106, 106, 20, 205, 18, 86, 237, 48, 219, 57, 40, 222, 139, 27, 140, 214, 164, 199, 14, 51, 181, 1, 189, 177, 85, 63, 153, 212, 36, 21, 65, 154, 49, 150, 176, 41, 33, 231, 243, 18, 170, 242, 230, 184, 36, 31, 103, 38, 229, 14, 255, 128, 167, 9, 16, 32, 154, 58, 193, 46, 179, 67, 13, 71, 55, 236, 148, 127, 212, 148, 171, 45, 19, 223, 253, 51, 221, 176, 126, 92, 11, 73, 135, 194, 65, 24, 35, 39, 213, 83, 167, 11, 67, 219, 0, 170, 177, 84, 255, 145, 95, 145, 229, 242, 7, 109, 169, 178, 68, 20, 90, 180, 63, 70, 178, 42, 246, 205, 157, 180, 141, 242, 243, 5, 2, 75, 7, 123, 181, 229, 211, 42, 249, 135, 76, 77, 190, 224, 248, 255, 240, 6, 38, 25, 187, 20, 9, 84, 177, 190, 228, 31, 104, 194, 151, 173, 91, 118, 215, 23, 46, 15, 19, 223, 213, 150, 84, 226, 112, 102, 91, 20, 115, 175, 249, 123, 165, 56, 160, 135, 52, 221, 250, 235, 10, 146, 47, 40, 118, 196, 182, 171, 212, 120, 11, 38, 88, 226, 199, 145, 32, 115, 15, 108, 129, 228, 29, 225, 245, 100, 210, 209, 121, 88, 187, 10, 244, 53, 191, 35, 140, 238, 48, 202, 135, 224, 174, 185, 110, 91, 227, 198, 120, 134, 14, 34, 48, 176, 169, 85, 184, 139, 166, 181, 116, 57, 4, 89, 151, 228, 220, 65, 13, 69, 228, 211, 123, 192, 150, 239, 160, 142, 108, 12, 89, 51, 248, 249, 45, 33, 226, 96, 144, 141, 11, 17, 59, 163, 66, 19, 52, 20, 158, 219, 132, 251, 82, 36, 39, 79, 51, 223, 199, 37, 150, 230, 247, 15, 56, 105, 94, 5, 253, 78, 200, 146, 155, 162, 56, 174, 105, 111, 214, 65, 109, 125, 69, 81, 98, 215, 184, 55, 21, 113, 174, 172, 184, 59, 239, 11, 230, 224, 10, 176, 241, 246, 105, 188, 214, 113, 164, 52, 34, 67, 160, 242, 5, 236, 7, 94, 7, 152, 31, 9, 247, 2, 127, 235, 92, 64, 104, 32, 185, 103, 92, 226, 50, 127, 75, 143, 145, 59, 73, 33, 78, 242, 187, 228, 41, 147, 9, 96, 203, 33, 25, 138, 178, 146, 97, 111, 219, 180, 242, 33, 203, 15, 134, 87, 68, 204, 43, 10, 112, 109, 29, 229, 37, 134, 167, 179, 133, 32, 220, 252, 31, 35, 78, 68, 5, 219, 3, 200, 202, 86, 23, 213, 78, 19, 172, 55, 184, 170, 139, 195, 11, 23, 175, 124, 22, 128, 187, 178, 44, 13, 203, 183, 226, 54, 117, 226, 209, 25, 230, 156, 94, 214, 53, 6, 21, 222, 132, 182, 161, 42, 225, 166, 32, 52, 131, 209, 8, 181, 3, 14, 184, 226, 59, 162, 40, 193, 44, 146, 92, 77, 180, 83, 190, 74, 86, 193, 21, 178, 107, 178, 235, 13, 32, 59, 167, 17, 82, 81, 215, 148, 95, 70, 129, 149, 220, 36, 24, 84, 204, 106, 175, 217, 36, 187, 195, 169, 155, 178, 139, 112, 142, 231, 171, 129, 34, 140, 180, 192, 115, 234, 152, 198, 77, 223, 181, 198, 156, 177, 3, 165, 83, 153, 186, 180, 115, 69, 135, 4, 31, 237, 129, 130, 210, 232, 48, 121, 210, 197, 0, 233, 195, 83, 119, 252, 135, 252, 15, 26, 128, 141, 247, 33, 154, 3, 125, 129, 77, 118, 53, 43, 182, 222, 40, 160, 117, 191, 163, 135, 63, 191, 229, 10, 109, 55, 248, 142, 214, 7, 184, 1, 209, 3, 248, 139, 162, 144, 122, 39, 32, 122, 79, 124, 3, 127, 141, 42, 32, 13, 226, 102, 184, 165, 238, 208, 131, 28, 186, 140, 47, 13, 243, 60, 176, 201, 52, 229, 3, 97, 186, 47, 9, 43, 73, 115, 246, 118, 172, 240, 79, 154, 148, 154, 152, 254, 68, 19, 173, 232, 31, 120, 138, 130, 223, 156, 126, 164, 235, 176, 82, 159, 148, 111, 227, 226, 102, 63, 68, 27, 25, 140, 23, 232, 79, 48, 83, 3, 119, 219, 219, 86, 94, 55, 80, 137, 240, 160, 137, 229, 75, 221, 48, 139, 165, 65, 224, 179, 170, 86, 151, 255, 208, 61, 125, 166, 7, 8, 232, 65, 158, 200, 78, 118, 65, 154, 73, 222, 233, 132, 181, 251, 86, 78, 194, 198, 12, 194, 134, 181, 150, 19, 181, 129, 12, 124, 134, 236, 238, 216, 198, 104, 156, 250, 154, 248, 240, 84, 78, 116, 170, 67, 39, 6, 51, 232, 169, 228, 2, 132, 14, 56, 226, 17, 203, 193, 70, 11, 219, 183, 78, 142, 41, 232, 71, 44, 74, 90, 205, 17, 36, 100, 242, 20, 98, 212, 207, 138, 133, 61, 41, 223, 97, 61, 59, 138, 245, 159, 24, 124, 185, 181, 175, 202, 138, 231, 11, 147, 244, 107, 140, 77, 101, 41, 2, 62, 49, 125, 158, 134, 215, 107, 131, 80, 31, 145, 102, 120, 56, 248, 236, 192, 17, 226, 245, 119, 193, 147, 107, 155, 169, 236, 109, 83, 36, 53, 198, 145, 157, 162, 184, 72, 105, 235, 108, 86, 44, 141, 194, 21, 25, 130, 70, 169, 241, 61, 170, 149, 85, 158, 252, 0, 49, 175, 254, 169, 254, 88, 118, 188, 84, 59, 15, 137, 135, 222, 198, 160, 178, 245, 43, 196, 37, 185, 236, 3, 80, 1, 97, 94, 85, 170, 95, 2, 57, 41, 248, 242, 187, 143, 161, 84, 110, 167, 165, 193, 237, 26, 232, 178, 141, 160, 47, 189, 129, 74, 133, 4, 20, 151, 223, 87, 166, 67, 232, 230, 128, 19, 20, 190, 131, 34, 34, 79, 114, 206, 78, 105, 28, 126, 42, 178, 77, 155, 208, 124, 163, 38, 238, 15, 216, 42, 78, 199, 137, 59, 132, 60, 106, 112, 230, 110, 183, 0, 192, 144, 151, 135, 220, 81, 89, 163, 20, 107, 209, 51, 225, 152, 193, 38, 5, 60, 12, 54, 33, 120, 119, 3, 162, 3, 255, 248, 243, 220, 66, 100, 208, 198, 159, 61, 158, 254, 200, 74, 199, 200, 163, 122, 206, 132, 234, 89, 219, 219, 18, 78, 55, 68, 181, 32, 158, 9, 45, 172, 235, 55, 131, 89, 188, 87, 172, 208, 220, 138, 58, 117, 121, 238, 226, 66, 34, 193, 153, 126, 49, 26, 29, 251, 77, 2, 175, 131, 193, 17, 224, 67, 219, 30, 46, 146, 176, 248, 219, 1, 31, 213, 35, 2, 46, 164, 10, 165, 145, 13, 221, 43, 138, 106, 58, 141, 32, 111, 33, 203, 124, 192, 116, 98, 201, 188, 86, 216, 81, 216, 48, 65, 48, 135, 5, 82, 233, 219, 152, 9, 154, 102, 88, 156, 168, 96, 245, 156, 184, 36, 112, 238, 63, 143, 56, 169, 95, 145, 148, 14, 82, 170, 130, 171, 34, 102, 115, 114, 174, 158, 144, 71, 112, 99, 24, 215, 76, 156, 121, 69, 155, 170, 50, 146, 36, 27, 193, 203, 30, 23, 193, 100, 21, 110, 224, 180, 25, 68, 157, 82, 215, 212, 32, 186, 101, 255, 242, 159, 9, 125, 57, 30, 67, 197, 31, 239, 251, 160, 129, 79, 249, 195, 116, 141, 173, 141, 121, 62, 240, 71, 183, 3, 134, 92, 250, 225, 68, 199, 193, 35, 29, 89, 40, 178, 60, 240, 103, 222, 157, 146, 84, 255, 62, 87, 30, 148, 166, 51, 253, 0, 108, 246, 63, 99, 164, 233, 141, 8, 195, 115, 34, 71, 10, 110, 158, 4, 12, 76, 40, 143, 47, 56, 53, 217, 209, 209, 60, 167, 47, 160, 153, 148, 63, 48, 150, 233, 71, 252, 228, 15, 239, 223, 81, 79, 44, 209, 223, 226, 168, 166, 83, 229, 119, 21, 163, 225, 206, 124, 78, 168, 131, 159, 27, 204, 28, 182, 207, 217, 155, 206, 234, 220, 38, 68, 192, 133, 100, 213, 154, 109, 18, 85, 80, 67, 187, 158, 105, 55, 46, 100, 49, 8, 22, 207, 6, 92, 15, 108, 63, 18, 75, 63, 89, 8, 120, 61, 5, 7, 9, 113, 91, 5, 3, 169, 21, 39, 219, 214, 86, 33, 190, 147, 69, 123, 53, 187, 0, 30, 139, 212, 126, 109, 181, 216, 238, 91, 15, 28, 243, 151, 203, 166, 223, 204, 152, 57, 225, 209, 235, 15, 189, 122, 193, 212, 67, 164, 25, 6, 7, 5, 36, 254, 21, 187, 118, 54, 233, 253, 158, 131, 156, 146, 72, 218, 192, 68, 91, 115, 222, 137, 164, 143, 169, 2, 89, 68, 126, 43, 148, 205, 148, 166, 240, 189, 166, 194, 89, 37, 53, 191, 41, 8, 75, 55, 253, 28, 128, 169, 187, 157, 136, 40, 183, 184, 63, 198, 195, 170, 160, 89, 108, 144, 209, 59, 111, 218, 11, 208, 103, 4, 216, 123, 239, 47, 199, 106, 179, 39, 48, 158, 71, 246, 254, 136, 132, 179, 178, 104, 201, 137, 214, 247, 148, 207, 223, 181, 70, 158, 22, 216, 72, 197, 228, 6, 114, 141, 47, 27, 139, 184, 248, 167, 54, 33, 184, 32, 40, 229, 90, 93, 49, 211, 211, 151, 214, 200, 163, 167, 116, 159, 240, 79, 172, 237, 209, 65, 203, 216, 194, 138, 11, 84, 117, 194, 232, 137, 119, 33, 40, 220, 77, 238, 129, 116, 226, 93, 78, 171, 48, 251, 94, 224, 141, 37, 187, 44, 253, 183, 24, 52, 136, 158, 105, 211, 97, 33, 83, 87, 254, 163, 92, 35, 99, 30, 74, 59, 212, 213, 62, 219, 142, 85, 65, 54, 250, 2, 19, 157, 161, 225, 2, 50, 115, 184, 110, 42, 91, 63, 58, 12, 157, 43, 10, 185, 208, 137, 142, 197, 237, 235, 85, 149, 1, 248, 0, 13, 183, 62, 169, 138, 125, 114, 5, 125, 42, 97, 162, 108, 95, 59, 108, 209, 83, 38, 25, 82, 117, 48, 104, 112, 42, 97, 20, 1, 195, 138, 161, 254, 124, 139, 108, 59, 109, 13, 101, 247, 17, 55, 9, 244, 158, 138, 13, 15, 47, 161, 210, 92, 225, 13, 163, 54, 156, 124, 107, 127, 231, 49, 112, 75, 0, 88, 182, 250, 153, 75, 187, 154, 97, 149, 34, 80, 98, 196, 82, 126, 143, 25, 246, 115, 86, 200, 239, 166, 163, 136, 101, 198, 229, 140, 144, 161, 213, 162, 176, 36, 149, 231, 177, 113, 57, 31, 214, 47, 97, 254, 227, 137, 145, 133, 49, 173, 186, 94, 55, 147, 77, 100, 105, 154, 246, 6, 41, 86, 62, 78, 186, 138, 90, 38, 14, 48, 138, 38, 99, 156, 206, 61, 5, 86, 140, 50, 92, 145, 86, 61, 115, 192, 65, 63, 133, 75, 27, 25, 161, 98, 239, 179, 181, 79, 11, 82, 225, 197, 103, 1, 58, 118, 89, 248, 213, 88, 161, 183, 170, 88, 105, 139, 75, 181, 231, 107, 206, 20, 151, 53, 82, 112, 228, 197, 229, 178, 237, 174, 116, 140, 115, 41, 73, 164, 196, 193, 170, 160, 148, 158, 124, 147, 83, 165, 35, 199, 150, 245, 88, 195, 224, 74, 86, 210, 79, 26, 254, 205, 47, 227, 199, 211, 65, 119, 149, 25, 128, 101, 21, 12, 202, 94, 224, 225, 55, 224, 45, 216, 68, 229, 244, 17, 68, 99, 52, 52, 205, 190, 4, 49, 5, 241, 54, 107, 102, 63, 89, 180, 217, 157, 139, 26, 64, 82, 153, 33, 170, 65, 76, 119, 249, 134, 80, 120, 88, 206, 93, 88, 203, 218, 227, 164, 105, 110, 216, 176, 108, 170, 96, 120, 121, 74, 7, 100, 47, 253, 255, 217, 182, 119, 28, 30, 185, 173, 76, 74, 190, 239, 117, 231, 62, 76, 187, 62, 221, 13, 245, 75, 81, 208, 108, 115, 65, 25, 140, 31, 234, 62, 33, 13, 214, 80, 254, 208, 132, 83, 69, 101, 188, 159, 33, 245, 91, 71, 185, 213, 79, 17, 116, 111, 161, 30, 163, 232, 70, 26, 13, 237, 18, 84, 228, 30, 238, 155, 142, 128, 116, 128, 105, 201, 138, 191, 41, 47, 206, 76, 4, 84, 183, 181, 6, 103, 123, 49, 166, 90, 51, 120, 107, 47, 149, 174, 95, 17, 185, 244, 86, 203, 103, 95, 173, 135, 230, 56, 35, 102, 54, 142, 107, 229, 221, 77, 199, 21, 76, 216, 248, 46, 229, 146, 78, 186, 121, 1, 20, 90, 115, 234, 10, 134, 117, 187, 204, 173, 12, 183, 59, 253, 114, 79, 215, 70, 15, 208, 186, 127, 232, 186, 168, 17, 177, 173, 79, 108, 87, 119, 92, 139, 100, 71, 127, 57, 126, 137, 167, 112, 72, 39, 53, 46, 135, 139, 96, 239, 18, 168, 119, 77, 94, 162, 66, 4, 214, 58, 99, 143, 127, 153, 230, 163, 36, 37, 15, 202, 18, 169, 107, 15, 194, 101, 133, 62, 194, 213, 94, 170, 15, 148, 198, 171, 229, 148, 126, 168, 241, 220, 186, 229, 207, 10, 113, 194, 225, 160, 161, 233, 194, 115, 179, 97, 110, 236, 160, 179, 122, 200, 62, 252, 149, 43, 135, 57, 149, 249, 112, 142, 160, 97, 146, 94, 215, 63, 80, 38, 14, 136, 113, 219, 192, 83, 198, 91, 63, 117, 20, 169, 142, 133, 154, 112, 246, 187, 200, 211, 127, 209, 81, 152, 163, 8, 162, 0, 17, 79, 21, 177, 104, 146, 58, 225, 45, 244, 141, 198, 125, 144, 187, 35, 207, 60, 98, 211, 131, 80, 125, 162, 8, 53, 66, 105, 218, 172, 240, 172, 4, 223, 158, 99, 11, 251, 103, 77, 236, 122, 22, 166, 143, 172, 197, 243, 117, 174, 150, 190, 250, 71, 55, 60, 98, 201, 199, 104, 167, 74, 153, 105, 112, 33, 7, 118, 110, 75, 166, 176, 112, 194, 224, 79, 151, 125, 206, 62, 25, 187, 136, 132, 144, 252, 131, 127, 14, 142, 86, 106, 49, 171, 83, 154, 42, 141, 80, 84, 194, 32, 136, 9, 134, 217, 255, 189, 120, 157, 84, 194, 94, 225, 53, 157, 38, 208, 53, 73, 91, 209, 230, 149, 9, 153, 227, 71, 104, 69, 156, 89, 234, 210, 222, 78, 72, 91, 165, 163, 191, 22, 202, 80, 57, 67, 153, 113, 148, 140, 78, 139, 42, 27, 200, 254, 146, 232, 67, 101, 59, 197, 194, 21, 54, 19, 234, 116, 172, 47, 246, 11, 64, 185, 203, 154, 77, 18, 20, 135, 71, 29, 228, 9, 145, 165, 138, 219, 74, 180, 59, 89, 92, 25, 18, 236, 252, 58, 154, 110, 0, 100, 192, 146, 126, 27, 81, 148, 7, 91, 32, 86, 149, 200, 40, 226, 105, 189, 255, 11, 181, 153, 48, 107, 58, 66, 98, 212, 24, 235, 120, 106, 132, 78, 188, 123, 58, 22, 211, 46, 146, 86, 149, 30, 85, 208, 4, 191, 211, 248, 10, 61, 133, 131, 90, 51, 161, 2, 25, 195, 120, 205, 244, 124, 120, 133, 52, 115, 195, 42, 177, 242, 114, 47, 63, 137, 103, 1, 85, 214, 30, 55, 36, 155, 70, 16, 216, 38, 115, 84, 82, 226, 48, 88, 68, 49, 17, 80, 76, 59, 156, 24, 227, 1, 53, 178, 12, 79, 36, 75, 22, 203, 199, 108, 134, 74, 0, 234, 215, 183, 50, 170, 32, 154, 0, 88, 66, 178, 67, 23, 94, 77, 200, 157, 12, 74, 33, 205, 60, 141, 71, 183, 167, 71, 135, 187, 245, 172, 225, 121, 95, 115, 11, 9, 14, 31, 75, 108, 78, 229, 87, 191, 56, 132, 18, 50, 66, 161, 34, 72, 109, 77, 246, 9, 219, 117, 203, 36, 154, 115, 130, 156, 161, 178, 210, 86, 48, 196, 215, 133, 13, 82, 165, 1, 210, 9, 53, 47, 204, 96, 195, 39, 216, 82, 124, 228, 75, 90, 65, 2, 213, 11, 169, 71, 121, 111, 209, 25, 48, 83, 113, 134, 221, 227, 248, 39, 70, 9, 226, 252, 175, 187, 250, 5, 175, 118, 83, 24, 84, 199, 44, 250, 37, 99, 57, 66, 186, 168, 181, 198, 140, 252, 212, 32, 99, 37, 197, 89, 98, 90, 15, 110, 0, 244, 212, 191, 29, 19, 230, 71, 233, 73, 175, 152, 24, 133, 53, 237, 107, 123, 0, 215, 169, 131, 133, 137, 211, 253, 199, 62, 54, 15, 92, 30, 243, 34, 188, 108, 217, 243, 145, 132, 47, 252, 26, 66, 108, 26, 61, 158, 225, 151, 221, 212, 195, 133, 116, 229, 198, 146, 157, 147, 99, 115, 76, 2, 160, 180, 187, 146, 145, 106, 140, 112, 147, 71, 84, 36, 139, 206, 73, 122, 128, 187, 162, 132, 181, 212, 57, 223, 167, 43, 127, 61, 16, 154, 209, 246, 159, 253, 175, 114, 238, 92, 48, 206, 100, 22, 52, 48, 112, 92, 152, 147, 205, 32, 145, 52, 94, 176, 78, 86, 36, 245, 113, 181, 63, 87, 154, 73, 32, 48, 235, 4, 78, 139, 140, 83, 136, 243, 201, 82, 23, 228, 55, 9, 101, 221, 127, 7, 233, 213, 78, 126, 247, 165, 8, 6, 145, 196, 188, 167, 145, 11, 2, 58, 139, 212, 194, 107, 40, 26, 47, 170, 204, 248, 68, 60, 40, 181, 112, 36, 36, 88, 12, 132, 251, 186, 33, 10, 11, 183, 32, 180, 82, 183, 164, 200, 78, 206, 213, 43, 175, 72, 63, 169, 246, 192, 115, 197, 194, 170, 144, 247, 122, 234, 252, 230, 57, 20, 114, 175, 56, 102, 91, 252, 28, 35, 161, 70, 9, 13, 130, 219, 223, 9, 183, 236, 166, 242, 239, 41, 114, 67, 68, 53, 163, 169, 74, 28, 231, 119, 105, 91, 7, 245, 194, 192, 172, 253, 207, 148, 115, 182, 132, 51, 7, 253, 153, 180, 157, 44, 173, 201, 87, 87, 53, 123, 94, 213, 203, 80, 26, 60, 129, 43, 170, 67, 212, 146, 95, 161, 100, 156, 219, 72, 241, 36, 218, 238, 133, 21, 132, 140, 244, 163, 34, 237, 252, 9, 33, 138, 112, 29, 213, 76, 100, 235, 68, 72, 33, 226, 151, 161, 91, 6, 82, 164, 94, 113, 80, 14, 145, 255, 64, 80, 40, 172, 21, 2, 196, 246, 127, 110, 220, 50, 45, 198, 214, 198, 101, 223, 101, 104, 138, 18, 105, 99, 225, 126, 232, 247, 37, 241, 69, 1, 147, 141, 73, 166, 82, 122, 71, 244, 1, 47, 28, 115, 217, 141, 108, 151, 133, 215, 103, 80, 174, 76, 66, 186, 91, 144, 74, 18, 210, 231, 240, 94, 3, 177, 40, 10, 181, 222, 168, 106, 119, 103, 93, 177, 16, 113, 193, 91, 8, 122, 4, 145, 72, 240, 208, 253, 136, 208, 9, 119, 224, 94, 239, 252, 175, 85, 39, 29, 165, 122, 170, 194, 37, 44, 136, 139, 46, 252, 97, 157, 111, 225, 254, 98, 150, 99, 225, 133, 188, 98, 212, 197, 21, 156, 2, 57, 68, 176, 121, 58, 255, 59, 29, 236, 242, 240, 143, 14, 159, 237, 178, 196, 82, 1, 96, 79, 144, 186, 173, 15, 179, 162, 147, 93, 75, 161, 230, 222, 180, 8, 182, 67, 197, 103, 161, 230, 159, 186, 66, 235, 153, 169, 121, 97, 69, 62, 120, 41, 194, 245, 52, 231, 3, 8, 240, 84, 52, 9, 73, 168, 137, 62, 168, 182, 229, 84, 106, 255, 188, 162, 218, 20, 201, 21, 189, 128, 158, 180, 13, 20, 216, 152, 81, 130, 21, 38, 22, 15, 130, 87, 40, 59, 225, 232, 113, 145, 183, 121, 25, 245, 50, 49, 186, 61, 254, 28, 143, 225, 10, 212, 250, 3, 230, 27, 251, 87, 109, 70, 122, 181, 35, 81, 6, 137, 99, 35, 0, 40, 87, 183, 132, 87, 120, 79, 165, 133, 125, 19, 135, 104, 109, 58, 20, 133, 55, 254, 163, 103, 135, 184, 167, 60, 177, 12, 211, 35, 220, 245, 92, 58, 67, 44, 70, 94, 118, 140, 35, 201, 137, 198, 174, 218, 104, 57, 155, 46, 93, 252, 208, 225, 165, 164, 87, 147, 93, 78, 2, 195, 158, 212, 27, 241, 119, 98, 79, 49, 238, 115, 50, 188, 146, 253, 198, 175, 140, 35, 216, 217, 55, 203, 25, 123, 63, 68, 25, 123, 212, 169, 21, 39, 64, 152, 241, 35, 95, 151, 214, 186, 124, 150, 189, 161, 168, 217, 211, 83, 152, 181, 46, 25, 60, 74, 13, 46, 226, 209, 131, 12, 52, 71, 168, 189, 204, 209, 27, 158, 5, 181, 245, 51, 17, 117, 215, 93, 79, 100, 159, 51, 89, 107, 193, 225, 67, 167, 45, 27, 131, 92, 242, 115, 112, 31, 226, 192, 167, 226, 188, 185, 200, 57, 69, 118, 149, 27, 82, 234, 23, 249, 166, 181, 241, 148, 61, 87, 39, 239, 113, 231, 234, 28, 78, 99, 244, 121, 182, 136, 220, 33, 168, 113, 213, 97, 95, 142, 103, 8, 144, 152, 65, 125, 247, 117, 125, 17, 153, 65, 99, 186, 184, 6, 205, 235, 25, 116, 162, 68, 90, 199, 81, 27, 149, 128, 166, 56, 32, 66, 22, 68, 254, 174, 243, 79, 247, 51, 108, 45, 165, 71, 53, 20, 108, 172, 230, 39, 128, 170, 124, 252, 107, 203, 119, 171, 15, 114, 113, 167, 101, 235, 94, 42, 14, 210, 151, 254, 222, 45, 151, 234, 43, 63, 175, 58, 33, 106, 227, 48, 64, 180, 177, 0, 208, 95, 111, 195, 162, 248, 86, 246, 65, 156, 175, 128, 29, 55, 68, 50, 45, 212, 24, 26, 243, 202, 222, 109, 84, 2, 77, 79, 96, 74, 79, 197, 142, 244, 43, 190, 179, 226, 12, 173, 254, 3, 235, 176, 183, 163, 29, 226, 50, 209, 131, 103, 85, 37, 214, 169, 22, 192, 38, 187, 195, 82, 171, 245, 95, 25, 109, 145, 171, 143, 129, 114, 195, 147, 14, 172, 132, 31, 65, 107, 69, 147, 75, 142, 246, 218, 208, 119, 128, 99, 229, 178, 44, 157, 63, 10, 22, 75, 229, 130, 216, 66, 137, 177, 255, 99, 224, 235, 185, 74, 221, 48, 243, 71, 113, 179, 28, 114, 183, 157, 71, 4, 218, 143, 219, 63, 230, 204, 162, 155, 7, 177, 250, 57, 236, 202, 8, 109, 234, 225, 214, 62, 217, 22, 241, 67, 44, 7, 94, 237, 64, 1, 26, 187, 15, 142, 118, 134, 66, 61, 37, 117, 236, 53, 51, 71, 209, 220, 111, 203, 229, 205, 0, 141, 12, 108, 48, 80, 152, 4, 76, 114, 126, 168, 198, 233, 151, 186, 11, 171, 62, 165, 231, 189, 49, 136, 245, 68, 241, 231, 213, 168, 100, 113, 122, 244, 158, 105, 70, 15, 170, 245, 202, 78, 235, 210, 228, 80, 63, 18, 100, 209, 20, 104, 147, 177, 182, 255, 171, 97, 250, 57, 142, 92, 216, 29, 9, 94, 50, 222, 132, 220, 77, 97, 202, 145, 35, 92, 14, 11, 163, 100, 201, 56, 109, 204, 131, 3, 47, 235, 160, 131, 42, 123, 84, 121, 64, 13, 150, 14, 6, 213, 104, 47, 47, 113, 173, 239, 215, 191, 219, 141, 249, 189, 119, 110, 55, 59, 202, 178, 36, 116, 206, 52, 43, 168, 241, 37, 137, 168, 76, 31, 181, 225, 78, 86, 235, 40, 232, 177, 51, 252, 124, 74, 10, 37, 41, 6, 146, 104, 36, 246, 30, 30, 155, 57, 25, 87, 67, 190, 142, 157, 108, 51, 138, 18, 222, 95, 130, 87, 161, 87, 130, 189, 194, 28, 160, 88, 63, 169, 56, 255, 224, 207, 236, 90, 60, 122, 245, 9, 56, 127, 82, 93, 212, 190, 86, 235, 20, 254, 22, 37, 94, 12, 172, 204, 159, 68, 156, 122, 254, 238, 50, 215, 247, 67, 5, 159, 79, 134, 170, 35, 238, 91, 180, 33, 164, 157, 144, 217, 251, 113, 218, 183, 166, 213, 248, 134, 68, 169, 179, 58, 192, 217, 122, 183, 185, 113, 107, 210, 147, 153, 51, 80, 79, 149, 144, 47, 227, 46, 66, 210, 61, 112, 82, 234, 64, 191, 148, 106, 167, 109, 98, 62, 183, 35, 27, 143, 62, 134, 185, 162, 89, 159, 179, 241, 42, 133, 106, 165, 234, 206, 245, 176, 42, 104, 11, 16, 254, 111, 199, 255, 89, 36, 1, 95, 7, 188, 246, 158, 208, 208, 10, 233, 80, 60, 34, 188, 119, 123, 117, 192, 52, 244, 187, 57, 40, 83, 159, 184, 34, 47, 48, 200, 58, 133, 10, 127, 162, 70, 176, 200, 188, 224, 140, 208, 24, 249, 114, 120, 3, 79, 99, 62, 54, 110, 40, 222, 170, 28, 52, 42, 29, 55, 195, 44, 11, 157, 150, 180, 171, 132, 51, 4, 248, 29, 198, 115, 76, 96, 156, 154, 148, 110, 251, 126, 128, 92, 162, 117, 163, 43, 147, 55, 53, 70, 43, 34, 156, 204, 131, 253, 31, 142, 16, 132, 164, 184, 116, 247, 45, 190, 176, 119, 101, 93, 144, 29, 5, 3, 76, 194, 176, 74, 85, 143, 232, 77, 98, 148, 72, 93, 97, 244, 71, 126, 182, 41, 49, 13, 244, 216, 118, 106, 165, 146, 4, 166, 186, 125, 193, 118, 37, 214, 193, 2, 140, 110, 36, 241, 71, 126, 58, 129, 128, 236, 194, 27, 111, 219, 53, 240, 78, 131, 238, 110, 175, 5, 208, 101, 21, 15, 185, 59, 10, 96, 55, 247, 80, 246, 135, 251, 92, 187, 152, 32, 221, 184, 145, 142, 149, 120, 170, 110, 195, 146, 84, 226, 140, 185, 18, 217, 127, 251, 80, 57, 68, 84, 179, 162, 112, 37, 197, 136, 132, 19, 98, 220, 105, 51, 36, 85, 73, 7, 224, 163, 115, 155, 37, 105, 105, 193, 83, 83, 213, 237, 183, 17, 30, 154, 167, 61, 85, 18, 109, 108, 3, 57, 228, 235, 14, 0, 38, 34, 138, 130, 253, 156, 65, 69, 213, 245, 63, 2, 232, 168, 225, 45, 171, 55, 5, 182, 43, 33, 212, 88, 56, 130, 49, 117, 34, 104, 195, 138, 87, 234, 229, 163, 111, 11, 131, 208, 84, 214, 184, 76, 56, 216, 159, 246, 78, 64, 160, 53, 222, 180, 63, 67, 158, 203, 211, 151, 224, 216, 13, 64, 9, 241, 175, 20, 32, 149, 68, 46, 247, 61, 71, 40, 119, 228, 34, 175, 244, 169, 18, 209, 240, 0, 89, 117, 21, 146, 21, 115, 235, 84, 245, 95, 56, 78, 36, 15, 206, 165, 61, 169, 123, 251, 69, 203, 195, 107, 115, 58, 179, 11, 238, 155, 9, 106, 73, 23, 39, 191, 22, 166, 143, 182, 67, 6, 183, 120, 166, 136, 232, 36, 81, 123, 203, 243, 212, 255, 210, 52, 207, 147, 51, 82, 135, 120, 196, 170, 80, 0, 151, 202, 156, 5, 56, 100, 126, 245, 119, 11, 255, 178, 142, 4, 221, 1, 33, 25, 158, 169, 138, 102, 234, 122, 231, 27, 162, 16, 166, 35, 232, 144, 19, 188, 45, 20, 243, 159, 199, 237, 181, 173, 124, 165, 189, 157, 166, 58, 238, 180, 45, 74, 151, 56, 88, 70, 221, 162, 43, 238, 157, 225, 59, 72, 173, 229, 117, 16, 116, 79, 242, 163, 118, 134, 248, 167, 151, 255, 152, 159, 65, 159, 163, 95, 199, 245, 92, 12, 38, 105, 174, 140, 221, 121, 153, 200, 106, 251, 161, 22, 235, 220, 54, 217, 44, 17, 32, 56, 132, 235, 8, 174, 66, 141, 210, 251, 205, 59, 254, 43, 244, 238, 106, 160, 63, 167, 13, 15, 255, 244, 77, 210, 186, 136, 194, 114, 104, 235, 188, 130, 31, 247, 122, 147, 40, 0, 84, 150, 122, 214, 211, 241, 30, 250, 190, 234, 237, 193, 185, 48, 143, 20, 125, 109, 226, 158, 17, 43, 86, 110, 205, 40, 166, 105, 166, 106, 76, 124, 77, 105, 116, 100, 28, 113, 123, 178, 31, 220, 158, 155, 148, 31, 134, 220, 234, 64, 235, 209, 127, 131, 147, 110, 47, 41, 170, 115, 169, 81, 16, 164, 150, 161, 20, 140, 95, 101, 107, 17, 42, 223, 54, 176, 45, 96, 85, 163, 245, 192, 140, 112, 193, 239, 218, 105, 183, 183, 196, 251, 198, 6, 46, 161, 134, 79, 144, 175, 169, 43, 18, 202, 49, 176, 138, 77, 61, 161, 78, 182, 105, 159, 47, 162, 28, 237, 74, 105, 137, 44, 199, 208, 225, 75, 123, 221, 2, 223, 168, 236, 81, 28, 23, 222, 247, 41, 62, 75, 240, 199, 36, 127, 148, 210, 236, 167, 13, 61, 197, 91, 4, 78, 145, 238, 56, 232, 7, 51, 245, 178, 216, 77, 180, 77, 48, 237, 110, 66, 0, 15, 253, 32, 165, 231, 106, 236, 204, 202, 74, 172, 91, 232, 9, 72, 119, 128, 237, 99, 7, 39, 160, 208, 157, 197, 218, 3, 16, 174, 193, 98, 120, 123, 173, 0, 69, 91, 158, 187, 135, 246, 117, 189, 81, 67, 161, 159, 36, 175, 162, 228, 159, 59, 2, 225, 124, 21, 41, 176, 38, 220, 177, 105, 50, 44, 203, 47, 10, 119, 162, 44, 19, 19, 212, 196, 217, 181, 226, 110, 104, 242, 99, 144, 152, 206, 134, 108, 25, 42, 217, 190, 64, 28, 1, 241, 51, 187, 246, 69, 17, 168, 99, 198, 36, 155, 88, 8, 19, 138, 11, 132, 152, 253, 19, 2, 243, 237, 221, 246, 63, 101, 146, 16, 90, 0, 210, 233, 123, 148, 95, 235, 181, 89, 228, 10, 9, 88, 203, 117, 121, 43, 178, 35, 188, 119, 194, 22, 152, 181, 159, 57, 112, 43, 69, 150, 105, 213, 93, 28, 160, 39, 61, 104, 201, 183, 60, 47, 150, 80, 90, 177, 178, 30, 131, 96, 210, 112, 95, 250, 237, 226, 83, 208, 19, 139, 43, 158, 142, 43, 221, 7, 216, 237, 11, 31, 0, 65, 167, 66, 76, 19, 72, 37, 232, 30, 250, 128, 24, 227, 156, 36, 106, 197, 142, 255, 6, 33, 106, 192, 201, 178, 96, 38, 188, 53, 83, 50, 167, 47, 195, 52, 245, 137, 231, 31, 183, 50, 0, 168, 248, 121, 103, 180, 161, 16, 224, 98, 18, 95, 185, 248, 55, 65, 6, 45, 211, 157, 186, 75, 202, 166, 133, 227, 110, 48, 243, 203, 17, 22, 195, 236, 135, 225, 177, 155, 28, 127, 85, 152, 140, 79, 102, 111, 131, 45, 18, 33, 114, 110, 129, 237, 141, 143, 51, 110, 125, 234, 112, 93, 173, 76, 13, 186, 69, 170, 56, 171, 184, 27, 209, 199, 62, 169, 88, 84, 205, 136, 161, 74, 246, 75, 143, 206, 81, 50, 6, 135, 188, 94, 172, 29, 226, 26, 16, 81, 187, 93, 149, 208, 64, 204, 14, 174, 47, 92, 66, 125, 49, 21, 85, 104, 49, 204, 187, 6, 2, 77, 213, 23, 46, 95, 135, 68, 33, 216, 31, 254, 105, 121, 108, 62, 148, 39, 211, 156, 198, 91, 143, 254, 108, 73, 98, 63, 20, 31, 129, 161, 245, 159, 10, 42, 25, 239, 85, 188, 157, 237, 104, 88, 177, 143, 23, 1, 224, 107, 68, 110, 108, 52, 245, 160, 169, 10, 223, 27, 40, 252, 59, 233, 173, 104, 194, 92, 169, 5, 128, 169, 247, 103, 98, 52, 21, 255, 110, 204, 234, 70, 182, 10, 204, 6, 232, 196, 50, 126, 153, 80, 176, 8, 202, 255, 47, 69, 52, 42, 2, 10, 15, 32, 23, 255, 191, 198, 244, 119, 145, 162, 191, 225, 129, 93, 26, 43, 246, 119, 44, 230, 106, 39, 39, 29, 121, 54, 160, 203, 138, 82, 25, 148, 90, 85, 168, 5, 88, 123, 85, 254, 93, 250, 105, 35, 97, 45, 51, 224, 63, 96, 131, 209, 252, 112, 189, 2, 44, 107, 66, 36, 184, 153, 15, 210, 3, 214, 110, 180, 248, 84, 79, 104, 242, 145, 74, 150, 12, 187, 46, 152, 249, 79, 188, 198, 98, 174, 19, 250, 72, 29, 69, 216, 230, 49, 196, 33, 161, 21, 235, 142, 74, 55, 130, 109, 225, 131, 117, 244, 78, 25, 46, 65, 162, 49, 100, 71, 249, 214, 197, 88, 213, 239, 182, 99, 29, 143, 234, 172, 150, 45, 32, 119, 189, 153, 116, 252, 18, 178, 24, 244, 127, 242, 106, 31, 177, 68, 235, 151, 103, 155, 81, 255, 204, 25, 198, 205, 121, 89, 170, 128, 2, 95, 31, 240, 55, 77, 81, 147, 14, 67, 239, 96, 105, 116, 110, 163, 23, 79, 146, 196, 33, 213, 119, 135, 182, 152, 106, 207, 30, 129, 79, 39, 208, 229, 226, 181, 158, 140, 53, 38, 58, 202, 109, 74, 105, 157, 249, 224, 111, 254, 192, 252, 241, 189, 49, 186, 13, 179, 30, 108, 13, 38, 111, 155, 139, 178, 23, 200, 54, 191, 16, 219, 14, 41, 20, 231, 35, 247, 69, 82, 238, 227, 174, 147, 99, 25, 210, 167, 45, 120, 130, 247, 16, 196, 118, 229, 180, 129, 170, 92, 50, 249, 88, 150, 78, 119, 198, 170, 108, 150, 1, 249, 150, 158, 21, 220, 197, 151, 98, 140, 74, 73, 179, 232, 224, 96, 116, 21, 149, 109, 160, 205, 98, 205, 254, 92, 132, 135, 191, 165, 210, 68, 158, 57, 159, 97, 116, 222, 175, 114, 121, 79, 224, 215, 188, 145, 68, 197, 163, 163, 217, 170, 133, 160, 137, 68, 0, 188, 9, 215, 209, 145, 105, 55, 170, 77, 129, 124, 56, 252, 67, 14, 251, 35, 109, 38, 223, 15, 28, 147, 112, 132, 104, 50, 38, 140, 61, 165, 40, 198, 42, 213, 47, 110, 230, 74, 60, 118, 249, 118, 25, 127, 20, 149, 11, 240, 95, 186, 151, 178, 83, 37, 134, 151, 4, 33, 201, 240, 67, 252, 200, 227, 88, 202, 173, 243, 221, 122, 188, 236, 255, 43, 127, 37, 234, 22, 204, 122, 126, 135, 108, 236, 215, 45, 132, 61, 20, 154, 48, 97, 179, 54, 208, 172, 141, 164, 5, 197, 50, 115, 26, 229, 156, 47, 187, 143, 23, 112, 88, 178, 108, 177, 60, 68, 128, 45, 29, 168, 26, 112, 159, 10, 138, 156, 67, 36, 241, 178, 48, 145, 193, 134, 187, 124, 85, 207, 220, 103, 154, 194, 42, 16, 183, 249, 77, 149, 212, 71, 67, 220, 220, 211, 102, 51, 212, 125, 18, 77, 47, 208, 178, 20, 247, 182, 223, 56, 156, 203, 226, 240, 25, 207, 243, 120, 60, 46, 217, 219, 59, 5, 6, 167, 228, 38, 190, 198, 244, 30, 228, 210, 50, 56, 86, 238, 225, 166, 170, 192, 251, 100, 205, 116, 34, 227, 125, 175, 154, 67, 47, 84, 163, 83, 224, 34, 118, 251, 143, 7, 4, 116, 181, 137, 205, 8, 71, 74, 216, 198, 235, 19, 73, 87, 112, 147, 44, 228, 111, 155, 45, 75, 173, 168, 160, 119, 82, 189, 132, 175, 31, 237, 15, 231, 121, 174, 184, 218, 85, 3, 103, 235, 232, 151, 27, 149, 39, 51, 6, 62, 48, 199, 74, 52, 6, 153, 158, 103, 64, 15, 252, 133, 73, 231, 29, 113, 34, 69, 69, 119, 226, 80, 148, 76, 184, 138, 22, 115, 136, 33, 148, 0, 122, 245, 246, 161, 73, 243, 59, 128, 173, 251, 34, 187, 32, 40, 4, 110, 13, 34, 174, 209, 103, 44, 141, 231, 33, 49, 180, 238, 243, 13, 77, 8, 54, 241, 58, 118, 127, 29, 16, 129, 115, 226, 184, 79, 86, 17, 118, 161, 214, 115, 254, 131, 103, 28, 4, 26, 191, 231, 218, 7, 98, 120, 153, 86, 229, 142, 171, 4, 95, 29, 55, 104, 115, 183, 21, 78, 225, 118, 199, 98, 248, 35, 159, 220, 109, 198, 201, 146, 218, 103, 246, 203, 88, 231, 168, 40, 125, 50, 159, 240, 200, 237, 210, 160, 18, 222, 118, 222, 35, 36, 147, 5, 207, 96, 214, 31, 252, 248, 211, 45, 230, 107, 133, 14, 29, 77, 197, 16, 222, 53, 214, 158, 22, 154, 89, 168, 168, 209, 15, 230, 7, 0, 113, 12, 168, 110, 100, 36, 120, 65, 169, 69, 86, 150, 52, 246, 151, 192, 241, 199, 0, 220, 44, 218, 182, 133, 67, 116, 227, 12, 7, 3, 226, 204, 126, 40, 18, 153, 217, 211, 46, 49, 188, 241, 249, 79, 37, 186, 51, 116, 43, 109, 140, 97, 248, 166, 165, 148, 31, 219, 49, 215, 118, 5, 103, 247, 130, 152, 105, 119, 95, 136, 127, 254, 190, 13, 115, 103, 248, 3, 194, 71, 221, 34, 210, 216, 62, 179, 191, 94, 108, 56, 84, 146, 181, 202, 62, 37, 99, 145, 17, 240, 223, 89, 145, 168, 140, 180, 88, 16, 71, 195, 22, 58, 193, 195, 10, 194, 210, 145, 137, 226, 117, 179, 117, 188, 99, 61, 211, 5, 70, 83, 181, 210, 147, 40, 71, 111, 168, 71, 229, 96, 96, 192, 80, 106, 131, 236, 14, 60, 164, 61, 205, 199, 39, 159, 168, 159, 28, 133, 84, 68, 216, 164, 106, 155, 140, 18, 235, 115, 33, 53, 12, 35, 187, 194, 58, 116, 31, 205, 58, 60, 84, 209, 202, 75, 189, 119, 190, 92, 2, 68, 27, 243, 56, 181, 128, 95, 247, 237, 213, 142, 65, 93, 10, 255, 8, 193, 2, 114, 212, 181, 215, 29, 52, 249, 18, 149, 241, 174, 216, 125, 201, 204, 159, 135, 171, 99, 149, 140, 35, 171, 218, 59, 166, 149, 8, 216, 253, 119, 190, 211, 20, 110, 46, 6, 119, 94, 174, 38, 167, 151, 234, 26, 7, 154, 33, 250, 107, 84, 13, 98, 116, 233, 35, 9, 188, 48, 177, 241, 118, 162, 238, 20, 49, 66, 121, 38, 170, 234, 76, 86, 232, 167, 157, 143, 74, 42, 182, 147, 185, 211, 165, 154, 142, 170, 167, 57, 28, 162, 213, 236, 47, 152, 185, 164, 177, 225, 160, 55, 63, 102, 156, 160, 55, 250, 155, 73, 8, 154, 56, 38, 201, 192, 56, 249, 146, 141, 213, 114, 91, 187, 189, 151, 253, 181, 214, 35, 116, 208, 184, 104, 235, 165, 95, 112, 71, 126, 41, 57, 69, 112, 155, 164, 63, 54, 22, 19, 58, 31, 231, 110, 244, 107, 80, 175, 191, 203, 189, 191, 181, 136, 218, 217, 176, 145, 234, 90, 21, 80, 123, 221, 43, 27, 191, 200, 25, 16, 196, 176, 44, 82, 250, 9, 180, 23, 226, 141, 146, 138, 253, 17, 9, 146, 71, 212, 179, 96, 211, 182, 160, 123, 238, 97, 183, 125, 67, 59, 31, 220, 215, 192, 25, 85, 64, 20, 152, 153, 231, 147, 60, 66, 184, 245, 119, 19, 89, 82, 162, 111, 78, 131, 179, 204, 159, 194, 167, 58, 121, 30, 51, 74, 121, 124, 245, 134, 65, 252, 108, 65, 236, 166, 82, 138, 29, 169, 225, 154, 98, 138, 55, 43, 232, 186, 65, 43, 19, 55, 24, 55, 22, 253, 140, 106, 176, 109, 35, 24, 247, 40, 90, 201, 162, 154, 70, 168, 210, 93, 46, 41, 47, 227, 162, 195, 134, 183, 169, 134, 222, 229, 75, 101, 60, 87, 203, 242, 179, 195, 0, 168, 40, 145, 114, 134, 232, 36, 171, 219, 162, 34, 227, 156, 164, 161, 124, 25, 117, 224, 180, 147, 49, 203, 239, 25, 129, 169, 230, 171, 8, 168, 254, 15, 237, 255, 229, 223, 104, 23, 57, 3, 15, 81, 119, 34, 164, 237, 244, 163, 60, 156, 19, 213, 24, 77, 24, 42, 208, 150, 105, 3, 197, 161, 51, 4, 130, 161, 126, 120, 73, 231, 59, 253, 28, 128, 183, 30, 213, 13, 42, 8, 80, 66, 66, 132, 15, 157, 17, 124, 227, 83, 148, 52, 154, 27, 102, 90, 147, 230, 202, 49, 20, 178, 190, 126, 199, 117, 31, 245, 249, 83, 171, 214, 65, 38, 228, 85, 194, 90, 181, 111, 223, 72, 99, 217, 173, 17, 46, 87, 190, 174, 182, 90, 181, 53, 39, 75, 249, 180, 115, 83, 146, 235, 211, 248, 5, 50, 49, 216, 160, 254, 38, 10, 36, 142, 42, 85, 25, 25, 213, 192, 192, 99, 230, 9, 26, 191, 74, 61, 233, 26, 116, 199, 171, 180, 28, 197, 211, 138, 139, 90, 212, 106, 147, 4, 21, 254, 140, 231, 15, 124, 97, 51, 64, 101, 5, 33, 216, 106, 23, 142, 163, 167, 34, 72, 155, 98, 84, 55, 24, 108, 67, 0, 57, 146, 28, 171, 144, 7, 235, 108, 200, 132, 87, 16, 182, 54, 197, 139, 115, 98, 95, 136, 243, 183, 39, 185, 139, 220, 58, 156, 121, 232, 27, 108, 15, 132, 227, 79, 58, 217, 217, 91, 202, 209, 160, 129, 139, 238, 1, 82, 58, 11, 61, 134, 229, 22, 187, 213, 92, 168, 193, 21, 186, 153, 171, 115, 39, 101, 140, 96, 104, 198, 1, 234, 149, 226, 250, 60, 17, 133, 41, 18, 221, 227, 155, 33, 147, 112, 239, 236, 89, 207, 183, 184, 236, 95, 225, 67, 224, 224, 117, 175, 20, 210, 181, 14, 28, 135, 5, 231, 77, 67, 110, 83, 129, 75, 221, 183, 7, 239, 107, 215, 166, 174, 161, 85, 65, 26, 174, 160, 91, 45, 139, 224, 185, 227, 126, 234, 41, 235, 22, 236, 199, 173, 52, 245, 236, 90, 56, 229, 249, 132, 113, 45, 0, 148, 87, 222, 51, 89, 249, 79, 210, 42, 40, 145, 103, 238, 53, 36, 120, 233, 42, 119, 170, 132, 75, 210, 101, 135, 65, 173, 55, 147, 35, 160, 31, 38, 44, 249, 102, 160, 164, 182, 20, 144, 110, 243, 198, 247, 1, 106, 230, 120, 82, 116, 43, 100, 73, 175, 115, 60, 60, 232, 29, 233, 118, 168, 47, 62, 10, 234, 42, 45, 97, 5, 227, 217, 204, 22, 131, 6, 255, 226, 6, 13, 74, 180, 5, 13, 12, 233, 71, 28, 141, 236, 57, 92, 91, 184, 56, 130, 18, 250, 106, 148, 24, 55, 37, 43, 254, 42, 209, 213, 74, 104, 71, 162, 149, 134, 26, 37, 158, 147, 115, 233, 13, 107, 92, 98, 220, 86, 82, 244, 217, 38, 75, 209, 153, 124, 246, 227, 169, 230, 175, 204, 88, 246, 72, 91, 234, 251, 48, 110, 129, 117, 188, 72, 170, 224, 175, 68, 117, 20, 86, 99, 229, 206, 38, 69, 69, 188, 46, 176, 176, 206, 141, 32, 209, 38, 103, 235, 179, 60, 2, 26, 32, 21, 101, 196, 50, 206, 106, 11, 30, 211, 200, 145, 94, 120, 180, 30, 61, 1, 206, 41, 187, 120, 173, 2, 246, 240, 63, 39, 209, 57, 223, 15, 97, 246, 254, 236, 147, 121, 247, 32, 81, 171, 46, 152, 140, 179, 22, 98, 113, 102, 231, 40, 68, 149, 231, 35, 159, 80, 213, 59, 146, 94, 126, 135, 5, 239, 72, 184, 66, 96, 234, 197, 118, 72, 161, 181, 73, 244, 184, 125, 49, 25, 164, 221, 179, 170, 53, 140, 190, 89, 189, 151, 117, 115, 184, 6, 120, 84, 227, 116, 68, 183, 215, 138, 60, 49, 98, 239, 109, 236, 62, 123, 58, 226, 200, 245, 221, 113, 75, 229, 176, 66, 128, 4, 204, 86, 31, 145, 82, 128, 194, 84, 130, 36, 41, 89, 61, 1, 49, 129, 225, 147, 149, 23, 133, 255, 155, 87, 161, 185, 12, 81, 79, 242, 107, 218, 207, 101, 186, 2, 87, 80, 63, 19, 108, 112, 15, 193, 127, 219, 224, 206, 104, 84, 73, 201, 27, 68, 182, 232, 255, 217, 10, 121, 137, 197, 5, 30, 76, 23, 41, 169, 183, 207, 203, 22, 128, 235, 134, 168, 7, 9, 226, 105, 108, 31, 127, 243, 158, 61, 185, 160, 63, 206, 82, 175, 87, 216, 73, 60, 225, 157, 225, 10, 195, 255, 109, 68, 55, 137, 76, 202, 47, 60, 39, 244, 54, 133, 56, 156, 167, 93, 2, 253, 8, 46, 174, 94, 154, 195, 170, 242, 72, 147, 62, 93, 179, 81, 148, 222, 172, 157, 239, 205, 23, 193, 154, 59, 231, 56, 93, 245, 198, 79, 233, 107, 141, 63, 4, 35, 117, 13, 245, 76, 161, 241, 149, 221, 98, 207, 158, 98, 200, 79, 244, 142, 77, 12, 121, 160, 23, 146, 85, 235, 194, 245, 179, 88, 220, 175, 115, 87, 125, 109, 147, 245, 121, 240, 10, 110, 107, 101, 177, 84, 37, 99, 22, 191, 14, 247, 112, 231, 52, 109, 90, 11, 131, 174, 135, 33, 102, 101, 158, 206, 223, 104, 102, 185, 224, 52, 56, 97, 237, 140, 174, 217, 41, 39, 109, 204, 28, 216, 92, 244, 17, 159, 20, 238, 238, 120, 237, 159, 204, 99, 236, 182, 241, 145, 61, 224, 61, 204, 197, 229, 197, 146, 135, 248, 44, 247, 222, 240, 31, 116, 247, 134, 181, 35, 52, 117, 180, 81, 19, 211, 254, 104, 114, 2, 221, 70, 189, 129, 218, 138, 233, 219, 124, 238, 122, 50, 172, 99, 101, 27, 64, 248, 82, 129, 120, 219, 82, 127, 170, 146, 218, 173, 193, 2, 130, 21, 22, 250, 36, 224, 215, 151, 253, 225, 154, 143, 237, 240, 173, 242, 168, 197, 204, 123, 214, 133, 87, 219, 61, 234, 134, 34, 226, 154, 66, 41, 169, 63, 244, 61, 163, 244, 82, 101, 205, 113, 206, 132, 106, 67, 9, 30, 166, 77, 137, 124, 210, 30, 70, 56, 39, 114, 194, 31, 102, 12, 204, 217, 26, 133, 150, 181, 13, 92, 47, 230, 209, 125, 119, 215, 72, 185, 192, 235, 249, 92, 69, 53, 133, 112, 246, 156, 14, 91, 35, 49, 182, 107, 28, 176, 164, 116, 146, 122, 4, 119, 55, 208, 42, 139, 171, 215, 117, 15, 2, 182, 149, 232, 202, 176, 141, 85, 156, 63, 53, 104, 217, 162, 142, 226, 2, 191, 24, 43, 197, 104, 233, 127, 48, 24, 70, 95, 238, 60, 3, 12, 204, 61, 163, 70, 8, 55, 97, 163, 53, 211, 43, 147, 25, 187, 109, 111, 194, 162, 14, 161, 117], + [98, 193, 188, 237, 202, 107, 164, 214, 17, 87, 194, 220, 105, 62, 225, 203, 79, 158, 204, 252, 32, 228, 20, 32, 155, 183, 230, 173, 64, 22, 0, 146, 129, 90, 222, 3, 247, 197, 236, 97, 83, 43, 34, 170, 216, 238, 142, 208, 143, 1, 180, 4, 68, 13, 225, 137, 59, 158, 141, 47, 100, 195, 224, 154, 153, 0, 148, 25, 112, 220, 2, 12, 118, 1, 158, 8, 40, 5, 160, 72, 136, 94, 138, 203, 200, 136, 206, 183, 246, 53, 152, 59, 97, 167, 136, 82, 217, 156, 100, 74, 223, 37, 224, 33, 180, 78, 43, 180, 152, 63, 94, 44, 197, 236, 45, 18, 155, 142, 170, 63, 22, 121, 81, 226, 153, 101, 60, 58, 201, 101, 251, 21, 216, 128, 241, 184, 126, 35, 237, 253, 205, 103, 239, 95, 191, 27, 220, 100, 185, 163, 96, 148, 207, 14, 116, 191, 106, 48, 50, 89, 144, 160, 54, 153, 160, 22, 74, 57, 140, 35, 15, 142, 74, 218, 77, 248, 167, 156, 237, 166, 58, 201, 57, 249, 90, 53, 34, 121, 12, 20, 163, 160, 120, 10, 158, 60, 1, 57, 83, 2, 40, 25, 91, 143, 250, 113, 25, 209, 12, 158, 251, 105, 119, 156, 21, 118, 29, 202, 252, 118, 23, 35, 163, 113, 120, 241, 249, 87, 181, 54, 134, 246, 193, 174, 61, 10, 147, 55, 146, 67, 159, 90, 67, 16, 185, 87, 237, 199, 62, 41, 32, 214, 54, 3, 57, 57, 118, 142, 253, 100, 186, 255, 157, 102, 29, 24, 207, 150, 7, 204, 175, 215, 114, 50, 216, 95, 35, 247, 221, 56, 10, 171, 208, 46, 99, 36, 151, 127, 5, 37, 98, 155, 119, 151, 58, 63, 74, 255, 113, 111, 126, 105, 83, 71, 50, 24, 14, 99, 123, 14, 249, 197, 105, 183, 163, 78, 93, 58, 8, 94, 90, 234, 117, 118, 24, 128, 148, 253, 107, 36, 60, 202, 13, 70, 250, 83, 157, 0, 227, 102, 151, 253, 93, 177, 121, 193, 113, 176, 61, 151, 165, 51, 1, 166, 1, 205, 133, 36, 195, 108, 130, 105, 133, 36, 144, 236, 166, 238, 185, 169, 39, 209, 174, 34, 153, 248, 129, 174, 95, 127, 139, 107, 56, 219, 162, 62, 130, 168, 238, 161, 137, 52, 223, 144, 125, 80, 44, 87, 248, 244, 165, 68, 14, 132, 109, 23, 155, 128, 47, 236, 66, 36, 70, 230, 173, 27, 220, 148, 122, 231, 226, 199, 67, 174, 30, 245, 52, 31, 110, 240, 128, 23, 73, 118, 200, 64, 99, 216, 241, 23, 162, 210, 136, 153, 83, 51, 29, 1, 1, 30, 15, 160, 100, 35, 91, 188, 2, 87, 34, 215, 183, 9, 79, 163, 91, 80, 174, 26, 63, 25, 85, 61, 94, 244, 231, 123, 142, 231, 131, 88, 233, 70, 97, 113, 188, 163, 96, 123, 37, 221, 134, 100, 166, 73, 209, 136, 112, 36, 226, 27, 65, 58, 161, 13, 62, 26, 193, 107, 106, 165, 240, 216, 235, 123, 19, 134, 91, 210, 251, 171, 54, 161, 183, 54, 28, 238, 252, 126, 242, 72, 122, 157, 181, 20, 118, 108, 18, 199, 17, 34, 160, 250, 54, 4, 64, 127, 95, 112, 227, 37, 96, 210, 142, 143, 3, 17, 119, 98, 249, 254, 72, 105, 45, 197, 181, 30, 167, 22, 79, 39, 177, 50, 57, 69, 254, 4, 190, 187, 3, 64, 252, 135, 239, 182, 68, 163, 123, 45, 121, 2, 74, 171, 224, 109, 184, 63, 140, 136, 26, 244, 37, 34, 239, 181, 160, 151, 206, 198, 208, 44, 83, 233, 50, 166, 221, 230, 194, 94, 83, 103, 198, 109, 173, 203, 31, 51, 175, 46, 176, 19, 12, 202, 246, 156, 115, 22, 158, 238, 180, 200, 123, 137, 104, 94, 72, 205, 239, 72, 56, 123, 15, 53, 209, 88, 72, 63, 118, 4, 224, 222, 64, 151, 148, 59, 216, 8, 165, 165, 255, 199, 58, 209, 84, 21, 98, 95, 129, 76, 95, 155, 87, 246, 169, 84, 192, 57, 92, 40, 130, 237, 202, 169, 173, 4, 178, 221, 215, 101, 8, 75, 209, 200, 84, 218, 85, 152, 4, 5, 65, 231, 227, 210, 112, 78, 126, 15, 130, 2, 71, 246, 101, 46, 49, 47, 42, 96, 200, 143, 170, 188, 147, 170, 30, 57, 136, 13, 102, 31, 89, 20, 127, 185, 179, 58, 144, 39, 140, 139, 72, 114, 226, 248, 70, 228, 152, 10, 23, 176, 64, 28, 189, 138, 48, 236, 236, 225, 228, 90, 141, 83, 64, 124, 222, 253, 86, 101, 148, 210, 53, 40, 214, 104, 89, 156, 5, 111, 79, 9, 104, 80, 138, 69, 223, 156, 9, 92, 100, 62, 205, 48, 182, 252, 70, 168, 56, 110, 171, 229, 251, 40, 178, 61, 56, 137, 24, 168, 80, 125, 148, 233, 40, 220, 1, 17, 111, 45, 87, 173, 73, 253, 186, 97, 180, 83, 143, 231, 211, 252, 243, 188, 9, 159, 103, 45, 127, 52, 98, 222, 58, 79, 36, 98, 163, 152, 36, 148, 178, 113, 204, 160, 84, 64, 25, 244, 33, 169, 170, 189, 8, 112, 20, 120, 64, 14, 76, 15, 34, 251, 183, 172, 164, 93, 61, 235, 63, 212, 104, 181, 127, 159, 61, 218, 71, 47, 235, 117, 161, 142, 55, 8, 43, 160, 118, 2, 2, 4, 28, 195, 32, 108, 246, 101, 211, 87, 106, 218, 152, 54, 68, 11, 117, 143, 151, 162, 226, 203, 127, 58, 192, 90, 41, 4, 150, 227, 110, 65, 14, 49, 126, 213, 192, 207, 123, 90, 191, 28, 157, 64, 19, 53, 181, 230, 92, 101, 131, 110, 123, 171, 42, 181, 181, 105, 220, 167, 211, 3, 79, 250, 107, 50, 11, 159, 11, 17, 182, 99, 41, 111, 7, 108, 6, 216, 172, 59, 200, 83, 241, 40, 126, 100, 28, 242, 220, 180, 234, 206, 218, 160, 35, 173, 238, 172, 209, 33, 89, 201, 34, 94, 187, 224, 9, 77, 53, 182, 39, 82, 182, 55, 162, 107, 35, 118, 127, 63, 157, 73, 29, 197, 187, 121, 178, 136, 204, 89, 41, 217, 240, 191, 130, 104, 184, 204, 70, 171, 138, 10, 105, 155, 135, 11, 121, 58, 96, 163, 125, 128, 108, 224, 211, 48, 16, 173, 80, 131, 43, 79, 202, 71, 58, 174, 23, 248, 168, 71, 144, 5, 150, 163, 103, 246, 28, 147, 184, 24, 119, 235, 117, 218, 57, 202, 111, 176, 36, 176, 184, 81, 192, 142, 231, 144, 204, 1, 17, 197, 46, 120, 231, 252, 24, 201, 171, 194, 94, 98, 9, 11, 112, 139, 207, 55, 151, 105, 133, 13, 119, 111, 48, 222, 215, 25, 141, 111, 139, 225, 227, 165, 163, 18, 73, 12, 142, 95, 60, 75, 75, 113, 101, 21, 72, 136, 73, 150, 91, 147, 110, 172, 208, 70, 179, 86, 7, 139, 128, 179, 123, 155, 31, 182, 69, 43, 108, 85, 204, 165, 74, 216, 250, 139, 177, 178, 171, 213, 65, 179, 136, 94, 171, 27, 45, 191, 132, 30, 218, 168, 23, 53, 27, 91, 14, 146, 253, 88, 124, 120, 26, 62, 22, 179, 204, 173, 134, 74, 66, 189, 217, 247, 199, 121, 242, 241, 16, 94, 86, 166, 140, 15, 201, 73, 19, 208, 68, 208, 63, 118, 11, 122, 221, 147, 84, 42, 186, 166, 16, 77, 31, 172, 30, 28, 205, 126, 233, 15, 167, 208, 120, 215, 53, 86, 119, 27, 228, 206, 70, 47, 232, 232, 174, 203, 197, 69, 26, 239, 156, 57, 8, 107, 10, 127, 120, 225, 115, 38, 174, 60, 23, 206, 237, 41, 121, 61, 100, 203, 73, 207, 75, 239, 81, 4, 204, 97, 210, 6, 175, 108, 197, 245, 193, 139, 16, 26, 50, 155, 47, 81, 94, 113, 200, 22, 130, 203, 150, 180, 58, 93, 160, 14, 13, 125, 121, 188, 88, 4, 134, 225, 223, 29, 136, 72, 143, 191, 252, 101, 186, 182, 48, 202, 118, 153, 220, 210, 141, 233, 225, 14, 16, 168, 6, 102, 78, 239, 152, 124, 148, 215, 63, 93, 181, 154, 249, 149, 56, 120, 201, 65, 250, 200, 24, 11, 170, 238, 17, 61, 210, 40, 22, 122, 216, 114, 211, 138, 75, 184, 91, 146, 128, 202, 242, 55, 253, 19, 209, 131, 128, 165, 31, 67, 9, 88, 181, 32, 32, 115, 210, 115, 235, 181, 72, 135, 230, 198, 39, 202, 54, 180, 172, 165, 168, 170, 74, 208, 133, 150, 166, 7, 103, 144, 225, 3, 213, 99, 79, 1, 28, 205, 24, 185, 76, 108, 169, 245, 250, 144, 202, 224, 196, 153, 66, 177, 168, 23, 175, 31, 18, 123, 248, 173, 177, 175, 31, 245, 193, 72, 66, 253, 119, 192, 118, 239, 111, 244, 93, 5, 62, 111, 227, 154, 35, 184, 244, 157, 9, 62, 236, 254, 130, 11, 53, 156, 208, 204, 206, 220, 104, 124, 137, 38, 201, 226, 71, 41, 247, 161, 208, 174, 253, 52, 93, 232, 96, 33, 130, 171, 222, 75, 228, 146, 172, 3, 93, 175, 230, 178, 136, 45, 18, 182, 250, 201, 67, 93, 183, 75, 113, 218, 198, 219, 64, 179, 11, 231, 81, 87, 45, 211, 126, 171, 128, 39, 52, 211, 214, 87, 186, 132, 52, 190, 176, 103, 4, 15, 12, 190, 155, 33, 211, 153, 92, 173, 193, 78, 35, 223, 24, 181, 19, 74, 98, 2, 134, 83, 106, 28, 89, 63, 157, 159, 146, 77, 64, 55, 114, 179, 4, 202, 207, 5, 240, 72, 186, 130, 224, 24, 132, 248, 36, 177, 89, 56, 3, 242, 242, 26, 158, 57, 135, 165, 65, 131, 25, 202, 249, 176, 67, 62, 115, 80, 212, 59, 158, 170, 9, 177, 215, 130, 15, 7, 183, 30, 120, 108, 154, 151, 100, 171, 30, 55, 160, 176, 180, 86, 21, 5, 29, 23, 88, 27, 74, 50, 56, 42, 81, 182, 58, 92, 89, 101, 110, 122, 56, 254, 170, 162, 143, 147, 205, 71, 124, 29, 134, 201, 129, 168, 157, 201, 162, 80, 81, 227, 162, 72, 35, 151, 9, 122, 213, 19, 180, 98, 103, 171, 29, 109, 50, 217, 67, 56, 98, 169, 74, 153, 183, 93, 236, 79, 253, 113, 39, 79, 82, 11, 239, 189, 190, 97, 95, 186, 227, 60, 41, 93, 248, 99, 68, 244, 126, 81, 131, 224, 118, 169, 57, 235, 174, 43, 193, 211, 131, 66, 71, 198, 159, 4, 164, 41, 41, 81, 170, 94, 128, 124, 205, 91, 40, 137, 6, 23, 135, 212, 189, 251, 126, 253, 167, 74, 73, 29, 112, 55, 129, 64, 47, 159, 116, 99, 202, 83, 228, 188, 195, 252, 116, 28, 33, 149, 210, 109, 189, 55, 244, 155, 2, 142, 66, 220, 237, 209, 119, 54, 12, 96, 2, 109, 34, 228, 23, 50, 102, 80, 86, 58, 221, 126, 226, 121, 197, 118, 11, 210, 124, 41, 196, 54, 60, 68, 224, 16, 78, 224, 206, 55, 124, 142, 41, 45, 218, 247, 37, 5, 255, 96, 106, 197, 6, 245, 207, 82, 185, 14, 172, 60, 177, 223, 24, 150, 247, 95, 208, 23, 171, 32, 119, 244, 152, 154, 74, 9, 47, 36, 91, 132, 119, 187, 143, 222, 55, 178, 43, 219, 63, 216, 85, 115, 34, 26, 20, 49, 94, 225, 136, 243, 29, 57, 62, 150, 155, 146, 237, 122, 174, 149, 1, 12, 106, 133, 111, 121, 204, 2, 99, 99, 185, 209, 105, 75, 181, 61, 74, 0, 65, 140, 41, 103, 223, 145, 165, 210, 233, 229, 124, 158, 168, 217, 198, 114, 95, 151, 140, 244, 20, 248, 205, 132, 178, 193, 136, 64, 114, 97, 160, 28, 64, 201, 27, 123, 27, 48, 74, 254, 176, 210, 159, 140, 12, 54, 38, 241, 177, 243, 153, 124, 128, 188, 253, 14, 23, 31, 250, 25, 163, 133, 51, 160, 39, 92, 64, 247, 146, 93, 186, 110, 223, 237, 142, 80, 116, 243, 66, 51, 138, 185, 241, 247, 164, 91, 142, 199, 137, 24, 73, 111, 107, 68, 179, 34, 237, 59, 4, 216, 87, 109, 67, 38, 165, 251, 106, 209, 66, 87, 7, 0, 4, 190, 63, 154, 132, 241, 249, 113, 207, 92, 107, 203, 228, 19, 131, 177, 175, 53, 1, 11, 15, 151, 151, 159, 70, 93, 243, 214, 220, 104, 141, 76, 3, 149, 51, 226, 21, 13, 187, 0, 187, 182, 183, 102, 247, 159, 43, 81, 47, 221, 237, 186, 49, 156, 222, 20, 16, 216, 85, 140, 107, 254, 199, 43, 136, 203, 68, 28, 95, 249, 96, 1, 78, 116, 40, 148, 176, 25, 194, 246, 42, 214, 112, 154, 3, 74, 112, 147, 195, 182, 232, 132, 157, 144, 179, 183, 136, 84, 199, 205, 205, 67, 224, 84, 58, 80, 135, 223, 126, 216, 211, 20, 254, 242, 239, 118, 191, 14, 216, 129, 45, 244, 62, 235, 107, 45, 141, 186, 194, 242, 248, 223, 225, 61, 102, 141, 66, 71, 141, 102, 173, 75, 233, 143, 153, 157, 203, 63, 47, 140, 38, 184, 165, 106, 83, 255, 14, 242, 9, 89, 252, 20, 7, 34, 192, 150, 32, 28, 81, 152, 199, 138, 167, 104, 20, 37, 91, 155, 119, 229, 191, 178, 164, 54, 237, 27, 74, 220, 108, 169, 44, 46, 191, 178, 226, 135, 91, 116, 107, 62, 222, 106, 112, 179, 182, 176, 33, 107, 17, 42, 248, 22, 99, 233, 158, 8, 241, 40, 5, 201, 207, 239, 133, 180, 119, 159, 116, 99, 89, 63, 113, 99, 129, 184, 175, 66, 78, 200, 225, 253, 172, 99, 186, 90, 182, 33, 120, 70, 219, 240, 7, 81, 27, 230, 90, 68, 149, 16, 169, 218, 167, 63, 211, 163, 72, 224, 91, 27, 163, 158, 143, 92, 65, 17, 104, 89, 87, 99, 48, 63, 8, 242, 1, 94, 63, 124, 131, 54, 33, 132, 150, 20, 16, 165, 159, 224, 195, 4, 191, 156, 233, 42, 219, 221, 40, 116, 19, 75, 135, 82, 43, 217, 65, 119, 43, 160, 51, 53, 88, 22, 37, 126, 44, 1, 16, 130, 220, 70, 54, 18, 172, 241, 43, 177, 91, 95, 107, 201, 51, 237, 209, 90, 106, 138, 104, 89, 210, 18, 193, 2, 237, 67, 178, 192, 2, 166, 184, 202, 10, 27, 58, 114, 250, 157, 180, 161, 172, 153, 131, 102, 174, 215, 173, 69, 216, 71, 203, 251, 123, 61, 215, 149, 205, 207, 221, 134, 126, 108, 39, 115, 154, 20, 208, 24, 216, 96, 20, 151, 162, 46, 209, 151, 133, 222, 246, 225, 222, 135, 207, 220, 178, 187, 130, 70, 20, 29, 194, 152, 226, 15, 108, 102, 189, 33, 30, 111, 198, 126, 52, 87, 65, 66, 132, 202, 30, 243, 141, 140, 154, 54, 227, 136, 26, 61, 186, 251, 201, 89, 252, 105, 104, 236, 38, 39, 106, 203, 103, 82, 34, 2, 55, 115, 10, 255, 76, 47, 87, 188, 123, 243, 237, 147, 7, 138, 253, 153, 186, 43, 236, 53, 206, 249, 152, 28, 106, 200, 19, 195, 10, 236, 105, 72, 96, 88, 65, 17, 73, 193, 189, 34, 63, 141, 9, 206, 249, 194, 30, 228, 136, 202, 7, 172, 216, 48, 49, 31, 105, 121, 176, 243, 137, 141, 143, 52, 16, 48, 107, 172, 214, 102, 243, 83, 254, 243, 34, 93, 82, 247, 175, 47, 137, 166, 243, 171, 222, 213, 91, 99, 209, 119, 169, 139, 117, 3, 248, 253, 133, 109, 198, 203, 161, 67, 176, 98, 62, 160, 130, 58, 129, 107, 85, 163, 136, 218, 15, 154, 231, 85, 111, 151, 176, 24, 30, 25, 65, 139, 239, 41, 143, 127, 40, 150, 152, 4, 169, 14, 249, 28, 22, 171, 190, 129, 74, 117, 168, 244, 151, 141, 21, 102, 247, 48, 149, 147, 60, 117, 7, 177, 206, 154, 99, 166, 241, 26, 218, 80, 129, 234, 133, 218, 227, 163, 237, 203, 209, 234, 176, 86, 21, 27, 20, 72, 245, 201, 68, 69, 32, 254, 6, 145, 112, 249, 140, 180, 255, 93, 114, 114, 68, 95, 91, 248, 106, 186, 18, 107, 180, 89, 236, 27, 18, 161, 167, 249, 158, 13, 38, 196, 25, 122, 183, 79, 177, 188, 138, 155, 218, 231, 94, 204, 129, 237, 161, 15, 238, 80, 209, 11, 173, 177, 0, 192, 55, 177, 110, 225, 239, 96, 204, 215, 62, 85, 213, 62, 245, 122, 3, 92, 137, 71, 36, 247, 100, 222, 170, 237, 34, 87, 144, 129, 51, 137, 166, 219, 225, 209, 208, 249, 187, 181, 119, 120, 178, 217, 217, 40, 124, 23, 132, 154, 255, 207, 105, 216, 143, 136, 31, 119, 171, 169, 29, 83, 46, 221, 214, 179, 191, 240, 118, 114, 214, 97, 184, 64, 53, 108, 23, 217, 35, 155, 215, 235, 133, 118, 228, 113, 52, 101, 253, 146, 55, 247, 235, 227, 149, 96, 107, 46, 176, 99, 48, 246, 245, 230, 45, 1, 200, 28, 201, 254, 16, 171, 69, 120, 108, 248, 180, 190, 177, 36, 182, 247, 242, 33, 7, 53, 93, 240, 114, 42, 238, 230, 236, 131, 142, 25, 114, 203, 110, 62, 224, 123, 204, 33, 100, 92, 124, 159, 18, 62, 74, 203, 32, 99, 234, 177, 187, 54, 11, 60, 46, 40, 102, 5, 167, 217, 77, 17, 221, 146, 62, 163, 45, 137, 68, 193, 163, 21, 14, 95, 132, 94, 91, 149, 2, 243, 101, 122, 122, 23, 68, 211, 143, 100, 64, 236, 111, 158, 81, 73, 1, 29, 185, 54, 13, 120, 206, 220, 14, 65, 62, 28, 28, 203, 58, 28, 22, 104, 228, 216, 15, 56, 78, 161, 53, 220, 152, 79, 90, 199, 170, 191, 246, 83, 76, 13, 7, 89, 248, 222, 106, 118, 231, 41, 69, 239, 109, 33, 251, 97, 175, 231, 198, 108, 189, 41, 240, 69, 182, 174, 39, 100, 30, 247, 152, 168, 153, 240, 215, 55, 139, 217, 156, 82, 214, 166, 34, 242, 38, 137, 203, 220, 114, 152, 38, 38, 30, 226, 159, 226, 218, 2, 238, 179, 196, 175, 57, 60, 201, 20, 132, 30, 214, 43, 114, 188, 108, 110, 182, 102, 154, 111, 253, 61, 191, 144, 206, 110, 59, 240, 54, 245, 13, 218, 39, 185, 71, 29, 187, 163, 151, 219, 194, 88, 188, 178, 93, 110, 144, 13, 132, 244, 225, 89, 105, 67, 44, 222, 29, 164, 37, 255, 85, 236, 73, 28, 193, 246, 70, 231, 213, 102, 117, 225, 145, 79, 244, 238, 121, 182, 116, 187, 111, 236, 177, 224, 34, 42, 82, 4, 15, 147, 139, 63, 34, 161, 210, 163, 107, 5, 51, 151, 92, 86, 110, 156, 138, 234, 42, 175, 123, 144, 189, 241, 94, 114, 43, 49, 144, 96, 182, 162, 8, 194, 191, 138, 40, 49, 141, 169, 101, 188, 75, 246, 180, 62, 75, 120, 85, 68, 47, 181, 213, 46, 63, 43, 181, 170, 79, 99, 153, 16, 96, 251, 108, 241, 69, 150, 147, 205, 36, 160, 204, 231, 237, 48, 88, 147, 57, 154, 251, 110, 88, 105, 255, 101, 46, 134, 217, 83, 107, 183, 132, 219, 116, 213, 193, 221, 59, 8, 127, 97, 138, 239, 34, 252, 218, 165, 211, 213, 225, 86, 92, 83, 220, 65, 18, 31, 109, 75, 72, 225, 206, 195, 57, 32, 166, 106, 247, 225, 137, 75, 151, 119, 106, 53, 40, 20, 32, 96, 30, 179, 116, 13, 82, 174, 222, 95, 236, 43, 132, 236, 212, 181, 174, 215, 171, 203, 187, 193, 191, 149, 255, 63, 218, 213, 157, 221, 20, 206, 213, 127, 1, 112, 250, 82, 169, 40, 86, 179, 99, 153, 73, 72, 58, 195, 245, 186, 31, 255, 228, 3, 192, 71, 136, 105, 200, 59, 197, 28, 73, 174, 208, 7, 241, 116, 243, 99, 53, 109, 22, 172, 121, 12, 213, 163, 202, 243, 193, 201, 208, 118, 253, 17, 67, 58, 56, 88, 134, 156, 27, 51, 191, 191, 203, 197, 21, 143, 68, 106, 235, 245, 172, 203, 77, 198, 221, 145, 201, 216, 164, 216, 33, 180, 173, 68, 88, 150, 62, 243, 252, 76, 143, 33, 45, 224, 208, 100, 138, 169, 37, 194, 16, 27, 142, 85, 244, 201, 39, 35, 199, 23, 196, 221, 207, 148, 32, 100, 15, 109, 80, 229, 98, 216, 244, 11, 246, 205, 239, 33, 140, 132, 127, 119, 157, 207, 174, 205, 76, 135, 0, 38, 92, 247, 16, 246, 71, 161, 44, 3, 250, 142, 230, 34, 44, 102, 111, 6, 116, 93, 116, 64, 26, 174, 157, 104, 22, 212, 199, 34, 143, 108, 121, 159, 195, 194, 227, 25, 20, 126, 130, 229, 145, 169, 113, 40, 93, 88, 236, 184, 86, 125, 239, 65, 77, 210, 62, 79, 144, 160, 174, 230, 53, 253, 124, 245, 253, 133, 238, 136, 25, 172, 49, 125, 108, 250, 254, 53, 139, 160, 128, 33, 181, 234, 151, 89, 179, 232, 7, 105, 174, 205, 88, 245, 225, 164, 234, 7, 162, 160, 67, 59, 175, 209, 233, 144, 83, 156, 50, 20, 34, 20, 11, 108, 194, 223, 145, 73, 111, 23, 214, 50, 217, 21, 64, 197, 29, 128, 25, 214, 4, 39, 155, 120, 62, 8, 140, 43, 64, 8, 10, 237, 234, 16, 159, 107, 72, 162, 240, 184, 123, 219, 236, 218, 49, 12, 63, 124, 67, 193, 160, 117, 184, 106, 215, 40, 158, 65, 102, 228, 19, 104, 155, 227, 162, 85, 60, 34, 23, 26, 229, 188, 90, 64, 70, 209, 207, 17, 88, 66, 116, 204, 49, 22, 44, 188, 247, 13, 214, 242, 5, 47, 117, 39, 83, 3, 148, 10, 83, 223, 184, 123, 166, 243, 221, 225, 105, 108, 165, 26, 175, 173, 193, 228, 226, 66, 201, 57, 231, 70, 62, 228, 197, 97, 205, 65, 91, 1, 250, 246, 183, 230, 57, 99, 44, 2, 0, 101, 87, 23, 198, 39, 75, 28, 63, 130, 29, 89, 178, 79, 118, 86, 162, 161, 171, 30, 70, 139, 134, 155, 83, 166, 55, 71, 115, 233, 243, 220, 4, 92, 189, 87, 110, 0, 25, 135, 139, 84, 16, 27, 145, 182, 193, 94, 123, 54, 199, 143, 166, 34, 67, 154, 98, 144, 252, 168, 134, 60, 171, 28, 232, 38, 130, 190, 87, 15, 154, 235, 139, 174, 93, 177, 72, 167, 17, 20, 155, 235, 82, 13, 92, 135, 120, 117, 237, 189, 89, 8, 191, 207, 118, 77, 223, 120, 221, 188, 142, 35, 201, 15, 157, 219, 120, 124, 151, 179, 65, 136, 11, 119, 160, 190, 70, 150, 1, 152, 198, 92, 203, 179, 83, 198, 89, 92, 185, 181, 119, 115, 204, 97, 209, 64, 70, 166, 216, 65, 253, 115, 138, 138, 166, 220, 23, 72, 94, 47, 218, 112, 1, 136, 200, 165, 243, 155, 74, 35, 45, 72, 166, 40, 172, 16, 141, 79, 41, 89, 246, 129, 73, 201, 143, 88, 76, 40, 131, 85, 214, 63, 6, 43, 176, 26, 226, 1, 95, 149, 36, 150, 9, 161, 43, 89, 182, 27, 3, 141, 11, 60, 189, 90, 199, 210, 212, 104, 233, 220, 143, 105, 219, 96, 68, 118, 116, 148, 195, 42, 96, 132, 32, 74, 130, 229, 218, 201, 48, 46, 234, 83, 112, 98, 43, 168, 104, 107, 118, 194, 53, 51, 144, 144, 199, 246, 78, 82, 147, 37, 25, 121, 50, 187, 195, 237, 93, 108, 78, 30, 58, 135, 70, 2, 129, 49, 237, 12, 112, 26, 130, 196, 84, 162, 246, 47, 64, 129, 196, 84, 76, 46, 150, 176, 51, 187, 123, 33, 238, 173, 75, 111, 46, 223, 141, 46, 206, 215, 64, 105, 94, 94, 149, 75, 11, 245, 22, 148, 56, 186, 211, 222, 145, 122, 121, 83, 69, 158, 209, 71, 38, 149, 61, 177, 225, 222, 87, 161, 46, 189, 165, 237, 173, 109, 148, 33, 248, 224, 234, 115, 196, 60, 253, 108, 207, 112, 154, 224, 140, 30, 213, 154, 167, 155, 81, 50, 12, 13, 34, 192, 92, 42, 62, 73, 151, 255, 98, 44, 71, 192, 223, 238, 121, 130, 254, 220, 40, 50, 85, 164, 146, 176, 49, 115, 166, 193, 32, 23, 172, 17, 25, 84, 62, 167, 249, 94, 141, 89, 176, 176, 119, 28, 39, 149, 188, 146, 123, 178, 215, 182, 72, 77, 202, 147, 186, 115, 128, 26, 185, 156, 186, 118, 6, 194, 224, 26, 249, 100, 25, 80, 205, 49, 93, 124, 168, 182, 44, 114, 199, 60, 165, 106, 205, 195, 229, 189, 113, 10, 112, 33, 153, 161, 100, 234, 210, 241, 110, 86, 93, 153, 127, 57, 173, 39, 203, 114, 141, 243, 92, 233, 121, 239, 229, 243, 47, 165, 50, 155, 238, 98, 225, 177, 200, 213, 64, 12, 30, 178, 30, 138, 84, 60, 235, 39, 124, 66, 210, 45, 98, 57, 117, 143, 222, 19, 139, 163, 201, 48, 34, 34, 121, 218, 225, 92, 243, 183, 125, 213, 28, 241, 240, 13, 182, 121, 60, 122, 201, 141, 154, 118, 197, 157, 221, 98, 52, 170, 234, 22, 24, 170, 160, 211, 53, 71, 68, 127, 193, 76, 86, 166, 176, 119, 160, 13, 240, 73, 172, 158, 182, 248, 54, 61, 234, 238, 216, 169, 66, 75, 234, 251, 83, 81, 113, 151, 31, 176, 14, 118, 79, 36, 206, 130, 236, 90, 197, 122, 224, 71, 147, 14, 167, 57, 128, 185, 212, 52, 47, 87, 19, 134, 102, 94, 80, 72, 33, 187, 215, 243, 246, 154, 201, 91, 182, 238, 126, 50, 222, 119, 199, 56, 226, 40, 107, 184, 76, 8, 41, 14, 77, 195, 129, 157, 54, 10, 90, 186, 217, 176, 42, 113, 173, 15, 251, 164, 124, 41, 212, 88, 111, 252, 154, 198, 239, 212, 1, 106, 32, 101, 175, 39, 71, 227, 85, 243, 6, 41, 200, 97, 120, 80, 197, 21, 29, 202, 82, 141, 207, 100, 200, 54, 114, 116, 1, 0, 71, 73, 101, 73, 60, 176, 214, 187, 146, 189, 166, 218, 75, 254, 82, 42, 171, 250, 8, 98, 36, 12, 22, 223, 156, 13, 11, 112, 149, 214, 8, 52, 165, 167, 98, 253, 157, 120, 53, 169, 10, 94, 111, 69, 227, 116, 146, 251, 78, 117, 103, 73, 33, 155, 98, 206, 100, 70, 192, 255, 254, 21, 41, 192, 89, 142, 188, 160, 178, 26, 169, 205, 184, 21, 177, 187, 62, 51, 79, 247, 161, 4, 195, 190, 68, 25, 114, 76, 140, 68, 96, 227, 138, 37, 151, 198, 110, 64, 89, 208, 128, 203, 129, 83, 198, 248, 118, 247, 224, 88, 25, 1, 30, 243, 118, 163, 45, 101, 100, 172, 67, 24, 148, 0, 207, 208, 134, 41, 116, 237, 80, 43, 8, 115, 92, 97, 205, 132, 4, 173, 151, 224, 164, 236, 46, 13, 91, 90, 111, 99, 15, 166, 207, 82, 201, 169, 4, 255, 117, 105, 214, 61, 72, 19, 187, 205, 38, 173, 202, 95, 52, 168, 18, 170, 154, 14, 151, 151, 35, 245, 222, 239, 7, 19, 59, 253, 53, 154, 104, 65, 247, 226, 25, 217, 202, 197, 19, 66, 182, 221, 136, 65, 38, 97, 21, 153, 74, 170, 53, 105, 158, 43, 250, 123, 41, 14, 15, 255, 209, 101, 28, 207, 194, 235, 132, 243, 95, 103, 208, 250, 220, 18, 213, 0, 94, 207, 47, 40, 242, 103, 97, 67, 243, 18, 158, 133, 231, 35, 197, 142, 253, 75, 19, 171, 255, 105, 16, 103, 41, 123, 77, 245, 22, 58, 80, 199, 39, 106, 52, 107, 114, 186, 112, 62, 231, 11, 35, 45, 184, 239, 66, 164, 164, 150, 98, 143, 95, 50, 207, 83, 49, 219, 199, 248, 46, 99, 22, 149, 63, 27, 17, 13, 126, 230, 52, 64, 181, 55, 39, 163, 254, 254, 130, 101, 208, 20, 237, 163, 161, 179, 195, 208, 138, 234, 179, 67, 66, 120, 56, 77, 156, 199, 235, 204, 150, 174, 91, 128, 236, 61, 168, 144, 196, 25, 163, 208, 175, 0, 210, 142, 33, 109, 205, 112, 243, 51, 255, 227, 111, 27, 52, 187, 219, 39, 99, 198, 101, 221, 124, 59, 176, 153, 246, 224, 184, 237, 185, 52, 92, 127, 10, 55, 129, 154, 130, 58, 54, 103, 119, 3, 196, 239, 206, 1, 87, 85, 133, 90, 0, 27, 107, 151, 18, 163, 145, 37, 163, 186, 48, 198, 83, 17, 202, 82, 12, 151, 234, 240, 41, 106, 158, 30, 70, 113, 184, 143, 189, 28, 100, 220, 81, 42, 153, 252, 66, 176, 125, 46, 138, 174, 0, 6, 160, 24, 227, 182, 5, 134, 195, 16, 140, 134, 4, 50, 190, 186, 134, 13, 63, 245, 255, 133, 7, 146, 243, 43, 104, 248, 66, 6, 112, 203, 221, 69, 93, 59, 32, 216, 74, 231, 86, 138, 237, 189, 152, 145, 127, 213, 84, 82, 127, 167, 58, 126, 180, 19, 48, 246, 235, 127, 103, 149, 223, 76, 99, 134, 159, 72, 84, 96, 225, 148, 53, 163, 173, 244, 136, 4, 247, 180, 237, 225, 175, 251, 21, 178, 19, 33, 188, 163, 10, 249, 91, 24, 208, 63, 91, 228, 199, 74, 125, 182, 247, 69, 159, 74, 180, 77, 5, 172, 250, 245, 211, 145, 101, 244, 106, 239, 123, 54, 63, 138, 35, 57, 140, 118, 215, 195, 151, 19, 160, 128, 103, 21, 16, 55, 85, 46, 227, 80, 21, 103, 136, 95, 56, 209, 217, 149, 201, 225, 162, 90, 84, 60, 111, 45, 237, 48, 84, 107, 164, 137, 167, 153, 37, 124, 203, 185, 176, 255, 164, 186, 140, 178, 157, 107, 209, 114, 241, 99, 139, 67, 225, 176, 127, 228, 91, 77, 225, 109, 184, 81, 13, 72, 101, 140, 74, 64, 124, 22, 43, 78, 102, 229, 27, 127, 158, 13, 85, 203, 182, 13, 159, 92, 210, 200, 211, 180, 204, 206, 165, 156, 251, 88, 197, 252, 124, 16, 0, 102, 20, 98, 92, 166, 35, 143, 207, 140, 179, 121, 156, 116, 120, 217, 127, 37, 24, 199, 173, 75, 176, 16, 186, 92, 70, 248, 49, 244, 214, 55, 52, 210, 6, 136, 11, 47, 135, 31, 1, 136, 71, 216, 54, 153, 85, 223, 91, 5, 31, 63, 17, 68, 222, 253, 109, 106, 72, 131, 143, 131, 99, 249, 122, 176, 161, 249, 124, 28, 155, 92, 173, 177, 204, 229, 70, 225, 205, 80, 38, 240, 3, 129, 179, 252, 148, 97, 234, 236, 237, 38, 132, 171, 67, 21, 245, 86, 67, 36, 229, 237, 6, 59, 66, 72, 70, 29, 230, 126, 248, 0, 163, 237, 158, 148, 20, 162, 39, 125, 228, 131, 179, 17, 63, 214, 153, 239, 23, 64, 118, 245, 167, 229, 193, 103, 46, 28, 50, 67, 76, 116, 88, 207, 27, 34, 22, 83, 228, 237, 10, 244, 2, 204, 113, 170, 150, 16, 227, 190, 120, 75, 183, 20, 60, 221, 236, 207, 172, 207, 50, 177, 227, 175, 75, 47, 116, 187, 50, 199, 240, 147, 246, 176, 149, 110, 33, 132, 215, 166, 245, 178, 182, 168, 86, 125, 37, 178, 35, 39, 96, 76, 252, 176, 110, 159, 121, 161, 168, 24, 30, 89, 53, 150, 133, 183, 154, 50, 46, 247, 183, 57, 146, 20, 10, 76, 91, 8, 44, 70, 59, 29, 61, 108, 75, 148, 4, 2, 79, 195, 180, 44, 191, 178, 216, 5, 20, 246, 88, 98, 15, 73, 223, 150, 112, 210, 124, 158, 87, 180, 1, 108, 35, 137, 106, 186, 157, 205, 36, 66, 62, 150, 49, 74, 111, 124, 222, 149, 31, 53, 44, 226, 75, 71, 180, 137, 98, 239, 50, 135, 35, 201, 253, 223, 24, 202, 26, 13, 23, 103, 142, 75, 41, 121, 69, 86, 187, 191, 150, 56, 180, 199, 100, 228, 185, 86, 64, 248, 143, 70, 149, 239, 238, 178, 218, 255, 254, 215, 248, 188, 175, 12, 114, 220, 74, 17, 24, 114, 172, 99, 162, 37, 219, 30, 128, 82, 182, 107, 99, 16, 121, 20, 3, 71, 219, 60, 236, 135, 144, 254, 46, 249, 33, 249, 213, 216, 53, 96, 83, 126, 91, 45, 70, 229, 93, 192, 104, 19, 198, 137, 238, 143, 172, 106, 156, 211, 49, 41, 118, 50, 50, 89, 171, 60, 100, 252, 115, 66, 67, 5, 114, 244, 242, 180, 206, 206, 224, 85, 98, 165, 12, 176, 251, 105, 189, 229, 75, 191, 98, 107, 155, 99, 180, 12, 198, 37, 45, 183, 60, 209, 120, 182, 2, 223, 81, 178, 35, 86, 3, 205, 41, 57, 83, 109, 19, 26, 96, 80, 129, 12, 102, 40, 121, 215, 100, 150, 78, 144, 100, 159, 53, 181, 168, 219, 140, 0, 190, 7, 198, 35, 132, 90, 234, 210, 13, 251, 182, 104, 240, 73, 130, 209, 167, 100, 215, 133, 171, 183, 183, 206, 69, 142, 216, 61, 127, 69, 2, 2, 230, 143, 184, 135, 136, 202, 224, 157, 23, 232, 77, 46, 35, 70, 94, 8, 186, 129, 66, 118, 180, 59, 187, 50, 99, 246, 44, 147, 163, 185, 236, 104, 169, 197, 156, 76, 233, 54, 52, 23, 91, 164, 204, 137, 132, 14, 93, 32, 50, 106, 17, 144, 57, 137, 78, 112, 35, 177, 85, 158, 141, 201, 15, 237, 165, 252, 48, 209, 61, 168, 51, 147, 236, 43, 108, 176, 165, 177, 112, 238, 3, 117, 233, 253, 103, 35, 200, 173, 105, 182, 105, 62, 232, 155, 242, 59, 26, 247, 125, 145, 85, 102, 251, 120, 178, 121, 12, 49, 144, 69, 25, 70, 68, 189, 30, 234, 104, 43, 106, 6, 246, 105, 121, 7, 229, 32, 230, 77, 43, 108, 93, 185, 244, 229, 180, 34, 5, 144, 195, 19, 238, 59, 63, 153, 200, 0, 237, 191, 222, 192, 102, 224, 93, 209, 64, 103, 193, 102, 208, 252, 245, 207, 249, 250, 184, 180, 109, 167, 181, 153, 171, 11, 139, 166, 230, 176, 116, 29, 129, 249, 248, 187, 69, 48, 233, 60, 135, 103, 44, 240, 236, 235, 64, 151, 102, 165, 75, 248, 89, 142, 147, 135, 9, 67, 54, 193, 54, 142, 238, 229, 250, 173, 164, 211, 8, 136, 172, 38, 15, 73, 183, 23, 243, 51, 227, 199, 68, 20, 98, 11, 22, 32, 33, 71, 105, 231, 89, 182, 70, 194, 50, 242, 111, 223, 55, 38, 187, 42, 207, 74, 183, 61, 21, 19, 223, 81, 171, 89, 27, 209, 150, 39, 205, 172, 235, 90, 194, 199, 98, 186, 92, 108, 27, 250, 102, 247, 221, 91, 85, 235, 253, 73, 168, 224, 184, 172, 197, 104, 227, 242, 205, 177, 168, 254, 115, 136, 21, 7, 255, 150, 106, 163, 210, 18, 235, 166, 71, 73, 30, 135, 83, 37, 109, 66, 78, 20, 243, 79, 44, 243, 75, 143, 111, 250, 244, 25, 142, 134, 41, 251, 42, 226, 148, 23, 19, 162, 24, 55, 175, 188, 140, 218, 250, 210, 244, 23, 178, 49, 49, 101, 179, 55, 151, 81, 192, 226, 30, 10, 70, 123, 179, 194, 174, 147, 81, 171, 248, 26, 219, 194, 55, 185, 40, 235, 136, 141, 245, 75, 245, 133, 98, 198, 47, 62, 138, 171, 37, 89, 177, 225, 142, 140, 1, 73, 133, 145, 81, 15, 153, 47, 64, 211, 118, 49, 176, 98, 127, 73, 250, 242, 29, 98, 182, 255, 31, 182, 214, 236, 191, 228, 147, 141, 16, 193, 215, 176, 223, 128, 29, 197, 108, 239, 152, 61, 90, 90, 93, 202, 87, 143, 226, 40, 231, 65, 136, 228, 33, 215, 35, 211, 172, 25, 147, 187, 193, 125, 23, 139, 23, 101, 243, 232, 226, 3, 139, 245, 124, 202, 99, 229, 1, 121, 77, 8, 169, 16, 44, 54, 38, 134, 138, 45, 15, 108, 3, 247, 120, 135, 210, 17, 224, 235, 177, 8, 20, 0, 242, 99, 64, 179, 74, 37, 250, 136, 58, 13, 38, 14, 81, 93, 213, 157, 227, 178, 164, 253, 99, 19, 68, 192, 255, 190, 127, 226, 251, 107, 163, 9, 178, 179, 191, 65, 6, 55, 80, 135, 98, 71, 102, 41, 134, 103, 245, 125, 201, 90, 99, 232, 132, 105, 230, 115, 48, 207, 117, 16, 136, 165, 86, 164, 0, 220, 219, 145, 240, 97, 11, 178, 163, 71, 35, 44, 241, 88, 76, 253, 23, 144, 124, 149, 104, 61, 175, 81, 172, 235, 26, 34, 26, 146, 96, 92, 77, 160, 149, 83, 136, 100, 232, 49, 0, 29, 34, 11, 57, 212, 169, 177, 135, 77, 153, 95, 119, 151, 31, 27, 38, 94, 31, 187, 216, 74, 115, 255, 22, 230, 231, 174, 58, 43, 245, 247, 53, 131, 228, 140, 4, 212, 73, 93, 213, 82, 238, 244, 161, 73, 123, 48, 254, 122, 97, 89, 98, 31, 54, 14, 249, 77, 140, 4, 103, 23, 20, 34, 79, 213, 67, 41, 71, 131, 100, 230, 138, 236, 42, 130, 133, 159, 229, 55, 241, 67, 184, 0, 245, 143, 58, 62, 78, 112, 202, 190, 50, 130, 199, 109, 71, 75, 97, 75, 247, 230, 18, 93, 103, 138, 253, 131, 144, 215, 26, 158, 103, 156, 90, 215, 3, 17, 27, 67, 83, 124, 104, 125, 178, 43, 192, 163, 42, 77, 202, 232, 203, 212, 163, 81, 200, 218, 34, 60, 86, 192, 92, 218, 2, 107, 211, 89, 5, 38, 5, 37, 229, 72, 51, 52, 237, 116, 112, 190, 2, 199, 97, 112, 4, 198, 34, 54, 162, 246, 201, 153, 83, 136, 220, 40, 78, 47, 158, 87, 20, 225, 31, 14, 80, 59, 194, 121, 131, 29, 42, 94, 3, 26, 186, 128, 166, 66, 235, 188, 234, 99, 252, 41, 234, 185, 255, 164, 248, 240, 125, 79, 45, 90, 212, 188, 86, 205, 234, 142, 132, 106, 155, 163, 157, 73, 69, 71, 188, 200, 86, 208, 141, 49, 101, 72, 155, 59, 172, 64, 186, 128, 185, 215, 95, 187, 63, 215, 84, 244, 28, 109, 229, 7, 62, 90, 173, 172, 123, 17, 119, 33, 136, 203, 31, 134, 217, 0, 62, 40, 34, 43, 11, 166, 72, 252, 238, 179, 150, 225, 253, 79, 253, 45, 71, 155, 137, 93, 228, 184, 79, 129, 234, 39, 235, 178, 202, 132, 84, 55, 123, 97, 121, 237, 190, 99, 145, 45, 214, 78, 88, 43, 59, 173, 62, 216, 246, 51, 87, 57, 14, 125, 50, 148, 228, 185, 122, 224, 142, 61, 161, 103, 234, 121, 43, 91, 23, 70, 85, 129, 3, 105, 66, 42, 43, 66, 221, 241, 52, 38, 60, 131, 222, 143, 88, 64, 12, 229, 225, 214, 159, 54, 132, 106, 122, 246, 1, 50, 1, 69, 119, 27, 190, 230, 134, 6, 87, 134, 53, 234, 112, 8, 238, 221, 231, 10, 126, 25, 23, 254, 203, 72, 113, 203, 140, 122, 181, 109, 153, 254, 145, 140, 134, 16, 253, 113, 223, 140, 149, 180, 16, 166, 242, 45, 172, 134, 48, 107, 116, 4, 10, 37, 234, 89, 31, 190, 214, 5, 51, 70, 233, 79, 240, 217, 176, 232, 46, 120, 135, 253, 160, 243, 51, 164, 182, 106, 211, 23, 98, 30, 168, 179, 254, 73, 150, 6, 62, 211, 71, 62, 141, 16, 36, 148, 106, 235, 102, 106, 1, 15, 25, 191, 183, 44, 4, 204, 85, 140, 244, 102, 171, 208, 83, 130, 214, 227, 113, 150, 177, 114, 160, 96, 221, 240, 34, 195, 113, 2, 214, 41, 230, 181, 46, 8, 85, 49, 34, 250, 253, 10, 187, 133, 66, 187, 103, 231, 228, 1, 148, 159, 225, 105, 24, 218, 14, 33, 228, 118, 25, 202, 11, 200, 85, 1, 125, 198, 189, 76, 201, 26, 157, 157, 66, 252, 46, 220, 176, 236, 131, 244, 185, 35, 151, 233, 222, 239, 223, 160, 23, 229, 103, 185, 217, 62, 149, 93, 48, 27, 88, 250, 124, 64, 232, 221, 107, 173, 223, 208, 119, 145, 125, 30, 176, 173, 243, 26, 119, 8, 254, 184, 39, 2, 9, 11, 162, 138, 120, 53, 154, 64, 175, 197, 221, 87, 212, 118, 171, 77, 98, 209, 191, 6, 226, 133, 197, 241, 230, 167, 246, 252, 207, 191, 122, 205, 96, 220, 113, 175, 37, 101, 116, 94, 78, 144, 207, 100, 65, 32, 81, 244, 50, 199, 228, 53, 223, 205, 7, 26, 247, 5, 74, 125, 252, 60, 132, 77, 214, 54, 59, 118, 48, 31, 248, 252, 53, 149, 236, 6, 37, 79, 208, 218, 61, 250, 8, 42, 237, 131, 21, 46, 232, 11, 127, 58, 138, 54, 200, 251, 116, 100, 168, 29, 15, 180, 42, 78, 161, 171, 94, 64, 228, 222, 101, 67, 87, 113, 154, 21, 132, 193, 32, 184, 206, 29, 0, 8, 156, 244, 21, 221, 135, 137, 32, 138, 255, 38, 239, 128, 236, 150, 239, 254, 69, 6, 33, 209, 112, 84, 138, 80, 40, 37, 76, 166, 120, 112, 209, 161, 127, 241, 215, 186, 2, 239, 186, 40, 111, 120, 186, 40, 98, 22, 248, 255, 222, 105, 229, 234, 201, 248, 106, 249, 163, 33, 116, 9, 153, 184, 176, 0, 91, 82, 40, 31, 169, 213, 197, 23, 25, 197, 101, 189, 93, 27, 159, 82, 46, 178, 55, 97, 94, 130, 163, 174, 224, 218, 11, 123, 124, 221, 133, 68, 231, 241, 202, 1, 193, 127, 44, 177, 64, 13, 208, 215, 47, 180, 39, 169, 128, 231, 138, 54, 178, 163, 144, 8, 127, 146, 224, 153, 99, 207, 75, 68, 74, 53, 207, 67, 153, 205, 52, 41, 39, 77, 118, 150, 195, 8, 122, 113, 67, 242, 73, 252, 163, 35, 103, 246, 166, 112, 155, 103, 199, 210, 66, 226, 166, 231, 83, 10, 87, 48, 201, 184, 242, 28, 33, 201, 103, 172, 242, 156, 50, 79, 151, 216, 139, 28, 229, 8, 150, 132, 32, 115, 141, 212, 29, 247, 228, 155, 189, 10, 237, 240, 2, 218, 164, 81, 229, 109, 62, 72, 104, 39, 87, 17, 175, 247, 52, 245, 202, 36, 173, 141, 53, 252, 200, 190, 210, 207, 249, 29, 133, 71, 86, 41, 32, 245, 235, 162, 95, 209, 130, 106, 198, 191, 6, 172, 151, 114, 68, 176, 161, 114, 224, 215, 76, 25, 192, 189, 112, 131, 117, 98, 237, 86, 24, 225, 57, 33, 131, 108, 248, 101, 37, 92, 35, 193, 210, 10, 33, 43, 149, 55, 114, 138, 78, 250, 90, 176, 125, 209, 184, 4, 129, 219, 202, 12, 58, 108, 140, 88, 27, 21, 154, 142, 140, 132, 173, 138, 210, 226, 196, 140, 20, 121, 80, 33, 153, 158, 162, 49, 164, 121, 23, 144, 8, 123, 50, 95, 46, 141, 209, 206, 46, 13, 228, 112, 105, 103, 211, 248, 130, 0, 113, 87, 139, 85, 212, 151, 95, 221, 202, 123, 51, 156, 189, 217, 118, 221, 26, 79, 117, 151, 192, 83, 54, 2, 36, 126, 63, 225, 83, 208, 109, 168, 166, 190, 25, 27, 216, 152, 64, 158, 85, 141, 151, 41, 177, 181, 82, 219, 139, 23, 163, 4, 66, 1, 65, 116, 55, 238, 92, 165, 47, 169, 238, 146, 118, 237, 112, 242, 84, 36, 109, 90, 10, 248, 152, 37, 129, 184, 74, 123, 36, 186, 10, 97, 195, 114, 234, 189, 109, 223, 74, 221, 33, 247, 153, 96, 29, 93, 26, 246, 144, 254, 191, 0, 224, 204, 218, 38, 62, 165, 2, 181, 136, 81, 240, 117, 35, 75, 176, 190, 183, 65, 94, 57, 27, 113, 76, 100, 122, 226, 145, 158, 34, 77, 202, 175, 170, 13, 8, 107, 55, 249, 101, 89, 80, 110, 128, 182, 242, 12, 59, 202, 173, 17, 241, 130, 30, 141, 251, 213, 198, 194, 180, 135, 22, 1, 137, 246, 65, 242, 74, 240, 187, 49, 112, 130, 215, 185, 202, 7, 221, 254, 254, 67, 219, 140, 58, 86, 119, 159, 42, 46, 167, 115, 243, 167, 168, 20, 107, 60, 2, 39, 26, 166, 4, 177, 224, 230, 121, 177, 11, 5, 245, 57, 144, 72, 115, 142, 102, 154, 150, 142, 163, 18, 109, 145, 93, 6, 186, 169, 126, 3, 235, 241, 21, 160, 200, 23, 227, 55, 47, 162, 66, 129, 186, 107, 149, 6, 195, 68, 166, 109, 204, 206, 29, 190, 221, 226, 88, 24, 161, 77, 62, 68, 19, 246, 254, 242, 99, 114, 156, 21, 112, 107, 87, 131, 197, 92, 140, 12, 103, 219, 18, 115, 83, 81, 219, 219, 121, 240, 126, 164, 172, 19, 20, 90, 251, 2, 49, 76, 20, 84, 140, 113, 155, 246, 37, 87, 20, 187, 5, 73, 107, 7, 68, 46, 92, 101, 63, 202, 74, 236, 238, 181, 78, 128, 1, 124, 48, 216, 200, 228, 101, 90, 248, 77, 102, 73, 221, 187, 150, 198, 213, 1, 225, 217, 227, 97, 108, 245, 179, 51, 141, 39, 88, 96, 118, 15, 162, 67, 34, 193, 166, 241, 175, 46, 194, 99, 13, 241, 208, 37, 142, 151, 16, 228, 11, 240, 242, 154, 219, 49, 28, 247, 9, 75, 103, 89, 232, 54, 182, 92, 214, 13, 165, 199, 40, 39, 82, 158, 39, 193, 35, 41, 142, 32, 89, 33, 220, 254, 131, 157, 182, 217, 65, 2, 88, 75, 113, 246, 70, 133, 124, 132, 193, 157, 157, 16, 73, 169, 123, 58, 159, 2, 194, 54, 94, 200, 81, 253, 142, 229, 42, 128, 190, 15, 54, 186, 45, 219, 88, 117, 173, 98, 70, 182, 107, 183, 162, 41, 24, 35, 200, 52, 239, 72, 212, 120, 93, 87, 72, 27, 203, 153, 203, 191, 171, 239, 0, 34, 110, 110, 125, 59, 123, 167, 112, 41, 119, 17, 19, 38, 120, 20, 211, 189, 144, 195, 72, 160, 9, 244, 225, 139, 22, 185, 169, 237, 173, 118, 4, 172, 241, 161, 183, 213, 231, 30, 170, 44, 219, 217, 163, 242, 150, 214, 185, 187, 218, 143, 24, 78, 139, 88, 18, 104, 251, 25, 161, 244, 170, 23, 225, 155, 180, 27, 121, 196, 92, 242, 114, 252, 124, 15, 91, 237, 34, 5, 134, 181, 52, 124, 76, 67, 123, 190, 10, 229, 196, 137, 5, 57, 143, 114, 114, 149, 150, 128, 78, 255, 162, 247, 59, 148, 111, 12, 85, 130, 8, 150, 191, 2, 52, 41, 78, 52, 253, 79, 110, 195, 32, 54, 164, 185, 23, 47, 61, 233, 63, 253, 156, 170, 212, 194, 38, 239, 185, 112, 231, 13, 73, 231, 73, 248, 82, 141, 144, 26, 103, 253, 243, 250, 246, 175, 169, 229, 182, 60, 76, 60, 152, 235, 123, 112, 255, 80, 209, 174, 8, 213, 18, 218, 151, 204, 206, 242, 216, 71, 225, 90, 165, 172, 221, 183, 50, 2, 156, 175, 217, 147, 41, 183, 18, 99, 9, 38, 50, 52, 44, 184, 67, 201, 123, 81, 162, 145, 4, 20, 241, 206, 11, 32, 241, 43, 88, 84, 108, 128, 220, 232, 7, 153, 43, 76, 201, 218, 51, 97, 167, 22, 22, 36, 118, 148, 241, 245, 208, 177, 19, 153, 47, 224, 21, 43, 42, 174, 3, 221, 225, 219, 87, 176, 69, 186, 126, 249, 254, 246, 118, 225, 20, 251, 96, 12, 139, 240, 144, 154, 34, 61, 128, 46, 44, 13, 191, 80, 18, 4, 71, 178, 238, 11, 41, 36, 106, 85, 207, 132, 159, 226, 0, 22, 146, 76, 132, 220, 208, 253, 33, 143, 149, 199, 4, 222, 243, 225, 87, 55, 181, 16, 31, 28, 234, 247, 116, 61, 109, 89, 70, 2, 83, 7, 176, 152, 25, 196, 172, 122, 66, 146, 176, 26, 183, 74, 235, 84, 12, 18, 106, 187, 183, 186, 53, 133, 36, 85, 210, 173, 242, 142, 97, 1, 40, 62, 126, 167, 78, 13, 100, 24, 107, 104, 135, 242, 24, 25, 238, 183, 178, 148, 179, 221, 219, 244, 142, 237, 215, 213, 228, 88, 25, 198, 207, 39, 125, 1, 224, 1, 241, 33, 219, 114, 239, 202, 152, 153, 36, 162, 199, 217, 198, 245, 81, 108, 65, 179, 231, 85, 21, 224, 187, 66, 124, 27, 82, 98, 175, 162, 17, 91, 197, 158, 34, 188, 210, 186, 227, 254, 184, 233, 162, 222, 130, 229, 155, 51, 185, 162, 115, 119, 180, 251, 228, 150, 146, 157, 199, 106, 253, 146, 65, 62, 203, 190, 192, 119, 107, 112, 83, 119, 174, 139, 230, 46, 195, 172, 7, 75, 127, 142, 100, 112, 198, 102, 143, 245, 199, 193, 234, 251, 161, 241, 170, 116, 207, 236, 174, 44, 133, 207, 71, 104, 192, 163, 74, 213, 230, 93, 111, 21, 55, 29, 119, 71, 219, 147, 26, 83, 177, 91, 252, 96, 116, 87, 95, 185, 211, 11, 15, 49, 235, 124, 200, 233, 151, 251, 201, 165, 209, 24, 9, 185, 76, 101, 107, 116, 119, 15, 77, 55, 116, 180, 41, 98, 75, 114, 21, 190, 252, 223, 30, 206, 234, 209, 215, 247, 188, 43, 91, 89, 171, 81, 187, 175, 125, 5, 211, 5, 179, 228, 93, 119, 201, 26, 101, 205, 97, 204, 154, 145, 38, 9, 182, 250, 98, 95, 183, 19, 112, 47, 131, 167, 246, 50, 200, 93, 250, 211, 125, 72, 129, 114, 156, 101, 26, 37, 235, 45, 186, 204, 108, 212, 72, 5, 29, 217, 197, 54, 245, 235, 30, 22, 240, 18, 7, 91, 80, 168, 119, 166, 146, 121, 91, 240, 46, 53, 255, 162, 137, 82, 203, 140, 88, 19, 137, 80, 106, 80, 69, 197, 195, 7, 50, 150, 43, 181, 115, 226, 48, 120, 30, 187, 4, 191, 191, 37, 161, 214, 240, 35, 248, 225, 126, 179, 66, 77, 39, 208, 114, 183, 33, 46, 193, 133, 191, 245, 227, 79, 80, 75, 24, 77, 239, 69, 37, 98, 148, 124, 86, 70, 250, 216, 251, 195, 26, 18, 154, 145, 29, 153, 128, 126, 104, 130, 133, 125, 90, 67, 169, 42, 207, 8, 172, 60, 99, 77, 99, 17, 50, 56, 135, 181, 144, 26, 207, 237, 84, 70, 40, 224, 98, 198, 78, 141, 152, 180, 146, 130, 208, 20, 32, 167, 215, 141, 178, 166, 53, 27, 90, 181, 66, 126, 164, 93, 0, 61, 1, 160, 115, 180, 5, 205, 17, 40, 39, 2, 60, 58, 190, 23, 80, 42, 44, 12, 252, 221, 247, 64, 87, 11, 49, 109, 236, 166, 143, 20, 133, 67, 40, 176, 218, 151, 136, 206, 248, 171, 22, 167, 131, 173, 111, 128, 167, 179, 228, 177, 147, 220, 186, 109, 188, 114, 248, 20, 38, 234, 208, 229, 206, 124, 7, 32, 210, 174, 37, 17, 28, 220, 170, 236, 7, 129, 214, 139, 2, 42, 239, 164, 156, 74, 249, 194, 194, 209, 74, 251, 136, 158, 113, 212, 209, 59, 44, 132, 97, 126, 80, 46, 139, 62, 23, 102, 142, 6, 131, 87, 46, 53, 108, 137, 133, 123, 28, 51, 183, 193, 210, 41, 80, 20, 82, 125, 73, 214, 234, 82, 25, 157, 206, 164, 104, 166, 112, 65, 70, 140, 171, 131, 161, 56, 75, 126, 167, 93, 16, 219, 137, 39, 116, 99, 174, 110, 247, 187, 153, 126, 144, 72, 245, 29, 181, 213, 98, 237, 187, 67, 131, 139, 0, 238, 80, 161, 187, 224, 238, 124, 98, 36, 23, 213, 112, 77, 37, 88, 122, 6, 101, 83, 193, 82, 182, 135, 105, 218, 117, 104, 194, 66, 132, 57, 79, 159, 24, 239, 196, 62, 139, 254, 149, 77, 227, 183, 192, 100, 45, 8, 138, 168, 29, 94, 233, 230, 195, 85, 181, 202, 14, 222, 234, 245, 58, 40, 175, 13, 237, 222, 148, 182, 237, 168, 99, 148, 26, 59, 123, 12, 92, 94, 132, 96, 49, 187, 147, 22, 153, 154, 212, 16, 206, 245, 34, 40, 162, 55, 68, 200, 7, 39, 171, 75, 75, 193, 210, 242, 230, 205, 128, 22, 140, 113, 210, 208, 176, 214, 174, 153, 173, 213, 119, 8, 143, 203, 253, 137, 118, 57, 243, 113, 62, 100, 94, 144, 129, 56, 28, 195, 85, 240, 23, 176, 204, 250, 85, 139, 118, 94, 242, 151, 146, 247, 18, 197, 232, 249, 137, 11, 112, 34, 81, 180, 114, 239, 7, 254, 145, 26, 195, 4, 80, 30, 24, 59, 56, 144, 39, 105, 71, 250, 102, 238, 83, 136, 37, 59, 71, 186, 196, 104, 125, 145, 53, 185, 57, 232, 13, 210, 210, 171, 48, 159, 126, 131, 49, 57, 150, 76, 224, 253, 227, 166, 157, 74, 172, 127, 98, 221, 227, 194, 251, 213, 210, 73, 234, 183, 166, 131, 61, 3, 178, 86, 217, 58, 72, 153, 169, 54, 39, 149, 220, 216, 176, 123, 38, 149, 86, 4, 86, 126, 19, 231, 252, 121, 53, 114, 140, 244, 244, 228, 192, 250, 131, 184, 29, 14, 48, 110, 250, 82, 70, 112, 211, 20, 76, 33, 161, 156, 15, 104, 42, 234, 116, 137, 233, 254, 200, 83, 111, 99, 114, 151, 184, 199, 24, 152, 18, 133, 21, 247, 217, 224, 21, 178, 4, 103, 158, 182, 157, 71, 241, 130, 1, 240, 31, 29, 148, 167, 23, 58, 252, 210, 121, 112, 17, 229, 97, 170, 168, 26, 162, 139, 237, 39, 67, 139, 6, 168, 96, 66, 24, 76, 87, 16, 165, 179, 58, 104, 67, 170, 1, 163, 157, 126, 203, 106, 239, 216, 227, 66, 10, 104, 24, 24, 58, 247, 60, 188, 219, 125, 36, 239, 18, 175, 63, 249, 226, 154, 253, 211, 126, 76, 239, 12, 202, 123, 83, 101, 110, 113, 209, 46, 215, 34, 108, 112, 201, 98, 136, 67, 185, 39, 164, 12, 11, 60, 180, 109, 24, 118, 118, 255, 29, 58, 101, 176, 254, 114, 10, 167, 205, 51, 32, 85, 88, 139, 39, 65, 183, 198, 27, 164, 232, 91, 157, 151, 51, 252, 214, 158, 251, 108, 120, 54, 67, 112, 117, 123, 79, 221, 129, 67, 133, 196, 134, 27, 143, 150, 113, 242, 208, 125, 104, 127, 82, 249, 127, 255, 41, 224, 69, 157, 108, 176, 161, 45, 69, 244, 241, 253, 253, 17, 23, 223, 127, 195, 151, 25, 223, 115, 196, 33, 42, 254, 29, 12, 218, 87, 145, 30, 200, 167, 237, 86, 31, 93, 204, 9, 28, 121, 228, 28, 221, 66, 239, 152, 204, 62, 151, 46, 116, 1, 142, 226, 173, 143, 103, 41, 210, 158, 70, 242, 138, 70, 214, 126, 203, 127, 92, 93, 147, 119, 221, 1, 10, 171, 241, 36, 74, 104, 144, 246, 202, 205, 255, 9, 58, 167, 10, 8, 166, 99, 5, 157, 38, 168, 194, 102, 0, 45, 225, 169, 87, 156, 26, 223, 205, 23, 78, 85, 151, 110, 91, 51, 133, 16, 82, 84, 42, 89, 126, 141, 188, 191, 126, 133, 25, 116, 150, 18, 102, 191, 190, 23, 213, 39, 105, 123, 219, 135, 212, 7, 232, 62, 162, 132, 108, 126, 44, 237, 63, 253, 96, 157, 140, 82, 184, 2, 46, 187, 97, 143, 57, 66, 136, 73, 179, 179, 29, 228, 6, 80, 128, 150, 125, 62, 147, 16, 131, 80, 17, 38, 67, 173, 57, 28, 15, 166, 109, 4, 55, 164, 203, 107, 116, 105, 227, 161, 109, 51, 41, 108, 149, 77, 102, 58, 114, 72, 5, 58, 247, 152, 136, 140, 62, 91, 197, 227, 215, 183, 206, 244, 218, 94, 101, 254, 111, 157, 25, 14, 31, 108, 125, 75, 168, 236, 33, 189, 123, 232, 83, 153, 38, 54, 191, 2, 12, 36, 109, 157, 55, 235, 138, 129, 107, 203, 71, 187, 174, 119, 179, 175, 2, 166, 172, 177, 171, 73, 237, 124, 112, 39, 40, 129, 152, 92, 58, 201, 191, 159, 26, 216, 117, 181, 67, 116, 96, 62, 23, 74, 133, 198, 189, 166, 26, 57, 124, 160, 2, 39, 26, 156, 173, 50, 109, 169, 218, 178, 248, 6, 141, 117, 104, 84, 17, 164, 225, 179, 194, 178, 10, 81, 143, 187, 235, 10, 6, 124, 120, 15, 173, 138, 159, 233, 52, 31, 149, 46, 137, 180, 241, 248, 79, 67, 134, 75, 184, 11, 24, 93, 236, 102, 152, 229, 60, 238, 184, 211, 124, 222, 76, 45, 195, 164, 22, 34, 176, 253, 244, 199, 233, 58, 68, 110, 120, 101, 60, 207, 101, 122, 162, 132, 174, 48, 6, 182, 228, 172, 40, 72, 143, 49, 189, 163, 120, 77, 230, 254, 39, 244, 90, 186, 51, 208, 237, 237, 0, 214, 131, 11, 145, 5, 223, 118, 184, 33, 64, 57, 194, 78, 70, 210, 41, 63, 143, 74, 178, 62, 95, 96, 87, 178, 175, 57, 139, 1, 205, 129, 71, 100, 88, 248, 253, 179, 123, 165, 38, 114, 111, 152, 135, 244, 116, 129, 242, 73, 91, 141, 57, 207, 240, 178, 172, 62, 93, 219, 61, 65, 120, 203, 56, 33, 38, 214, 253, 222, 72, 111, 53, 80, 201, 200, 92, 37, 8, 54, 34, 134, 166, 210, 92, 210, 122, 160, 39, 215, 166, 193, 204, 68, 36, 123, 133, 193, 223, 131, 46, 17, 177, 116, 67, 243, 88, 30, 152, 216, 227, 148, 198, 36, 44, 129, 116, 178, 242, 210, 221, 149, 62, 255, 205, 181, 26, 220, 184, 4, 38, 111, 62, 172, 249, 156, 156, 13, 121, 233, 101, 234, 106, 26, 7, 9, 95, 195, 86, 199, 33, 174, 200, 245, 119, 253, 14, 255, 144, 70, 200, 155, 41, 81, 184, 20, 21, 4, 81, 225, 179, 70, 60, 11, 8, 120, 175, 142, 36, 192, 33, 106, 53, 234, 128, 79, 230, 188, 129, 122, 16, 255, 42, 110, 213, 64, 20, 223, 203, 41, 70, 185, 107, 29, 33, 150, 26, 11, 95, 246, 44, 94, 101, 108, 61, 113, 177, 32, 5, 74, 98, 52, 23, 102, 119, 40, 108, 87, 227, 187, 202, 92, 133, 131, 157, 255, 180, 225, 29, 173, 172, 242, 5, 200, 184, 155, 154, 72, 39, 141, 155, 17, 5, 140, 89, 196, 76, 130, 167, 146, 151, 252, 141, 195, 69, 214, 228, 22, 20, 114, 169, 168, 150, 201, 237, 114, 99, 138, 203, 84, 251, 6, 110, 8, 12, 217, 194, 45, 223, 182, 203, 135, 175, 150, 150, 62, 220, 80, 146, 28, 70, 142, 140, 147, 133, 141, 49, 204, 104, 69, 213, 44, 98, 163, 206, 156, 60, 250, 102, 33, 39, 103, 253, 69, 78, 61, 84, 206, 243, 137, 3, 66, 79, 151, 188, 106, 115, 3, 23, 162, 202, 151, 97, 226, 213, 170, 164, 38, 105, 115, 78, 241, 65, 152, 86, 254, 16, 139, 8, 108, 250, 6, 65, 92, 16, 170, 208, 247, 103, 124, 243, 208, 255, 231, 74, 241, 200, 104, 61, 63, 151, 180, 84, 110, 87, 225, 139, 89, 186, 154, 51, 179, 229, 169, 187, 182, 203, 77, 193, 174, 80, 3, 85, 192, 203, 102, 23, 55, 248, 32, 55, 186, 164, 224, 48, 182, 245, 73, 165, 204, 151, 26, 237, 84, 9, 174, 212, 127, 145, 178, 45, 53, 18, 47, 139, 69, 149, 142, 61, 79, 127, 14, 173, 116, 122, 254, 182, 176, 174, 23, 178, 25, 84, 61, 67, 171, 114, 234, 71, 162, 212, 41, 4, 19, 202, 98, 5, 177, 125, 199, 197, 153, 76, 46, 171, 69, 169, 127, 14, 125, 15, 140, 145, 200, 126, 17, 19, 74, 183, 213, 26, 6, 110, 162, 237, 22, 51, 192, 170, 191, 185, 33, 30, 191, 132, 211, 184, 52, 143, 168, 112, 192, 136, 101, 227, 33], + [242, 37, 217, 86, 3, 126, 63, 169, 139, 182, 202, 166, 153, 175, 198, 225, 137, 161, 40, 4, 27, 125, 191, 253, 49, 43, 168, 150, 253, 25, 184, 227, 237, 49, 105, 226, 252, 60, 41, 117, 198, 196, 19, 59, 165, 94, 83, 207, 116, 35, 52, 179, 35, 135, 240, 6, 16, 176, 139, 10, 106, 161, 15, 55, 28, 191, 124, 40, 143, 1, 19, 45, 90, 93, 206, 163, 86, 61, 63, 168, 79, 163, 38, 161, 112, 27, 227, 211, 185, 230, 176, 122, 101, 133, 9, 131, 41, 79, 66, 179, 109, 176, 141, 3, 31, 100, 208, 225, 108, 65, 210, 211, 145, 127, 235, 152, 104, 26, 178, 252, 215, 194, 117, 182, 239, 142, 188, 93, 34, 184, 79, 239, 181, 233, 7, 228, 185, 2, 53, 123, 248, 20, 204, 164, 220, 243, 23, 45, 30, 37, 78, 118, 7, 246, 19, 162, 47, 75, 91, 21, 176, 165, 250, 7, 207, 155, 10, 168, 129, 154, 197, 7, 12, 131, 239, 116, 209, 200, 204, 47, 186, 8, 29, 253, 60, 129, 251, 211, 139, 113, 90, 189, 189, 190, 130, 76, 4, 192, 65, 200, 107, 237, 248, 63, 29, 55, 102, 1, 176, 244, 102, 151, 141, 212, 255, 69, 56, 221, 68, 76, 210, 223, 143, 212, 219, 137, 214, 192, 17, 217, 195, 95, 176, 68, 236, 103, 193, 113, 192, 72, 179, 240, 185, 14, 28, 47, 131, 164, 146, 42, 153, 43, 29, 253, 145, 4, 85, 103, 219, 45, 65, 244, 206, 187, 101, 13, 209, 247, 218, 103, 95, 178, 159, 3, 62, 103, 45, 141, 168, 121, 77, 176, 171, 26, 174, 109, 36, 62, 12, 96, 251, 209, 129, 187, 139, 19, 106, 207, 122, 124, 186, 130, 214, 137, 138, 213, 126, 158, 48, 123, 95, 189, 81, 190, 102, 173, 245, 20, 250, 204, 109, 45, 242, 55, 201, 126, 68, 115, 126, 206, 145, 123, 106, 236, 167, 247, 2, 45, 202, 124, 78, 44, 214, 228, 66, 16, 90, 95, 75, 247, 172, 229, 229, 142, 30, 150, 39, 156, 221, 104, 122, 13, 55, 50, 39, 173, 253, 98, 170, 238, 33, 14, 244, 150, 137, 236, 133, 80, 99, 133, 48, 5, 255, 55, 20, 97, 62, 146, 203, 100, 247, 55, 16, 222, 94, 254, 73, 29, 235, 142, 144, 240, 175, 66, 148, 178, 143, 65, 128, 224, 172, 194, 27, 44, 162, 222, 104, 63, 165, 244, 255, 218, 179, 39, 165, 231, 240, 129, 48, 254, 37, 30, 54, 133, 186, 187, 234, 71, 97, 33, 203, 147, 121, 86, 102, 153, 64, 200, 22, 134, 76, 121, 207, 152, 164, 117, 241, 23, 54, 199, 6, 140, 7, 91, 113, 63, 23, 113, 43, 42, 112, 103, 72, 253, 164, 207, 161, 70, 149, 217, 7, 26, 102, 124, 18, 119, 129, 94, 137, 4, 251, 152, 229, 150, 119, 162, 149, 107, 18, 4, 166, 215, 59, 86, 104, 171, 208, 8, 185, 211, 254, 168, 22, 44, 230, 38, 173, 167, 152, 86, 1, 148, 223, 15, 58, 171, 49, 103, 2, 255, 52, 111, 119, 76, 200, 102, 252, 1, 46, 151, 12, 131, 32, 122, 67, 159, 199, 44, 160, 36, 158, 15, 121, 210, 51, 61, 69, 114, 27, 206, 198, 4, 184, 31, 197, 251, 99, 162, 99, 53, 173, 17, 54, 42, 157, 139, 89, 83, 198, 53, 235, 233, 83, 129, 141, 246, 187, 127, 21, 119, 55, 228, 206, 26, 104, 247, 216, 216, 168, 92, 43, 143, 143, 219, 3, 8, 114, 33, 41, 7, 121, 54, 30, 75, 20, 15, 48, 142, 71, 220, 42, 101, 38, 103, 219, 192, 5, 152, 133, 118, 69, 63, 36, 232, 240, 171, 77, 177, 109, 2, 9, 61, 58, 160, 234, 116, 46, 76, 105, 51, 101, 154, 5, 84, 225, 169, 210, 72, 44, 170, 41, 167, 220, 238, 188, 63, 128, 11, 175, 151, 52, 36, 142, 139, 208, 186, 212, 81, 113, 146, 174, 68, 7, 138, 235, 201, 112, 255, 137, 243, 236, 37, 247, 185, 252, 114, 110, 45, 1, 162, 95, 69, 34, 231, 144, 47, 49, 138, 12, 27, 178, 122, 200, 10, 150, 78, 151, 2, 47, 212, 202, 87, 243, 89, 255, 40, 194, 156, 255, 16, 28, 162, 155, 141, 238, 124, 243, 112, 78, 143, 81, 95, 214, 8, 204, 101, 146, 189, 210, 208, 71, 84, 223, 176, 80, 50, 3, 225, 50, 170, 124, 102, 122, 131, 141, 237, 164, 8, 145, 132, 120, 61, 46, 74, 48, 113, 178, 25, 243, 35, 168, 33, 130, 244, 197, 62, 92, 134, 162, 94, 147, 1, 140, 3, 160, 243, 77, 79, 205, 29, 228, 163, 147, 220, 245, 87, 49, 76, 57, 10, 203, 228, 188, 32, 253, 149, 19, 117, 166, 144, 8, 187, 9, 243, 126, 41, 178, 223, 43, 158, 59, 129, 121, 58, 80, 178, 201, 32, 195, 218, 182, 222, 167, 186, 136, 75, 26, 112, 171, 189, 186, 100, 120, 45, 20, 10, 96, 192, 69, 138, 17, 79, 83, 175, 62, 52, 137, 130, 246, 56, 21, 57, 160, 4, 88, 44, 55, 49, 237, 38, 89, 98, 171, 56, 22, 58, 188, 70, 200, 141, 105, 146, 55, 186, 79, 67, 123, 88, 210, 92, 200, 85, 60, 228, 38, 172, 212, 217, 49, 109, 99, 139, 213, 60, 40, 147, 191, 223, 147, 49, 220, 126, 245, 104, 85, 84, 35, 57, 178, 255, 32, 127, 14, 21, 133, 101, 218, 20, 116, 167, 78, 119, 66, 120, 188, 229, 48, 72, 105, 111, 81, 191, 132, 147, 139, 30, 238, 12, 183, 173, 132, 141, 206, 20, 97, 195, 180, 242, 141, 203, 81, 227, 250, 186, 55, 175, 227, 86, 215, 58, 233, 85, 104, 240, 67, 204, 24, 49, 42, 139, 255, 218, 231, 122, 94, 224, 215, 203, 94, 176, 26, 113, 40, 177, 3, 33, 241, 242, 171, 185, 213, 238, 61, 237, 150, 78, 207, 184, 153, 214, 181, 137, 146, 95, 90, 55, 83, 132, 22, 244, 177, 102, 126, 125, 159, 133, 194, 109, 172, 70, 99, 92, 100, 233, 16, 159, 217, 247, 189, 144, 57, 185, 235, 206, 70, 253, 24, 202, 152, 138, 187, 204, 198, 119, 134, 160, 96, 76, 2, 53, 188, 147, 192, 183, 60, 50, 7, 86, 127, 219, 184, 84, 238, 50, 228, 233, 220, 216, 58, 82, 219, 114, 75, 207, 85, 17, 3, 119, 74, 92, 255, 97, 28, 204, 141, 32, 160, 153, 58, 210, 68, 165, 81, 93, 172, 186, 189, 5, 194, 81, 230, 210, 146, 144, 53, 0, 29, 182, 148, 249, 153, 228, 226, 193, 83, 51, 232, 98, 113, 185, 168, 230, 87, 135, 3, 173, 63, 178, 68, 54, 56, 196, 104, 147, 183, 243, 215, 116, 156, 87, 33, 150, 45, 185, 65, 62, 104, 67, 151, 147, 157, 210, 78, 188, 87, 18, 34, 209, 98, 73, 236, 195, 210, 97, 20, 73, 56, 98, 74, 29, 198, 210, 83, 174, 236, 173, 211, 218, 19, 215, 143, 1, 4, 60, 205, 172, 242, 84, 27, 210, 239, 136, 180, 151, 225, 17, 239, 87, 172, 166, 34, 175, 188, 79, 217, 234, 186, 142, 62, 65, 88, 68, 100, 101, 171, 52, 123, 14, 113, 68, 63, 38, 178, 190, 60, 59, 236, 19, 142, 134, 143, 122, 197, 40, 90, 228, 29, 119, 169, 167, 83, 3, 82, 100, 215, 58, 47, 221, 176, 196, 119, 228, 194, 84, 56, 45, 161, 81, 39, 138, 234, 174, 149, 252, 137, 2, 192, 147, 242, 137, 64, 218, 187, 34, 200, 188, 195, 83, 16, 142, 127, 137, 42, 253, 238, 238, 216, 233, 121, 44, 222, 204, 124, 175, 17, 43, 17, 241, 127, 24, 201, 1, 74, 201, 24, 84, 63, 8, 217, 163, 27, 121, 92, 9, 98, 220, 200, 157, 191, 62, 139, 128, 189, 194, 3, 219, 20, 202, 253, 185, 68, 213, 89, 188, 18, 82, 147, 103, 209, 92, 105, 191, 97, 240, 127, 142, 233, 199, 227, 234, 214, 254, 12, 96, 99, 88, 104, 208, 139, 196, 180, 99, 104, 73, 0, 96, 124, 224, 69, 58, 94, 18, 208, 52, 132, 183, 206, 159, 174, 110, 245, 124, 17, 48, 25, 170, 24, 175, 179, 245, 117, 141, 178, 247, 27, 133, 99, 65, 150, 106, 118, 184, 113, 145, 157, 79, 237, 20, 204, 12, 70, 31, 173, 193, 138, 39, 1, 54, 188, 133, 130, 15, 249, 75, 98, 55, 184, 90, 158, 118, 210, 92, 156, 193, 40, 43, 144, 112, 66, 156, 2, 79, 104, 253, 167, 153, 37, 59, 232, 41, 10, 156, 13, 82, 134, 167, 69, 196, 229, 159, 120, 50, 165, 88, 65, 113, 30, 24, 52, 58, 33, 35, 203, 238, 222, 53, 99, 200, 96, 194, 212, 234, 31, 224, 202, 29, 117, 76, 215, 194, 100, 18, 40, 100, 123, 77, 125, 250, 166, 168, 222, 24, 8, 93, 76, 211, 74, 225, 201, 241, 139, 170, 96, 89, 123, 177, 154, 205, 168, 7, 187, 129, 90, 204, 88, 88, 139, 47, 133, 141, 171, 143, 22, 230, 114, 248, 182, 130, 47, 170, 191, 44, 211, 98, 253, 49, 112, 210, 79, 23, 229, 217, 177, 181, 41, 219, 238, 92, 221, 67, 196, 79, 11, 82, 46, 48, 32, 223, 42, 144, 154, 216, 165, 181, 73, 94, 14, 246, 234, 184, 187, 81, 226, 231, 44, 98, 179, 217, 17, 39, 138, 225, 163, 20, 78, 122, 191, 135, 235, 191, 106, 229, 144, 191, 143, 142, 191, 207, 115, 96, 150, 32, 80, 208, 131, 66, 64, 41, 165, 70, 89, 194, 77, 208, 57, 212, 212, 37, 155, 215, 17, 12, 67, 235, 66, 236, 222, 34, 219, 115, 39, 191, 162, 238, 222, 92, 255, 55, 136, 4, 43, 241, 67, 235, 185, 221, 27, 108, 244, 54, 135, 54, 121, 128, 238, 90, 248, 204, 151, 251, 90, 96, 241, 166, 108, 100, 173, 214, 92, 67, 248, 106, 112, 76, 232, 215, 53, 92, 71, 174, 185, 194, 36, 245, 38, 160, 93, 226, 220, 69, 66, 105, 236, 88, 182, 112, 202, 201, 92, 191, 115, 117, 155, 142, 75, 190, 108, 87, 246, 160, 55, 70, 60, 91, 72, 29, 149, 221, 236, 32, 1, 220, 216, 62, 34, 59, 97, 77, 177, 219, 240, 219, 51, 232, 16, 105, 26, 51, 186, 44, 45, 235, 66, 68, 20, 174, 12, 243, 107, 247, 231, 219, 181, 17, 184, 117, 149, 246, 145, 200, 221, 156, 155, 250, 43, 136, 211, 57, 174, 162, 100, 74, 206, 50, 30, 62, 133, 20, 75, 163, 75, 220, 143, 190, 133, 120, 111, 183, 2, 131, 87, 194, 113, 127, 203, 234, 32, 91, 30, 79, 24, 236, 82, 24, 125, 92, 190, 159, 168, 3, 198, 213, 211, 188, 162, 245, 19, 43, 17, 38, 126, 21, 104, 199, 247, 85, 13, 36, 196, 76, 249, 17, 2, 89, 252, 175, 10, 216, 214, 20, 94, 183, 83, 56, 58, 149, 197, 89, 29, 112, 9, 133, 90, 84, 34, 91, 152, 114, 113, 169, 111, 51, 168, 57, 96, 246, 224, 20, 42, 226, 63, 201, 40, 122, 183, 160, 175, 102, 70, 179, 120, 238, 116, 23, 88, 122, 44, 235, 89, 16, 235, 38, 98, 62, 37, 28, 80, 76, 142, 101, 158, 104, 244, 105, 20, 93, 89, 50, 92, 168, 11, 206, 228, 250, 197, 77, 208, 142, 214, 40, 154, 64, 181, 59, 230, 133, 190, 163, 69, 85, 76, 140, 186, 48, 212, 250, 64, 235, 162, 63, 28, 64, 169, 150, 130, 93, 57, 133, 118, 102, 228, 160, 166, 127, 131, 145, 206, 126, 240, 98, 226, 128, 181, 155, 61, 0, 99, 58, 139, 237, 73, 97, 215, 114, 229, 120, 65, 124, 178, 155, 236, 28, 150, 213, 211, 53, 5, 106, 57, 207, 103, 60, 249, 107, 100, 230, 96, 49, 113, 7, 250, 187, 219, 184, 180, 189, 245, 192, 33, 147, 31, 217, 86, 185, 91, 33, 19, 177, 189, 159, 146, 165, 222, 58, 102, 30, 93, 127, 219, 248, 23, 251, 38, 241, 97, 252, 196, 241, 87, 161, 249, 241, 89, 26, 142, 67, 179, 140, 50, 117, 4, 249, 220, 172, 50, 16, 122, 101, 223, 159, 186, 16, 238, 13, 177, 19, 229, 173, 181, 244, 152, 149, 212, 199, 81, 68, 236, 42, 167, 14, 163, 231, 64, 135, 185, 35, 159, 143, 24, 247, 3, 149, 13, 255, 237, 227, 23, 37, 98, 115, 123, 72, 251, 147, 130, 57, 24, 100, 97, 77, 43, 37, 163, 99, 22, 149, 143, 166, 199, 160, 155, 78, 73, 1, 197, 120, 174, 42, 6, 153, 38, 18, 240, 177, 28, 216, 237, 160, 138, 240, 194, 207, 89, 249, 207, 220, 18, 90, 222, 32, 128, 249, 4, 184, 36, 8, 30, 175, 167, 253, 100, 176, 25, 138, 134, 104, 10, 230, 95, 122, 35, 223, 125, 226, 210, 164, 254, 248, 219, 43, 114, 193, 123, 243, 101, 32, 150, 175, 185, 218, 182, 129, 158, 146, 168, 33, 154, 122, 250, 226, 113, 114, 108, 245, 105, 171, 233, 172, 24, 234, 255, 27, 230, 201, 91, 112, 216, 12, 122, 24, 89, 55, 20, 125, 84, 209, 33, 9, 158, 202, 16, 75, 48, 53, 229, 23, 217, 68, 30, 159, 138, 147, 21, 91, 155, 245, 103, 95, 176, 1, 166, 157, 1, 246, 21, 144, 222, 206, 34, 149, 104, 43, 1, 49, 92, 47, 163, 97, 171, 72, 67, 236, 198, 92, 54, 78, 247, 50, 61, 169, 105, 183, 229, 252, 55, 144, 64, 236, 200, 224, 51, 138, 65, 222, 183, 92, 201, 201, 133, 194, 211, 240, 36, 18, 155, 203, 51, 116, 0, 177, 39, 21, 219, 82, 33, 85, 85, 13, 240, 187, 22, 13, 180, 164, 178, 48, 181, 90, 102, 224, 91, 148, 66, 11, 115, 232, 112, 155, 43, 77, 59, 178, 57, 186, 227, 244, 18, 10, 99, 8, 184, 205, 13, 186, 119, 28, 255, 38, 5, 247, 35, 28, 238, 51, 207, 87, 135, 182, 138, 70, 89, 110, 40, 55, 239, 239, 83, 225, 239, 73, 9, 253, 179, 97, 231, 1, 145, 30, 80, 223, 123, 27, 127, 66, 106, 5, 40, 207, 235, 189, 34, 233, 238, 154, 228, 168, 171, 72, 243, 165, 215, 128, 28, 190, 168, 183, 64, 243, 169, 96, 175, 70, 202, 86, 243, 158, 228, 194, 189, 84, 139, 242, 79, 41, 141, 48, 197, 174, 197, 137, 247, 177, 134, 237, 5, 182, 93, 168, 61, 99, 236, 90, 119, 106, 37, 15, 134, 71, 182, 46, 49, 74, 214, 135, 197, 221, 204, 81, 240, 142, 75, 84, 105, 15, 141, 198, 232, 71, 22, 51, 106, 128, 91, 101, 47, 117, 163, 100, 254, 233, 77, 112, 184, 211, 164, 254, 174, 83, 195, 161, 141, 167, 209, 94, 134, 43, 12, 105, 67, 226, 232, 100, 134, 84, 185, 67, 227, 116, 232, 155, 157, 158, 101, 161, 52, 107, 23, 149, 24, 189, 230, 234, 118, 100, 106, 201, 53, 180, 233, 178, 174, 164, 73, 169, 209, 253, 90, 68, 4, 97, 95, 137, 206, 215, 33, 1, 21, 106, 32, 245, 158, 244, 8, 20, 240, 255, 252, 140, 81, 126, 84, 102, 8, 3, 117, 29, 169, 151, 249, 249, 92, 76, 19, 75, 225, 25, 168, 4, 84, 211, 169, 44, 70, 172, 136, 39, 232, 18, 192, 201, 21, 128, 116, 87, 11, 163, 185, 252, 185, 159, 211, 12, 42, 173, 14, 181, 48, 91, 79, 179, 202, 40, 27, 103, 167, 233, 97, 203, 98, 181, 79, 231, 149, 20, 74, 187, 164, 110, 159, 73, 62, 42, 73, 248, 136, 113, 43, 114, 30, 34, 212, 225, 195, 135, 219, 15, 26, 209, 98, 66, 188, 248, 176, 132, 187, 90, 11, 187, 94, 232, 136, 111, 152, 125, 50, 35, 122, 135, 54, 190, 158, 141, 185, 115, 14, 57, 186, 237, 142, 252, 224, 166, 252, 84, 127, 222, 74, 244, 36, 157, 93, 197, 237, 90, 242, 29, 3, 200, 208, 5, 136, 113, 207, 59, 119, 139, 173, 219, 27, 59, 105, 79, 70, 213, 120, 229, 71, 7, 213, 187, 103, 237, 171, 136, 199, 195, 64, 54, 71, 31, 17, 17, 34, 115, 128, 179, 59, 208, 131, 137, 194, 73, 4, 167, 229, 34, 132, 60, 162, 15, 140, 179, 233, 44, 109, 76, 213, 219, 245, 170, 108, 124, 33, 192, 54, 249, 219, 132, 54, 108, 140, 158, 127, 8, 12, 48, 154, 108, 225, 27, 37, 110, 64, 57, 252, 137, 80, 234, 239, 195, 204, 98, 238, 147, 50, 29, 95, 206, 140, 237, 223, 192, 57, 36, 184, 251, 141, 50, 95, 56, 217, 37, 102, 10, 46, 51, 158, 1, 142, 163, 48, 67, 71, 35, 50, 99, 131, 143, 250, 15, 163, 6, 202, 22, 119, 43, 48, 126, 37, 207, 43, 232, 6, 226, 92, 107, 157, 67, 191, 177, 10, 59, 223, 23, 50, 199, 111, 174, 188, 36, 64, 248, 11, 32, 85, 6, 113, 114, 62, 148, 74, 40, 65, 80, 205, 138, 217, 162, 239, 243, 97, 52, 221, 214, 25, 24, 50, 109, 69, 33, 117, 223, 245, 64, 36, 185, 85, 242, 111, 197, 193, 113, 240, 199, 222, 108, 22, 197, 130, 207, 105, 184, 6, 184, 16, 0, 124, 251, 101, 200, 41, 149, 245, 40, 113, 231, 125, 20, 241, 130, 89, 65, 158, 203, 165, 86, 236, 27, 215, 23, 238, 29, 250, 2, 32, 251, 19, 62, 166, 155, 141, 130, 215, 76, 171, 254, 14, 67, 237, 107, 99, 225, 23, 170, 146, 191, 231, 102, 242, 68, 56, 23, 37, 173, 59, 239, 23, 252, 115, 27, 59, 194, 242, 102, 151, 77, 45, 239, 173, 239, 245, 182, 54, 89, 81, 58, 32, 58, 234, 175, 20, 174, 4, 192, 18, 180, 99, 191, 146, 142, 225, 185, 135, 235, 151, 49, 72, 194, 15, 151, 145, 239, 61, 68, 118, 9, 87, 48, 161, 142, 213, 28, 204, 209, 36, 243, 231, 231, 117, 61, 237, 7, 75, 52, 131, 120, 192, 231, 140, 252, 24, 125, 154, 32, 144, 47, 209, 229, 141, 150, 99, 154, 219, 88, 119, 81, 185, 70, 104, 125, 177, 81, 251, 243, 219, 145, 253, 43, 221, 38, 135, 190, 29, 84, 98, 138, 226, 67, 222, 83, 84, 228, 170, 209, 207, 223, 151, 153, 232, 168, 175, 50, 60, 204, 168, 138, 67, 83, 63, 147, 114, 33, 2, 40, 223, 138, 114, 193, 72, 162, 123, 17, 23, 195, 60, 235, 29, 210, 230, 55, 1, 106, 239, 132, 173, 76, 109, 119, 9, 3, 69, 128, 189, 20, 99, 112, 229, 24, 80, 174, 199, 240, 43, 134, 68, 193, 25, 87, 37, 104, 185, 22, 121, 100, 208, 177, 52, 213, 229, 54, 153, 39, 247, 80, 179, 240, 146, 180, 242, 28, 249, 11, 226, 24, 85, 25, 84, 138, 46, 99, 195, 28, 11, 77, 113, 255, 177, 163, 122, 176, 49, 175, 138, 249, 20, 57, 242, 214, 222, 130, 142, 97, 196, 106, 120, 182, 119, 235, 235, 203, 138, 243, 31, 206, 176, 252, 142, 43, 109, 121, 98, 151, 132, 74, 118, 98, 100, 115, 218, 60, 29, 220, 13, 75, 12, 160, 57, 151, 92, 48, 183, 146, 129, 92, 11, 153, 182, 184, 192, 52, 171, 220, 82, 11, 228, 159, 164, 60, 33, 176, 82, 162, 91, 0, 67, 82, 31, 54, 18, 32, 97, 208, 53, 230, 59, 60, 195, 118, 11, 215, 117, 169, 110, 54, 221, 57, 70, 12, 68, 193, 138, 248, 98, 170, 211, 34, 218, 61, 81, 238, 44, 172, 95, 188, 26, 198, 131, 89, 35, 163, 138, 153, 166, 153, 196, 52, 15, 98, 222, 145, 151, 139, 77, 114, 132, 192, 41, 241, 53, 19, 226, 133, 136, 233, 164, 109, 92, 106, 24, 105, 124, 27, 84, 148, 32, 31, 111, 203, 74, 211, 184, 115, 130, 174, 121, 246, 215, 233, 192, 187, 41, 227, 50, 184, 175, 231, 117, 252, 199, 210, 46, 9, 93, 200, 45, 172, 81, 22, 222, 217, 237, 187, 254, 13, 119, 42, 127, 39, 31, 87, 189, 110, 142, 119, 245, 129, 110, 145, 190, 162, 160, 102, 113, 139, 52, 129, 230, 251, 14, 210, 81, 158, 185, 22, 245, 105, 235, 58, 102, 58, 64, 87, 149, 144, 146, 211, 160, 115, 10, 36, 206, 14, 153, 89, 229, 209, 160, 194, 218, 245, 136, 244, 41, 171, 46, 123, 102, 68, 40, 145, 247, 55, 28, 43, 204, 153, 249, 192, 185, 27, 218, 30, 22, 196, 99, 228, 106, 240, 114, 7, 244, 126, 14, 79, 107, 140, 2, 44, 70, 163, 57, 146, 24, 220, 57, 38, 143, 34, 150, 109, 80, 239, 5, 176, 81, 18, 229, 225, 184, 241, 155, 101, 174, 101, 221, 4, 47, 92, 69, 75, 89, 3, 66, 11, 37, 228, 69, 232, 26, 107, 55, 142, 177, 125, 215, 227, 241, 50, 34, 159, 182, 204, 30, 54, 144, 44, 199, 43, 50, 105, 140, 150, 192, 253, 157, 76, 81, 107, 77, 76, 197, 196, 201, 135, 43, 133, 51, 230, 106, 11, 93, 136, 41, 154, 17, 1, 63, 38, 203, 159, 43, 68, 173, 106, 168, 182, 32, 232, 29, 138, 112, 166, 125, 180, 15, 124, 140, 26, 54, 95, 8, 167, 207, 83, 75, 32, 144, 176, 42, 33, 197, 173, 29, 17, 121, 61, 72, 152, 201, 179, 65, 125, 198, 147, 235, 148, 250, 193, 49, 165, 2, 250, 83, 46, 134, 194, 176, 236, 109, 219, 160, 95, 165, 100, 190, 52, 143, 178, 15, 211, 162, 240, 67, 130, 153, 150, 159, 30, 167, 22, 73, 231, 62, 21, 152, 250, 75, 154, 72, 220, 247, 157, 114, 156, 211, 20, 168, 62, 163, 32, 149, 34, 68, 107, 83, 25, 127, 40, 48, 14, 74, 151, 109, 95, 85, 16, 226, 8, 166, 123, 31, 126, 50, 100, 222, 233, 76, 13, 151, 242, 181, 219, 142, 21, 0, 1, 179, 225, 88, 255, 113, 6, 123, 158, 109, 51, 241, 170, 94, 97, 5, 232, 47, 52, 13, 222, 103, 125, 132, 116, 239, 27, 179, 64, 89, 169, 203, 36, 64, 86, 202, 19, 10, 104, 62, 117, 160, 203, 56, 195, 219, 150, 200, 88, 107, 16, 77, 99, 239, 124, 221, 24, 71, 91, 243, 221, 250, 242, 23, 61, 208, 132, 10, 157, 24, 184, 101, 131, 47, 234, 228, 214, 237, 217, 153, 164, 1, 217, 209, 25, 32, 98, 145, 99, 88, 71, 14, 64, 214, 27, 197, 159, 9, 247, 3, 220, 107, 229, 173, 35, 140, 105, 41, 106, 75, 139, 40, 203, 119, 51, 39, 62, 110, 22, 123, 249, 187, 150, 181, 240, 32, 197, 188, 239, 65, 25, 14, 88, 137, 144, 26, 216, 82, 85, 104, 27, 63, 176, 204, 38, 31, 249, 242, 178, 197, 82, 214, 210, 148, 158, 108, 241, 170, 255, 104, 247, 73, 155, 21, 208, 200, 227, 252, 102, 56, 18, 44, 191, 101, 113, 154, 22, 44, 75, 151, 122, 11, 140, 237, 167, 0, 163, 44, 101, 191, 207, 43, 164, 192, 185, 137, 77, 103, 21, 9, 71, 236, 203, 153, 226, 155, 54, 114, 126, 86, 20, 224, 14, 92, 205, 115, 243, 12, 117, 175, 203, 61, 147, 243, 199, 29, 88, 186, 113, 228, 9, 218, 69, 65, 237, 227, 234, 124, 141, 242, 114, 191, 22, 219, 139, 178, 39, 185, 191, 114, 106, 183, 221, 18, 72, 132, 2, 148, 108, 72, 250, 239, 126, 18, 37, 113, 187, 250, 205, 81, 94, 112, 155, 199, 178, 177, 74, 205, 254, 138, 18, 28, 144, 246, 232, 19, 49, 232, 30, 72, 95, 141, 150, 226, 20, 10, 231, 195, 189, 162, 92, 144, 234, 134, 221, 220, 65, 255, 80, 66, 243, 126, 216, 161, 201, 153, 36, 102, 95, 114, 117, 15, 188, 8, 101, 141, 39, 147, 124, 29, 230, 112, 107, 165, 104, 36, 133, 146, 225, 170, 98, 172, 224, 140, 25, 95, 26, 3, 192, 54, 106, 152, 178, 19, 133, 241, 113, 40, 197, 109, 178, 138, 231, 147, 188, 32, 255, 221, 128, 2, 33, 191, 170, 181, 152, 93, 17, 178, 193, 161, 231, 28, 249, 121, 45, 135, 234, 133, 127, 9, 44, 143, 26, 27, 182, 161, 56, 174, 222, 44, 25, 133, 183, 128, 31, 254, 167, 98, 165, 75, 244, 251, 112, 76, 35, 71, 208, 68, 167, 60, 193, 82, 119, 113, 30, 17, 220, 205, 171, 181, 246, 215, 197, 63, 176, 41, 137, 108, 59, 237, 242, 27, 229, 158, 205, 104, 201, 174, 154, 46, 19, 182, 180, 54, 161, 212, 114, 113, 213, 15, 107, 66, 178, 153, 40, 139, 52, 214, 53, 84, 94, 230, 153, 12, 220, 116, 8, 152, 160, 56, 17, 86, 91, 175, 133, 248, 136, 49, 101, 42, 239, 97, 237, 7, 230, 230, 167, 29, 6, 185, 34, 90, 162, 83, 146, 127, 38, 193, 144, 112, 250, 91, 104, 153, 146, 145, 53, 161, 146, 27, 160, 200, 216, 255, 169, 187, 29, 120, 181, 138, 30, 153, 75, 74, 46, 251, 11, 127, 109, 8, 13, 99, 10, 81, 209, 107, 240, 192, 68, 155, 53, 30, 46, 198, 53, 238, 99, 183, 132, 188, 36, 168, 71, 27, 136, 211, 168, 144, 233, 139, 97, 235, 156, 129, 136, 137, 137, 116, 191, 169, 129, 86, 222, 242, 176, 118, 72, 70, 250, 73, 98, 137, 204, 16, 151, 103, 75, 100, 245, 16, 134, 12, 253, 209, 67, 79, 254, 87, 233, 100, 49, 67, 195, 220, 186, 24, 189, 253, 181, 185, 14, 232, 152, 8, 136, 186, 59, 182, 10, 86, 201, 36, 247, 119, 237, 212, 239, 189, 118, 14, 99, 31, 29, 72, 149, 64, 21, 249, 132, 230, 221, 157, 2, 46, 52, 107, 96, 6, 49, 47, 146, 100, 52, 170, 216, 194, 74, 32, 80, 125, 102, 228, 233, 182, 138, 150, 101, 42, 85, 143, 96, 212, 40, 49, 170, 121, 54, 37, 61, 168, 95, 133, 84, 89, 38, 101, 210, 123, 50, 133, 47, 198, 9, 13, 35, 18, 108, 218, 163, 164, 172, 180, 88, 183, 175, 193, 243, 238, 89, 157, 83, 20, 73, 143, 188, 233, 138, 49, 173, 21, 120, 140, 53, 133, 18, 168, 40, 113, 219, 238, 175, 99, 65, 234, 228, 35, 100, 116, 79, 6, 204, 135, 73, 115, 65, 255, 125, 39, 198, 211, 31, 104, 5, 52, 59, 117, 142, 144, 126, 15, 2, 112, 109, 221, 98, 5, 183, 62, 213, 242, 246, 251, 115, 47, 164, 247, 103, 205, 163, 140, 120, 32, 191, 170, 182, 219, 253, 156, 168, 253, 6, 36, 31, 169, 237, 58, 192, 240, 83, 225, 127, 244, 115, 57, 172, 33, 77, 118, 85, 237, 189, 25, 136, 3, 211, 71, 71, 97, 63, 69, 193, 164, 180, 162, 248, 92, 28, 200, 181, 122, 122, 83, 45, 113, 109, 188, 114, 80, 11, 56, 220, 177, 127, 0, 53, 132, 145, 201, 73, 113, 146, 6, 42, 138, 134, 179, 83, 193, 128, 160, 134, 36, 144, 156, 240, 150, 184, 19, 221, 20, 170, 4, 137, 129, 180, 199, 56, 107, 249, 253, 62, 113, 165, 192, 70, 61, 229, 118, 199, 124, 159, 4, 94, 176, 188, 162, 31, 70, 203, 142, 52, 84, 65, 88, 17, 141, 16, 217, 173, 152, 7, 10, 138, 59, 63, 88, 6, 54, 73, 91, 217, 192, 210, 57, 48, 180, 172, 112, 212, 38, 243, 56, 11, 221, 177, 36, 199, 31, 8, 120, 254, 216, 160, 244, 237, 86, 181, 235, 6, 56, 176, 236, 63, 227, 61, 115, 39, 86, 9, 20, 35, 170, 27, 22, 91, 100, 242, 213, 4, 76, 87, 239, 32, 226, 188, 170, 160, 42, 121, 65, 115, 49, 4, 202, 90, 37, 98, 207, 96, 230, 141, 93, 231, 15, 87, 130, 177, 115, 127, 165, 84, 5, 164, 174, 25, 129, 184, 31, 140, 1, 196, 18, 150, 91, 153, 171, 31, 124, 182, 103, 48, 132, 218, 114, 32, 237, 191, 246, 219, 115, 175, 155, 243, 148, 122, 105, 74, 117, 113, 221, 72, 208, 134, 238, 202, 82, 220, 148, 152, 213, 118, 197, 205, 5, 202, 3, 206, 108, 202, 222, 84, 109, 155, 174, 8, 141, 196, 210, 221, 150, 173, 153, 63, 156, 254, 233, 249, 47, 84, 252, 109, 220, 58, 60, 56, 35, 208, 198, 119, 45, 241, 235, 199, 239, 51, 125, 206, 90, 116, 227, 144, 104, 149, 132, 249, 214, 230, 167, 46, 209, 83, 176, 150, 144, 53, 239, 94, 115, 141, 130, 50, 64, 199, 255, 164, 65, 98, 50, 196, 14, 78, 133, 149, 123, 247, 82, 43, 151, 50, 127, 76, 69, 0, 155, 60, 225, 147, 224, 81, 28, 200, 207, 51, 51, 177, 239, 55, 40, 53, 241, 65, 188, 150, 216, 200, 36, 60, 29, 98, 24, 255, 11, 204, 226, 120, 25, 250, 55, 154, 77, 228, 145, 212, 51, 129, 152, 161, 67, 83, 82, 247, 7, 57, 194, 91, 169, 181, 52, 105, 40, 81, 154, 251, 191, 220, 178, 56, 55, 58, 188, 174, 175, 65, 224, 88, 74, 65, 235, 19, 55, 149, 179, 89, 42, 8, 122, 235, 182, 253, 13, 79, 208, 209, 191, 230, 197, 38, 16, 148, 177, 107, 198, 201, 110, 3, 183, 243, 216, 171, 168, 88, 166, 187, 103, 219, 157, 200, 69, 162, 157, 30, 29, 167, 115, 122, 154, 76, 67, 126, 117, 36, 139, 109, 27, 145, 142, 231, 24, 173, 182, 161, 203, 79, 3, 18, 186, 242, 9, 100, 1, 93, 194, 26, 215, 133, 147, 81, 161, 125, 23, 82, 27, 224, 170, 169, 164, 25, 229, 226, 61, 226, 175, 249, 219, 232, 204, 75, 122, 67, 159, 236, 224, 253, 227, 115, 58, 160, 148, 174, 7, 99, 92, 121, 125, 73, 101, 88, 227, 12, 7, 17, 119, 116, 10, 134, 121, 61, 74, 180, 168, 184, 220, 181, 87, 108, 63, 249, 205, 23, 191, 213, 127, 16, 203, 69, 55, 33, 5, 67, 51, 164, 49, 40, 15, 2, 4, 62, 44, 46, 178, 187, 192, 159, 24, 27, 68, 178, 170, 49, 254, 120, 22, 134, 25, 188, 71, 100, 46, 18, 115, 51, 88, 215, 15, 57, 57, 0, 62, 127, 145, 243, 65, 30, 149, 22, 198, 76, 18, 188, 56, 141, 76, 135, 80, 179, 64, 239, 84, 223, 137, 13, 165, 197, 35, 115, 82, 26, 152, 159, 61, 147, 232, 170, 135, 63, 119, 210, 218, 81, 93, 126, 180, 249, 24, 8, 63, 182, 18, 76, 244, 105, 255, 217, 32, 54, 83, 56, 177, 120, 61, 16, 123, 166, 238, 121, 41, 31, 196, 246, 203, 249, 179, 252, 224, 166, 135, 48, 16, 191, 183, 32, 82, 174, 77, 178, 155, 168, 233, 238, 136, 134, 213, 212, 111, 105, 23, 242, 208, 150, 178, 135, 10, 238, 233, 0, 213, 121, 176, 59, 102, 3, 196, 104, 253, 184, 194, 237, 243, 97, 191, 120, 211, 246, 236, 134, 1, 74, 80, 26, 219, 73, 155, 148, 175, 178, 4, 9, 52, 153, 7, 111, 229, 56, 98, 156, 247, 58, 250, 202, 141, 223, 126, 39, 15, 172, 126, 86, 206, 40, 200, 223, 30, 94, 59, 116, 240, 29, 133, 118, 243, 168, 154, 108, 231, 253, 160, 177, 132, 228, 120, 146, 99, 11, 106, 18, 69, 55, 201, 226, 250, 245, 83, 234, 61, 196, 174, 84, 184, 53, 216, 51, 42, 73, 146, 58, 11, 143, 233, 230, 200, 88, 166, 94, 161, 29, 25, 59, 209, 97, 175, 17, 10, 162, 34, 227, 226, 188, 206, 208, 226, 182, 132, 141, 26, 211, 192, 16, 124, 214, 230, 69, 68, 2, 223, 59, 245, 205, 172, 21, 191, 24, 204, 77, 51, 88, 147, 143, 168, 122, 64, 48, 124, 152, 251, 22, 37, 29, 191, 116, 64, 89, 99, 185, 163, 139, 239, 87, 108, 239, 248, 235, 118, 170, 25, 40, 238, 47, 131, 218, 249, 128, 14, 33, 105, 45, 255, 211, 226, 165, 97, 248, 243, 124, 101, 96, 8, 193, 41, 58, 63, 163, 122, 220, 51, 20, 140, 228, 70, 137, 191, 48, 167, 160, 0, 185, 50, 24, 195, 120, 137, 215, 189, 238, 88, 173, 27, 131, 22, 136, 107, 1, 37, 118, 163, 214, 195, 216, 244, 23, 55, 170, 48, 64, 113, 48, 84, 136, 171, 160, 228, 232, 98, 105, 229, 112, 104, 80, 45, 83, 66, 119, 9, 104, 200, 220, 67, 128, 113, 49, 228, 55, 129, 223, 225, 222, 104, 36, 109, 51, 215, 227, 198, 10, 171, 63, 73, 228, 87, 72, 8, 152, 224, 192, 3, 203, 66, 190, 248, 95, 168, 64, 53, 184, 212, 148, 230, 100, 25, 87, 14, 152, 124, 216, 69, 151, 113, 110, 66, 213, 211, 97, 168, 248, 208, 91, 194, 229, 162, 99, 142, 174, 224, 234, 191, 4, 164, 107, 231, 96, 141, 216, 117, 121, 215, 209, 184, 189, 251, 101, 134, 124, 166, 111, 129, 238, 17, 4, 41, 145, 121, 215, 93, 16, 232, 20, 161, 115, 155, 63, 85, 220, 252, 208, 29, 55, 211, 208, 46, 17, 217, 0, 171, 135, 32, 27, 65, 48, 61, 6, 248, 181, 38, 239, 234, 207, 245, 92, 179, 39, 61, 114, 141, 80, 98, 237, 61, 212, 241, 76, 112, 186, 226, 9, 193, 128, 252, 69, 232, 91, 235, 210, 168, 203, 144, 52, 143, 252, 27, 228, 100, 29, 70, 191, 197, 200, 180, 79, 58, 91, 95, 79, 79, 179, 39, 147, 224, 0, 236, 55, 17, 138, 24, 200, 43, 85, 113, 137, 111, 149, 180, 153, 243, 131, 55, 63, 171, 151, 183, 5, 31, 135, 145, 26, 49, 211, 122, 41, 157, 199, 24, 214, 191, 220, 3, 25, 226, 252, 84, 92, 15, 6, 199, 118, 50, 53, 0, 9, 243, 72, 145, 68, 246, 24, 103, 20, 185, 60, 54, 131, 118, 205, 221, 100, 111, 146, 78, 80, 97, 26, 246, 30, 171, 49, 221, 137, 142, 96, 36, 226, 149, 74, 251, 182, 105, 220, 196, 149, 144, 111, 134, 134, 170, 97, 35, 187, 213, 133, 63, 94, 9, 17, 1, 219, 244, 139, 134, 209, 206, 120, 89, 3, 186, 135, 241, 157, 100, 243, 80, 212, 228, 235, 112, 23, 233, 153, 80, 64, 184, 5, 165, 174, 9, 159, 219, 243, 72, 95, 140, 16, 93, 184, 65, 119, 113, 255, 230, 171, 222, 63, 89, 177, 4, 114, 166, 73, 199, 167, 80, 58, 199, 18, 32, 253, 192, 51, 169, 29, 186, 200, 196, 185, 83, 143, 162, 184, 250, 68, 69, 59, 87, 176, 106, 39, 235, 153, 78, 194, 250, 75, 16, 137, 55, 124, 54, 185, 253, 145, 222, 240, 59, 107, 24, 127, 36, 203, 211, 218, 7, 236, 37, 18, 67, 34, 223, 58, 207, 162, 128, 188, 200, 55, 10, 237, 244, 161, 194, 80, 133, 89, 146, 205, 199, 133, 129, 101, 216, 22, 161, 56, 250, 188, 235, 71, 21, 142, 184, 70, 241, 44, 85, 33, 0, 65, 43, 159, 194, 249, 80, 28, 131, 192, 160, 225, 148, 135, 239, 86, 61, 31, 246, 94, 238, 100, 143, 133, 132, 216, 35, 52, 62, 74, 215, 83, 253, 11, 89, 31, 191, 24, 114, 4, 41, 208, 133, 142, 174, 112, 156, 90, 232, 148, 186, 5, 212, 177, 150, 130, 91, 87, 52, 217, 24, 56, 14, 134, 150, 228, 4, 87, 16, 121, 221, 235, 171, 99, 193, 87, 1, 171, 222, 88, 33, 9, 86, 102, 252, 95, 149, 197, 241, 7, 172, 65, 14, 104, 119, 208, 141, 110, 198, 201, 31, 188, 93, 86, 195, 6, 236, 96, 81, 168, 128, 217, 238, 191, 168, 169, 4, 242, 7, 111, 139, 24, 176, 217, 74, 124, 188, 17, 65, 0, 11, 247, 101, 91, 49, 94, 109, 187, 67, 207, 163, 189, 100, 145, 34, 193, 242, 20, 242, 67, 224, 150, 59, 135, 134, 114, 159, 213, 97, 58, 95, 161, 135, 211, 43, 102, 198, 30, 187, 25, 220, 166, 222, 205, 8, 124, 111, 197, 233, 7, 206, 52, 21, 24, 199, 13, 251, 158, 133, 116, 150, 244, 217, 90, 222, 199, 228, 237, 242, 248, 16, 174, 218, 237, 69, 94, 217, 243, 31, 153, 70, 74, 97, 85, 1, 234, 117, 74, 20, 223, 15, 140, 214, 96, 221, 137, 117, 77, 16, 95, 211, 56, 46, 87, 111, 33, 243, 154, 199, 224, 27, 213, 232, 66, 67, 103, 100, 247, 75, 142, 180, 92, 125, 238, 67, 57, 105, 22, 61, 177, 104, 32, 34, 0, 196, 141, 230, 84, 115, 200, 1, 194, 26, 136, 141, 235, 43, 5, 208, 228, 239, 35, 240, 134, 135, 73, 8, 192, 221, 26, 5, 236, 29, 154, 10, 185, 14, 201, 231, 109, 124, 53, 164, 63, 38, 217, 149, 36, 193, 27, 251, 233, 88, 217, 242, 9, 105, 131, 32, 113, 206, 91, 67, 70, 140, 161, 120, 12, 121, 136, 76, 68, 216, 64, 204, 66, 180, 25, 92, 241, 45, 49, 244, 191, 183, 131, 214, 182, 64, 65, 186, 90, 210, 191, 36, 153, 4, 213, 130, 233, 249, 110, 224, 51, 60, 133, 32, 58, 115, 102, 219, 228, 127, 21, 46, 22, 105, 212, 135, 219, 7, 69, 252, 193, 253, 143, 241, 217, 47, 41, 250, 93, 76, 120, 244, 223, 7, 74, 244, 92, 186, 69, 101, 204, 134, 118, 62, 237, 44, 184, 22, 18, 163, 139, 199, 110, 238, 24, 190, 124, 240, 155, 175, 155, 215, 219, 227, 132, 128, 31, 240, 188, 104, 163, 213, 27, 72, 244, 178, 145, 65, 117, 208, 62, 140, 231, 122, 122, 189, 100, 148, 166, 23, 102, 74, 77, 158, 214, 107, 185, 71, 32, 115, 200, 14, 141, 238, 129, 18, 136, 200, 88, 95, 253, 210, 4, 63, 162, 12, 39, 127, 242, 104, 192, 195, 191, 64, 202, 210, 85, 2, 46, 120, 3, 84, 118, 185, 11, 70, 158, 80, 142, 143, 34, 16, 59, 140, 2, 175, 34, 64, 133, 82, 9, 149, 56, 220, 175, 202, 35, 166, 66, 101, 2, 180, 222, 190, 6, 43, 106, 131, 109, 97, 128, 60, 182, 59, 152, 179, 177, 134, 175, 30, 199, 175, 209, 133, 167, 253, 221, 161, 123, 114, 80, 140, 86, 69, 151, 109, 107, 133, 252, 104, 169, 244, 53, 0, 126, 2, 165, 154, 64, 78, 73, 229, 233, 206, 166, 17, 155, 142, 223, 68, 176, 8, 122, 46, 175, 87, 144, 222, 222, 189, 188, 67, 59, 193, 135, 81, 70, 254, 117, 125, 33, 89, 155, 251, 119, 140, 40, 196, 135, 150, 47, 99, 28, 200, 141, 93, 10, 107, 155, 68, 114, 211, 109, 217, 61, 101, 242, 56, 235, 39, 235, 218, 44, 177, 217, 132, 26, 41, 78, 89, 199, 223, 139, 159, 118, 97, 113, 246, 49, 245, 201, 12, 138, 43, 125, 123, 1, 152, 217, 64, 158, 150, 39, 166, 87, 65, 176, 235, 197, 199, 198, 189, 194, 249, 235, 178, 57, 71, 115, 231, 214, 31, 169, 5, 210, 197, 69, 84, 93, 90, 170, 24, 64, 164, 119, 138, 115, 35, 81, 203, 55, 216, 60, 49, 221, 96, 0, 218, 214, 152, 169, 94, 144, 155, 26, 41, 247, 244, 121, 57, 121, 2, 177, 113, 228, 26, 79, 231, 124, 20, 172, 81, 138, 123, 2, 79, 93, 104, 59, 119, 202, 25, 88, 36, 175, 119, 240, 114, 170, 68, 88, 146, 118, 184, 253, 211, 72, 81, 45, 37, 162, 93, 13, 183, 49, 193, 230, 145, 249, 138, 6, 238, 127, 200, 152, 19, 68, 152, 155, 60, 240, 198, 143, 35, 138, 213, 223, 190, 172, 4, 216, 98, 110, 8, 73, 6, 52, 142, 237, 209, 202, 9, 132, 244, 247, 22, 26, 39, 251, 219, 94, 148, 211, 2, 172, 226, 112, 232, 51, 186, 50, 179, 179, 106, 26, 101, 25, 57, 37, 107, 140, 94, 225, 110, 41, 100, 34, 127, 46, 61, 206, 48, 139, 240, 20, 154, 7, 234, 105, 146, 226, 118, 162, 87, 202, 42, 114, 74, 253, 240, 100, 2, 121, 33, 144, 245, 252, 79, 183, 21, 176, 155, 230, 66, 240, 218, 155, 32, 236, 100, 106, 136, 229, 219, 55, 28, 213, 2, 139, 150, 13, 42, 154, 190, 61, 140, 38, 148, 241, 102, 226, 105, 248, 30, 150, 172, 42, 176, 29, 96, 141, 164, 162, 168, 96, 227, 23, 71, 176, 153, 81, 169, 170, 157, 141, 91, 65, 12, 44, 141, 109, 175, 243, 184, 241, 229, 117, 237, 43, 164, 254, 106, 73, 227, 234, 135, 90, 223, 27, 128, 67, 97, 15, 97, 253, 137, 91, 9, 196, 81, 238, 166, 11, 63, 79, 182, 124, 161, 78, 118, 114, 47, 129, 132, 121, 48, 102, 249, 127, 219, 124, 242, 204, 131, 176, 54, 95, 5, 107, 102, 227, 187, 25, 168, 46, 186, 168, 3, 163, 254, 229, 236, 47, 1, 187, 210, 190, 74, 217, 49, 207, 251, 42, 127, 134, 124, 175, 176, 37, 77, 130, 226, 84, 33, 239, 250, 6, 195, 181, 57, 201, 30, 146, 108, 234, 22, 218, 190, 13, 201, 78, 127, 250, 2, 124, 27, 195, 229, 215, 130, 77, 82, 7, 174, 47, 218, 52, 236, 134, 6, 175, 214, 120, 246, 241, 55, 144, 107, 73, 229, 82, 143, 201, 245, 71, 58, 11, 15, 236, 220, 176, 148, 64, 113, 21, 222, 174, 40, 1, 69, 39, 203, 58, 83, 183, 180, 27, 128, 40, 214, 228, 111, 59, 204, 8, 152, 188, 87, 92, 160, 220, 225, 119, 173, 230, 153, 114, 130, 55, 122, 112, 210, 170, 0, 16, 175, 207, 245, 224, 219, 197, 194, 191, 150, 209, 84, 163, 112, 32, 204, 171, 24, 5, 30, 235, 20, 126, 115, 25, 30, 223, 51, 236, 214, 239, 106, 143, 128, 126, 104, 170, 67, 228, 148, 66, 114, 190, 43, 67, 42, 43, 7, 125, 173, 128, 68, 253, 182, 89, 91, 97, 226, 101, 51, 1, 52, 174, 247, 208, 17, 21, 146, 115, 184, 124, 236, 76, 58, 227, 60, 129, 66, 182, 112, 217, 117, 200, 140, 35, 143, 18, 243, 119, 165, 113, 17, 241, 100, 203, 237, 239, 232, 203, 171, 228, 39, 151, 187, 23, 95, 2, 185, 189, 8, 53, 129, 251, 31, 31, 172, 179, 118, 62, 145, 94, 145, 144, 19, 130, 202, 150, 23, 30, 47, 41, 54, 80, 221, 158, 109, 204, 83, 127, 51, 69, 154, 126, 106, 66, 160, 39, 180, 0, 209, 136, 156, 174, 150, 83, 190, 9, 60, 254, 94, 9, 169, 40, 73, 46, 187, 163, 93, 158, 70, 27, 174, 185, 20, 194, 200, 120, 52, 108, 229, 242, 29, 35, 197, 80, 130, 84, 0, 106, 8, 47, 88, 52, 169, 121, 56, 10, 73, 7, 220, 89, 213, 227, 13, 137, 213, 32, 166, 2, 170, 208, 24, 122, 182, 228, 193, 179, 152, 208, 49, 24, 162, 172, 192, 245, 82, 179, 28, 255, 148, 69, 123, 13, 157, 93, 124, 133, 247, 197, 155, 14, 20, 144, 50, 104, 56, 109, 92, 162, 203, 204, 232, 14, 43, 194, 103, 251, 250, 186, 95, 134, 35, 48, 46, 209, 65, 11, 57, 236, 147, 70, 218, 48, 111, 146, 238, 6, 224, 39, 133, 29, 247, 179, 11, 130, 178, 211, 38, 174, 236, 177, 51, 227, 183, 157, 152, 243, 113, 156, 34, 218, 138, 39, 142, 16, 40, 203, 66, 36, 135, 147, 86, 17, 192, 36, 204, 145, 170, 134, 140, 204, 183, 207, 25, 176, 85, 171, 124, 254, 239, 52, 226, 115, 178, 54, 231, 162, 244, 247, 23, 147, 154, 34, 246, 146, 144, 13, 128, 8, 164, 152, 179, 249, 31, 158, 238, 178, 203, 246, 149, 191, 153, 19, 50, 172, 210, 223, 92, 6, 173, 176, 10, 57, 83, 148, 7, 93, 168, 26, 194, 36, 132, 106, 66, 108, 103, 142, 37, 10, 40, 127, 46, 110, 16, 104, 203, 188, 39, 44, 4, 22, 238, 84, 136, 230, 189, 180, 141, 211, 197, 115, 167, 47, 93, 161, 65, 23, 157, 114, 151, 142, 93, 36, 8, 223, 71, 118, 77, 3, 49, 13, 89, 231, 231, 14, 6, 215, 12, 52, 232, 211, 226, 114, 56, 59, 18, 236, 192, 185, 202, 136, 21, 196, 236, 239, 12, 102, 69, 148, 182, 57, 79, 180, 213, 109, 66, 20, 90, 15, 71, 35, 171, 88, 211, 53, 194, 230, 113, 183, 128, 254, 72, 183, 57, 5, 104, 17, 11, 228, 114, 145, 148, 141, 75, 197, 148, 195, 118, 113, 175, 62, 47, 157, 17, 253, 28, 78, 18, 21, 112, 208, 218, 176, 11, 251, 245, 146, 132, 76, 220, 57, 205, 95, 241, 8, 106, 12, 41, 35, 249, 211, 172, 209, 64, 72, 122, 82, 100, 195, 236, 247, 201, 221, 232, 155, 93, 37, 203, 136, 217, 143, 98, 253, 207, 13, 194, 8, 239, 55, 24, 33, 255, 34, 113, 196, 22, 41, 227, 148, 168, 28, 252, 124, 52, 33, 92, 75, 56, 153, 218, 99, 50, 26, 18, 233, 120, 222, 205, 194, 67, 121, 214, 37, 81, 177, 190, 144, 229, 124, 210, 253, 214, 248, 25, 50, 162, 30, 177, 199, 177, 102, 213, 8, 196, 243, 153, 107, 205, 156, 22, 143, 43, 110, 21, 68, 132, 152, 134, 103, 94, 82, 211, 163, 231, 58, 87, 213, 248, 33, 95, 18, 190, 244, 10, 129, 110, 35, 230, 206, 67, 85, 86, 175, 112, 179, 2, 182, 59, 136, 188, 160, 136, 95, 216, 30, 76, 24, 94, 118, 16, 132, 192, 177, 35, 198, 142, 239, 131, 77, 230, 217, 172, 213, 97, 154, 68, 171, 57, 193, 140, 66, 0, 169, 235, 117, 16, 183, 65, 45, 175, 242, 242, 198, 22, 8, 143, 129, 175, 4, 114, 116, 2, 223, 159, 145, 175, 205, 175, 226, 209, 172, 109, 248, 205, 169, 187, 73, 104, 225, 204, 164, 224, 6, 130, 210, 103, 205, 11, 135, 205, 221, 86, 170, 127, 114, 180, 55, 17, 163, 135, 113, 41, 120, 178, 184, 77, 60, 223, 156, 234, 249, 135, 70, 13, 137, 191, 15, 79, 107, 219, 113, 57, 205, 144, 240, 95, 140, 40, 172, 25, 141, 24, 172, 15, 78, 222, 104, 154, 58, 65, 175, 29, 243, 1, 117, 7, 110, 164, 87, 237, 179, 151, 19, 181, 241, 202, 228, 165, 231, 178, 165, 11, 179, 216, 113, 210, 91, 28, 248, 16, 16, 113, 66, 165, 189, 50, 128, 85, 21, 93, 146, 25, 4, 204, 128, 44, 253, 10, 66, 149, 245, 29, 127, 83, 218, 14, 185, 227, 37, 237, 221, 251, 98, 231, 110, 184, 174, 35, 154, 156, 170, 47, 205, 47, 99, 159, 205, 57, 62, 185, 124, 75, 155, 27, 57, 69, 147, 87, 139, 105, 23, 249, 180, 68, 44, 225, 0, 254, 225, 141, 175, 71, 133, 70, 64, 93, 9, 196, 6, 174, 162, 23, 172, 164, 239, 37, 47, 93, 14, 25, 39, 84, 33, 100, 169, 21, 249, 67, 50, 7, 104, 114, 90, 250, 1, 193, 1, 159, 111, 176, 21, 202, 171, 230, 41, 174, 77, 242, 166, 215, 42, 245, 25, 124, 156, 246, 96, 133, 243, 224, 83, 42, 168, 5, 195, 177, 227, 95, 127, 255, 236, 85, 225, 4, 16, 49, 6, 120, 198, 206, 134, 91, 41, 66, 215, 193, 145, 40, 141, 7, 186, 32, 177, 215, 211, 137, 249, 179, 213, 174, 219, 40, 34, 225, 14, 21, 155, 53, 30, 243, 18, 138, 250, 78, 110, 237, 133, 83, 163, 94, 209, 142, 82, 99, 90, 151, 207, 237, 53, 103, 186, 147, 54, 225, 106, 84, 91, 240, 141, 8, 139, 86, 82, 123, 66, 213, 24, 177, 52, 57, 231, 175, 29, 239, 74, 174, 11, 102, 33, 28, 44, 39, 208, 39, 87, 136, 229, 3, 248, 7, 93, 91, 55, 76, 180, 134, 204, 20, 244, 108, 255, 56, 107, 161, 243, 221, 253, 45, 141, 226, 28, 16, 159, 217, 120, 236, 49, 16, 18, 214, 240, 185, 39, 17, 189, 121, 143, 218, 48, 42, 98, 9, 94, 212, 31, 155, 212, 214, 114, 63, 238, 189, 155, 128, 54, 239, 150, 14, 227, 208, 86, 191, 29, 20, 164, 138, 194, 1, 205, 78, 218, 119, 73, 107, 177, 8, 52, 130, 35, 203, 104, 247, 72, 102, 198, 192, 60, 24, 115, 57, 0, 43, 67, 198, 183, 69, 16, 242, 192, 192, 211, 9, 4, 20, 30, 115, 214, 187, 148, 5, 85, 168, 194, 77, 81, 43, 189, 36, 214, 199, 237, 213, 233, 46, 128, 212, 177, 18, 101, 245, 137, 116, 234, 116, 248, 117, 16, 240, 88, 122, 165, 66, 81, 110, 135, 199, 242, 30, 176, 205, 123, 41, 76, 20, 176, 41, 179, 88, 63, 40, 200, 229, 140, 160, 245, 227, 126, 91, 135, 161, 157, 198, 103, 245, 187, 103, 214, 230, 174, 8, 17, 118, 237, 57, 203, 44, 130, 47, 94, 152, 11, 167, 229, 24, 20, 216, 1, 27, 65, 40, 216, 40, 251, 75, 31, 37, 152, 73, 153, 121, 75, 213, 218, 176, 104, 169, 62, 229, 109, 17, 125, 157, 19, 85, 181, 59, 84, 94, 202, 137, 100, 196, 94, 196, 72, 56, 158, 254, 249, 4, 82, 193, 217, 51, 152, 197, 198, 197, 227, 136, 160, 63, 233, 167, 193, 188, 226, 103, 21, 85, 106, 192, 13, 84, 133, 224, 254, 127, 124, 58, 12, 128, 187, 189, 247, 55, 117, 112, 135, 172, 69, 221, 230, 13, 122, 56, 246, 25, 38, 77, 223, 228, 241, 250, 111, 219, 186, 218, 234, 75, 198, 142, 5, 38, 244, 103, 87, 170, 173, 175, 150, 110, 178, 45, 250, 254, 27, 161, 14, 44, 227, 170, 127, 77, 150, 39, 94, 0, 193, 1, 177, 148, 99, 250, 68, 227, 58, 183, 129, 121, 106, 34, 239, 227, 172, 163, 185, 147, 254, 59, 33, 87, 96, 205, 205, 111, 150, 190, 59, 246, 253, 168, 193, 21, 254, 177, 0, 251, 29, 152, 40, 141, 152, 118, 100, 204, 55, 159, 194, 118, 42, 65, 213, 1, 194, 43, 139, 30, 227, 9, 109, 97, 131, 101, 252, 173, 128, 22, 233, 154, 29, 41, 250, 172, 4, 106, 63, 217, 148, 115, 142, 217, 104, 25, 167, 12, 22, 81, 11, 102, 217, 92, 170, 95, 244, 114, 205, 121, 140, 131, 34, 67, 34, 102, 122, 164, 193, 122, 113, 69, 57, 235, 80, 172, 134, 239, 102, 74, 109, 111, 57, 38, 160, 34, 159, 77, 211, 251, 201, 77, 212, 168, 83, 85, 159, 17, 88, 88, 46, 69, 47, 138, 21, 212, 151, 242, 180, 206, 207, 205, 61, 234, 159, 143, 234, 194, 171, 194, 64, 145, 197, 199, 210, 130, 228, 209, 166, 58, 82, 185, 77, 167, 36, 204, 107, 33, 179, 80, 27, 160, 67, 160, 204, 36, 64, 233, 3, 114, 198, 118, 61, 191, 110, 76, 30, 196, 11, 250, 139, 136, 30, 141, 204, 175, 164, 83, 120, 7, 56, 38, 93, 198, 243, 247, 115, 37, 52, 200, 49, 123, 144, 34, 166, 26, 70, 54, 15, 211, 22, 98, 90, 146, 60, 100, 31, 140, 172, 54, 195, 47, 54, 14, 227, 143, 100, 136, 51, 148, 237, 44, 185, 223, 128, 182, 9, 81, 32, 225, 73, 130, 84, 46, 46, 88, 159, 241, 191, 235, 96, 235, 37, 194, 33, 204, 155, 157, 202, 33, 135, 31, 171, 125, 44, 105, 244, 237, 50, 175, 83, 243, 127, 131, 144, 76, 187, 3, 91, 151, 98, 131, 24, 224, 74, 229, 221, 126, 12, 243, 231, 56, 175, 204, 40, 27, 36, 127, 165, 69, 219, 150, 19, 223, 138, 87, 121, 252, 82, 216, 185, 145, 243, 70, 35, 16, 13, 196, 100, 156, 128, 230, 29, 117, 239, 132, 14, 211, 148, 142, 19, 179, 181, 109, 255, 166, 1, 216, 127, 230, 236, 36, 117, 98, 225, 164, 120, 0, 29, 228, 129, 153, 205, 209, 14, 113, 196, 228, 208, 154, 156, 30, 184, 156, 62, 3, 169, 95, 125, 58, 246, 194, 171, 51, 6, 62, 112, 106, 30, 63, 240, 108, 153, 144, 201, 244, 89, 97, 247, 118, 32, 227, 115, 8, 251, 13, 181, 141, 48, 96, 118, 118, 71, 49, 72, 134, 113, 38, 160, 135, 138, 38, 171, 98, 237, 106, 115, 73, 43, 62, 177, 152, 115, 84, 51, 121, 32, 129, 22, 47, 73, 236, 172, 130, 239, 128, 154, 114, 177, 71, 136, 97, 36, 208, 177, 221, 135, 51, 234, 245, 131, 152, 208, 103, 95, 223, 204, 178, 182, 16, 30, 254, 200, 139, 18, 243, 30, 131, 180, 33, 67, 220, 77, 4, 72, 52, 18, 126, 218, 143, 103, 218, 243, 128, 130, 40, 34, 118, 58, 181, 2, 251, 31, 166, 162, 111, 97, 189, 234, 202, 62, 71, 171, 238, 53, 96, 202, 62, 144, 207, 249, 241, 221, 180, 216, 127, 96, 104, 70, 165, 54, 84, 129, 16, 119, 108, 88, 23, 123, 187, 201, 217, 10, 99, 113, 176, 245, 23, 251, 205, 254, 90, 34, 199, 242, 142, 142, 72, 139, 108, 77, 170, 224, 50, 171, 75, 203, 140, 65, 74, 172, 206, 63, 93, 246, 143, 92, 135, 246, 249, 196, 35, 61, 202, 63, 30, 130, 70, 149, 77, 66, 112, 7, 110, 127, 221, 88, 16, 125, 198, 1, 194, 189, 78, 39, 150, 189, 62, 129, 32, 199, 6, 3, 60, 207, 135, 108, 3, 129, 122, 135, 137, 253, 27, 151, 47, 163, 229, 0, 243, 242, 65, 66, 218, 243, 61, 46, 253, 83, 47, 45, 245, 92, 24, 239, 250, 191, 160, 47, 197, 169, 74, 160, 134, 85, 158, 145, 130, 99, 243, 244, 145, 202, 114, 88, 213, 222, 89, 123, 108, 189, 178, 239, 175, 126, 232, 215, 227, 216, 29, 98, 35, 63, 92, 248, 203, 242, 25, 3, 5, 58, 32, 216, 197, 43, 126, 103, 175, 14, 209, 12, 52, 199, 117, 52, 188, 188, 41, 126, 182, 17, 23, 248, 41, 63, 160, 248, 30, 128, 209, 122, 35, 230, 70, 44, 218, 4, 211, 38, 171, 158, 183, 40, 45, 14, 32, 17, 22, 26, 145, 146, 49, 137, 143, 75, 98, 85, 131, 173, 169, 140, 96, 129, 214, 38, 224, 201, 6, 199, 231, 87, 14, 99, 117, 19, 56, 215, 255, 146, 143, 71, 72, 236, 118, 148, 53, 109, 180, 226, 67, 236, 69, 132, 139, 238, 236, 18, 148, 218, 140, 204, 73, 61, 88, 83, 140, 40, 123, 252, 249, 157, 74, 245, 190, 248, 121, 57, 214, 32, 41, 190, 205, 93, 125, 191, 83, 79, 65, 53, 35, 36, 198, 114, 100, 54, 139, 10, 105, 160, 126, 51, 194, 17, 27, 43, 217, 13, 16, 121, 89, 102, 87, 52, 131, 212, 168, 225, 181, 192, 244, 34, 224, 144, 123, 55, 4, 117, 245, 8, 90, 223, 250, 60, 6, 242, 78, 254, 66, 195, 98, 132, 148, 107, 183, 229, 204, 188, 199, 220, 209, 224, 75, 66, 0, 61, 23, 89, 194, 17, 18, 129, 174, 9, 64, 243, 1, 192, 140, 125, 140, 69, 176, 156, 57, 17, 92, 55, 126, 48, 153, 198, 212, 232, 177, 29, 87, 69, 137, 232, 32, 217, 170, 41, 33, 237, 180, 150, 15, 84, 252, 169, 124, 115, 173, 124, 98, 116, 72, 255, 241, 108, 72, 95, 129, 215, 155, 73, 6, 240, 215, 20, 247, 81, 138, 214, 206, 10, 7, 98, 100, 8, 57, 186, 5, 169, 14, 50, 69, 108, 211, 87, 4, 160, 138, 30, 174, 117, 115, 87, 10, 205, 101, 236, 250, 249, 30, 243, 251, 195, 196, 38, 218, 36, 39, 136, 224, 149, 17, 67, 32, 35, 3, 59, 53, 157, 140, 114, 66, 160, 70, 145, 254, 93, 13, 39, 246, 133, 102, 49, 70, 25, 25, 47, 77, 76, 131, 239, 43, 224, 244, 253, 241, 131, 123, 99, 19, 84, 110, 163, 201, 56, 238, 235, 5, 17, 99, 14, 6, 64, 242, 110, 110, 36, 49, 102, 244, 241, 214, 83, 175, 229, 118, 121, 127, 112, 174, 3, 200, 205, 186, 32, 4, 185, 219, 219, 104, 138, 67, 239, 128, 180, 111, 21, 61, 21, 222, 207, 151, 10, 106, 121, 179, 251, 203, 166, 203, 246, 93, 50, 77, 66, 220, 240, 132, 134, 16, 192, 46, 242, 81, 235, 86, 91, 110, 24, 193, 222, 114, 167, 67, 145, 119, 228, 52, 218, 247, 114, 6, 70, 100, 82, 182, 136, 239, 146, 48, 5, 174, 234, 216, 220, 21, 233, 252, 236, 53, 227, 51, 93, 147, 83, 28, 23, 131, 3, 67, 92, 154, 94, 82, 86, 125, 57, 185, 228, 2, 131, 214, 99, 154, 230, 43, 172, 141, 146, 79, 35, 0, 24, 101, 22, 224, 156, 190, 212, 88, 152, 44, 150, 163, 125, 103, 227, 138, 141, 199, 102, 156, 212, 51, 150, 64, 158, 156, 4, 35, 153, 117, 58, 12, 71, 237, 84, 126, 178, 241, 149, 50, 44, 133, 163, 14, 86, 106, 99, 234, 206, 68, 151, 135, 81, 103, 228, 187, 245, 80, 112, 134, 137, 91, 98, 160, 14, 148, 38, 95, 47, 206, 62, 179, 110, 79, 49, 191, 24, 229, 197, 212, 109, 136, 1, 221, 180, 80, 197, 234, 117, 210, 200, 246, 207, 201, 114, 233, 53, 146, 126, 131, 169, 91, 98, 241, 54, 206, 176, 254, 47, 61, 215, 153, 144, 236, 244, 148, 131, 66, 3, 39, 159, 83, 141, 225, 146, 117, 237, 50, 125, 156, 123, 150, 64, 18, 9, 71, 221, 204, 49, 81, 39, 198, 67, 107, 198, 148, 31, 240, 145, 132, 249, 94, 96, 167, 45, 102, 126, 82, 92, 228, 8, 112, 174, 41, 101, 73, 24, 126, 209, 51, 99, 29, 208, 56, 99, 88, 21, 216, 137, 119, 113, 95, 40, 108, 86, 68, 165, 138, 10, 130, 104, 243, 173, 150, 55, 254, 236, 135, 34, 77, 138, 171, 120, 138, 6, 250, 186, 66, 87, 42, 95, 158, 112, 110, 168, 158, 111, 40, 237, 222, 224, 73, 193, 249, 211, 13, 101, 45, 176, 84, 241, 180, 48, 0, 21, 15, 160, 3, 105, 7, 189, 24, 218, 120, 84, 198, 133, 69, 197, 198, 190, 163, 225, 72, 113, 59, 186, 51, 207, 240, 52, 154, 239, 40, 5, 93, 36, 219, 51, 220, 154, 205, 134, 64, 49, 20, 73, 215, 20, 206, 125, 54, 241, 30, 138, 157, 191, 13, 116, 150, 252, 12, 16, 176, 114, 187, 37, 91, 84, 15, 155, 128, 204, 16, 220, 148, 26, 67, 102, 54, 96], + [49, 87, 107, 222, 47, 13, 115, 71, 204, 178, 94, 114, 155, 244, 39, 146, 131, 124, 13, 199, 53, 99, 171, 39, 36, 6, 64, 245, 179, 40, 97, 28, 108, 121, 12, 249, 155, 214, 179, 63, 154, 165, 183, 175, 166, 135, 110, 99, 68, 126, 236, 205, 88, 132, 95, 242, 127, 244, 45, 194, 225, 86, 230, 49, 175, 108, 226, 248, 231, 98, 57, 246, 85, 105, 7, 77, 26, 242, 109, 65, 194, 162, 18, 53, 42, 28, 123, 196, 236, 230, 219, 176, 196, 108, 175, 176, 90, 216, 13, 212, 214, 122, 182, 241, 139, 204, 150, 118, 232, 40, 215, 250, 188, 91, 60, 65, 188, 70, 200, 38, 97, 182, 5, 7, 149, 53, 41, 42, 2, 18, 152, 104, 208, 51, 225, 124, 215, 5, 33, 227, 144, 230, 114, 13, 139, 144, 38, 75, 138, 45, 100, 134, 216, 103, 226, 152, 205, 183, 78, 204, 148, 191, 82, 198, 177, 72, 202, 168, 25, 160, 215, 46, 150, 55, 22, 162, 5, 1, 16, 84, 87, 223, 187, 197, 248, 11, 148, 212, 76, 15, 40, 6, 83, 48, 3, 214, 179, 128, 82, 182, 197, 153, 100, 166, 221, 74, 141, 105, 221, 115, 142, 210, 191, 238, 132, 85, 101, 34, 97, 211, 149, 233, 149, 84, 202, 63, 226, 98, 21, 220, 222, 192, 75, 1, 245, 246, 148, 225, 157, 53, 131, 27, 110, 136, 39, 248, 113, 84, 80, 108, 131, 48, 218, 24, 221, 224, 64, 132, 193, 215, 85, 170, 74, 22, 70, 202, 44, 49, 93, 133, 230, 84, 22, 133, 244, 84, 140, 95, 252, 112, 27, 135, 164, 166, 95, 174, 111, 131, 48, 28, 61, 28, 82, 35, 80, 160, 101, 52, 47, 21, 90, 118, 99, 154, 203, 209, 217, 43, 236, 72, 130, 203, 80, 139, 116, 141, 82, 224, 12, 126, 63, 175, 12, 182, 140, 133, 111, 240, 142, 102, 178, 227, 140, 103, 48, 78, 208, 130, 102, 27, 211, 190, 77, 53, 121, 126, 191, 45, 49, 5, 229, 200, 193, 161, 106, 151, 6, 143, 133, 2, 16, 241, 70, 134, 33, 205, 124, 169, 182, 45, 146, 165, 15, 70, 55, 246, 235, 148, 134, 220, 16, 191, 162, 249, 250, 126, 216, 75, 59, 63, 170, 46, 241, 184, 186, 240, 173, 156, 13, 233, 234, 48, 198, 219, 81, 147, 183, 110, 37, 70, 165, 125, 179, 138, 114, 112, 253, 76, 154, 97, 174, 148, 156, 92, 96, 176, 91, 100, 231, 167, 199, 27, 253, 78, 58, 116, 151, 228, 24, 167, 167, 86, 190, 69, 230, 185, 11, 183, 225, 216, 138, 247, 20, 193, 76, 80, 139, 63, 238, 148, 92, 134, 16, 131, 138, 215, 59, 65, 226, 134, 174, 31, 200, 37, 195, 108, 86, 68, 73, 26, 238, 247, 192, 61, 192, 218, 241, 91, 182, 55, 66, 98, 31, 16, 200, 128, 224, 253, 158, 66, 133, 123, 229, 207, 131, 80, 118, 223, 108, 5, 136, 251, 248, 144, 35, 249, 113, 120, 37, 48, 193, 10, 74, 61, 111, 215, 243, 172, 173, 98, 5, 200, 189, 21, 58, 200, 49, 143, 55, 61, 113, 181, 239, 21, 221, 120, 9, 22, 159, 35, 100, 10, 127, 10, 27, 119, 22, 227, 23, 1, 43, 15, 78, 31, 220, 21, 188, 129, 158, 33, 160, 177, 241, 218, 252, 56, 86, 169, 191, 105, 4, 126, 217, 194, 37, 82, 156, 84, 96, 174, 6, 107, 49, 138, 50, 146, 56, 177, 160, 202, 185, 77, 29, 9, 55, 149, 57, 253, 184, 161, 157, 231, 207, 1, 184, 144, 23, 166, 188, 242, 130, 4, 70, 190, 10, 62, 187, 128, 149, 173, 77, 102, 236, 176, 110, 10, 217, 63, 203, 255, 206, 83, 43, 45, 239, 16, 206, 158, 3, 207, 178, 235, 247, 183, 35, 11, 36, 16, 23, 242, 35, 112, 199, 205, 171, 26, 20, 39, 18, 52, 139, 219, 145, 182, 52, 39, 225, 61, 65, 144, 85, 249, 137, 223, 39, 170, 17, 95, 197, 33, 25, 46, 105, 186, 206, 7, 141, 78, 169, 111, 208, 48, 156, 199, 140, 113, 139, 202, 73, 192, 207, 16, 94, 221, 175, 164, 94, 117, 39, 238, 221, 179, 187, 107, 202, 64, 98, 184, 230, 245, 249, 9, 89, 82, 207, 63, 57, 147, 149, 180, 24, 140, 248, 124, 239, 83, 88, 188, 102, 252, 0, 20, 95, 33, 33, 62, 96, 156, 194, 73, 78, 147, 1, 231, 151, 144, 163, 184, 62, 236, 52, 240, 113, 242, 242, 3, 245, 179, 220, 216, 240, 181, 156, 167, 203, 87, 173, 33, 4, 88, 1, 198, 34, 136, 57, 139, 26, 128, 113, 222, 227, 199, 98, 192, 139, 20, 178, 184, 93, 68, 190, 75, 41, 108, 169, 212, 10, 44, 43, 143, 108, 17, 90, 117, 6, 249, 16, 216, 15, 203, 94, 195, 156, 190, 101, 10, 248, 24, 142, 193, 97, 118, 178, 26, 51, 214, 38, 199, 217, 245, 189, 121, 51, 241, 189, 213, 89, 137, 113, 117, 66, 162, 66, 183, 117, 190, 120, 39, 18, 229, 109, 126, 219, 236, 98, 191, 112, 49, 241, 162, 94, 165, 37, 220, 92, 13, 254, 177, 217, 118, 78, 193, 166, 13, 17, 240, 234, 86, 227, 100, 66, 218, 65, 163, 246, 58, 67, 22, 57, 244, 83, 82, 7, 89, 0, 106, 34, 123, 126, 135, 37, 188, 115, 175, 43, 212, 206, 175, 25, 82, 205, 232, 239, 35, 104, 218, 231, 234, 60, 251, 165, 51, 244, 197, 142, 159, 51, 69, 244, 246, 95, 149, 141, 183, 35, 8, 11, 227, 164, 122, 201, 40, 191, 247, 150, 49, 176, 18, 108, 177, 231, 130, 186, 78, 132, 166, 161, 85, 254, 114, 18, 167, 29, 93, 241, 200, 247, 130, 234, 27, 143, 229, 229, 183, 132, 0, 243, 4, 117, 210, 12, 156, 249, 134, 57, 240, 128, 43, 156, 168, 151, 81, 83, 122, 182, 201, 207, 73, 64, 193, 7, 62, 32, 153, 208, 96, 24, 54, 58, 29, 178, 182, 215, 67, 15, 114, 146, 38, 255, 149, 147, 13, 132, 245, 56, 255, 105, 6, 140, 4, 141, 175, 231, 100, 178, 147, 79, 34, 206, 224, 89, 106, 105, 18, 58, 5, 74, 156, 162, 162, 204, 162, 147, 212, 80, 96, 249, 55, 234, 188, 62, 103, 9, 250, 136, 68, 207, 77, 188, 39, 84, 149, 205, 234, 27, 238, 134, 25, 214, 234, 45, 31, 117, 53, 35, 26, 223, 26, 125, 59, 207, 226, 249, 221, 171, 3, 242, 179, 126, 21, 52, 16, 74, 67, 156, 218, 202, 157, 163, 72, 216, 31, 3, 82, 42, 66, 88, 134, 176, 101, 127, 40, 160, 254, 50, 124, 186, 201, 82, 4, 54, 126, 153, 199, 7, 140, 233, 221, 158, 97, 83, 241, 136, 178, 239, 211, 102, 8, 72, 111, 230, 29, 110, 26, 126, 150, 81, 84, 180, 236, 195, 24, 251, 194, 107, 30, 103, 248, 203, 194, 22, 3, 177, 23, 18, 213, 116, 4, 110, 63, 187, 190, 158, 54, 41, 212, 250, 18, 47, 126, 195, 233, 164, 233, 100, 41, 139, 136, 91, 107, 255, 47, 14, 97, 147, 14, 165, 23, 192, 35, 39, 76, 62, 251, 254, 1, 234, 43, 23, 206, 43, 0, 34, 241, 241, 20, 106, 160, 219, 84, 77, 195, 255, 145, 119, 50, 215, 131, 20, 29, 120, 89, 206, 139, 196, 50, 12, 145, 163, 235, 144, 81, 136, 246, 191, 248, 113, 29, 232, 80, 152, 38, 123, 220, 84, 249, 128, 198, 101, 122, 158, 149, 196, 78, 2, 47, 211, 87, 140, 104, 113, 156, 102, 174, 91, 65, 148, 113, 113, 207, 225, 98, 226, 68, 91, 115, 28, 233, 188, 185, 104, 243, 61, 103, 122, 170, 225, 220, 236, 5, 252, 60, 90, 122, 77, 201, 198, 254, 107, 193, 72, 51, 175, 69, 74, 25, 144, 71, 47, 0, 54, 74, 116, 225, 180, 30, 10, 207, 190, 44, 91, 123, 12, 173, 216, 247, 15, 55, 8, 98, 229, 113, 111, 126, 85, 53, 244, 107, 156, 37, 0, 70, 228, 229, 1, 139, 198, 242, 177, 16, 19, 240, 181, 250, 57, 132, 114, 119, 95, 196, 85, 144, 233, 253, 194, 125, 3, 129, 23, 2, 80, 85, 134, 119, 112, 69, 62, 15, 135, 191, 96, 236, 190, 129, 249, 108, 240, 143, 17, 196, 145, 238, 178, 169, 49, 80, 101, 55, 96, 23, 122, 51, 230, 7, 189, 43, 158, 52, 239, 188, 81, 30, 68, 46, 170, 185, 0, 236, 74, 57, 31, 244, 65, 29, 17, 98, 111, 179, 45, 129, 31, 226, 15, 108, 130, 37, 69, 127, 16, 38, 208, 146, 47, 200, 138, 101, 114, 113, 206, 132, 32, 62, 40, 53, 200, 183, 103, 140, 72, 81, 145, 93, 41, 2, 123, 98, 87, 230, 55, 8, 155, 236, 141, 252, 141, 91, 145, 65, 24, 120, 225, 212, 42, 157, 124, 220, 225, 46, 206, 107, 42, 21, 228, 97, 179, 190, 195, 134, 165, 214, 217, 182, 54, 155, 136, 96, 32, 40, 253, 41, 191, 204, 65, 157, 133, 242, 89, 13, 12, 195, 105, 31, 109, 61, 168, 213, 168, 26, 121, 246, 221, 111, 62, 165, 10, 180, 44, 187, 74, 71, 184, 62, 252, 95, 68, 98, 234, 105, 48, 116, 229, 151, 67, 248, 204, 20, 187, 141, 230, 46, 37, 106, 217, 40, 114, 2, 65, 180, 233, 106, 83, 116, 41, 8, 247, 156, 155, 219, 202, 199, 198, 93, 99, 150, 5, 148, 104, 133, 170, 30, 194, 12, 207, 248, 106, 76, 46, 39, 65, 40, 25, 16, 90, 158, 170, 120, 165, 125, 161, 58, 197, 5, 41, 36, 116, 54, 180, 78, 237, 44, 181, 140, 22, 69, 193, 193, 120, 21, 242, 201, 217, 35, 200, 238, 152, 106, 216, 14, 95, 0, 52, 98, 247, 226, 32, 78, 226, 189, 16, 20, 174, 192, 69, 148, 150, 10, 132, 91, 174, 145, 50, 184, 9, 236, 64, 196, 82, 158, 48, 185, 69, 157, 53, 78, 214, 74, 179, 128, 100, 136, 227, 165, 60, 27, 162, 120, 67, 241, 146, 251, 64, 86, 115, 66, 87, 132, 69, 92, 203, 92, 78, 127, 57, 79, 26, 44, 35, 112, 91, 226, 242, 4, 140, 99, 39, 69, 48, 144, 244, 15, 179, 11, 68, 1, 186, 137, 192, 73, 248, 102, 53, 178, 245, 112, 118, 201, 250, 198, 219, 90, 85, 226, 237, 140, 18, 101, 8, 164, 209, 92, 111, 26, 232, 79, 72, 143, 121, 109, 170, 190, 26, 100, 200, 106, 202, 15, 215, 49, 84, 223, 219, 137, 150, 177, 6, 210, 62, 161, 180, 222, 224, 229, 98, 36, 22, 103, 79, 31, 17, 210, 38, 187, 53, 131, 126, 62, 169, 45, 121, 229, 89, 9, 11, 53, 5, 41, 116, 12, 190, 252, 242, 56, 47, 156, 163, 71, 90, 145, 30, 252, 113, 40, 69, 200, 224, 246, 212, 94, 1, 102, 75, 208, 111, 126, 237, 124, 15, 201, 198, 120, 229, 43, 239, 101, 209, 177, 188, 243, 66, 14, 169, 243, 186, 225, 234, 226, 102, 144, 162, 67, 10, 228, 154, 135, 152, 235, 80, 71, 190, 142, 137, 140, 6, 37, 108, 157, 149, 36, 190, 201, 195, 34, 95, 213, 73, 1, 221, 71, 142, 79, 246, 137, 89, 139, 245, 199, 130, 53, 204, 234, 121, 146, 232, 44, 11, 107, 127, 168, 151, 33, 227, 90, 19, 98, 35, 52, 210, 112, 171, 135, 86, 210, 79, 227, 180, 66, 188, 167, 217, 7, 139, 208, 42, 235, 34, 114, 3, 181, 33, 158, 93, 16, 237, 174, 29, 197, 103, 138, 210, 115, 210, 128, 112, 166, 107, 255, 126, 46, 19, 166, 195, 87, 217, 142, 253, 173, 122, 41, 17, 49, 73, 29, 182, 31, 203, 136, 19, 165, 1, 26, 20, 226, 166, 157, 107, 56, 221, 197, 67, 47, 9, 222, 160, 131, 247, 206, 218, 162, 98, 93, 59, 128, 209, 123, 82, 130, 252, 6, 136, 29, 200, 92, 237, 190, 253, 62, 12, 67, 58, 121, 221, 77, 17, 191, 141, 213, 239, 94, 197, 177, 206, 166, 158, 78, 115, 44, 8, 153, 248, 35, 24, 79, 214, 24, 202, 67, 95, 26, 164, 120, 116, 201, 109, 59, 183, 116, 122, 172, 35, 16, 226, 5, 251, 0, 64, 159, 255, 190, 60, 239, 84, 154, 118, 135, 245, 218, 49, 244, 59, 246, 76, 88, 73, 67, 31, 168, 86, 51, 185, 202, 134, 3, 41, 223, 208, 141, 46, 151, 65, 192, 130, 190, 229, 64, 176, 241, 41, 0, 9, 15, 103, 26, 16, 8, 174, 116, 193, 78, 142, 216, 184, 237, 160, 80, 155, 146, 221, 39, 67, 4, 89, 222, 22, 54, 175, 49, 33, 30, 87, 206, 232, 243, 150, 16, 150, 26, 53, 248, 239, 16, 180, 165, 158, 91, 81, 57, 84, 32, 162, 156, 164, 81, 42, 131, 105, 108, 63, 186, 230, 66, 164, 102, 253, 11, 41, 118, 61, 40, 125, 178, 101, 181, 26, 49, 0, 110, 96, 174, 143, 66, 128, 19, 237, 20, 144, 244, 193, 117, 244, 101, 253, 156, 251, 239, 137, 154, 147, 175, 125, 200, 97, 235, 189, 12, 28, 103, 88, 244, 204, 160, 112, 93, 76, 106, 138, 44, 168, 5, 158, 20, 65, 6, 197, 81, 35, 107, 115, 10, 126, 7, 63, 49, 182, 221, 56, 64, 88, 169, 3, 181, 40, 132, 67, 46, 145, 28, 149, 6, 207, 179, 140, 116, 61, 38, 199, 163, 154, 10, 140, 143, 245, 243, 239, 163, 29, 58, 217, 241, 24, 205, 75, 252, 86, 183, 179, 189, 137, 4, 162, 61, 255, 240, 173, 114, 235, 14, 58, 231, 219, 157, 251, 192, 112, 121, 164, 220, 133, 207, 245, 187, 164, 252, 92, 96, 153, 26, 109, 210, 53, 45, 51, 189, 224, 241, 96, 111, 21, 61, 213, 138, 150, 131, 175, 9, 218, 118, 101, 191, 191, 167, 199, 31, 232, 7, 37, 223, 194, 213, 143, 126, 233, 136, 101, 102, 91, 138, 145, 155, 61, 129, 147, 91, 203, 86, 215, 45, 115, 71, 220, 173, 213, 139, 214, 16, 131, 147, 209, 211, 68, 253, 49, 4, 4, 192, 20, 222, 184, 228, 90, 117, 99, 183, 34, 167, 172, 130, 204, 185, 146, 249, 74, 197, 230, 186, 23, 63, 33, 109, 12, 229, 255, 80, 151, 217, 41, 26, 248, 222, 212, 0, 86, 37, 75, 26, 70, 52, 117, 132, 23, 167, 153, 208, 64, 40, 54, 253, 60, 67, 226, 227, 11, 75, 7, 249, 80, 91, 71, 136, 155, 219, 76, 122, 47, 104, 104, 170, 237, 16, 205, 109, 244, 4, 156, 139, 16, 166, 140, 116, 112, 154, 173, 46, 40, 44, 210, 210, 9, 158, 162, 200, 92, 255, 171, 238, 209, 68, 216, 180, 151, 201, 236, 136, 51, 232, 47, 25, 159, 172, 80, 70, 247, 81, 242, 75, 189, 172, 214, 136, 188, 202, 245, 36, 74, 208, 229, 245, 250, 5, 178, 63, 59, 10, 229, 121, 6, 66, 130, 255, 38, 230, 164, 0, 206, 245, 150, 175, 176, 57, 106, 129, 141, 147, 19, 149, 248, 131, 201, 5, 186, 0, 75, 223, 128, 222, 245, 247, 255, 157, 60, 186, 106, 209, 203, 172, 116, 186, 248, 195, 234, 215, 47, 11, 66, 22, 19, 163, 61, 44, 178, 72, 180, 43, 10, 63, 110, 92, 198, 239, 184, 180, 164, 4, 115, 176, 201, 38, 71, 97, 161, 81, 180, 151, 115, 43, 202, 16, 36, 197, 249, 20, 245, 135, 45, 206, 229, 214, 50, 234, 121, 219, 4, 156, 50, 120, 102, 41, 166, 209, 19, 118, 20, 197, 182, 4, 78, 31, 177, 223, 112, 46, 148, 51, 10, 100, 184, 15, 7, 143, 216, 159, 173, 186, 156, 139, 144, 56, 191, 94, 190, 132, 71, 99, 146, 6, 114, 103, 85, 140, 163, 20, 73, 80, 248, 60, 199, 134, 59, 126, 123, 16, 172, 221, 11, 249, 150, 212, 18, 163, 242, 107, 78, 115, 51, 88, 8, 163, 139, 36, 19, 116, 172, 210, 150, 100, 180, 223, 115, 158, 23, 123, 0, 109, 245, 207, 122, 224, 56, 112, 125, 135, 196, 156, 247, 33, 19, 80, 192, 94, 147, 143, 208, 154, 83, 166, 90, 8, 254, 193, 130, 0, 67, 251, 213, 35, 173, 232, 41, 226, 96, 9, 71, 206, 5, 163, 221, 174, 231, 38, 8, 174, 247, 144, 56, 147, 24, 45, 225, 231, 206, 188, 197, 243, 82, 170, 182, 88, 102, 41, 207, 254, 175, 189, 92, 123, 119, 235, 91, 207, 117, 114, 33, 219, 209, 137, 226, 216, 141, 50, 27, 67, 157, 68, 100, 173, 47, 122, 64, 159, 15, 110, 198, 28, 232, 207, 17, 121, 130, 58, 124, 128, 211, 162, 245, 107, 153, 158, 169, 207, 240, 233, 144, 114, 234, 0, 48, 91, 114, 100, 135, 183, 207, 147, 176, 118, 95, 123, 92, 29, 57, 213, 234, 82, 198, 132, 179, 218, 99, 61, 76, 101, 45, 149, 208, 207, 131, 8, 44, 61, 234, 44, 191, 193, 12, 46, 245, 191, 78, 218, 186, 200, 160, 45, 27, 37, 87, 165, 108, 163, 13, 149, 248, 145, 237, 114, 106, 49, 139, 183, 43, 215, 9, 11, 82, 1, 92, 126, 84, 77, 105, 220, 161, 198, 71, 82, 197, 105, 27, 238, 109, 56, 17, 102, 41, 155, 110, 92, 114, 227, 204, 139, 138, 0, 81, 102, 82, 249, 16, 149, 163, 42, 214, 78, 31, 238, 26, 102, 190, 251, 132, 108, 173, 70, 24, 43, 31, 178, 21, 75, 137, 166, 84, 235, 169, 73, 148, 185, 116, 189, 75, 201, 34, 125, 77, 76, 136, 95, 4, 7, 205, 205, 48, 95, 155, 28, 54, 77, 132, 83, 84, 100, 145, 105, 233, 195, 109, 206, 73, 211, 60, 81, 181, 25, 196, 220, 43, 131, 237, 29, 122, 147, 14, 130, 186, 48, 17, 228, 29, 80, 111, 50, 140, 63, 70, 248, 63, 164, 82, 80, 172, 16, 87, 232, 181, 238, 2, 228, 142, 52, 98, 9, 77, 168, 192, 66, 141, 33, 48, 142, 152, 200, 2, 93, 18, 187, 33, 70, 223, 47, 238, 254, 74, 211, 5, 22, 171, 66, 21, 51, 110, 100, 133, 119, 115, 42, 255, 103, 92, 59, 224, 118, 91, 218, 233, 27, 226, 174, 255, 33, 122, 4, 206, 84, 9, 14, 115, 117, 101, 58, 169, 39, 191, 101, 225, 246, 17, 59, 154, 204, 210, 117, 246, 152, 31, 131, 214, 7, 169, 133, 13, 221, 171, 101, 117, 47, 145, 130, 58, 217, 105, 176, 62, 30, 219, 26, 253, 240, 51, 46, 66, 183, 153, 160, 217, 80, 7, 94, 5, 209, 91, 225, 220, 254, 220, 255, 180, 179, 131, 205, 235, 19, 105, 186, 168, 74, 247, 80, 26, 75, 39, 254, 174, 71, 233, 211, 8, 60, 59, 41, 169, 114, 1, 27, 63, 215, 81, 68, 142, 94, 153, 41, 99, 74, 26, 227, 65, 119, 127, 155, 129, 54, 226, 158, 193, 146, 107, 93, 185, 166, 43, 77, 178, 128, 149, 156, 245, 43, 164, 20, 224, 209, 88, 192, 128, 169, 68, 206, 142, 206, 125, 82, 180, 118, 27, 42, 140, 224, 178, 163, 184, 49, 53, 79, 83, 136, 54, 139, 115, 95, 43, 209, 119, 97, 179, 1, 202, 107, 29, 9, 9, 81, 90, 198, 96, 187, 141, 126, 43, 246, 35, 51, 16, 229, 203, 254, 240, 142, 133, 33, 12, 179, 165, 203, 74, 86, 111, 33, 63, 212, 74, 127, 231, 45, 195, 181, 87, 100, 15, 216, 3, 17, 186, 80, 142, 76, 151, 245, 103, 11, 83, 253, 179, 179, 180, 147, 204, 39, 130, 20, 16, 217, 14, 211, 253, 93, 120, 244, 72, 156, 88, 28, 126, 125, 134, 4, 90, 87, 251, 54, 63, 246, 46, 82, 231, 71, 82, 63, 30, 71, 46, 181, 7, 172, 109, 73, 101, 181, 29, 54, 182, 97, 80, 1, 41, 229, 177, 0, 153, 49, 127, 195, 166, 148, 39, 247, 123, 42, 96, 106, 126, 166, 194, 255, 75, 19, 123, 220, 200, 171, 195, 67, 143, 36, 30, 161, 167, 139, 114, 117, 235, 95, 35, 76, 224, 1, 66, 222, 238, 153, 81, 150, 131, 139, 31, 102, 14, 173, 180, 74, 102, 60, 194, 187, 227, 63, 192, 50, 250, 33, 197, 30, 148, 180, 210, 226, 21, 63, 148, 238, 242, 225, 30, 182, 69, 228, 111, 39, 59, 212, 233, 183, 131, 15, 195, 41, 68, 104, 131, 3, 41, 77, 207, 181, 56, 169, 250, 61, 134, 189, 121, 97, 120, 120, 216, 59, 139, 38, 101, 132, 141, 96, 132, 131, 169, 70, 251, 138, 45, 125, 193, 2, 135, 183, 146, 213, 104, 14, 234, 122, 219, 58, 239, 113, 128, 2, 128, 146, 152, 239, 160, 116, 174, 252, 11, 66, 110, 184, 181, 66, 78, 130, 233, 52, 22, 146, 111, 133, 76, 184, 163, 90, 237, 58, 64, 94, 249, 134, 35, 92, 49, 176, 136, 238, 149, 198, 186, 209, 229, 71, 111, 174, 23, 178, 159, 132, 108, 12, 118, 205, 59, 23, 61, 156, 24, 28, 44, 250, 60, 129, 249, 90, 51, 226, 175, 8, 141, 146, 250, 253, 157, 27, 16, 59, 32, 246, 209, 1, 241, 243, 149, 180, 186, 4, 146, 179, 217, 169, 210, 120, 225, 50, 155, 145, 61, 83, 171, 161, 45, 135, 184, 78, 152, 215, 219, 117, 8, 13, 222, 216, 254, 79, 157, 232, 63, 214, 62, 201, 173, 89, 56, 77, 32, 86, 4, 229, 53, 154, 157, 23, 196, 242, 127, 224, 195, 114, 64, 251, 216, 123, 75, 53, 164, 158, 28, 82, 83, 76, 103, 177, 36, 157, 51, 25, 250, 208, 113, 195, 109, 213, 146, 98, 3, 148, 151, 59, 181, 179, 87, 59, 59, 146, 236, 80, 246, 4, 84, 139, 91, 105, 225, 43, 49, 180, 38, 109, 14, 207, 162, 154, 208, 159, 95, 99, 67, 153, 43, 36, 220, 64, 15, 62, 69, 191, 226, 120, 71, 219, 168, 0, 229, 61, 15, 201, 69, 184, 32, 7, 18, 36, 253, 129, 100, 196, 123, 247, 77, 247, 83, 116, 189, 23, 155, 231, 151, 102, 26, 109, 41, 225, 132, 33, 211, 50, 255, 163, 89, 64, 171, 110, 208, 57, 236, 113, 82, 229, 95, 107, 246, 15, 161, 142, 57, 234, 171, 143, 17, 72, 241, 245, 113, 250, 113, 185, 101, 137, 121, 53, 4, 93, 5, 127, 197, 167, 79, 200, 195, 241, 188, 235, 241, 77, 224, 132, 232, 124, 33, 207, 56, 199, 138, 103, 28, 137, 237, 79, 144, 233, 100, 64, 27, 74, 133, 78, 210, 71, 9, 62, 39, 61, 44, 2, 64, 131, 104, 219, 94, 123, 238, 187, 9, 27, 194, 213, 244, 91, 90, 33, 123, 173, 245, 140, 177, 157, 248, 12, 55, 12, 10, 209, 129, 128, 86, 106, 133, 94, 202, 243, 84, 195, 157, 232, 22, 108, 135, 98, 45, 186, 232, 234, 223, 70, 189, 149, 49, 222, 122, 143, 250, 207, 192, 136, 181, 133, 12, 138, 163, 210, 191, 178, 38, 167, 231, 219, 91, 53, 165, 161, 169, 12, 204, 65, 160, 247, 184, 181, 66, 48, 203, 100, 94, 49, 226, 206, 169, 117, 244, 35, 144, 7, 133, 99, 76, 32, 214, 57, 224, 146, 206, 121, 201, 196, 122, 91, 202, 79, 131, 239, 205, 127, 187, 137, 109, 230, 174, 125, 166, 34, 139, 42, 74, 136, 156, 130, 195, 220, 200, 83, 65, 49, 154, 187, 4, 155, 4, 3, 248, 40, 145, 120, 180, 212, 83, 132, 221, 13, 37, 88, 123, 116, 201, 119, 82, 248, 173, 171, 72, 33, 205, 239, 214, 231, 81, 153, 50, 101, 106, 238, 163, 251, 136, 31, 16, 99, 6, 2, 208, 215, 22, 54, 231, 204, 47, 253, 190, 222, 69, 241, 182, 203, 209, 192, 247, 170, 111, 211, 152, 36, 120, 41, 93, 142, 118, 84, 254, 77, 240, 218, 207, 97, 131, 206, 169, 188, 71, 238, 1, 10, 63, 114, 157, 51, 27, 24, 234, 191, 234, 133, 96, 244, 207, 124, 87, 166, 215, 35, 132, 43, 3, 36, 127, 146, 235, 60, 55, 99, 176, 155, 172, 189, 189, 117, 200, 97, 20, 142, 34, 174, 104, 251, 83, 108, 13, 21, 18, 65, 181, 24, 76, 63, 178, 239, 112, 167, 118, 104, 153, 128, 79, 230, 104, 224, 3, 9, 182, 196, 34, 214, 245, 228, 157, 42, 43, 47, 253, 136, 35, 246, 116, 206, 178, 30, 153, 236, 214, 30, 236, 214, 125, 80, 252, 53, 168, 195, 136, 240, 84, 43, 233, 131, 1, 88, 220, 104, 105, 3, 177, 243, 184, 151, 74, 228, 94, 200, 134, 50, 141, 242, 252, 13, 245, 220, 182, 116, 26, 89, 49, 141, 84, 122, 164, 192, 251, 139, 166, 238, 117, 79, 121, 115, 207, 53, 136, 152, 115, 109, 33, 33, 117, 221, 15, 245, 215, 93, 20, 120, 154, 250, 188, 22, 48, 15, 81, 230, 174, 175, 214, 190, 248, 69, 73, 105, 198, 212, 140, 191, 254, 118, 178, 194, 250, 160, 96, 146, 231, 204, 133, 51, 20, 174, 63, 6, 183, 36, 127, 107, 181, 5, 26, 157, 74, 246, 128, 76, 88, 163, 28, 74, 177, 89, 110, 76, 250, 238, 242, 236, 21, 238, 141, 101, 224, 49, 93, 194, 72, 224, 142, 231, 244, 254, 156, 0, 112, 29, 190, 4, 151, 48, 233, 64, 70, 125, 69, 62, 42, 119, 123, 93, 192, 53, 138, 7, 204, 158, 57, 5, 38, 194, 242, 143, 108, 213, 71, 192, 3, 52, 81, 188, 48, 125, 251, 118, 179, 42, 239, 113, 133, 154, 213, 168, 186, 245, 144, 163, 137, 251, 85, 116, 219, 55, 46, 193, 8, 49, 95, 232, 143, 86, 170, 51, 90, 246, 119, 42, 39, 196, 212, 124, 204, 193, 11, 182, 0, 0, 215, 219, 156, 194, 92, 103, 34, 195, 124, 241, 156, 203, 50, 14, 106, 244, 219, 237, 24, 142, 193, 102, 28, 56, 89, 66, 3, 207, 120, 80, 99, 73, 223, 110, 168, 114, 199, 231, 141, 3, 181, 57, 83, 2, 205, 52, 224, 147, 144, 193, 95, 75, 25, 248, 126, 18, 186, 216, 38, 52, 34, 206, 69, 169, 45, 29, 189, 233, 242, 16, 55, 11, 206, 9, 208, 8, 238, 91, 20, 179, 158, 146, 84, 143, 49, 244, 205, 181, 7, 183, 139, 167, 215, 241, 101, 44, 138, 189, 160, 241, 83, 239, 56, 236, 83, 156, 19, 106, 84, 2, 188, 96, 27, 11, 81, 137, 245, 64, 160, 186, 213, 99, 123, 177, 120, 24, 150, 182, 147, 139, 157, 184, 234, 114, 230, 40, 14, 248, 251, 88, 24, 87, 29, 196, 4, 225, 115, 111, 226, 230, 177, 46, 77, 43, 98, 50, 155, 175, 163, 195, 35, 210, 195, 6, 250, 201, 106, 1, 172, 90, 241, 213, 178, 246, 248, 131, 28, 96, 177, 235, 95, 69, 228, 40, 133, 153, 12, 194, 177, 88, 98, 76, 169, 184, 249, 159, 166, 83, 54, 193, 182, 183, 14, 40, 84, 91, 179, 123, 35, 11, 8, 172, 40, 159, 40, 184, 56, 108, 87, 105, 183, 152, 21, 161, 34, 71, 212, 131, 148, 246, 20, 24, 31, 255, 51, 110, 166, 255, 105, 237, 181, 95, 35, 171, 141, 18, 194, 64, 202, 151, 155, 157, 189, 70, 246, 230, 21, 11, 191, 222, 236, 22, 210, 3, 113, 98, 201, 136, 36, 18, 96, 116, 11, 222, 16, 117, 161, 2, 197, 105, 252, 100, 204, 129, 81, 175, 217, 199, 167, 197, 52, 23, 48, 38, 41, 124, 189, 232, 108, 236, 197, 101, 112, 203, 216, 100, 114, 245, 95, 211, 244, 66, 39, 205, 208, 52, 215, 54, 46, 70, 38, 45, 68, 236, 135, 68, 177, 131, 95, 243, 228, 152, 110, 57, 125, 223, 253, 199, 230, 148, 235, 193, 180, 216, 60, 64, 43, 70, 71, 56, 88, 147, 63, 161, 26, 229, 106, 61, 182, 232, 229, 42, 31, 97, 167, 130, 214, 3, 206, 14, 71, 198, 48, 108, 210, 196, 17, 185, 38, 90, 232, 244, 41, 124, 160, 149, 94, 160, 136, 240, 170, 213, 88, 117, 23, 83, 51, 110, 218, 17, 159, 102, 144, 181, 186, 193, 31, 144, 85, 128, 180, 225, 159, 151, 28, 0, 3, 104, 199, 130, 67, 50, 220, 37, 181, 39, 26, 182, 129, 48, 130, 22, 104, 209, 192, 89, 195, 186, 49, 64, 41, 237, 206, 96, 83, 99, 98, 150, 83, 184, 30, 110, 6, 21, 201, 160, 220, 85, 156, 240, 224, 243, 232, 229, 209, 97, 137, 238, 133, 196, 196, 102, 167, 173, 130, 234, 58, 224, 150, 67, 32, 156, 6, 143, 151, 253, 17, 173, 1, 165, 134, 141, 77, 127, 168, 168, 23, 58, 161, 0, 126, 244, 42, 180, 181, 89, 126, 3, 128, 145, 39, 139, 175, 216, 151, 108, 25, 104, 81, 102, 224, 184, 104, 21, 4, 213, 46, 146, 164, 161, 243, 219, 50, 25, 251, 169, 11, 184, 95, 187, 240, 179, 60, 221, 31, 156, 66, 151, 3, 140, 222, 141, 99, 16, 34, 114, 199, 232, 73, 84, 200, 196, 32, 59, 45, 72, 67, 243, 107, 109, 202, 75, 113, 0, 211, 213, 78, 94, 119, 203, 119, 148, 153, 8, 240, 212, 195, 76, 86, 182, 30, 111, 34, 225, 239, 45, 182, 16, 202, 158, 89, 255, 156, 98, 35, 101, 118, 100, 157, 219, 243, 56, 164, 164, 114, 182, 126, 68, 32, 1, 157, 245, 87, 187, 147, 202, 22, 142, 118, 152, 118, 175, 235, 38, 240, 91, 15, 107, 183, 214, 188, 201, 77, 90, 123, 145, 145, 184, 15, 191, 180, 58, 70, 134, 78, 165, 181, 39, 50, 208, 56, 180, 198, 19, 6, 175, 49, 114, 19, 101, 55, 160, 139, 194, 68, 137, 1, 222, 81, 162, 153, 216, 195, 160, 168, 193, 91, 72, 58, 163, 230, 248, 14, 219, 131, 123, 34, 150, 1, 177, 7, 226, 210, 10, 2, 37, 195, 131, 161, 224, 122, 94, 192, 110, 91, 72, 232, 219, 155, 195, 7, 75, 40, 203, 51, 175, 198, 22, 114, 220, 12, 218, 10, 255, 243, 175, 236, 150, 159, 149, 202, 51, 165, 243, 66, 251, 105, 59, 99, 254, 6, 243, 47, 212, 216, 245, 128, 32, 102, 40, 123, 180, 85, 249, 108, 123, 133, 62, 110, 118, 128, 235, 89, 30, 173, 57, 182, 192, 69, 24, 165, 221, 88, 29, 33, 195, 253, 199, 104, 205, 231, 65, 138, 237, 70, 63, 5, 111, 116, 187, 106, 33, 82, 11, 65, 85, 133, 43, 202, 46, 140, 62, 89, 107, 141, 227, 219, 214, 148, 202, 105, 80, 86, 189, 10, 224, 37, 250, 195, 196, 33, 240, 10, 19, 146, 123, 159, 245, 53, 82, 223, 226, 145, 116, 234, 213, 186, 154, 54, 195, 152, 3, 164, 217, 133, 15, 66, 223, 112, 114, 114, 137, 12, 86, 22, 254, 209, 23, 237, 51, 61, 50, 100, 137, 59, 79, 115, 187, 120, 237, 134, 80, 187, 18, 98, 151, 145, 244, 153, 252, 134, 169, 3, 40, 145, 53, 145, 230, 45, 193, 206, 86, 172, 153, 87, 27, 81, 136, 50, 207, 74, 53, 154, 3, 24, 199, 154, 78, 198, 159, 5, 234, 39, 1, 93, 62, 145, 22, 2, 71, 111, 165, 148, 251, 130, 166, 34, 152, 89, 69, 95, 174, 70, 134, 213, 137, 96, 190, 124, 79, 87, 85, 30, 164, 99, 135, 169, 113, 159, 203, 233, 169, 17, 192, 57, 60, 37, 153, 47, 200, 80, 254, 218, 8, 29, 109, 178, 119, 134, 15, 39, 98, 204, 119, 226, 30, 30, 16, 142, 152, 100, 57, 0, 236, 143, 37, 188, 96, 17, 5, 107, 204, 121, 218, 1, 193, 82, 32, 247, 110, 91, 90, 215, 109, 218, 201, 15, 43, 88, 180, 58, 144, 53, 149, 125, 58, 162, 56, 56, 119, 144, 163, 75, 73, 90, 8, 167, 65, 206, 126, 111, 37, 135, 126, 228, 232, 127, 28, 122, 155, 216, 246, 15, 189, 228, 45, 96, 225, 133, 72, 56, 13, 194, 231, 148, 56, 47, 162, 123, 148, 58, 157, 138, 26, 161, 147, 22, 0, 11, 129, 110, 11, 194, 182, 58, 89, 120, 210, 229, 33, 210, 164, 38, 155, 221, 229, 25, 129, 103, 227, 76, 189, 245, 228, 32, 57, 202, 246, 181, 203, 64, 153, 203, 173, 100, 132, 169, 174, 224, 14, 185, 11, 185, 251, 37, 206, 109, 112, 89, 209, 181, 101, 47, 93, 134, 52, 242, 10, 173, 149, 175, 254, 253, 2, 77, 42, 142, 43, 163, 180, 69, 9, 252, 102, 165, 68, 193, 85, 202, 246, 233, 6, 253, 224, 253, 188, 50, 36, 182, 212, 67, 66, 139, 6, 212, 8, 181, 174, 178, 221, 115, 64, 11, 28, 183, 161, 15, 106, 157, 169, 82, 156, 160, 196, 136, 24, 93, 250, 170, 177, 22, 245, 142, 247, 253, 60, 8, 20, 176, 99, 165, 167, 104, 181, 247, 239, 184, 186, 39, 101, 75, 54, 5, 24, 73, 53, 11, 136, 247, 35, 119, 254, 51, 246, 75, 47, 29, 69, 101, 240, 188, 38, 11, 112, 22, 20, 63, 52, 45, 44, 212, 97, 189, 202, 99, 3, 109, 244, 230, 14, 200, 238, 133, 96, 180, 121, 122, 195, 147, 182, 3, 191, 186, 237, 38, 92, 86, 28, 62, 62, 139, 162, 236, 134, 202, 168, 13, 80, 64, 175, 48, 40, 130, 37, 86, 46, 30, 132, 10, 202, 10, 176, 178, 22, 72, 173, 207, 148, 82, 100, 66, 42, 122, 227, 173, 214, 232, 36, 171, 20, 215, 10, 251, 37, 159, 231, 210, 144, 195, 255, 232, 235, 136, 226, 34, 157, 68, 175, 214, 150, 190, 177, 240, 164, 204, 202, 16, 238, 50, 50, 13, 137, 126, 132, 50, 74, 97, 116, 42, 129, 174, 176, 221, 20, 83, 106, 199, 94, 11, 215, 24, 238, 6, 65, 26, 177, 95, 155, 118, 119, 33, 221, 115, 19, 72, 180, 230, 145, 231, 189, 37, 202, 101, 39, 189, 123, 23, 46, 143, 34, 43, 207, 216, 44, 181, 133, 153, 216, 185, 232, 162, 224, 75, 69, 20, 52, 195, 73, 226, 144, 253, 155, 177, 251, 142, 74, 59, 193, 211, 181, 217, 33, 5, 131, 126, 254, 28, 46, 57, 37, 155, 156, 129, 26, 102, 97, 172, 194, 171, 233, 163, 239, 248, 74, 68, 81, 122, 137, 208, 46, 153, 82, 91, 9, 64, 220, 30, 199, 3, 106, 146, 5, 241, 9, 133, 240, 198, 52, 188, 53, 208, 185, 77, 87, 37, 98, 29, 202, 83, 220, 31, 94, 60, 210, 138, 148, 141, 148, 199, 54, 197, 228, 209, 37, 120, 166, 91, 50, 209, 192, 63, 41, 240, 149, 244, 231, 186, 25, 63, 129, 33, 11, 128, 22, 107, 116, 134, 213, 145, 203, 89, 208, 194, 71, 103, 160, 188, 178, 125, 25, 214, 91, 178, 231, 89, 115, 188, 104, 101, 49, 142, 176, 9, 163, 243, 204, 171, 119, 25, 142, 90, 37, 147, 240, 246, 173, 45, 55, 74, 35, 76, 109, 216, 170, 231, 119, 243, 204, 23, 162, 84, 89, 53, 161, 223, 103, 250, 133, 120, 13, 205, 22, 211, 103, 1, 136, 218, 204, 171, 149, 0, 6, 91, 52, 190, 65, 187, 27, 216, 211, 189, 63, 30, 48, 113, 220, 0, 231, 87, 245, 160, 144, 14, 203, 207, 211, 204, 179, 172, 207, 199, 105, 69, 119, 164, 170, 3, 244, 179, 75, 85, 138, 25, 213, 108, 43, 127, 32, 137, 138, 28, 223, 165, 0, 15, 29, 25, 216, 159, 124, 2, 151, 232, 63, 223, 79, 151, 10, 163, 191, 149, 114, 231, 232, 166, 248, 132, 241, 232, 255, 72, 93, 71, 31, 226, 117, 160, 60, 249, 208, 215, 32, 184, 172, 200, 151, 168, 61, 212, 48, 82, 133, 4, 233, 110, 69, 152, 162, 63, 247, 55, 188, 10, 31, 216, 40, 7, 151, 29, 242, 133, 40, 161, 118, 87, 208, 238, 99, 174, 237, 31, 178, 217, 19, 205, 20, 121, 153, 60, 221, 80, 15, 217, 59, 148, 195, 91, 254, 33, 169, 151, 124, 215, 238, 40, 200, 19, 206, 183, 249, 62, 88, 217, 33, 252, 73, 125, 45, 136, 25, 185, 3, 164, 113, 140, 186, 16, 7, 177, 31, 61, 117, 146, 169, 88, 128, 86, 121, 17, 230, 227, 182, 245, 93, 127, 228, 44, 169, 112, 18, 206, 213, 151, 152, 131, 150, 117, 169, 0, 4, 164, 223, 161, 193, 0, 254, 200, 118, 173, 64, 221, 163, 85, 223, 108, 174, 33, 73, 232, 118, 212, 153, 143, 25, 31, 131, 104, 130, 69, 113, 144, 143, 57, 224, 44, 42, 225, 93, 241, 171, 143, 56, 100, 207, 223, 233, 119, 115, 69, 3, 165, 254, 78, 52, 114, 156, 42, 204, 33, 26, 214, 34, 138, 160, 94, 194, 216, 71, 193, 144, 207, 89, 163, 130, 42, 116, 101, 248, 171, 2, 133, 252, 181, 28, 183, 202, 227, 102, 208, 41, 196, 30, 109, 105, 140, 223, 114, 47, 66, 143, 102, 94, 215, 46, 149, 45, 83, 115, 167, 249, 109, 137, 1, 110, 3, 201, 38, 15, 154, 15, 50, 29, 218, 53, 255, 2, 69, 135, 26, 12, 102, 156, 126, 90, 167, 123, 116, 43, 129, 84, 72, 70, 133, 142, 41, 10, 60, 97, 199, 126, 232, 71, 96, 211, 86, 85, 124, 217, 114, 11, 157, 199, 252, 40, 197, 243, 175, 157, 212, 121, 10, 237, 90, 201, 21, 161, 127, 41, 121, 159, 94, 238, 79, 234, 132, 104, 80, 179, 85, 88, 19, 7, 202, 5, 175, 69, 18, 148, 131, 41, 173, 87, 225, 97, 232, 145, 16, 171, 179, 131, 160, 102, 233, 184, 214, 116, 92, 209, 66, 176, 55, 204, 214, 130, 58, 246, 61, 188, 96, 24, 84, 209, 167, 179, 116, 130, 66, 244, 70, 242, 43, 61, 134, 6, 192, 171, 182, 251, 142, 201, 221, 57, 85, 27, 144, 120, 0, 79, 84, 213, 175, 104, 36, 72, 88, 119, 17, 7, 64, 191, 190, 97, 218, 78, 39, 137, 242, 30, 185, 208, 181, 75, 139, 151, 14, 39, 199, 12, 70, 250, 230, 113, 254, 50, 116, 61, 47, 221, 37, 236, 133, 0, 246, 201, 18, 187, 163, 161, 231, 6, 121, 78, 254, 157, 128, 181, 158, 106, 237, 145, 101, 212, 106, 175, 161, 70, 130, 23, 184, 77, 8, 9, 43, 53, 30, 133, 207, 70, 253, 149, 59, 74, 153, 78, 230, 70, 1, 211, 254, 233, 85, 151, 85, 214, 105, 143, 230, 158, 18, 243, 141, 55, 81, 106, 114, 243, 153, 125, 223, 12, 226, 224, 84, 118, 248, 80, 157, 179, 180, 230, 160, 192, 38, 41, 130, 38, 55, 28, 39, 64, 224, 99, 89, 175, 240, 246, 80, 100, 114, 58, 103, 89, 179, 31, 205, 8, 20, 63, 18, 164, 34, 186, 237, 207, 123, 109, 108, 215, 137, 148, 122, 135, 137, 136, 240, 25, 23, 114, 210, 240, 232, 231, 158, 109, 164, 164, 23, 220, 114, 168, 137, 206, 83, 86, 36, 103, 7, 195, 164, 10, 160, 36, 86, 13, 229, 31, 173, 134, 35, 42, 35, 214, 28, 1, 170, 195, 102, 123, 241, 40, 94, 229, 13, 19, 206, 237, 152, 125, 243, 116, 174, 118, 171, 91, 106, 146, 91, 73, 184, 234, 86, 39, 232, 255, 246, 87, 34, 173, 194, 179, 82, 8, 209, 165, 10, 253, 191, 162, 70, 213, 22, 234, 27, 191, 17, 73, 45, 97, 97, 203, 131, 11, 185, 205, 116, 17, 35, 57, 148, 107, 140, 224, 47, 115, 82, 225, 96, 143, 192, 66, 39, 60, 16, 159, 57, 201, 252, 79, 138, 87, 111, 48, 235, 26, 173, 96, 217, 50, 225, 124, 29, 40, 71, 185, 27, 177, 214, 72, 27, 122, 26, 70, 25, 60, 151, 160, 247, 64, 91, 171, 58, 122, 83, 23, 122, 77, 38, 94, 144, 211, 197, 170, 27, 195, 139, 144, 219, 193, 75, 200, 230, 189, 77, 229, 105, 195, 251, 185, 255, 174, 32, 185, 137, 45, 149, 52, 190, 211, 31, 206, 52, 225, 89, 151, 13, 109, 92, 70, 0, 189, 6, 148, 33, 215, 234, 157, 137, 168, 38, 65, 33, 1, 27, 142, 6, 209, 149, 111, 14, 20, 244, 194, 149, 205, 163, 9, 197, 165, 120, 3, 4, 188, 173, 76, 251, 199, 205, 84, 89, 74, 187, 88, 8, 116, 242, 60, 52, 131, 74, 71, 169, 227, 21, 200, 183, 153, 40, 18, 50, 178, 187, 226, 196, 125, 70, 124, 42, 120, 122, 180, 87, 144, 37, 135, 147, 189, 50, 77, 14, 23, 82, 127, 233, 87, 186, 102, 173, 135, 138, 73, 92, 139, 188, 29, 87, 12, 22, 126, 231, 34, 84, 146, 34, 92, 1, 0, 62, 179, 107, 242, 98, 79, 62, 207, 156, 222, 127, 55, 163, 22, 70, 152, 199, 167, 207, 156, 106, 149, 153, 255, 61, 251, 56, 250, 197, 247, 254, 38, 140, 223, 223, 247, 227, 246, 16, 177, 182, 231, 9, 96, 110, 223, 172, 247, 174, 0, 37, 77, 182, 17, 89, 135, 184, 96, 165, 188, 21, 34, 174, 189, 28, 88, 102, 33, 117, 112, 65, 202, 20, 189, 144, 229, 48, 0, 80, 176, 254, 246, 49, 0, 53, 100, 116, 218, 3, 169, 62, 221, 240, 203, 130, 83, 54, 17, 62, 90, 216, 239, 41, 100, 51, 29, 64, 185, 33, 139, 75, 5, 129, 82, 4, 162, 248, 40, 199, 154, 18, 196, 116, 1, 234, 57, 72, 56, 94, 100, 232, 142, 123, 184, 57, 222, 111, 75, 194, 195, 192, 182, 6, 93, 111, 247, 197, 220, 12, 115, 194, 124, 132, 0, 82, 109, 59, 204, 39, 169, 225, 117, 200, 82, 117, 48, 250, 177, 190, 127, 2, 53, 120, 189, 249, 187, 81, 111, 195, 243, 206, 241, 185, 4, 68, 182, 152, 63, 94, 196, 93, 234, 57, 229, 207, 218, 14, 156, 136, 138, 71, 131, 153, 97, 23, 37, 164, 226, 193, 122, 6, 10, 196, 246, 244, 50, 190, 122, 70, 179, 226, 125, 163, 216, 33, 35, 75, 212, 177, 210, 48, 59, 28, 142, 38, 46, 80, 63, 73, 104, 157, 113, 219, 118, 69, 131, 113, 218, 197, 196, 6, 96, 177, 167, 34, 32, 188, 172, 240, 44, 21, 159, 238, 111, 213, 174, 15, 81, 151, 216, 5, 207, 182, 191, 88, 114, 184, 37, 229, 253, 153, 152, 253, 191, 136, 159, 227, 29, 108, 105, 68, 140, 12, 220, 222, 182, 200, 58, 125, 118, 237, 204, 218, 167, 195, 139, 30, 77, 6, 80, 78, 118, 46, 155, 255, 222, 150, 202, 41, 126, 139, 109, 76, 88, 239, 140, 238, 64, 206, 120, 180, 154, 59, 162, 163, 86, 143, 214, 19, 119, 112, 40, 37, 191, 10, 81, 64, 141, 148, 106, 190, 35, 141, 144, 30, 143, 58, 127, 74, 243, 135, 30, 66, 72, 229, 160, 120, 91, 92, 40, 171, 221, 121, 190, 182, 14, 2, 127, 236, 105, 222, 10, 176, 88, 31, 54, 225, 143, 232, 187, 159, 94, 180, 238, 132, 46, 71, 212, 178, 167, 117, 41, 103, 44, 193, 74, 154, 110, 75, 34, 114, 181, 148, 134, 61, 18, 216, 145, 177, 234, 248, 8, 170, 34, 9, 57, 68, 140, 217, 244, 63, 61, 247, 131, 73, 67, 76, 96, 149, 67, 172, 74, 72, 121, 93, 179, 22, 238, 36, 147, 35, 13, 107, 56, 200, 42, 233, 43, 20, 101, 44, 126, 181, 96, 38, 15, 57, 0, 143, 140, 190, 44, 11, 207, 84, 228, 64, 153, 246, 37, 59, 61, 89, 206, 72, 168, 102, 42, 116, 33, 25, 177, 202, 215, 130, 174, 0, 122, 42, 85, 95, 153, 82, 38, 34, 45, 57, 98, 17, 24, 14, 124, 22, 147, 238, 28, 201, 223, 102, 226, 115, 189, 60, 194, 201, 148, 217, 41, 139, 195, 63, 149, 178, 87, 160, 44, 113, 229, 208, 224, 1, 235, 155, 121, 136, 17, 47, 3, 158, 100, 184, 167, 87, 227, 183, 245, 64, 253, 60, 215, 77, 174, 52, 192, 152, 241, 43, 71, 214, 161, 39, 82, 214, 174, 147, 25, 26, 214, 78, 9, 161, 225, 20, 145, 0, 25, 164, 155, 122, 152, 193, 43, 200, 94, 72, 185, 145, 158, 109, 85, 116, 77, 69, 106, 185, 146, 92, 146, 138, 155, 80, 35, 54, 32, 112, 57, 119, 2, 42, 255, 252, 130, 134, 158, 28, 186, 142, 171, 60, 43, 219, 73, 146, 196, 18, 109, 246, 76, 107, 5, 46, 169, 40, 99, 154, 159, 140, 242, 72, 58, 89, 98, 223, 180, 27, 98, 10, 112, 172, 144, 154, 41, 5, 119, 240, 120, 248, 55, 62, 213, 51, 180, 196, 46, 53, 65, 220, 123, 242, 250, 58, 200, 121, 93, 192, 207, 54, 124, 209, 250, 194, 101, 66, 104, 220, 54, 6, 87, 162, 248, 28, 155, 61, 162, 98, 172, 31, 161, 249, 104, 236, 96, 150, 214, 152, 123, 169, 245, 32, 203, 212, 135, 139, 218, 252, 186, 100, 114, 176, 30, 43, 61, 151, 138, 3, 159, 152, 252, 222, 68, 34, 93, 85, 58, 173, 126, 149, 209, 121, 216, 174, 183, 238, 81, 98, 9, 252, 213, 57, 175, 78, 141, 69, 161, 39, 42, 176, 27, 26, 154, 137, 205, 163, 4, 51, 207, 13, 121, 36, 208, 123, 40, 210, 237, 109, 230, 68, 215, 229, 181, 245, 101, 93, 162, 24, 106, 6, 139, 22, 137, 75, 159, 75, 210, 212, 86, 17, 241, 79, 15, 108, 213, 14, 166, 158, 209, 164, 164, 84, 13, 220, 245, 108, 96, 184, 139, 252, 146, 222, 222, 132, 223, 38, 98, 202, 36, 190, 41, 178, 226, 132, 224, 255, 2, 57, 44, 88, 12, 218, 84, 182, 211, 197, 93, 107, 169, 151, 161, 21, 110, 1, 252, 40, 220, 186, 253, 14, 197, 171, 82, 203, 209, 127, 122, 135, 65, 132, 176, 16, 82, 8, 173, 206, 153, 9, 216, 49, 40, 233, 139, 136, 115, 230, 212, 16, 169, 123, 178, 110, 240, 10, 57, 21, 51, 209, 25, 61, 245, 88, 5, 93, 105, 253, 123, 213, 92, 113, 188, 200, 78, 142, 64, 47, 20, 244, 4, 105, 0, 201, 206, 6, 127, 212, 233, 69, 49, 57, 92, 0, 72, 74, 12, 137, 68, 165, 69, 177, 196, 99, 238, 115, 39, 173, 59, 155, 157, 121, 213, 6, 131, 93, 35, 29, 171, 238, 58, 181, 84, 138, 51, 124, 254, 191, 9, 122, 124, 254, 197, 204, 103, 41, 23, 156, 71, 134, 49, 91, 58, 101, 167, 98, 251, 155, 168, 242, 117, 44, 160, 64, 64, 23, 105, 231, 146, 32, 216, 248, 137, 152, 251, 17, 104, 207, 249, 59, 159, 226, 9, 123, 1, 205, 1, 158, 225, 64, 5, 135, 137, 157, 117, 146, 253, 184, 210, 60, 223, 237, 159, 38, 97, 146, 131, 33, 110, 14, 61, 69, 214, 186, 13, 184, 142, 118, 128, 208, 139, 210, 47, 34, 133, 55, 171, 255, 131, 13, 100, 146, 95, 128, 229, 200, 49, 87, 36, 33, 208, 33, 2, 75, 210, 84, 159, 236, 171, 167, 241, 45, 209, 139, 114, 238, 64, 114, 203, 122, 161, 134, 190, 58, 28, 178, 67, 53, 24, 26, 198, 66, 16, 65, 210, 28, 43, 68, 134, 68, 47, 160, 148, 194, 99, 224, 208, 142, 0, 6, 238, 208, 147, 168, 45, 5, 48, 143, 235, 120, 143, 121, 164, 143, 254, 77, 228, 130, 85, 235, 208, 9, 233, 115, 110, 89, 74, 75, 250, 57, 103, 78, 174, 99, 105, 63, 71, 168, 171, 156, 233, 111, 167, 154, 245, 185, 174, 150, 63, 103, 222, 15, 235, 238, 169, 137, 173, 166, 247, 81, 131, 72, 175, 236, 75, 203, 231, 238, 75, 85, 67, 73, 127, 48, 73, 44, 60, 188, 193, 114, 140, 237, 112, 121, 102, 12, 6, 131, 203, 45, 5, 5, 44, 237, 3, 222, 3, 7, 168, 156, 201, 87, 227, 40, 238, 103, 164, 181, 115, 75, 219, 158, 210, 16, 59, 25, 105, 176, 139, 94, 109, 149, 2, 2, 219, 143, 233, 60, 136, 228, 174, 8, 216, 80, 230, 151, 197, 78, 159, 143, 132, 125, 229, 245, 30, 100, 23, 170, 31, 233, 196, 79, 112, 247, 14, 17, 181, 162, 209, 221, 18, 229, 73, 164, 179, 253, 9, 106, 87, 189, 18, 151, 80, 137, 238, 168, 163, 2, 9, 154, 159, 146, 207, 205, 64, 224, 11, 233, 204, 135, 65, 133, 207, 25, 5, 216, 168, 149, 153, 173, 150, 212, 20, 246, 29, 17, 58, 209, 125, 141, 47, 231, 79, 218, 101, 149, 23, 229, 28, 45, 158, 201, 224, 101, 145, 4, 51, 50, 247, 83, 56, 28, 187, 248, 29, 61, 50, 84, 227, 188, 104, 246, 199, 232, 1, 58, 27, 196, 127, 101, 105, 29, 230, 160, 71, 195, 31, 162, 172, 188, 110, 40, 0, 145, 71, 243, 133, 109, 198, 13, 11, 152, 88, 65, 66, 229, 2, 86, 234, 132, 29, 36, 85, 120, 8, 177, 93, 77, 74, 98, 137, 95, 68, 47, 233, 71, 108, 27, 155, 54, 75, 77, 167, 144, 236, 133, 122, 224, 241, 13, 216, 222, 62, 195, 145, 113, 245, 182, 137, 249, 101, 29, 156, 93, 93, 98, 216, 255, 44, 97, 193, 249, 151, 19, 9, 111, 99, 234, 217, 4, 54, 87, 93, 198, 231, 236, 16, 234, 133, 104, 195, 11, 185, 39, 188, 115, 198, 117, 175, 208, 229, 1, 168, 157, 105, 17, 209, 175, 30, 20, 99, 187, 180, 44, 233, 72, 143, 182, 19, 179, 19, 9, 151, 189, 126, 165, 155, 123, 150, 195, 26, 41, 194, 150, 13, 195, 214, 24, 238, 54, 62, 229, 51, 132, 114, 145, 69, 145, 206, 64, 208, 18, 216, 96, 85, 62, 176, 228, 190, 163, 213, 39, 113, 218, 62, 89, 195, 227, 89, 51, 21, 2, 194, 34, 44, 168, 24, 55, 167, 49, 10, 43, 174, 222, 229, 109, 79, 27, 210, 32, 166, 9, 37, 204, 250, 3, 23, 141, 112, 76, 40, 24, 206, 213, 155, 48, 77, 230, 128, 53, 156, 19, 219, 175, 182, 201, 128, 52, 76, 24, 70, 177, 228, 182, 84, 193, 94, 219, 91, 116, 189, 52, 58, 249, 107, 193, 91, 80, 9, 93, 119, 248, 37, 198, 125, 234, 142, 230, 202, 183, 243, 227, 159, 8, 192, 8, 84, 177, 188, 242, 186, 96, 210, 8, 218, 209, 191, 248, 62, 189, 200, 66, 85, 237, 133, 117, 151, 132, 125, 40, 29, 68, 16, 72, 190, 150, 19, 75, 20, 9, 38, 101, 132, 87, 236, 2, 83, 131, 220, 225, 68, 78, 138, 173, 252, 18, 23, 215, 25, 19, 45, 201, 81, 175, 112, 171, 55, 42, 180, 70, 142, 162, 58, 159, 199, 253, 255, 192, 177, 7, 53, 150, 52, 0, 189, 139, 189, 184, 99, 57, 208, 24, 159, 104, 131, 67, 227, 160, 85, 9, 42, 68, 88, 240, 101, 114, 107, 64, 10, 199, 231, 25, 177, 106, 59, 183, 54, 175, 162, 108, 189, 127, 19, 16, 52, 199, 114, 157, 224, 18, 252, 138, 161, 4, 120, 132, 43, 118, 170, 182, 239, 104, 237, 161, 224, 164, 16, 146, 73, 246, 63, 52, 239, 132, 82, 25, 107, 86, 249, 76, 139, 186, 197, 58, 183, 195, 127, 43, 133, 39, 142, 53, 103, 194, 198, 92, 208, 143, 212, 28, 7, 215, 190, 70, 58, 110, 210, 37, 193, 240, 102, 30, 58, 108, 149, 190, 169, 42, 179, 130, 54, 184, 233, 78, 240, 51, 50, 197, 254, 29, 17, 21, 243, 128, 235, 19, 58, 238, 206, 202, 54, 179, 63, 204, 77, 186, 72, 97, 10, 17, 162, 12, 218, 183, 16, 253, 150, 113, 34, 8, 13, 130, 56, 99, 154, 126, 42, 170, 158, 57, 28, 46, 182, 212, 228, 176, 120, 142, 254, 69, 96, 83, 87, 63, 54, 118, 46, 4, 26, 50, 139, 94, 245, 147, 68, 12, 94, 219, 98, 10, 232, 96, 90, 181, 55, 29, 121, 2, 233, 83, 71, 167, 157, 10, 91, 130, 195, 208, 50, 202, 176, 135, 244, 251, 41, 137, 245, 34, 208, 185, 206, 186, 114, 12, 95, 13, 46, 9, 96, 42, 233, 10, 244, 221, 203, 96, 59, 0, 238, 21, 137, 5, 195, 126, 29, 103, 248, 155, 165, 182, 56, 224, 88, 116, 13, 33, 97, 169, 61, 126, 107, 44, 49, 37, 74, 69, 42, 215, 187, 62, 46, 242, 202, 81, 234, 141, 185, 107, 216, 67, 151, 245, 248, 163, 210, 4, 177, 167, 110, 152, 243, 54, 202, 115, 250, 195, 235, 36, 8, 189, 14, 112, 143, 181, 58, 134, 134, 62, 172, 24, 25, 181, 17, 148, 193, 218, 66, 23, 111, 2, 165, 55, 74, 227, 34, 75, 73, 180, 30, 222, 199, 96, 136, 99, 102, 192, 44, 68, 125, 166, 186, 239, 131, 29, 212, 23, 88, 214, 19, 24, 105, 211, 136, 189, 156, 37, 29, 192, 9, 169, 173, 156, 182, 46, 189, 99, 57, 120, 156, 160, 233, 57, 145, 56, 75, 235, 103, 42, 128, 52, 41, 175, 201, 248, 30, 239, 54, 174, 200, 83, 4, 224, 199, 34, 170, 252, 241, 40, 190, 73, 114, 216, 232, 243, 191, 76, 58, 36, 16, 121, 251, 156, 182, 80, 163, 179, 98, 96, 183, 217, 87, 195, 218, 183, 217, 71, 58, 87, 149, 148, 182, 56, 217, 197, 73, 142, 96, 69, 213, 217, 115, 149, 102, 182, 124, 148, 109, 20, 204, 209, 121, 94, 13, 18, 141, 65, 153, 54, 94, 173, 238, 253, 187, 209, 223, 166, 194, 249, 173, 96, 1, 46, 238, 248, 39, 17, 242, 188, 155, 213, 177, 118, 211, 162, 201, 215, 136, 176, 137, 14, 232, 201, 49, 221, 203, 55, 249, 75, 230, 210, 158, 184, 138, 197, 134, 8, 219, 145, 109, 50, 8, 129, 48, 118, 214, 181, 153, 118, 125, 54, 10, 213, 210, 210, 132, 14, 176, 221, 125, 189, 79, 0, 217, 164, 187, 232, 85, 141, 184, 85, 110, 27, 101, 91, 37, 151, 20, 91, 16, 111, 1, 81, 230, 85, 212, 214, 149, 6, 71, 206, 180, 68, 72, 106, 83, 169, 232, 19, 162, 90, 128, 253, 108, 4, 30, 95, 239, 209, 202, 181, 42, 250, 224, 84, 52, 212, 169, 92, 150, 165, 59, 131, 102, 212, 211, 200, 107, 38, 151, 35, 98, 163, 31, 143, 122, 15, 7, 42, 19, 209, 244, 11, 37, 240, 26, 234, 5, 215, 32, 55, 165, 244, 22, 54, 153, 119, 145, 30, 10, 219, 241, 169, 120, 114, 246, 76, 253, 196, 110, 194, 33, 226, 66, 225, 116, 13, 218, 179, 194, 211, 211, 185, 127, 254, 41, 250, 7, 20, 84, 54, 116, 213, 122, 51, 64, 40, 146, 117, 237, 88, 205, 136, 65, 82, 243, 144, 144, 78, 146, 208, 216, 95, 92, 92, 194, 132, 179, 0, 106, 252, 243, 169, 86, 69, 184, 183, 121, 207, 100, 41, 212, 222, 192, 167, 20, 157, 48, 99, 165, 197, 138, 91, 210, 174, 112, 63, 151, 149, 88, 64, 47, 106, 154, 215, 31, 86, 13, 7, 66, 95, 235, 195, 19, 191, 82, 40, 171, 137, 40, 190, 199, 131, 247, 48, 220, 109, 220, 67, 177, 120, 217, 191, 56, 84, 28, 58, 189, 36, 54, 217, 225, 196, 119, 246, 217, 130, 137, 124, 65, 42, 208, 219, 76, 210, 204, 235, 155, 162, 126, 190, 108, 13, 116, 176, 190, 4, 212, 24, 156, 213, 175, 253, 226, 7, 53, 99, 211, 22, 152, 84, 84, 154, 62, 15, 176, 220, 21, 228, 221, 107, 172, 177, 185, 91, 91, 146, 19, 217, 10, 174, 10, 203, 92, 245, 95, 10, 119, 2, 116, 142, 119, 163, 103, 209, 117, 107, 34, 43, 189, 73, 10, 50, 154, 44, 216, 23, 163, 166, 132, 88, 255, 211, 92, 193, 62, 64, 157, 253, 180, 187, 55, 57, 249, 236, 31, 204, 9, 103, 213, 161, 72, 170, 141, 94, 84, 221, 84, 130, 36, 172, 75, 96, 4, 192, 15, 46, 42, 114, 86, 81, 16, 196, 1, 58, 176, 232, 109, 67, 70, 227, 167, 44, 176, 74, 135, 199, 144, 139, 97, 215, 223, 41, 229, 205, 189, 135, 101, 227, 71, 236, 202, 3, 96, 182, 167, 174, 8, 133, 244, 71, 137, 81, 215, 100, 108, 138, 212, 220, 156, 0, 15, 171, 188, 193, 45, 97, 220, 252, 24, 174, 115, 235, 227, 34, 238, 28, 120, 163, 255, 45, 143, 20, 28, 228, 185, 172, 19, 136, 124, 233, 142, 28, 206, 183, 96, 4, 133, 10, 72, 68, 173, 1, 150, 186, 113, 35, 36, 118, 74, 91, 210, 49, 111, 160, 221, 250, 213, 232, 200, 76, 30, 208, 119, 216, 172, 109, 208, 210, 33, 182, 125, 242, 3, 9, 229, 7, 109, 236, 63, 40, 24, 136, 83, 7, 39, 57, 0, 92, 116, 81, 138, 14, 66, 33, 43, 26, 191, 177, 211, 34, 68, 204, 19, 38, 56, 118, 175, 53, 247, 21, 174, 37, 216, 72, 208, 93, 152, 95, 174, 21, 39, 200, 89, 140, 182, 32, 42, 160, 9, 246, 216, 92, 148, 199, 97, 147, 129, 204, 90, 193, 146, 220, 7, 9, 210, 136, 120, 112, 24, 173, 162, 251, 85, 125, 164, 193, 27, 194, 3, 98, 234, 150, 240, 92, 144, 224, 70, 153, 41, 197, 93, 58, 53, 79, 92, 36, 156, 143, 154, 64, 104, 198, 73, 55, 134, 7, 242, 18, 102, 249, 138, 27, 191, 35, 160, 91, 19, 181, 197, 37, 225, 162, 189, 253, 222, 240, 27, 51, 235, 22, 211, 164, 87, 127, 183, 168, 216, 13, 109, 190, 240, 243, 214, 250, 1, 83, 79, 90, 38, 3, 125, 96, 10, 69, 171, 13, 60, 57, 97, 61, 2, 15, 135, 255, 0, 141, 85, 99, 63, 5, 78, 98, 58, 72, 22, 191, 31, 12, 82, 45, 52, 202, 193, 18, 183, 129, 187, 73, 136, 35, 237, 17, 119, 60, 163, 243, 219, 96, 83, 222, 123, 128, 156, 157, 27, 2, 81, 217, 22, 223, 13, 208, 131, 68, 181, 206, 8, 224, 108, 227, 97, 88, 28, 188, 47, 71, 40, 110, 212, 142, 132, 152, 123, 129, 163, 16, 92, 82, 87, 108, 114, 11, 26, 131, 100, 185, 121, 185, 216, 77, 207, 204, 104, 72, 19, 179, 236, 99, 235, 217, 62, 175, 163, 44, 22, 255, 3, 152, 140, 217, 37, 8, 58, 108, 80, 241, 84, 179, 12, 109, 119, 37, 85, 16, 235, 199, 192, 196, 189, 229, 79, 214, 140, 205, 205, 186, 176], + [134, 25, 65, 245, 56, 181, 107, 10, 166, 215, 113, 186, 10, 59, 58, 204, 237, 69, 62, 65, 49, 143, 247, 103, 79, 198, 106, 7, 48, 1, 246, 56, 119, 155, 181, 79, 139, 242, 26, 99, 254, 80, 165, 103, 139, 17, 121, 58, 61, 146, 204, 101, 141, 51, 54, 184, 157, 124, 89, 2, 146, 167, 57, 10, 129, 247, 125, 101, 109, 36, 108, 28, 36, 202, 105, 17, 181, 205, 50, 138, 152, 111, 153, 5, 72, 5, 81, 221, 71, 177, 136, 140, 219, 36, 14, 154, 242, 231, 9, 117, 14, 237, 122, 198, 146, 56, 173, 231, 245, 184, 34, 135, 242, 4, 248, 84, 68, 35, 19, 154, 19, 127, 202, 86, 165, 124, 197, 54, 112, 223, 251, 229, 238, 33, 46, 169, 69, 35, 123, 5, 201, 138, 214, 198, 235, 187, 163, 218, 237, 249, 186, 230, 245, 31, 235, 150, 150, 69, 77, 23, 3, 199, 189, 128, 127, 23, 193, 30, 142, 75, 15, 195, 255, 9, 64, 213, 54, 232, 229, 40, 115, 144, 128, 65, 240, 133, 145, 30, 210, 178, 21, 90, 50, 5, 155, 237, 142, 207, 122, 29, 253, 1, 95, 88, 86, 188, 67, 41, 218, 185, 69, 44, 68, 54, 42, 245, 181, 36, 227, 175, 113, 210, 230, 216, 109, 33, 123, 255, 113, 106, 56, 151, 248, 232, 18, 56, 198, 208, 134, 166, 96, 55, 230, 0, 89, 146, 249, 207, 18, 40, 59, 240, 251, 206, 78, 45, 78, 193, 35, 43, 60, 148, 116, 76, 201, 151, 43, 143, 169, 91, 197, 108, 58, 188, 54, 7, 112, 86, 225, 189, 62, 194, 2, 204, 46, 41, 130, 136, 135, 126, 101, 41, 68, 122, 140, 167, 225, 167, 247, 240, 128, 53, 142, 100, 82, 25, 193, 226, 6, 196, 210, 76, 11, 18, 65, 213, 55, 24, 218, 19, 246, 33, 215, 231, 56, 30, 218, 217, 1, 138, 129, 39, 254, 148, 68, 166, 166, 247, 33, 178, 207, 163, 215, 53, 130, 154, 202, 238, 133, 6, 208, 156, 78, 128, 250, 158, 48, 140, 167, 141, 101, 133, 167, 121, 65, 229, 168, 197, 30, 6, 70, 169, 112, 212, 70, 120, 245, 255, 53, 190, 36, 130, 29, 129, 42, 170, 220, 13, 163, 201, 182, 109, 106, 23, 194, 19, 48, 154, 243, 106, 104, 210, 12, 44, 247, 202, 92, 129, 119, 137, 228, 82, 250, 19, 48, 32, 24, 66, 26, 99, 67, 116, 96, 90, 170, 178, 179, 69, 224, 79, 255, 151, 85, 113, 80, 249, 126, 190, 189, 120, 188, 89, 53, 204, 125, 72, 197, 17, 8, 159, 71, 96, 158, 115, 38, 246, 223, 40, 159, 110, 61, 67, 119, 207, 145, 244, 230, 77, 53, 74, 185, 86, 63, 73, 218, 79, 60, 106, 5, 33, 215, 15, 175, 181, 2, 156, 32, 167, 253, 5, 115, 135, 6, 106, 200, 152, 87, 199, 247, 247, 154, 13, 136, 181, 223, 97, 185, 19, 36, 118, 246, 118, 7, 66, 182, 30, 82, 38, 183, 154, 56, 116, 156, 129, 53, 241, 63, 86, 152, 7, 142, 122, 156, 201, 162, 95, 24, 27, 167, 115, 186, 251, 47, 159, 19, 125, 151, 99, 222, 197, 181, 145, 137, 1, 247, 34, 102, 254, 202, 95, 211, 201, 54, 170, 89, 63, 156, 123, 173, 41, 117, 169, 153, 255, 153, 132, 6, 82, 119, 241, 249, 75, 118, 30, 77, 121, 153, 113, 12, 222, 170, 175, 12, 3, 148, 121, 175, 170, 168, 137, 178, 175, 58, 157, 79, 38, 231, 42, 54, 91, 30, 202, 57, 37, 158, 24, 183, 19, 6, 175, 206, 234, 113, 61, 177, 180, 205, 143, 36, 199, 179, 189, 212, 95, 60, 125, 213, 2, 65, 65, 47, 206, 34, 101, 18, 12, 111, 162, 156, 208, 228, 237, 105, 10, 45, 71, 75, 126, 249, 58, 33, 105, 64, 148, 193, 35, 63, 163, 240, 13, 218, 95, 86, 66, 200, 157, 10, 194, 212, 203, 10, 77, 72, 114, 82, 80, 232, 67, 231, 215, 78, 140, 230, 210, 227, 161, 229, 160, 161, 30, 0, 77, 173, 131, 88, 57, 249, 17, 219, 149, 149, 38, 199, 247, 164, 185, 143, 195, 246, 124, 98, 87, 90, 131, 183, 240, 236, 3, 250, 122, 224, 241, 237, 13, 233, 78, 76, 10, 152, 246, 100, 164, 111, 163, 246, 101, 39, 185, 159, 191, 234, 248, 253, 138, 195, 131, 80, 204, 127, 122, 13, 149, 97, 253, 95, 224, 47, 35, 3, 71, 201, 132, 175, 165, 157, 189, 91, 192, 129, 98, 180, 18, 158, 52, 180, 252, 181, 122, 30, 77, 102, 34, 193, 119, 182, 235, 193, 115, 140, 62, 236, 128, 135, 219, 68, 111, 44, 173, 173, 148, 114, 105, 180, 62, 220, 22, 229, 252, 58, 33, 151, 153, 105, 244, 177, 55, 240, 14, 127, 28, 205, 226, 191, 158, 42, 5, 168, 36, 19, 114, 173, 111, 113, 147, 99, 88, 97, 13, 53, 98, 95, 130, 133, 31, 216, 244, 114, 192, 166, 163, 134, 208, 2, 169, 45, 153, 138, 3, 122, 224, 112, 168, 9, 52, 15, 89, 253, 79, 229, 254, 204, 55, 242, 100, 197, 206, 46, 88, 182, 119, 70, 9, 66, 241, 131, 38, 164, 190, 196, 190, 70, 109, 71, 109, 133, 134, 122, 24, 64, 151, 181, 41, 117, 83, 36, 47, 192, 229, 116, 227, 77, 0, 94, 131, 162, 143, 51, 237, 95, 15, 90, 44, 122, 250, 81, 15, 173, 109, 235, 97, 53, 93, 156, 150, 9, 156, 122, 98, 252, 213, 169, 236, 204, 110, 102, 55, 136, 141, 27, 137, 147, 148, 32, 25, 63, 224, 234, 253, 7, 142, 191, 9, 125, 73, 27, 130, 121, 192, 120, 251, 90, 94, 14, 151, 146, 248, 61, 213, 46, 54, 50, 116, 204, 159, 79, 2, 51, 127, 24, 186, 103, 136, 248, 185, 135, 77, 124, 93, 205, 2, 86, 237, 65, 95, 80, 22, 169, 132, 123, 230, 201, 157, 195, 67, 36, 231, 111, 15, 100, 248, 141, 206, 130, 61, 88, 196, 229, 67, 238, 104, 190, 52, 161, 208, 173, 253, 3, 114, 15, 3, 111, 112, 189, 96, 130, 145, 142, 194, 245, 234, 45, 47, 76, 191, 248, 224, 167, 205, 117, 170, 89, 31, 130, 176, 51, 133, 21, 163, 194, 182, 202, 152, 171, 179, 58, 175, 134, 251, 131, 224, 106, 133, 165, 151, 33, 30, 80, 243, 67, 212, 93, 253, 230, 189, 222, 163, 108, 220, 2, 28, 126, 246, 165, 104, 222, 174, 113, 10, 42, 169, 212, 166, 195, 185, 76, 104, 175, 253, 141, 226, 241, 117, 229, 224, 188, 189, 52, 160, 82, 127, 102, 137, 93, 229, 190, 165, 116, 165, 205, 195, 119, 116, 86, 245, 197, 39, 25, 209, 80, 164, 184, 95, 224, 156, 254, 104, 34, 45, 168, 109, 162, 255, 22, 92, 63, 78, 10, 101, 190, 248, 237, 66, 180, 66, 9, 195, 6, 96, 157, 220, 41, 127, 59, 172, 234, 161, 180, 37, 176, 31, 21, 81, 14, 174, 132, 168, 200, 229, 5, 61, 52, 243, 194, 106, 133, 215, 98, 190, 79, 100, 146, 12, 68, 55, 2, 235, 142, 38, 0, 101, 100, 233, 178, 79, 126, 79, 189, 176, 252, 188, 196, 198, 156, 95, 88, 133, 215, 80, 234, 125, 201, 127, 225, 182, 105, 101, 195, 184, 108, 143, 134, 67, 15, 103, 155, 224, 151, 145, 9, 51, 20, 59, 96, 187, 49, 142, 144, 231, 178, 227, 49, 61, 129, 108, 46, 69, 46, 45, 201, 183, 42, 201, 70, 222, 240, 43, 145, 44, 210, 93, 125, 89, 92, 32, 102, 4, 61, 251, 121, 174, 147, 131, 194, 13, 210, 7, 156, 86, 178, 36, 5, 108, 227, 74, 253, 143, 214, 134, 210, 235, 69, 207, 234, 166, 249, 84, 67, 165, 10, 57, 147, 198, 205, 102, 209, 97, 25, 153, 71, 225, 15, 25, 80, 151, 81, 57, 108, 215, 51, 222, 215, 201, 235, 6, 75, 127, 163, 220, 138, 238, 196, 229, 37, 119, 182, 182, 152, 239, 95, 71, 200, 71, 242, 118, 67, 3, 106, 21, 153, 250, 240, 110, 211, 22, 234, 198, 145, 156, 253, 45, 191, 203, 64, 177, 71, 167, 214, 165, 104, 82, 154, 95, 49, 65, 93, 137, 208, 102, 85, 54, 1, 38, 72, 166, 57, 91, 129, 111, 105, 75, 173, 214, 190, 248, 18, 110, 128, 140, 194, 128, 8, 138, 74, 107, 212, 138, 35, 53, 85, 144, 236, 12, 134, 221, 57, 201, 204, 54, 215, 79, 49, 193, 205, 240, 45, 24, 166, 76, 2, 171, 150, 49, 55, 19, 115, 29, 61, 94, 48, 171, 1, 141, 116, 159, 187, 196, 245, 142, 134, 74, 232, 186, 213, 49, 128, 171, 145, 239, 55, 247, 80, 243, 197, 208, 187, 24, 167, 122, 91, 88, 190, 176, 149, 95, 7, 71, 0, 113, 200, 141, 127, 89, 122, 187, 193, 246, 137, 102, 20, 94, 67, 164, 5, 241, 112, 126, 129, 8, 71, 85, 9, 88, 167, 187, 239, 127, 38, 73, 204, 123, 141, 197, 97, 18, 79, 33, 140, 70, 71, 242, 13, 1, 219, 6, 13, 143, 208, 228, 213, 54, 217, 146, 0, 233, 202, 108, 149, 208, 95, 4, 237, 105, 0, 113, 47, 7, 189, 245, 76, 36, 13, 225, 5, 134, 220, 169, 124, 181, 8, 230, 184, 43, 4, 83, 224, 189, 158, 121, 197, 5, 224, 189, 243, 183, 239, 65, 15, 153, 111, 147, 70, 60, 49, 152, 34, 203, 112, 221, 43, 170, 164, 63, 179, 12, 142, 210, 254, 112, 110, 191, 217, 252, 27, 175, 21, 224, 62, 36, 78, 217, 10, 141, 26, 203, 130, 242, 245, 6, 51, 48, 232, 149, 2, 65, 249, 86, 70, 6, 153, 0, 95, 215, 6, 190, 99, 49, 225, 113, 82, 49, 212, 95, 32, 202, 163, 50, 16, 36, 66, 138, 231, 13, 235, 192, 179, 60, 122, 66, 20, 16, 230, 105, 151, 82, 215, 146, 114, 152, 69, 211, 90, 25, 199, 120, 11, 179, 88, 168, 46, 145, 3, 148, 88, 126, 192, 33, 247, 172, 115, 192, 15, 161, 26, 202, 203, 44, 160, 249, 181, 156, 141, 192, 135, 149, 162, 166, 197, 12, 46, 112, 129, 247, 169, 80, 162, 76, 65, 218, 89, 168, 71, 135, 203, 109, 240, 141, 64, 251, 151, 61, 206, 252, 61, 220, 8, 56, 80, 148, 73, 85, 31, 89, 182, 13, 254, 229, 116, 138, 136, 242, 209, 15, 246, 211, 238, 42, 143, 198, 20, 58, 171, 195, 45, 75, 190, 37, 8, 49, 153, 229, 83, 109, 19, 255, 167, 70, 29, 223, 235, 104, 125, 145, 97, 155, 206, 192, 79, 41, 137, 230, 170, 59, 242, 184, 38, 179, 35, 56, 33, 133, 54, 252, 42, 82, 190, 45, 120, 231, 148, 219, 115, 62, 220, 196, 76, 21, 16, 153, 108, 39, 202, 55, 147, 151, 238, 22, 89, 103, 175, 156, 244, 37, 36, 253, 3, 19, 3, 80, 185, 25, 11, 128, 144, 76, 26, 45, 33, 102, 28, 133, 125, 36, 180, 139, 220, 49, 202, 21, 59, 190, 135, 22, 82, 229, 162, 206, 50, 220, 114, 24, 218, 25, 22, 19, 5, 109, 20, 30, 10, 186, 227, 0, 5, 136, 0, 182, 58, 229, 217, 119, 148, 3, 253, 39, 177, 205, 162, 8, 75, 182, 8, 235, 170, 71, 77, 90, 5, 103, 131, 55, 145, 198, 44, 100, 60, 63, 252, 168, 222, 132, 84, 31, 190, 40, 103, 32, 206, 138, 7, 252, 208, 48, 126, 179, 128, 10, 139, 227, 127, 50, 121, 68, 154, 77, 22, 136, 0, 44, 81, 93, 181, 135, 251, 234, 233, 196, 142, 107, 124, 52, 218, 200, 13, 206, 73, 215, 181, 36, 138, 49, 7, 88, 253, 140, 189, 56, 124, 87, 96, 183, 101, 232, 108, 118, 177, 115, 89, 37, 155, 45, 106, 223, 208, 100, 27, 235, 176, 141, 223, 162, 143, 249, 17, 237, 49, 138, 209, 10, 57, 238, 48, 124, 148, 239, 199, 57, 155, 12, 37, 124, 38, 117, 66, 125, 215, 9, 142, 153, 20, 133, 200, 129, 84, 207, 63, 85, 191, 66, 251, 132, 92, 231, 24, 171, 131, 177, 201, 29, 75, 149, 115, 111, 134, 243, 220, 203, 81, 6, 214, 127, 125, 20, 4, 113, 246, 19, 76, 83, 38, 217, 135, 130, 180, 74, 82, 167, 124, 224, 247, 250, 108, 1, 155, 188, 180, 142, 13, 129, 194, 233, 248, 240, 59, 185, 231, 49, 191, 42, 237, 46, 219, 133, 8, 162, 100, 222, 197, 232, 234, 204, 90, 126, 54, 81, 164, 29, 160, 214, 49, 73, 166, 37, 50, 202, 168, 70, 27, 236, 132, 191, 88, 114, 10, 75, 181, 191, 238, 104, 158, 138, 40, 36, 212, 53, 53, 140, 159, 42, 123, 73, 82, 64, 64, 76, 114, 75, 42, 168, 164, 206, 205, 207, 52, 225, 107, 6, 144, 203, 134, 52, 237, 91, 235, 250, 176, 95, 166, 111, 101, 59, 139, 100, 75, 113, 255, 165, 43, 34, 116, 66, 4, 129, 223, 201, 135, 96, 141, 197, 159, 129, 9, 163, 44, 115, 18, 69, 62, 111, 255, 27, 56, 74, 228, 191, 218, 234, 221, 91, 226, 154, 48, 64, 35, 131, 32, 172, 119, 27, 153, 24, 100, 151, 37, 35, 182, 200, 47, 247, 189, 40, 83, 127, 178, 177, 126, 110, 242, 55, 250, 83, 186, 58, 183, 44, 169, 72, 85, 94, 88, 100, 224, 80, 110, 174, 39, 59, 93, 211, 211, 232, 229, 54, 213, 17, 135, 100, 77, 221, 239, 88, 84, 53, 254, 105, 255, 16, 187, 163, 33, 77, 105, 179, 123, 60, 57, 44, 211, 243, 169, 228, 93, 59, 127, 4, 113, 238, 36, 132, 170, 61, 36, 18, 47, 233, 137, 34, 22, 220, 24, 225, 31, 127, 253, 233, 4, 143, 23, 90, 251, 45, 226, 20, 203, 251, 25, 101, 205, 29, 141, 34, 222, 153, 68, 250, 45, 148, 43, 244, 55, 87, 169, 20, 235, 129, 142, 158, 75, 190, 109, 131, 196, 13, 180, 238, 28, 243, 46, 228, 5, 198, 32, 27, 249, 81, 46, 82, 254, 104, 32, 167, 59, 73, 56, 15, 117, 141, 246, 117, 192, 161, 97, 167, 33, 94, 84, 73, 8, 252, 55, 164, 181, 164, 90, 189, 204, 109, 26, 88, 182, 158, 219, 134, 62, 222, 2, 56, 66, 96, 57, 90, 72, 203, 176, 53, 148, 202, 212, 187, 85, 123, 47, 158, 74, 133, 231, 189, 210, 167, 208, 196, 130, 152, 111, 240, 78, 232, 135, 252, 109, 17, 202, 75, 141, 78, 84, 241, 101, 99, 133, 241, 238, 118, 197, 250, 72, 187, 98, 185, 82, 6, 9, 124, 181, 17, 93, 208, 186, 84, 181, 176, 182, 62, 59, 159, 211, 92, 75, 183, 167, 56, 131, 22, 94, 251, 129, 195, 19, 23, 87, 6, 7, 29, 189, 156, 108, 184, 96, 99, 22, 32, 140, 156, 116, 17, 115, 186, 43, 113, 165, 151, 92, 110, 252, 210, 57, 114, 13, 186, 76, 200, 239, 123, 223, 125, 100, 171, 144, 107, 131, 221, 23, 18, 149, 123, 242, 94, 174, 234, 70, 212, 97, 232, 55, 141, 160, 195, 210, 53, 233, 34, 252, 190, 94, 215, 247, 211, 227, 175, 134, 162, 64, 249, 83, 98, 193, 142, 207, 152, 90, 187, 105, 60, 193, 50, 194, 11, 140, 127, 150, 209, 155, 168, 245, 211, 251, 177, 8, 223, 79, 23, 18, 214, 120, 34, 55, 62, 246, 253, 0, 125, 226, 249, 128, 164, 224, 177, 97, 62, 224, 148, 161, 162, 179, 30, 92, 106, 230, 139, 243, 238, 69, 229, 196, 124, 136, 190, 227, 11, 187, 6, 193, 113, 167, 228, 95, 113, 18, 162, 234, 219, 225, 228, 96, 186, 16, 31, 106, 246, 86, 184, 37, 77, 41, 82, 249, 5, 10, 181, 59, 25, 163, 101, 13, 175, 50, 168, 158, 14, 84, 140, 94, 59, 151, 2, 148, 171, 188, 12, 40, 209, 215, 82, 170, 219, 118, 234, 115, 41, 185, 213, 250, 126, 1, 3, 72, 102, 75, 98, 77, 80, 15, 161, 23, 195, 194, 75, 144, 175, 148, 239, 148, 222, 78, 167, 4, 196, 243, 18, 232, 170, 59, 103, 160, 157, 5, 180, 133, 128, 235, 108, 236, 130, 33, 162, 8, 20, 215, 48, 55, 65, 7, 201, 185, 148, 249, 61, 174, 103, 157, 42, 193, 12, 106, 181, 103, 139, 193, 137, 251, 185, 109, 163, 212, 13, 218, 148, 232, 128, 186, 15, 159, 17, 191, 42, 238, 31, 115, 241, 129, 181, 0, 75, 142, 49, 209, 27, 122, 201, 73, 113, 214, 57, 3, 209, 24, 136, 196, 33, 201, 128, 70, 188, 75, 15, 0, 64, 230, 191, 200, 50, 233, 26, 202, 219, 201, 251, 149, 234, 170, 253, 49, 153, 18, 108, 112, 89, 59, 116, 213, 76, 215, 205, 199, 32, 130, 74, 133, 255, 243, 96, 176, 45, 67, 251, 50, 173, 73, 46, 69, 174, 104, 231, 142, 207, 5, 82, 233, 253, 51, 13, 104, 28, 133, 67, 240, 112, 226, 50, 60, 89, 251, 127, 239, 201, 59, 18, 165, 116, 173, 241, 236, 56, 86, 105, 215, 41, 119, 163, 92, 161, 152, 41, 53, 251, 166, 250, 149, 91, 59, 45, 64, 83, 72, 197, 98, 219, 109, 118, 10, 83, 108, 32, 254, 54, 178, 209, 142, 242, 206, 23, 15, 141, 77, 92, 157, 109, 179, 89, 29, 71, 198, 17, 101, 72, 67, 213, 186, 77, 245, 194, 205, 131, 69, 64, 60, 35, 232, 95, 248, 248, 250, 255, 185, 197, 9, 42, 230, 57, 117, 172, 244, 8, 51, 109, 174, 152, 21, 206, 185, 254, 63, 144, 126, 201, 195, 153, 79, 85, 148, 64, 147, 196, 22, 131, 209, 176, 206, 188, 111, 124, 125, 250, 41, 111, 35, 193, 75, 200, 109, 225, 190, 251, 119, 176, 83, 18, 117, 252, 202, 126, 220, 11, 119, 238, 198, 218, 240, 249, 156, 192, 13, 131, 101, 145, 216, 215, 106, 108, 225, 216, 131, 35, 199, 106, 91, 177, 140, 91, 108, 187, 139, 193, 66, 29, 209, 78, 91, 55, 3, 165, 234, 142, 107, 235, 114, 37, 228, 125, 164, 234, 41, 141, 141, 50, 183, 13, 247, 188, 215, 47, 84, 125, 155, 48, 225, 169, 25, 148, 164, 212, 110, 70, 188, 4, 31, 176, 242, 12, 91, 187, 127, 130, 154, 34, 183, 228, 101, 127, 103, 252, 246, 110, 71, 35, 184, 198, 116, 190, 222, 254, 9, 247, 102, 250, 144, 232, 40, 171, 234, 178, 202, 97, 16, 179, 130, 79, 192, 96, 152, 63, 210, 99, 105, 152, 238, 199, 208, 11, 117, 34, 142, 34, 16, 25, 157, 106, 106, 58, 4, 189, 13, 166, 96, 223, 151, 216, 198, 151, 19, 104, 180, 6, 231, 191, 34, 102, 244, 5, 62, 43, 39, 98, 80, 195, 127, 228, 94, 63, 215, 26, 32, 218, 23, 40, 157, 218, 191, 176, 182, 158, 179, 105, 85, 239, 102, 49, 68, 204, 222, 34, 165, 239, 94, 28, 249, 157, 155, 140, 55, 142, 92, 232, 40, 158, 170, 84, 133, 8, 239, 83, 159, 92, 185, 198, 23, 105, 64, 192, 73, 132, 13, 235, 117, 0, 242, 15, 212, 247, 8, 105, 39, 152, 137, 176, 80, 164, 223, 133, 153, 86, 46, 144, 201, 69, 146, 4, 255, 183, 36, 104, 180, 254, 18, 76, 211, 3, 201, 154, 50, 134, 24, 233, 243, 30, 49, 3, 45, 100, 88, 226, 125, 175, 45, 43, 217, 81, 157, 151, 158, 191, 86, 191, 122, 48, 232, 224, 154, 181, 30, 192, 99, 32, 186, 190, 168, 44, 234, 75, 127, 219, 135, 146, 253, 53, 160, 13, 144, 181, 113, 74, 200, 189, 46, 54, 125, 14, 140, 203, 81, 132, 13, 211, 176, 201, 249, 247, 84, 118, 60, 199, 197, 3, 240, 21, 17, 68, 60, 212, 146, 168, 36, 204, 96, 44, 96, 28, 190, 234, 83, 82, 166, 179, 175, 56, 46, 210, 45, 178, 7, 192, 165, 214, 193, 156, 195, 163, 195, 73, 88, 136, 36, 154, 58, 0, 208, 248, 77, 168, 195, 3, 168, 103, 146, 219, 42, 215, 175, 38, 183, 89, 44, 237, 20, 223, 247, 129, 209, 234, 133, 113, 148, 208, 208, 55, 19, 199, 0, 31, 192, 99, 112, 208, 190, 1, 98, 227, 234, 163, 135, 88, 165, 162, 66, 165, 48, 49, 122, 65, 31, 142, 61, 218, 127, 252, 78, 43, 235, 57, 178, 160, 11, 57, 221, 60, 231, 54, 55, 168, 142, 228, 162, 142, 56, 40, 127, 114, 39, 167, 164, 157, 251, 221, 17, 99, 49, 231, 212, 147, 48, 37, 164, 201, 104, 106, 33, 5, 160, 249, 7, 105, 121, 53, 43, 45, 23, 108, 61, 244, 199, 2, 88, 105, 154, 104, 22, 30, 239, 224, 97, 183, 251, 148, 191, 155, 104, 155, 36, 116, 75, 58, 219, 100, 234, 4, 200, 147, 184, 169, 41, 151, 47, 205, 119, 113, 180, 247, 140, 106, 211, 157, 93, 23, 184, 229, 251, 157, 126, 53, 245, 27, 208, 182, 205, 248, 86, 91, 175, 221, 125, 214, 124, 75, 226, 26, 76, 228, 182, 24, 46, 78, 51, 30, 53, 214, 134, 130, 163, 189, 61, 226, 222, 254, 255, 156, 233, 18, 254, 44, 109, 209, 38, 208, 56, 232, 88, 222, 73, 115, 247, 186, 92, 243, 139, 74, 86, 221, 236, 216, 120, 109, 247, 24, 225, 5, 1, 117, 128, 79, 20, 59, 95, 152, 186, 222, 18, 219, 215, 87, 252, 46, 244, 10, 55, 152, 204, 6, 28, 159, 83, 26, 173, 151, 176, 69, 178, 55, 248, 11, 195, 16, 18, 248, 222, 17, 113, 9, 82, 41, 13, 43, 187, 23, 167, 65, 143, 148, 119, 139, 113, 119, 192, 104, 11, 113, 73, 174, 214, 136, 87, 16, 224, 142, 136, 238, 144, 89, 66, 112, 112, 228, 230, 192, 169, 143, 95, 233, 192, 170, 140, 139, 186, 5, 238, 66, 172, 182, 246, 196, 232, 203, 141, 169, 230, 49, 222, 124, 91, 78, 97, 197, 30, 87, 149, 124, 254, 12, 32, 11, 76, 131, 215, 55, 6, 110, 178, 150, 23, 2, 197, 41, 18, 43, 30, 106, 77, 254, 174, 8, 253, 95, 91, 94, 210, 247, 49, 190, 66, 237, 144, 9, 235, 14, 167, 151, 29, 106, 205, 234, 191, 183, 167, 9, 20, 5, 247, 243, 103, 181, 66, 181, 45, 168, 104, 92, 19, 48, 18, 87, 57, 125, 128, 200, 25, 121, 182, 176, 71, 220, 155, 82, 127, 213, 192, 26, 198, 168, 29, 82, 138, 152, 213, 96, 21, 56, 130, 216, 92, 147, 215, 214, 73, 248, 237, 131, 102, 157, 51, 25, 115, 164, 42, 57, 96, 3, 232, 111, 127, 215, 92, 33, 23, 91, 193, 226, 209, 72, 165, 220, 43, 57, 0, 196, 12, 89, 18, 27, 26, 218, 204, 132, 69, 113, 194, 205, 175, 24, 123, 15, 139, 61, 174, 221, 139, 237, 100, 43, 154, 139, 58, 248, 54, 74, 232, 93, 192, 71, 23, 111, 183, 72, 213, 147, 29, 94, 235, 112, 165, 106, 58, 98, 58, 118, 16, 36, 195, 156, 203, 116, 139, 193, 104, 238, 134, 71, 58, 147, 251, 69, 133, 126, 112, 110, 140, 30, 104, 63, 27, 93, 60, 178, 4, 140, 18, 225, 66, 138, 131, 217, 249, 186, 197, 248, 21, 93, 108, 89, 154, 134, 13, 217, 11, 8, 181, 105, 212, 115, 50, 0, 193, 127, 240, 208, 11, 138, 187, 52, 192, 114, 170, 196, 247, 17, 58, 72, 48, 224, 109, 92, 73, 27, 58, 64, 30, 163, 169, 152, 97, 79, 56, 164, 58, 119, 206, 136, 173, 26, 197, 179, 102, 177, 52, 22, 6, 99, 219, 172, 210, 194, 23, 66, 174, 204, 237, 212, 252, 200, 63, 170, 253, 220, 39, 177, 214, 157, 250, 174, 107, 181, 203, 92, 227, 221, 50, 98, 239, 157, 149, 128, 77, 137, 45, 58, 119, 92, 176, 120, 8, 228, 84, 136, 81, 164, 195, 45, 226, 244, 37, 34, 221, 226, 66, 204, 71, 186, 161, 112, 113, 121, 17, 112, 209, 36, 244, 62, 9, 238, 140, 208, 50, 39, 223, 160, 241, 232, 89, 66, 221, 20, 130, 11, 53, 245, 67, 35, 60, 161, 167, 19, 81, 62, 46, 14, 77, 129, 215, 57, 44, 233, 177, 43, 42, 253, 126, 176, 118, 88, 174, 5, 209, 106, 7, 110, 10, 96, 106, 20, 227, 163, 31, 197, 146, 136, 96, 197, 136, 55, 246, 224, 67, 90, 72, 58, 138, 82, 17, 13, 145, 121, 11, 23, 1, 193, 218, 7, 220, 34, 154, 207, 192, 16, 171, 19, 155, 205, 158, 11, 112, 94, 156, 187, 99, 198, 50, 210, 7, 2, 28, 36, 93, 15, 5, 151, 235, 198, 186, 65, 30, 125, 174, 31, 59, 150, 27, 240, 180, 124, 47, 210, 231, 19, 82, 114, 163, 10, 114, 19, 37, 79, 20, 76, 161, 32, 177, 235, 113, 199, 227, 51, 121, 75, 47, 47, 215, 203, 92, 182, 211, 124, 102, 49, 164, 244, 4, 85, 197, 201, 82, 105, 241, 68, 97, 76, 17, 201, 139, 32, 21, 14, 58, 238, 57, 97, 104, 90, 139, 126, 29, 14, 25, 2, 209, 62, 186, 87, 85, 219, 39, 181, 25, 18, 79, 119, 164, 58, 131, 187, 91, 169, 194, 63, 236, 46, 36, 207, 249, 107, 222, 88, 87, 3, 171, 243, 103, 244, 192, 10, 221, 117, 60, 224, 157, 71, 51, 84, 34, 155, 178, 36, 39, 243, 164, 70, 247, 127, 41, 213, 110, 124, 41, 233, 48, 140, 84, 217, 243, 249, 177, 43, 165, 94, 242, 145, 149, 223, 77, 198, 204, 54, 17, 123, 200, 142, 73, 136, 69, 114, 142, 210, 124, 230, 58, 228, 251, 112, 171, 86, 46, 219, 208, 220, 22, 85, 159, 188, 84, 40, 110, 255, 40, 122, 225, 239, 183, 57, 223, 111, 133, 208, 206, 135, 52, 250, 232, 108, 203, 211, 191, 48, 253, 13, 101, 90, 149, 166, 145, 92, 111, 238, 162, 226, 239, 184, 97, 166, 114, 203, 216, 228, 161, 143, 136, 132, 129, 20, 37, 230, 174, 174, 153, 100, 239, 58, 81, 86, 150, 202, 57, 72, 218, 225, 226, 121, 69, 199, 225, 18, 115, 7, 104, 221, 93, 181, 202, 230, 128, 126, 198, 143, 224, 230, 229, 186, 38, 226, 56, 255, 98, 14, 215, 199, 156, 147, 122, 40, 23, 18, 72, 29, 163, 242, 255, 247, 112, 236, 86, 209, 90, 208, 228, 53, 172, 225, 20, 93, 112, 101, 61, 93, 79, 6, 111, 172, 166, 126, 113, 81, 206, 6, 163, 43, 224, 36, 61, 189, 229, 202, 124, 236, 243, 249, 144, 238, 133, 121, 42, 154, 144, 242, 46, 186, 4, 253, 244, 248, 171, 5, 140, 177, 159, 111, 234, 95, 77, 214, 172, 186, 157, 105, 242, 157, 77, 254, 220, 78, 72, 36, 169, 10, 117, 207, 8, 122, 51, 153, 242, 174, 150, 221, 113, 226, 51, 22, 59, 251, 105, 97, 200, 10, 206, 241, 58, 42, 107, 165, 49, 116, 145, 199, 12, 184, 51, 236, 72, 1, 184, 200, 185, 8, 90, 198, 68, 14, 15, 181, 29, 234, 220, 49, 89, 197, 142, 179, 169, 66, 131, 201, 4, 157, 40, 22, 102, 248, 161, 80, 120, 98, 65, 232, 205, 193, 201, 97, 250, 254, 28, 195, 143, 229, 152, 4, 251, 55, 91, 184, 47, 246, 115, 252, 36, 138, 15, 231, 177, 26, 59, 138, 87, 156, 200, 217, 189, 139, 54, 228, 112, 132, 186, 180, 31, 22, 234, 54, 156, 189, 77, 153, 193, 239, 254, 206, 246, 68, 237, 206, 129, 100, 197, 158, 121, 80, 213, 165, 233, 157, 185, 1, 133, 13, 253, 197, 221, 98, 73, 144, 117, 150, 157, 72, 31, 134, 251, 65, 0, 46, 121, 121, 93, 187, 137, 39, 212, 97, 133, 79, 255, 165, 96, 166, 63, 105, 148, 89, 147, 218, 4, 97, 98, 219, 205, 132, 235, 215, 227, 131, 249, 118, 31, 160, 106, 16, 141, 219, 135, 38, 18, 37, 23, 246, 165, 211, 99, 160, 106, 156, 251, 138, 182, 212, 59, 151, 223, 202, 30, 135, 159, 4, 106, 88, 38, 228, 139, 69, 137, 206, 19, 166, 104, 94, 13, 240, 109, 254, 247, 1, 7, 48, 91, 230, 130, 24, 117, 207, 117, 247, 65, 28, 149, 63, 248, 88, 6, 12, 254, 165, 227, 64, 232, 220, 80, 15, 160, 53, 217, 100, 22, 143, 159, 56, 122, 199, 43, 12, 7, 26, 180, 129, 27, 187, 116, 211, 249, 11, 95, 235, 132, 183, 210, 61, 167, 253, 251, 146, 39, 218, 107, 85, 131, 17, 82, 154, 33, 70, 255, 230, 231, 128, 178, 96, 154, 52, 41, 255, 172, 82, 188, 163, 46, 115, 21, 53, 108, 84, 52, 37, 202, 62, 120, 254, 186, 248, 87, 47, 73, 69, 134, 74, 68, 39, 91, 42, 188, 8, 18, 49, 224, 193, 51, 52, 23, 22, 19, 175, 79, 55, 101, 75, 1, 206, 50, 167, 106, 179, 111, 217, 107, 182, 26, 119, 79, 217, 161, 32, 211, 34, 207, 122, 235, 196, 57, 23, 183, 145, 131, 20, 3, 237, 60, 202, 136, 57, 145, 241, 229, 233, 37, 0, 14, 140, 184, 220, 95, 138, 43, 241, 16, 49, 148, 146, 185, 3, 104, 232, 94, 45, 160, 128, 183, 25, 45, 85, 69, 138, 183, 79, 194, 143, 122, 152, 90, 70, 75, 176, 33, 178, 201, 58, 107, 37, 55, 192, 78, 167, 174, 64, 248, 57, 36, 22, 230, 80, 17, 141, 120, 43, 31, 115, 162, 6, 78, 142, 169, 229, 59, 118, 119, 75, 193, 135, 35, 169, 155, 81, 94, 85, 201, 36, 192, 175, 190, 110, 194, 213, 179, 244, 208, 234, 30, 192, 252, 182, 207, 157, 5, 154, 123, 34, 54, 204, 163, 162, 46, 222, 1, 116, 193, 49, 103, 225, 72, 17, 203, 74, 104, 127, 206, 144, 4, 23, 238, 125, 127, 165, 81, 162, 130, 18, 246, 73, 105, 103, 53, 101, 127, 1, 23, 235, 128, 94, 198, 39, 216, 6, 71, 20, 177, 148, 188, 118, 24, 131, 12, 1, 162, 116, 95, 255, 175, 119, 6, 234, 31, 151, 194, 31, 252, 75, 210, 183, 44, 14, 50, 208, 11, 243, 197, 21, 170, 191, 4, 220, 241, 191, 190, 49, 40, 17, 191, 53, 226, 1, 197, 157, 218, 112, 109, 192, 66, 71, 143, 207, 223, 248, 219, 204, 4, 155, 83, 95, 176, 215, 30, 248, 17, 49, 228, 247, 16, 168, 77, 52, 221, 129, 194, 172, 176, 129, 26, 133, 152, 142, 160, 78, 208, 137, 61, 148, 73, 165, 212, 219, 63, 202, 165, 48, 218, 240, 183, 31, 133, 233, 247, 170, 233, 190, 9, 151, 153, 45, 8, 243, 100, 101, 195, 215, 72, 173, 232, 140, 125, 197, 158, 200, 79, 156, 7, 146, 116, 103, 227, 13, 18, 82, 38, 90, 207, 159, 201, 17, 165, 151, 230, 56, 181, 25, 235, 202, 18, 90, 29, 214, 13, 18, 79, 143, 79, 146, 122, 235, 184, 199, 58, 55, 22, 233, 86, 203, 198, 21, 16, 133, 236, 8, 203, 72, 149, 31, 186, 62, 99, 67, 59, 142, 136, 112, 221, 92, 68, 185, 237, 232, 35, 32, 177, 152, 239, 72, 26, 64, 245, 255, 252, 126, 88, 9, 180, 83, 112, 117, 8, 102, 16, 229, 27, 113, 34, 248, 179, 47, 228, 111, 169, 208, 119, 33, 217, 180, 116, 121, 232, 6, 147, 82, 122, 140, 162, 248, 0, 137, 188, 139, 54, 149, 70, 115, 167, 166, 56, 127, 3, 244, 217, 173, 6, 65, 30, 80, 23, 49, 245, 80, 249, 128, 83, 202, 43, 55, 214, 23, 6, 173, 59, 180, 223, 165, 132, 112, 92, 208, 16, 197, 249, 55, 174, 198, 203, 66, 100, 234, 10, 248, 249, 17, 246, 251, 158, 162, 13, 195, 191, 87, 108, 162, 161, 158, 16, 40, 31, 128, 162, 47, 225, 5, 134, 254, 157, 216, 101, 171, 14, 37, 19, 55, 94, 7, 115, 243, 200, 18, 32, 139, 120, 45, 229, 104, 53, 108, 21, 93, 46, 130, 95, 128, 4, 242, 116, 97, 186, 15, 244, 196, 33, 84, 123, 233, 198, 34, 9, 121, 201, 159, 59, 156, 204, 108, 44, 130, 46, 186, 3, 215, 108, 100, 64, 34, 135, 120, 208, 23, 225, 84, 17, 146, 58, 35, 180, 38, 192, 62, 193, 213, 191, 208, 211, 28, 145, 127, 179, 182, 129, 239, 214, 106, 134, 21, 205, 23, 209, 129, 231, 97, 8, 233, 250, 149, 210, 26, 56, 236, 52, 138, 189, 9, 128, 10, 243, 232, 139, 29, 198, 239, 147, 31, 157, 74, 208, 190, 57, 138, 119, 56, 116, 51, 41, 73, 1, 30, 217, 213, 68, 185, 36, 203, 166, 224, 50, 19, 104, 125, 117, 123, 220, 66, 252, 249, 123, 149, 245, 117, 96, 127, 121, 73, 120, 78, 74, 1, 77, 115, 150, 178, 28, 233, 189, 83, 140, 94, 254, 144, 151, 238, 0, 38, 135, 52, 246, 8, 249, 153, 43, 142, 145, 14, 12, 112, 107, 161, 175, 154, 145, 250, 173, 36, 73, 42, 227, 219, 144, 138, 186, 213, 226, 51, 108, 139, 122, 67, 164, 60, 59, 57, 206, 188, 49, 94, 31, 12, 111, 202, 226, 227, 108, 211, 255, 167, 119, 190, 172, 18, 255, 203, 174, 153, 132, 226, 69, 155, 157, 132, 139, 163, 172, 88, 49, 124, 219, 147, 90, 12, 244, 2, 117, 95, 194, 178, 195, 147, 249, 35, 79, 190, 239, 46, 50, 2, 237, 77, 254, 227, 96, 183, 127, 136, 61, 236, 136, 4, 241, 191, 60, 228, 172, 128, 177, 16, 198, 32, 151, 165, 48, 91, 156, 18, 89, 58, 145, 56, 158, 133, 174, 114, 50, 102, 139, 35, 96, 142, 115, 123, 159, 234, 159, 100, 120, 92, 18, 224, 92, 91, 164, 103, 69, 48, 103, 207, 197, 76, 245, 42, 130, 21, 253, 185, 110, 63, 32, 130, 1, 239, 221, 233, 228, 98, 135, 199, 230, 26, 7, 168, 71, 148, 71, 79, 228, 103, 86, 174, 195, 106, 22, 253, 124, 242, 39, 197, 201, 107, 153, 238, 197, 216, 20, 169, 21, 83, 43, 213, 140, 241, 167, 242, 107, 106, 157, 17, 102, 114, 249, 234, 42, 215, 221, 25, 27, 49, 120, 230, 203, 255, 232, 44, 226, 225, 63, 215, 196, 214, 221, 213, 18, 191, 159, 203, 244, 80, 53, 107, 165, 45, 155, 2, 152, 114, 24, 153, 237, 171, 217, 226, 7, 254, 235, 69, 204, 67, 116, 6, 114, 95, 151, 153, 97, 60, 136, 104, 135, 166, 196, 235, 184, 201, 40, 177, 255, 36, 68, 65, 238, 5, 114, 189, 118, 122, 21, 144, 156, 151, 97, 27, 10, 120, 151, 144, 58, 162, 69, 57, 141, 135, 168, 56, 3, 245, 48, 135, 103, 233, 27, 155, 105, 131, 65, 17, 132, 193, 23, 199, 64, 12, 226, 41, 37, 7, 66, 94, 114, 88, 160, 73, 163, 106, 235, 15, 20, 50, 41, 254, 29, 207, 85, 231, 194, 242, 128, 5, 219, 82, 169, 108, 81, 72, 254, 92, 169, 45, 179, 77, 78, 241, 69, 224, 255, 55, 8, 123, 61, 224, 176, 155, 39, 169, 115, 145, 5, 212, 255, 25, 198, 35, 48, 51, 205, 33, 29, 173, 101, 151, 89, 177, 15, 87, 93, 113, 58, 216, 49, 201, 4, 182, 152, 236, 71, 162, 178, 49, 104, 110, 47, 81, 20, 68, 105, 138, 175, 109, 25, 116, 114, 180, 20, 193, 223, 204, 254, 194, 1, 223, 137, 90, 250, 9, 227, 139, 18, 206, 113, 236, 121, 165, 38, 177, 251, 75, 222, 56, 26, 126, 169, 25, 229, 21, 173, 254, 231, 226, 90, 156, 19, 136, 199, 92, 123, 96, 222, 131, 187, 92, 157, 198, 225, 180, 163, 212, 1, 11, 82, 167, 135, 77, 11, 251, 194, 141, 119, 233, 254, 250, 183, 111, 242, 247, 133, 4, 115, 131, 183, 93, 233, 97, 83, 124, 188, 31, 188, 254, 36, 174, 243, 190, 71, 162, 241, 202, 94, 85, 197, 91, 226, 16, 149, 229, 232, 57, 16, 92, 17, 9, 232, 44, 103, 105, 117, 216, 32, 243, 45, 237, 27, 93, 180, 90, 19, 158, 117, 38, 33, 10, 39, 65, 106, 209, 105, 109, 251, 232, 39, 182, 53, 164, 120, 101, 174, 162, 222, 134, 109, 121, 2, 180, 106, 41, 142, 24, 113, 237, 130, 50, 108, 155, 239, 96, 68, 214, 31, 87, 75, 173, 129, 11, 68, 96, 122, 86, 125, 10, 150, 189, 237, 212, 40, 240, 197, 28, 60, 12, 8, 169, 240, 197, 78, 1, 237, 216, 190, 47, 190, 112, 35, 192, 73, 13, 112, 39, 65, 95, 153, 196, 36, 53, 63, 71, 36, 145, 8, 64, 207, 67, 24, 148, 141, 17, 192, 224, 203, 233, 177, 176, 81, 107, 160, 176, 210, 118, 194, 160, 47, 28, 179, 99, 80, 46, 179, 249, 118, 1, 169, 179, 158, 211, 148, 36, 156, 128, 110, 102, 69, 30, 65, 48, 55, 93, 133, 39, 36, 48, 211, 69, 43, 116, 248, 168, 109, 239, 128, 104, 62, 153, 203, 154, 115, 126, 200, 219, 197, 84, 62, 161, 88, 66, 157, 105, 179, 248, 248, 28, 96, 249, 90, 219, 9, 13, 67, 254, 252, 40, 77, 118, 105, 68, 41, 55, 146, 199, 143, 148, 27, 27, 170, 147, 209, 187, 11, 185, 16, 94, 0, 207, 248, 249, 81, 137, 41, 146, 242, 17, 8, 211, 219, 7, 125, 221, 213, 43, 202, 31, 189, 105, 194, 156, 10, 68, 252, 171, 85, 170, 8, 235, 209, 131, 137, 243, 76, 131, 190, 238, 165, 211, 248, 76, 113, 174, 193, 254, 98, 255, 213, 241, 218, 255, 17, 241, 3, 193, 137, 209, 216, 10, 13, 1, 9, 178, 77, 211, 13, 4, 139, 174, 193, 44, 135, 109, 204, 39, 1, 83, 40, 123, 151, 240, 90, 163, 177, 125, 170, 56, 20, 110, 97, 179, 230, 78, 142, 209, 64, 244, 142, 30, 5, 67, 213, 63, 156, 44, 117, 254, 148, 247, 219, 215, 5, 143, 187, 132, 45, 5, 183, 228, 63, 121, 206, 4, 121, 143, 194, 236, 79, 160, 212, 132, 86, 216, 74, 127, 223, 9, 31, 101, 11, 175, 69, 179, 243, 155, 120, 235, 229, 103, 53, 56, 57, 38, 87, 110, 32, 127, 132, 24, 222, 91, 173, 166, 182, 218, 72, 62, 66, 13, 86, 213, 103, 71, 4, 150, 75, 93, 24, 148, 239, 243, 20, 179, 237, 39, 165, 174, 70, 27, 78, 234, 252, 188, 139, 58, 236, 142, 48, 105, 169, 217, 229, 18, 128, 90, 45, 16, 161, 88, 98, 221, 252, 123, 223, 28, 104, 134, 197, 36, 200, 97, 176, 145, 2, 8, 176, 224, 161, 84, 64, 225, 147, 68, 32, 8, 254, 93, 38, 190, 109, 233, 8, 52, 25, 227, 99, 7, 159, 78, 179, 95, 195, 205, 106, 249, 236, 8, 210, 11, 156, 174, 41, 195, 116, 72, 67, 80, 35, 125, 112, 10, 232, 4, 142, 96, 117, 184, 230, 138, 177, 17, 203, 126, 14, 226, 76, 229, 16, 10, 242, 58, 249, 82, 141, 181, 21, 73, 88, 122, 208, 176, 197, 204, 193, 190, 249, 10, 13, 86, 108, 239, 202, 205, 71, 7, 249, 150, 144, 236, 102, 61, 38, 236, 185, 147, 61, 63, 210, 185, 147, 147, 166, 67, 162, 197, 224, 153, 17, 158, 77, 242, 107, 27, 96, 19, 2, 13, 150, 164, 203, 252, 44, 61, 248, 172, 233, 245, 97, 244, 57, 118, 112, 128, 236, 53, 72, 37, 173, 170, 168, 43, 67, 20, 143, 102, 65, 146, 52, 155, 30, 240, 93, 216, 115, 192, 247, 154, 40, 237, 123, 141, 50, 21, 216, 25, 3, 59, 124, 36, 2, 120, 195, 4, 42, 135, 221, 133, 237, 86, 147, 192, 53, 162, 231, 25, 49, 150, 118, 18, 177, 147, 207, 28, 47, 52, 221, 200, 144, 51, 126, 235, 160, 162, 48, 114, 149, 17, 75, 206, 235, 222, 123, 144, 6, 201, 202, 146, 69, 201, 38, 86, 65, 3, 109, 16, 152, 146, 28, 192, 209, 22, 77, 189, 209, 98, 157, 25, 87, 37, 174, 140, 206, 10, 175, 142, 40, 160, 203, 167, 113, 201, 185, 87, 212, 154, 192, 164, 2, 199, 1, 12, 230, 20, 248, 110, 67, 127, 2, 61, 143, 2, 214, 211, 148, 54, 14, 30, 50, 58, 138, 129, 199, 13, 224, 135, 64, 214, 123, 80, 112, 101, 129, 28, 75, 36, 227, 254, 209, 183, 170, 163, 238, 125, 50, 170, 98, 129, 155, 121, 151, 95, 62, 121, 64, 237, 40, 135, 176, 75, 57, 4, 229, 15, 151, 114, 252, 232, 239, 86, 65, 0, 10, 244, 63, 128, 126, 88, 9, 160, 45, 32, 168, 201, 169, 207, 40, 214, 87, 252, 167, 48, 132, 150, 130, 239, 56, 51, 52, 129, 212, 35, 88, 41, 36, 30, 139, 255, 163, 95, 233, 46, 104, 181, 234, 212, 232, 93, 47, 122, 152, 79, 88, 168, 246, 117, 134, 235, 18, 117, 128, 171, 82, 135, 80, 114, 144, 235, 168, 228, 50, 65, 146, 79, 122, 142, 252, 90, 190, 63, 25, 225, 128, 144, 207, 253, 141, 77, 21, 85, 225, 51, 126, 30, 170, 155, 53, 39, 58, 252, 126, 89, 68, 204, 140, 182, 211, 109, 230, 2, 93, 151, 98, 225, 248, 41, 245, 2, 144, 79, 111, 166, 99, 242, 132, 232, 24, 128, 128, 97, 167, 193, 206, 93, 200, 211, 142, 189, 49, 194, 185, 70, 68, 202, 226, 137, 85, 212, 42, 26, 198, 180, 84, 22, 234, 41, 116, 76, 81, 170, 44, 82, 178, 245, 3, 229, 152, 179, 91, 100, 121, 15, 41, 243, 11, 84, 220, 92, 137, 111, 68, 127, 193, 210, 247, 27, 147, 77, 125, 196, 198, 101, 163, 168, 148, 61, 31, 98, 177, 72, 5, 225, 107, 174, 8, 168, 147, 111, 14, 89, 148, 12, 82, 198, 216, 184, 157, 25, 111, 208, 37, 229, 115, 19, 109, 41, 98, 17, 222, 237, 98, 182, 252, 246, 105, 3, 63, 223, 174, 241, 205, 57, 233, 16, 237, 50, 150, 238, 199, 81, 25, 29, 67, 113, 52, 76, 241, 34, 138, 204, 198, 164, 219, 63, 34, 134, 18, 203, 38, 50, 244, 209, 31, 208, 198, 154, 218, 207, 166, 230, 80, 212, 155, 225, 206, 252, 97, 230, 117, 53, 59, 56, 50, 59, 156, 160, 187, 241, 221, 204, 175, 201, 122, 250, 55, 208, 209, 63, 49, 64, 40, 251, 89, 36, 125, 143, 213, 68, 80, 237, 225, 173, 49, 103, 27, 157, 227, 182, 161, 110, 153, 82, 13, 7, 141, 114, 71, 184, 91, 15, 84, 27, 32, 173, 123, 61, 222, 79, 13, 67, 21, 105, 95, 106, 67, 182, 18, 216, 110, 15, 34, 205, 200, 115, 129, 65, 161, 209, 44, 80, 82, 53, 152, 205, 53, 162, 181, 57, 175, 174, 11, 94, 41, 36, 78, 140, 235, 216, 239, 218, 255, 255, 219, 92, 152, 101, 137, 9, 186, 12, 123, 90, 169, 63, 220, 7, 224, 72, 56, 188, 61, 114, 190, 84, 209, 14, 191, 203, 164, 58, 177, 59, 253, 230, 240, 51, 188, 49, 65, 68, 168, 33, 91, 178, 185, 91, 207, 241, 218, 212, 150, 223, 0, 117, 166, 27, 78, 197, 133, 42, 212, 3, 14, 131, 121, 229, 80, 105, 162, 211, 228, 171, 47, 178, 113, 148, 193, 116, 245, 128, 129, 116, 135, 253, 200, 99, 123, 126, 129, 240, 82, 197, 11, 12, 252, 193, 132, 39, 160, 147, 154, 229, 30, 223, 188, 234, 106, 133, 141, 185, 217, 246, 109, 228, 32, 244, 92, 31, 243, 94, 75, 220, 215, 97, 177, 76, 130, 2, 116, 4, 46, 101, 137, 21, 88, 53, 46, 35, 240, 179, 159, 94, 115, 8, 235, 244, 16, 211, 135, 108, 210, 11, 54, 35, 230, 89, 30, 227, 172, 246, 121, 194, 32, 117, 134, 178, 148, 204, 233, 69, 234, 205, 94, 109, 117, 234, 163, 178, 58, 248, 125, 190, 199, 61, 123, 206, 119, 139, 182, 56, 249, 242, 228, 19, 161, 225, 232, 147, 165, 85, 239, 106, 24, 62, 224, 116, 35, 76, 31, 52, 32, 152, 79, 193, 125, 249, 192, 65, 215, 29, 66, 253, 193, 245, 5, 4, 183, 2, 159, 63, 45, 130, 83, 101, 37, 172, 173, 124, 255, 11, 37, 102, 165, 61, 164, 145, 16, 173, 23, 234, 129, 211, 246, 103, 235, 137, 251, 4, 112, 89, 26, 212, 127, 173, 211, 145, 68, 207, 215, 81, 75, 5, 70, 82, 22, 20, 88, 75, 93, 202, 60, 127, 107, 3, 160, 68, 140, 69, 116, 191, 3, 38, 215, 153, 66, 111, 249, 22, 52, 204, 53, 128, 132, 192, 130, 74, 9, 218, 99, 133, 116, 63, 101, 14, 214, 91, 184, 49, 109, 14, 189, 192, 60, 101, 231, 120, 105, 228, 142, 212, 151, 96, 140, 129, 108, 78, 81, 48, 123, 126, 117, 233, 231, 205, 155, 254, 3, 227, 9, 193, 226, 99, 195, 174, 141, 113, 67, 35, 171, 138, 222, 216, 155, 71, 245, 179, 3, 241, 133, 50, 65, 44, 23, 244, 107, 6, 211, 53, 227, 78, 38, 112, 127, 4, 93, 203, 219, 64, 14, 218, 21, 201, 190, 107, 219, 202, 76, 240, 137, 206, 11, 105, 11, 223, 142, 164, 78, 223, 16, 24, 60, 141, 119, 8, 183, 107, 211, 68, 129, 178, 114, 109, 244, 199, 167, 103, 60, 118, 121, 130, 169, 62, 12, 95, 67, 88, 83, 241, 124, 99, 57, 172, 54, 207, 156, 138, 62, 194, 98, 23, 242, 111, 36, 162, 33, 80, 156, 246, 41, 78, 178, 233, 25, 142, 132, 254, 152, 224, 116, 214, 136, 178, 64, 87, 190, 16, 201, 56, 21, 129, 177, 75, 84, 42, 168, 200, 246, 153, 56, 92, 102, 22, 129, 11, 246, 34, 157, 112, 155, 93, 4, 119, 172, 31, 227, 43, 140, 158, 166, 144, 142, 9, 177, 78, 165, 223, 179, 141, 5, 167, 178, 107, 217, 139, 121, 11, 24, 187, 123, 195, 53, 216, 14, 162, 249, 200, 229, 224, 20, 27, 205, 134, 76, 184, 189, 134, 145, 46, 107, 29, 151, 172, 49, 23, 94, 162, 99, 225, 146, 44, 99, 213, 217, 68, 55, 25, 165, 74, 117, 179, 82, 55, 14, 44, 84, 227, 66, 36, 100, 238, 99, 139, 39, 114, 113, 190, 7, 140, 232, 216, 194, 252, 166, 104, 1, 225, 207, 162, 54, 85, 166, 143, 23, 239, 235, 106, 92, 59, 136, 66, 55, 182, 242, 131, 60, 238, 66, 2, 157, 221, 122, 243, 146, 160, 37, 123, 230, 147, 248, 237, 55, 50, 245, 92, 137, 193, 122, 199, 4, 136, 162, 6, 165, 180, 96, 213, 99, 27, 182, 22, 122, 147, 255, 221, 75, 225, 12, 78, 171, 249, 124, 76, 81, 179, 235, 143, 93, 191, 207, 27, 5, 254, 157, 216, 129, 254, 78, 21, 227, 29, 17, 17, 194, 103, 113, 148, 82, 247, 215, 2, 90, 81, 62, 51, 239, 142, 103, 138, 128, 240, 181, 154, 172, 48, 19, 243, 94, 131, 126, 149, 227, 148, 249, 100, 84, 151, 208, 91, 237, 5, 47, 118, 61, 13, 68, 134, 173, 242, 13, 172, 159, 34, 15, 248, 233, 222, 40, 200, 5, 87, 70, 198, 144, 15, 159, 14, 170, 243, 186, 238, 251, 247, 21, 216, 62, 98, 117, 39, 12, 146, 233, 69, 213, 134, 168, 182, 198, 118, 89, 224, 221, 25, 237, 75, 97, 255, 55, 126, 82, 251, 175, 214, 127, 68, 171, 6, 206, 64, 191, 222, 48, 125, 168, 182, 35, 105, 92, 106, 95, 116, 212, 62, 13, 160, 220, 143, 161, 59, 16, 110, 126, 39, 137, 250, 1, 75, 234, 114, 158, 171, 191, 105, 171, 47, 9, 172, 164, 48, 232, 137, 99, 144, 166, 86, 71, 120, 127, 220, 13, 85, 5, 17, 68, 124, 21, 246, 218, 239, 190, 106, 11, 200, 198, 102, 181, 36, 112, 52, 211, 170, 74, 8, 204, 65, 193, 238, 21, 73, 34, 72, 10, 81, 146, 136, 229, 153, 17, 116, 152, 131, 244, 125, 242, 83, 233, 122, 177, 217, 47, 180, 30, 47, 95, 33, 124, 212, 113, 38, 72, 74, 183, 152, 195, 185, 150, 223, 223, 41, 97, 236, 118, 7, 85, 214, 76, 221, 48, 213, 80, 59, 128, 188, 84, 182, 8, 235, 89, 123, 85, 120, 133, 49, 228, 198, 91, 111, 215, 246, 60, 86, 181, 113, 228, 205, 194, 240, 152, 214, 3, 43, 217, 167, 210, 238, 173, 218, 219, 196, 180, 138, 4, 190, 52, 221, 247, 77, 254, 78, 35, 168, 51, 88, 185, 216, 83, 101, 255, 99, 45, 130, 191, 87, 6, 225, 222, 168, 7, 161, 139, 253, 96, 22, 202, 206, 44, 140, 226, 31, 89, 81, 27, 136, 23, 24, 85, 209, 70, 170, 163, 123, 168, 29, 195, 154, 89, 191, 158, 89, 114, 121, 149, 69, 171, 16, 148, 167, 9, 67, 40, 80, 245, 121, 187, 138, 241, 228, 14, 46, 251, 225, 122, 213, 169, 59, 193, 9, 59, 202, 227, 199, 41, 235, 80, 252, 93, 168, 155, 33, 26, 203, 12, 152, 106, 58, 60, 142, 38, 179, 91, 189, 112, 175, 237, 231, 87, 232, 205, 40, 141, 116, 2, 95, 20, 208, 160, 101, 137, 5, 68, 1, 139, 124, 103, 48, 166, 215, 54, 76, 69, 252, 206, 100, 24, 45, 23, 86, 220, 38, 169, 29, 48, 44, 51, 177, 205, 251, 12, 133, 166, 121, 104, 232, 61, 238, 201, 138, 125, 10, 205, 181, 140, 124, 233, 137, 20, 232, 7, 185, 82, 240, 84, 155, 81, 213, 102, 73, 89, 60, 26, 127, 229, 76, 35, 158, 148, 193, 163, 65, 227, 17, 99, 46, 15, 201, 20, 117, 148, 73, 158, 117, 145, 135, 163, 72, 42, 237, 223, 36, 22, 97, 96, 192, 116, 56, 53, 251, 202, 240, 27, 48, 81, 85, 178, 84, 16, 98, 125, 51, 248, 177, 164, 165, 144, 43, 121, 192, 109, 97, 65, 52, 158, 217, 223, 87, 200, 253, 198, 207, 63, 108, 8, 202, 216, 198, 85, 23, 122, 115, 168, 137, 254, 111, 219, 83, 23, 11, 50, 14, 40, 237, 88, 170, 1, 89, 19, 118, 166, 202, 232, 35, 187, 218, 166, 204, 104, 137, 221, 105, 229, 184, 40, 247, 100, 234, 217, 196, 1, 33, 69, 211, 249, 247, 151, 129, 184, 126, 249, 246, 99, 115, 203, 205, 122, 206, 179, 113, 127, 254, 37, 190, 24, 6, 57, 210, 156, 127, 227, 13, 222, 148, 193, 70, 13, 155, 103, 2, 212, 108, 253, 58, 133, 2, 134, 155, 32, 156, 56, 244, 164, 39, 13, 172, 157, 254, 112, 119, 105, 153, 158, 54, 210, 65, 22, 71, 7, 163, 198, 212, 214, 178, 248, 177, 195, 213, 91, 83, 98, 109, 48, 155, 67, 91, 87, 24, 43, 243, 27, 219, 54, 198, 99, 85, 2, 64, 253, 81, 30, 251, 127, 49, 98, 157, 57, 169, 176, 169, 240, 97, 84, 207, 62, 215, 74, 152, 169, 136, 45, 114, 44, 132, 101, 215, 12, 146, 54, 139, 58, 191, 54, 212, 151, 23, 156, 181, 212, 228, 169, 156, 146, 127, 180, 109, 242, 237, 148, 124, 174, 2, 142, 160, 202, 138, 105, 140, 230, 4, 72, 18, 157, 11, 27, 20, 172, 107, 222, 103, 212, 18, 131, 25, 182, 177, 180, 129, 77, 30, 214, 44, 197, 91, 139, 87, 195, 22, 60, 188, 18, 33, 202, 184, 213, 114, 188, 68, 46, 127, 5, 236, 119, 157, 58, 104, 81, 75, 236, 1, 242, 56, 32, 159, 43, 62, 216, 37, 252, 58, 238, 131, 178, 242, 125, 122, 119, 245, 69, 121, 184, 31, 112, 194, 125, 140, 0, 59, 95, 248, 97, 115, 153, 247, 62, 95, 178, 255, 122, 20, 222, 211, 228, 175, 200, 67, 231, 156, 176, 154, 50, 41, 42, 68, 130, 221, 166, 75, 235, 109, 121, 252, 149, 61, 125, 105, 88, 123, 142, 133, 249, 215, 185, 174, 208, 151, 77, 174, 254, 161, 151, 71, 138, 133, 251, 150, 138, 148, 164, 61, 117, 161, 133, 65, 164, 231, 73, 191, 183, 171, 202, 16, 46, 239, 214, 11, 250, 216, 196, 2, 85, 36, 82, 20, 118, 161, 253, 233, 211, 32, 178, 106, 132, 229, 43, 231, 47, 158, 5, 120, 112, 48, 113, 200, 39, 137, 221, 98, 21, 232, 154, 87, 151, 129, 26, 189, 58, 28, 54, 231, 94, 49, 155, 87, 5, 124, 245, 39, 226, 88, 33, 164, 241, 187, 52, 237, 13, 203, 160, 235, 66, 69, 93, 123, 34, 43, 214, 137, 94, 178, 53, 73, 130, 196, 56, 30, 212, 179, 170, 10, 87, 235, 42, 104, 114, 55, 95, 66, 82, 143, 181, 114, 37, 174, 171, 95, 161, 17, 158, 145, 18, 75, 102, 154, 223, 110, 131, 9, 0, 242, 81, 158, 193, 47, 94, 182, 189, 146, 144, 231, 43, 129, 218, 55, 174, 115, 47, 139, 236, 228, 185, 172, 60, 126, 41, 196, 253, 192, 162, 134, 49, 232, 69, 11, 221, 230, 196, 235, 111, 241, 84, 232, 247, 125, 97, 66, 124, 181, 179, 32, 247, 204, 174, 235, 49, 8, 170, 6, 93, 192, 84, 180, 210, 223, 218, 41, 159, 230, 232, 179, 192, 27, 34, 108, 18, 253, 163, 95, 156, 165, 97, 82, 81, 53, 22, 222, 190, 122, 3, 154, 212, 50, 43, 181, 246, 15, 229, 22, 102, 123, 114, 119, 140, 8, 208, 112, 215, 139, 208, 114, 108, 14, 180, 73, 104, 57, 48, 222, 179, 69, 154, 243, 201, 202, 58, 94, 4, 82, 170, 254, 112, 225, 32, 15, 187, 178, 197, 150, 74, 184, 217, 109, 154, 42, 78, 234, 53, 52, 136, 243, 141, 82, 206, 135, 189, 36, 90, 127, 93, 185, 173, 74, 69, 15, 1, 246, 48, 55, 71, 153, 81, 207, 133, 124, 112, 131, 72, 168, 209, 10, 142, 220, 92, 11, 11, 14, 48, 118, 230, 82, 242, 255, 24, 165, 183, 158, 100, 35, 24, 20, 178, 175, 71, 69, 208, 102, 30, 151, 245, 201, 211, 10, 201, 231, 111, 47, 3, 162, 8, 168, 203, 22, 63, 29, 72, 253, 85, 134, 31, 175, 100, 119, 80, 65, 209, 77, 66, 161, 215, 178, 14, 141, 222, 80, 228, 150, 27, 230, 13, 136, 39, 234, 253, 7, 135, 235, 69, 140, 107, 159, 102, 159, 26, 80, 83, 235, 222, 134, 133, 244, 156, 220, 69, 88, 82, 143, 65, 160, 61, 128, 161, 181, 35, 3, 1, 209, 177, 146, 32, 94, 173, 218, 23, 135, 241, 192, 225, 121, 81, 90, 181, 250, 22, 45, 209, 57, 185, 46, 158, 187, 83, 210, 228, 104, 254, 55, 51, 211, 213, 224, 119, 92, 229, 231, 175, 143, 157, 67, 127, 43, 33, 250, 56, 176, 131, 181, 143, 133, 210, 233, 167, 66, 241, 236, 203, 213, 113, 35, 173, 149, 253, 208, 89, 143, 139, 17, 220, 52, 73, 124, 78, 39, 185, 21, 227, 41, 123, 36, 52, 130, 150, 149, 33, 222, 248, 173, 103, 24, 116, 86, 121, 148, 8, 111, 5, 136, 48, 136, 95, 247, 75, 55, 208, 8, 82, 22, 166, 148, 47, 55, 176, 143, 41, 1, 165, 1, 100, 228, 115, 22, 194, 184, 246, 28, 35, 125, 27, 10, 141, 218, 249, 83, 237, 41, 185, 15, 4, 35, 74, 232, 145, 73, 166, 179, 30, 63, 192, 78, 59, 37, 141, 121, 217, 128, 178, 236, 201, 213, 84, 25, 147, 83, 60, 219, 154, 35, 121, 119, 201, 205, 173, 27, 103, 33, 83, 77, 204, 191, 222, 175, 143, 214, 174, 96, 155, 51, 146, 15, 174, 67, 223, 146, 206, 140, 136, 125, 10, 238, 65, 206, 182, 28, 37, 43, 133, 152, 25, 186, 40, 150, 128, 225, 230, 21, 168, 255, 51, 235, 65, 3, 51, 57, 54, 140, 4, 188, 100, 139, 47, 12, 197, 3, 154, 47, 139, 176, 54, 229, 140, 157, 223, 189, 184, 4, 137, 55, 244, 82, 63, 211, 92, 187, 245, 29, 47, 241, 45, 40, 163, 17, 47, 209, 123, 140, 2, 220, 234, 187, 87, 42, 46, 173, 134, 97, 226, 179, 139, 115, 72, 209, 45, 204, 228, 125, 74, 214, 185, 179, 221, 15, 159, 37, 124, 195, 246, 12, 87, 231, 128, 110, 115, 224, 144, 235, 214, 167, 93, 91, 101, 133, 79, 220, 159, 252, 172, 192, 66, 63, 90, 40, 189, 170, 163, 181, 67, 37, 194, 245, 135, 95, 222, 226, 14, 2, 100, 195, 213, 28, 190, 253, 37, 216, 243, 18, 198, 191, 91, 7, 236, 184, 75, 29, 119, 105, 196, 60, 169, 90, 226, 24, 97, 181, 120, 117, 156, 74, 251, 249, 207, 128, 93, 196, 7, 43, 39, 146, 193, 89, 88, 76, 251, 34, 33, 210, 222, 99, 204, 211, 163, 164, 147, 124, 239, 12, 87, 157, 82, 140, 90, 112, 222, 104, 70, 148, 172, 8, 24, 228, 72, 127, 15, 250, 8, 221, 151, 108, 40, 19, 175, 143, 94, 115, 209, 206, 178, 221, 73, 88, 99, 200, 105, 197, 87, 194, 191, 21, 94, 40, 235, 144, 11, 14, 200, 195, 234, 108, 125, 211, 137, 155, 53, 180, 216, 99, 182, 237, 203, 159, 54, 214, 130, 191, 19, 52, 190, 200, 254, 133, 220, 249, 78, 129, 203, 116, 9, 108, 23, 233, 202, 4, 21, 87, 165, 138, 175, 212, 249, 99, 66, 151, 124, 193, 98, 142, 22, 215, 1, 121, 165, 187, 118, 192, 94, 87, 153, 54, 148, 154, 74, 202, 219, 62, 203, 140, 28, 34, 211, 152, 164, 36, 164, 46, 17, 9, 145, 54, 244, 115, 198, 169, 228, 21, 7, 35, 176, 222, 168, 104, 245, 31, 44, 204, 33, 45, 45, 208, 215, 69, 186, 26, 129, 131, 119, 39, 248, 235, 170, 211, 84, 135, 127, 167, 99, 13, 52, 56, 17, 206, 204, 63, 11, 255, 195, 43, 154, 142, 84, 185, 97, 117, 134, 99, 98, 192, 6, 83, 139, 240, 231, 193, 232, 31, 143, 107, 120, 219, 127, 204, 208, 103, 185, 108, 196, 94, 83, 110, 179, 166, 96, 52, 184, 202, 34, 130, 116, 234, 207, 2, 234, 169, 182, 140, 27, 226, 254, 92, 139, 241, 37, 8, 175, 146, 58, 187, 172, 58, 125, 191, 121, 105, 216, 237, 16, 72, 115, 139, 49, 168, 208, 110, 85, 165, 183, 140, 149, 214, 251, 224, 143, 54, 183, 81, 184, 202, 249, 210, 161, 157], + [2, 214, 64, 95, 72, 190, 5, 8, 5, 136, 45, 46, 100, 12, 174, 182, 146, 174, 119, 55, 116, 84, 47, 212, 220, 176, 45, 15, 208, 53, 166, 48, 216, 236, 28, 208, 239, 135, 15, 4, 28, 171, 62, 55, 9, 87, 227, 181, 41, 58, 75, 186, 57, 76, 253, 198, 79, 123, 62, 254, 161, 209, 95, 209, 72, 145, 147, 152, 6, 131, 253, 159, 247, 236, 50, 85, 64, 174, 211, 141, 65, 171, 141, 130, 194, 230, 54, 144, 76, 44, 248, 150, 252, 189, 48, 253, 242, 244, 42, 94, 119, 9, 173, 234, 52, 220, 204, 37, 111, 46, 8, 144, 239, 141, 217, 130, 176, 126, 115, 101, 53, 54, 210, 86, 35, 112, 55, 222, 61, 101, 112, 27, 83, 166, 223, 217, 191, 30, 141, 49, 226, 210, 141, 117, 32, 152, 239, 166, 141, 175, 161, 249, 6, 20, 188, 30, 161, 183, 210, 29, 126, 122, 206, 240, 15, 110, 146, 233, 34, 210, 59, 168, 25, 207, 40, 225, 24, 74, 99, 127, 161, 253, 255, 192, 132, 62, 82, 112, 103, 10, 195, 11, 9, 177, 34, 130, 160, 29, 46, 244, 155, 232, 2, 23, 84, 90, 246, 86, 211, 103, 188, 238, 226, 107, 79, 81, 159, 126, 80, 68, 70, 143, 28, 133, 12, 243, 86, 4, 2, 123, 19, 71, 109, 70, 253, 73, 19, 194, 197, 96, 222, 7, 80, 68, 239, 106, 127, 62, 170, 42, 225, 11, 23, 56, 61, 35, 32, 69, 7, 34, 238, 25, 18, 132, 185, 131, 128, 167, 88, 52, 160, 177, 90, 101, 67, 84, 13, 46, 122, 9, 50, 72, 106, 144, 208, 243, 59, 182, 105, 237, 13, 221, 195, 158, 13, 199, 139, 126, 3, 192, 170, 6, 107, 175, 61, 66, 143, 213, 115, 29, 125, 6, 216, 54, 61, 160, 157, 63, 217, 94, 96, 28, 226, 238, 211, 231, 119, 123, 44, 211, 152, 205, 229, 32, 215, 145, 246, 30, 196, 204, 27, 90, 22, 246, 150, 223, 214, 65, 59, 240, 6, 195, 142, 233, 252, 20, 213, 127, 123, 245, 182, 11, 182, 62, 125, 86, 143, 128, 166, 68, 254, 32, 144, 4, 227, 20, 121, 149, 3, 217, 111, 246, 222, 10, 115, 203, 35, 115, 99, 79, 230, 103, 160, 134, 42, 11, 12, 247, 56, 53, 191, 80, 5, 86, 93, 35, 85, 195, 146, 104, 247, 8, 222, 194, 189, 97, 119, 169, 163, 111, 103, 47, 99, 107, 113, 149, 31, 23, 123, 222, 173, 241, 150, 153, 253, 223, 195, 20, 33, 19, 138, 206, 133, 164, 59, 185, 122, 57, 101, 172, 9, 219, 192, 3, 212, 65, 50, 22, 101, 142, 26, 42, 103, 159, 121, 159, 161, 206, 94, 167, 24, 58, 22, 31, 108, 179, 224, 119, 19, 42, 116, 15, 32, 113, 173, 141, 180, 122, 214, 119, 143, 176, 85, 33, 3, 109, 180, 227, 245, 48, 2, 92, 21, 62, 219, 137, 226, 69, 67, 80, 47, 170, 183, 167, 248, 78, 99, 96, 143, 64, 66, 30, 15, 195, 142, 91, 126, 216, 28, 88, 253, 141, 83, 142, 100, 158, 103, 167, 14, 98, 153, 133, 8, 241, 58, 17, 2, 16, 228, 222, 235, 128, 124, 92, 155, 75, 214, 212, 78, 185, 123, 34, 84, 33, 54, 95, 84, 224, 141, 137, 46, 213, 94, 41, 78, 67, 117, 132, 86, 90, 97, 208, 110, 167, 25, 17, 161, 100, 110, 65, 159, 197, 240, 86, 221, 67, 6, 33, 7, 58, 27, 252, 43, 150, 204, 145, 61, 246, 157, 150, 101, 115, 6, 105, 168, 166, 87, 84, 6, 213, 111, 57, 196, 98, 164, 174, 115, 254, 51, 200, 162, 41, 243, 185, 237, 112, 142, 181, 192, 178, 252, 108, 48, 47, 157, 203, 5, 68, 39, 205, 4, 192, 130, 177, 201, 131, 14, 25, 46, 194, 56, 207, 168, 154, 21, 165, 205, 53, 76, 53, 43, 112, 105, 209, 244, 103, 231, 64, 49, 215, 75, 6, 24, 236, 53, 227, 52, 116, 173, 247, 240, 142, 41, 1, 6, 212, 251, 16, 158, 31, 187, 54, 178, 56, 52, 207, 101, 227, 58, 203, 4, 129, 91, 116, 144, 208, 253, 110, 36, 155, 75, 111, 151, 21, 235, 122, 99, 206, 79, 195, 195, 172, 170, 121, 202, 180, 219, 246, 28, 87, 34, 0, 57, 219, 118, 62, 252, 79, 83, 189, 203, 42, 88, 95, 198, 182, 197, 179, 24, 176, 79, 245, 235, 94, 131, 20, 56, 132, 95, 6, 183, 39, 13, 25, 9, 37, 8, 127, 95, 41, 176, 16, 128, 174, 57, 49, 219, 203, 62, 171, 223, 214, 246, 2, 13, 173, 108, 70, 9, 217, 216, 53, 196, 98, 24, 94, 36, 180, 127, 157, 89, 248, 6, 51, 202, 182, 188, 205, 101, 89, 95, 230, 238, 16, 66, 244, 20, 129, 42, 120, 71, 38, 156, 243, 249, 166, 95, 254, 226, 184, 16, 198, 25, 53, 88, 132, 217, 229, 149, 186, 7, 97, 31, 62, 168, 250, 131, 239, 22, 84, 95, 69, 132, 48, 224, 123, 88, 63, 140, 98, 43, 252, 183, 19, 6, 244, 123, 116, 36, 160, 52, 52, 230, 40, 53, 250, 224, 38, 84, 1, 106, 193, 78, 56, 22, 27, 150, 190, 211, 109, 160, 242, 190, 252, 234, 37, 14, 236, 40, 133, 222, 255, 251, 67, 172, 77, 194, 150, 221, 5, 224, 134, 247, 59, 167, 140, 45, 12, 168, 203, 162, 64, 55, 224, 208, 251, 53, 159, 95, 3, 239, 46, 201, 143, 54, 215, 190, 197, 32, 21, 10, 81, 57, 57, 42, 164, 45, 6, 105, 107, 119, 100, 187, 163, 231, 122, 4, 178, 221, 0, 56, 185, 158, 144, 161, 71, 50, 211, 175, 187, 65, 46, 34, 10, 109, 110, 193, 193, 19, 77, 26, 82, 32, 64, 149, 195, 247, 32, 119, 183, 77, 57, 96, 239, 119, 234, 241, 218, 13, 172, 244, 199, 165, 144, 162, 39, 102, 27, 21, 235, 58, 196, 217, 127, 19, 193, 234, 59, 161, 79, 22, 160, 220, 156, 107, 76, 68, 60, 215, 143, 216, 221, 224, 78, 66, 5, 18, 43, 22, 159, 128, 191, 135, 125, 84, 218, 81, 36, 157, 105, 140, 148, 34, 209, 250, 92, 84, 181, 190, 50, 208, 56, 193, 23, 130, 216, 223, 121, 51, 240, 14, 88, 239, 198, 72, 95, 231, 188, 97, 114, 26, 69, 232, 244, 48, 17, 140, 164, 224, 4, 171, 6, 191, 108, 34, 206, 191, 79, 194, 105, 194, 50, 113, 159, 225, 42, 171, 35, 5, 84, 66, 125, 163, 116, 121, 97, 220, 59, 118, 57, 244, 117, 28, 10, 32, 92, 45, 203, 53, 35, 131, 7, 236, 101, 160, 117, 120, 244, 99, 205, 231, 203, 249, 103, 134, 44, 107, 236, 210, 27, 192, 223, 59, 0, 137, 145, 145, 200, 76, 151, 91, 20, 242, 116, 187, 94, 87, 153, 172, 57, 15, 154, 230, 157, 23, 229, 125, 179, 8, 24, 25, 62, 155, 166, 8, 166, 71, 56, 148, 91, 8, 251, 55, 100, 30, 99, 166, 90, 199, 49, 37, 182, 70, 6, 150, 28, 0, 178, 155, 34, 220, 19, 216, 251, 239, 47, 31, 15, 51, 253, 94, 217, 183, 47, 83, 130, 193, 80, 73, 126, 234, 215, 68, 13, 38, 203, 118, 176, 184, 156, 96, 141, 72, 46, 90, 253, 206, 41, 217, 221, 72, 24, 5, 100, 136, 254, 43, 233, 180, 92, 234, 76, 78, 81, 181, 191, 121, 158, 143, 103, 88, 16, 64, 81, 130, 194, 22, 195, 55, 199, 177, 132, 231, 218, 252, 182, 14, 37, 94, 254, 27, 47, 60, 145, 182, 120, 135, 58, 214, 87, 99, 189, 119, 87, 108, 40, 160, 242, 220, 93, 38, 195, 92, 245, 7, 27, 185, 207, 67, 13, 222, 72, 33, 95, 219, 105, 1, 73, 250, 43, 104, 109, 162, 85, 77, 223, 230, 192, 54, 157, 110, 200, 77, 47, 72, 115, 177, 9, 251, 139, 248, 252, 4, 203, 22, 96, 27, 32, 186, 192, 22, 73, 222, 16, 166, 164, 69, 77, 106, 44, 3, 248, 188, 36, 115, 251, 177, 226, 91, 238, 177, 120, 143, 83, 122, 44, 170, 220, 208, 237, 81, 203, 49, 44, 29, 66, 29, 242, 140, 69, 67, 22, 49, 56, 117, 42, 79, 29, 92, 166, 184, 151, 115, 181, 99, 26, 59, 108, 218, 124, 165, 185, 55, 67, 84, 245, 171, 185, 149, 245, 88, 29, 171, 215, 197, 251, 211, 114, 193, 193, 81, 197, 74, 71, 184, 74, 52, 227, 6, 35, 68, 27, 70, 110, 35, 249, 57, 133, 150, 84, 16, 10, 242, 10, 178, 223, 126, 56, 194, 66, 231, 235, 202, 139, 60, 125, 151, 76, 130, 32, 136, 202, 80, 119, 151, 67, 187, 228, 17, 199, 78, 138, 188, 226, 83, 39, 209, 171, 41, 189, 134, 34, 57, 165, 253, 117, 122, 7, 122, 152, 185, 57, 211, 99, 111, 220, 150, 208, 115, 202, 226, 59, 153, 147, 72, 185, 205, 145, 35, 7, 44, 127, 234, 124, 176, 149, 203, 204, 121, 43, 104, 217, 182, 231, 118, 247, 158, 2, 202, 192, 103, 1, 89, 172, 9, 28, 169, 19, 154, 95, 110, 240, 58, 119, 137, 160, 250, 24, 22, 51, 146, 6, 91, 225, 16, 58, 130, 3, 255, 139, 180, 113, 99, 90, 218, 229, 39, 240, 175, 160, 98, 71, 170, 18, 241, 118, 117, 254, 163, 50, 32, 226, 71, 181, 38, 160, 97, 89, 86, 140, 105, 138, 143, 168, 25, 184, 194, 95, 135, 55, 212, 54, 201, 38, 122, 235, 47, 125, 247, 176, 77, 85, 99, 253, 188, 218, 225, 92, 21, 104, 178, 126, 53, 102, 11, 137, 23, 164, 105, 201, 112, 201, 148, 36, 5, 121, 110, 73, 32, 80, 58, 81, 177, 248, 98, 182, 27, 52, 73, 251, 26, 164, 164, 238, 106, 89, 71, 218, 188, 85, 242, 110, 187, 88, 181, 112, 157, 211, 234, 229, 12, 98, 85, 124, 114, 60, 180, 139, 135, 162, 31, 118, 171, 135, 202, 195, 5, 45, 5, 141, 65, 143, 243, 97, 10, 230, 53, 243, 171, 94, 72, 143, 144, 87, 171, 211, 226, 241, 80, 133, 166, 41, 37, 216, 180, 107, 74, 168, 83, 53, 156, 165, 225, 33, 91, 218, 8, 170, 47, 208, 76, 64, 175, 50, 39, 202, 4, 151, 108, 79, 172, 35, 0, 195, 92, 241, 215, 212, 149, 182, 155, 138, 189, 73, 88, 119, 74, 203, 190, 84, 54, 150, 3, 127, 95, 130, 98, 199, 224, 50, 15, 149, 167, 240, 151, 17, 85, 97, 193, 143, 206, 24, 0, 222, 166, 196, 214, 216, 125, 174, 207, 192, 159, 35, 248, 32, 17, 32, 56, 127, 24, 128, 107, 193, 251, 163, 132, 133, 227, 110, 31, 185, 211, 187, 242, 253, 66, 11, 114, 60, 63, 124, 186, 146, 200, 191, 98, 244, 12, 44, 130, 85, 195, 52, 59, 8, 26, 211, 213, 50, 224, 15, 105, 9, 25, 210, 243, 99, 221, 249, 145, 247, 139, 79, 56, 197, 219, 48, 36, 69, 46, 214, 48, 116, 39, 91, 209, 8, 101, 108, 28, 67, 212, 120, 252, 23, 108, 164, 125, 27, 108, 167, 32, 87, 71, 119, 75, 109, 114, 96, 24, 173, 147, 75, 118, 41, 164, 89, 77, 234, 248, 142, 241, 45, 203, 119, 112, 98, 142, 137, 78, 7, 98, 149, 109, 44, 126, 103, 204, 117, 146, 73, 195, 124, 201, 20, 248, 165, 90, 66, 149, 50, 16, 9, 189, 194, 242, 19, 74, 102, 128, 30, 76, 115, 248, 169, 132, 86, 95, 241, 205, 121, 151, 165, 243, 114, 206, 103, 168, 173, 186, 230, 148, 28, 200, 180, 40, 156, 112, 211, 111, 13, 192, 101, 63, 133, 234, 227, 153, 115, 13, 217, 66, 59, 60, 146, 114, 39, 5, 216, 198, 219, 229, 168, 202, 216, 225, 217, 104, 146, 73, 177, 12, 213, 181, 240, 0, 53, 52, 238, 238, 7, 124, 223, 138, 230, 36, 27, 7, 80, 192, 51, 181, 231, 247, 62, 161, 176, 176, 145, 187, 250, 21, 16, 197, 255, 241, 243, 126, 13, 251, 136, 125, 21, 81, 76, 113, 79, 177, 38, 3, 10, 166, 203, 129, 187, 10, 254, 243, 34, 100, 43, 253, 237, 136, 17, 90, 43, 135, 229, 219, 2, 43, 224, 186, 206, 108, 192, 113, 23, 87, 15, 51, 210, 172, 147, 54, 123, 148, 88, 114, 52, 121, 95, 11, 175, 24, 115, 188, 247, 131, 33, 243, 141, 232, 101, 137, 23, 129, 216, 118, 74, 53, 128, 104, 202, 3, 78, 216, 83, 79, 169, 196, 52, 175, 16, 199, 147, 143, 249, 65, 204, 199, 107, 44, 186, 218, 185, 232, 97, 61, 182, 75, 76, 124, 35, 65, 55, 45, 170, 198, 208, 144, 135, 3, 208, 124, 148, 12, 19, 108, 40, 37, 160, 158, 181, 136, 201, 108, 153, 97, 116, 112, 26, 187, 40, 80, 182, 105, 159, 255, 81, 162, 24, 200, 139, 95, 22, 220, 63, 180, 58, 179, 231, 82, 6, 213, 34, 211, 101, 0, 190, 116, 135, 106, 227, 193, 7, 47, 236, 95, 29, 15, 126, 250, 61, 178, 16, 82, 224, 57, 160, 124, 94, 96, 242, 75, 112, 142, 249, 105, 73, 230, 167, 4, 70, 94, 120, 171, 87, 105, 107, 238, 223, 219, 147, 99, 40, 234, 96, 141, 81, 84, 219, 195, 134, 45, 65, 28, 62, 244, 67, 234, 66, 47, 74, 65, 31, 117, 57, 71, 243, 156, 39, 222, 46, 59, 83, 210, 84, 205, 64, 78, 211, 97, 242, 94, 30, 203, 198, 198, 124, 8, 85, 101, 218, 213, 75, 31, 163, 141, 183, 243, 31, 140, 179, 24, 140, 104, 186, 83, 140, 204, 72, 141, 183, 222, 84, 224, 160, 245, 74, 80, 218, 64, 196, 171, 127, 81, 227, 66, 13, 25, 107, 54, 72, 29, 88, 95, 37, 84, 199, 215, 249, 177, 68, 254, 216, 80, 189, 244, 78, 245, 121, 124, 127, 47, 199, 198, 209, 92, 150, 163, 26, 174, 204, 51, 101, 86, 18, 167, 98, 156, 231, 107, 91, 221, 67, 236, 205, 186, 96, 36, 49, 16, 154, 22, 224, 5, 76, 115, 120, 138, 234, 212, 245, 98, 73, 84, 203, 180, 114, 162, 85, 75, 21, 6, 241, 56, 91, 55, 81, 99, 155, 24, 6, 133, 88, 151, 220, 143, 162, 2, 91, 174, 143, 137, 106, 22, 176, 201, 184, 160, 26, 25, 134, 196, 16, 5, 117, 203, 255, 209, 206, 118, 127, 189, 162, 46, 116, 222, 192, 229, 170, 65, 240, 142, 112, 96, 36, 194, 57, 255, 191, 30, 206, 228, 108, 122, 49, 151, 91, 209, 206, 86, 77, 15, 148, 171, 156, 153, 151, 251, 177, 113, 159, 83, 188, 38, 23, 33, 3, 206, 241, 137, 253, 63, 21, 252, 137, 13, 176, 187, 201, 176, 59, 79, 204, 79, 89, 145, 173, 31, 209, 78, 226, 28, 218, 187, 3, 176, 55, 85, 128, 242, 195, 249, 188, 122, 61, 86, 51, 243, 96, 24, 80, 54, 245, 3, 37, 100, 199, 146, 7, 154, 32, 197, 29, 12, 226, 99, 238, 239, 242, 95, 25, 250, 143, 35, 70, 181, 180, 164, 61, 135, 215, 177, 115, 18, 182, 138, 18, 108, 73, 139, 202, 173, 246, 12, 67, 189, 98, 79, 166, 132, 241, 194, 28, 212, 228, 35, 189, 236, 133, 155, 246, 227, 113, 144, 159, 200, 150, 44, 157, 170, 21, 113, 74, 213, 186, 124, 26, 158, 98, 99, 228, 53, 112, 183, 163, 243, 218, 61, 235, 181, 251, 105, 5, 242, 148, 92, 88, 227, 158, 150, 101, 166, 131, 195, 121, 128, 250, 156, 17, 238, 95, 52, 156, 180, 36, 133, 151, 198, 154, 153, 117, 180, 56, 112, 71, 214, 182, 242, 228, 197, 199, 9, 2, 5, 182, 78, 34, 37, 109, 24, 114, 196, 198, 113, 148, 171, 62, 128, 131, 240, 119, 92, 116, 246, 2, 159, 221, 137, 200, 142, 105, 33, 171, 187, 25, 19, 210, 88, 225, 218, 92, 151, 30, 229, 131, 36, 21, 98, 166, 57, 50, 68, 56, 139, 184, 71, 41, 28, 23, 105, 100, 170, 110, 67, 228, 111, 109, 141, 244, 201, 76, 36, 152, 227, 129, 13, 75, 252, 18, 121, 2, 90, 57, 112, 202, 97, 241, 51, 89, 75, 33, 231, 84, 223, 71, 75, 107, 76, 41, 190, 177, 195, 227, 14, 140, 49, 182, 91, 27, 121, 67, 147, 175, 228, 140, 106, 235, 238, 122, 97, 197, 199, 174, 4, 201, 159, 134, 172, 27, 37, 67, 66, 143, 149, 146, 86, 47, 15, 201, 76, 94, 144, 78, 200, 78, 81, 208, 182, 64, 27, 72, 201, 125, 238, 3, 118, 50, 75, 86, 210, 117, 131, 57, 86, 24, 93, 115, 222, 44, 170, 186, 167, 77, 179, 107, 227, 53, 105, 167, 162, 68, 253, 59, 178, 156, 200, 153, 14, 228, 72, 82, 211, 66, 130, 149, 211, 180, 143, 141, 254, 80, 230, 146, 250, 28, 189, 92, 225, 17, 44, 197, 231, 164, 20, 241, 220, 225, 193, 123, 29, 7, 171, 48, 185, 174, 237, 41, 8, 165, 35, 171, 128, 115, 67, 82, 7, 187, 103, 160, 68, 62, 253, 49, 18, 137, 22, 121, 22, 234, 219, 36, 164, 130, 157, 25, 8, 105, 204, 38, 53, 159, 80, 240, 107, 2, 141, 141, 201, 35, 57, 21, 99, 89, 253, 2, 121, 138, 4, 159, 67, 197, 71, 136, 153, 249, 255, 240, 33, 19, 165, 85, 3, 154, 132, 200, 69, 0, 96, 77, 187, 107, 167, 147, 38, 242, 228, 175, 246, 128, 210, 228, 109, 48, 235, 17, 111, 241, 90, 28, 102, 145, 86, 61, 157, 130, 190, 82, 187, 168, 150, 186, 207, 181, 55, 72, 116, 112, 159, 151, 227, 103, 68, 15, 103, 41, 19, 210, 56, 226, 52, 131, 108, 87, 78, 150, 117, 9, 179, 107, 240, 140, 78, 227, 130, 159, 127, 148, 189, 252, 62, 53, 135, 56, 82, 81, 225, 166, 227, 130, 153, 92, 190, 238, 98, 98, 103, 4, 109, 192, 44, 173, 69, 113, 143, 142, 27, 178, 142, 137, 170, 204, 131, 92, 140, 254, 96, 116, 60, 30, 184, 77, 240, 204, 248, 10, 150, 116, 202, 244, 1, 161, 151, 10, 34, 4, 239, 238, 62, 208, 83, 97, 104, 76, 205, 229, 14, 99, 103, 226, 176, 116, 30, 109, 197, 91, 195, 96, 221, 164, 160, 192, 51, 118, 59, 187, 117, 180, 203, 47, 69, 51, 80, 94, 99, 222, 86, 143, 103, 106, 175, 230, 139, 89, 113, 3, 167, 206, 180, 229, 191, 100, 240, 64, 8, 35, 96, 220, 100, 251, 76, 217, 57, 129, 70, 105, 106, 171, 166, 111, 72, 56, 24, 179, 113, 140, 207, 202, 70, 86, 10, 83, 47, 253, 154, 39, 63, 45, 35, 141, 132, 167, 233, 148, 40, 190, 54, 86, 55, 158, 10, 186, 227, 18, 227, 23, 183, 72, 60, 35, 117, 204, 48, 210, 106, 15, 172, 219, 76, 158, 59, 201, 150, 158, 224, 88, 6, 9, 245, 225, 164, 133, 121, 107, 148, 85, 83, 253, 183, 228, 79, 123, 44, 184, 212, 60, 161, 170, 112, 98, 8, 162, 139, 27, 45, 121, 165, 23, 176, 161, 20, 185, 173, 14, 84, 99, 3, 226, 12, 131, 170, 232, 55, 49, 75, 209, 175, 124, 174, 10, 20, 132, 94, 109, 175, 49, 169, 131, 251, 2, 240, 56, 168, 69, 215, 21, 225, 64, 10, 218, 240, 103, 74, 234, 185, 134, 126, 83, 200, 36, 225, 31, 111, 105, 171, 7, 16, 181, 61, 161, 230, 104, 46, 213, 169, 129, 98, 254, 131, 47, 26, 134, 84, 128, 86, 1, 7, 161, 233, 143, 2, 201, 205, 164, 227, 7, 0, 23, 21, 82, 122, 165, 151, 76, 32, 154, 43, 102, 241, 2, 163, 130, 187, 131, 171, 184, 67, 95, 96, 205, 117, 208, 226, 6, 74, 185, 200, 29, 142, 170, 24, 57, 52, 198, 214, 221, 161, 29, 163, 210, 160, 146, 90, 19, 171, 109, 98, 154, 221, 77, 16, 149, 142, 39, 241, 105, 16, 141, 142, 193, 224, 163, 162, 9, 37, 139, 202, 215, 111, 224, 218, 213, 46, 14, 121, 43, 3, 188, 84, 201, 0, 195, 2, 25, 160, 132, 194, 181, 28, 176, 185, 161, 17, 123, 137, 243, 237, 154, 165, 189, 111, 72, 107, 69, 161, 94, 225, 63, 117, 125, 77, 105, 207, 121, 99, 126, 119, 85, 183, 192, 146, 7, 14, 185, 39, 171, 157, 10, 131, 220, 46, 75, 9, 208, 145, 119, 242, 29, 94, 25, 214, 25, 128, 102, 53, 188, 52, 170, 133, 29, 112, 142, 180, 186, 226, 157, 13, 186, 19, 126, 229, 66, 78, 1, 47, 229, 207, 6, 142, 229, 59, 51, 105, 165, 34, 162, 198, 29, 151, 233, 98, 162, 197, 229, 122, 173, 130, 32, 92, 135, 237, 101, 155, 66, 77, 72, 77, 88, 186, 170, 20, 206, 35, 172, 82, 223, 196, 233, 239, 233, 2, 195, 203, 113, 41, 134, 192, 89, 49, 255, 49, 241, 71, 229, 14, 80, 27, 148, 223, 86, 130, 39, 129, 15, 76, 171, 68, 58, 79, 151, 1, 38, 131, 97, 90, 1, 3, 211, 125, 86, 37, 13, 51, 250, 129, 85, 138, 136, 8, 253, 49, 17, 216, 22, 173, 88, 230, 91, 147, 159, 118, 141, 132, 145, 66, 216, 203, 10, 26, 68, 121, 183, 113, 64, 58, 148, 85, 53, 168, 146, 133, 5, 29, 20, 103, 19, 156, 43, 69, 16, 32, 165, 226, 95, 247, 236, 34, 95, 13, 181, 66, 166, 57, 181, 174, 1, 104, 162, 212, 127, 44, 242, 170, 235, 248, 38, 164, 59, 143, 23, 177, 17, 6, 235, 72, 13, 160, 51, 72, 255, 146, 39, 158, 177, 108, 150, 57, 28, 193, 15, 170, 152, 243, 3, 242, 54, 100, 206, 111, 0, 84, 158, 2, 119, 245, 196, 92, 25, 114, 170, 20, 201, 56, 238, 196, 2, 103, 181, 251, 128, 199, 255, 206, 97, 216, 158, 66, 106, 163, 103, 202, 21, 56, 63, 193, 253, 28, 4, 134, 88, 152, 28, 106, 42, 184, 147, 37, 14, 50, 231, 194, 172, 3, 192, 44, 164, 215, 243, 12, 2, 68, 109, 1, 87, 190, 85, 55, 60, 143, 139, 240, 53, 201, 50, 203, 232, 83, 91, 203, 28, 213, 53, 244, 46, 243, 161, 116, 125, 152, 178, 227, 99, 186, 217, 159, 89, 58, 48, 99, 97, 38, 239, 233, 138, 136, 211, 229, 16, 251, 146, 148, 127, 63, 73, 16, 175, 254, 106, 132, 146, 18, 110, 19, 242, 130, 84, 162, 170, 46, 23, 134, 134, 68, 237, 157, 179, 123, 137, 75, 103, 181, 182, 181, 89, 3, 10, 64, 216, 227, 226, 46, 230, 16, 74, 81, 202, 210, 133, 193, 111, 229, 148, 128, 135, 84, 238, 21, 137, 133, 136, 131, 136, 174, 33, 122, 104, 155, 120, 203, 89, 38, 199, 213, 42, 90, 128, 82, 25, 161, 2, 167, 19, 174, 70, 57, 88, 229, 109, 174, 3, 241, 99, 186, 55, 78, 11, 180, 81, 40, 36, 76, 204, 137, 91, 45, 72, 58, 230, 176, 194, 241, 67, 68, 43, 170, 243, 181, 13, 222, 224, 49, 94, 25, 97, 230, 194, 163, 29, 104, 242, 21, 52, 199, 251, 31, 30, 127, 141, 71, 75, 103, 130, 255, 146, 90, 149, 30, 205, 89, 152, 108, 173, 252, 227, 38, 164, 106, 125, 157, 40, 177, 149, 44, 3, 186, 41, 193, 163, 137, 37, 54, 170, 62, 202, 60, 179, 98, 66, 3, 37, 229, 230, 120, 87, 150, 39, 218, 250, 40, 53, 242, 74, 186, 209, 50, 56, 254, 21, 214, 107, 124, 201, 148, 53, 228, 75, 76, 134, 170, 215, 181, 7, 58, 176, 255, 120, 185, 229, 51, 146, 136, 5, 180, 195, 22, 219, 184, 135, 162, 47, 49, 137, 51, 3, 135, 85, 30, 12, 110, 47, 10, 94, 109, 49, 89, 191, 159, 15, 191, 15, 41, 174, 181, 155, 197, 46, 99, 93, 176, 201, 0, 195, 114, 101, 208, 19, 8, 14, 244, 27, 184, 220, 71, 154, 38, 197, 192, 205, 49, 95, 152, 92, 231, 12, 0, 137, 2, 113, 28, 191, 85, 129, 171, 53, 101, 194, 105, 162, 190, 253, 61, 131, 180, 53, 137, 88, 71, 169, 159, 106, 8, 129, 67, 243, 61, 68, 83, 217, 11, 43, 48, 199, 231, 42, 146, 230, 110, 215, 158, 75, 130, 6, 84, 159, 189, 182, 153, 7, 31, 86, 168, 238, 142, 147, 78, 158, 62, 120, 75, 75, 237, 72, 130, 233, 14, 180, 146, 5, 253, 138, 90, 97, 148, 243, 188, 137, 98, 0, 216, 20, 152, 72, 247, 119, 110, 47, 190, 239, 192, 215, 50, 36, 211, 93, 47, 12, 225, 204, 6, 56, 16, 24, 97, 48, 42, 223, 226, 255, 15, 27, 237, 44, 45, 102, 42, 37, 167, 164, 156, 218, 170, 228, 194, 161, 27, 187, 70, 171, 38, 234, 39, 120, 45, 13, 97, 68, 65, 140, 243, 118, 75, 249, 71, 88, 50, 156, 17, 226, 100, 82, 134, 79, 142, 200, 122, 109, 153, 10, 148, 153, 162, 79, 240, 17, 227, 73, 7, 182, 215, 136, 150, 217, 239, 74, 196, 197, 214, 127, 122, 30, 24, 43, 183, 132, 37, 82, 165, 1, 17, 43, 90, 253, 54, 67, 107, 109, 71, 217, 77, 55, 83, 74, 254, 192, 172, 134, 15, 51, 211, 99, 174, 157, 152, 75, 42, 10, 189, 251, 105, 67, 34, 128, 240, 29, 198, 131, 121, 200, 139, 189, 78, 110, 132, 47, 198, 173, 22, 43, 83, 158, 96, 239, 146, 110, 160, 116, 15, 114, 177, 71, 84, 52, 29, 22, 237, 54, 145, 138, 177, 241, 182, 225, 228, 167, 86, 42, 57, 69, 249, 228, 201, 108, 21, 162, 1, 210, 194, 103, 202, 60, 146, 27, 243, 172, 160, 84, 133, 209, 179, 56, 176, 254, 174, 107, 201, 81, 179, 250, 115, 93, 32, 168, 119, 70, 179, 31, 224, 107, 47, 239, 185, 206, 75, 141, 215, 69, 52, 0, 5, 63, 107, 172, 75, 222, 3, 143, 47, 184, 33, 104, 84, 206, 94, 85, 16, 21, 22, 0, 215, 195, 2, 225, 130, 156, 206, 246, 1, 106, 247, 8, 93, 41, 186, 23, 5, 202, 198, 88, 136, 178, 21, 245, 213, 136, 37, 201, 172, 217, 4, 109, 175, 127, 220, 110, 113, 222, 190, 75, 177, 193, 235, 68, 85, 39, 85, 90, 149, 124, 118, 81, 215, 1, 225, 10, 153, 90, 82, 232, 50, 24, 109, 235, 217, 8, 112, 101, 149, 39, 87, 65, 196, 109, 237, 60, 233, 102, 222, 172, 178, 38, 134, 102, 74, 44, 209, 133, 67, 53, 72, 153, 183, 106, 3, 42, 188, 76, 147, 28, 99, 253, 86, 72, 101, 98, 98, 116, 172, 56, 247, 13, 94, 213, 249, 113, 73, 1, 32, 37, 222, 174, 52, 20, 128, 97, 117, 132, 19, 63, 233, 63, 96, 101, 141, 108, 222, 71, 176, 21, 30, 26, 68, 178, 80, 229, 190, 159, 179, 130, 137, 193, 62, 152, 167, 15, 70, 206, 74, 167, 114, 160, 246, 112, 242, 38, 240, 89, 39, 101, 95, 140, 113, 83, 5, 177, 126, 215, 175, 127, 59, 63, 38, 181, 101, 246, 60, 203, 43, 133, 208, 170, 232, 25, 184, 86, 91, 245, 90, 115, 133, 9, 178, 92, 249, 34, 155, 177, 232, 2, 237, 25, 5, 234, 127, 121, 189, 0, 193, 176, 166, 216, 223, 246, 210, 122, 195, 152, 28, 78, 149, 84, 251, 44, 125, 27, 225, 219, 236, 160, 86, 188, 158, 230, 147, 247, 49, 32, 43, 221, 6, 186, 92, 63, 142, 39, 214, 23, 146, 80, 106, 3, 144, 165, 184, 94, 87, 69, 62, 254, 40, 253, 242, 250, 216, 235, 104, 194, 115, 168, 84, 22, 224, 50, 35, 9, 221, 90, 115, 218, 184, 193, 109, 89, 16, 254, 211, 199, 202, 116, 133, 132, 242, 245, 223, 171, 106, 210, 3, 82, 11, 98, 246, 1, 63, 118, 253, 85, 252, 191, 10, 81, 174, 112, 124, 72, 45, 152, 254, 217, 37, 160, 38, 216, 75, 126, 212, 104, 218, 6, 82, 253, 166, 18, 130, 22, 92, 137, 198, 42, 27, 152, 229, 106, 184, 212, 119, 68, 10, 127, 10, 220, 144, 243, 162, 178, 31, 27, 174, 36, 206, 237, 171, 99, 217, 121, 58, 178, 211, 167, 157, 181, 48, 68, 168, 152, 196, 39, 79, 49, 235, 210, 122, 92, 125, 134, 37, 232, 29, 0, 193, 255, 169, 30, 116, 145, 170, 121, 228, 242, 200, 237, 164, 48, 240, 158, 221, 165, 252, 51, 251, 132, 59, 105, 157, 143, 219, 221, 183, 93, 113, 56, 5, 246, 176, 215, 162, 216, 115, 87, 185, 137, 17, 133, 238, 99, 129, 233, 179, 14, 9, 235, 142, 177, 9, 114, 128, 217, 135, 97, 1, 224, 171, 56, 71, 116, 146, 224, 63, 240, 65, 138, 196, 172, 223, 145, 96, 224, 4, 141, 116, 24, 225, 216, 12, 28, 135, 32, 229, 11, 92, 177, 137, 208, 33, 43, 106, 247, 131, 30, 22, 97, 202, 193, 113, 53, 40, 197, 220, 0, 238, 212, 0, 92, 191, 183, 45, 240, 209, 203, 242, 59, 204, 99, 131, 227, 96, 246, 28, 141, 254, 234, 89, 146, 185, 25, 254, 69, 121, 227, 145, 4, 125, 13, 202, 66, 150, 192, 194, 43, 202, 191, 126, 79, 181, 223, 174, 178, 182, 191, 78, 193, 97, 56, 41, 31, 84, 53, 233, 42, 5, 125, 16, 41, 247, 196, 47, 241, 239, 184, 8, 82, 129, 164, 38, 57, 223, 1, 171, 100, 148, 90, 76, 91, 128, 14, 122, 214, 163, 231, 192, 194, 136, 53, 137, 187, 13, 243, 165, 166, 86, 93, 195, 139, 53, 161, 202, 216, 27, 120, 41, 104, 147, 234, 35, 103, 111, 170, 23, 69, 236, 97, 176, 169, 176, 196, 83, 213, 11, 127, 51, 128, 20, 31, 46, 33, 240, 152, 62, 140, 199, 97, 115, 160, 49, 144, 147, 44, 214, 56, 198, 131, 14, 187, 238, 32, 27, 108, 23, 49, 202, 27, 163, 142, 250, 195, 151, 55, 15, 204, 138, 62, 29, 147, 237, 126, 222, 131, 202, 117, 240, 94, 208, 109, 61, 128, 156, 204, 245, 127, 138, 192, 112, 239, 43, 68, 217, 96, 161, 173, 198, 254, 36, 32, 217, 55, 126, 74, 243, 37, 185, 71, 152, 205, 83, 180, 207, 55, 140, 171, 173, 95, 173, 234, 199, 181, 220, 99, 108, 90, 72, 127, 199, 184, 172, 76, 93, 235, 56, 71, 8, 83, 83, 217, 135, 115, 82, 54, 182, 200, 106, 216, 152, 80, 130, 202, 44, 112, 155, 195, 194, 87, 12, 25, 18, 108, 35, 74, 24, 22, 120, 120, 10, 38, 202, 139, 159, 229, 247, 112, 12, 55, 46, 85, 187, 179, 207, 57, 225, 40, 140, 208, 101, 143, 211, 176, 101, 65, 84, 247, 81, 147, 45, 40, 81, 202, 196, 136, 62, 101, 183, 35, 72, 200, 56, 41, 241, 125, 146, 83, 193, 217, 189, 234, 193, 12, 195, 248, 149, 99, 201, 120, 23, 169, 81, 180, 61, 241, 158, 247, 249, 1, 135, 92, 183, 82, 118, 66, 248, 110, 203, 56, 123, 188, 219, 99, 21, 250, 110, 19, 83, 178, 115, 182, 191, 117, 66, 66, 200, 202, 246, 67, 138, 27, 145, 174, 1, 133, 24, 185, 70, 105, 7, 53, 240, 124, 160, 147, 236, 201, 221, 140, 110, 148, 87, 143, 80, 80, 6, 59, 177, 46, 97, 93, 198, 62, 120, 114, 37, 76, 162, 16, 230, 10, 158, 224, 183, 198, 109, 12, 49, 179, 213, 97, 144, 107, 24, 108, 109, 141, 146, 147, 223, 219, 222, 221, 57, 57, 223, 29, 229, 177, 12, 251, 2, 102, 6, 54, 180, 134, 50, 61, 55, 216, 211, 247, 157, 193, 57, 35, 171, 250, 182, 172, 121, 41, 3, 86, 199, 209, 133, 130, 53, 174, 81, 103, 189, 221, 212, 242, 249, 230, 6, 40, 131, 246, 69, 141, 101, 168, 221, 138, 97, 172, 22, 140, 213, 18, 135, 240, 208, 156, 134, 251, 254, 104, 25, 123, 9, 92, 119, 201, 66, 121, 138, 18, 199, 151, 92, 151, 31, 75, 34, 8, 202, 192, 198, 174, 224, 197, 105, 243, 14, 255, 62, 109, 65, 19, 166, 159, 50, 153, 16, 1, 172, 139, 68, 132, 166, 254, 4, 34, 83, 46, 197, 145, 104, 144, 206, 147, 92, 100, 153, 140, 116, 87, 170, 35, 98, 79, 97, 213, 83, 220, 238, 228, 180, 148, 105, 177, 104, 214, 176, 206, 4, 128, 255, 59, 191, 5, 221, 88, 21, 118, 247, 227, 130, 158, 103, 41, 52, 116, 92, 235, 138, 145, 112, 21, 40, 225, 204, 34, 61, 99, 227, 86, 162, 177, 132, 143, 60, 12, 34, 50, 113, 76, 250, 176, 57, 105, 249, 203, 89, 138, 136, 95, 139, 140, 121, 1, 145, 44, 4, 240, 161, 126, 20, 222, 136, 104, 133, 63, 103, 142, 185, 217, 146, 132, 182, 134, 29, 167, 152, 218, 88, 24, 124, 206, 46, 11, 137, 208, 42, 2, 8, 155, 226, 1, 255, 245, 112, 132, 74, 90, 59, 107, 205, 72, 226, 196, 126, 88, 11, 66, 204, 147, 166, 197, 150, 218, 226, 99, 74, 132, 235, 51, 137, 233, 231, 218, 18, 179, 16, 74, 240, 133, 153, 58, 154, 54, 70, 244, 172, 207, 175, 202, 152, 63, 70, 72, 49, 102, 169, 70, 12, 234, 255, 66, 78, 227, 10, 20, 144, 18, 213, 115, 114, 100, 221, 111, 173, 51, 245, 212, 201, 106, 228, 146, 2, 246, 239, 16, 196, 249, 146, 28, 134, 32, 163, 231, 102, 241, 141, 156, 108, 232, 15, 204, 151, 86, 250, 29, 113, 254, 23, 173, 16, 200, 115, 219, 64, 139, 120, 201, 3, 89, 159, 34, 210, 197, 246, 13, 83, 67, 198, 217, 204, 21, 104, 233, 213, 255, 232, 226, 197, 96, 160, 162, 134, 162, 111, 107, 206, 128, 135, 44, 146, 61, 28, 208, 131, 135, 3, 95, 95, 106, 117, 30, 204, 64, 92, 163, 228, 150, 72, 104, 185, 125, 111, 96, 177, 221, 35, 7, 244, 71, 213, 83, 1, 200, 109, 15, 153, 172, 12, 164, 162, 175, 115, 240, 158, 132, 103, 154, 57, 169, 219, 237, 184, 16, 41, 193, 85, 244, 143, 230, 188, 98, 24, 83, 138, 255, 47, 185, 82, 90, 192, 90, 128, 10, 229, 52, 144, 32, 73, 63, 142, 109, 179, 15, 31, 113, 19, 218, 123, 214, 182, 246, 10, 92, 130, 67, 226, 183, 44, 252, 151, 230, 41, 44, 55, 252, 230, 44, 53, 180, 17, 125, 81, 157, 90, 11, 43, 241, 78, 64, 232, 44, 159, 114, 147, 254, 43, 90, 177, 189, 179, 32, 87, 226, 153, 126, 30, 204, 155, 166, 162, 34, 111, 58, 188, 239, 186, 231, 67, 82, 5, 180, 11, 78, 43, 155, 97, 52, 24, 76, 144, 129, 213, 238, 208, 32, 41, 253, 120, 122, 205, 232, 129, 228, 178, 177, 12, 248, 117, 121, 13, 228, 247, 129, 140, 4, 112, 33, 76, 178, 207, 196, 141, 194, 36, 44, 20, 176, 98, 43, 190, 132, 162, 181, 239, 10, 198, 198, 80, 201, 132, 10, 241, 130, 31, 135, 14, 121, 231, 205, 173, 116, 45, 6, 80, 57, 155, 221, 32, 172, 119, 84, 227, 53, 118, 183, 63, 166, 51, 218, 72, 135, 14, 223, 207, 156, 7, 181, 25, 242, 65, 9, 251, 174, 253, 245, 15, 252, 159, 36, 32, 209, 164, 15, 225, 202, 26, 125, 12, 218, 90, 139, 57, 233, 123, 111, 94, 254, 96, 195, 249, 102, 57, 169, 80, 123, 74, 255, 28, 26, 157, 76, 30, 200, 75, 80, 171, 46, 29, 84, 124, 117, 160, 5, 250, 115, 139, 178, 7, 129, 60, 150, 189, 95, 121, 52, 250, 124, 183, 172, 84, 148, 208, 160, 71, 75, 90, 143, 247, 162, 73, 70, 35, 5, 66, 159, 240, 81, 224, 40, 99, 86, 209, 233, 95, 146, 54, 223, 113, 18, 92, 198, 193, 67, 197, 75, 140, 117, 224, 214, 247, 232, 171, 179, 81, 1, 208, 76, 43, 97, 69, 178, 185, 145, 180, 26, 249, 37, 4, 19, 218, 127, 25, 144, 233, 86, 77, 41, 69, 254, 88, 194, 76, 99, 28, 29, 1, 103, 29, 174, 83, 222, 96, 101, 206, 224, 209, 83, 9, 214, 102, 183, 126, 97, 199, 53, 34, 144, 228, 53, 54, 68, 59, 212, 115, 233, 204, 238, 40, 95, 158, 151, 208, 168, 232, 235, 162, 80, 177, 140, 179, 35, 195, 250, 83, 5, 91, 29, 254, 203, 104, 169, 156, 19, 59, 133, 101, 236, 125, 90, 5, 31, 3, 64, 74, 108, 100, 50, 27, 37, 26, 45, 242, 250, 16, 76, 19, 7, 177, 206, 7, 239, 80, 254, 106, 100, 29, 17, 218, 175, 247, 237, 158, 249, 215, 250, 56, 34, 200, 240, 107, 144, 29, 237, 27, 1, 245, 18, 175, 160, 217, 158, 190, 6, 192, 201, 118, 69, 23, 114, 149, 180, 158, 122, 140, 77, 87, 42, 221, 32, 220, 205, 236, 149, 141, 124, 115, 142, 125, 163, 204, 219, 7, 224, 40, 189, 14, 7, 197, 46, 148, 28, 128, 18, 59, 197, 130, 226, 15, 65, 31, 56, 52, 200, 3, 13, 74, 55, 23, 158, 56, 82, 186, 125, 185, 134, 47, 110, 142, 132, 0, 153, 205, 161, 85, 2, 242, 53, 200, 218, 38, 88, 70, 244, 221, 149, 181, 108, 45, 67, 151, 8, 98, 87, 215, 89, 63, 172, 29, 45, 157, 23, 46, 65, 231, 75, 96, 83, 22, 60, 64, 38, 148, 182, 213, 69, 183, 196, 103, 205, 91, 62, 146, 78, 166, 84, 142, 78, 113, 61, 42, 152, 106, 34, 69, 57, 40, 83, 198, 177, 180, 230, 248, 162, 151, 105, 125, 51, 81, 59, 11, 254, 250, 69, 250, 102, 2, 250, 110, 60, 242, 99, 123, 87, 136, 35, 238, 207, 100, 156, 182, 1, 113, 8, 172, 146, 98, 218, 236, 208, 230, 86, 213, 90, 110, 148, 91, 95, 140, 58, 53, 144, 207, 15, 30, 63, 109, 77, 211, 65, 79, 210, 223, 29, 112, 92, 41, 252, 2, 210, 20, 39, 136, 148, 206, 50, 79, 159, 40, 176, 56, 244, 239, 209, 112, 123, 88, 70, 178, 161, 167, 123, 112, 252, 246, 83, 174, 87, 253, 239, 20, 162, 57, 38, 168, 17, 5, 154, 250, 249, 55, 166, 255, 14, 237, 99, 97, 182, 182, 32, 158, 19, 170, 243, 222, 132, 24, 169, 45, 193, 189, 39, 229, 185, 83, 8, 243, 160, 146, 201, 68, 179, 37, 119, 98, 5, 88, 97, 250, 198, 192, 174, 230, 1, 211, 238, 182, 207, 28, 170, 194, 6, 232, 73, 208, 154, 176, 221, 99, 24, 27, 182, 124, 201, 230, 52, 189, 63, 65, 195, 145, 205, 137, 54, 111, 96, 56, 142, 84, 223, 172, 130, 77, 26, 214, 110, 22, 69, 222, 140, 141, 189, 10, 251, 185, 57, 96, 37, 197, 182, 197, 203, 206, 171, 227, 205, 145, 173, 25, 33, 85, 148, 183, 186, 101, 108, 154, 48, 66, 5, 5, 100, 248, 153, 22, 130, 167, 83, 183, 142, 0, 231, 183, 83, 13, 119, 23, 78, 224, 237, 192, 25, 57, 0, 10, 161, 231, 139, 219, 170, 44, 36, 74, 218, 55, 68, 24, 209, 176, 222, 22, 185, 39, 5, 187, 147, 172, 13, 167, 34, 215, 152, 182, 143, 125, 49, 21, 1, 141, 236, 163, 135, 15, 173, 79, 146, 234, 150, 241, 54, 118, 151, 233, 134, 98, 141, 124, 223, 244, 224, 66, 204, 215, 221, 149, 175, 103, 92, 245, 172, 33, 231, 230, 34, 54, 50, 255, 64, 34, 129, 242, 79, 207, 206, 181, 83, 245, 118, 172, 235, 107, 81, 17, 129, 215, 249, 21, 24, 185, 166, 196, 213, 249, 112, 56, 18, 169, 173, 87, 180, 54, 47, 159, 19, 187, 90, 81, 253, 190, 138, 56, 151, 76, 61, 186, 107, 73, 187, 126, 159, 20, 117, 75, 73, 30, 250, 90, 55, 0, 27, 94, 118, 116, 37, 91, 8, 35, 210, 37, 204, 246, 220, 197, 160, 125, 109, 127, 45, 203, 139, 154, 210, 52, 238, 118, 195, 53, 43, 56, 152, 55, 20, 63, 116, 230, 148, 48, 219, 113, 40, 16, 22, 72, 55, 36, 107, 220, 173, 128, 180, 73, 68, 246, 38, 162, 59, 16, 80, 181, 80, 75, 11, 100, 48, 128, 10, 80, 149, 39, 56, 103, 80, 254, 215, 153, 222, 32, 161, 165, 150, 132, 125, 39, 66, 205, 165, 36, 149, 48, 11, 80, 13, 118, 114, 69, 215, 237, 234, 222, 107, 170, 132, 72, 70, 222, 54, 75, 91, 96, 57, 75, 63, 22, 173, 119, 211, 250, 193, 107, 138, 33, 18, 67, 158, 116, 101, 37, 125, 167, 179, 196, 89, 45, 31, 100, 171, 61, 17, 67, 242, 180, 141, 32, 251, 105, 212, 236, 118, 103, 48, 89, 159, 153, 65, 194, 3, 220, 11, 110, 234, 151, 181, 187, 133, 64, 37, 125, 218, 234, 15, 88, 42, 100, 211, 16, 77, 86, 26, 3, 69, 189, 69, 64, 30, 151, 51, 26, 160, 162, 172, 59, 254, 164, 235, 73, 88, 224, 163, 63, 238, 248, 19, 14, 204, 99, 255, 31, 136, 99, 87, 227, 8, 128, 96, 154, 124, 77, 211, 204, 252, 193, 191, 146, 105, 202, 12, 172, 70, 196, 192, 103, 246, 195, 231, 127, 252, 11, 88, 153, 174, 146, 196, 109, 238, 18, 244, 33, 121, 195, 247, 5, 3, 79, 247, 99, 230, 7, 246, 243, 118, 242, 228, 214, 34, 177, 144, 200, 112, 191, 36, 215, 57, 29, 59, 131, 195, 103, 67, 150, 132, 174, 235, 156, 106, 73, 252, 91, 19, 150, 6, 226, 221, 204, 162, 178, 112, 108, 44, 47, 237, 219, 119, 187, 6, 255, 233, 249, 94, 218, 53, 160, 215, 111, 135, 39, 246, 223, 78, 124, 37, 138, 155, 211, 129, 160, 161, 165, 134, 97, 88, 81, 214, 64, 184, 160, 79, 207, 155, 236, 8, 73, 255, 188, 182, 55, 155, 95, 130, 61, 159, 178, 103, 189, 251, 13, 82, 27, 130, 40, 141, 238, 157, 224, 92, 138, 114, 93, 214, 70, 141, 178, 108, 0, 50, 98, 66, 43, 148, 146, 104, 26, 19, 68, 2, 87, 131, 166, 180, 120, 42, 11, 120, 94, 220, 33, 248, 216, 111, 83, 41, 1, 148, 130, 234, 229, 194, 48, 197, 176, 54, 212, 201, 178, 242, 94, 180, 65, 235, 71, 129, 117, 224, 90, 63, 1, 87, 28, 255, 142, 204, 231, 120, 223, 38, 45, 13, 87, 123, 9, 235, 20, 2, 134, 143, 112, 76, 121, 102, 183, 213, 117, 54, 42, 243, 248, 122, 236, 62, 96, 13, 163, 1, 188, 219, 66, 21, 151, 249, 122, 204, 163, 139, 138, 247, 144, 234, 204, 136, 59, 170, 115, 13, 197, 112, 184, 141, 131, 255, 205, 148, 231, 73, 166, 6, 249, 242, 110, 4, 224, 187, 113, 129, 52, 214, 176, 197, 245, 9, 142, 222, 161, 159, 102, 86, 182, 67, 138, 106, 249, 100, 72, 159, 183, 59, 170, 137, 148, 192, 106, 21, 35, 131, 197, 60, 96, 79, 33, 224, 45, 121, 72, 151, 121, 181, 32, 70, 56, 217, 44, 19, 235, 194, 140, 8, 14, 43, 130, 37, 45, 131, 133, 136, 175, 64, 130, 218, 237, 132, 133, 2, 14, 225, 150, 72, 236, 202, 149, 235, 90, 148, 102, 76, 169, 39, 154, 68, 177, 44, 236, 9, 79, 202, 216, 91, 2, 82, 12, 57, 67, 114, 182, 235, 240, 90, 136, 230, 83, 132, 224, 106, 113, 54, 167, 248, 170, 185, 170, 148, 238, 142, 135, 15, 62, 76, 235, 112, 55, 88, 58, 27, 62, 185, 99, 99, 101, 188, 84, 200, 52, 236, 204, 135, 132, 122, 55, 53, 206, 195, 54, 188, 129, 223, 55, 149, 81, 29, 168, 178, 8, 140, 248, 110, 211, 119, 89, 225, 130, 91, 201, 39, 220, 153, 36, 126, 25, 100, 172, 231, 114, 224, 110, 60, 63, 23, 154, 27, 250, 151, 87, 122, 97, 222, 146, 149, 175, 91, 157, 143, 77, 93, 237, 218, 48, 113, 17, 8, 162, 194, 110, 93, 176, 172, 228, 162, 0, 126, 64, 214, 184, 114, 153, 13, 174, 91, 44, 164, 113, 217, 14, 170, 49, 253, 81, 52, 86, 224, 252, 106, 15, 117, 43, 64, 89, 57, 230, 173, 173, 231, 148, 87, 122, 82, 225, 102, 245, 51, 224, 227, 49, 74, 139, 99, 64, 32, 160, 155, 165, 60, 207, 52, 155, 60, 110, 151, 2, 193, 217, 89, 216, 245, 255, 250, 63, 127, 64, 28, 72, 100, 221, 201, 114, 21, 96, 231, 202, 86, 128, 164, 157, 47, 34, 132, 237, 102, 25, 151, 5, 157, 85, 249, 20, 118, 56, 1, 177, 219, 235, 30, 165, 190, 83, 156, 84, 84, 144, 215, 109, 244, 177, 167, 123, 140, 217, 190, 176, 75, 96, 69, 73, 78, 132, 139, 129, 111, 56, 104, 204, 122, 102, 134, 91, 247, 4, 116, 70, 56, 74, 202, 162, 238, 237, 66, 64, 49, 158, 207, 127, 3, 92, 4, 217, 213, 249, 8, 156, 253, 114, 28, 144, 76, 192, 202, 86, 24, 136, 199, 179, 81, 81, 53, 102, 46, 198, 138, 87, 55, 162, 163, 131, 52, 246, 4, 79, 236, 62, 225, 80, 105, 172, 230, 241, 241, 52, 249, 32, 107, 30, 94, 65, 118, 95, 244, 106, 158, 166, 65, 21, 236, 141, 248, 199, 81, 238, 205, 175, 136, 166, 74, 19, 70, 252, 168, 178, 67, 245, 77, 104, 97, 10, 191, 65, 79, 52, 6, 5, 48, 22, 78, 33, 231, 69, 15, 160, 119, 252, 251, 214, 234, 43, 164, 199, 29, 47, 10, 35, 200, 60, 93, 160, 255, 121, 191, 68, 187, 194, 13, 200, 93, 218, 248, 117, 32, 72, 207, 193, 79, 217, 20, 19, 14, 157, 161, 134, 39, 168, 46, 208, 89, 9, 52, 83, 9, 73, 8, 100, 80, 75, 152, 173, 7, 215, 190, 239, 133, 160, 128, 84, 112, 163, 221, 213, 7, 178, 235, 192, 113, 225, 12, 147, 14, 40, 110, 245, 155, 74, 122, 229, 164, 141, 202, 50, 150, 60, 9, 20, 64, 228, 186, 99, 63, 25, 68, 100, 91, 240, 21, 207, 22, 59, 77, 58, 97, 151, 110, 86, 21, 113, 46, 217, 176, 202, 213, 164, 247, 137, 146, 240, 27, 233, 191, 124, 42, 12, 168, 79, 158, 153, 194, 121, 50, 55, 15, 139, 208, 167, 182, 9, 63, 60, 10, 254, 145, 169, 198, 112, 30, 184, 82, 146, 251, 52, 173, 22, 1, 0, 55, 255, 167, 42, 225, 204, 7, 31, 164, 183, 9, 238, 0, 72, 138, 155, 132, 55, 99, 106, 134, 154, 1, 246, 25, 181, 174, 241, 184, 67, 24, 189, 94, 43, 2, 3, 63, 10, 126, 188, 108, 220, 62, 124, 107, 140, 181, 82, 19, 51, 51, 56, 137, 49, 163, 149, 100, 69, 52, 195, 197, 22, 227, 104, 201, 59, 103, 199, 8, 33, 83, 231, 58, 215, 96, 72, 252, 246, 176, 10, 32, 29, 121, 243, 107, 31, 126, 27, 44, 123, 100, 149, 25, 215, 3, 64, 228, 51, 236, 202, 77, 140, 99, 193, 38, 2, 123, 121, 157, 79, 80, 94, 222, 116, 4, 61, 225, 55, 119, 174, 115, 80, 179, 249, 193, 210, 52, 250, 90, 80, 58, 185, 172, 115, 73, 96, 31, 226, 164, 246, 171, 159, 89, 32, 70, 26, 121, 45, 11, 255, 14, 205, 191, 52, 16, 67, 66, 176, 10, 118, 155, 136, 165, 98, 26, 17, 100, 108, 54, 4, 209, 113, 43, 190, 150, 12, 4, 171, 151, 163, 17, 16, 216, 59, 4, 197, 70, 150, 171, 121, 216, 233, 212, 166, 217, 86, 232, 186, 160, 16, 228, 168, 226, 104, 9, 69, 176, 27, 25, 143, 3, 29, 135, 174, 60, 65, 159, 168, 130, 87, 10, 82, 44, 172, 158, 187, 145, 220, 192, 91, 158, 100, 62, 50, 135, 26, 229, 145, 80, 47, 3, 5, 244, 74, 113, 12, 0, 5, 43, 143, 77, 223, 57, 63, 190, 112, 0, 97, 133, 201, 213, 9, 214, 108, 148, 154, 0, 229, 119, 208, 252, 107, 55, 227, 179, 207, 221, 222, 80, 127, 183, 186, 93, 246, 116, 164, 60, 169, 192, 70, 41, 34, 31, 47, 208, 113, 29, 232, 80, 12, 56, 100, 198, 80, 19, 178, 188, 75, 6, 1, 10, 173, 156, 202, 149, 240, 222, 166, 224, 10, 145, 110, 127, 111, 135, 153, 162, 2, 35, 113, 2, 96, 221, 34, 117, 107, 164, 161, 178, 193, 235, 118, 144, 208, 224, 133, 87, 38, 218, 19, 175, 88, 189, 18, 176, 15, 26, 43, 4, 195, 71, 9, 196, 62, 160, 234, 115, 179, 8, 165, 154, 17, 9, 212, 115, 138, 245, 80, 244, 108, 46, 164, 66, 148, 180, 38, 220, 79, 216, 217, 211, 130, 28, 108, 195, 233, 95, 252, 20, 225, 16, 25, 87, 64, 241, 165, 71, 151, 172, 131, 45, 57, 65, 157, 60, 121, 24, 191, 185, 221, 161, 129, 108, 6, 57, 172, 94, 4, 62, 7, 10, 239, 159, 163, 180, 195, 76, 155, 66, 229, 169, 184, 122, 208, 69, 2, 190, 122, 51, 15, 220, 21, 219, 26, 232, 197, 188, 135, 234, 146, 52, 187, 172, 218, 131, 247, 76, 165, 11, 67, 242, 34, 221, 203, 235, 236, 195, 85, 3, 10, 146, 145, 140, 194, 185, 43, 196, 220, 176, 69, 201, 7, 244, 245, 51, 240, 146, 180, 5, 223, 137, 48, 201, 176, 21, 161, 118, 187, 228, 13, 29, 241, 182, 174, 163, 18, 72, 204, 235, 161, 206, 223, 184, 42, 161, 172, 134, 158, 63, 98, 65, 193, 71, 56, 149, 157, 17, 201, 43, 95, 130, 127, 51, 223, 189, 17, 185, 77, 180, 75, 202, 253, 223, 222, 62, 213, 0, 61, 30, 153, 74, 113, 157, 175, 177, 209, 246, 79, 43, 200, 179, 129, 161, 31, 157, 24, 29, 119, 125, 136, 66, 215, 38, 7, 170, 224, 38, 211, 93, 233, 15, 242, 167, 235, 134, 195, 71, 131, 93, 88, 19, 164, 58, 238, 44, 111, 169, 112, 92, 114, 110, 90, 24, 184, 187, 135, 41, 183, 22, 184, 152, 72, 199, 62, 12, 173, 237, 20, 134, 232, 127, 176, 203, 33, 166, 114, 240, 55, 62, 102, 225, 193, 14, 122, 121, 125, 231, 139, 2, 56, 238, 86, 124, 170, 27, 164, 132, 125, 201, 217, 102, 43, 85, 154, 205, 101, 182, 39, 66, 150, 42, 174, 111, 145, 198, 138, 174, 113, 124, 188, 75, 121, 231, 37, 195, 106, 186, 169, 107, 176, 202, 48, 133, 61, 48, 29, 149, 246, 200, 94, 34, 243, 233, 164, 15, 51, 126, 119, 11, 187, 107, 22, 49, 150, 134, 190, 26, 117, 105, 214, 228, 71, 155, 100, 86, 133, 194, 162, 25, 87, 18, 194, 32, 152, 201, 237, 222, 105, 127, 17, 163, 89, 60, 93, 76, 99, 147, 141, 148, 112, 53, 209, 110, 231, 247, 178, 28, 5, 80, 170, 218, 165, 253, 179, 230, 38, 94, 21, 127, 194, 224, 130, 105, 71, 111, 130, 108, 160, 80, 23, 76, 208, 174, 99, 30, 245, 61, 0, 63, 92, 11, 103, 253, 80, 74, 188, 196, 54, 179, 251, 173, 22, 4, 129, 164, 67, 162, 80, 79, 40, 108, 221, 245, 59, 29, 145, 86, 137, 220, 248, 30, 249, 220, 201, 211, 245, 133, 184, 180, 70, 239, 113, 111, 150, 235, 101, 14, 24, 54, 70, 79, 109, 143, 114, 63, 15, 173, 10, 85, 228, 110, 56, 16, 228, 110, 79, 116, 214, 93, 159, 159, 78, 56, 39, 211, 152, 152, 237, 138, 237, 2, 199, 23, 233, 25, 27, 123, 80, 212, 239, 59, 12, 214, 85, 12, 238, 227, 121, 61, 252, 26, 158, 174, 177, 21, 100, 145, 95, 121, 156, 246, 32, 237, 134, 56, 226, 121, 220, 100, 194, 125, 133, 194, 228, 227, 148, 13, 173, 160, 0, 79, 94, 255, 205, 124, 11, 10, 116, 109, 98, 110, 174, 99, 231, 28, 205, 53, 70, 43, 59, 4, 29, 214, 231, 251, 62, 169, 113, 110, 21, 158, 33, 98, 211, 205, 193, 215, 83, 184, 157, 232, 27, 18, 160, 167, 4, 15, 106, 75, 120, 114, 163, 48, 170, 251, 57, 28, 111, 232, 123, 156, 233, 19, 122, 167, 51, 35, 227, 83, 226, 93, 65, 46, 221, 75, 96, 115, 152, 129, 79, 19, 131, 233, 52, 3, 250, 0, 210, 139, 3, 240, 224, 249, 137, 195, 115, 12, 119, 240, 215, 129, 92, 116, 60, 255, 200, 43, 75, 0, 95, 225, 107, 84, 211, 127, 157, 178, 232, 63, 66, 164, 108, 86, 181, 105, 153, 44, 147, 123, 132, 21, 221, 91, 150, 0, 8, 129, 71, 81, 144, 143, 125, 218, 116, 79, 125, 11, 162, 30, 136, 15, 204, 110, 36, 202, 228, 106, 138, 113, 2, 223, 251, 12, 22, 224, 195, 94, 92, 65, 107, 45, 113, 4, 230, 17, 219, 15, 237, 201, 119, 120, 29, 43, 0, 53, 219, 92, 71, 78, 34, 38, 217, 128, 110, 167, 248, 181, 211, 171, 115, 228, 130, 112, 191, 51, 70, 25, 71, 191, 4, 109, 126, 66, 81, 51, 78, 149, 30, 237, 188, 67, 241, 116, 72, 4, 62, 143, 143, 134, 206, 152, 39, 168, 105, 88, 136, 162, 5, 145, 170, 62, 97, 108, 130, 63, 108, 202, 188, 101, 106, 82, 72, 78, 182, 0, 150, 121, 44, 112, 84, 122, 193, 15, 27, 50, 140, 17, 51, 86, 224, 19, 180, 189, 101, 16, 14, 204, 203, 24, 81, 136, 16, 49, 198, 29, 103, 136, 69, 175, 171, 251, 35, 175, 167, 54, 117, 80, 118, 59, 111, 183, 134, 70, 58, 44, 20, 227, 146, 237, 184, 75, 62, 15, 151, 115, 156, 193, 68, 166, 148, 199, 25, 43, 245, 230, 161, 100, 82, 71, 207, 133, 39, 229, 105, 188, 142, 131, 221, 76, 25, 204, 30, 115, 203, 125, 209, 4, 74, 11, 43, 47, 196, 102, 67, 128, 22, 40, 160, 48, 211, 35, 224, 124, 127, 140, 77, 5, 78, 16, 21, 116, 34, 55, 178, 247, 157, 84, 6, 238, 220, 125, 12, 79, 95, 5, 51, 159, 169, 36, 85, 142, 174, 249, 214, 51, 197, 126, 76, 150, 57, 246, 89, 20, 168, 126, 0, 20, 76, 159, 109, 67, 147, 107, 28, 50, 193, 202, 6, 119, 18, 78, 192, 202, 96, 3, 141, 99, 227, 226, 224, 7, 146, 193, 100, 66, 182, 223, 100, 136, 184, 123, 73, 190, 253, 0, 120, 123, 60, 182, 119, 11, 142, 226, 14, 139, 81, 78, 50, 133, 111, 199, 186, 142, 34, 65, 116, 245, 246, 166, 255, 238, 177, 82, 118, 0, 93, 63, 154, 97, 80, 57, 132, 189, 64, 109, 223, 99, 14, 236, 111, 11, 182, 232, 95, 78, 249, 150, 179, 161, 36, 82, 201, 81, 169, 85, 244, 93, 228, 148, 248, 99, 47, 134, 29, 103, 148, 141, 162, 209, 28, 12, 224, 92, 99, 225, 52, 72, 31, 149, 33, 34, 67, 79, 11, 69, 92, 28, 113, 1, 49, 84, 214, 61, 134, 132, 219, 243, 168, 129, 188, 96, 216, 195, 184, 204, 18, 4, 37, 188, 32, 138, 174, 48, 185, 135, 104, 180, 237, 223, 91, 86, 60, 58, 30, 17, 27, 191, 40, 144, 139, 177, 89, 136, 237, 212, 141, 211, 135, 202, 133, 97, 31, 129, 212, 121, 162, 10, 92, 114, 76, 9, 80, 218, 6, 81, 159, 93, 41, 8, 118, 43, 247, 210, 76, 85, 183, 99, 232, 192, 137, 216, 145, 94, 189, 2, 65, 45, 247, 86, 93, 231, 192, 75, 159, 30, 80, 235, 126, 74, 165, 74, 25, 126, 254, 113, 149, 241, 175, 41, 196, 195, 153, 3, 161, 63, 45, 161, 112, 26, 77, 27, 104, 176, 175, 135, 45, 23, 254, 253, 83, 123, 253, 80, 84, 67, 221, 157, 238, 66, 248, 39, 158, 36, 11, 234, 72, 202, 32, 228, 129, 21, 162, 7, 169, 180, 253, 31, 215, 197, 22, 6, 19, 26, 155, 65, 0, 224, 189, 100, 70, 37, 225, 214, 179, 40, 30, 42, 240, 146, 165, 243, 119, 172, 172, 57, 240, 18, 24, 148, 132, 212, 155, 134, 222, 15, 209, 198, 64, 9, 93, 180, 91, 236, 120, 42, 155, 65, 118, 136, 86, 223, 181, 43, 157, 47, 63, 127, 195, 212, 11, 242, 239, 191, 94, 225, 244, 118, 181, 34, 249, 159, 17, 196, 233, 157, 53, 144, 183, 141, 72, 71, 124, 134, 206, 178, 153, 42, 54, 244, 142, 175, 48, 244, 225, 88, 138, 98, 215, 55, 168, 211, 179, 105, 144, 9, 148, 27, 55, 146, 49, 169, 12, 201, 105, 255, 30, 129, 136, 94, 42, 142, 205, 118, 217, 177, 183, 165, 114, 102, 173, 50, 227, 234, 38, 28, 169, 44, 68, 59, 85, 220, 26, 99, 192, 239, 21, 213, 49, 96, 127, 184, 189, 5, 210, 207, 87, 98, 36, 21, 210, 78, 43, 173, 235, 198, 236, 224, 29, 18, 21, 248, 118, 179, 218, 11, 51, 75, 245, 28, 127, 45, 167, 189, 199, 238, 26, 57, 143, 238, 199, 205, 168, 184, 243, 7, 252, 168, 14, 72, 14, 13, 141, 123, 213, 6, 38, 83, 151, 54, 188, 10, 186, 146, 13, 159, 211, 236, 133, 72, 60, 187, 152, 239, 24, 225, 134, 237, 91, 71, 30, 171, 19, 37, 121, 195, 55, 134, 61, 50, 50, 11, 198, 122, 154, 62, 186, 159, 213, 18, 69, 72, 138, 153, 110, 22, 111, 83, 209, 50, 30, 4, 121, 110, 149, 164, 189, 125, 190, 121, 168, 190, 134, 225, 52, 43, 185, 145, 174, 207, 59, 164, 102, 156, 96, 61, 229, 171, 182, 26, 33, 25, 195, 255, 52, 108, 82, 174, 6, 148, 35, 246, 213, 149, 243, 11, 69, 209, 144, 183, 223, 28, 248, 1, 144, 81, 97, 129, 89, 211, 157, 213, 28, 112, 28, 111, 87, 133, 133, 183, 213, 208, 233, 15, 8, 201, 1, 156, 118, 248, 64, 25, 83, 164, 160, 101, 40, 187, 50, 105, 117, 30, 166, 156, 227, 249, 17, 223, 180, 135, 65, 232, 229, 254, 60, 31, 225, 169, 66, 247, 33, 141, 15, 48, 110, 214, 6, 56, 246, 153, 240, 223, 62, 41, 101, 107, 174, 224, 115, 35, 32, 28, 180, 50, 40, 117, 229, 149, 104, 230, 196, 64, 149, 185, 62, 34, 173, 145], + [44, 133, 71, 122, 18, 51, 43, 205, 28, 25, 200, 129, 3, 120, 58, 92, 0, 207, 183, 24, 214, 203, 83, 70, 133, 110, 32, 54, 184, 234, 17, 31, 145, 112, 196, 66, 129, 88, 37, 95, 38, 104, 210, 211, 141, 225, 178, 97, 132, 51, 172, 59, 46, 107, 97, 119, 187, 43, 169, 219, 220, 123, 84, 167, 252, 188, 118, 145, 157, 243, 26, 170, 57, 71, 253, 243, 87, 59, 45, 151, 16, 98, 10, 6, 252, 135, 219, 7, 219, 154, 79, 230, 253, 177, 78, 252, 153, 170, 119, 221, 164, 191, 2, 33, 229, 189, 41, 140, 76, 36, 112, 103, 91, 157, 99, 178, 19, 150, 98, 126, 56, 132, 41, 73, 2, 70, 216, 24, 12, 214, 66, 97, 74, 143, 189, 79, 125, 86, 155, 255, 70, 221, 82, 254, 1, 251, 249, 205, 194, 197, 94, 245, 25, 255, 224, 212, 101, 111, 133, 239, 78, 15, 61, 151, 97, 215, 3, 238, 43, 173, 64, 238, 207, 213, 121, 57, 201, 185, 84, 4, 72, 72, 11, 245, 216, 248, 254, 22, 156, 210, 113, 47, 91, 5, 26, 209, 106, 195, 229, 223, 254, 70, 165, 100, 181, 191, 53, 196, 3, 107, 234, 145, 14, 204, 124, 158, 162, 142, 75, 199, 184, 25, 227, 38, 89, 167, 185, 42, 148, 124, 218, 223, 179, 81, 120, 155, 206, 1, 33, 77, 60, 0, 141, 249, 8, 234, 122, 236, 140, 240, 26, 235, 119, 70, 53, 140, 198, 151, 84, 49, 18, 211, 192, 181, 224, 48, 118, 174, 178, 169, 84, 30, 91, 176, 233, 175, 150, 200, 208, 59, 69, 164, 43, 95, 86, 52, 120, 124, 239, 23, 96, 216, 55, 122, 240, 210, 247, 77, 27, 220, 26, 132, 141, 69, 103, 86, 154, 115, 95, 217, 89, 181, 203, 203, 71, 142, 94, 133, 219, 56, 45, 89, 144, 77, 19, 136, 181, 191, 72, 36, 23, 1, 78, 166, 184, 220, 63, 182, 87, 128, 250, 53, 110, 188, 107, 114, 243, 59, 31, 234, 57, 124, 109, 185, 47, 10, 106, 252, 186, 152, 193, 59, 66, 129, 43, 236, 142, 3, 2, 84, 55, 82, 38, 47, 240, 88, 218, 109, 70, 36, 35, 76, 168, 254, 88, 45, 143, 246, 114, 151, 22, 39, 166, 127, 8, 220, 218, 131, 53, 128, 162, 146, 197, 223, 81, 253, 121, 177, 147, 18, 34, 36, 51, 34, 3, 233, 179, 237, 112, 93, 161, 227, 137, 199, 205, 27, 83, 178, 26, 217, 142, 41, 144, 52, 121, 71, 166, 39, 98, 3, 87, 93, 63, 14, 123, 165, 175, 94, 56, 155, 237, 58, 172, 147, 61, 53, 120, 136, 34, 158, 24, 54, 233, 4, 38, 202, 75, 144, 97, 94, 63, 127, 133, 93, 41, 199, 29, 231, 82, 164, 134, 218, 137, 110, 73, 55, 211, 224, 224, 68, 49, 219, 206, 18, 25, 196, 85, 2, 203, 198, 249, 245, 162, 1, 139, 0, 46, 226, 191, 82, 150, 135, 182, 180, 186, 25, 19, 71, 37, 254, 65, 223, 100, 216, 87, 215, 244, 195, 245, 78, 29, 221, 227, 160, 178, 86, 142, 63, 175, 169, 234, 179, 2, 157, 86, 156, 206, 18, 198, 229, 72, 233, 20, 66, 187, 90, 137, 37, 230, 81, 254, 237, 34, 217, 125, 248, 126, 107, 211, 49, 49, 110, 62, 172, 173, 132, 189, 50, 179, 26, 205, 167, 171, 212, 249, 206, 228, 13, 202, 29, 128, 227, 254, 236, 30, 206, 167, 42, 74, 106, 169, 102, 63, 9, 173, 143, 130, 213, 208, 153, 45, 205, 7, 144, 160, 195, 238, 158, 162, 238, 41, 82, 127, 3, 128, 169, 132, 229, 178, 43, 20, 3, 150, 139, 51, 81, 113, 93, 189, 52, 211, 83, 203, 219, 164, 170, 218, 10, 225, 47, 174, 111, 62, 130, 42, 226, 211, 173, 65, 228, 99, 250, 1, 173, 2, 88, 137, 69, 187, 254, 225, 21, 104, 114, 35, 49, 132, 199, 149, 187, 201, 162, 32, 94, 186, 210, 171, 147, 243, 89, 126, 140, 54, 101, 153, 210, 12, 19, 233, 220, 22, 88, 41, 125, 67, 26, 173, 108, 125, 59, 29, 3, 3, 81, 247, 75, 26, 30, 231, 76, 132, 136, 92, 118, 112, 13, 252, 27, 163, 205, 85, 88, 121, 144, 211, 113, 158, 16, 117, 161, 78, 81, 209, 227, 214, 143, 2, 247, 37, 59, 157, 70, 123, 187, 61, 32, 145, 244, 229, 160, 46, 82, 92, 221, 234, 15, 187, 64, 207, 180, 132, 204, 178, 68, 7, 134, 103, 114, 162, 206, 225, 204, 188, 243, 83, 139, 12, 153, 89, 126, 227, 29, 171, 65, 129, 186, 130, 178, 18, 34, 49, 123, 174, 103, 134, 203, 190, 87, 43, 155, 46, 153, 223, 92, 78, 85, 134, 27, 1, 95, 223, 54, 76, 82, 161, 113, 130, 164, 31, 11, 4, 33, 39, 165, 223, 54, 53, 31, 144, 59, 29, 236, 33, 208, 114, 21, 100, 149, 61, 28, 30, 47, 155, 25, 40, 180, 192, 23, 30, 59, 58, 105, 150, 41, 154, 28, 110, 236, 78, 190, 70, 238, 219, 159, 113, 203, 123, 253, 65, 240, 149, 77, 221, 202, 52, 91, 225, 149, 187, 75, 51, 118, 57, 127, 161, 153, 231, 29, 144, 26, 102, 117, 88, 189, 35, 96, 58, 238, 10, 87, 168, 93, 110, 183, 61, 30, 40, 75, 231, 170, 181, 107, 178, 7, 124, 173, 124, 31, 232, 4, 181, 86, 168, 26, 187, 153, 186, 21, 189, 186, 194, 129, 173, 163, 122, 83, 211, 52, 157, 8, 98, 104, 88, 123, 43, 88, 210, 220, 28, 22, 89, 132, 245, 207, 15, 255, 33, 192, 67, 179, 45, 130, 47, 196, 173, 186, 248, 231, 176, 150, 213, 116, 197, 114, 197, 71, 187, 54, 114, 97, 36, 120, 75, 110, 91, 142, 78, 5, 158, 151, 19, 85, 38, 171, 123, 134, 224, 214, 213, 207, 202, 194, 113, 58, 235, 209, 82, 26, 61, 185, 34, 230, 135, 78, 151, 232, 203, 197, 43, 57, 237, 137, 214, 235, 223, 200, 18, 0, 156, 213, 72, 91, 72, 201, 32, 218, 188, 192, 239, 37, 214, 13, 213, 53, 188, 93, 5, 254, 174, 87, 141, 203, 37, 2, 29, 30, 3, 30, 229, 192, 146, 2, 54, 206, 179, 169, 252, 168, 98, 14, 28, 198, 160, 153, 249, 132, 144, 231, 179, 85, 56, 223, 231, 198, 193, 247, 160, 31, 236, 17, 212, 130, 25, 5, 17, 107, 13, 216, 186, 239, 162, 102, 76, 82, 60, 96, 203, 231, 179, 19, 245, 172, 29, 118, 130, 164, 124, 30, 242, 191, 224, 141, 161, 36, 55, 176, 133, 54, 154, 183, 107, 61, 119, 137, 253, 120, 152, 84, 162, 33, 245, 247, 126, 53, 23, 125, 105, 157, 224, 187, 55, 234, 52, 129, 88, 55, 174, 214, 159, 154, 203, 245, 21, 216, 225, 25, 215, 20, 210, 113, 251, 158, 0, 153, 3, 234, 183, 228, 220, 8, 101, 179, 14, 38, 169, 19, 155, 96, 15, 218, 217, 140, 99, 154, 237, 52, 135, 38, 50, 108, 228, 138, 93, 60, 179, 116, 143, 69, 142, 151, 64, 26, 140, 132, 36, 146, 217, 243, 226, 1, 129, 146, 96, 139, 179, 182, 95, 51, 14, 31, 0, 187, 80, 163, 98, 245, 30, 130, 6, 163, 56, 128, 231, 237, 184, 159, 188, 218, 250, 101, 204, 87, 236, 81, 24, 83, 74, 4, 44, 174, 191, 6, 47, 131, 111, 33, 179, 222, 106, 114, 181, 106, 234, 182, 155, 146, 227, 200, 85, 205, 116, 194, 92, 46, 188, 215, 189, 76, 164, 177, 220, 239, 107, 169, 147, 48, 246, 36, 248, 250, 8, 168, 119, 111, 34, 187, 183, 164, 51, 125, 243, 60, 91, 162, 182, 220, 36, 136, 147, 101, 167, 161, 232, 119, 255, 121, 219, 134, 37, 123, 246, 255, 186, 174, 120, 114, 25, 231, 39, 73, 171, 73, 202, 5, 116, 69, 49, 66, 142, 162, 211, 246, 213, 100, 61, 72, 203, 33, 74, 182, 128, 114, 105, 221, 249, 198, 243, 175, 176, 189, 154, 252, 24, 121, 36, 227, 55, 181, 126, 9, 202, 249, 216, 109, 60, 214, 161, 222, 145, 42, 7, 31, 177, 245, 76, 218, 194, 126, 78, 139, 6, 247, 44, 36, 52, 142, 160, 163, 190, 110, 34, 27, 176, 160, 224, 191, 137, 48, 40, 89, 73, 10, 2, 47, 248, 67, 184, 196, 18, 79, 150, 131, 15, 96, 114, 199, 234, 146, 50, 142, 220, 134, 67, 87, 60, 180, 37, 121, 255, 161, 4, 144, 32, 131, 226, 2, 31, 94, 23, 130, 85, 82, 172, 35, 148, 172, 1, 140, 227, 131, 181, 185, 252, 220, 228, 103, 47, 185, 228, 104, 27, 30, 56, 166, 142, 73, 251, 100, 20, 162, 186, 219, 112, 141, 14, 126, 209, 128, 147, 45, 196, 4, 216, 116, 32, 12, 183, 19, 68, 170, 56, 108, 223, 250, 172, 22, 147, 15, 150, 177, 113, 105, 206, 115, 145, 166, 159, 209, 162, 96, 162, 190, 136, 212, 76, 9, 132, 228, 195, 66, 154, 162, 110, 175, 214, 43, 132, 203, 21, 207, 42, 97, 190, 13, 54, 31, 200, 111, 219, 16, 90, 42, 244, 189, 53, 55, 179, 243, 92, 106, 97, 168, 138, 18, 97, 52, 52, 217, 133, 121, 209, 191, 136, 83, 190, 70, 68, 204, 43, 12, 70, 64, 169, 159, 102, 251, 113, 223, 5, 188, 235, 65, 97, 121, 195, 175, 234, 85, 130, 82, 196, 216, 152, 198, 183, 237, 49, 99, 116, 70, 234, 209, 96, 78, 14, 225, 94, 197, 48, 194, 188, 51, 97, 99, 150, 166, 223, 213, 115, 162, 101, 40, 17, 139, 170, 121, 108, 61, 139, 10, 117, 166, 247, 209, 142, 145, 75, 52, 101, 207, 247, 84, 50, 81, 127, 53, 133, 223, 103, 226, 157, 169, 165, 111, 126, 73, 147, 235, 7, 255, 206, 47, 11, 205, 238, 129, 169, 215, 39, 66, 87, 220, 7, 141, 37, 170, 123, 247, 51, 138, 232, 143, 238, 70, 155, 68, 116, 116, 16, 161, 21, 199, 160, 158, 225, 52, 68, 136, 49, 94, 150, 102, 9, 210, 222, 198, 247, 106, 171, 143, 44, 223, 217, 241, 78, 129, 153, 149, 179, 89, 24, 28, 178, 211, 103, 43, 212, 206, 104, 217, 82, 150, 211, 201, 17, 114, 196, 173, 210, 13, 15, 203, 84, 185, 3, 193, 139, 110, 42, 219, 72, 200, 214, 99, 95, 82, 90, 166, 79, 136, 229, 36, 120, 238, 104, 240, 14, 108, 36, 119, 191, 25, 208, 33, 0, 39, 103, 225, 127, 55, 180, 209, 113, 36, 54, 143, 63, 30, 242, 60, 220, 91, 36, 27, 171, 94, 119, 125, 230, 191, 42, 119, 209, 209, 225, 214, 100, 93, 165, 64, 6, 34, 72, 87, 19, 30, 5, 48, 60, 204, 104, 221, 111, 119, 154, 234, 20, 177, 121, 137, 18, 216, 223, 236, 50, 114, 193, 92, 214, 25, 169, 90, 124, 47, 141, 77, 111, 223, 100, 246, 42, 254, 246, 237, 85, 143, 247, 192, 167, 241, 127, 167, 164, 85, 45, 121, 229, 108, 181, 227, 139, 102, 243, 25, 235, 87, 32, 24, 216, 189, 3, 136, 32, 168, 111, 33, 235, 110, 30, 48, 91, 227, 145, 161, 35, 97, 250, 137, 49, 199, 51, 12, 122, 134, 172, 37, 201, 192, 156, 97, 42, 158, 53, 125, 84, 196, 30, 21, 109, 30, 153, 102, 142, 32, 109, 28, 158, 140, 91, 62, 119, 82, 63, 228, 252, 155, 40, 196, 164, 248, 255, 231, 182, 54, 30, 194, 159, 34, 137, 182, 228, 29, 196, 134, 178, 47, 158, 188, 251, 206, 108, 255, 6, 61, 206, 132, 60, 146, 220, 36, 16, 131, 78, 162, 247, 116, 129, 225, 62, 65, 96, 36, 13, 102, 219, 160, 41, 161, 83, 160, 121, 80, 173, 145, 65, 83, 133, 247, 78, 62, 197, 123, 176, 52, 36, 182, 121, 127, 65, 147, 195, 174, 119, 232, 74, 203, 129, 181, 155, 37, 118, 176, 14, 219, 232, 52, 130, 222, 126, 67, 105, 118, 8, 12, 231, 95, 206, 177, 213, 255, 93, 236, 162, 11, 154, 36, 169, 150, 173, 2, 82, 185, 19, 2, 106, 143, 112, 98, 4, 154, 202, 174, 187, 150, 232, 11, 33, 119, 111, 207, 246, 133, 39, 57, 93, 106, 2, 186, 135, 151, 102, 77, 34, 143, 111, 55, 252, 72, 179, 255, 71, 156, 219, 247, 246, 253, 95, 248, 3, 165, 242, 241, 116, 86, 118, 172, 23, 44, 188, 116, 198, 198, 99, 243, 223, 126, 136, 117, 71, 205, 97, 142, 106, 227, 175, 151, 239, 123, 225, 19, 219, 172, 68, 21, 137, 13, 179, 229, 40, 99, 212, 1, 131, 86, 218, 39, 245, 180, 136, 71, 0, 104, 185, 33, 142, 114, 252, 162, 219, 61, 20, 67, 22, 100, 162, 38, 35, 32, 217, 150, 190, 3, 165, 137, 236, 104, 248, 125, 114, 3, 39, 82, 122, 244, 68, 139, 252, 115, 190, 160, 51, 255, 5, 229, 142, 193, 64, 166, 244, 97, 8, 151, 18, 230, 179, 73, 199, 54, 138, 136, 151, 9, 48, 232, 154, 75, 239, 102, 227, 10, 209, 113, 117, 68, 178, 242, 76, 131, 141, 130, 251, 146, 123, 71, 153, 134, 150, 67, 106, 152, 143, 59, 163, 202, 234, 36, 109, 253, 69, 150, 31, 193, 135, 43, 183, 210, 105, 22, 157, 196, 189, 40, 1, 229, 200, 108, 19, 41, 54, 55, 228, 71, 19, 194, 178, 90, 48, 6, 191, 211, 16, 28, 108, 205, 122, 69, 135, 211, 64, 73, 157, 168, 84, 36, 143, 23, 231, 216, 18, 185, 65, 108, 206, 131, 2, 197, 136, 38, 148, 244, 54, 197, 110, 76, 252, 188, 3, 241, 67, 216, 44, 235, 189, 16, 59, 40, 252, 89, 231, 49, 11, 210, 77, 247, 228, 185, 255, 90, 58, 177, 231, 178, 86, 184, 253, 221, 70, 165, 45, 78, 251, 1, 195, 199, 234, 61, 160, 220, 240, 213, 78, 145, 129, 75, 129, 73, 55, 177, 7, 27, 68, 208, 112, 213, 211, 94, 91, 33, 80, 250, 146, 132, 178, 240, 233, 121, 69, 154, 134, 160, 188, 88, 143, 135, 200, 69, 119, 234, 41, 7, 187, 193, 39, 179, 160, 90, 182, 170, 119, 163, 250, 167, 8, 95, 154, 7, 201, 84, 21, 36, 141, 50, 40, 225, 33, 199, 140, 253, 200, 255, 239, 220, 150, 130, 37, 143, 70, 208, 167, 150, 182, 92, 16, 206, 83, 202, 117, 238, 38, 61, 133, 171, 236, 186, 174, 249, 139, 10, 144, 247, 14, 84, 57, 154, 203, 101, 176, 95, 114, 114, 75, 84, 166, 16, 53, 208, 28, 244, 6, 73, 100, 119, 5, 156, 69, 13, 193, 48, 214, 59, 71, 74, 145, 218, 199, 39, 194, 49, 220, 98, 10, 170, 132, 96, 63, 154, 116, 232, 134, 181, 64, 92, 120, 51, 65, 4, 177, 60, 59, 156, 76, 235, 1, 4, 177, 241, 130, 229, 246, 97, 194, 91, 112, 245, 6, 139, 39, 219, 79, 65, 75, 32, 12, 133, 157, 88, 230, 23, 13, 109, 158, 181, 168, 71, 250, 76, 171, 137, 157, 57, 119, 76, 40, 117, 126, 252, 221, 73, 137, 36, 131, 49, 211, 17, 167, 217, 71, 138, 187, 228, 2, 235, 28, 58, 157, 250, 109, 50, 28, 33, 87, 173, 162, 95, 75, 138, 183, 145, 220, 141, 166, 188, 215, 139, 45, 60, 147, 23, 170, 43, 116, 206, 122, 117, 175, 53, 11, 110, 53, 122, 243, 185, 3, 184, 55, 198, 248, 119, 81, 59, 116, 98, 107, 38, 146, 0, 53, 177, 22, 182, 205, 131, 150, 20, 91, 94, 5, 128, 11, 40, 10, 95, 207, 229, 114, 81, 124, 146, 249, 219, 83, 193, 184, 5, 51, 245, 12, 66, 116, 54, 36, 101, 45, 214, 78, 251, 255, 94, 104, 114, 58, 193, 128, 34, 164, 14, 144, 117, 197, 80, 152, 120, 46, 161, 81, 39, 223, 125, 180, 27, 61, 134, 7, 156, 251, 122, 115, 217, 113, 36, 115, 30, 226, 182, 229, 21, 26, 114, 184, 186, 234, 186, 221, 107, 45, 171, 13, 10, 183, 191, 125, 29, 151, 252, 168, 92, 42, 250, 112, 251, 48, 187, 18, 30, 193, 107, 204, 154, 159, 12, 244, 79, 188, 147, 141, 128, 21, 55, 81, 70, 18, 75, 121, 200, 111, 209, 111, 90, 177, 140, 12, 120, 206, 136, 165, 122, 53, 173, 160, 240, 65, 224, 232, 221, 225, 68, 121, 84, 189, 18, 141, 142, 238, 69, 223, 55, 197, 161, 7, 81, 117, 181, 125, 0, 227, 110, 136, 2, 161, 195, 238, 101, 48, 104, 7, 25, 118, 182, 98, 10, 28, 198, 194, 108, 182, 97, 142, 47, 85, 84, 239, 130, 224, 159, 234, 107, 125, 71, 37, 109, 101, 123, 96, 92, 251, 240, 35, 83, 245, 195, 80, 2, 171, 30, 126, 231, 154, 172, 10, 39, 6, 67, 236, 160, 183, 50, 29, 75, 141, 152, 224, 60, 218, 173, 193, 47, 55, 74, 154, 252, 255, 8, 88, 104, 33, 189, 242, 96, 200, 33, 232, 45, 195, 109, 241, 10, 25, 25, 182, 5, 47, 160, 3, 220, 198, 211, 154, 41, 142, 58, 146, 58, 2, 85, 49, 236, 244, 192, 27, 182, 145, 30, 85, 22, 83, 63, 138, 209, 188, 249, 154, 95, 239, 193, 245, 81, 215, 79, 137, 118, 16, 152, 33, 34, 120, 202, 129, 184, 109, 192, 4, 77, 51, 69, 38, 135, 99, 234, 246, 108, 130, 157, 82, 16, 20, 198, 129, 173, 55, 107, 105, 14, 235, 253, 81, 72, 220, 236, 253, 209, 239, 68, 30, 38, 99, 164, 119, 77, 128, 41, 124, 34, 18, 109, 184, 220, 182, 141, 14, 45, 147, 172, 178, 134, 251, 31, 227, 25, 31, 14, 126, 242, 248, 121, 35, 86, 97, 101, 11, 79, 82, 68, 197, 69, 181, 67, 207, 215, 196, 199, 201, 198, 230, 183, 255, 215, 249, 186, 130, 180, 112, 25, 180, 161, 233, 82, 34, 3, 148, 243, 235, 132, 14, 156, 34, 64, 216, 104, 92, 119, 4, 200, 173, 125, 224, 64, 224, 198, 243, 186, 206, 230, 60, 112, 21, 41, 113, 142, 222, 58, 65, 249, 122, 51, 28, 147, 70, 189, 170, 243, 135, 106, 103, 135, 40, 113, 249, 107, 179, 40, 115, 80, 235, 190, 151, 51, 34, 245, 156, 126, 128, 111, 131, 48, 23, 185, 220, 51, 197, 66, 90, 42, 3, 53, 84, 35, 239, 244, 108, 210, 56, 141, 11, 142, 221, 32, 18, 218, 201, 16, 149, 189, 210, 77, 148, 7, 109, 45, 1, 87, 64, 137, 118, 234, 154, 132, 205, 233, 80, 135, 140, 90, 56, 4, 102, 22, 227, 248, 32, 184, 168, 109, 204, 103, 65, 6, 23, 191, 209, 41, 208, 227, 129, 135, 182, 127, 128, 128, 240, 183, 122, 212, 0, 33, 179, 95, 61, 113, 197, 222, 158, 203, 173, 45, 148, 221, 219, 161, 240, 128, 100, 122, 201, 22, 196, 217, 225, 165, 124, 74, 166, 125, 204, 182, 69, 10, 70, 138, 127, 162, 32, 73, 171, 248, 150, 182, 124, 173, 252, 89, 31, 15, 106, 173, 44, 35, 17, 144, 251, 11, 192, 125, 93, 139, 183, 137, 76, 17, 31, 230, 140, 135, 156, 46, 197, 87, 102, 34, 242, 176, 161, 45, 98, 144, 50, 231, 64, 46, 226, 227, 166, 159, 0, 13, 119, 34, 89, 150, 76, 89, 147, 79, 28, 238, 77, 5, 88, 179, 70, 206, 105, 100, 77, 24, 104, 64, 239, 228, 26, 26, 1, 178, 50, 32, 166, 144, 239, 249, 4, 220, 42, 154, 161, 236, 33, 10, 126, 84, 177, 118, 34, 3, 141, 200, 170, 106, 20, 17, 59, 191, 48, 10, 57, 206, 0, 153, 140, 177, 230, 163, 166, 165, 144, 199, 138, 114, 214, 83, 47, 223, 34, 94, 59, 177, 230, 102, 16, 252, 153, 222, 207, 186, 177, 145, 40, 145, 42, 154, 124, 78, 235, 0, 26, 137, 103, 182, 53, 135, 122, 45, 224, 177, 16, 45, 58, 184, 141, 18, 223, 26, 83, 229, 34, 250, 180, 153, 177, 0, 48, 177, 15, 119, 137, 18, 69, 98, 111, 233, 70, 3, 224, 225, 0, 251, 101, 158, 161, 138, 187, 39, 200, 86, 175, 75, 64, 51, 41, 216, 240, 208, 204, 200, 236, 248, 147, 36, 153, 21, 255, 59, 144, 61, 188, 31, 191, 123, 77, 134, 124, 28, 249, 231, 218, 177, 50, 40, 185, 133, 186, 3, 67, 226, 174, 87, 167, 251, 156, 101, 161, 181, 67, 242, 248, 154, 160, 46, 82, 117, 45, 41, 81, 125, 78, 121, 16, 74, 2, 15, 181, 125, 14, 166, 97, 251, 184, 90, 233, 115, 90, 148, 96, 59, 119, 246, 148, 25, 195, 206, 184, 230, 142, 168, 237, 242, 126, 207, 188, 230, 19, 241, 193, 168, 66, 61, 61, 63, 182, 165, 84, 3, 101, 39, 214, 203, 198, 5, 172, 205, 61, 82, 110, 9, 9, 101, 78, 198, 188, 10, 118, 248, 210, 17, 51, 127, 179, 0, 119, 95, 62, 79, 157, 98, 142, 16, 78, 101, 51, 136, 146, 168, 33, 9, 190, 44, 132, 62, 232, 164, 235, 249, 217, 233, 183, 56, 254, 88, 161, 73, 30, 255, 255, 208, 71, 19, 141, 14, 12, 92, 254, 52, 248, 182, 81, 185, 15, 14, 27, 218, 229, 167, 156, 99, 251, 66, 229, 154, 0, 125, 173, 74, 234, 42, 253, 229, 217, 154, 140, 71, 235, 178, 73, 132, 117, 15, 236, 235, 187, 19, 34, 163, 211, 6, 248, 88, 205, 136, 57, 197, 171, 75, 141, 62, 130, 185, 208, 35, 186, 11, 34, 167, 199, 133, 128, 47, 104, 194, 234, 183, 60, 71, 54, 188, 222, 66, 6, 112, 118, 59, 39, 81, 151, 254, 134, 42, 39, 171, 230, 180, 235, 35, 48, 109, 113, 39, 95, 74, 99, 4, 115, 27, 143, 195, 246, 2, 248, 1, 19, 66, 188, 226, 242, 122, 94, 130, 50, 224, 216, 149, 0, 93, 198, 241, 232, 239, 142, 95, 25, 99, 183, 235, 251, 230, 49, 81, 0, 33, 1, 186, 164, 190, 101, 180, 1, 77, 199, 179, 193, 250, 9, 84, 8, 6, 137, 71, 16, 28, 168, 167, 29, 104, 93, 3, 154, 104, 73, 151, 12, 96, 11, 218, 0, 160, 166, 39, 34, 139, 168, 242, 65, 68, 138, 229, 187, 204, 7, 148, 93, 179, 254, 83, 140, 175, 70, 212, 154, 175, 240, 240, 38, 225, 154, 196, 118, 133, 136, 239, 95, 217, 186, 68, 30, 132, 162, 248, 122, 250, 140, 249, 245, 141, 237, 245, 65, 239, 81, 132, 202, 202, 45, 179, 147, 30, 26, 201, 163, 86, 152, 219, 249, 141, 62, 85, 241, 232, 46, 33, 170, 50, 31, 173, 48, 93, 83, 219, 161, 213, 91, 241, 199, 229, 142, 249, 67, 15, 255, 131, 120, 41, 83, 229, 151, 118, 61, 37, 253, 184, 179, 11, 117, 237, 209, 245, 140, 189, 229, 205, 227, 98, 153, 74, 100, 31, 73, 179, 161, 161, 65, 75, 38, 108, 185, 144, 184, 61, 166, 133, 86, 156, 75, 237, 47, 48, 139, 86, 157, 147, 15, 99, 28, 194, 63, 91, 52, 225, 133, 251, 91, 131, 183, 202, 95, 158, 66, 207, 201, 69, 115, 170, 0, 94, 234, 174, 180, 207, 112, 8, 248, 172, 207, 131, 223, 217, 167, 38, 215, 51, 191, 161, 138, 198, 39, 81, 93, 158, 81, 57, 243, 199, 124, 200, 98, 247, 127, 4, 27, 117, 88, 20, 58, 180, 247, 192, 126, 247, 175, 20, 117, 98, 6, 197, 117, 26, 191, 92, 13, 144, 23, 145, 215, 88, 133, 48, 78, 222, 181, 126, 126, 238, 255, 90, 241, 81, 137, 91, 99, 95, 240, 34, 236, 90, 213, 68, 58, 89, 106, 124, 197, 43, 250, 255, 19, 221, 41, 138, 23, 146, 79, 109, 82, 30, 196, 27, 196, 48, 208, 137, 232, 230, 235, 185, 112, 138, 166, 161, 119, 166, 135, 187, 57, 58, 242, 98, 150, 197, 106, 203, 13, 7, 235, 161, 201, 247, 131, 70, 116, 110, 69, 16, 205, 233, 23, 0, 7, 75, 8, 141, 249, 54, 4, 245, 53, 124, 227, 107, 228, 96, 85, 206, 73, 207, 20, 24, 80, 39, 26, 20, 108, 249, 12, 152, 253, 108, 16, 161, 136, 203, 129, 201, 129, 137, 139, 18, 80, 61, 113, 184, 203, 23, 32, 119, 90, 167, 237, 14, 175, 103, 146, 162, 52, 136, 80, 145, 186, 187, 121, 39, 235, 113, 22, 204, 148, 138, 68, 250, 134, 252, 138, 74, 163, 234, 46, 36, 210, 188, 198, 6, 168, 243, 225, 150, 186, 26, 81, 50, 188, 156, 195, 237, 179, 116, 109, 179, 122, 91, 235, 53, 169, 109, 36, 204, 246, 228, 197, 87, 11, 77, 99, 226, 167, 110, 112, 73, 17, 220, 208, 234, 148, 40, 156, 125, 169, 167, 46, 128, 187, 29, 89, 3, 200, 217, 36, 117, 12, 75, 45, 141, 221, 78, 247, 191, 137, 130, 180, 40, 142, 103, 167, 10, 179, 73, 230, 188, 238, 66, 69, 108, 4, 210, 184, 229, 183, 248, 159, 213, 118, 151, 61, 227, 240, 61, 231, 141, 117, 41, 57, 233, 29, 235, 45, 196, 85, 235, 21, 201, 30, 154, 38, 94, 244, 74, 152, 37, 69, 244, 69, 27, 44, 29, 199, 180, 210, 213, 32, 107, 136, 194, 118, 241, 134, 85, 1, 99, 95, 221, 252, 219, 166, 21, 79, 24, 226, 145, 201, 132, 169, 180, 141, 166, 50, 239, 192, 239, 39, 190, 172, 176, 132, 69, 249, 87, 16, 220, 143, 187, 134, 245, 127, 125, 72, 119, 241, 176, 9, 232, 198, 97, 179, 154, 130, 72, 120, 90, 62, 61, 4, 161, 15, 146, 155, 4, 158, 106, 71, 21, 116, 32, 35, 217, 228, 197, 26, 45, 248, 124, 148, 249, 150, 156, 124, 58, 65, 202, 86, 52, 188, 146, 76, 191, 248, 21, 248, 152, 227, 40, 197, 141, 224, 75, 145, 213, 97, 108, 171, 150, 179, 24, 146, 113, 3, 232, 54, 228, 82, 178, 164, 210, 29, 242, 141, 194, 225, 87, 127, 225, 208, 3, 150, 23, 146, 27, 176, 81, 119, 240, 216, 223, 221, 238, 71, 214, 165, 225, 30, 186, 75, 225, 211, 8, 166, 89, 142, 104, 48, 164, 94, 161, 201, 127, 170, 9, 152, 113, 192, 77, 164, 6, 80, 14, 139, 46, 170, 219, 197, 157, 89, 126, 226, 65, 235, 107, 182, 216, 255, 196, 176, 103, 184, 119, 6, 10, 129, 99, 109, 64, 24, 46, 192, 222, 90, 176, 24, 199, 97, 177, 24, 184, 28, 129, 40, 235, 124, 171, 168, 35, 217, 172, 6, 12, 235, 184, 49, 59, 68, 226, 69, 188, 77, 38, 56, 176, 16, 166, 214, 62, 241, 197, 1, 223, 197, 163, 97, 228, 17, 77, 39, 94, 32, 200, 184, 38, 78, 222, 150, 195, 77, 196, 234, 138, 12, 234, 96, 210, 127, 191, 206, 87, 29, 237, 117, 45, 81, 174, 2, 253, 171, 55, 63, 2, 245, 37, 43, 204, 114, 155, 35, 169, 241, 11, 74, 53, 251, 186, 18, 101, 216, 118, 11, 163, 48, 46, 123, 116, 78, 117, 78, 137, 65, 202, 66, 125, 18, 69, 179, 123, 250, 181, 38, 127, 49, 61, 140, 26, 63, 176, 85, 99, 27, 29, 212, 211, 222, 98, 153, 131, 215, 146, 249, 18, 39, 114, 126, 224, 189, 10, 90, 149, 147, 170, 239, 29, 87, 204, 73, 18, 76, 133, 0, 172, 137, 3, 189, 207, 119, 110, 94, 112, 56, 73, 182, 39, 177, 81, 192, 122, 40, 137, 140, 234, 206, 173, 148, 98, 212, 128, 162, 246, 150, 13, 67, 55, 8, 36, 216, 93, 197, 123, 159, 86, 33, 63, 10, 176, 21, 108, 49, 96, 13, 74, 23, 79, 128, 6, 14, 169, 76, 216, 185, 17, 115, 17, 19, 54, 144, 252, 112, 16, 224, 95, 42, 245, 0, 191, 150, 226, 232, 203, 11, 39, 251, 91, 113, 225, 81, 79, 84, 114, 95, 126, 40, 99, 226, 176, 11, 230, 224, 221, 243, 195, 243, 75, 240, 17, 129, 179, 69, 184, 235, 188, 220, 236, 148, 195, 99, 9, 242, 193, 0, 148, 121, 229, 192, 198, 28, 146, 50, 212, 249, 187, 10, 15, 25, 131, 236, 249, 197, 153, 96, 250, 229, 163, 88, 23, 114, 200, 182, 29, 87, 233, 177, 146, 215, 16, 133, 21, 1, 168, 144, 62, 51, 179, 247, 204, 228, 0, 8, 235, 109, 16, 216, 126, 177, 14, 103, 188, 237, 94, 246, 90, 227, 29, 246, 188, 38, 3, 150, 46, 11, 104, 169, 186, 139, 8, 252, 98, 190, 101, 187, 174, 200, 182, 168, 193, 179, 168, 8, 163, 32, 61, 234, 77, 221, 194, 129, 31, 99, 11, 63, 208, 15, 38, 20, 80, 181, 248, 84, 153, 103, 182, 76, 132, 227, 126, 49, 115, 245, 64, 222, 96, 207, 2, 189, 5, 65, 219, 115, 232, 253, 137, 115, 23, 212, 161, 156, 236, 245, 128, 119, 31, 112, 177, 147, 139, 145, 182, 36, 135, 143, 172, 0, 223, 224, 145, 85, 229, 162, 46, 218, 56, 93, 94, 31, 66, 198, 247, 226, 149, 88, 2, 74, 128, 172, 161, 239, 74, 141, 17, 22, 100, 100, 101, 97, 7, 132, 102, 112, 155, 159, 184, 110, 66, 148, 93, 98, 140, 68, 64, 170, 156, 32, 5, 197, 18, 229, 194, 174, 176, 207, 17, 208, 174, 22, 156, 151, 11, 185, 31, 168, 16, 174, 6, 30, 28, 51, 28, 36, 67, 198, 81, 219, 166, 106, 155, 107, 83, 100, 90, 132, 232, 234, 92, 244, 229, 65, 85, 20, 129, 148, 93, 145, 21, 176, 27, 31, 109, 221, 242, 178, 80, 112, 85, 53, 86, 252, 145, 244, 202, 138, 42, 113, 190, 6, 80, 0, 52, 159, 138, 177, 146, 83, 76, 90, 85, 88, 167, 205, 63, 227, 232, 174, 162, 119, 238, 117, 131, 74, 56, 82, 166, 36, 86, 34, 41, 8, 61, 23, 57, 59, 35, 23, 196, 9, 172, 132, 235, 244, 159, 15, 68, 246, 74, 184, 243, 190, 31, 208, 221, 215, 48, 202, 189, 248, 188, 197, 194, 161, 58, 224, 219, 53, 13, 26, 249, 147, 7, 22, 209, 180, 115, 168, 209, 158, 240, 234, 53, 156, 191, 82, 46, 161, 226, 38, 76, 215, 72, 195, 247, 230, 82, 24, 108, 252, 171, 49, 165, 12, 85, 175, 138, 253, 66, 207, 212, 80, 136, 113, 140, 33, 109, 90, 24, 151, 58, 126, 141, 229, 74, 68, 0, 50, 152, 139, 47, 42, 136, 105, 60, 85, 161, 108, 39, 98, 80, 93, 73, 49, 184, 82, 18, 219, 247, 178, 93, 127, 34, 171, 242, 21, 54, 54, 33, 64, 65, 3, 241, 50, 225, 196, 25, 236, 107, 97, 170, 64, 216, 176, 182, 30, 68, 99, 21, 162, 25, 10, 33, 98, 231, 178, 70, 180, 4, 203, 8, 65, 16, 112, 17, 12, 27, 178, 204, 143, 249, 79, 229, 116, 151, 184, 160, 251, 122, 103, 149, 111, 19, 87, 182, 150, 88, 58, 26, 115, 217, 12, 208, 7, 162, 57, 30, 213, 200, 31, 40, 45, 123, 138, 114, 209, 202, 30, 118, 170, 185, 64, 161, 194, 253, 51, 102, 196, 227, 153, 150, 157, 77, 227, 167, 83, 236, 172, 118, 38, 70, 169, 34, 202, 178, 173, 253, 168, 1, 194, 39, 95, 113, 26, 212, 65, 167, 195, 105, 132, 67, 203, 165, 147, 59, 11, 161, 227, 127, 239, 79, 82, 56, 3, 203, 24, 55, 0, 180, 167, 218, 182, 221, 2, 2, 239, 99, 190, 1, 16, 1, 153, 56, 143, 69, 43, 109, 181, 205, 218, 139, 21, 46, 137, 98, 26, 0, 224, 86, 68, 12, 187, 109, 123, 152, 38, 58, 23, 0, 189, 7, 224, 57, 148, 9, 186, 125, 193, 106, 222, 119, 128, 238, 181, 74, 136, 235, 57, 55, 48, 145, 208, 186, 15, 245, 16, 235, 85, 171, 60, 77, 84, 150, 127, 62, 222, 135, 14, 165, 177, 24, 187, 226, 116, 42, 92, 135, 37, 37, 68, 121, 157, 128, 239, 135, 143, 169, 106, 227, 84, 231, 93, 131, 196, 149, 31, 241, 103, 179, 30, 167, 171, 218, 180, 140, 86, 129, 20, 229, 216, 141, 142, 129, 236, 7, 115, 41, 84, 146, 14, 35, 112, 94, 87, 196, 139, 101, 150, 68, 35, 232, 56, 125, 59, 164, 124, 54, 119, 245, 112, 168, 44, 97, 183, 8, 156, 10, 86, 190, 143, 127, 3, 119, 25, 57, 235, 218, 191, 209, 239, 103, 222, 107, 124, 95, 58, 57, 214, 13, 144, 154, 229, 75, 204, 178, 54, 86, 175, 186, 122, 173, 79, 120, 239, 99, 124, 32, 2, 203, 232, 227, 248, 135, 13, 159, 25, 165, 181, 142, 154, 177, 150, 138, 83, 15, 36, 119, 106, 252, 160, 8, 235, 128, 188, 12, 137, 231, 202, 215, 142, 199, 86, 163, 250, 1, 5, 11, 162, 56, 178, 50, 64, 84, 203, 45, 251, 122, 240, 86, 65, 164, 203, 19, 126, 188, 204, 206, 105, 173, 66, 53, 218, 3, 233, 157, 247, 56, 119, 144, 186, 173, 196, 39, 198, 148, 103, 56, 43, 225, 227, 53, 127, 56, 48, 112, 186, 107, 252, 93, 19, 46, 177, 103, 40, 84, 154, 43, 249, 236, 175, 7, 241, 199, 40, 59, 227, 68, 197, 28, 113, 170, 68, 239, 185, 166, 113, 209, 53, 172, 69, 61, 230, 117, 5, 67, 91, 221, 187, 176, 67, 180, 69, 145, 200, 26, 173, 142, 200, 60, 111, 165, 18, 58, 114, 33, 164, 222, 31, 84, 121, 28, 243, 53, 68, 143, 62, 170, 81, 218, 90, 254, 135, 196, 14, 116, 106, 94, 151, 126, 202, 53, 115, 78, 141, 172, 222, 126, 253, 53, 95, 58, 117, 33, 136, 136, 41, 155, 148, 109, 12, 78, 148, 156, 76, 196, 228, 8, 0, 108, 255, 209, 22, 52, 135, 99, 169, 215, 133, 207, 130, 20, 145, 5, 120, 103, 46, 33, 181, 72, 182, 228, 23, 48, 205, 174, 128, 35, 70, 106, 236, 137, 163, 120, 45, 164, 0, 91, 37, 222, 125, 155, 196, 238, 34, 226, 180, 163, 77, 68, 141, 20, 224, 157, 236, 72, 74, 249, 80, 98, 40, 123, 234, 95, 127, 206, 224, 246, 215, 116, 22, 77, 158, 195, 174, 34, 82, 150, 200, 145, 181, 46, 186, 126, 114, 118, 222, 255, 76, 4, 127, 55, 164, 110, 82, 212, 28, 89, 152, 247, 221, 252, 99, 230, 4, 241, 243, 82, 68, 218, 43, 103, 191, 25, 98, 198, 64, 1, 1, 2, 196, 218, 33, 135, 69, 86, 27, 113, 200, 139, 100, 80, 217, 124, 89, 154, 130, 192, 210, 195, 117, 176, 0, 111, 135, 42, 191, 215, 24, 22, 3, 115, 77, 1, 230, 221, 161, 209, 7, 237, 95, 67, 252, 242, 50, 32, 189, 193, 206, 201, 67, 67, 248, 3, 221, 129, 225, 207, 110, 62, 185, 197, 232, 64, 0, 64, 86, 141, 213, 22, 249, 127, 158, 243, 61, 23, 126, 102, 222, 132, 232, 83, 223, 154, 74, 112, 83, 10, 50, 162, 240, 117, 227, 85, 212, 85, 118, 34, 38, 203, 179, 41, 166, 149, 164, 135, 224, 165, 157, 59, 146, 49, 74, 40, 83, 96, 253, 176, 114, 49, 32, 114, 47, 109, 3, 36, 14, 174, 143, 178, 153, 237, 108, 206, 5, 123, 77, 54, 253, 73, 203, 123, 20, 109, 1, 104, 164, 118, 4, 182, 240, 24, 86, 226, 218, 61, 185, 79, 29, 70, 95, 45, 187, 55, 135, 19, 97, 146, 121, 98, 187, 230, 176, 225, 130, 33, 175, 161, 98, 108, 4, 105, 151, 86, 176, 6, 98, 85, 247, 63, 184, 27, 18, 108, 246, 172, 243, 156, 9, 177, 135, 210, 68, 129, 193, 204, 56, 95, 166, 18, 32, 48, 247, 164, 76, 216, 18, 217, 50, 253, 250, 52, 69, 225, 0, 218, 142, 171, 165, 255, 92, 28, 109, 9, 198, 215, 189, 200, 181, 68, 165, 248, 113, 165, 10, 225, 42, 40, 211, 21, 82, 19, 139, 252, 138, 153, 240, 31, 226, 240, 212, 125, 251, 206, 126, 34, 57, 5, 211, 187, 53, 16, 97, 121, 205, 216, 238, 46, 192, 205, 16, 236, 135, 66, 55, 241, 88, 169, 70, 49, 31, 130, 147, 221, 166, 195, 245, 216, 180, 54, 177, 13, 106, 122, 143, 192, 92, 173, 136, 213, 42, 93, 19, 193, 185, 81, 176, 226, 219, 245, 91, 194, 255, 194, 40, 59, 26, 153, 4, 179, 54, 156, 110, 89, 196, 23, 91, 70, 92, 224, 150, 249, 245, 172, 221, 173, 40, 81, 182, 185, 191, 145, 80, 57, 202, 113, 186, 112, 133, 124, 123, 97, 112, 171, 76, 33, 176, 223, 200, 168, 160, 115, 137, 43, 211, 139, 159, 190, 134, 94, 231, 214, 175, 0, 96, 131, 0, 34, 17, 84, 119, 35, 25, 193, 5, 2, 169, 162, 211, 233, 241, 242, 26, 139, 183, 201, 132, 173, 78, 22, 249, 223, 227, 209, 109, 11, 161, 162, 198, 51, 105, 72, 68, 93, 120, 135, 79, 186, 64, 226, 30, 47, 130, 86, 98, 131, 224, 35, 250, 132, 105, 175, 79, 44, 238, 45, 72, 255, 35, 226, 177, 50, 77, 32, 29, 209, 43, 213, 28, 166, 51, 203, 44, 13, 70, 199, 201, 110, 255, 192, 39, 164, 150, 208, 208, 24, 122, 140, 145, 102, 242, 145, 123, 225, 43, 142, 133, 104, 100, 216, 81, 189, 244, 164, 151, 239, 207, 172, 2, 125, 33, 78, 222, 192, 153, 72, 209, 32, 39, 123, 113, 168, 63, 5, 92, 219, 215, 139, 164, 47, 165, 115, 64, 231, 145, 254, 237, 207, 85, 29, 42, 79, 102, 250, 215, 38, 230, 129, 206, 157, 239, 135, 169, 172, 80, 54, 67, 149, 81, 238, 253, 57, 106, 221, 13, 221, 250, 209, 86, 46, 236, 80, 57, 70, 178, 129, 34, 74, 238, 142, 221, 95, 48, 9, 219, 160, 4, 66, 111, 228, 40, 225, 232, 74, 146, 222, 136, 209, 240, 206, 88, 171, 217, 21, 172, 164, 109, 166, 255, 16, 109, 35, 46, 45, 182, 0, 221, 210, 207, 113, 170, 75, 192, 148, 248, 156, 99, 90, 50, 89, 158, 99, 121, 39, 50, 71, 219, 228, 192, 53, 42, 36, 73, 18, 107, 69, 213, 21, 91, 152, 246, 68, 188, 138, 240, 181, 118, 219, 163, 231, 219, 4, 78, 134, 3, 57, 248, 241, 175, 31, 57, 196, 89, 19, 230, 191, 32, 227, 43, 39, 114, 187, 126, 3, 91, 236, 104, 88, 109, 138, 102, 211, 246, 46, 76, 198, 197, 71, 199, 235, 69, 181, 35, 9, 126, 10, 105, 113, 152, 127, 73, 242, 9, 65, 11, 200, 40, 4, 45, 227, 70, 192, 5, 186, 69, 243, 88, 11, 3, 15, 213, 127, 102, 20, 10, 244, 42, 95, 90, 175, 32, 82, 47, 209, 162, 143, 195, 34, 31, 185, 133, 191, 159, 124, 153, 232, 72, 197, 144, 217, 76, 111, 49, 166, 211, 130, 101, 111, 52, 81, 69, 180, 253, 119, 224, 228, 0, 184, 43, 182, 161, 46, 249, 26, 222, 200, 232, 197, 144, 139, 84, 109, 134, 235, 28, 163, 138, 249, 0, 138, 126, 152, 24, 242, 73, 194, 27, 22, 159, 104, 211, 36, 61, 106, 163, 123, 74, 106, 251, 225, 56, 207, 245, 177, 206, 195, 205, 235, 175, 44, 229, 44, 61, 43, 57, 160, 48, 5, 194, 90, 252, 121, 196, 180, 35, 253, 176, 167, 71, 69, 206, 0, 185, 124, 211, 148, 97, 243, 210, 137, 238, 89, 98, 175, 129, 134, 162, 55, 241, 89, 157, 1, 182, 133, 111, 130, 178, 84, 129, 84, 118, 81, 247, 122, 92, 198, 255, 198, 146, 131, 71, 28, 246, 87, 19, 90, 179, 165, 39, 130, 204, 101, 70, 50, 98, 49, 193, 11, 148, 233, 230, 116, 166, 63, 87, 62, 24, 35, 87, 197, 211, 217, 15, 59, 215, 123, 252, 163, 60, 98, 164, 223, 83, 13, 183, 134, 191, 78, 6, 219, 62, 254, 154, 1, 94, 183, 114, 115, 34, 159, 33, 145, 89, 63, 28, 226, 93, 184, 244, 166, 228, 146, 154, 183, 49, 69, 32, 60, 138, 90, 153, 71, 138, 182, 92, 235, 52, 197, 123, 203, 9, 50, 223, 112, 3, 142, 124, 252, 243, 61, 108, 56, 190, 95, 82, 79, 119, 171, 34, 53, 37, 78, 244, 68, 191, 199, 217, 164, 122, 113, 197, 127, 140, 245, 13, 158, 99, 250, 101, 14, 59, 17, 197, 232, 165, 7, 243, 151, 66, 184, 73, 161, 33, 78, 230, 189, 9, 75, 91, 222, 229, 105, 0, 121, 156, 165, 176, 169, 193, 243, 186, 120, 44, 121, 207, 215, 91, 242, 220, 60, 85, 72, 140, 41, 210, 72, 95, 195, 185, 75, 98, 47, 139, 132, 132, 154, 103, 42, 98, 15, 40, 178, 118, 80, 126, 63, 165, 217, 106, 161, 211, 249, 59, 58, 101, 180, 208, 115, 172, 50, 177, 247, 87, 248, 172, 0, 95, 86, 74, 196, 42, 2, 222, 75, 118, 234, 139, 151, 13, 61, 41, 214, 32, 180, 32, 78, 225, 60, 137, 149, 35, 247, 175, 124, 244, 206, 27, 62, 107, 118, 112, 240, 237, 112, 81, 204, 239, 230, 218, 62, 236, 29, 184, 5, 49, 153, 114, 226, 74, 56, 163, 14, 231, 144, 201, 60, 119, 183, 94, 62, 74, 215, 20, 12, 111, 223, 159, 187, 50, 56, 150, 214, 229, 114, 25, 64, 101, 185, 151, 202, 67, 86, 4, 67, 105, 56, 45, 91, 244, 174, 151, 58, 198, 217, 204, 32, 233, 22, 97, 66, 189, 167, 73, 214, 67, 61, 201, 148, 130, 118, 128, 111, 235, 178, 4, 95, 156, 147, 220, 6, 253, 184, 243, 156, 187, 184, 34, 119, 132, 141, 41, 50, 204, 3, 110, 96, 246, 23, 251, 212, 19, 211, 169, 189, 37, 212, 133, 91, 79, 162, 126, 155, 249, 112, 83, 102, 70, 76, 201, 243, 64, 208, 105, 197, 36, 250, 79, 40, 13, 234, 116, 236, 163, 41, 234, 90, 9, 135, 134, 74, 7, 179, 70, 15, 131, 98, 7, 101, 65, 71, 64, 98, 252, 79, 246, 241, 86, 57, 29, 252, 38, 22, 223, 110, 16, 199, 54, 116, 206, 200, 196, 157, 55, 28, 37, 100, 90, 46, 199, 40, 213, 48, 134, 219, 147, 88, 243, 236, 118, 85, 84, 45, 31, 69, 122, 167, 225, 154, 218, 61, 158, 249, 40, 162, 158, 36, 211, 137, 69, 128, 174, 37, 35, 78, 119, 114, 250, 45, 254, 113, 127, 63, 233, 97, 75, 208, 183, 77, 89, 141, 251, 204, 190, 142, 86, 82, 14, 213, 228, 70, 69, 172, 46, 100, 46, 158, 91, 148, 92, 164, 255, 86, 237, 69, 174, 29, 101, 89, 242, 0, 98, 174, 77, 152, 181, 216, 102, 51, 194, 71, 125, 52, 4, 91, 9, 93, 40, 163, 21, 4, 26, 184, 235, 180, 224, 220, 23, 255, 148, 166, 227, 190, 99, 248, 50, 136, 138, 32, 153, 182, 184, 17, 177, 195, 69, 217, 220, 239, 213, 118, 222, 239, 7, 99, 21, 226, 34, 152, 228, 226, 9, 254, 181, 163, 78, 86, 51, 128, 108, 86, 42, 174, 239, 33, 131, 246, 233, 80, 109, 211, 66, 211, 100, 237, 120, 97, 119, 106, 217, 31, 66, 173, 114, 204, 44, 79, 241, 220, 93, 251, 213, 230, 37, 204, 76, 194, 211, 26, 170, 50, 37, 236, 253, 141, 104, 237, 3, 160, 237, 157, 152, 5, 208, 19, 157, 254, 121, 240, 98, 141, 140, 47, 182, 85, 27, 222, 149, 234, 39, 83, 186, 76, 129, 24, 223, 6, 80, 142, 150, 207, 119, 145, 51, 193, 221, 64, 254, 78, 172, 221, 70, 192, 104, 55, 51, 64, 92, 22, 160, 109, 245, 213, 218, 135, 76, 237, 219, 139, 235, 217, 80, 135, 164, 82, 207, 12, 26, 165, 200, 16, 225, 44, 189, 228, 210, 173, 110, 17, 50, 73, 157, 160, 39, 217, 27, 208, 98, 182, 38, 248, 250, 20, 52, 235, 195, 72, 79, 41, 238, 69, 138, 91, 111, 179, 126, 68, 12, 211, 39, 31, 65, 45, 139, 22, 186, 140, 182, 110, 91, 118, 165, 23, 249, 11, 216, 200, 251, 116, 221, 221, 219, 152, 158, 62, 144, 140, 217, 211, 112, 192, 181, 159, 175, 206, 46, 13, 216, 121, 177, 80, 163, 124, 208, 13, 121, 115, 118, 125, 215, 187, 11, 130, 151, 7, 171, 43, 0, 235, 104, 216, 233, 243, 197, 248, 73, 108, 160, 56, 253, 82, 143, 13, 82, 46, 182, 40, 199, 109, 142, 93, 160, 253, 78, 29, 66, 181, 105, 171, 13, 81, 114, 197, 110, 3, 195, 21, 64, 224, 150, 131, 112, 114, 178, 85, 122, 82, 163, 182, 93, 232, 47, 89, 172, 26, 142, 150, 112, 98, 233, 13, 181, 47, 2, 102, 116, 181, 114, 67, 92, 18, 107, 194, 59, 107, 149, 117, 115, 34, 253, 133, 95, 234, 230, 193, 74, 187, 213, 219, 98, 16, 147, 80, 30, 59, 112, 157, 156, 106, 177, 107, 159, 26, 164, 116, 255, 110, 208, 212, 107, 78, 36, 234, 241, 118, 172, 60, 81, 251, 90, 76, 230, 223, 228, 58, 96, 196, 204, 169, 134, 109, 16, 120, 8, 52, 127, 91, 242, 239, 229, 105, 58, 253, 141, 182, 67, 184, 150, 238, 31, 28, 195, 70, 52, 235, 205, 17, 190, 158, 130, 24, 55, 247, 116, 124, 54, 123, 87, 208, 241, 91, 84, 41, 244, 130, 139, 206, 10, 93, 89, 135, 18, 72, 105, 158, 3, 24, 56, 104, 196, 123, 152, 128, 96, 34, 96, 254, 87, 194, 62, 223, 97, 115, 39, 151, 47, 222, 25, 9, 241, 57, 158, 104, 201, 249, 149, 114, 147, 81, 157, 71, 162, 177, 225, 241, 146, 49, 73, 116, 80, 237, 199, 26, 11, 196, 77, 79, 13, 217, 242, 63, 219, 3, 252, 171, 88, 107, 222, 114, 29, 71, 46, 22, 174, 60, 166, 51, 20, 102, 26, 129, 213, 158, 68, 57, 14, 197, 144, 164, 243, 113, 105, 232, 237, 189, 2, 250, 245, 137, 136, 146, 27, 139, 136, 187, 56, 172, 123, 247, 232, 212, 18, 210, 155, 194, 128, 221, 82, 116, 212, 159, 119, 130, 62, 154, 166, 58, 70, 87, 35, 75, 93, 20, 176, 67, 249, 217, 198, 67, 167, 214, 251, 73, 116, 88, 48, 33, 178, 226, 120, 251, 114, 122, 229, 120, 19, 205, 240, 190, 208, 20, 180, 177, 76, 223, 218, 54, 133, 192, 200, 205, 77, 5, 159, 86, 176, 21, 25, 9, 253, 172, 188, 24, 22, 170, 82, 226, 238, 137, 252, 220, 8, 171, 181, 102, 51, 255, 103, 215, 167, 226, 208, 132, 56, 216, 126, 226, 234, 121, 141, 218, 63, 41, 42, 253, 209, 158, 247, 69, 240, 164, 134, 126, 3, 157, 138, 158, 246, 82, 16, 116, 88, 52, 3, 41, 215, 82, 152, 112, 209, 247, 230, 83, 117, 203, 43, 215, 194, 221, 100, 234, 79, 206, 126, 104, 109, 101, 148, 229, 160, 155, 221, 69, 154, 217, 169, 179, 208, 8, 220, 3, 244, 247, 63, 152, 49, 2, 44, 224, 70, 74, 181, 103, 102, 67, 81, 192, 242, 133, 206, 0, 108, 70, 71, 125, 16, 134, 62, 231, 115, 12, 23, 107, 247, 100, 158, 132, 66, 168, 222, 126, 207, 101, 101, 131, 193, 194, 244, 10, 254, 208, 232, 122, 193, 30, 53, 200, 98, 203, 237, 84, 64, 103, 211, 140, 63, 194, 186, 228, 225, 111, 154, 68, 10, 59, 160, 171, 196, 210, 22, 33, 131, 67, 116, 69, 195, 44, 201, 170, 75, 223, 51, 225, 186, 198, 150, 86, 188, 157, 227, 141, 179, 215, 49, 241, 114, 34, 77, 100, 226, 14, 242, 152, 165, 10, 141, 165, 147, 255, 189, 202, 252, 253, 143, 131, 48, 109, 227, 198, 172, 215, 72, 38, 67, 97, 74, 211, 45, 240, 153, 74, 15, 210, 60, 42, 60, 230, 67, 8, 89, 115, 75, 3, 240, 121, 36, 170, 78, 61, 242, 153, 202, 30, 38, 150, 57, 166, 140, 11, 105, 60, 67, 41, 16, 128, 15, 254, 73, 14, 54, 152, 22, 145, 200, 158, 89, 91, 53, 84, 150, 120, 164, 63, 22, 94, 163, 75, 117, 58, 169, 164, 230, 104, 55, 187, 70, 146, 255, 190, 209, 62, 177, 5, 17, 171, 169, 38, 146, 195, 112, 27, 170, 114, 51, 70, 159, 254, 219, 84, 125, 205, 97, 222, 167, 253, 98, 39, 170, 254, 32, 242, 251, 137, 77, 108, 78, 88, 171, 14, 8, 223, 60, 196, 27, 194, 111, 14, 67, 230, 104, 20, 39, 158, 205, 48, 127, 41, 124, 184, 235, 205, 223, 65, 146, 90, 14, 247, 146, 52, 80, 96, 55, 123, 177, 247, 127, 181, 236, 242, 249, 59, 190, 120, 97, 255, 26, 240, 214, 27, 122, 123, 182, 184, 237, 248, 7, 57, 54, 233, 177, 99, 224, 26, 120, 87, 83, 137, 104, 185, 198, 111, 84, 112, 7, 172, 19, 118, 167, 113, 31, 37, 153, 95, 160, 103, 126, 180, 75, 66, 113, 237, 93, 234, 68, 127, 22, 255, 43, 81, 122, 176, 205, 156, 169, 122, 81, 167, 56, 190, 8, 171, 195, 165, 20, 93, 213, 106, 127, 65, 233, 214, 66, 69, 243, 23, 222, 149, 131, 59, 247, 21, 205, 65, 98, 181, 46, 86, 253, 54, 152, 6, 231, 250, 105, 203, 179, 155, 59, 210, 181, 207, 168, 74, 37, 152, 177, 15, 159, 112, 116, 76, 74, 88, 125, 179, 108, 121, 101, 96, 28, 171, 57, 54, 177, 25, 36, 238, 220, 214, 177, 170, 107, 54, 91, 223, 246, 19, 54, 176, 136, 168, 89, 174, 119, 64, 254, 168, 16, 95, 201, 137, 49, 181, 116, 177, 112, 112, 8, 1, 90, 123, 48, 95, 43, 108, 107, 175, 23, 250, 109, 71, 82, 192, 248, 129, 165, 249, 64, 170, 2, 222, 179, 216, 145, 78, 231, 35, 24, 106, 253, 180, 104, 146, 45, 3, 219, 212, 142, 64, 125, 62, 128, 27, 78, 225, 99, 17, 6, 178, 108, 17, 30, 226, 242, 187, 46, 253, 62, 254, 46, 237, 122, 137, 216, 184, 211, 37, 184, 112, 251, 105, 182, 105, 16, 158, 239, 201, 152, 248, 128, 7, 117, 247, 163, 60, 197, 164, 70, 150, 132, 190, 38, 10, 168, 111, 136, 126, 59, 131, 235, 251, 101, 83, 228, 117, 216, 147, 180, 3, 8, 190, 102, 78, 241, 179, 223, 133, 87, 132, 100, 141, 58, 139, 213, 160, 116, 73, 64, 70, 81, 147, 64, 49, 138, 207, 1, 10, 108, 19, 230, 172, 32, 47, 79, 128, 209, 177, 174, 122, 89, 31, 26, 225, 78, 104, 39, 139, 97, 196, 153, 157, 246, 39, 100, 248, 166, 148, 238, 239, 238, 192, 97, 152, 218, 64, 73, 23, 144, 42, 239, 178, 232, 170, 35, 65, 235, 35, 60, 11, 67, 148, 78, 88, 220, 59, 25, 98, 231, 23, 160, 198, 88, 10, 88, 115, 92, 76, 108, 222, 86, 126, 111, 141, 135, 112, 138, 159, 221, 109, 143, 158, 104, 229, 50, 197, 25, 9, 169, 192, 86, 5, 160, 87, 91, 219, 60, 154, 169, 163, 216, 116, 39, 207, 90, 53, 198, 43, 0, 86, 110, 37, 171, 229, 18, 243, 20, 44, 238, 147, 120, 99, 118, 233, 246, 55, 173, 234, 107, 149, 50, 43, 197, 192, 140, 139, 38, 241, 141, 221, 32, 44, 95, 27, 121, 80, 149, 205, 43, 185, 140, 230, 179, 132, 18, 25, 13, 241, 195, 42, 226, 233, 147, 31, 41, 119, 105, 10, 102, 198, 44, 103, 124, 65, 131, 245, 91, 24, 90, 222, 176, 167, 50, 198, 200, 133, 46, 206, 137, 164, 116, 7, 189, 125, 155, 22, 60, 96, 30, 120, 111, 34, 84, 247, 55, 193, 233, 134, 219, 231, 119, 73, 33, 199, 124, 47, 189, 235, 75, 195, 64, 163, 97, 14, 196, 157, 174, 250, 147, 216, 51, 104, 255, 110, 52, 77, 243, 188, 223, 30, 231, 106, 204, 125, 227, 42, 193, 192, 13, 91, 35, 239, 230, 17, 176, 168, 220, 239, 225, 170, 124, 157, 230, 85, 54, 170, 237, 151, 33, 25, 195, 98, 91, 109, 139, 187, 74, 33, 169, 13, 139, 161, 99, 51, 135, 214, 187, 40, 94, 98, 102, 148, 27, 11, 239, 171, 235, 88, 237, 233, 148, 176, 183, 55, 230, 66, 237, 76, 224, 175, 35, 193, 17, 98, 59, 199, 127, 52, 215, 173, 62, 77, 181, 169, 27, 88, 20, 3, 66, 9, 245, 197, 32, 125, 246, 252, 105, 204, 135, 210, 250, 93, 232, 106, 206, 121, 38, 112, 173, 161, 87, 209, 228, 24, 185, 252, 223, 193, 38, 247, 147, 81, 50, 109, 201, 232, 200, 97, 1, 37, 8, 2, 200, 102, 125, 110, 27, 22, 110, 225, 82, 13, 77, 164, 115, 179, 9, 109, 144, 96, 65, 13, 25, 43, 118, 24, 155, 229, 16, 236, 68, 111, 0, 145, 238, 59, 196, 239, 3, 151, 194, 87, 118, 61, 88, 37, 69, 33, 214, 43, 94, 94, 78, 66, 217, 38, 169, 49, 94, 121, 226, 103, 196, 82, 13, 253, 2, 243, 237, 180, 244, 140, 127, 222, 51, 162, 239, 149, 214, 47, 61, 140, 186, 93, 127, 121, 171, 97, 75, 244, 199, 55, 78, 231, 225, 190, 68, 33, 165, 46, 49, 172, 195, 205, 128, 8, 63, 21, 201, 57, 152, 230, 106, 254, 156, 174, 54, 86, 106, 239, 62, 96, 44, 247, 211, 97, 145, 148, 246, 116, 55, 86, 46, 212, 46, 227, 161, 229, 248, 133, 205, 173, 114, 115, 212, 81, 186, 238, 21, 192, 120, 65, 239, 91, 170, 152, 102, 88, 78, 113, 49, 223, 161, 58, 51, 221, 111, 60, 31, 120, 148, 133, 151, 136, 48, 225, 92, 146, 175, 138, 34, 239, 66, 173, 131, 109, 161, 35, 63, 84, 206, 85, 32, 154, 143, 163, 151, 99, 0, 172, 68, 150, 108, 73, 174, 55, 174, 168, 34, 202, 135, 206, 144, 180, 50, 144, 253, 11, 68, 139, 197, 183, 41, 168, 12, 253, 206, 9, 206, 173, 152, 236, 21, 251, 10, 32, 186, 19, 230, 249, 228, 178, 54, 214, 64, 80, 183, 101, 151, 253, 127, 44, 10, 163, 91, 150, 77, 64, 112, 137, 149, 6, 188, 158, 137, 17, 86, 129, 205, 78, 96, 163, 161, 175, 223, 27, 186, 17, 229, 117, 215, 51, 192, 56, 23, 42, 31, 199, 83, 71, 17, 166, 55, 63, 182, 14, 200, 75, 193, 211, 136, 237, 149, 65, 241, 107, 211, 233, 191, 144, 181, 5, 26, 71, 205, 2, 129, 89, 99, 106, 138, 205, 200, 198, 2, 164, 92, 39, 22, 221, 253, 54, 134, 121, 188, 204, 39, 66, 96, 18, 31, 181, 218, 15, 50, 196, 2, 44, 45, 237, 173, 186, 171, 215, 163, 148, 65, 14, 95, 241, 17, 222, 121, 70, 198, 113, 250, 55, 102, 112, 36, 153, 137, 188, 46, 22, 49, 40, 144, 79, 168, 169, 132, 241, 38, 112, 88, 71, 169, 212, 138, 234, 167, 32, 56, 101, 252, 143, 96, 190, 85, 53, 54, 65, 106, 222, 29, 2, 163, 101, 225, 195, 0, 180, 159, 163, 147, 76, 137, 213, 91, 226, 23, 25, 10, 221, 82, 106, 27, 221, 138, 134, 45, 61, 122, 194, 185, 253, 7, 164, 40, 72, 41, 119, 80, 123, 62, 66, 57, 2, 177, 124, 54, 122, 237, 129, 225, 45, 50, 158, 127, 189, 67, 156, 211, 81, 216, 222, 196, 177, 160, 107, 202, 21, 8, 40, 31, 60, 49, 182, 40, 230, 54, 74, 144, 243, 25, 29, 141, 179, 142, 167, 3, 11, 77, 134, 39, 58, 189, 132, 206, 115, 103, 90, 212, 185, 208, 94, 5, 99, 208, 3, 48, 243, 84, 126, 137, 123, 186, 146, 235, 236, 37, 184, 188, 147, 46, 14, 139, 102, 147, 105, 51, 128, 10, 153, 244, 26, 64, 61, 149, 30, 11, 92, 215, 255, 110, 120, 237, 78, 72, 182, 215, 221, 247, 100, 249, 91, 14, 109, 237, 56, 88, 158, 242, 131, 39, 142, 8, 135, 149, 245, 116, 246, 84, 202, 141, 172, 16, 5, 18, 188, 4, 93, 181, 224, 180, 140, 67, 188, 240, 193, 209, 49, 132, 184, 208, 9, 31, 146, 4, 175, 10, 167, 230, 167, 213, 245, 240, 177, 176, 50, 123, 85, 168, 149, 243, 147, 181, 40, 140, 95, 89, 104, 116, 71, 74, 237, 89, 47, 42, 2, 242, 147, 205, 117, 155, 84, 67, 82, 97, 10, 147, 84, 40, 20, 165, 79, 118, 31, 106, 142, 10, 50, 58, 217, 20, 248, 102, 128, 120, 228, 179, 88, 79, 60, 62, 244, 82, 102, 197, 229, 192, 152, 190, 64, 165, 115, 173, 144, 61, 43, 4, 203, 241, 254, 190, 103, 216, 145, 29, 14, 71, 24, 75, 31, 100, 88, 67, 231, 77, 240, 89, 111, 60, 70, 94, 55, 235, 64, 134, 106, 59, 215, 148, 218, 231, 81, 248, 85, 198, 215, 41, 238, 60, 248, 7, 174, 220, 135, 106, 221, 167, 182, 44, 7, 250, 204, 6, 77, 118, 213, 130, 90, 157, 251, 29, 70, 17, 83, 80, 154, 33, 244, 176, 39, 41, 91, 239, 58, 102, 116, 5, 65, 10, 12, 5, 1, 168, 50, 17, 129, 27, 61, 56, 224, 191, 132, 174, 113, 155, 43, 45, 198, 106, 185, 15, 120, 136, 138, 58, 11, 187, 74, 94, 189, 137, 150, 246, 10, 233, 62, 60, 110, 73, 94, 203, 211, 4, 69, 161, 72, 163, 108, 105, 148, 35, 38, 77, 138, 80, 46, 233, 231, 125, 166, 248, 81, 225, 0, 234, 203, 170, 74, 238, 34, 255, 123, 35, 143, 30, 94, 170, 189, 175, 73, 122, 160, 200, 245, 29, 205, 116, 87, 118, 34, 239, 240, 63, 44, 146, 82, 193, 193, 35, 103, 239, 116, 15, 10, 72, 163, 247, 239, 162, 237, 228, 31, 130, 134, 35, 197, 195, 8, 10, 76, 214, 196, 175, 105, 71, 11, 242, 1, 115, 167, 150, 230, 94, 40, 234, 97, 120, 250, 234, 129, 59, 126, 1, 133, 167, 26, 49, 201, 175, 112, 135, 242, 128, 21, 240, 38, 143, 76, 205, 29, 90, 131, 97, 242, 119, 35, 44, 92, 246, 193, 96, 212, 143, 226, 80, 234, 112, 178, 48, 155, 215, 218, 176, 80, 47, 113, 13, 232, 143, 233, 180, 43, 140, 194, 161, 97, 212, 104, 157, 23, 42, 138, 33, 131, 76, 242, 233, 144, 88, 110, 140, 134, 74, 0, 17, 85] + ], + "segmentSize": null + }, + { + "encrypted": [ + [70, 195, 216] + ], + "iv": null, + "key": [218, 153, 44, 106, 183, 105, 92, 145, 14, 137, 204, 176, 116, 163, 31, 67, 148, 55, 13, 161, 22, 53, 118, 222], + "modeOfOperation": "ctr", + "plaintext": [ + [36, 231, 155] + ], + "segmentSize": null + }, + { + "encrypted": [ + [171, 146, 88, 186, 165, 228, 18, 65, 32, 81, 198, 77, 20, 217, 8, 25] + ], + "iv": null, + "key": [150, 42, 69, 137, 181, 148, 25, 173, 153, 178, 192, 132, 127, 220, 222, 52, 122, 49, 181, 61, 236, 255, 226, 238], + "modeOfOperation": "ctr", + "plaintext": [ + [143, 200, 43, 230, 38, 243, 160, 227, 119, 115, 90, 243, 194, 235, 94, 55] + ], + "segmentSize": null + }, + { + "encrypted": [ + [17, 23, 34, 203, 186, 237, 115, 91, 246, 115, 134, 49, 202, 6, 117, 149, 230, 123, 223, 83, 121, 250, 20, 157, 111, 22, 17, 150, 232, 13, 97, 39, 145, 57, 154, 13, 60, 192, 199, 180, 249, 29, 136, 152, 100, 114, 21, 212, 251, 76, 65, 123, 4, 70, 120, 88, 237, 190, 215, 144, 206, 230, 174, 82, 96, 7, 107, 33, 68, 112, 178, 170, 56, 6, 209, 76, 133, 173, 49, 5, 121, 232, 125, 192, 170, 20, 61, 161, 96, 136, 254, 79, 54, 67, 40, 146, 184, 246, 3, 83, 232, 57, 24, 139, 106, 84, 174, 129, 155, 180, 48, 70, 22, 118, 98, 101, 63, 168, 156, 9, 120, 151, 141, 196, 48, 26, 75] + ], + "iv": null, + "key": [131, 13, 58, 53, 219, 168, 177, 247, 225, 25, 241, 137, 27, 43, 73, 236, 159, 210, 72, 40, 89, 187, 37, 52], + "modeOfOperation": "ctr", + "plaintext": [ + [61, 113, 222, 206, 181, 73, 64, 88, 121, 71, 49, 32, 195, 14, 199, 110, 236, 214, 131, 73, 11, 156, 74, 113, 220, 135, 204, 18, 15, 122, 22, 141, 185, 197, 9, 74, 26, 254, 221, 52, 39, 141, 96, 122, 193, 22, 47, 249, 110, 195, 197, 181, 183, 202, 249, 160, 38, 144, 29, 83, 38, 55, 11, 206, 41, 53, 97, 95, 113, 222, 87, 41, 74, 193, 244, 178, 56, 182, 147, 138, 62, 179, 51, 192, 191, 211, 11, 86, 115, 161, 228, 0, 106, 69, 204, 238, 135, 157, 9, 53, 76, 169, 127, 172, 168, 37, 197, 105, 103, 150, 92, 90, 186, 93, 196, 187, 1, 154, 250, 232, 179, 23, 134, 247, 209, 214, 66] + ], + "segmentSize": null + }, + { + "encrypted": [ + [85, 246, 150, 252, 49, 173, 183, 57, 103, 119, 155, 127, 72, 54, 201, 155, 197, 215, 131, 208, 23, 152, 249, 52, 4, 42, 210, 78, 82, 203, 248, 46, 103, 231, 204, 113, 31, 134, 160, 111, 151, 21, 19, 41, 12, 217, 225, 173, 46, 140, 53, 61, 139, 1, 249, 122, 13, 88, 97, 28, 53, 135, 224, 233, 155, 126, 150, 104, 138, 191, 229, 166, 89, 207, 59, 127, 74, 238, 104, 237, 10, 165, 192, 162, 114, 94, 13, 110, 237, 238, 80, 14, 24, 146, 21, 73, 177, 52, 59, 126, 34, 163, 89, 45, 233, 66, 99, 110, 16, 16, 93, 180, 63, 241, 64, 253, 204, 55, 59, 204, 237, 168, 33, 122, 221, 186, 102, 209] + ], + "iv": null, + "key": [249, 103, 70, 85, 126, 14, 20, 169, 204, 166, 185, 160, 1, 129, 61, 57, 248, 203, 18, 62, 87, 61, 171, 205], + "modeOfOperation": "ctr", + "plaintext": [ + [202, 45, 134, 91, 157, 93, 151, 104, 118, 14, 117, 21, 100, 76, 160, 81, 66, 200, 90, 81, 16, 125, 144, 57, 169, 179, 21, 89, 233, 133, 221, 89, 194, 251, 24, 5, 179, 178, 220, 253, 205, 194, 146, 69, 82, 216, 129, 159, 173, 147, 131, 26, 102, 30, 2, 223, 244, 160, 211, 201, 161, 231, 37, 218, 215, 198, 85, 214, 45, 127, 33, 109, 162, 169, 252, 85, 126, 148, 192, 40, 222, 137, 189, 104, 143, 11, 99, 195, 133, 49, 223, 252, 115, 85, 36, 0, 53, 57, 22, 158, 213, 230, 56, 203, 47, 193, 183, 81, 149, 86, 59, 111, 108, 119, 57, 82, 64, 46, 209, 61, 217, 162, 114, 98, 120, 65, 119, 69] + ], + "segmentSize": null + }, + { + "encrypted": [ + [26, 99, 164, 171, 173, 170, 119, 108, 231, 114, 66, 207, 55, 7, 139, 190, 101, 76, 139, 102, 133, 199, 187, 76, 80, 171, 137, 49, 100, 130, 117, 126, 58, 136, 52, 117, 112, 167, 152, 154, 221, 240, 4, 148, 133, 151, 139, 240, 227, 0, 45, 117, 56, 167, 203, 234, 95, 120, 13, 105, 165, 108, 17, 6, 94, 104, 219, 147, 10, 137, 212, 30, 73, 145, 34, 42, 209, 22, 23, 229, 238, 112, 52, 97, 64, 103, 178, 177, 87, 244, 157, 37, 48, 68, 84, 238, 6, 177, 27, 89, 40, 248, 88, 74, 76, 21, 16, 40, 116, 100, 159, 99, 72, 111, 141, 65, 217, 72, 233, 42, 111, 25, 62, 62, 98, 50, 240, 125, 134] + ], + "iv": null, + "key": [227, 152, 228, 162, 75, 202, 131, 72, 3, 244, 228, 32, 106, 112, 18, 24, 162, 247, 121, 62, 44, 219, 224, 246], + "modeOfOperation": "ctr", + "plaintext": [ + [235, 97, 7, 171, 186, 214, 109, 63, 71, 102, 18, 144, 121, 81, 84, 97, 52, 180, 142, 219, 57, 97, 244, 227, 21, 91, 100, 19, 105, 2, 130, 54, 231, 172, 39, 39, 105, 127, 91, 47, 5, 65, 207, 1, 38, 47, 124, 224, 53, 196, 237, 146, 222, 169, 12, 168, 62, 186, 31, 169, 35, 24, 107, 189, 194, 189, 98, 175, 181, 254, 224, 241, 162, 1, 176, 224, 245, 65, 15, 166, 86, 145, 151, 112, 44, 21, 102, 119, 160, 235, 151, 244, 200, 29, 94, 84, 209, 29, 232, 245, 194, 128, 216, 253, 187, 236, 221, 169, 60, 102, 198, 71, 65, 67, 131, 43, 122, 114, 33, 195, 122, 172, 26, 50, 1, 246, 109, 255, 230] + ], + "segmentSize": null + }, + { + "encrypted": [ + [181, 158, 22, 151, 65, 9, 255, 238, 62, 231, 171, 81, 88, 93, 177, 75, 210, 63, 53, 35, 74, 45, 53, 94, 68, 124, 182, 18, 66, 16, 7, 203, 241, 76, 18, 86, 108, 224, 238, 73, 164, 228, 93, 77, 18, 38, 142, 196, 242, 48, 178, 183, 81, 125, 199, 47, 116, 208, 111, 156, 156, 97, 113, 28, 135, 34, 70, 219, 154, 222, 71, 49, 154, 190, 128, 81, 127, 154, 2, 27, 66, 166, 232, 80, 169, 213, 48, 192, 79, 16, 25, 19, 119, 16, 199, 57, 235, 70, 229, 37, 251, 123, 96, 3, 16, 161, 115, 71, 224, 91, 169, 17, 204, 158, 187, 252, 17, 97, 93, 121, 118, 88, 2, 114, 221, 222, 29, 184, 164, 161, 127, 147, 156, 211, 100, 211, 34, 181, 163, 7, 115, 46, 189, 177, 159, 174, 39, 141, 88, 249, 23, 123, 121, 98, 144, 23, 125, 146, 188, 146, 230, 120, 214, 166, 180, 71, 110, 178, 60, 51, 174, 131, 165, 85, 158, 181, 234, 56, 117, 200, 93, 27, 28, 65, 12, 208, 243, 140, 80, 14, 30, 31, 29, 220, 131, 197, 223, 198, 94, 162, 237, 100, 186, 82, 196, 114, 216, 108, 39, 33, 16, 29, 195, 209, 130, 31, 180, 146, 61, 141, 91, 148, 145, 248, 46, 49, 221, 136, 178, 232, 126, 37, 45, 221, 1, 23, 226, 184, 204, 146, 134, 69, 169, 187, 162, 49, 38, 79, 60, 33, 230, 51, 200, 32, 158, 159, 87, 129, 104, 142, 41, 31, 27, 106, 133, 97, 226, 209, 76, 154, 164, 89, 44, 153, 6, 209, 129, 199, 172, 104, 244, 24, 1, 116, 195, 70, 58, 131, 156, 194, 52, 21, 144, 187, 182, 207, 69, 211, 200, 88, 40, 66, 169, 64, 240, 143, 171, 166, 87, 239, 156, 20, 249, 162, 205, 225, 172, 89, 69, 177, 44, 93, 101, 86, 144, 211, 144, 231, 73, 246, 207, 216, 149, 50, 213, 31, 114, 210, 232, 15, 23, 152, 180, 255, 6, 247, 58, 62, 173, 1, 67, 76, 213, 254, 253, 120, 25, 210, 182, 46, 118, 222, 134, 214, 64, 241, 38, 4, 193, 190, 1, 129, 188, 116, 15, 30, 59, 254, 16, 3, 119, 210, 243, 59, 155, 71, 63, 68, 105, 176, 81, 93, 253, 118, 244, 220, 184, 138, 243, 20, 37, 178, 31, 141, 143, 72, 104, 200, 102, 170, 130, 232, 141, 56, 227, 108, 40, 4, 12, 98, 251, 183, 137, 198, 112, 97, 204, 77, 164, 82, 194, 17, 19, 235, 127, 195, 82, 86, 183, 212, 207, 239, 82, 147, 211, 53, 127, 61, 92, 71, 164, 3, 136, 151, 130, 15, 86, 108, 144, 120, 148, 158, 131, 36, 7, 249, 193, 94, 48, 35, 24, 161, 72, 121, 167, 222, 5, 159, 206, 228, 114, 221, 36, 88, 128, 190, 52, 45, 120, 224, 194, 151, 229, 85, 89, 240, 21, 163, 129, 106, 152, 238, 11, 154, 21, 129, 37, 70, 75, 154, 70, 157, 234, 170, 127, 18, 64, 55, 125, 44, 190, 118, 176, 54, 125, 90, 210, 164, 92, 191, 105, 215, 158, 56, 114, 27, 45, 235, 15, 70, 34, 196, 74, 158, 223, 146, 39, 236, 211, 95, 187, 184, 246, 146, 156, 77, 30, 168, 189, 231, 41, 245, 236, 165, 141, 25, 118, 193, 253, 87, 224, 218, 90, 74, 77, 91, 46, 147, 102, 229, 132, 165, 214, 83, 31, 19, 5, 203, 20, 96, 104, 117, 16, 164, 103, 58, 220, 196, 107, 99, 112, 212, 230, 127, 65, 185, 247, 10, 147, 234, 96, 238, 204, 89, 221, 169, 97, 57, 250, 17, 121, 252, 100, 178, 29, 41, 9, 108, 22, 22, 179, 235, 140, 172, 25, 238, 126, 246, 50, 44, 227, 199, 254, 152, 215, 177, 119, 38, 83, 163, 71, 63, 102, 63, 63, 131, 35, 80, 105, 145, 52, 72, 200, 38, 43, 66, 24, 224, 27, 33, 60, 118, 77, 79, 102, 87, 222, 230, 3, 193, 165, 146, 76, 24, 52, 130, 103, 130, 15, 92, 82, 19, 167, 159, 133, 110, 83, 145, 15, 197, 117, 96, 123, 83, 213, 177, 152, 148, 87, 136, 185, 247, 226, 44, 102, 149, 119, 208, 5, 48, 163, 164, 120, 37, 170, 191, 217, 138, 70, 157, 205, 6, 57, 154, 186, 50, 134, 74, 27, 21, 182, 60, 109, 32, 169, 58, 186, 14, 186, 55, 167, 57, 233, 37, 241, 158, 212, 76, 193, 31, 239, 176, 8, 103, 142, 75, 43, 199, 78, 117, 230, 142, 130, 105, 128, 214, 106, 6, 88, 253, 76, 126, 98, 38, 71, 4, 174, 174, 90, 156, 121, 117, 160, 199, 140, 90, 9, 212, 19, 50, 45, 66, 67, 96, 33, 158, 132, 210, 230, 97, 212, 159, 5, 81, 149, 44, 124, 118, 131, 19, 221, 100, 157, 16, 82, 251, 71, 234, 213, 240, 133, 110, 248, 253, 70, 112, 39, 210, 207, 44, 42, 77, 34, 55, 234, 1, 96, 230, 50, 59, 181, 75, 174, 243, 92, 156, 177, 208, 216, 81, 133, 101, 23, 243, 219, 243, 45, 95, 137, 203, 167, 33, 71, 154, 250, 244, 160, 236, 232, 33, 84, 132, 66, 203, 42, 218, 50, 151, 203, 96, 32, 30, 175, 66, 170, 148, 236, 24, 179, 166, 9, 203, 18, 238, 159, 78, 108, 202, 200, 225, 185, 93, 78, 57, 6, 239, 105, 16, 35, 93, 148, 67, 162, 229, 183, 75, 49, 128, 41, 172, 124, 131, 242, 186, 235, 71, 67, 229, 126, 94, 74, 68, 26, 36, 233, 59, 108, 218, 47, 83, 213, 154, 146, 44, 252, 200, 101, 8, 119, 52, 105, 51, 201, 67, 241, 215, 23, 196, 13, 81, 196, 190, 209, 15, 225, 115, 54, 53, 241, 160, 126, 182, 194, 236, 66, 26, 240, 54, 52, 79, 222, 71, 86, 76, 131, 126, 62, 170, 163, 157, 119, 185, 29, 174, 34, 41, 195, 60, 145, 35, 115, 235, 135, 153, 40, 219, 172, 170, 89, 111, 196, 46, 182, 92, 55, 215, 114, 24, 79, 77, 116, 19, 0, 232, 14, 227, 232, 166, 208, 211, 96, 66, 25, 148, 28, 247, 127, 63, 255, 9, 161, 144, 245, 101, 90, 145, 240, 233, 195, 83, 33, 116, 105, 78, 116, 79, 43, 90, 64, 128, 3, 128, 215, 130, 113, 231, 46, 121, 137, 57, 191, 243, 182, 69, 249, 188, 194, 166, 164, 20, 2, 61, 76, 211, 2, 113, 59, 252, 62, 254, 108, 161, 126, 198, 160, 146, 185, 210, 70, 91, 156, 40, 102, 53, 29, 37, 132, 135, 200, 165, 78, 173, 32, 51, 81, 169, 119, 202, 133, 0, 123, 5, 79, 49, 95, 37, 49, 21, 218, 110, 154, 191, 179, 77, 107, 162, 40, 12, 240, 243, 167, 14, 49, 247, 73, 37, 34, 201, 3, 82, 173, 82, 116, 180, 189, 91, 133, 102, 47, 241, 199, 135, 199, 241, 6, 162, 229, 113, 135, 190, 243, 191, 60, 29, 140, 38, 23, 253, 231, 237, 97, 37, 24, 5, 57, 126, 218, 106, 35, 214, 183, 71, 205, 25, 83, 224, 21, 197, 96, 110, 169, 165, 171, 253, 106, 158, 12, 133, 131, 59, 118, 139, 0, 2, 184, 177, 112, 104, 210, 128, 115, 204, 205, 136, 24, 114, 51, 163, 21, 89, 218, 201, 220, 233, 231, 61, 59, 6, 170, 4, 194, 46, 215, 131, 157, 174, 80, 63, 15, 160, 176, 219, 237, 202, 123, 3, 149, 192, 89, 223, 61, 57, 194, 8, 242, 67, 162, 57, 174, 36, 188, 5, 53, 231, 93, 106, 119, 52, 225, 162, 3, 28, 74, 224, 60, 78, 99, 25, 91, 115, 235, 52, 20, 12, 228, 71, 217, 95, 81, 96, 7, 149, 109, 179, 231, 228, 80, 156, 123, 160, 173, 240, 179, 13, 135, 26, 43, 189, 83, 20, 251, 95, 188, 189, 130, 48, 232, 71, 222, 29, 25, 25, 77, 194, 66, 18, 92, 228, 160, 194, 124, 66, 225, 133, 232, 236, 51, 31, 204, 207, 188, 226, 162, 39, 136, 45, 69, 115, 185, 192, 117, 226, 185, 75, 43, 193, 58, 187, 50, 214, 33, 180, 56, 185, 216, 245, 176, 60, 54, 93, 89, 91, 185, 58, 32, 161, 204, 246, 138, 147, 222, 59, 200, 119, 173, 5, 244, 55, 253, 169, 79, 200, 236, 152, 144, 196, 23, 178, 14, 142, 223, 141, 53, 98, 197, 41, 238, 209, 243, 166, 235, 235, 94, 168, 172, 229, 101, 202, 202, 205, 150, 174, 9, 144, 152, 138, 19, 219, 90, 4, 82, 118, 209, 151, 112, 28, 189, 35, 173, 96, 240, 69, 89, 168, 218, 199, 249, 110, 74, 79, 180, 187, 51, 75, 105, 178, 227, 148, 99, 159, 202, 150, 202, 160, 170, 94, 192, 45, 20, 242, 31, 98, 48, 194, 203, 146, 88, 90, 46, 228], + [202, 171, 245, 95, 156, 107, 171, 87, 26, 109, 234, 43, 101, 86, 134, 154, 199, 65, 240, 51, 182, 94, 165, 116, 19, 81, 190, 82, 255, 27, 230, 173, 91, 143, 129, 119, 190, 229, 220, 85, 152, 195, 3, 32, 142, 120, 253, 130, 80, 94, 160, 45, 142, 253, 91, 8, 91, 171, 98, 14, 176, 51, 219, 36, 114, 59, 243, 91, 39, 243, 192, 179, 132, 98, 116, 43, 124, 233, 208, 118, 161, 232, 118, 191, 85, 0, 238, 230, 75, 141, 76, 232, 149, 25, 34, 215, 188, 214, 11, 63, 195, 55, 86, 36, 57, 86, 84, 108, 212, 147, 39, 253, 229, 231, 41, 175, 64, 25, 87, 186, 224, 55, 127, 70, 131, 96, 162, 29, 74, 241, 190, 29, 130, 30, 82, 127, 191, 210, 228, 175, 140, 72, 227, 158, 35, 65, 78, 192, 230, 120, 90, 44, 124, 17, 227, 249, 0, 54, 191, 129, 184, 129, 228, 72, 107, 221, 86, 162, 194, 25, 112, 164, 230, 87, 72, 202, 209, 34, 0, 31, 242, 221, 65, 222, 239, 121, 237, 50, 181, 97, 226, 237, 122, 17, 146, 68, 142, 38, 80, 151, 40, 98, 25, 246, 26, 23, 53, 239, 185, 240, 159, 159, 176, 16, 107, 147, 73, 192, 246, 98, 89, 216, 109, 193, 250, 26, 62, 42, 33, 17, 222, 199, 131, 128, 101, 12, 174, 116, 133, 32, 38, 80, 65, 191, 5, 60, 176, 242, 220, 140, 34, 167, 221, 41, 221, 48, 140, 241, 59, 138, 56, 174, 11, 165, 96, 104, 222, 161, 32, 113, 68, 104, 150, 89, 41, 220, 170, 152, 63, 149, 144, 244, 47, 118, 118, 35, 48, 190, 135, 157, 20, 86, 142, 111, 158, 167, 84, 107, 119, 56, 45, 1, 221, 85, 10, 240, 245, 170, 99, 32, 11, 197, 221, 46, 245, 252, 134, 221, 34, 101, 251, 89, 38, 62, 223, 37, 225, 219, 167, 177, 141, 121, 168, 40, 15, 28, 161, 77, 178, 230, 113, 136, 60, 28, 183, 49, 250, 80, 70, 223, 88, 79, 237, 250, 93, 115, 110, 190, 143, 229, 29, 181, 110, 27, 248, 2, 85, 136, 52, 92, 77, 152, 229, 193, 133, 238, 111, 128, 23, 213, 118, 226, 231, 38, 86, 67, 202, 226, 217, 177, 65, 171, 120, 220, 253, 107, 81, 60, 155, 253, 176, 241, 201, 199, 152, 15, 226, 168, 136, 79, 138, 224, 132, 203, 51, 95, 153, 170, 19, 3, 140, 230, 23, 166, 6, 55, 186, 70, 72, 44, 100, 97, 229, 131, 1, 70, 3, 183, 128, 178, 136, 242, 152, 10, 194, 82, 63, 215, 198, 52, 54, 32, 207, 54, 197, 205, 228, 76, 122, 206, 185, 18, 190, 101, 0, 182, 254, 160, 90, 247, 225, 100, 45, 21, 85, 223, 154, 81, 222, 15, 158, 218, 162, 183, 225, 44, 34, 112, 63, 106, 206, 227, 79, 67, 155, 84, 175, 133, 202, 169, 107, 10, 68, 138, 233, 114, 39, 225, 199, 145, 103, 94, 113, 246, 89, 51, 248, 208, 20, 198, 16, 227, 127, 33, 204, 225, 229, 50, 131, 111, 245, 29, 5, 220, 209, 29, 241, 9, 94, 114, 149, 55, 138, 142, 178, 151, 138, 198, 6, 248, 212, 30, 3, 90, 22, 167, 104, 200, 53, 144, 185, 78, 106, 127, 105, 128, 159, 9, 44, 36, 208, 27, 239, 40, 215, 250, 178, 237, 89, 198, 174, 104, 220, 179, 126, 246, 151, 78, 222, 14, 0, 47, 141, 79, 119, 112, 212, 43, 164, 94, 135, 255, 56, 119, 192, 236, 200, 64, 27, 77, 87, 162, 188, 26, 173, 91, 184, 188, 34, 122, 5, 42, 50, 63, 109, 175, 141, 155, 147, 149, 118, 126, 51, 205, 72, 123, 37, 58, 85, 177, 16, 110, 61, 200, 62, 222, 130, 30, 8, 31, 11, 74, 155, 217, 19, 136, 215, 7, 200, 165, 63, 181, 115, 254, 17, 162, 214, 218, 115, 57, 122, 5, 122, 219, 153, 128, 237, 92, 80, 89, 245, 77, 21, 217, 6, 162, 31, 153, 147, 52, 153, 25, 135, 133, 236, 223, 45, 38, 223, 139, 226, 21, 30, 52, 141, 201, 225, 67, 34, 87, 26, 91, 15, 121, 136, 161, 190, 75, 141, 109, 135, 215, 148, 32, 195, 0, 134, 251, 182, 253, 189, 104, 156, 116, 119, 44, 200, 249, 61, 165, 132, 142, 208, 123, 217, 198, 14, 44, 148, 228, 69, 153, 112, 82, 21, 160, 90, 121, 251, 135, 9, 115, 169, 25, 51, 112, 27, 91, 242, 113, 158, 44, 167, 3, 87, 67, 164, 201, 202, 245, 163, 32, 33, 226, 230, 96, 122, 191, 145, 84, 149, 1, 103, 215, 132, 121, 159, 60, 249, 153, 205, 34, 72, 221, 215, 119, 125, 157, 62, 85, 249, 221, 119, 48, 124, 253, 132, 126, 154, 215, 229, 104, 172, 82, 15, 43, 233, 233, 80, 10, 174, 165, 148, 179, 151, 21, 88, 95, 221, 121, 55, 255, 227, 8, 45, 213, 175, 149, 230, 184, 84, 249, 9, 181, 203, 220, 1, 66, 122, 242, 254, 168, 92, 135, 161, 213, 33, 81, 32, 15, 11, 136, 221, 79, 33, 102, 240, 127, 52, 17, 81, 196, 32, 162, 240, 108, 107, 49, 113, 220, 182, 153, 0, 17, 219, 93, 229, 250, 58, 52, 93, 143, 137, 98, 60, 57, 39, 5, 70, 11, 203, 156, 188, 188, 141, 133, 220, 38, 44, 202, 198, 166, 122, 72, 115, 242, 93, 225, 248, 0, 17, 58, 156, 52, 16, 91, 103, 238, 31, 183, 62, 88, 199, 230, 151, 211, 28, 253, 78, 236, 222, 61, 89, 171, 74, 14, 184, 250, 221, 113, 83, 187, 129, 46, 86, 65, 173, 20, 151, 61, 24, 84, 159, 213, 228, 66, 181, 192, 168, 7, 249, 188, 26, 114, 100, 45, 48, 1, 195, 223, 85, 164, 100, 136, 251, 115, 57, 238, 93, 142, 7, 151, 30, 82, 228, 211, 242, 55, 46, 41, 164, 133, 72, 247, 27, 152, 63, 105, 59, 107, 32, 174, 18, 45, 148, 25, 88, 97, 3, 80, 199, 232, 144, 127, 235, 253, 213, 19, 62, 126, 159, 225, 21, 203, 82, 139, 191, 140, 82, 122, 212, 195, 162, 40, 90, 17, 90, 174, 99, 199, 170, 249, 246, 91, 98, 8, 143, 163, 33, 32, 124, 98, 203, 93, 45, 3, 219, 132, 47, 48, 1, 244, 105, 50, 82, 17, 247, 247, 53, 145, 142, 126, 227, 143, 90, 1, 106, 216, 154, 190, 41, 253, 60, 64, 191, 115, 87, 102, 48, 40, 137, 144, 131, 37, 34, 163, 72, 7, 129, 191, 211, 7, 156, 38, 175, 126, 152, 90, 55, 169, 29, 20, 159, 135, 55, 64, 180, 41, 139, 155, 28, 72, 249, 204, 31, 113, 84, 65, 212, 207, 101, 187, 172, 212, 61, 246, 34, 65, 117, 79, 41, 76, 64, 221, 142, 31, 235, 235, 200, 123, 110, 81, 255, 162, 246, 2, 80, 238, 235, 103, 83, 197, 219, 232, 163, 153, 59, 226, 106, 61, 160, 104, 173, 153, 174, 167, 242, 188, 69, 98, 244, 111, 36, 30, 204, 40, 238, 106, 24, 79, 36, 221, 130, 22, 206, 126, 173, 202, 13, 221, 111, 242, 41, 185, 162, 46, 28, 240, 164, 85, 127, 19, 224, 62, 75, 81, 162, 60, 117, 33, 108, 22, 47, 49, 35, 183, 162, 180, 57, 33, 83, 86, 101, 148, 25, 52, 75, 239, 176, 17, 233, 189, 127, 172, 70, 42, 236, 146, 129, 240, 188, 127, 84, 139, 92, 205, 251, 165, 217, 195, 51, 197, 218, 23, 175, 213, 73, 49, 0, 8, 135, 185, 18, 89, 18, 233, 49, 226, 176, 209, 133, 216, 141, 193, 207, 170, 66, 195, 182, 57, 13, 54, 105, 124, 147, 167, 198, 188, 86, 23, 202, 34, 45, 125, 191, 64, 188, 15, 181, 0, 230, 234, 43, 253, 30, 141, 115, 153, 69, 193, 81, 91, 162, 166, 178, 245, 180, 162, 22, 115, 185, 108, 94, 76, 1, 202, 80, 74, 191, 62, 48, 16, 61, 94, 161, 80, 15, 66, 86, 76, 217, 127, 102, 173, 216, 220, 78, 195, 61, 3, 251, 28, 116, 26, 74, 9, 14, 211, 218, 185, 131, 34, 18, 89, 121, 173, 221, 175, 211, 177, 67, 146, 59, 2, 74, 66, 242, 128, 74, 251, 84, 63, 30, 227, 19, 245, 185, 184, 161, 149, 163, 205, 153, 251, 6, 181, 164, 63, 23, 197, 61, 127, 125, 117, 42, 183, 249, 92, 68, 163, 61, 3, 0, 244, 91, 248, 111, 48, 45, 247, 147, 251, 236, 254, 112, 11, 127, 217, 192, 247, 189, 237, 11, 80, 240, 57, 68, 201, 172, 206, 94, 216, 43, 214, 169, 230, 71, 166, 149, 151, 45, 141, 13, 250, 111, 109, 232, 42, 161, 176, 231, 237, 184, 222, 238, 121, 243, 16, 190, 92], + [141, 171, 31, 208, 48, 213, 254, 249, 217, 176, 29, 116, 115, 170, 202, 144, 57, 119, 212, 135, 207, 207, 39, 219, 213, 234, 234, 57, 248, 227, 66, 99, 183, 160, 132, 91, 25, 99, 20, 67, 41, 225, 197, 194, 0, 91, 67, 237, 155, 197, 165, 18, 2, 37, 36, 29, 220, 239, 101, 61, 75, 190, 49, 186, 201, 176, 191, 63, 223, 81, 45, 99, 27, 214, 62, 108, 194, 178, 17, 42, 53, 26, 109, 129, 238, 138, 135, 169, 164, 193, 237, 250, 57, 7, 62, 58, 137, 226, 171, 70, 44, 196, 109, 153, 143, 136, 6, 11, 34, 104, 46, 246, 22, 7, 126, 146, 110, 145, 143, 26, 110, 229, 128, 201, 252, 141, 54, 104, 72, 247, 107, 44, 111, 155, 103, 8, 252, 91, 185, 184, 82, 2, 3, 99, 162, 128, 116, 201, 193, 211, 143, 149, 77, 232, 216, 124, 201, 29, 101, 175, 87, 73, 90, 203, 133, 96, 231, 19, 65, 196, 15, 254, 184, 194, 24, 249, 159, 245, 165, 76, 14, 125, 117, 121, 155, 234, 179, 206, 98, 216, 5, 192, 20, 240, 99, 134, 119, 108, 134, 177, 162, 95, 72, 195, 111, 63, 124, 190, 13, 201, 78, 174, 75, 58, 81, 13, 41, 217, 228, 138, 103, 160, 166, 243, 217, 152, 66, 168, 197, 113, 108, 45, 246, 186, 48, 72, 53, 50, 35, 246, 116, 202, 99, 247, 38, 253, 114, 137, 146, 182, 244, 189, 9, 33, 197, 208, 247, 52, 126, 214, 117, 217, 182, 3, 253, 195, 76, 84, 126, 139, 204, 153, 104, 172, 167, 65, 173, 211, 45, 154, 72, 109, 40, 55, 16, 19, 155, 50, 233, 56, 203, 100, 63, 199, 27, 110, 15, 120, 147, 133, 65, 179, 121, 109, 250, 1, 91, 175, 113, 49, 210, 61, 18, 231, 51, 104, 225, 40, 18, 80, 203, 227, 132, 223, 244, 244, 98, 214, 163, 117, 3, 218, 76, 161, 34, 4, 224, 41, 185, 18, 176, 1, 118, 156, 85, 141, 9, 174, 15, 45, 13, 153, 113, 87, 171, 86, 156, 105, 236, 105, 33, 236, 217, 184, 16, 97, 30, 75, 101, 84, 228, 164, 18, 105, 8, 114, 213, 92, 147, 1, 98, 212, 222, 161, 80, 193, 180, 83, 193, 94, 91, 135, 123, 155, 109, 107, 169, 13, 137, 33, 30, 95, 240, 199, 71, 222, 71, 242, 221, 245, 116, 224, 196, 97, 68, 143, 118, 23, 232, 46, 196, 192, 158, 145, 205, 99, 129, 47, 39, 38, 20, 255, 236, 44, 119, 253, 6, 148, 231, 235, 6, 112, 42, 217, 10, 201, 224, 133, 59, 92, 88, 118, 116, 173, 251, 242, 4, 186, 53, 64, 176, 182, 69, 198, 6, 132, 64, 29, 235, 168, 95, 44, 147, 121, 3, 46, 181, 151, 165, 219, 171, 73, 134, 98, 123, 214, 64, 135, 118, 240, 32, 185, 183, 0, 233, 226, 19, 196, 253, 118, 56, 130, 161, 231, 167, 250, 117, 38, 173, 195, 22, 229, 155, 238, 136, 108, 148, 142, 197, 204, 199, 228, 114, 61, 221, 5, 50, 97, 33, 163, 160, 35, 20, 238, 131, 102, 215, 182, 190, 85, 149, 92, 20, 118, 49, 114, 78, 60, 86, 240, 19, 167, 151, 204, 69, 67, 104, 83, 172, 185, 231, 214, 79, 155, 69, 133, 205, 111, 18, 142, 140, 138, 216, 148, 0, 249, 123, 202, 92, 29, 50, 94, 145, 5, 189, 63, 121, 115, 65, 155, 134, 62, 39, 3, 3, 128, 116, 46, 158, 144, 206, 234, 229, 76, 235, 67, 242, 227, 246, 205, 102, 71, 95, 240, 134, 195, 63, 111, 88, 45, 41, 229, 254, 198, 189, 241, 220, 22, 185, 193, 109, 117, 233, 70, 180, 19, 48, 6, 210, 202, 192, 214, 67, 229, 155, 138, 3, 247, 16, 26, 96, 170, 248, 147, 157, 98, 88, 201, 9, 189, 72, 218, 220, 229, 232, 73, 27, 46, 26, 226, 116, 158, 110, 220, 168, 225, 210, 59, 26, 21, 222, 49, 71, 172, 178, 65, 105, 50, 255, 66, 123, 81, 76, 98, 4, 63, 71, 204, 44, 237, 229, 239, 101, 98, 145, 81, 198, 152, 126, 11, 176, 2, 137, 51, 250, 26, 148, 82, 32, 135, 137, 164, 189, 40, 11, 37, 194, 47, 50, 32, 59, 125, 144, 255, 231, 124, 111, 200, 24, 173, 121, 214, 119, 214, 11, 227, 41, 206, 208, 68, 238, 143, 171, 12, 199, 213, 32, 73, 201, 111, 124, 136, 47, 158, 1, 116, 61, 224, 25, 39, 7, 132, 89, 58, 199, 50, 158, 183, 128, 30, 210, 179, 119, 151, 17, 210, 24, 252, 110, 92, 107, 216, 10, 11, 120, 165, 115, 161, 66, 12, 250, 249, 204, 252, 46, 190, 45, 209, 23, 43, 143, 156, 4, 91, 242, 6, 49, 157, 81, 145, 172, 94, 56, 212, 144, 207, 48, 159, 46, 84, 235, 145, 19, 212, 86, 222, 24, 21, 22, 234, 248, 149, 244, 30, 73, 119, 44, 227, 205, 222, 137, 220, 174, 170, 103, 29, 219, 199, 33, 35, 54, 201, 223, 67, 232, 212, 30, 224, 58, 151, 51, 210, 215, 200, 40, 128, 226, 120, 249, 76, 96, 190, 71, 31, 169, 129, 37, 230, 105, 32, 254, 8, 210, 214, 9, 228, 67, 97, 160, 200, 149, 146, 36, 129, 202, 158, 9, 202, 21, 73, 77, 174, 97, 126, 130, 61, 230, 98, 154, 199, 101, 5, 180, 7, 108, 122, 72, 163, 85, 159, 31, 2, 42, 126, 160, 147, 22, 168, 40, 10, 169, 253, 158, 243, 27, 82, 218, 27, 165, 183, 38, 174, 139, 59, 214, 93, 16, 49, 60, 184, 33, 212, 215, 145, 78, 147, 9, 16, 242, 86, 128, 92, 227, 87, 152, 164, 75, 75, 197, 98, 17, 77, 62, 84, 243, 103, 47, 220, 95, 101, 102, 139, 168, 179, 118, 163, 175, 26, 76, 66, 32, 123, 253, 154, 218, 197, 225, 197, 90, 192, 146, 127, 115, 27, 20, 162, 201, 169, 197, 20, 223, 54, 173, 203, 68, 30, 23, 226, 160, 107, 104, 76, 213, 135, 8, 217, 55, 118, 192, 190, 60, 69, 45, 84, 69, 11, 220, 17, 166, 255, 187, 72, 248, 148, 233, 15, 215, 231, 209, 8, 234, 77, 56, 240, 183, 123, 155, 245, 244, 16, 111, 195, 47, 204, 208, 29, 195, 181, 128, 139, 169, 31, 191, 86, 123, 104, 86, 158, 175, 139, 85, 131, 70, 44, 200, 110, 101, 190, 141, 241, 6, 184, 50, 208, 113, 172, 8, 188, 179, 87, 18, 62, 91, 18, 38, 120, 55, 1, 139, 229, 124, 83, 48, 191, 180, 124, 117, 31, 161, 223, 130, 182, 244, 138, 112, 27, 111, 57, 161, 117, 209, 42, 34, 71, 33, 222, 67, 72, 44, 66, 1, 101, 253, 196, 89, 130, 243, 156, 155, 161, 200, 198, 98, 121, 180, 28, 216, 129, 186, 56, 10, 6, 128, 155, 21, 35, 196, 129, 139, 69, 136, 18, 80, 47, 56, 153, 230, 156, 116, 207, 82, 94, 138, 16, 39, 162, 217, 79, 225, 228, 53, 82, 22, 241, 93, 250, 216, 170, 128, 156, 199, 248, 45, 211, 99, 54, 123, 15, 44, 35, 24, 86, 84, 3, 161, 50, 210, 0, 63, 183, 6, 15, 252, 76, 21, 42, 0, 101, 75, 246, 137, 63, 210, 236, 122, 135, 226, 27, 168, 60, 248, 130, 60, 15, 236, 175, 131, 98, 65, 62, 39, 249, 135, 171, 9, 23, 197, 78, 213, 113, 71, 179, 58, 83, 220, 91, 67, 151, 167, 131, 46, 123, 65, 104, 19, 191, 32, 22, 16, 36, 209, 180, 115, 241, 61, 247, 142, 76, 7, 113, 19, 64, 93, 205, 75, 71, 25, 72, 33, 143, 35, 131, 216, 115, 45, 164, 147, 84, 44, 155, 248, 80, 150, 95, 124, 215, 131, 203, 187, 99, 13, 37, 129, 173, 43, 72, 7, 110, 174, 137, 158, 208, 153, 19, 25, 216, 85, 102, 112, 195, 203, 172, 208, 149, 147, 92, 159, 119, 25, 210, 206, 128, 17, 60, 18, 130, 177, 172, 129, 54, 6, 124, 244, 214, 206, 234, 107, 124, 126, 110, 79, 99, 132, 2, 178, 25, 104, 16, 16, 39, 6, 208, 90, 127, 87, 246, 97, 238, 186, 120, 95, 227, 162, 34, 106, 213, 150, 69, 118, 14, 86, 128, 129, 174, 16, 233, 238, 89, 248, 239, 60, 231, 30, 66, 115, 64, 39, 170, 225, 133, 42, 6, 172, 25, 65, 218, 154, 214, 196, 216, 136, 239, 60, 51, 61, 212, 91, 48, 224, 207, 222, 243, 47, 213, 138, 226, 59, 252, 253, 137, 229, 143, 38, 35, 15, 244, 174, 147, 125, 23, 173, 74, 53, 108, 227, 104, 37, 164, 131, 15, 250, 57, 226, 185, 245, 2, 71, 14, 221, 85, 31, 173, 228, 138, 146, 114, 157, 63, 89, 16], + [174, 148, 29, 165, 44, 194, 102, 178, 37, 62, 13, 60, 167, 46, 145, 112, 91, 253, 26, 110, 116, 22, 196, 69, 9, 72, 36, 162, 17, 98, 167, 18, 74, 239, 236, 143, 200, 100, 254, 29, 240, 24, 232, 129, 98, 132, 226, 104, 166, 164, 46, 55, 0, 25, 48, 143, 89, 87, 34, 141, 244, 50, 170, 139, 35, 70, 71, 0, 45, 75, 163, 51, 212, 218, 66, 73, 228, 84, 249, 40, 213, 19, 91, 202, 7, 246, 154, 94, 172, 158, 131, 137, 29, 132, 177, 78, 64, 176, 228, 202, 74, 73, 230, 109, 122, 171, 215, 84, 209, 112, 152, 189, 94, 218, 153, 203, 105, 8, 28, 174, 84, 76, 41, 38, 202, 70, 36, 43, 85, 18, 218, 174, 118, 135, 136, 58, 23, 9, 149, 90, 175, 253, 116, 7, 144, 202, 41, 206, 172, 73, 45, 15, 183, 121, 52, 10, 183, 242, 219, 118, 44, 166, 196, 181, 65, 225, 27, 132, 35, 240, 1, 126, 167, 247, 237, 69, 38, 55, 136, 164, 126, 24, 227, 238, 166, 196, 1, 89, 97, 32, 56, 76, 22, 23, 217, 22, 202, 26, 112, 137, 20, 194, 31, 202, 41, 9, 95, 32, 234, 113, 72, 62, 128, 240, 104, 105, 164, 100, 170, 41, 106, 208, 75, 227, 205, 162, 16, 33, 23, 247, 3, 169, 64, 221, 54, 67, 162, 177, 204, 59, 61, 162, 134, 16, 193, 191, 107, 249, 223, 200, 25, 133, 123, 229, 128, 62, 208, 239, 32, 126, 169, 37, 155, 198, 16, 254, 180, 168, 251, 40, 63, 172, 22, 0, 175, 163, 254, 175, 47, 224, 123, 221, 1, 102, 41, 169, 74, 201, 51, 184, 236, 227, 51, 90, 15, 20, 85, 12, 139, 129, 119, 115, 245, 174, 94, 126, 53, 62, 35, 53, 73, 4, 13, 96, 251, 145, 7, 107, 56, 242, 154, 188, 31, 95, 15, 99, 249, 103, 254, 81, 142, 62, 107, 228, 125, 247, 195, 143, 134, 46, 159, 80, 243, 33, 43, 247, 218, 104, 41, 67, 156, 34, 122, 49, 159, 81, 75, 208, 193, 54, 204, 72, 242, 2, 83, 141, 22, 122, 86, 240, 150, 254, 211, 144, 252, 157, 209, 211, 7, 246, 179, 20, 138, 175, 170, 82, 74, 154, 238, 219, 53, 121, 23, 52, 189, 141, 210, 2, 168, 179, 102, 99, 155, 22, 23, 13, 204, 1, 8, 37, 188, 240, 129, 208, 139, 251, 203, 133, 88, 171, 221, 93, 220, 207, 32, 95, 170, 224, 181, 102, 118, 212, 160, 120, 235, 82, 235, 128, 147, 24, 34, 110, 239, 60, 55, 9, 167, 206, 40, 203, 34, 194, 107, 57, 120, 240, 80, 111, 142, 83, 56, 152, 107, 160, 162, 0, 227, 89, 34, 183, 226, 159, 98, 193, 253, 197, 50, 158, 82, 222, 185, 97, 11, 16, 152, 147, 161, 166, 41, 214, 182, 185, 166, 30, 245, 80, 33, 243, 84, 92, 113, 2, 68, 152, 131, 134, 185, 16, 150, 32, 13, 87, 108, 138, 137, 179, 21, 186, 115, 250, 140, 99, 253, 85, 222, 204, 29, 161, 53, 116, 60, 51, 24, 173, 213, 126, 131, 245, 250, 233, 46, 170, 44, 245, 124, 196, 93, 123, 201, 47, 193, 19, 178, 124, 200, 232, 125, 117, 165, 247, 26, 145, 176, 118, 26, 182, 86, 45, 56, 167, 202, 182, 172, 164, 107, 215, 20, 114, 186, 30, 159, 153, 153, 165, 4, 73, 236, 34, 210, 211, 31, 16, 68, 86, 9, 181, 94, 231, 169, 167, 88, 163, 122, 76, 252, 197, 113, 21, 33, 80, 189, 153, 149, 159, 70, 84, 214, 228, 32, 13, 175, 158, 52, 21, 67, 152, 131, 56, 121, 181, 36, 40, 117, 97, 235, 127, 164, 187, 137, 53, 222, 89, 228, 244, 252, 223, 152, 108, 129, 143, 187, 98, 49, 82, 219, 187, 131, 82, 109, 27, 153, 105, 57, 213, 127, 226, 94, 120, 203, 31, 95, 159, 5, 118, 119, 155, 239, 175, 169, 195, 97, 84, 140, 231, 160, 20, 21, 163, 101, 213, 71, 33, 166, 164, 141, 45, 133, 91, 245, 246, 61, 248, 131, 66, 181, 228, 37, 173, 133, 162, 209, 126, 184, 84, 210, 171, 190, 29, 69, 121, 75, 88, 236, 90, 33, 173, 238, 8, 52, 69, 80, 235, 231, 125, 239, 124, 103, 173, 166, 40, 172, 246, 2, 202, 107, 186, 146, 107, 141, 84, 190, 44, 28, 79, 201, 250, 166, 235, 172, 163, 113, 167, 133, 119, 250, 214, 72, 78, 182, 142, 29, 110, 36, 136, 9, 137, 182, 129, 141, 210, 201, 220, 157, 130, 110, 203, 205, 115, 134, 1, 52, 120, 224, 32, 71, 28, 187, 96, 11, 157, 79, 132, 48, 176, 157, 152, 118, 241, 147, 233, 92, 211, 121, 186, 164, 47, 14, 181, 20, 23, 236, 24, 134, 240, 19, 170, 35, 175, 93, 78, 187, 39, 145, 177, 12, 198, 75, 245, 16, 86, 0, 200, 19, 180, 8, 27, 67, 80, 146, 162, 154, 36, 47, 151, 236, 208, 64, 198, 13, 109, 105, 235, 207, 36, 24, 132, 122, 249, 180, 184, 195, 124, 213, 193, 176, 193, 87, 210, 113, 249, 151, 62, 253, 198, 100, 99, 160, 147, 148, 86, 228, 207, 43, 240, 239, 78, 57, 205, 96, 79, 228, 226, 202, 85, 96, 189, 148, 157, 37, 199, 180, 59, 172, 39, 175, 87, 44, 205, 227, 176, 249, 247, 34, 232, 127, 92, 239, 255, 143, 4, 66, 176, 183, 46, 67, 31, 252, 182, 96, 124, 34, 237, 218, 8, 36, 105, 75, 133, 81, 65, 170, 167, 89, 145, 123, 118, 100, 61, 4, 248, 217, 23, 179, 15, 59, 16, 95, 211, 36, 200, 122, 192, 52, 122, 171, 161, 135, 190, 206, 201, 83, 175, 158, 123, 47, 139, 214, 22, 206, 20, 248, 30, 102, 103, 128, 48, 153, 0, 255, 149, 18, 140, 230, 203, 130, 70, 37, 138, 245, 18, 24, 36, 91, 82, 160, 221, 75, 252, 75, 10, 61, 81, 11, 43, 79, 224, 250, 120, 110, 34, 116, 99, 220, 87, 13, 228, 37, 54, 177, 38, 69, 236, 53, 53, 73, 58, 142, 48, 40, 77, 58, 140, 63, 198, 59, 208, 223, 228, 25, 219, 75, 196, 111, 194, 38, 108, 162, 27, 220, 66, 166, 35, 23, 229, 238, 230, 169, 63, 97, 62, 168, 233, 155, 115, 140, 225, 22, 66, 62, 39, 144, 6, 96, 79, 151, 135, 137, 37, 109, 62, 0, 180, 126, 133, 161, 63, 155, 135, 177, 56, 249, 198, 101, 138, 72, 73, 192, 179, 94, 120, 133, 83, 220, 143, 30, 29, 228, 254, 205, 198, 73, 189, 143, 193, 127, 101, 218, 246, 108, 100, 202, 109, 110, 84, 61, 71, 88, 207, 42, 252, 37, 242, 192, 112, 48, 65, 135, 20, 217, 129, 152, 196, 28, 163, 176, 148, 71, 125, 230, 144, 183, 146, 190, 166, 245, 166, 184, 40, 252, 192, 231, 26, 188, 91, 40, 153, 115, 130, 135, 193, 79, 214, 105, 66, 178, 50, 25, 202, 229, 110, 73, 214, 181, 110, 141, 148, 77, 191, 233, 211, 213, 167, 130, 90, 24, 187, 124, 94, 66, 174, 87, 207, 207, 247, 205, 121, 65, 77, 85, 132, 14, 224, 221, 57, 86, 6, 204, 68, 135, 165, 94, 93, 220, 31, 192, 181, 202, 191, 168, 54, 237, 140, 91, 22, 141, 141, 242, 178, 239, 133, 99, 104, 237, 82, 181, 20, 125, 111, 6, 60, 56, 212, 194, 52, 146, 248, 100, 196, 70, 251, 51, 20, 98, 87, 250, 40, 143, 102, 30, 229, 182, 204, 253, 13, 50, 152, 201, 240, 10, 191, 140, 135, 29, 1, 228, 152, 191, 234, 242, 216, 64, 89, 158, 11, 59, 70, 13, 33, 66, 10, 220, 98, 48, 91, 125, 43, 231, 58, 175, 164, 107, 245, 138, 204, 165, 183, 245, 176, 4, 187, 177, 150, 43, 252, 222, 79, 126, 138, 242, 125, 210, 166, 56, 167, 6, 141, 66, 81, 157, 181, 83, 42, 175, 246, 131, 144, 82, 120, 91, 75, 122, 47, 162, 176, 89, 206, 51, 37, 242, 31, 176, 27, 95, 29, 214, 32, 120, 235, 104, 137, 110, 147, 134, 185, 181, 254, 95, 234, 81, 40, 217, 142, 51, 127, 159, 61, 82, 233, 154, 128, 45, 67, 47, 137, 207, 169, 129, 153, 17, 124, 99, 98, 122, 207, 240, 160, 159, 200, 206, 51, 2, 234, 51, 183, 73, 142, 104, 79, 169, 41, 96, 92, 1, 182, 90, 190, 117, 6, 219, 201, 9, 208, 211, 166, 11, 175, 195, 158, 22, 236, 94, 172, 191, 18, 254, 27, 215, 136, 56, 102, 181, 163, 66, 135, 46, 187, 112, 41, 14, 180, 177, 72, 207, 158, 204, 250, 100, 27, 114, 240, 250, 116, 144, 77, 28, 120, 129, 174, 172, 114], + [99, 180, 46, 179, 61, 121, 49, 85, 166, 96, 52, 243, 198, 46, 181, 168, 238, 32, 139, 30, 176, 112, 224, 162, 113, 105, 161, 221, 107, 75, 205, 208, 252, 218, 131, 7, 96, 181, 168, 10, 210, 106, 73, 38, 44, 2, 107, 168, 188, 53, 43, 229, 47, 181, 162, 169, 80, 84, 127, 215, 42, 90, 104, 75, 73, 34, 85, 185, 189, 76, 21, 153, 58, 107, 96, 122, 66, 208, 216, 133, 198, 249, 149, 190, 245, 25, 98, 214, 149, 71, 126, 137, 46, 247, 61, 201, 155, 4, 5, 199, 26, 52, 100, 27, 16, 138, 24, 72, 186, 171, 146, 204, 143, 165, 147, 89, 123, 89, 143, 93, 92, 255, 235, 247, 153, 2, 224, 140, 100, 45, 205, 33, 216, 142, 94, 34, 54, 15, 126, 192, 168, 222, 239, 82, 3, 73, 184, 70, 29, 110, 165, 184, 113, 198, 141, 132, 100, 248, 139, 108, 251, 13, 123, 161, 72, 191, 167, 124, 254, 116, 76, 210, 203, 134, 171, 236, 205, 242, 58, 215, 38, 151, 64, 71, 188, 32, 5, 70, 83, 171, 103, 13, 86, 92, 192, 200, 91, 29, 16, 98, 104, 191, 6, 32, 168, 19, 17, 232, 42, 9, 86, 229, 14, 77, 158, 83, 113, 148, 12, 146, 166, 159, 107, 71, 133, 162, 210, 55, 224, 239, 254, 78, 147, 245, 198, 172, 170, 255, 162, 175, 194, 68, 254, 250, 150, 21, 181, 181, 14, 20, 19, 1, 127, 229, 87, 153, 173, 34, 181, 244, 83, 53, 104, 137, 76, 109, 211, 248, 166, 99, 131, 17, 121, 33, 182, 114, 25, 73, 59, 228, 238, 234, 32, 210, 160, 245, 135, 247, 207, 70, 51, 6, 168, 247, 202, 244, 241, 184, 241, 87, 166, 90, 199, 46, 138, 173, 47, 204, 78, 222, 228, 213, 62, 51, 197, 112, 71, 232, 170, 120, 231, 117, 21, 53, 181, 144, 126, 230, 2, 52, 92, 205, 233, 154, 211, 76, 64, 252, 48, 196, 94, 78, 87, 74, 46, 177, 112, 107, 238, 58, 190, 173, 128, 178, 144, 162, 53, 204, 213, 85, 183, 180, 56, 102, 78, 58, 19, 75, 77, 30, 171, 151, 76, 55, 202, 71, 124, 158, 241, 67, 135, 13, 63, 192, 154, 81, 254, 111, 181, 18, 70, 194, 229, 51, 59, 28, 255, 41, 249, 102, 219, 173, 108, 194, 87, 243, 6, 111, 81, 55, 169, 91, 199, 54, 204, 196, 246, 150, 140, 252, 250, 68, 252, 245, 10, 172, 159, 175, 94, 83, 199, 126, 4, 229, 127, 69, 14, 108, 209, 42, 103, 204, 53, 131, 31, 237, 165, 165, 9, 45, 15, 212, 68, 113, 244, 33, 63, 243, 78, 14, 36, 3, 78, 151, 96, 254, 153, 92, 96, 172, 245, 162, 39, 31, 45, 52, 204, 65, 208, 80, 168, 63, 119, 39, 53, 5, 132, 8, 73, 189, 216, 98, 113, 21, 18, 30, 174, 219, 86, 127, 240, 157, 118, 33, 21, 147, 3, 113, 226, 103, 251, 84, 171, 79, 160, 249, 200, 43, 243, 196, 93, 27, 54, 88, 113, 78, 66, 45, 60, 36, 255, 210, 203, 51, 119, 97, 21, 209, 230, 99, 115, 201, 14, 156, 188, 8, 175, 10, 173, 114, 238, 200, 201, 164, 105, 52, 248, 123, 80, 167, 125, 103, 185, 42, 138, 242, 55, 60, 95, 239, 207, 111, 0, 140, 41, 151, 10, 21, 151, 15, 161, 4, 195, 207, 206, 47, 245, 20, 223, 168, 90, 236, 210, 109, 250, 100, 90, 60, 193, 75, 46, 167, 16, 57, 178, 138, 3, 188, 201, 167, 157, 220, 40, 106, 159, 230, 184, 158, 247, 12, 126, 178, 200, 14, 244, 250, 215, 101, 39, 181, 142, 164, 234, 61, 167, 161, 189, 151, 61, 31, 60, 24, 207, 175, 90, 155, 48, 189, 165, 114, 241, 73, 28, 93, 47, 236, 218, 105, 64, 218, 87, 247, 204, 39, 221, 186, 43, 75, 208, 117, 236, 168, 80, 196, 160, 97, 85, 248, 230, 10, 113, 157, 205, 75, 67, 162, 118, 163, 206, 111, 105, 196, 26, 212, 165, 104, 240, 92, 25, 107, 255, 198, 164, 84, 90, 55, 125, 167, 143, 178, 92, 140, 143, 237, 94, 237, 36, 24, 255, 57, 83, 48, 147, 247, 254, 42, 186, 71, 244, 59, 48, 162, 4, 131, 130, 217, 45, 189, 54, 108, 61, 107, 48, 224, 255, 84, 159, 29, 189, 24, 12, 86, 229, 77, 144, 120, 29, 104, 153, 30, 249, 36, 183, 235, 118, 203, 219, 45, 116, 235, 71, 49, 14, 75, 188, 100, 229, 71, 47, 24, 12, 57, 229, 100, 202, 219, 74, 33, 42, 243, 54, 248, 233, 168, 81, 145, 143, 135, 109, 36, 77, 139, 228, 119, 130, 200, 48, 154, 218, 114, 170, 228, 74, 243, 40, 226, 202, 200, 114, 61, 178, 247, 219, 207, 86, 243, 137, 74, 245, 197, 125, 200, 58, 149, 123, 228, 62, 233, 59, 38, 252, 137, 243, 135, 8, 115, 142, 89, 120, 135, 102, 33, 47, 185, 144, 108, 18, 153, 224, 1, 235, 74, 25, 32, 87, 112, 188, 104, 129, 104, 110, 46, 235, 242, 105, 149, 3, 227, 8, 114, 188, 28, 218, 30, 93, 40, 9, 31, 158, 80, 161, 10, 190, 123, 233, 66, 35, 237, 106, 111, 147, 207, 186, 203, 157, 105, 225, 186, 76, 71, 225, 84, 194, 76, 81, 38, 185, 24, 45, 81, 98, 29, 53, 56, 1, 54, 129, 125, 40, 181, 136, 137, 222, 112, 63, 186, 84, 17, 198, 158, 142, 178, 54, 8, 54, 51, 34, 190, 103, 3, 197, 137, 137, 213, 236, 78, 219, 77, 4, 252, 5, 185, 64, 157, 6, 174, 162, 137, 66, 59, 185, 124, 150, 178, 197, 181, 70, 89, 57, 107, 220, 228, 134, 159, 227, 4, 45, 126, 81, 42, 246, 165, 250, 36, 92, 169, 129, 47, 228, 85, 254, 157, 107, 44, 20, 240, 165, 226, 17, 16, 106, 11, 12, 216, 44, 172, 67, 21, 34, 250, 242, 240, 120, 206, 19, 231, 225, 68, 51, 192, 120, 48, 60, 187, 169, 170, 2, 214, 206, 7, 123, 146, 71, 71, 215, 10, 109, 172, 204, 66, 109, 77, 140, 85, 54, 64, 186, 240, 89, 137, 15, 178, 19, 18, 42, 96, 136, 106, 151, 13, 36, 131, 64, 246, 154, 28, 20, 181, 36, 84, 95, 48, 203, 167, 52, 132, 225, 34, 234, 39, 245, 34, 21, 131, 45, 22, 195, 63, 61, 243, 245, 23, 23, 20, 50, 221, 94, 201, 219, 126, 145, 3, 65, 180, 160, 166, 10, 165, 150, 74, 128, 242, 112, 141, 156, 120, 103, 89, 144, 40, 225, 38, 122, 30, 200, 78, 46, 73, 233, 36, 107, 158, 115, 214, 247, 149, 123, 46, 171, 73, 247, 29, 159, 8, 80, 82, 204, 135, 25, 120, 82, 39, 122, 94, 216, 99, 200, 215, 55, 186, 8, 21, 173, 27, 78, 127, 241, 167, 11, 7, 234, 215, 238, 208, 203, 182, 206, 38, 8, 25, 234, 204, 128, 40, 235, 51, 58, 17, 150, 29, 28, 139, 180, 243, 226, 82, 187, 69, 125, 101, 167, 126, 157, 184, 237, 179, 82, 162, 3, 203, 111, 151, 196, 151, 166, 210, 115, 49, 13, 94, 136, 197, 119, 36, 224, 87, 100, 61, 164, 79, 52, 173, 57, 251, 175, 143, 69, 16, 239, 108, 221, 59, 109, 67, 207, 205, 85, 138, 185, 43, 225, 27, 32, 75, 75, 95, 199, 10, 164, 68, 50, 251, 43, 234, 130, 103, 204, 168, 173, 125, 28, 72, 132, 120, 41, 127, 48, 138, 167, 15, 193, 168, 135, 86, 65, 236, 229, 44, 210, 234, 112, 250, 97, 2, 222, 55, 7, 69, 137, 125, 162, 105, 149, 115, 8, 136, 127, 48, 95, 103, 107, 67, 14, 77, 56, 119, 119, 115, 187, 56, 14, 226, 165, 35, 186, 203, 242, 254, 32, 80, 40, 37, 61, 31, 99, 77, 42, 125, 183, 190, 171, 19, 154, 190, 4, 222, 32, 34, 43, 157, 188, 127, 133, 60, 239, 84, 15, 97, 114, 22, 108, 29, 62, 241, 71, 161, 169, 192, 151, 209, 37, 8, 228, 176, 213, 74, 166, 48, 109, 147, 213, 2, 131, 68, 50, 175, 239, 56, 92, 78, 42, 91, 161, 89, 229, 101, 82, 103, 8, 79, 16, 49, 32, 228, 107, 237, 129, 35, 4, 24, 145, 74, 137, 50, 117, 111, 80, 90, 67, 158, 226, 165, 194, 47, 127, 54, 97, 204, 37, 149, 24, 249, 230, 110, 254, 215, 80, 35, 13, 153, 171, 226, 191, 39, 5, 155, 55, 4, 56, 134, 217, 215, 46, 203, 2, 145, 219, 173, 76, 126, 67, 111, 217, 37, 240, 68, 18, 129, 107, 170, 182, 125, 74, 188, 166, 244, 147, 37, 164, 17, 200, 252, 100, 200, 245, 16, 250, 86, 59, 202], + [115, 206, 158, 235, 160, 120, 219, 170, 122, 134, 195, 136, 236, 180, 128, 73, 27, 93, 4, 85, 167, 47, 99, 145, 208, 77, 184, 156, 66, 61, 138, 173, 155, 246, 71, 140, 41, 186, 13, 132, 63, 4, 217, 181, 192, 173, 128, 9, 43, 10, 137, 169, 105, 118, 187, 110, 97, 231, 139, 93, 153, 127, 12, 120, 7, 157, 202, 65, 146, 70, 30, 0, 227, 215, 152, 79, 131, 53, 60, 47, 39, 102, 97, 200, 43, 235, 11, 89, 89, 232, 9, 202, 47, 204, 135, 132, 14, 95, 56, 216, 243, 136, 216, 115, 100, 111, 236, 55, 176, 121, 195, 198, 18, 220, 99, 234, 98, 79, 254, 105, 233, 249, 223, 94, 46, 60, 109, 159, 199, 111, 30, 87, 204, 228, 79, 55, 126, 38, 124, 138, 144, 50, 252, 6, 49, 122, 22, 241, 74, 141, 91, 23, 84, 121, 222, 196, 55, 119, 189, 135, 68, 101, 15, 16, 78, 54, 215, 156, 194, 134, 7, 89, 129, 39, 177, 203, 185, 231, 37, 243, 43, 137, 123, 167, 69, 192, 191, 180, 201, 76, 147, 169, 71, 81, 208, 72, 44, 11, 164, 176, 41, 48, 151, 252, 219, 26, 175, 151, 125, 250, 130, 80, 217, 86, 149, 148, 64, 248, 239, 107, 160, 204, 118, 50, 107, 102, 6, 150, 225, 74, 37, 244, 171, 219, 94, 35, 15, 162, 107, 232, 212, 93, 42, 63, 152, 47, 73, 228, 178, 24, 125, 222, 33, 212, 181, 244, 94, 37, 19, 110, 241, 105, 36, 254, 33, 229, 47, 89, 40, 62, 48, 242, 228, 239, 36, 189, 174, 117, 168, 199, 37, 203, 238, 45, 195, 197, 230, 126, 217, 69, 100, 97, 14, 75, 230, 167, 103, 108, 124, 234, 157, 92, 32, 217, 171, 11, 94, 238, 25, 57, 238, 127, 53, 189, 194, 200, 30, 94, 50, 121, 190, 221, 248, 170, 103, 200, 159, 170, 196, 150, 144, 223, 201, 52, 131, 58, 13, 166, 224, 9, 73, 252, 39, 226, 212, 157, 158, 41, 116, 110, 209, 18, 9, 241, 99, 146, 249, 68, 165, 209, 78, 83, 212, 12, 98, 225, 51, 62, 101, 225, 143, 111, 167, 155, 95, 157, 202, 245, 159, 125, 75, 242, 231, 88, 217, 241, 203, 131, 143, 64, 113, 250, 150, 59, 60, 24, 144, 3, 4, 112, 110, 123, 59, 227, 118, 101, 175, 197, 64, 250, 20, 163, 163, 168, 219, 219, 187, 189, 89, 194, 82, 157, 106, 198, 173, 21, 61, 119, 172, 52, 121, 8, 172, 212, 204, 144, 163, 13, 2, 181, 105, 150, 8, 15, 127, 49, 37, 170, 132, 227, 0, 164, 220, 210, 136, 194, 13, 172, 194, 58, 230, 110, 225, 60, 231, 56, 250, 81, 140, 121, 54, 150, 38, 181, 195, 188, 156, 99, 255, 206, 18, 20, 184, 245, 175, 223, 49, 211, 43, 45, 238, 235, 123, 80, 31, 19, 214, 71, 68, 76, 204, 119, 62, 174, 254, 97, 239, 129, 67, 156, 62, 12, 68, 231, 99, 118, 132, 238, 142, 144, 137, 184, 208, 135, 136, 181, 27, 44, 170, 235, 90, 22, 94, 115, 23, 201, 207, 30, 53, 42, 251, 229, 175, 162, 98, 232, 242, 150, 242, 44, 237, 217, 93, 92, 187, 15, 53, 207, 11, 146, 26, 50, 141, 168, 74, 190, 166, 9, 113, 104, 5, 215, 118, 69, 31, 248, 254, 67, 138, 77, 208, 113, 151, 72, 68, 38, 141, 21, 50, 212, 171, 168, 131, 236, 38, 56, 177, 24, 58, 167, 199, 229, 38, 68, 140, 197, 167, 253, 19, 159, 21, 246, 203, 150, 224, 49, 16, 145, 245, 228, 64, 41, 136, 168, 105, 163, 101, 86, 242, 182, 199, 108, 198, 241, 205, 26, 99, 103, 194, 133, 50, 47, 157, 249, 161, 241, 43, 217, 99, 225, 113, 243, 238, 13, 172, 190, 14, 183, 86, 251, 90, 42, 214, 22, 243, 223, 144, 83, 121, 231, 116, 86, 56, 62, 59, 7, 5, 0, 85, 7, 165, 26, 162, 58, 179, 100, 64, 122, 7, 126, 173, 141, 176, 223, 100, 3, 1, 60, 101, 245, 96, 8, 133, 240, 150, 229, 171, 153, 158, 161, 220, 66, 92, 170, 114, 233, 110, 88, 162, 79, 42, 49, 41, 92, 96, 56, 29, 133, 80, 219, 163, 188, 96, 221, 60, 70, 61, 186, 157, 91, 222, 206, 2, 117, 67, 24, 97, 75, 66, 122, 158, 22, 10, 195, 230, 241, 224, 82, 208, 95, 197, 148, 110, 92, 94, 73, 169, 57, 69, 219, 218, 137, 61, 129, 235, 150, 4, 133, 226, 170, 154, 209, 136, 254, 75, 161, 27, 104, 58, 200, 3, 251, 77, 28, 242, 226, 103, 176, 98, 198, 96, 252, 224, 109, 29, 7, 172, 105, 152, 175, 199, 115, 101, 28, 114, 101, 78, 8, 50, 248, 28, 103, 18, 181, 19, 35, 32, 173, 156, 201, 199, 187, 169, 132, 13, 68, 205, 94, 9, 62, 65, 106, 85, 77, 118, 139, 122, 75, 183, 191, 94, 2, 123, 163, 49, 158, 140, 127, 73, 16, 32, 152, 203, 125, 218, 61, 221, 239, 116, 236, 102, 37, 165, 34, 8, 39, 135, 94, 67, 58, 190, 179, 248, 116, 85, 63, 176, 224, 34, 220, 11, 226, 161, 139, 159, 183, 90, 82, 4, 127, 77, 45, 223, 77, 170, 66, 192, 52, 64, 132, 15, 173, 122, 180, 64, 95, 126, 184, 42, 8, 29, 89, 80, 252, 61, 92, 185, 28, 5, 149, 50, 57, 241, 104, 88, 96, 208, 96, 247, 213, 38, 108, 34, 19, 122, 49, 225, 179, 157, 95, 24, 170, 236, 169, 235, 150, 37, 13, 120, 224, 255, 245, 191, 88, 55, 57, 205, 137, 149, 225, 156, 220, 207, 137, 141, 57, 16, 150, 213, 159, 81, 234, 220, 122, 139, 71, 11, 192, 203, 101, 211, 193, 63, 242, 33, 246, 156, 255, 146, 90, 7, 66, 90, 54, 11, 211, 100, 56, 176, 159, 187, 152, 167, 185, 55, 163, 142, 237, 59, 101, 203, 78, 246, 170, 188, 188, 172, 62, 138, 98, 108, 183, 189, 184, 254, 116, 43, 122, 110, 149, 136, 205, 28, 66, 65, 8, 206, 211, 128, 65, 158, 109, 169, 250, 202, 2, 92, 196, 110, 208, 37, 170, 124, 170, 40, 94, 170, 14, 55, 163, 120, 152, 248, 89, 70, 136, 177, 100, 210, 239, 253, 69, 175, 175, 137, 211, 228, 106, 156, 151, 67, 117, 0, 227, 43, 31, 56, 87, 49, 132, 29, 29, 162, 194, 140, 190, 173, 98, 19, 237, 179, 179, 226, 246, 186, 244, 159, 109, 40, 201, 120, 166, 148, 218, 2, 8, 109, 173, 149, 3, 71, 218, 148, 163, 98, 35, 29, 54, 96, 146, 82, 128, 173, 82, 213, 88, 42, 177, 58, 124, 71, 47, 250, 126, 214, 194, 169, 15, 200, 236, 123, 122, 27, 155, 142, 119, 229, 179, 88, 102, 43, 180, 40, 252, 175, 148, 93, 15, 208, 204, 113, 10, 55, 50, 62, 19, 167, 0, 19, 180, 174, 197, 53, 34, 169, 60, 212, 37, 28, 91, 61, 19, 18, 142, 90, 119, 33, 160, 164, 79, 54, 119, 196, 9, 98, 123, 172, 127, 213, 51, 159, 100, 213, 130, 6, 76, 162, 233, 17, 18, 234, 213, 151, 8, 72, 214, 55, 231, 204, 50, 25, 75, 202, 230, 163, 167, 154, 95, 103, 26, 216, 105, 152, 103, 216, 20, 203, 99, 156, 167, 112, 112, 81, 246, 202, 71, 100, 136, 180, 252, 170, 40, 111, 225, 221, 212, 180, 113, 192, 43, 181, 35, 238, 81, 123, 171, 169, 107, 251, 251, 141, 11, 42, 4, 71, 77, 85, 90, 208, 29, 56, 150, 128, 221, 111, 120, 199, 197, 232, 58, 135, 204, 232, 124, 177, 171, 79, 160, 247, 121, 147, 184, 226, 224, 2, 239, 229, 52, 186, 22, 242, 97, 88, 111, 21, 192, 205, 151, 140, 98, 112, 0, 220, 116, 132, 196, 98, 83, 224, 71, 175, 134, 143, 201, 158, 212, 44, 10, 156, 105, 47, 231, 29, 255, 211, 24, 205, 225, 101, 7, 177, 200, 23, 228, 151, 44, 143, 241, 165, 105, 103, 108, 223, 192, 109, 100, 40, 89, 183, 176, 4, 220, 19, 118, 132, 16, 45, 44, 156, 155, 173, 222, 9, 199, 83, 227, 225, 1, 235, 186, 44, 77, 157, 132, 66, 216, 51, 30, 88, 223, 204, 245, 250, 148, 91, 13, 69, 70, 109, 120, 142, 161, 101, 189, 78, 182, 109, 65, 45, 8, 248, 58, 163, 33, 245, 33, 225, 118, 10, 150, 106, 55, 207, 20, 168, 28, 196, 95, 223, 105, 209, 2, 167, 126, 99, 85, 132, 105, 86, 149, 49, 105, 112, 243, 247, 245, 206, 68, 235, 77, 193, 126, 236, 204, 73, 116, 105, 72, 234, 53, 159, 131, 198, 96, 192, 212, 190, 124, 128, 28] + ], + "iv": null, + "key": [203, 214, 132, 8, 227, 207, 73, 211, 136, 230, 107, 50, 147, 203, 207, 31, 123, 206, 255, 59, 194, 138, 183, 76], + "modeOfOperation": "ctr", + "plaintext": [ + [0, 17, 249, 69, 84, 108, 145, 74, 198, 50, 110, 237, 58, 117, 117, 135, 34, 156, 48, 199, 8, 88, 96, 139, 182, 85, 77, 100, 167, 253, 40, 196, 43, 180, 50, 240, 150, 20, 47, 175, 162, 115, 157, 178, 73, 46, 65, 31, 70, 2, 250, 246, 138, 203, 240, 86, 231, 6, 199, 93, 11, 6, 224, 249, 95, 142, 87, 29, 37, 8, 192, 23, 25, 154, 144, 1, 246, 50, 168, 42, 166, 178, 126, 11, 9, 146, 6, 57, 215, 44, 145, 18, 91, 168, 39, 251, 72, 52, 207, 121, 116, 173, 20, 125, 161, 223, 171, 10, 63, 107, 192, 17, 227, 207, 248, 9, 218, 237, 14, 28, 173, 181, 235, 46, 17, 101, 122, 7, 83, 27, 229, 42, 220, 75, 105, 102, 0, 187, 36, 124, 174, 35, 114, 247, 93, 172, 115, 44, 150, 35, 220, 248, 77, 186, 170, 17, 46, 43, 36, 18, 150, 27, 210, 227, 116, 75, 63, 219, 205, 87, 147, 218, 117, 191, 100, 130, 96, 19, 226, 216, 247, 28, 154, 106, 145, 223, 204, 105, 152, 106, 251, 57, 216, 210, 71, 82, 227, 46, 107, 112, 236, 167, 226, 25, 34, 134, 7, 133, 154, 131, 232, 182, 39, 175, 237, 123, 195, 34, 140, 193, 180, 149, 121, 157, 96, 86, 249, 128, 238, 127, 232, 182, 154, 122, 41, 227, 177, 250, 194, 213, 245, 212, 178, 99, 51, 168, 228, 70, 182, 99, 54, 26, 171, 167, 114, 152, 34, 235, 20, 144, 148, 56, 252, 149, 73, 154, 36, 236, 100, 97, 149, 147, 226, 243, 0, 191, 89, 159, 193, 61, 22, 143, 56, 65, 217, 245, 103, 243, 189, 41, 179, 58, 220, 184, 138, 206, 54, 92, 78, 243, 12, 243, 56, 199, 131, 72, 162, 20, 27, 30, 21, 116, 37, 57, 239, 252, 238, 238, 196, 158, 21, 145, 4, 103, 15, 103, 207, 24, 136, 24, 206, 240, 228, 169, 224, 195, 30, 148, 100, 245, 3, 83, 167, 100, 92, 152, 216, 61, 125, 66, 90, 118, 44, 52, 205, 172, 144, 123, 87, 195, 34, 193, 50, 142, 97, 39, 226, 162, 36, 40, 244, 141, 67, 244, 146, 103, 196, 248, 230, 142, 218, 194, 76, 20, 242, 41, 12, 201, 168, 177, 176, 130, 133, 157, 217, 240, 244, 45, 183, 209, 159, 137, 223, 239, 149, 140, 232, 146, 10, 57, 27, 75, 214, 237, 153, 165, 123, 166, 199, 63, 14, 215, 151, 117, 96, 152, 131, 243, 203, 170, 228, 102, 87, 178, 3, 94, 188, 139, 188, 68, 9, 206, 75, 176, 131, 235, 176, 20, 6, 95, 24, 20, 155, 178, 38, 33, 10, 246, 52, 230, 50, 99, 82, 210, 184, 153, 7, 126, 238, 54, 73, 235, 211, 218, 13, 244, 151, 92, 84, 106, 207, 0, 0, 22, 26, 172, 196, 231, 116, 148, 37, 221, 2, 27, 35, 188, 7, 215, 164, 116, 216, 87, 30, 104, 61, 232, 95, 145, 69, 115, 210, 134, 37, 217, 207, 94, 117, 251, 31, 86, 98, 25, 181, 82, 239, 2, 158, 90, 111, 90, 152, 33, 21, 67, 24, 230, 92, 111, 129, 209, 43, 129, 116, 176, 89, 144, 44, 101, 248, 10, 162, 116, 201, 177, 106, 52, 90, 225, 109, 120, 47, 230, 78, 89, 93, 22, 230, 114, 236, 27, 46, 85, 112, 93, 168, 126, 183, 28, 249, 237, 28, 64, 151, 111, 172, 89, 199, 237, 64, 86, 247, 229, 151, 71, 206, 235, 190, 38, 119, 147, 223, 204, 234, 89, 143, 236, 42, 189, 111, 108, 221, 3, 79, 253, 229, 248, 33, 23, 175, 215, 105, 62, 17, 53, 144, 25, 203, 242, 167, 226, 203, 6, 15, 168, 200, 195, 237, 226, 65, 63, 203, 41, 50, 20, 131, 84, 73, 43, 198, 3, 52, 184, 82, 51, 46, 200, 224, 25, 122, 95, 215, 233, 59, 167, 226, 149, 129, 7, 241, 151, 195, 253, 210, 206, 14, 185, 242, 132, 198, 140, 247, 34, 250, 160, 202, 14, 36, 14, 186, 96, 23, 114, 130, 32, 222, 14, 13, 50, 123, 223, 50, 135, 32, 102, 80, 119, 186, 36, 252, 80, 172, 46, 163, 150, 128, 53, 52, 249, 205, 204, 51, 206, 248, 83, 97, 9, 144, 179, 61, 171, 171, 246, 176, 151, 0, 95, 140, 175, 66, 138, 169, 57, 38, 103, 76, 168, 75, 168, 114, 181, 147, 225, 75, 197, 102, 197, 175, 128, 188, 97, 215, 35, 43, 15, 34, 158, 81, 159, 63, 81, 65, 72, 7, 138, 81, 15, 131, 202, 244, 218, 77, 109, 124, 11, 223, 100, 233, 137, 244, 134, 245, 108, 144, 12, 7, 152, 169, 12, 31, 60, 227, 52, 228, 196, 107, 219, 159, 141, 246, 244, 129, 96, 16, 103, 79, 51, 123, 209, 153, 125, 73, 192, 13, 4, 161, 15, 25, 220, 200, 215, 244, 211, 96, 244, 197, 176, 43, 46, 41, 33, 250, 58, 188, 205, 3, 222, 245, 217, 22, 179, 211, 36, 157, 248, 72, 221, 64, 88, 23, 97, 95, 106, 142, 18, 72, 64, 95, 66, 231, 139, 202, 182, 77, 249, 29, 5, 109, 170, 226, 144, 157, 57, 14, 216, 237, 176, 5, 242, 43, 95, 166, 41, 250, 37, 227, 164, 14, 75, 136, 221, 246, 95, 76, 139, 46, 105, 237, 33, 159, 71, 233, 170, 178, 3, 132, 201, 147, 120, 102, 196, 55, 50, 96, 21, 25, 194, 246, 108, 175, 3, 189, 204, 252, 14, 66, 232, 27, 143, 144, 231, 146, 97, 223, 173, 87, 254, 201, 39, 154, 2, 234, 132, 215, 85, 103, 70, 155, 248, 138, 47, 84, 159, 118, 45, 35, 174, 89, 135, 140, 94, 196, 53, 108, 34, 178, 71, 4, 111, 182, 23, 117, 245, 3, 176, 125, 239, 176, 136, 208, 163, 113, 8, 235, 43, 193, 6, 112, 30, 194, 90, 250, 238, 140, 108, 104, 242, 196, 41, 183, 47, 231, 239, 255, 113, 7, 248, 71, 143, 166, 221, 249, 212, 202, 26, 202, 90, 20, 162, 26, 214, 106, 191, 116, 153, 101, 238, 190, 56, 143, 18, 134, 142, 7, 80, 110, 78, 164, 55, 194, 19, 22, 152, 206, 93, 193, 196, 244, 126, 179, 80, 117, 51, 106, 223, 38, 117, 63, 16, 169, 117, 117, 127, 134, 229, 15, 243, 17, 206, 160, 157, 30, 9, 1, 9, 218, 37, 182, 248, 164, 228, 9, 171, 243, 85, 208, 92, 221, 155, 212, 110, 57, 123, 100, 202, 85, 83, 4, 3, 239, 201, 148, 176, 179, 2, 159, 116, 80, 231, 44, 29, 93, 114, 29, 181, 251, 219, 124, 202, 222, 89, 237, 21, 210, 9, 8, 131, 36, 166, 179, 175, 195, 102, 71, 33, 152, 249, 33, 51, 240, 48, 36, 167, 37, 90, 0, 246, 15, 227, 20, 149, 105, 65, 45, 68, 86, 5, 239, 84, 244, 177, 169, 16, 197, 235, 72, 6, 225, 40, 218, 103, 247, 51, 9, 191, 118, 174, 188, 138, 217, 153, 1, 125, 238, 244, 36, 39, 29, 144, 119, 56, 52, 194, 79, 253, 95, 213, 71, 211, 175, 236, 28, 192, 183, 11, 65, 10, 242, 238, 178, 134, 173, 255, 164, 80, 185, 180, 155, 208, 11, 220, 23, 154, 224, 1, 116, 0, 249, 247, 111, 36, 178, 91, 0, 121, 6, 250, 95, 74, 24, 46, 155, 4, 58, 204, 134, 111, 132, 8, 190, 107, 178, 28, 129, 58, 102, 11, 249, 150, 40, 192, 249, 113, 34, 206, 228, 241, 162, 165, 18, 169, 109, 8, 111, 151, 21, 179, 38, 144, 133, 131, 214, 125, 212, 70, 247, 107, 107, 238, 4, 113, 192, 164, 46, 40, 253, 184, 118, 201, 96, 166, 45, 41, 43, 138, 39, 69, 204, 78, 144, 179, 141, 188, 74, 253, 30, 224, 230, 132, 131, 133, 16, 167, 222, 118, 191, 50, 249, 187, 219, 95, 27, 80, 104, 147, 21, 131, 91, 0, 175, 97, 114, 156, 80, 120, 205, 120, 7, 226, 132, 126, 95, 37, 166, 30, 240, 0, 214, 225, 43, 21, 175, 21, 173, 172, 33, 87, 94, 142, 246, 4, 232, 135, 36, 5, 241, 20, 69, 42, 184, 77, 79, 207, 228, 53, 142, 149, 190, 63, 199, 165, 197, 190, 67, 239, 215, 73, 64, 230, 159, 197, 103, 248, 233, 44, 222, 245, 46, 149, 36, 213, 19, 50, 70, 193, 206, 221, 159, 61, 60, 213, 200, 99, 188, 143, 130, 187, 239, 227, 227, 226, 222, 142, 147, 179, 213, 152, 140, 101, 105, 205, 165, 191, 213, 135, 96, 250, 177, 127, 150, 113, 216, 195, 61, 205, 40, 31, 225, 157, 147, 128, 19, 49, 203, 8, 221, 149, 148, 186, 40, 230, 164, 171, 29, 17, 216, 140, 128, 147, 176, 4, 154, 233, 201, 82, 133, 229, 108, 202, 33, 51], + [38, 71, 138, 155, 128, 87, 38, 53, 180, 202, 90, 159, 241, 98, 70, 137, 222, 90, 142, 71, 58, 79, 131, 20, 65, 201, 76, 204, 115, 92, 0, 38, 54, 21, 155, 152, 219, 124, 58, 60, 235, 105, 52, 123, 255, 169, 44, 29, 45, 42, 233, 44, 218, 0, 252, 112, 127, 197, 194, 9, 0, 251, 67, 180, 114, 93, 253, 220, 73, 111, 208, 148, 215, 160, 111, 98, 24, 132, 97, 231, 134, 49, 254, 98, 121, 58, 91, 249, 242, 186, 140, 92, 12, 145, 41, 41, 76, 97, 140, 248, 49, 168, 249, 143, 38, 135, 97, 39, 152, 22, 221, 130, 47, 234, 34, 206, 103, 232, 225, 47, 241, 36, 167, 58, 250, 185, 45, 14, 180, 174, 0, 44, 92, 181, 125, 177, 187, 186, 61, 219, 247, 189, 101, 20, 17, 100, 166, 229, 251, 40, 51, 26, 81, 38, 246, 37, 154, 198, 26, 212, 30, 35, 137, 125, 114, 132, 12, 183, 170, 153, 24, 89, 120, 39, 46, 17, 215, 207, 126, 73, 240, 229, 250, 70, 109, 192, 125, 126, 163, 231, 125, 210, 110, 179, 84, 91, 96, 183, 250, 226, 213, 169, 172, 48, 12, 136, 44, 220, 208, 237, 237, 179, 129, 152, 45, 199, 11, 53, 99, 120, 143, 192, 214, 141, 169, 69, 100, 66, 4, 59, 75, 133, 139, 117, 118, 18, 3, 248, 147, 236, 93, 152, 182, 200, 81, 186, 250, 123, 148, 27, 166, 134, 178, 95, 183, 23, 171, 33, 227, 22, 36, 6, 42, 9, 140, 13, 105, 44, 240, 38, 149, 226, 138, 171, 69, 149, 162, 156, 86, 116, 153, 179, 163, 218, 53, 217, 113, 156, 154, 94, 64, 114, 218, 241, 189, 149, 171, 28, 61, 87, 174, 160, 139, 236, 203, 175, 2, 222, 124, 69, 163, 240, 57, 68, 19, 227, 246, 51, 99, 210, 130, 108, 78, 237, 66, 86, 80, 223, 52, 4, 48, 26, 46, 190, 231, 139, 189, 87, 112, 59, 148, 222, 95, 247, 43, 85, 232, 51, 113, 172, 51, 145, 82, 19, 199, 40, 199, 43, 163, 86, 187, 144, 174, 54, 250, 29, 194, 129, 248, 124, 150, 204, 171, 193, 155, 33, 30, 147, 193, 65, 6, 55, 168, 135, 37, 181, 246, 70, 29, 98, 244, 68, 241, 40, 250, 98, 11, 104, 50, 123, 83, 168, 206, 141, 15, 48, 159, 81, 36, 231, 22, 224, 53, 169, 73, 239, 136, 148, 103, 33, 170, 199, 97, 9, 243, 144, 202, 255, 228, 54, 84, 56, 126, 12, 40, 53, 41, 157, 60, 26, 228, 43, 185, 93, 127, 100, 234, 87, 218, 62, 91, 197, 185, 166, 122, 174, 31, 91, 239, 98, 121, 160, 23, 225, 240, 177, 50, 232, 1, 244, 240, 44, 123, 226, 200, 55, 58, 193, 254, 235, 153, 11, 195, 142, 106, 129, 129, 109, 114, 50, 28, 41, 161, 131, 73, 218, 37, 97, 22, 139, 114, 28, 100, 253, 242, 87, 15, 8, 188, 115, 138, 106, 117, 175, 186, 173, 69, 173, 195, 61, 160, 141, 31, 154, 151, 203, 240, 1, 132, 219, 3, 33, 12, 210, 42, 119, 134, 73, 81, 177, 52, 248, 167, 134, 201, 140, 49, 193, 84, 253, 161, 161, 195, 174, 174, 60, 215, 194, 254, 52, 24, 193, 153, 226, 106, 76, 107, 219, 251, 218, 244, 244, 238, 12, 43, 160, 218, 180, 229, 198, 17, 0, 16, 119, 18, 75, 132, 239, 21, 78, 144, 233, 146, 226, 110, 39, 251, 12, 7, 95, 183, 123, 34, 202, 121, 44, 108, 185, 129, 177, 207, 212, 32, 179, 204, 226, 241, 235, 216, 224, 67, 95, 83, 22, 10, 114, 135, 240, 124, 5, 106, 82, 91, 68, 61, 47, 5, 44, 134, 148, 174, 220, 154, 241, 230, 149, 98, 160, 226, 102, 89, 221, 221, 109, 83, 155, 228, 221, 129, 148, 144, 238, 85, 7, 251, 223, 53, 219, 36, 215, 23, 22, 220, 115, 75, 176, 49, 129, 118, 246, 226, 2, 216, 225, 178, 207, 149, 181, 198, 133, 131, 90, 5, 93, 210, 130, 166, 222, 92, 186, 51, 192, 221, 165, 77, 87, 21, 245, 209, 99, 213, 248, 174, 246, 182, 114, 64, 45, 136, 151, 17, 192, 63, 194, 208, 127, 184, 54, 91, 108, 118, 134, 113, 15, 180, 63, 150, 43, 51, 111, 106, 127, 35, 159, 0, 156, 213, 229, 211, 16, 123, 134, 110, 169, 79, 218, 167, 32, 215, 191, 203, 197, 160, 90, 106, 43, 18, 92, 35, 246, 153, 181, 28, 24, 11, 242, 101, 162, 74, 89, 105, 147, 209, 31, 80, 181, 148, 160, 138, 72, 191, 121, 203, 231, 66, 100, 221, 59, 252, 100, 221, 245, 44, 242, 109, 143, 36, 169, 198, 140, 194, 53, 96, 91, 205, 8, 35, 186, 64, 253, 163, 252, 155, 62, 148, 110, 142, 42, 67, 1, 61, 185, 121, 243, 147, 69, 133, 152, 230, 70, 102, 22, 82, 187, 242, 239, 109, 194, 86, 141, 85, 236, 224, 179, 183, 253, 105, 58, 171, 108, 177, 84, 219, 66, 216, 75, 9, 248, 233, 95, 58, 187, 15, 32, 154, 8, 72, 149, 186, 203, 34, 180, 105, 1, 245, 59, 147, 219, 181, 130, 9, 175, 241, 111, 151, 117, 40, 246, 57, 10, 141, 164, 226, 169, 77, 87, 27, 73, 191, 66, 64, 153, 10, 64, 204, 124, 194, 233, 108, 59, 87, 238, 39, 99, 116, 44, 103, 196, 248, 57, 61, 106, 138, 176, 121, 90, 89, 38, 94, 201, 187, 229, 102, 244, 114, 175, 112, 148, 124, 147, 34, 40, 154, 65, 139, 149, 196, 53, 11, 149, 5, 132, 159, 59, 148, 81, 73, 45, 225, 162, 51, 175, 68, 140, 169, 184, 206, 205, 233, 133, 78, 37, 17, 190, 26, 99, 98, 85, 57, 6, 110, 226, 145, 218, 190, 29, 35, 99, 204, 237, 83, 140, 64, 54, 139, 186, 65, 119, 178, 178, 91, 221, 70, 98, 20, 216, 157, 157, 47, 29, 89, 180, 236, 43, 190, 55, 87, 165, 192, 179, 77, 160, 195, 122, 154, 71, 152, 100, 239, 70, 194, 176, 174, 12, 112, 135, 251, 86, 125, 36, 248, 96, 19, 73, 147, 73, 103, 24, 58, 236, 184, 24, 181, 182, 33, 32, 62, 169, 246, 235, 232, 106, 31, 131, 55, 109, 142, 222, 247, 63, 10, 131, 74, 106, 106, 129, 184, 92, 27, 251, 57, 57, 48, 138, 232, 153, 172, 156, 158, 24, 224, 178, 200, 234, 65, 236, 9, 102, 184, 27, 153, 112, 102, 255, 104, 71, 216, 79, 108, 153, 13, 226, 168, 12, 244, 150, 143, 95, 112, 46, 30, 249, 205, 221, 7, 177, 195, 97, 4, 140, 84, 152, 234, 31, 125, 57, 37, 130, 126, 39, 39, 115, 239, 114, 96, 28, 110, 123, 50, 96, 192, 82, 23, 11, 206, 85, 211, 94, 153, 116, 29, 249, 63, 235, 85, 187, 164, 143, 183, 108, 85, 157, 204, 189, 251, 142, 55, 69, 72, 131, 53, 47, 212, 67, 63, 179, 99, 151, 251, 180, 81, 112, 160, 22, 220, 46, 194, 159, 148, 163, 179, 218, 28, 223, 241, 62, 98, 71, 177, 242, 218, 55, 231, 98, 120, 200, 204, 181, 163, 187, 109, 102, 47, 255, 35, 80, 136, 7, 222, 91, 44, 99, 211, 216, 225, 83, 88, 243, 80, 141, 98, 135, 76, 5, 124, 27, 58, 3, 93, 116, 72, 48, 137, 66, 96, 235, 214, 15, 48, 46, 24, 62, 249, 69, 106, 185, 242, 162, 7, 228, 38, 114, 227, 14, 40, 228, 86, 184, 141, 180, 95, 217, 27, 90, 200, 184, 40, 122, 177, 99, 91, 186, 194, 47, 157, 121, 68, 184, 165, 48, 105, 46, 213, 188, 6, 140, 3, 170, 40, 93, 231, 167, 149, 78, 53, 146, 161, 247, 99, 29, 169, 10, 54, 207, 143, 246, 162, 54, 241, 101, 196, 245, 149, 162, 227, 252, 196, 93, 165, 14, 63, 36, 144, 19, 147, 103, 245, 29, 115, 68, 152, 117, 27, 58, 158, 37, 174, 126, 71, 198, 242, 228, 132, 116, 149, 153, 212, 221, 245, 224, 94, 101, 195, 62, 89, 186, 89, 47, 165, 52, 21, 202, 7, 98, 26, 131, 83, 108, 20, 50, 177, 54, 233, 57, 170, 106, 13, 193, 169, 58, 248, 42, 15, 175, 110, 215, 126, 158, 196, 190, 59, 179, 48, 131, 88, 58, 192, 184, 53, 216, 140, 32, 84, 1, 90, 115, 223, 26, 226, 43, 89, 165, 192, 4, 221, 177, 217, 196, 66, 197, 243, 59, 220, 204, 109, 230, 219, 192, 179, 92, 236, 145, 236, 173, 242, 120, 111, 146, 87, 142, 50, 52, 246, 8, 202, 17, 177, 244, 85, 195, 98, 236, 47, 229, 216, 155, 116, 251, 99, 68, 0, 135, 175, 84, 111, 139, 228, 57, 78, 168], + [83, 240, 243, 219, 4, 74, 58, 92, 4, 50, 234, 73, 162, 24, 139, 142, 16, 222, 117, 7, 140, 3, 59, 107, 74, 12, 22, 139, 133, 217, 134, 163, 99, 3, 168, 196, 246, 133, 55, 68, 8, 239, 98, 128, 182, 3, 185, 192, 120, 120, 98, 81, 238, 234, 138, 121, 214, 142, 35, 127, 58, 73, 213, 128, 182, 200, 159, 75, 243, 32, 124, 87, 198, 69, 103, 34, 226, 176, 233, 171, 111, 255, 209, 88, 167, 28, 7, 157, 182, 223, 91, 59, 169, 57, 213, 76, 11, 231, 204, 34, 32, 77, 203, 17, 189, 11, 139, 73, 46, 21, 194, 123, 17, 111, 138, 212, 239, 160, 160, 211, 31, 75, 13, 198, 93, 115, 249, 90, 118, 44, 83, 178, 188, 155, 228, 118, 148, 99, 33, 125, 171, 157, 105, 10, 45, 147, 193, 108, 161, 69, 88, 200, 13, 40, 243, 4, 162, 101, 173, 129, 223, 200, 95, 35, 244, 216, 207, 72, 102, 101, 211, 101, 180, 43, 16, 227, 6, 189, 240, 121, 179, 2, 104, 126, 122, 44, 18, 110, 60, 31, 132, 133, 110, 194, 49, 50, 247, 107, 120, 57, 150, 172, 148, 148, 10, 223, 238, 228, 61, 16, 183, 229, 153, 98, 64, 144, 253, 206, 99, 89, 140, 168, 40, 176, 100, 193, 108, 13, 20, 51, 35, 175, 36, 54, 251, 138, 237, 16, 131, 38, 233, 33, 36, 161, 212, 249, 164, 130, 212, 201, 94, 32, 105, 245, 184, 26, 181, 181, 112, 164, 44, 137, 235, 70, 39, 16, 0, 162, 69, 35, 202, 93, 94, 45, 178, 175, 110, 0, 226, 158, 52, 96, 159, 239, 191, 245, 207, 238, 7, 83, 9, 156, 69, 229, 113, 209, 29, 77, 247, 164, 81, 0, 234, 38, 154, 135, 235, 16, 13, 53, 114, 136, 40, 145, 166, 154, 75, 130, 11, 211, 64, 60, 133, 208, 155, 217, 183, 100, 63, 124, 190, 184, 90, 199, 22, 160, 33, 16, 235, 40, 176, 102, 43, 235, 172, 37, 190, 218, 163, 200, 115, 220, 96, 213, 99, 89, 179, 209, 197, 230, 104, 154, 205, 54, 235, 38, 57, 31, 250, 112, 48, 223, 67, 31, 157, 118, 108, 4, 25, 174, 113, 212, 218, 170, 1, 78, 179, 85, 104, 236, 92, 112, 180, 68, 135, 86, 78, 242, 31, 187, 28, 121, 133, 154, 168, 56, 82, 250, 34, 231, 8, 126, 25, 194, 216, 37, 55, 207, 56, 115, 52, 243, 144, 114, 88, 10, 182, 99, 169, 146, 10, 198, 193, 208, 202, 61, 71, 229, 66, 186, 53, 126, 236, 159, 158, 217, 18, 240, 82, 111, 249, 251, 180, 2, 69, 100, 147, 240, 245, 161, 178, 202, 100, 107, 41, 143, 227, 114, 230, 101, 108, 138, 220, 213, 33, 155, 249, 40, 58, 112, 216, 84, 95, 225, 126, 247, 205, 132, 110, 195, 243, 43, 201, 197, 54, 90, 148, 58, 44, 131, 117, 147, 80, 180, 128, 83, 65, 129, 93, 17, 215, 19, 138, 80, 141, 218, 129, 10, 41, 96, 238, 254, 174, 225, 98, 197, 242, 41, 18, 243, 147, 206, 85, 238, 227, 121, 153, 25, 214, 79, 220, 206, 151, 97, 117, 149, 6, 129, 154, 213, 70, 204, 61, 22, 111, 221, 90, 230, 144, 32, 148, 160, 74, 38, 32, 237, 101, 53, 135, 170, 106, 190, 63, 217, 199, 221, 244, 11, 212, 151, 174, 75, 86, 115, 67, 11, 239, 75, 157, 57, 34, 238, 252, 55, 237, 155, 131, 198, 67, 223, 95, 217, 138, 171, 112, 32, 101, 129, 83, 177, 169, 108, 19, 119, 12, 10, 57, 82, 210, 130, 222, 200, 93, 107, 139, 92, 136, 88, 237, 127, 177, 141, 218, 137, 248, 252, 111, 103, 36, 162, 63, 24, 22, 41, 195, 117, 192, 111, 144, 63, 226, 53, 213, 175, 150, 84, 81, 59, 61, 188, 50, 16, 91, 58, 232, 21, 115, 203, 80, 14, 110, 254, 91, 134, 253, 157, 211, 94, 78, 145, 69, 108, 141, 119, 67, 159, 64, 198, 101, 8, 7, 35, 176, 197, 153, 105, 76, 223, 188, 48, 121, 9, 232, 111, 100, 53, 37, 241, 128, 240, 62, 65, 60, 169, 40, 103, 39, 232, 83, 75, 202, 172, 40, 125, 103, 100, 212, 189, 38, 191, 208, 69, 114, 29, 129, 238, 71, 181, 203, 198, 60, 49, 13, 230, 42, 137, 34, 127, 109, 35, 200, 96, 44, 244, 122, 110, 134, 133, 205, 114, 145, 4, 166, 247, 248, 71, 18, 214, 109, 214, 35, 27, 115, 47, 136, 54, 218, 142, 121, 16, 210, 115, 110, 142, 81, 35, 0, 249, 119, 5, 75, 232, 150, 183, 125, 65, 80, 180, 77, 255, 131, 18, 174, 180, 156, 41, 201, 223, 100, 68, 7, 162, 173, 26, 167, 77, 180, 86, 198, 56, 116, 237, 102, 240, 13, 185, 247, 123, 224, 23, 75, 249, 6, 77, 30, 47, 219, 136, 110, 195, 60, 121, 0, 52, 1, 172, 124, 124, 213, 90, 195, 60, 147, 225, 39, 131, 71, 123, 129, 27, 38, 242, 1, 251, 184, 124, 9, 47, 144, 3, 119, 174, 15, 172, 223, 53, 114, 223, 99, 62, 15, 13, 39, 124, 0, 83, 29, 238, 169, 100, 39, 238, 245, 244, 62, 100, 239, 124, 239, 124, 93, 77, 30, 99, 180, 221, 251, 52, 164, 124, 69, 2, 70, 96, 25, 55, 7, 212, 155, 231, 152, 127, 66, 247, 168, 69, 232, 60, 139, 93, 28, 61, 48, 142, 154, 173, 200, 122, 184, 76, 228, 59, 74, 68, 102, 211, 247, 25, 99, 69, 254, 7, 162, 202, 57, 43, 244, 58, 72, 230, 118, 241, 119, 15, 240, 60, 228, 161, 142, 118, 102, 246, 186, 212, 153, 201, 122, 15, 67, 67, 11, 42, 197, 224, 71, 138, 101, 162, 52, 88, 194, 87, 106, 173, 69, 110, 153, 3, 15, 135, 209, 230, 3, 135, 213, 69, 126, 168, 145, 199, 183, 219, 75, 12, 63, 174, 33, 133, 29, 37, 138, 142, 213, 93, 200, 27, 54, 199, 8, 246, 214, 203, 18, 96, 52, 212, 196, 193, 23, 195, 154, 18, 196, 156, 231, 171, 20, 77, 113, 124, 195, 150, 185, 100, 4, 43, 78, 190, 179, 53, 59, 215, 45, 80, 203, 245, 194, 81, 13, 5, 4, 156, 67, 207, 135, 153, 181, 219, 146, 123, 100, 123, 130, 249, 250, 26, 71, 9, 41, 149, 4, 167, 182, 198, 183, 205, 245, 224, 27, 54, 144, 243, 247, 70, 225, 211, 207, 39, 146, 97, 8, 100, 124, 23, 129, 136, 217, 43, 198, 252, 88, 107, 192, 254, 51, 250, 128, 163, 255, 118, 35, 123, 115, 189, 93, 128, 64, 27, 186, 78, 16, 247, 32, 235, 12, 182, 243, 4, 232, 158, 91, 84, 244, 148, 42, 94, 158, 114, 174, 220, 174, 148, 115, 90, 31, 111, 94, 65, 182, 92, 152, 70, 41, 114, 110, 103, 82, 193, 134, 189, 204, 36, 112, 212, 29, 117, 2, 154, 204, 12, 132, 253, 2, 62, 208, 4, 74, 163, 217, 12, 223, 135, 154, 222, 189, 126, 144, 38, 153, 198, 99, 97, 34, 239, 39, 63, 127, 147, 62, 247, 203, 93, 37, 216, 127, 120, 159, 25, 9, 79, 20, 161, 142, 196, 204, 93, 15, 29, 41, 141, 10, 13, 54, 249, 95, 168, 37, 48, 3, 57, 97, 144, 249, 16, 103, 122, 110, 112, 203, 87, 188, 166, 108, 131, 206, 21, 20, 172, 120, 81, 191, 15, 68, 213, 142, 24, 236, 87, 27, 5, 206, 43, 65, 208, 186, 117, 34, 32, 109, 205, 174, 27, 69, 113, 78, 108, 81, 47, 136, 45, 174, 228, 242, 180, 17, 203, 98, 28, 245, 230, 170, 213, 42, 100, 137, 194, 66, 157, 83, 227, 53, 16, 109, 94, 248, 102, 84, 128, 139, 88, 234, 168, 71, 238, 20, 84, 206, 52, 15, 227, 206, 159, 232, 251, 216, 100, 248, 100, 9, 86, 108, 0, 235, 23, 158, 116, 89, 99, 122, 100, 11, 146, 143, 34, 108, 115, 74, 4, 117, 171, 33, 2, 46, 160, 17, 199, 18, 123, 201, 95, 224, 58, 24, 251, 38, 14, 43, 216, 71, 46, 129, 34, 209, 245, 153, 87, 130, 33, 4, 162, 130, 232, 235, 221, 154, 47, 125, 239, 191, 43, 255, 199, 28, 45, 221, 180, 158, 212, 63, 244, 166, 132, 207, 130, 91, 188, 145, 210, 45, 120, 186, 126, 100, 99, 75, 176, 224, 5, 196, 187, 9, 146, 94, 1, 25, 1, 109, 66, 45, 238, 32, 199, 148, 245, 193, 88, 100, 102, 0, 30, 246, 200, 73, 2, 6, 237, 160, 206, 193, 187, 29, 239, 156, 212, 49, 36, 43, 72, 78, 204, 167, 13, 202, 173, 173, 1, 20, 15, 72, 151, 103, 45, 84, 193, 183, 99, 212, 125, 154, 162], + [27, 188, 165, 42, 64, 78, 150, 16, 233, 50, 228, 244, 249, 116, 120, 218, 30, 108, 182, 239, 95, 119, 65, 168, 147, 148, 236, 185, 194, 80, 28, 184, 138, 106, 90, 106, 177, 105, 191, 112, 108, 243, 53, 123, 54, 234, 208, 142, 123, 190, 71, 183, 20, 89, 4, 66, 88, 163, 75, 226, 197, 255, 52, 149, 58, 224, 190, 243, 41, 239, 42, 159, 245, 65, 161, 69, 8, 77, 181, 55, 164, 96, 104, 111, 222, 25, 176, 3, 153, 245, 38, 82, 58, 79, 110, 210, 46, 220, 72, 180, 206, 50, 81, 70, 91, 125, 16, 113, 56, 59, 47, 244, 193, 133, 126, 21, 139, 120, 158, 183, 31, 131, 41, 165, 233, 58, 177, 118, 102, 47, 66, 137, 149, 76, 10, 107, 115, 232, 228, 224, 203, 42, 108, 237, 139, 16, 19, 249, 190, 31, 18, 136, 227, 47, 30, 208, 94, 226, 220, 240, 226, 235, 100, 89, 46, 5, 220, 180, 232, 194, 236, 254, 123, 109, 98, 215, 48, 16, 145, 53, 77, 11, 207, 84, 180, 85, 216, 243, 162, 190, 207, 242, 134, 125, 86, 132, 255, 154, 100, 92, 229, 18, 1, 210, 154, 184, 187, 4, 164, 26, 82, 174, 101, 207, 44, 100, 9, 71, 46, 107, 119, 56, 207, 145, 252, 74, 186, 44, 127, 77, 171, 46, 17, 122, 124, 112, 178, 120, 171, 89, 129, 223, 172, 252, 210, 52, 127, 192, 123, 51, 45, 154, 153, 224, 84, 132, 155, 155, 155, 18, 186, 55, 94, 34, 130, 123, 253, 207, 17, 179, 153, 227, 159, 82, 150, 215, 111, 129, 53, 152, 220, 168, 160, 153, 131, 205, 164, 152, 38, 94, 113, 156, 224, 129, 81, 182, 246, 128, 130, 255, 214, 74, 32, 129, 62, 70, 127, 47, 21, 249, 194, 19, 105, 185, 254, 235, 74, 114, 8, 86, 253, 195, 43, 143, 166, 93, 195, 164, 243, 169, 205, 75, 192, 41, 130, 12, 251, 248, 28, 130, 2, 202, 136, 51, 165, 140, 58, 72, 11, 117, 205, 238, 176, 174, 222, 19, 229, 210, 52, 200, 83, 95, 207, 255, 212, 205, 168, 211, 125, 27, 243, 16, 115, 148, 172, 102, 83, 134, 50, 203, 11, 42, 157, 78, 178, 53, 146, 149, 117, 191, 23, 137, 189, 199, 225, 219, 147, 14, 246, 9, 112, 183, 143, 211, 58, 145, 104, 116, 118, 67, 65, 167, 227, 27, 157, 239, 250, 241, 210, 10, 217, 244, 137, 26, 235, 102, 187, 30, 194, 223, 68, 185, 253, 161, 30, 55, 54, 63, 55, 121, 37, 102, 43, 222, 190, 188, 132, 132, 9, 46, 149, 84, 90, 70, 240, 250, 136, 245, 175, 185, 3, 130, 197, 58, 91, 245, 255, 221, 243, 1, 247, 213, 206, 80, 119, 120, 168, 37, 128, 205, 234, 61, 199, 111, 16, 69, 208, 16, 26, 50, 156, 185, 36, 65, 90, 19, 15, 92, 111, 175, 125, 162, 105, 106, 37, 65, 36, 40, 36, 107, 239, 141, 199, 107, 40, 70, 93, 151, 197, 32, 159, 248, 23, 106, 8, 184, 118, 121, 59, 240, 220, 202, 8, 176, 56, 69, 200, 213, 116, 239, 241, 46, 203, 200, 197, 218, 71, 239, 32, 195, 95, 243, 212, 8, 72, 2, 46, 104, 235, 56, 172, 57, 158, 61, 162, 224, 1, 201, 196, 58, 234, 241, 142, 87, 42, 173, 253, 1, 72, 233, 127, 100, 161, 125, 135, 8, 122, 195, 172, 169, 196, 221, 45, 48, 177, 20, 229, 240, 235, 83, 117, 102, 129, 94, 177, 222, 87, 250, 218, 7, 166, 232, 239, 83, 207, 180, 9, 47, 154, 227, 129, 195, 206, 151, 112, 175, 116, 104, 66, 182, 43, 20, 23, 130, 84, 19, 45, 86, 219, 251, 232, 212, 121, 104, 224, 189, 54, 132, 174, 112, 115, 237, 36, 0, 101, 157, 250, 3, 18, 184, 104, 16, 191, 160, 69, 165, 38, 72, 134, 201, 171, 145, 127, 185, 202, 133, 235, 227, 246, 41, 203, 18, 139, 93, 19, 237, 82, 45, 127, 69, 102, 166, 251, 38, 101, 15, 60, 139, 115, 189, 48, 129, 204, 170, 177, 244, 48, 91, 215, 60, 145, 169, 99, 176, 225, 164, 101, 194, 247, 239, 10, 26, 209, 228, 82, 219, 42, 246, 156, 254, 7, 72, 229, 178, 6, 147, 252, 150, 158, 11, 67, 187, 37, 67, 216, 12, 89, 213, 206, 173, 235, 43, 20, 59, 63, 116, 0, 200, 192, 252, 195, 45, 0, 186, 9, 130, 173, 177, 148, 51, 49, 101, 203, 195, 132, 186, 159, 82, 49, 115, 66, 236, 14, 11, 112, 220, 6, 78, 60, 71, 227, 17, 12, 156, 101, 223, 214, 216, 177, 59, 163, 150, 136, 209, 248, 81, 119, 151, 32, 202, 120, 119, 179, 148, 31, 24, 63, 213, 163, 17, 101, 105, 77, 190, 217, 96, 15, 70, 18, 163, 57, 161, 209, 19, 37, 110, 57, 226, 61, 192, 77, 173, 140, 214, 21, 104, 165, 123, 206, 201, 204, 73, 210, 5, 167, 234, 13, 116, 88, 48, 85, 245, 248, 231, 152, 96, 2, 223, 232, 24, 153, 85, 133, 206, 134, 181, 155, 161, 124, 4, 163, 194, 58, 96, 251, 148, 209, 86, 126, 206, 5, 130, 97, 94, 160, 188, 153, 10, 233, 16, 241, 146, 221, 84, 252, 208, 209, 191, 152, 208, 213, 224, 238, 95, 87, 74, 208, 74, 145, 159, 174, 70, 199, 98, 55, 77, 104, 59, 156, 160, 153, 140, 231, 187, 152, 159, 7, 187, 154, 67, 201, 101, 162, 40, 36, 203, 181, 42, 45, 9, 141, 10, 87, 162, 7, 14, 215, 60, 20, 93, 233, 12, 208, 18, 211, 65, 65, 26, 145, 38, 194, 27, 240, 24, 0, 195, 97, 68, 229, 113, 125, 141, 233, 132, 54, 1, 79, 255, 14, 120, 108, 98, 126, 31, 185, 83, 110, 53, 151, 132, 143, 62, 218, 75, 238, 36, 0, 206, 236, 209, 3, 19, 71, 73, 18, 85, 159, 165, 50, 25, 200, 247, 67, 247, 22, 187, 231, 242, 209, 113, 75, 11, 252, 190, 21, 61, 35, 118, 122, 37, 250, 160, 6, 173, 67, 32, 81, 230, 215, 103, 27, 203, 211, 5, 254, 85, 115, 48, 15, 223, 71, 49, 203, 213, 55, 193, 2, 128, 128, 116, 70, 244, 119, 105, 137, 224, 46, 249, 99, 250, 88, 206, 25, 89, 9, 240, 117, 229, 34, 207, 39, 150, 195, 16, 117, 71, 88, 174, 9, 91, 43, 187, 250, 6, 73, 69, 233, 38, 167, 147, 163, 68, 186, 38, 208, 181, 23, 136, 81, 219, 198, 194, 212, 133, 56, 36, 170, 101, 92, 228, 171, 20, 71, 64, 220, 90, 119, 7, 181, 114, 122, 255, 195, 94, 64, 163, 37, 196, 217, 7, 125, 185, 121, 79, 131, 23, 143, 235, 243, 84, 172, 142, 190, 166, 191, 11, 108, 93, 31, 107, 146, 238, 186, 93, 210, 127, 103, 13, 154, 144, 22, 207, 108, 172, 18, 6, 97, 15, 106, 127, 22, 175, 16, 159, 163, 179, 253, 181, 172, 169, 53, 153, 181, 18, 19, 112, 82, 84, 146, 90, 188, 217, 237, 208, 67, 224, 25, 194, 24, 117, 33, 15, 140, 80, 94, 63, 121, 30, 86, 120, 110, 254, 243, 168, 115, 75, 37, 240, 252, 127, 168, 51, 8, 34, 137, 73, 45, 223, 210, 223, 92, 195, 160, 210, 117, 111, 8, 87, 194, 198, 224, 187, 2, 147, 151, 201, 144, 211, 198, 221, 240, 219, 9, 119, 84, 12, 37, 85, 123, 158, 229, 151, 34, 137, 40, 177, 66, 33, 209, 110, 104, 61, 201, 92, 2, 3, 92, 177, 227, 170, 243, 103, 221, 145, 173, 72, 85, 154, 63, 194, 49, 154, 183, 33, 89, 6, 145, 43, 34, 117, 81, 198, 15, 165, 88, 28, 77, 5, 41, 244, 89, 219, 223, 16, 203, 244, 230, 112, 33, 199, 252, 116, 136, 5, 162, 86, 99, 37, 174, 175, 92, 153, 73, 114, 211, 50, 29, 22, 143, 169, 7, 236, 211, 250, 1, 29, 72, 237, 85, 228, 94, 204, 144, 144, 201, 139, 119, 70, 110, 193, 177, 42, 49, 137, 114, 206, 247, 43, 99, 31, 114, 73, 23, 176, 169, 203, 112, 200, 115, 58, 6, 92, 115, 159, 41, 176, 108, 0, 101, 164, 122, 122, 190, 64, 108, 124, 219, 149, 121, 56, 229, 152, 239, 162, 3, 126, 246, 86, 153, 197, 240, 255, 64, 102, 196, 204, 207, 159, 204, 156, 109, 130, 148, 3, 209, 106, 53, 4, 211, 183, 224, 141, 76, 249, 105, 92, 89, 238, 89, 4, 113, 125, 133, 102, 116, 38, 213, 85, 31, 70, 167, 69, 187, 238, 248, 7, 14, 71, 52, 82, 158, 83, 29, 211, 139, 48, 209, 47, 233, 81, 225, 186, 16, 13, 151, 63, 223, 242, 118, 118], + [38, 75, 0, 202, 129, 221, 114, 16, 70, 245, 197, 186, 205, 127, 183, 159, 232, 23, 120, 115, 130, 61, 97, 79, 151, 55, 111, 208, 168, 78, 89, 115, 175, 214, 200, 70, 111, 135, 233, 91, 37, 212, 3, 188, 118, 193, 181, 246, 25, 60, 6, 130, 206, 50, 217, 248, 171, 7, 13, 77, 52, 107, 206, 95, 205, 251, 88, 137, 46, 19, 205, 242, 225, 15, 25, 237, 91, 235, 24, 208, 157, 173, 226, 207, 58, 83, 70, 165, 95, 140, 68, 168, 75, 57, 85, 121, 172, 246, 254, 202, 161, 226, 116, 192, 201, 61, 233, 23, 100, 171, 110, 79, 62, 182, 101, 44, 7, 91, 145, 204, 67, 213, 113, 58, 22, 72, 219, 139, 158, 105, 236, 208, 51, 211, 28, 108, 1, 253, 17, 23, 23, 43, 92, 16, 233, 151, 230, 211, 6, 176, 245, 121, 47, 53, 214, 150, 119, 157, 35, 209, 165, 14, 231, 35, 136, 145, 84, 43, 67, 18, 107, 69, 215, 239, 127, 13, 242, 197, 84, 143, 205, 119, 50, 26, 38, 203, 39, 70, 16, 245, 174, 244, 26, 192, 156, 144, 118, 79, 159, 6, 180, 160, 137, 213, 185, 49, 146, 60, 175, 204, 80, 137, 47, 139, 80, 21, 231, 75, 3, 191, 7, 103, 216, 114, 211, 110, 251, 8, 253, 243, 150, 44, 101, 142, 81, 254, 99, 25, 9, 75, 108, 246, 255, 9, 147, 229, 35, 120, 25, 134, 169, 115, 237, 52, 74, 244, 241, 5, 120, 215, 98, 225, 0, 240, 244, 70, 216, 124, 36, 241, 220, 153, 179, 37, 81, 170, 69, 10, 204, 196, 249, 220, 144, 233, 144, 70, 99, 145, 117, 130, 40, 23, 178, 192, 245, 173, 47, 201, 166, 148, 69, 85, 190, 76, 63, 202, 36, 211, 135, 69, 221, 222, 159, 108, 83, 69, 236, 16, 201, 227, 225, 237, 60, 29, 34, 168, 138, 45, 133, 83, 241, 64, 249, 174, 121, 177, 35, 167, 149, 232, 118, 242, 112, 45, 158, 29, 170, 227, 195, 171, 239, 140, 112, 74, 211, 184, 202, 46, 189, 28, 26, 190, 211, 147, 6, 169, 161, 99, 42, 254, 212, 49, 9, 191, 183, 32, 119, 136, 81, 255, 95, 105, 62, 229, 66, 81, 190, 31, 147, 220, 61, 239, 55, 102, 120, 178, 209, 242, 253, 126, 53, 115, 77, 85, 47, 49, 204, 26, 123, 149, 21, 105, 229, 242, 200, 142, 230, 81, 215, 124, 0, 95, 25, 45, 206, 128, 241, 87, 61, 86, 150, 221, 105, 220, 162, 77, 162, 231, 255, 159, 7, 92, 77, 70, 54, 239, 200, 184, 155, 11, 199, 16, 66, 154, 13, 193, 164, 72, 224, 198, 192, 36, 229, 95, 2, 6, 44, 45, 71, 30, 11, 33, 85, 166, 153, 242, 36, 166, 22, 135, 136, 92, 30, 15, 52, 10, 79, 75, 232, 252, 0, 2, 203, 252, 122, 125, 51, 104, 5, 176, 44, 117, 19, 79, 129, 108, 131, 4, 201, 149, 10, 222, 100, 61, 81, 67, 41, 36, 168, 199, 71, 200, 192, 23, 252, 160, 194, 225, 108, 105, 143, 105, 251, 98, 56, 2, 192, 186, 39, 120, 155, 71, 200, 0, 140, 174, 129, 100, 42, 74, 134, 86, 250, 119, 87, 241, 119, 163, 141, 211, 141, 29, 155, 26, 91, 12, 40, 134, 145, 96, 61, 242, 76, 16, 139, 53, 156, 196, 118, 125, 245, 240, 39, 156, 175, 132, 147, 131, 47, 71, 83, 118, 49, 170, 87, 87, 212, 28, 197, 126, 130, 46, 15, 100, 244, 75, 35, 48, 19, 227, 253, 101, 201, 12, 27, 124, 120, 192, 195, 218, 179, 103, 195, 193, 23, 122, 68, 153, 130, 181, 232, 186, 106, 215, 203, 36, 35, 226, 44, 102, 158, 160, 23, 176, 133, 163, 47, 19, 21, 117, 140, 153, 71, 18, 70, 128, 236, 83, 105, 1, 20, 119, 151, 228, 113, 169, 111, 50, 47, 202, 173, 208, 177, 133, 228, 138, 7, 235, 54, 193, 66, 14, 145, 202, 230, 186, 21, 188, 133, 147, 110, 217, 233, 89, 58, 170, 177, 101, 37, 178, 53, 149, 7, 65, 6, 196, 32, 189, 30, 117, 76, 218, 87, 66, 136, 70, 101, 85, 67, 88, 134, 195, 201, 185, 64, 144, 176, 130, 234, 141, 10, 161, 45, 85, 182, 175, 127, 97, 214, 90, 55, 178, 122, 242, 67, 157, 121, 239, 20, 49, 97, 61, 60, 116, 115, 113, 102, 2, 3, 72, 219, 162, 51, 19, 249, 114, 185, 45, 26, 141, 9, 41, 95, 253, 86, 37, 143, 32, 28, 151, 149, 14, 138, 61, 243, 153, 194, 75, 252, 97, 235, 111, 158, 176, 141, 38, 112, 37, 223, 93, 41, 251, 140, 200, 91, 87, 183, 180, 114, 154, 224, 110, 156, 132, 234, 179, 56, 14, 77, 77, 83, 24, 166, 166, 50, 191, 0, 246, 119, 166, 211, 25, 235, 125, 55, 45, 237, 7, 171, 237, 251, 144, 210, 47, 41, 68, 96, 73, 53, 136, 68, 63, 202, 53, 199, 59, 69, 108, 48, 112, 228, 145, 156, 156, 248, 41, 167, 155, 230, 194, 254, 34, 135, 110, 147, 220, 137, 195, 50, 20, 149, 113, 123, 39, 192, 59, 230, 64, 57, 120, 237, 165, 34, 218, 245, 41, 122, 35, 45, 226, 237, 249, 169, 68, 229, 68, 15, 230, 72, 171, 220, 130, 127, 66, 120, 43, 200, 141, 181, 106, 138, 11, 101, 162, 140, 178, 112, 11, 27, 170, 247, 70, 73, 87, 5, 80, 138, 173, 180, 158, 43, 205, 167, 245, 148, 94, 33, 175, 141, 169, 73, 89, 118, 91, 139, 72, 109, 3, 144, 219, 3, 171, 66, 29, 75, 152, 15, 48, 90, 192, 219, 41, 197, 114, 116, 144, 94, 156, 202, 204, 12, 97, 217, 147, 116, 239, 242, 40, 28, 28, 25, 57, 13, 34, 129, 59, 82, 42, 71, 61, 90, 41, 174, 95, 227, 15, 145, 38, 245, 62, 79, 188, 184, 113, 198, 240, 140, 148, 86, 137, 189, 71, 150, 121, 213, 218, 227, 155, 206, 67, 137, 37, 209, 215, 194, 88, 195, 1, 155, 230, 8, 35, 36, 34, 7, 169, 219, 1, 236, 190, 216, 38, 15, 70, 8, 212, 67, 246, 11, 168, 237, 110, 194, 162, 102, 214, 41, 155, 12, 47, 141, 122, 112, 127, 250, 172, 91, 172, 50, 207, 69, 3, 41, 248, 2, 123, 145, 206, 60, 131, 170, 170, 34, 127, 218, 13, 207, 89, 121, 40, 58, 204, 148, 49, 151, 188, 169, 185, 211, 15, 139, 245, 3, 98, 59, 185, 212, 44, 107, 187, 228, 105, 88, 186, 109, 56, 38, 154, 14, 177, 19, 62, 112, 165, 3, 21, 138, 16, 218, 85, 120, 134, 150, 225, 51, 62, 239, 133, 18, 219, 50, 57, 245, 145, 210, 45, 0, 177, 19, 248, 105, 117, 190, 187, 217, 87, 174, 47, 208, 1, 176, 93, 189, 249, 229, 230, 56, 183, 218, 176, 15, 42, 12, 99, 64, 25, 172, 190, 128, 136, 99, 75, 142, 48, 51, 79, 232, 160, 236, 212, 176, 212, 121, 103, 3, 151, 179, 29, 222, 164, 198, 64, 45, 192, 136, 99, 202, 175, 88, 60, 253, 230, 14, 252, 43, 67, 89, 94, 192, 139, 241, 242, 45, 161, 122, 102, 27, 145, 234, 120, 15, 133, 20, 53, 198, 21, 81, 175, 227, 211, 213, 200, 254, 56, 255, 184, 0, 57, 61, 177, 150, 180, 31, 188, 47, 168, 247, 36, 88, 26, 132, 119, 58, 131, 108, 97, 167, 163, 27, 64, 167, 194, 175, 98, 222, 124, 58, 165, 179, 64, 115, 152, 246, 96, 94, 7, 60, 166, 95, 236, 180, 29, 82, 76, 131, 136, 244, 178, 177, 118, 6, 99, 120, 194, 154, 219, 46, 92, 252, 183, 130, 166, 70, 204, 42, 67, 159, 244, 202, 93, 217, 187, 42, 202, 124, 231, 144, 111, 74, 59, 9, 132, 166, 87, 8, 39, 80, 181, 222, 4, 0, 20, 39, 21, 80, 230, 33, 185, 10, 48, 68, 62, 34, 239, 43, 127, 254, 176, 121, 61, 215, 46, 118, 122, 229, 214, 184, 247, 175, 98, 73, 133, 103, 74, 214, 162, 15, 149, 121, 21, 158, 153, 200, 52, 122, 133, 83, 85, 69, 36, 251, 161, 91, 245, 109, 103, 37, 9, 153, 253, 158, 155, 81, 191, 53, 144, 40, 247, 100, 96, 74, 17, 183, 112, 182, 228, 95, 235, 98, 62, 186, 104, 14, 229, 181, 107, 181, 27, 164, 77, 247, 72, 245, 82, 78, 184, 57, 98, 68, 204, 199, 232, 57, 124, 197, 123, 242, 224, 10, 224, 19, 191, 99, 74, 113, 228, 85, 72, 61, 172, 173, 90, 201, 58, 217, 37, 247, 120, 227, 69, 105, 183, 4, 90, 144, 137, 236, 45, 146, 99, 201, 25, 39, 143, 212, 114, 41, 176, 91, 95], + [174, 26, 196, 242, 173, 195, 191, 177, 219, 92, 158, 89, 153, 30, 69, 148, 140, 109, 188, 99, 148, 10, 92, 197, 238, 142, 91, 12, 47, 183, 85, 16, 207, 247, 22, 58, 66, 185, 178, 220, 173, 97, 157, 18, 17, 60, 220, 197, 198, 121, 92, 121, 189, 131, 240, 108, 252, 200, 169, 73, 89, 214, 84, 33, 240, 201, 38, 99, 192, 215, 204, 59, 252, 94, 99, 236, 147, 149, 2, 61, 15, 69, 181, 22, 0, 183, 167, 198, 193, 100, 161, 64, 198, 160, 11, 232, 107, 230, 111, 205, 56, 208, 141, 130, 165, 218, 56, 192, 149, 214, 20, 231, 101, 101, 212, 248, 160, 112, 44, 254, 122, 137, 69, 53, 122, 81, 16, 253, 175, 142, 79, 192, 104, 205, 100, 189, 143, 76, 248, 110, 113, 102, 221, 63, 103, 192, 44, 220, 108, 230, 95, 150, 23, 117, 73, 214, 64, 148, 152, 44, 98, 114, 126, 233, 192, 33, 189, 172, 17, 164, 7, 130, 177, 16, 62, 229, 129, 207, 84, 153, 109, 250, 234, 115, 98, 92, 130, 5, 26, 40, 136, 32, 87, 83, 84, 186, 128, 58, 156, 89, 177, 209, 91, 26, 19, 206, 173, 207, 193, 125, 235, 19, 243, 78, 91, 180, 99, 142, 5, 101, 108, 168, 43, 38, 137, 68, 78, 242, 241, 183, 72, 209, 94, 50, 239, 46, 169, 37, 66, 120, 167, 47, 237, 100, 101, 248, 156, 249, 99, 57, 207, 135, 74, 63, 116, 175, 191, 43, 99, 163, 60, 91, 65, 218, 75, 166, 90, 93, 187, 89, 209, 71, 22, 83, 216, 3, 178, 76, 133, 234, 95, 166, 87, 1, 234, 216, 111, 246, 160, 170, 161, 210, 181, 23, 70, 249, 223, 125, 107, 67, 132, 52, 125, 144, 128, 88, 60, 47, 210, 242, 5, 5, 80, 199, 212, 174, 163, 1, 244, 235, 240, 198, 27, 154, 5, 82, 245, 33, 139, 105, 113, 185, 7, 190, 82, 180, 249, 34, 220, 166, 218, 134, 207, 26, 7, 111, 206, 22, 48, 240, 10, 173, 213, 120, 141, 142, 16, 206, 250, 121, 141, 100, 216, 97, 118, 229, 60, 213, 86, 154, 52, 68, 161, 135, 243, 28, 134, 4, 79, 194, 231, 232, 159, 173, 109, 155, 242, 9, 94, 94, 36, 153, 114, 246, 172, 41, 160, 106, 214, 246, 154, 110, 79, 249, 189, 134, 0, 224, 181, 176, 127, 163, 12, 88, 92, 21, 99, 143, 224, 143, 132, 172, 9, 93, 126, 214, 26, 121, 186, 218, 156, 34, 161, 208, 7, 113, 211, 3, 233, 4, 150, 108, 123, 202, 30, 134, 78, 210, 207, 80, 157, 75, 119, 174, 63, 212, 59, 79, 145, 10, 229, 45, 166, 204, 41, 95, 63, 80, 174, 4, 106, 119, 145, 19, 100, 83, 112, 12, 118, 171, 13, 243, 144, 119, 62, 62, 84, 144, 214, 85, 227, 93, 223, 53, 147, 50, 104, 226, 17, 255, 130, 11, 39, 24, 35, 16, 114, 0, 83, 3, 159, 148, 92, 129, 241, 70, 167, 241, 99, 251, 127, 132, 64, 225, 128, 228, 197, 33, 183, 166, 39, 219, 62, 198, 192, 195, 152, 250, 8, 99, 83, 94, 98, 199, 19, 62, 148, 30, 136, 29, 34, 130, 212, 112, 197, 154, 27, 34, 44, 61, 59, 130, 106, 167, 125, 70, 200, 121, 103, 111, 1, 83, 61, 72, 65, 84, 80, 234, 102, 232, 245, 238, 137, 32, 143, 172, 1, 195, 151, 171, 113, 233, 57, 65, 242, 242, 25, 238, 188, 8, 103, 93, 122, 251, 216, 145, 69, 67, 100, 196, 199, 173, 132, 247, 209, 180, 133, 136, 201, 126, 88, 127, 71, 219, 105, 170, 158, 37, 70, 113, 11, 25, 244, 249, 153, 244, 143, 202, 68, 19, 49, 151, 237, 242, 22, 11, 153, 68, 166, 197, 138, 104, 172, 46, 195, 239, 234, 192, 57, 178, 178, 104, 161, 58, 9, 22, 238, 155, 128, 188, 112, 212, 45, 159, 248, 38, 216, 105, 153, 24, 135, 252, 153, 193, 36, 52, 186, 118, 71, 109, 237, 129, 55, 199, 126, 81, 144, 186, 34, 28, 30, 74, 41, 205, 36, 183, 68, 89, 175, 122, 190, 73, 140, 190, 87, 90, 101, 220, 59, 125, 129, 87, 128, 125, 32, 14, 50, 222, 204, 196, 212, 136, 135, 110, 63, 152, 123, 85, 141, 103, 160, 193, 55, 32, 150, 77, 248, 119, 241, 195, 16, 2, 127, 131, 144, 185, 32, 106, 16, 65, 63, 32, 214, 120, 21, 118, 40, 41, 208, 218, 108, 245, 114, 146, 35, 199, 197, 14, 105, 163, 125, 1, 75, 14, 219, 205, 180, 203, 190, 0, 201, 150, 115, 222, 241, 68, 51, 45, 57, 40, 64, 244, 10, 196, 235, 154, 133, 62, 146, 218, 153, 166, 210, 33, 172, 5, 20, 14, 150, 28, 203, 240, 220, 179, 175, 138, 229, 172, 153, 162, 230, 36, 211, 161, 19, 32, 178, 84, 59, 1, 154, 212, 185, 97, 163, 131, 44, 153, 2, 42, 185, 239, 192, 172, 253, 40, 21, 75, 174, 117, 249, 73, 123, 239, 116, 202, 253, 224, 192, 118, 7, 120, 209, 159, 234, 53, 192, 74, 206, 41, 134, 87, 224, 171, 19, 112, 136, 27, 202, 178, 195, 192, 89, 248, 169, 184, 160, 83, 142, 47, 199, 133, 52, 77, 50, 50, 134, 24, 134, 205, 135, 43, 179, 16, 17, 35, 188, 60, 190, 8, 92, 166, 97, 85, 59, 118, 36, 99, 175, 120, 2, 167, 142, 30, 245, 172, 99, 249, 66, 205, 253, 89, 23, 199, 80, 162, 67, 152, 7, 17, 176, 19, 113, 132, 181, 38, 137, 141, 196, 167, 229, 254, 190, 176, 83, 252, 97, 185, 52, 64, 15, 198, 216, 36, 20, 154, 142, 42, 113, 45, 106, 97, 40, 65, 72, 26, 158, 15, 10, 76, 156, 63, 83, 27, 190, 200, 226, 10, 236, 0, 151, 76, 192, 92, 6, 233, 155, 29, 124, 235, 111, 72, 96, 136, 194, 245, 129, 42, 182, 32, 16, 13, 173, 66, 69, 152, 69, 113, 241, 232, 172, 238, 39, 241, 10, 72, 29, 61, 129, 0, 223, 134, 59, 230, 167, 85, 202, 205, 205, 153, 79, 160, 97, 83, 58, 199, 180, 167, 117, 190, 89, 158, 183, 187, 4, 244, 235, 216, 160, 125, 6, 6, 82, 10, 218, 30, 117, 88, 47, 217, 16, 68, 197, 203, 119, 216, 98, 141, 91, 149, 203, 153, 16, 82, 187, 130, 157, 71, 237, 228, 92, 122, 140, 48, 58, 233, 121, 166, 11, 178, 151, 14, 189, 123, 255, 4, 66, 56, 121, 175, 239, 55, 229, 206, 97, 192, 109, 77, 195, 46, 124, 198, 175, 211, 144, 185, 157, 207, 161, 94, 143, 91, 62, 234, 148, 106, 113, 74, 100, 148, 89, 166, 132, 7, 180, 72, 143, 33, 198, 170, 87, 41, 194, 253, 26, 230, 10, 247, 115, 129, 115, 122, 168, 45, 21, 195, 140, 227, 218, 156, 105, 142, 163, 62, 25, 223, 27, 59, 134, 199, 206, 22, 115, 57, 63, 54, 49, 136, 220, 239, 204, 143, 107, 223, 205, 111, 216, 181, 101, 251, 138, 55, 166, 45, 251, 87, 9, 131, 162, 110, 125, 21, 191, 2, 173, 11, 244, 193, 73, 255, 237, 180, 146, 206, 65, 254, 197, 203, 140, 108, 175, 180, 175, 78, 172, 88, 253, 15, 248, 202, 111, 64, 109, 206, 95, 34, 5, 234, 116, 205, 187, 73, 228, 125, 198, 11, 80, 152, 33, 86, 5, 163, 169, 98, 77, 3, 248, 240, 210, 114, 183, 144, 234, 115, 8, 55, 126, 147, 59, 240, 167, 130, 103, 175, 161, 179, 98, 180, 56, 46, 60, 128, 167, 117, 194, 125, 127, 184, 207, 186, 2, 5, 133, 33, 211, 228, 165, 149, 255, 3, 146, 167, 44, 8, 236, 45, 170, 183, 195, 170, 10, 137, 245, 248, 162, 73, 237, 151, 28, 186, 45, 108, 26, 157, 193, 169, 73, 43, 192, 15, 228, 203, 125, 217, 161, 149, 178, 53, 144, 123, 174, 128, 110, 158, 180, 12, 190, 223, 52, 50, 205, 133, 205, 62, 213, 209, 127, 45, 85, 153, 246, 176, 40, 161, 222, 145, 111, 96, 87, 225, 214, 89, 73, 175, 223, 29, 60, 213, 241, 147, 77, 244, 198, 141, 38, 125, 76, 42, 245, 119, 214, 112, 18, 171, 73, 202, 106, 160, 7, 142, 167, 47, 5, 62, 203, 182, 213, 6, 246, 156, 6, 128, 202, 145, 207, 207, 73, 191, 133, 227, 105, 218, 212, 86, 38, 34, 27, 12, 50, 171, 107, 114, 190, 64, 145, 126, 123, 123, 93, 51, 147, 25, 212, 60, 221, 222, 97, 46, 4, 80, 75, 57, 177, 251, 117, 95, 164, 110, 71, 90, 20, 94, 173, 171, 172, 40, 215, 131, 235, 195, 37, 61, 119, 194, 13, 173, 53, 153, 80, 16] + ], + "segmentSize": null + }, + { + "encrypted": [ + [85, 72, 82, 219, 156, 238, 134, 78, 231, 93, 234, 188, 237, 118, 161, 245, 87, 128, 53, 140, 153, 144, 15, 164, 226, 58, 176, 176, 48, 160, 212, 147, 31, 193, 198, 34, 178, 141, 172, 24, 114, 135, 201, 247, 231, 76, 113, 132, 16, 227, 181, 15, 216, 165, 71, 160, 37, 177, 64, 149, 183, 188, 30, 68, 232, 49, 40, 140, 125, 188, 235, 2, 80, 105, 130, 176, 3, 119, 8, 25, 185, 102, 112, 73, 16, 80, 246, 210, 168, 189, 155, 230, 224, 228, 79, 225, 73, 120, 88, 93, 253, 150, 6, 218, 117, 200, 164, 236, 151, 72, 85, 46, 185, 70, 19, 21, 52, 220, 244, 13, 74, 246, 93, 25, 45, 200, 118, 128, 144, 123, 238, 52, 41, 131, 115, 110, 185, 78, 252, 90, 210, 213, 133, 1, 99, 227, 20, 82, 66, 156, 253, 63, 15, 50, 50, 106, 113, 16, 1, 149, 215, 148, 61, 90, 228, 94, 108, 189, 40, 231, 72, 76, 229, 238, 244, 148, 119, 189, 238, 172, 143, 166, 235, 252, 19, 137, 104, 121, 205, 47, 201, 209, 140, 69, 82, 246, 200, 99, 129, 201, 126, 202, 99, 231, 206, 83, 55, 254, 222, 245, 249, 92, 209, 46, 212, 234, 225, 219, 126, 250, 111, 254, 156, 177, 6, 241, 214, 130, 220, 135, 145, 177, 23, 206, 114, 230, 56, 196, 200, 246, 81, 100, 163, 119, 85, 218, 162, 14, 113, 113, 76, 9, 182, 37, 102, 24, 75, 61, 107, 60, 191, 46, 0, 244, 248, 16, 144, 153, 144, 119, 123, 146, 66, 193, 88, 45, 28, 116, 96, 186, 131, 26, 56, 45, 219, 7, 80, 173, 34, 20, 110, 246, 80, 70, 164, 217, 69, 4, 227, 128, 243, 160, 1, 154, 152, 249, 126, 107, 99, 120, 55, 240, 243, 126, 44, 110, 124, 227, 92, 89, 16, 23, 225, 98, 29, 242, 215, 213, 118, 110, 213, 210, 108, 154, 69, 70, 171, 90, 251, 214, 97, 187, 25, 235, 106, 158, 247, 212, 252, 224, 139, 57, 132, 130, 104, 59, 82, 39, 153, 119, 109, 84, 248, 5, 150, 139, 17, 93, 246, 139, 174, 79, 238, 148, 11, 61, 159, 84, 171, 92, 112, 196, 8, 36, 204, 90, 247, 165, 14, 59, 3, 17, 97, 73, 85, 109, 1, 173, 61, 18, 138, 90, 148, 186, 84, 71, 113, 59, 30, 30, 180, 35, 245, 151, 240, 22, 121, 114, 38, 84, 158, 218, 39, 143, 242, 186, 142, 86, 255, 202, 85, 166, 81, 239, 252, 155, 221, 210, 132, 25, 130, 16, 196, 253, 132, 253, 23, 60, 244, 191, 182, 21, 104, 67, 250, 35, 48, 244, 208, 89, 225, 219, 207, 75, 1, 47, 12, 5, 26, 20, 33, 101, 63, 74, 128, 39, 68, 215, 173, 32, 18, 192, 252, 100, 190, 79, 249, 115, 143, 97, 80, 91, 109, 119, 61, 255, 183, 24, 156, 212, 88, 72, 203, 249, 100, 178, 69, 104, 211, 39, 246, 166, 161, 180, 202, 73, 219, 51, 189, 123, 25, 160, 237, 236, 130, 160, 148, 146, 6, 254, 100, 101, 252, 77, 33, 215, 98, 219, 175, 17, 192, 249, 169, 112, 141, 254, 142, 46, 40, 16, 139, 209, 193, 7, 27, 32, 118, 152, 189, 170, 207, 67, 32, 192, 29, 177, 228, 119, 60, 216, 233, 178, 44, 118, 68, 170, 129, 34, 157, 53, 209, 35, 186, 227, 101, 84, 66, 235, 31, 174, 168, 9, 78, 105, 173, 157, 194, 178, 251, 170, 96, 50, 108, 156, 86, 121, 118, 81, 62, 117, 236, 46, 102, 236, 33, 232, 218, 125, 165, 37, 188, 52, 111, 78, 28, 65, 247, 200, 98, 57, 217, 69, 245, 25, 255, 210, 8, 235, 111, 100, 109, 182, 88, 20, 170, 185, 75, 248, 188, 83, 62, 60, 150, 183, 58, 108, 181, 79, 53, 156, 71, 77, 109, 214, 164, 176, 248, 211, 223, 219, 103, 206, 68, 128, 102, 84, 105, 160, 89, 95, 161, 106, 83, 105, 2, 140, 194, 39, 184, 157, 36, 106, 193, 245, 214, 53, 73, 148, 88, 90, 2, 43, 177, 22, 239, 181, 224, 193, 211, 210, 112, 97, 185, 79, 6, 82, 59, 192, 184, 48, 45, 147, 192, 229, 57, 2, 26, 151, 165, 233, 255, 97, 189, 105, 3, 59, 206, 199, 249, 153, 81, 197, 72, 70, 91, 192, 181, 114, 158, 97, 94, 110, 133, 129, 133, 144, 207, 214, 157, 81, 166, 180, 236, 57, 195, 99, 120, 158, 62, 64, 236, 224, 155, 135, 167, 155, 161, 118, 238, 130, 243, 237, 190, 234, 15, 171, 78, 62, 28, 215, 30, 73, 214, 189, 189, 190, 201, 146, 189, 117, 171, 131, 154, 118, 144, 189, 143, 24, 165, 249, 156, 188, 161, 242, 16, 204, 33, 205, 166, 208, 251, 10, 140, 41, 101, 193, 54, 188, 241, 233, 113, 127, 53, 172, 134, 6, 234, 97, 226, 117, 85, 237, 165, 181, 242, 253, 198, 96, 92, 20, 31, 118, 117, 91, 37, 149, 134, 188, 55, 167, 141, 221, 11, 250, 194, 23, 14, 103, 248, 30, 251, 233, 152, 159, 222, 185, 26, 94, 87, 22, 3, 223, 15, 71, 112, 99, 179, 79, 194, 110, 20, 129, 180, 10, 34, 185, 196, 227, 75, 13, 24, 73, 62, 231, 162, 176, 188, 122, 28, 27, 123, 215, 11, 164, 49, 75, 162, 123, 233, 219, 104, 177, 53, 74, 212, 72, 128, 227, 249, 37, 169, 114, 170, 68, 226, 170, 53, 209, 214, 212, 226, 223, 18, 151, 181, 240, 121, 16, 162, 230, 81, 26, 148, 104, 160, 218, 242, 210, 118, 242, 132, 192, 140, 129, 237, 222, 190, 193, 212, 105, 221, 113, 73, 87, 223, 219, 61, 184, 177, 36, 175, 80, 178, 186, 221, 128, 106, 246, 227, 110, 22, 235, 209, 11, 77, 164, 202, 112, 113, 38, 101, 55, 149, 54, 119, 51, 78, 211, 155, 92, 239, 204, 27, 213, 195, 57, 119, 19, 206, 254, 242, 128, 22, 174, 99, 255, 70, 122, 65, 102, 222, 34, 109, 112, 37, 21, 41, 193, 29, 250, 109, 36, 39, 102, 8, 171, 51, 19, 160, 163, 199, 221, 144, 45, 130, 199, 64, 97, 237, 232, 132, 38, 156, 196, 236, 20, 226, 101, 136, 217, 80, 168, 194, 241, 152, 247, 185, 169, 214, 72, 187, 240, 61, 131, 159, 59, 136, 157, 124, 18, 119, 89, 177, 191, 178, 40, 208, 145, 244, 107, 114, 191, 207, 30, 235, 249, 35, 208, 212, 53, 68, 45, 49, 170, 28, 159, 36, 27, 31, 96, 107, 218, 107, 227, 182, 170, 218, 31, 220, 196, 31, 173, 9, 59, 31, 26, 234, 173, 2, 113, 94, 216, 207, 10, 90, 242, 232, 24, 198, 216, 147, 35, 5, 196, 224, 243, 90, 156, 172, 167, 184, 93, 231, 200, 193, 186, 37, 233, 122, 143, 132, 72, 182, 31, 169, 126, 151, 213, 64, 52, 162, 49, 172, 112, 200, 42, 68, 27, 4, 81, 58, 72, 14, 231, 233, 49, 224, 254, 18, 112, 235, 95, 94, 18, 121, 204, 210, 50, 212, 58, 42, 104, 12, 187, 39, 216, 62, 137, 142, 83, 66, 34, 139, 188, 70, 157, 141, 218, 157, 47, 176, 180, 64, 66, 240, 199, 73, 212, 155, 193, 104, 145, 111, 214, 85, 94, 196, 36, 252, 233, 237, 36, 19, 241, 88, 111, 133, 47, 231, 161, 14, 180, 12, 12, 151, 142, 200, 211, 208, 175, 14, 148, 68, 203, 65, 107, 13, 153, 120, 103, 62, 0, 188, 119, 77, 129, 249, 194, 131, 168, 224, 170, 81, 101, 18, 95, 41, 220, 245, 230, 250, 166, 9, 4, 80, 28, 191, 180, 151, 222, 37, 38, 163, 128, 17, 237, 248, 33, 230, 216, 168, 115, 51, 100, 155, 225, 143, 147, 56, 251, 60, 104, 164, 253, 177, 141, 117, 61, 170, 219, 190, 54, 16, 24, 195, 95, 164, 87, 110, 62, 77, 137, 95, 140, 158, 235, 29, 208, 239, 161, 230, 175, 212, 25, 154, 235, 235, 175, 34, 73, 242, 90, 203, 126, 11, 142, 229, 204, 213, 189, 168, 41, 15, 205, 89, 28, 24, 183, 253, 72, 158, 152, 184, 212, 242, 251, 68, 90, 176, 61, 244, 150, 134, 198, 65, 154, 21, 17, 156, 6, 45, 114, 127, 82, 196, 60, 147, 185, 87, 35, 93, 25, 111, 109, 225, 62, 91, 194, 91, 216, 148, 50, 77, 115, 128, 71, 40, 209, 107, 180, 196, 188, 5, 126, 34, 245, 201, 144, 35, 175, 64, 8, 148, 164, 54, 253, 218, 155, 201, 15, 138, 125, 207, 42, 191, 102, 30, 191, 137, 16, 15, 39, 171, 145, 153, 238, 51, 9, 118, 128, 198, 137, 226, 90, 137, 194, 32, 237, 170, 234, 99, 109, 168, 232, 111, 193, 221, 206, 254, 219, 205, 179, 103, 222, 164, 21, 163, 198, 109, 19, 252, 176, 35, 125, 189, 106, 45, 249, 127, 28, 252, 8, 91, 33, 239, 213, 140, 178, 132, 240, 22, 93, 53, 85, 59, 213, 133, 117, 235, 170, 34, 241, 85, 14, 5, 195, 103, 133, 43, 225, 218, 154, 235, 219, 246, 23, 174, 125, 232, 130, 195, 54, 205, 148, 51, 36, 114, 137, 196, 185, 143, 127, 167, 53, 224, 79, 248, 227, 122, 78, 225, 110, 60, 225, 49, 85, 59, 2, 14, 113, 83, 88, 206, 139, 87, 46, 204, 200, 175, 217, 253, 15, 214, 211, 49, 167, 117, 215, 251, 238, 183, 146, 11, 148, 24, 220, 26, 39, 70, 129, 4, 211, 141, 58, 175, 219, 47, 31, 234, 6, 25, 95, 200, 193, 33, 39, 108, 188, 188, 50, 17, 130, 152, 39, 9, 67, 151, 199, 77, 99, 182, 240, 19, 219, 230, 12, 84, 118, 62, 232, 245, 102, 218, 77, 83, 215, 116, 39, 40, 97, 198, 105, 196, 243, 163, 136, 116, 128, 159, 18, 153, 118, 88, 165, 185, 90, 242, 55, 94, 106, 161, 209, 49, 119, 110, 95, 60, 56, 118, 252, 58, 19, 154, 170, 152, 13, 168, 18, 183, 74, 77, 89, 228, 138, 181, 132, 204, 98, 107, 117, 23, 67, 109, 233, 16, 201, 195, 215, 134, 19, 67, 154, 140, 225, 234, 216, 1, 236, 47, 143, 216, 128, 80, 98, 152, 48, 116, 238, 179, 212, 96, 124, 171, 37, 222, 152, 74, 92, 218, 176, 19, 238, 194, 34, 95, 223, 136, 81, 18, 104, 89, 116, 34, 125, 114, 214, 131, 80, 70, 245, 167, 203, 174, 230, 67, 165, 179, 133, 30, 69, 199, 150, 44, 123, 27, 172, 117, 250, 141, 78, 76, 74, 129, 7, 204, 129, 222, 144, 54, 240, 204, 58, 199, 75, 72, 105, 166, 236, 198, 222, 187, 198, 200, 196, 98, 211, 22, 112, 27, 251, 51, 117, 65, 161, 206, 30, 253, 3, 158, 108, 207, 218, 107, 188, 215, 191, 47, 10, 56, 13, 220, 77, 6, 57, 181, 118, 113, 32, 143, 236, 155, 78, 60, 117, 247, 235, 160, 40, 109, 137, 199, 112, 27, 200, 145, 68, 37, 227, 202, 105, 69, 119, 64, 146, 237, 196, 77, 45, 77, 140, 248, 20, 222, 105, 251, 148, 11, 89, 126, 41, 80, 49, 32, 108, 25, 251, 145, 152, 87, 253, 167, 18, 4, 56, 89, 42, 206, 98, 112, 142, 152, 28, 49, 123, 72, 182, 178, 86, 230, 222, 100, 144, 87, 59, 74, 159, 19, 148, 50, 199, 104, 251, 159, 82, 234, 253, 139, 41, 14, 103, 209, 17, 90, 29, 151, 33, 175, 132, 210, 119, 86, 201, 123, 227, 61, 208, 96, 152, 151, 34, 222, 97, 248, 45, 105, 226, 49, 194, 93, 215, 92, 41, 137, 86, 86, 53, 81, 118, 98, 85, 51, 109, 191, 96, 191, 109, 208, 72, 53, 90, 35, 45, 180, 55, 52, 122, 97, 229, 229, 117, 95, 105, 149, 208, 175, 234, 15, 77, 81, 11, 104, 203, 216, 24, 209, 10, 24, 83, 129, 184, 89, 242, 171, 29, 67, 162, 203, 68, 198, 50, 88, 215, 109, 126, 183, 8, 92, 43, 50, 159, 225, 174, 140, 105, 8, 26, 78, 171, 42, 224, 206, 117, 107, 43, 110, 141, 165, 62, 100, 82, 151, 90, 7, 247, 68, 250, 72, 237, 146, 134, 52, 188, 147, 4, 199, 34, 215, 4, 234, 224, 183, 103, 3, 157, 29, 97, 255, 11, 155, 48, 87, 183, 252, 154, 91, 36, 73, 125, 29, 226, 239, 219, 90, 240, 79, 115, 119, 236, 240, 151, 192, 208, 177, 59, 138, 129, 63, 201, 57, 170, 180, 29, 22, 150, 49, 187, 133, 254, 228, 6, 234, 117, 30, 40, 117, 13, 131, 245, 130, 237, 119, 193, 207, 164, 162, 57, 83, 76, 45, 80, 190, 17, 77, 6, 123, 185, 2, 161, 221, 241, 171, 13, 80, 174, 142, 7, 223, 72, 179, 181, 204, 131, 72, 225, 186, 212, 67, 75, 13, 148, 90, 88, 254, 180, 220, 71, 228, 230, 130, 139, 217, 215, 35, 207, 38, 54, 78, 9, 154, 106, 98, 91, 49, 86, 114, 173, 10, 9, 113, 156, 143, 81, 123, 181, 178, 237, 52, 93, 77, 195, 130, 70, 238, 242, 185, 204, 225, 195, 247, 66, 29, 151, 243, 34, 95, 173, 59, 184, 118, 84, 2, 77, 29, 170, 6, 144, 138, 157, 159, 84, 23, 249, 43, 104, 168, 2, 15, 182, 177, 7, 29, 16, 166, 107, 222, 4, 224, 90, 17, 164, 184, 106, 231, 166, 211, 35, 54, 18, 76, 68, 104, 187, 177, 23, 214, 44, 1, 62, 130, 216, 19, 42, 161, 1, 51, 117, 42, 184, 92, 210, 63, 243, 77, 109, 41, 116, 216, 234, 123, 153, 1, 173, 27, 167, 200, 103, 39, 236, 179, 62, 55, 35, 144, 191, 243, 21, 254, 126, 66, 53, 25, 236, 168, 83, 46, 222, 47, 233, 154, 120, 199, 240, 54, 204, 122, 19, 157, 198, 157, 117, 63, 34, 11, 224, 168, 31, 49, 241, 134, 233, 239, 38, 142, 93, 15, 101, 183, 56, 53, 135, 173, 67, 146, 11, 41, 228, 167, 18, 226, 45, 117, 182, 64, 249, 185, 70, 241, 182, 253, 24, 219, 57, 120, 174, 101, 76, 4, 50, 147, 11, 127, 213, 160, 156, 82, 223, 210, 87, 140, 39, 66, 54, 206, 131, 118, 11, 86, 221, 234, 72, 42, 219, 23, 163, 133, 173, 2, 95, 51, 120, 84, 242, 192, 99, 34, 9, 175, 59, 35, 1, 234, 107, 47, 131, 242, 120, 245, 26, 209, 78, 26, 112, 174, 31, 240, 239, 43, 178, 97, 57, 66, 109, 223, 245, 239, 24, 64, 22, 183, 163, 191, 83, 166, 246, 250, 86, 17, 89, 221, 18, 172, 237, 169, 65, 175, 253, 215, 158, 237, 199, 100, 253, 218, 217, 186, 162, 24, 222, 152, 177, 34, 98, 96, 77, 178, 36, 4, 121, 233, 156, 48, 43, 171, 98, 229, 100, 124, 190, 0, 97, 38, 99, 71, 68, 128, 6, 112, 204, 54, 187, 71, 130, 155, 109, 133, 148, 85, 107, 103, 153, 97, 247, 106, 93, 251, 123, 94, 8, 76, 8, 140, 12, 221, 76, 219, 89, 56, 0, 56, 159, 92, 56, 54, 149, 165, 241, 140, 230, 202, 118, 215, 102, 5, 15, 70, 68, 38, 184, 168, 178, 105, 115, 73, 247, 188, 9, 0, 92, 60, 55, 2, 249, 206, 210, 126, 9, 207, 121, 67, 135, 158, 171, 19, 74, 41, 203, 244, 133, 47, 254, 234, 27, 85, 189, 96, 216, 201, 150, 59, 70, 58, 220, 86, 227, 69, 49, 53, 204, 73, 2, 223, 223, 85, 97, 33, 223, 62, 95, 22, 85, 196, 4, 215, 94, 64, 14, 28, 103, 220, 160, 102, 156, 134, 249, 121, 244, 80, 23, 240, 31, 253, 183, 230, 31, 144, 175, 193, 221, 82, 79, 168, 203, 203, 143, 182, 173, 252, 171, 196, 231, 175, 62, 89, 81, 100, 175, 45, 236, 170, 211, 82, 254, 15, 22, 18, 220, 116, 154, 211, 88, 163, 6, 255, 101, 181, 93, 113, 252, 172, 56, 57, 46, 112, 208, 230, 218, 240, 142, 120, 90, 149, 180, 20, 145, 184, 186, 41, 238, 55, 142, 245, 101, 181, 22, 12, 180, 255, 35, 187, 115, 109, 112, 160, 87, 229, 177, 25, 252, 0, 131, 75, 12, 235, 50, 244, 159, 26, 22, 66, 206, 200, 65, 226, 136, 133, 125, 55, 67, 199, 147, 97, 154, 226, 243, 152, 129, 194, 77, 195, 71, 176, 249, 4, 153, 110, 172, 105, 188, 86, 151, 86, 126, 1, 158, 34, 75, 254, 94, 200, 143, 24, 162, 148, 49, 146, 196, 128, 19, 48, 124, 159, 222, 22, 223, 62, 228, 1, 46, 238, 175, 103, 237, 49, 249, 116, 120, 68, 176, 139, 79, 204, 207, 127, 235, 193, 203, 24, 199, 117, 232, 194, 34, 208, 73, 195, 120, 209, 3, 142, 67, 100, 139, 85, 61, 60, 117, 192, 151, 174, 255, 224, 8, 242, 10, 195, 251, 198, 96, 245, 241, 164, 214, 73, 74, 157, 158, 13, 132, 148, 26, 56, 38, 81, 68, 187, 200, 136, 97, 223, 232, 129, 110, 125, 208, 245, 249, 38, 240, 255, 227, 71, 56, 160, 226, 9, 73, 208, 78, 69, 19, 195, 251, 236, 232, 107, 94, 17, 98, 92, 36, 40, 201, 51, 4, 31, 186, 185, 47, 202, 144, 17, 126, 246, 69, 87, 39, 19, 207, 150, 234, 25, 58, 115, 98, 133, 87, 24, 14, 215, 120, 8, 2, 37, 104, 187, 212, 82, 108, 32, 235, 205, 217, 13, 170, 250, 99, 51, 75, 139, 235, 198, 241, 206, 16, 83, 234, 168, 225, 40, 243, 67, 61, 220, 84, 129, 67, 194, 24, 213, 194, 23, 168, 15, 46, 249, 220, 36, 70, 25, 46, 94, 211, 254, 150, 217, 6, 110, 214, 178, 95, 154, 215, 248, 205, 78, 2, 241, 177, 65, 204, 109, 2, 94, 87, 198, 32, 19, 6, 25, 147, 253, 234, 201, 235, 205, 40, 138, 216, 5, 78, 112, 96, 53, 211, 2, 49, 63, 203, 125, 199, 167, 3, 149, 22, 73, 24, 252, 32, 16, 108, 187, 169, 11, 71, 219, 83, 24, 100, 216, 147, 143, 56, 151, 206, 126, 14, 192, 174, 58, 23, 62, 212, 229, 73, 245, 1, 231, 130, 252, 210, 211, 66, 68, 205, 29, 204, 143, 33, 255, 70, 79, 39, 160, 144, 86, 236, 120, 6, 1, 128, 58, 55, 90, 103, 160, 87, 239, 101, 92, 175, 68, 125, 209, 152, 217, 201, 179, 21, 133, 57, 215, 83, 16, 114, 198, 91, 179, 172, 71, 70, 171, 143, 212, 236, 154, 156, 158, 169, 21, 96, 218, 145, 20, 225, 29, 118, 238, 17, 247, 1, 100, 175, 180, 179, 176, 110, 97, 146, 12, 113, 1, 143, 122, 22, 89, 2, 240, 8, 191, 109, 248, 240, 138, 179, 183, 126, 133, 206, 59, 81, 178, 197, 24, 77, 167, 131, 213, 26, 93, 242, 229, 222, 102, 164, 219, 51, 54, 26, 231, 150, 171, 5, 1, 164, 71, 114, 103, 116, 238, 175, 140, 50, 139, 227, 211, 142, 175, 102, 74, 143, 152, 27, 47, 255, 78, 175, 139, 39, 157, 174, 190, 242, 234, 76, 98, 34, 70, 253, 165, 127, 231, 114, 228, 207, 199, 222, 118, 246, 135, 206, 204, 188, 0, 161, 86, 121, 65, 52, 181, 59, 211, 207, 55, 57, 197, 214, 89, 21, 183, 81, 193, 250, 229, 162, 54, 93, 126, 81, 191, 110, 111, 63, 226, 12, 102, 78, 62, 183, 162, 67, 246, 129, 206, 146, 52, 139, 188, 164, 122, 16, 37, 58, 231, 122, 177, 215, 120, 200, 74, 123, 57, 253, 127, 40, 166, 26, 22, 139, 184, 182, 16, 76, 227, 19, 156, 120, 254, 97, 12, 162, 201, 10, 142, 239, 153, 155, 246, 240, 140, 68, 57, 130, 76, 183, 213, 233, 244, 48, 124, 103, 18, 136, 45, 65, 195, 56, 61, 172, 40, 51, 80, 0, 52, 153, 123, 189, 66, 3, 175, 168, 208, 73, 185, 67, 133, 136, 97, 87, 104, 22, 34, 157, 31, 116, 211, 106, 126, 102, 157, 210, 82, 179, 44, 16, 1, 43, 251, 71, 14, 252, 152, 241, 44, 66, 15, 163, 220, 28, 111, 213, 55, 121, 122, 87, 174, 160, 232, 167, 246, 40, 4, 67, 12, 111, 9, 240, 177, 190, 68, 127, 36, 101, 212, 135, 241, 151, 57, 139, 49, 176, 246, 107, 30, 154, 84, 29, 120, 184, 173, 240, 128, 223, 78, 22, 11, 146, 65, 110, 248, 185, 140, 3, 96, 30, 132, 183, 194, 243, 88, 247, 212, 249, 27, 88, 230, 12, 56, 255, 114, 116, 26, 183, 3, 88, 179, 242, 231, 115, 80, 151, 183, 48, 127, 147, 46, 180, 141, 144, 185, 154, 105, 74, 49, 68, 240, 67, 93, 73, 90, 61, 91, 202, 217, 1, 250, 170, 196, 219, 241, 175, 81, 43, 86, 246, 236, 94, 202, 20, 0, 33, 204, 7, 66, 142, 48, 151, 91, 46, 185, 203, 16, 218, 249, 39, 155, 248, 86, 29, 202, 155, 56, 169, 22, 196, 149, 197, 143, 128, 42, 139, 240, 142, 155, 136, 77, 44, 240, 31, 125, 187, 98, 229, 227, 119, 251, 54, 131, 155, 249, 222, 110, 188, 125, 195, 192, 134, 161, 221, 185, 219, 49, 190, 15, 12, 148, 209, 45, 61, 40, 76, 170, 255, 74, 73, 58, 221, 3, 60, 27, 128, 63, 152, 104, 242, 236, 122, 143, 68, 216, 98, 243, 115, 48, 242, 1, 18, 126, 56, 84, 173, 70, 195, 197, 38, 12, 35, 136, 159, 159, 14, 222, 64, 183, 159, 68, 166, 50, 75, 21, 133, 200, 21, 25, 86, 104, 177, 97, 250, 3, 139, 247, 238, 131, 209, 20, 167, 179, 44, 203, 219, 215, 107, 52, 142, 162, 6, 89, 117, 145, 222, 230, 240, 192, 90, 208, 242, 195, 150, 255, 110, 187, 249, 218, 93, 52, 247, 68, 255, 16, 144, 145, 206, 237, 238, 92, 138, 165, 23, 150, 157, 247, 109, 124, 67, 11, 185, 113, 233, 9, 2, 190, 97, 147, 90, 166, 2, 11, 108, 177, 62, 246, 148, 71, 87, 22, 30, 115, 239, 132, 121, 227, 50, 198, 39, 196, 0, 119, 108, 58, 73, 187, 91, 73, 193, 182, 61, 45, 116, 2, 122, 134, 229, 193, 105, 46, 100, 106, 71, 3, 210, 251, 43, 40, 26, 61, 100, 70, 22, 118, 169, 12, 202, 237, 18, 52, 139, 164, 13, 185, 193, 228, 135, 237, 152, 186, 122, 219, 51, 49, 27, 91, 248, 62, 20, 35, 119, 231, 239, 44, 10, 49, 83, 57, 154, 245, 115, 39, 86, 39, 126, 120, 8, 71, 213, 95, 119, 205, 168, 54, 100, 76, 68, 130, 140, 231, 77, 222, 200, 54, 2, 65, 18, 141, 114, 70, 71, 238, 4, 37, 227, 129, 22, 93, 126, 192, 226, 48, 162, 158, 153, 15, 77, 65, 55, 209, 74, 8, 102, 118, 122, 205, 88, 215, 30, 180, 202, 239, 169, 38, 87, 184, 246, 92, 136, 195, 24, 47, 64, 241, 145, 25, 65, 108, 73, 21, 221, 147, 83, 33, 7, 198, 7, 27, 206, 57, 17, 33, 241, 80, 200, 96, 21, 107, 113, 3, 30, 11, 68, 155, 125, 204, 184, 4, 99, 105, 73, 98, 204, 37, 173, 9, 202, 60, 242, 120, 4, 247, 65, 165, 82, 206, 122, 128, 6, 38, 11, 20, 64, 153, 216, 31, 80, 228, 171, 49, 94, 2, 105, 255, 38, 203, 61, 119, 105, 52, 100, 186, 138, 63, 75, 50, 117, 182, 223, 211, 236, 3, 44, 232, 170, 42, 52, 190, 196, 5, 215, 240, 82, 18, 128, 70, 59, 220, 64, 193, 188, 208, 68, 31, 18, 86, 76, 154, 7, 96, 115, 205, 67, 9, 22, 219, 31, 220, 99, 138, 58, 164, 187, 10, 131, 75, 213, 9, 140, 243, 17, 129, 131, 189, 22, 237, 203, 23, 157, 175, 246, 122, 71, 118, 106, 74, 96, 154, 54, 171, 95, 67, 173, 236, 243, 198, 167, 221, 104, 207, 70, 247, 23, 214, 173, 127, 153, 22, 96, 2, 223, 17, 125, 206, 179, 204, 87, 141, 114, 163, 148, 167, 3, 45, 217, 18, 196, 45, 247, 195, 67, 159, 166, 163, 147, 245, 68, 28, 148, 4, 182, 139, 252, 135, 199, 151, 136, 160, 6, 145, 230, 76, 104, 226, 91, 52, 212, 107, 147, 163, 101, 24, 212, 3, 173, 91, 144, 2, 133, 16, 186, 25, 96, 192, 242, 189, 25, 172, 42, 49, 216, 121, 118, 208, 57, 145, 45, 21, 40, 111, 162, 187, 16, 30, 129, 250, 170, 4, 79, 84, 152, 79, 108, 90, 229, 16, 111, 120, 60, 147, 63, 119, 244, 108, 161, 236, 2, 44, 239, 88, 65, 156, 232, 42, 62, 45, 224, 222, 170, 224, 155, 91, 82, 62, 16, 116, 185, 9, 0, 118, 211, 197, 80, 41, 18, 36, 226, 107, 237, 45, 203, 122, 153, 100, 100, 215, 11, 224, 192, 217, 93, 165, 179, 130, 20, 119, 82, 180, 191, 118, 232, 87, 168, 149, 71, 233, 203, 37, 186, 36, 60, 142, 128, 33, 155, 146, 150, 135, 140, 63, 111, 169, 5, 220, 83, 122, 171, 63, 65, 201, 68, 224, 140, 44, 191, 167, 13, 90, 188, 135, 24, 220, 32, 3, 166, 199, 201, 214, 221, 189, 237, 7, 204, 170, 244, 215, 216, 222, 178, 245, 118, 7, 172, 84, 93, 183, 80, 112, 233, 97, 94, 197, 71, 119, 223, 218, 145, 8, 232, 230, 108, 154, 196, 60, 165, 245, 134, 64, 36, 82, 33, 186, 11, 246, 101, 225, 169, 173, 199, 183, 103, 1, 175, 161, 192, 107, 74, 197, 79, 12, 23, 172, 173, 105, 174, 29, 54, 93, 133, 214, 5, 142, 159, 10, 54, 238, 55, 175, 40, 123, 231, 112, 166, 9, 55, 18, 67, 235, 177, 80, 230, 71, 191, 231, 245, 97, 118, 224, 167, 132, 210, 193, 192, 112, 15, 48, 2, 190, 206, 137, 133, 199, 153, 47, 212, 203, 150, 67, 74, 120, 239, 77, 67, 16, 217, 130, 16, 47, 61, 71, 65, 34, 31, 30, 118, 66, 128, 18, 137, 114, 227, 25, 52, 223, 175, 225, 132, 179, 97, 175, 60, 206, 108, 5, 168, 15, 111, 209, 60, 3, 235, 248, 154, 208, 215, 88, 33, 171, 138, 12, 75, 166, 95, 99, 35, 28, 59, 42, 203, 88, 27, 183, 236, 185, 81, 3, 117, 203, 253, 103, 119, 109, 183, 24, 110, 165, 141, 81, 21, 55, 83, 140, 9, 154, 64, 177, 234, 70, 62, 126, 124, 126, 176, 47, 193, 215, 239, 170, 230, 41, 6, 179, 14, 182, 49, 74, 49, 89, 232, 204, 153, 212, 183, 72, 250, 134, 211, 177, 38, 65, 205, 69, 193, 131, 28, 46, 65, 72, 116, 221, 191, 196, 232, 8, 214, 109, 4, 215, 82, 66, 148, 211, 134, 250, 176, 245, 133, 101, 151, 119, 116, 138, 116, 91, 78, 26, 61, 30, 190, 61, 206, 5, 68, 205, 181, 185, 232, 136, 3, 223, 170, 195, 210, 210, 169, 123, 95, 120, 60, 24, 244, 56, 14, 89, 158, 180, 140, 68, 95, 74, 57, 103, 250, 239, 7, 155, 142, 253, 113, 237, 231, 23, 8, 221, 208, 181, 54, 29, 133, 144, 97, 69, 68, 109, 51, 78, 181, 162, 170, 186, 77, 175, 112, 145, 216, 155, 58, 247, 157, 180, 125, 19, 128, 68, 216, 248, 253, 57, 57, 114, 58, 191, 81, 121, 104, 230, 156, 202, 229, 160, 173, 125, 13, 125, 251, 88, 252, 17, 151, 192, 137, 11, 37, 153, 196, 154, 153, 168, 145, 221, 34, 23, 156, 189, 149, 172, 211, 76, 152, 20, 126, 219, 143, 52, 137, 235, 232, 131, 211, 20, 112, 155, 205, 135, 159, 77, 94, 107, 246, 75, 30, 122, 196, 38, 42, 185, 128, 12, 78, 163, 207, 85, 220, 209, 55, 119, 192, 148, 236, 144, 78, 140, 254, 145, 32, 239, 192, 42, 179, 112, 68, 182, 47, 251, 30, 128, 192, 106, 69, 27, 142, 154, 23, 50, 232, 97, 36, 3, 82, 100, 134, 64, 109, 23, 121, 153, 23, 33, 184, 130, 66, 219, 86, 224, 195, 120, 85, 36, 148, 47, 25, 204, 7, 200, 152, 20, 32, 164, 129, 205, 23, 166, 21, 235, 47, 196, 232, 34, 241, 203, 15, 81, 151, 8, 1, 51, 146, 25, 80, 179, 187, 133, 62, 224, 135, 232, 138, 36, 132, 112, 249, 123, 98, 43, 67, 243, 200, 182, 92, 12, 11, 16, 2, 253, 45, 90, 134, 111, 130, 124, 11, 87, 165, 129, 153, 7, 133, 160, 45, 29, 199, 51, 131, 252, 91, 44, 120, 173, 172, 68, 37, 76, 64, 43, 227, 132, 158, 14, 27, 17, 56, 252, 73, 216, 51, 153, 39, 96, 67, 170, 8, 38, 33, 71, 107, 55, 230, 227, 114, 35, 41, 121, 231, 211, 21, 138, 224, 167, 88, 143, 80, 74, 10, 79, 43, 99, 210, 183, 168, 92, 90, 1, 91, 225, 73, 126, 148, 89, 211, 4, 91, 121, 225, 88, 175, 166, 91, 247, 22, 22, 110, 170, 83, 48, 244, 152, 118, 211, 10, 208, 200, 180, 224, 97, 132, 32, 140, 233, 169, 184, 217, 75, 135, 53, 244, 155, 33, 194, 178, 114, 14, 158, 38, 148, 18, 38, 24, 34, 87, 96, 52, 0, 111, 220, 34, 96, 102, 161, 223, 52, 122, 220, 135, 208, 44, 38, 44, 19, 46, 144, 14, 61, 227, 119, 13, 187, 85, 47, 249, 177, 72, 65, 108, 139, 173, 154, 96, 73, 78, 119, 147, 69, 181, 80, 126, 206, 46, 226, 2, 59, 102, 248, 73, 153, 146, 227, 185, 59, 108, 175, 193, 10, 96, 180, 112, 132, 203, 18, 14, 39, 100, 186, 219, 254, 151, 80, 120, 158, 101, 185, 250, 193, 10, 217, 217, 172, 120, 168, 24, 6, 172, 92, 56, 204, 28, 41, 106, 237, 217, 170, 7, 119, 132, 76, 236, 87, 235, 7, 72, 46, 226, 74, 127, 131, 184, 92, 125, 70, 26, 191, 86, 85, 201, 217, 23, 111, 114, 78, 193, 233, 16, 60, 193, 107, 93, 87, 101, 194, 102, 109, 60, 60, 46, 41, 174, 188, 211, 93, 204, 209, 230, 206, 8, 22, 186, 73, 142, 65, 204, 75, 92, 46, 112, 133, 194, 197, 146, 57, 176, 98, 62, 189, 74, 24, 149, 173, 2, 53, 142, 122, 15, 227, 165, 37, 158, 214, 221, 184, 55, 162, 213, 15, 184, 190, 137, 189, 252, 163, 66, 28, 55, 214, 227, 151, 188, 109, 122, 81, 137, 15, 110, 43, 237, 158, 152, 139, 119, 3, 121, 45, 255, 50, 161, 152, 181, 138, 244, 226, 127, 85, 219, 121, 147, 254, 144, 166, 117, 204, 211, 122, 92, 33, 79, 250, 83, 61, 30, 118, 58, 9, 242, 91, 205, 249, 70, 46, 181, 232, 124, 154, 152, 250, 18, 36, 3, 86, 149, 231, 8, 90, 213, 42, 24, 236, 253, 46, 156, 137, 68, 122, 135, 209, 3, 78, 199, 182, 253, 14, 181, 183, 151, 92, 83, 49, 47, 103, 154, 39, 38, 185, 91, 47, 22, 27, 209, 120, 56, 81, 247, 52, 5, 53, 52, 28, 95, 69, 243, 106, 47, 246, 13, 247, 85, 104, 49, 24, 110, 65, 144, 189, 241, 99, 255, 127, 174, 218, 138, 213, 251, 252, 7, 44, 135, 226, 106, 214, 161, 71, 251, 226, 66, 144, 28, 115, 3, 52, 215, 101, 45, 39, 130, 240, 139, 228, 94, 6, 177, 205, 12, 247, 5, 140, 155, 86, 232, 123, 59, 217, 42, 156, 242, 210, 43, 205, 148, 41, 70, 88, 246, 168, 12, 19, 187, 44, 232, 145, 207, 48, 4, 243, 244, 95, 27, 112, 211, 142, 213, 58, 180, 34, 94, 59, 69, 98, 75, 184, 32, 21, 118, 214, 104, 126, 156, 66, 179, 72, 213, 132, 63, 255, 1, 75, 228, 12, 130, 0, 110, 82, 37, 190, 194, 45, 64, 253, 44, 77, 214, 227, 65, 160, 57, 242, 165, 57, 12, 248, 40, 102, 160, 233, 19, 252, 96, 192, 33, 103, 74, 0, 58, 25, 204, 160, 45, 203, 173, 44, 154, 91, 98, 72, 56, 227, 6, 141, 207, 177, 142, 122, 232, 99, 153, 54, 62, 174, 237, 121, 140, 94, 168, 148, 158, 64, 167, 175, 163, 76, 193, 74, 93, 105, 84, 144, 246, 44, 0, 20, 105, 39, 135, 228, 217, 106, 101, 62, 211, 238, 15, 29, 255, 172, 35, 228, 124, 245, 186, 232, 77, 60, 17, 108, 75, 152, 230, 192, 101, 232, 246, 22, 36, 30, 19, 243, 78, 241, 22, 43, 113, 188, 34, 133, 0, 226, 52, 18, 51, 197, 103, 68, 32, 254, 4, 26, 213, 202, 178, 115, 79, 209, 122, 89, 166, 48, 80, 117, 10, 83, 139, 143, 18, 41, 239, 30, 84, 27, 159, 84, 138, 116, 213, 217, 39, 9, 218, 56, 253, 187, 159, 210, 95, 108, 68, 56, 26, 95, 29, 132, 68, 216, 165, 107, 244, 8, 69, 15, 65, 172, 253, 26, 29, 20, 122, 120, 38, 145, 175, 36, 26, 105, 115, 199, 37, 214, 111, 86, 90, 226, 160, 94, 159, 88, 82, 23, 104, 222, 137, 104, 239, 139, 42, 193, 210, 128, 211, 213, 244, 102, 174, 68, 195, 195, 241, 247, 33, 146, 84, 109, 37, 148, 31, 70, 225, 239, 69, 186, 76, 75, 158, 35, 153, 173, 85, 248, 59, 18, 253, 115, 67, 188, 147, 188, 90, 115, 86, 236, 201, 110, 191, 13, 1, 125, 67, 174, 123, 153, 54, 112, 19, 162, 183, 19, 177, 120, 115, 11, 189, 244, 192, 174, 75, 19, 126, 16, 85, 177, 128, 54, 34, 106, 43, 6, 154, 208, 197, 90, 58, 157, 31, 198, 214, 81, 226, 69, 41, 105, 149, 236, 171, 251, 55, 74, 248, 169, 195, 123, 210, 24, 228, 113, 188, 144, 42, 148, 87, 127, 199, 2, 34, 248, 45, 58, 54, 20, 103, 168, 37, 140, 23, 26, 199, 190, 137, 69, 173, 85, 231, 215, 93, 27, 165, 109, 52, 172, 80, 143, 203, 49, 55, 127, 212, 131, 21, 108, 92, 187, 91, 116, 118, 101, 127, 203, 90, 140, 49, 155, 197, 115, 187, 167, 160, 230, 209, 114, 152, 99, 94, 27, 141, 8, 198, 156, 177, 143, 69, 51, 27, 67, 52, 59, 151, 79, 245, 146, 91, 88, 119, 122, 181, 75, 85, 162, 100, 50, 101, 235, 83, 125, 216, 242, 8, 53, 218, 204, 239, 24, 21, 41, 64, 63, 114, 83, 183, 74, 61, 43, 124, 178, 173, 137, 69, 59, 53, 146, 35, 91, 58, 26, 187, 194, 27, 122, 3, 76, 7, 161, 121, 240, 62, 149, 226, 157, 58, 242, 142, 77, 152, 223, 183, 92, 83, 114, 130, 87, 16, 76, 30, 59, 65, 14, 166, 89, 107, 241, 33, 76, 24, 104, 30, 205, 158, 28, 117, 248, 130, 92, 39, 255, 98, 225, 40, 239, 253, 204, 65, 138, 239, 6, 86, 115, 189, 243, 205, 119, 180, 137, 139, 119, 232, 148, 61, 228, 125, 113, 77, 1, 69, 237, 124, 209, 178, 208, 53, 201, 83, 34, 27, 18, 102, 208, 214, 16, 16, 50, 101, 51, 122, 143, 157, 6, 39, 0, 143, 24, 91, 13, 212, 13, 61, 222, 163, 123, 25, 17, 50, 101, 72, 219, 36, 217, 200, 68, 251, 15, 177, 30, 93, 208, 124, 116, 204, 243, 130, 193, 169, 215, 1, 105, 203, 132, 242, 120, 159, 165, 190, 131, 43, 12, 18, 25, 73, 8, 172, 218, 113, 0, 132, 2, 138, 24, 200, 177, 17, 128, 196, 145, 221, 73, 233, 170, 88, 119, 253, 182, 132, 131, 208, 47, 156, 72, 221, 162, 135, 86, 197, 185, 26, 173, 79, 45, 48, 225, 0, 242, 60, 131, 30, 206, 190, 65, 108, 251, 106, 92, 252, 211, 201, 167, 127, 36, 158, 124, 189, 24, 227, 201, 192, 7, 24, 248, 73, 185, 240, 31, 194, 144, 123, 28, 130, 150, 160, 168, 166, 60, 223, 92, 230, 221, 49, 84, 133, 62, 200, 233, 204, 250, 215, 190, 23, 81, 34, 192, 76, 4, 105, 8, 85, 246, 70, 116, 60, 218, 68, 160, 216, 92, 0, 113, 20, 86, 111, 80, 105, 27, 143, 56, 48, 248, 100, 47, 117, 253, 143, 103, 252, 234, 198, 63, 251, 88, 96, 253, 100, 39, 24, 167, 237, 254, 37, 236, 160, 26, 7, 185, 132, 52, 123, 49, 25, 116, 143, 213, 247, 44, 163, 61, 124, 86, 247, 36, 88, 142, 119, 188, 149, 192, 182, 17, 201, 114, 100, 100, 71, 116, 77, 84, 230, 110, 246, 104, 170, 91, 236, 162, 47, 91, 132, 81, 167, 237, 160, 247, 194, 91, 83, 109, 214, 22, 19, 23, 98, 154, 180, 252, 74, 243, 137, 11, 183, 22, 140, 95, 90, 46, 119, 46, 127, 60, 230, 53, 247, 207, 48, 83, 4, 110, 237, 109, 237, 53, 6, 194, 239, 33, 25, 119, 82, 67, 124, 67, 146, 195, 192, 225, 97, 182, 106, 250, 183, 36, 240, 227, 24, 152, 116, 219, 233, 38, 199, 140, 136, 5, 194, 74, 248, 160, 62, 252, 240, 19, 17, 45, 155, 243, 162, 177, 237, 27, 56, 90, 217, 162, 106, 204, 61, 177, 94, 43, 78, 136, 93, 23, 6, 172, 147, 59, 22, 177, 2, 122, 140, 148, 230, 166, 252, 92, 119, 217, 84, 17, 3, 91, 26, 87, 26, 129, 74, 184, 254, 89, 60, 69, 4, 94, 14, 69, 115, 251, 188, 185, 203, 11, 37, 31, 89, 37, 84, 48, 147, 2, 36, 239, 240, 155, 194, 196, 244, 38, 55, 144, 149, 65, 194, 57, 39, 207, 60, 21, 35, 50, 9, 203, 43, 150, 103, 109, 213, 190, 121, 137, 217, 19, 78, 2, 14, 59, 53, 81, 184, 243, 62, 71, 152, 11, 133, 45, 87, 196, 101, 18, 44, 78, 123, 210, 84, 126, 10, 10, 67, 141, 95, 204, 119, 142, 48, 222, 162, 63, 118, 255, 14, 204, 8, 244, 238, 244, 182, 211, 45, 186, 246, 102, 246, 94, 53, 19, 39, 224, 123, 168, 155, 248, 223, 149, 48, 17, 107, 48, 231, 131, 4, 79, 156, 23, 197, 31, 80, 156, 9, 53, 151, 219, 143, 240, 11, 100, 27, 213, 128, 5, 53, 164, 44, 244, 100, 78, 104, 192, 186, 221, 207, 116, 100, 227, 113, 97, 51, 250, 124, 136, 155, 66, 201, 188, 86, 123, 113, 151, 227, 111, 112, 122, 104, 193, 120, 254, 8, 159, 240, 193, 217, 206, 7, 9, 20, 84, 81, 248, 207, 149, 38, 41, 214, 238, 127, 10, 77, 242, 171, 29, 4, 72, 47, 186, 229, 53, 248, 240, 233, 81, 206, 108, 50, 26, 94, 33, 224, 82, 209, 22, 69, 211, 208, 61, 142, 130, 113, 48, 152, 35, 216, 114, 184, 75, 169, 180, 129, 60, 112, 82, 248, 22, 123, 39, 62, 242, 121, 32, 137, 44, 51, 111, 182, 121, 43, 244, 138, 192, 194, 106, 232, 241, 151, 217, 127, 57, 245, 169, 218, 221, 242, 115, 181, 117, 168, 147, 51, 48, 253, 88, 66, 75, 207, 212, 174, 144, 107, 229, 92, 49, 92, 218, 40, 0, 88, 238, 124, 32, 249, 36, 179, 45, 197, 93, 104, 32, 155, 153, 62, 188, 105, 10, 161, 13, 111, 170, 113, 10, 71, 247, 105, 192, 174, 235, 7, 209, 23, 93, 181, 216, 239, 176, 189, 122, 200, 167, 123, 15, 236, 204, 208, 246, 121, 86, 240, 2, 26, 130, 11, 42, 237, 112, 67, 134, 108, 59, 248, 143, 114, 135, 242, 89, 124, 212, 155, 247, 10, 195, 50, 226, 110, 88, 111, 104, 138, 8, 254, 157, 12, 157, 128, 197, 125, 146, 122, 205, 229, 27, 134, 39, 144, 75, 20, 148, 143, 157, 112, 46, 144, 236, 154, 107, 240, 180, 210, 239, 165, 178, 36, 74, 238, 181, 27, 52, 242, 85, 239, 242, 141, 198, 141, 183, 70, 110, 19, 42, 228, 166, 100, 130, 5, 109, 87, 232, 88, 224, 10, 240, 113, 150, 226, 186, 203, 174, 155, 148, 140, 24, 181, 92, 27, 177, 172, 231, 228, 171, 116, 64, 242, 31, 57, 233, 96, 132, 204, 5, 56, 157, 12, 250, 152, 177, 118, 27, 239, 99, 219, 98, 91, 211, 229, 97, 253, 97, 156, 124, 69, 115, 125, 205, 83, 140, 28, 231, 162, 109, 245, 63, 248, 183, 135, 242, 179, 188, 173, 100, 86, 50, 134, 139, 161, 59, 186, 89, 16, 151, 108, 133, 1, 48, 71, 118, 143, 203, 191, 225, 169, 5, 147, 171, 217, 46, 196, 137, 149, 178, 223, 182, 229, 4, 55, 50, 239, 94, 37, 169, 57, 74, 220, 108, 33, 150, 117, 13, 115, 175, 61, 190, 161, 56, 235, 80, 25, 116, 31, 192, 191, 103, 231, 177, 66, 59, 5, 161, 235, 35, 2, 236, 60, 91, 153, 98, 46, 33, 124, 159, 174, 1, 174, 223, 117, 121, 53, 185, 124, 211, 167, 0, 177, 181, 172, 162, 28, 158, 165, 66, 120, 197, 163, 66, 34, 9, 206, 232, 205, 0, 60, 147, 149, 100, 59, 72, 29, 120, 186, 119, 183, 96, 242, 163, 25, 200, 82, 249, 125, 62, 103, 101, 138, 193, 163, 42, 170, 165, 203, 85, 38, 197, 133, 51, 122, 13, 34, 72, 247, 218, 170, 190, 247, 173, 61, 213, 197, 30, 191, 231, 134, 131, 84, 219, 104, 15, 166, 170, 25, 7, 41, 7, 84, 226, 222, 13, 143, 58, 195, 103, 247, 22, 209, 63, 216, 129, 12, 120, 240, 201, 20, 23, 137, 116, 43, 181, 169, 69, 241, 213, 59, 170, 204, 144, 208, 80, 59, 14, 153, 95, 233, 86, 22, 11, 233, 30, 181, 249, 126, 151, 140, 94, 6, 243, 239, 46, 59, 163, 147, 164, 181, 26, 229, 114, 169, 130, 162, 210, 76, 62, 134, 106, 38, 150, 179, 179, 159, 58, 153, 188, 237, 46, 62, 216, 226, 212, 42, 249, 77, 204, 183, 77, 216, 96, 22, 40, 8, 215, 73, 62, 20, 29, 39, 157, 56, 96, 100, 69, 99, 78, 52, 204, 208, 152, 79, 234, 210, 192, 18, 195, 178, 106, 61, 241, 94, 210, 134, 149, 83, 16, 194, 108, 204, 71, 56, 68, 187, 53, 59, 20, 6, 109, 145, 5, 227, 123, 195, 115, 228, 72, 10, 191, 83, 6, 103, 29, 30, 142, 183, 101, 70, 236, 55, 81, 212, 213, 41, 91, 18, 238, 232, 83, 31, 8, 116, 210, 153, 156, 199, 149, 148, 17, 7, 154, 146, 121, 212, 179, 102, 112, 114, 17, 73, 118, 150, 177, 48, 204, 67, 153, 235, 79, 139, 12, 22, 182, 20, 48, 12, 242, 0, 98, 8, 25, 62, 163, 176, 182, 234, 237, 179, 100, 181, 102, 28, 82, 104, 19, 185, 77, 137, 122, 238, 251, 32, 194, 38, 191, 0, 50, 191, 75, 236, 130, 125, 72, 115, 255, 199, 51, 113, 184, 250, 80, 135, 17, 152, 149, 15, 32, 55, 113, 141, 13, 114, 168, 166, 62, 251, 123, 77, 12, 169, 188, 78, 83, 223, 34, 236, 103, 56, 186, 71, 188, 134, 202, 55, 48, 146, 186, 93, 119, 13, 48, 235, 231, 75, 226, 125, 16, 69, 102, 132, 176, 165, 11, 112, 91, 115, 172, 82, 124, 24, 34, 194, 59, 255, 40, 242, 205, 136, 47, 21, 129, 249, 66, 176, 148, 27, 118, 73, 50, 30, 183, 56, 28, 156, 214, 115, 54, 103, 226, 146, 15, 244, 112, 255, 30, 192, 218, 212, 233, 159, 105, 155, 116, 176, 45, 191, 98, 60, 244, 128, 62, 79, 76, 19, 180, 164, 136, 125, 207, 145, 234, 10, 158, 50, 78, 210, 5, 236, 38, 60, 164, 185, 52, 209, 15, 157, 240, 13, 38, 44, 69, 69, 13, 95, 48, 138, 252, 92, 137, 231, 139, 131, 4, 221, 4, 72, 18, 125, 213, 64, 177, 2, 123, 255, 169, 62, 86, 128, 249, 137, 23, 184, 82, 216, 50, 50, 74, 127, 131, 8, 136, 251, 56, 14, 122, 247, 61, 170, 96, 49, 65, 27, 44, 72, 181, 187, 222, 211, 192, 55, 103, 15, 121, 20, 59, 231, 63, 76, 139, 135, 102, 114, 218, 210, 228, 17, 8, 86, 241, 213, 72, 146, 205, 14, 121, 202, 50, 167, 176, 255, 23, 110, 40, 22, 192, 188, 111, 61, 212, 208, 72, 235, 70, 98, 245, 199, 41, 154, 187, 80, 48, 203, 140, 253, 117, 58, 215, 52, 69, 86, 125, 237, 89, 135, 18, 1, 83, 83, 220, 236, 174, 126, 96, 210, 57, 13, 14, 94, 207, 161, 17, 79, 237, 211, 25, 16, 185, 177, 52, 73, 5, 207, 201, 3, 17, 85, 173, 67, 63, 190, 162, 219, 228, 90, 204, 227, 39, 194, 158, 5, 220, 254, 117, 36, 209, 118, 178, 165, 181, 90, 175, 128, 240, 171, 199, 141, 27, 64, 70, 134, 189, 173, 224, 59, 238, 88, 5, 110, 210, 140, 218, 173, 35, 78, 16, 122, 211, 187, 211, 157, 39, 129, 156, 212, 47, 12, 249, 192, 47, 171, 184, 167, 214, 24, 95, 200, 232, 159, 248, 62, 199, 30, 8, 16, 43, 66, 131, 4, 149, 27, 181, 162, 145, 77, 236, 227, 192, 76, 248, 26, 70, 194, 183, 96, 119, 77, 63, 34, 92, 175, 28, 245, 221, 33, 208, 198, 140, 124, 131, 128, 45, 230, 73, 92, 107, 126, 70, 7, 231, 15, 104, 129, 11, 44, 39, 140, 184, 171, 170, 212, 209, 4, 232, 95, 42, 165, 225, 235, 84, 175, 62, 243, 123, 171, 241, 197, 201, 199, 70, 227, 137, 242, 87, 250, 130, 22, 222, 231, 79, 152, 175, 93, 140, 0, 125, 183, 160, 66, 247, 31, 74, 43, 194, 109, 16, 80, 200, 193, 219, 204, 113, 157, 127, 199, 157, 232, 179, 111, 28, 118, 23, 27, 208, 118, 235, 200, 186, 122, 218, 167, 48, 124, 82, 226, 74, 157, 246, 67, 85, 30, 49, 210, 135, 75, 192, 86, 218, 238, 51, 65, 227, 246, 38, 147, 46, 78, 185, 102, 154, 71, 134, 152, 246, 143, 18, 140, 214, 37, 178, 111, 171, 200, 246, 80, 247, 224, 138, 209, 98, 246, 121, 149, 174, 104, 72, 103, 206, 103, 175, 48, 159, 193, 36, 95, 121, 202, 95, 103, 58, 108, 230, 25, 83, 34, 115, 166, 52, 42, 200, 134, 230, 201, 138, 72, 109, 121, 1, 28, 76, 186, 140, 185, 35, 64, 198, 106, 22, 95, 123, 207, 45, 198, 102, 220, 45, 32, 187, 178, 186, 147, 255, 220, 126, 216, 94, 124, 76, 235, 164, 27, 38, 228, 48, 82, 134, 173, 234, 74, 100, 219, 155, 141, 131, 206, 111, 69, 170, 190, 75, 216, 141, 193, 220, 65, 17, 245, 182, 12, 231, 5, 65, 98, 229, 201, 250, 119, 146, 111, 4, 39, 112, 46, 9, 245, 208, 85, 237, 2, 175, 243, 7, 181, 17, 108, 68, 87, 205, 19, 100, 181, 127, 153, 176, 173, 241, 139, 58, 236, 155, 207, 203, 194, 163, 136, 252, 70, 226, 63, 112, 184, 22, 128, 234, 146, 128, 57, 44, 35, 202, 63, 46, 41, 56, 175, 90, 246, 25, 199, 32, 151, 12, 171, 164, 23, 177, 99, 188, 123, 237, 138, 151, 249, 175, 45, 122, 173, 172, 136, 64, 164, 177, 76, 249, 21, 59, 155, 137, 86, 124, 210, 15, 131, 103, 125, 218, 104, 50, 90, 215, 200, 137, 47, 219, 213, 133, 231, 3, 38, 16, 45, 56, 166, 168, 152, 211, 208, 22, 129, 139, 99, 132, 61, 20, 217, 201, 127, 252, 2, 89, 100, 255, 155, 119, 206, 70, 127, 57, 188, 185, 250, 228, 185, 165, 134, 149, 228, 153, 215, 218, 102, 133, 48, 58, 247, 207, 204, 174, 162, 84, 18, 108, 230, 149, 89, 71, 236, 145, 200, 41, 81, 30, 147, 92, 203, 251, 232, 94, 53, 84, 79, 111, 247, 147, 30, 32, 161, 84, 55, 240, 237, 224, 172, 235, 33, 169, 209, 49, 180, 188, 110, 90, 50, 152, 69, 122, 173, 242, 34, 59, 203, 62, 158, 68, 16, 163, 127, 103, 31, 185, 126, 149, 86, 2, 127, 44, 235, 231, 114, 36, 78, 8, 33, 184, 206, 48, 204, 162, 176, 151, 139, 88, 191, 177, 61, 133, 255, 245, 154, 204, 191, 13, 247, 51, 224, 188, 24, 113, 188, 128, 21, 62, 23, 13, 55, 201, 49, 220, 102, 72, 180, 159, 90, 195, 176, 97, 146, 67, 253, 100, 32, 105, 8, 184, 68, 156, 38, 169, 19, 148, 195, 184, 228, 121, 155, 140, 70, 102, 25, 60, 50, 94, 193, 68, 232, 194, 193, 94, 135, 41, 0, 224, 197, 227, 49, 212, 197, 76, 29, 138, 13, 36, 236, 200, 162, 42, 164, 166, 180, 25, 179, 155, 26, 161, 69, 196, 43, 122, 34, 31, 139, 2, 248, 78, 212, 4, 51, 23, 138, 202, 242, 174, 73, 239, 41, 57, 132, 177, 248, 157, 77, 128, 163, 38, 41, 36, 107, 54, 154, 253, 220, 200, 205, 34, 216, 11, 163, 125, 91, 87, 47, 186, 234, 111, 154, 40, 172, 196, 210, 120, 131, 226, 223, 89, 240, 15, 136, 150, 102, 94, 125, 147, 193, 212, 10, 213, 23, 245, 187, 204, 55, 229, 161, 221, 88, 70, 164, 92, 136, 224, 178, 240, 146, 241, 203, 35, 99, 67, 254, 108, 251, 110, 95, 97, 46, 26, 49, 220, 143, 218, 115, 230, 194, 77, 162, 93, 1, 207, 246, 230, 9, 221, 210, 147, 219, 143, 115, 149, 226, 105, 172, 136, 57, 29, 195, 75, 161, 101, 241, 164, 110, 207, 101, 135, 6, 130, 189, 0, 211, 72, 196, 83, 179, 4, 30, 38, 186, 204, 91, 246, 208, 244, 15, 204, 141, 28, 67, 138, 133, 7, 106, 4, 1, 8, 184, 67, 146, 155, 104, 149, 9, 164, 8, 127, 191, 71, 252, 5, 165, 139, 148, 183, 177, 14, 148, 170, 239, 26, 65, 171, 113, 186, 6, 189, 87, 205, 61, 161, 156, 183, 98, 105, 228, 134, 60, 29, 9, 116, 195, 203, 205, 170, 238, 90, 17, 209, 152, 210, 89, 29, 28, 140, 243, 190, 66, 176, 166, 152, 196, 180, 68, 248, 51, 141, 22, 15, 91, 194, 142, 120, 73, 72, 171, 97, 50, 123, 103, 208, 97, 225, 117, 93, 53, 105, 52, 63, 120, 46, 144, 73, 10, 100, 128, 48, 126, 37, 68, 69, 157, 121, 95, 251, 55, 189, 121, 249, 159, 168, 41, 238, 112, 73, 178, 171, 155, 218, 169, 5, 7, 232, 74, 67, 209, 16, 174, 240, 67, 137, 172, 73, 218, 100, 173, 44, 180, 211, 86, 202, 184, 45, 247, 16, 133, 193, 240, 112, 165, 46, 63, 135, 149, 164, 169, 182, 173, 169, 95, 159, 10, 242, 120, 212, 63, 35, 135, 244, 16, 129, 217, 135, 248, 147, 53, 220, 122, 130, 146, 19, 112, 248, 4, 122, 189, 240, 222, 30, 95, 1, 116, 237, 77, 206, 72, 84, 108, 249, 109, 42, 49, 132, 109, 68, 99, 89, 71, 242, 82, 159, 49, 128, 23, 28, 219, 0, 254, 4, 132, 61, 190, 168, 252, 12, 193, 4, 94, 230, 198, 134, 27, 58, 159, 55, 118, 254, 62, 5, 158, 7, 91, 26, 9, 4, 8, 219, 110, 119, 192, 238, 251, 17, 118, 111, 245, 115, 201, 182, 90, 240, 46, 95, 97, 41, 78, 161, 103, 170, 94, 116, 63, 21, 117, 154, 37, 68, 245, 21, 17, 146, 33, 203, 111, 4, 175, 49, 14, 196, 249, 93, 120, 220, 42, 106, 233, 70, 202, 91, 35, 136, 43, 66, 233, 244, 227, 181, 91, 254, 203, 44, 77, 132, 104, 176, 191, 178, 74, 10, 1, 244, 198, 38, 130, 250, 251, 136, 225, 68, 7, 74, 195, 198, 190, 94, 207, 51, 19, 203, 92, 7, 133, 168, 183, 182, 185, 157, 54, 25, 95, 95, 141, 104, 32, 31, 171, 87, 231, 60, 91, 57, 21, 16, 202, 133, 118, 237, 62, 115, 101, 128, 135, 205, 79, 102, 13, 99, 134, 89, 174, 182, 75, 36, 37, 89, 149, 18, 155, 118, 177, 147, 34, 186, 180, 124, 53, 111, 60, 26, 26, 173, 176, 162, 124, 84, 89, 46, 191, 152, 14, 64, 255, 123, 174, 25, 188, 143, 212, 53, 179, 129, 178, 35, 222, 176, 60, 247, 17, 202, 242, 107, 201, 92, 61, 29, 32, 121, 145, 48, 157, 158, 103, 121, 89, 44, 118, 188, 228, 244, 192, 207, 70, 76, 155, 85, 247, 16, 158, 72, 131, 153, 182, 30, 161, 118, 129, 52, 233, 70, 48, 120, 234, 206, 144, 105, 61, 178, 135, 242, 32, 175, 115, 70, 115, 110, 81, 38, 234, 205, 136, 181, 45, 180, 181, 104, 97, 208, 80, 64, 138, 70, 156, 1, 205, 115, 128, 194, 68, 105, 251, 14, 255, 146, 90, 49, 32, 246, 110, 222, 194, 24, 7, 117, 65, 125, 46, 224, 116, 39, 14, 115, 78, 13, 241, 249, 73, 230, 7, 232, 30, 210, 72, 212, 219, 4, 160, 195, 9, 80, 91, 178, 219, 45, 144, 151, 165, 88, 125, 142, 194, 125, 208, 192, 178, 70, 164, 141, 92, 67, 3, 119, 109, 6, 201, 120, 158, 30, 151, 139, 204, 241, 191, 221, 5, 104, 187, 86, 168, 40, 125, 98, 193, 171, 169, 144, 84, 147, 25, 0, 233, 144, 215, 245, 95, 232, 209, 27, 177, 184, 57, 245, 45, 127, 105, 222, 76, 247, 245, 113, 235, 206, 121, 176, 0, 232, 166, 20, 147, 193, 164, 37, 224, 113, 110, 71, 2, 30, 240, 82, 78, 21, 40, 46, 81, 23, 87, 237, 76, 113, 45, 41, 35, 102, 83, 214, 119, 146, 119, 88, 109, 221, 156, 211, 208, 247, 18, 82, 42, 242, 116, 152, 40, 167, 28, 89, 118, 117, 128, 146, 118, 135, 230, 116, 136, 77, 83, 222, 117, 216, 50, 208, 227, 101, 194, 13, 250, 29, 79, 191, 227, 128, 225, 74, 108, 157, 149, 70, 73, 106, 22, 121, 86, 81, 224, 8, 232, 226, 242, 131, 233, 67, 91, 104, 191, 88, 14, 199, 226, 232, 139, 119, 145, 100, 128, 229, 20, 99, 72, 192, 67, 153, 117, 45, 197, 233, 2, 19, 68, 216, 7, 168, 233, 137, 199, 158, 144, 176, 89, 211, 130, 154, 126, 152, 171, 68, 120, 219, 85, 55, 113, 106, 37, 95, 87, 141, 249, 59, 162, 100, 160, 130, 192, 154, 199, 164, 24, 237, 3, 170, 55, 54, 3, 98, 109, 11, 73, 121, 158, 117, 36, 30, 30, 41, 255, 20, 164, 227, 215, 0, 113, 15, 63, 183, 138, 238, 138, 135, 21, 52, 32, 79, 250, 224, 188, 39, 217, 12, 25, 52, 75, 87, 22, 118, 232, 59, 217, 139, 193, 182, 100, 19, 36, 242, 37, 5, 252, 216, 152, 55, 244, 64, 162, 16, 5, 175, 189, 35, 146, 125, 5, 25, 205, 166, 163, 133, 243, 156, 246, 55, 215, 123, 224, 121, 131, 50, 54, 108, 103, 41, 38, 15, 23, 247, 244, 106, 88, 182, 61, 180, 185, 61, 189, 213, 94, 167, 59, 140, 208, 120, 132, 226, 199, 18, 249, 28, 49, 112, 76, 76, 238, 86, 129, 196, 49, 136, 14, 126, 12, 91, 211, 157, 255, 233, 97, 73, 150, 21, 188, 77, 83, 34, 151, 49, 183, 214, 135, 86, 208, 220, 14, 107, 229, 194, 172, 230, 218, 239, 176, 168, 21, 58, 134, 128, 37, 118, 169, 125, 48, 144, 235, 136, 78, 44, 82, 180, 189, 127, 66, 39, 40, 135, 245, 57, 18, 141, 117, 83, 22, 194, 78, 135, 145, 154, 45, 90, 115, 236, 2, 250, 109, 113, 243, 230, 227, 74, 254, 219, 6, 242, 47, 41, 242, 146, 146, 228, 235, 165, 209, 17, 21, 220, 125, 202, 141, 204, 223, 220, 83, 55, 33, 233, 233, 201, 136, 63, 122, 154, 5, 99, 13, 72, 31, 202, 199, 59, 94, 95, 82, 154, 170, 147, 81, 143, 183, 30, 213, 216, 4, 41, 86, 203, 78, 22, 137, 73, 1, 58, 40, 252, 12, 162, 51, 204, 23, 12, 171, 19, 78, 160, 54, 58, 214, 138, 16, 0, 27, 15, 105, 164, 72, 204, 144, 194, 4, 234, 144, 213, 78, 13, 83, 249, 166, 132, 36, 211, 55, 5, 252, 123, 127, 177, 184, 19, 66, 244, 59, 124, 154, 154, 128, 195, 69, 252, 137, 82, 0, 189, 89, 104, 213, 18, 65, 99, 231, 135, 177, 227, 165, 108, 253, 158, 56, 35, 24, 230, 61, 157, 181, 59, 68, 178, 241, 150, 74, 223, 173, 129, 53, 104, 204, 91, 224, 208, 135, 110, 140, 84, 213, 4, 123, 193, 193, 13, 26, 56, 219, 216, 112, 11, 195, 234, 84, 10, 169, 83, 78, 151, 71, 29, 58, 241, 81, 118, 234, 3, 168, 77, 196, 89, 207, 31, 174, 236, 188, 68, 80, 6, 54, 246, 206, 66, 87, 159, 149, 239, 205, 31, 195, 24, 11, 156, 243, 91, 17, 168, 60, 112, 142, 19, 159, 238, 103, 152, 55, 202, 182, 147, 246, 172, 17, 249, 38, 202, 253, 37, 255, 143, 4, 128, 215, 166, 45, 26, 254, 231, 221, 121, 233, 92, 158, 222, 169, 34, 98, 255, 197, 192, 140, 250, 226, 156, 48, 136, 115, 156, 62, 159, 196, 196, 219, 152, 113, 254, 210, 96, 178, 21, 45, 103, 206, 108, 255, 143, 84, 226, 10, 200, 71, 77, 134, 220, 153, 28, 97, 250, 223, 103, 41, 53, 74, 20, 110, 237, 199, 166, 91, 186, 167, 136, 36, 183, 234, 120, 219, 235, 94, 184, 68, 120, 227, 227, 132, 29, 217, 108, 131, 201, 237, 43, 11, 181, 150, 77, 214, 172, 4, 46, 78, 123, 165, 21, 3, 76, 94, 43, 234, 42, 18, 189, 223, 222, 119, 246, 149, 10, 46, 99, 28, 128, 41, 111, 232, 142, 88, 162, 239, 61, 14, 235, 154, 200, 189, 213, 236, 162, 197, 240, 81, 67, 149, 137, 209, 132, 108, 3, 60, 210, 162, 246, 166, 81, 191, 221, 116, 225, 91, 175, 116, 154, 92, 24, 219, 174, 145, 25, 126, 71, 28, 14, 155, 151, 54, 233, 92, 53, 99, 109, 248, 36, 204, 82, 171, 19, 6, 185, 229, 26, 90, 91, 10, 128, 77, 244, 77, 251, 158, 3, 174, 36, 159, 134, 196, 246, 57, 24, 227, 227, 15, 176, 238, 124, 150, 234, 167, 46, 201, 52, 21, 62, 62, 34, 65, 138, 184, 49, 92, 229, 144, 1, 107, 124, 112, 175, 142, 31, 249, 202, 157, 214, 20, 246, 243, 134, 51, 237, 84, 121, 84, 127, 24, 253, 36, 42, 207, 240, 164, 239, 86, 186, 79, 215, 142, 62, 149, 194, 60, 212, 214, 73, 166, 53, 52, 75, 235, 111, 183, 100, 236, 57, 251, 165, 160, 248, 197, 37, 139, 117, 250, 71, 61, 170, 39, 126, 232, 133, 178, 122, 88, 8, 51, 28, 231, 129, 22, 102, 184, 82, 19, 99, 66, 103, 227], + [12, 32, 126, 149, 19, 14, 25, 177, 206, 154, 77, 183, 192, 37, 86, 189, 66, 30, 198, 38, 227, 117, 128, 101, 155, 10, 125, 215, 156, 145, 123, 55, 121, 183, 186, 184, 3, 102, 252, 7, 140, 135, 73, 38, 28, 215, 52, 230, 20, 117, 42, 20, 67, 136, 114, 87, 230, 125, 1, 107, 27, 230, 70, 152, 149, 11, 153, 70, 113, 144, 155, 178, 98, 203, 45, 67, 34, 54, 167, 77, 128, 16, 109, 208, 70, 178, 211, 182, 214, 16, 224, 75, 107, 240, 64, 104, 214, 114, 104, 193, 84, 220, 254, 56, 226, 101, 69, 200, 158, 230, 46, 87, 36, 119, 198, 105, 168, 194, 41, 35, 178, 105, 254, 70, 111, 137, 105, 252, 253, 38, 23, 105, 29, 147, 140, 146, 123, 3, 250, 223, 253, 81, 65, 142, 253, 141, 5, 25, 213, 121, 60, 50, 118, 128, 196, 30, 11, 216, 236, 34, 235, 245, 145, 135, 224, 86, 29, 180, 91, 210, 36, 9, 44, 146, 233, 64, 96, 4, 71, 127, 85, 184, 118, 68, 92, 105, 237, 233, 110, 52, 209, 63, 68, 147, 161, 73, 190, 54, 36, 189, 235, 68, 113, 63, 194, 150, 102, 49, 52, 101, 87, 219, 165, 88, 73, 101, 8, 201, 77, 251, 40, 148, 195, 81, 21, 34, 48, 1, 245, 192, 180, 67, 64, 186, 192, 120, 59, 118, 126, 143, 162, 42, 186, 142, 216, 71, 200, 21, 6, 226, 190, 117, 55, 158, 46, 74, 25, 109, 170, 164, 126, 234, 93, 87, 253, 249, 115, 244, 209, 232, 243, 31, 166, 91, 43, 21, 194, 176, 51, 18, 73, 81, 243, 180, 159, 231, 33, 109, 189, 251, 164, 218, 213, 68, 35, 61, 112, 251, 112, 209, 6, 135, 0, 110, 140, 109, 131, 18, 238, 222, 1, 107, 117, 66, 181, 144, 247, 94, 88, 137, 217, 41, 55, 222, 178, 35, 230, 95, 106, 5, 57, 139, 192, 2, 168, 78, 120, 49, 202, 129, 179, 249, 123, 31, 64, 236, 91, 19, 179, 133, 21, 140, 188, 63, 121, 175, 21, 68, 29, 217, 39, 248, 113, 110, 108, 198, 181, 131, 241, 75, 53, 160, 129, 32, 186, 155, 221, 139, 25, 158, 162, 16, 13, 105, 252, 232, 97, 207, 137, 232, 153, 3, 240, 126, 204, 152, 182, 53, 146, 60, 4, 51, 2, 133, 184, 73, 45, 123, 153, 213, 217, 68, 132, 79, 62, 146, 138, 28, 184, 124, 213, 146, 244, 189, 75, 94, 106, 16, 242, 9, 161, 55, 83, 202, 47, 139, 64, 222, 187, 85, 6, 232, 77, 169, 170, 153, 195, 87, 102, 66, 242, 220, 129, 171, 147, 107, 118, 243, 81, 244, 190, 233, 224, 149, 237, 247, 12, 73, 250, 94, 31, 154, 146, 88, 186, 133, 53, 51, 169, 16, 177, 34, 183, 177, 132, 190, 75, 230, 40, 4, 214, 147, 173, 81, 34, 192, 239, 14, 118, 208, 83, 223, 127, 41, 164, 121, 113, 9, 230, 154, 8, 238, 196, 209, 172, 87, 114, 174, 207, 19, 46, 74, 57, 98, 43, 178, 238, 101, 76, 60, 67, 248, 196, 144, 38, 31, 193, 150, 54, 144, 211, 116, 47, 225, 141, 235, 121, 73, 3, 242, 197, 55, 40, 24, 247, 81, 112, 232, 133, 206, 1, 17, 73, 100, 161, 198, 130, 183, 200, 164, 162, 167, 230, 254, 85, 91, 208, 77, 117, 17, 37, 21, 134, 187, 243, 59, 252, 225, 183, 228, 189, 90, 189, 149, 165, 149, 152, 100, 61, 148, 233, 176, 177, 88, 102, 197, 95, 72, 93, 34, 153, 238, 3, 239, 84, 227, 162, 183, 137, 66, 97, 165, 83, 152, 4, 6, 189, 9, 183, 51, 60, 93, 221, 118, 93, 221, 122, 27, 158, 86, 100, 14, 190, 40, 241, 143, 235, 79, 78, 188, 63, 196, 113, 197, 5, 106, 67, 30, 3, 61, 41, 131, 1, 110, 112, 133, 183, 178, 108, 203, 92, 57, 200, 13, 202, 48, 0, 180, 77, 197, 76, 23, 68, 241, 8, 232, 195, 51, 69, 224, 153, 56, 75, 149, 45, 105, 148, 114, 251, 131, 172, 60, 69, 3, 40, 120, 43, 188, 164, 96, 46, 254, 212, 2, 81, 30, 15, 252, 140, 227, 165, 19, 195, 88, 112, 163, 253, 137, 64, 18, 122, 147, 115, 86, 105, 150, 75, 38, 159, 36, 61, 236, 127, 165, 139, 248, 128, 42, 14, 25, 215, 162, 113, 242, 175, 88, 237, 14, 26, 74, 249, 35, 59, 19, 195, 85, 115, 162, 140, 216, 176, 163, 144, 137, 244, 168, 218, 252, 22, 208, 55, 43, 65, 190, 33, 113, 198, 124, 62, 49, 41, 83, 163, 130, 165, 42, 102, 23, 189, 205, 233, 92, 116, 46, 0, 56, 116, 111, 0, 246, 123, 136, 74, 166, 45, 174, 242, 179, 133, 38, 90, 92, 104, 171, 244, 139, 40, 175, 115, 163, 151, 143, 58, 156, 38, 96, 144, 55, 80, 63, 110, 107, 217, 21, 165, 66, 96, 9, 202, 59, 164, 93, 13, 87, 77, 20, 109, 224, 109, 3, 190, 216, 138, 107, 51, 168, 1, 204, 87, 195, 54, 59, 100, 129, 225, 149, 132, 3, 178, 241, 109, 155, 129, 134, 231, 41, 95, 228, 3, 85, 186, 240, 243, 122, 145, 107, 224, 228, 36, 1, 131, 16, 61, 63, 110, 4, 209, 30, 5, 191, 7, 206, 134, 233, 240, 142, 30, 17, 135, 57, 241, 178, 9, 68, 168, 45, 190, 163, 78, 146, 204, 155, 225, 104, 152, 243, 130, 49, 134, 51, 254, 54, 56, 222, 60, 219, 166, 89, 248, 74, 42, 89, 49, 87, 210, 236, 143, 244, 139, 223, 160, 203, 104, 25, 67, 92, 148, 37, 135, 180, 121, 151, 42, 58, 70, 21, 47, 249, 147, 89, 51, 37, 90, 144, 13, 25, 158, 202, 118, 239, 76, 163, 126, 46, 140, 236, 134, 18, 176, 176, 2, 95, 181, 203, 59, 0, 112, 116, 66, 133, 225, 240, 178, 26, 17, 127, 177, 220, 245, 121, 31, 88, 157, 40, 6, 74, 192, 19, 133, 252, 198, 157, 17, 105, 211, 138, 20, 23, 244, 2, 72, 214, 96, 223, 84, 213, 90, 147, 39, 96, 21, 62, 109, 102, 174, 37, 50, 19, 242, 233, 101, 104, 252, 114, 83, 117, 176, 40, 111, 234, 223, 58, 196, 182, 227, 79, 2, 90, 4, 73, 188, 115, 40, 181, 72, 141, 35, 5, 254, 105, 68, 210, 243, 95, 86, 207, 167, 144, 5, 156, 208, 71, 12, 176, 236, 0, 73, 175, 72, 237, 187, 208, 192, 177, 7, 56, 70, 105, 48, 176, 104, 119, 137, 161, 65, 99, 31, 116, 45, 227, 208, 226, 209, 87, 240, 157, 254, 248, 196, 230, 195, 7, 11, 247, 229, 150, 205, 213, 198, 85, 219, 79, 36, 15, 180, 251, 248, 247, 243, 58, 70, 249, 126, 36, 174, 244, 97, 223, 173, 245, 146, 253, 106, 8, 4, 245, 152, 108, 238, 57, 231, 175, 179, 7, 147, 71, 244, 17, 15, 116, 199, 222, 194, 46, 0, 118, 49, 210, 130, 229, 224, 52, 51, 119, 32, 118, 96, 159, 191, 76, 78, 83, 163, 95, 108, 131, 83, 253, 199, 5, 132, 165, 211, 61, 132, 54, 65, 145, 68, 100, 103, 164, 221, 101, 36, 193, 37, 107, 196, 208, 87, 130, 14, 72, 227, 137, 143, 226, 118, 53, 189, 65, 167, 59, 223, 58, 79, 177, 15, 87, 69, 24, 101, 152, 13, 67, 141, 106, 213, 99, 191, 237, 255, 50, 249, 81, 12, 199, 191, 152, 27, 237, 106, 131, 57, 222, 148, 55, 29, 156, 228, 12, 64, 193, 213, 166, 74, 119, 112, 163, 214, 40, 189, 174, 120, 149, 187, 118, 4, 172, 88, 89, 223, 202, 29, 43, 84, 87, 51, 39, 99, 221, 225, 91, 49, 67, 190, 216, 91, 207, 193, 180, 27, 218, 81, 177, 183, 123, 168, 80, 8, 40, 164, 160, 72, 156, 197, 129, 227, 168, 68, 164, 184, 224, 180, 175, 116, 112, 255, 227, 39, 214, 225, 10, 11, 93, 202, 139, 201, 154, 80, 247, 124, 245, 244, 207, 247, 94, 66, 140, 5, 150, 27, 59, 158, 111, 248, 213, 169, 66, 16, 40, 234, 97, 178, 35, 55, 198, 24, 205, 121, 247, 102, 253, 67, 191, 86, 154, 9, 39, 231, 54, 212, 140, 9, 96, 148, 36, 91, 8, 33, 12, 94, 159, 199, 4, 85, 228, 93, 148, 236, 94, 155, 3, 54, 100, 138, 148, 51, 120, 35, 196, 253, 48, 224, 70, 207, 141, 166, 226, 170, 247, 190, 116, 183, 207, 37, 188, 155, 30, 210, 251, 177, 29, 169, 80, 231, 239, 149, 83, 11, 240, 64, 210, 17, 137, 72, 178, 141, 103, 125, 157, 232, 117, 11, 229, 85, 160, 122, 223, 96, 177, 170, 23, 62, 119, 84, 140, 249, 222, 253, 2, 249, 187, 230, 59, 203, 208, 13, 77, 90, 255, 62, 202, 49, 21, 23, 16, 241, 9, 232, 105, 101, 138, 244, 183, 32, 246, 0, 108, 246, 197, 105, 181, 255, 135, 250, 248, 103, 87, 116, 28, 58, 45, 167, 252, 155, 174, 242, 91, 46, 16, 197, 47, 93, 176, 77, 58, 221, 218, 236, 126, 4, 215, 58, 14, 110, 35, 135, 101, 253, 215, 107, 173, 20, 34, 217, 135, 120, 136, 164, 173, 85, 63, 113, 28, 179, 91, 16, 157, 171, 151, 218, 77, 104, 175, 102, 126, 243, 248, 205, 19, 63, 24, 248, 251, 147, 217, 63, 32, 219, 119, 19, 146, 98, 143, 54, 128, 13, 86, 70, 181, 216, 67, 203, 145, 158, 137, 154, 223, 171, 132, 163, 165, 66, 140, 188, 84, 89, 254, 170, 187, 212, 193, 174, 35, 112, 215, 186, 107, 54, 157, 90, 184, 185, 142, 218, 12, 228, 3, 145, 245, 4, 137, 129, 50, 217, 147, 91, 183, 145, 255, 158, 199, 107, 153, 186, 76, 114, 82, 18, 187, 128, 175, 240, 222, 120, 248, 225, 106, 108, 14, 220, 117, 178, 111, 158, 33, 38, 96, 75, 39, 248, 9, 121, 28, 77, 175, 20, 169, 234, 98, 200, 173, 114, 155, 23, 178, 40, 88, 175, 28, 217, 152, 218, 153, 108, 242, 41, 45, 136, 201, 124, 20, 219, 17, 47, 241, 158, 4, 164, 92, 12, 58, 139, 85, 188, 163, 210, 9, 7, 6, 5, 103, 231, 115, 156, 250, 206, 103, 8, 29, 167, 130, 192, 96, 161, 118, 4, 249, 140, 183, 105, 172, 117, 251, 73, 148, 191, 52, 19, 90, 209, 172, 157, 87, 169, 48, 206, 34, 55, 109, 148, 158, 210, 224, 78, 211, 176, 173, 113, 14, 171, 213, 214, 248, 146, 228, 56, 69, 31, 126, 38, 164, 8, 129, 28, 76, 231, 119, 18, 1, 225, 86, 190, 156, 38, 61, 16, 40, 14, 37, 128, 235, 136, 140, 205, 208, 162, 28, 131, 10, 41, 193, 167, 247, 131, 89, 136, 117, 217, 140, 188, 184, 42, 98, 138, 90, 54, 172, 182, 8, 214, 54, 94, 163, 248, 132, 212, 69, 206, 140, 245, 89, 178, 43, 91, 127, 179, 125, 45, 102, 0, 69, 11, 128, 16, 119, 13, 250, 240, 34, 222, 72, 177, 147, 149, 134, 198, 147, 166, 190, 1, 254, 217, 1, 156, 221, 94, 119, 254, 203, 41, 7, 207, 248, 37, 131, 80, 160, 244, 203, 132, 244, 136, 92, 222, 40, 20, 103, 35, 131, 125, 173, 144, 30, 160, 225, 225, 223, 172, 249, 20, 141, 167, 217, 203, 30, 195, 79, 34, 166, 178, 138, 235, 15, 104, 151, 26, 74, 50, 173, 219, 9, 135, 74, 242, 34, 68, 15, 23, 129, 71, 230, 242, 148, 81, 168, 214, 27, 144, 158, 93, 186, 131, 18, 108, 97, 88, 184, 228, 12, 250, 59, 186, 29, 188, 99, 29, 89, 166, 235, 49, 188, 170, 64, 129, 236, 37, 77, 227, 45, 68, 133, 113, 245, 98, 248, 38, 136, 101, 63, 224, 60, 37, 220, 181, 0, 133, 144, 3, 144, 141, 171, 41, 159, 33, 63, 29, 9, 249, 203, 255, 111, 101, 20, 224, 62, 28, 145, 217, 18, 229, 24, 28, 142, 24, 29, 91, 232, 34, 66, 205, 79, 175, 82, 227, 56, 214, 200, 157, 40, 137, 25, 199, 65, 194, 112, 210, 98, 91, 245, 54, 171, 168, 49, 155, 160, 64, 114, 98, 55, 28, 22, 116, 86, 250, 184, 81, 251, 5, 118, 82, 209, 137, 38, 14, 20, 23, 250, 73, 194, 84, 192, 227, 46, 113, 232, 55, 56, 52, 95, 29, 135, 67, 58, 36, 22, 212, 31, 174, 114, 235, 233, 122, 138, 64, 225, 125, 127, 47, 132, 183, 77, 139, 85, 223, 255, 214, 189, 117, 5, 90, 232, 152, 182, 29, 201, 217, 159, 183, 96, 12, 72, 206, 29, 161, 119, 197, 20, 41, 129, 34, 2, 151, 99, 212, 42, 248, 113, 54, 218, 72, 205, 34, 29, 121, 254, 241, 87, 231, 189, 113, 29, 249, 28, 233, 53, 65, 228, 133, 212, 147, 163, 39, 4, 244, 72, 221, 4, 66, 242, 217, 49, 86, 42, 10, 168, 252, 203, 163, 33, 81, 107, 138, 243, 229, 84, 49, 245, 4, 44, 99, 198, 39, 12, 129, 119, 156, 62, 246, 228, 255, 178, 214, 128, 37, 23, 166, 102, 144, 233, 22, 47, 212, 148, 123, 119, 192, 22, 200, 178, 59, 70, 130, 188, 15, 44, 141, 120, 87, 214, 71, 92, 88, 80, 144, 68, 136, 10, 237, 237, 246, 25, 166, 141, 89, 3, 244, 91, 168, 13, 173, 248, 218, 169, 137, 233, 153, 82, 131, 48, 226, 241, 180, 87, 146, 212, 241, 35, 217, 65, 162, 8, 90, 152, 203, 50, 62, 246, 138, 98, 105, 71, 71, 8, 86, 27, 53, 13, 35, 184, 122, 242, 200, 241, 176, 89, 210, 58, 61, 23, 87, 22, 192, 143, 30, 123, 162, 199, 29, 1, 66, 39, 237, 118, 209, 143, 184, 146, 164, 64, 212, 130, 237, 183, 173, 17, 93, 79, 43, 196, 70, 16, 36, 159, 73, 120, 134, 65, 60, 246, 239, 37, 85, 91, 172, 235, 91, 161, 36, 50, 114, 114, 79, 73, 181, 25, 221, 6, 82, 231, 231, 168, 90, 220, 233, 244, 134, 189, 200, 168, 91, 84, 135, 5, 73, 162, 240, 0, 254, 159, 139, 77, 54, 210, 165, 186, 169, 3, 172, 190, 112, 98, 62, 70, 77, 39, 205, 200, 172, 241, 208, 201, 76, 67, 3, 139, 34, 28, 145, 167, 16, 193, 222, 172, 24, 188, 234, 84, 159, 198, 106, 204, 173, 63, 55, 44, 37, 84, 197, 6, 185, 126, 46, 93, 39, 198, 136, 40, 127, 161, 169, 235, 209, 192, 161, 219, 250, 87, 236, 194, 22, 73, 18, 123, 66, 74, 249, 18, 86, 13, 243, 205, 144, 173, 64, 107, 7, 206, 160, 75, 17, 142, 10, 129, 212, 214, 37, 59, 58, 113, 11, 173, 247, 113, 141, 137, 213, 237, 198, 49, 197, 43, 207, 93, 243, 61, 214, 60, 134, 190, 95, 255, 153, 110, 89, 191, 73, 163, 138, 94, 147, 150, 16, 202, 38, 21, 89, 218, 73, 127, 186, 101, 192, 241, 226, 179, 113, 146, 131, 21, 124, 154, 31, 199, 38, 55, 24, 112, 66, 55, 51, 48, 160, 252, 17, 236, 241, 70, 85, 60, 22, 146, 124, 241, 25, 186, 244, 94, 216, 253, 204, 244, 193, 78, 192, 169, 232, 126, 23, 98, 196, 139, 172, 39, 127, 173, 119, 28, 248, 222, 109, 3, 31, 42, 198, 226, 228, 18, 34, 128, 188, 135, 84, 223, 65, 19, 134, 133, 92, 219, 85, 117, 198, 249, 229, 186, 147, 229, 25, 68, 63, 236, 195, 254, 168, 66, 28, 105, 219, 162, 158, 38, 59, 89, 251, 47, 37, 82, 200, 128, 224, 228, 144, 178, 79, 220, 236, 227, 235, 238, 152, 79, 85, 23, 63, 173, 159, 26, 176, 177, 66, 228, 172, 136, 19, 6, 150, 148, 223, 162, 101, 106, 47, 88, 251, 236, 204, 27, 127, 74, 75, 16, 245, 102, 69, 98, 175, 181, 215, 98, 250, 14, 54, 73, 198, 83, 108, 148, 177, 97, 155, 88, 126, 74, 213, 62, 63, 93, 138, 218, 223, 79, 36, 36, 142, 23, 252, 6, 212, 67, 94, 211, 20, 86, 21, 40, 147, 191, 3, 149, 30, 48, 206, 13, 240, 246, 156, 176, 111, 57, 241, 243, 143, 17, 199, 172, 232, 37, 0, 46, 43, 13, 164, 21, 228, 33, 221, 119, 0, 55, 229, 25, 242, 57, 127, 58, 196, 47, 74, 35, 83, 113, 114, 82, 168, 108, 188, 232, 215, 85, 188, 215, 17, 74, 165, 235, 170, 215, 153, 104, 74, 177, 220, 156, 77, 148, 213, 159, 61, 39, 43, 46, 24, 243, 8, 242, 193, 209, 105, 8, 136, 223, 156, 81, 27, 167, 103, 23, 215, 107, 183, 168, 161, 161, 217, 89, 173, 81, 219, 230, 99, 254, 15, 48, 159, 194, 231, 174, 166, 169, 12, 131, 22, 147, 154, 176, 78, 49, 206, 0, 239, 10, 103, 174, 20, 28, 253, 209, 195, 5, 247, 141, 17, 170, 161, 71, 140, 108, 33, 41, 193, 170, 26, 176, 171, 131, 91, 208, 229, 15, 42, 112, 83, 232, 71, 172, 88, 38, 106, 13, 158, 94, 30, 105, 35, 240, 147, 109, 248, 147, 90, 190, 33, 204, 214, 140, 43, 92, 197, 155, 252, 101, 72, 191, 51, 195, 140, 119, 200, 34, 224, 246, 164, 47, 164, 217, 173, 246, 246, 89, 69, 134, 197, 28, 248, 176, 173, 138, 168, 89, 28, 133, 134, 29, 77, 5, 52, 147, 225, 117, 56, 14, 45, 87, 151, 103, 89, 9, 197, 13, 24, 129, 39, 189, 235, 210, 189, 143, 72, 182, 194, 122, 213, 186, 109, 112, 69, 247, 14, 202, 154, 85, 106, 32, 170, 171, 156, 200, 136, 56, 158, 58, 245, 228, 53, 209, 109, 210, 1, 229, 182, 167, 119, 7, 153, 174, 18, 39, 195, 196, 47, 86, 86, 197, 122, 88, 137, 12, 176, 24, 13, 193, 204, 41, 127, 37, 87, 214, 17, 182, 26, 57, 176, 82, 181, 140, 170, 22, 183, 208, 185, 189, 203, 136, 70, 81, 20, 57, 225, 97, 236, 158, 74, 162, 87, 219, 176, 229, 55, 37, 43, 29, 243, 4, 103, 209, 14, 200, 251, 139, 185, 214, 8, 104, 84, 185, 123, 196, 150, 134, 55, 254, 100, 220, 117, 104, 58, 23, 203, 135, 117, 65, 185, 156, 140, 119, 252, 80, 106, 7, 223, 140, 162, 135, 11, 172, 216, 133, 11, 53, 38, 230, 224, 123, 95, 95, 130, 6, 191, 51, 20, 104, 170, 177, 183, 26, 102, 238, 142, 79, 244, 95, 197, 162, 125, 150, 40, 246, 182, 109, 18, 159, 30, 44, 186, 109, 232, 164, 148, 44, 24, 232, 27, 225, 120, 99, 130, 56, 15, 126, 3, 49, 202, 148, 224, 115, 18, 160, 159, 24, 94, 255, 211, 130, 41, 177, 137, 174, 96, 172, 199, 64, 149, 250, 173, 24, 167, 200, 175, 136, 74, 148, 170, 148, 25, 77, 13, 137, 120, 53, 12, 109, 11, 57, 23, 186, 193, 1, 112, 33, 178, 83, 189, 17, 61, 130, 250, 174, 202, 190, 10, 233, 237, 116, 204, 173, 143, 98, 225, 94, 232, 106, 156, 97, 201, 250, 52, 116, 226, 244, 96, 207, 82, 227, 219, 184, 46, 200, 150, 171, 160, 159, 78, 170, 105, 20, 242, 173, 180, 79, 183, 209, 206, 151, 254, 180, 62, 232, 208, 36, 18, 30, 147, 219, 188, 46, 9, 228, 155, 200, 9, 254, 208, 241, 129, 241, 3, 47, 29, 235, 90, 200, 112, 108, 225, 0, 19, 195, 156, 250, 16, 89, 234, 53, 51, 95, 194, 161, 192, 34, 143, 1, 142, 51, 91, 172, 141, 207, 19, 33, 95, 166, 4, 111, 89, 65, 119, 130, 215, 58, 231, 173, 167, 224, 253, 214, 15, 98, 232, 235, 112, 55, 140, 56, 95, 131, 185, 111, 203, 243, 102, 26, 117, 202, 17, 104, 15, 132, 58, 149, 126, 128, 241, 169, 243, 247, 133, 218, 215, 79, 196, 59, 133, 36, 5, 128, 240, 193, 240, 115, 117, 0, 101, 73, 48, 135, 207, 77, 79, 23, 136, 154, 125, 42, 26, 90, 68, 40, 167, 16, 138, 176, 154, 48, 230, 191, 124, 236, 73, 41, 118, 53, 153, 147, 55, 65, 241, 88, 44, 100, 222, 189, 100, 45, 180, 213, 227, 253, 98, 251, 71, 71, 155, 131, 4, 167, 183, 122, 239, 201, 188, 206, 255, 230, 58, 17, 52, 248, 179, 242, 58, 250, 61, 255, 83, 48, 195, 39, 55, 86, 217, 7, 104, 97, 170, 7, 227, 40, 63, 92, 140, 14, 190, 63, 205, 42, 229, 211, 64, 174, 89, 221, 204, 104, 53, 24, 215, 123, 169, 128, 239, 133, 88, 26, 121, 165, 159, 88, 88, 15, 197, 224, 73, 0, 234, 10, 118, 56, 141, 175, 216, 136, 247, 246, 68, 183, 95, 121, 79, 243, 128, 121, 126, 56, 191, 109, 213, 130, 110, 52, 129, 2, 194, 2, 86, 151, 174, 67, 182, 27, 109, 235, 170, 234, 217, 112, 24, 98, 48, 165, 77, 2, 135, 69, 141, 127, 190, 51, 136, 198, 39, 192, 121, 247, 150, 148, 209, 171, 159, 184, 188, 43, 142, 183, 192, 200, 231, 116, 42, 45, 117, 109, 76, 31, 172, 140, 81, 143, 161, 31, 179, 48, 87, 238, 182, 28, 178, 36, 247, 249, 137, 81, 20, 184, 207, 158, 59, 0, 237, 61, 41, 193, 72, 85, 244, 76, 72, 78, 67, 45, 142, 142, 54, 131, 154, 142, 6, 233, 234, 207, 183, 77, 237, 150, 37, 160, 226, 3, 101, 110, 110, 71, 105, 127, 255, 129, 62, 242, 97, 172, 140, 58, 80, 54, 223, 58, 202, 160, 26, 44, 249, 19, 203, 66, 46, 109, 172, 41, 234, 70, 231, 208, 232, 171, 251, 106, 43, 233, 229, 138, 199, 202, 14, 108, 47, 200, 35, 179, 134, 35, 17, 206, 62, 107, 151, 233, 115, 187, 151, 214, 53, 203, 16, 175, 86, 103, 204, 209, 251, 60, 198, 111, 235, 166, 8, 114, 148, 130, 245, 84, 160, 171, 129, 133, 139, 210, 78, 159, 97, 232, 214, 169, 169, 238, 152, 23, 225, 28, 253, 86, 140, 134, 47, 230, 235, 118, 185, 198, 17, 66, 72, 84, 229, 142, 122, 252, 154, 77, 166, 17, 114, 184, 226, 151, 220, 54, 186, 214, 179, 205, 195, 121, 226, 197, 126, 66, 152, 50, 81, 205, 53, 205, 179, 254, 2, 167, 244, 71, 6, 239, 125, 174, 114, 54, 8, 1, 225, 12, 200, 212, 185, 143, 106, 93, 28, 190, 130, 156, 247, 184, 120, 182, 246, 20, 231, 133, 90, 111, 119, 41, 176, 156, 239, 220, 255, 233, 47, 89, 64, 101, 207, 247, 106, 53, 127, 57, 61, 253, 209, 115, 198, 19, 52, 79, 195, 157, 190, 188, 87, 28, 102, 213, 191, 14, 104, 178, 4, 28, 139, 109, 101, 226, 159, 204, 73, 144, 93, 101, 152, 190, 83, 128, 127, 86, 188, 233, 145, 244, 158, 59, 78, 105, 57, 136, 15, 127, 202, 112, 253, 38, 176, 46, 222, 93, 185, 74, 196, 100, 123, 158, 219, 229, 175, 70, 21, 112, 157, 69, 199, 248, 202, 192, 170, 223, 235, 100, 61, 85, 185, 115, 80, 183, 217, 157, 221, 188, 143, 26, 164, 193, 95, 76, 20, 9, 188, 158, 202, 78, 156, 132, 179, 139, 161, 238, 107, 72, 43, 200, 128, 26, 215, 58, 204, 58, 242, 221, 159, 136, 152, 108, 36, 137, 36, 217, 130, 50, 128, 68, 134, 84, 159, 115, 39, 50, 67, 69, 156, 14, 133, 142, 16, 112, 233, 68, 88, 130, 222, 140, 15, 15, 58, 227, 219, 112, 68, 101, 76, 190, 194, 36, 210, 79, 11, 166, 231, 170, 154, 87, 254, 5, 200, 170, 23, 83, 165, 26, 118, 55, 150, 168, 252, 3, 154, 193, 130, 241, 143, 54, 54, 5, 125, 199, 173, 148, 61, 200, 236, 0, 30, 10, 79, 100, 9, 146, 210, 71, 9, 39, 119, 105, 155, 17, 122, 117, 111, 51, 44, 120, 37, 106, 139, 250, 155, 77, 196, 152, 169, 118, 46, 205, 76, 58, 153, 142, 131, 232, 120, 89, 183, 204, 235, 130, 162, 142, 78, 25, 63, 60, 104, 244, 235, 217, 222, 228, 139, 170, 70, 91, 232, 155, 126, 245, 198, 234, 137, 88, 96, 7, 50, 121, 149, 112, 133, 33, 10, 196, 74, 172, 11, 18, 15, 149, 118, 117, 49, 126, 46, 86, 23, 111, 163, 96, 254, 220, 109, 37, 58, 25, 62, 27, 124, 131, 216, 28, 0, 78, 248, 221, 26, 169, 146, 156, 192, 144, 162, 77, 187, 172, 231, 30, 71, 30, 43, 217, 166, 31, 5, 60, 25, 2, 135, 55, 241, 84, 44, 246, 5, 113, 227, 236, 220, 196, 249, 191, 118, 195, 184, 121, 249, 92, 232, 20, 34, 189, 121, 36, 239, 231, 103, 246, 177, 144, 163, 46, 188, 239, 96, 243, 99, 101, 230, 124, 222, 26, 175, 90, 40, 73, 203, 96, 207, 136, 166, 64, 51, 39, 43, 4, 31, 74, 22, 19, 211, 60, 87, 93, 0, 142, 226, 169, 104, 245, 85, 60, 181, 23, 3, 100, 103, 82, 227, 248, 177, 218, 4, 188, 195, 189, 252, 248, 161, 38, 227, 63, 232, 75, 130, 238, 28, 130, 152, 37, 189, 44, 150, 14, 228, 233, 15, 185, 37, 31, 84, 123, 183, 50, 47, 81, 52, 188, 97, 138, 181, 190, 95, 127, 86, 71, 209, 157, 31, 55, 140, 52, 234, 102, 235, 81, 19, 107, 243, 112, 189, 207, 8, 17, 232, 121, 78, 91, 97, 9, 177, 93, 119, 105, 1, 58, 72, 75, 28, 207, 150, 157, 128, 71, 242, 23, 69, 93, 246, 176, 24, 196, 84, 254, 80, 59, 252, 144, 198, 13, 23, 206, 82, 128, 242, 145, 200, 129, 238, 50, 242, 64, 138, 214, 159, 28, 135, 44, 251, 101, 105, 172, 80, 119, 250, 248, 51, 3, 156, 211, 79, 54, 75, 55, 49, 110, 157, 112, 199, 46, 215, 170, 210, 155, 79, 111, 29, 217, 228, 253, 227, 123, 238, 64, 94, 88, 53, 99, 69, 240, 77, 229, 217, 18, 63, 251, 200, 209, 202, 122, 30, 111, 23, 231, 64, 24, 155, 95, 245, 238, 131, 41, 6, 183, 114, 144, 221, 33, 7, 155, 231, 251, 168, 25, 110, 59, 42, 174, 26, 222, 89, 33, 193, 5, 65, 122, 16, 211, 166, 91, 69, 240, 201, 230, 246, 6, 35, 106, 169, 252, 133, 166, 140, 188, 235, 171, 227, 0, 118, 232, 47, 37, 238, 36, 130, 207, 169, 201, 238, 72, 167, 157, 226, 136, 57, 126, 148, 83, 211, 95, 76, 64, 241, 165, 32, 13, 237, 247, 223, 105, 152, 43, 153, 251, 105, 136, 160, 87, 112, 120, 65, 213, 187, 138, 58, 106, 31, 182, 23, 251, 131, 223, 10, 99, 185, 66, 117, 10, 11, 175, 50, 252, 82, 8, 166, 250, 113, 177, 197, 70, 131, 38, 102, 116, 254, 82, 184, 230, 125, 116, 82, 168, 250, 241, 163, 238, 207, 220, 118, 156, 229, 97, 111, 253, 242, 47, 188, 46, 133, 180, 230, 247, 255, 239, 182, 203, 42, 175, 179, 69, 161, 216, 72, 100, 12, 123, 82, 253, 220, 73, 175, 46, 235, 155, 2, 60, 218, 131, 107, 185, 246, 223, 188, 27, 65, 72, 24, 38, 68, 126, 161, 96, 114, 156, 182, 39, 88, 91, 26, 114, 221, 130, 219, 184, 176, 1, 103, 216, 246, 47, 236, 190, 140, 221, 46, 113, 163, 66, 94, 25, 158, 79, 198, 187, 161, 83, 124, 109, 48, 90, 6, 165, 32, 16, 91, 209, 209, 207, 23, 158, 103, 84, 45, 97, 53, 233, 191, 180, 146, 101, 187, 14, 173, 221, 73, 70, 16, 100, 32, 156, 235, 21, 66, 236, 225, 147, 32, 193, 158, 165, 244, 88, 188, 223, 248, 197, 138, 12, 25, 182, 0, 99, 33, 204, 40, 203, 125, 183, 235, 219, 246, 126, 225, 56, 96, 43, 29, 78, 169, 132, 154, 32, 244, 124, 179, 15, 120, 78, 127, 88, 189, 131, 44, 149, 26, 25, 81, 48, 39, 5, 176, 152, 2, 243, 195, 180, 56, 1, 127, 18, 89, 221, 171, 84, 203, 109, 77, 221, 124, 197, 117, 223, 18, 132, 176, 4, 211, 84, 203, 156, 130, 58, 242, 116, 1, 187, 228, 188, 255, 161, 134, 148, 72, 30, 139, 0, 105, 63, 219, 200, 116, 118, 46, 176, 50, 228, 96, 228, 202, 1, 71, 95, 8, 65, 181, 214, 192, 153, 60, 139, 245, 175, 218, 165, 22, 111, 103, 150, 233, 79, 133, 179, 142, 14, 91, 54, 180, 91, 145, 11, 74, 137, 45, 237, 231, 190, 118, 231, 222, 149, 59, 186, 149, 141, 11, 239, 64, 189, 169, 194, 141, 12, 206, 51, 89, 116, 117, 238, 97, 107, 26, 210, 150, 98, 26, 113, 209, 79, 73, 199, 207, 139, 239, 68, 43, 220, 5, 105, 59, 39, 14, 68, 135, 47, 210, 123, 55, 77, 41, 84, 178, 90, 161, 39, 61, 96, 61, 112, 15, 45, 104, 201, 59, 51, 216, 83, 138, 41, 184, 200, 102, 241, 99, 149, 233, 49, 121, 234, 17, 152, 248, 87, 153, 33, 92, 92, 193, 88, 194, 191, 218, 134, 243, 117, 188, 123, 85, 152, 107, 216, 24, 97, 158, 155, 240, 233, 96, 136, 49, 24, 245, 245, 133, 118, 189, 30, 190, 9, 175, 36, 29, 7, 106, 93, 74, 89, 176, 51, 22, 137, 94, 220, 17, 112, 226, 97, 245, 193, 212, 57, 203, 244, 173, 100, 218, 90, 216, 253, 208, 40, 42, 170, 231, 249, 15, 164, 135, 144, 73, 26, 191, 169, 174, 164, 36, 47, 186, 132, 229, 171, 68, 195, 67, 23, 15, 74, 132, 220, 158, 109, 81, 191, 96, 204, 135, 121, 58, 158, 77, 139, 105, 71, 168, 49, 95, 213, 234, 226, 10, 228, 54, 172, 218, 248, 87, 157, 138, 73, 163, 249, 47, 128, 175, 175, 151, 229, 15, 44, 100, 36, 153, 20, 123, 53, 59, 165, 8, 30, 216, 230, 209, 100, 10, 106, 236, 119, 151, 28, 28, 241, 107, 200, 71, 201, 1, 147, 176, 45, 248, 158, 60, 175, 36, 149, 26, 79, 127, 215, 103, 70, 213, 130, 203, 175, 146, 101, 36, 243, 93, 244, 87, 132, 53, 175, 131, 216, 197, 158, 196, 80, 23, 218, 0, 126, 236, 93, 150, 147, 66, 2, 197, 253, 207, 114, 108, 192, 72, 6, 25, 217, 85, 81, 63, 95, 139, 39, 43, 58, 241, 134, 51, 10, 225, 223, 69, 165, 68, 110, 197, 27, 129, 174, 8, 203, 38, 228, 105, 4, 114, 87, 178, 72, 237, 132, 11, 239, 138, 127, 35, 239, 225, 20, 178, 195, 96, 38, 167, 24, 153, 125, 164, 236, 16, 174, 133, 192, 153, 85, 80, 47, 185, 103, 75, 198, 111, 128, 61, 72, 42, 208, 209, 149, 70, 128, 204, 97, 171, 32, 58, 223, 74, 83, 236, 81, 77, 121, 19, 176, 83, 228, 16, 234, 200, 231, 166, 77, 142, 156, 182, 197, 229, 40, 95, 83, 127, 25, 59, 100, 128, 42, 25, 164, 163, 151, 143, 225, 92, 244, 149, 11, 14, 59, 130, 100, 248, 93, 34, 64, 179, 35, 36, 65, 56, 25, 66, 138, 177, 227, 55, 12, 166, 246, 102, 108, 16, 192, 213, 190, 115, 158, 127, 247, 84, 232, 188, 96, 84, 252, 240, 151, 36, 93, 241, 118, 142, 147, 26, 106, 240, 66, 233, 144, 36, 218, 255, 67, 137, 30, 182, 231, 196, 147, 200, 222, 119, 25, 174, 165, 121, 210, 228, 200, 230, 126, 130, 216, 211, 236, 111, 140, 175, 53, 185, 104, 253, 131, 106, 0, 17, 214, 31, 87, 88, 92, 58, 217, 90, 190, 120, 182, 214, 255, 106, 209, 119, 240, 95, 214, 127, 145, 127, 242, 19, 238, 182, 86, 156, 55, 210, 19, 229, 90, 180, 5, 37, 109, 106, 201, 169, 137, 11, 99, 62, 130, 113, 27, 207, 153, 138, 224, 94, 41, 85, 54, 70, 48, 196, 147, 99, 16, 141, 168, 22, 194, 232, 29, 107, 196, 163, 45, 41, 154, 18, 92, 61, 35, 216, 43, 222, 8, 202, 145, 169, 21, 45, 151, 188, 223, 190, 172, 245, 125, 233, 55, 3, 204, 80, 249, 86, 121, 178, 185, 60, 128, 139, 146, 42, 65, 238, 155, 119, 151, 108, 215, 164, 98, 179, 183, 250, 240, 16, 188, 189, 8, 150, 116, 65, 7, 220, 91, 152, 0, 112, 19, 166, 204, 239, 10, 157, 127, 208, 143, 186, 248, 177, 231, 92, 118, 34, 145, 176, 238, 199, 26, 90, 74, 27, 68, 157, 188, 48, 50, 25, 58, 149, 227, 101, 206, 164, 240, 161, 148, 243, 253, 191, 152, 57, 132, 177, 156, 138, 226, 55, 150, 123, 69, 99, 188, 93, 78, 121, 252, 62, 249, 23, 6, 248, 152, 49, 28, 47, 193, 110, 47, 118, 46, 141, 206, 166, 96, 212, 124, 16, 43, 79, 12, 56, 41, 128, 218, 193, 0, 124, 81, 209, 243, 178, 132, 115, 10, 111, 192, 197, 224, 238, 192, 95, 190, 30, 163, 158, 184, 77, 159, 11, 228, 198, 228, 133, 251, 50, 112, 206, 101, 198, 98, 249, 153, 16, 15, 99, 46, 72, 188, 107, 132, 174, 244, 209, 99, 237, 183, 220, 93, 230, 143, 92, 89, 114, 138, 51, 11, 191, 10, 57, 201, 66, 188, 221, 76, 182, 218, 204, 189, 19, 231, 59, 122, 178, 55, 3, 239, 150, 141, 254, 127, 31, 163, 96, 2, 78, 79, 218, 112, 177, 22, 240, 112, 113, 161, 203, 197, 100, 2, 121, 30, 230, 201, 46, 161, 167, 17, 122, 189, 50, 252, 35, 61, 219, 225, 10, 181, 37, 171, 86, 28, 168, 128, 125, 255, 155, 54, 24, 24, 31, 62, 56, 2, 53, 17, 104, 72, 50, 226, 143, 29, 148, 207, 203, 108, 215, 62, 37, 163, 124, 52, 97, 180, 201, 175, 15, 212, 231, 141, 235, 128, 205, 112, 221, 121, 18, 187, 21, 82, 38, 220, 239, 133, 216, 126, 16, 28, 9, 240, 162, 122, 30, 27, 219, 172, 207, 169, 84, 104, 164, 78, 176, 101, 25, 125, 175, 44, 173, 18, 25, 11, 98, 189, 156, 233, 26, 153, 30, 161, 117, 24, 44, 21, 54, 212, 57, 135, 5, 209, 60, 131, 8, 178, 214, 146, 188, 188, 39, 78, 57, 14, 248, 196, 220, 97, 19, 173, 69, 111, 71, 129, 29, 184, 36, 79, 127, 150, 58, 229, 211, 158, 153, 164, 210, 222, 160, 60, 166, 228, 43, 9, 94, 88, 168, 245, 92, 38, 252, 12, 226, 181, 147, 116, 129, 173, 240, 111, 18, 88, 48, 227, 47, 168, 24, 125, 139, 121, 213, 160, 136, 44, 108, 119, 254, 245, 162, 135, 103, 121, 184, 125, 30, 192, 3, 97, 55, 129, 230, 169, 153, 81, 69, 143, 135, 22, 184, 251, 85, 77, 80, 191, 191, 244, 247, 221, 178, 110, 16, 229, 102, 114, 5, 81, 57, 183, 46, 221, 72, 48, 209, 143, 176, 242, 61, 195, 119, 43, 162, 80, 154, 165, 248, 33, 255, 103, 220, 139, 39, 66, 173, 67, 191, 106, 175, 201, 7, 130, 155, 59, 111, 13, 172, 57, 146, 61, 150, 87, 97, 177, 97, 158, 192, 62, 72, 184, 203, 90, 170, 112, 102, 44, 32, 45, 162, 104, 225, 242, 46, 197, 63, 107, 204, 20, 134, 164, 85, 242, 56, 113, 253, 91, 131, 44, 62, 175, 114, 209, 128, 148, 209, 191, 242, 16, 78, 23, 240, 227, 52, 200, 251, 252, 121, 140, 47, 61, 92, 132, 120, 54, 49, 22, 51, 241, 126, 6, 178, 193, 198, 190, 236, 5, 235, 5, 71, 141, 34, 116, 220, 95, 70, 242, 203, 89, 136, 115, 166, 118, 162, 148, 17, 200, 54, 0, 235, 50, 120, 104, 97, 9, 166, 215, 109, 99, 155, 189, 253, 3, 0, 138, 69, 14, 13, 82, 238, 35, 77, 182, 2, 222, 204, 107, 62, 136, 178, 223, 175, 133, 239, 41, 3, 249, 70, 65, 242, 40, 6, 69, 113, 44, 87, 108, 66, 142, 214, 212, 90, 150, 36, 183, 180, 98, 10, 190, 110, 56, 123, 85, 53, 219, 117, 28, 154, 208, 61, 28, 247, 48, 100, 220, 176, 119, 73, 240, 156, 125, 109, 214, 130, 181, 127, 204, 66, 117, 179, 12, 239, 92, 232, 242, 51, 143, 107, 195, 245, 58, 133, 143, 232, 221, 179, 44, 141, 127, 179, 255, 191, 13, 154, 14, 116, 25, 110, 102, 230, 118, 213, 173, 223, 185, 194, 231, 74, 122, 160, 93, 26, 39, 206, 114, 63, 8, 246, 78, 87, 80, 142, 102, 234, 243, 160, 208, 239, 87, 193, 45, 136, 134, 205, 191, 184, 138, 189, 131, 203, 13, 254, 54, 108, 240, 164, 18, 135, 251, 218, 189, 65, 106, 199, 238, 243, 56, 255, 125, 232, 75, 63, 135, 181, 36, 25, 75, 71, 225, 181, 120, 171, 150, 107, 94, 164, 115, 250, 201, 184, 250, 124, 141, 130, 23, 138, 118, 35, 100, 65, 93, 17, 6, 88, 136, 18, 149, 171, 70, 181, 129, 54, 9, 31, 50, 75, 103, 179, 153, 22, 98, 141, 40, 151, 141, 254, 70, 79, 79, 89, 70, 36, 37, 158, 118, 28, 69, 150, 81, 64, 167, 111, 206, 210, 67, 118, 215, 38, 195, 200, 218, 151, 6, 69, 254, 162, 165, 237, 57, 144, 240, 7, 31, 76, 124, 15, 8, 144, 62, 94, 86, 55, 88, 125, 248, 3, 48, 61, 80, 21, 108, 218, 207, 59, 150, 57, 99, 132, 216, 36, 57, 155, 97, 216, 106, 208, 230, 30, 218, 158, 26, 130, 208, 31, 215, 251, 37, 81, 172, 140, 129, 199, 90, 91, 120, 111, 141, 4, 214, 49, 45, 10, 123, 80, 15, 98, 192, 138, 93, 23, 102, 185, 120, 75, 73, 35, 245, 155, 187, 122, 128, 98, 75, 184, 79, 47, 28, 149, 141, 133, 135, 198, 106, 152, 69, 179, 90, 149, 33, 200, 78, 96, 102, 70, 186, 218, 248, 49, 62, 12, 57, 53, 1, 153, 206, 35, 209, 64, 114, 106, 14, 146, 146, 103, 243, 62, 188, 254, 220, 223, 196, 181, 175, 54, 194, 16, 34, 195, 10, 116, 105, 117, 186, 215, 53, 128, 131, 101, 251, 0, 105, 190, 140, 216, 151, 60, 164, 163, 187, 175, 210, 196, 249, 33, 95, 19, 205, 164, 189, 208, 127, 41, 44, 216, 229, 216, 64, 56, 62, 152, 0, 136, 128, 59, 138, 227, 185, 126, 27, 28, 60, 192, 233, 154, 218, 10, 21, 46, 72, 59, 89, 102, 216, 169, 231, 120, 202, 158, 58, 84, 155, 164, 94, 102, 8, 26, 140, 73, 113, 202, 154, 69, 58, 80, 197, 4, 229, 46, 66, 84, 29, 78, 23, 209, 200, 79, 155, 39, 252, 31, 88, 83, 15, 6, 35, 206, 215, 82, 237, 194, 196, 57, 181, 74, 126, 217, 85, 136, 145, 164, 173, 135, 213, 222, 212, 30, 211, 235, 105, 20, 248, 176, 34, 29, 249, 49, 102, 11, 104, 210, 19, 55, 118, 97, 247, 188, 65, 40, 73, 95, 135, 238, 73, 90, 143, 156, 156, 227, 4, 199, 14, 125, 30, 78, 80, 254, 155, 20, 185, 241, 4, 57, 9, 120, 199, 45, 95, 170, 248, 25, 82, 213, 171, 51, 169, 2, 12, 38, 88, 59, 128, 50, 97, 198, 119, 209, 27, 190, 254, 196, 91, 176, 122, 131, 210, 3, 47, 215, 111, 23, 218, 23, 148, 162, 39, 248, 55, 218, 133, 92, 6, 205, 55, 4, 111, 187, 128, 172, 197, 111, 109, 126, 170, 205, 40, 141, 30, 23, 90, 15, 222, 240, 168, 121, 29, 216, 34, 245, 184, 21, 41, 4, 116, 228, 69, 217, 245, 151, 23, 218, 203, 69, 62, 161, 79, 169, 155, 86, 250, 150, 59, 171, 185, 34, 15, 51, 22, 113, 99, 22, 182, 203, 192, 148, 46, 66, 86, 231, 55, 77, 44, 226, 173, 193, 67, 10, 96, 18, 142, 133, 2, 7, 98, 131, 222, 200, 119, 52, 247, 182, 50, 42, 115, 148, 187, 107, 75, 137, 236, 137, 143, 146, 107, 148, 12, 244, 80, 99, 229, 28, 233, 165, 48, 224, 119, 137, 67, 249, 31, 172, 255, 92, 199, 99, 16, 130, 145, 49, 152, 168, 142, 114, 184, 100, 235, 33, 25, 243, 102, 170, 29, 51, 98, 80, 253, 222, 199, 57, 74, 90, 11, 24, 75, 47, 194, 118, 167, 91, 153, 12, 36, 128, 132, 241, 171, 240, 64, 250, 223, 140, 67, 201, 241, 211, 42, 189, 221, 127, 201, 177, 35, 222, 2, 125, 245, 73, 228, 144, 145, 19, 174, 105, 70, 24, 27, 44, 147, 170, 72, 22, 221, 232, 26, 113, 148, 71, 14, 78, 31, 234, 158, 83, 40, 38, 6, 39, 86, 50, 41, 247, 106, 51, 229, 205, 76, 137, 131, 27, 50, 225, 15, 240, 80, 73, 157, 237, 200, 47, 35, 120, 51, 17, 219, 153, 79, 8, 11, 108, 244, 85, 255, 214, 109, 146, 175, 44, 36, 29, 206, 58, 76, 94, 78, 6, 114, 7, 102, 42, 84, 165, 99, 199, 156, 248, 177, 192, 87, 52, 193, 197, 44, 100, 235, 175, 35, 250, 65, 47, 14, 230, 229, 153, 74, 132, 219, 87, 226, 6, 232, 172, 5, 83, 190, 144, 134, 195, 98, 46, 207, 2, 240, 146, 69, 200, 236, 109, 1, 137, 138, 231, 51, 196, 87, 36, 196, 166, 102, 53, 164, 17, 221, 234, 224, 245, 80, 243, 87, 90, 189, 152, 107, 252, 91, 165, 106, 235, 44, 253, 180, 120, 39, 13, 231, 91, 175, 235, 174, 213, 169, 42, 151, 141, 71, 124, 208, 22, 144, 61, 86, 140, 76, 68, 222, 252, 252, 243, 19, 160, 142, 237, 12, 227, 19, 155, 149, 174, 14, 213, 37, 111, 225, 52, 120, 61, 245, 129, 64, 55, 224, 70, 221, 150, 196, 102, 55, 86, 32, 61, 34, 64, 177, 118, 201, 138, 172, 33, 195, 30, 220, 157, 84, 139, 255, 4, 252, 126, 158, 157, 30, 167, 134, 50, 246, 20, 239, 28, 122, 115, 187, 12, 121, 182, 68, 252, 127, 11, 67, 200, 211, 95, 81, 252, 239, 185, 226, 170, 254, 208, 12, 157, 157, 235, 83, 227, 133, 212, 170, 154, 71, 130, 153, 100, 197, 130, 241, 151, 187, 9, 248, 156, 190, 189, 103, 70, 250, 196, 187, 159, 93, 102, 228, 77, 208, 104, 4, 18, 129, 139, 53, 170, 9, 136, 102, 249, 130, 71, 132, 105, 195, 143, 162, 167, 93, 83, 71, 64, 29, 4, 120, 37, 11, 129, 118, 100, 250, 243, 249, 165, 248, 211, 224, 5, 66, 159, 218, 130, 205, 248, 80, 69, 97, 65, 255, 142, 131, 44, 71, 175, 6, 213, 175, 46, 202, 129, 47, 26, 34, 58, 220, 74, 175, 63, 12, 191, 88, 251, 92, 50, 176, 138, 202, 100, 47, 78, 234, 152, 216, 180, 91, 186, 3, 104, 198, 6, 224, 99, 71, 80, 68, 227, 148, 137, 117, 102, 231, 219, 204, 28, 227, 187, 18, 98, 241, 60, 168, 190, 151, 26, 187, 79, 193, 158, 171, 88, 139, 226, 154, 55, 148, 75, 201, 88, 232, 183, 246, 98, 13, 221, 62, 114, 102, 186, 143, 144, 126, 167, 162, 64, 135, 154, 2, 242, 115, 0, 86, 19, 153, 237, 114, 185, 78, 226, 36, 220, 107, 8, 178, 208, 108, 77, 31, 154, 7, 115, 97, 211, 21, 2, 12, 97, 203, 156, 138, 7, 89, 161, 249, 103, 19, 144, 177, 65, 131, 76, 97, 247, 159, 251, 138, 107, 85, 2, 161, 116, 69, 111, 23, 22, 135, 165, 59, 8, 121, 227, 236, 153, 63, 30, 141, 227, 59, 24, 69, 118, 25, 233, 107, 154, 133, 236, 165, 105, 31, 22, 49, 255, 20, 82, 148, 124, 110, 26, 170, 207, 228, 75, 99, 66, 225, 23, 133, 221, 170, 226, 34, 176, 159, 148, 244, 183, 104, 77, 220, 133, 26, 49, 59, 229, 189, 37, 197, 194, 85, 22, 182, 22, 167, 211, 177, 6, 225, 190, 176, 16, 162, 86, 184, 27, 236, 226, 0, 65, 83, 47, 42, 184, 133, 222, 117, 39, 15, 177, 46, 239, 61, 21, 103, 128, 244, 91, 150, 61, 63, 199, 65, 163, 185, 120, 122, 165, 246, 160, 126, 207, 135, 82, 60, 0, 109, 7, 192, 79, 169, 88, 1, 195, 169, 107, 244, 12, 56, 233, 21, 197, 1, 122, 227, 250, 134, 226, 9, 175, 180, 171, 107, 195, 172, 73, 194, 218, 192, 62, 255, 189, 215, 17, 245, 180, 79, 159, 166, 56, 90, 229, 189, 132, 200, 62, 122, 221, 190, 54, 63, 209, 72, 3, 236, 228, 228, 80, 176, 61, 15, 212, 20, 152, 232, 77, 171, 238, 181, 77, 196, 64, 94, 118, 76, 35, 92, 132, 200, 232, 86, 215, 179, 105, 229, 8, 233, 226, 239, 221, 102, 13, 99, 249, 190, 69, 61, 207, 175, 143, 253, 115, 14, 184, 198, 154, 20, 13, 214, 144, 220, 159, 228, 88, 41, 112, 117, 197, 172, 102, 197, 190, 169, 13, 23, 223, 14, 164, 81, 192, 234, 46, 151, 18, 234, 45, 226, 72, 147, 218, 11, 56, 207, 51, 220, 158, 32, 171, 63, 53, 229, 15, 1, 230, 104, 228, 234, 127, 80, 4, 98, 214, 212, 250, 168, 115, 236, 249, 241, 253, 21, 90, 157, 176, 116, 239, 191, 205, 112, 105, 69, 188, 111, 244, 112, 50, 177, 69, 12, 79, 42, 254, 171, 32, 168, 88, 38, 237, 88, 183, 189, 107, 105, 56, 135, 220, 141, 135, 222, 71, 165, 242, 38, 50, 0, 130, 40, 227, 73, 134, 254, 18, 74, 32, 94, 150, 183, 166, 70, 149, 89, 42, 68, 153, 72, 155, 23, 189, 87, 53, 224, 110, 253, 101, 183, 10, 168, 100, 20, 235, 162, 103, 225, 126, 116, 68, 105, 45, 190, 78, 189, 128, 174, 225, 214, 255, 223, 100, 153, 151, 189, 135, 163, 78, 237, 218, 22, 70, 54, 222, 199, 250, 52, 62, 219, 118, 176, 216, 220, 97, 226, 20, 174, 220, 12, 188, 52, 60, 120, 147, 139, 61, 2, 17, 72, 101, 119, 138, 105, 204, 42, 49, 137, 164, 4, 140, 251, 138, 138, 163, 94, 15, 224, 129, 86, 38, 21, 135, 43, 79, 80, 21, 210, 154, 232, 47, 152, 162, 237, 0, 57, 167, 6, 30, 120, 110, 203, 96, 193, 226, 104, 122, 21, 30, 241, 218, 91, 246, 40, 115, 102, 138, 70, 0, 32, 11, 231, 227, 58, 5, 203, 116, 6, 81, 9, 156, 9, 48, 17, 220, 119, 76, 125, 22, 234, 44, 65, 68, 127, 47, 43, 137, 116, 191, 139, 150, 35, 155, 157, 12, 207, 37, 50, 223, 22, 75, 149, 132, 114, 186, 232, 90, 144, 55, 222, 58, 31, 155, 176, 233, 105, 206, 7, 234, 31, 245, 229, 46, 77, 234, 77, 243, 172, 90, 127, 89, 119, 197, 151, 251, 236, 147, 248, 153, 195, 240, 102, 248, 68, 224, 212, 130, 235, 110, 22, 190, 103, 140, 236, 69, 125, 236, 29, 168, 205, 199, 176, 102, 171, 121, 217, 57, 83, 236, 112, 46, 158, 9, 172, 203, 3, 231, 179, 102, 63, 69, 166, 252, 201, 135, 207, 62, 117, 58, 23, 88, 118, 191, 58, 249, 31, 196, 235, 223, 7, 187, 20, 27, 180, 208, 113, 164, 134, 80, 224, 107, 198, 160, 121, 231, 156, 12, 240, 115, 83, 168, 5, 244, 40, 82, 237, 3, 12, 180, 53, 134, 212, 75, 151, 104, 239, 110, 137, 204, 211, 9, 59, 83, 120, 30, 219, 124, 155, 134, 20, 125, 98, 125, 47, 207, 52, 212, 249, 72, 28, 17, 169, 255, 219, 2, 226, 183, 126, 38, 81, 205, 139, 170, 126, 75, 84, 64, 122, 177, 164, 96, 99, 122, 34, 47, 149, 159, 36, 77, 96, 209, 64, 127, 252, 223, 149, 74, 234, 76, 204, 111, 241, 166, 128, 202, 47, 180, 12, 87, 99, 249, 49, 232, 241, 240, 164, 88, 98, 194, 114, 31, 47, 70, 137, 19, 39, 82, 219, 82, 50, 120, 52, 56, 24, 66, 9, 107, 67, 3, 118, 206, 129, 84, 137, 97, 69, 93, 187, 16, 128, 57, 90, 185, 141, 18, 216, 214, 172, 18, 11, 66, 112, 249, 154, 171, 160, 194, 117, 89, 193, 58, 133, 102, 104, 77, 94, 143, 188, 229, 110, 16, 18, 28, 208, 163, 171, 115, 205, 32, 80, 148, 190, 29, 35, 105, 205, 103, 37, 246, 24, 188, 206, 245, 190, 218, 115, 234, 59, 106, 236, 183, 170, 123, 3, 163, 2, 98, 158, 135, 65, 81, 221, 178, 246, 62, 133, 95, 70, 134, 114, 223, 107, 157, 203, 28, 230, 229, 166, 125, 206, 29, 108, 138, 151, 110, 225, 159, 115, 177, 135, 159, 105, 214, 209, 88, 183, 228, 92, 9, 79, 74, 77, 186, 222, 221, 214, 216, 66, 236, 213, 186, 141, 36, 42, 118, 202, 115, 154, 139, 116, 140, 200, 136, 179, 54, 218, 94, 6, 178, 157, 9, 172, 212, 142, 163, 230, 221, 162, 130, 139, 68, 193, 208, 61, 192, 45, 221, 190, 79, 4, 53, 146, 242, 244, 167, 158, 23, 124, 191, 1, 198, 0, 18, 200, 245, 155, 237, 33, 97, 41, 89, 237, 103, 127, 23, 212, 12, 132, 5, 172, 132, 238, 193, 104, 33, 96, 76, 125, 48, 138, 156, 192, 231, 200, 7, 90, 82, 98, 169, 50, 123, 137, 183, 191, 255, 254, 136, 227, 253, 90, 168, 46, 189, 159, 91, 27, 114, 250, 62, 94, 233, 62, 221, 157, 202, 4, 110, 103, 37, 59, 75, 138, 83, 58, 46, 127, 119, 186, 187, 151, 126, 165, 240, 167, 163, 133, 189, 245, 141, 102, 163, 215, 122, 51, 78, 129, 103, 90, 107, 22, 8, 119, 226, 39, 95, 79, 186, 66, 85, 140, 113, 225, 249, 151, 197, 40, 173, 185, 227, 48, 77, 80, 182, 45, 101, 117, 185, 173, 136, 73, 102, 171, 143, 25, 102, 120, 36, 81, 14, 153, 104, 103, 220, 22, 122, 9, 2, 246, 116, 139, 117, 194, 42, 41, 21, 136, 56, 102, 95, 222, 63, 202, 64, 131, 151, 100, 132, 26, 92, 202, 70, 241, 140, 140, 223, 94, 139, 233, 26, 33, 34, 196, 252, 170, 84, 208, 17, 116, 85, 213, 199, 125, 167, 188, 142, 92, 158, 242, 20, 150, 105, 49, 91, 240, 199, 89, 73, 8, 224, 74, 179, 100, 65, 36, 133, 184, 125, 151, 213, 30, 33, 186, 240, 188, 179, 227, 190, 29, 247, 106, 138, 144, 24, 209, 71, 209, 25, 99, 177, 19, 125, 230, 22, 62, 198, 130, 252, 67, 225, 225, 158, 21, 134, 221, 41, 126, 213, 115, 56, 220, 101, 201, 24, 17, 219, 196, 217, 193, 188, 182, 49, 33, 190, 104, 170, 73, 179, 177, 250, 157, 234, 98, 254, 132, 84, 82, 247, 96, 203, 219, 89, 249, 158, 46, 221, 221, 27, 216, 106, 18, 118, 184, 115, 168, 108, 33, 228, 159, 64, 145, 188, 246, 243, 231, 50, 60, 110, 53, 149, 71, 40, 254, 182, 232, 131, 28, 99, 229, 49, 171, 116, 93, 239, 135, 48, 131, 89, 63, 177, 78, 49, 39, 68, 140, 163, 195, 113, 197, 132, 38, 180, 150, 142, 20, 94, 178, 92, 40, 141, 42, 156, 121, 37, 13, 36, 94, 143, 17, 254, 55, 199, 118, 232, 199, 107, 21, 125, 47, 205, 191, 75, 223, 87, 60, 20, 17, 123, 198, 250, 118, 253, 5, 87, 161, 148, 210, 102, 200, 214, 106, 176, 163, 9, 3, 166, 16, 170, 164, 161, 233, 224, 49, 231, 95, 207, 230, 180, 91, 41, 2, 239, 176, 23, 33, 72, 73, 37, 213, 15, 226, 56, 149, 3, 245, 80, 46, 84, 227, 211, 17, 122, 196, 60, 162, 58, 67, 44, 93, 79, 140, 230, 75, 249, 21, 54, 50, 88, 125, 95, 24, 144, 169, 72, 128, 112, 185, 45, 43, 167, 217, 118, 177, 93, 27, 92, 109, 127, 17, 96, 216, 163, 225, 155, 204, 191, 32, 162, 52, 204, 88, 59, 88, 216, 97, 135, 12, 17, 129, 163, 148, 132, 121, 95, 109, 114, 119, 111, 165, 244, 236, 193, 106, 249, 18, 114, 194, 244, 168, 183, 40, 30, 194, 219, 133, 187, 50, 40, 239, 208, 47, 245, 137, 161, 155, 246, 205, 211, 62, 35, 164, 196, 196, 41, 223, 164, 11, 249, 0, 194, 163, 12, 129, 162, 242, 6, 57, 95, 220, 178, 34, 170, 209, 48, 62, 142, 107, 137, 98, 234, 36, 149, 87, 224, 65, 172, 15, 178, 44, 85, 174, 65, 254, 255, 92, 152, 62, 94, 89, 145, 159, 198, 65, 205, 23, 59, 230, 203, 133, 171, 3, 11, 61, 122, 131, 196, 54, 181, 134, 100, 223, 31, 106, 164, 200, 78, 115, 85, 175, 161, 106, 38, 105, 112, 49, 51, 74, 6, 79, 236, 142, 43, 164, 66, 181, 87, 160, 1, 193, 138, 83, 70, 89, 198, 20, 138, 74, 141, 61, 121, 10, 118, 27, 81, 22, 117, 7, 172, 195, 227, 76, 181, 63, 189, 95, 37, 160, 216, 13, 70, 20, 229, 108, 142, 81, 206, 108, 218, 2, 139, 17, 133, 65, 211, 155, 219, 24, 246, 72, 174, 221, 153, 131, 136, 30, 146, 106, 94, 230, 33, 8, 192, 207, 75, 51, 200, 170, 138, 54, 11, 7, 127, 164, 39, 85, 171, 52, 104, 219, 254, 201, 24, 191, 1, 33, 129, 76, 142, 28, 150, 121, 31, 22, 8, 5, 202, 220, 128, 202, 132, 221, 29, 46, 138, 16, 33, 205, 132, 231, 134, 162, 47, 164, 102, 252, 97, 117, 18, 186, 244, 230, 23, 55, 184, 65, 63, 173, 140, 204, 187, 99, 37, 80, 83, 217, 114, 65, 180, 95, 241, 90, 246, 123, 19, 114, 124, 248, 13, 234, 5, 210, 167, 81, 97, 37, 152, 75, 18, 82, 179, 247, 136, 134, 37, 65, 197, 58, 248, 251, 130, 179, 17, 148, 88, 97, 232, 61, 100, 14, 207, 187, 81, 61, 175, 76, 241, 237, 205, 41, 4, 61, 51, 228, 231, 173, 93, 45, 177, 189, 26, 183, 194, 1, 22, 151, 240, 164, 109, 204, 97, 32, 105, 89, 94, 188, 171, 26, 141, 97, 145, 78, 53, 105, 95, 179, 190, 80, 241, 203, 54, 42, 4, 7, 223, 5, 195, 188, 116, 95, 223, 119, 152, 110, 221, 136, 41, 224, 127, 178, 128, 40, 151, 93, 211, 118, 199, 33, 176, 149, 201, 65, 221, 237, 190, 66, 144, 138, 100, 17, 104, 54, 70, 13, 45, 223, 224, 126, 252, 100, 222, 210, 186, 127, 37, 51, 209, 195, 68, 125, 184, 219, 80, 30, 223, 163, 55, 70, 5, 218, 164, 70, 84, 33, 129, 215, 146, 253, 174, 92, 23, 28, 122, 153, 228, 171, 138, 207, 163, 187, 221, 33, 178, 139, 176, 128, 209, 121, 155, 55, 87, 17, 150, 8, 8, 221, 163, 189, 141, 111, 7, 203, 190, 0, 195, 53, 66, 160, 23, 145, 156, 229, 158, 140, 75, 174, 70, 190, 253, 121, 181, 72, 17, 97, 35, 82, 159, 21, 238, 4, 58, 115, 255, 2, 10, 25, 240, 237, 110, 251, 223, 207, 242, 36, 60, 64, 219, 61, 227, 4, 79, 21, 62, 184, 221, 251, 33, 171, 122, 20, 91, 175, 137, 178, 81, 67, 46, 148, 154, 252, 120, 79, 3, 234, 104, 69, 89, 141, 77, 161, 242, 36, 100, 33, 13, 134, 205, 241, 154, 34, 61, 0, 12, 254, 49, 250, 27, 124, 233, 137, 161, 141, 111, 133, 51, 123, 196, 255, 64, 139, 249, 228, 23, 124, 52, 10, 64, 98, 129, 207, 157, 246, 127, 179, 51, 233, 152, 187, 245, 185, 176, 16, 244, 229, 34, 85, 220, 221, 90, 244, 30, 193, 44, 137, 167, 187, 126, 43, 218, 39, 216, 113, 221, 38, 5, 64, 254, 145, 21, 84, 234, 48, 108, 114, 99, 45, 40, 45, 70, 144, 34, 164, 179, 25, 143, 28, 17, 141, 223, 248, 21, 187, 231, 191, 46, 47, 104, 2, 72, 45, 216, 139, 38, 63, 125, 20, 164, 19, 222, 102, 250, 140, 21, 130, 14, 70, 157, 55, 158, 172, 143, 163, 207, 37, 233, 49, 27, 189, 132, 140, 115, 140, 50, 93, 42, 189, 184, 76, 35, 233, 228, 147, 245, 12, 165, 66, 55, 110, 57, 16, 155, 198, 223, 24, 115, 99, 77, 220, 180, 44, 191, 69, 127, 168, 88, 38, 155, 56, 53, 29, 202, 164, 154, 24, 220, 61, 129, 154, 41, 208, 134, 50, 71, 10, 129, 115, 123, 210, 201, 79, 95, 13, 255, 10, 151, 55, 145, 87, 174, 128, 184, 245, 174, 189, 120, 111, 154, 90, 67, 1, 95, 69, 160, 141, 97, 211, 46, 225, 214, 207, 0, 142, 4, 59, 152, 213, 124, 105, 81, 102, 55, 25, 0, 68, 201, 247, 246, 1, 65, 15, 136, 181, 151, 184, 231, 47, 149, 56, 224, 152, 111, 215, 227, 43, 188, 45, 84, 238, 244, 24, 235, 161, 45, 222, 156, 187, 242, 113, 82, 84, 31, 201, 103, 197, 3, 185, 64, 122, 147, 41, 220, 1, 216, 247, 195, 164, 182, 253, 3, 34, 223, 174, 192, 207, 231, 67, 206, 58, 171, 136, 172, 46, 173, 245, 29, 125, 80, 180, 115, 234, 23, 224, 15, 71, 6, 26, 147, 152, 227, 140, 113, 225, 216, 205, 194, 144, 151, 25, 42, 62, 105, 167, 130, 222, 139, 74, 145, 168, 13, 99, 238, 168, 110, 76, 197, 78, 153, 183, 237, 84, 4, 120, 129, 56, 226, 52, 172, 167, 238, 140, 38, 178, 234, 155, 158, 65, 34, 164, 250, 146, 252, 137, 64, 120, 186, 226, 234, 145, 116, 96, 41, 246, 2, 111, 20, 131, 149, 160, 208, 24, 32, 253, 50, 131, 222, 200, 199, 89, 15, 248, 217, 48, 129, 52, 115, 185, 27, 72, 10, 58, 44, 87, 108, 224, 195, 97, 41, 183, 87, 162, 199, 101, 247, 69, 10, 200, 220, 254, 237, 206, 114, 223, 183, 117, 85, 164, 125, 80, 223, 75, 14, 143, 133, 225, 235, 192, 39, 206, 26, 203, 106, 72, 158, 221, 28, 149, 15, 9, 23, 186, 54, 164, 16, 220, 219, 231, 193, 67, 154, 31, 13, 46, 255, 82, 227, 170, 32, 254, 96, 45, 76, 193, 54, 155, 231, 18, 76, 159, 191, 74, 228, 161, 73, 89, 22, 112, 34, 138, 83, 7, 209, 172, 220, 176, 242, 106, 65, 187, 183, 78, 198, 62, 219, 198, 72, 147, 41, 244, 164, 73, 231, 131, 137, 113, 159, 224, 201, 168, 149, 147, 145, 106, 102, 122, 1, 47, 88, 145, 213, 203, 234, 236, 45, 241, 224, 90, 196, 141, 4, 44, 142, 0, 253, 106, 155, 215, 221, 76, 31, 157, 127, 204], + [158, 105, 89, 111, 162, 130, 98, 14, 242, 245, 233, 74, 209, 78, 121, 63, 30, 231, 50, 206, 109, 11, 209, 179, 6, 68, 35, 80, 168, 207, 143, 56, 97, 221, 113, 123, 182, 250, 212, 111, 232, 155, 170, 235, 7, 164, 190, 58, 22, 37, 187, 87, 153, 171, 40, 46, 110, 200, 48, 149, 75, 25, 104, 9, 116, 147, 79, 125, 124, 105, 194, 132, 227, 30, 11, 184, 252, 150, 242, 4, 117, 180, 37, 212, 112, 3, 85, 121, 33, 91, 119, 53, 114, 75, 125, 34, 254, 213, 222, 138, 150, 161, 68, 56, 52, 122, 72, 217, 42, 125, 17, 244, 151, 73, 123, 118, 183, 9, 63, 17, 145, 179, 172, 0, 254, 7, 48, 103, 123, 248, 48, 243, 44, 244, 245, 43, 15, 121, 205, 162, 7, 247, 217, 32, 12, 99, 110, 131, 195, 11, 69, 181, 63, 18, 66, 27, 9, 156, 12, 242, 93, 119, 51, 64, 79, 152, 89, 45, 248, 26, 122, 184, 206, 26, 65, 231, 71, 167, 110, 77, 88, 69, 77, 107, 218, 72, 9, 169, 7, 71, 70, 183, 44, 155, 152, 132, 195, 233, 241, 79, 30, 133, 114, 142, 82, 76, 7, 3, 16, 7, 55, 106, 49, 226, 44, 234, 186, 250, 113, 123, 195, 181, 232, 62, 126, 50, 143, 139, 161, 26, 92, 73, 27, 115, 153, 184, 178, 199, 30, 83, 160, 30, 234, 203, 3, 99, 216, 164, 136, 153, 35, 228, 158, 25, 94, 152, 8, 13, 56, 139, 234, 81, 252, 55, 41, 56, 142, 12, 162, 179, 28, 174, 77, 121, 225, 152, 240, 45, 29, 174, 99, 31, 102, 109, 20, 219, 150, 48, 89, 150, 210, 112, 129, 221, 5, 12, 38, 18, 183, 86, 99, 92, 72, 208, 207, 233, 90, 199, 230, 235, 0, 241, 92, 125, 190, 238, 165, 58, 61, 147, 138, 161, 137, 156, 10, 202, 72, 218, 70, 169, 63, 150, 58, 143, 158, 222, 247, 118, 171, 179, 223, 191, 146, 41, 96, 204, 21, 96, 175, 39, 61, 11, 129, 255, 32, 209, 99, 201, 51, 156, 54, 221, 67, 188, 20, 207, 109, 73, 219, 135, 195, 108, 19, 6, 23, 87, 176, 106, 248, 201, 106, 76, 135, 75, 212, 121, 5, 74, 212, 155, 176, 111, 166, 113, 153, 235, 70, 47, 159, 202, 180, 141, 15, 47, 105, 31, 242, 204, 89, 194, 134, 25, 239, 38, 125, 244, 36, 240, 32, 108, 141, 73, 174, 28, 19, 251, 159, 143, 177, 68, 147, 124, 222, 53, 6, 244, 234, 69, 248, 72, 191, 4, 178, 21, 136, 186, 102, 104, 150, 217, 26, 252, 89, 91, 119, 242, 19, 58, 220, 195, 40, 81, 99, 73, 159, 240, 59, 138, 159, 116, 143, 176, 151, 222, 194, 13, 37, 75, 252, 82, 200, 126, 115, 159, 142, 56, 7, 246, 166, 207, 102, 59, 95, 47, 51, 109, 92, 37, 28, 90, 38, 126, 163, 85, 220, 37, 69, 54, 183, 115, 244, 189, 219, 239, 165, 212, 107, 214, 30, 120, 92, 176, 50, 44, 129, 208, 238, 108, 25, 65, 129, 227, 65, 134, 40, 129, 221, 78, 57, 73, 89, 184, 79, 218, 121, 68, 3, 156, 114, 218, 49, 184, 169, 148, 244, 48, 150, 40, 89, 91, 246, 11, 163, 200, 138, 160, 202, 8, 231, 4, 64, 238, 192, 0, 246, 248, 215, 90, 163, 119, 153, 26, 121, 96, 33, 144, 0, 83, 21, 170, 36, 252, 154, 154, 177, 94, 2, 166, 235, 155, 57, 123, 160, 109, 202, 109, 42, 71, 241, 253, 0, 182, 133, 41, 48, 233, 203, 64, 66, 88, 20, 44, 71, 245, 213, 35, 255, 240, 89, 129, 92, 145, 126, 15, 5, 133, 136, 123, 192, 121, 92, 63, 13, 24, 189, 80, 158, 112, 56, 76, 44, 224, 116, 237, 127, 60, 72, 177, 186, 156, 41, 225, 228, 138, 214, 42, 216, 50, 77, 151, 214, 16, 127, 173, 49, 184, 194, 235, 81, 180, 133, 192, 53, 215, 172, 190, 126, 101, 31, 150, 156, 0, 134, 85, 213, 113, 85, 205, 212, 197, 26, 37, 101, 38, 165, 255, 236, 112, 231, 150, 243, 175, 42, 26, 113, 243, 101, 97, 184, 203, 136, 121, 247, 77, 51, 105, 81, 147, 52, 224, 151, 167, 62, 65, 103, 45, 169, 167, 217, 223, 186, 255, 32, 238, 61, 68, 7, 120, 41, 144, 154, 150, 18, 171, 84, 64, 161, 179, 35, 180, 20, 236, 44, 147, 103, 8, 221, 164, 189, 30, 150, 148, 179, 65, 100, 165, 204, 23, 157, 68, 173, 183, 7, 73, 89, 186, 233, 103, 251, 176, 128, 138, 217, 234, 10, 46, 60, 55, 99, 29, 129, 91, 37, 67, 222, 80, 105, 228, 47, 76, 219, 110, 14, 206, 51, 94, 178, 193, 4, 162, 3, 126, 186, 17, 90, 24, 19, 7, 68, 223, 111, 221, 226, 25, 246, 4, 241, 193, 98, 39, 55, 60, 57, 63, 150, 212, 209, 6, 229, 25, 79, 67, 56, 29, 65, 179, 90, 201, 155, 248, 104, 96, 242, 40, 234, 129, 186, 183, 40, 209, 167, 194, 231, 141, 235, 116, 249, 88, 161, 168, 201, 231, 111, 72, 99, 144, 105, 135, 73, 161, 139, 26, 114, 33, 92, 86, 17, 222, 162, 143, 246, 54, 92, 61, 198, 179, 199, 31, 45, 217, 188, 106, 67, 2, 241, 93, 172, 101, 207, 105, 110, 134, 60, 136, 154, 215, 102, 133, 65, 14, 151, 191, 176, 182, 106, 144, 180, 222, 76, 62, 124, 185, 219, 188, 92, 124, 178, 152, 59, 18, 155, 116, 75, 253, 69, 112, 204, 123, 204, 122, 59, 65, 149, 176, 236, 51, 131, 115, 242, 200, 13, 101, 203, 43, 239, 162, 163, 175, 210, 25, 107, 159, 140, 219, 162, 160, 136, 253, 160, 193, 27, 200, 50, 123, 200, 30, 70, 249, 76, 41, 219, 218, 186, 117, 216, 21, 101, 245, 71, 228, 101, 129, 3, 210, 210, 134, 186, 39, 145, 14, 207, 158, 198, 245, 62, 210, 161, 38, 247, 210, 199, 111, 174, 182, 233, 138, 250, 234, 22, 177, 194, 147, 151, 207, 211, 178, 154, 21, 189, 115, 24, 21, 89, 212, 144, 115, 57, 171, 154, 234, 157, 33, 127, 100, 173, 164, 95, 60, 111, 23, 81, 201, 192, 205, 171, 232, 177, 21, 151, 141, 124, 114, 125, 27, 86, 32, 135, 72, 95, 87, 58, 235, 177, 216, 178, 68, 97, 150, 95, 185, 140, 192, 248, 124, 47, 230, 52, 24, 88, 209, 209, 12, 94, 1, 204, 130, 19, 78, 192, 162, 62, 157, 239, 159, 212, 154, 119, 153, 222, 156, 118, 190, 68, 190, 210, 174, 102, 171, 185, 30, 220, 150, 220, 128, 83, 26, 233, 228, 184, 234, 64, 152, 53, 103, 64, 5, 17, 51, 239, 43, 137, 190, 9, 21, 82, 172, 209, 168, 28, 44, 188, 124, 232, 160, 116, 143, 12, 26, 130, 238, 60, 142, 46, 254, 103, 51, 82, 80, 61, 93, 91, 72, 120, 127, 49, 67, 180, 44, 229, 187, 218, 94, 225, 201, 67, 212, 151, 101, 47, 101, 183, 67, 41, 205, 239, 108, 8, 7, 224, 22, 92, 168, 188, 54, 142, 21, 19, 157, 110, 240, 24, 155, 106, 97, 251, 118, 140, 99, 5, 254, 193, 45, 216, 64, 180, 67, 199, 59, 226, 168, 179, 135, 122, 179, 146, 250, 22, 233, 210, 107, 94, 96, 3, 2, 203, 249, 239, 74, 38, 87, 239, 46, 75, 189, 38, 16, 179, 48, 23, 60, 2, 26, 233, 41, 89, 96, 139, 101, 234, 228, 194, 68, 215, 65, 154, 94, 218, 57, 60, 212, 41, 41, 47, 68, 229, 17, 110, 199, 194, 46, 55, 84, 26, 179, 225, 63, 163, 72, 240, 44, 191, 95, 28, 180, 32, 84, 152, 57, 72, 168, 1, 68, 51, 84, 136, 142, 211, 149, 83, 214, 246, 34, 137, 103, 239, 116, 64, 27, 6, 97, 85, 136, 21, 215, 48, 147, 187, 140, 147, 217, 89, 137, 143, 141, 246, 103, 181, 43, 180, 206, 240, 19, 45, 252, 41, 228, 238, 182, 3, 76, 150, 241, 228, 102, 61, 124, 108, 204, 199, 4, 151, 177, 151, 124, 155, 2, 185, 1, 219, 128, 123, 30, 240, 59, 28, 213, 253, 12, 162, 97, 246, 42, 4, 20, 96, 131, 240, 136, 155, 96, 70, 172, 149, 115, 60, 94, 183, 45, 35, 190, 107, 63, 209, 125, 45, 204, 141, 222, 144, 222, 82, 70, 0, 218, 166, 64, 178, 69, 123, 153, 109, 175, 186, 49, 242, 37, 184, 155, 43, 183, 24, 164, 152, 21, 75, 63, 75, 45, 182, 29, 72, 178, 93, 117, 231, 39, 73, 139, 77, 10, 226, 167, 116, 239, 190, 137, 184, 58, 221, 24, 101, 83, 202, 49, 128, 70, 161, 43, 150, 35, 81, 170, 172, 9, 57, 45, 76, 131, 199, 199, 28, 31, 48, 171, 242, 20, 26, 15, 190, 187, 128, 103, 194, 53, 99, 127, 187, 134, 26, 182, 217, 28, 83, 176, 253, 92, 82, 203, 51, 22, 230, 19, 68, 88, 92, 50, 53, 143, 216, 231, 192, 15, 168, 128, 14, 93, 248, 231, 29, 30, 235, 120, 77, 155, 189, 253, 97, 175, 152, 70, 177, 71, 254, 220, 18, 108, 241, 48, 90, 133, 254, 47, 61, 180, 239, 139, 91, 211, 67, 99, 255, 27, 193, 66, 119, 40, 68, 31, 215, 93, 80, 116, 54, 128, 61, 69, 203, 249, 95, 1, 115, 243, 100, 83, 118, 137, 90, 58, 54, 246, 222, 198, 228, 224, 75, 58, 103, 53, 34, 151, 205, 112, 170, 183, 49, 110, 140, 70, 201, 152, 1, 12, 72, 84, 7, 240, 223, 220, 95, 126, 131, 37, 159, 53, 17, 13, 41, 202, 191, 219, 21, 94, 88, 124, 125, 136, 17, 97, 114, 140, 40, 158, 49, 216, 143, 204, 10, 94, 231, 43, 139, 252, 165, 98, 112, 232, 9, 103, 21, 119, 26, 183, 122, 211, 1, 245, 149, 79, 143, 69, 203, 236, 24, 172, 66, 146, 106, 249, 169, 147, 30, 57, 56, 156, 116, 24, 100, 60, 222, 97, 91, 240, 202, 230, 213, 222, 8, 153, 226, 151, 67, 136, 254, 57, 52, 194, 84, 59, 124, 79, 69, 145, 90, 190, 172, 198, 158, 0, 47, 134, 67, 198, 253, 82, 69, 243, 247, 192, 17, 103, 24, 45, 169, 172, 136, 83, 109, 96, 79, 202, 221, 6, 91, 84, 135, 17, 23, 235, 200, 146, 158, 70, 139, 209, 161, 195, 50, 21, 99, 233, 56, 220, 243, 157, 72, 206, 107, 247, 160, 100, 47, 255, 100, 199, 188, 53, 249, 238, 1, 173, 199, 103, 76, 105, 87, 244, 8, 244, 46, 156, 101, 59, 240, 54, 111, 71, 23, 10, 27, 178, 40, 5, 18, 57, 250, 30, 174, 9, 177, 92, 147, 154, 244, 133, 67, 135, 183, 66, 216, 202, 146, 205, 246, 44, 78, 212, 120, 33, 57, 38, 197, 36, 205, 34, 104, 51, 107, 85, 222, 173, 193, 83, 233, 107, 201, 8, 206, 58, 112, 247, 75, 48, 46, 220, 12, 186, 215, 198, 115, 197, 166, 80, 210, 183, 60, 94, 10, 121, 83, 173, 176, 192, 146, 23, 33, 144, 136, 79, 34, 107, 230, 75, 119, 208, 93, 82, 227, 255, 64, 181, 108, 246, 167, 211, 34, 176, 171, 171, 147, 31, 135, 218, 96, 224, 137, 172, 178, 71, 180, 197, 90, 227, 170, 123, 146, 174, 235, 225, 47, 227, 38, 245, 25, 86, 55, 14, 169, 104, 222, 255, 38, 229, 6, 205, 169, 111, 103, 68, 31, 103, 5, 143, 43, 169, 208, 195, 31, 62, 98, 21, 25, 225, 23, 168, 9, 234, 30, 194, 105, 245, 119, 222, 39, 161, 17, 1, 96, 139, 159, 117, 250, 137, 240, 225, 94, 211, 85, 36, 196, 177, 97, 3, 72, 185, 235, 40, 156, 24, 114, 208, 245, 201, 29, 126, 208, 211, 128, 25, 235, 68, 128, 118, 137, 254, 117, 119, 188, 31, 200, 251, 250, 211, 172, 110, 231, 185, 194, 70, 34, 110, 91, 212, 108, 170, 106, 159, 178, 195, 98, 198, 238, 9, 243, 86, 221, 3, 31, 83, 163, 9, 37, 198, 143, 66, 235, 174, 229, 10, 219, 227, 218, 0, 100, 224, 197, 113, 105, 116, 238, 114, 98, 171, 200, 151, 162, 1, 49, 10, 45, 106, 15, 183, 64, 101, 0, 213, 225, 63, 77, 121, 67, 54, 75, 222, 217, 137, 193, 231, 70, 238, 67, 60, 116, 134, 200, 93, 18, 252, 149, 8, 147, 110, 237, 23, 21, 197, 214, 254, 13, 196, 215, 222, 217, 167, 157, 252, 123, 33, 197, 205, 16, 23, 62, 77, 212, 234, 169, 54, 211, 59, 32, 32, 227, 77, 127, 235, 217, 72, 98, 175, 72, 88, 235, 249, 63, 135, 202, 89, 94, 32, 0, 66, 202, 39, 11, 119, 164, 251, 65, 165, 65, 115, 124, 198, 105, 7, 240, 15, 88, 47, 84, 62, 124, 11, 76, 113, 25, 176, 103, 38, 17, 242, 143, 196, 216, 133, 174, 173, 117, 32, 109, 126, 71, 130, 69, 202, 133, 61, 154, 167, 239, 219, 17, 23, 176, 43, 13, 53, 95, 251, 61, 80, 175, 57, 143, 234, 64, 65, 208, 101, 154, 102, 254, 147, 235, 84, 140, 123, 35, 238, 160, 43, 78, 96, 172, 80, 123, 201, 61, 114, 13, 164, 38, 153, 181, 252, 110, 158, 44, 192, 255, 66, 43, 177, 197, 108, 9, 155, 39, 146, 250, 2, 123, 78, 70, 193, 32, 69, 234, 144, 137, 59, 122, 60, 59, 3, 67, 158, 186, 28, 60, 71, 41, 32, 215, 225, 182, 254, 239, 237, 188, 139, 11, 167, 63, 50, 144, 115, 135, 191, 211, 206, 28, 46, 250, 149, 29, 176, 189, 152, 54, 47, 96, 253, 95, 130, 100, 199, 143, 109, 195, 36, 183, 237, 118, 71, 141, 127, 104, 46, 90, 147, 109, 146, 240, 233, 70, 249, 162, 45, 83, 91, 229, 162, 60, 189, 181, 137, 29, 229, 202, 200, 193, 9, 116, 137, 140, 195, 180, 170, 77, 10, 107, 190, 190, 119, 75, 192, 51, 109, 53, 163, 235, 26, 195, 194, 176, 219, 177, 249, 208, 160, 199, 1, 197, 131, 75, 246, 12, 55, 102, 225, 137, 131, 255, 90, 30, 167, 123, 103, 224, 80, 215, 100, 130, 160, 162, 207, 182, 75, 113, 34, 62, 181, 17, 172, 201, 61, 49, 228, 29, 25, 105, 158, 61, 130, 206, 42, 160, 146, 38, 234, 234, 201, 246, 85, 67, 182, 133, 38, 79, 103, 212, 88, 159, 1, 7, 114, 246, 213, 252, 167, 77, 52, 103, 196, 109, 235, 82, 159, 216, 32, 45, 142, 47, 6, 53, 50, 117, 0, 113, 156, 144, 74, 200, 25, 216, 53, 54, 103, 217, 129, 131, 129, 115, 247, 5, 144, 165, 168, 13, 161, 238, 101, 221, 230, 251, 208, 175, 121, 154, 52, 48, 45, 106, 136, 44, 179, 52, 19, 212, 253, 82, 97, 207, 70, 67, 145, 200, 56, 237, 133, 125, 146, 174, 213, 30, 72, 170, 240, 7, 157, 196, 74, 222, 5, 224, 65, 14, 141, 146, 129, 70, 165, 78, 29, 50, 104, 235, 104, 49, 80, 99, 146, 104, 86, 242, 67, 57, 30, 162, 26, 17, 91, 13, 241, 94, 171, 53, 246, 113, 93, 227, 11, 146, 65, 29, 46, 60, 66, 6, 65, 9, 107, 103, 30, 60, 148, 104, 74, 198, 34, 234, 28, 180, 211, 190, 128, 149, 204, 184, 203, 234, 38, 118, 169, 136, 206, 252, 241, 85, 208, 212, 36, 164, 127, 35, 184, 159, 7, 217, 46, 3, 128, 143, 24, 120, 96, 137, 18, 23, 89, 194, 16, 190, 134, 178, 108, 154, 130, 52, 92, 147, 74, 64, 92, 219, 254, 50, 41, 208, 171, 46, 177, 176, 181, 97, 237, 18, 62, 179, 168, 170, 34, 155, 230, 15, 33, 53, 189, 47, 60, 65, 247, 206, 180, 153, 34, 205, 208, 133, 82, 174, 113, 1, 227, 10, 219, 186, 74, 85, 183, 14, 58, 165, 9, 12, 81, 146, 146, 231, 191, 205, 131, 76, 184, 73, 54, 86, 231, 233, 113, 255, 39, 71, 214, 76, 99, 61, 31, 1, 148, 227, 84, 87, 186, 75, 177, 240, 46, 52, 170, 137, 87, 170, 7, 55, 106, 146, 93, 153, 195, 1, 145, 12, 164, 48, 29, 142, 61, 190, 75, 186, 67, 139, 233, 16, 198, 10, 135, 98, 214, 83, 47, 9, 80, 123, 217, 155, 236, 209, 193, 170, 22, 38, 175, 83, 132, 141, 253, 255, 228, 129, 6, 254, 20, 245, 222, 31, 130, 59, 161, 140, 8, 4, 16, 53, 164, 147, 63, 6, 115, 75, 184, 241, 103, 251, 43, 114, 29, 204, 75, 29, 81, 79, 233, 12, 142, 148, 41, 213, 74, 155, 83, 46, 241, 65, 174, 27, 194, 211, 186, 52, 240, 155, 178, 99, 128, 203, 184, 220, 30, 193, 203, 115, 253, 103, 121, 20, 170, 131, 219, 162, 131, 86, 125, 189, 164, 150, 94, 207, 8, 133, 216, 246, 99, 252, 225, 227, 132, 150, 65, 252, 38, 218, 46, 15, 64, 81, 214, 40, 174, 26, 96, 42, 121, 223, 237, 253, 179, 60, 22, 211, 111, 52, 89, 147, 157, 71, 198, 236, 255, 116, 150, 97, 204, 139, 188, 31, 101, 128, 51, 24, 1, 227, 152, 158, 52, 108, 197, 222, 2, 118, 200, 113, 254, 226, 7, 231, 68, 198, 129, 132, 154, 59, 223, 169, 174, 157, 9, 37, 2, 217, 241, 167, 168, 97, 215, 29, 135, 109, 55, 119, 75, 214, 166, 90, 14, 5, 62, 49, 30, 230, 44, 33, 43, 53, 147, 20, 162, 107, 207, 124, 109, 7, 229, 227, 37, 199, 43, 132, 107, 189, 168, 248, 248, 39, 112, 225, 255, 210, 73, 62, 95, 103, 36, 174, 161, 164, 50, 38, 3, 137, 110, 106, 149, 96, 53, 13, 154, 3, 4, 45, 192, 149, 214, 211, 17, 172, 13, 80, 108, 5, 200, 123, 133, 209, 88, 121, 203, 63, 84, 223, 25, 61, 98, 55, 239, 224, 156, 117, 135, 201, 208, 34, 237, 82, 231, 136, 91, 164, 57, 1, 166, 70, 98, 26, 254, 77, 177, 44, 176, 94, 58, 71, 152, 95, 209, 122, 163, 242, 187, 107, 184, 55, 6, 93, 236, 255, 226, 163, 26, 42, 144, 166, 118, 132, 149, 9, 106, 134, 152, 216, 147, 134, 217, 71, 223, 132, 131, 91, 190, 140, 11, 4, 83, 41, 5, 157, 110, 186, 21, 183, 2, 13, 212, 42, 227, 172, 220, 60, 226, 16, 169, 191, 0, 132, 2, 151, 0, 198, 180, 68, 2, 161, 60, 238, 203, 83, 129, 27, 94, 165, 182, 244, 21, 107, 32, 86, 238, 72, 39, 175, 50, 209, 179, 17, 248, 201, 175, 54, 86, 40, 29, 16, 4, 139, 66, 205, 39, 233, 183, 53, 12, 191, 11, 135, 87, 7, 3, 248, 86, 226, 94, 28, 16, 237, 241, 209, 10, 142, 96, 5, 176, 166, 180, 17, 57, 159, 41, 103, 255, 59, 160, 212, 29, 32, 124, 202, 179, 49, 212, 3, 158, 201, 27, 134, 239, 127, 181, 61, 83, 33, 237, 151, 54, 214, 199, 171, 56, 66, 65, 105, 57, 75, 136, 57, 20, 93, 205, 246, 168, 254, 241, 175, 255, 56, 191, 19, 86, 182, 70, 196, 205, 107, 169, 234, 84, 115, 34, 95, 37, 119, 51, 151, 81, 100, 101, 20, 24, 43, 119, 216, 75, 58, 160, 73, 151, 118, 49, 201, 205, 129, 135, 123, 114, 34, 98, 84, 141, 204, 11, 3, 116, 60, 17, 109, 189, 117, 97, 43, 121, 106, 57, 161, 75, 232, 76, 70, 128, 156, 213, 21, 94, 22, 181, 95, 205, 4, 42, 58, 128, 114, 45, 151, 199, 25, 170, 179, 18, 115, 26, 235, 241, 255, 59, 220, 73, 112, 90, 64, 34, 5, 14, 113, 134, 133, 175, 57, 63, 152, 225, 251, 183, 84, 96, 163, 54, 9, 69, 48, 51, 134, 53, 94, 111, 178, 109, 51, 98, 147, 220, 227, 236, 8, 244, 250, 134, 82, 126, 118, 66, 32, 96, 241, 119, 2, 95, 113, 76, 193, 93, 236, 201, 176, 195, 42, 31, 176, 202, 209, 118, 119, 250, 188, 43, 178, 39, 9, 29, 46, 232, 229, 254, 54, 172, 79, 80, 16, 246, 180, 173, 110, 205, 182, 253, 22, 246, 141, 75, 40, 209, 133, 20, 201, 74, 4, 54, 168, 190, 54, 63, 215, 127, 215, 83, 191, 234, 84, 141, 140, 210, 130, 41, 57, 230, 64, 193, 154, 224, 82, 170, 109, 20, 27, 53, 84, 62, 214, 200, 92, 79, 131, 73, 176, 131, 61, 0, 214, 164, 134, 5, 172, 135, 207, 1, 167, 156, 83, 50, 169, 199, 7, 238, 40, 91, 123, 74, 133, 119, 60, 130, 161, 181, 67, 23, 159, 148, 136, 115, 245, 41, 0, 198, 99, 212, 144, 186, 220, 99, 145, 22, 105, 255, 144, 252, 192, 155, 67, 174, 217, 243, 63, 130, 69, 237, 149, 54, 37, 229, 108, 93, 100, 139, 222, 211, 62, 141, 9, 44, 222, 5, 209, 52, 234, 101, 54, 20, 79, 113, 146, 56, 233, 59, 134, 245, 39, 184, 225, 244, 200, 207, 101, 67, 150, 162, 106, 129, 67, 216, 47, 10, 63, 73, 144, 201, 166, 202, 118, 177, 203, 215, 110, 122, 192, 128, 112, 193, 107, 194, 143, 158, 150, 139, 88, 15, 211, 182, 189, 116, 213, 8, 202, 16, 167, 0, 202, 24, 43, 158, 94, 55, 132, 52, 236, 234, 109, 176, 146, 19, 128, 128, 15, 248, 100, 112, 193, 179, 211, 7, 176, 68, 242, 4, 147, 248, 11, 13, 62, 244, 70, 171, 49, 34, 209, 205, 174, 180, 114, 72, 132, 202, 180, 150, 229, 214, 169, 147, 52, 103, 18, 33, 42, 213, 182, 72, 61, 117, 188, 123, 138, 214, 237, 182, 190, 128, 120, 94, 57, 35, 20, 113, 99, 239, 154, 173, 123, 82, 53, 99, 1, 14, 137, 119, 169, 207, 138, 188, 36, 40, 58, 224, 164, 155, 23, 19, 57, 188, 205, 21, 106, 75, 77, 40, 45, 109, 164, 160, 129, 77, 95, 77, 53, 131, 101, 223, 12, 4, 129, 112, 181, 92, 169, 59, 4, 1, 2, 251, 244, 224, 246, 220, 100, 230, 152, 131, 5, 157, 191, 238, 44, 110, 222, 55, 188, 2, 49, 129, 83, 24, 229, 118, 250, 100, 222, 178, 43, 121, 199, 80, 229, 218, 69, 85, 254, 238, 27, 8, 13, 53, 222, 163, 101, 17, 232, 37, 74, 55, 119, 62, 240, 141, 199, 255, 182, 101, 56, 139, 204, 11, 17, 31, 104, 26, 198, 178, 217, 77, 187, 177, 117, 209, 93, 139, 24, 96, 46, 93, 142, 158, 171, 226, 53, 181, 186, 69, 162, 35, 141, 86, 215, 112, 11, 42, 124, 143, 82, 103, 56, 116, 88, 161, 190, 66, 89, 226, 54, 205, 169, 145, 246, 62, 35, 219, 27, 217, 230, 106, 226, 183, 206, 155, 199, 17, 154, 187, 26, 217, 43, 56, 74, 89, 149, 179, 99, 24, 71, 44, 189, 86, 7, 254, 50, 175, 195, 244, 234, 47, 4, 136, 44, 151, 209, 131, 226, 229, 135, 145, 98, 44, 225, 147, 156, 135, 230, 134, 251, 168, 160, 15, 209, 71, 0, 136, 60, 71, 227, 86, 77, 108, 232, 131, 25, 168, 21, 203, 14, 217, 71, 105, 160, 83, 63, 247, 193, 101, 248, 38, 55, 28, 177, 172, 10, 86, 3, 118, 96, 113, 170, 29, 120, 234, 178, 212, 32, 148, 251, 25, 166, 7, 221, 66, 231, 86, 78, 226, 159, 254, 4, 40, 0, 71, 119, 146, 107, 64, 2, 223, 249, 253, 112, 173, 215, 173, 133, 167, 142, 210, 163, 145, 206, 180, 41, 48, 44, 152, 27, 33, 0, 98, 228, 206, 213, 22, 14, 255, 39, 119, 74, 102, 172, 23, 197, 80, 170, 201, 221, 106, 172, 196, 190, 134, 203, 59, 56, 234, 193, 145, 171, 159, 54, 10, 107, 33, 92, 242, 134, 3, 164, 60, 76, 30, 239, 99, 189, 76, 144, 22, 24, 97, 149, 192, 22, 201, 212, 10, 45, 88, 213, 92, 31, 43, 239, 252, 157, 75, 154, 213, 144, 150, 38, 103, 86, 27, 222, 84, 112, 138, 31, 127, 36, 243, 54, 124, 136, 113, 187, 41, 119, 253, 37, 96, 227, 56, 62, 214, 91, 74, 195, 6, 96, 235, 6, 139, 197, 38, 57, 84, 162, 75, 23, 253, 132, 10, 252, 54, 17, 61, 68, 62, 118, 90, 166, 183, 44, 57, 181, 217, 73, 228, 130, 247, 30, 22, 215, 199, 100, 231, 127, 216, 167, 207, 132, 226, 154, 101, 189, 84, 167, 92, 36, 183, 167, 5, 157, 160, 48, 131, 72, 225, 11, 193, 111, 231, 204, 47, 142, 248, 228, 196, 227, 167, 238, 156, 181, 71, 156, 212, 229, 196, 54, 252, 206, 109, 12, 31, 187, 208, 146, 81, 239, 236, 65, 8, 174, 203, 252, 128, 184, 92, 223, 46, 234, 0, 243, 154, 133, 16, 174, 198, 34, 248, 199, 51, 177, 117, 0, 242, 66, 162, 235, 163, 195, 52, 244, 192, 50, 144, 37, 97, 82, 25, 31, 210, 11, 93, 212, 186, 197, 127, 196, 91, 6, 119, 191, 3, 243, 198, 129, 17, 80, 166, 143, 130, 155, 92, 151, 96, 102, 176, 207, 109, 30, 58, 210, 156, 64, 173, 33, 85, 21, 111, 220, 34, 173, 75, 17, 215, 185, 247, 136, 207, 32, 81, 254, 162, 111, 89, 128, 89, 30, 108, 171, 237, 250, 82, 19, 164, 209, 80, 243, 40, 89, 19, 139, 38, 8, 112, 168, 162, 35, 180, 241, 156, 149, 78, 228, 169, 152, 29, 3, 55, 67, 234, 142, 9, 230, 249, 100, 248, 245, 205, 87, 232, 169, 85, 139, 124, 139, 6, 85, 106, 132, 152, 246, 85, 148, 134, 192, 184, 79, 124, 114, 76, 239, 201, 80, 139, 208, 21, 186, 188, 238, 199, 206, 144, 38, 124, 254, 169, 74, 31, 33, 179, 125, 35, 237, 175, 202, 242, 49, 115, 17, 236, 221, 157, 163, 60, 38, 144, 203, 126, 8, 66, 101, 193, 0, 118, 123, 165, 137, 194, 138, 88, 71, 113, 190, 170, 97, 126, 219, 39, 56, 222, 129, 120, 95, 27, 245, 148, 81, 82, 112, 114, 78, 252, 66, 244, 37, 83, 251, 104, 47, 59, 22, 12, 143, 106, 43, 2, 104, 93, 59, 96, 142, 47, 178, 177, 131, 133, 49, 133, 200, 83, 18, 31, 214, 65, 109, 85, 128, 7, 198, 169, 75, 164, 194, 130, 39, 164, 231, 100, 157, 221, 159, 77, 108, 94, 201, 51, 145, 18, 185, 122, 81, 45, 173, 23, 144, 230, 191, 162, 114, 40, 186, 39, 76, 246, 136, 250, 79, 240, 196, 183, 97, 245, 198, 185, 36, 8, 40, 46, 210, 44, 211, 20, 159, 35, 169, 64, 5, 41, 174, 217, 59, 153, 110, 229, 250, 247, 94, 112, 220, 122, 134, 194, 95, 152, 224, 123, 81, 224, 64, 148, 64, 212, 241, 11, 85, 229, 178, 216, 225, 122, 15, 68, 163, 10, 94, 134, 12, 59, 103, 38, 231, 85, 241, 47, 89, 128, 70, 81, 129, 192, 55, 45, 250, 211, 81, 143, 139, 115, 186, 219, 141, 115, 214, 203, 181, 146, 241, 126, 145, 124, 129, 147, 53, 7, 239, 236, 236, 240, 225, 230, 143, 226, 206, 17, 67, 66, 119, 184, 247, 75, 250, 75, 107, 255, 129, 55, 249, 185, 224, 36, 37, 99, 249, 87, 221, 164, 71, 214, 176, 167, 214, 103, 84, 54, 102, 198, 36, 51, 38, 39, 50, 143, 86, 207, 246, 32, 204, 117, 251, 130, 253, 216, 148, 253, 202, 239, 118, 204, 180, 21, 17, 166, 59, 208, 156, 193, 89, 138, 149, 182, 185, 114, 17, 7, 130, 130, 163, 47, 226, 241, 228, 98, 16, 28, 81, 33, 104, 220, 26, 155, 162, 216, 12, 143, 249, 22, 3, 83, 37, 49, 95, 216, 171, 234, 211, 172, 154, 30, 153, 116, 55, 32, 111, 140, 60, 48, 107, 5, 16, 104, 112, 141, 6, 199, 126, 228, 134, 162, 23, 212, 78, 163, 52, 247, 127, 123, 39, 123, 109, 247, 129, 115, 105, 180, 93, 68, 166, 33, 1, 59, 52, 192, 112, 143, 108, 41, 95, 49, 165, 105, 111, 59, 237, 171, 231, 244, 143, 80, 178, 128, 179, 62, 70, 103, 14, 16, 60, 188, 66, 99, 26, 95, 179, 200, 213, 220, 156, 122, 39, 1, 135, 12, 189, 59, 130, 61, 162, 194, 214, 63, 77, 28, 7, 16, 221, 157, 136, 61, 119, 229, 102, 0, 85, 75, 161, 71, 101, 125, 216, 159, 150, 101, 67, 180, 196, 118, 157, 137, 57, 87, 196, 30, 81, 12, 40, 122, 40, 197, 67, 44, 41, 23, 17, 45, 18, 30, 141, 4, 199, 34, 11, 6, 65, 184, 55, 6, 213, 15, 121, 136, 93, 219, 192, 50, 60, 38, 109, 214, 9, 249, 158, 161, 129, 172, 127, 226, 122, 142, 97, 95, 172, 38, 206, 232, 93, 29, 173, 113, 77, 109, 185, 159, 120, 153, 140, 69, 34, 41, 10, 166, 12, 14, 207, 220, 123, 38, 13, 23, 105, 131, 27, 227, 31, 218, 194, 159, 136, 224, 65, 43, 239, 203, 40, 79, 206, 3, 214, 52, 254, 179, 157, 165, 232, 66, 62, 160, 173, 16, 220, 175, 8, 84, 157, 31, 144, 175, 37, 152, 181, 86, 174, 73, 12, 251, 238, 182, 219, 158, 196, 135, 218, 151, 167, 85, 116, 26, 175, 192, 152, 30, 198, 207, 14, 156, 26, 161, 166, 255, 29, 157, 209, 126, 190, 122, 81, 186, 188, 228, 253, 159, 131, 239, 230, 212, 194, 117, 83, 193, 159, 177, 252, 106, 153, 249, 70, 99, 222, 195, 195, 78, 92, 4, 124, 53, 253, 185, 131, 57, 193, 194, 226, 218, 143, 170, 121, 67, 181, 19, 32, 133, 227, 227, 226, 146, 32, 53, 120, 110, 94, 85, 25, 124, 76, 32, 134, 78, 11, 30, 55, 216, 253, 105, 60, 187, 73, 246, 142, 222, 205, 185, 203, 64, 177, 51, 101, 123, 104, 216, 90, 165, 214, 178, 221, 13, 170, 146, 68, 241, 198, 214, 27, 90, 102, 0, 171, 128, 7, 47, 111, 130, 170, 188, 126, 121, 188, 81, 217, 187, 85, 130, 25, 136, 107, 16, 241, 202, 60, 215, 24, 103, 250, 112, 82, 253, 175, 130, 55, 27, 223, 166, 214, 149, 63, 240, 165, 79, 25, 249, 133, 17, 201, 197, 35, 32, 151, 21, 235, 145, 54, 113, 125, 70, 112, 202, 16, 160, 87, 4, 221, 206, 1, 203, 68, 132, 184, 43, 148, 184, 115, 186, 154, 74, 80, 137, 100, 123, 246, 141, 164, 249, 209, 63, 37, 66, 101, 192, 161, 155, 167, 2, 16, 236, 206, 40, 214, 247, 14, 242, 132, 189, 19, 38, 122, 107, 235, 109, 237, 241, 91, 68, 56, 67, 239, 108, 168, 124, 150, 185, 178, 138, 86, 177, 121, 135, 7, 221, 223, 95, 40, 246, 34, 77, 96, 45, 144, 196, 40, 141, 163, 28, 208, 161, 174, 9, 24, 178, 48, 225, 14, 132, 87, 193, 124, 35, 99, 9, 188, 173, 193, 89, 144, 158, 30, 31, 77, 50, 1, 215, 102, 235, 16, 99, 208, 220, 210, 117, 118, 195, 199, 75, 78, 101, 175, 7, 2, 6, 99, 40, 155, 207, 219, 51, 16, 37, 31, 102, 163, 233, 93, 143, 63, 220, 116, 174, 78, 186, 149, 146, 60, 192, 6, 119, 182, 222, 129, 83, 90, 67, 185, 73, 41, 27, 15, 192, 125, 144, 109, 231, 151, 48, 9, 176, 100, 205, 235, 30, 46, 183, 83, 103, 151, 56, 33, 80, 69, 179, 161, 168, 255, 151, 137, 176, 82, 162, 78, 102, 28, 46, 128, 23, 192, 252, 192, 208, 74, 34, 129, 155, 83, 125, 218, 223, 195, 185, 174, 232, 106, 235, 109, 180, 172, 174, 25, 70, 224, 129, 25, 164, 218, 241, 137, 16, 181, 143, 23, 31, 133, 176, 30, 225, 126, 136, 71, 139, 135, 253, 136, 0, 73, 197, 23, 196, 185, 249, 106, 113, 87, 157, 4, 202, 20, 193, 254, 193, 27, 18, 205, 18, 150, 254, 213, 40, 39, 230, 83, 181, 216, 70, 232, 207, 70, 217, 152, 91, 246, 115, 233, 206, 136, 251, 12, 206, 252, 184, 35, 244, 175, 116, 233, 106, 159, 220, 127, 44, 80, 59, 203, 73, 243, 190, 24, 121, 109, 95, 78, 31, 79, 254, 86, 168, 66, 15, 62, 123, 72, 126, 10, 255, 7, 141, 172, 215, 233, 182, 186, 76, 253, 0, 38, 232, 242, 183, 36, 237, 19, 225, 236, 107, 81, 157, 16, 88, 66, 238, 217, 16, 11, 157, 245, 10, 114, 111, 158, 160, 2, 43, 98, 129, 193, 250, 95, 205, 255, 32, 244, 4, 27, 160, 184, 140, 205, 111, 221, 98, 25, 34, 4, 172, 253, 222, 33, 197, 204, 154, 248, 140, 34, 89, 11, 165, 41, 218, 2, 213, 98, 212, 138, 167, 169, 113, 8, 36, 205, 116, 12, 180, 9, 55, 165, 48, 100, 219, 54, 186, 189, 62, 165, 191, 218, 154, 123, 139, 76, 187, 201, 84, 255, 185, 116, 120, 185, 51, 146, 128, 9, 175, 88, 97, 207, 239, 79, 247, 219, 202, 144, 115, 208, 183, 8, 126, 143, 129, 85, 71, 22, 200, 198, 144, 197, 118, 50, 56, 132, 64, 192, 210, 75, 8, 136, 93, 40, 172, 218, 185, 109, 164, 39, 97, 65, 157, 114, 118, 19, 244, 87, 92, 213, 30, 92, 50, 39, 76, 254, 209, 68, 25, 133, 249, 223, 106, 226, 227, 201, 78, 211, 186, 171, 77, 99, 217, 130, 148, 120, 8, 221, 176, 41, 119, 237, 178, 170, 86, 1, 17, 48, 53, 224, 10, 226, 0, 112, 104, 188, 27, 213, 155, 92, 126, 117, 248, 183, 225, 119, 194, 157, 88, 227, 76, 29, 150, 36, 226, 76, 148, 144, 87, 16, 86, 180, 117, 199, 91, 81, 163, 166, 53, 58, 205, 82, 171, 157, 87, 100, 166, 124, 80, 172, 74, 0, 74, 226, 13, 181, 81, 24, 77, 250, 49, 120, 30, 107, 87, 230, 87, 38, 135, 224, 90, 177, 12, 231, 233, 10, 169, 34, 31, 136, 183, 211, 120, 60, 171, 65, 99, 149, 41, 163, 194, 80, 204, 41, 240, 72, 125, 39, 16, 76, 116, 171, 153, 237, 50, 212, 93, 120, 111, 235, 71, 161, 141, 123, 37, 185, 15, 167, 7, 17, 228, 46, 18, 89, 242, 235, 26, 186, 118, 68, 236, 127, 252, 33, 10, 200, 70, 89, 196, 128, 55, 49, 98, 0, 199, 211, 64, 103, 36, 163, 254, 187, 18, 115, 134, 48, 102, 77, 236, 151, 89, 175, 194, 168, 94, 3, 189, 27, 34, 152, 24, 174, 238, 188, 43, 61, 177, 174, 16, 17, 221, 250, 205, 87, 24, 88, 50, 58, 46, 146, 218, 194, 22, 223, 229, 57, 172, 90, 15, 170, 46, 228, 54, 124, 68, 80, 151, 73, 78, 179, 72, 115, 173, 16, 7, 194, 27, 80, 212, 62, 27, 118, 209, 137, 61, 250, 77, 179, 93, 181, 24, 179, 217, 166, 113, 177, 26, 241, 188, 144, 143, 218, 121, 95, 191, 57, 205, 74, 21, 225, 5, 86, 29, 69, 167, 225, 44, 74, 23, 178, 198, 57, 32, 3, 25, 13, 98, 187, 255, 149, 238, 219, 147, 150, 244, 85, 86, 255, 105, 91, 76, 26, 23, 220, 220, 100, 126, 102, 137, 30, 115, 157, 221, 66, 193, 201, 108, 147, 52, 76, 102, 33, 237, 117, 130, 208, 88, 71, 65, 120, 21, 137, 61, 199, 129, 240, 129, 158, 213, 197, 73, 6, 242, 106, 22, 27, 117, 91, 159, 237, 252, 251, 65, 227, 227, 220, 0, 156, 94, 174, 246, 79, 185, 192, 76, 56, 92, 73, 54, 30, 84, 85, 17, 222, 73, 122, 68, 184, 191, 137, 23, 123, 192, 243, 38, 26, 65, 159, 43, 187, 235, 217, 84, 174, 71, 40, 62, 155, 22, 49, 34, 185, 161, 240, 69, 219, 80, 194, 212, 251, 176, 1, 112, 91, 18, 190, 188, 223, 161, 138, 151, 161, 4, 194, 26, 55, 23, 137, 138, 98, 140, 5, 24, 81, 184, 35, 154, 8, 222, 191, 229, 44, 91, 161, 189, 71, 74, 107, 125, 199, 183, 129, 18, 80, 144, 247, 227, 223, 224, 51, 208, 28, 23, 84, 139, 252, 30, 139, 83, 197, 181, 133, 211, 201, 104, 243, 186, 92, 248, 99, 183, 132, 72, 62, 144, 176, 40, 208, 230, 187, 98, 8, 242, 195, 133, 69, 229, 109, 201, 146, 180, 220, 44, 173, 176, 24, 224, 235, 137, 216, 48, 163, 151, 132, 89, 123, 197, 184, 91, 1, 107, 51, 114, 152, 217, 247, 146, 244, 58, 220, 189, 99, 34, 65, 3, 214, 129, 208, 187, 246, 111, 192, 95, 5, 169, 223, 183, 72, 52, 235, 210, 190, 124, 58, 205, 229, 15, 9, 66, 67, 75, 163, 113, 155, 12, 78, 18, 82, 29, 16, 66, 151, 28, 222, 145, 92, 41, 80, 45, 240, 115, 38, 70, 82, 14, 246, 238, 137, 124, 235, 232, 134, 197, 63, 0, 58, 23, 30, 195, 16, 129, 79, 72, 193, 73, 188, 215, 242, 181, 211, 181, 102, 186, 222, 93, 241, 135, 12, 150, 170, 175, 239, 244, 12, 169, 155, 199, 38, 101, 232, 79, 164, 178, 231, 196, 1, 221, 45, 57, 176, 62, 68, 82, 129, 232, 107, 217, 219, 24, 18, 144, 148, 172, 57, 77, 163, 34, 10, 4, 39, 132, 247, 66, 90, 40, 133, 146, 100, 224, 177, 248, 188, 201, 213, 160, 200, 154, 136, 191, 197, 244, 233, 130, 36, 107, 73, 55, 8, 202, 85, 87, 63, 246, 153, 57, 15, 144, 208, 113, 32, 52, 176, 181, 65, 97, 138, 106, 126, 152, 81, 82, 30, 67, 192, 184, 20, 145, 67, 109, 26, 164, 184, 156, 114, 165, 211, 190, 51, 213, 214, 207, 237, 160, 129, 95, 140, 195, 50, 224, 254, 146, 80, 164, 200, 145, 13, 83, 255, 184, 14, 230, 109, 253, 20, 5, 60, 201, 237, 66, 38, 205, 64, 231, 19, 140, 227, 166, 153, 65, 111, 178, 155, 101, 54, 122, 70, 111, 27, 58, 10, 249, 0, 87, 42, 123, 228, 123, 28, 53, 40, 15, 168, 67, 137, 243, 208, 120, 229, 240, 158, 166, 144, 232, 134, 93, 128, 201, 222, 49, 241, 42, 133, 71, 0, 17, 19, 124, 214, 144, 5, 239, 209, 51, 159, 184, 12, 146, 254, 172, 114, 169, 10, 3, 76, 58, 93, 130, 25, 164, 121, 33, 101, 83, 248, 72, 246, 203, 149, 51, 158, 193, 56, 100, 77, 226, 146, 83, 235, 252, 155, 50, 214, 138, 8, 109, 78, 41, 21, 65, 210, 167, 204, 130, 44, 192, 21, 167, 45, 90, 1, 79, 121, 242, 54, 243, 204, 153, 179, 64, 6, 212, 103, 190, 66, 77, 223, 204, 244, 130, 38, 114, 66, 226, 254, 149, 174, 115, 48, 204, 184, 236, 182, 126, 143, 249, 196, 22, 102, 222, 145, 157, 176, 68, 236, 139, 72, 53, 93, 18, 17, 66, 94, 24, 242, 238, 176, 131, 15, 37, 101, 254, 176, 75, 29, 77, 192, 36, 86, 18, 171, 208, 4, 177, 216, 17, 60, 161, 109, 17, 235, 248, 137, 42, 43, 209, 202, 46, 219, 14, 43, 87, 230, 136, 108, 14, 170, 29, 97, 44, 79, 183, 232, 208, 192, 192, 82, 230, 213, 139, 215, 167, 83, 36, 146, 45, 55, 15, 80, 196, 246, 190, 39, 39, 88, 98, 202, 22, 223, 222, 16, 47, 25, 145, 6, 177, 76, 67, 91, 48, 18, 135, 190, 72, 29, 202, 114, 105, 87, 215, 232, 205, 246, 164, 215, 255, 128, 246, 0, 127, 24, 169, 40, 73, 175, 163, 97, 211, 15, 70, 53, 192, 192, 89, 128, 221, 131, 194, 125, 194, 89, 140, 234, 118, 64, 11, 110, 208, 19, 244, 236, 197, 72, 149, 75, 35, 67, 237, 47, 251, 151, 233, 215, 188, 161, 188, 170, 255, 46, 65, 31, 24, 29, 122, 226, 103, 147, 182, 19, 29, 79, 149, 195, 209, 0, 147, 22, 22, 45, 4, 160, 188, 131, 219, 166, 230, 45, 190, 171, 16, 202, 245, 246, 55, 181, 136, 44, 115, 150, 0, 221, 53, 242, 240, 220, 61, 212, 225, 249, 198, 151, 31, 153, 59, 45, 153, 5, 206, 201, 250, 220, 243, 251, 225, 102, 253, 42, 102, 223, 169, 163, 197, 152, 221, 152, 12, 112, 40, 200, 209, 113, 243, 110, 188, 95, 69, 155, 9, 105, 138, 172, 221, 24, 23, 51, 92, 136, 20, 30, 248, 123, 171, 134, 91, 153, 21, 213, 210, 62, 95, 174, 86, 28, 140, 40, 51, 195, 133, 43, 35, 76, 215, 207, 109, 154, 232, 185, 34, 151, 132, 150, 142, 101, 221, 192, 61, 112, 184, 85, 85, 28, 23, 146, 205, 30, 184, 220, 176, 66, 107, 56, 192, 0, 205, 254, 66, 21, 49, 165, 0, 68, 182, 237, 211, 75, 181, 84, 28, 52, 146, 252, 252, 79, 237, 221, 198, 5, 63, 142, 140, 43, 17, 176, 26, 229, 181, 244, 181, 71, 151, 8, 141, 178, 234, 22, 170, 79, 62, 231, 70, 194, 110, 147, 81, 34, 13, 80, 82, 197, 165, 253, 206, 176, 141, 182, 157, 230, 125, 142, 135, 37, 231, 75, 94, 129, 159, 4, 9, 254, 216, 164, 195, 93, 73, 20, 19, 52, 153, 217, 121, 229, 188, 71, 212, 118, 210, 168, 76, 21, 120, 62, 150, 236, 100, 45, 204, 203, 213, 205, 82, 96, 102, 70, 35, 206, 61, 237, 167, 208, 5, 174, 16, 207, 245, 255, 160, 139, 244, 57, 188, 31, 34, 1, 63, 25, 214, 156, 209, 238, 114, 92, 50, 9, 198, 111, 144, 184, 212, 190, 225, 89, 71, 247, 88, 99, 5, 88, 82, 10, 224, 126, 171, 247, 186, 175, 254, 112, 154, 6, 93, 42, 100, 177, 152, 155, 251, 88, 19, 141, 65, 134, 76, 3, 134, 251, 122, 21, 18, 191, 61, 52, 125, 34, 114, 155, 233, 31, 175, 182, 4, 145, 41, 151, 154, 99, 195, 171, 139, 160, 13, 78, 192, 198, 150, 135, 154, 128, 227, 236, 197, 120, 14, 247, 201, 21, 179, 223, 234, 162, 212, 109, 228, 202, 163, 71, 51, 21, 168, 132, 224, 119, 210, 244, 175, 19, 123, 44, 79, 194, 211, 125, 89, 154, 13, 16, 164, 214, 115, 254, 13, 70, 172, 161, 104, 217, 105, 232, 30, 58, 234, 41, 52, 177, 102, 196, 74, 177, 25, 32, 214, 129, 107, 8, 67, 218, 124, 125, 51, 83, 12, 179, 43, 5, 137, 45, 108, 213, 243, 128, 115, 43, 38, 211, 216, 82, 16, 70, 99, 144, 215, 227, 224, 121, 175, 124, 45, 149, 118, 191, 151, 34, 63, 75, 113, 113, 25, 45, 13, 169, 43, 68, 118, 200, 213, 98, 180, 230, 57, 240, 113, 36, 55, 250, 252, 76, 140, 197, 73, 48, 212, 13, 235, 104, 3, 110, 107, 36, 203, 255, 146, 236, 38, 126, 104, 213, 133, 113, 112, 251, 242, 132, 20, 67, 188, 154, 34, 22, 22, 67, 20, 204, 115, 238, 246, 33, 147, 211, 229, 254, 166, 77, 145, 234, 161, 17, 121, 160, 82, 19, 249, 131, 182, 22, 129, 254, 165, 197, 122, 58, 65, 97, 185, 55, 5, 39, 116, 174, 165, 103, 72, 36, 64, 202, 229, 132, 131, 46, 75, 43, 203, 126, 247, 238, 33, 135, 116, 156, 74, 121, 129, 21, 25, 53, 125, 247, 191, 235, 254, 30, 45, 83, 37, 192, 88, 252, 244, 253, 232, 97, 208, 73, 58, 138, 167, 126, 170, 141, 222, 164, 154, 37, 26, 94, 172, 203, 173, 244, 50, 139, 41, 84, 103, 163, 85, 78, 4, 253, 186, 195, 152, 199, 8, 215, 73, 76, 214, 172, 250, 87, 139, 251, 145, 251, 65, 27, 225, 87, 95, 162, 242, 139, 185, 58, 155, 253, 161, 92, 162, 170, 167, 91, 156, 237, 77, 104, 204, 133, 92, 218, 157, 142, 132, 221, 98, 192, 79, 8, 42, 121, 8, 171, 73, 47, 110, 129, 75, 177, 34, 162, 17, 234, 14, 120, 78, 54, 104, 29, 131, 153, 194, 234, 5, 178, 234, 36, 115, 184, 48, 210, 103, 248, 22, 148, 58, 121, 241, 242, 136, 167, 14, 155, 212, 63, 107, 168, 110, 3, 139, 177, 54, 68, 18, 151, 56, 49, 158, 208, 211, 70, 168, 87, 160, 32, 201, 220, 24, 196, 96, 124, 3, 232, 188, 153, 78, 130, 182, 208, 219, 118, 155, 224, 84, 48, 19, 237, 129, 11, 153, 94, 2, 52, 95, 173, 155, 139, 146, 236, 181, 16, 207, 136, 74, 163, 217, 198, 182, 103, 187, 94, 146, 27, 112, 62, 44, 197, 129, 223, 92, 196, 238, 67, 189, 184, 54, 164, 94, 11, 112, 197, 106, 19, 153, 46, 61, 183, 138, 202, 116, 6, 202, 93, 118, 133, 211, 75, 237, 101, 119, 250, 144, 137, 113, 156, 162, 89, 159, 100, 248, 94, 121, 96, 15, 254, 219, 165, 228, 224, 165, 48, 138, 87, 243, 243, 147, 16, 188, 86, 175, 210, 234, 35, 70, 23, 175, 128, 132, 117, 225, 60, 120, 71, 123, 179, 62, 180, 37, 107, 33, 33, 163, 59, 57, 9, 217, 138, 48, 59, 210, 34, 26, 49, 16, 188, 23, 121, 118, 227, 222, 105, 18, 119, 135, 233, 112, 179, 109, 140, 196, 202, 9, 4, 7, 174, 86, 254, 26, 96, 74, 178, 239, 61, 246, 124, 138, 9, 58, 50, 114, 37, 208, 85, 232, 43, 73, 3, 86, 2, 145, 105, 60, 199, 88, 46, 205, 125, 129, 123, 27, 73, 25, 8, 230, 225, 135, 37, 126, 70, 8, 8, 90, 70, 181, 185, 254, 245, 238, 93, 142, 133, 244, 100, 206, 110, 146, 86, 46, 248, 201, 71, 85, 110, 203, 167, 46, 190, 195, 98, 22, 28, 59, 163, 77, 171, 41, 100, 146, 229, 64, 23, 241, 100, 13, 40, 245, 139, 109, 143, 106, 56, 95, 111, 233, 185, 86, 80, 165, 10, 240, 167, 165, 70, 86, 192, 177, 156, 224, 40, 81, 3, 37, 107, 135, 195, 76, 238, 209, 223, 40, 126, 111, 85, 156, 161, 243, 85, 14, 143, 111, 85, 14, 42, 191, 118, 50, 204, 200, 165, 117, 181, 1, 75, 188, 208, 179, 108, 214, 135, 249, 30, 121, 222, 172, 44, 28, 92, 169, 153, 172, 109, 35, 114, 60, 23, 9, 231, 2, 165, 2, 20, 114, 2, 103, 96, 241, 208, 186, 29, 93, 21, 191, 131, 189, 90, 228, 213, 13, 203, 211, 192, 51, 137, 205, 66, 25, 94, 110, 116, 53, 66, 54, 15, 193, 253, 89, 187, 138, 101, 156, 81, 83, 76, 175, 67, 100, 121, 63, 39, 139, 166, 244, 220, 36, 249, 71, 4, 33, 83, 87, 177, 240, 238, 106, 33, 132, 61, 246, 231, 89, 13, 238, 62, 126, 145, 164, 34, 250, 39, 35, 233, 119, 83, 208, 83, 77, 205, 212, 200, 123, 189, 62, 247, 27, 27, 60, 206, 243, 59, 146, 236, 105, 93, 153, 63, 82, 32, 133, 209, 67, 186, 115, 30, 6, 156, 48, 187, 158, 159, 107, 212, 252, 13, 68, 104, 133, 184, 109, 53, 85, 81, 189, 34, 99, 196, 81, 172, 19, 130, 254, 148, 214, 10, 90, 69, 35, 103, 216, 76, 166, 14, 248, 101, 67, 122, 104, 223, 145, 26, 167, 190, 181, 190, 100, 97, 219, 143, 20, 108, 57, 129, 197, 103, 200, 251, 0, 122, 80, 12, 94, 140, 143, 248, 25, 88, 15, 111, 120, 132, 172, 1, 65, 216, 162, 65, 31, 169, 172, 227, 142, 241, 195, 161, 114, 130, 7, 32, 7, 221, 121, 58, 128, 8, 110, 218, 208, 151, 176, 134, 7, 100, 103, 44, 207, 235, 164, 126, 163, 223, 118, 241, 187, 63, 25, 168, 47, 164, 253, 141, 77, 201, 230, 239, 134, 21, 239, 234, 53, 85, 61, 180, 53, 153, 184, 136, 145, 44, 224, 97, 100, 13, 32, 65, 23, 245, 0, 83, 116, 108, 214, 9, 242, 233, 25, 8, 22, 243, 32, 119, 235, 209, 189, 255, 87, 113, 65, 195, 72, 123, 246, 155, 9, 241, 219, 150, 160, 247, 187, 179, 58, 6, 175, 31, 132, 18, 56, 236, 158, 230, 21, 139, 233, 32, 185, 241, 164, 141, 249, 195, 159, 83, 197, 154, 235, 149, 84, 191, 42, 146, 129, 66, 196, 83, 12, 153, 179, 142, 143, 207, 220, 67, 28, 105, 235, 203, 203, 165, 250, 57, 119, 249, 140, 154, 13, 137, 134, 211, 49, 160, 12, 161, 122, 74, 106, 90, 250, 98, 63, 235, 132, 96, 22, 93, 64, 19, 39, 80, 149, 78, 140, 77, 7, 173, 20, 53, 99, 156, 199, 205, 167, 177, 214, 99, 142, 243, 124, 24, 196, 83, 18, 185, 5, 210, 220, 183, 51, 200, 17, 36, 11, 19, 244, 28, 170, 113, 15, 118, 147, 137, 125, 67, 218, 22, 172, 4, 107, 116, 197, 245, 36, 102, 132, 52, 252, 213, 104, 151, 107, 55, 129, 225, 215, 149, 208, 108, 35, 215, 64, 169, 122, 26, 234, 222, 38, 108, 199, 176, 243, 110, 120, 74, 208, 37, 144, 251, 126, 247, 231, 90, 88, 111, 207, 123, 170, 78, 242, 11, 43, 225, 76, 124, 73, 54, 243, 142, 147, 168, 217, 66, 175, 188, 140, 98, 237, 32, 32, 45, 214, 206, 135, 253, 82, 52, 61, 223, 169, 18, 107, 153, 15, 142, 45, 52, 62, 113, 150, 52, 191, 245, 220, 95, 249, 54, 128, 174, 123, 27, 24, 253, 182, 141, 177, 85, 249, 247, 102, 17, 231, 240, 189, 49, 178, 79, 133, 178, 106, 144, 211, 182, 172, 54, 196, 74, 179, 180, 91, 28, 138, 239, 215, 87, 170, 87, 196, 65, 236, 146, 188, 231, 98, 251, 223, 201, 36, 102, 43, 102, 239, 126, 53, 37, 240, 236, 231, 40, 204, 157, 111, 11, 248, 11, 121, 127, 248, 110, 203, 174, 4, 0, 143, 102, 190, 215, 139, 43, 210, 246, 60, 232, 51, 220, 242, 213, 116, 107, 124, 24, 6, 194, 196, 241, 92, 197, 49, 128, 168, 47, 183, 196, 88, 116, 80, 189, 166, 255, 193, 232, 134, 223, 245, 223, 136, 53, 215, 60, 93, 196, 78, 176, 24, 56, 188, 45, 207, 43, 132, 235, 240, 52, 148, 30, 10, 65, 44, 222, 213, 207, 120, 148, 170, 114, 197, 206, 221, 199, 69, 70, 214, 42, 123, 177, 251, 6, 245, 236, 129, 253, 209, 244, 35, 128, 80, 113, 100, 95, 235, 56, 62, 138, 39, 228, 110, 70, 214, 49, 226, 29, 36, 120, 103, 27, 87, 48, 201, 255, 6, 146, 42, 128, 241, 229, 65, 237, 225, 203, 142, 134, 181, 168, 22, 66, 10, 104, 168, 233, 141, 77, 162, 70, 67, 210, 5, 115, 64, 114, 219, 104, 241, 110, 42, 49, 177, 28, 179, 227, 180, 52, 56, 69, 47, 221, 158, 143, 210, 126, 57, 110, 70, 33, 130, 243, 52, 1, 16, 39, 25, 255, 149, 58, 28, 151, 147, 43, 215, 133, 20, 191, 119, 126, 189, 102, 154, 91, 154, 203, 255, 138, 81, 56, 91, 175, 52, 136, 222, 146, 23, 245, 64, 65, 246, 172, 104, 92, 184, 173, 16, 208, 232, 92, 98, 47, 49, 188, 9, 182, 194, 239, 163, 115, 52, 121, 111, 120, 111, 105, 138, 217, 205, 32, 61, 71, 55, 118, 187, 0, 190, 212, 158, 128, 48, 5, 45, 88, 167, 163, 134, 21, 228, 120, 88, 40, 18, 117, 95, 202, 230, 198, 15, 213, 185, 123, 2, 123, 214, 97, 32, 122, 127, 156, 97, 47, 158, 124, 249, 160, 35, 237, 24, 249, 207, 15, 156, 148, 221, 226, 183, 130, 128, 75, 98, 4, 50, 118, 230, 191, 58, 79, 176, 126, 92, 239, 215, 110, 5, 193, 151, 163, 233, 203, 97, 212, 39, 98, 122, 254, 36, 29, 151, 229, 151, 87, 220, 45, 142, 87, 191, 1, 243, 220, 212, 104, 59, 156, 211, 184, 79, 157, 181, 192, 88, 157, 111, 45, 124, 53, 31, 6, 165, 200, 251, 189, 210, 31, 135, 70, 7, 42, 93, 236, 82, 177, 180, 45, 223, 214, 239, 145, 26, 181, 57, 33, 38, 185, 120, 234, 0, 200, 128, 127, 207, 88, 104, 125, 19, 103, 127, 251, 95, 96, 234, 20, 44, 71, 4, 161, 170, 91, 248, 74, 103, 239, 147, 222, 189, 9, 191, 254, 41, 174, 7, 54, 76, 90, 59, 9, 145, 31, 144, 14, 44, 8, 77, 183, 85, 151, 147, 195, 71, 3, 38, 167, 162, 139, 191, 227, 154, 139, 62, 87, 75, 176, 151, 41, 120, 75, 207, 101, 15, 65, 98, 233, 55, 224, 163, 59, 102, 169, 204, 119, 148, 25, 197, 30, 64, 192, 204, 147, 241, 60, 68, 141, 84, 239, 125, 97, 1, 158, 57, 99, 138, 93, 18, 120, 248, 154, 93, 158, 136, 145, 248, 117, 85, 217, 244, 205, 165, 207, 2, 161, 95, 245, 193, 18, 159, 153, 56, 253, 75, 103, 235, 31, 255, 9, 199, 208, 64, 84, 175, 36, 33, 73, 141, 91, 243, 41, 187, 96, 198, 127, 204, 231, 188, 0, 225, 6, 47, 145, 69, 52, 195, 5, 128, 91, 248, 26, 194, 114, 188, 182, 255, 56, 31, 161, 134, 126, 179, 122, 8, 42, 56, 216, 142, 176, 131, 67, 36, 23, 177, 194, 213, 64, 116, 144, 105, 61, 226, 106, 231, 197, 84, 5, 236, 2, 204, 65, 83, 57, 148, 67, 42, 95, 217, 227, 1, 170, 124, 45, 164, 14, 15, 232, 17, 22, 42, 168, 215, 226, 214, 139, 214, 155, 192, 185, 45, 167, 235, 241, 60, 3, 214, 73, 145, 216, 152, 184, 130, 122, 49, 113, 212, 22, 22, 200, 110, 13, 171, 102, 133, 11, 240, 2, 118, 122, 233, 137, 94, 5, 201, 104, 146, 209, 8, 52, 59, 223, 114, 146, 187, 142, 111, 94, 205, 60, 12, 0, 126, 179, 120, 190, 168, 44, 183, 76, 78, 7, 57, 214, 111, 20, 10, 203, 158, 72, 167, 11, 48, 56, 73, 17, 42, 196, 223, 167, 237, 204, 176, 149, 20, 147, 189, 212, 84, 245, 36, 126, 252, 233, 38, 67, 224, 98, 35, 9, 212, 20, 158, 88, 41, 23, 203, 2, 105, 241, 82, 23, 44, 254, 160, 18, 30, 14, 231, 207, 2, 92, 197, 71, 87, 108, 223, 99, 50, 140, 185, 161, 245, 226, 14, 216, 192, 128, 95, 212, 98, 117, 245, 235, 100, 67, 167, 190, 75, 229, 24, 40, 121, 94, 64, 199, 107, 179, 240, 252, 117, 47, 139, 3, 70, 118, 132, 165, 87, 13, 50, 185, 250, 133, 251, 174, 202, 83, 93, 236, 22, 111, 39, 250, 86, 226, 70, 242, 167, 201, 70, 233, 29, 233, 60, 240, 203, 10, 139, 66, 19, 212, 167, 6, 119, 158, 200, 170, 129, 83, 28, 27, 208, 62, 64, 126, 111, 111, 161, 109, 151, 104, 70, 114, 48, 120, 149, 243, 18, 87, 105, 136, 163, 251, 38, 33, 118, 83, 61, 221, 215, 182, 58, 58, 196, 19, 89, 160, 237, 106, 26, 203, 209, 102, 159, 33, 207, 16, 74, 117, 171, 107, 20, 157, 227, 10, 116, 56, 241, 114, 246, 178, 194, 184, 72, 202, 226, 133, 142, 22, 100, 61, 36, 117, 96, 73, 219, 102, 37, 12, 229, 77, 199, 209, 213, 185, 91, 78, 237, 207, 131, 10, 242, 48, 69, 69, 212, 68, 11, 137, 92, 226, 216, 73, 252, 91, 151, 56, 112, 91, 16, 234, 88, 221, 218, 122, 29, 180, 252, 164, 212, 66, 93, 171, 139, 21, 211, 192, 144, 13, 235, 84, 210, 46, 60, 14, 216, 248, 107, 205, 107, 223, 9, 240, 231, 37, 151, 92, 216, 65, 77, 135, 71, 114, 136, 171, 68, 159, 173, 11, 205, 143, 154, 163, 209, 25, 97, 169, 172, 233, 150, 211, 155, 150, 78, 176, 96, 132, 56, 165, 38, 218, 228, 77, 118, 104, 204, 154, 225, 71, 132, 60, 165, 141, 248, 59, 27, 121, 95, 86, 56, 126, 228, 95, 33, 141, 22, 126, 90, 39, 185, 108, 154, 239, 35, 175, 184, 94, 23, 114, 170, 77, 196, 15, 21, 210, 66, 169, 88, 202, 208, 57, 169, 83, 218, 193, 103, 190, 249, 45, 109, 166, 198, 102, 230, 116, 42, 196, 244, 168, 161, 109, 127, 97, 228, 215, 196, 156, 57, 49, 118, 30, 75, 211, 98, 95, 51, 122, 177, 160, 132, 170, 205, 100, 188, 161, 98, 54, 112, 71, 110, 216, 200, 143, 17, 201, 93, 12, 227, 133, 39, 42, 120, 216, 109, 71, 12, 108, 175, 11, 55, 48, 179, 58, 201, 210, 104, 108, 69, 25, 217, 94, 174, 35, 232, 69, 86, 143, 132, 172, 254, 210, 190, 31, 138, 157, 113, 187, 20, 64, 200, 11, 40, 213, 250, 26, 12, 8, 132, 208, 207, 79, 112, 140, 247, 240, 228, 218, 70, 91, 168, 27, 43, 190, 76, 133, 235, 18, 109, 111, 186, 110, 84, 187, 244, 233, 1, 167, 253, 37, 175, 235, 105, 146, 140, 202, 246, 215, 255, 185, 11, 106, 240, 161, 184, 112, 129, 54, 3, 41, 225, 50, 192, 224, 128, 100, 125, 209, 212, 176, 103, 30, 222, 146, 229, 176, 165, 28, 140, 172, 137, 146, 130, 114, 37, 176, 37, 143, 12, 56, 116, 244, 63, 73, 191, 212, 208, 126, 71, 142, 92, 87, 48, 221, 127, 191, 219, 84, 84, 223, 96, 253, 147, 87, 179, 103, 176, 142, 228, 102, 180, 108, 183, 210, 0, 84, 62, 196, 210, 244, 79, 115, 81, 121, 115, 174, 135, 226, 193, 205, 186, 24, 28, 196, 110, 36, 141, 220, 79, 131, 69, 83, 199, 76, 206, 201, 116, 136, 220, 151, 136, 145, 119, 218, 119, 222, 102, 25, 132, 85, 34, 117, 77, 208, 89, 88, 19, 227, 77, 65, 196, 18, 63, 211, 89, 228, 128, 183, 193, 107, 239, 14, 160, 116, 96, 92, 31, 230, 129, 138, 226, 43, 212, 233, 85, 169, 74, 90, 233, 183, 125, 122, 8, 164, 79, 242, 54, 241, 93, 157, 37, 211, 244, 122, 20, 177, 229, 150, 190, 182, 217, 139, 48, 5, 201, 152, 118, 29, 191, 41, 14, 165, 238, 205, 12, 133, 38, 116, 209, 242, 147, 51, 204, 152, 13, 226, 185, 184, 78, 180, 129, 157, 127, 133, 2, 178, 247, 165, 45, 138, 215, 173, 163, 143, 110, 238, 10, 102, 74, 66, 38, 240, 251, 153, 129, 167, 81, 91, 111, 32, 82, 175, 49, 71, 30, 77, 209, 130, 253, 71, 30, 166, 198, 248, 235, 204, 179, 155, 217, 242, 173, 14, 147, 152, 66, 125, 223, 9, 144, 69, 154, 53, 164, 107, 67, 76, 31, 141, 176, 83, 183, 62, 9, 47, 220, 62, 19, 143, 138], + [195, 138, 100, 236, 46, 219, 69, 203, 41, 231, 235, 104, 115, 221, 66, 217, 163, 157, 28, 158, 0, 115, 200, 59, 199, 231, 162, 84, 133, 10, 248, 73, 44, 232, 188, 58, 202, 181, 232, 72, 255, 2, 107, 39, 129, 219, 9, 58, 156, 96, 228, 246, 119, 122, 83, 101, 121, 52, 74, 3, 220, 21, 225, 56, 195, 147, 39, 192, 133, 14, 230, 3, 103, 115, 203, 241, 183, 192, 218, 38, 28, 126, 140, 245, 1, 43, 4, 177, 152, 160, 253, 41, 33, 84, 127, 108, 79, 105, 211, 89, 162, 42, 230, 242, 213, 16, 94, 114, 218, 116, 119, 240, 162, 140, 199, 103, 56, 119, 97, 3, 237, 18, 211, 167, 73, 14, 154, 92, 6, 47, 54, 238, 6, 5, 93, 180, 30, 110, 34, 140, 111, 189, 69, 83, 54, 125, 37, 228, 35, 134, 90, 113, 195, 253, 105, 160, 27, 73, 250, 245, 44, 200, 125, 169, 28, 5, 149, 118, 74, 86, 221, 120, 13, 69, 84, 219, 67, 49, 186, 59, 155, 69, 9, 204, 238, 162, 209, 52, 161, 172, 143, 150, 108, 246, 197, 174, 78, 222, 0, 164, 252, 149, 45, 43, 71, 239, 149, 68, 114, 169, 3, 115, 160, 67, 27, 52, 196, 119, 196, 177, 24, 156, 40, 4, 185, 109, 165, 37, 7, 126, 211, 189, 20, 139, 218, 91, 60, 53, 143, 124, 221, 226, 127, 12, 96, 55, 47, 243, 54, 114, 9, 187, 111, 95, 40, 48, 91, 168, 97, 227, 92, 34, 148, 112, 140, 140, 190, 32, 234, 66, 32, 187, 235, 196, 236, 15, 3, 211, 44, 39, 103, 23, 34, 123, 221, 176, 227, 244, 255, 154, 146, 107, 189, 151, 59, 197, 208, 202, 88, 214, 122, 29, 91, 113, 80, 167, 156, 95, 64, 182, 233, 80, 42, 107, 106, 56, 125, 64, 225, 191, 217, 179, 219, 172, 40, 10, 77, 140, 21, 137, 246, 215, 76, 125, 146, 236, 0, 171, 0, 201, 206, 111, 241, 74, 61, 57, 3, 144, 113, 183, 20, 227, 193, 113, 20, 244, 230, 117, 200, 58, 172, 92, 244, 239, 18, 119, 99, 153, 75, 196, 147, 69, 87, 238, 251, 97, 15, 202, 219, 241, 219, 241, 244, 76, 220, 6, 187, 65, 246, 61, 141, 219, 85, 74, 7, 45, 255, 59, 163, 195, 84, 33, 188, 209, 92, 102, 169, 58, 188, 56, 164, 186, 148, 81, 150, 240, 18, 209, 215, 144, 66, 19, 73, 88, 52, 162, 7, 163, 32, 83, 88, 207, 146, 11, 205, 54, 8, 75, 228, 5, 220, 204, 138, 249, 239, 228, 115, 197, 66, 111, 253, 163, 175, 85, 118, 254, 62, 183, 156, 152, 13, 159, 140, 131, 66, 82, 68, 112, 128, 150, 81, 30, 244, 15, 120, 92, 241, 32, 108, 123, 240, 63, 10, 82, 44, 240, 23, 123, 183, 253, 41, 74, 112, 120, 156, 193, 75, 249, 218, 32, 223, 126, 33, 59, 78, 244, 98, 174, 222, 77, 44, 195, 203, 175, 42, 240, 70, 22, 136, 109, 114, 138, 140, 235, 183, 199, 26, 168, 116, 137, 234, 209, 115, 35, 203, 114, 93, 68, 215, 176, 144, 23, 228, 93, 179, 4, 114, 7, 246, 4, 61, 109, 245, 11, 196, 84, 102, 135, 7, 240, 229, 203, 24, 42, 51, 79, 74, 161, 190, 73, 138, 193, 39, 249, 161, 50, 12, 26, 187, 188, 197, 175, 206, 231, 73, 141, 105, 146, 125, 117, 60, 187, 149, 237, 179, 10, 169, 145, 220, 173, 210, 125, 213, 12, 27, 93, 92, 30, 31, 16, 77, 136, 187, 181, 17, 216, 99, 216, 212, 119, 81, 5, 161, 28, 168, 251, 8, 181, 144, 14, 79, 39, 250, 40, 130, 204, 169, 240, 88, 184, 144, 211, 17, 175, 38, 49, 16, 198, 77, 11, 176, 110, 86, 44, 197, 171, 124, 3, 55, 38, 176, 140, 25, 239, 68, 138, 215, 86, 233, 62, 128, 165, 24, 77, 224, 56, 190, 172, 155, 187, 99, 118, 247, 26, 110, 203, 240, 93, 44, 61, 217, 3, 143, 241, 129, 245, 150, 124, 81, 110, 247, 208, 55, 52, 191, 164, 233, 81, 158, 82, 27, 209, 230, 76, 38, 205, 162, 105, 24, 156, 19, 99, 240, 91, 145, 189, 21, 246, 52, 88, 34, 40, 148, 154, 167, 237, 143, 217, 95, 234, 166, 123, 83, 252, 112, 98, 131, 172, 155, 75, 145, 169, 195, 186, 27, 113, 157, 43, 165, 212, 162, 226, 141, 59, 159, 118, 45, 185, 181, 117, 156, 234, 253, 116, 218, 216, 104, 143, 240, 78, 23, 153, 253, 146, 30, 250, 178, 83, 45, 218, 5, 112, 79, 129, 253, 143, 98, 247, 223, 177, 100, 69, 119, 48, 77, 109, 119, 126, 36, 93, 218, 194, 185, 173, 1, 26, 201, 234, 178, 199, 62, 1, 241, 61, 241, 30, 139, 229, 140, 248, 59, 1, 110, 251, 231, 114, 46, 199, 226, 49, 169, 68, 44, 68, 201, 225, 102, 238, 193, 99, 48, 59, 158, 39, 216, 179, 176, 112, 237, 113, 193, 186, 180, 234, 167, 56, 122, 172, 141, 217, 120, 39, 6, 87, 131, 1, 131, 170, 219, 224, 141, 72, 17, 119, 141, 14, 227, 44, 96, 225, 214, 7, 146, 157, 53, 148, 235, 50, 255, 233, 168, 213, 123, 54, 39, 157, 248, 33, 96, 44, 212, 228, 226, 237, 89, 29, 211, 175, 62, 33, 104, 31, 99, 17, 22, 7, 240, 115, 62, 57, 60, 219, 205, 111, 66, 132, 3, 229, 25, 185, 220, 150, 66, 46, 40, 153, 144, 55, 188, 142, 93, 232, 165, 144, 174, 36, 121, 77, 76, 136, 184, 210, 159, 157, 42, 136, 148, 208, 51, 13, 68, 208, 114, 94, 170, 164, 176, 212, 253, 145, 88, 141, 95, 155, 36, 116, 44, 171, 229, 192, 40, 186, 65, 56, 121, 1, 28, 140, 119, 100, 59, 69, 176, 122, 230, 80, 34, 104, 59, 40, 4, 102, 141, 185, 30, 98, 187, 67, 6, 104, 227, 10, 26, 215, 129, 59, 245, 1, 98, 209, 141, 124, 38, 69, 217, 130, 192, 38, 47, 84, 90, 193, 246, 72, 188, 82, 49, 243, 227, 195, 77, 105, 250, 80, 52, 221, 45, 255, 117, 98, 59, 232, 54, 246, 99, 14, 21, 202, 60, 139, 202, 25, 127, 237, 191, 107, 178, 246, 29, 150, 4, 212, 114, 97, 165, 128, 221, 16, 96, 94, 208, 159, 6, 187, 238, 5, 236, 1, 218, 137, 212, 115, 66, 49, 102, 160, 96, 40, 166, 168, 139, 60, 233, 125, 86, 86, 205, 105, 69, 171, 180, 218, 20, 253, 75, 122, 138, 96, 219, 182, 154, 154, 100, 177, 203, 186, 80, 123, 177, 228, 25, 20, 109, 73, 230, 18, 152, 149, 77, 236, 206, 93, 129, 78, 202, 168, 46, 175, 5, 169, 111, 253, 53, 205, 171, 149, 128, 121, 199, 126, 62, 234, 54, 20, 40, 109, 7, 236, 78, 100, 37, 8, 7, 114, 246, 254, 96, 249, 49, 126, 15, 201, 187, 227, 182, 123, 128, 160, 251, 60, 175, 210, 173, 202, 210, 182, 212, 250, 159, 250, 77, 119, 190, 51, 131, 211, 202, 25, 196, 98, 138, 105, 174, 177, 215, 24, 210, 54, 160, 138, 146, 94, 195, 109, 52, 202, 245, 24, 182, 196, 183, 62, 13, 135, 247, 122, 16, 77, 91, 138, 95, 164, 120, 80, 248, 223, 20, 251, 193, 179, 27, 59, 143, 202, 97, 166, 110, 183, 60, 220, 186, 243, 251, 103, 171, 213, 211, 122, 57, 148, 107, 56, 15, 1, 210, 146, 106, 145, 243, 7, 82, 41, 46, 236, 106, 227, 209, 8, 232, 144, 33, 126, 208, 5, 126, 140, 35, 222, 194, 131, 45, 68, 66, 248, 180, 70, 179, 149, 193, 46, 28, 216, 120, 126, 24, 181, 117, 222, 107, 185, 178, 136, 203, 255, 220, 28, 249, 20, 149, 33, 34, 33, 68, 48, 145, 145, 59, 74, 204, 44, 35, 31, 64, 42, 193, 60, 158, 126, 127, 139, 86, 140, 68, 44, 61, 219, 255, 195, 38, 114, 4, 254, 162, 128, 209, 79, 21, 100, 119, 113, 79, 157, 158, 149, 57, 75, 101, 182, 26, 208, 208, 158, 179, 173, 47, 202, 86, 118, 151, 34, 93, 58, 70, 149, 13, 16, 10, 78, 1, 78, 184, 130, 5, 252, 105, 112, 151, 185, 233, 97, 216, 107, 231, 39, 229, 82, 74, 87, 123, 151, 130, 29, 43, 242, 113, 37, 6, 106, 49, 96, 5, 148, 197, 94, 25, 230, 201, 33, 4, 224, 111, 173, 122, 24, 78, 62, 1, 27, 95, 108, 9, 38, 223, 187, 140, 171, 201, 106, 30, 221, 93, 161, 167, 13, 18, 26, 34, 150, 13, 145, 153, 78, 229, 17, 68, 112, 240, 145, 201, 78, 165, 28, 176, 141, 87, 231, 94, 178, 53, 141, 18, 113, 35, 148, 124, 109, 58, 29, 66, 162, 241, 254, 135, 233, 158, 248, 122, 169, 99, 25, 50, 199, 221, 51, 106, 128, 113, 20, 89, 202, 15, 179, 248, 105, 136, 108, 210, 112, 229, 219, 124, 235, 56, 28, 79, 51, 5, 113, 247, 144, 10, 246, 242, 157, 22, 96, 129, 227, 207, 94, 184, 228, 70, 233, 161, 251, 238, 183, 127, 186, 189, 188, 221, 17, 164, 19, 182, 0, 244, 239, 7, 159, 107, 197, 192, 111, 152, 246, 228, 76, 175, 85, 121, 50, 42, 58, 41, 255, 24, 232, 186, 248, 78, 16, 76, 150, 135, 27, 142, 139, 124, 71, 233, 179, 150, 169, 187, 48, 159, 251, 12, 1, 237, 254, 206, 205, 102, 110, 149, 89, 201, 32, 167, 175, 95, 164, 81, 241, 169, 109, 157, 118, 155, 187, 144, 68, 59, 149, 229, 42, 41, 165, 122, 229, 28, 202, 147, 230, 41, 235, 156, 169, 38, 98, 98, 246, 185, 128, 193, 89, 153, 145, 144, 23, 254, 65, 39, 67, 23, 156, 150, 101, 198, 81, 167, 254, 162, 5, 249, 229, 109, 44, 165, 104, 225, 118, 207, 209, 159, 218, 24, 45, 23, 18, 86, 2, 147, 14, 60, 123, 246, 209, 58, 238, 139, 155, 65, 94, 189, 206, 5, 254, 235, 71, 227, 202, 29, 22, 113, 92, 231, 202, 135, 37, 95, 181, 97, 49, 115, 34, 182, 20, 89, 74, 103, 157, 241, 156, 72, 143, 139, 67, 173, 121, 178, 60, 224, 131, 252, 202, 143, 105, 248, 27, 228, 205, 86, 185, 228, 80, 182, 193, 245, 145, 90, 69, 64, 170, 11, 212, 83, 9, 88, 208, 69, 7, 205, 249, 28, 143, 219, 14, 44, 8, 17, 60, 183, 145, 188, 150, 96, 73, 162, 18, 99, 76, 127, 250, 184, 88, 163, 190, 142, 181, 228, 201, 139, 232, 64, 104, 192, 190, 133, 223, 65, 127, 136, 118, 55, 165, 135, 27, 86, 178, 111, 204, 108, 212, 104, 32, 86, 97, 172, 173, 65, 55, 229, 34, 13, 244, 226, 159, 47, 223, 72, 73, 11, 138, 231, 163, 37, 21, 57, 131, 18, 125, 36, 117, 14, 63, 243, 80, 185, 100, 6, 209, 176, 177, 33, 20, 199, 209, 252, 237, 142, 20, 203, 96, 252, 96, 100, 14, 74, 150, 64, 164, 238, 105, 113, 141, 98, 255, 39, 180, 245, 55, 5, 120, 52, 187, 94, 190, 42, 50, 121, 247, 203, 222, 175, 181, 176, 231, 65, 162, 100, 46, 230, 60, 123, 30, 26, 248, 202, 86, 191, 46, 165, 187, 135, 58, 173, 220, 94, 61, 34, 89, 58, 159, 132, 11, 50, 17, 200, 246, 55, 216, 174, 234, 13, 124, 224, 211, 211, 186, 204, 239, 2, 13, 165, 208, 104, 167, 101, 222, 100, 92, 229, 13, 175, 202, 116, 5, 209, 54, 132, 59, 187, 207, 113, 222, 167, 40, 173, 48, 127, 101, 93, 65, 158, 206, 147, 146, 84, 223, 205, 33, 79, 123, 58, 243, 124, 239, 173, 4, 197, 82, 202, 68, 123, 4, 252, 216, 133, 20, 57, 44, 223, 77, 143, 222, 221, 139, 225, 104, 249, 232, 151, 59, 58, 16, 182, 62, 0, 130, 128, 181, 114, 38, 230, 37, 190, 250, 157, 184, 161, 97, 43, 188, 46, 66, 42, 85, 129, 175, 35, 23, 176, 142, 227, 201, 210, 8, 214, 215, 80, 97, 169, 164, 58, 109, 68, 72, 163, 239, 137, 251, 7, 156, 106, 146, 160, 27, 160, 110, 151, 252, 90, 204, 172, 223, 98, 160, 235, 102, 43, 208, 172, 26, 109, 49, 4, 236, 226, 95, 217, 79, 158, 240, 86, 15, 165, 70, 212, 170, 139, 161, 94, 221, 29, 167, 159, 166, 217, 126, 1, 151, 235, 142, 221, 160, 252, 193, 71, 95, 125, 215, 91, 161, 43, 108, 54, 255, 40, 80, 228, 125, 12, 85, 187, 32, 66, 70, 127, 238, 163, 8, 105, 165, 101, 135, 163, 65, 110, 74, 237, 104, 218, 13, 171, 244, 231, 41, 44, 143, 140, 28, 195, 48, 194, 173, 168, 42, 245, 80, 95, 105, 133, 218, 115, 134, 177, 201, 242, 130, 70, 51, 34, 86, 34, 30, 163, 9, 20, 60, 103, 212, 240, 42, 200, 196, 59, 3, 233, 217, 111, 52, 189, 147, 170, 132, 124, 196, 239, 95, 157, 186, 17, 192, 237, 45, 27, 91, 131, 37, 144, 213, 160, 188, 238, 124, 254, 208, 153, 24, 39, 73, 204, 93, 77, 83, 36, 3, 217, 228, 221, 201, 187, 198, 178, 108, 68, 139, 176, 2, 62, 186, 218, 77, 93, 242, 239, 155, 161, 96, 81, 32, 203, 241, 109, 242, 244, 47, 19, 53, 16, 187, 74, 69, 58, 0, 41, 84, 3, 82, 36, 95, 182, 65, 81, 27, 49, 210, 128, 212, 191, 126, 25, 248, 4, 34, 69, 70, 103, 180, 69, 153, 251, 209, 102, 140, 188, 55, 5, 247, 7, 41, 201, 244, 221, 68, 245, 138, 176, 0, 224, 65, 192, 144, 19, 246, 110, 36, 223, 167, 83, 198, 212, 165, 226, 246, 131, 222, 128, 162, 213, 18, 60, 204, 84, 204, 138, 127, 231, 222, 127, 175, 16, 34, 137, 39, 88, 179, 0, 230, 140, 41, 228, 101, 121, 29, 41, 101, 158, 181, 181, 181, 191, 184, 242, 43, 248, 193, 154, 61, 240, 254, 61, 67, 84, 217, 187, 156, 218, 34, 48, 21, 20, 141, 108, 180, 181, 96, 9, 70, 179, 174, 187, 14, 254, 96, 95, 99, 56, 188, 31, 138, 222, 22, 70, 40, 178, 80, 155, 68, 177, 97, 80, 202, 89, 129, 129, 137, 5, 213, 143, 197, 97, 13, 53, 62, 165, 231, 111, 92, 74, 124, 28, 235, 216, 139, 188, 198, 26, 13, 8, 145, 108, 101, 10, 50, 191, 235, 48, 213, 41, 75, 37, 131, 83, 241, 41, 206, 227, 148, 70, 111, 96, 134, 246, 130, 210, 60, 199, 247, 5, 109, 116, 83, 231, 205, 80, 22, 183, 11, 6, 37, 147, 217, 100, 133, 42, 248, 127, 64, 167, 233, 155, 239, 117, 111, 170, 134, 68, 113, 160, 176, 180, 142, 80, 35, 97, 145, 254, 168, 183, 229, 188, 199, 187, 75, 131, 62, 132, 83, 222, 11, 5, 75, 183, 37, 159, 28, 13, 127, 16, 96, 27, 173, 186, 235, 55, 248, 139, 66, 23, 230, 158, 131, 110, 18, 59, 2, 196, 132, 23, 151, 205, 54, 185, 249, 171, 202, 3, 163, 154, 237, 53, 118, 192, 181, 244, 168, 47, 249, 208, 192, 185, 89, 172, 212, 174, 201, 35, 28, 217, 205, 252, 200, 139, 165, 50, 199, 90, 114, 203, 187, 231, 21, 236, 95, 89, 150, 121, 18, 123, 219, 27, 51, 86, 226, 204, 147, 77, 211, 252, 148, 79, 187, 65, 64, 208, 203, 150, 41, 35, 65, 64, 9, 33, 160, 93, 15, 147, 152, 103, 172, 154, 173, 75, 171, 20, 201, 248, 18, 10, 37, 239, 149, 252, 35, 247, 129, 57, 206, 211, 18, 140, 94, 156, 0, 29, 253, 220, 239, 65, 91, 93, 140, 250, 180, 155, 206, 62, 245, 243, 227, 32, 98, 80, 122, 232, 63, 0, 134, 147, 241, 113, 251, 203, 180, 135, 188, 253, 251, 255, 173, 194, 218, 182, 92, 231, 81, 129, 202, 236, 43, 205, 230, 167, 163, 126, 65, 146, 62, 145, 24, 127, 208, 139, 221, 207, 239, 76, 173, 42, 26, 63, 19, 162, 99, 160, 31, 120, 14, 228, 44, 11, 131, 90, 67, 71, 159, 239, 9, 127, 81, 45, 91, 204, 18, 249, 180, 131, 240, 183, 123, 249, 129, 108, 253, 19, 146, 164, 154, 160, 226, 214, 232, 87, 156, 77, 151, 128, 3, 172, 94, 186, 229, 228, 54, 78, 156, 30, 188, 220, 213, 17, 118, 114, 139, 58, 100, 108, 210, 204, 188, 219, 103, 70, 16, 80, 32, 146, 35, 186, 174, 234, 55, 68, 236, 213, 47, 174, 182, 134, 237, 40, 115, 64, 68, 74, 169, 205, 134, 92, 205, 201, 214, 56, 98, 30, 16, 100, 234, 223, 200, 105, 191, 75, 46, 142, 59, 121, 238, 116, 99, 171, 235, 97, 211, 40, 70, 242, 198, 85, 40, 48, 172, 31, 57, 152, 181, 94, 164, 210, 210, 27, 177, 22, 52, 222, 229, 100, 191, 197, 213, 129, 65, 39, 6, 162, 114, 223, 187, 114, 180, 62, 1, 25, 126, 170, 8, 239, 11, 224, 211, 117, 191, 187, 7, 213, 234, 70, 168, 130, 195, 120, 95, 74, 213, 85, 152, 103, 130, 188, 153, 63, 84, 208, 31, 110, 207, 79, 175, 231, 142, 247, 187, 174, 223, 138, 221, 139, 254, 215, 82, 149, 130, 94, 115, 161, 174, 102, 52, 113, 50, 206, 173, 218, 25, 229, 85, 184, 96, 45, 65, 31, 122, 250, 55, 168, 83, 20, 63, 70, 72, 206, 32, 133, 154, 104, 147, 162, 252, 221, 175, 28, 170, 72, 16, 28, 247, 163, 178, 197, 252, 119, 199, 110, 207, 71, 243, 26, 242, 189, 13, 181, 47, 115, 112, 214, 123, 143, 244, 156, 247, 177, 139, 159, 26, 115, 150, 32, 71, 227, 251, 113, 179, 170, 150, 162, 134, 78, 243, 113, 193, 221, 43, 251, 44, 45, 80, 54, 64, 20, 115, 232, 133, 169, 247, 49, 34, 11, 9, 189, 52, 183, 189, 242, 61, 164, 44, 23, 51, 234, 80, 202, 184, 0, 37, 156, 75, 183, 250, 53, 37, 232, 52, 140, 179, 245, 222, 178, 182, 13, 188, 118, 68, 52, 0, 104, 60, 108, 40, 19, 170, 74, 65, 222, 73, 193, 212, 104, 72, 46, 48, 139, 254, 212, 232, 209, 179, 220, 102, 220, 173, 242, 43, 12, 127, 73, 201, 105, 62, 122, 156, 122, 83, 165, 33, 5, 196, 125, 107, 162, 120, 194, 235, 151, 246, 148, 227, 33, 112, 157, 111, 9, 3, 77, 71, 92, 214, 144, 41, 177, 118, 233, 159, 59, 40, 97, 194, 114, 106, 69, 178, 21, 4, 29, 64, 90, 190, 93, 59, 95, 151, 216, 162, 123, 248, 111, 112, 84, 67, 79, 171, 46, 140, 99, 175, 62, 136, 147, 31, 175, 252, 201, 194, 208, 183, 29, 165, 201, 202, 208, 196, 163, 148, 246, 103, 157, 223, 250, 210, 108, 215, 161, 72, 189, 102, 243, 2, 29, 173, 107, 21, 221, 118, 95, 192, 75, 31, 50, 16, 2, 182, 130, 85, 142, 54, 31, 249, 24, 223, 59, 159, 91, 43, 247, 226, 4, 119, 191, 126, 227, 13, 159, 128, 236, 6, 249, 40, 103, 247, 207, 154, 215, 41, 33, 135, 72, 70, 134, 162, 56, 112, 16, 81, 42, 18, 193, 65, 114, 226, 8, 147, 1, 228, 1, 29, 153, 211, 7, 223, 133, 246, 171, 15, 234, 137, 87, 13, 82, 57, 123, 35, 24, 180, 179, 75, 105, 73, 43, 253, 160, 125, 249, 119, 51, 165, 75, 11, 119, 8, 159, 232, 132, 2, 65, 136, 47, 224, 149, 177, 204, 251, 113, 180, 9, 177, 192, 141, 219, 100, 105, 85, 238, 163, 254, 53, 8, 167, 26, 85, 67, 193, 26, 104, 8, 64, 246, 88, 32, 3, 63, 44, 48, 83, 191, 136, 109, 238, 98, 104, 52, 9, 53, 149, 245, 230, 1, 33, 62, 198, 212, 5, 175, 207, 14, 56, 218, 23, 1, 28, 2, 167, 229, 147, 10, 69, 71, 131, 24, 244, 34, 177, 141, 242, 225, 163, 245, 65, 67, 104, 63, 242, 230, 145, 162, 124, 149, 63, 229, 175, 215, 109, 75, 203, 38, 15, 154, 57, 136, 148, 105, 173, 192, 241, 140, 72, 240, 20, 96, 121, 178, 123, 81, 125, 107, 200, 106, 195, 120, 78, 11, 62, 204, 167, 196, 195, 86, 62, 201, 79, 12, 21, 207, 0, 86, 180, 134, 119, 106, 158, 64, 214, 186, 182, 244, 138, 130, 138, 219, 129, 236, 154, 187, 16, 209, 48, 77, 254, 70, 134, 25, 217, 70, 247, 161, 142, 109, 147, 143, 39, 177, 29, 196, 66, 238, 35, 27, 1, 223, 228, 123, 34, 75, 217, 245, 103, 117, 121, 153, 2, 55, 180, 105, 244, 139, 142, 228, 45, 102, 191, 138, 191, 82, 44, 205, 29, 218, 134, 208, 182, 85, 73, 29, 154, 215, 175, 3, 216, 85, 86, 31, 81, 93, 86, 83, 212, 40, 215, 182, 23, 89, 207, 115, 107, 201, 134, 159, 168, 84, 19, 120, 16, 105, 20, 240, 194, 159, 15, 19, 78, 170, 163, 140, 98, 251, 18, 179, 182, 253, 189, 129, 86, 173, 54, 238, 60, 86, 163, 119, 179, 77, 164, 140, 100, 32, 221, 135, 1, 147, 86, 160, 252, 82, 90, 143, 208, 236, 183, 190, 97, 183, 53, 56, 122, 191, 140, 108, 203, 59, 154, 91, 171, 53, 95, 240, 35, 212, 237, 232, 210, 182, 242, 216, 124, 230, 130, 241, 196, 51, 238, 193, 152, 72, 87, 247, 157, 89, 124, 223, 17, 148, 90, 17, 48, 129, 158, 221, 63, 20, 196, 116, 192, 4, 39, 121, 173, 94, 110, 211, 83, 2, 199, 175, 184, 39, 197, 57, 149, 191, 72, 240, 137, 222, 23, 138, 141, 172, 205, 185, 28, 119, 59, 58, 131, 150, 25, 53, 26, 59, 130, 84, 147, 108, 166, 150, 232, 45, 4, 190, 219, 62, 164, 74, 147, 76, 49, 33, 40, 193, 63, 78, 51, 43, 120, 186, 33, 27, 45, 126, 85, 13, 36, 252, 15, 178, 40, 129, 172, 28, 24, 225, 195, 138, 195, 112, 190, 255, 78, 84, 32, 170, 46, 150, 13, 228, 115, 21, 120, 25, 225, 15, 57, 9, 148, 36, 211, 230, 215, 123, 83, 177, 122, 95, 91, 47, 185, 33, 147, 26, 75, 254, 238, 126, 3, 107, 109, 222, 154, 141, 249, 178, 202, 124, 31, 86, 22, 239, 8, 173, 128, 245, 182, 119, 122, 235, 139, 105, 31, 146, 168, 67, 246, 163, 143, 23, 112, 231, 232, 105, 66, 158, 21, 126, 107, 103, 139, 81, 93, 45, 133, 47, 102, 1, 42, 231, 147, 247, 195, 225, 157, 3, 57, 139, 240, 208, 63, 144, 21, 222, 205, 135, 90, 92, 68, 51, 79, 161, 208, 214, 48, 36, 153, 23, 72, 81, 118, 109, 238, 118, 25, 192, 51, 42, 114, 1, 86, 87, 45, 152, 166, 224, 89, 174, 76, 205, 226, 121, 108, 102, 66, 253, 77, 49, 8, 133, 97, 14, 87, 231, 235, 130, 159, 234, 141, 144, 255, 208, 2, 17, 204, 91, 238, 23, 173, 104, 50, 124, 176, 29, 107, 122, 66, 125, 166, 159, 249, 250, 36, 191, 93, 194, 252, 75, 37, 89, 244, 232, 245, 50, 193, 103, 47, 87, 1, 84, 54, 87, 18, 242, 170, 96, 163, 51, 99, 235, 199, 35, 105, 153, 164, 106, 140, 34, 7, 238, 33, 237, 40, 142, 68, 161, 0, 69, 44, 11, 151, 116, 70, 232, 236, 128, 125, 0, 85, 94, 105, 220, 27, 227, 227, 162, 108, 230, 2, 50, 100, 228, 155, 43, 8, 114, 202, 212, 211, 221, 253, 220, 203, 56, 236, 204, 29, 238, 155, 37, 241, 176, 210, 86, 182, 98, 230, 211, 75, 26, 182, 53, 15, 66, 137, 67, 1, 86, 51, 67, 195, 231, 1, 177, 201, 37, 80, 138, 137, 221, 86, 239, 232, 49, 197, 80, 12, 87, 85, 219, 31, 7, 118, 13, 110, 158, 212, 41, 172, 199, 70, 43, 194, 201, 4, 47, 192, 0, 41, 49, 195, 142, 146, 70, 128, 41, 253, 80, 248, 23, 69, 47, 52, 128, 160, 72, 213, 59, 106, 230, 232, 101, 43, 84, 115, 205, 195, 153, 37, 75, 0, 75, 135, 210, 163, 89, 227, 206, 205, 116, 229, 92, 64, 125, 62, 144, 90, 105, 217, 53, 250, 244, 244, 16, 95, 177, 67, 173, 138, 41, 141, 47, 25, 127, 134, 44, 127, 31, 124, 78, 102, 22, 40, 96, 52, 131, 158, 9, 137, 169, 133, 204, 232, 19, 41, 75, 98, 56, 7, 120, 74, 89, 96, 140, 217, 50, 104, 14, 155, 110, 108, 86, 45, 101, 175, 229, 14, 81, 141, 146, 146, 223, 105, 90, 8, 2, 89, 253, 144, 189, 186, 230, 130, 154, 202, 41, 184, 189, 115, 40, 79, 26, 204, 51, 152, 255, 63, 141, 234, 155, 201, 114, 189, 131, 206, 241, 228, 3, 192, 95, 199, 31, 40, 91, 10, 38, 255, 88, 167, 82, 186, 240, 118, 70, 246, 32, 63, 147, 75, 104, 127, 219, 36, 11, 119, 63, 42, 117, 103, 159, 6, 124, 75, 212, 36, 205, 77, 89, 96, 176, 90, 79, 28, 3, 145, 86, 141, 151, 63, 242, 89, 213, 162, 191, 97, 225, 165, 227, 203, 28, 236, 177, 178, 219, 123, 201, 57, 12, 195, 240, 165, 103, 255, 23, 255, 233, 28, 140, 129, 223, 2, 225, 238, 233, 69, 168, 33, 101, 45, 155, 19, 0, 25, 83, 143, 129, 47, 23, 63, 99, 106, 122, 14, 14, 28, 149, 202, 63, 50, 233, 65, 237, 68, 89, 154, 175, 36, 15, 240, 157, 97, 159, 125, 242, 10, 103, 19, 62, 232, 167, 79, 124, 133, 174, 78, 71, 137, 93, 213, 221, 88, 226, 198, 84, 159, 76, 107, 39, 139, 147, 120, 254, 88, 157, 105, 16, 44, 95, 193, 203, 70, 243, 107, 202, 253, 252, 237, 228, 6, 192, 75, 164, 171, 213, 203, 109, 253, 178, 201, 194, 157, 113, 160, 211, 90, 99, 78, 72, 182, 14, 80, 158, 27, 122, 74, 227, 131, 238, 15, 120, 34, 91, 76, 245, 222, 30, 187, 248, 46, 141, 12, 144, 89, 42, 166, 162, 138, 21, 157, 149, 135, 136, 133, 238, 188, 165, 32, 35, 43, 54, 227, 22, 210, 20, 173, 221, 238, 39, 234, 7, 132, 233, 75, 168, 32, 89, 123, 112, 3, 144, 229, 25, 191, 97, 168, 191, 99, 78, 118, 62, 101, 154, 209, 174, 79, 210, 180, 220, 204, 58, 116, 225, 252, 18, 188, 254, 42, 88, 102, 145, 168, 140, 100, 253, 62, 202, 219, 154, 233, 204, 34, 101, 20, 148, 24, 221, 6, 171, 233, 174, 206, 215, 32, 40, 44, 51, 40, 13, 240, 250, 98, 133, 15, 194, 20, 108, 198, 63, 81, 73, 253, 185, 162, 1, 190, 10, 245, 21, 21, 215, 179, 0, 67, 225, 137, 139, 48, 108, 140, 97, 235, 142, 176, 161, 184, 10, 7, 250, 43, 147, 234, 49, 101, 28, 231, 178, 241, 55, 207, 81, 221, 106, 175, 46, 141, 57, 84, 208, 111, 82, 62, 188, 105, 18, 251, 122, 6, 51, 194, 48, 199, 25, 237, 64, 211, 90, 25, 233, 179, 46, 192, 181, 79, 73, 170, 137, 162, 214, 194, 61, 141, 241, 170, 124, 18, 191, 236, 182, 122, 130, 247, 96, 155, 41, 23, 194, 111, 69, 94, 64, 196, 154, 252, 214, 235, 201, 223, 140, 130, 125, 191, 133, 205, 252, 178, 4, 178, 210, 161, 155, 253, 219, 143, 175, 18, 8, 147, 13, 30, 70, 88, 149, 55, 166, 15, 191, 227, 110, 209, 72, 189, 137, 231, 51, 254, 88, 99, 46, 64, 6, 218, 51, 246, 144, 29, 128, 41, 95, 205, 120, 7, 182, 161, 77, 141, 106, 131, 116, 56, 171, 76, 85, 159, 124, 36, 246, 142, 47, 161, 14, 156, 95, 147, 90, 221, 28, 233, 190, 52, 58, 116, 115, 104, 245, 64, 249, 200, 150, 108, 168, 35, 44, 185, 62, 224, 72, 79, 213, 241, 154, 175, 232, 125, 25, 225, 212, 58, 53, 35, 66, 90, 180, 71, 114, 224, 186, 2, 119, 78, 95, 29, 177, 148, 217, 77, 106, 178, 8, 188, 85, 192, 232, 167, 178, 201, 193, 175, 70, 44, 78, 16, 50, 186, 66, 53, 117, 204, 97, 185, 62, 145, 133, 22, 115, 69, 195, 207, 151, 95, 206, 225, 226, 20, 117, 121, 129, 159, 61, 205, 11, 128, 238, 25, 219, 155, 10, 66, 153, 37, 156, 73, 77, 10, 10, 48, 47, 21, 86, 83, 26, 154, 191, 212, 2, 62, 6, 165, 113, 17, 90, 34, 134, 0, 193, 135, 152, 143, 99, 107, 9, 64, 124, 39, 169, 43, 198, 195, 114, 143, 33, 235, 70, 216, 154, 14, 69, 126, 122, 250, 239, 217, 207, 73, 68, 126, 210, 107, 123, 78, 85, 1, 51, 163, 64, 81, 71, 130, 196, 107, 228, 77, 191, 168, 48, 9, 167, 18, 247, 117, 41, 83, 81, 249, 9, 93, 237, 150, 90, 166, 10, 89, 74, 235, 13, 110, 124, 33, 223, 51, 38, 54, 142, 128, 112, 196, 106, 135, 133, 181, 231, 237, 71, 171, 188, 15, 149, 92, 13, 251, 228, 177, 201, 160, 18, 201, 49, 29, 198, 139, 25, 40, 247, 56, 163, 84, 42, 133, 230, 54, 68, 187, 75, 178, 177, 46, 155, 91, 208, 111, 90, 160, 82, 243, 47, 22, 250, 158, 156, 29, 74, 46, 3, 134, 188, 129, 49, 143, 42, 209, 149, 197, 145, 71, 111, 37, 226, 95, 233, 216, 34, 63, 62, 133, 172, 154, 105, 162, 196, 15, 45, 167, 25, 248, 69, 136, 57, 47, 69, 39, 238, 170, 227, 55, 183, 154, 107, 37, 65, 191, 14, 54, 8, 50, 141, 113, 101, 27, 82, 210, 110, 241, 89, 216, 63, 44, 86, 161, 30, 25, 53, 46, 18, 123, 60, 159, 30, 70, 214, 255, 112, 53, 119, 53, 191, 71, 164, 70, 43, 202, 54, 158, 97, 78, 1, 254, 214, 31, 82, 149, 145, 16, 27, 224, 47, 131, 30, 117, 107, 145, 153, 79, 129, 231, 126, 21, 185, 162, 244, 193, 194, 251, 218, 93, 225, 30, 116, 105, 20, 162, 101, 93, 242, 232, 26, 226, 112, 52, 181, 116, 241, 100, 177, 70, 177, 227, 247, 27, 73, 73, 39, 20, 12, 122, 156, 7, 151, 22, 94, 250, 206, 174, 172, 75, 160, 47, 205, 7, 184, 174, 122, 127, 60, 35, 36, 225, 13, 91, 231, 194, 18, 117, 170, 218, 151, 30, 33, 75, 234, 243, 163, 33, 242, 233, 143, 107, 12, 140, 193, 51, 14, 48, 220, 84, 220, 195, 102, 16, 200, 206, 79, 144, 216, 41, 238, 47, 83, 60, 108, 212, 156, 124, 152, 52, 166, 62, 173, 225, 137, 167, 245, 152, 8, 199, 166, 205, 241, 59, 248, 18, 89, 15, 190, 237, 223, 186, 99, 112, 172, 64, 43, 8, 90, 88, 105, 117, 185, 191, 65, 110, 156, 212, 132, 29, 193, 59, 144, 104, 34, 163, 242, 22, 96, 119, 49, 107, 157, 68, 245, 210, 159, 22, 231, 1, 13, 254, 208, 42, 135, 83, 101, 110, 44, 102, 163, 187, 92, 188, 48, 203, 173, 67, 241, 44, 200, 134, 161, 191, 12, 150, 200, 92, 179, 213, 97, 201, 59, 137, 48, 54, 181, 44, 28, 186, 29, 60, 34, 232, 181, 81, 165, 162, 225, 57, 64, 129, 209, 227, 113, 129, 225, 85, 20, 96, 72, 103, 199, 133, 94, 158, 233, 176, 159, 87, 89, 87, 3, 96, 109, 13, 213, 44, 128, 142, 191, 88, 251, 183, 220, 150, 134, 184, 84, 13, 137, 66, 9, 123, 93, 249, 10, 3, 234, 11, 253, 124, 149, 215, 51, 213, 18, 182, 44, 113, 132, 158, 64, 106, 82, 254, 53, 239, 93, 242, 230, 46, 250, 16, 26, 36, 32, 176, 222, 200, 246, 112, 41, 11, 149, 61, 86, 45, 228, 200, 236, 152, 64, 95, 33, 251, 148, 65, 139, 107, 77, 69, 0, 223, 26, 91, 225, 168, 201, 31, 219, 4, 108, 108, 88, 133, 3, 129, 204, 86, 137, 215, 70, 7, 132, 193, 152, 131, 48, 138, 68, 212, 50, 253, 113, 139, 126, 3, 218, 153, 39, 235, 215, 238, 116, 139, 225, 228, 74, 104, 157, 186, 239, 237, 31, 203, 66, 159, 57, 109, 196, 237, 200, 146, 243, 161, 43, 221, 166, 197, 82, 238, 141, 135, 31, 105, 163, 37, 209, 224, 111, 212, 26, 204, 31, 131, 98, 76, 161, 118, 229, 215, 11, 184, 114, 41, 180, 23, 184, 252, 5, 80, 32, 33, 106, 160, 73, 216, 94, 144, 22, 193, 141, 133, 24, 122, 60, 141, 96, 95, 40, 74, 139, 124, 189, 195, 242, 102, 58, 237, 108, 199, 140, 223, 147, 203, 153, 142, 214, 141, 142, 239, 94, 226, 72, 36, 155, 115, 110, 123, 165, 27, 241, 157, 3, 216, 65, 210, 173, 181, 126, 228, 34, 11, 10, 138, 226, 103, 1, 205, 87, 82, 99, 13, 82, 164, 2, 118, 23, 14, 219, 217, 13, 157, 18, 176, 208, 32, 188, 76, 141, 163, 148, 77, 233, 163, 187, 41, 167, 253, 97, 175, 230, 215, 101, 202, 219, 131, 226, 58, 242, 219, 198, 243, 34, 91, 174, 208, 176, 0, 90, 25, 188, 194, 116, 72, 49, 0, 57, 4, 31, 111, 171, 147, 104, 156, 62, 1, 181, 21, 245, 200, 142, 230, 90, 42, 217, 235, 118, 77, 196, 68, 27, 82, 94, 215, 33, 90, 102, 120, 241, 244, 96, 131, 236, 214, 14, 212, 59, 142, 208, 43, 26, 236, 244, 154, 175, 131, 167, 57, 76, 248, 88, 76, 152, 218, 67, 103, 228, 169, 249, 211, 83, 242, 105, 211, 114, 237, 137, 52, 232, 239, 255, 106, 73, 8, 141, 86, 81, 3, 248, 94, 84, 57, 131, 223, 37, 111, 191, 68, 225, 186, 125, 95, 204, 150, 107, 213, 211, 174, 164, 23, 120, 188, 192, 85, 89, 193, 224, 213, 195, 132, 167, 169, 189, 218, 233, 123, 60, 190, 194, 105, 146, 213, 190, 84, 4, 152, 232, 250, 52, 173, 127, 57, 150, 97, 107, 237, 253, 34, 49, 234, 79, 151, 230, 36, 177, 31, 88, 83, 198, 108, 3, 60, 108, 148, 159, 182, 167, 183, 39, 18, 227, 127, 151, 188, 204, 24, 116, 152, 55, 34, 69, 153, 82, 28, 4, 131, 221, 49, 128, 89, 10, 218, 10, 213, 203, 6, 225, 189, 181, 191, 237, 236, 151, 53, 186, 221, 193, 240, 246, 215, 92, 61, 167, 244, 235, 197, 214, 113, 241, 189, 37, 246, 132, 199, 204, 15, 246, 244, 205, 167, 180, 17, 20, 26, 193, 193, 238, 177, 218, 26, 173, 87, 190, 229, 219, 205, 112, 32, 143, 249, 79, 231, 10, 99, 207, 12, 199, 68, 27, 225, 105, 87, 20, 137, 28, 4, 148, 247, 12, 14, 177, 139, 211, 119, 164, 122, 219, 18, 152, 179, 73, 133, 72, 244, 135, 146, 60, 17, 120, 50, 237, 103, 69, 58, 196, 102, 245, 234, 238, 100, 104, 5, 210, 39, 178, 199, 101, 58, 36, 200, 68, 3, 208, 83, 125, 55, 58, 97, 241, 114, 60, 213, 122, 67, 195, 238, 113, 113, 48, 101, 98, 158, 187, 156, 119, 164, 54, 183, 138, 42, 199, 85, 162, 102, 139, 233, 155, 205, 74, 69, 190, 156, 120, 4, 42, 69, 26, 199, 130, 93, 237, 227, 101, 118, 126, 224, 108, 117, 131, 206, 41, 170, 205, 217, 79, 5, 100, 225, 162, 226, 130, 214, 145, 60, 35, 75, 206, 28, 218, 87, 137, 0, 171, 237, 224, 19, 23, 122, 120, 58, 209, 235, 105, 252, 136, 120, 150, 33, 190, 253, 191, 62, 124, 148, 173, 249, 176, 173, 119, 97, 227, 171, 227, 84, 59, 212, 156, 79, 47, 178, 27, 27, 126, 68, 227, 194, 125, 239, 64, 48, 54, 9, 73, 38, 212, 190, 94, 176, 22, 23, 9, 242, 67, 75, 82, 42, 96, 215, 66, 126, 13, 160, 212, 118, 247, 144, 73, 50, 131, 217, 82, 251, 147, 30, 30, 238, 175, 208, 51, 113, 246, 13, 192, 124, 6, 33, 23, 249, 199, 26, 211, 22, 130, 82, 223, 83, 179, 25, 106, 173, 254, 198, 111, 108, 216, 231, 201, 184, 120, 5, 99, 129, 152, 32, 72, 119, 165, 209, 75, 161, 43, 106, 54, 236, 174, 128, 43, 236, 3, 157, 0, 123, 95, 233, 206, 167, 26, 20, 165, 148, 136, 69, 138, 194, 135, 97, 143, 208, 62, 220, 17, 190, 17, 78, 122, 106, 14, 211, 91, 208, 76, 229, 249, 189, 101, 188, 230, 92, 49, 101, 59, 250, 76, 22, 103, 112, 153, 86, 177, 126, 129, 174, 34, 241, 78, 49, 169, 110, 150, 2, 245, 56, 161, 16, 212, 44, 116, 59, 181, 156, 62, 46, 252, 74, 82, 161, 242, 32, 55, 139, 204, 57, 122, 65, 94, 37, 187, 146, 76, 207, 226, 251, 80, 243, 126, 103, 170, 141, 13, 21, 81, 114, 85, 111, 145, 2, 115, 244, 47, 89, 220, 30, 36, 228, 137, 164, 116, 57, 232, 44, 90, 98, 0, 89, 84, 91, 229, 61, 152, 69, 70, 53, 179, 117, 254, 51, 108, 166, 156, 221, 174, 46, 72, 223, 145, 204, 196, 248, 150, 248, 60, 148, 111, 29, 92, 127, 87, 174, 132, 39, 195, 114, 132, 56, 72, 26, 118, 10, 86, 183, 172, 148, 105, 61, 149, 75, 116, 132, 251, 206, 47, 168, 85, 185, 219, 117, 186, 9, 200, 221, 232, 121, 50, 104, 96, 152, 189, 198, 109, 192, 120, 214, 89, 58, 75, 56, 56, 112, 87, 118, 138, 200, 233, 125, 22, 171, 140, 170, 80, 198, 160, 203, 150, 240, 75, 57, 83, 84, 110, 98, 228, 24, 140, 54, 105, 128, 116, 87, 118, 247, 159, 138, 236, 187, 2, 12, 242, 116, 215, 4, 96, 53, 57, 127, 149, 66, 205, 234, 20, 67, 197, 182, 198, 166, 172, 127, 152, 87, 101, 2, 120, 22, 179, 33, 44, 192, 248, 32, 116, 154, 161, 68, 2, 202, 42, 231, 30, 102, 147, 209, 228, 220, 26, 187, 248, 194, 47, 175, 82, 27, 3, 94, 226, 98, 243, 115, 121, 68, 241, 200, 98, 66, 88, 113, 23, 163, 30, 202, 195, 60, 245, 70, 107, 236, 66, 161, 122, 98, 22, 252, 180, 243, 38, 218, 222, 9, 73, 6, 31, 101, 5, 94, 49, 206, 239, 178, 54, 220, 16, 200, 1, 112, 28, 225, 17, 44, 28, 69, 187, 160, 152, 146, 212, 39, 152, 216, 138, 160, 211, 123, 136, 141, 73, 131, 122, 107, 233, 227, 244, 112, 80, 190, 164, 26, 173, 163, 128, 242, 218, 88, 254, 185, 48, 223, 31, 139, 97, 31, 59, 253, 157, 5, 177, 207, 106, 252, 229, 168, 8, 39, 200, 215, 57, 101, 222, 45, 202, 53, 119, 245, 113, 16, 246, 210, 93, 28, 62, 165, 106, 190, 171, 177, 67, 194, 180, 6, 179, 166, 105, 235, 157, 153, 165, 124, 185, 244, 115, 47, 163, 118, 193, 52, 150, 187, 255, 31, 28, 53, 70, 2, 253, 193, 126, 130, 199, 101, 126, 237, 249, 70, 82, 38, 187, 9, 87, 118, 228, 79, 220, 254, 209, 30, 189, 204, 207, 41, 81, 86, 111, 254, 165, 121, 226, 60, 146, 102, 193, 171, 42, 46, 110, 228, 15, 150, 140, 165, 7, 194, 113, 174, 194, 196, 166, 135, 59, 141, 93, 19, 201, 84, 66, 2, 132, 125, 242, 148, 238, 209, 115, 126, 234, 183, 95, 231, 79, 75, 86, 50, 4, 185, 213, 252, 1, 90, 100, 90, 44, 18, 138, 137, 178, 8, 166, 174, 200, 87, 126, 86, 25, 81, 60, 139, 26, 28, 123, 127, 156, 14, 125, 82, 132, 184, 218, 241, 96, 77, 90, 244, 246, 137, 2, 223, 82, 39, 11, 198, 68, 137, 199, 33, 105, 49, 100, 205, 25, 32, 121, 71, 161, 20, 88, 199, 91, 20, 146, 38, 135, 155, 165, 83, 54, 51, 170, 126, 87, 208, 205, 25, 117, 132, 62, 159, 158, 195, 152, 50, 171, 174, 176, 68, 140, 110, 225, 98, 197, 220, 79, 189, 94, 77, 36, 190, 19, 61, 45, 185, 231, 205, 223, 94, 156, 166, 69, 76, 7, 76, 168, 136, 1, 179, 113, 10, 191, 43, 201, 93, 5, 60, 191, 37, 45, 213, 222, 81, 117, 11, 178, 43, 214, 193, 59, 205, 93, 51, 104, 136, 46, 200, 58, 25, 50, 97, 97, 102, 58, 156, 217, 110, 202, 166, 62, 126, 10, 202, 117, 254, 250, 250, 4, 101, 68, 67, 213, 210, 142, 160, 65, 126, 214, 162, 53, 31, 252, 228, 175, 178, 230, 80, 131, 106, 49, 32, 118, 122, 171, 56, 238, 246, 189, 222, 200, 228, 112, 99, 93, 112, 110, 217, 7, 105, 239, 98, 109, 201, 29, 51, 88, 136, 207, 90, 148, 2, 119, 32, 253, 165, 250, 34, 23, 229, 61, 231, 133, 84, 236, 22, 79, 236, 143, 33, 193, 183, 55, 221, 173, 22, 22, 27, 160, 31, 53, 228, 173, 3, 55, 238, 91, 210, 129, 140, 93, 215, 90, 186, 207, 23, 54, 124, 181, 199, 0, 89, 101, 233, 243, 166, 120, 32, 245, 187, 85, 238, 28, 102, 71, 198, 178, 211, 227, 23, 201, 230, 161, 191, 21, 83, 245, 136, 11, 201, 121, 252, 193, 105, 111, 9, 111, 221, 157, 192, 181, 134, 209, 90, 171, 164, 112, 200, 181, 221, 63, 61, 229, 129, 21, 105, 186, 238, 231, 83, 90, 68, 54, 34, 47, 65, 169, 49, 224, 91, 155, 253, 236, 72, 77, 202, 240, 44, 65, 153, 103, 30, 78, 158, 216, 179, 123, 90, 252, 243, 229, 19, 5, 220, 39, 73, 112, 206, 141, 212, 159, 108, 177, 68, 247, 81, 153, 38, 152, 200, 149, 218, 151, 55, 10, 24, 226, 89, 249, 23, 129, 220, 54, 142, 94, 194, 144, 182, 172, 40, 118, 237, 44, 32, 112, 132, 244, 188, 93, 96, 252, 60, 202, 115, 170, 112, 15, 76, 131, 222, 85, 83, 143, 124, 219, 36, 219, 121, 126, 7, 212, 148, 194, 251, 235, 228, 7, 45, 55, 206, 155, 95, 27, 130, 68, 55, 4, 231, 88, 53, 229, 70, 160, 112, 49, 76, 15, 80, 170, 145, 210, 231, 250, 197, 113, 38, 151, 233, 193, 226, 30, 228, 53, 125, 80, 175, 219, 43, 34, 142, 190, 94, 127, 226, 111, 107, 69, 143, 61, 41, 98, 142, 76, 90, 93, 235, 245, 3, 118, 187, 245, 188, 103, 225, 251, 70, 220, 167, 38, 10, 175, 232, 165, 62, 166, 137, 31, 129, 83, 215, 53, 255, 7, 242, 74, 153, 185, 203, 6, 63, 172, 16, 251, 16, 56, 147, 43, 254, 2, 102, 205, 29, 25, 156, 244, 34, 34, 86, 204, 249, 29, 179, 246, 24, 118, 73, 114, 17, 185, 47, 21, 206, 24, 167, 136, 132, 105, 29, 199, 195, 254, 116, 80, 0, 181, 144, 144, 178, 223, 139, 82, 164, 48, 115, 22, 91, 228, 224, 98, 121, 113, 126, 96, 138, 224, 10, 195, 59, 105, 18, 185, 32, 192, 78, 244, 83, 139, 229, 153, 229, 41, 102, 148, 78, 48, 10, 224, 98, 249, 236, 148, 187, 201, 14, 161, 175, 75, 93, 242, 35, 185, 122, 87, 100, 155, 150, 26, 62, 87, 197, 84, 106, 114, 18, 202, 131, 63, 118, 7, 96, 94, 198, 249, 65, 115, 73, 237, 71, 235, 28, 110, 153, 198, 94, 24, 66, 175, 192, 225, 19, 92, 132, 4, 40, 224, 81, 196, 76, 207, 10, 138, 106, 50, 153, 138, 237, 165, 70, 204, 143, 34, 233, 93, 77, 213, 84, 157, 229, 158, 129, 4, 119, 44, 108, 99, 42, 205, 28, 99, 128, 96, 67, 110, 5, 94, 23, 174, 70, 133, 12, 152, 201, 60, 127, 71, 35, 141, 46, 234, 250, 246, 11, 226, 55, 228, 42, 102, 63, 253, 215, 47, 168, 189, 211, 59, 249, 116, 74, 183, 5, 246, 238, 20, 101, 33, 54, 66, 153, 96, 83, 147, 225, 112, 41, 106, 61, 245, 43, 206, 184, 4, 178, 107, 24, 121, 71, 54, 122, 105, 40, 171, 43, 58, 51, 26, 138, 90, 123, 123, 230, 127, 90, 169, 38, 131, 218, 240, 106, 137, 77, 52, 74, 107, 136, 173, 250, 103, 2, 46, 59, 6, 56, 173, 145, 29, 46, 254, 227, 16, 30, 151, 57, 19, 16, 146, 225, 89, 122, 199, 70, 245, 141, 176, 142, 193, 199, 185, 91, 208, 203, 182, 60, 21, 24, 58, 44, 150, 188, 71, 123, 126, 57, 83, 171, 232, 223, 96, 239, 161, 84, 125, 169, 82, 168, 9, 184, 176, 79, 113, 112, 209, 20, 6, 154, 71, 222, 20, 19, 213, 137, 138, 36, 187, 196, 209, 65, 26, 91, 34, 9, 48, 0, 160, 135, 32, 125, 90, 170, 35, 251, 188, 52, 179, 141, 28, 15, 60, 92, 28, 213, 141, 244, 49, 3, 140, 210, 108, 15, 125, 239, 127, 111, 79, 228, 114, 230, 199, 231, 117, 12, 253, 66, 176, 107, 230, 201, 211, 161, 184, 91, 89, 72, 195, 201, 76, 43, 9, 154, 46, 97, 3, 9, 131, 252, 117, 180, 21, 75, 251, 174, 207, 8, 242, 101, 252, 246, 97, 41, 73, 149, 54, 89, 229, 71, 197, 31, 138, 239, 244, 215, 165, 45, 224, 89, 15, 138, 17, 167, 254, 245, 151, 56, 224, 28, 77, 178, 14, 93, 53, 246, 87, 107, 71, 65, 113, 138, 207, 222, 173, 49, 174, 106, 27, 60, 247, 171, 99, 61, 251, 209, 156, 125, 152, 99, 151, 47, 55, 13, 209, 135, 223, 169, 254, 214, 211, 94, 226, 141, 246, 247, 222, 15, 11, 206, 177, 218, 205, 131, 56, 252, 197, 172, 198, 219, 251, 114, 168, 218, 133, 134, 98, 78, 1, 255, 137, 7, 170, 65, 34, 48, 243, 208, 200, 136, 110, 26, 14, 91, 80, 21, 68, 215, 146, 255, 124, 249, 66, 93, 104, 253, 4, 164, 190, 219, 95, 233, 225, 75, 117, 221, 121, 55, 171, 85, 130, 82, 1, 237, 130, 149, 168, 201, 220, 66, 87, 50, 189, 59, 147, 209, 81, 160, 87, 182, 32, 218, 51, 35, 20, 14, 108, 248, 11, 32, 151, 64, 77, 72, 252, 8, 47, 201, 228, 124, 15, 54, 80, 71, 18, 119, 52, 24, 1, 253, 150, 221, 201, 134, 92, 46, 9, 56, 66, 148, 147, 157, 138, 237, 130, 108, 61, 244, 135, 142, 18, 215, 106, 218, 211, 50, 229, 233, 56, 59, 129, 200, 254, 201, 248, 154, 209, 84, 169, 128, 185, 2, 191, 223, 151, 53, 250, 250, 122, 116, 54, 154, 194, 191, 125, 156, 29, 118, 231, 119, 250, 213, 139, 17, 29, 131, 147, 168, 208, 255, 137, 171, 175, 187, 53, 141, 120, 233, 250, 191, 113, 83, 201, 72, 23, 198, 219, 137, 128, 178, 7, 145, 88, 188, 252, 2, 139, 249, 202, 200, 44, 59, 43, 49, 32, 133, 185, 3, 180, 8, 220, 113, 175, 159, 200, 46, 197, 175, 183, 32, 222, 219, 43, 127, 232, 195, 135, 39, 152, 2, 68, 148, 87, 129, 43, 193, 151, 121, 141, 79, 144, 72, 91, 94, 254, 124, 126, 124, 212, 48, 160, 126, 206, 41, 135, 234, 46, 244, 4, 189, 28, 170, 47, 120, 154, 244, 72, 68, 99, 36, 250, 39, 103, 32, 190, 83, 187, 126, 231, 153, 171, 0, 43, 152, 45, 0, 194, 104, 107, 121, 159, 206, 97, 23, 241, 181, 11, 149, 225, 224, 78, 101, 139, 32, 240, 114, 132, 153, 215, 73, 72, 81, 159, 1, 171, 79, 244, 13, 225, 198, 190, 255, 41, 69, 214, 34, 205, 56, 155, 99, 86, 205, 70, 12, 88, 39, 4, 7, 174, 218, 27, 242, 205, 49, 79, 193, 53, 113, 238, 218, 95, 219, 235, 232, 31, 122, 217, 90, 37, 74, 85, 152, 163, 193, 13, 201, 185, 234, 61, 154, 174, 109, 170, 129, 32, 96, 239, 230, 228, 198, 181, 195, 49, 233, 123, 197, 210, 142, 135, 84, 84, 132, 126, 157, 75, 244, 228, 79, 158, 75, 177, 5, 163, 228, 216, 92, 113, 90, 203, 83, 248, 96, 237, 127, 104, 121, 164, 162, 51, 151, 201, 58, 232, 8, 20, 92, 40, 22, 102, 223, 61, 52, 8, 180, 254, 114, 212, 249, 155, 118, 30, 57, 255, 164, 41, 58, 77, 51, 184, 147, 147, 237, 64, 52, 157, 26, 137, 226, 154, 74, 169, 64, 165, 236, 115, 49, 232, 174, 178, 75, 136, 233, 160, 250, 17, 186, 105, 248, 165, 30, 150, 111, 251, 141, 133, 31, 154, 245, 32, 135, 226, 126, 130, 173, 207, 125, 132, 211, 24, 7, 25, 235, 219, 46, 131, 229, 47, 249, 112, 207, 225, 128, 241, 254, 138, 195, 12, 156, 18, 143, 196, 54, 206, 49, 250, 47, 193, 133, 179, 221, 255, 3, 115, 33, 250, 197, 40, 11, 182, 59, 219, 132, 93, 28, 144, 37, 36, 102, 12, 14, 76, 136, 136, 168, 248, 117, 180, 220, 101, 29, 95, 194, 236, 75, 139, 80, 1, 220, 24, 147, 182, 234, 62, 84, 124, 201, 251, 204, 208, 15, 149, 124, 88, 95, 156, 180, 136, 1, 119, 194, 83, 198, 148, 142, 204, 153, 7, 208, 106, 11, 102, 185, 0, 38, 135, 3, 225, 165, 212, 232, 100, 59, 200, 127, 235, 113, 118, 157, 220, 196, 180, 67, 94, 41, 46, 52, 178, 149, 254, 200, 59, 92, 26, 181, 150, 49, 224, 161, 0, 208, 78, 112, 57, 184, 138, 231, 2, 218, 131, 181, 23, 214, 35, 51, 89, 226, 200, 238, 203, 118, 127, 133, 62, 107, 15, 147, 51, 58, 195, 255, 105, 100, 83, 247, 107, 236, 96, 199, 173, 186, 70, 227, 176, 223, 197, 132, 102, 50, 77, 141, 212, 148, 161, 38, 168, 102, 125, 144, 163, 144, 234, 40, 216, 233, 209, 11, 188, 46, 133, 172, 68, 209, 41, 2, 176, 134, 129, 140, 244, 186, 116, 130, 20, 61, 40, 136, 219, 103, 9, 138, 21, 8, 146, 167, 106, 197, 170, 1, 223, 111, 223, 3, 161, 198, 80, 183, 82, 135, 244, 49, 168, 69, 236, 216, 44, 251, 222, 215, 181, 144, 241, 32, 38, 192, 225, 80, 249, 171, 16, 176, 59, 56, 102, 171, 252, 205, 164, 237, 77, 13, 22, 70, 74, 215, 10, 99, 74, 163, 21, 138, 59, 19, 97, 182, 92, 81, 244, 161, 171, 7, 161, 167, 236, 180, 113, 87, 249, 247, 132, 96, 8, 115, 101, 0, 68, 100, 52, 66, 166, 79, 51, 252, 1, 4, 112, 210, 8, 19, 17, 182, 209, 27, 87, 103, 39, 209, 222, 251, 105, 246, 80, 212, 116, 108, 165, 30, 11, 42, 144, 71, 222, 214, 24, 182, 148, 153, 123, 56, 75, 116, 193, 247, 168, 185, 68, 151, 40, 107, 105, 109, 239, 117, 218, 182, 33, 197, 163, 66, 16, 64, 46, 137, 72, 197, 133, 115, 173, 36, 214, 242, 222, 145, 202, 18, 241, 53, 194, 108, 225, 221, 236, 55, 146, 112, 130, 170, 253, 190, 76, 60, 253, 8, 1, 211, 20, 114, 7, 245, 79, 31, 42, 240, 172, 26, 159, 80, 24, 24, 5, 6, 54, 172, 145, 231, 66, 21, 88, 243, 38, 125, 77, 188, 241, 135, 226, 229, 250, 169, 94, 75, 91, 20, 153, 216, 2, 81, 86, 151, 48, 197, 13, 4, 40, 168, 52, 173, 39, 215, 51, 193, 42, 198, 5, 15, 38, 27, 213, 48, 86, 65, 186, 63, 55, 234, 79, 174, 152, 4, 169, 160, 168, 142, 141, 189, 202, 119, 247, 163, 60, 245, 136, 214, 186, 234, 156, 1, 134, 122, 212, 178, 79, 253, 214, 46, 159, 30, 135, 130, 235, 253, 137, 8, 230, 229, 74, 94, 131, 100, 48, 149, 61, 169, 154, 242, 237, 196, 101, 70, 88, 13, 232, 214, 200, 95, 18, 202, 161, 4, 66, 27, 131, 88, 126, 188, 101, 98, 79, 16, 108, 79, 218, 228, 97, 172, 107, 13, 1, 9, 253, 105, 219, 155, 169, 113, 10, 78, 139, 133, 30, 160, 160, 62, 217, 162, 105, 32, 189, 238, 72, 154, 11, 185, 67, 63, 142, 143, 199, 3, 164, 31, 90, 181, 179, 225, 12, 244, 51, 182, 227, 186, 8, 139, 4, 37, 201, 150, 100, 98, 12, 91, 229, 39, 192, 200, 187, 85, 129, 121, 251, 190, 122, 188, 233, 177, 136, 169, 33, 72, 66, 99, 238, 135, 225, 231, 73, 55, 209, 107, 0, 31, 49, 144, 125, 156, 91, 23, 196, 109, 245, 163, 28, 232, 22, 235, 254, 135, 57, 169, 177, 66, 192, 102, 63, 91, 208, 157, 91, 81, 102, 157, 234, 13, 241, 174, 180, 165, 149, 78, 9, 201, 184, 95, 137, 180, 182, 136, 157, 223, 41, 94, 197, 167, 150, 114, 177, 205, 19, 86, 120, 181, 170, 35, 159, 230, 243, 165, 193, 87, 54, 143, 143, 97, 47, 145, 206, 89, 25, 215, 44, 110, 179, 8, 63, 30, 255, 235, 160, 111, 231, 245, 229, 86, 9, 96, 184, 63, 42, 80, 61, 164, 211, 183, 182, 186, 216, 125, 227, 117, 223, 189, 93, 4, 95, 139, 10, 44, 180, 190, 249, 98, 89, 44, 117, 24, 146, 145, 171, 187, 234, 74, 44, 100, 10, 76, 91, 132, 213, 148, 4, 173, 126, 102, 14, 33, 41, 13, 52, 77, 246, 55, 74, 161, 202, 169, 169, 130, 124, 224, 49, 183, 204, 25, 156, 177, 73, 88, 23, 135, 191, 79, 31, 196, 110, 86, 205, 198, 227, 151, 194, 61, 197, 167, 171, 159, 216, 195, 228, 20, 5, 70, 238, 169, 74, 82, 213, 152, 210, 188, 58, 163, 249, 38, 176, 207, 20, 151, 217, 24, 21, 106, 157, 202, 140, 3, 121, 72, 115, 42, 60, 203, 199, 55, 211, 73, 86, 113, 216, 208, 162, 200, 111, 235, 44, 232, 105, 20, 152, 254, 51, 80, 57, 57, 197, 78, 245, 201, 204, 207, 181, 39, 165, 206, 44, 16, 41, 60, 252, 139, 174, 4, 92, 214, 63, 93, 5, 143, 113, 223, 169, 225, 152, 124, 18, 11, 104, 196, 71, 234, 222, 224, 189, 231, 87, 68, 184, 91, 249, 62, 4, 248, 240, 5, 187, 96, 139, 123, 26, 203, 140, 254, 15, 28, 123, 185, 89, 149, 152, 199, 50, 15, 154, 230, 175, 106, 97, 105, 84, 16, 108, 94, 164, 182, 142, 22, 255, 167, 166, 236, 57, 52, 23, 197, 133, 115, 215, 107, 20, 183, 3, 247, 163, 97, 220, 97, 171, 42, 199, 209, 62, 210, 63, 144, 245, 33, 139, 157, 68, 143, 26, 128, 99, 30, 110, 19, 173, 10, 37, 126, 194, 171, 119, 216, 100, 66, 198, 233, 246, 95, 152, 228, 225, 170, 203, 118, 9, 107, 42, 115, 76, 120, 138, 163, 26, 75, 220, 220, 11, 239, 186, 80, 168, 82, 153, 5, 119, 10, 58, 50, 110, 229, 134, 84, 51, 196, 23, 200, 114, 141, 160, 135, 143, 37, 216, 186, 226, 123, 61, 62, 161, 78, 119, 33, 193, 55, 251, 54, 211, 82, 129, 54, 61, 115, 130, 245, 124, 8, 42, 231, 45, 0, 103, 210, 165, 30, 243, 216, 79, 177, 219, 200, 208, 116, 144, 58, 209, 158, 156, 145, 170, 28, 25, 25, 134, 24, 12, 142, 222, 102, 140, 71, 219, 9, 213, 239, 120, 7, 13, 112, 8, 37, 151, 39, 215, 94, 250, 27, 188, 171, 28, 177, 208, 55, 53, 7, 101, 244, 4, 85, 147, 50, 158, 230, 152, 139, 144, 163, 56, 75, 210, 173, 53, 231, 166, 38, 111, 202, 134, 65, 204, 4, 159, 82, 18, 4, 5, 250, 167, 221, 36, 210, 172, 39, 143, 175, 190, 201, 65, 151, 48, 224, 241, 186, 98, 39, 219, 114, 108, 131, 252, 184, 9, 239, 137, 96, 118, 23, 161, 230, 18, 251, 92, 22, 133, 62, 39, 190, 144, 102, 240, 124, 78, 166, 228, 77, 103, 128, 47, 136, 88, 33, 61, 20, 238, 209, 29, 215, 237, 158, 28, 193, 154, 232, 246, 164, 122, 6, 64, 124, 186, 191, 134, 127, 13, 165, 119, 125, 12, 198, 76, 246, 170, 137, 79, 68, 191, 190, 56, 84, 187, 215, 229, 207, 221, 203, 57, 34, 36, 212, 15, 60, 193, 116, 108, 220, 35, 136, 139, 214, 71, 143, 104, 199, 26, 247, 16, 182, 249, 46, 86, 57, 44, 212, 167, 77, 107, 233, 236, 67, 64, 141, 119, 118, 40, 35, 158, 203, 140, 146, 154, 15, 180, 13, 111, 232, 222, 252, 133, 41, 127, 154, 171, 254, 241, 12, 228, 202, 4, 170, 250, 37, 223, 194, 254, 211, 77, 46, 235, 220, 135, 37, 136, 119, 60, 51, 61, 92, 131, 254, 70, 32, 203, 153, 215, 254, 10, 118, 68, 8, 56, 240, 104, 125, 82, 80, 129, 227, 58, 77, 87, 44, 52, 158, 95, 197, 201, 195, 177, 97, 190, 146, 45, 125, 56, 163, 87, 55, 214, 144, 69, 241, 119, 191, 127, 72, 185, 211, 202, 119, 248, 127, 104, 144, 250, 174, 25, 92, 160, 18, 171, 100, 133, 48, 93, 99, 194, 235, 177, 167, 229, 154, 94, 59, 196, 161, 30, 164, 148, 241, 163, 39, 163, 126, 49, 245, 44, 112, 207, 148, 21, 42, 166, 100, 40, 13, 4, 224, 73, 222, 126, 15, 140, 152, 253, 31, 168, 19, 101, 73, 105, 191, 196, 127, 100, 119, 78, 51, 10, 241, 52, 140, 53, 145, 203, 191, 34, 183, 135, 236, 9, 179, 232, 121, 241, 141, 40, 230, 186, 226, 85, 255, 48, 13, 155, 229, 50, 102, 220, 63, 112, 121, 54, 184, 28, 131, 182, 77, 135, 194, 63, 239, 242, 248, 231, 79, 0, 234, 254, 238, 126, 55, 34, 112, 137, 238, 197, 249, 97, 188, 27, 54, 6, 195, 146, 173, 48, 69, 99, 3, 133, 46, 253, 67, 24, 8, 209, 91, 162, 96, 245, 226, 20, 185, 58, 67, 230, 220, 50, 116, 155, 89, 246, 149, 74, 54, 67, 255, 61, 214, 90, 1, 132, 174, 84, 60, 158, 240, 105, 57, 99, 213, 218, 198, 114, 188, 192, 140, 50, 252, 48, 163, 248, 140, 127, 18, 91, 219, 39, 157, 136, 87, 215, 92, 50, 99, 72, 232, 40, 68, 129, 70, 195, 103, 41, 240, 208, 180, 228, 51, 194, 26, 201, 133, 207, 134, 209, 170, 60, 48, 61, 209, 141, 50, 152, 219, 24, 235, 223, 127, 79, 142, 80, 49, 104, 121, 138, 9, 176, 196, 17, 19, 66, 126, 132, 44, 79, 196, 48, 179, 80, 84, 80, 226, 4, 132, 94, 224, 159, 91, 0, 2, 54, 233], + [198, 18, 220, 180, 76, 61, 52, 243, 115, 213, 150, 59, 212, 244, 222, 99, 80, 40, 194, 42, 123, 216, 167, 86, 146, 200, 76, 109, 33, 132, 23, 13, 1, 131, 87, 127, 85, 124, 185, 194, 132, 105, 217, 190, 18, 117, 23, 96, 133, 31, 242, 39, 108, 224, 98, 188, 196, 71, 245, 103, 69, 76, 210, 43, 239, 250, 130, 161, 185, 164, 53, 124, 0, 79, 104, 43, 99, 222, 51, 192, 88, 170, 50, 165, 157, 81, 142, 47, 214, 220, 215, 67, 181, 194, 236, 100, 36, 161, 19, 57, 233, 152, 193, 7, 27, 237, 174, 34, 188, 248, 142, 100, 101, 252, 149, 241, 241, 66, 69, 43, 123, 224, 21, 29, 0, 6, 186, 18, 235, 200, 59, 72, 148, 147, 122, 118, 162, 175, 172, 10, 128, 136, 237, 231, 71, 6, 135, 113, 252, 221, 179, 55, 193, 165, 71, 118, 240, 0, 174, 87, 34, 56, 216, 239, 81, 103, 131, 11, 198, 195, 103, 100, 235, 152, 186, 143, 50, 64, 68, 14, 119, 216, 167, 246, 143, 37, 26, 200, 87, 138, 125, 72, 125, 248, 86, 183, 66, 207, 45, 26, 68, 179, 210, 154, 29, 225, 8, 192, 227, 76, 60, 2, 230, 207, 77, 241, 107, 247, 137, 58, 191, 109, 56, 7, 116, 180, 144, 106, 165, 113, 240, 48, 155, 87, 97, 48, 26, 26, 110, 29, 251, 28, 56, 79, 164, 229, 117, 248, 73, 215, 33, 121, 67, 174, 130, 157, 152, 67, 114, 46, 118, 149, 241, 84, 199, 174, 122, 67, 143, 141, 245, 148, 193, 235, 207, 39, 83, 49, 146, 162, 80, 155, 146, 43, 104, 220, 125, 112, 165, 212, 126, 172, 170, 11, 3, 201, 69, 114, 46, 149, 250, 174, 62, 233, 237, 130, 169, 93, 132, 5, 47, 151, 165, 243, 211, 254, 146, 175, 191, 11, 190, 4, 212, 189, 216, 134, 240, 181, 102, 52, 137, 33, 251, 245, 236, 116, 0, 25, 72, 160, 1, 125, 33, 130, 179, 76, 9, 146, 89, 76, 85, 87, 85, 19, 14, 56, 104, 98, 88, 226, 187, 51, 73, 82, 183, 216, 23, 134, 190, 78, 49, 208, 175, 92, 6, 227, 167, 118, 89, 135, 194, 126, 85, 13, 211, 36, 110, 208, 129, 142, 172, 127, 236, 119, 89, 74, 77, 24, 242, 87, 134, 114, 19, 149, 185, 18, 205, 177, 1, 215, 47, 201, 214, 20, 25, 83, 0, 209, 154, 28, 98, 149, 14, 208, 97, 184, 3, 229, 143, 173, 247, 48, 13, 59, 69, 255, 237, 205, 143, 232, 122, 223, 236, 37, 20, 73, 59, 83, 1, 161, 240, 181, 146, 139, 148, 197, 198, 213, 201, 20, 189, 190, 7, 158, 66, 132, 73, 133, 99, 76, 91, 192, 166, 215, 234, 185, 184, 102, 140, 83, 66, 188, 117, 74, 56, 109, 211, 216, 211, 192, 1, 20, 201, 241, 10, 187, 58, 215, 173, 57, 249, 101, 195, 34, 53, 194, 109, 119, 37, 191, 90, 200, 35, 69, 64, 32, 123, 66, 229, 81, 36, 226, 55, 149, 237, 40, 211, 204, 89, 197, 192, 161, 112, 240, 50, 42, 214, 251, 249, 248, 148, 108, 16, 156, 173, 64, 179, 100, 142, 2, 102, 108, 76, 72, 6, 85, 225, 77, 131, 232, 76, 223, 31, 7, 68, 8, 159, 17, 9, 78, 23, 4, 114, 59, 71, 68, 240, 133, 128, 246, 128, 17, 122, 143, 183, 80, 91, 65, 223, 204, 244, 216, 187, 39, 5, 175, 161, 146, 109, 45, 89, 178, 199, 45, 232, 251, 227, 105, 194, 27, 53, 35, 195, 22, 164, 139, 167, 77, 248, 254, 143, 226, 120, 175, 77, 72, 30, 162, 196, 62, 26, 49, 30, 146, 44, 252, 90, 144, 192, 0, 195, 236, 165, 89, 136, 129, 181, 97, 205, 144, 27, 169, 96, 252, 141, 133, 74, 221, 153, 163, 55, 236, 98, 253, 78, 50, 102, 10, 141, 39, 49, 20, 213, 84, 222, 154, 76, 194, 130, 27, 101, 235, 135, 43, 61, 180, 134, 222, 36, 14, 65, 38, 251, 80, 38, 227, 137, 78, 161, 3, 157, 50, 171, 206, 17, 127, 26, 243, 169, 157, 165, 122, 118, 121, 113, 122, 63, 135, 138, 139, 154, 50, 157, 200, 13, 134, 20, 72, 64, 8, 7, 233, 132, 61, 213, 252, 238, 96, 16, 89, 54, 195, 147, 199, 125, 77, 83, 12, 57, 63, 221, 41, 201, 181, 108, 255, 222, 10, 125, 137, 248, 93, 209, 111, 132, 65, 17, 68, 58, 242, 192, 184, 230, 123, 56, 151, 170, 9, 148, 209, 159, 102, 138, 37, 225, 82, 3, 127, 72, 72, 34, 161, 4, 134, 75, 6, 81, 188, 44, 122, 167, 227, 21, 62, 76, 2, 87, 5, 195, 154, 76, 68, 172, 138, 200, 32, 193, 16, 251, 235, 69, 48, 73, 169, 124, 70, 60, 214, 1, 185, 171, 253, 38, 130, 107, 144, 221, 186, 164, 55, 117, 194, 140, 16, 165, 245, 138, 227, 214, 32, 3, 210, 189, 225, 244, 190, 93, 42, 88, 62, 33, 103, 2, 109, 140, 110, 54, 199, 42, 245, 177, 229, 79, 144, 146, 17, 97, 98, 92, 5, 180, 65, 72, 126, 182, 230, 28, 63, 34, 36, 247, 182, 173, 232, 242, 249, 33, 181, 107, 23, 43, 146, 198, 202, 221, 75, 183, 141, 4, 5, 161, 40, 110, 81, 26, 145, 180, 38, 89, 20, 149, 190, 11, 139, 113, 125, 201, 71, 161, 16, 213, 119, 92, 136, 225, 169, 191, 95, 123, 68, 91, 102, 176, 150, 209, 119, 134, 35, 232, 218, 199, 142, 55, 230, 64, 63, 248, 236, 194, 128, 170, 105, 239, 188, 56, 236, 242, 241, 140, 104, 183, 238, 136, 241, 8, 113, 134, 172, 162, 90, 131, 208, 119, 131, 81, 86, 226, 245, 67, 44, 106, 117, 145, 178, 162, 212, 112, 177, 182, 11, 153, 18, 63, 5, 194, 45, 239, 56, 201, 52, 109, 220, 158, 235, 41, 191, 72, 168, 33, 233, 161, 185, 17, 7, 55, 241, 13, 185, 229, 147, 183, 206, 70, 90, 166, 204, 122, 155, 179, 57, 137, 81, 158, 23, 134, 228, 9, 167, 18, 11, 255, 110, 179, 48, 165, 85, 125, 6, 153, 17, 179, 88, 137, 25, 221, 54, 99, 167, 142, 194, 49, 241, 103, 67, 198, 197, 37, 41, 248, 40, 56, 151, 70, 216, 12, 191, 22, 154, 213, 24, 189, 106, 136, 233, 225, 27, 25, 203, 22, 105, 100, 238, 91, 8, 81, 91, 198, 70, 133, 214, 136, 231, 85, 229, 222, 179, 50, 231, 163, 115, 168, 14, 209, 252, 9, 248, 244, 226, 255, 22, 94, 110, 118, 199, 63, 62, 15, 175, 189, 93, 31, 242, 142, 254, 19, 64, 137, 77, 221, 237, 251, 4, 127, 40, 112, 51, 83, 89, 89, 169, 149, 154, 214, 50, 62, 173, 233, 159, 108, 16, 109, 5, 199, 171, 179, 56, 73, 149, 172, 194, 105, 197, 37, 14, 163, 234, 180, 120, 49, 22, 26, 219, 199, 122, 130, 134, 180, 71, 215, 160, 211, 52, 90, 95, 213, 114, 146, 227, 177, 95, 170, 117, 154, 216, 10, 171, 239, 199, 71, 103, 9, 112, 98, 56, 107, 31, 182, 65, 222, 164, 234, 230, 150, 104, 154, 94, 28, 229, 138, 198, 225, 88, 194, 243, 177, 183, 201, 0, 21, 62, 96, 174, 96, 25, 169, 13, 121, 20, 218, 73, 240, 184, 212, 26, 122, 62, 229, 79, 108, 116, 211, 245, 23, 149, 127, 212, 61, 251, 195, 88, 85, 89, 138, 139, 10, 232, 241, 167, 16, 17, 4, 76, 189, 47, 35, 102, 95, 65, 11, 194, 105, 14, 54, 224, 47, 83, 238, 203, 129, 58, 35, 58, 9, 126, 120, 229, 106, 69, 25, 136, 15, 186, 107, 14, 170, 219, 214, 208, 100, 26, 23, 80, 167, 236, 62, 223, 220, 1, 135, 113, 158, 54, 85, 135, 186, 77, 15, 219, 121, 121, 218, 244, 130, 185, 124, 254, 2, 194, 223, 73, 38, 251, 255, 119, 10, 118, 164, 201, 9, 61, 33, 116, 139, 234, 193, 68, 14, 215, 150, 48, 141, 186, 244, 62, 3, 214, 203, 239, 175, 204, 152, 234, 170, 70, 3, 231, 60, 206, 191, 97, 148, 23, 176, 103, 254, 50, 153, 41, 165, 63, 233, 75, 129, 231, 57, 7, 118, 43, 153, 252, 234, 179, 230, 49, 104, 27, 202, 159, 116, 169, 142, 39, 225, 11, 132, 156, 88, 135, 245, 222, 196, 228, 117, 159, 21, 116, 1, 78, 124, 144, 36, 119, 169, 87, 200, 56, 192, 123, 229, 163, 107, 213, 136, 122, 55, 128, 130, 44, 29, 149, 181, 15, 109, 188, 195, 190, 165, 121, 43, 191, 210, 103, 199, 214, 149, 70, 253, 13, 191, 94, 85, 203, 87, 98, 99, 172, 145, 95, 57, 36, 233, 115, 189, 74, 59, 237, 170, 89, 146, 145, 167, 192, 6, 49, 22, 69, 74, 18, 111, 15, 7, 93, 216, 7, 151, 138, 96, 188, 203, 47, 187, 162, 100, 105, 217, 213, 228, 97, 47, 6, 8, 162, 196, 17, 229, 172, 170, 80, 104, 101, 24, 39, 35, 40, 86, 173, 116, 207, 28, 83, 19, 138, 129, 19, 131, 18, 69, 77, 94, 164, 233, 32, 89, 25, 166, 102, 233, 27, 154, 43, 9, 206, 173, 4, 191, 131, 53, 52, 114, 88, 38, 33, 192, 149, 249, 249, 239, 6, 91, 209, 45, 29, 208, 148, 104, 112, 214, 247, 20, 203, 113, 63, 182, 84, 120, 224, 178, 128, 248, 141, 125, 105, 148, 168, 106, 165, 212, 251, 248, 247, 24, 87, 190, 206, 130, 201, 245, 36, 55, 130, 212, 78, 44, 34, 205, 174, 254, 99, 13, 124, 64, 71, 142, 126, 13, 99, 115, 187, 40, 109, 60, 147, 110, 127, 48, 191, 212, 248, 217, 53, 162, 62, 191, 58, 96, 39, 231, 232, 235, 80, 121, 16, 9, 95, 177, 184, 18, 26, 85, 30, 251, 85, 192, 144, 213, 107, 49, 58, 6, 7, 163, 2, 71, 222, 16, 244, 41, 17, 45, 202, 247, 112, 38, 79, 245, 28, 68, 163, 247, 197, 219, 53, 184, 112, 180, 35, 51, 24, 220, 239, 254, 137, 19, 76, 82, 6, 252, 45, 80, 230, 70, 86, 224, 18, 77, 113, 144, 75, 88, 56, 54, 133, 79, 5, 66, 112, 156, 4, 240, 35, 20, 73, 141, 188, 1, 40, 58, 59, 75, 237, 60, 22, 12, 168, 182, 101, 120, 33, 249, 164, 138, 33, 211, 128, 249, 254, 6, 91, 140, 92, 226, 245, 170, 111, 140, 32, 134, 230, 49, 225, 54, 4, 238, 200, 86, 116, 247, 153, 196, 64, 54, 72, 29, 24, 202, 218, 28, 165, 214, 21, 138, 237, 230, 72, 73, 122, 103, 109, 220, 216, 246, 165, 63, 102, 64, 189, 27, 9, 234, 124, 118, 223, 12, 72, 159, 166, 134, 112, 62, 234, 206, 109, 195, 149, 253, 63, 166, 16, 90, 221, 127, 189, 184, 30, 30, 192, 100, 157, 255, 38, 251, 224, 253, 160, 52, 191, 100, 53, 112, 11, 240, 53, 15, 158, 45, 128, 176, 95, 39, 236, 216, 50, 182, 214, 17, 198, 66, 96, 88, 31, 219, 180, 5, 84, 93, 67, 241, 127, 210, 247, 117, 161, 148, 72, 176, 175, 58, 145, 85, 137, 99, 108, 220, 57, 121, 5, 160, 26, 9, 252, 174, 250, 92, 208, 58, 79, 129, 15, 7, 251, 205, 75, 5, 18, 235, 211, 136, 41, 74, 212, 20, 64, 72, 200, 140, 215, 98, 213, 229, 84, 76, 124, 211, 40, 202, 172, 34, 219, 92, 21, 175, 198, 14, 7, 45, 192, 248, 255, 111, 79, 83, 219, 55, 6, 12, 59, 152, 48, 174, 0, 146, 87, 189, 136, 151, 174, 21, 156, 192, 6, 28, 43, 91, 124, 214, 193, 216, 177, 199, 255, 183, 206, 186, 10, 228, 12, 237, 84, 59, 73, 53, 72, 214, 135, 252, 20, 86, 67, 7, 0, 182, 50, 128, 11, 101, 46, 117, 73, 39, 206, 242, 139, 153, 252, 107, 45, 154, 188, 119, 86, 127, 17, 143, 187, 32, 107, 155, 191, 233, 218, 88, 179, 210, 112, 194, 223, 121, 145, 253, 174, 11, 96, 133, 91, 227, 54, 248, 1, 91, 223, 241, 28, 223, 3, 203, 26, 21, 180, 101, 162, 52, 121, 158, 232, 103, 150, 250, 71, 40, 135, 160, 23, 101, 210, 52, 38, 52, 101, 219, 16, 50, 251, 165, 225, 158, 234, 17, 144, 60, 22, 237, 232, 197, 136, 141, 140, 132, 95, 11, 163, 114, 25, 195, 194, 57, 215, 129, 95, 226, 98, 138, 145, 171, 253, 154, 222, 80, 102, 180, 91, 186, 165, 190, 111, 70, 246, 194, 231, 221, 118, 247, 14, 180, 39, 80, 169, 246, 248, 207, 139, 243, 130, 51, 71, 196, 208, 31, 52, 209, 62, 59, 93, 212, 118, 22, 110, 21, 235, 205, 92, 153, 149, 60, 181, 207, 162, 131, 252, 239, 228, 190, 81, 150, 123, 9, 252, 110, 52, 119, 72, 204, 22, 222, 250, 147, 159, 209, 55, 66, 161, 249, 240, 91, 119, 204, 255, 210, 21, 201, 41, 95, 27, 185, 253, 126, 73, 168, 152, 182, 6, 247, 178, 3, 77, 78, 168, 79, 1, 59, 62, 21, 182, 140, 250, 104, 210, 68, 165, 223, 238, 112, 14, 75, 215, 10, 156, 39, 123, 74, 6, 111, 136, 11, 152, 128, 119, 40, 19, 98, 24, 37, 176, 79, 24, 46, 189, 178, 79, 96, 175, 211, 73, 50, 110, 147, 93, 121, 147, 53, 112, 180, 97, 18, 6, 191, 168, 213, 133, 65, 14, 243, 142, 4, 227, 86, 16, 75, 216, 30, 129, 41, 127, 207, 7, 44, 235, 47, 233, 120, 229, 100, 146, 115, 38, 174, 172, 167, 9, 86, 10, 220, 139, 115, 189, 31, 181, 7, 177, 10, 159, 225, 76, 246, 76, 46, 58, 190, 159, 71, 95, 174, 214, 254, 101, 148, 150, 208, 207, 230, 115, 75, 76, 99, 176, 193, 25, 220, 122, 82, 148, 34, 192, 120, 146, 50, 216, 130, 145, 29, 175, 233, 180, 253, 93, 39, 89, 129, 133, 24, 43, 248, 19, 118, 249, 12, 107, 131, 94, 237, 177, 115, 243, 146, 241, 191, 92, 224, 184, 143, 18, 205, 210, 202, 80, 207, 219, 154, 254, 97, 13, 3, 17, 255, 153, 64, 177, 97, 163, 137, 32, 252, 223, 46, 253, 244, 230, 150, 227, 74, 67, 175, 178, 180, 178, 110, 97, 62, 143, 114, 176, 142, 33, 74, 208, 245, 49, 86, 155, 144, 75, 41, 181, 169, 21, 83, 138, 165, 3, 113, 29, 32, 103, 173, 60, 177, 105, 33, 79, 46, 151, 165, 235, 9, 47, 193, 74, 231, 56, 223, 137, 215, 248, 225, 238, 110, 85, 236, 102, 54, 32, 18, 219, 157, 143, 121, 29, 22, 117, 156, 243, 98, 171, 208, 205, 211, 198, 99, 106, 255, 16, 145, 20, 33, 88, 114, 141, 16, 140, 216, 27, 31, 220, 37, 146, 182, 102, 10, 166, 29, 224, 132, 137, 211, 77, 239, 38, 225, 111, 188, 80, 47, 130, 137, 209, 88, 232, 19, 165, 184, 158, 182, 174, 32, 58, 139, 6, 216, 186, 92, 107, 170, 86, 220, 54, 116, 22, 9, 136, 165, 222, 68, 11, 124, 90, 252, 24, 51, 127, 64, 60, 108, 217, 36, 191, 198, 107, 187, 139, 232, 147, 211, 96, 7, 88, 127, 117, 58, 168, 183, 78, 153, 221, 30, 2, 134, 209, 190, 132, 252, 33, 196, 11, 94, 188, 188, 23, 106, 55, 227, 219, 10, 19, 62, 230, 220, 116, 84, 142, 200, 218, 66, 29, 243, 93, 216, 143, 104, 83, 46, 125, 54, 169, 94, 196, 212, 242, 66, 254, 176, 14, 43, 195, 224, 36, 190, 122, 9, 73, 226, 90, 4, 227, 166, 236, 58, 103, 100, 208, 189, 96, 12, 24, 11, 186, 207, 201, 220, 20, 186, 172, 57, 101, 175, 34, 187, 209, 212, 39, 236, 94, 235, 171, 119, 195, 199, 232, 241, 182, 5, 213, 244, 132, 111, 135, 214, 75, 138, 43, 242, 112, 223, 49, 219, 252, 136, 91, 107, 224, 72, 152, 224, 79, 121, 173, 247, 65, 153, 253, 210, 218, 75, 185, 64, 128, 71, 159, 76, 10, 20, 214, 237, 44, 21, 108, 115, 255, 97, 124, 138, 220, 150, 121, 228, 41, 255, 189, 147, 213, 184, 205, 124, 92, 185, 220, 185, 166, 106, 212, 204, 221, 149, 162, 55, 109, 231, 85, 142, 33, 61, 86, 53, 81, 73, 174, 237, 36, 242, 148, 238, 134, 185, 233, 250, 195, 216, 254, 223, 76, 97, 118, 202, 186, 123, 244, 184, 105, 27, 15, 162, 233, 88, 59, 27, 71, 181, 106, 173, 149, 33, 76, 18, 66, 159, 145, 65, 83, 173, 156, 190, 39, 66, 231, 118, 244, 247, 78, 200, 182, 51, 30, 247, 73, 121, 138, 239, 92, 3, 153, 41, 48, 9, 30, 230, 44, 181, 17, 59, 122, 200, 58, 196, 84, 60, 202, 61, 220, 120, 117, 0, 89, 100, 202, 203, 52, 130, 212, 143, 234, 238, 146, 77, 163, 83, 153, 62, 128, 40, 98, 189, 75, 195, 112, 236, 135, 246, 172, 208, 48, 198, 52, 202, 180, 114, 162, 31, 109, 141, 32, 24, 89, 239, 57, 177, 191, 110, 225, 99, 100, 185, 152, 44, 153, 242, 152, 204, 240, 75, 205, 132, 15, 74, 107, 98, 200, 92, 254, 183, 137, 2, 81, 75, 212, 198, 215, 157, 127, 172, 119, 144, 67, 95, 29, 196, 44, 182, 237, 84, 130, 224, 177, 173, 100, 85, 50, 235, 125, 64, 10, 146, 250, 92, 70, 181, 23, 16, 1, 133, 26, 30, 252, 91, 169, 131, 64, 195, 74, 21, 183, 95, 106, 232, 140, 232, 109, 104, 249, 16, 55, 132, 61, 216, 208, 185, 108, 193, 21, 233, 3, 157, 13, 95, 107, 167, 91, 82, 113, 135, 129, 141, 44, 136, 142, 76, 187, 249, 44, 213, 242, 43, 24, 17, 220, 215, 54, 2, 239, 244, 72, 28, 188, 29, 245, 2, 199, 21, 84, 132, 106, 191, 204, 145, 182, 28, 143, 229, 95, 231, 95, 124, 99, 162, 73, 55, 236, 159, 75, 109, 48, 30, 80, 225, 53, 34, 64, 229, 145, 101, 5, 213, 205, 184, 133, 59, 218, 38, 244, 170, 141, 132, 179, 88, 239, 246, 37, 48, 146, 151, 242, 202, 64, 89, 92, 199, 98, 147, 205, 202, 72, 136, 44, 221, 106, 62, 15, 9, 240, 10, 66, 71, 94, 149, 155, 33, 163, 96, 174, 113, 230, 5, 248, 14, 58, 217, 5, 213, 4, 48, 241, 125, 126, 251, 150, 199, 131, 123, 144, 124, 242, 253, 119, 75, 44, 216, 180, 4, 186, 181, 14, 190, 16, 239, 148, 51, 183, 147, 94, 206, 14, 114, 227, 233, 69, 158, 94, 109, 42, 163, 208, 208, 249, 10, 14, 86, 77, 130, 99, 183, 37, 218, 71, 44, 159, 186, 21, 47, 194, 249, 230, 163, 116, 196, 75, 146, 81, 76, 156, 3, 248, 247, 19, 57, 122, 194, 83, 200, 8, 136, 133, 96, 142, 159, 51, 103, 231, 228, 60, 86, 53, 85, 76, 144, 84, 91, 10, 74, 98, 127, 116, 45, 158, 116, 73, 133, 85, 46, 216, 238, 190, 91, 102, 80, 225, 34, 15, 45, 195, 161, 174, 0, 170, 241, 161, 66, 32, 125, 84, 143, 27, 225, 175, 104, 20, 219, 175, 101, 121, 209, 111, 29, 221, 179, 66, 20, 218, 133, 140, 95, 117, 33, 61, 50, 72, 116, 120, 77, 129, 124, 66, 16, 11, 46, 37, 235, 148, 116, 49, 78, 155, 102, 107, 199, 18, 224, 161, 15, 34, 216, 38, 134, 161, 216, 151, 242, 26, 63, 218, 173, 48, 144, 99, 157, 55, 48, 171, 109, 22, 55, 200, 100, 165, 82, 129, 219, 38, 158, 82, 96, 60, 171, 243, 229, 232, 163, 7, 51, 219, 72, 161, 66, 252, 220, 125, 149, 35, 48, 218, 74, 94, 171, 123, 104, 112, 2, 105, 132, 215, 3, 146, 158, 22, 3, 99, 115, 60, 60, 130, 208, 0, 173, 173, 214, 229, 74, 119, 71, 248, 48, 210, 83, 91, 88, 97, 125, 74, 53, 89, 17, 71, 137, 66, 69, 45, 68, 115, 165, 1, 24, 172, 30, 139, 60, 129, 220, 139, 200, 234, 144, 54, 236, 8, 53, 48, 213, 108, 47, 75, 112, 63, 180, 14, 104, 88, 239, 103, 178, 184, 231, 233, 218, 228, 213, 114, 93, 36, 72, 212, 227, 201, 74, 15, 68, 160, 174, 92, 95, 222, 224, 127, 242, 113, 43, 146, 58, 139, 53, 20, 22, 28, 31, 209, 7, 85, 235, 58, 49, 127, 184, 202, 141, 112, 254, 193, 107, 128, 105, 230, 72, 84, 118, 71, 5, 164, 18, 92, 193, 182, 162, 45, 183, 28, 114, 192, 208, 100, 182, 163, 139, 230, 238, 154, 9, 12, 102, 205, 35, 228, 179, 210, 65, 215, 164, 224, 171, 95, 17, 20, 7, 66, 166, 3, 52, 187, 193, 108, 120, 94, 223, 82, 38, 219, 78, 103, 146, 188, 7, 28, 200, 138, 81, 245, 111, 121, 233, 30, 6, 66, 58, 30, 60, 64, 245, 171, 233, 237, 176, 64, 212, 28, 122, 20, 85, 100, 29, 246, 140, 154, 150, 216, 89, 11, 62, 51, 27, 129, 230, 253, 232, 37, 80, 173, 27, 237, 223, 254, 228, 24, 163, 42, 122, 29, 127, 232, 44, 105, 225, 74, 42, 239, 137, 48, 163, 241, 202, 178, 253, 191, 124, 220, 210, 98, 218, 237, 165, 129, 183, 182, 14, 188, 105, 9, 213, 105, 219, 96, 221, 156, 251, 11, 108, 54, 167, 69, 0, 192, 2, 248, 167, 44, 225, 255, 123, 141, 22, 77, 143, 213, 177, 82, 105, 232, 159, 184, 71, 222, 28, 30, 86, 160, 127, 44, 165, 21, 229, 4, 192, 137, 137, 100, 250, 185, 22, 53, 22, 96, 139, 228, 42, 247, 23, 157, 237, 172, 63, 107, 184, 91, 25, 88, 182, 247, 82, 173, 151, 70, 102, 123, 232, 22, 35, 62, 121, 77, 78, 10, 116, 228, 150, 205, 174, 21, 245, 160, 13, 70, 12, 76, 102, 206, 98, 69, 177, 87, 78, 38, 54, 254, 106, 158, 79, 186, 221, 166, 12, 133, 77, 210, 108, 7, 169, 228, 24, 107, 123, 204, 104, 7, 64, 13, 21, 12, 104, 21, 189, 54, 66, 15, 213, 173, 160, 185, 128, 187, 47, 143, 150, 190, 144, 203, 120, 168, 214, 65, 89, 156, 2, 151, 117, 217, 186, 190, 198, 108, 234, 247, 67, 209, 225, 218, 254, 56, 15, 152, 255, 42, 225, 26, 43, 236, 27, 159, 110, 114, 244, 86, 43, 60, 114, 224, 44, 116, 26, 36, 230, 25, 243, 216, 180, 167, 77, 159, 213, 32, 249, 138, 70, 16, 196, 82, 255, 124, 83, 218, 106, 123, 172, 211, 118, 163, 227, 246, 204, 7, 129, 228, 30, 236, 204, 241, 159, 194, 242, 136, 37, 236, 213, 210, 234, 87, 69, 227, 217, 121, 157, 38, 231, 233, 122, 37, 124, 116, 106, 224, 73, 163, 239, 211, 112, 58, 226, 80, 196, 53, 228, 143, 184, 5, 182, 171, 230, 199, 53, 12, 121, 104, 6, 87, 242, 167, 251, 38, 166, 26, 225, 45, 121, 72, 211, 110, 16, 61, 250, 173, 21, 106, 121, 32, 251, 176, 170, 217, 31, 65, 59, 122, 44, 175, 28, 189, 117, 198, 118, 118, 247, 201, 37, 103, 117, 81, 115, 187, 128, 55, 18, 183, 146, 40, 104, 183, 20, 254, 76, 209, 155, 193, 73, 234, 168, 61, 218, 117, 105, 93, 106, 173, 83, 209, 215, 98, 58, 80, 198, 13, 87, 251, 69, 125, 42, 7, 255, 138, 146, 76, 3, 159, 212, 194, 65, 70, 184, 206, 107, 84, 239, 146, 159, 207, 118, 57, 241, 12, 193, 110, 36, 19, 203, 3, 170, 135, 150, 193, 6, 101, 89, 9, 106, 216, 198, 217, 71, 91, 37, 154, 0, 93, 179, 255, 63, 61, 137, 84, 141, 144, 180, 21, 243, 246, 211, 123, 110, 15, 77, 132, 42, 187, 173, 242, 247, 134, 72, 141, 11, 199, 158, 20, 2, 224, 187, 196, 36, 65, 114, 17, 160, 17, 38, 126, 174, 25, 107, 16, 240, 157, 108, 222, 158, 176, 223, 33, 240, 101, 88, 248, 152, 24, 36, 71, 101, 239, 119, 16, 200, 19, 238, 123, 203, 233, 244, 168, 241, 3, 18, 226, 22, 3, 209, 248, 210, 6, 220, 252, 86, 248, 109, 143, 217, 193, 248, 131, 143, 60, 133, 124, 96, 158, 211, 202, 80, 189, 62, 215, 138, 79, 252, 214, 91, 123, 89, 218, 78, 42, 234, 190, 252, 175, 172, 173, 123, 48, 25, 108, 191, 238, 137, 215, 86, 189, 9, 142, 112, 87, 79, 186, 51, 203, 74, 236, 191, 32, 147, 181, 196, 242, 211, 115, 14, 185, 236, 85, 82, 67, 175, 107, 185, 115, 205, 111, 238, 128, 51, 65, 211, 91, 240, 178, 39, 166, 73, 162, 250, 157, 8, 84, 111, 31, 9, 160, 197, 104, 98, 135, 51, 144, 90, 16, 107, 150, 40, 126, 63, 37, 126, 20, 234, 171, 214, 199, 5, 88, 163, 205, 167, 44, 143, 16, 228, 83, 65, 165, 24, 234, 222, 36, 48, 121, 164, 172, 228, 198, 118, 191, 29, 211, 145, 228, 163, 164, 125, 156, 130, 145, 53, 175, 69, 192, 199, 218, 182, 73, 198, 194, 58, 67, 233, 231, 247, 99, 97, 7, 229, 78, 252, 75, 182, 54, 118, 5, 245, 35, 108, 236, 107, 249, 12, 138, 169, 32, 150, 226, 0, 68, 151, 129, 85, 119, 100, 12, 153, 93, 248, 95, 66, 2, 192, 107, 134, 21, 2, 153, 39, 176, 245, 137, 15, 247, 253, 109, 205, 170, 221, 226, 40, 71, 65, 201, 250, 97, 130, 200, 143, 89, 128, 138, 49, 84, 81, 232, 47, 243, 174, 63, 208, 82, 84, 191, 197, 88, 156, 243, 249, 86, 229, 103, 3, 163, 132, 4, 62, 202, 18, 213, 161, 172, 174, 19, 131, 146, 227, 229, 149, 230, 113, 95, 231, 235, 57, 60, 231, 144, 199, 27, 250, 112, 160, 129, 99, 168, 161, 57, 251, 190, 19, 105, 24, 61, 154, 54, 161, 185, 169, 164, 101, 175, 114, 68, 131, 222, 133, 56, 201, 239, 7, 36, 37, 183, 232, 152, 249, 244, 207, 173, 78, 94, 73, 217, 12, 142, 121, 114, 30, 20, 87, 95, 246, 125, 72, 4, 193, 8, 246, 183, 52, 162, 160, 9, 18, 36, 17, 96, 79, 83, 95, 43, 119, 124, 36, 6, 115, 195, 195, 12, 24, 43, 17, 253, 38, 59, 49, 144, 48, 242, 113, 130, 206, 236, 22, 101, 178, 206, 172, 18, 11, 249, 236, 209, 247, 181, 183, 69, 138, 175, 74, 247, 20, 103, 193, 71, 223, 252, 203, 28, 188, 244, 46, 96, 143, 126, 211, 176, 118, 221, 30, 44, 50, 70, 215, 84, 177, 178, 133, 127, 11, 142, 137, 216, 146, 234, 57, 150, 96, 25, 132, 87, 132, 155, 123, 161, 244, 191, 200, 153, 64, 170, 124, 19, 103, 246, 32, 49, 199, 221, 255, 134, 30, 94, 156, 111, 39, 131, 119, 99, 223, 105, 51, 5, 88, 92, 64, 181, 213, 134, 202, 225, 202, 121, 227, 218, 225, 0, 178, 10, 221, 10, 243, 75, 208, 243, 50, 102, 69, 142, 10, 82, 209, 189, 105, 143, 68, 177, 6, 254, 98, 81, 30, 205, 223, 74, 159, 121, 18, 150, 13, 224, 92, 43, 208, 62, 188, 125, 47, 220, 76, 188, 106, 140, 28, 219, 230, 113, 170, 185, 8, 162, 133, 116, 129, 189, 203, 183, 155, 142, 153, 110, 151, 227, 178, 141, 204, 34, 29, 198, 19, 227, 100, 91, 90, 81, 48, 237, 210, 234, 51, 170, 22, 54, 6, 55, 99, 63, 164, 222, 55, 254, 248, 58, 40, 9, 58, 85, 144, 176, 131, 44, 217, 207, 22, 76, 94, 139, 154, 159, 104, 172, 17, 154, 209, 209, 251, 106, 182, 159, 24, 149, 24, 244, 224, 189, 217, 224, 223, 47, 41, 152, 69, 88, 107, 33, 147, 139, 147, 118, 93, 82, 91, 133, 4, 2, 58, 167, 222, 54, 145, 210, 200, 79, 118, 36, 120, 135, 38, 224, 155, 108, 54, 171, 54, 144, 115, 218, 103, 16, 182, 153, 177, 29, 48, 204, 7, 180, 27, 9, 227, 253, 241, 209, 59, 21, 58, 51, 247, 5, 102, 32, 41, 254, 82, 202, 14, 108, 227, 76, 76, 187, 47, 27, 250, 234, 37, 132, 32, 27, 3, 195, 29, 192, 217, 253, 222, 12, 189, 251, 224, 203, 133, 186, 245, 225, 196, 14, 102, 41, 159, 186, 118, 140, 49, 104, 173, 153, 119, 225, 22, 180, 179, 41, 88, 244, 19, 250, 71, 9, 143, 50, 87, 144, 127, 161, 29, 120, 174, 149, 26, 164, 141, 71, 109, 65, 210, 84, 210, 12, 66, 96, 16, 114, 229, 107, 208, 221, 132, 105, 160, 56, 90, 191, 86, 156, 41, 5, 218, 142, 103, 155, 248, 193, 160, 20, 187, 101, 18, 89, 143, 26, 107, 88, 246, 2, 253, 75, 109, 95, 48, 111, 26, 18, 138, 222, 66, 165, 182, 52, 46, 207, 91, 6, 163, 130, 104, 33, 196, 138, 37, 155, 107, 180, 33, 190, 186, 72, 208, 252, 60, 2, 116, 176, 49, 157, 203, 195, 70, 186, 176, 22, 60, 38, 135, 119, 107, 162, 146, 115, 54, 144, 142, 136, 141, 223, 0, 170, 147, 8, 6, 72, 101, 184, 149, 233, 104, 52, 27, 219, 125, 6, 193, 242, 228, 4, 57, 87, 39, 231, 111, 14, 25, 111, 218, 34, 187, 122, 164, 176, 193, 211, 36, 143, 232, 41, 90, 141, 114, 63, 27, 154, 64, 239, 66, 158, 203, 135, 132, 40, 191, 244, 147, 117, 125, 20, 24, 29, 196, 30, 39, 213, 193, 56, 83, 197, 96, 162, 182, 120, 131, 160, 166, 14, 128, 14, 213, 55, 220, 64, 180, 31, 165, 11, 192, 129, 31, 245, 121, 6, 236, 111, 23, 61, 181, 69, 124, 56, 69, 13, 39, 169, 211, 7, 139, 245, 65, 33, 25, 238, 3, 89, 123, 56, 191, 40, 23, 229, 124, 225, 245, 40, 216, 12, 184, 146, 95, 177, 214, 230, 53, 95, 130, 186, 126, 247, 189, 149, 148, 67, 36, 205, 232, 63, 144, 42, 23, 71, 238, 245, 38, 168, 243, 24, 165, 207, 39, 216, 248, 115, 215, 0, 202, 59, 61, 157, 26, 90, 120, 154, 115, 14, 151, 118, 204, 219, 17, 134, 215, 151, 165, 173, 68, 143, 164, 201, 250, 43, 187, 132, 191, 20, 112, 248, 4, 238, 40, 7, 14, 28, 236, 143, 22, 255, 52, 167, 209, 141, 130, 55, 124, 236, 132, 19, 209, 191, 193, 163, 99, 189, 167, 95, 24, 231, 221, 114, 143, 99, 69, 122, 83, 153, 53, 35, 219, 57, 122, 89, 21, 78, 155, 20, 33, 250, 78, 59, 131, 80, 4, 176, 180, 147, 204, 176, 111, 13, 216, 241, 206, 93, 27, 34, 247, 51, 100, 222, 115, 214, 115, 225, 131, 16, 87, 198, 175, 24, 56, 55, 94, 220, 34, 174, 241, 170, 71, 7, 235, 111, 28, 107, 200, 187, 101, 210, 206, 194, 196, 41, 24, 86, 140, 164, 212, 229, 139, 250, 226, 124, 214, 93, 80, 126, 2, 31, 31, 0, 161, 58, 186, 89, 226, 38, 12, 125, 96, 223, 70, 24, 55, 150, 82, 239, 144, 108, 105, 234, 219, 175, 218, 243, 184, 209, 176, 212, 205, 137, 11, 57, 250, 54, 194, 77, 42, 106, 61, 27, 203, 151, 154, 199, 201, 55, 157, 126, 226, 229, 165, 201, 104, 213, 40, 119, 20, 78, 236, 113, 235, 128, 208, 2, 50, 2, 37, 48, 93, 156, 218, 83, 37, 124, 92, 211, 184, 218, 52, 157, 180, 165, 224, 249, 71, 181, 255, 14, 77, 221, 28, 40, 38, 173, 67, 46, 4, 169, 77, 29, 45, 148, 180, 1, 18, 135, 213, 225, 228, 43, 116, 63, 134, 199, 159, 38, 63, 74, 110, 165, 98, 181, 100, 84, 23, 176, 170, 225, 137, 215, 196, 141, 253, 241, 173, 16, 24, 51, 51, 110, 33, 23, 128, 80, 212, 230, 62, 201, 62, 148, 126, 73, 180, 221, 34, 50, 35, 141, 183, 244, 147, 148, 59, 114, 128, 154, 47, 21, 54, 136, 174, 149, 96, 158, 99, 65, 255, 184, 199, 205, 67, 142, 160, 42, 113, 169, 19, 120, 6, 58, 8, 27, 103, 182, 208, 155, 202, 188, 114, 81, 207, 189, 26, 241, 159, 6, 73, 73, 223, 145, 56, 102, 175, 26, 27, 54, 219, 158, 150, 155, 229, 116, 65, 11, 117, 84, 204, 158, 132, 2, 219, 177, 126, 204, 197, 171, 193, 117, 180, 101, 93, 131, 213, 82, 15, 239, 84, 65, 36, 8, 116, 177, 7, 152, 120, 35, 77, 219, 244, 208, 137, 191, 120, 55, 58, 180, 206, 223, 54, 139, 113, 147, 114, 75, 29, 110, 15, 83, 113, 62, 101, 90, 37, 104, 222, 177, 71, 242, 22, 80, 170, 171, 221, 169, 213, 8, 115, 53, 26, 30, 210, 254, 168, 149, 89, 102, 67, 156, 2, 21, 245, 29, 44, 201, 146, 32, 147, 252, 179, 55, 192, 154, 4, 15, 175, 101, 209, 8, 35, 58, 67, 75, 141, 226, 251, 88, 213, 81, 210, 46, 179, 0, 211, 195, 150, 171, 23, 38, 13, 35, 134, 234, 34, 63, 219, 30, 162, 215, 34, 131, 30, 145, 221, 211, 2, 1, 180, 152, 185, 40, 60, 27, 136, 3, 72, 227, 252, 134, 224, 34, 8, 240, 151, 130, 21, 122, 198, 157, 169, 131, 62, 108, 81, 149, 244, 203, 83, 148, 132, 188, 102, 194, 121, 116, 119, 154, 1, 179, 74, 67, 249, 73, 180, 119, 246, 29, 135, 198, 74, 191, 33, 36, 112, 133, 192, 185, 232, 154, 34, 216, 8, 83, 73, 141, 200, 26, 252, 237, 202, 90, 94, 5, 65, 205, 115, 93, 237, 200, 27, 96, 195, 248, 98, 83, 83, 253, 44, 143, 137, 38, 183, 161, 197, 188, 41, 240, 19, 9, 137, 112, 142, 162, 212, 6, 44, 103, 163, 232, 218, 199, 148, 145, 38, 186, 107, 100, 53, 179, 180, 112, 115, 73, 81, 143, 231, 46, 221, 231, 76, 193, 48, 198, 228, 151, 176, 229, 18, 11, 51, 32, 143, 169, 220, 217, 82, 59, 87, 211, 233, 21, 153, 142, 112, 221, 239, 4, 10, 138, 141, 107, 136, 208, 122, 135, 255, 50, 219, 24, 119, 3, 11, 15, 61, 224, 33, 61, 36, 213, 11, 46, 71, 219, 147, 58, 116, 173, 128, 121, 168, 247, 25, 105, 108, 113, 202, 255, 222, 76, 75, 173, 195, 45, 59, 164, 98, 244, 9, 35, 39, 171, 94, 239, 139, 244, 191, 140, 180, 104, 114, 171, 157, 117, 88, 176, 12, 151, 106, 143, 125, 157, 70, 225, 2, 242, 218, 255, 170, 170, 208, 44, 142, 124, 209, 252, 174, 215, 37, 39, 202, 40, 239, 97, 155, 96, 100, 27, 246, 183, 163, 173, 36, 98, 72, 157, 38, 110, 187, 129, 21, 237, 175, 6, 90, 146, 193, 158, 59, 135, 91, 132, 118, 90, 55, 243, 60, 65, 150, 200, 196, 180, 4, 143, 89, 82, 242, 197, 165, 196, 120, 106, 29, 45, 158, 25, 229, 6, 8, 14, 58, 58, 239, 62, 38, 81, 188, 131, 170, 172, 44, 57, 59, 204, 234, 4, 61, 172, 45, 250, 64, 50, 201, 28, 40, 189, 115, 87, 225, 14, 247, 216, 159, 253, 125, 121, 34, 5, 143, 139, 75, 134, 236, 2, 171, 153, 91, 64, 87, 105, 219, 110, 215, 119, 8, 209, 23, 110, 190, 134, 142, 239, 241, 61, 187, 84, 228, 171, 193, 40, 59, 42, 178, 234, 241, 41, 247, 234, 134, 65, 102, 141, 38, 38, 225, 11, 220, 52, 36, 28, 30, 227, 8, 74, 189, 121, 16, 38, 109, 141, 228, 108, 170, 227, 16, 222, 104, 212, 25, 79, 250, 7, 92, 19, 247, 183, 161, 13, 94, 2, 20, 21, 187, 250, 71, 175, 43, 243, 97, 204, 195, 247, 182, 99, 102, 103, 25, 212, 153, 154, 148, 154, 0, 164, 124, 104, 185, 171, 122, 198, 168, 87, 165, 146, 54, 122, 26, 70, 152, 34, 1, 249, 232, 54, 44, 182, 244, 85, 134, 17, 166, 47, 200, 175, 150, 67, 96, 252, 102, 112, 231, 161, 122, 53, 194, 177, 146, 142, 0, 253, 254, 207, 151, 190, 59, 79, 233, 109, 138, 109, 202, 100, 238, 204, 142, 130, 203, 94, 171, 161, 197, 22, 7, 107, 75, 212, 75, 58, 192, 21, 62, 153, 207, 142, 232, 158, 92, 232, 249, 213, 63, 104, 120, 101, 137, 73, 216, 106, 15, 226, 215, 10, 2, 136, 18, 0, 107, 136, 164, 7, 4, 24, 41, 253, 43, 156, 24, 4, 14, 192, 88, 106, 99, 244, 73, 115, 110, 206, 116, 15, 162, 106, 227, 158, 74, 107, 243, 251, 15, 23, 158, 67, 118, 47, 135, 85, 230, 32, 208, 67, 49, 142, 204, 141, 54, 113, 142, 83, 232, 14, 119, 11, 248, 241, 232, 35, 194, 31, 201, 224, 115, 149, 112, 161, 218, 117, 134, 9, 112, 130, 118, 139, 5, 232, 14, 21, 81, 169, 128, 214, 100, 73, 40, 78, 162, 167, 211, 254, 95, 85, 81, 208, 24, 127, 94, 119, 22, 20, 183, 223, 157, 126, 161, 224, 153, 206, 185, 215, 8, 62, 199, 27, 186, 48, 127, 135, 150, 154, 72, 184, 57, 1, 96, 155, 238, 176, 188, 61, 72, 43, 129, 29, 158, 22, 163, 225, 172, 238, 231, 241, 41, 204, 122, 128, 134, 226, 105, 83, 214, 169, 252, 252, 154, 229, 185, 62, 241, 169, 145, 211, 164, 198, 118, 87, 12, 20, 42, 130, 85, 60, 230, 214, 69, 15, 187, 252, 86, 158, 209, 164, 189, 65, 110, 13, 220, 65, 97, 223, 229, 252, 111, 26, 197, 136, 194, 118, 20, 57, 47, 85, 142, 241, 111, 21, 207, 89, 8, 136, 10, 182, 149, 113, 37, 72, 237, 245, 120, 103, 69, 124, 239, 58, 27, 69, 81, 109, 111, 23, 95, 90, 255, 3, 28, 118, 203, 113, 154, 96, 72, 119, 45, 230, 104, 156, 176, 144, 145, 110, 56, 242, 86, 76, 220, 95, 19, 74, 156, 244, 229, 221, 224, 100, 233, 193, 43, 88, 121, 1, 1, 158, 36, 226, 56, 184, 111, 194, 139, 204, 232, 83, 131, 140, 85, 59, 188, 47, 38, 33, 136, 254, 254, 53, 231, 230, 211, 132, 219, 182, 88, 164, 113, 83, 85, 173, 221, 255, 26, 140, 137, 126, 121, 218, 232, 107, 82, 94, 29, 37, 168, 24, 4, 221, 233, 171, 196, 232, 0, 146, 242, 0, 10, 185, 81, 183, 225, 97, 122, 196, 192, 45, 212, 6, 100, 106, 230, 218, 152, 181, 178, 111, 101, 43, 207, 186, 173, 200, 156, 203, 223, 72, 197, 222, 173, 241, 169, 221, 38, 43, 196, 232, 161, 131, 3, 98, 76, 95, 67, 149, 96, 52, 191, 110, 191, 183, 249, 84, 147, 253, 72, 82, 122, 87, 191, 205, 240, 253, 188, 124, 178, 78, 86, 69, 224, 102, 181, 188, 135, 252, 211, 184, 177, 59, 201, 19, 55, 172, 78, 180, 10, 196, 6, 160, 164, 243, 137, 161, 69, 31, 180, 184, 186, 197, 12, 174, 253, 57, 226, 58, 90, 223, 82, 82, 244, 113, 239, 52, 14, 161, 109, 8, 80, 38, 193, 8, 113, 249, 137, 164, 222, 28, 224, 163, 35, 89, 130, 217, 73, 139, 140, 130, 232, 33, 64, 164, 99, 144, 159, 69, 24, 149, 3, 221, 224, 249, 111, 250, 216, 25, 194, 165, 98, 200, 39, 61, 202, 186, 184, 164, 229, 12, 203, 248, 232, 225, 2, 113, 40, 70, 14, 85, 253, 167, 192, 129, 90, 27, 150, 59, 81, 228, 241, 134, 78, 17, 90, 87, 112, 65, 115, 162, 20, 124, 94, 47, 164, 2, 159, 245, 108, 247, 209, 48, 161, 247, 38, 13, 149, 122, 226, 108, 176, 125, 46, 82, 48, 238, 251, 234, 31, 66, 40, 157, 227, 111, 163, 186, 220, 114, 147, 148, 98, 208, 207, 249, 192, 2, 3, 215, 154, 110, 148, 85, 64, 75, 28, 89, 62, 254, 242, 26, 80, 11, 64, 54, 171, 248, 165, 79, 102, 18, 72, 85, 173, 212, 189, 133, 190, 170, 211, 128, 190, 207, 69, 89, 51, 105, 167, 50, 239, 9, 139, 4, 235, 128, 138, 176, 232, 19, 150, 66, 49, 238, 171, 49, 164, 234, 128, 136, 117, 11, 180, 153, 69, 108, 67, 74, 51, 141, 83, 16, 108, 176, 124, 8, 36, 109, 5, 114, 76, 214, 23, 147, 22, 219, 11, 111, 63, 144, 177, 214, 3, 199, 54, 40, 10, 132, 246, 163, 191, 20, 97, 79, 117, 172, 31, 66, 206, 229, 236, 183, 69, 184, 174, 193, 197, 239, 197, 159, 96, 4, 16, 37, 82, 114, 118, 1, 219, 196, 31, 208, 198, 146, 180, 14, 79, 61, 89, 70, 223, 5, 99, 63, 69, 244, 26, 191, 19, 200, 94, 231, 24, 43, 10, 14, 21, 140, 5, 205, 223, 116, 75, 63, 67, 153, 137, 232, 178, 186, 184, 189, 133, 141, 69, 151, 192, 13, 22, 207, 248, 247, 11, 31, 3, 140, 205, 251, 57, 243, 8, 215, 124, 128, 35, 211, 236, 247, 182, 34, 226, 44, 166, 156, 137, 167, 35, 187, 52, 9, 207, 60, 122, 52, 87, 16, 229, 125, 159, 32, 45, 158, 232, 21, 241, 211, 185, 174, 159, 21, 40, 201, 10, 187, 245, 189, 125, 249, 34, 244, 220, 105, 108, 150, 180, 81, 62, 195, 113, 193, 201, 191, 28, 230, 132, 155, 61, 19, 95, 47, 133, 140, 252, 78, 31, 113, 173, 97, 107, 239, 48, 19, 231, 237, 146, 248, 106, 166, 200, 219, 21, 235, 66, 162, 133, 51, 127, 105, 35, 229, 116, 119, 146, 106, 79, 76, 206, 120, 63, 240, 63, 215, 140, 141, 239, 149, 23, 234, 137, 214, 51, 98, 221, 94, 150, 170, 46, 2, 139, 181, 254, 242, 86, 227, 223, 61, 213, 22, 44, 19, 197, 184, 34, 42, 206, 53, 242, 76, 186, 234, 120, 89, 154, 206, 189, 133, 166, 58, 243, 232, 239, 244, 53, 213, 204, 222, 68, 97, 151, 96, 227, 167, 85, 99, 66, 204, 1, 206, 84, 133, 203, 177, 122, 23, 7, 238, 46, 123, 88, 226, 108, 104, 87, 164, 28, 239, 249, 206, 125, 254, 200, 142, 128, 111, 234, 57, 5, 226, 72, 194, 123, 149, 2, 135, 95, 162, 12, 133, 88, 11, 55, 155, 210, 193, 18, 7, 52, 63, 141, 10, 220, 105, 177, 13, 85, 173, 47, 12, 146, 217, 211, 160, 236, 14, 217, 26, 240, 97, 124, 185, 17, 61, 243, 21, 166, 158, 221, 32, 171, 62, 30, 211, 105, 107, 69, 182, 223, 254, 227, 118, 89, 179, 32, 19, 6, 9, 215, 195, 152, 213, 147, 119, 202, 217, 67, 214, 91, 17, 36, 45, 169, 131, 14, 172, 217, 57, 95, 215, 134, 33, 27, 249, 212, 39, 43, 111, 222, 149, 215, 156, 233, 117, 116, 48, 94, 98, 126, 75, 221, 14, 142, 101, 8, 44, 246, 28, 24, 38, 138, 77, 219, 251, 6, 208, 232, 149, 35, 31, 198, 191, 245, 50, 230, 166, 248, 89, 147, 169, 197, 180, 77, 98, 1, 110, 16, 96, 6, 223, 173, 241, 107, 55, 255, 250, 125, 182, 195, 154, 77, 37, 8, 38, 111, 48, 169, 64, 78, 140, 175, 202, 201, 198, 80, 109, 18, 108, 4, 247, 31, 237, 32, 226, 199, 94, 106, 37, 250, 175, 207, 237, 85, 156, 150, 74, 78, 190, 146, 157, 222, 210, 69, 248, 128, 57, 159, 146, 38, 150, 202, 61, 189, 250, 206, 86, 88, 47, 203, 235, 242, 208, 125, 71, 221, 89, 196, 7, 39, 25, 24, 37, 65, 76, 11, 229, 164, 181, 34, 124, 250, 128, 58, 165, 255, 112, 46, 102, 114, 227, 125, 107, 224, 190, 49, 182, 16, 65, 160, 218, 174, 246, 10, 165, 242, 22, 216, 45, 7, 141, 219, 147, 228, 210, 155, 190, 112, 199, 6, 88, 241, 67, 69, 17, 73, 59, 95, 242, 64, 9, 207, 140, 150, 175, 162, 1, 47, 37, 115, 253, 125, 63, 102, 167, 10, 167, 114, 179, 195, 87, 67, 131, 109, 73, 27, 63, 154, 139, 75, 191, 233, 230, 124, 150, 51, 188, 62, 195, 243, 52, 237, 226, 129, 253, 60, 253, 45, 126, 58, 151, 130, 137, 17, 241, 138, 246, 169, 180, 211, 213, 144, 167, 176, 225, 165, 26, 141, 192, 90, 241, 205, 91, 174, 44, 121, 13, 129, 227, 98, 118, 81, 168, 148, 103, 130, 42, 51, 165, 126, 115, 198, 209, 212, 56, 33, 93, 251, 4, 122, 90, 124, 132, 189, 101, 133, 26, 180, 120, 191, 158, 200, 95, 16, 8, 57, 34, 226, 169, 231, 95, 14, 21, 80, 186, 13, 77, 26, 143, 189, 224, 215, 240, 12, 145, 144, 169, 234, 62, 161, 234, 163, 45, 250, 40, 250, 241, 103, 229, 148, 120, 17, 234, 183, 215, 129, 173, 116, 144, 46, 80, 64, 163, 147, 35, 101, 212, 111, 112, 11, 55, 217, 110, 215, 8, 126, 244, 107, 164, 44, 127, 130, 251, 238, 12, 17, 7, 129, 164, 57, 204, 95, 108, 126, 84, 122, 245, 238, 153, 242, 211, 94, 46, 106, 145, 207, 176, 193, 221, 101, 221, 125, 35, 83, 204, 201, 168, 20, 107, 227, 141, 125, 242, 13, 89, 253, 202, 95, 163, 186, 131, 127, 43, 111, 16, 141, 131, 235, 151, 53, 73, 56, 224, 152, 5, 175, 189, 195, 17, 237, 34, 73, 143, 152, 246, 22, 93, 124, 237, 136, 196, 100, 47, 86, 100, 82, 254, 46, 183, 194, 251, 19, 92, 2, 66, 93, 101, 60, 82, 60, 106, 175, 122, 215, 15, 168, 226, 149, 188, 5, 88, 94, 205, 48, 221, 116, 150, 112, 138, 160, 226, 202, 172, 47, 183, 72, 216, 248, 229, 12, 11, 200, 229, 86, 222, 180, 100, 69, 10, 227, 15, 218, 45, 219, 166, 12, 22, 48, 99, 105, 170, 146, 132, 250, 133, 140, 4, 74, 103, 56, 216, 213, 2, 225, 78, 188, 9, 134, 139, 135, 72, 254, 51, 217, 100, 108, 8, 176, 7, 127, 55, 22, 75, 143, 79, 107, 29, 184, 49, 4, 136, 47, 122, 94, 6, 154, 88, 103, 45, 188, 234, 62, 92, 74, 236, 193, 198, 223, 206, 99, 82, 188, 16, 245, 55, 96, 121, 75, 118, 174, 53, 103, 80, 222, 4, 78, 124, 211, 119, 22, 45, 121, 234, 191, 213, 209, 186, 62, 46, 41, 222, 13, 70, 139, 189, 84, 55, 42, 126, 187, 109, 196, 164, 253, 0, 186, 15, 238, 152, 225, 157, 158, 60, 61, 228, 242, 38, 189, 245, 17, 219, 178, 142, 231, 0, 250, 58, 196, 47, 89, 239, 187, 116, 70, 109, 226, 0, 20, 153, 17, 77, 63, 205, 55, 9, 227, 148, 33, 6, 180, 182, 228, 121, 6, 72, 163, 187, 127, 202, 169, 200, 180, 61, 71, 139, 18, 51, 235, 69, 196, 223, 76, 48, 162, 5, 58, 57, 222, 229, 93, 87, 107, 174, 206, 247, 85, 211, 42, 81, 154, 12, 163, 169, 240, 98, 114, 65, 72, 208, 149, 37, 203, 200, 106, 83, 177, 214, 233, 228, 90, 18, 167, 16, 123, 216, 153, 205, 72, 66, 12, 190, 139, 49, 160, 169, 19, 120, 127, 86, 195, 32, 229, 177, 178, 154, 13, 233, 248, 17, 254, 135, 92, 136, 49, 23, 45, 80, 120, 238, 246, 91, 35, 242, 249, 14, 233, 168, 194, 95, 76, 176, 227, 116, 198, 88, 94, 178, 142, 234, 125, 6, 132, 238, 186, 232, 180, 189, 155, 217, 208, 38, 175, 29, 31, 104, 156, 7, 240, 155, 113, 78, 53, 21, 162, 158, 9, 4, 242, 167, 226, 93, 122, 87, 173, 159, 149, 1, 4, 206, 95, 234, 244, 162, 138, 65, 207, 0, 159, 68, 136, 36, 18, 94, 131, 219, 181, 80, 219, 249, 141, 66, 194, 160, 67, 7, 182, 228, 71, 208, 50, 141, 6, 82, 18, 136, 80, 249, 205, 191, 124, 109, 253, 169, 105, 81, 254, 177, 202, 55, 219, 186, 227, 171, 216, 195, 24, 194, 130, 0, 164, 58, 211, 16, 171, 98, 214, 35, 125, 217, 120, 119, 7, 135, 236, 39, 186, 193, 81, 202, 106, 162, 179, 104, 237, 43, 220, 227, 4, 204, 77, 222, 120, 80, 50, 184, 104, 184, 40, 69, 61, 79, 168, 26, 202, 147, 104, 129, 109, 170, 164, 82, 168, 210, 189, 134, 67, 3, 208, 86, 170, 239, 231, 149, 212, 224, 254, 89, 25, 171, 26, 20, 13, 179, 252, 200, 59, 41, 195, 149, 235, 218, 139, 36, 192, 2, 56, 137, 88, 160, 74, 95, 29, 122, 21, 154, 1, 44, 31, 190, 156, 154, 200, 209, 250, 153, 25, 47, 76, 194, 110, 7, 89, 61, 239, 184, 75, 162, 158, 136, 157, 124, 156, 85, 215, 192, 80, 43, 105, 149, 156, 154, 39, 201, 53, 13, 164, 187, 112, 55, 77, 92, 199, 184, 64, 51, 34, 191, 123, 148, 20, 160, 56, 108, 5, 201, 241, 199, 108, 118, 34, 107, 0, 159, 201, 234, 31, 70, 35, 157, 241, 157, 1, 76, 4, 33, 220, 12, 183, 173, 90, 62, 78, 90, 204, 102, 110, 120, 173, 112, 63, 79, 131, 80, 27, 148, 66, 186, 12, 240, 107, 94, 72, 225, 214, 65, 3, 129, 170, 251, 235, 171, 230, 101, 30, 30, 119, 250, 134, 254, 87, 142, 40, 17, 98, 24, 152, 141, 154, 173, 87, 52, 150, 115, 134, 52, 70, 245, 134, 51, 135, 108, 1, 31, 239, 99, 187, 214, 222, 207, 136, 28, 0, 10, 29, 10, 107, 147, 226, 59, 201, 114, 161, 47, 131, 10, 52, 244, 210, 18, 31, 180, 129, 50, 6, 180, 184, 154, 55, 213, 248, 99, 196, 75, 105, 142, 67, 20, 171, 150, 141, 235, 44, 159, 126, 169, 47, 137, 141, 88, 187, 240, 190, 195, 160, 206, 55, 119, 180, 160, 250, 121, 56, 39, 78, 209, 172, 119, 248, 19, 108, 120, 148, 112, 178, 138, 186, 253, 225, 115, 137, 117, 215, 131, 89, 135, 250, 24, 11, 224, 205, 51, 108, 19, 102, 4, 88, 61, 133, 248, 201, 135, 204, 198, 44, 24, 154, 203, 69, 14, 78, 34, 208, 133, 198, 106, 39, 190, 191, 37, 148, 98, 21, 64, 229, 169, 230, 172, 11, 91, 195, 160, 180, 70, 57, 194, 55, 80, 136, 246, 30, 198, 153, 19, 56, 144, 171, 249, 170, 4, 22, 186, 215, 222, 48, 113, 190, 59, 211, 72, 41, 78, 111, 117, 29, 70, 173, 203, 37, 202, 69, 123, 1, 86, 99, 0, 20, 210, 73, 78, 1, 14, 106, 190, 83, 27, 116, 53, 61, 49, 128, 167, 20, 148, 142, 130, 127, 161, 60, 66, 233, 162, 88, 203, 154, 92, 141, 226, 196, 178, 226, 204, 214, 41, 250, 141, 134, 12, 18, 249, 187, 144, 75, 28, 122, 185, 113, 41, 181, 217, 184, 56, 107, 68, 229, 20, 160, 83, 3, 151, 37, 150, 232, 243, 108, 70, 224, 164, 111, 54, 110, 159, 55, 55, 96, 138, 74, 149, 238, 234, 20, 2, 250, 186, 209, 253, 244, 38, 52, 159, 154, 110, 49, 197, 164, 242, 171, 47, 220, 218, 161, 104, 58, 52, 194, 97, 74, 140, 40, 138, 27, 153, 70, 103, 205, 87, 131, 59, 79, 62, 30, 95, 237, 78, 79, 72, 186, 76, 233, 43, 83, 56, 66, 204, 119, 68, 135, 34, 239, 162, 228, 47, 110, 28, 156, 237, 183, 185, 212, 10, 112, 231, 17, 90, 235, 83, 140, 215, 62, 209, 34, 52, 204, 176, 53, 220, 107, 34, 158, 198, 80, 93, 251, 133, 149, 54, 78, 23, 50, 124, 177, 180, 15, 80, 251, 29, 118, 232, 40, 52, 133, 18, 45, 116, 39, 20, 248, 19, 51, 221, 94, 30, 83, 253, 203, 237, 187, 71, 16, 186, 184, 119, 79, 41, 151, 150, 234, 29, 89, 97, 94, 104, 12, 47, 210, 178, 105, 15, 92, 210, 183, 5, 32, 1, 231, 238, 56, 105, 180, 9, 255, 35, 97, 143, 4, 201, 100, 20, 39, 225, 29, 9, 31, 0, 14, 166, 208, 214, 148, 34, 18, 190, 180, 216, 79, 247, 35, 245, 161, 97, 237, 119, 223, 211, 27, 145, 223, 103, 208, 99, 6, 69, 30, 93, 0, 74, 126, 199, 207, 173, 115, 112, 117, 42, 156, 153, 58, 204, 66, 8, 183, 181, 254, 148, 21, 80, 72, 252, 102, 254, 8, 120, 186, 111, 57, 231, 68, 47, 38, 96, 86, 170, 241, 14, 133, 227, 174, 26, 242, 140, 32, 97, 29, 253, 163, 164, 5, 2, 113, 5, 187, 104, 130, 11, 165, 243, 90, 222, 155, 2, 79, 131, 104, 4, 25, 174, 61, 160, 150, 132, 120, 114, 42, 152, 117, 155, 160, 56, 3, 129, 205, 15, 217, 141, 131, 76, 142, 212, 227, 209, 189, 121, 144, 181, 176, 119, 67, 37, 13, 173, 40, 192, 162, 115, 218, 76, 36, 168, 218, 142, 32, 90, 182, 209, 160, 54, 8, 3, 236, 196, 206, 171, 4, 25, 163, 201, 42, 140, 94, 254, 169, 68, 116, 68, 138, 60, 93, 138, 138, 218, 132, 12, 94, 194, 169, 157, 236, 195, 95, 75, 5, 240, 132, 250, 219, 65, 10, 185, 135, 52, 74, 105, 173, 3, 8, 144, 251, 253, 127, 53, 112, 43, 80, 174, 44, 234, 129, 43, 16, 246, 248, 140, 100, 205, 219, 197, 128, 218, 223, 191, 23, 41, 119, 44, 119, 49, 157, 237, 73, 91, 211, 22, 89, 37, 7, 213, 212, 229, 171, 135, 97, 65, 43, 17, 173, 235, 201, 187, 248, 209, 147, 56, 154, 105, 76, 73, 21, 171, 112, 53, 198, 74, 176, 22, 234, 195, 38, 192, 166, 133, 102, 28, 85, 146, 196, 167, 72, 104, 177, 82, 99, 232, 155, 28, 95, 152, 71, 23, 70, 101, 211, 221, 170, 138, 221, 203, 188, 128, 227, 219, 25, 114, 212, 125, 50, 102, 137, 248, 127, 228, 219, 3, 2, 239, 81, 120, 48, 89, 220, 233, 11, 174, 99, 129, 55, 181, 175, 124, 116, 59, 197, 90, 165, 123, 191, 166, 150, 220, 155, 38, 127, 62, 128, 119, 194, 240, 87, 93, 216, 44, 158, 180, 198, 201, 10, 176, 51, 81, 215, 196, 125, 50, 22, 60, 33, 41, 117, 109, 132, 212, 69, 123, 37, 128, 166, 23, 137, 188, 39, 45, 128, 121, 139, 35, 170, 241, 96, 149, 160, 199, 238, 112, 212, 242, 170, 144, 78, 60, 84, 156, 234, 17, 23, 196, 246, 226, 83, 52, 168, 136, 199, 9, 55, 24, 14, 75, 107, 209, 182, 145, 6, 27, 239, 72, 56, 243, 186, 20, 58, 190, 222, 101, 188, 78, 107, 193, 75, 112, 84, 217, 37, 177, 7, 188, 212, 229, 3, 211, 201, 213, 150, 140, 179, 78, 72, 33, 63, 75, 250, 172, 49, 125, 97, 141, 112, 22, 51, 235, 188, 192, 158, 196, 19, 236, 132, 53, 4, 216, 122, 86, 194, 225, 233, 136, 5, 154, 13, 33, 127, 12, 170, 171, 111, 62, 226, 30, 36, 103, 103, 185, 97, 10, 189, 67, 74, 90, 12, 30, 213, 172, 86, 116, 136, 44, 208, 210, 42, 38, 92, 235, 82, 216, 202, 136, 220, 68, 255, 16, 244, 61, 218, 95, 31, 88, 187, 12, 37, 68, 148, 245, 3, 239, 107, 109, 72, 81, 112, 61, 111, 39, 25, 175, 231, 47, 212, 85, 57, 193, 252, 204, 66, 129, 40, 140, 99, 172, 103, 242, 39, 214, 186, 94, 79, 201, 129, 254, 71, 126, 206, 130, 243, 180, 59, 91, 18, 222, 135, 230, 142, 182, 138, 24, 161, 103, 3, 139, 85, 198, 29, 95, 84, 135, 233, 240, 76, 83, 51, 253, 185, 205, 35, 139, 172, 136, 31, 108, 118, 201, 19, 240, 2, 94, 61, 196, 241, 210, 1, 52, 227, 173, 94, 206, 100, 133, 228, 117, 205, 74, 98, 221, 172, 120, 111, 140, 70, 244, 189, 19, 117, 79, 212, 176, 30, 199, 255, 192, 88, 72, 214, 67, 251, 30, 235, 8, 211, 248, 157, 201, 139, 250, 116, 161, 198, 57, 177, 153, 211, 10, 202, 254, 78, 116, 221, 17, 243, 25, 230, 21, 173, 127, 32, 155, 189, 221, 170, 232, 140, 91, 101, 103, 244, 13, 22, 72, 55, 45, 124, 135, 255, 19, 241, 55, 160, 124, 54, 222, 104, 23, 73, 55, 142, 165, 233, 163, 236, 6, 161, 210, 78, 11, 166, 245, 234, 237, 113, 111, 163, 24, 96, 245, 127, 218, 212, 77, 130, 13, 140, 4, 30, 157, 207, 123, 109, 156, 157, 3, 221, 2, 206, 182, 141, 45, 135, 146, 169, 112, 223, 182, 169, 51, 244, 78, 203, 189, 161, 55, 123, 237, 1, 12, 236, 247, 147, 167, 8, 183, 20, 42, 93, 23, 28, 136, 10, 127, 17, 89, 117, 197, 246, 93, 229, 11, 92, 137, 106, 234, 50, 24, 72, 38, 62, 143, 108, 214, 18, 90, 184, 54, 13, 85, 62, 160, 169, 28, 206, 175, 191, 31, 199, 87, 35, 146, 54, 104, 139, 230, 14, 252, 125, 220, 120, 17, 41, 224, 241, 152, 47, 190, 193, 88, 28, 22, 210, 243, 144, 242, 60, 128, 181, 249, 229, 217, 82, 255, 45, 107, 68, 223, 85, 119, 60, 159, 118, 23, 119, 205, 144, 82, 133, 125, 110, 138, 79, 114, 30, 197, 205, 68, 81, 197, 113, 61, 113, 88, 209, 179, 94, 165, 74, 115, 116, 77, 185, 107, 194, 177, 196, 36, 0, 250, 86, 190, 254, 144, 150, 83, 175, 30, 250, 177, 90, 206, 95, 151, 235, 255, 167, 149, 65, 149, 183, 38, 197, 12, 148, 54, 50, 89, 55, 247, 210, 194, 235, 197, 179, 46, 251, 195, 235, 235, 186, 87, 45, 196, 57, 162, 243, 237, 219, 20, 80, 33, 29, 1, 72, 37, 144, 4, 191, 17, 88, 19, 95, 171, 122, 201, 220, 220, 235, 227, 47, 234, 40, 157, 196, 232, 104, 194, 51, 243, 75, 30, 168, 159, 164, 222, 240, 76, 179, 234, 3, 40, 92, 170, 36, 159, 218, 28, 17, 33, 2, 73, 184, 229, 254, 190, 40, 36, 166, 243, 27, 9, 227, 156, 170, 222, 118, 100, 95, 121, 50, 138, 74, 166, 240, 106, 175, 183, 52, 241, 3, 15, 222, 40, 64, 180, 49, 147, 16, 222, 160, 238, 169, 65, 102, 202, 226, 142, 196, 56, 125, 131, 155, 235, 167, 15, 47, 102, 241, 17, 62, 11, 51, 2, 87, 94, 18, 171, 43, 180, 13, 114, 21, 223, 248, 222, 13, 41, 191, 176, 66, 105, 147, 151, 227, 23, 3, 231, 247, 102, 92, 41], + [153, 138, 208, 168, 179, 166, 234, 200, 183, 42, 65, 42, 145, 168, 57, 210, 142, 9, 63, 149, 148, 81, 42, 143, 39, 231, 135, 236, 245, 5, 84, 120, 8, 220, 108, 90, 146, 192, 155, 2, 169, 106, 123, 64, 250, 39, 203, 30, 140, 120, 240, 35, 52, 141, 186, 24, 158, 49, 64, 31, 176, 39, 38, 152, 215, 200, 223, 85, 69, 172, 251, 181, 177, 54, 229, 115, 96, 9, 191, 219, 95, 248, 204, 143, 79, 37, 247, 20, 216, 18, 159, 191, 197, 232, 173, 102, 68, 152, 132, 179, 84, 193, 7, 150, 203, 255, 45, 179, 14, 42, 40, 228, 87, 163, 98, 28, 89, 23, 160, 233, 89, 240, 118, 92, 86, 135, 60, 138, 233, 167, 103, 23, 59, 40, 163, 140, 167, 51, 102, 47, 17, 16, 186, 80, 57, 162, 240, 126, 161, 99, 112, 104, 15, 111, 147, 6, 175, 209, 162, 59, 5, 86, 99, 109, 161, 98, 59, 183, 94, 109, 230, 145, 21, 196, 223, 93, 39, 54, 82, 203, 195, 233, 173, 19, 167, 79, 62, 153, 149, 69, 177, 2, 145, 176, 129, 70, 113, 21, 223, 148, 101, 35, 37, 204, 206, 29, 2, 220, 135, 32, 77, 16, 165, 254, 54, 30, 29, 170, 64, 161, 12, 83, 94, 125, 41, 66, 87, 166, 90, 110, 111, 69, 155, 162, 195, 248, 174, 167, 145, 76, 115, 171, 15, 17, 76, 4, 91, 82, 180, 129, 199, 79, 236, 37, 130, 173, 29, 83, 137, 98, 114, 136, 75, 17, 208, 151, 156, 164, 112, 113, 203, 205, 151, 169, 92, 107, 68, 209, 108, 212, 57, 78, 193, 80, 244, 22, 76, 243, 225, 198, 220, 210, 34, 238, 209, 59, 255, 178, 22, 131, 88, 128, 15, 183, 90, 199, 213, 116, 114, 241, 166, 4, 7, 249, 117, 160, 245, 156, 127, 13, 24, 80, 196, 227, 15, 67, 184, 114, 160, 232, 96, 239, 237, 190, 216, 224, 151, 99, 189, 175, 127, 147, 204, 232, 238, 192, 27, 169, 254, 216, 127, 16, 59, 139, 121, 224, 84, 169, 80, 246, 149, 74, 117, 15, 232, 84, 221, 186, 158, 230, 45, 83, 62, 185, 237, 164, 246, 221, 147, 198, 14, 122, 124, 52, 68, 95, 58, 36, 149, 57, 171, 157, 19, 221, 1, 73, 86, 219, 147, 29, 244, 33, 76, 8, 224, 216, 92, 152, 144, 4, 146, 88, 71, 221, 162, 232, 66, 186, 27, 27, 46, 105, 195, 83, 232, 30, 214, 7, 153, 68, 88, 43, 13, 64, 14, 180, 75, 144, 104, 38, 18, 44, 129, 144, 60, 53, 196, 126, 155, 83, 176, 124, 95, 120, 23, 74, 57, 222, 86, 88, 58, 46, 69, 202, 235, 49, 55, 184, 210, 20, 180, 192, 146, 64, 145, 205, 69, 49, 87, 39, 81, 29, 195, 9, 71, 229, 120, 203, 83, 205, 63, 172, 46, 2, 91, 190, 93, 53, 54, 219, 73, 139, 140, 18, 110, 171, 125, 206, 35, 99, 204, 131, 241, 184, 24, 75, 99, 244, 33, 125, 142, 26, 9, 68, 247, 19, 74, 253, 32, 40, 113, 4, 188, 118, 124, 73, 141, 45, 50, 83, 17, 7, 90, 144, 45, 148, 188, 37, 127, 227, 238, 21, 138, 121, 128, 112, 34, 78, 237, 52, 93, 255, 205, 177, 247, 42, 3, 229, 129, 68, 205, 206, 153, 171, 176, 180, 250, 75, 221, 200, 230, 113, 23, 235, 227, 85, 47, 133, 180, 111, 227, 98, 222, 56, 22, 76, 152, 183, 247, 53, 145, 206, 28, 13, 189, 129, 234, 169, 150, 183, 2, 117, 224, 173, 212, 126, 26, 9, 32, 183, 112, 137, 137, 46, 186, 78, 109, 75, 193, 198, 137, 189, 196, 84, 111, 10, 18, 5, 185, 36, 214, 201, 62, 20, 186, 64, 162, 163, 126, 58, 80, 210, 11, 161, 177, 122, 28, 212, 245, 124, 226, 14, 31, 28, 162, 51, 7, 162, 92, 93, 206, 234, 143, 180, 156, 103, 82, 38, 185, 223, 162, 24, 224, 139, 245, 37, 165, 244, 192, 1, 121, 143, 205, 33, 224, 43, 37, 55, 208, 220, 38, 114, 105, 174, 132, 110, 231, 99, 175, 105, 120, 74, 212, 149, 51, 168, 4, 140, 215, 223, 70, 221, 165, 115, 46, 170, 176, 248, 66, 5, 90, 3, 80, 131, 93, 205, 219, 126, 251, 10, 59, 191, 152, 20, 182, 231, 81, 176, 229, 134, 167, 124, 114, 179, 70, 91, 67, 39, 64, 244, 129, 141, 243, 169, 71, 156, 7, 153, 27, 30, 18, 150, 140, 248, 78, 60, 225, 96, 138, 187, 14, 106, 170, 157, 79, 148, 237, 46, 134, 197, 0, 237, 221, 241, 97, 235, 90, 91, 49, 144, 224, 127, 98, 213, 189, 135, 155, 205, 206, 237, 167, 73, 76, 101, 54, 42, 15, 4, 140, 89, 60, 124, 192, 206, 233, 124, 163, 202, 247, 97, 217, 87, 114, 208, 2, 209, 118, 189, 153, 96, 152, 191, 167, 53, 247, 190, 112, 24, 53, 128, 180, 225, 104, 177, 206, 169, 57, 106, 61, 84, 194, 224, 96, 153, 83, 234, 5, 210, 19, 10, 193, 122, 155, 112, 140, 40, 183, 137, 8, 102, 60, 236, 102, 37, 86, 52, 168, 145, 233, 93, 115, 70, 140, 75, 14, 178, 72, 162, 235, 178, 141, 64, 44, 4, 72, 218, 10, 190, 12, 214, 142, 184, 44, 83, 103, 205, 57, 158, 141, 207, 245, 104, 40, 162, 240, 76, 172, 40, 188, 42, 201, 31, 156, 133, 218, 34, 139, 223, 193, 166, 186, 153, 89, 154, 161, 253, 190, 178, 40, 222, 181, 209, 69, 80, 188, 102, 5, 73, 46, 45, 3, 0, 22, 53, 6, 18, 138, 88, 100, 83, 93, 220, 219, 35, 158, 156, 72, 105, 130, 147, 202, 136, 13, 91, 112, 182, 58, 55, 80, 149, 61, 91, 191, 115, 254, 162, 191, 95, 4, 46, 106, 233, 48, 30, 199, 65, 15, 154, 80, 213, 145, 127, 166, 156, 155, 90, 60, 146, 47, 56, 110, 68, 209, 222, 35, 124, 113, 120, 168, 60, 250, 10, 219, 178, 210, 207, 178, 97, 183, 30, 167, 51, 234, 33, 82, 255, 47, 30, 57, 90, 182, 66, 76, 17, 34, 60, 18, 144, 174, 174, 109, 222, 75, 236, 186, 12, 25, 202, 167, 50, 167, 235, 47, 94, 148, 2, 42, 151, 123, 154, 251, 99, 27, 102, 25, 187, 230, 214, 167, 60, 130, 11, 57, 86, 41, 130, 185, 30, 24, 55, 13, 247, 107, 245, 238, 176, 204, 101, 236, 131, 177, 82, 0, 148, 10, 94, 234, 100, 0, 61, 27, 229, 9, 136, 163, 197, 150, 19, 178, 229, 211, 62, 72, 203, 255, 62, 29, 121, 119, 247, 62, 113, 188, 203, 127, 153, 151, 181, 54, 239, 129, 43, 73, 191, 168, 8, 145, 16, 212, 16, 2, 226, 215, 42, 239, 205, 197, 87, 252, 88, 139, 196, 131, 48, 249, 109, 228, 82, 44, 239, 20, 251, 90, 231, 6, 109, 76, 59, 133, 192, 57, 41, 153, 88, 35, 110, 120, 218, 147, 82, 249, 174, 254, 250, 91, 24, 187, 60, 198, 67, 5, 25, 163, 231, 53, 20, 139, 201, 46, 3, 152, 169, 123, 120, 208, 36, 225, 226, 148, 79, 91, 120, 234, 184, 217, 108, 41, 172, 114, 19, 177, 194, 91, 11, 210, 10, 20, 63, 1, 142, 53, 3, 223, 155, 169, 203, 239, 20, 148, 60, 232, 18, 199, 171, 138, 151, 236, 81, 92, 55, 87, 94, 49, 118, 217, 216, 255, 109, 104, 98, 185, 156, 53, 253, 42, 152, 130, 209, 176, 245, 103, 207, 133, 166, 205, 148, 95, 186, 222, 200, 185, 181, 3, 197, 22, 221, 233, 248, 242, 242, 187, 104, 54, 195, 15, 46, 237, 123, 51, 105, 126, 82, 42, 83, 233, 10, 215, 212, 150, 147, 84, 31, 189, 78, 229, 152, 175, 95, 18, 30, 202, 153, 120, 91, 117, 105, 80, 177, 184, 214, 237, 168, 55, 162, 5, 225, 124, 222, 246, 93, 235, 201, 126, 34, 242, 59, 166, 7, 192, 93, 33, 247, 194, 49, 30, 129, 225, 48, 157, 202, 166, 5, 65, 118, 125, 242, 19, 82, 31, 165, 180, 1, 111, 126, 84, 11, 232, 101, 253, 220, 220, 85, 202, 24, 184, 26, 184, 29, 43, 18, 84, 252, 229, 64, 163, 65, 210, 133, 62, 230, 66, 179, 221, 83, 114, 66, 118, 188, 128, 92, 219, 205, 61, 113, 212, 152, 31, 198, 154, 205, 203, 86, 255, 251, 149, 185, 77, 69, 144, 139, 31, 164, 106, 229, 149, 37, 124, 93, 3, 74, 129, 79, 50, 185, 199, 41, 143, 41, 28, 127, 102, 44, 60, 247, 108, 252, 27, 76, 251, 152, 255, 123, 184, 121, 22, 48, 120, 109, 35, 13, 86, 207, 38, 131, 48, 129, 45, 249, 229, 196, 215, 66, 58, 176, 1, 107, 215, 113, 154, 30, 217, 16, 209, 70, 244, 234, 161, 78, 111, 16, 148, 98, 38, 140, 177, 88, 106, 34, 42, 71, 224, 148, 52, 156, 155, 159, 151, 76, 60, 214, 17, 76, 122, 239, 114, 143, 102, 115, 44, 193, 19, 106, 188, 117, 170, 122, 242, 151, 72, 19, 236, 205, 131, 81, 137, 190, 253, 124, 183, 169, 72, 194, 121, 23, 220, 13, 56, 5, 158, 152, 214, 183, 58, 107, 140, 206, 233, 121, 127, 77, 210, 190, 160, 102, 6, 141, 137, 84, 177, 32, 13, 171, 25, 241, 215, 44, 0, 158, 209, 28, 141, 124, 245, 116, 175, 145, 93, 42, 156, 14, 55, 251, 244, 96, 101, 188, 224, 41, 38, 58, 144, 237, 221, 224, 94, 194, 224, 3, 96, 55, 139, 156, 161, 170, 253, 136, 222, 142, 223, 124, 97, 172, 106, 212, 158, 173, 246, 235, 4, 33, 179, 118, 202, 130, 50, 174, 113, 141, 29, 201, 227, 71, 148, 83, 92, 223, 159, 65, 208, 139, 3, 104, 137, 236, 132, 153, 162, 88, 170, 172, 125, 15, 130, 67, 232, 141, 32, 183, 48, 34, 33, 16, 195, 82, 158, 151, 127, 58, 103, 189, 252, 205, 2, 225, 126, 45, 254, 249, 236, 6, 35, 92, 174, 163, 65, 135, 47, 96, 148, 119, 89, 31, 90, 91, 246, 219, 22, 205, 175, 25, 246, 198, 182, 142, 51, 252, 163, 123, 225, 230, 244, 149, 170, 198, 29, 244, 13, 169, 223, 29, 64, 159, 157, 49, 242, 227, 199, 252, 160, 235, 120, 189, 250, 89, 86, 160, 191, 191, 31, 251, 175, 21, 206, 145, 36, 4, 57, 6, 140, 42, 13, 33, 107, 169, 31, 216, 101, 204, 134, 19, 240, 73, 168, 193, 224, 68, 130, 228, 122, 229, 28, 133, 177, 188, 87, 51, 33, 123, 48, 124, 13, 103, 17, 146, 48, 198, 127, 244, 167, 250, 84, 77, 0, 52, 190, 121, 253, 17, 102, 99, 89, 98, 219, 51, 43, 69, 208, 178, 206, 209, 12, 195, 185, 236, 242, 30, 132, 16, 245, 166, 176, 119, 169, 183, 133, 169, 142, 92, 60, 244, 60, 29, 19, 132, 146, 84, 4, 26, 130, 200, 252, 210, 158, 224, 112, 17, 43, 255, 77, 0, 60, 159, 118, 103, 20, 223, 75, 161, 126, 143, 115, 113, 219, 198, 159, 58, 204, 183, 121, 70, 134, 105, 130, 13, 198, 19, 151, 25, 38, 118, 107, 52, 108, 72, 68, 129, 18, 107, 118, 210, 44, 237, 66, 106, 69, 76, 155, 206, 58, 2, 17, 13, 25, 59, 132, 11, 168, 110, 177, 247, 164, 1, 97, 182, 179, 15, 167, 234, 213, 141, 99, 106, 41, 187, 93, 78, 177, 129, 225, 45, 194, 107, 226, 163, 49, 33, 181, 94, 25, 70, 180, 124, 179, 208, 157, 54, 80, 114, 147, 176, 217, 139, 245, 146, 156, 163, 226, 22, 4, 15, 49, 133, 36, 190, 62, 177, 211, 142, 4, 136, 56, 213, 7, 47, 168, 149, 61, 164, 174, 226, 18, 64, 66, 176, 173, 134, 106, 9, 255, 239, 4, 69, 40, 192, 245, 210, 196, 180, 79, 176, 30, 233, 77, 22, 140, 78, 25, 145, 212, 114, 12, 204, 75, 199, 198, 251, 214, 34, 165, 38, 85, 6, 203, 54, 138, 141, 162, 236, 153, 181, 227, 117, 120, 248, 199, 37, 234, 91, 249, 9, 250, 116, 192, 103, 223, 238, 103, 212, 90, 212, 207, 71, 252, 254, 180, 21, 35, 144, 48, 123, 139, 40, 222, 44, 191, 93, 235, 246, 189, 121, 85, 83, 134, 27, 224, 124, 227, 105, 204, 220, 18, 253, 96, 142, 218, 26, 168, 158, 164, 92, 188, 146, 141, 2, 131, 181, 7, 236, 72, 213, 228, 247, 95, 134, 100, 123, 135, 69, 133, 142, 116, 158, 180, 34, 188, 180, 247, 58, 236, 180, 99, 14, 6, 118, 56, 105, 4, 169, 4, 77, 197, 142, 123, 107, 209, 103, 218, 139, 186, 100, 246, 112, 210, 134, 199, 164, 69, 85, 13, 56, 70, 11, 104, 33, 189, 52, 177, 73, 3, 42, 175, 201, 24, 191, 63, 101, 110, 100, 241, 192, 153, 17, 119, 222, 136, 53, 162, 105, 46, 246, 82, 248, 113, 184, 138, 85, 74, 115, 114, 26, 47, 248, 151, 87, 75, 50, 32, 225, 98, 126, 180, 253, 194, 112, 249, 35, 206, 247, 236, 226, 43, 225, 8, 209, 235, 95, 50, 95, 182, 140, 223, 8, 185, 94, 152, 159, 44, 215, 205, 136, 126, 252, 50, 185, 100, 21, 89, 193, 182, 196, 252, 122, 179, 148, 137, 167, 191, 82, 130, 216, 180, 234, 105, 29, 91, 168, 85, 117, 57, 48, 16, 192, 143, 162, 132, 154, 97, 89, 238, 230, 85, 186, 150, 240, 246, 114, 83, 83, 33, 50, 105, 30, 211, 119, 80, 7, 60, 140, 117, 151, 109, 184, 113, 69, 131, 185, 164, 89, 162, 179, 18, 161, 96, 126, 115, 174, 255, 206, 141, 63, 45, 142, 121, 194, 201, 63, 235, 90, 77, 17, 138, 106, 161, 129, 175, 68, 202, 164, 174, 174, 37, 141, 192, 33, 42, 208, 27, 68, 193, 156, 208, 230, 175, 205, 134, 12, 10, 55, 160, 68, 28, 143, 143, 32, 4, 56, 56, 148, 228, 163, 80, 130, 198, 55, 116, 219, 103, 164, 224, 47, 48, 231, 2, 240, 188, 1, 188, 246, 158, 184, 101, 152, 29, 251, 143, 192, 8, 53, 111, 23, 185, 147, 201, 243, 139, 35, 173, 238, 117, 205, 128, 245, 73, 60, 42, 83, 197, 152, 84, 43, 85, 169, 119, 211, 106, 90, 137, 95, 157, 245, 189, 244, 73, 204, 240, 4, 0, 71, 223, 53, 188, 240, 59, 188, 0, 197, 213, 67, 240, 34, 75, 135, 45, 169, 224, 183, 28, 183, 159, 166, 246, 130, 61, 111, 12, 95, 160, 167, 226, 115, 109, 124, 238, 58, 155, 193, 111, 206, 60, 181, 252, 89, 144, 170, 202, 144, 4, 218, 231, 254, 105, 182, 204, 126, 127, 108, 139, 152, 39, 243, 222, 124, 0, 135, 190, 156, 7, 143, 39, 15, 122, 208, 235, 72, 10, 86, 6, 243, 217, 52, 166, 27, 223, 174, 52, 171, 87, 78, 115, 229, 122, 109, 50, 234, 76, 114, 175, 87, 240, 116, 236, 63, 35, 143, 11, 24, 5, 174, 189, 69, 38, 58, 223, 66, 241, 182, 17, 160, 240, 162, 58, 235, 144, 4, 144, 128, 187, 10, 69, 202, 126, 140, 126, 189, 167, 17, 143, 165, 100, 237, 177, 137, 73, 69, 78, 63, 131, 156, 228, 184, 228, 49, 27, 113, 9, 189, 52, 187, 174, 107, 231, 223, 94, 25, 177, 174, 240, 202, 126, 0, 48, 18, 135, 155, 108, 218, 227, 177, 236, 147, 118, 208, 197, 132, 55, 14, 142, 131, 92, 166, 95, 156, 161, 199, 251, 40, 201, 27, 41, 67, 115, 66, 164, 154, 122, 107, 82, 103, 208, 193, 252, 98, 68, 35, 245, 76, 232, 252, 135, 125, 169, 148, 136, 199, 54, 39, 29, 72, 144, 58, 211, 28, 107, 172, 30, 185, 203, 144, 95, 37, 183, 176, 87, 209, 172, 96, 19, 115, 63, 146, 117, 254, 28, 127, 12, 38, 109, 103, 176, 197, 45, 239, 113, 227, 188, 67, 117, 145, 202, 112, 101, 35, 69, 34, 104, 11, 16, 237, 78, 196, 59, 79, 238, 163, 255, 12, 29, 209, 152, 222, 179, 234, 7, 72, 97, 44, 179, 200, 237, 245, 252, 24, 234, 200, 171, 161, 81, 114, 29, 115, 163, 31, 230, 34, 90, 228, 56, 19, 27, 61, 234, 224, 40, 226, 196, 65, 17, 227, 14, 120, 208, 59, 123, 69, 42, 10, 50, 62, 70, 137, 229, 15, 212, 174, 5, 31, 97, 71, 60, 210, 203, 141, 42, 105, 109, 89, 84, 239, 134, 63, 155, 116, 42, 77, 217, 3, 191, 29, 255, 95, 170, 169, 60, 181, 36, 200, 72, 46, 170, 86, 18, 97, 126, 14, 70, 31, 190, 133, 33, 242, 235, 37, 119, 99, 233, 102, 194, 236, 189, 84, 214, 181, 56, 140, 191, 46, 58, 17, 137, 51, 254, 186, 222, 33, 86, 103, 166, 74, 101, 94, 165, 143, 41, 41, 169, 240, 42, 67, 157, 92, 76, 145, 237, 202, 7, 87, 15, 189, 185, 70, 27, 112, 248, 204, 239, 49, 188, 56, 228, 174, 118, 80, 109, 243, 211, 122, 87, 212, 14, 2, 82, 192, 255, 81, 224, 5, 220, 130, 240, 129, 18, 66, 183, 23, 97, 177, 192, 237, 127, 69, 220, 162, 85, 199, 12, 30, 253, 93, 149, 214, 252, 148, 75, 0, 99, 224, 248, 5, 168, 153, 125, 10, 131, 190, 116, 49, 12, 40, 104, 161, 23, 218, 167, 38, 130, 136, 117, 102, 129, 205, 143, 219, 228, 211, 193, 163, 202, 245, 25, 100, 220, 206, 211, 93, 5, 152, 45, 84, 169, 153, 247, 131, 237, 172, 21, 94, 220, 135, 61, 220, 61, 4, 61, 153, 141, 189, 180, 130, 246, 69, 155, 92, 221, 196, 89, 131, 104, 4, 81, 163, 30, 94, 219, 239, 103, 213, 168, 187, 71, 84, 189, 52, 130, 92, 70, 99, 150, 119, 150, 206, 205, 3, 76, 126, 115, 138, 177, 113, 87, 208, 99, 3, 255, 85, 113, 166, 6, 12, 123, 255, 28, 20, 240, 146, 10, 180, 132, 162, 0, 35, 34, 219, 149, 72, 158, 179, 182, 164, 86, 152, 189, 170, 92, 205, 34, 193, 156, 166, 81, 237, 147, 230, 234, 43, 193, 96, 141, 69, 11, 10, 233, 176, 39, 127, 156, 84, 5, 238, 89, 165, 92, 53, 179, 150, 212, 148, 155, 73, 77, 237, 233, 166, 44, 156, 61, 9, 91, 201, 64, 207, 199, 8, 162, 85, 94, 168, 7, 201, 1, 154, 226, 188, 247, 226, 123, 84, 138, 144, 216, 187, 238, 66, 147, 190, 171, 180, 203, 13, 18, 186, 79, 41, 58, 183, 35, 57, 183, 241, 9, 140, 151, 254, 243, 234, 96, 72, 130, 81, 50, 110, 27, 159, 173, 237, 97, 29, 147, 53, 27, 120, 183, 240, 110, 120, 88, 185, 3, 27, 98, 73, 38, 236, 138, 93, 41, 62, 211, 103, 167, 211, 238, 181, 229, 40, 216, 81, 38, 73, 255, 215, 249, 215, 144, 150, 135, 181, 116, 126, 94, 102, 85, 100, 114, 86, 139, 122, 209, 116, 136, 44, 254, 32, 145, 55, 29, 166, 47, 88, 63, 173, 196, 199, 179, 18, 41, 155, 108, 14, 113, 132, 104, 128, 57, 252, 198, 173, 102, 97, 231, 104, 111, 195, 39, 203, 93, 238, 27, 164, 91, 98, 7, 106, 125, 130, 234, 249, 183, 100, 30, 194, 225, 249, 105, 99, 86, 18, 46, 155, 86, 171, 85, 241, 177, 70, 57, 116, 164, 85, 178, 47, 95, 233, 189, 106, 82, 17, 112, 82, 73, 141, 134, 31, 199, 2, 19, 34, 66, 229, 121, 208, 144, 37, 174, 206, 19, 248, 30, 228, 159, 79, 52, 143, 65, 49, 98, 108, 70, 204, 87, 63, 136, 166, 147, 73, 87, 11, 22, 231, 30, 80, 217, 144, 196, 244, 95, 223, 115, 228, 99, 227, 219, 191, 72, 179, 72, 4, 163, 238, 115, 222, 244, 215, 219, 75, 37, 231, 185, 67, 132, 21, 199, 29, 109, 189, 4, 121, 31, 206, 201, 5, 187, 106, 117, 196, 223, 87, 93, 188, 113, 128, 65, 187, 146, 126, 165, 70, 138, 23, 1, 126, 14, 250, 249, 205, 214, 141, 102, 237, 55, 167, 222, 220, 15, 126, 7, 156, 61, 128, 105, 49, 213, 164, 183, 21, 8, 96, 3, 37, 240, 212, 75, 69, 154, 255, 157, 10, 35, 173, 157, 138, 201, 54, 100, 7, 147, 207, 177, 122, 169, 120, 237, 99, 208, 149, 137, 41, 42, 173, 26, 145, 242, 232, 38, 184, 109, 106, 236, 107, 169, 83, 95, 30, 229, 25, 134, 105, 3, 198, 239, 2, 1, 189, 21, 1, 140, 111, 53, 172, 55, 36, 32, 54, 146, 22, 162, 243, 102, 77, 147, 111, 87, 74, 194, 249, 73, 40, 212, 236, 10, 43, 165, 27, 120, 186, 42, 250, 85, 2, 107, 54, 227, 254, 161, 81, 121, 255, 121, 2, 225, 125, 17, 73, 118, 30, 130, 254, 194, 30, 59, 242, 253, 220, 33, 7, 129, 186, 24, 204, 74, 19, 164, 142, 225, 145, 182, 23, 96, 123, 5, 163, 133, 168, 210, 184, 87, 20, 218, 255, 101, 217, 31, 11, 79, 21, 11, 164, 249, 211, 156, 136, 212, 98, 70, 89, 26, 85, 79, 47, 128, 202, 127, 165, 13, 112, 180, 14, 236, 185, 215, 244, 196, 91, 119, 158, 52, 160, 31, 126, 15, 169, 87, 139, 180, 97, 20, 33, 57, 69, 14, 133, 21, 129, 110, 114, 198, 95, 250, 14, 211, 170, 3, 39, 222, 6, 192, 212, 143, 185, 93, 85, 22, 171, 251, 224, 44, 169, 90, 172, 168, 183, 201, 69, 169, 71, 43, 123, 130, 51, 77, 183, 238, 158, 14, 203, 186, 118, 131, 65, 60, 119, 38, 44, 231, 188, 234, 43, 15, 138, 60, 39, 29, 102, 164, 130, 71, 209, 20, 197, 206, 136, 98, 227, 138, 173, 173, 186, 23, 173, 111, 133, 15, 209, 32, 173, 214, 180, 190, 254, 27, 68, 155, 177, 78, 78, 248, 159, 236, 141, 125, 246, 64, 134, 137, 242, 245, 117, 184, 84, 36, 28, 228, 83, 251, 130, 21, 142, 237, 171, 95, 11, 196, 231, 90, 152, 193, 137, 159, 44, 99, 235, 55, 46, 129, 53, 153, 66, 252, 34, 89, 55, 175, 222, 227, 193, 118, 95, 160, 54, 225, 32, 162, 76, 135, 2, 218, 154, 244, 244, 40, 236, 191, 230, 215, 17, 72, 20, 108, 26, 233, 85, 201, 6, 51, 197, 43, 30, 163, 94, 83, 71, 234, 54, 93, 90, 209, 18, 174, 12, 250, 213, 118, 47, 47, 140, 169, 242, 173, 192, 15, 180, 187, 103, 170, 249, 48, 181, 255, 192, 245, 74, 112, 7, 85, 247, 142, 85, 101, 159, 15, 205, 171, 45, 61, 155, 126, 105, 207, 139, 207, 167, 90, 41, 196, 91, 104, 159, 209, 145, 123, 221, 6, 95, 31, 22, 211, 212, 107, 26, 66, 141, 52, 240, 38, 62, 49, 125, 227, 80, 242, 231, 43, 191, 52, 18, 187, 127, 173, 139, 155, 208, 48, 233, 116, 201, 93, 216, 159, 54, 239, 70, 13, 26, 101, 176, 2, 74, 110, 60, 155, 183, 226, 125, 11, 161, 48, 86, 244, 206, 232, 201, 203, 63, 180, 124, 161, 163, 187, 193, 38, 151, 12, 226, 166, 160, 209, 5, 33, 247, 205, 170, 243, 199, 138, 228, 133, 233, 252, 215, 205, 232, 213, 46, 24, 230, 254, 238, 159, 178, 28, 165, 57, 45, 80, 194, 119, 183, 120, 184, 33, 59, 255, 41, 242, 82, 116, 14, 96, 111, 174, 170, 65, 2, 61, 19, 194, 40, 60, 90, 236, 132, 48, 63, 239, 182, 149, 123, 190, 130, 200, 208, 100, 155, 164, 250, 3, 70, 182, 183, 74, 142, 242, 219, 74, 175, 254, 184, 17, 251, 208, 207, 71, 246, 5, 213, 190, 53, 185, 115, 12, 224, 150, 175, 218, 195, 46, 179, 246, 237, 193, 23, 27, 89, 182, 191, 122, 255, 210, 164, 44, 34, 22, 197, 184, 64, 213, 51, 232, 31, 100, 59, 120, 126, 181, 168, 140, 152, 36, 169, 254, 179, 14, 67, 1, 33, 55, 146, 129, 82, 214, 168, 56, 140, 8, 46, 94, 68, 24, 53, 76, 54, 197, 93, 238, 55, 112, 92, 48, 201, 123, 119, 239, 19, 99, 245, 151, 78, 7, 135, 252, 241, 137, 61, 37, 127, 159, 241, 118, 221, 190, 248, 189, 56, 59, 32, 52, 3, 115, 60, 229, 224, 99, 175, 89, 88, 221, 105, 41, 140, 104, 152, 99, 164, 54, 17, 49, 27, 16, 181, 200, 106, 86, 127, 41, 54, 178, 19, 31, 23, 235, 192, 183, 67, 2, 84, 47, 126, 199, 135, 158, 18, 167, 143, 107, 130, 135, 246, 166, 212, 24, 110, 149, 153, 247, 11, 219, 91, 228, 12, 150, 167, 198, 243, 86, 89, 194, 56, 101, 95, 48, 232, 43, 155, 26, 19, 232, 94, 64, 28, 187, 83, 225, 185, 119, 127, 43, 99, 129, 191, 57, 134, 54, 130, 225, 68, 134, 211, 26, 233, 72, 51, 224, 153, 237, 97, 84, 80, 91, 102, 36, 123, 162, 165, 133, 157, 224, 100, 43, 214, 209, 107, 67, 243, 117, 50, 176, 180, 202, 246, 90, 16, 38, 92, 14, 73, 90, 159, 3, 127, 188, 219, 154, 73, 39, 161, 71, 29, 160, 55, 155, 194, 39, 116, 93, 210, 203, 106, 59, 102, 59, 201, 66, 242, 101, 63, 213, 21, 74, 150, 111, 226, 201, 57, 145, 139, 20, 156, 45, 243, 34, 148, 196, 151, 49, 134, 109, 12, 152, 16, 146, 63, 150, 208, 117, 43, 33, 128, 42, 35, 98, 203, 103, 181, 165, 223, 135, 182, 77, 140, 232, 71, 125, 8, 229, 241, 46, 140, 227, 194, 225, 197, 244, 98, 132, 71, 82, 180, 24, 103, 216, 242, 27, 243, 201, 185, 139, 74, 165, 58, 224, 227, 90, 203, 132, 0, 41, 35, 157, 90, 190, 215, 113, 13, 148, 152, 24, 223, 25, 119, 111, 161, 70, 88, 19, 170, 54, 220, 101, 203, 99, 34, 19, 21, 72, 115, 232, 212, 188, 7, 77, 157, 27, 65, 129, 70, 8, 124, 118, 112, 25, 5, 87, 45, 120, 203, 223, 0, 116, 222, 199, 60, 180, 50, 146, 112, 140, 18, 171, 127, 55, 107, 158, 203, 52, 170, 31, 52, 138, 73, 14, 84, 92, 169, 87, 165, 171, 81, 20, 77, 250, 5, 143, 69, 159, 1, 245, 22, 80, 92, 168, 33, 150, 57, 168, 115, 103, 15, 186, 151, 133, 245, 215, 205, 73, 124, 25, 194, 37, 218, 251, 68, 216, 194, 105, 30, 167, 235, 7, 149, 98, 42, 140, 140, 90, 143, 173, 205, 130, 222, 17, 100, 120, 196, 15, 221, 58, 60, 173, 236, 53, 156, 181, 75, 161, 123, 45, 80, 114, 116, 54, 100, 248, 143, 147, 20, 136, 162, 53, 164, 77, 39, 229, 229, 69, 184, 95, 166, 67, 223, 9, 163, 112, 150, 172, 96, 130, 133, 171, 152, 57, 204, 120, 250, 219, 226, 202, 44, 119, 27, 10, 19, 169, 219, 74, 155, 231, 186, 155, 181, 127, 140, 127, 138, 28, 72, 42, 196, 0, 11, 134, 122, 30, 23, 26, 250, 130, 36, 128, 221, 76, 241, 147, 182, 84, 134, 201, 213, 222, 66, 24, 231, 227, 51, 21, 116, 32, 44, 86, 223, 137, 164, 174, 80, 186, 3, 182, 43, 48, 126, 188, 145, 144, 46, 183, 141, 44, 144, 65, 238, 61, 130, 38, 114, 136, 205, 194, 168, 127, 159, 25, 78, 234, 224, 46, 126, 61, 148, 19, 142, 63, 153, 243, 153, 200, 144, 157, 40, 220, 77, 135, 206, 87, 151, 115, 230, 204, 129, 33, 252, 230, 77, 195, 122, 146, 38, 18, 218, 208, 7, 31, 194, 198, 101, 229, 200, 39, 195, 137, 27, 90, 160, 7, 213, 115, 187, 32, 139, 27, 127, 162, 99, 203, 60, 93, 110, 64, 201, 22, 147, 224, 12, 166, 202, 34, 92, 8, 2, 90, 148, 52, 99, 185, 233, 60, 20, 57, 27, 113, 171, 17, 242, 247, 151, 101, 100, 18, 239, 144, 53, 132, 51, 159, 48, 105, 157, 16, 91, 152, 156, 21, 66, 2, 73, 147, 80, 62, 58, 252, 22, 164, 91, 86, 4, 209, 171, 191, 25, 98, 183, 19, 237, 95, 90, 155, 117, 191, 247, 218, 65, 7, 175, 10, 46, 81, 19, 11, 47, 107, 238, 92, 116, 192, 9, 241, 218, 157, 232, 116, 88, 254, 14, 101, 108, 152, 30, 46, 99, 84, 60, 128, 189, 23, 165, 173, 42, 215, 239, 52, 7, 175, 172, 191, 38, 43, 254, 76, 38, 37, 75, 138, 228, 66, 140, 146, 12, 3, 193, 238, 139, 142, 47, 98, 88, 156, 50, 226, 99, 231, 225, 56, 105, 6, 235, 81, 109, 249, 171, 21, 57, 129, 157, 96, 85, 61, 192, 24, 145, 83, 124, 11, 203, 129, 155, 117, 21, 225, 144, 235, 220, 84, 41, 155, 169, 193, 188, 240, 84, 73, 205, 47, 177, 149, 235, 111, 219, 254, 212, 225, 77, 117, 69, 91, 60, 167, 224, 167, 209, 35, 123, 212, 214, 131, 29, 177, 78, 234, 117, 181, 167, 133, 93, 190, 234, 10, 251, 88, 104, 245, 201, 88, 133, 123, 32, 181, 29, 148, 54, 105, 209, 226, 12, 87, 139, 21, 87, 242, 13, 187, 221, 140, 111, 16, 187, 199, 185, 14, 249, 99, 233, 251, 188, 50, 198, 82, 156, 88, 164, 117, 102, 242, 139, 57, 151, 105, 173, 150, 165, 83, 35, 216, 16, 147, 133, 153, 35, 78, 59, 145, 114, 124, 41, 80, 25, 114, 79, 94, 149, 184, 65, 6, 241, 68, 249, 132, 72, 195, 11, 139, 147, 7, 166, 124, 56, 7, 85, 159, 12, 67, 244, 134, 148, 190, 9, 61, 78, 214, 40, 246, 39, 235, 115, 234, 13, 180, 22, 134, 138, 136, 19, 185, 243, 159, 57, 48, 47, 112, 154, 248, 229, 60, 218, 136, 179, 154, 120, 211, 178, 55, 26, 21, 252, 119, 38, 59, 120, 225, 140, 52, 92, 139, 105, 168, 236, 212, 77, 197, 62, 243, 225, 135, 190, 151, 248, 82, 172, 9, 101, 4, 203, 103, 152, 46, 197, 237, 183, 217, 74, 190, 204, 79, 182, 235, 72, 81, 204, 245, 74, 51, 215, 65, 193, 236, 88, 64, 19, 239, 245, 20, 52, 1, 25, 48, 65, 71, 212, 27, 144, 28, 227, 25, 122, 100, 117, 249, 59, 148, 54, 25, 223, 29, 212, 176, 86, 32, 79, 189, 171, 191, 154, 49, 115, 203, 187, 50, 12, 159, 91, 1, 226, 175, 222, 114, 30, 100, 55, 50, 168, 19, 7, 85, 223, 225, 161, 209, 155, 125, 167, 194, 217, 122, 110, 10, 181, 193, 43, 50, 247, 59, 250, 145, 245, 135, 149, 228, 126, 201, 137, 176, 202, 49, 134, 17, 133, 106, 126, 157, 36, 50, 222, 15, 158, 78, 193, 229, 179, 177, 158, 118, 189, 42, 47, 169, 237, 191, 44, 243, 255, 235, 196, 211, 158, 217, 146, 143, 15, 121, 74, 100, 24, 200, 89, 176, 83, 199, 48, 230, 61, 85, 141, 224, 175, 52, 51, 111, 188, 11, 116, 24, 3, 152, 79, 232, 50, 227, 62, 9, 114, 249, 56, 0, 142, 43, 195, 62, 153, 198, 167, 80, 210, 26, 174, 19, 194, 4, 190, 228, 185, 18, 48, 203, 125, 55, 191, 160, 20, 84, 142, 158, 106, 70, 9, 207, 135, 181, 220, 117, 91, 169, 159, 28, 224, 106, 44, 24, 161, 224, 15, 22, 7, 12, 51, 183, 236, 241, 174, 157, 19, 135, 33, 143, 168, 62, 232, 215, 145, 244, 17, 137, 179, 140, 128, 177, 82, 72, 97, 170, 74, 185, 163, 121, 76, 119, 111, 62, 28, 231, 209, 149, 12, 115, 82, 188, 11, 124, 186, 79, 143, 181, 125, 152, 182, 162, 56, 190, 246, 1, 92, 188, 2, 186, 143, 42, 208, 155, 107, 84, 203, 58, 18, 15, 208, 90, 163, 194, 215, 56, 181, 215, 228, 78, 251, 219, 53, 18, 229, 161, 207, 200, 217, 8, 13, 112, 202, 144, 191, 90, 181, 111, 38, 18, 108, 100, 202, 152, 81, 158, 199, 196, 29, 216, 197, 53, 120, 10, 33, 117, 133, 240, 75, 89, 212, 113, 234, 252, 228, 157, 93, 220, 243, 127, 241, 18, 85, 177, 132, 55, 221, 246, 190, 8, 132, 22, 137, 227, 116, 190, 116, 74, 48, 249, 31, 244, 119, 112, 166, 189, 177, 218, 82, 252, 35, 102, 191, 93, 157, 153, 126, 102, 171, 131, 16, 10, 101, 242, 145, 152, 187, 152, 79, 226, 33, 94, 109, 16, 120, 243, 34, 234, 184, 232, 196, 223, 184, 89, 228, 234, 3, 66, 214, 124, 140, 53, 49, 148, 254, 138, 132, 60, 157, 93, 252, 81, 182, 28, 40, 118, 131, 155, 245, 14, 130, 3, 51, 102, 89, 150, 194, 61, 240, 232, 239, 248, 45, 57, 177, 129, 44, 103, 167, 134, 209, 12, 116, 201, 208, 232, 6, 47, 43, 123, 142, 146, 104, 176, 246, 179, 89, 213, 14, 84, 106, 50, 187, 105, 220, 0, 178, 81, 216, 92, 205, 248, 168, 65, 149, 221, 201, 202, 124, 18, 151, 55, 224, 145, 242, 122, 116, 119, 242, 230, 195, 252, 135, 234, 17, 187, 133, 9, 27, 253, 84, 250, 209, 254, 85, 127, 85, 75, 23, 130, 94, 107, 81, 21, 89, 238, 16, 59, 120, 207, 231, 86, 18, 207, 7, 151, 5, 142, 76, 97, 253, 56, 144, 126, 211, 31, 206, 4, 71, 94, 235, 254, 248, 217, 218, 90, 191, 120, 21, 201, 196, 92, 69, 74, 187, 176, 200, 182, 55, 45, 250, 243, 141, 34, 252, 251, 45, 192, 205, 205, 165, 150, 28, 204, 224, 172, 78, 100, 149, 58, 209, 229, 121, 53, 232, 32, 242, 18, 166, 218, 235, 225, 177, 128, 242, 201, 228, 28, 57, 195, 251, 21, 207, 95, 116, 41, 188, 237, 28, 102, 122, 249, 201, 117, 196, 83, 77, 239, 44, 107, 180, 186, 245, 209, 44, 143, 140, 80, 148, 136, 70, 35, 229, 63, 99, 51, 218, 206, 243, 152, 48, 10, 217, 179, 169, 111, 49, 191, 121, 172, 60, 86, 190, 249, 141, 49, 9, 221, 2, 157, 189, 36, 93, 61, 229, 106, 60, 1, 31, 117, 222, 12, 112, 14, 105, 139, 7, 106, 24, 33, 94, 174, 215, 77, 226, 30, 79, 47, 110, 187, 175, 155, 200, 101, 15, 64, 200, 63, 16, 131, 183, 117, 241, 255, 126, 106, 242, 134, 254, 72, 247, 252, 170, 204, 163, 163, 118, 4, 73, 126, 144, 76, 220, 50, 64, 81, 43, 255, 17, 155, 67, 130, 60, 173, 46, 128, 237, 128, 220, 58, 61, 84, 150, 225, 232, 155, 155, 233, 110, 109, 217, 17, 229, 224, 187, 155, 34, 50, 246, 113, 192, 233, 12, 95, 36, 183, 217, 184, 67, 234, 99, 177, 104, 81, 133, 156, 172, 198, 91, 141, 175, 44, 131, 201, 24, 20, 137, 156, 66, 11, 237, 62, 116, 160, 240, 221, 112, 3, 38, 121, 191, 78, 138, 146, 148, 85, 36, 135, 74, 218, 160, 215, 12, 124, 99, 114, 96, 255, 59, 1, 176, 217, 104, 196, 227, 28, 230, 7, 219, 3, 214, 47, 236, 19, 103, 128, 180, 210, 108, 146, 247, 218, 157, 215, 116, 149, 13, 172, 52, 99, 128, 155, 140, 170, 74, 247, 232, 225, 92, 211, 251, 214, 40, 123, 59, 183, 242, 12, 141, 181, 27, 145, 236, 108, 105, 7, 50, 75, 38, 253, 97, 254, 218, 184, 178, 32, 250, 163, 228, 238, 199, 19, 121, 221, 94, 233, 115, 149, 156, 20, 196, 52, 120, 148, 68, 159, 158, 95, 9, 241, 157, 18, 245, 33, 10, 146, 125, 21, 45, 204, 242, 2, 150, 95, 124, 118, 147, 237, 86, 216, 251, 83, 158, 222, 245, 109, 89, 142, 148, 28, 196, 162, 214, 169, 24, 187, 138, 227, 37, 179, 114, 11, 61, 88, 193, 7, 147, 241, 64, 35, 90, 160, 74, 188, 128, 209, 174, 119, 101, 135, 196, 92, 17, 182, 1, 54, 140, 191, 245, 29, 211, 99, 156, 105, 243, 9, 84, 157, 85, 123, 111, 29, 62, 162, 179, 131, 157, 23, 234, 60, 22, 71, 6, 155, 94, 245, 165, 245, 195, 144, 107, 116, 50, 215, 247, 15, 224, 42, 180, 111, 12, 164, 248, 2, 201, 199, 201, 158, 3, 175, 207, 36, 39, 111, 82, 141, 202, 222, 231, 199, 172, 247, 150, 135, 211, 24, 228, 128, 46, 98, 42, 94, 177, 22, 193, 65, 69, 211, 216, 183, 53, 28, 243, 48, 56, 76, 135, 126, 67, 80, 75, 162, 203, 111, 201, 168, 11, 55, 111, 177, 135, 23, 159, 185, 158, 36, 128, 163, 120, 239, 135, 51, 132, 163, 79, 143, 10, 208, 152, 216, 92, 126, 208, 220, 233, 86, 190, 16, 23, 55, 137, 136, 149, 227, 64, 29, 138, 229, 32, 202, 154, 191, 118, 163, 43, 140, 41, 119, 138, 74, 63, 7, 6, 159, 225, 161, 57, 172, 224, 67, 199, 16, 164, 104, 232, 14, 194, 170, 230, 90, 10, 156, 201, 239, 229, 87, 186, 104, 52, 140, 14, 243, 129, 64, 139, 171, 186, 74, 71, 49, 175, 97, 217, 80, 232, 190, 120, 168, 185, 157, 236, 18, 119, 85, 87, 3, 189, 141, 166, 179, 211, 182, 32, 177, 86, 67, 76, 99, 161, 15, 3, 33, 219, 147, 30, 143, 38, 19, 60, 41, 176, 35, 249, 23, 139, 193, 113, 146, 164, 52, 46, 35, 236, 79, 101, 20, 37, 23, 157, 182, 123, 52, 56, 234, 197, 107, 196, 179, 158, 205, 158, 20, 49, 91, 93, 184, 78, 230, 201, 69, 80, 169, 132, 177, 141, 77, 242, 20, 47, 188, 207, 173, 192, 11, 113, 192, 151, 229, 161, 245, 165, 187, 225, 29, 65, 171, 102, 186, 154, 86, 214, 98, 182, 71, 176, 192, 199, 68, 84, 135, 173, 12, 87, 116, 242, 231, 110, 228, 162, 202, 107, 161, 247, 19, 28, 230, 89, 48, 14, 164, 236, 88, 40, 112, 217, 93, 106, 243, 47, 20, 159, 72, 209, 223, 181, 157, 203, 92, 245, 65, 175, 21, 206, 135, 3, 109, 158, 153, 237, 88, 213, 196, 116, 31, 158, 141, 178, 181, 35, 2, 132, 197, 78, 250, 2, 32, 97, 64, 254, 20, 205, 151, 78, 154, 219, 199, 73, 128, 214, 166, 209, 208, 219, 184, 66, 138, 208, 149, 153, 218, 213, 186, 168, 89, 169, 221, 68, 1, 170, 160, 235, 214, 20, 193, 137, 252, 57, 163, 65, 181, 159, 242, 194, 48, 146, 154, 227, 255, 245, 20, 143, 43, 88, 102, 196, 101, 55, 242, 2, 107, 218, 218, 60, 59, 95, 86, 52, 199, 189, 119, 34, 134, 244, 117, 227, 140, 128, 84, 146, 213, 52, 18, 196, 24, 194, 172, 113, 95, 30, 209, 221, 146, 82, 255, 236, 82, 55, 100, 155, 136, 226, 221, 192, 255, 22, 0, 180, 205, 79, 18, 16, 61, 54, 42, 16, 249, 28, 110, 235, 153, 89, 115, 83, 159, 208, 255, 236, 86, 47, 247, 75, 185, 143, 133, 242, 46, 76, 43, 171, 104, 0, 113, 129, 20, 252, 163, 31, 192, 66, 151, 113, 19, 17, 99, 164, 4, 5, 173, 207, 227, 254, 202, 212, 6, 10, 179, 150, 60, 153, 200, 129, 112, 9, 236, 112, 208, 115, 251, 108, 147, 152, 114, 124, 124, 9, 64, 70, 241, 95, 243, 73, 220, 88, 71, 9, 122, 73, 68, 54, 248, 74, 12, 43, 5, 171, 195, 11, 237, 63, 123, 30, 116, 138, 54, 48, 151, 21, 236, 162, 53, 156, 220, 72, 74, 73, 168, 106, 57, 122, 47, 134, 199, 36, 73, 201, 103, 206, 188, 112, 181, 21, 175, 12, 10, 129, 34, 146, 53, 129, 71, 143, 99, 211, 27, 165, 221, 141, 180, 201, 70, 21, 220, 74, 109, 16, 165, 17, 144, 17, 98, 13, 197, 107, 42, 36, 19, 190, 50, 152, 138, 102, 6, 181, 174, 252, 122, 109, 186, 215, 158, 58, 93, 147, 55, 0, 165, 131, 95, 100, 212, 88, 254, 253, 23, 144, 241, 99, 35, 92, 21, 77, 251, 96, 115, 4, 96, 222, 18, 145, 209, 209, 122, 2, 234, 25, 88, 109, 185, 253, 55, 246, 134, 168, 120, 70, 83, 191, 238, 185, 35, 14, 30, 247, 203, 229, 39, 238, 98, 29, 3, 196, 108, 48, 175, 162, 182, 230, 0, 180, 242, 135, 34, 7, 66, 97, 12, 211, 102, 27, 249, 38, 130, 212, 52, 126, 106, 24, 77, 215, 204, 183, 84, 231, 38, 199, 202, 72, 49, 139, 177, 104, 48, 96, 94, 172, 30, 72, 93, 128, 47, 126, 190, 119, 239, 117, 90, 118, 103, 250, 218, 199, 17, 190, 3, 230, 250, 51, 69, 228, 250, 33, 254, 144, 233, 90, 131, 149, 182, 4, 36, 149, 206, 119, 49, 102, 104, 241, 58, 61, 186, 41, 206, 158, 225, 25, 20, 193, 6, 243, 143, 175, 67, 161, 54, 30, 95, 253, 237, 184, 51, 10, 243, 32, 227, 88, 15, 244, 255, 194, 125, 151, 85, 195, 242, 246, 62, 173, 96, 1, 20, 195, 240, 62, 18, 253, 59, 24, 148, 139, 152, 56, 77, 147, 5, 69, 106, 18, 142, 122, 132, 134, 170, 249, 248, 186, 248, 58, 164, 45, 169, 191, 151, 213, 100, 191, 72, 159, 59, 227, 71, 84, 78, 2, 221, 137, 119, 252, 244, 152, 79, 221, 233, 136, 36, 182, 160, 141, 200, 71, 105, 39, 117, 88, 188, 78, 178, 118, 215, 126, 220, 245, 201, 161, 35, 20, 246, 7, 233, 251, 251, 129, 152, 225, 149, 7, 175, 160, 68, 240, 37, 21, 175, 169, 250, 30, 91, 214, 191, 168, 223, 64, 168, 205, 116, 31, 212, 62, 18, 251, 219, 185, 120, 62, 218, 86, 155, 153, 99, 185, 187, 65, 64, 215, 138, 179, 191, 24, 83, 153, 225, 67, 208, 91, 232, 115, 165, 101, 112, 215, 8, 121, 145, 72, 31, 17, 138, 107, 78, 189, 68, 237, 139, 60, 156, 176, 247, 210, 162, 88, 156, 27, 64, 139, 138, 245, 0, 13, 204, 80, 12, 214, 110, 127, 23, 2, 231, 138, 125, 103, 136, 149, 253, 91, 241, 94, 47, 194, 237, 194, 3, 196, 1, 179, 1, 77, 39, 96, 251, 166, 125, 173, 186, 136, 135, 163, 109, 211, 177, 223, 128, 51, 38, 224, 204, 232, 220, 19, 124, 57, 244, 169, 171, 97, 192, 143, 24, 46, 212, 110, 215, 244, 237, 200, 73, 20, 150, 16, 5, 116, 168, 154, 48, 108, 100, 131, 18, 49, 70, 220, 150, 121, 58, 91, 242, 105, 199, 234, 62, 101, 155, 51, 132, 221, 98, 30, 48, 249, 77, 119, 251, 101, 229, 6, 54, 177, 39, 118, 70, 154, 247, 201, 44, 108, 6, 160, 215, 105, 114, 255, 153, 100, 130, 245, 29, 91, 241, 204, 238, 177, 241, 194, 171, 127, 168, 147, 221, 55, 133, 51, 234, 1, 230, 18, 191, 177, 106, 122, 77, 184, 115, 194, 243, 184, 125, 177, 234, 148, 239, 168, 144, 117, 119, 62, 48, 141, 44, 227, 242, 98, 211, 221, 201, 11, 248, 202, 242, 160, 93, 186, 143, 12, 6, 61, 79, 108, 178, 212, 121, 139, 111, 161, 229, 46, 4, 4, 79, 7, 244, 61, 121, 88, 133, 200, 170, 77, 73, 185, 45, 60, 207, 15, 222, 86, 75, 39, 35, 142, 134, 33, 68, 240, 202, 215, 232, 108, 72, 93, 177, 72, 202, 207, 148, 171, 190, 76, 155, 17, 27, 248, 69, 64, 42, 208, 238, 246, 247, 85, 175, 65, 27, 124, 174, 22, 48, 215, 174, 62, 156, 217, 129, 50, 210, 214, 123, 164, 250, 163, 179, 134, 202, 203, 180, 80, 238, 27, 109, 108, 115, 113, 63, 23, 113, 128, 135, 47, 118, 78, 1, 246, 85, 8, 88, 190, 79, 86, 191, 60, 91, 89, 203, 97, 241, 55, 116, 95, 108, 254, 54, 34, 116, 120, 135, 50, 100, 106, 196, 73, 239, 71, 95, 65, 63, 101, 88, 191, 149, 165, 53, 117, 44, 125, 194, 44, 207, 17, 40, 60, 218, 59, 119, 76, 166, 85, 125, 69, 113, 35, 204, 119, 208, 18, 117, 146, 174, 140, 216, 42, 181, 250, 188, 180, 22, 59, 58, 145, 123, 38, 64, 139, 157, 240, 4, 101, 16, 65, 127, 250, 144, 77, 186, 61, 160, 23, 25, 44, 53, 228, 152, 162, 48, 175, 36, 232, 152, 51, 57, 241, 107, 71, 45, 132, 18, 79, 108, 41, 166, 104, 0, 64, 224, 210, 47, 247, 0, 108, 3, 152, 135, 153, 90, 161, 86, 162, 155, 86, 143, 44, 200, 121, 64, 231, 234, 86, 242, 8, 97, 176, 53, 9, 238, 87, 21, 226, 60, 91, 113, 76, 94, 251, 3, 79, 94, 56, 184, 101, 102, 70, 57, 144, 64, 51, 208, 121, 235, 108, 16, 80, 1, 213, 72, 204, 194, 133, 3, 68, 171, 186, 24, 76, 244, 246, 31, 177, 10, 110, 227, 22, 182, 60, 140, 142, 0, 107, 83, 78, 85, 209, 169, 21, 201, 208, 138, 57, 232, 228, 60, 21, 143, 45, 32, 166, 215, 143, 90, 104, 232, 7, 168, 177, 38, 26, 136, 198, 217, 246, 26, 135, 241, 232, 199, 202, 155, 38, 247, 242, 137, 134, 19, 252, 145, 250, 143, 39, 213, 19, 134, 80, 210, 183, 166, 249, 143, 239, 205, 23, 251, 30, 210, 156, 252, 232, 178, 209, 104, 252, 242, 191, 221, 233, 99, 244, 206, 248, 94, 181, 251, 44, 115, 206, 203, 202, 214, 32, 192, 112, 205, 175, 112, 206, 186, 190, 96, 237, 39, 153, 50, 192, 30, 212, 158, 13, 212, 189, 49, 223, 96, 7, 217, 73, 178, 38, 27, 109, 79, 62, 2, 133, 149, 96, 239, 142, 149, 143, 7, 19, 101, 78, 53, 79, 59, 232, 94, 151, 163, 147, 19, 228, 73, 119, 82, 198, 200, 28, 246, 225, 17, 45, 233, 146, 113, 221, 236, 149, 37, 140, 41, 71, 96, 139, 204, 32, 92, 106, 197, 194, 158, 214, 223, 155, 197, 143, 124, 106, 239, 9, 148, 29, 103, 24, 132, 105, 7, 208, 137, 145, 148, 209, 77, 61, 90, 226, 98, 185, 192, 249, 64, 145, 255, 191, 188, 181, 89, 251, 208, 236, 217, 139, 3, 176, 251, 88, 119, 119, 235, 188, 126, 151, 121, 94, 33, 69, 12, 199, 224, 18, 247, 83, 78, 11, 215, 219, 6, 248, 13, 59, 138, 63, 232, 35, 151, 82, 72, 91, 40, 141, 14, 113, 70, 48, 34, 119, 191, 119, 241, 253, 196, 184, 17, 99, 12, 51, 68, 124, 79, 86, 39, 189, 226, 57, 33, 22, 247, 62, 244, 0, 86, 173, 165, 174, 191, 117, 2, 225, 227, 36, 241, 238, 226, 174, 90, 97, 188, 186, 43, 153, 164, 45, 164, 205, 91, 183, 26, 91, 182, 189, 133, 28, 240, 56, 255, 151, 157, 101, 34, 153, 8, 119, 12, 125, 33, 114, 112, 185, 85, 7, 142, 246, 206, 39, 8, 154, 33, 187, 245, 71, 50, 235, 136, 93, 141, 74, 227, 93, 228, 199, 14, 77, 11, 158, 147, 152, 61, 219, 137, 230, 125, 182, 33, 178, 25, 129, 243, 61, 99, 26, 93, 90, 90, 247, 212, 216, 159, 152, 252, 141, 15, 18, 6, 103, 173, 241, 175, 33, 141, 48, 69, 191, 83, 33, 198, 181, 48, 180, 179, 40, 84, 33, 242, 166, 139, 13, 113, 186, 23, 178, 206, 107, 253, 72, 138, 72, 217, 22, 106, 106, 90, 39, 13, 151, 203, 33, 44, 191, 120, 71, 42, 160, 171, 211, 23, 157, 37, 188, 92, 225, 217, 151, 155, 50, 206, 35, 234, 174, 36, 182, 52, 157, 224, 24, 175, 120, 117, 29, 58, 79, 77, 145, 195, 129, 232, 99, 179, 253, 112, 26, 65, 219, 76, 16, 206, 203, 247, 41, 235, 57, 49, 218, 120, 53, 83, 97, 110, 217, 3, 84, 218, 234, 63, 105, 6, 21, 160, 187, 221, 252, 230, 68, 119, 29, 224, 10, 239, 100, 177, 70, 186, 228, 211, 66, 61, 33, 185, 221, 255, 73, 134, 149, 43, 128, 143, 148, 179, 84, 127, 19, 126, 107, 243, 168, 132, 12, 165, 134, 242, 180, 197, 218, 143, 141, 222, 107, 227, 148, 61, 232, 69, 34, 154, 69, 86, 23, 183, 12, 106, 124, 214, 102, 176, 139, 175, 192, 86, 178, 251, 251, 20, 79, 169, 12, 162, 250, 75, 100, 201, 79, 249, 144, 234, 240, 216, 1, 155, 251, 111, 169, 167, 89, 246, 73, 138, 47, 182, 63, 235, 121, 16, 186, 140, 93, 143, 19, 123, 93, 93, 218, 130, 94, 199, 216, 241, 236, 178, 224, 42, 125, 251, 28, 92, 141, 61, 76, 224, 100, 129, 148, 92, 57, 76, 140, 152, 61, 105, 43, 154, 55, 236, 144, 114, 192, 208, 229, 124, 183, 241, 184, 12, 125, 69, 210, 185, 227, 196, 145, 189, 191, 252, 63, 86, 225, 204, 139, 33, 136, 78, 11, 74, 93, 80, 85, 76, 55, 223, 40, 210, 154, 161, 171, 212, 211, 5, 238, 47, 201, 55, 153, 38, 244, 30, 147, 45, 252, 130, 70, 124, 242, 68, 193, 148, 237, 142, 88, 26, 129, 2, 89, 107, 215, 109, 245, 110, 194, 98, 5, 64, 179, 247, 109, 191, 255, 111, 66, 216, 224, 250, 134, 98, 85, 78, 81, 184, 171, 252, 230, 41, 13, 25, 76, 203, 151, 56, 138, 149, 255, 124, 160, 59, 72, 191, 185, 234, 223, 152, 97, 69, 131, 161, 198, 130, 64, 223, 107, 11, 249, 179, 182, 165, 203, 145, 81, 179, 103, 7, 55, 230, 71, 242, 159, 245, 88, 175, 73, 11, 179, 51, 69, 97, 89, 237, 43, 230, 142, 63, 180, 78, 227, 13, 212, 34, 17, 243, 18, 119, 202, 253, 251, 51, 88, 88, 203, 92, 32, 100, 162, 167, 90, 18, 240, 29, 14, 203, 184, 209, 65, 2, 44, 21, 242, 134, 195, 90, 96, 169, 119, 96, 151, 144, 226, 191, 207, 111, 130, 223, 17, 141, 229, 19, 115, 129, 174, 23, 224, 254, 90, 3, 206, 77, 146, 132, 130, 124, 137, 98, 198, 30, 182, 12, 57, 2, 156, 54, 104, 80, 130, 91, 172, 45, 82, 52, 250, 17, 203, 224, 165, 23, 243, 88, 39, 251, 186, 232, 148, 153, 54, 16, 28, 15, 118, 23, 126, 107, 85, 187, 85, 147, 121, 137, 138, 105, 173, 149, 39, 176, 207, 252, 85, 100, 208, 154, 152, 85, 212, 160, 108, 187, 124, 130, 232, 135, 146, 44, 40, 245, 88, 174, 74, 213, 207, 221, 158, 230, 225, 165, 26, 186, 19, 216, 245, 180, 254, 42, 215, 211, 10, 163, 38, 116, 170, 113, 53, 81, 199, 95, 15, 58, 50, 96, 186, 228, 99, 211, 198, 136, 73, 197, 114, 74, 242, 181, 241, 64, 18, 239, 54, 230, 56, 149, 214, 200, 137, 82, 204, 173, 58, 164, 125, 84, 34, 104, 206, 165, 230, 77, 175, 211, 202, 199, 114, 197, 68, 206, 99, 211, 127, 156, 250, 105, 2, 64, 85, 20, 33, 141, 108, 36, 75, 116, 111, 192, 142, 96, 64, 247, 251, 92, 142, 105, 213, 226, 238, 98, 13, 33, 114, 30, 132, 59, 23, 140, 60, 162, 203, 252, 255, 240, 151, 127, 202, 89, 118, 123, 77, 77, 31, 61, 141, 176, 220, 226, 161, 125, 105, 82, 217, 16, 150, 99, 228, 107, 223, 178, 75, 186, 87, 25, 191, 81, 113, 45, 176, 185, 103, 236, 138, 180, 220, 211, 211, 199, 245, 155, 28, 5, 54, 41, 82, 56, 104, 203, 102, 205, 149, 174, 164, 61, 179, 75, 118, 59, 252, 63, 130, 48, 175, 198, 182, 232, 2, 131, 102, 102, 228, 126, 170, 217, 90, 171, 165, 33, 0, 107, 62, 244, 156, 21, 241, 232, 139, 64, 65, 19, 102, 149, 191, 222, 228, 23, 123, 235, 40, 31, 191, 155, 11, 167, 148, 245, 41, 37, 23, 170, 29, 64, 98, 124, 2, 191, 149, 247, 67, 98, 30, 154, 125, 172, 79, 46, 123, 198, 1, 115, 76, 21, 184, 201, 60, 102, 149, 187, 54, 227, 37, 174, 255, 237, 131, 155, 248, 199, 41, 2, 118, 131, 234, 205, 249, 81, 200, 223, 91, 212, 83, 217, 37, 213, 5, 94, 161, 17, 233, 82, 170, 75, 81, 167, 107, 41, 92, 205, 196, 54, 243, 103, 2, 251, 19, 199, 137, 15, 82, 40, 130, 252, 77, 196, 100, 111, 208, 113, 40, 63, 229, 93, 31, 97, 246, 193, 72, 78, 234, 98, 67, 4, 137, 95, 180, 177, 52, 248, 57, 73, 243, 29, 231, 186, 249, 36, 204, 154, 201, 250, 105, 186, 101, 175, 129, 125, 230, 216, 223, 112, 180, 183, 16, 119, 203, 172, 22, 75, 124, 133, 44, 100, 77, 192, 9, 45, 23, 155, 210, 100, 92, 128, 39, 119, 49, 238, 227, 198, 171, 113, 16, 234, 9, 54, 109, 36, 46, 9, 168, 23, 55, 101, 24, 96, 41, 111, 191, 102, 3, 182, 25, 76, 83, 159, 129, 72, 48, 207, 134, 238, 79, 29, 168, 144, 216, 95, 12, 173, 229, 242, 20, 91, 24, 34, 143, 235, 72, 254, 119, 136, 96, 104, 163, 153, 175, 138, 168, 231, 154, 45, 185, 158, 41, 39, 13, 103, 85, 227, 135, 157, 171, 19, 69, 12, 111, 177, 254, 1, 38, 133, 23, 146, 166, 97, 184, 102, 113, 158, 242, 164, 44, 129, 82, 152, 75, 223, 213, 254, 150, 149, 250, 243, 45, 200, 118, 250, 235, 22, 26, 95, 235, 21, 54, 183, 57, 212, 203, 136, 87, 144, 97, 212, 213, 104, 193, 59, 84, 214, 37, 205, 41, 168, 181, 53, 174, 233, 51, 58, 28, 209, 146, 23, 144, 166, 114, 165, 157, 199, 134, 47, 183, 240, 163, 123, 209, 209, 72, 251, 189, 241, 246, 213, 195, 122, 6, 179, 120, 90, 34, 41, 167, 0, 95, 130, 57, 2, 85, 225, 171, 117, 104, 76, 54, 168, 148, 225, 210, 39, 88, 55, 241, 87, 79, 76, 252, 116, 160, 26, 168, 105, 62, 218, 252, 197, 71, 24, 172, 210, 132, 242, 196, 146, 59, 189, 146, 251, 31, 136, 85, 20, 136, 3, 231, 242, 71, 187, 107, 242, 204, 36, 167, 47, 254, 182, 209, 129, 39, 193, 137, 220, 95, 69, 145, 179, 118, 165, 163, 145, 43, 188, 67, 59, 38, 190, 36, 49, 28, 76, 178, 95, 161, 106, 212, 106, 158, 159, 215, 233, 221, 7, 173, 33, 155, 135, 95, 98, 216, 85, 108, 104, 155, 36, 61, 103, 155, 201, 222, 36, 169, 24, 6, 19, 51, 15, 75, 29, 119, 49, 119, 40, 53, 9, 35, 221, 100, 240, 211, 161, 225, 158, 216, 222, 115, 170, 86, 158, 52, 45, 9, 155, 233, 127, 253, 190, 192, 65, 233, 16, 166, 7, 25, 48, 205, 253, 8, 234, 208, 189, 51, 176, 35, 122, 90, 1, 111, 155, 166, 169, 202, 100, 231, 154, 197, 24, 151, 60, 219, 39, 115, 241, 79, 194, 25, 107, 129, 11, 240, 197, 35, 19, 169, 16, 29, 7, 55, 79, 144, 200, 247, 135, 237, 104, 51, 55, 193, 186, 255, 112, 220, 135, 203, 11, 8, 173, 179, 70, 137, 72, 106, 218, 68, 152, 81, 30, 111, 163, 18, 227, 140, 74, 91, 174, 177, 151, 140, 1, 164, 93, 140, 171, 210, 216, 20, 157, 100, 104, 173, 34, 98, 76, 189, 199, 37, 42, 214, 26, 92, 103, 49, 251, 151, 132, 92, 19, 225, 156, 38, 173, 242, 26, 230, 195, 112, 241, 221, 197, 151, 124, 203, 109, 200, 216, 189, 25, 195, 169, 50, 184, 211, 162, 48, 66, 196, 61, 141, 206, 195, 123, 255, 204, 250, 234, 122, 254, 178, 183, 2, 210, 170, 222, 114, 251, 64, 216, 163, 82, 138, 225, 141, 198, 35, 230, 145, 218, 203, 134, 251, 255, 230, 66, 10, 225, 18, 36, 196, 244, 110, 24, 41, 103, 96, 30, 44, 17, 133, 41, 203, 201, 149, 117, 104, 83, 226, 13, 101, 205, 111, 197, 93, 186, 122, 250, 115, 57, 171, 222, 168, 7, 170, 234, 212, 114, 72, 107, 237, 221, 124, 234, 182, 93, 137, 67, 211, 212, 47, 27, 135, 100, 147, 130, 2, 244, 37, 218, 141, 203, 102, 125, 230, 179, 222, 8, 85, 96, 211, 64, 243, 54, 70, 242, 8, 30, 121, 99, 233, 229, 109, 116, 186, 184, 80, 210, 63, 219, 247, 243, 65, 221, 247, 242, 12, 25, 66, 166, 204, 25, 91, 45, 219, 122, 3, 193, 247, 144, 77, 150, 118, 60, 132, 155, 103, 149, 53, 218, 147, 105, 249, 132, 148, 5, 244, 43, 49, 168, 63, 50, 206, 144, 39, 123, 219, 178, 148, 229, 233, 40, 137, 32, 33, 188, 24, 74, 70, 100, 96, 248, 175, 211, 5, 95, 143, 2, 190, 178, 253, 6, 35, 198, 57, 210, 33, 113, 197, 189, 200, 97, 136, 66, 77, 62, 64, 116, 146, 128, 248, 237, 225, 177, 157, 84, 56, 134, 135, 159, 51, 161, 171, 179, 48, 230, 78, 204, 235, 118, 63, 83, 167, 244, 35, 21, 34, 217, 91, 40, 46, 43, 45, 181, 71, 181, 136, 29, 91, 175, 179, 2, 44, 45, 235, 65, 143, 1, 247, 168, 231, 52, 32, 195, 39, 60, 174, 1, 4, 27, 20, 110, 109, 12, 192, 185, 231, 110, 177, 168, 204, 162, 32, 20, 22, 71, 214, 38, 109, 150, 213, 172, 74, 105, 99, 223, 36, 164, 241, 189, 151, 254, 29, 181, 218, 248, 175, 219, 22, 175, 132, 229, 202, 195, 4, 191, 30, 212, 163, 171, 171, 228, 109, 76, 199, 108, 200, 163, 174, 148, 135, 78, 110, 190, 162, 37, 53, 178, 118, 72, 196, 166, 7, 24, 218, 202, 218, 37, 36, 40, 123, 14, 69, 68, 103, 90, 210, 158, 186, 68, 27, 194, 102, 62, 207, 32, 170, 214, 153, 72, 29, 33, 85, 223, 185, 76, 253, 198, 85, 252, 179, 20, 35, 44, 9, 102, 20, 227, 60, 51, 14, 137, 32, 101, 125, 135, 17, 44, 248, 123, 197, 170, 252, 43, 143, 63, 199, 167, 150, 243, 60, 188, 229, 113, 244, 168, 90, 61, 61, 126, 165, 245, 25, 18, 150, 227, 241, 134, 144, 193, 112, 245, 133, 110, 65, 246, 103, 136, 90, 142, 13, 51, 101, 210, 174, 202, 36, 59, 43, 241, 195, 143, 238, 235, 31, 152, 137, 149, 241, 179, 142, 77, 193, 73, 127, 73, 116, 167, 163, 195, 152, 235, 174, 63, 91, 242, 130, 51, 125, 115, 196, 40, 56, 53, 202, 127, 99, 143, 134, 49, 161, 61, 83, 250, 53, 180, 93, 51, 123, 36, 12, 61, 249, 55, 144, 18, 61], + [83, 22, 187, 33, 80, 53, 222, 12, 146, 126, 158, 48, 141, 129, 48, 65, 175, 25, 77, 105, 225, 70, 63, 149, 199, 68, 248, 11, 206, 200, 52, 95, 103, 139, 137, 116, 226, 125, 180, 72, 136, 69, 199, 183, 46, 190, 14, 133, 50, 128, 102, 71, 212, 55, 190, 246, 47, 147, 222, 50, 126, 53, 197, 208, 233, 192, 217, 200, 193, 117, 174, 181, 115, 16, 210, 150, 55, 241, 174, 234, 80, 179, 178, 177, 29, 51, 13, 167, 253, 4, 123, 19, 157, 128, 81, 49, 52, 47, 7, 76, 249, 180, 245, 198, 91, 43, 222, 161, 80, 55, 94, 255, 109, 252, 52, 199, 165, 133, 158, 47, 232, 48, 86, 175, 92, 61, 210, 104, 199, 185, 104, 216, 68, 64, 225, 164, 188, 225, 143, 219, 156, 143, 255, 251, 197, 99, 16, 15, 169, 26, 48, 163, 139, 48, 45, 67, 47, 23, 104, 59, 209, 52, 159, 241, 51, 145, 29, 28, 52, 193, 116, 25, 188, 137, 96, 126, 97, 205, 97, 200, 15, 168, 37, 187, 142, 3, 191, 227, 107, 246, 204, 241, 75, 81, 86, 211, 231, 10, 56, 178, 215, 235, 40, 17, 89, 173, 221, 68, 42, 105, 167, 126, 196, 184, 216, 95, 237, 116, 35, 225, 6, 21, 3, 125, 236, 149, 49, 52, 74, 239, 96, 59, 195, 227, 9, 182, 215, 245, 1, 147, 59, 89, 173, 236, 163, 105, 8, 146, 57, 60, 249, 159, 93, 28, 243, 108, 174, 199, 193, 62, 43, 222, 35, 228, 115, 144, 108, 91, 193, 67, 162, 39, 226, 145, 220, 36, 151, 146, 215, 237, 176, 16, 36, 149, 71, 151, 114, 73, 25, 246, 17, 196, 108, 61, 196, 13, 108, 45, 106, 73, 128, 114, 25, 115, 37, 99, 33, 205, 177, 71, 93, 140, 183, 151, 125, 202, 11, 51, 52, 98, 218, 85, 46, 4, 229, 142, 51, 206, 39, 107, 220, 72, 205, 114, 191, 37, 73, 62, 22, 2, 24, 142, 192, 128, 214, 25, 0, 149, 148, 140, 183, 130, 153, 60, 45, 168, 160, 52, 161, 255, 17, 181, 222, 123, 87, 103, 115, 254, 97, 106, 14, 3, 78, 144, 180, 178, 153, 142, 47, 211, 172, 4, 62, 147, 244, 179, 226, 51, 172, 95, 67, 189, 180, 54, 1, 237, 98, 52, 73, 53, 126, 83, 156, 138, 204, 144, 94, 185, 203, 29, 216, 53, 192, 103, 81, 147, 160, 237, 65, 216, 126, 71, 118, 89, 131, 50, 167, 169, 24, 80, 105, 7, 143, 171, 116, 146, 46, 228, 195, 251, 148, 199, 186, 218, 60, 218, 171, 242, 237, 86, 101, 99, 24, 142, 208, 137, 192, 190, 84, 198, 243, 10, 29, 174, 191, 178, 50, 155, 12, 207, 46, 22, 79, 129, 106, 106, 69, 131, 242, 159, 252, 230, 38, 116, 113, 113, 82, 182, 140, 79, 213, 117, 144, 68, 253, 149, 69, 219, 181, 41, 153, 125, 51, 128, 174, 58, 213, 214, 87, 229, 107, 128, 35, 15, 151, 141, 198, 247, 245, 250, 171, 237, 98, 35, 214, 191, 7, 77, 70, 154, 218, 77, 17, 99, 111, 51, 215, 12, 240, 117, 100, 187, 222, 22, 119, 244, 211, 19, 179, 45, 115, 194, 132, 200, 68, 43, 93, 250, 103, 144, 49, 189, 140, 148, 213, 33, 189, 222, 128, 116, 17, 181, 209, 168, 170, 94, 63, 118, 170, 105, 244, 190, 61, 182, 55, 209, 14, 122, 74, 176, 238, 113, 65, 57, 198, 66, 242, 206, 41, 61, 199, 194, 40, 233, 204, 37, 156, 124, 184, 127, 219, 154, 49, 89, 207, 160, 69, 81, 78, 220, 113, 226, 58, 3, 85, 66, 122, 100, 201, 197, 143, 18, 32, 194, 43, 61, 139, 238, 37, 235, 179, 197, 23, 85, 52, 161, 223, 47, 170, 147, 154, 138, 251, 48, 63, 17, 18, 230, 156, 48, 197, 69, 85, 27, 105, 60, 234, 23, 76, 176, 95, 227, 79, 170, 112, 236, 132, 194, 184, 106, 229, 97, 139, 197, 234, 210, 218, 44, 22, 71, 131, 76, 135, 25, 68, 162, 33, 91, 35, 77, 236, 201, 93, 210, 146, 236, 17, 201, 160, 44, 123, 163, 197, 211, 52, 191, 149, 73, 37, 158, 69, 155, 228, 211, 70, 82, 155, 31, 104, 44, 105, 91, 114, 20, 28, 231, 147, 26, 179, 13, 138, 221, 130, 6, 112, 38, 152, 81, 188, 24, 86, 207, 145, 229, 36, 12, 241, 100, 53, 85, 43, 137, 12, 216, 233, 98, 56, 79, 225, 62, 191, 217, 253, 66, 31, 17, 156, 87, 123, 184, 252, 176, 245, 7, 246, 133, 150, 183, 198, 86, 42, 182, 85, 31, 145, 227, 49, 13, 102, 200, 121, 136, 211, 197, 255, 62, 159, 199, 222, 198, 203, 162, 93, 255, 205, 126, 101, 252, 172, 43, 49, 195, 155, 174, 212, 220, 148, 174, 220, 164, 64, 70, 249, 12, 197, 0, 38, 124, 254, 9, 72, 223, 161, 108, 73, 3, 51, 94, 46, 117, 171, 146, 152, 22, 23, 78, 218, 17, 167, 155, 88, 141, 74, 10, 227, 174, 63, 159, 149, 212, 122, 245, 99, 140, 49, 165, 79, 233, 43, 163, 196, 186, 126, 8, 165, 87, 55, 206, 55, 152, 154, 145, 162, 31, 255, 99, 142, 152, 200, 192, 78, 160, 179, 142, 108, 170, 45, 158, 231, 190, 64, 231, 80, 137, 224, 24, 117, 14, 68, 18, 204, 218, 115, 10, 248, 128, 86, 208, 20, 33, 113, 71, 33, 248, 144, 79, 12, 86, 28, 138, 129, 97, 30, 226, 52, 77, 66, 60, 221, 166, 171, 22, 37, 77, 132, 223, 52, 226, 155, 105, 47, 235, 87, 56, 226, 254, 149, 160, 93, 20, 43, 148, 81, 184, 99, 104, 154, 2, 222, 112, 9, 109, 237, 3, 91, 160, 169, 211, 5, 251, 186, 122, 154, 143, 5, 16, 132, 54, 169, 104, 136, 228, 120, 118, 201, 69, 161, 92, 41, 157, 234, 20, 34, 47, 62, 137, 132, 127, 99, 253, 99, 252, 67, 229, 214, 150, 99, 82, 5, 75, 216, 50, 179, 69, 85, 28, 251, 38, 12, 63, 168, 220, 67, 24, 154, 178, 48, 6, 38, 58, 95, 37, 110, 34, 52, 125, 237, 9, 10, 231, 199, 107, 234, 102, 3, 193, 228, 110, 2, 204, 180, 248, 129, 68, 119, 29, 5, 207, 23, 218, 67, 191, 18, 226, 213, 207, 246, 66, 104, 4, 108, 58, 211, 22, 80, 231, 144, 197, 84, 205, 59, 107, 63, 102, 41, 138, 146, 87, 40, 192, 72, 43, 189, 180, 123, 244, 183, 65, 216, 10, 89, 22, 147, 220, 136, 12, 116, 158, 160, 87, 238, 215, 72, 127, 231, 24, 50, 9, 197, 45, 152, 172, 189, 156, 108, 52, 203, 141, 243, 14, 148, 51, 189, 192, 128, 5, 53, 61, 162, 235, 41, 231, 122, 119, 41, 144, 12, 111, 238, 159, 138, 140, 6, 150, 80, 189, 25, 16, 72, 178, 184, 105, 41, 174, 131, 195, 243, 235, 62, 188, 92, 64, 4, 177, 211, 158, 164, 176, 14, 71, 167, 158, 197, 49, 115, 255, 103, 109, 103, 187, 6, 208, 60, 217, 158, 54, 75, 101, 109, 174, 218, 190, 213, 243, 216, 58, 200, 165, 236, 212, 215, 235, 242, 113, 45, 65, 15, 248, 171, 245, 237, 76, 217, 78, 9, 194, 195, 187, 196, 145, 247, 133, 193, 125, 97, 189, 45, 20, 61, 224, 70, 95, 41, 119, 100, 84, 42, 180, 121, 82, 155, 44, 213, 59, 70, 139, 77, 89, 171, 143, 170, 112, 12, 19, 210, 125, 123, 239, 201, 133, 173, 249, 138, 219, 131, 243, 116, 2, 48, 136, 44, 175, 150, 95, 210, 45, 147, 44, 139, 190, 215, 248, 11, 14, 96, 248, 51, 0, 189, 161, 66, 223, 149, 35, 104, 90, 44, 249, 80, 169, 155, 73, 14, 189, 87, 48, 132, 60, 181, 64, 249, 152, 149, 73, 83, 101, 61, 227, 108, 221, 134, 92, 91, 249, 72, 205, 147, 201, 178, 143, 166, 253, 112, 33, 89, 65, 64, 162, 28, 119, 125, 12, 159, 93, 112, 241, 194, 238, 122, 89, 57, 248, 3, 128, 247, 134, 112, 245, 133, 68, 4, 12, 43, 83, 155, 139, 220, 17, 153, 50, 117, 117, 120, 102, 49, 146, 173, 246, 95, 134, 123, 69, 169, 152, 24, 14, 40, 62, 22, 20, 47, 55, 121, 188, 53, 207, 64, 135, 49, 112, 59, 221, 164, 28, 139, 6, 8, 171, 203, 204, 213, 136, 224, 164, 193, 77, 74, 156, 150, 42, 112, 134, 125, 165, 27, 183, 137, 38, 43, 242, 243, 222, 86, 88, 75, 167, 0, 230, 33, 8, 165, 216, 155, 40, 176, 77, 177, 88, 167, 176, 90, 20, 194, 200, 1, 69, 43, 124, 161, 170, 70, 51, 97, 161, 34, 74, 40, 98, 69, 201, 3, 79, 75, 102, 159, 63, 116, 20, 113, 55, 242, 199, 129, 105, 11, 126, 160, 48, 14, 110, 79, 184, 253, 72, 55, 193, 79, 147, 68, 0, 2, 84, 148, 222, 229, 51, 176, 194, 153, 202, 21, 133, 99, 115, 229, 251, 156, 82, 223, 199, 17, 202, 30, 79, 119, 134, 176, 101, 138, 1, 112, 191, 159, 232, 7, 124, 85, 174, 216, 182, 35, 163, 210, 52, 99, 236, 2, 59, 191, 164, 152, 170, 204, 200, 134, 92, 151, 109, 27, 246, 165, 106, 18, 194, 111, 221, 138, 136, 168, 251, 13, 43, 189, 211, 30, 65, 106, 160, 189, 104, 8, 237, 133, 202, 75, 120, 101, 186, 146, 68, 33, 81, 125, 44, 60, 169, 187, 24, 246, 74, 200, 22, 186, 172, 232, 248, 98, 170, 32, 168, 3, 235, 84, 11, 179, 42, 64, 111, 6, 29, 39, 67, 185, 252, 124, 73, 199, 191, 80, 87, 187, 22, 9, 198, 199, 75, 75, 189, 151, 148, 230, 98, 76, 116, 31, 116, 100, 29, 185, 47, 110, 73, 93, 247, 108, 127, 167, 154, 238, 92, 27, 132, 250, 218, 27, 157, 128, 58, 216, 3, 39, 164, 50, 164, 106, 164, 142, 174, 110, 219, 87, 80, 27, 233, 135, 115, 12, 4, 251, 87, 215, 14, 63, 32, 175, 218, 184, 44, 128, 186, 35, 155, 90, 216, 98, 231, 203, 0, 197, 31, 22, 93, 116, 141, 115, 116, 30, 37, 13, 19, 23, 99, 244, 191, 197, 250, 93, 3, 81, 64, 74, 177, 238, 81, 135, 48, 44, 66, 107, 172, 139, 227, 219, 174, 139, 12, 138, 229, 133, 31, 187, 137, 38, 229, 51, 206, 202, 212, 164, 64, 169, 248, 2, 215, 151, 255, 58, 214, 33, 11, 254, 64, 218, 172, 70, 85, 135, 193, 199, 49, 136, 153, 153, 180, 138, 215, 165, 244, 8, 195, 254, 210, 15, 208, 173, 45, 201, 8, 211, 66, 142, 26, 231, 213, 9, 88, 37, 228, 64, 64, 115, 116, 92, 67, 163, 187, 157, 62, 127, 252, 2, 143, 142, 82, 201, 119, 174, 24, 44, 194, 78, 173, 196, 226, 13, 123, 27, 19, 168, 52, 42, 157, 138, 10, 110, 189, 10, 223, 170, 193, 4, 84, 233, 19, 94, 252, 135, 83, 213, 206, 119, 212, 77, 90, 173, 246, 2, 73, 208, 165, 254, 249, 184, 246, 181, 24, 225, 120, 62, 151, 221, 84, 22, 145, 69, 61, 221, 131, 21, 210, 93, 47, 83, 167, 129, 29, 64, 148, 227, 39, 207, 197, 222, 173, 246, 21, 117, 211, 93, 31, 124, 47, 102, 174, 24, 157, 29, 196, 58, 70, 80, 130, 223, 48, 134, 254, 191, 207, 228, 222, 32, 107, 43, 138, 115, 49, 191, 64, 229, 53, 133, 177, 87, 109, 25, 92, 150, 83, 15, 137, 89, 47, 115, 83, 133, 202, 158, 127, 171, 152, 218, 28, 32, 118, 120, 95, 5, 166, 57, 70, 82, 20, 156, 17, 223, 188, 74, 132, 219, 147, 253, 118, 48, 65, 110, 234, 14, 166, 129, 46, 185, 33, 182, 201, 49, 238, 214, 137, 42, 47, 82, 243, 0, 44, 234, 132, 15, 217, 190, 57, 84, 253, 192, 241, 229, 101, 32, 240, 223, 81, 81, 8, 8, 64, 97, 148, 37, 95, 67, 188, 72, 176, 154, 138, 122, 156, 198, 20, 47, 16, 65, 179, 177, 61, 229, 30, 148, 86, 52, 149, 146, 57, 182, 71, 154, 182, 140, 17, 135, 26, 208, 112, 51, 70, 159, 78, 25, 112, 110, 87, 24, 1, 238, 219, 141, 222, 240, 63, 44, 187, 122, 148, 126, 52, 180, 177, 29, 206, 197, 32, 148, 237, 100, 252, 36, 29, 96, 136, 8, 254, 48, 233, 78, 222, 58, 27, 32, 69, 226, 62, 161, 224, 141, 215, 208, 251, 203, 113, 134, 216, 80, 82, 135, 71, 78, 165, 196, 251, 165, 204, 127, 242, 151, 210, 214, 38, 213, 101, 204, 116, 194, 101, 184, 27, 170, 154, 29, 34, 215, 105, 218, 18, 198, 50, 182, 192, 249, 91, 71, 182, 184, 33, 152, 13, 23, 222, 41, 55, 90, 32, 202, 79, 70, 202, 204, 246, 172, 111, 59, 35, 155, 18, 231, 85, 252, 81, 111, 245, 26, 48, 46, 165, 254, 173, 155, 6, 215, 126, 159, 144, 166, 130, 155, 134, 95, 213, 41, 29, 251, 190, 191, 112, 196, 76, 46, 230, 158, 148, 136, 214, 228, 65, 191, 22, 196, 226, 246, 157, 47, 237, 113, 241, 19, 45, 0, 178, 128, 180, 72, 122, 77, 123, 93, 109, 151, 114, 214, 22, 45, 106, 82, 234, 171, 18, 233, 121, 176, 244, 137, 184, 89, 151, 227, 92, 179, 45, 12, 171, 225, 8, 171, 121, 72, 31, 238, 128, 254, 217, 45, 173, 18, 155, 1, 86, 219, 154, 234, 148, 248, 33, 93, 43, 222, 207, 227, 106, 177, 241, 225, 144, 72, 109, 97, 4, 166, 4, 187, 186, 72, 152, 173, 133, 88, 26, 243, 37, 251, 212, 91, 199, 151, 232, 98, 66, 0, 102, 43, 29, 166, 34, 223, 233, 114, 231, 193, 162, 173, 88, 149, 40, 122, 192, 32, 245, 209, 184, 64, 240, 20, 2, 163, 118, 253, 52, 42, 148, 103, 133, 95, 125, 5, 70, 230, 222, 105, 243, 162, 71, 210, 233, 109, 166, 111, 194, 221, 4, 180, 235, 92, 162, 6, 85, 33, 254, 142, 97, 133, 173, 222, 213, 254, 136, 229, 85, 35, 111, 64, 74, 247, 33, 175, 46, 143, 238, 211, 106, 174, 130, 161, 152, 110, 212, 230, 31, 230, 68, 35, 128, 215, 46, 119, 59, 223, 220, 43, 160, 71, 201, 236, 100, 19, 115, 162, 214, 20, 123, 217, 188, 89, 138, 98, 60, 225, 110, 168, 228, 149, 42, 34, 205, 73, 107, 121, 144, 115, 93, 161, 72, 59, 48, 169, 149, 210, 33, 166, 22, 98, 103, 235, 192, 221, 192, 133, 189, 128, 169, 212, 54, 186, 129, 50, 92, 65, 38, 58, 147, 228, 65, 111, 107, 82, 2, 64, 143, 212, 213, 113, 138, 136, 43, 237, 7, 87, 28, 14, 11, 140, 26, 114, 100, 86, 177, 225, 214, 154, 220, 119, 111, 129, 237, 159, 211, 73, 37, 76, 101, 192, 130, 203, 174, 141, 139, 148, 121, 136, 45, 242, 202, 122, 237, 188, 97, 120, 80, 219, 226, 1, 85, 113, 214, 56, 27, 151, 240, 11, 18, 121, 10, 170, 154, 99, 62, 195, 198, 41, 111, 107, 126, 56, 245, 90, 163, 19, 31, 110, 68, 250, 214, 44, 104, 136, 248, 243, 241, 70, 203, 41, 48, 194, 36, 197, 194, 156, 133, 141, 113, 201, 174, 238, 144, 92, 120, 154, 162, 160, 13, 60, 62, 46, 97, 171, 171, 27, 1, 13, 194, 208, 119, 235, 202, 89, 95, 199, 175, 229, 177, 65, 123, 55, 139, 175, 183, 239, 187, 156, 141, 56, 76, 50, 194, 137, 63, 77, 37, 60, 110, 76, 28, 27, 160, 249, 178, 235, 146, 239, 170, 213, 92, 180, 83, 15, 7, 165, 36, 1, 132, 56, 91, 251, 8, 0, 198, 215, 100, 45, 165, 11, 185, 242, 30, 57, 135, 51, 222, 25, 21, 7, 135, 240, 62, 167, 106, 120, 231, 46, 104, 229, 154, 133, 3, 104, 136, 51, 52, 86, 14, 87, 31, 33, 4, 187, 88, 31, 163, 138, 175, 250, 55, 119, 65, 109, 216, 191, 229, 187, 221, 230, 240, 83, 161, 120, 236, 240, 118, 43, 17, 217, 80, 123, 137, 95, 51, 62, 146, 76, 106, 44, 132, 9, 184, 21, 52, 105, 221, 129, 159, 246, 100, 53, 218, 169, 76, 214, 254, 1, 43, 9, 238, 207, 11, 178, 26, 77, 225, 213, 47, 154, 121, 168, 200, 41, 28, 69, 138, 170, 216, 128, 16, 37, 199, 239, 50, 182, 26, 139, 94, 20, 54, 70, 51, 47, 177, 51, 177, 183, 63, 3, 185, 136, 66, 78, 102, 105, 46, 198, 174, 25, 73, 136, 25, 223, 191, 13, 107, 46, 252, 185, 176, 196, 59, 51, 113, 64, 53, 241, 57, 217, 121, 158, 59, 218, 232, 14, 126, 217, 12, 29, 236, 81, 44, 230, 98, 102, 112, 142, 212, 75, 191, 26, 117, 206, 44, 115, 19, 255, 12, 240, 46, 66, 74, 6, 161, 35, 177, 35, 183, 102, 39, 20, 245, 241, 28, 165, 213, 42, 210, 203, 93, 0, 97, 38, 63, 95, 142, 12, 221, 5, 146, 159, 171, 148, 232, 157, 123, 49, 105, 4, 200, 239, 136, 61, 157, 246, 148, 195, 29, 85, 2, 233, 184, 253, 122, 214, 50, 148, 66, 250, 119, 189, 43, 236, 125, 210, 224, 173, 89, 247, 119, 173, 63, 244, 10, 241, 6, 254, 144, 38, 77, 58, 80, 133, 149, 126, 44, 83, 49, 7, 23, 200, 243, 52, 49, 65, 185, 112, 71, 200, 92, 174, 101, 168, 195, 90, 152, 144, 31, 83, 195, 176, 198, 43, 11, 191, 125, 208, 240, 180, 49, 218, 12, 30, 198, 48, 166, 118, 247, 61, 159, 101, 51, 68, 37, 32, 194, 93, 9, 218, 238, 251, 184, 16, 215, 49, 182, 205, 52, 31, 214, 186, 68, 216, 60, 156, 175, 194, 99, 129, 93, 191, 180, 193, 87, 12, 181, 255, 185, 133, 116, 101, 244, 202, 213, 53, 243, 86, 220, 242, 165, 207, 5, 242, 204, 30, 72, 242, 124, 40, 118, 45, 73, 99, 255, 61, 133, 165, 101, 162, 236, 199, 202, 159, 231, 115, 74, 209, 92, 213, 132, 52, 159, 190, 238, 170, 251, 210, 168, 17, 130, 128, 121, 122, 11, 165, 227, 168, 249, 135, 80, 162, 43, 176, 143, 217, 233, 193, 210, 174, 35, 136, 93, 29, 93, 47, 117, 71, 37, 236, 178, 11, 0, 108, 16, 159, 101, 133, 130, 69, 119, 116, 110, 186, 54, 164, 216, 106, 22, 105, 235, 246, 43, 19, 37, 49, 118, 195, 169, 42, 216, 129, 210, 165, 218, 112, 135, 76, 110, 211, 17, 222, 215, 23, 97, 141, 10, 36, 208, 171, 162, 176, 235, 110, 120, 128, 160, 130, 84, 157, 88, 93, 137, 133, 171, 232, 26, 1, 118, 138, 184, 161, 121, 71, 235, 12, 244, 72, 195, 76, 175, 138, 39, 65, 239, 174, 78, 209, 15, 121, 103, 2, 216, 116, 72, 26, 0, 183, 21, 14, 125, 102, 248, 58, 81, 220, 35, 117, 159, 115, 211, 143, 237, 50, 243, 238, 48, 11, 11, 149, 117, 209, 72, 159, 170, 8, 12, 133, 85, 109, 222, 116, 183, 8, 181, 50, 214, 237, 141, 125, 215, 222, 5, 251, 192, 98, 233, 173, 169, 148, 62, 176, 224, 119, 42, 195, 207, 87, 210, 175, 225, 70, 47, 12, 40, 126, 170, 129, 142, 44, 110, 183, 16, 146, 234, 53, 205, 81, 145, 161, 68, 70, 196, 41, 177, 236, 156, 147, 17, 217, 140, 225, 140, 245, 228, 78, 189, 53, 233, 208, 238, 195, 219, 78, 49, 82, 169, 92, 165, 74, 117, 67, 142, 239, 154, 246, 229, 196, 68, 166, 146, 45, 244, 86, 1, 158, 133, 13, 216, 232, 28, 9, 12, 94, 1, 255, 226, 68, 155, 172, 220, 217, 218, 250, 22, 205, 26, 42, 186, 101, 56, 207, 108, 62, 242, 97, 62, 168, 47, 211, 220, 0, 157, 177, 81, 0, 69, 104, 53, 43, 155, 170, 153, 229, 5, 198, 154, 227, 0, 235, 141, 252, 141, 136, 187, 197, 28, 44, 177, 88, 231, 55, 210, 177, 68, 206, 90, 91, 168, 8, 157, 236, 236, 19, 117, 191, 18, 11, 0, 45, 166, 35, 232, 3, 122, 221, 224, 238, 191, 209, 14, 19, 209, 67, 214, 88, 199, 180, 25, 194, 252, 230, 107, 189, 231, 201, 217, 133, 13, 253, 41, 137, 242, 228, 54, 247, 108, 145, 220, 100, 202, 96, 224, 113, 119, 249, 218, 218, 55, 110, 12, 42, 60, 110, 111, 55, 201, 36, 63, 74, 98, 236, 5, 196, 206, 34, 221, 245, 36, 62, 116, 105, 235, 192, 175, 12, 209, 231, 243, 145, 133, 155, 27, 121, 94, 31, 63, 213, 222, 206, 21, 201, 151, 84, 20, 254, 103, 38, 184, 225, 189, 127, 25, 53, 56, 251, 48, 40, 228, 44, 92, 233, 158, 96, 187, 54, 154, 100, 120, 223, 253, 217, 241, 43, 57, 161, 120, 253, 220, 35, 224, 86, 194, 132, 224, 187, 209, 251, 221, 174, 233, 215, 181, 240, 71, 115, 178, 49, 227, 168, 20, 1, 251, 3, 171, 32, 201, 221, 125, 126, 76, 136, 104, 238, 157, 1, 35, 44, 0, 201, 8, 218, 104, 75, 166, 30, 237, 218, 166, 168, 123, 218, 130, 2, 54, 65, 43, 242, 31, 213, 164, 70, 9, 10, 170, 26, 155, 58, 114, 113, 228, 197, 175, 188, 119, 75, 4, 38, 253, 147, 62, 194, 169, 88, 140, 247, 150, 99, 162, 227, 57, 48, 221, 37, 96, 12, 197, 170, 54, 183, 6, 154, 243, 210, 99, 139, 196, 32, 249, 81, 108, 200, 54, 140, 193, 72, 166, 184, 180, 24, 89, 131, 89, 70, 155, 130, 196, 19, 38, 107, 101, 192, 36, 85, 228, 10, 191, 43, 194, 58, 186, 136, 230, 159, 161, 30, 7, 158, 42, 236, 12, 121, 81, 234, 47, 223, 97, 206, 201, 139, 180, 1, 253, 86, 165, 20, 100, 208, 214, 179, 45, 100, 42, 27, 249, 186, 140, 137, 186, 221, 31, 167, 168, 137, 171, 162, 62, 155, 170, 176, 65, 56, 37, 173, 21, 244, 206, 30, 9, 56, 171, 81, 50, 166, 223, 122, 180, 32, 121, 221, 8, 78, 43, 156, 24, 50, 228, 179, 137, 139, 213, 171, 119, 51, 89, 96, 212, 136, 139, 113, 90, 121, 233, 162, 46, 145, 9, 182, 64, 89, 204, 75, 250, 243, 170, 187, 10, 207, 41, 172, 176, 183, 160, 152, 99, 74, 21, 152, 41, 206, 127, 95, 254, 3, 203, 135, 179, 180, 84, 41, 116, 54, 181, 40, 158, 11, 243, 17, 162, 146, 119, 142, 33, 211, 26, 8, 231, 71, 140, 177, 140, 81, 142, 144, 3, 101, 25, 239, 208, 30, 29, 44, 210, 123, 251, 114, 153, 37, 96, 247, 143, 215, 79, 187, 46, 152, 252, 70, 8, 74, 249, 68, 81, 45, 2, 25, 74, 33, 155, 84, 12, 77, 188, 68, 49, 79, 212, 125, 62, 224, 84, 51, 191, 44, 55, 105, 244, 151, 73, 11, 67, 151, 59, 34, 219, 73, 112, 187, 161, 137, 136, 255, 77, 250, 23, 147, 91, 216, 169, 74, 89, 203, 158, 123, 181, 231, 247, 160, 80, 77, 128, 153, 189, 61, 137, 73, 129, 72, 211, 76, 54, 166, 2, 219, 32, 104, 134, 131, 155, 53, 180, 169, 164, 202, 55, 57, 35, 65, 94, 154, 248, 220, 242, 32, 143, 120, 187, 215, 9, 124, 13, 117, 104, 60, 251, 213, 153, 158, 247, 30, 166, 238, 30, 71, 36, 54, 236, 244, 248, 59, 18, 224, 251, 36, 17, 227, 128, 46, 173, 196, 134, 222, 89, 187, 229, 123, 196, 253, 211, 20, 160, 121, 57, 16, 214, 112, 70, 174, 220, 214, 5, 78, 101, 100, 237, 177, 146, 182, 188, 153, 56, 242, 214, 46, 141, 52, 243, 90, 210, 178, 78, 221, 39, 241, 210, 220, 8, 164, 17, 112, 59, 36, 157, 192, 182, 131, 214, 235, 45, 32, 251, 8, 126, 163, 236, 106, 98, 14, 138, 4, 177, 242, 201, 146, 41, 229, 30, 81, 109, 16, 152, 216, 110, 197, 161, 28, 45, 191, 230, 80, 231, 110, 192, 172, 0, 252, 181, 43, 86, 93, 7, 29, 105, 211, 201, 23, 220, 127, 159, 89, 31, 132, 157, 87, 40, 190, 135, 130, 39, 26, 51, 104, 179, 112, 61, 125, 60, 232, 90, 13, 103, 65, 11, 170, 153, 97, 6, 182, 106, 60, 208, 187, 49, 177, 80, 209, 122, 52, 133, 237, 68, 157, 37, 45, 64, 253, 91, 217, 183, 221, 220, 224, 237, 26, 42, 19, 186, 85, 182, 95, 222, 50, 80, 116, 213, 102, 51, 209, 236, 50, 167, 46, 81, 128, 14, 235, 154, 105, 171, 119, 56, 253, 246, 187, 9, 61, 70, 251, 14, 221, 14, 31, 134, 125, 203, 19, 145, 246, 244, 240, 66, 211, 125, 182, 75, 143, 15, 110, 62, 203, 185, 40, 69, 20, 70, 153, 67, 144, 11, 151, 48, 14, 128, 155, 135, 167, 8, 155, 41, 206, 204, 60, 131, 207, 238, 98, 163, 117, 8, 91, 14, 189, 161, 97, 92, 0, 232, 27, 63, 230, 206, 246, 244, 249, 6, 176, 187, 211, 176, 18, 25, 103, 232, 161, 20, 184, 99, 133, 119, 38, 239, 255, 244, 95, 205, 70, 49, 146, 57, 50, 97, 1, 231, 159, 204, 165, 95, 181, 40, 189, 236, 223, 162, 48, 104, 115, 96, 85, 26, 113, 177, 206, 63, 244, 79, 125, 136, 51, 118, 130, 34, 118, 242, 17, 58, 250, 16, 144, 69, 43, 228, 205, 142, 144, 166, 142, 201, 112, 178, 45, 154, 92, 189, 76, 40, 46, 180, 243, 250, 9, 176, 78, 4, 103, 94, 199, 24, 122, 239, 211, 2, 243, 29, 8, 160, 11, 135, 197, 223, 122, 180, 252, 124, 125, 152, 190, 12, 93, 196, 16, 227, 138, 69, 61, 83, 112, 11, 130, 150, 202, 45, 251, 97, 107, 185, 104, 38, 173, 75, 223, 125, 44, 43, 88, 74, 12, 174, 67, 199, 112, 6, 245, 113, 43, 213, 120, 66, 51, 31, 255, 14, 226, 186, 101, 215, 35, 0, 42, 248, 111, 198, 199, 6, 118, 73, 131, 39, 78, 154, 196, 29, 93, 106, 166, 113, 100, 68, 37, 57, 125, 205, 26, 238, 103, 229, 196, 196, 236, 64, 110, 178, 159, 209, 178, 154, 189, 8, 73, 155, 63, 255, 106, 108, 70, 229, 212, 42, 171, 50, 4, 225, 43, 101, 58, 15, 164, 115, 50, 18, 102, 170, 220, 11, 83, 128, 92, 70, 218, 51, 138, 167, 46, 21, 28, 19, 122, 230, 173, 153, 23, 245, 223, 197, 28, 101, 123, 213, 37, 79, 17, 84, 75, 29, 35, 187, 106, 114, 28, 16, 239, 105, 51, 10, 158, 183, 115, 195, 128, 209, 244, 200, 81, 241, 239, 119, 159, 177, 241, 57, 75, 195, 148, 102, 174, 181, 183, 177, 230, 141, 84, 37, 49, 181, 37, 118, 164, 144, 252, 237, 170, 38, 187, 42, 16, 42, 124, 123, 154, 115, 181, 243, 144, 57, 114, 229, 66, 181, 77, 159, 35, 20, 104, 103, 115, 222, 82, 130, 170, 115, 49, 10, 115, 119, 237, 9, 112, 255, 241, 145, 65, 136, 151, 102, 71, 233, 178, 173, 110, 217, 242, 21, 118, 135, 78, 106, 166, 233, 31, 155, 98, 180, 108, 116, 195, 126, 18, 115, 29, 142, 75, 126, 244, 27, 220, 87, 183, 29, 28, 55, 54, 170, 114, 107, 212, 72, 210, 74, 231, 201, 114, 185, 172, 58, 172, 253, 64, 188, 62, 27, 197, 61, 191, 190, 119, 203, 117, 27, 70, 154, 48, 40, 236, 241, 214, 195, 135, 159, 177, 177, 51, 171, 48, 214, 122, 104, 112, 100, 120, 135, 58, 173, 137, 222, 35, 19, 28, 92, 63, 101, 132, 92, 93, 172, 111, 113, 235, 152, 80, 235, 114, 93, 225, 20, 217, 25, 163, 184, 99, 155, 36, 11, 209, 232, 135, 70, 26, 224, 97, 238, 96, 45, 41, 187, 204, 157, 1, 49, 136, 127, 156, 4, 139, 62, 129, 187, 55, 201, 67, 86, 134, 54, 166, 65, 147, 135, 28, 15, 161, 10, 55, 155, 12, 121, 1, 79, 197, 242, 253, 97, 209, 239, 217, 10, 144, 35, 153, 37, 240, 200, 87, 105, 120, 212, 20, 147, 88, 186, 78, 20, 3, 119, 102, 102, 15, 74, 152, 116, 156, 55, 173, 186, 213, 125, 72, 73, 255, 81, 147, 90, 126, 108, 201, 190, 157, 185, 167, 19, 177, 126, 118, 170, 215, 200, 53, 95, 188, 118, 109, 49, 227, 151, 171, 195, 93, 41, 197, 63, 232, 197, 115, 44, 252, 54, 2, 160, 143, 60, 238, 61, 240, 205, 227, 156, 251, 60, 65, 88, 11, 147, 194, 250, 72, 202, 13, 237, 127, 240, 76, 203, 4, 6, 105, 44, 100, 57, 80, 133, 96, 44, 198, 210, 175, 26, 153, 168, 173, 217, 121, 185, 111, 170, 74, 236, 160, 48, 173, 21, 76, 150, 11, 45, 145, 144, 185, 233, 201, 18, 6, 185, 207, 141, 66, 14, 111, 69, 97, 133, 239, 66, 241, 0, 233, 24, 175, 215, 14, 167, 70, 152, 156, 216, 174, 61, 244, 143, 213, 245, 50, 180, 226, 14, 65, 44, 178, 70, 211, 236, 16, 215, 64, 41, 187, 112, 143, 84, 153, 1, 214, 241, 20, 224, 87, 88, 46, 213, 130, 20, 71, 61, 235, 205, 117, 113, 155, 233, 133, 209, 127, 10, 235, 219, 238, 206, 14, 77, 29, 193, 59, 63, 14, 27, 43, 210, 135, 237, 17, 37, 165, 180, 121, 34, 18, 100, 32, 215, 211, 233, 250, 90, 63, 99, 23, 9, 192, 207, 11, 115, 106, 37, 143, 29, 60, 139, 47, 90, 25, 24, 100, 201, 242, 141, 245, 116, 252, 1, 214, 89, 42, 167, 104, 207, 215, 32, 56, 70, 182, 163, 25, 12, 163, 47, 241, 107, 187, 73, 60, 116, 196, 57, 188, 201, 169, 95, 190, 220, 44, 149, 190, 20, 123, 117, 227, 234, 83, 44, 88, 147, 122, 97, 93, 187, 153, 168, 1, 143, 157, 162, 8, 97, 218, 76, 7, 138, 34, 8, 35, 91, 181, 30, 247, 150, 57, 13, 23, 128, 96, 246, 150, 186, 162, 194, 252, 129, 1, 5, 106, 100, 247, 138, 53, 67, 84, 133, 177, 217, 242, 239, 203, 1, 211, 183, 194, 24, 220, 193, 22, 191, 108, 181, 226, 92, 102, 34, 183, 69, 11, 247, 106, 252, 38, 156, 40, 139, 16, 212, 25, 80, 192, 166, 19, 75, 192, 145, 190, 142, 207, 243, 103, 59, 30, 25, 223, 180, 6, 158, 172, 216, 112, 5, 210, 215, 98, 35, 61, 181, 154, 67, 117, 65, 250, 246, 26, 201, 167, 155, 96, 165, 147, 101, 244, 124, 117, 181, 57, 233, 246, 20, 72, 167, 132, 249, 200, 234, 190, 237, 35, 72, 207, 242, 163, 192, 160, 184, 125, 253, 39, 121, 68, 135, 47, 229, 29, 239, 52, 126, 158, 231, 209, 185, 93, 227, 44, 226, 129, 129, 226, 198, 100, 54, 227, 17, 176, 84, 191, 129, 96, 86, 129, 242, 78, 129, 239, 48, 234, 198, 38, 64, 170, 19, 96, 60, 18, 50, 180, 138, 3, 126, 22, 145, 253, 207, 176, 171, 113, 218, 1, 232, 10, 54, 131, 226, 172, 124, 213, 117, 22, 233, 161, 134, 157, 189, 157, 31, 75, 255, 237, 252, 82, 220, 121, 213, 185, 119, 247, 212, 131, 102, 93, 243, 156, 49, 164, 162, 197, 124, 61, 156, 189, 57, 11, 196, 93, 73, 93, 24, 148, 21, 151, 190, 241, 150, 35, 121, 5, 151, 209, 116, 164, 210, 115, 61, 178, 28, 111, 22, 241, 39, 6, 145, 223, 17, 124, 121, 162, 230, 114, 160, 186, 111, 14, 90, 106, 132, 109, 157, 241, 254, 12, 153, 0, 185, 82, 137, 115, 79, 111, 50, 93, 117, 197, 204, 190, 53, 35, 229, 154, 219, 85, 53, 130, 179, 40, 202, 115, 161, 228, 223, 48, 221, 230, 51, 134, 231, 96, 137, 61, 123, 232, 224, 245, 245, 195, 45, 3, 222, 58, 96, 115, 62, 18, 235, 75, 242, 45, 157, 203, 239, 147, 186, 1, 17, 57, 150, 244, 150, 177, 149, 86, 127, 105, 174, 214, 217, 175, 33, 24, 231, 18, 237, 217, 196, 231, 169, 194, 10, 177, 93, 82, 238, 226, 225, 148, 81, 241, 159, 201, 161, 54, 1, 115, 200, 199, 170, 65, 89, 46, 128, 93, 206, 33, 86, 24, 193, 122, 73, 41, 187, 235, 217, 173, 6, 64, 183, 232, 57, 228, 173, 149, 44, 73, 181, 82, 22, 114, 227, 101, 1, 206, 129, 209, 21, 157, 7, 94, 41, 54, 245, 246, 36, 240, 25, 80, 179, 224, 190, 232, 29, 217, 205, 123, 203, 11, 111, 5, 78, 218, 204, 89, 60, 74, 47, 84, 166, 18, 66, 132, 202, 45, 83, 135, 134, 49, 85, 119, 188, 252, 126, 147, 190, 18, 87, 82, 12, 50, 255, 118, 29, 160, 75, 163, 230, 210, 190, 226, 58, 184, 201, 43, 3, 86, 133, 25, 202, 18, 60, 29, 36, 153, 3, 194, 3, 52, 35, 11, 102, 179, 2, 52, 126, 163, 83, 95, 72, 102, 68, 1, 170, 112, 86, 142, 41, 116, 135, 211, 73, 37, 51, 230, 59, 140, 131, 99, 83, 17, 64, 110, 39, 47, 233, 78, 167, 48, 177, 148, 169, 170, 72, 162, 209, 116, 220, 58, 226, 40, 171, 38, 11, 93, 93, 77, 238, 204, 127, 212, 95, 13, 190, 83, 142, 2, 238, 3, 91, 229, 218, 123, 220, 81, 134, 142, 200, 170, 16, 140, 253, 168, 28, 84, 64, 45, 101, 36, 196, 48, 142, 210, 31, 49, 124, 143, 65, 163, 182, 238, 177, 81, 16, 62, 37, 120, 69, 120, 241, 95, 239, 146, 227, 220, 142, 177, 140, 155, 107, 130, 196, 109, 192, 18, 65, 220, 70, 58, 129, 227, 182, 34, 1, 121, 221, 170, 38, 137, 90, 7, 20, 20, 124, 171, 204, 67, 208, 207, 162, 139, 196, 78, 198, 34, 244, 218, 172, 24, 92, 144, 205, 56, 98, 35, 241, 0, 145, 147, 34, 217, 243, 44, 231, 243, 200, 131, 227, 134, 61, 251, 130, 17, 50, 153, 155, 52, 61, 147, 150, 208, 243, 151, 212, 198, 32, 7, 110, 203, 197, 139, 165, 58, 43, 197, 202, 248, 79, 146, 120, 255, 254, 216, 185, 54, 96, 67, 199, 106, 35, 50, 54, 0, 17, 123, 191, 233, 139, 179, 204, 164, 54, 2, 129, 13, 155, 30, 209, 15, 56, 17, 85, 227, 132, 138, 110, 187, 189, 210, 202, 239, 79, 126, 128, 92, 51, 181, 126, 2, 100, 64, 108, 169, 111, 78, 57, 165, 179, 7, 177, 224, 227, 173, 10, 81, 213, 173, 104, 100, 105, 9, 105, 33, 74, 39, 26, 44, 198, 18, 241, 110, 98, 230, 146, 241, 2, 55, 189, 0, 44, 238, 250, 114, 45, 250, 246, 54, 101, 217, 93, 191, 33, 124, 165, 74, 178, 94, 82, 223, 131, 255, 64, 230, 120, 150, 125, 116, 82, 255, 94, 186, 183, 69, 78, 169, 124, 253, 153, 12, 205, 112, 6, 79, 246, 32, 227, 162, 36, 55, 123, 227, 67, 138, 131, 159, 175, 40, 230, 15, 56, 113, 138, 19, 142, 176, 154, 141, 179, 168, 239, 103, 175, 100, 84, 26, 0, 245, 101, 182, 200, 81, 250, 81, 229, 208, 156, 226, 225, 19, 81, 82, 221, 221, 111, 183, 150, 40, 35, 71, 126, 38, 68, 60, 206, 112, 181, 204, 230, 223, 174, 112, 115, 196, 7, 57, 19, 54, 175, 192, 47, 157, 115, 253, 196, 192, 201, 227, 47, 80, 145, 224, 111, 209, 27, 171, 169, 160, 237, 234, 105, 18, 69, 246, 54, 146, 205, 206, 50, 31, 249, 121, 111, 78, 20, 151, 115, 129, 201, 144, 246, 161, 107, 23, 200, 92, 47, 207, 106, 150, 21, 158, 204, 41, 166, 208, 7, 169, 191, 34, 148, 143, 144, 52, 106, 233, 146, 42, 77, 152, 79, 162, 126, 67, 198, 225, 233, 209, 24, 200, 48, 171, 39, 179, 141, 148, 230, 45, 87, 237, 120, 232, 10, 158, 121, 38, 10, 63, 208, 56, 146, 169, 198, 158, 181, 49, 65, 4, 234, 55, 75, 55, 16, 38, 75, 253, 98, 56, 150, 141, 143, 147, 251, 187, 76, 250, 77, 126, 76, 130, 109, 127, 124, 152, 156, 163, 184, 120, 219, 190, 5, 154, 20, 69, 182, 101, 146, 117, 144, 212, 198, 154, 199, 140, 255, 3, 98, 125, 175, 231, 75, 145, 16, 91, 121, 216, 190, 156, 92, 97, 60, 34, 249, 102, 39, 54, 245, 173, 3, 96, 65, 88, 152, 76, 201, 33, 90, 154, 232, 154, 134, 92, 45, 217, 21, 88, 241, 12, 135, 50, 164, 230, 146, 217, 159, 83, 25, 225, 42, 20, 78, 226, 82, 89, 64, 20, 171, 150, 71, 102, 18, 53, 172, 124, 164, 49, 112, 105, 209, 28, 210, 20, 233, 145, 25, 227, 126, 54, 146, 88, 69, 166, 1, 148, 59, 205, 141, 180, 53, 176, 56, 116, 225, 204, 188, 240, 162, 141, 46, 4, 25, 220, 109, 52, 19, 9, 191, 115, 226, 197, 33, 75, 219, 166, 48, 32, 179, 151, 84, 131, 141, 81, 237, 249, 144, 92, 221, 92, 188, 179, 129, 179, 45, 91, 90, 114, 207, 145, 240, 141, 28, 186, 145, 173, 164, 56, 222, 48, 189, 183, 80, 165, 42, 156, 166, 118, 11, 147, 5, 127, 68, 142, 169, 222, 214, 115, 157, 215, 161, 13, 160, 194, 84, 220, 41, 145, 229, 12, 155, 50, 244, 101, 197, 60, 96, 185, 205, 215, 141, 48, 218, 146, 175, 46, 245, 245, 186, 248, 55, 132, 8, 33, 112, 38, 78, 202, 38, 125, 244, 34, 138, 147, 53, 79, 136, 84, 162, 175, 126, 219, 157, 152, 187, 126, 37, 39, 225, 237, 232, 219, 134, 214, 118, 183, 13, 115, 107, 250, 177, 54, 242, 202, 37, 216, 223, 26, 185, 23, 239, 201, 47, 105, 178, 3, 81, 93, 201, 107, 242, 0, 154, 59, 166, 75, 170, 212, 115, 180, 25, 22, 46, 6, 48, 128, 226, 153, 138, 102, 41, 116, 14, 113, 111, 81, 185, 187, 237, 149, 137, 152, 102, 217, 10, 127, 195, 2, 95, 108, 64, 91, 193, 92, 12, 216, 0, 134, 176, 1, 210, 181, 251, 115, 195, 117, 226, 218, 174, 15, 120, 136, 222, 215, 232, 38, 53, 120, 103, 44, 14, 95, 14, 235, 76, 108, 206, 101, 192, 184, 108, 89, 51, 159, 44, 223, 248, 176, 106, 37, 255, 65, 153, 49, 131, 92, 255, 95, 104, 226, 137, 61, 154, 51, 201, 116, 174, 64, 163, 93, 99, 159, 160, 96, 21, 30, 81, 201, 192, 34, 77, 121, 175, 198, 199, 167, 47, 244, 118, 93, 182, 245, 112, 160, 19, 131, 66, 64, 121, 8, 38, 110, 197, 40, 100, 175, 97, 25, 74, 16, 85, 201, 87, 85, 40, 81, 76, 175, 159, 8, 55, 155, 57, 192, 207, 50, 147, 218, 87, 199, 178, 150, 95, 15, 129, 17, 48, 147, 158, 64, 131, 222, 142, 11, 179, 145, 181, 104, 0, 23, 2, 131, 77, 58, 93, 53, 170, 178, 127, 149, 233, 146, 50, 138, 35, 166, 83, 17, 103, 35, 108, 21, 57, 45, 98, 75, 242, 218, 111, 46, 245, 65, 218, 156, 188, 33, 4, 10, 9, 254, 44, 233, 197, 77, 134, 216, 96, 253, 229, 217, 12, 217, 244, 46, 147, 81, 124, 189, 137, 183, 144, 110, 236, 14, 203, 160, 71, 149, 73, 193, 132, 6, 72, 225, 74, 221, 112, 25, 66, 116, 253, 129, 102, 152, 114, 195, 249, 135, 249, 108, 28, 5, 93, 202, 184, 165, 21, 122, 245, 33, 72, 178, 27, 131, 128, 130, 184, 5, 152, 185, 61, 226, 231, 125, 100, 88, 89, 107, 195, 214, 225, 115, 46, 96, 72, 70, 24, 211, 116, 21, 230, 81, 32, 46, 174, 6, 223, 245, 56, 122, 117, 148, 105, 35, 10, 146, 249, 226, 14, 200, 96, 141, 158, 106, 195, 99, 233, 16, 221, 101, 101, 171, 142, 243, 103, 219, 34, 126, 66, 208, 229, 34, 76, 196, 153, 176, 183, 163, 73, 111, 191, 210, 18, 226, 168, 241, 156, 112, 116, 210, 76, 85, 90, 199, 77, 191, 220, 64, 39, 50, 135, 63, 192, 119, 73, 165, 239, 176, 228, 136, 20, 215, 17, 145, 175, 19, 163, 238, 233, 30, 203, 89, 200, 25, 206, 214, 122, 235, 134, 211, 249, 218, 99, 200, 131, 122, 12, 171, 15, 121, 29, 56, 201, 153, 205, 92, 222, 36, 12, 35, 166, 125, 4, 120, 85, 171, 178, 84, 180, 103, 223, 217, 169, 169, 21, 186, 60, 135, 218, 90, 42, 240, 47, 170, 91, 153, 33, 43, 174, 22, 41, 72, 101, 92, 230, 25, 189, 132, 168, 62, 70, 129, 12, 133, 26, 241, 74, 44, 77, 59, 43, 131, 49, 77, 153, 75, 23, 78, 205, 143, 6, 65, 12, 159, 125, 33, 107, 176, 219, 243, 247, 39, 77, 20, 175, 147, 246, 194, 76, 93, 17, 39, 62, 22, 166, 142, 67, 144, 170, 191, 235, 182, 140, 74, 93, 122, 223, 228, 16, 176, 12, 197, 158, 129, 52, 90, 130, 158, 234, 244, 222, 55, 83, 229, 206, 200, 110, 45, 204, 83, 50, 109, 110, 55, 62, 239, 100, 147, 233, 180, 125, 105, 61, 108, 64, 188, 179, 183, 187, 216, 67, 134, 195, 193, 145, 151, 199, 60, 25, 233, 1, 166, 15, 27, 185, 107, 227, 147, 37, 70, 0, 162, 28, 69, 67, 39, 138, 190, 68, 118, 14, 155, 105, 156, 118, 114, 44, 212, 118, 155, 6, 85, 138, 113, 240, 198, 72, 11, 13, 180, 53, 1, 247, 225, 10, 21, 102, 21, 233, 43, 57, 242, 24, 220, 214, 229, 125, 10, 103, 108, 239, 240, 134, 199, 48, 30, 126, 176, 175, 208, 177, 186, 188, 249, 15, 85, 235, 213, 47, 57, 0, 122, 69, 38, 177, 203, 13, 252, 17, 146, 17, 101, 28, 172, 196, 238, 52, 236, 214, 51, 98, 165, 196, 53, 110, 61, 105, 154, 184, 48, 164, 245, 89, 39, 207, 237, 86, 28, 219, 97, 171, 240, 107, 117, 243, 176, 226, 60, 145, 204, 26, 45, 116, 4, 229, 228, 128, 151, 181, 149, 131, 80, 247, 186, 221, 28, 170, 47, 118, 88, 95, 202, 245, 150, 26, 3, 253, 36, 126, 119, 154, 251, 4, 219, 190, 75, 107, 26, 225, 105, 58, 161, 162, 84, 245, 123, 178, 43, 14, 248, 218, 113, 1, 238, 93, 25, 221, 65, 200, 217, 176, 119, 45, 73, 211, 26, 25, 223, 118, 29, 188, 238, 232, 158, 78, 2, 239, 153, 124, 240, 70, 75, 149, 152, 136, 253, 0, 72, 120, 188, 37, 131, 104, 217, 218, 87, 199, 162, 127, 213, 143, 179, 158, 177, 229, 152, 53, 138, 56, 126, 116, 93, 181, 233, 123, 202, 135, 41, 134, 200, 108, 201, 208, 150, 92, 229, 6, 175, 102, 244, 220, 76, 7, 202, 107, 159, 103, 190, 132, 126, 215, 108, 102, 228, 107, 198, 17, 255, 35, 189, 154, 89, 96, 153, 248, 135, 0, 213, 3, 117, 37, 248, 81, 236, 120, 89, 30, 205, 242, 227, 48, 114, 174, 68, 145, 170, 190, 239, 188, 93, 126, 138, 103, 187, 81, 141, 13, 105, 37, 35, 186, 211, 36, 236, 29, 209, 128, 74, 168, 213, 40, 106, 243, 144, 239, 53, 88, 216, 155, 91, 126, 0, 18, 65, 10, 122, 2, 37, 97, 250, 92, 157, 229, 3, 90, 76, 52, 124, 187, 130, 4, 60, 113, 94, 141, 5, 235, 214, 250, 198, 97, 223, 246, 42, 178, 65, 213, 85, 158, 18, 248, 165, 45, 82, 189, 219, 243, 161, 196, 115, 64, 90, 148, 4, 13, 114, 178, 228, 203, 86, 31, 69, 150, 233, 38, 164, 158, 162, 51, 60, 1, 130, 139, 82, 9, 32, 40, 37, 97, 158, 55, 124, 99, 7, 165, 30, 112, 37, 20, 41, 153, 161, 202, 10, 160, 162, 15, 101, 213, 102, 109, 114, 251, 75, 61, 239, 229, 212, 186, 210, 30, 128, 200, 235, 166, 251, 75, 78, 85, 133, 139, 127, 119, 109, 99, 96, 19, 69, 4, 228, 251, 63, 101, 127, 228, 4, 130, 211, 69, 91, 110, 138, 4, 113, 82, 52, 60, 187, 74, 133, 113, 52, 201, 6, 244, 192, 216, 236, 8, 119, 78, 122, 97, 44, 6, 84, 188, 114, 49, 136, 64, 207, 65, 199, 90, 218, 2, 229, 22, 176, 217, 164, 151, 246, 178, 38, 27, 66, 61, 92, 87, 55, 28, 28, 194, 234, 216, 217, 8, 251, 233, 8, 103, 1, 141, 14, 86, 206, 152, 188, 214, 107, 120, 77, 187, 208, 28, 95, 182, 178, 134, 116, 141, 225, 63, 116, 68, 76, 212, 195, 144, 2, 126, 44, 65, 196, 26, 168, 77, 219, 224, 173, 81, 132, 99, 175, 217, 147, 166, 143, 135, 197, 103, 85, 117, 24, 234, 168, 158, 40, 188, 18, 182, 235, 137, 229, 16, 9, 135, 160, 218, 77, 4, 177, 176, 177, 127, 147, 106, 136, 134, 92, 195, 88, 59, 117, 186, 173, 177, 222, 194, 112, 223, 249, 72, 134, 90, 200, 181, 91, 214, 4, 31, 219, 195, 16, 182, 216, 172, 31, 4, 30, 227, 181, 43, 139, 128, 99, 231, 78, 35, 154, 182, 102, 116, 245, 195, 0, 105, 173, 118, 11, 137, 130, 159, 196, 163, 50, 166, 38, 205, 41, 48, 94, 99, 158, 29, 6, 201, 53, 210, 2, 72, 97, 228, 133, 109, 202, 37, 45, 137, 45, 144, 29, 128, 120, 174, 207, 139, 117, 15, 180, 218, 38, 122, 253, 197, 111, 28, 121, 237, 90, 2, 148, 191, 224, 251, 166, 186, 113, 150, 254, 57, 225, 222, 164, 204, 153, 172, 214, 252, 190, 55, 65, 7, 225, 38, 93, 8, 198, 172, 43, 80, 167, 23, 177, 44, 24, 125, 101, 95, 51, 100, 5, 167, 55, 222, 63, 162, 221, 60, 178, 93, 96, 54, 31, 133, 206, 216, 140, 172, 90, 73, 110, 136, 19, 113, 33, 64, 99, 223, 207, 218, 46, 40, 13, 68, 87, 128, 62, 178, 228, 88, 101, 254, 192, 75, 126, 25, 97, 253, 7, 189, 202, 220, 226, 230, 235, 3, 253, 20, 148, 130, 44, 150, 52, 153, 182, 67, 16, 183, 144, 111, 122, 232, 38, 150, 64, 92, 142, 158, 225, 191, 237, 32, 233, 163, 220, 255, 18, 70, 138, 0, 214, 62, 70, 74, 95, 72, 171, 166, 183, 138, 97, 31, 85, 236, 203, 128, 111, 254, 243, 141, 173, 101, 103, 4, 62, 96, 15, 254, 4, 196, 53, 226, 0, 188, 158, 186, 19, 112, 185, 192, 223, 23, 100, 45, 204, 51, 192, 84, 219, 188, 51, 28, 218, 120, 19, 138, 120, 183, 23, 151, 149, 152, 166, 230, 176, 75, 200, 245, 204, 237, 134, 220, 30, 64, 137, 18, 104, 170, 193, 0, 43, 199, 174, 96, 116, 84, 143, 234, 141, 249, 8, 39, 188, 163, 151, 114, 97, 70, 44, 246, 149, 215, 207, 203, 119, 226, 211, 118, 116, 67, 248, 110, 131, 238, 123, 243, 220, 192, 134, 206, 60, 181, 206, 221, 194, 231, 124, 20, 65, 40, 204, 94, 213, 147, 71, 0, 81, 218, 51, 109, 84, 187, 220, 171, 29, 187, 88, 132, 143, 7, 103, 127, 27, 67, 32, 82, 158, 223, 68, 217, 166, 83, 234, 126, 54, 208, 197, 118, 47, 39, 18, 31, 39, 205, 162, 227, 69, 144, 181, 203, 84, 121, 80, 239, 47, 225, 195, 229, 121, 117, 203, 108, 238, 24, 175, 100, 98, 5, 124, 8, 236, 216, 40, 107, 167, 10, 248, 253, 88, 223, 89, 187, 28, 28, 171, 78, 27, 129, 82, 62, 110, 115, 153, 21, 123, 101, 209, 31, 41, 51, 233, 85, 145, 178, 11, 202, 243, 147, 137, 29, 210, 127, 223, 51, 147, 244, 206, 88, 226, 245, 216, 148, 31, 165, 40, 25, 206, 241, 229, 73, 51, 170, 209, 146, 145, 103, 211, 195, 175, 226, 96, 145, 151, 0, 179, 253, 253, 102, 35, 27, 241, 208, 162, 63, 135, 172, 187, 135, 126, 62, 156, 44, 27, 104, 90, 168, 23, 2, 195, 101, 174, 231, 15, 15, 130, 78, 215, 57, 18, 139, 153, 20, 40, 221, 5, 214, 250, 185, 215, 186, 94, 62, 254, 144, 17, 204, 26, 44, 232, 161, 50, 150, 68, 234, 88, 193, 72, 12, 118, 242, 229, 139, 162, 25, 44, 56, 199, 115, 232, 115, 52, 44, 121, 174, 112, 96, 114, 60, 96, 233, 76, 113, 124, 45, 62, 251, 22, 206, 24, 246, 184, 116, 131, 245, 224, 200, 224, 171, 199, 45, 238, 77, 84, 212, 14, 157, 242, 187, 216, 159, 36, 181, 1, 139, 134, 96, 250, 65, 151, 219, 235, 133, 128, 13, 135, 225, 148, 204, 30, 79, 187, 25, 205, 17, 189, 180, 43, 229, 160, 38, 172, 70, 108, 6, 229, 200, 35, 42, 13, 154, 245, 143, 189, 42, 67, 4, 113, 47, 102, 0, 109, 69, 129, 28, 21, 42, 250, 71, 188, 25, 127, 136, 161, 68, 71, 249, 169, 5, 161, 236, 110, 198, 124, 166, 168, 199, 76, 92, 255, 134, 11, 55, 25, 180, 193, 94, 109, 72, 233, 192, 228, 132, 92, 164, 177, 66, 181, 177, 128, 247, 67, 188, 234, 17, 123, 187, 218, 144, 100, 9, 198, 191, 235, 89, 34, 84, 80, 187, 182, 18, 184, 39, 130, 202, 132, 56, 56, 133, 81, 52, 9, 55, 7, 70, 168, 184, 61, 131, 182, 190, 195, 51, 13, 242, 90, 120, 52, 23, 172, 205, 160, 234, 105, 163, 155, 7, 38, 162, 145, 161, 61, 28, 124, 124, 184, 251, 145, 60, 143, 93, 228, 253, 77, 14, 190, 168, 58, 49, 60, 95, 239, 165, 142, 255, 170, 61, 7, 163, 193, 78, 137, 118, 106, 66, 195, 74, 6, 54, 240, 162, 5, 176, 174, 199, 126, 156, 72, 134, 90, 209, 206, 102, 21, 200, 89, 35, 122, 33, 144, 59, 254, 29, 201, 132, 213, 99, 209, 61, 2, 34, 47, 148, 24, 211, 146, 86, 108, 81, 173, 64, 110, 122, 178, 77, 192, 165, 87, 105, 34, 178, 95, 122, 128, 189, 97, 216, 192, 123, 189, 67, 221, 88, 251, 154, 197, 171, 221, 207, 218, 255, 54, 255, 244, 211, 216, 234, 137, 76, 207, 106, 104, 135, 8, 115, 30, 64, 242, 100, 245, 202, 80, 147, 182, 78, 81, 245, 204, 216, 22, 213, 80, 127, 95, 150, 123, 125, 6, 145, 50, 226, 190, 57, 82, 182, 233, 206, 181, 22, 165, 44, 80, 242, 114, 98, 215, 5, 130, 250, 158, 79, 245, 248, 186, 185, 251, 71, 212, 102, 214, 11, 37, 109, 200, 132, 63, 202, 186, 109, 200, 223, 253, 139, 111, 66, 182, 26, 176, 11, 191, 222, 33, 181, 102, 148, 200, 181, 192, 190, 18, 147, 230, 252, 37, 153, 242, 13, 233, 195, 48, 3, 171, 31, 249, 163, 108, 237, 237, 131, 62, 31, 80, 100, 104, 212, 254, 19, 59, 128, 142, 127, 241, 181, 229, 34, 4, 183, 172, 78, 165, 196, 205, 121, 34, 47, 91, 115, 21, 150, 222, 137, 104, 50, 228, 199, 4, 110, 243, 248, 197, 207, 96, 1, 167, 24, 247, 221, 233, 191, 120, 54, 90, 244, 246, 163, 210, 147, 6, 204, 205, 33, 55, 128, 203, 168, 68, 219, 207, 91, 190, 198, 31, 242, 174, 79, 227, 155, 173, 21, 71, 169, 149, 152, 110, 190, 141, 20, 19, 200, 159, 62, 123, 164, 90, 82, 46, 50, 61, 181, 206, 101, 173, 17, 57, 227, 18, 34, 100, 92, 139, 234, 137, 241, 234, 163, 112, 96, 19, 102, 250, 204, 59, 89, 239, 37, 231, 150, 55, 195, 106, 25, 133, 223, 157, 81, 121, 125, 54, 230, 208, 139, 41, 62, 40, 86, 127, 52, 41, 87, 244, 20, 133, 136, 97, 157, 83, 187, 111, 220, 14, 32, 252, 28, 162, 48, 7, 32, 110, 47, 60, 9, 218, 126, 208, 207, 250, 25, 37, 109, 45, 226, 97, 180, 217, 191, 113, 69, 81, 133, 29, 89, 18, 141, 6, 57, 103, 37, 101, 233, 108, 206, 41, 134, 163, 216, 196, 129, 81, 223, 229, 241, 12, 36, 249, 20, 120, 108, 94, 134, 253, 88, 197, 116, 84, 97, 77, 153, 82, 87, 9, 169, 254, 130, 31, 71, 255, 18, 43, 237, 243, 225, 190, 69, 167, 139, 62, 248, 185, 52, 224, 58, 24, 57, 111, 92, 215, 165, 223, 193, 190, 21, 63, 129, 192, 183, 63, 106, 159, 195, 89, 45, 162, 22, 14, 128, 234, 103, 4, 151, 10, 23, 200, 102, 88, 92, 248, 85, 144, 89, 168, 188, 106, 168, 178, 197, 222, 58, 204, 98, 169, 21, 234, 27, 144, 150, 77, 131, 101, 72, 176, 161, 232, 3, 153, 162, 120, 7, 216, 8, 226, 89, 12, 12, 150, 18, 18, 223, 97, 240, 229, 254, 180, 214, 187, 71, 37, 145, 198, 173, 130, 222, 151, 128, 48, 17, 217, 140, 220, 100, 185, 231, 8, 15, 187, 89, 152, 103, 62, 0, 244, 237, 77, 115, 9, 34, 246, 178, 158, 247, 20, 110, 27, 29, 139, 4, 179, 10, 221, 237, 39, 203, 156, 250, 11, 100, 229, 164, 15, 168, 224, 118, 113, 164, 195, 236, 210, 86, 225, 93, 189, 166, 97, 200, 221, 165, 134, 28, 39, 11, 107, 245, 107, 142, 68, 23, 251, 136, 58, 10, 75, 38, 32, 194, 139, 219, 2, 62, 248, 156, 54, 175, 19, 157, 210, 180, 84, 108, 147, 203, 3, 175, 79, 81, 247, 128, 153, 146, 92, 83, 251, 192, 225, 106, 223, 30, 33, 8, 194, 58, 192, 216, 255, 248, 93, 72, 145, 56, 184, 211, 210, 155, 59, 28, 241, 77, 33, 173, 1, 32, 121, 183, 114, 134, 250, 84, 71, 246, 121, 167, 24, 25, 210, 135, 109, 232, 254, 87, 175, 175, 140, 113, 79, 167, 210, 90, 94, 94, 164, 171, 45, 228, 209, 137, 238, 0, 92, 105, 145, 236, 221, 131, 7, 100, 3, 227, 156, 174, 98, 178, 146, 136, 254, 124, 226, 235, 85, 105, 129, 248, 112, 230, 147, 254, 132, 187, 50, 132, 85, 78, 90, 207, 83, 199, 96, 23, 72, 56, 218, 235, 112, 233, 101, 127, 71, 1, 211, 75, 34, 104, 19, 134, 15, 62, 143, 189, 6, 95, 67, 42, 245, 50, 128, 217, 20, 3, 1, 25, 26, 145, 161, 209, 155, 85, 238, 245, 252, 203, 177, 101, 198, 131, 4, 131, 90, 83, 163, 78, 68, 235, 52, 96, 156, 155, 28, 134, 117, 72, 186, 143, 199, 27, 45, 112, 133, 169, 28, 172, 40, 238, 108, 227, 69, 203, 24, 224, 15, 208, 186, 241, 154, 41, 54, 121, 187, 135, 23, 18, 105, 74, 139, 210, 153, 237, 22, 88, 42, 79, 207, 151, 104, 89, 220, 173, 113, 37, 124, 40, 18, 216, 210, 232, 52, 68, 58, 174, 3, 176, 163, 113, 248, 112, 138, 148, 222, 76, 235, 201, 114, 89, 78, 142, 206, 7, 27, 107, 233, 20, 159, 10, 73, 132, 254, 108, 205, 4, 190, 21, 171, 149, 95, 72, 120, 142, 134, 132, 195, 160, 106, 155, 225, 14, 122, 64, 245, 13, 247, 64, 168, 222, 169, 38, 205, 212, 238, 84, 255, 35, 160, 95, 232, 100, 160, 96, 27, 67, 42, 99, 145, 219, 160, 210, 87, 15, 16, 144, 133, 42, 223, 184, 122, 248, 220, 111, 3, 28, 197, 106, 54, 123, 173, 137, 249, 43, 99, 31, 27, 1, 232, 61, 233, 188, 194, 192, 26, 229, 201, 11, 251, 199, 37, 183, 75, 212, 164, 204, 240, 18, 207, 71, 133, 39, 150, 32, 129, 149, 29, 109, 31, 10, 31, 222, 47, 0, 212, 71, 70, 167, 210, 126, 136, 43, 235, 221, 118, 167, 60, 153, 59, 225, 250, 137, 211, 144, 86, 245, 200, 236, 175, 187, 130, 72, 50, 176, 203, 96, 65, 243, 252, 226, 231, 249, 21, 216, 4, 15, 35, 46, 96, 198, 209, 41, 206, 114, 48, 29, 234, 16, 72, 170, 133, 1, 148, 209, 193, 103, 73, 68, 244, 108, 81, 205, 104, 26, 140, 71, 15, 27, 96, 158, 137, 169, 182, 84, 155, 122, 248, 183, 249, 226, 100, 237, 19, 24, 57, 229, 138, 2, 158, 88, 137, 76, 171, 20, 181, 82, 59, 127, 195, 88, 134, 173, 177, 218, 248, 109, 81, 250, 43, 6, 238, 232, 156, 255, 160, 49, 126, 27, 12, 139, 105, 58, 216, 176, 78, 145, 225, 161, 146, 206, 37, 118, 54, 248, 148, 26, 133, 35, 87, 80, 227, 14, 63, 40, 253, 156, 221, 173, 72, 227, 30, 175, 19, 67, 89, 69, 165, 25, 125, 142, 35, 190, 167, 249, 132, 151, 42, 117, 127, 96, 237, 25, 141, 52, 180, 33, 106, 201, 84, 60, 218, 74, 93, 215, 29, 106, 52, 110, 66, 167, 92, 16, 151, 106, 22, 255, 223, 21, 28, 236, 48, 190, 113, 116, 174, 167, 108, 184, 147, 231, 17, 171, 225, 5, 176, 229, 169, 95, 78, 41, 64, 33, 91, 59, 191, 31, 14, 118, 251, 208, 54, 79, 217, 77, 31, 50, 78, 4, 166, 195, 166, 99, 113, 206, 167, 212, 220, 96, 185, 22, 223, 63, 13, 141, 187, 55, 102, 113, 164, 91, 202, 99, 89, 125, 63, 78, 53, 126, 38, 232, 50, 218, 56, 102, 41, 46, 144, 94, 159, 4, 24, 247, 203, 153, 102, 190, 22, 221, 183, 183, 192, 131, 4, 24, 112, 95, 95, 138, 192, 134, 80, 100, 77, 60, 236, 2, 181, 147, 26, 88, 23, 69, 205, 219, 146, 6, 142, 225, 114, 19, 52, 189, 174, 172, 52, 242, 116, 172, 30, 168, 249, 227, 212, 110, 105, 22, 112, 143, 232, 205, 218, 4, 253, 39, 32, 224, 254, 27, 244, 164, 210, 131, 163, 93, 180, 223, 38, 215, 11, 223, 240, 78, 125, 207, 111, 125, 190, 40, 201, 229, 103, 100, 172, 249, 3, 200, 218, 5, 143, 150, 16, 210, 236, 152, 236, 250, 46, 122, 6, 129, 238, 102, 235, 72, 15, 102, 180, 80, 20, 231, 255, 54, 225, 207, 79, 243, 122, 18, 23, 75, 75, 229, 195, 126, 33, 186, 225, 72, 60, 243, 70, 216, 7, 56, 217, 59, 63, 6, 56, 143, 181, 241, 227, 70, 222, 25, 142, 17, 75, 36, 174, 245, 177, 153, 248, 81, 122, 81, 222, 189, 127, 13, 96, 150, 41, 80, 221, 97, 104, 197, 41, 238, 180, 110, 174, 53, 115, 29, 166, 168, 137, 216] + ], + "iv": null, + "key": [41, 218, 196, 159, 201, 213, 225, 13, 250, 91, 54, 239, 221, 177, 43, 112, 102, 192, 221, 15, 44, 75, 229, 141], + "modeOfOperation": "ctr", + "plaintext": [ + [123, 92, 196, 120, 44, 150, 226, 84, 191, 233, 136, 190, 77, 90, 124, 202, 48, 243, 90, 137, 175, 54, 194, 197, 214, 44, 249, 204, 250, 88, 248, 248, 201, 145, 235, 213, 101, 92, 113, 78, 197, 36, 64, 150, 198, 136, 72, 13, 130, 171, 238, 100, 57, 90, 182, 47, 57, 101, 176, 224, 162, 199, 147, 28, 142, 230, 127, 60, 103, 117, 87, 45, 222, 66, 65, 65, 95, 191, 216, 202, 67, 182, 176, 13, 42, 251, 243, 93, 196, 159, 243, 97, 178, 187, 232, 140, 226, 102, 82, 250, 125, 84, 154, 213, 215, 191, 128, 215, 85, 254, 208, 54, 30, 146, 17, 122, 191, 2, 205, 31, 172, 40, 193, 218, 3, 37, 242, 104, 98, 130, 42, 217, 155, 35, 42, 15, 176, 98, 176, 55, 72, 179, 19, 0, 202, 139, 204, 95, 126, 138, 138, 7, 3, 63, 40, 94, 210, 10, 139, 39, 89, 81, 251, 19, 28, 157, 105, 209, 230, 176, 75, 42, 63, 30, 184, 117, 116, 241, 118, 102, 39, 108, 66, 176, 148, 254, 129, 118, 155, 165, 167, 49, 250, 201, 171, 233, 37, 127, 77, 240, 95, 199, 53, 128, 127, 253, 10, 13, 109, 81, 187, 230, 206, 163, 210, 115, 248, 93, 166, 205, 176, 237, 203, 185, 117, 241, 151, 96, 131, 7, 112, 173, 177, 224, 19, 41, 129, 187, 120, 81, 160, 58, 69, 38, 120, 189, 74, 252, 189, 21, 21, 216, 125, 76, 9, 244, 42, 143, 118, 152, 40, 144, 154, 172, 184, 100, 132, 0, 128, 13, 192, 75, 224, 180, 149, 79, 221, 30, 110, 34, 9, 215, 120, 127, 45, 66, 62, 44, 155, 169, 146, 236, 239, 28, 168, 61, 198, 20, 163, 216, 106, 101, 69, 106, 232, 123, 255, 70, 127, 153, 112, 92, 48, 225, 82, 152, 43, 137, 116, 59, 196, 199, 231, 228, 199, 138, 162, 122, 115, 19, 37, 176, 231, 85, 97, 175, 34, 223, 133, 149, 131, 2, 45, 110, 224, 43, 64, 148, 140, 125, 15, 84, 116, 150, 254, 244, 234, 170, 37, 30, 226, 78, 131, 81, 150, 45, 109, 238, 1, 14, 178, 110, 36, 220, 155, 180, 202, 140, 130, 177, 28, 91, 1, 85, 107, 173, 82, 152, 177, 22, 104, 30, 130, 176, 99, 210, 47, 14, 13, 103, 73, 27, 233, 76, 145, 106, 169, 138, 126, 135, 11, 152, 244, 201, 115, 42, 80, 79, 160, 25, 238, 181, 176, 115, 174, 202, 162, 133, 65, 11, 201, 18, 192, 193, 117, 66, 107, 168, 242, 14, 248, 33, 40, 142, 199, 8, 184, 58, 220, 96, 150, 73, 192, 152, 75, 55, 41, 132, 138, 82, 110, 166, 232, 128, 28, 58, 244, 50, 42, 200, 163, 29, 120, 1, 130, 235, 155, 61, 173, 100, 57, 117, 166, 68, 149, 150, 78, 68, 178, 49, 221, 198, 227, 53, 37, 253, 165, 212, 175, 220, 123, 162, 43, 135, 192, 176, 50, 10, 156, 99, 2, 108, 208, 184, 247, 130, 233, 163, 67, 144, 249, 46, 111, 194, 67, 212, 75, 107, 177, 143, 10, 2, 187, 215, 235, 27, 133, 130, 231, 30, 137, 193, 166, 23, 179, 188, 187, 251, 58, 250, 28, 25, 187, 39, 240, 239, 112, 232, 185, 60, 236, 59, 28, 69, 38, 18, 28, 200, 105, 50, 64, 111, 238, 217, 87, 241, 124, 240, 52, 255, 40, 127, 110, 23, 205, 104, 97, 100, 94, 120, 230, 133, 166, 244, 105, 213, 47, 47, 218, 132, 47, 34, 230, 200, 36, 243, 249, 117, 128, 15, 207, 176, 60, 225, 11, 184, 48, 13, 87, 212, 12, 16, 228, 196, 123, 255, 66, 74, 98, 155, 32, 104, 183, 102, 130, 96, 121, 228, 178, 74, 23, 75, 171, 51, 140, 255, 236, 45, 92, 73, 46, 66, 225, 14, 33, 146, 45, 136, 67, 152, 219, 209, 75, 72, 219, 148, 188, 191, 3, 187, 56, 65, 181, 144, 162, 38, 110, 146, 56, 203, 162, 34, 173, 100, 207, 29, 170, 59, 39, 191, 32, 134, 180, 216, 14, 212, 58, 40, 176, 62, 86, 193, 222, 225, 192, 44, 40, 103, 156, 132, 200, 192, 0, 176, 250, 136, 180, 208, 235, 224, 108, 108, 148, 213, 153, 230, 204, 166, 127, 65, 79, 203, 250, 82, 71, 153, 112, 1, 216, 176, 23, 159, 95, 219, 121, 247, 9, 150, 94, 197, 40, 218, 143, 130, 202, 144, 222, 232, 20, 210, 206, 165, 6, 159, 125, 193, 236, 183, 34, 23, 136, 243, 49, 212, 131, 211, 194, 109, 71, 231, 23, 39, 124, 221, 125, 165, 19, 66, 27, 203, 253, 137, 181, 188, 123, 37, 143, 148, 177, 193, 40, 76, 123, 252, 154, 66, 0, 33, 183, 231, 63, 38, 11, 223, 206, 31, 182, 32, 137, 221, 61, 56, 29, 32, 151, 153, 2, 250, 101, 53, 87, 168, 116, 211, 138, 182, 137, 65, 140, 17, 217, 89, 179, 223, 62, 250, 108, 130, 248, 236, 71, 202, 18, 252, 31, 113, 71, 208, 161, 116, 18, 137, 23, 193, 187, 34, 213, 207, 18, 163, 147, 249, 163, 144, 255, 73, 177, 146, 94, 206, 159, 201, 121, 70, 48, 57, 194, 72, 49, 189, 245, 230, 125, 169, 232, 11, 110, 221, 187, 178, 128, 98, 207, 171, 177, 92, 109, 52, 100, 245, 70, 77, 0, 195, 244, 180, 161, 76, 79, 113, 124, 66, 83, 199, 7, 235, 82, 47, 243, 160, 126, 70, 65, 101, 67, 253, 77, 33, 175, 253, 104, 99, 151, 110, 66, 75, 238, 123, 10, 120, 71, 228, 125, 154, 82, 248, 47, 187, 125, 43, 34, 90, 250, 61, 134, 167, 48, 72, 147, 180, 217, 243, 88, 164, 169, 92, 151, 169, 132, 127, 218, 142, 133, 223, 119, 255, 41, 99, 254, 153, 44, 152, 173, 227, 53, 100, 179, 79, 57, 14, 197, 95, 86, 228, 187, 166, 72, 209, 209, 187, 233, 197, 53, 123, 176, 207, 31, 53, 24, 103, 240, 192, 98, 141, 192, 48, 201, 0, 229, 73, 14, 13, 207, 37, 33, 101, 182, 47, 116, 125, 107, 123, 244, 13, 83, 96, 47, 227, 227, 139, 10, 210, 243, 81, 59, 245, 107, 108, 243, 154, 156, 183, 79, 233, 45, 203, 16, 10, 34, 213, 121, 233, 134, 92, 215, 42, 8, 167, 41, 75, 123, 107, 94, 30, 158, 182, 10, 170, 129, 132, 208, 175, 243, 10, 184, 239, 164, 161, 13, 207, 18, 205, 164, 29, 83, 64, 184, 201, 200, 72, 161, 207, 123, 158, 115, 65, 46, 67, 233, 123, 69, 152, 29, 198, 145, 214, 149, 220, 48, 172, 132, 100, 75, 230, 249, 251, 168, 121, 253, 33, 255, 1, 224, 53, 164, 108, 88, 85, 28, 44, 153, 17, 79, 95, 42, 53, 224, 163, 3, 153, 29, 112, 149, 165, 5, 119, 213, 192, 189, 76, 61, 96, 107, 120, 161, 131, 234, 174, 236, 111, 48, 246, 136, 54, 243, 232, 188, 152, 169, 107, 178, 106, 193, 86, 221, 139, 105, 24, 105, 243, 81, 230, 196, 227, 179, 18, 227, 242, 27, 184, 80, 47, 133, 244, 217, 117, 141, 109, 167, 51, 128, 132, 110, 235, 159, 215, 148, 40, 2, 60, 29, 204, 199, 130, 232, 85, 249, 9, 0, 83, 12, 16, 179, 102, 71, 22, 183, 145, 118, 171, 176, 34, 84, 161, 6, 98, 62, 162, 93, 194, 70, 17, 212, 67, 140, 172, 48, 48, 192, 155, 59, 255, 23, 128, 234, 188, 122, 57, 199, 164, 66, 104, 236, 122, 217, 3, 45, 206, 111, 154, 232, 153, 1, 161, 20, 122, 191, 77, 253, 0, 203, 178, 134, 170, 157, 210, 84, 158, 128, 3, 80, 47, 115, 234, 48, 141, 202, 31, 121, 56, 44, 47, 76, 202, 158, 90, 156, 175, 118, 85, 80, 96, 119, 218, 156, 79, 189, 167, 188, 51, 60, 93, 53, 131, 244, 228, 99, 57, 143, 89, 138, 22, 96, 213, 140, 44, 162, 238, 194, 70, 101, 223, 222, 175, 254, 58, 35, 10, 237, 40, 149, 5, 48, 235, 3, 147, 111, 121, 232, 127, 119, 147, 41, 33, 153, 159, 21, 5, 92, 29, 181, 114, 82, 6, 93, 243, 186, 24, 35, 253, 249, 5, 190, 183, 38, 30, 56, 47, 163, 170, 109, 5, 235, 90, 33, 127, 15, 43, 16, 181, 61, 30, 61, 123, 132, 151, 232, 57, 72, 159, 209, 110, 36, 171, 181, 82, 120, 135, 251, 38, 63, 93, 208, 7, 122, 186, 151, 88, 187, 171, 167, 207, 161, 183, 27, 221, 255, 126, 252, 33, 98, 38, 231, 227, 46, 95, 88, 10, 2, 56, 69, 184, 10, 233, 71, 27, 139, 174, 15, 231, 106, 206, 252, 35, 101, 61, 153, 114, 101, 213, 100, 34, 6, 186, 151, 8, 202, 4, 142, 129, 169, 136, 181, 88, 252, 133, 137, 174, 6, 79, 118, 27, 128, 227, 207, 122, 164, 6, 94, 207, 58, 54, 68, 80, 145, 24, 32, 226, 112, 149, 147, 12, 92, 134, 111, 89, 214, 107, 222, 21, 219, 220, 239, 165, 209, 193, 38, 206, 233, 85, 193, 236, 29, 223, 0, 46, 212, 130, 252, 78, 218, 66, 185, 197, 77, 109, 220, 98, 186, 124, 21, 252, 131, 85, 123, 96, 47, 209, 204, 194, 97, 183, 10, 76, 220, 36, 86, 150, 74, 79, 34, 198, 53, 188, 237, 56, 120, 196, 218, 253, 96, 217, 247, 66, 186, 75, 178, 75, 97, 69, 203, 198, 222, 9, 168, 197, 26, 136, 220, 6, 101, 249, 232, 15, 212, 175, 242, 215, 199, 62, 237, 232, 99, 254, 4, 58, 79, 189, 147, 177, 213, 217, 105, 149, 6, 39, 219, 211, 135, 216, 184, 52, 199, 67, 212, 206, 211, 30, 93, 20, 207, 173, 128, 151, 60, 36, 245, 248, 31, 117, 91, 51, 226, 64, 138, 46, 132, 210, 89, 127, 7, 71, 255, 110, 200, 131, 109, 194, 226, 42, 120, 54, 91, 108, 89, 220, 178, 38, 81, 170, 6, 154, 127, 144, 29, 163, 63, 253, 189, 192, 221, 13, 252, 116, 58, 34, 86, 137, 201, 236, 102, 1, 199, 225, 65, 33, 196, 209, 46, 66, 13, 145, 97, 122, 138, 158, 68, 239, 89, 164, 142, 50, 108, 223, 145, 126, 227, 103, 248, 230, 82, 225, 219, 141, 234, 20, 41, 141, 94, 222, 39, 97, 235, 161, 167, 136, 204, 1, 237, 250, 0, 147, 55, 122, 42, 151, 19, 199, 107, 214, 118, 3, 42, 68, 215, 77, 37, 97, 188, 62, 63, 77, 242, 240, 209, 26, 137, 169, 90, 42, 65, 130, 221, 8, 246, 71, 237, 191, 245, 38, 253, 81, 71, 151, 161, 95, 108, 255, 103, 226, 10, 47, 202, 18, 43, 127, 200, 121, 3, 145, 67, 128, 124, 223, 243, 229, 186, 199, 61, 185, 153, 31, 151, 148, 83, 198, 69, 196, 196, 17, 82, 19, 160, 39, 234, 85, 250, 146, 159, 48, 218, 58, 161, 41, 30, 89, 42, 181, 203, 212, 146, 38, 148, 58, 104, 114, 116, 211, 115, 29, 146, 18, 246, 48, 26, 39, 118, 111, 54, 143, 5, 182, 209, 182, 16, 20, 29, 129, 100, 143, 167, 113, 29, 98, 235, 16, 230, 176, 241, 141, 112, 42, 213, 0, 235, 225, 124, 212, 143, 77, 185, 156, 190, 100, 134, 35, 68, 114, 24, 34, 40, 191, 138, 243, 158, 28, 133, 197, 42, 235, 122, 169, 91, 222, 102, 11, 142, 109, 55, 15, 14, 63, 207, 157, 76, 218, 29, 159, 154, 142, 40, 248, 195, 53, 94, 229, 26, 229, 164, 222, 23, 206, 165, 89, 8, 180, 155, 44, 119, 80, 167, 29, 220, 196, 190, 212, 251, 49, 42, 186, 230, 62, 97, 122, 0, 215, 55, 81, 19, 116, 79, 223, 158, 55, 52, 146, 126, 95, 63, 236, 252, 33, 8, 119, 153, 252, 164, 22, 226, 51, 163, 144, 142, 145, 176, 205, 95, 239, 236, 93, 48, 62, 97, 146, 107, 135, 132, 217, 190, 230, 243, 219, 158, 177, 161, 77, 222, 86, 42, 8, 172, 171, 244, 62, 72, 19, 72, 44, 199, 67, 134, 104, 93, 210, 245, 236, 172, 141, 20, 90, 116, 236, 50, 47, 73, 29, 72, 111, 81, 182, 35, 128, 205, 199, 146, 229, 99, 9, 10, 184, 62, 150, 242, 106, 99, 99, 5, 70, 113, 127, 119, 139, 75, 145, 229, 136, 177, 37, 187, 209, 100, 243, 220, 157, 61, 234, 192, 27, 184, 191, 180, 246, 10, 38, 156, 167, 238, 236, 187, 223, 92, 120, 152, 204, 133, 227, 97, 9, 222, 41, 27, 42, 53, 72, 110, 89, 194, 1, 195, 182, 165, 180, 212, 44, 182, 129, 238, 246, 75, 105, 243, 108, 145, 20, 5, 167, 209, 216, 217, 214, 203, 173, 38, 83, 10, 146, 16, 228, 240, 128, 241, 157, 220, 88, 64, 179, 97, 110, 39, 25, 12, 56, 0, 80, 228, 12, 74, 134, 253, 193, 48, 49, 2, 88, 140, 100, 187, 74, 250, 134, 47, 240, 104, 27, 11, 18, 2, 111, 50, 254, 108, 104, 160, 23, 53, 39, 223, 95, 29, 9, 160, 156, 157, 81, 15, 9, 82, 146, 167, 82, 99, 244, 91, 155, 146, 26, 53, 194, 13, 125, 209, 157, 98, 250, 116, 127, 178, 168, 59, 62, 78, 183, 228, 43, 210, 234, 68, 140, 198, 123, 3, 68, 93, 184, 88, 130, 87, 151, 129, 4, 63, 88, 114, 95, 205, 126, 139, 108, 214, 59, 242, 64, 119, 159, 43, 219, 23, 2, 176, 96, 75, 67, 42, 22, 143, 141, 50, 18, 81, 82, 217, 229, 80, 167, 248, 179, 59, 19, 42, 17, 5, 119, 105, 146, 8, 171, 44, 235, 60, 208, 46, 187, 74, 155, 68, 56, 44, 68, 176, 169, 123, 75, 185, 66, 122, 174, 49, 119, 104, 98, 218, 196, 221, 210, 27, 55, 205, 126, 175, 94, 139, 224, 133, 220, 124, 235, 144, 119, 239, 218, 58, 143, 160, 60, 224, 180, 47, 47, 88, 10, 208, 98, 50, 228, 111, 117, 7, 64, 28, 24, 235, 166, 134, 232, 251, 49, 172, 106, 167, 75, 83, 6, 30, 225, 253, 255, 243, 45, 36, 41, 226, 66, 138, 77, 176, 57, 125, 173, 185, 18, 131, 82, 136, 212, 255, 58, 195, 98, 79, 150, 178, 64, 66, 112, 40, 120, 203, 252, 118, 234, 18, 182, 66, 55, 145, 50, 230, 74, 180, 170, 54, 227, 80, 254, 203, 192, 74, 207, 138, 179, 113, 2, 239, 189, 133, 144, 16, 186, 16, 77, 112, 190, 216, 190, 79, 112, 219, 120, 61, 126, 102, 236, 176, 231, 119, 133, 12, 92, 192, 102, 216, 35, 165, 169, 99, 201, 247, 210, 9, 81, 244, 225, 31, 43, 19, 246, 190, 127, 97, 80, 219, 94, 8, 33, 179, 250, 100, 71, 3, 36, 10, 134, 50, 180, 166, 119, 211, 120, 141, 106, 222, 28, 198, 13, 49, 70, 32, 79, 79, 113, 56, 203, 248, 133, 98, 43, 16, 177, 33, 115, 179, 223, 45, 10, 41, 124, 29, 209, 243, 66, 121, 13, 232, 192, 178, 106, 212, 82, 203, 225, 128, 233, 4, 254, 86, 217, 105, 88, 184, 21, 176, 121, 212, 41, 79, 157, 126, 7, 43, 243, 199, 62, 107, 82, 116, 186, 213, 45, 228, 101, 19, 164, 92, 106, 152, 70, 28, 106, 111, 135, 52, 39, 227, 142, 196, 125, 150, 99, 204, 132, 112, 208, 72, 212, 236, 81, 59, 118, 5, 74, 243, 83, 3, 113, 168, 49, 226, 76, 235, 150, 63, 127, 53, 143, 89, 45, 42, 146, 82, 45, 198, 208, 61, 188, 80, 4, 221, 182, 116, 27, 196, 113, 217, 113, 37, 174, 181, 231, 7, 155, 143, 55, 116, 209, 22, 17, 187, 21, 225, 212, 74, 224, 160, 222, 9, 36, 138, 127, 122, 127, 185, 159, 54, 162, 59, 69, 209, 238, 219, 182, 16, 120, 91, 230, 27, 61, 218, 57, 171, 120, 115, 128, 61, 31, 32, 58, 117, 21, 46, 26, 8, 183, 17, 36, 164, 66, 211, 240, 12, 10, 237, 175, 205, 210, 6, 194, 251, 246, 115, 167, 28, 48, 195, 220, 37, 108, 168, 101, 162, 92, 230, 233, 161, 182, 3, 175, 78, 112, 58, 152, 24, 212, 247, 97, 233, 64, 243, 255, 238, 151, 107, 205, 68, 76, 104, 182, 247, 186, 187, 158, 185, 202, 105, 207, 224, 159, 156, 254, 211, 204, 24, 56, 172, 222, 51, 52, 63, 124, 47, 103, 77, 209, 228, 231, 78, 79, 199, 49, 252, 78, 94, 24, 193, 239, 157, 247, 80, 117, 209, 12, 42, 217, 250, 168, 94, 21, 117, 141, 128, 120, 185, 187, 232, 245, 58, 151, 222, 112, 198, 138, 61, 193, 29, 176, 146, 213, 0, 116, 139, 140, 42, 204, 39, 191, 194, 65, 91, 161, 129, 141, 115, 26, 229, 89, 201, 89, 82, 148, 35, 6, 7, 153, 56, 196, 126, 40, 224, 130, 217, 175, 149, 8, 58, 205, 112, 224, 91, 2, 250, 175, 195, 109, 109, 159, 68, 51, 91, 15, 242, 196, 27, 61, 243, 181, 144, 231, 61, 163, 246, 77, 168, 29, 171, 57, 133, 90, 179, 77, 104, 225, 49, 235, 108, 40, 151, 30, 187, 215, 245, 227, 100, 37, 184, 225, 39, 80, 207, 251, 178, 124, 205, 86, 153, 187, 181, 20, 96, 132, 110, 71, 20, 131, 182, 145, 214, 112, 146, 98, 19, 195, 192, 6, 243, 108, 149, 241, 152, 150, 148, 92, 155, 151, 5, 114, 99, 205, 82, 250, 211, 90, 186, 113, 36, 133, 42, 54, 112, 233, 193, 248, 156, 31, 3, 20, 149, 9, 3, 172, 175, 131, 19, 13, 181, 248, 62, 197, 66, 45, 137, 107, 153, 70, 97, 100, 60, 103, 236, 27, 128, 67, 121, 30, 121, 128, 8, 27, 138, 210, 173, 106, 127, 108, 242, 74, 228, 172, 49, 8, 45, 78, 163, 60, 220, 36, 17, 153, 7, 20, 105, 53, 144, 226, 76, 249, 7, 206, 196, 166, 106, 46, 165, 17, 27, 40, 144, 34, 78, 43, 46, 136, 78, 110, 80, 170, 109, 181, 235, 229, 122, 22, 60, 3, 15, 76, 48, 252, 156, 229, 46, 47, 172, 10, 87, 182, 49, 231, 33, 20, 99, 247, 125, 212, 21, 121, 113, 39, 248, 34, 26, 71, 77, 240, 233, 251, 158, 72, 174, 231, 199, 55, 111, 228, 185, 99, 48, 199, 103, 186, 191, 162, 225, 40, 57, 100, 221, 38, 141, 194, 101, 59, 137, 212, 150, 102, 61, 228, 233, 237, 4, 19, 42, 220, 98, 250, 96, 140, 128, 248, 242, 235, 101, 251, 105, 122, 154, 159, 139, 74, 244, 29, 96, 94, 220, 179, 120, 112, 80, 252, 244, 247, 152, 246, 210, 181, 45, 72, 221, 69, 159, 26, 185, 178, 64, 242, 207, 26, 225, 113, 170, 80, 242, 73, 143, 229, 240, 1, 247, 181, 237, 200, 116, 22, 77, 160, 77, 176, 10, 89, 229, 143, 133, 9, 200, 66, 102, 178, 3, 201, 205, 186, 7, 223, 130, 110, 158, 21, 239, 224, 186, 215, 225, 133, 152, 174, 101, 159, 22, 169, 29, 236, 99, 61, 191, 222, 228, 38, 50, 177, 111, 23, 222, 223, 236, 31, 218, 78, 37, 141, 196, 223, 227, 119, 174, 36, 182, 210, 22, 131, 138, 56, 103, 15, 126, 60, 136, 11, 200, 52, 70, 24, 129, 75, 248, 10, 244, 67, 127, 101, 110, 205, 106, 238, 185, 64, 209, 103, 28, 166, 173, 65, 2, 26, 33, 191, 104, 152, 171, 206, 80, 231, 99, 31, 236, 157, 67, 161, 59, 202, 92, 139, 40, 88, 9, 65, 26, 191, 107, 202, 184, 215, 186, 1, 58, 49, 37, 165, 62, 32, 199, 107, 191, 18, 116, 119, 108, 134, 205, 18, 96, 254, 27, 247, 187, 126, 253, 95, 23, 239, 149, 202, 24, 217, 183, 168, 171, 171, 54, 110, 142, 228, 188, 54, 151, 4, 205, 96, 246, 197, 12, 132, 158, 16, 25, 69, 223, 119, 51, 243, 218, 214, 193, 117, 186, 18, 16, 175, 69, 232, 194, 117, 39, 175, 167, 229, 22, 74, 255, 88, 234, 28, 167, 158, 14, 136, 81, 53, 57, 146, 76, 47, 24, 109, 74, 100, 216, 202, 222, 7, 227, 43, 148, 226, 205, 167, 182, 43, 152, 205, 162, 245, 213, 21, 1, 148, 49, 87, 22, 31, 201, 83, 30, 186, 244, 118, 169, 160, 147, 253, 151, 36, 190, 154, 128, 247, 187, 222, 214, 83, 236, 62, 173, 0, 28, 160, 131, 135, 170, 27, 123, 170, 160, 20, 114, 239, 240, 152, 44, 0, 52, 11, 4, 20, 87, 95, 41, 231, 37, 202, 128, 172, 21, 184, 28, 76, 58, 134, 2, 60, 97, 202, 76, 89, 184, 21, 183, 227, 61, 136, 109, 92, 245, 165, 98, 171, 210, 234, 145, 122, 251, 238, 86, 113, 26, 101, 210, 209, 13, 178, 70, 205, 155, 165, 127, 235, 219, 125, 146, 114, 219, 183, 129, 79, 251, 171, 42, 180, 194, 137, 24, 177, 53, 191, 104, 41, 172, 67, 121, 94, 208, 69, 55, 87, 128, 95, 121, 121, 46, 226, 95, 188, 172, 164, 147, 57, 33, 162, 2, 153, 187, 54, 179, 73, 150, 84, 146, 176, 3, 147, 7, 162, 3, 210, 239, 179, 192, 191, 245, 81, 32, 195, 91, 170, 1, 22, 216, 241, 84, 95, 123, 123, 25, 84, 151, 201, 77, 13, 50, 63, 104, 57, 171, 223, 158, 242, 10, 77, 178, 214, 227, 134, 130, 60, 191, 157, 99, 28, 114, 69, 76, 135, 124, 89, 15, 244, 169, 32, 213, 162, 8, 211, 192, 30, 112, 27, 66, 125, 148, 55, 4, 95, 220, 55, 149, 125, 216, 191, 217, 204, 160, 136, 71, 220, 81, 143, 164, 40, 11, 47, 179, 43, 241, 191, 57, 131, 153, 197, 85, 89, 65, 180, 138, 104, 177, 59, 193, 243, 72, 156, 190, 85, 212, 10, 162, 123, 246, 14, 0, 7, 75, 61, 153, 73, 95, 212, 240, 44, 9, 88, 138, 105, 216, 80, 216, 18, 143, 7, 79, 14, 174, 200, 105, 252, 152, 121, 71, 35, 222, 108, 153, 75, 109, 53, 94, 116, 134, 211, 202, 182, 103, 238, 45, 90, 231, 66, 244, 103, 228, 91, 8, 4, 113, 148, 235, 107, 182, 53, 38, 153, 115, 204, 161, 122, 45, 16, 204, 166, 93, 15, 210, 237, 246, 190, 64, 200, 125, 210, 155, 125, 117, 7, 108, 107, 8, 231, 162, 170, 68, 122, 228, 40, 6, 209, 147, 122, 63, 8, 197, 126, 222, 199, 1, 147, 83, 204, 136, 12, 176, 123, 184, 94, 73, 6, 234, 31, 154, 241, 102, 48, 218, 120, 182, 167, 87, 157, 186, 51, 22, 147, 236, 106, 139, 185, 69, 216, 26, 128, 66, 132, 233, 174, 100, 0, 101, 115, 42, 2, 114, 213, 103, 255, 5, 45, 58, 101, 206, 160, 149, 58, 204, 204, 236, 207, 155, 204, 56, 239, 40, 224, 170, 108, 45, 145, 202, 69, 44, 178, 9, 185, 240, 212, 57, 193, 156, 86, 14, 80, 156, 237, 66, 4, 13, 216, 128, 68, 155, 84, 180, 126, 237, 227, 89, 65, 218, 209, 194, 84, 8, 249, 119, 134, 31, 93, 213, 242, 27, 96, 235, 52, 71, 235, 54, 176, 96, 215, 120, 22, 95, 73, 168, 201, 60, 126, 186, 50, 78, 152, 138, 47, 225, 249, 26, 55, 19, 75, 168, 204, 255, 20, 5, 229, 49, 19, 217, 126, 92, 204, 197, 134, 94, 98, 113, 124, 51, 234, 52, 105, 156, 174, 99, 109, 232, 84, 191, 178, 75, 123, 157, 196, 83, 210, 175, 212, 14, 182, 65, 28, 18, 82, 190, 167, 76, 243, 232, 202, 32, 87, 61, 97, 229, 231, 191, 213, 139, 45, 149, 86, 98, 112, 109, 240, 118, 64, 242, 228, 221, 179, 228, 175, 34, 253, 102, 199, 124, 139, 42, 156, 159, 144, 216, 11, 163, 211, 187, 174, 210, 149, 238, 234, 151, 1, 50, 55, 6, 50, 183, 196, 19, 87, 152, 151, 2, 46, 214, 65, 75, 12, 163, 4, 163, 235, 253, 135, 82, 1, 184, 200, 176, 65, 48, 202, 53, 124, 120, 91, 188, 215, 43, 32, 190, 252, 131, 132, 3, 75, 123, 202, 27, 95, 163, 244, 185, 99, 184, 36, 220, 28, 80, 128, 20, 82, 195, 37, 245, 90, 19, 142, 243, 85, 92, 252, 201, 7, 124, 195, 19, 248, 105, 141, 149, 253, 172, 10, 55, 21, 157, 158, 225, 108, 65, 134, 14, 181, 212, 119, 231, 95, 61, 159, 37, 45, 150, 51, 5, 122, 159, 173, 251, 27, 62, 215, 104, 81, 187, 167, 73, 207, 238, 241, 116, 55, 160, 201, 36, 160, 70, 1, 240, 150, 29, 160, 123, 154, 151, 79, 234, 189, 88, 108, 144, 102, 232, 202, 112, 183, 205, 188, 202, 91, 163, 129, 133, 65, 74, 18, 114, 220, 40, 204, 254, 77, 193, 166, 255, 114, 40, 17, 159, 93, 23, 220, 187, 112, 156, 98, 160, 132, 114, 187, 52, 43, 129, 56, 122, 248, 30, 243, 162, 2, 188, 154, 236, 176, 142, 121, 53, 53, 202, 117, 110, 236, 31, 35, 203, 111, 248, 226, 212, 108, 243, 6, 32, 16, 93, 129, 109, 164, 41, 27, 192, 42, 243, 6, 250, 1, 52, 82, 232, 23, 144, 171, 67, 105, 26, 106, 133, 0, 144, 15, 98, 125, 220, 39, 142, 243, 93, 165, 173, 153, 202, 242, 29, 85, 10, 57, 208, 235, 180, 58, 220, 46, 93, 128, 4, 67, 100, 167, 76, 49, 54, 208, 128, 247, 201, 194, 236, 38, 48, 135, 46, 53, 24, 188, 129, 127, 156, 102, 196, 2, 120, 154, 176, 160, 226, 2, 82, 149, 232, 106, 84, 93, 249, 166, 173, 127, 252, 145, 206, 225, 212, 103, 236, 5, 192, 199, 158, 171, 221, 84, 44, 82, 38, 220, 75, 206, 178, 73, 68, 56, 147, 77, 123, 227, 0, 118, 207, 201, 207, 101, 118, 141, 142, 80, 186, 11, 44, 28, 132, 254, 177, 169, 176, 197, 243, 48, 253, 107, 88, 189, 209, 148, 190, 205, 187, 183, 73, 235, 199, 83, 220, 83, 203, 159, 101, 19, 211, 104, 177, 7, 75, 92, 199, 81, 178, 85, 23, 156, 146, 95, 192, 108, 206, 10, 204, 142, 242, 149, 108, 171, 193, 14, 16, 85, 250, 10, 72, 95, 49, 88, 179, 177, 192, 235, 65, 75, 28, 56, 193, 224, 238, 139, 236, 75, 101, 52, 175, 79, 163, 94, 236, 224, 85, 122, 29, 211, 189, 61, 172, 88, 251, 31, 158, 213, 217, 66, 106, 51, 109, 153, 44, 213, 40, 191, 105, 164, 59, 127, 234, 217, 43, 169, 116, 221, 87, 217, 34, 145, 245, 7, 64, 204, 86, 116, 53, 216, 163, 198, 69, 169, 182, 183, 221, 40, 57, 82, 120, 255, 140, 157, 142, 234, 211, 9, 214, 217, 228, 52, 13, 144, 126, 89, 120, 22, 175, 12, 142, 201, 55, 57, 247, 20, 212, 8, 221, 212, 75, 174, 139, 193, 6, 123, 86, 156, 122, 46, 99, 249, 199, 86, 214, 17, 180, 87, 10, 151, 184, 61, 192, 144, 191, 5, 91, 68, 182, 254, 183, 29, 115, 122, 61, 163, 97, 96, 120, 95, 135, 192, 10, 27, 196, 144, 94, 116, 200, 168, 214, 160, 122, 62, 21, 171, 48, 171, 168, 152, 254, 131, 45, 127, 176, 242, 57, 73, 176, 5, 34, 191, 203, 141, 135, 147, 182, 218, 87, 99, 13, 31, 152, 11, 73, 141, 230, 60, 61, 225, 56, 187, 5, 46, 198, 0, 200, 85, 182, 203, 129, 105, 198, 32, 40, 1, 199, 176, 74, 161, 208, 198, 71, 102, 166, 155, 61, 84, 241, 110, 139, 72, 19, 85, 201, 230, 214, 173, 106, 39, 234, 30, 226, 169, 118, 201, 189, 26, 120, 27, 36, 193, 88, 36, 98, 0, 114, 132, 57, 249, 112, 194, 208, 56, 61, 217, 48, 212, 220, 236, 190, 109, 65, 138, 151, 180, 218, 46, 83, 210, 182, 99, 197, 17, 241, 45, 139, 60, 77, 6, 60, 110, 232, 237, 13, 179, 238, 181, 116, 29, 82, 163, 93, 152, 159, 230, 227, 58, 63, 17, 7, 254, 221, 139, 231, 99, 77, 91, 43, 159, 124, 218, 53, 139, 91, 248, 202, 169, 237, 2, 86, 199, 202, 17, 2, 81, 84, 140, 3, 148, 82, 237, 221, 43, 37, 185, 51, 180, 158, 25, 77, 242, 84, 43, 169, 157, 184, 213, 75, 63, 195, 130, 80, 172, 60, 170, 53, 63, 84, 132, 92, 176, 204, 243, 169, 42, 192, 134, 217, 71, 73, 100, 23, 108, 77, 235, 138, 241, 177, 67, 156, 78, 189, 178, 153, 42, 147, 219, 10, 203, 15, 186, 31, 61, 146, 189, 96, 45, 164, 58, 184, 76, 54, 40, 146, 241, 159, 220, 235, 205, 238, 134, 58, 77, 204, 96, 112, 108, 154, 21, 52, 130, 110, 189, 102, 192, 149, 143, 42, 77, 221, 224, 36, 185, 221, 223, 161, 192, 28, 255, 70, 180, 60, 48, 214, 201, 162, 237, 62, 160, 12, 26, 151, 194, 4, 200, 26, 238, 3, 74, 98, 38, 38, 142, 54, 36, 146, 43, 78, 85, 24, 245, 115, 221, 252, 211, 76, 102, 254, 11, 214, 48, 34, 86, 60, 148, 41, 33, 225, 183, 243, 26, 200, 122, 232, 95, 91, 47, 71, 113, 24, 93, 163, 41, 36, 71, 137, 106, 163, 145, 13, 128, 162, 41, 128, 92, 179, 34, 206, 22, 61, 6, 8, 170, 72, 234, 131, 90, 25, 171, 63, 55, 88, 210, 120, 19, 187, 95, 182, 23, 10, 152, 245, 162, 71, 168, 218, 104, 18, 224, 21, 110, 74, 3, 58, 32, 227, 217, 189, 219, 171, 37, 222, 207, 21, 174, 91, 42, 188, 199, 223, 200, 121, 255, 26, 222, 242, 27, 228, 88, 238, 56, 70, 26, 4, 254, 138, 247, 57, 114, 205, 85, 59, 76, 38, 182, 249, 204, 41, 23, 75, 120, 195, 149, 252, 212, 89, 32, 82, 136, 152, 132, 16, 32, 198, 170, 29, 43, 125, 216, 234, 129, 112, 191, 83, 173, 189, 126, 240, 74, 113, 55, 173, 199, 172, 213, 11, 73, 188, 241, 146, 46, 87, 167, 87, 205, 190, 216, 175, 141, 12, 152, 75, 236, 166, 141, 116, 92, 12, 66, 28, 2, 209, 190, 238, 9, 82, 178, 29, 194, 247, 158, 208, 172, 228, 212, 139, 7, 73, 47, 45, 195, 101, 22, 107, 95, 206, 212, 131, 45, 91, 92, 117, 12, 211, 13, 243, 103, 240, 64, 99, 22, 121, 241, 206, 154, 27, 146, 170, 26, 108, 133, 82, 20, 179, 118, 88, 148, 4, 72, 146, 28, 84, 113, 38, 16, 189, 76, 14, 132, 82, 109, 222, 39, 107, 185, 116, 143, 61, 214, 65, 82, 173, 4, 175, 209, 50, 201, 112, 123, 0, 248, 16, 95, 229, 142, 0, 39, 186, 57, 64, 35, 117, 95, 186, 83, 177, 5, 131, 64, 241, 217, 11, 170, 198, 26, 29, 122, 190, 239, 192, 140, 163, 183, 103, 100, 97, 129, 103, 200, 145, 245, 74, 250, 249, 10, 0, 177, 167, 253, 142, 136, 217, 183, 153, 141, 58, 153, 13, 87, 168, 212, 164, 182, 199, 98, 206, 242, 206, 21, 156, 140, 78, 168, 121, 141, 94, 242, 67, 153, 53, 55, 177, 103, 121, 188, 159, 59, 46, 173, 252, 36, 24, 137, 201, 154, 26, 197, 215, 225, 140, 155, 154, 205, 205, 99, 1, 108, 81, 128, 192, 178, 77, 16, 221, 196, 162, 139, 14, 229, 57, 52, 119, 186, 240, 219, 137, 163, 123, 70, 182, 103, 190, 106, 214, 18, 38, 253, 246, 210, 78, 223, 109, 3, 248, 113, 13, 196, 143, 218, 219, 149, 12, 52, 192, 153, 130, 192, 14, 76, 13, 112, 137, 175, 66, 52, 65, 129, 61, 33, 187, 11, 146, 208, 173, 3, 115, 40, 165, 52, 97, 241, 163, 110, 31, 73, 125, 89, 153, 150, 136, 76, 11, 206, 94, 136, 18, 46, 216, 174, 196, 16, 204, 110, 153, 232, 33, 139, 76, 128, 247, 214, 120, 186, 111, 1, 210, 117, 232, 118, 64, 154, 147, 186, 144, 160, 67, 246, 245, 44, 77, 210, 210, 125, 86, 11, 20, 68, 20, 203, 170, 48, 125, 28, 93, 175, 50, 96, 212, 200, 73, 0, 74, 48, 84, 146, 90, 179, 22, 171, 190, 190, 236, 14, 178, 102, 82, 122, 120, 86, 1, 11, 140, 105, 250, 118, 188, 23, 101, 40, 194, 91, 184, 80, 140, 62, 123, 213, 37, 157, 51, 153, 40, 158, 39, 232, 188, 81, 145, 9, 202, 2, 15, 80, 144, 79, 61, 57, 51, 73, 92, 70, 221, 161, 112, 239, 38, 76, 33, 192, 223, 67, 77, 27, 174, 168, 169, 85, 5, 15, 108, 216, 171, 24, 23, 152, 197, 27, 220, 161, 70, 9, 167, 146, 153, 183, 153, 6, 160, 60, 115, 71, 51, 84, 148, 82, 162, 149, 33, 141, 170, 214, 135, 77, 250, 26, 115, 119, 59, 21, 220, 138, 72, 248, 98, 214, 45, 245, 163, 39, 190, 207, 89, 193, 115, 164, 36, 83, 233, 246, 195, 234, 64, 224, 232, 135, 101, 92, 216, 149, 36, 166, 179, 113, 213, 60, 151, 94, 255, 65, 100, 56, 28, 6, 28, 112, 80, 177, 29, 201, 176, 147, 144, 91, 65, 9, 29, 38, 178, 75, 88, 216, 234, 206, 215, 115, 65, 167, 21, 7, 237, 229, 6, 120, 166, 91, 135, 233, 77, 4, 27, 222, 248, 172, 74, 97, 130, 38, 54, 189, 91, 45, 88, 2, 198, 136, 124, 18, 149, 30, 188, 7, 176, 223, 74, 130, 109, 104, 243, 102, 90, 167, 154, 99, 148, 235, 125, 177, 202, 11, 117, 5, 26, 24, 115, 117, 73, 131, 113, 144, 18, 19, 94, 134, 140, 22, 3, 165, 200, 132, 195, 208, 183, 183, 101, 21, 145, 188, 143, 87, 184, 15, 86, 56, 185, 168, 194, 102, 226, 47, 52, 218, 151, 110, 226, 170, 131, 76, 176, 193, 234, 40, 6, 78, 23, 184, 74, 174, 206, 216, 162, 117, 233, 40, 39, 223, 224, 168, 94, 16, 100, 11, 30, 230, 29, 122, 179, 160, 205, 173, 67, 181, 123, 1, 212, 90, 80, 109, 11, 89, 184, 115, 98, 247, 245, 209, 181, 119, 111, 42, 19, 235, 72, 60, 206, 254, 19, 6, 233, 250, 171, 112, 134, 194, 114, 64, 82, 107, 247, 133, 114, 112, 6, 10, 140, 202, 239, 84, 214, 173, 104, 183, 126, 74, 37, 139, 245, 182, 19, 79, 226, 170, 54, 15, 230, 56, 66, 97, 203, 120, 238, 10, 132, 51, 178, 219, 222, 238, 230, 89, 91, 120, 64, 67, 249, 102, 114, 35, 157, 235, 248, 156, 150, 176, 109, 169, 3, 108, 160, 149, 10, 255, 132, 74, 9, 23, 36, 29, 237, 62, 67, 208, 173, 161, 205, 132, 198, 205, 110, 138, 134, 15, 126, 177, 132, 69, 9, 220, 60, 167, 96, 49, 105, 107, 103, 239, 72, 81, 137, 168, 27, 207, 80, 71, 24, 125, 241, 133, 237, 97, 137, 122, 65, 63, 97, 25, 115, 58, 109, 183, 203, 13, 62, 254, 248, 11, 160, 164, 100, 177, 77, 145, 248, 117, 222, 195, 195, 245, 160, 245, 167, 72, 13, 85, 146, 70, 44, 247, 196, 181, 156, 235, 51, 124, 211, 31, 247, 31, 248, 81, 162, 36, 170, 88, 148, 176, 73, 12, 184, 155, 57, 191, 126, 57, 89, 59, 28, 165, 212, 177, 6, 46, 17, 216, 52, 217, 11, 239, 208, 173, 103, 225, 29, 228, 69, 99, 87, 162, 82, 37, 52, 69, 248, 148, 19, 146, 239, 146, 143, 25, 201, 243, 214, 7, 63, 138, 237, 42, 92, 15, 240, 55, 41, 157, 178, 134, 213, 136, 217, 219, 205, 41, 198, 139, 140, 69, 169, 28, 249, 164, 39, 175, 35, 7, 42, 249, 121, 85, 27, 83, 50, 112, 115, 93, 170, 141, 186, 23, 221, 85, 33, 141, 228, 28, 253, 15, 19, 184, 118, 46, 180, 39, 230, 151, 143, 243, 159, 84, 228, 10, 252, 143, 124, 16, 187, 254, 213, 170, 133, 20, 181, 14, 219, 205, 72, 119, 226, 90, 205, 235, 175, 79, 134, 83, 135, 207, 11, 163, 30, 116, 219, 33, 43, 213, 208, 118, 226, 219, 211, 212, 76, 96, 179, 217, 213, 39, 31, 246, 128, 126, 57, 32, 57, 6, 40, 16, 216, 252, 207, 24, 214, 32, 117, 222, 211, 14, 76, 4, 49, 119, 144, 204, 167, 219, 212, 181, 46, 36, 86, 79, 137, 194, 253, 206, 198, 112, 94, 120, 173, 110, 33, 148, 204, 236, 145, 156, 27, 248, 90, 99, 87, 179, 140, 128, 168, 182, 110, 38, 219, 128, 174, 72, 27, 138, 0, 2, 239, 183, 214, 181, 187, 186, 175, 184, 87, 240, 15, 6, 171, 182, 95, 163, 166, 133, 254, 172, 215, 134, 115, 38, 160, 85, 15, 0, 73, 187, 108, 241, 162, 58, 124, 192, 186, 16, 91, 197, 3, 6, 139, 172, 84, 115, 50, 105, 20, 74, 151, 200, 164, 157, 35, 47, 137, 250, 239, 229, 238, 255, 142, 36, 156, 248, 33, 207, 92, 210, 87, 99, 152, 168, 26, 84, 173, 251, 147, 234, 94, 20, 207, 67, 73, 128, 40, 94, 127, 168, 75, 141, 240, 47, 110, 199, 222, 174, 163, 34, 5, 231, 201, 17, 161, 112, 64, 74, 135, 169, 51, 98, 238, 244, 35, 162, 108, 72, 104, 234, 52, 182, 12, 79, 87, 93, 13, 155, 176, 55, 79, 109, 111, 86, 178, 63, 143, 240, 223, 81, 132, 52, 208, 14, 164, 164, 227, 33, 122, 80, 14, 231, 255, 1, 100, 102, 24, 216, 32, 128, 36, 116, 65, 189, 5, 111, 119, 105, 85, 185, 10, 59, 148, 75, 31, 43, 94, 146, 190, 164, 9, 107, 10, 189, 153, 243, 76, 44, 87, 82, 212, 24, 113, 34, 126, 132, 179, 158, 250, 242, 177, 128, 244, 191, 187, 78, 200, 91, 252, 89, 69, 238, 22, 204, 145, 34, 107, 141, 199, 168, 102, 99, 186, 154, 235, 181, 242, 225, 59, 44, 219, 63, 193, 228, 44, 149, 178, 130, 18, 238, 36, 172, 229, 250, 223, 209, 122, 255, 220, 102, 78, 15, 123, 219, 174, 255, 196, 74, 70, 207, 5, 127, 208, 67, 113, 87, 189, 240, 97, 19, 201, 210, 211, 217, 134, 240, 165, 255, 159, 181, 43, 248, 70, 214, 28, 33, 102, 53, 161, 190, 217, 85, 1, 144, 250, 24, 143, 30, 243, 74, 117, 18, 57, 126, 42, 254, 64, 57, 41, 202, 156, 107, 234, 102, 209, 31, 253, 182, 42, 20, 106, 152, 131, 186, 130, 41, 195, 11, 166, 139, 189, 123, 75, 148, 203, 226, 214, 73, 22, 240, 186, 246, 137, 116, 198, 146, 169, 117, 92, 90, 253, 149, 165, 66, 59, 148, 203, 253, 3, 123, 29, 190, 183, 47, 73, 229, 105, 166, 190, 97, 129, 204, 155, 124, 112, 167, 5, 6, 155, 54, 176, 244, 147, 249, 136, 108, 10, 66, 225, 168, 14, 16, 16, 111, 50, 228, 80, 128, 121, 94, 37, 214, 129, 74, 35, 6, 72, 192, 65, 44, 81, 133, 130, 252, 45, 79, 112, 232, 148, 81, 105, 84, 118, 58, 176, 200, 56, 54, 8, 30, 131, 193, 200, 43, 170, 33, 10, 136, 175, 52, 183, 186, 171, 18, 77, 13, 231, 173, 208, 232, 119, 162, 148, 29, 44, 72, 88, 182, 144, 91, 177, 89, 173, 68, 14, 108, 48, 19, 152, 223, 105, 45, 115, 238, 188, 48, 75, 66, 177, 46, 155, 211, 6, 229, 42, 71, 128, 51, 80, 61, 147, 167, 111, 77, 157, 218, 131, 114, 229, 29, 136, 206, 155, 66, 203, 71, 187, 145, 227, 166, 35, 242, 229, 207, 29, 13, 163, 169, 172, 79, 7, 190, 188, 25, 66, 99, 86, 225, 69, 202, 14, 167, 41, 50, 22, 150, 214, 252, 21, 195, 22, 99, 92, 86, 29, 32, 213, 45, 183, 10, 167, 187, 36, 129, 133, 180, 18, 190, 37, 142, 108, 191, 64, 196, 33, 47, 34, 1, 120, 60, 29, 86, 134, 43, 194, 248, 75, 227, 66, 105, 37, 82, 191, 109, 31, 53, 1, 52, 143, 19, 132, 234, 31, 230, 207, 196, 204, 239, 46, 146, 163, 145, 241, 248, 166, 234, 7, 59, 47, 147, 245, 30, 247, 19, 80, 168, 37, 119, 28, 252, 32, 105, 5, 54, 144, 191, 115, 183, 242, 65, 89, 118, 149, 176, 73, 153, 241, 228, 143, 181, 213, 74, 19, 122, 180, 227, 100, 17, 228, 12, 178, 195, 237, 225, 69, 96, 82, 5, 15, 81, 241, 123, 231, 148, 142, 186, 65, 62, 226, 6, 9, 68, 6, 91, 67, 252, 162, 25, 8, 251, 6, 31, 171, 73, 188, 19, 231, 27, 191, 199, 32, 226, 163, 143, 53, 154, 205, 248, 34, 80, 40, 3, 101, 56, 109, 235, 94, 221, 102, 107, 39, 231, 9, 6, 132, 142, 170, 191, 123, 71, 144, 91, 228, 60, 152, 168, 75, 230, 72, 89, 179, 149, 2, 127, 122, 100, 74, 209, 185, 109, 223, 215, 135, 174, 196, 11, 246, 4, 15, 23, 17, 90, 42, 101, 55, 216, 192, 22, 50, 192, 240, 113, 9, 144, 143, 175, 72, 233, 131, 208, 167, 239, 94, 242, 125, 194, 114, 96, 65, 100, 45, 96, 31, 209, 234, 11, 203, 102, 178, 90, 191, 136, 211, 232, 242, 146, 48, 100, 14, 195, 241, 87, 73, 31, 180, 172, 60, 12, 233, 21, 143, 79, 124, 114, 45, 107, 147, 212, 230, 82, 105, 176, 23, 131, 145, 126, 14, 92, 80, 219, 21, 24, 146, 176, 38, 254, 87, 0, 75, 7, 14, 65, 184, 179, 203, 126, 37, 201, 74, 230, 140, 81, 236, 57, 243, 226, 92, 96, 84, 240, 114, 207, 119, 144, 169, 226, 217, 228, 214, 177, 26, 222, 17, 74, 4, 100, 45, 165, 240, 60, 182, 146, 7, 175, 157, 109, 8, 6, 250, 117, 243, 136, 30, 99, 99, 14, 193, 55, 146, 194, 0, 57, 144, 177, 12, 3, 118, 78, 152, 160, 42, 38, 182, 37, 32, 177, 154, 68, 225, 56, 13, 54, 172, 247, 109, 26, 255, 236, 196, 15, 221, 102, 247, 82, 180, 165, 35, 120, 190, 226, 209, 16, 62, 79, 233, 209, 162, 203, 93, 102, 99, 115, 118, 62, 217, 204, 33, 150, 16, 90, 104, 30, 9, 184, 44, 141, 97, 11, 55, 241, 164, 218, 69, 202, 12, 34, 1, 244, 156, 194, 251, 245, 115, 106, 73, 45, 107, 209, 44, 224, 78, 229, 131, 229, 227, 47, 131, 36, 239, 61, 12, 242, 254, 21, 213, 19, 198, 250, 218, 87, 52, 143, 128, 55, 213, 113, 220, 95, 169, 2, 191, 158, 88, 198, 113, 144, 82, 140, 231, 30, 104, 106, 225, 102, 86, 72, 130, 33, 151, 37, 85, 38, 248, 188, 145, 242, 138, 166, 61, 162, 133, 42, 62, 139, 134, 69, 68, 173, 36, 18, 58, 68, 36, 206, 191, 183, 116, 177, 32, 105, 170, 112, 7, 229, 190, 245, 162, 28, 105, 222, 192, 150, 250, 121, 194, 102, 145, 110, 247, 137, 89, 89, 1, 195, 175, 164, 161, 66, 239, 110, 193, 111, 64, 96, 19, 168, 90, 246, 35, 220, 141, 230, 205, 251, 133, 83, 152, 234, 87, 213, 250, 126, 133, 189, 209, 54, 205, 224, 240, 105, 187, 90, 42, 194, 76, 62, 163, 62, 98, 194, 251, 2, 29, 119, 126, 186, 108, 218, 171, 236, 77, 89, 240, 141, 220, 240, 240, 102, 144, 194, 66, 101, 90, 242, 219, 232, 75, 125, 248, 233, 70, 181, 33, 191, 37, 138, 216, 119, 252, 195, 12, 139, 226, 246, 204, 50, 31, 21, 50, 246, 98, 56, 213, 10, 193, 46, 66, 59, 122, 89, 162, 69, 176, 38, 83, 96, 180, 28, 249, 70, 228, 66, 181, 170, 96, 47, 225, 90, 143, 75, 17, 83, 17, 173, 183, 250, 185, 173, 42, 169, 174, 64, 184, 152, 158, 250, 137, 150, 74, 101, 206, 82, 254, 173, 14, 34, 250, 248, 202, 102, 79, 7, 15, 58, 179, 156, 217, 233, 11, 253, 1, 230, 237, 84, 90, 227, 112, 159, 230, 205, 10, 252, 59, 11, 197, 35, 67, 76, 158, 192, 252, 46, 84, 20, 35, 123, 132, 129, 27, 239, 32, 32, 196, 100, 200, 74, 138, 0, 69, 173, 144, 24, 221, 243, 59, 128, 61, 40, 224, 247, 168, 142, 167, 191, 213, 210, 217, 23, 133, 44, 169, 141, 129, 55, 121, 238, 109, 186, 140, 110, 20, 111, 0, 236, 89, 37, 5, 151, 25, 179, 108, 7, 53, 149, 220, 231, 33, 245, 227, 194, 159, 22, 40, 103, 158, 174, 109, 118, 212, 233, 123, 207, 36, 32, 200, 179, 108, 228, 115, 123, 105, 222, 146, 189, 185, 213, 220, 98, 69, 172, 148, 80, 53, 160, 149, 61, 139, 25, 186, 206, 48, 237, 20, 73, 88, 4, 196, 253, 14, 167, 129, 247, 175, 84, 176, 85, 140, 120, 15, 230, 161, 199, 31, 203, 206, 97, 18, 220, 198, 157, 239, 88, 131, 189, 207, 157, 6, 109, 218, 65, 114, 171, 192, 221, 201, 66, 228, 68, 8, 31, 98, 150, 106, 130, 227, 165, 90, 182, 101, 43, 54, 5, 67, 42, 20, 17, 15, 136, 114, 112, 12, 3, 173, 161, 73, 70, 0, 76, 124, 221, 218, 101, 78, 90, 200, 218, 2, 63, 174, 176, 21, 116, 15, 17, 52, 144, 197, 224, 119, 121, 219, 17, 204, 165, 8, 142, 35, 249, 23, 123, 1, 102, 49, 181, 68, 184, 118, 188, 7, 11, 164, 10, 43, 164, 31, 81, 74, 60, 123, 231, 136, 202, 126, 171, 71, 56, 60, 66, 243, 39, 130, 234, 35, 178, 67, 234, 231, 44, 181, 152, 167, 182, 42, 82, 17, 236, 67, 154, 142, 156, 199, 128, 85, 147, 204, 83, 26, 150, 82, 159, 150, 174, 98, 226, 183, 28, 245, 79, 217, 98, 221, 80, 60, 255, 36, 221, 170, 186, 47, 57, 124, 211, 58, 194, 45, 122, 88, 100, 11, 23, 50, 136, 116, 223, 70, 143, 167, 216, 1, 24, 149, 7, 130, 13, 190, 69, 125, 64, 145, 180, 33, 18, 235, 22, 245, 85, 219, 99, 220, 252, 125, 87, 37, 251, 102, 88, 191, 151, 44, 187, 3, 179, 20, 175, 19, 167, 83, 179, 152, 114, 187, 132, 182, 218, 184, 92, 24, 241, 213, 128, 69, 157, 201, 142, 114, 233, 125, 212, 182, 25, 212, 178, 22, 238, 179, 124, 104, 92, 8, 8, 213, 76, 146, 252, 231, 206, 96, 120, 33, 241, 240, 97, 57, 58, 171, 25, 217, 62, 81, 237, 145, 234, 71, 213, 49, 214, 17, 138, 83, 181, 176, 208, 95, 23, 88, 96, 72, 169, 193, 195, 10, 135, 125, 239, 64, 151, 92, 15, 120, 141, 122, 178, 169, 225, 138, 33, 50, 94, 138, 55, 14, 140, 93, 235, 240, 230, 51, 70, 176, 98, 22, 201, 188, 217, 253, 237, 75, 82, 137, 244, 6, 10, 173, 234, 87, 0, 73, 28, 171, 184, 167, 249, 229, 99, 153, 40, 173, 126, 67, 139, 89, 67, 218, 35, 254, 129, 102, 207, 173, 178, 86, 225, 222, 232, 175, 67, 23, 163, 99, 0, 100, 230, 228, 127, 233, 234, 136, 139, 236, 122, 51, 130, 220, 59, 46, 120, 131, 243, 142, 56, 232, 150, 54, 192, 221, 226, 47, 66, 224, 227, 112, 133, 34, 169, 118, 149, 92, 101, 105, 219, 244, 132, 246, 33, 92, 8, 137, 145, 47, 252, 129, 74, 82, 202, 82, 134, 162, 106, 118, 111, 122, 101, 185, 169, 16, 52, 99, 144, 228, 221, 253, 196, 11, 117, 186, 39, 67, 254, 137, 2, 245, 143, 145, 17, 109, 134, 117, 98, 168, 124, 97, 111, 51, 1, 170, 248, 69, 163, 233, 80, 86, 18, 36, 164, 114, 215, 121, 115, 77, 57, 19, 233, 139, 180, 14, 58, 232, 36, 64, 235, 70, 239, 15, 81, 98, 248, 15, 116, 18, 155, 78, 1, 44, 186, 219, 155, 33, 180, 112, 166, 244, 215, 129, 69, 240, 198, 151, 85, 127, 208, 190, 192, 255, 232, 157, 225, 178, 46, 141, 216, 160, 198, 87, 131, 94, 212, 170, 16, 178, 232, 60, 229, 194, 141, 135, 26, 169, 53, 111, 134, 166, 39, 115, 197, 215, 93, 112, 139, 61, 21, 67, 228, 80, 19, 123, 49, 168, 190, 186, 222, 165, 7, 30, 244, 133, 90, 207, 96, 221, 215, 53, 131, 58, 226, 32, 15, 172, 154, 142, 5, 131, 125, 231, 102, 201, 207, 220, 55, 131, 104, 116, 113, 2, 246, 240, 129, 24, 67, 232, 184, 91, 190, 105, 196, 247, 120, 213, 217, 33, 147, 129, 141, 45, 158, 90, 142, 150, 51, 186, 109, 223, 191, 210, 230, 3, 124, 88, 81, 249, 38, 102, 151, 39, 129, 25, 52, 98, 204, 204, 85, 184, 4, 117, 99, 91, 40, 129, 207, 201, 42, 164, 190, 237, 167, 61, 51, 215, 116, 12, 28, 4, 23, 172, 253, 98, 80, 164, 72, 44, 231, 226, 181, 248, 66, 24, 65, 228, 150, 68, 183, 124, 220, 233, 148, 186, 135, 169, 180, 48, 170, 79, 155, 43, 93, 232, 78, 88, 22, 187, 248, 100, 209, 130, 51, 53, 249, 247, 44, 67, 151, 161, 70, 49, 121, 89, 50, 32, 231, 107, 36, 19, 119, 224, 28, 229, 185, 192, 23, 179, 230, 12, 58, 247, 140, 117, 72, 243, 138, 180, 119, 209, 65, 53, 100, 154, 255, 199, 92, 143, 45, 151, 97, 180, 100, 98, 96, 42, 127, 22, 82, 20, 31, 91, 166, 142, 152, 190, 178, 178, 82, 193, 166, 13, 140, 2, 199, 90, 68, 173, 184, 56, 67, 166, 59, 193, 183, 224, 79, 59, 87, 117, 24, 2, 232, 91, 117, 235, 181, 74, 32, 144, 71, 179, 9, 17, 37, 173, 136, 118, 171, 236, 215, 134, 123, 193, 80, 204, 30, 112, 239, 120, 197, 130, 64, 241, 76, 57, 151, 169, 56, 44, 207, 73, 213, 232, 125, 56, 222, 87, 185, 91, 64, 221, 229, 28, 222, 182, 160, 200, 108, 125, 141, 94, 145, 21, 14, 4, 10, 7, 134, 161, 203, 217, 92, 90, 141, 111, 137, 74, 208, 176, 33, 145, 44, 65, 143, 233, 178, 27, 241, 94, 85, 10, 208, 29, 191, 225, 128, 250, 120, 164, 111, 139, 92, 66, 131, 49, 66, 142, 115, 14, 195, 101, 178, 19, 9, 108, 27, 112, 47, 56, 25, 244, 163, 248, 140, 179, 211, 136, 213, 136, 92, 169, 125, 186, 255, 67, 46, 101, 168, 18, 18, 114, 157, 60, 75, 190, 224, 15, 48, 80, 24, 243, 46, 243, 47, 194, 197, 53, 233, 74, 168, 252, 67, 39, 236, 192, 144, 239, 62, 242, 48, 192, 1, 73, 209, 234, 170, 120, 139, 65, 217, 77, 154, 215, 174, 18, 88, 132, 24, 5, 7, 142, 17, 216, 219, 2, 201, 171, 156, 66, 189, 107, 78, 25, 13, 170, 225, 246, 137, 67, 221, 227, 155, 22, 87, 62, 67, 230, 82, 130, 153, 204, 27, 160, 183, 154, 96, 202, 226, 76, 229, 30, 30, 87, 135, 124, 73, 153, 12, 82, 66, 87, 249, 189, 139, 126, 70, 251, 248, 165, 2, 103, 164, 82, 3, 66, 1, 191, 3, 122, 106, 13, 0, 114, 94, 154, 221, 27, 92, 160, 176, 196, 201, 45, 243, 213, 94, 213, 180, 208, 9, 245, 101, 110, 108, 4, 114, 182, 65, 72, 96, 30, 94, 63, 99, 148, 75, 146, 58, 159, 96, 139, 167, 237, 194, 21, 219, 199, 92, 235, 110, 215, 80, 173, 192, 137, 175, 99, 230, 174, 60, 166, 24, 110, 153, 215, 61, 3, 181, 197, 231, 130, 75, 232, 169, 138, 76, 197, 127, 108, 108, 187, 74, 96, 128, 238, 44, 233, 39, 175, 61, 95, 251, 7, 115, 155, 185, 115, 144, 72, 145, 95, 116, 165, 78, 219, 9, 67, 45, 44, 137, 255, 186, 140, 91, 26, 89, 232, 31, 77, 172, 103, 163, 77, 65, 193, 93, 238, 74, 116, 131, 190, 157, 170, 111, 237, 158, 253, 88, 17, 89, 31, 93, 21, 196, 243, 148, 65, 132, 46, 212, 213, 111, 77, 56, 68, 120, 232, 128, 207, 175, 88, 155, 250, 113, 147, 83, 87, 143, 28, 0, 238, 222, 72, 161, 156, 125, 239, 15, 51, 152, 124, 6, 162, 77, 82, 216, 15, 235, 218, 173, 202, 85, 41, 100, 97, 17, 136, 55, 133, 105, 237, 188, 102, 39, 92, 29, 135, 42, 65, 42, 46, 137, 181, 50, 71, 145, 66, 121, 225, 225, 226, 188, 13, 11, 228, 149, 13, 222, 212, 218, 116, 192, 0, 27, 131, 84, 32, 190, 155, 192, 139, 91, 139, 169, 120, 146, 240, 55, 202, 236, 120, 28, 64, 249, 244, 248, 207, 68, 109, 204, 79, 165, 237, 244, 206, 114, 173, 69, 68, 128, 157, 214, 217, 18, 171, 24, 189, 61, 145, 136, 239, 99, 84, 151, 30, 144, 249, 149, 125, 217, 51, 109, 29, 226, 252, 252, 0, 234, 25, 62, 33, 196, 194, 215, 188, 250, 121, 32, 173, 163, 178, 94, 212, 191, 202, 159, 231, 100, 82, 84, 172, 223, 223, 67, 162, 69, 109, 23, 67, 101, 91, 21, 237, 161, 19, 9, 35, 247, 197, 137, 190, 182, 41, 52, 102, 178, 139, 179, 88, 43, 143, 9, 244, 171, 142, 111, 50, 249, 49, 166, 64, 52, 133, 19, 135, 197, 4, 106, 8, 199, 21, 81, 37, 140, 249, 147, 175, 230, 206, 35, 67, 28, 112, 84, 93, 138, 42, 236, 127, 83, 232, 24, 251, 249, 247, 229, 136, 199, 131, 181, 3, 187, 153, 185, 48, 91, 146, 110, 193, 204, 236, 242, 167, 250, 228, 144, 50, 10, 175, 112, 152, 68, 71, 52, 120, 243, 134, 250, 217, 100, 0, 57, 104, 166, 12, 98, 147, 32, 10, 249, 248, 76, 224, 60, 0, 195, 200, 181, 57, 170, 54, 75, 103, 209, 141, 111, 61, 71, 112, 247, 192, 215, 115, 129, 100, 196, 54, 66, 220, 80, 186, 48, 69, 104, 113, 54, 234, 213, 151, 15, 93, 227, 146, 153, 237, 120, 114, 25, 102, 138, 248, 253, 245, 13, 195, 211, 117, 118, 36, 112, 130, 214, 120, 20, 87, 61, 128, 106, 185, 112, 104, 235, 231, 230, 15, 199, 111, 182, 134, 114, 176, 216, 246, 51, 196, 52, 180, 215, 88, 181, 18, 122, 241, 141, 60, 172, 95, 176, 32, 234, 240, 193, 4, 158, 46, 242, 137, 101, 255, 211, 63, 37, 174, 34, 15, 226, 83, 205, 33, 64, 21, 37, 58, 34, 185, 199, 139, 165, 150, 177, 49, 24, 102, 89, 137, 166, 12, 172, 250, 182, 172, 241, 51, 60, 102, 179, 165, 205, 112, 103, 68, 68, 51, 226, 6, 193, 251, 95, 250, 225, 106, 105, 47, 87, 207, 9, 179, 223, 216, 249, 67, 19, 241, 39, 182, 13, 237, 98, 171, 211, 29, 106, 52, 54, 33, 64, 32, 191, 112, 147, 53, 138, 30, 147, 140, 0, 172, 220, 249, 171, 162, 223, 139, 49, 106, 199, 219, 122, 154, 240, 4, 131, 59, 186, 106, 230, 13, 146, 247, 68, 204, 8, 92, 227, 57, 39, 124, 202, 178, 174, 178, 120, 201, 80, 72, 24, 95, 52, 101, 80, 161, 115, 252, 219, 123, 82, 254, 79, 85, 233, 103, 191, 86, 83, 226, 61, 46, 11, 170, 28, 169, 255, 55, 221, 156, 187, 148, 26, 109, 34, 83, 116, 227, 252, 62, 217, 121, 222, 99, 242, 123, 106, 101, 100, 177, 19, 157, 100, 5, 114, 246, 153, 17, 142, 142, 254, 216, 240, 127, 37, 121, 240, 14, 198, 46, 6, 232, 148, 50, 74, 39, 48, 176, 186, 209, 109, 94, 21, 105, 169, 219, 60, 12, 52, 80, 150, 22, 22, 131, 107, 139, 26, 203, 123, 185, 42, 28, 96, 165, 117, 209, 190, 94, 97, 71, 129, 48, 248, 35, 226, 19, 211, 208, 222, 85, 140, 24, 163, 228, 229, 214, 16, 58, 64, 2, 107, 3, 129, 214, 0, 211, 234, 81, 0, 173, 103, 51, 44, 248, 97, 25, 167, 162, 118, 21, 100, 143, 152, 166, 223, 93, 85, 122, 222, 192, 101, 207, 166, 23, 58, 171, 143, 135, 201, 72, 84, 119, 178, 145, 143, 239, 49, 38, 89, 82, 161, 208, 48, 25, 177, 35, 28, 249, 10, 227, 156, 237, 129, 236, 144, 85, 22, 44, 67, 166, 185, 227, 190, 142, 189, 30, 191, 92, 44, 100, 6, 155, 161, 228, 49, 233, 232, 131, 216, 74, 64, 125, 116, 12, 155, 55, 21, 235, 88, 136, 89, 133, 213, 205, 147, 75, 255, 111, 213, 85, 206, 26, 248, 183, 122, 225, 121, 68, 66, 204, 91, 175, 56, 189, 74, 75, 89, 161, 148, 197, 150, 169, 18, 5, 251, 186, 186, 211, 89, 69, 131, 93, 69, 133, 74, 11, 203, 165, 46, 91, 77, 97, 54, 84, 93, 73, 173, 63, 186, 79, 83, 36, 220, 43, 85, 194, 121, 177, 25, 4, 176, 45, 113, 60, 240, 124, 28, 160, 135, 67, 109, 107, 232, 183, 121, 223, 245, 241, 108, 179, 87, 172, 147, 26, 22, 16, 172, 227, 212, 2, 77, 204, 129, 184, 64, 151, 255, 65, 39, 255, 87, 151, 181, 31, 120, 47, 149, 225, 224, 113, 99, 229, 249, 170, 236, 31, 249, 85, 69, 234, 178, 235, 35, 141, 111, 195, 198, 118, 241, 52, 48, 117, 157, 201, 150, 197, 178, 5, 152, 145, 253, 31, 114, 9, 159, 212, 59, 16, 55, 162, 212, 54, 79, 50, 244, 159, 47, 51, 95, 228, 119, 111, 83, 83, 234, 49, 191, 81, 35, 251, 25, 9, 181, 139, 135, 205, 138, 77, 42, 25, 193, 200, 23, 27, 95, 16, 78, 238, 161, 253, 161, 1, 63, 2, 92, 1, 205, 23, 195, 93, 223, 63, 21, 224, 39, 30, 150, 56, 108, 11, 164, 199, 54, 199, 40, 234, 95, 57, 138, 206, 46, 249, 83, 46, 157, 209, 3, 189, 183, 132, 171, 106, 157, 197, 85, 196, 228, 189, 210, 236, 253, 197, 117, 63, 162, 246, 182, 150, 21, 144, 8, 57, 173, 134, 104, 122, 192, 11, 240, 107, 208, 171, 203, 217, 101, 4, 138, 42, 22, 158, 107, 241, 172, 231, 175, 40, 4, 210, 157, 157, 204, 132, 69, 18, 79, 241, 112, 123, 226, 99, 46, 211, 240, 21, 91, 0, 245, 39, 118, 232, 0, 236, 133, 17, 230, 229, 152, 230, 76, 241, 211, 171, 99, 243, 241, 5, 230, 50, 114, 106, 74, 116, 251, 213, 80, 217, 188, 155, 244, 201, 113, 192, 170, 162, 175, 16, 220, 128, 11, 204, 89, 176, 233, 110, 154, 32, 243, 185, 5, 223, 98, 212, 58, 240, 90, 166, 113, 131, 155, 147, 5, 83, 39], + [239, 74, 104, 191, 56, 46, 113, 24, 79, 199, 120, 167, 168, 170, 164, 72, 16, 43, 228, 88, 182, 76, 190, 41, 187, 164, 73, 223, 19, 200, 173, 116, 92, 1, 111, 89, 201, 183, 153, 137, 212, 111, 153, 224, 216, 48, 252, 42, 201, 4, 117, 26, 176, 109, 205, 59, 250, 157, 148, 71, 155, 77, 2, 68, 232, 93, 109, 11, 68, 12, 61, 176, 133, 97, 111, 201, 181, 91, 143, 52, 77, 209, 185, 182, 228, 36, 223, 152, 151, 123, 184, 138, 103, 201, 216, 159, 218, 189, 37, 84, 202, 239, 198, 124, 164, 157, 56, 223, 201, 210, 65, 4, 187, 220, 204, 215, 117, 181, 103, 9, 62, 222, 250, 168, 27, 177, 193, 218, 108, 208, 149, 135, 241, 106, 236, 48, 227, 45, 227, 34, 217, 216, 239, 38, 237, 187, 59, 127, 136, 12, 131, 43, 34, 160, 130, 37, 158, 255, 141, 206, 123, 206, 141, 191, 14, 5, 113, 159, 199, 159, 31, 122, 151, 41, 90, 16, 218, 80, 137, 245, 99, 188, 97, 37, 62, 144, 251, 201, 46, 199, 223, 214, 60, 40, 46, 132, 157, 43, 241, 145, 177, 80, 149, 190, 200, 219, 51, 131, 189, 83, 200, 19, 107, 253, 172, 11, 103, 47, 200, 177, 9, 84, 253, 178, 252, 79, 184, 53, 140, 76, 138, 206, 55, 208, 111, 47, 127, 72, 236, 215, 226, 52, 217, 81, 3, 22, 251, 248, 58, 181, 159, 10, 144, 175, 254, 106, 228, 32, 88, 185, 195, 18, 31, 104, 16, 244, 48, 211, 16, 193, 237, 168, 86, 19, 61, 178, 215, 246, 103, 146, 246, 211, 245, 1, 179, 129, 60, 246, 142, 32, 180, 134, 87, 105, 43, 154, 38, 182, 130, 131, 112, 43, 217, 36, 127, 41, 78, 248, 249, 94, 122, 217, 51, 101, 91, 178, 115, 116, 180, 238, 167, 11, 203, 102, 236, 118, 237, 126, 83, 101, 247, 16, 110, 5, 112, 111, 118, 22, 234, 96, 150, 124, 19, 122, 31, 162, 205, 108, 252, 110, 212, 14, 3, 134, 46, 82, 22, 31, 184, 90, 35, 130, 41, 178, 66, 93, 119, 197, 109, 127, 77, 37, 142, 29, 44, 93, 138, 155, 248, 217, 205, 3, 34, 215, 211, 66, 202, 112, 193, 199, 79, 116, 50, 31, 112, 19, 241, 231, 58, 146, 40, 88, 57, 16, 75, 190, 86, 75, 58, 68, 148, 42, 169, 175, 143, 111, 142, 12, 58, 163, 31, 249, 87, 149, 179, 174, 238, 46, 208, 51, 67, 87, 225, 45, 109, 108, 57, 98, 196, 77, 255, 189, 219, 0, 90, 77, 134, 5, 35, 179, 122, 6, 26, 177, 245, 172, 83, 87, 232, 69, 64, 31, 179, 74, 249, 86, 205, 129, 5, 138, 233, 227, 78, 18, 183, 23, 236, 148, 26, 135, 53, 224, 96, 141, 8, 12, 12, 126, 182, 12, 17, 217, 248, 51, 181, 49, 213, 162, 233, 92, 254, 131, 77, 34, 174, 111, 177, 77, 134, 72, 249, 53, 133, 164, 179, 44, 193, 253, 45, 36, 189, 252, 136, 48, 230, 97, 57, 173, 185, 96, 57, 175, 160, 3, 158, 95, 95, 131, 109, 62, 239, 241, 90, 111, 2, 180, 97, 86, 24, 87, 75, 196, 205, 107, 55, 25, 122, 218, 110, 217, 87, 21, 1, 26, 255, 190, 21, 32, 235, 148, 247, 13, 194, 177, 162, 253, 233, 121, 50, 237, 179, 191, 88, 224, 218, 202, 10, 184, 28, 255, 39, 232, 166, 136, 220, 15, 33, 55, 173, 127, 13, 18, 141, 187, 22, 4, 143, 127, 202, 71, 96, 77, 65, 233, 120, 8, 118, 92, 46, 247, 204, 143, 214, 127, 60, 76, 97, 155, 171, 165, 33, 142, 97, 196, 59, 248, 235, 32, 52, 225, 75, 167, 118, 36, 240, 153, 213, 82, 136, 236, 167, 82, 124, 105, 69, 86, 143, 78, 187, 152, 195, 38, 212, 221, 132, 201, 255, 21, 241, 49, 52, 239, 171, 176, 111, 248, 255, 57, 153, 192, 217, 84, 107, 46, 176, 71, 105, 24, 243, 4, 112, 156, 125, 201, 129, 177, 106, 162, 64, 107, 64, 187, 80, 64, 199, 97, 147, 20, 204, 11, 84, 24, 84, 95, 245, 99, 187, 255, 88, 211, 189, 238, 109, 124, 133, 185, 45, 253, 103, 181, 68, 110, 184, 88, 218, 216, 18, 64, 84, 149, 245, 185, 113, 103, 166, 73, 212, 218, 155, 181, 184, 207, 23, 221, 3, 210, 115, 184, 71, 104, 118, 249, 179, 206, 171, 149, 132, 102, 46, 133, 112, 66, 26, 14, 248, 74, 155, 54, 99, 92, 123, 15, 177, 193, 211, 230, 37, 129, 16, 97, 98, 199, 97, 25, 93, 168, 213, 162, 29, 215, 198, 44, 123, 117, 57, 209, 211, 33, 1, 31, 86, 44, 207, 233, 5, 245, 244, 4, 128, 28, 168, 5, 217, 132, 199, 181, 121, 227, 36, 61, 194, 218, 125, 66, 117, 254, 32, 223, 1, 137, 65, 17, 117, 120, 155, 141, 173, 218, 75, 13, 16, 9, 16, 22, 123, 46, 225, 239, 15, 165, 12, 194, 58, 180, 179, 164, 2, 89, 201, 117, 219, 141, 65, 139, 129, 251, 179, 139, 199, 188, 119, 94, 64, 37, 167, 83, 111, 99, 41, 43, 51, 135, 153, 198, 152, 10, 41, 132, 42, 189, 215, 200, 217, 6, 177, 226, 233, 183, 241, 31, 98, 252, 220, 253, 204, 177, 142, 8, 61, 226, 36, 29, 69, 89, 79, 231, 12, 143, 34, 28, 50, 233, 111, 210, 247, 177, 50, 254, 184, 37, 247, 140, 234, 205, 7, 196, 28, 24, 117, 205, 169, 124, 10, 143, 197, 245, 213, 96, 121, 110, 43, 127, 109, 148, 39, 178, 86, 48, 82, 186, 123, 51, 170, 180, 53, 48, 212, 224, 8, 102, 70, 82, 48, 213, 183, 149, 103, 135, 195, 243, 80, 56, 194, 93, 216, 203, 41, 29, 87, 57, 37, 126, 163, 241, 253, 108, 37, 65, 158, 248, 68, 164, 34, 251, 12, 125, 159, 247, 186, 176, 111, 139, 206, 245, 212, 142, 126, 125, 63, 190, 41, 183, 184, 105, 195, 24, 189, 113, 16, 138, 164, 52, 88, 78, 151, 252, 41, 179, 156, 153, 198, 87, 130, 60, 85, 252, 124, 55, 155, 238, 187, 140, 82, 105, 177, 5, 105, 206, 103, 144, 217, 35, 18, 183, 156, 82, 44, 242, 250, 249, 203, 79, 96, 12, 163, 22, 61, 21, 90, 52, 154, 8, 139, 100, 222, 70, 250, 80, 127, 180, 149, 103, 60, 141, 42, 7, 17, 242, 147, 226, 123, 227, 248, 253, 138, 186, 89, 123, 29, 221, 149, 58, 108, 92, 33, 75, 98, 88, 234, 78, 58, 201, 93, 21, 188, 105, 62, 146, 171, 209, 86, 200, 79, 0, 71, 242, 175, 212, 41, 177, 180, 80, 55, 61, 192, 184, 100, 84, 141, 196, 253, 6, 207, 200, 61, 193, 209, 1, 252, 164, 198, 68, 22, 129, 204, 73, 200, 1, 12, 182, 63, 154, 104, 192, 193, 70, 133, 212, 4, 176, 53, 242, 208, 201, 62, 58, 128, 129, 145, 107, 54, 128, 92, 28, 54, 2, 3, 119, 8, 127, 219, 92, 186, 136, 217, 120, 248, 15, 6, 72, 63, 68, 31, 49, 116, 224, 38, 157, 102, 173, 233, 20, 17, 222, 36, 243, 233, 38, 182, 240, 162, 88, 161, 18, 205, 208, 154, 240, 112, 171, 83, 186, 23, 91, 182, 159, 52, 104, 76, 108, 141, 42, 73, 12, 16, 247, 122, 231, 179, 207, 166, 24, 158, 165, 49, 215, 167, 204, 136, 234, 253, 18, 41, 190, 33, 225, 169, 247, 126, 105, 109, 155, 216, 226, 68, 241, 33, 67, 114, 0, 23, 108, 63, 137, 28, 151, 162, 143, 105, 171, 13, 95, 62, 140, 92, 130, 146, 37, 18, 69, 73, 127, 240, 215, 97, 66, 174, 144, 222, 166, 105, 37, 242, 15, 178, 172, 52, 0, 120, 255, 46, 207, 153, 66, 45, 175, 233, 62, 148, 220, 1, 212, 25, 14, 214, 214, 149, 58, 221, 30, 110, 237, 5, 60, 16, 243, 158, 232, 141, 157, 139, 167, 152, 55, 177, 17, 238, 139, 194, 33, 37, 175, 146, 181, 21, 44, 30, 219, 201, 197, 50, 68, 150, 236, 18, 238, 146, 78, 42, 93, 54, 49, 53, 144, 211, 226, 161, 155, 88, 108, 40, 49, 155, 96, 150, 140, 213, 2, 112, 21, 150, 212, 129, 152, 3, 90, 177, 115, 181, 2, 192, 93, 124, 143, 43, 47, 154, 176, 175, 246, 99, 157, 239, 220, 202, 56, 137, 135, 122, 119, 74, 118, 118, 160, 182, 57, 78, 159, 218, 97, 81, 93, 156, 99, 137, 168, 236, 169, 197, 149, 9, 104, 195, 166, 14, 115, 71, 86, 142, 166, 228, 17, 44, 93, 20, 133, 98, 93, 219, 148, 95, 154, 28, 87, 109, 28, 104, 50, 115, 115, 138, 5, 79, 185, 159, 109, 128, 230, 181, 139, 67, 173, 233, 22, 136, 61, 19, 149, 174, 4, 0, 194, 128, 169, 125, 70, 136, 230, 125, 85, 240, 194, 82, 173, 240, 180, 134, 63, 26, 26, 22, 104, 213, 130, 88, 145, 124, 207, 47, 16, 105, 25, 196, 79, 84, 65, 27, 201, 96, 143, 180, 97, 149, 104, 103, 244, 251, 207, 155, 219, 235, 197, 70, 181, 254, 37, 234, 140, 232, 228, 167, 95, 1, 3, 44, 203, 34, 57, 77, 165, 144, 24, 107, 253, 153, 57, 84, 235, 226, 172, 212, 40, 35, 195, 46, 197, 88, 137, 2, 237, 65, 165, 235, 107, 32, 87, 59, 5, 159, 2, 76, 255, 220, 197, 147, 241, 154, 129, 159, 172, 27, 82, 252, 226, 174, 129, 145, 117, 139, 36, 17, 204, 126, 233, 248, 48, 58, 134, 156, 139, 192, 213, 136, 241, 26, 184, 174, 235, 21, 44, 181, 17, 13, 170, 199, 69, 45, 220, 116, 28, 243, 122, 221, 174, 63, 98, 182, 170, 146, 35, 142, 89, 254, 227, 46, 125, 245, 27, 57, 8, 220, 118, 103, 120, 252, 243, 216, 229, 195, 164, 9, 131, 151, 202, 56, 22, 87, 60, 81, 87, 84, 134, 140, 174, 160, 220, 209, 16, 36, 198, 24, 92, 47, 248, 111, 156, 124, 82, 85, 189, 124, 192, 215, 228, 112, 17, 221, 1, 143, 25, 171, 215, 89, 148, 9, 157, 210, 55, 185, 128, 222, 39, 215, 222, 84, 233, 252, 223, 139, 144, 144, 247, 189, 73, 6, 182, 168, 200, 140, 79, 47, 148, 234, 9, 63, 215, 92, 9, 103, 48, 216, 191, 195, 97, 30, 198, 172, 65, 232, 59, 212, 121, 147, 126, 43, 35, 37, 125, 184, 234, 207, 11, 174, 126, 116, 15, 123, 96, 217, 112, 58, 31, 42, 154, 221, 244, 2, 50, 45, 10, 222, 109, 215, 29, 52, 166, 186, 201, 203, 162, 180, 119, 139, 84, 140, 229, 207, 44, 236, 195, 102, 90, 43, 219, 193, 238, 15, 6, 114, 32, 207, 159, 228, 26, 255, 247, 34, 22, 63, 94, 77, 203, 111, 46, 83, 24, 112, 7, 211, 104, 85, 190, 218, 151, 178, 129, 119, 147, 212, 69, 112, 19, 190, 1, 184, 36, 221, 189, 4, 70, 162, 231, 148, 166, 114, 155, 139, 45, 26, 225, 221, 154, 67, 15, 17, 189, 17, 39, 41, 18, 39, 195, 130, 227, 55, 3, 166, 172, 255, 36, 223, 98, 124, 185, 136, 110, 57, 74, 255, 141, 187, 126, 22, 251, 244, 189, 37, 58, 151, 185, 171, 76, 122, 112, 99, 77, 157, 79, 159, 54, 151, 189, 101, 61, 117, 20, 188, 121, 243, 80, 167, 192, 119, 157, 115, 105, 172, 10, 19, 129, 7, 30, 20, 77, 165, 92, 139, 36, 152, 91, 223, 141, 0, 172, 151, 23, 75, 156, 221, 91, 94, 30, 207, 102, 84, 153, 15, 36, 72, 35, 221, 148, 232, 77, 221, 99, 74, 56, 172, 225, 199, 75, 47, 55, 176, 252, 245, 47, 201, 182, 148, 135, 68, 194, 217, 180, 87, 217, 4, 3, 165, 76, 96, 166, 153, 26, 77, 47, 123, 68, 167, 215, 180, 211, 8, 120, 92, 157, 62, 174, 211, 72, 176, 110, 135, 237, 38, 189, 136, 68, 157, 218, 130, 12, 201, 162, 189, 9, 21, 218, 89, 94, 32, 76, 90, 230, 252, 119, 140, 228, 207, 57, 242, 26, 69, 7, 171, 146, 115, 231, 35, 206, 124, 204, 158, 119, 178, 162, 94, 171, 75, 163, 25, 71, 252, 69, 217, 251, 242, 105, 81, 69, 77, 64, 209, 94, 5, 82, 162, 139, 193, 158, 8, 100, 242, 133, 226, 15, 35, 75, 164, 36, 115, 112, 47, 41, 237, 87, 237, 35, 243, 169, 114, 203, 96, 23, 20, 64, 11, 54, 149, 128, 219, 20, 94, 4, 8, 59, 54, 13, 5, 108, 27, 112, 157, 73, 39, 64, 238, 209, 5, 206, 85, 201, 79, 252, 137, 59, 192, 241, 208, 177, 31, 113, 177, 227, 221, 131, 158, 104, 152, 49, 94, 26, 102, 155, 53, 70, 21, 91, 9, 92, 197, 212, 240, 188, 102, 176, 69, 186, 38, 21, 107, 95, 174, 118, 68, 182, 94, 110, 195, 95, 79, 35, 247, 91, 234, 151, 90, 209, 121, 93, 11, 41, 5, 144, 47, 52, 51, 125, 42, 252, 119, 157, 243, 103, 84, 41, 22, 90, 103, 178, 28, 98, 55, 162, 22, 162, 195, 43, 178, 188, 138, 112, 22, 52, 12, 150, 19, 96, 2, 161, 167, 189, 170, 122, 244, 101, 108, 124, 5, 16, 182, 99, 110, 102, 11, 195, 225, 148, 107, 197, 224, 42, 164, 128, 34, 241, 11, 90, 176, 183, 137, 160, 237, 16, 142, 122, 26, 109, 101, 198, 96, 24, 45, 150, 206, 84, 102, 168, 245, 213, 13, 205, 96, 149, 100, 72, 127, 166, 104, 9, 208, 216, 240, 25, 248, 234, 174, 206, 5, 238, 21, 232, 124, 63, 174, 253, 150, 207, 6, 117, 55, 147, 172, 71, 106, 147, 155, 70, 1, 34, 190, 221, 1, 24, 105, 87, 132, 130, 164, 73, 57, 210, 178, 213, 129, 184, 59, 195, 232, 138, 54, 105, 87, 2, 20, 97, 41, 238, 91, 17, 25, 171, 30, 33, 106, 48, 4, 181, 220, 87, 152, 246, 70, 235, 134, 20, 196, 84, 244, 59, 48, 243, 106, 206, 163, 182, 77, 139, 93, 41, 203, 175, 88, 168, 185, 236, 157, 106, 84, 20, 68, 128, 139, 53, 28, 36, 18, 62, 114, 150, 120, 80, 163, 78, 236, 188, 65, 55, 54, 18, 106, 18, 49, 42, 15, 198, 247, 127, 44, 64, 83, 228, 220, 184, 135, 228, 125, 138, 238, 107, 75, 31, 149, 100, 243, 40, 199, 124, 149, 66, 21, 127, 57, 213, 218, 70, 18, 192, 110, 252, 27, 6, 46, 211, 96, 85, 172, 159, 174, 138, 20, 18, 84, 72, 77, 104, 23, 154, 27, 14, 250, 65, 50, 19, 137, 182, 231, 196, 136, 238, 90, 105, 19, 104, 43, 226, 192, 34, 150, 184, 7, 202, 97, 185, 138, 44, 126, 238, 20, 234, 156, 24, 104, 155, 204, 28, 198, 176, 40, 122, 6, 161, 210, 126, 81, 143, 249, 143, 14, 43, 19, 56, 16, 105, 34, 241, 15, 120, 210, 66, 40, 195, 226, 144, 98, 158, 238, 197, 193, 28, 152, 91, 252, 110, 78, 255, 29, 75, 74, 15, 215, 95, 114, 97, 191, 86, 73, 100, 206, 100, 97, 233, 157, 126, 178, 50, 180, 12, 218, 178, 11, 189, 29, 132, 120, 80, 101, 16, 57, 186, 150, 206, 54, 0, 48, 70, 184, 113, 65, 10, 168, 142, 117, 119, 200, 197, 128, 40, 227, 12, 143, 248, 140, 157, 38, 126, 39, 216, 121, 114, 26, 225, 53, 127, 146, 20, 233, 106, 92, 166, 141, 216, 46, 134, 178, 115, 12, 74, 95, 254, 232, 129, 237, 108, 126, 99, 14, 225, 160, 49, 239, 54, 241, 47, 148, 17, 57, 61, 85, 71, 118, 89, 74, 26, 115, 45, 151, 178, 148, 15, 75, 89, 63, 56, 162, 28, 231, 91, 55, 237, 123, 172, 97, 17, 10, 238, 91, 255, 17, 178, 46, 254, 33, 41, 166, 192, 154, 120, 188, 243, 29, 175, 169, 11, 102, 194, 189, 32, 192, 179, 122, 188, 246, 33, 111, 8, 91, 134, 242, 229, 185, 76, 229, 252, 119, 86, 51, 67, 47, 130, 37, 83, 254, 202, 107, 193, 143, 125, 181, 68, 136, 155, 196, 122, 184, 47, 146, 148, 53, 89, 160, 29, 187, 228, 218, 238, 254, 249, 125, 20, 68, 166, 152, 229, 87, 78, 112, 44, 250, 169, 103, 61, 147, 226, 38, 120, 106, 188, 121, 58, 118, 229, 109, 168, 210, 6, 161, 191, 64, 16, 37, 251, 203, 5, 1, 57, 245, 2, 163, 90, 200, 12, 230, 167, 4, 209, 196, 142, 35, 45, 190, 191, 69, 93, 56, 138, 4, 196, 180, 30, 86, 154, 180, 166, 237, 188, 32, 207, 15, 75, 251, 76, 79, 137, 226, 251, 194, 55, 177, 168, 244, 52, 230, 197, 63, 207, 146, 114, 167, 216, 24, 12, 89, 57, 56, 107, 87, 162, 225, 158, 180, 26, 65, 131, 206, 250, 12, 90, 231, 234, 150, 72, 233, 191, 248, 194, 212, 209, 72, 129, 100, 222, 44, 5, 122, 171, 30, 27, 152, 133, 228, 70, 153, 97, 67, 173, 219, 237, 218, 134, 60, 90, 109, 37, 45, 146, 178, 142, 86, 179, 29, 196, 15, 252, 190, 242, 230, 210, 91, 171, 43, 233, 31, 168, 69, 135, 175, 93, 173, 202, 154, 254, 48, 212, 178, 120, 167, 234, 36, 204, 179, 28, 170, 158, 61, 30, 152, 72, 218, 197, 55, 245, 132, 127, 72, 14, 235, 205, 169, 178, 184, 163, 244, 171, 187, 185, 152, 175, 32, 63, 156, 35, 95, 174, 225, 156, 222, 16, 55, 60, 210, 119, 41, 95, 122, 230, 32, 113, 245, 128, 37, 73, 117, 241, 231, 94, 96, 126, 154, 183, 113, 29, 80, 80, 104, 129, 251, 104, 47, 239, 226, 110, 216, 131, 198, 17, 48, 194, 21, 228, 65, 97, 50, 131, 214, 239, 119, 239, 176, 41, 6, 110, 222, 118, 102, 169, 157, 137, 136, 233, 232, 219, 136, 7, 162, 106, 1, 73, 94, 231, 71, 167, 44, 226, 36, 5, 32, 221, 16, 169, 114, 111, 50, 140, 155, 82, 214, 156, 205, 128, 85, 125, 174, 9, 92, 228, 95, 244, 121, 152, 73, 138, 253, 175, 51, 44, 228, 142, 61, 186, 23, 125, 189, 54, 113, 43, 140, 76, 178, 152, 171, 33, 151, 0, 33, 88, 237, 254, 14, 203, 234, 181, 119, 6, 170, 199, 138, 7, 74, 17, 17, 85, 81, 22, 42, 212, 159, 179, 93, 159, 160, 94, 60, 22, 124, 3, 123, 213, 20, 181, 42, 237, 231, 235, 122, 18, 228, 44, 249, 136, 91, 1, 193, 124, 181, 87, 216, 166, 219, 224, 180, 200, 209, 176, 234, 236, 238, 83, 65, 105, 165, 103, 218, 114, 241, 196, 184, 155, 65, 250, 58, 98, 70, 97, 8, 76, 122, 251, 32, 234, 147, 30, 148, 105, 221, 48, 45, 248, 203, 67, 69, 224, 201, 216, 231, 145, 112, 202, 76, 198, 223, 141, 36, 237, 187, 44, 19, 153, 88, 242, 245, 156, 214, 54, 172, 4, 151, 35, 56, 217, 167, 178, 168, 173, 13, 177, 115, 66, 239, 141, 184, 22, 156, 5, 135, 148, 19, 120, 76, 133, 35, 96, 178, 110, 58, 228, 213, 134, 127, 95, 197, 123, 98, 132, 207, 142, 198, 234, 46, 224, 181, 37, 55, 245, 120, 99, 173, 89, 128, 0, 23, 213, 42, 129, 61, 195, 117, 219, 179, 30, 243, 208, 183, 75, 59, 90, 107, 195, 93, 76, 4, 88, 134, 6, 130, 225, 112, 140, 15, 61, 223, 41, 58, 252, 213, 18, 198, 211, 91, 213, 23, 181, 12, 228, 253, 253, 95, 8, 10, 219, 157, 49, 210, 95, 7, 51, 8, 246, 45, 111, 91, 169, 136, 188, 221, 39, 195, 60, 96, 68, 9, 207, 253, 84, 229, 103, 90, 151, 202, 169, 110, 69, 235, 92, 160, 210, 38, 255, 70, 232, 134, 140, 211, 41, 39, 16, 117, 147, 96, 61, 146, 52, 113, 104, 121, 206, 218, 189, 251, 129, 26, 21, 175, 141, 101, 56, 183, 131, 217, 93, 222, 27, 154, 29, 152, 48, 223, 15, 133, 158, 95, 155, 200, 71, 209, 248, 102, 73, 224, 221, 11, 17, 55, 6, 34, 133, 182, 193, 177, 192, 202, 97, 232, 157, 210, 38, 184, 183, 36, 196, 254, 110, 83, 177, 47, 56, 132, 63, 250, 135, 214, 37, 16, 140, 194, 182, 169, 73, 45, 252, 129, 170, 233, 228, 172, 153, 226, 95, 216, 188, 252, 194, 98, 103, 227, 64, 224, 147, 252, 10, 10, 78, 244, 2, 19, 59, 22, 37, 199, 2, 112, 233, 108, 175, 79, 48, 109, 253, 26, 250, 152, 113, 193, 140, 115, 121, 49, 34, 222, 96, 210, 27, 213, 5, 47, 118, 183, 138, 175, 171, 209, 101, 8, 63, 82, 180, 212, 230, 156, 92, 154, 125, 2, 241, 32, 144, 46, 56, 149, 103, 173, 127, 237, 162, 155, 207, 22, 168, 192, 247, 14, 1, 202, 131, 205, 106, 74, 236, 251, 5, 98, 127, 203, 127, 49, 235, 175, 10, 93, 102, 73, 222, 50, 191, 153, 18, 109, 182, 179, 21, 34, 97, 56, 174, 116, 12, 232, 208, 136, 28, 152, 17, 85, 171, 250, 101, 146, 233, 9, 104, 93, 229, 226, 96, 249, 78, 119, 199, 32, 120, 129, 168, 251, 101, 156, 137, 54, 90, 122, 23, 24, 237, 85, 49, 50, 192, 228, 148, 196, 101, 26, 241, 62, 243, 102, 42, 176, 146, 10, 177, 69, 46, 249, 110, 154, 60, 49, 11, 180, 200, 127, 75, 151, 138, 244, 244, 139, 149, 229, 36, 90, 45, 115, 142, 195, 31, 172, 34, 105, 164, 41, 11, 169, 138, 89, 130, 30, 42, 250, 41, 62, 129, 244, 133, 48, 199, 158, 27, 1, 48, 13, 220, 197, 126, 245, 29, 197, 138, 183, 122, 4, 128, 155, 4, 186, 100, 136, 145, 157, 213, 188, 28, 227, 157, 173, 171, 164, 64, 23, 56, 25, 65, 24, 172, 17, 209, 236, 196, 246, 77, 203, 242, 94, 11, 99, 28, 81, 25, 4, 42, 117, 3, 112, 14, 161, 14, 50, 174, 44, 152, 251, 44, 104, 253, 222, 19, 101, 165, 192, 16, 35, 98, 238, 43, 167, 104, 188, 97, 246, 197, 182, 40, 210, 4, 91, 118, 211, 162, 184, 181, 80, 203, 20, 213, 11, 227, 72, 87, 59, 97, 153, 104, 4, 255, 216, 243, 237, 61, 189, 246, 6, 57, 101, 194, 131, 245, 23, 27, 151, 163, 223, 103, 11, 104, 210, 47, 103, 181, 15, 34, 141, 97, 208, 20, 189, 250, 7, 35, 92, 135, 83, 251, 2, 77, 3, 91, 81, 223, 3, 161, 16, 19, 87, 175, 250, 150, 151, 173, 149, 245, 157, 138, 69, 125, 171, 79, 90, 163, 240, 235, 142, 37, 148, 80, 27, 70, 76, 252, 207, 36, 5, 211, 236, 212, 42, 152, 104, 221, 31, 102, 41, 114, 69, 231, 224, 103, 36, 58, 164, 133, 89, 232, 137, 140, 86, 20, 195, 47, 102, 105, 76, 255, 198, 83, 170, 48, 72, 89, 76, 85, 93, 141, 205, 171, 206, 106, 221, 82, 118, 42, 83, 95, 31, 192, 92, 104, 213, 154, 97, 131, 146, 116, 125, 29, 16, 78, 55, 158, 199, 172, 212, 252, 96, 217, 33, 233, 189, 183, 96, 255, 177, 240, 192, 161, 212, 222, 177, 207, 137, 50, 210, 121, 17, 133, 65, 126, 168, 114, 110, 102, 77, 151, 227, 188, 5, 70, 128, 12, 138, 55, 229, 197, 29, 172, 96, 191, 73, 202, 38, 89, 5, 127, 22, 178, 87, 229, 188, 121, 26, 144, 78, 125, 73, 204, 13, 26, 65, 149, 77, 199, 20, 65, 178, 197, 194, 216, 228, 2, 211, 60, 247, 24, 233, 25, 90, 174, 106, 198, 64, 153, 42, 19, 145, 64, 101, 235, 250, 32, 165, 185, 2, 163, 247, 33, 50, 90, 157, 200, 239, 111, 47, 247, 3, 38, 190, 72, 120, 3, 133, 243, 53, 27, 158, 153, 61, 136, 161, 47, 103, 34, 170, 158, 210, 191, 17, 115, 104, 137, 61, 224, 158, 9, 85, 221, 6, 211, 38, 236, 114, 139, 37, 19, 148, 11, 200, 91, 102, 102, 106, 35, 231, 96, 224, 97, 149, 150, 94, 204, 230, 7, 221, 167, 15, 46, 202, 60, 206, 56, 165, 21, 14, 68, 209, 7, 36, 37, 210, 58, 172, 48, 244, 209, 79, 61, 190, 14, 211, 82, 213, 97, 18, 24, 188, 0, 93, 183, 86, 23, 231, 40, 217, 107, 187, 37, 151, 52, 33, 108, 54, 101, 153, 76, 36, 78, 75, 64, 85, 187, 75, 185, 40, 15, 165, 15, 97, 44, 245, 132, 198, 65, 213, 142, 90, 50, 216, 192, 23, 109, 78, 96, 142, 101, 19, 101, 233, 115, 59, 142, 13, 231, 19, 79, 31, 120, 155, 50, 118, 176, 174, 243, 194, 44, 191, 65, 107, 4, 145, 234, 142, 187, 196, 173, 18, 92, 199, 124, 128, 11, 169, 179, 198, 152, 96, 201, 24, 243, 237, 131, 137, 39, 77, 200, 109, 156, 166, 254, 150, 146, 172, 201, 228, 185, 234, 170, 240, 178, 131, 96, 189, 188, 171, 183, 234, 193, 45, 196, 25, 148, 54, 64, 105, 225, 135, 201, 41, 88, 190, 41, 57, 108, 40, 117, 196, 229, 197, 226, 83, 80, 88, 156, 14, 34, 126, 149, 112, 236, 83, 35, 246, 191, 9, 130, 2, 179, 3, 99, 98, 170, 136, 91, 177, 254, 202, 134, 203, 110, 147, 98, 192, 7, 59, 94, 119, 91, 93, 213, 136, 147, 226, 52, 234, 138, 188, 98, 56, 79, 200, 167, 112, 150, 125, 179, 115, 110, 119, 245, 115, 202, 204, 208, 131, 174, 230, 40, 183, 35, 63, 123, 37, 228, 40, 32, 44, 183, 132, 23, 119, 101, 242, 87, 216, 9, 72, 66, 223, 48, 79, 149, 57, 201, 20, 202, 123, 201, 137, 225, 121, 1, 147, 185, 201, 53, 221, 75, 63, 93, 64, 182, 246, 139, 237, 99, 198, 150, 197, 249, 236, 90, 60, 64, 118, 217, 5, 230, 136, 120, 136, 186, 213, 158, 20, 110, 176, 112, 2, 128, 72, 119, 48, 55, 46, 82, 48, 168, 204, 139, 188, 233, 128, 190, 113, 75, 44, 43, 132, 74, 236, 32, 215, 138, 19, 103, 6, 41, 196, 165, 24, 217, 213, 103, 131, 89, 140, 198, 157, 250, 42, 121, 120, 164, 196, 245, 159, 149, 119, 253, 115, 91, 108, 195, 252, 169, 42, 18, 66, 232, 60, 228, 251, 64, 35, 85, 106, 61, 62, 171, 254, 124, 35, 88, 53, 3, 138, 30, 206, 48, 88, 243, 109, 93, 188, 230, 110, 84, 95, 244, 121, 213, 75, 170, 169, 45, 82, 187, 70, 13, 192, 166, 154, 154, 225, 71, 138, 78, 105, 21, 208, 192, 40, 244, 160, 251, 140, 91, 162, 170, 6, 172, 27, 162, 215, 62, 189, 18, 195, 242, 243, 197, 129, 161, 203, 164, 195, 68, 95, 186, 228, 244, 186, 75, 101, 31, 73, 139, 73, 68, 35, 174, 37, 0, 83, 147, 140, 138, 148, 85, 76, 249, 227, 58, 169, 109, 3, 168, 216, 206, 143, 199, 25, 154, 208, 9, 76, 5, 132, 45, 170, 232, 237, 188, 88, 213, 70, 149, 169, 40, 155, 191, 151, 215, 21, 22, 116, 239, 252, 238, 199, 122, 50, 55, 210, 134, 218, 13, 92, 173, 66, 254, 152, 207, 84, 180, 190, 29, 165, 9, 155, 178, 157, 135, 80, 140, 168, 128, 176, 108, 86, 51, 140, 103, 203, 102, 6, 97, 36, 120, 14, 141, 167, 38, 229, 64, 206, 210, 6, 38, 255, 65, 131, 22, 148, 238, 186, 76, 115, 159, 112, 171, 216, 46, 5, 4, 19, 178, 208, 76, 159, 27, 110, 4, 34, 126, 207, 68, 70, 230, 95, 32, 145, 52, 31, 166, 148, 224, 80, 73, 8, 35, 110, 182, 127, 196, 152, 234, 181, 129, 14, 204, 185, 240, 191, 191, 19, 144, 250, 206, 133, 168, 225, 255, 164, 176, 126, 109, 56, 201, 173, 45, 250, 66, 242, 12, 5, 124, 37, 9, 225, 149, 93, 139, 207, 4, 64, 83, 23, 13, 60, 208, 245, 160, 147, 213, 133, 185, 200, 119, 63, 87, 6, 154, 138, 214, 8, 7, 119, 201, 41, 165, 131, 10, 15, 167, 249, 230, 36, 39, 234, 87, 155, 41, 116, 144, 73, 175, 66, 116, 146, 95, 75, 110, 29, 98, 196, 171, 103, 173, 122, 141, 37, 87, 206, 43, 171, 212, 55, 46, 207, 254, 40, 28, 68, 81, 111, 95, 230, 180, 1, 28, 78, 146, 237, 143, 161, 127, 128, 101, 118, 142, 223, 210, 57, 64, 190, 28, 42, 131, 176, 225, 192, 101, 203, 191, 109, 156, 170, 225, 176, 115, 151, 150, 203, 52, 255, 46, 118, 95, 190, 208, 89, 215, 237, 100, 49, 41, 158, 238, 66, 15, 208, 142, 96, 196, 94, 102, 230, 132, 115, 98, 151, 237, 7, 140, 69, 203, 151, 57, 105, 192, 239, 166, 162, 113, 7, 113, 21, 228, 204, 107, 155, 88, 16, 0, 243, 229, 238, 149, 89, 112, 195, 157, 47, 251, 42, 202, 92, 122, 164, 119, 89, 195, 170, 228, 234, 164, 240, 153, 80, 53, 140, 91, 210, 189, 126, 240, 194, 87, 245, 9, 161, 229, 54, 63, 1, 89, 225, 237, 252, 27, 183, 64, 25, 167, 197, 5, 182, 187, 203, 25, 51, 81, 249, 84, 112, 75, 135, 204, 92, 56, 96, 149, 119, 19, 146, 49, 144, 81, 180, 148, 91, 203, 39, 114, 236, 166, 77, 243, 55, 143, 183, 235, 248, 205, 208, 86, 199, 7, 132, 166, 251, 19, 73, 138, 10, 242, 246, 123, 49, 254, 73, 181, 17, 110, 61, 32, 107, 46, 127, 19, 68, 245, 58, 248, 91, 125, 29, 13, 44, 209, 17, 20, 211, 163, 110, 193, 107, 143, 103, 15, 32, 15, 63, 170, 16, 26, 151, 78, 67, 154, 233, 52, 2, 162, 73, 130, 118, 134, 189, 159, 6, 108, 52, 15, 142, 242, 88, 219, 10, 180, 118, 114, 132, 172, 64, 176, 118, 243, 244, 136, 162, 92, 62, 19, 221, 179, 88, 255, 80, 133, 228, 128, 5, 217, 226, 5, 157, 11, 148, 95, 113, 145, 249, 36, 108, 143, 52, 137, 11, 21, 185, 243, 47, 182, 224, 127, 243, 165, 79, 85, 196, 36, 197, 116, 203, 77, 110, 93, 222, 14, 161, 13, 106, 101, 89, 240, 217, 96, 96, 247, 83, 1, 202, 57, 33, 112, 94, 209, 242, 149, 168, 184, 159, 195, 198, 181, 60, 125, 222, 120, 34, 155, 40, 34, 124, 230, 144, 153, 72, 54, 143, 217, 227, 91, 154, 255, 202, 189, 6, 30, 245, 232, 248, 16, 171, 147, 172, 77, 97, 168, 140, 165, 74, 245, 131, 110, 196, 88, 29, 45, 25, 174, 79, 166, 132, 84, 82, 87, 231, 243, 136, 252, 240, 136, 199, 101, 61, 182, 78, 219, 61, 174, 111, 153, 206, 113, 124, 167, 242, 219, 157, 221, 110, 62, 47, 167, 90, 207, 48, 78, 79, 34, 94, 82, 251, 237, 141, 198, 165, 51, 250, 209, 224, 58, 135, 202, 22, 22, 160, 203, 187, 97, 13, 74, 251, 159, 184, 167, 91, 161, 245, 21, 92, 237, 253, 119, 116, 154, 144, 131, 174, 56, 75, 51, 84, 193, 92, 116, 70, 76, 145, 129, 2, 73, 35, 254, 181, 29, 117, 64, 37, 32, 169, 32, 97, 254, 28, 182, 246, 75, 200, 7, 241, 50, 179, 124, 234, 25, 117, 253, 117, 203, 81, 247, 71, 16, 206, 195, 176, 218, 52, 123, 21, 0, 63, 21, 135, 217, 230, 12, 167, 220, 45, 150, 103, 148, 128, 33, 239, 127, 42, 187, 147, 224, 90, 249, 88, 46, 236, 76, 206, 38, 33, 61, 131, 43, 92, 26, 19, 103, 242, 178, 119, 39, 41, 4, 251, 130, 160, 203, 163, 91, 102, 130, 102, 44, 253, 226, 174, 29, 126, 148, 175, 174, 109, 139, 189, 132, 12, 200, 58, 236, 215, 249, 53, 240, 122, 227, 141, 111, 216, 52, 141, 242, 12, 238, 8, 125, 73, 184, 252, 207, 111, 32, 56, 77, 71, 91, 112, 255, 209, 133, 217, 2, 243, 64, 226, 131, 0, 31, 90, 14, 120, 208, 7, 77, 135, 159, 215, 18, 31, 183, 242, 119, 164, 18, 159, 237, 134, 59, 87, 221, 152, 5, 5, 104, 128, 123, 228, 152, 145, 58, 238, 44, 56, 169, 195, 164, 186, 226, 13, 30, 86, 120, 122, 227, 19, 234, 95, 127, 252, 248, 39, 99, 92, 67, 2, 146, 206, 236, 83, 195, 155, 125, 196, 195, 184, 123, 100, 139, 141, 196, 116, 68, 149, 191, 84, 149, 143, 255, 62, 21, 93, 58, 251, 80, 157, 175, 220, 21, 174, 132, 104, 139, 136, 194, 64, 145, 182, 128, 130, 159, 87, 161, 56, 45, 181, 213, 119, 137, 94, 28, 36, 82, 229, 87, 144, 100, 248, 238, 217, 223, 62, 218, 89, 83, 111, 224, 55, 204, 128, 122, 245, 0, 248, 219, 89, 160, 23, 4, 252, 78, 101, 88, 239, 5, 74, 220, 175, 2, 104, 48, 85, 119, 55, 251, 42, 65, 255, 226, 169, 102, 246, 254, 169, 93, 64, 110, 102, 90, 31, 143, 183, 104, 125, 210, 254, 123, 171, 66, 198, 163, 24, 77, 240, 243, 137, 144, 182, 41, 253, 10, 138, 41, 136, 193, 65, 126, 224, 28, 51, 99, 33, 66, 103, 234, 235, 101, 96, 51, 60, 172, 14, 170, 203, 18, 122, 167, 93, 182, 192, 116, 241, 123, 49, 124, 1, 120, 184, 254, 2, 187, 75, 75, 37, 63, 122, 71, 34, 69, 48, 123, 62, 202, 196, 103, 202, 38, 203, 178, 185, 87, 113, 126, 187, 75, 149, 178, 45, 147, 251, 197, 140, 108, 188, 190, 249, 107, 10, 0, 252, 89, 136, 133, 199, 87, 190, 76, 109, 124, 90, 116, 78, 29, 185, 237, 51, 106, 111, 179, 126, 128, 204, 42, 54, 6, 113, 104, 73, 154, 125, 99, 232, 129, 90, 150, 209, 45, 14, 184, 37, 160, 239, 69, 61, 18, 77, 183, 180, 188, 20, 144, 157, 109, 219, 86, 188, 242, 236, 47, 249, 146, 220, 250, 138, 76, 213, 180, 76, 9, 113, 185, 230, 170, 183, 127, 28, 86, 190, 114, 223, 58, 238, 38, 27, 200, 197, 223, 93, 40, 182, 148, 59, 98, 205, 110, 114, 52, 229, 7, 126, 228, 245, 87, 232, 150, 86, 220, 184, 242, 107, 171, 131, 124, 118, 5, 133, 29, 72, 74, 9, 210, 248, 240, 214, 161, 101, 10, 122, 140, 187, 73, 225, 186, 95, 214, 175, 210, 219, 54, 6, 9, 61, 48, 85, 223, 177, 119, 126, 133, 202, 212, 228, 66, 165, 148, 203, 13, 201, 242, 116, 76, 250, 212, 20, 183, 156, 17, 41, 2, 50, 147, 164, 164, 58, 210, 71, 146, 103, 226, 143, 49, 180, 107, 60, 93, 89, 152, 58, 183, 99, 93, 108, 94, 178, 162, 169, 200, 137, 64, 79, 69, 129, 168, 19, 70, 28, 185, 10, 117, 60, 155, 156, 206, 51, 91, 85, 155, 55, 142, 237, 197, 5, 223, 238, 236, 48, 138, 136, 124, 40, 251, 94, 82, 205, 155, 3, 162, 19, 6, 128, 115, 101, 61, 9, 134, 154, 69, 122, 253, 135, 137, 193, 103, 221, 73, 72, 4, 83, 81, 109, 174, 183, 236, 198, 247, 206, 131, 28, 14, 27, 64, 196, 216, 78, 165, 117, 19, 179, 24, 154, 171, 6, 143, 252, 121, 15, 108, 38, 131, 215, 123, 124, 54, 90, 185, 224, 150, 142, 62, 83, 133, 133, 3, 96, 237, 66, 94, 129, 114, 199, 183, 5, 98, 91, 109, 35, 171, 192, 114, 56, 246, 53, 184, 13, 31, 243, 96, 253, 39, 56, 199, 78, 46, 248, 201, 33, 234, 41, 36, 47, 3, 208, 48, 65, 132, 103, 248, 93, 34, 116, 171, 209, 7, 65, 114, 149, 164, 245, 37, 150, 147, 238, 129, 114, 58, 216, 200, 103, 122, 151, 88, 179, 193, 72, 208, 75, 204, 165, 93, 158, 89, 54, 59, 98, 199, 5, 90, 126, 165, 31, 53, 255, 220, 193, 183, 153, 226, 250, 83, 97, 185, 69, 251, 87, 82, 214, 126, 7, 62, 133, 163, 195, 245, 124, 254, 187, 19, 24, 87, 157, 83, 135, 189, 106, 91, 15, 170, 37, 113, 63, 0, 70, 36, 186, 47, 124, 113, 106, 243, 14, 85, 32, 116, 175, 194, 150, 158, 39, 251, 140, 48, 103, 231, 196, 0, 45, 90, 253, 39, 36, 4, 78, 16, 176, 251, 142, 30, 13, 225, 170, 30, 118, 240, 230, 231, 172, 51, 218, 255, 189, 123, 21, 237, 165, 15, 82, 1, 96, 131, 155, 44, 76, 36, 34, 37, 180, 192, 98, 125, 64, 202, 191, 124, 155, 221, 172, 0, 205, 126, 206, 32, 32, 113, 194, 117, 130, 106, 119, 171, 231, 179, 18, 210, 159, 87, 213, 42, 178, 238, 182, 189, 1, 197, 178, 35, 42, 226, 71, 34, 233, 143, 87, 71, 240, 160, 207, 98, 31, 54, 24, 39, 189, 175, 182, 244, 162, 255, 208, 78, 240, 209, 109, 218, 91, 194, 23, 97, 113, 98, 68, 76, 119, 40, 12, 32, 210, 180, 228, 178, 87, 74, 66, 157, 227, 59, 47, 233, 8, 122, 86, 118, 112, 187, 104, 146, 160, 197, 73, 207, 248, 70, 94, 178, 16, 75, 164, 154, 49, 32, 166, 235, 42, 152, 37, 200, 20, 32, 2, 191, 157, 229, 128, 71, 150, 64, 35, 155, 246, 214, 10, 88, 181, 30, 159, 241, 207, 112, 133, 160, 2, 124, 145, 40, 188, 249, 202, 195, 171, 231, 109, 208, 115, 3, 16, 229, 10, 126, 52, 202, 26, 4, 48, 6, 144, 154, 28, 189, 105, 231, 126, 57, 88, 108, 180, 26, 180, 124, 234, 155, 12, 63, 178, 17, 161, 230, 216, 119, 155, 255, 235, 225, 183, 139, 23, 137, 40, 77, 148, 178, 67, 61, 81, 21, 168, 178, 230, 67, 123, 224, 201, 198, 149, 91, 83, 1, 254, 157, 51, 144, 211, 54, 224, 110, 187, 225, 116, 1, 2, 54, 179, 252, 38, 231, 144, 237, 56, 40, 227, 185, 76, 208, 166, 59, 80, 122, 208, 230, 23, 13, 212, 187, 13, 91, 6, 167, 254, 68, 120, 35, 153, 130, 147, 173, 83, 179, 176, 224, 238, 51, 120, 126, 30, 169, 96, 49, 229, 34, 77, 239, 78, 230, 193, 225, 250, 50, 179, 58, 214, 147, 106, 67, 252, 4, 52, 63, 48, 76, 42, 70, 233, 19, 146, 19, 30, 105, 210, 14, 61, 65, 67, 63, 12, 37, 21, 79, 187, 176, 92, 38, 96, 53, 205, 215, 105, 17, 109, 66, 75, 172, 0, 232, 225, 216, 84, 30, 207, 207, 114, 73, 112, 54, 76, 179, 254, 255, 232, 171, 87, 151, 212, 76, 77, 156, 195, 245, 83, 105, 12, 2, 107, 224, 228, 50, 116, 246, 119, 94, 215, 135, 167, 12, 172, 184, 96, 133, 224, 202, 22, 0, 161, 189, 251, 220, 121, 29, 158, 236, 139, 1, 131, 163, 3, 212, 49, 151, 130, 199, 213, 148, 24, 45, 59, 102, 96, 234, 27, 65, 42, 201, 102, 128, 53, 208, 49, 245, 135, 56, 244, 158, 89, 120, 156, 187, 71, 38, 94, 151, 81, 2, 47, 102, 36, 46, 122, 199, 41, 159, 47, 94, 244, 227, 134, 68, 130, 4, 209, 232, 58, 50, 157, 100, 112, 90, 181, 72, 126, 36, 84, 233, 33, 240, 190, 216, 3, 228, 182, 188, 101, 247, 110, 210, 99, 63, 44, 225, 160, 14, 176, 16, 85, 103, 150, 108, 150, 166, 146, 91, 238, 100, 180, 97, 244, 108, 134, 131, 189, 204, 40, 115, 30, 160, 26, 231, 6, 175, 79, 119, 174, 172, 146, 41, 186, 88, 254, 149, 85, 3, 22, 112, 77, 180, 98, 243, 45, 119, 153, 254, 10, 114, 174, 168, 4, 148, 92, 131, 74, 62, 134, 21, 147, 171, 203, 188, 11, 138, 138, 11, 118, 4, 186, 201, 253, 77, 24, 183, 56, 39, 138, 214, 206, 158, 104, 39, 102, 205, 145, 61, 111, 87, 157, 229, 216, 244, 135, 19, 161, 28, 70, 231, 201, 92, 133, 101, 244, 71, 207, 30, 253, 17, 253, 248, 222, 21, 138, 209, 18, 217, 68, 151, 192, 158, 207, 205, 114, 136, 173, 118, 199, 205, 242, 126, 78, 191, 246, 34, 142, 204, 220, 112, 12, 30, 18, 151, 244, 42, 227, 182, 20, 165, 99, 138, 157, 189, 160, 114, 36, 142, 53, 207, 63, 199, 171, 168, 43, 222, 65, 133, 176, 46, 116, 31, 122, 10, 188, 133, 186, 209, 116, 150, 142, 137, 144, 199, 13, 171, 250, 77, 240, 220, 55, 50, 32, 119, 51, 33, 34, 75, 172, 208, 253, 126, 6, 127, 152, 193, 197, 117, 205, 205, 149, 249, 64, 155, 100, 94, 239, 1, 204, 206, 71, 29, 104, 0, 0, 147, 125, 94, 38, 150, 183, 84, 59, 216, 7, 84, 81, 113, 129, 110, 60, 181, 95, 194, 43, 94, 98, 66, 34, 71, 207, 97, 245, 44, 19, 203, 189, 59, 31, 49, 125, 110, 231, 99, 195, 248, 18, 122, 251, 190, 27, 185, 108, 248, 143, 20, 5, 154, 165, 94, 217, 172, 17, 87, 99, 15, 172, 63, 225, 112, 153, 23, 62, 79, 187, 204, 206, 22, 199, 24, 68, 49, 169, 59, 170, 91, 175, 72, 161, 110, 117, 62, 130, 253, 18, 161, 212, 37, 138, 232, 141, 69, 234, 170, 13, 206, 1, 150, 152, 145, 200, 41, 227, 28, 223, 60, 226, 66, 157, 108, 35, 42, 69, 17, 122, 66, 209, 2, 33, 150, 204, 151, 122, 162, 168, 232, 160, 229, 50, 57, 38, 248, 25, 30, 86, 71, 41, 230, 56, 232, 77, 149, 93, 21, 127, 175, 14, 25, 9, 43, 85, 78, 35, 198, 207, 234, 149, 79, 228, 167, 15, 203, 77, 31, 56, 1, 35, 39, 125, 223, 59, 241, 144, 105, 47, 178, 244, 119, 181, 84, 211, 44, 35, 189, 224, 141, 240, 9, 200, 139, 183, 11, 6, 97, 203, 16, 203, 109, 221, 99, 123, 255, 210, 241, 31, 253, 30, 141, 136, 187, 76, 248, 190, 133, 220, 38, 130, 176, 39, 16, 111, 115, 62, 254, 88, 191, 114, 10, 208, 110, 65, 221, 43, 136, 139, 66, 40, 129, 240, 83, 2, 229, 245, 36, 19, 171, 188, 126, 132, 27, 167, 119, 52, 130, 13, 152, 14, 203, 176, 54, 203, 127, 102, 81, 134, 219, 92, 155, 220, 213, 196, 4, 38, 22, 131, 13, 196, 152, 129, 243, 101, 164, 67, 108, 255, 13, 201, 153, 147, 172, 141, 179, 32, 79, 123, 38, 97, 5, 139, 188, 146, 3, 213, 225, 86, 40, 101, 32, 115, 193, 6, 254, 7, 103, 47, 252, 132, 216, 179, 20, 116, 188, 160, 62, 23, 143, 138, 52, 10, 202, 65, 35, 205, 118, 249, 167, 62, 90, 239, 181, 80, 59, 204, 255, 81, 29, 161, 20, 76, 32, 142, 17, 82, 206, 66, 5, 233, 145, 188, 211, 98, 117, 142, 208, 204, 189, 234, 7, 34, 159, 214, 38, 251, 174, 38, 195, 209, 7, 209, 138, 187, 11, 81, 17, 42, 30, 59, 32, 140, 212, 124, 196, 78, 216, 1, 47, 72, 144, 149, 71, 129, 67, 168, 139, 242, 251, 56, 4, 128, 62, 97, 136, 201, 69, 243, 86, 143, 40, 249, 163, 24, 52, 226, 234, 193, 62, 79, 151, 68, 38, 10, 172, 251, 155, 79, 171, 174, 190, 105, 182, 71, 242, 77, 119, 27, 173, 22, 97, 98, 121, 35, 30, 105, 87, 199, 175, 114, 2, 16, 21, 174, 155, 148, 199, 98, 210, 47, 50, 49, 48, 73, 158, 172, 201, 43, 109, 58, 167, 63, 169, 27, 22, 74, 28, 68, 45, 16, 8, 197, 12, 123, 161, 148, 199, 219, 235, 153, 155, 205, 54, 234, 157, 26, 242, 45, 55, 35, 33, 81, 7, 21, 33, 212, 48, 160, 253, 135, 244, 65, 117, 171, 150, 88, 90, 26, 180, 251, 232, 91, 14, 16, 24, 109, 34, 114, 137, 95, 154, 47, 167, 31, 227, 236, 214, 225, 86, 130, 111, 146, 245, 83, 228, 184, 228, 206, 14, 248, 68, 105, 164, 209, 231, 245, 76, 22, 222, 150, 48, 175, 220, 4, 61, 23, 77, 28, 66, 200, 19, 28, 109, 42, 34, 121, 90, 102, 242, 159, 153, 57, 48, 88, 18, 103, 214, 90, 72, 173, 189, 32, 64, 192, 11, 50, 145, 26, 170, 190, 232, 84, 194, 222, 216, 231, 57, 7, 101, 44, 106, 159, 205, 243, 206, 80, 2, 46, 196, 43, 23, 142, 223, 180, 150, 48, 197, 94, 198, 164, 102, 174, 117, 234, 95, 115, 40, 197, 157, 42, 45, 10, 53, 168, 235, 153, 201, 14, 249, 99, 101, 185, 15, 186, 240, 230, 7, 114, 189, 47, 50, 181, 234, 38, 70, 204, 161, 150, 220, 14, 104, 158, 130, 42, 212, 90, 207, 3, 205, 196, 238, 144, 141, 106, 98, 190, 118, 122, 26, 191, 56, 42, 142, 96, 146, 190, 90, 58, 69, 170, 94, 85, 144, 192, 163, 42, 36, 20, 206, 251, 74, 101, 49, 23, 207, 178, 147, 177, 183, 254, 189, 46, 44, 112, 201, 94, 43, 93, 248, 253, 187, 44, 103, 2, 188, 152, 62, 162, 117, 54, 15, 166, 228, 214, 238, 23, 216, 15, 35, 12, 76, 128, 216, 234, 152, 251, 130, 106, 25, 146, 150, 219, 78, 230, 83, 198, 88, 221, 56, 92, 23, 83, 207, 151, 63, 182, 197, 204, 113, 183, 193, 118, 94, 161, 70, 146, 122, 180, 17, 135, 242, 108, 28, 247, 139, 241, 162, 61, 190, 146, 200, 240, 210, 213, 58, 44, 8, 161, 198, 200, 90, 200, 121, 233, 18, 12, 121, 75, 92, 138, 224, 119, 32, 132, 217, 152, 126, 51, 221, 218, 13, 238, 1, 239, 13, 16, 34, 253, 125, 76, 115, 137, 59, 54, 217, 65, 239, 16, 66, 10, 67, 20, 171, 127, 152, 230, 181, 224, 233, 44, 83, 156, 149, 144, 234, 130, 153, 71, 227, 159, 44, 72, 62, 216, 171, 237, 118, 156, 115, 154, 219, 57, 252, 118, 139, 214, 231, 218, 86, 48, 223, 89, 138, 162, 70, 97, 71, 204, 43, 127, 176, 128, 77, 161, 98, 246, 161, 147, 248, 133, 6, 146, 21, 79, 10, 214, 232, 64, 230, 249, 45, 45, 38, 246, 158, 166, 221, 22, 222, 209, 89, 50, 79, 75, 76, 4, 58, 216, 55, 176, 239, 42, 127, 154, 201, 186, 186, 116, 224, 132, 135, 1, 200, 184, 201, 164, 13, 21, 146, 89, 216, 35, 161, 203, 135, 76, 134, 100, 145, 229, 35, 253, 173, 186, 232, 166, 43, 97, 244, 2, 117, 54, 81, 223, 87, 184, 18, 214, 36, 157, 217, 90, 240, 119, 205, 84, 137, 13, 121, 186, 88, 51, 204, 90, 207, 7, 111, 3, 0, 162, 135, 41, 9, 67, 47, 135, 25, 18, 190, 36, 22, 99, 203, 27, 232, 189, 177, 140, 200, 12, 216, 48, 196, 84, 124, 136, 44, 4, 104, 121, 110, 38, 91, 136, 3, 25, 222, 47, 233, 51, 134, 103, 254, 12, 72, 240, 147, 80, 74, 139, 167, 231, 54, 183, 6, 218, 152, 7, 25, 104, 195, 250, 190, 230, 185, 103, 187, 88, 106, 34, 145, 104, 95, 87, 15, 81, 72, 219, 1, 231, 145, 48, 19, 84, 35, 94, 138, 117, 228, 183, 136, 157, 217, 223, 168, 196, 16, 203, 238, 142, 223, 246, 236, 78, 179, 136, 218, 96, 211, 48, 171, 239, 183, 238, 173, 83, 224, 76, 124, 7, 132, 163, 20, 202, 140, 210, 41, 66, 26, 232, 200, 101, 233, 6, 152, 217, 27, 54, 41, 64, 254, 28, 2, 43, 246, 130, 83, 109, 218, 225, 20, 130, 50, 207, 72, 26, 110, 35, 197, 44, 235, 80, 183, 76, 169, 108, 123, 111, 189, 53, 161, 207, 196, 103, 164, 156, 14, 113, 176, 92, 187, 30, 49, 103, 197, 104, 141, 99, 195, 79, 26, 172, 1, 53, 239, 65, 143, 87, 31, 24, 174, 39, 255, 231, 128, 210, 109, 167, 127, 178, 35, 151, 130, 51, 143, 242, 74, 88, 57, 241, 182, 47, 49, 107, 182, 87, 215, 104, 158, 192, 48, 93, 54, 116, 220, 242, 174, 182, 139, 95, 64, 136, 169, 253, 209, 153, 136, 133, 35, 124, 234, 108, 196, 93, 111, 93, 171, 217, 181, 8, 34, 51, 28, 12, 239, 58, 180, 228, 114, 218, 172, 127, 46, 119, 185, 159, 49, 181, 170, 202, 185, 54, 253, 20, 235, 61, 136, 201, 210, 192, 237, 224, 24, 181, 220, 122, 158, 126, 70, 226, 58, 122, 170, 117, 14, 121, 105, 194, 104, 170, 85, 237, 237, 227, 113, 14, 111, 124, 57, 13, 34, 37, 111, 101, 36, 226, 164, 89, 202, 220, 84, 165, 58, 121, 44, 207, 134, 255, 188, 24, 112, 105, 192, 77, 124, 153, 137, 201, 102, 172, 20, 254, 135, 133, 53, 153, 154, 147, 39, 182, 62, 3, 236, 201, 200, 89, 182, 157, 48, 158, 200, 90, 229, 82, 84, 238, 46, 241, 87, 43, 106, 49, 238, 127, 38, 26, 132, 152, 143, 115, 127, 39, 189, 224, 3, 85, 71, 14, 17, 59, 108, 74, 143, 208, 33, 103, 8, 179, 199, 6, 6, 45, 65, 233, 96, 194, 189, 238, 85, 191, 165, 74, 77, 225, 66, 174, 90, 210, 144, 144, 134, 81, 76, 62, 248, 161, 16, 235, 6, 153, 194, 207, 122, 89, 39, 236, 172, 220, 12, 169, 36, 230, 247, 244, 204, 32, 119, 93, 131, 223, 96, 152, 212, 79, 233, 57, 131, 157, 135, 218, 140, 110, 176, 71, 244, 238, 242, 212, 22, 26, 204, 82, 3, 17, 176, 83, 83, 180, 209, 6, 150, 238, 246, 252, 149, 37, 121, 155, 149, 88, 229, 221, 227, 26, 109, 119, 215, 85, 62, 80, 193, 140, 144, 203, 104, 150, 70, 136, 226, 246, 135, 193, 160, 61, 35, 163, 202, 189, 87, 220, 215, 209, 13, 227, 34, 146, 142, 169, 236, 15, 146, 203, 152, 13, 41, 197, 48, 63, 66, 5, 145, 96, 2, 225, 215, 154, 40, 109, 211, 38, 152, 14, 131, 109, 143, 68, 233, 108, 218, 199, 228, 34, 107, 29, 136, 212, 255, 163, 88, 98, 67, 235, 104, 81, 235, 12, 107, 219, 24, 114, 32, 231, 224, 39, 5, 142, 23, 185, 117, 226, 24, 102, 255, 39, 196, 7, 176, 236, 104, 52, 136, 70, 255, 208, 118, 29, 17, 174, 85, 175, 16, 10, 125, 176, 214, 1, 111, 163, 132, 93, 120, 194, 191, 36, 55, 254, 79, 39, 84, 2, 118, 110, 156, 215, 39, 219, 152, 215, 216, 228, 66, 95, 251, 60, 196, 170, 188, 56, 91, 188, 102, 248, 229, 42, 85, 68, 155, 54, 17, 37, 42, 138, 153, 196, 138, 45, 206, 7, 75, 97, 238, 237, 190, 193, 103, 218, 78, 88, 179, 149, 86, 99, 234, 196, 58, 208, 117, 47, 113, 89, 112, 5, 130, 204, 221, 83, 11, 20, 228, 14, 146, 29, 90, 67, 188, 33, 217, 95, 252, 144, 184, 64, 138, 193, 95, 151, 3, 109, 124, 219, 135, 141, 22, 2, 50, 137, 212, 53, 216, 190, 87, 173, 180, 62, 112, 238, 13, 230, 254, 98, 166, 119, 34, 81, 42, 7, 46, 145, 168, 24, 157, 7, 76, 234, 2, 118, 35, 95, 124, 191, 135, 30, 90, 67, 31, 242, 64, 137, 63, 71, 240, 198, 71, 113, 5, 70, 116, 155, 167, 191, 142, 162, 173, 210, 229, 71, 202, 170, 212, 60, 148, 87, 29, 128, 77, 1, 141, 35, 50, 29, 107, 150, 123, 208, 199, 94, 72, 59, 93, 49, 214, 11, 66, 7, 41, 55, 87, 237, 92, 231, 152, 50, 203, 212, 220, 148, 188, 183, 169, 10, 15, 156, 108, 83, 174, 177, 88, 236, 245, 176, 67, 14, 108, 118, 65, 4, 146, 172, 52, 10, 190, 250, 14, 178, 66, 192, 237, 224, 56, 20, 205, 2, 5, 29, 136, 45, 78, 20, 52, 129, 236, 98, 209, 23, 155, 74, 186, 197, 179, 82, 123, 10, 236, 146, 9, 56, 134, 74, 139, 8, 162, 134, 53, 227, 183, 77, 46, 6, 212, 160, 89, 75, 53, 21, 196, 64, 160, 161, 158, 16, 87, 231, 61, 252, 111, 232, 1, 156, 170, 106, 74, 249, 177, 40, 51, 79, 50, 231, 159, 81, 162, 95, 208, 86, 23, 87, 43, 124, 218, 66, 27, 37, 180, 97, 190, 124, 2, 66, 148, 111, 19, 144, 143, 11, 27, 12, 242, 36, 167, 242, 251, 41, 176, 233, 205, 135, 9, 173, 79, 248, 14, 91, 6, 95, 222, 86, 127, 166, 19, 170, 50, 161, 38, 28, 91, 174, 149, 24, 3, 239, 15, 235, 84, 152, 53, 3, 8, 78, 169, 86, 191, 106, 31, 187, 32, 171, 84, 237, 180, 127, 62, 43, 179, 209, 39, 74, 104, 222, 246, 156, 184, 214, 72, 5, 23, 32, 31, 55, 122, 152, 59, 107, 73, 212, 138, 221, 160, 43, 184, 185, 85, 42, 50, 151, 98, 163, 86, 102, 235, 244, 90, 176, 121, 9, 0, 237, 196, 52, 210, 182, 129, 67, 239, 231, 216, 190, 229, 140, 197, 218, 209, 73, 124, 30, 242, 246, 172, 53, 76, 189, 229, 32, 100, 149, 108, 246, 224, 107, 168, 55, 254, 191, 6, 180, 205, 214, 235, 8, 147, 78, 131, 160, 180, 106, 65, 79, 90, 33, 214, 161, 18, 162, 98, 110, 58, 162, 100, 93, 184, 75, 87, 19, 54, 202, 98, 124, 7, 138, 59, 75, 47, 12, 175, 172, 241, 40, 25, 183, 73, 214, 167, 110, 123, 43, 91, 95, 51, 123, 206, 145, 138, 125, 120, 113, 1, 254, 153, 239, 78, 195, 191, 39, 72, 17, 105, 193, 249, 190, 187, 43, 198, 14, 59, 158, 198, 217, 131, 91, 248, 46, 22, 247, 212, 223, 109, 26, 20, 183, 4, 234, 200, 8, 209, 56, 136, 103, 16, 187, 131, 22, 73, 39, 38, 228, 241, 44, 219, 141, 90, 46, 177, 196, 221, 192, 233, 185, 108, 93, 175, 133, 135, 218, 21, 12, 191, 86, 96, 224, 216, 7, 98, 252, 86, 152, 53, 109, 149, 9, 247, 185, 157, 198, 43, 211, 73, 190, 68, 240, 53, 181, 67, 191, 16, 130, 247, 58, 93, 38, 54, 141, 8, 229, 177, 135, 77, 7, 39, 95, 188, 200, 44, 118, 158, 53, 10, 82, 197, 9, 30, 49, 232, 87, 224, 95, 80, 50, 3, 139, 13, 101, 212, 124, 146, 15, 7, 208, 125, 19, 210, 229, 35, 78, 72, 232, 111, 113, 10, 147, 156, 214, 151, 28, 206, 217, 188, 143, 19, 59, 66, 232, 6, 15, 84, 203, 179, 47, 162, 77, 217, 245, 210, 75, 15, 169, 160, 13, 131, 247, 240, 60, 229, 135, 53, 105, 77, 197, 134, 49, 115, 188, 137, 165, 102, 22, 159, 134, 39, 122, 113, 107, 56, 136, 101, 133, 84, 238, 109, 120, 85, 212, 207, 114, 187, 35, 0, 116, 71, 189, 112, 176, 34, 38, 107, 20, 234, 210, 255, 158, 49, 0, 201, 170, 6, 10, 4, 10, 72, 185, 177, 10, 104, 79, 175, 21, 217, 41, 111, 82, 48, 104, 0, 99, 134, 74, 63, 237, 197, 26, 161, 207, 211, 179, 35, 228, 227, 156, 69, 156, 66, 28, 217, 43, 234, 131, 254, 13, 233, 100, 88, 50, 243, 141, 18, 89, 13, 219, 128, 97, 141, 233, 187, 63, 222, 147, 243, 89, 110, 28, 149, 222, 185, 171, 251, 37, 2, 188, 31, 221, 36, 134, 216, 38, 221, 199, 71, 6, 226, 142, 37, 203, 51, 23, 30, 221, 181, 226, 115, 70, 71, 255, 92, 81, 51, 84, 38, 185, 12, 206, 8, 123, 83, 221, 70, 121, 47, 134, 27, 72, 83, 223, 25, 162, 48, 193, 108, 35, 232, 137, 73, 94, 27, 167, 240, 176, 235, 187, 129, 28, 65, 100, 149, 164, 42, 241, 209, 201, 88, 159, 144, 223, 233, 156, 129, 33, 40, 232, 100, 44, 198, 177, 1, 190, 202, 96, 127, 238, 168, 207, 169, 135, 35, 184, 58, 36, 100, 254, 130, 177, 202, 24, 195, 219, 187, 231, 177, 96, 148, 132, 34, 80, 181, 135, 235, 239, 168, 20, 101, 6, 95, 114, 184, 239, 73, 190, 47, 23, 85, 93, 122, 23, 134, 205, 204, 191, 210, 119, 28, 127, 253, 35, 186, 71, 90, 116, 43, 145, 143, 62, 13, 172, 3, 221, 132, 64, 144, 146, 84, 254, 90, 104, 197, 239, 117, 231, 85, 121, 160, 102, 219, 82, 196, 37, 152, 35, 45, 1, 160, 140, 197, 65, 93, 28, 99, 76, 85, 62, 198, 201, 32, 153, 230, 39, 161, 53, 204, 164, 109, 249, 227, 125, 102, 49, 243, 226, 95, 89, 174, 184, 215, 33, 204, 34, 182, 179, 154, 146, 68, 119, 127, 226, 231, 1, 17, 224, 241, 226, 59, 141, 254, 202, 152, 88, 174, 223, 160, 134, 194, 144, 132, 254, 151, 200, 165, 46, 213, 154, 136, 37, 67, 189, 191, 190, 234, 69, 111, 238, 187, 137, 106, 12, 30, 13, 80, 224, 14, 12, 99, 47, 228, 207, 28, 88, 40, 127, 161, 124, 91, 102, 88, 113, 183, 224, 235, 255, 69, 81, 102, 221, 47, 91, 83, 31, 10, 84, 47, 188, 76, 86, 210, 239, 216, 184, 15, 210, 163, 205, 244, 11, 24, 3, 198, 186, 109, 186, 53, 147, 132, 138, 62, 13, 139, 206, 91, 156, 143, 56, 205, 149, 17, 140, 59, 40, 190, 23, 238, 89, 99, 11, 73, 187, 25, 123, 235, 93, 35, 142, 22, 193, 235, 211, 28, 43, 4, 22, 71, 170, 224, 253, 136, 239, 44, 92, 25, 149, 237, 181, 97, 129, 108, 40, 155, 188, 205, 67, 123, 176, 134, 199, 190, 132, 231, 131, 136, 80, 98, 200, 149, 124, 180, 220, 207, 100, 242, 161, 155, 175, 253, 5, 223, 225, 112, 49, 221, 97, 159, 198, 224, 61, 249, 165, 54, 138, 29, 26, 142, 250, 26, 149, 10, 87, 46, 58, 2, 254, 246, 38, 7, 147, 101, 192, 192, 195, 163, 69, 75, 23, 162, 32, 151, 23, 155, 242, 69, 212, 48, 112, 57, 96, 66, 48, 98, 60, 82, 0, 89, 118, 7, 206, 9, 189, 176, 9, 226, 9, 11, 206, 184, 202, 237, 185, 53, 222, 227, 107, 15, 107, 218, 152, 176, 150, 67, 126, 192, 106, 83, 123, 54, 73, 139, 64, 10, 219, 33, 80, 128, 174, 30, 84, 185, 116, 20, 97, 2, 14, 87, 168, 85, 110, 187, 238, 189, 236, 233, 234, 13, 104, 189, 180, 5, 28, 131, 9, 142, 65, 213, 203, 244, 101, 234, 151, 206, 151, 35], + [21, 13, 199, 61, 41, 252, 105, 79, 215, 80, 213, 0, 62, 160, 135, 150, 24, 64, 87, 23, 82, 247, 49, 23, 27, 99, 151, 59, 198, 56, 131, 187, 127, 207, 186, 23, 172, 119, 3, 27, 44, 4, 61, 64, 153, 81, 31, 85, 91, 114, 49, 116, 179, 183, 135, 61, 151, 195, 61, 158, 49, 32, 212, 61, 109, 27, 221, 117, 180, 16, 232, 33, 148, 48, 108, 44, 174, 131, 0, 250, 147, 98, 96, 26, 177, 196, 159, 78, 162, 2, 193, 155, 91, 197, 79, 156, 225, 74, 190, 187, 175, 48, 25, 15, 159, 165, 50, 25, 235, 225, 76, 26, 60, 61, 229, 189, 174, 37, 220, 120, 0, 225, 223, 66, 221, 233, 119, 232, 199, 98, 136, 233, 32, 153, 236, 131, 131, 101, 27, 201, 218, 144, 224, 157, 196, 135, 7, 158, 192, 153, 1, 219, 117, 110, 192, 3, 232, 39, 124, 249, 205, 98, 149, 117, 56, 126, 24, 213, 74, 72, 22, 52, 64, 255, 20, 20, 159, 150, 167, 37, 245, 62, 54, 64, 77, 194, 46, 109, 67, 156, 181, 171, 18, 201, 158, 247, 245, 188, 220, 127, 29, 10, 143, 133, 114, 74, 41, 90, 199, 146, 252, 77, 0, 60, 135, 3, 239, 5, 170, 192, 24, 3, 208, 234, 253, 51, 67, 141, 42, 117, 97, 224, 150, 243, 211, 39, 147, 110, 116, 130, 210, 222, 250, 227, 0, 221, 11, 154, 166, 36, 209, 205, 246, 32, 234, 225, 247, 184, 134, 187, 210, 122, 197, 66, 246, 247, 233, 193, 158, 42, 143, 132, 59, 19, 169, 10, 42, 30, 21, 88, 200, 107, 20, 250, 21, 159, 81, 189, 215, 6, 217, 109, 44, 142, 97, 30, 199, 21, 176, 111, 2, 240, 123, 220, 13, 36, 143, 124, 26, 99, 117, 62, 33, 127, 80, 58, 40, 255, 36, 31, 57, 204, 216, 251, 84, 210, 13, 151, 152, 253, 150, 228, 50, 35, 212, 150, 230, 17, 104, 68, 7, 131, 234, 187, 218, 43, 175, 9, 82, 80, 171, 18, 90, 32, 62, 116, 26, 119, 191, 45, 227, 28, 204, 234, 73, 191, 186, 171, 103, 31, 187, 254, 252, 52, 177, 53, 92, 27, 77, 164, 89, 70, 207, 26, 156, 228, 100, 142, 75, 111, 124, 249, 197, 191, 50, 252, 128, 129, 172, 51, 2, 156, 13, 2, 11, 202, 84, 196, 72, 16, 223, 143, 196, 204, 219, 71, 182, 251, 189, 6, 1, 112, 59, 10, 146, 67, 1, 80, 254, 138, 246, 69, 159, 9, 100, 176, 19, 179, 184, 20, 183, 124, 6, 180, 11, 101, 74, 95, 162, 172, 112, 53, 92, 127, 149, 2, 54, 116, 45, 49, 145, 53, 177, 228, 128, 22, 214, 158, 35, 88, 255, 31, 8, 249, 130, 86, 234, 224, 49, 248, 82, 189, 214, 31, 134, 23, 99, 130, 77, 194, 10, 89, 181, 12, 240, 88, 4, 6, 180, 160, 178, 23, 165, 155, 219, 245, 92, 90, 26, 53, 200, 200, 232, 141, 151, 69, 55, 214, 72, 7, 134, 19, 111, 89, 191, 66, 112, 245, 172, 167, 29, 232, 221, 46, 92, 106, 72, 223, 152, 149, 191, 36, 16, 175, 59, 9, 150, 14, 106, 92, 106, 226, 55, 43, 162, 174, 91, 108, 113, 89, 93, 34, 73, 85, 52, 240, 154, 220, 155, 186, 210, 221, 101, 207, 135, 73, 57, 248, 5, 150, 75, 129, 168, 213, 210, 76, 38, 88, 84, 47, 192, 224, 153, 217, 36, 161, 64, 143, 12, 188, 29, 224, 50, 68, 106, 156, 235, 71, 36, 115, 154, 164, 148, 232, 179, 149, 120, 188, 9, 103, 137, 59, 142, 149, 222, 216, 42, 74, 145, 156, 120, 27, 171, 181, 79, 138, 164, 4, 196, 129, 204, 164, 32, 191, 138, 41, 234, 235, 19, 88, 106, 66, 124, 249, 120, 65, 144, 77, 17, 33, 253, 78, 190, 221, 130, 127, 222, 14, 85, 146, 159, 202, 142, 191, 115, 219, 116, 191, 141, 229, 213, 249, 192, 248, 112, 143, 133, 192, 61, 249, 56, 1, 213, 224, 239, 149, 221, 69, 157, 201, 39, 214, 242, 155, 61, 225, 87, 227, 88, 84, 220, 128, 196, 179, 210, 124, 123, 87, 4, 127, 246, 174, 76, 88, 136, 177, 172, 234, 91, 80, 119, 214, 116, 94, 51, 24, 117, 166, 174, 166, 98, 41, 106, 155, 11, 171, 161, 47, 152, 83, 203, 181, 107, 195, 251, 149, 185, 141, 83, 69, 212, 69, 157, 159, 137, 173, 234, 162, 42, 19, 75, 245, 194, 47, 177, 132, 13, 167, 227, 79, 185, 234, 111, 189, 232, 225, 90, 94, 248, 21, 87, 239, 108, 59, 2, 146, 2, 184, 103, 164, 81, 93, 165, 54, 8, 44, 16, 229, 108, 150, 252, 17, 229, 173, 70, 208, 98, 42, 180, 38, 17, 141, 213, 130, 97, 212, 21, 24, 239, 53, 252, 182, 180, 13, 219, 252, 36, 62, 240, 90, 124, 94, 6, 240, 231, 214, 151, 155, 191, 182, 53, 118, 208, 115, 125, 143, 74, 201, 114, 22, 32, 219, 0, 82, 23, 157, 104, 77, 32, 118, 121, 152, 197, 61, 115, 241, 5, 36, 94, 142, 163, 168, 26, 99, 232, 55, 120, 85, 234, 110, 156, 154, 215, 167, 159, 101, 239, 51, 24, 12, 194, 32, 226, 218, 52, 172, 141, 53, 32, 194, 170, 218, 139, 186, 97, 108, 129, 90, 1, 166, 241, 16, 138, 250, 54, 80, 204, 161, 103, 62, 31, 182, 115, 133, 37, 14, 32, 68, 187, 76, 89, 219, 172, 158, 41, 119, 148, 10, 164, 146, 127, 94, 186, 5, 36, 150, 250, 73, 53, 137, 194, 186, 145, 165, 1, 41, 55, 226, 72, 100, 168, 220, 217, 147, 189, 164, 42, 13, 221, 203, 188, 229, 119, 226, 153, 38, 219, 95, 191, 53, 68, 241, 180, 174, 30, 209, 33, 176, 190, 37, 199, 35, 192, 158, 240, 128, 76, 41, 145, 85, 65, 172, 242, 165, 4, 119, 37, 41, 134, 72, 97, 63, 67, 239, 241, 137, 109, 109, 95, 180, 180, 90, 157, 224, 2, 42, 63, 74, 136, 234, 254, 145, 209, 122, 84, 142, 125, 67, 171, 204, 236, 205, 185, 15, 191, 97, 172, 213, 185, 208, 17, 56, 226, 224, 189, 120, 233, 67, 37, 74, 71, 230, 159, 22, 206, 236, 17, 27, 134, 167, 244, 113, 155, 244, 107, 193, 162, 203, 152, 138, 22, 108, 130, 207, 193, 235, 76, 20, 95, 45, 71, 188, 153, 73, 220, 215, 102, 24, 69, 110, 135, 230, 12, 194, 144, 72, 169, 132, 233, 112, 51, 121, 21, 228, 167, 135, 117, 248, 121, 172, 20, 209, 185, 207, 63, 36, 28, 139, 158, 129, 61, 137, 36, 87, 59, 19, 76, 131, 157, 35, 141, 6, 21, 80, 96, 86, 178, 133, 205, 213, 145, 179, 154, 131, 152, 187, 193, 45, 51, 254, 13, 93, 143, 61, 144, 136, 250, 236, 82, 193, 222, 245, 3, 254, 118, 138, 236, 201, 200, 234, 46, 208, 63, 199, 47, 19, 97, 15, 180, 87, 109, 21, 65, 87, 71, 146, 241, 186, 14, 106, 49, 126, 153, 65, 50, 239, 202, 33, 201, 43, 81, 80, 111, 223, 184, 83, 203, 63, 120, 17, 142, 223, 33, 232, 1, 77, 62, 99, 225, 118, 164, 211, 125, 4, 79, 97, 54, 98, 217, 45, 197, 152, 236, 24, 226, 169, 237, 81, 237, 77, 192, 22, 173, 58, 53, 252, 22, 144, 78, 33, 74, 165, 94, 225, 136, 187, 243, 90, 126, 202, 225, 8, 4, 158, 118, 103, 228, 142, 223, 179, 78, 46, 203, 60, 40, 170, 218, 107, 129, 59, 2, 73, 24, 37, 162, 174, 100, 224, 80, 172, 244, 8, 77, 116, 254, 182, 20, 70, 85, 56, 227, 235, 63, 234, 139, 202, 62, 224, 48, 131, 16, 16, 172, 196, 171, 154, 29, 139, 65, 93, 223, 187, 145, 173, 149, 221, 217, 86, 231, 39, 26, 220, 178, 235, 134, 33, 238, 80, 98, 128, 119, 115, 80, 64, 199, 247, 157, 105, 114, 24, 168, 54, 250, 200, 242, 191, 44, 137, 253, 11, 66, 206, 223, 228, 10, 62, 34, 129, 216, 18, 101, 180, 162, 129, 177, 219, 51, 200, 49, 67, 2, 255, 118, 31, 141, 87, 47, 156, 163, 186, 47, 143, 57, 33, 124, 6, 140, 123, 186, 29, 186, 239, 184, 231, 196, 164, 187, 194, 82, 169, 159, 6, 68, 95, 193, 14, 209, 105, 23, 79, 57, 134, 89, 106, 156, 176, 4, 185, 65, 212, 103, 188, 218, 254, 48, 106, 184, 117, 56, 213, 229, 205, 28, 183, 84, 134, 40, 56, 64, 144, 235, 171, 75, 194, 144, 44, 53, 71, 6, 42, 204, 152, 184, 206, 198, 178, 157, 199, 22, 5, 162, 1, 235, 35, 204, 210, 6, 144, 136, 10, 172, 247, 71, 60, 44, 204, 191, 75, 167, 118, 212, 17, 22, 105, 67, 115, 27, 81, 227, 48, 10, 231, 72, 159, 68, 176, 8, 35, 48, 189, 13, 237, 173, 15, 22, 118, 110, 124, 33, 106, 76, 207, 246, 193, 69, 148, 73, 22, 189, 5, 42, 218, 255, 25, 154, 221, 46, 188, 226, 191, 110, 127, 231, 58, 4, 99, 86, 210, 160, 194, 254, 2, 27, 48, 19, 19, 229, 243, 73, 53, 230, 147, 242, 179, 10, 162, 239, 152, 231, 135, 15, 226, 13, 209, 61, 171, 157, 185, 45, 160, 202, 122, 163, 50, 28, 53, 45, 103, 215, 215, 130, 40, 184, 104, 80, 180, 10, 97, 118, 77, 147, 62, 218, 230, 112, 1, 201, 189, 206, 246, 4, 46, 28, 67, 104, 67, 207, 120, 229, 189, 179, 223, 100, 231, 71, 187, 250, 217, 229, 138, 30, 85, 33, 37, 99, 164, 182, 68, 239, 92, 62, 77, 51, 198, 158, 20, 239, 227, 190, 1, 21, 29, 174, 209, 75, 93, 132, 221, 186, 43, 146, 201, 8, 42, 99, 36, 184, 100, 1, 50, 111, 114, 225, 111, 20, 1, 98, 201, 26, 168, 65, 58, 171, 214, 121, 22, 13, 208, 78, 253, 132, 30, 251, 175, 106, 91, 38, 179, 102, 90, 195, 144, 194, 55, 225, 176, 38, 20, 71, 82, 248, 162, 201, 46, 110, 70, 145, 151, 109, 218, 56, 177, 70, 235, 109, 131, 122, 77, 65, 112, 86, 164, 125, 29, 162, 218, 218, 180, 32, 124, 58, 89, 107, 158, 154, 223, 112, 93, 214, 237, 195, 178, 156, 197, 25, 253, 41, 177, 91, 251, 216, 32, 234, 48, 141, 217, 61, 20, 204, 146, 89, 176, 36, 7, 34, 35, 68, 72, 225, 174, 3, 44, 209, 45, 21, 66, 82, 237, 251, 22, 99, 202, 170, 82, 116, 11, 121, 212, 9, 208, 221, 139, 189, 31, 160, 176, 42, 77, 63, 226, 146, 17, 68, 15, 156, 132, 226, 243, 144, 75, 49, 223, 120, 43, 192, 173, 105, 16, 131, 182, 91, 173, 83, 5, 106, 41, 31, 146, 180, 137, 2, 22, 221, 20, 193, 21, 147, 107, 141, 252, 209, 157, 153, 114, 208, 249, 224, 207, 176, 44, 7, 76, 228, 80, 170, 13, 73, 243, 99, 221, 234, 183, 61, 16, 128, 199, 13, 243, 183, 199, 146, 49, 31, 19, 243, 1, 72, 110, 119, 109, 168, 171, 50, 46, 123, 177, 180, 58, 36, 113, 181, 113, 3, 213, 58, 253, 198, 158, 77, 191, 131, 35, 85, 191, 218, 105, 82, 212, 234, 6, 197, 206, 142, 115, 118, 79, 224, 50, 114, 48, 142, 175, 251, 48, 31, 192, 7, 46, 215, 100, 103, 94, 161, 69, 57, 205, 59, 142, 174, 231, 79, 102, 235, 246, 56, 198, 201, 235, 159, 122, 29, 17, 20, 168, 195, 67, 5, 158, 107, 168, 237, 6, 82, 87, 62, 202, 174, 84, 167, 232, 82, 126, 239, 102, 97, 65, 193, 150, 194, 104, 86, 181, 227, 36, 195, 82, 190, 197, 31, 53, 86, 90, 79, 136, 112, 11, 35, 115, 242, 23, 61, 67, 212, 132, 67, 105, 199, 66, 96, 225, 51, 191, 152, 63, 236, 68, 56, 10, 197, 147, 229, 54, 181, 254, 206, 1, 13, 179, 125, 152, 235, 37, 213, 124, 21, 147, 112, 212, 211, 127, 242, 108, 175, 149, 192, 86, 91, 252, 74, 192, 17, 225, 107, 219, 246, 15, 7, 97, 53, 133, 157, 174, 32, 224, 4, 193, 218, 59, 135, 214, 225, 205, 82, 68, 196, 238, 239, 195, 118, 71, 101, 198, 215, 104, 221, 8, 77, 36, 104, 216, 255, 83, 50, 166, 205, 27, 137, 77, 133, 2, 213, 179, 150, 157, 114, 149, 60, 114, 110, 127, 157, 185, 20, 59, 254, 146, 10, 29, 120, 114, 153, 241, 107, 29, 96, 232, 207, 156, 168, 251, 94, 158, 139, 87, 213, 110, 197, 227, 54, 165, 246, 199, 83, 183, 41, 104, 153, 216, 173, 10, 64, 60, 210, 83, 240, 180, 114, 153, 183, 130, 250, 253, 238, 130, 149, 204, 80, 89, 236, 84, 50, 91, 205, 171, 151, 17, 255, 190, 107, 29, 21, 125, 70, 34, 8, 139, 125, 32, 148, 124, 253, 135, 160, 114, 225, 244, 29, 129, 226, 237, 180, 151, 238, 3, 148, 114, 80, 6, 33, 5, 138, 248, 218, 88, 246, 188, 197, 94, 108, 161, 221, 179, 104, 169, 15, 134, 40, 160, 156, 39, 212, 22, 23, 208, 194, 194, 122, 36, 3, 253, 80, 115, 93, 183, 185, 214, 243, 85, 43, 54, 168, 210, 85, 137, 123, 80, 152, 235, 134, 104, 191, 71, 42, 11, 37, 201, 255, 49, 45, 230, 62, 178, 252, 197, 161, 227, 7, 71, 219, 98, 87, 250, 19, 54, 235, 59, 242, 23, 252, 231, 173, 175, 231, 95, 53, 130, 152, 124, 244, 57, 223, 137, 248, 248, 206, 106, 89, 140, 151, 132, 90, 78, 187, 15, 129, 63, 207, 102, 109, 227, 134, 114, 23, 177, 252, 64, 83, 53, 242, 158, 199, 84, 166, 35, 106, 128, 250, 54, 129, 151, 119, 236, 214, 50, 234, 198, 94, 18, 33, 73, 191, 119, 93, 81, 117, 163, 55, 19, 109, 155, 119, 85, 133, 94, 103, 12, 29, 148, 139, 148, 46, 253, 64, 182, 227, 203, 6, 209, 145, 53, 30, 252, 129, 136, 187, 132, 127, 163, 216, 98, 11, 101, 205, 243, 138, 191, 89, 48, 250, 25, 13, 90, 177, 24, 167, 18, 144, 92, 151, 19, 225, 220, 254, 75, 98, 194, 49, 0, 247, 46, 71, 90, 131, 2, 82, 194, 174, 11, 104, 173, 165, 170, 45, 238, 38, 168, 38, 99, 103, 84, 85, 96, 135, 126, 93, 2, 197, 88, 191, 20, 183, 164, 197, 27, 171, 171, 94, 74, 28, 214, 194, 73, 222, 127, 246, 206, 166, 241, 185, 147, 193, 47, 61, 156, 201, 123, 18, 13, 240, 91, 247, 17, 162, 121, 40, 110, 58, 43, 11, 61, 222, 246, 37, 203, 198, 69, 48, 191, 243, 193, 12, 110, 254, 79, 128, 211, 97, 98, 156, 25, 225, 213, 50, 190, 252, 8, 177, 224, 90, 131, 243, 136, 230, 205, 119, 5, 201, 157, 11, 116, 98, 153, 15, 250, 13, 211, 155, 235, 200, 237, 169, 234, 234, 86, 96, 211, 210, 169, 253, 57, 133, 150, 32, 164, 246, 184, 132, 85, 118, 185, 170, 3, 158, 218, 136, 34, 14, 204, 174, 57, 5, 75, 71, 187, 167, 154, 13, 168, 117, 196, 138, 3, 47, 150, 134, 102, 206, 35, 77, 160, 142, 228, 86, 24, 128, 70, 80, 7, 203, 63, 155, 169, 94, 187, 132, 232, 169, 220, 99, 238, 120, 196, 40, 180, 187, 240, 74, 201, 215, 69, 232, 89, 26, 247, 114, 121, 255, 30, 204, 207, 21, 107, 181, 3, 100, 76, 20, 171, 237, 193, 152, 115, 156, 147, 31, 108, 85, 29, 172, 23, 201, 50, 19, 186, 112, 167, 222, 143, 121, 198, 175, 191, 196, 3, 175, 162, 84, 75, 37, 209, 59, 249, 97, 48, 219, 126, 153, 142, 11, 108, 117, 208, 246, 116, 47, 15, 30, 3, 67, 22, 54, 252, 169, 54, 170, 118, 53, 20, 215, 240, 106, 17, 39, 208, 25, 58, 1, 108, 52, 157, 7, 82, 222, 32, 9, 212, 20, 181, 202, 170, 17, 20, 108, 51, 109, 176, 154, 220, 238, 62, 170, 255, 135, 146, 175, 123, 171, 166, 68, 26, 38, 68, 6, 104, 224, 190, 92, 74, 166, 107, 137, 139, 140, 96, 47, 203, 181, 251, 202, 205, 93, 205, 245, 111, 35, 192, 170, 45, 47, 87, 111, 253, 117, 26, 91, 42, 144, 120, 179, 119, 70, 178, 61, 81, 117, 223, 101, 193, 130, 148, 120, 40, 106, 103, 162, 39, 2, 184, 192, 150, 19, 30, 201, 180, 119, 79, 169, 185, 223, 144, 14, 14, 150, 54, 26, 42, 157, 216, 177, 111, 70, 72, 153, 140, 208, 184, 170, 212, 184, 224, 26, 151, 244, 2, 251, 25, 24, 163, 16, 127, 200, 100, 192, 7, 221, 35, 102, 164, 228, 68, 207, 242, 46, 181, 35, 129, 43, 183, 37, 124, 241, 104, 74, 144, 61, 15, 26, 116, 10, 133, 126, 33, 10, 78, 129, 88, 197, 65, 125, 86, 14, 43, 67, 25, 124, 92, 188, 119, 144, 110, 66, 234, 208, 195, 164, 120, 51, 62, 171, 90, 11, 203, 107, 70, 246, 17, 243, 33, 32, 62, 69, 155, 174, 123, 124, 25, 53, 196, 73, 4, 113, 108, 107, 133, 164, 32, 255, 58, 116, 174, 255, 22, 168, 83, 53, 16, 75, 185, 28, 206, 50, 240, 183, 139, 180, 71, 161, 189, 14, 254, 231, 117, 203, 222, 21, 21, 109, 76, 62, 74, 1, 171, 93, 135, 170, 209, 88, 27, 65, 125, 116, 134, 208, 194, 233, 219, 163, 107, 211, 140, 74, 205, 234, 17, 102, 210, 114, 237, 165, 15, 15, 185, 134, 205, 241, 29, 84, 136, 119, 129, 26, 152, 164, 147, 12, 0, 64, 58, 84, 56, 184, 39, 176, 82, 46, 57, 53, 43, 58, 206, 192, 72, 123, 18, 223, 84, 18, 41, 179, 251, 251, 38, 96, 10, 144, 137, 85, 177, 27, 13, 210, 84, 248, 32, 219, 240, 215, 200, 41, 188, 26, 245, 220, 54, 118, 182, 90, 116, 245, 183, 22, 160, 128, 147, 94, 201, 77, 75, 171, 17, 63, 179, 121, 28, 184, 61, 107, 120, 86, 9, 49, 221, 108, 253, 86, 209, 208, 141, 52, 248, 248, 253, 155, 31, 155, 241, 195, 170, 201, 122, 41, 80, 81, 75, 169, 220, 246, 39, 59, 85, 1, 136, 144, 96, 205, 104, 43, 51, 11, 173, 69, 205, 235, 210, 44, 100, 163, 154, 100, 233, 181, 164, 123, 103, 102, 36, 151, 19, 253, 76, 74, 18, 118, 155, 201, 100, 44, 213, 149, 41, 160, 31, 220, 125, 143, 135, 233, 112, 64, 36, 110, 184, 89, 0, 13, 18, 160, 50, 207, 98, 67, 66, 22, 156, 37, 206, 149, 25, 109, 103, 244, 84, 91, 159, 254, 248, 74, 163, 104, 166, 138, 216, 23, 103, 59, 157, 202, 140, 144, 70, 43, 94, 29, 137, 123, 199, 39, 78, 20, 177, 239, 150, 162, 202, 76, 186, 214, 86, 219, 34, 181, 237, 106, 44, 42, 36, 140, 234, 54, 80, 88, 237, 61, 49, 182, 17, 123, 44, 81, 41, 230, 241, 183, 51, 198, 40, 248, 137, 185, 48, 34, 171, 219, 143, 71, 134, 188, 134, 94, 5, 62, 146, 55, 244, 171, 12, 60, 68, 131, 96, 148, 246, 238, 74, 167, 154, 230, 48, 139, 213, 239, 140, 162, 115, 203, 11, 35, 197, 46, 171, 44, 225, 14, 87, 93, 26, 245, 27, 158, 83, 30, 186, 114, 234, 245, 178, 153, 110, 195, 150, 64, 115, 150, 210, 124, 85, 35, 2, 178, 169, 22, 104, 160, 231, 117, 222, 219, 63, 167, 140, 140, 76, 115, 27, 8, 44, 147, 118, 44, 198, 224, 14, 243, 240, 234, 22, 37, 47, 250, 148, 6, 182, 62, 79, 184, 164, 34, 167, 168, 47, 245, 222, 219, 171, 40, 247, 132, 64, 139, 60, 81, 117, 222, 72, 174, 113, 67, 28, 35, 88, 255, 4, 169, 228, 138, 198, 254, 152, 47, 52, 26, 139, 174, 40, 119, 234, 224, 234, 183, 133, 134, 73, 39, 215, 224, 34, 212, 200, 48, 116, 63, 33, 58, 230, 235, 107, 231, 146, 212, 202, 100, 167, 146, 218, 101, 178, 116, 225, 26, 162, 229, 202, 176, 176, 133, 240, 206, 244, 230, 140, 104, 251, 36, 71, 10, 87, 48, 245, 51, 148, 251, 124, 161, 160, 42, 33, 67, 42, 145, 253, 254, 168, 161, 135, 119, 246, 100, 82, 106, 118, 95, 10, 88, 90, 115, 30, 194, 26, 124, 14, 99, 175, 7, 36, 86, 1, 68, 58, 48, 157, 49, 225, 81, 90, 138, 32, 232, 23, 75, 44, 206, 165, 177, 243, 114, 48, 241, 251, 110, 214, 4, 74, 129, 216, 223, 98, 149, 106, 184, 123, 39, 138, 153, 103, 233, 139, 42, 96, 93, 29, 172, 40, 24, 16, 204, 229, 123, 100, 8, 180, 84, 244, 208, 68, 156, 122, 43, 136, 132, 35, 30, 178, 247, 69, 252, 236, 152, 153, 105, 77, 99, 224, 36, 245, 243, 59, 240, 55, 33, 222, 26, 41, 23, 173, 26, 86, 198, 213, 46, 147, 192, 255, 53, 65, 192, 102, 153, 67, 129, 195, 87, 173, 154, 66, 44, 208, 60, 126, 238, 79, 204, 134, 117, 85, 203, 235, 224, 29, 2, 204, 69, 85, 255, 54, 166, 140, 70, 156, 244, 6, 23, 141, 82, 205, 58, 193, 201, 194, 213, 169, 1, 254, 27, 217, 16, 25, 187, 232, 105, 37, 62, 84, 195, 62, 225, 255, 216, 33, 92, 149, 200, 82, 102, 131, 139, 23, 125, 142, 29, 179, 234, 100, 62, 140, 120, 206, 169, 194, 91, 85, 125, 236, 117, 145, 84, 154, 69, 8, 137, 8, 254, 198, 55, 53, 253, 97, 53, 101, 47, 178, 196, 13, 253, 98, 73, 169, 9, 119, 232, 54, 80, 116, 58, 54, 20, 217, 229, 200, 33, 65, 185, 8, 49, 205, 116, 165, 111, 97, 226, 151, 183, 55, 39, 130, 159, 207, 192, 106, 119, 254, 48, 201, 238, 209, 134, 45, 247, 151, 150, 62, 168, 188, 221, 110, 4, 8, 140, 16, 25, 37, 143, 235, 57, 56, 3, 106, 89, 195, 80, 68, 244, 109, 124, 158, 72, 196, 90, 139, 27, 76, 59, 206, 194, 84, 178, 139, 38, 159, 146, 158, 50, 211, 39, 142, 59, 36, 49, 194, 41, 239, 136, 14, 225, 11, 131, 20, 158, 84, 243, 173, 163, 14, 6, 168, 179, 195, 196, 185, 75, 64, 184, 244, 95, 242, 56, 156, 4, 77, 182, 176, 214, 134, 34, 244, 234, 144, 236, 245, 231, 85, 5, 41, 14, 223, 56, 5, 76, 61, 167, 39, 196, 51, 100, 250, 162, 243, 8, 218, 250, 101, 148, 28, 3, 24, 210, 187, 226, 6, 90, 115, 170, 37, 221, 222, 111, 11, 58, 23, 230, 98, 133, 224, 98, 103, 123, 89, 253, 115, 230, 3, 61, 187, 111, 29, 52, 233, 154, 34, 32, 115, 207, 218, 54, 233, 56, 111, 125, 239, 77, 156, 3, 163, 238, 103, 77, 16, 145, 228, 187, 168, 244, 25, 132, 200, 244, 108, 181, 76, 210, 39, 194, 14, 129, 76, 80, 224, 159, 188, 114, 138, 172, 63, 100, 97, 6, 132, 87, 10, 93, 90, 5, 177, 235, 192, 211, 99, 17, 91, 207, 151, 143, 42, 241, 24, 149, 56, 20, 212, 118, 151, 236, 176, 35, 40, 95, 176, 50, 51, 90, 253, 223, 20, 182, 198, 86, 21, 248, 173, 10, 0, 122, 125, 247, 207, 194, 49, 191, 124, 98, 233, 81, 220, 87, 90, 204, 83, 206, 42, 252, 250, 100, 49, 214, 253, 72, 193, 55, 36, 87, 129, 10, 59, 145, 164, 59, 83, 30, 26, 224, 104, 173, 112, 30, 70, 158, 241, 164, 100, 232, 158, 102, 254, 160, 58, 208, 108, 45, 89, 179, 251, 119, 126, 177, 59, 75, 43, 149, 107, 75, 111, 206, 143, 85, 65, 160, 240, 204, 206, 143, 52, 174, 148, 15, 19, 129, 138, 71, 65, 243, 113, 210, 128, 65, 163, 112, 191, 1, 199, 47, 223, 31, 182, 38, 77, 209, 174, 124, 198, 40, 216, 122, 158, 60, 44, 87, 182, 46, 147, 39, 67, 111, 158, 207, 26, 156, 172, 189, 147, 37, 239, 208, 243, 167, 111, 88, 66, 89, 209, 233, 148, 245, 194, 95, 120, 70, 171, 121, 16, 96, 12, 202, 207, 99, 122, 141, 99, 206, 181, 109, 1, 247, 4, 158, 105, 65, 67, 229, 211, 18, 121, 84, 189, 122, 165, 85, 15, 112, 222, 254, 150, 68, 159, 126, 121, 160, 79, 24, 185, 144, 161, 203, 162, 47, 125, 25, 211, 130, 239, 248, 135, 88, 222, 253, 192, 4, 86, 10, 253, 77, 14, 243, 238, 11, 244, 95, 191, 20, 44, 232, 172, 193, 150, 122, 31, 169, 210, 48, 25, 216, 137, 233, 235, 101, 69, 41, 32, 35, 3, 85, 84, 93, 94, 146, 114, 131, 151, 248, 36, 106, 131, 72, 245, 189, 149, 63, 167, 227, 81, 219, 102, 33, 247, 79, 237, 253, 145, 146, 90, 211, 143, 214, 150, 47, 255, 4, 242, 105, 24, 250, 65, 152, 76, 73, 66, 197, 33, 156, 44, 253, 4, 243, 206, 154, 134, 113, 121, 171, 24, 4, 138, 216, 127, 43, 1, 251, 208, 149, 112, 91, 86, 180, 187, 142, 15, 206, 114, 44, 125, 178, 209, 86, 178, 11, 108, 210, 180, 176, 186, 35, 164, 176, 78, 106, 23, 49, 235, 196, 112, 55, 155, 145, 85, 10, 220, 33, 125, 53, 168, 241, 219, 244, 21, 50, 143, 66, 207, 13, 98, 13, 68, 231, 157, 19, 27, 219, 226, 204, 242, 134, 0, 82, 116, 133, 178, 144, 8, 53, 143, 140, 179, 131, 88, 248, 208, 250, 106, 179, 85, 132, 221, 103, 146, 1, 73, 112, 178, 192, 118, 104, 40, 211, 213, 210, 26, 188, 54, 217, 67, 30, 193, 108, 43, 68, 116, 95, 209, 249, 168, 205, 87, 129, 151, 5, 123, 107, 236, 17, 110, 166, 229, 96, 187, 227, 64, 116, 58, 175, 76, 0, 253, 42, 89, 86, 217, 128, 40, 119, 228, 37, 26, 35, 189, 219, 86, 66, 29, 219, 210, 124, 14, 37, 164, 127, 49, 104, 255, 164, 204, 16, 18, 58, 228, 132, 210, 221, 43, 75, 175, 227, 40, 4, 42, 242, 33, 79, 2, 17, 169, 148, 137, 206, 113, 4, 80, 69, 10, 97, 84, 186, 218, 135, 43, 94, 173, 98, 134, 219, 163, 168, 213, 226, 188, 123, 159, 55, 146, 234, 249, 109, 105, 69, 183, 61, 11, 71, 247, 154, 233, 208, 19, 20, 229, 200, 208, 58, 44, 167, 220, 235, 41, 174, 133, 215, 72, 74, 18, 155, 101, 172, 96, 235, 19, 76, 250, 248, 251, 53, 200, 81, 238, 234, 56, 230, 159, 70, 56, 130, 93, 206, 144, 214, 117, 213, 53, 212, 89, 13, 182, 133, 196, 21, 12, 210, 90, 29, 175, 184, 41, 0, 12, 36, 60, 172, 28, 17, 126, 169, 63, 230, 197, 4, 83, 250, 191, 109, 189, 65, 203, 182, 117, 219, 57, 39, 129, 78, 201, 132, 110, 210, 155, 99, 217, 214, 131, 109, 197, 118, 133, 56, 35, 241, 200, 153, 173, 149, 99, 211, 151, 251, 247, 59, 181, 165, 46, 183, 128, 128, 68, 245, 19, 200, 202, 122, 135, 194, 63, 33, 66, 21, 141, 60, 196, 158, 233, 83, 45, 103, 253, 239, 93, 2, 243, 6, 216, 30, 65, 168, 13, 54, 246, 173, 207, 112, 250, 145, 106, 6, 78, 14, 215, 62, 219, 68, 228, 41, 57, 190, 184, 99, 102, 220, 181, 96, 63, 98, 65, 192, 168, 60, 101, 36, 98, 15, 90, 136, 144, 99, 61, 40, 154, 214, 29, 30, 98, 137, 246, 181, 214, 73, 217, 208, 123, 212, 22, 27, 1, 93, 174, 191, 164, 63, 144, 33, 123, 229, 255, 103, 135, 21, 220, 250, 171, 255, 188, 40, 98, 94, 79, 200, 144, 41, 83, 170, 30, 196, 80, 127, 216, 13, 156, 173, 133, 33, 188, 60, 110, 153, 68, 158, 83, 137, 30, 212, 253, 165, 2, 218, 186, 244, 238, 158, 40, 94, 145, 81, 84, 100, 184, 189, 166, 17, 37, 191, 2, 129, 216, 202, 17, 77, 252, 68, 242, 165, 125, 255, 16, 190, 206, 109, 197, 224, 6, 206, 138, 66, 80, 52, 249, 246, 108, 67, 110, 147, 110, 84, 34, 250, 169, 91, 59, 244, 89, 150, 77, 84, 107, 46, 47, 40, 230, 12, 18, 73, 120, 243, 11, 85, 131, 211, 165, 135, 243, 47, 139, 217, 141, 45, 105, 111, 125, 255, 125, 106, 77, 246, 153, 75, 54, 75, 243, 215, 19, 236, 229, 26, 118, 255, 215, 78, 176, 204, 29, 158, 206, 58, 159, 108, 148, 239, 235, 110, 95, 255, 177, 16, 32, 200, 78, 210, 219, 228, 66, 181, 135, 232, 32, 88, 117, 172, 58, 89, 250, 146, 250, 248, 247, 28, 167, 94, 218, 50, 94, 157, 151, 52, 146, 2, 7, 46, 124, 50, 211, 142, 229, 173, 164, 232, 127, 152, 74, 31, 153, 209, 255, 113, 249, 190, 87, 234, 14, 49, 12, 61, 213, 67, 34, 126, 2, 80, 58, 138, 173, 58, 17, 95, 219, 194, 79, 25, 198, 224, 59, 56, 36, 38, 56, 2, 154, 231, 13, 1, 230, 171, 244, 19, 103, 82, 170, 125, 54, 149, 24, 3, 232, 187, 148, 150, 12, 173, 228, 91, 92, 58, 36, 166, 114, 136, 79, 110, 197, 50, 111, 220, 171, 5, 240, 29, 219, 111, 18, 250, 10, 9, 0, 33, 223, 185, 191, 15, 228, 9, 95, 235, 104, 143, 187, 161, 166, 19, 126, 199, 204, 119, 182, 20, 84, 2, 113, 126, 113, 233, 142, 152, 93, 16, 233, 127, 246, 0, 238, 21, 226, 12, 23, 4, 56, 42, 233, 162, 20, 15, 79, 105, 7, 131, 219, 111, 116, 137, 82, 34, 250, 181, 71, 220, 125, 181, 203, 52, 65, 242, 86, 249, 184, 3, 46, 159, 97, 6, 159, 208, 248, 65, 129, 160, 84, 109, 22, 100, 17, 161, 56, 108, 32, 38, 70, 156, 83, 74, 214, 246, 45, 144, 18, 117, 54, 68, 125, 205, 1, 65, 128, 225, 2, 241, 223, 194, 1, 87, 161, 85, 49, 247, 16, 107, 215, 113, 64, 14, 51, 157, 149, 103, 21, 110, 134, 142, 88, 94, 175, 218, 14, 112, 61, 80, 112, 4, 127, 118, 254, 165, 84, 233, 150, 165, 104, 128, 238, 159, 33, 27, 38, 21, 4, 198, 15, 166, 152, 142, 194, 98, 27, 22, 58, 221, 113, 216, 108, 40, 65, 2, 147, 31, 158, 157, 64, 179, 90, 189, 135, 8, 55, 105, 251, 206, 110, 89, 129, 208, 128, 199, 14, 171, 243, 51, 55, 215, 79, 25, 165, 51, 193, 241, 123, 193, 247, 164, 137, 110, 156, 236, 109, 41, 223, 92, 196, 228, 5, 100, 23, 139, 197, 19, 125, 43, 166, 8, 174, 40, 188, 167, 216, 248, 139, 244, 24, 1, 241, 99, 113, 136, 49, 15, 145, 59, 131, 71, 35, 147, 200, 67, 247, 101, 88, 86, 0, 5, 120, 103, 204, 118, 79, 157, 0, 74, 36, 32, 71, 139, 17, 13, 13, 163, 4, 109, 2, 174, 235, 6, 113, 52, 81, 91, 199, 166, 238, 252, 169, 109, 203, 225, 102, 20, 136, 130, 109, 102, 84, 136, 237, 100, 91, 97, 193, 44, 198, 194, 31, 197, 106, 126, 179, 0, 233, 77, 151, 96, 28, 198, 242, 26, 42, 70, 104, 224, 150, 184, 157, 232, 202, 255, 200, 66, 14, 216, 185, 69, 220, 190, 239, 69, 90, 7, 118, 190, 65, 227, 137, 25, 81, 56, 227, 181, 7, 230, 72, 32, 77, 65, 61, 43, 84, 69, 145, 32, 10, 168, 19, 127, 61, 84, 225, 187, 89, 234, 39, 67, 120, 254, 39, 15, 74, 106, 124, 15, 113, 52, 17, 189, 86, 76, 79, 219, 202, 21, 114, 38, 107, 21, 31, 90, 69, 10, 10, 74, 206, 170, 33, 213, 161, 187, 140, 245, 204, 175, 224, 23, 118, 198, 207, 4, 28, 82, 59, 91, 101, 214, 214, 205, 205, 145, 27, 126, 235, 27, 209, 204, 37, 169, 53, 230, 147, 70, 167, 185, 183, 243, 54, 206, 92, 67, 47, 101, 120, 2, 224, 35, 52, 209, 16, 211, 44, 158, 21, 55, 7, 102, 75, 66, 81, 188, 103, 164, 154, 124, 160, 59, 68, 25, 111, 45, 29, 57, 146, 26, 210, 126, 182, 107, 204, 4, 142, 237, 54, 190, 55, 61, 2, 16, 193, 205, 38, 97, 253, 233, 177, 35, 76, 134, 109, 61, 224, 244, 10, 237, 54, 218, 81, 49, 132, 96, 204, 68, 247, 173, 59, 80, 95, 45, 231, 215, 40, 38, 7, 2, 159, 158, 237, 145, 84, 8, 211, 125, 7, 196, 197, 7, 162, 78, 139, 254, 170, 111, 236, 132, 112, 138, 247, 144, 35, 208, 11, 250, 218, 119, 90, 104, 68, 127, 114, 207, 148, 21, 206, 223, 144, 56, 190, 164, 165, 240, 50, 32, 87, 47, 77, 40, 90, 235, 222, 56, 48, 118, 187, 26, 60, 156, 199, 97, 241, 152, 161, 75, 175, 97, 245, 75, 255, 99, 174, 90, 198, 81, 221, 168, 162, 177, 220, 111, 52, 192, 78, 140, 91, 240, 45, 103, 231, 115, 97, 189, 198, 94, 37, 166, 128, 206, 10, 80, 228, 69, 170, 131, 168, 151, 85, 99, 113, 247, 111, 43, 53, 216, 240, 105, 121, 120, 190, 85, 73, 87, 11, 119, 20, 83, 9, 105, 171, 60, 243, 99, 19, 137, 70, 62, 169, 207, 41, 217, 75, 129, 194, 108, 77, 160, 248, 149, 87, 89, 44, 49, 93, 175, 6, 40, 158, 108, 20, 119, 21, 112, 240, 223, 23, 169, 200, 230, 137, 22, 41, 238, 201, 36, 115, 9, 25, 184, 18, 153, 251, 107, 186, 12, 153, 230, 78, 199, 180, 238, 135, 123, 66, 226, 101, 104, 247, 151, 221, 255, 95, 236, 37, 18, 240, 209, 80, 174, 145, 193, 248, 165, 10, 145, 101, 114, 98, 11, 213, 122, 164, 61, 38, 66, 241, 105, 52, 213, 33, 255, 203, 28, 246, 4, 228, 245, 223, 187, 118, 210, 199, 243, 246, 232, 58, 103, 118, 210, 139, 81, 243, 123, 25, 244, 123, 148, 25, 191, 28, 192, 142, 50, 239, 206, 215, 253, 181, 192, 87, 46, 20, 120, 177, 160, 151, 249, 250, 227, 175, 2, 167, 235, 47, 243, 210, 22, 162, 89, 113, 211, 179, 142, 43, 46, 245, 62, 183, 128, 17, 64, 217, 120, 252, 148, 236, 80, 8, 59, 219, 165, 129, 190, 212, 30, 254, 75, 146, 209, 65, 183, 150, 194, 73, 144, 132, 194, 127, 79, 30, 223, 51, 151, 49, 133, 110, 206, 159, 204, 21, 75, 230, 26, 67, 243, 119, 65, 34, 106, 201, 69, 176, 235, 123, 46, 159, 18, 58, 147, 56, 162, 156, 15, 173, 219, 124, 49, 254, 147, 232, 80, 7, 175, 11, 218, 206, 218, 78, 170, 51, 64, 175, 80, 121, 207, 72, 112, 6, 25, 131, 177, 106, 43, 85, 78, 42, 36, 84, 144, 66, 62, 93, 196, 190, 201, 148, 7, 215, 124, 75, 25, 239, 132, 77, 94, 61, 67, 71, 217, 35, 62, 206, 14, 201, 5, 197, 21, 164, 119, 213, 231, 216, 204, 158, 78, 82, 10, 15, 61, 189, 199, 240, 233, 125, 41, 238, 45, 156, 23, 212, 213, 211, 60, 112, 195, 80, 216, 103, 82, 38, 133, 74, 174, 91, 202, 99, 104, 22, 153, 92, 185, 83, 88, 0, 133, 39, 114, 147, 156, 228, 192, 181, 127, 205, 117, 213, 22, 74, 134, 129, 118, 64, 1, 39, 154, 98, 180, 163, 227, 192, 9, 70, 6, 234, 172, 6, 131, 59, 226, 55, 83, 81, 135, 55, 165, 111, 209, 50, 126, 70, 171, 227, 242, 137, 175, 12, 228, 78, 30, 191, 161, 251, 102, 151, 167, 113, 146, 203, 215, 32, 143, 171, 136, 163, 72, 197, 56, 110, 199, 156, 191, 48, 9, 22, 216, 102, 0, 163, 44, 208, 192, 82, 178, 26, 61, 164, 228, 190, 249, 211, 40, 17, 66, 11, 11, 151, 202, 100, 124, 52, 6, 216, 184, 249, 53, 115, 187, 232, 164, 108, 114, 198, 149, 174, 23, 240, 249, 7, 79, 156, 91, 87, 204, 230, 201, 244, 69, 242, 24, 175, 126, 60, 213, 56, 171, 167, 80, 128, 74, 204, 100, 121, 219, 189, 177, 167, 52, 88, 17, 110, 215, 157, 197, 125, 21, 141, 199, 24, 19, 108, 137, 110, 40, 4, 177, 62, 95, 159, 138, 213, 203, 223, 84, 248, 62, 198, 23, 209, 30, 184, 167, 19, 129, 59, 242, 3, 57, 169, 65, 166, 57, 190, 1, 210, 211, 242, 167, 233, 250, 115, 218, 81, 244, 103, 153, 43, 236, 20, 173, 247, 47, 200, 55, 252, 84, 178, 134, 1, 135, 100, 218, 185, 220, 229, 224, 231, 85, 120, 227, 221, 74, 1, 95, 20, 185, 209, 74, 81, 1, 146, 88, 223, 103, 248, 218, 129, 170, 106, 176, 127, 2, 97, 25, 69, 38, 97, 252, 34, 66, 56, 109, 185, 197, 143, 207, 84, 55, 169, 0, 2, 201, 118, 221, 18, 218, 158, 163, 81, 34, 115, 70, 206, 60, 241, 191, 171, 209, 203, 86, 185, 101, 248, 86, 141, 224, 176, 30, 86, 62, 207, 141, 119, 25, 162, 44, 53, 199, 140, 216, 201, 182, 125, 175, 193, 144, 6, 95, 121, 255, 131, 133, 173, 90, 10, 102, 213, 63, 100, 164, 8, 94, 165, 183, 42, 156, 70, 59, 25, 244, 168, 210, 126, 126, 143, 200, 202, 29, 187, 227, 224, 87, 26, 210, 40, 45, 197, 216, 217, 81, 16, 127, 99, 99, 59, 251, 26, 72, 146, 229, 26, 2, 88, 79, 161, 202, 204, 67, 232, 37, 14, 150, 251, 128, 27, 86, 132, 65, 106, 34, 52, 120, 77, 163, 229, 151, 61, 195, 28, 82, 8, 158, 42, 197, 24, 110, 215, 151, 202, 41, 252, 84, 225, 201, 59, 130, 129, 247, 49, 56, 155, 219, 56, 64, 64, 174, 34, 34, 176, 154, 18, 2, 163, 199, 119, 229, 66, 108, 212, 93, 159, 218, 43, 80, 134, 158, 14, 104, 156, 172, 178, 121, 25, 52, 84, 214, 40, 78, 46, 85, 144, 98, 174, 70, 121, 168, 10, 51, 151, 23, 0, 93, 99, 66, 187, 215, 226, 13, 220, 104, 202, 192, 30, 172, 110, 105, 189, 247, 58, 180, 210, 196, 216, 1, 236, 87, 67, 163, 89, 103, 34, 139, 235, 70, 157, 182, 74, 200, 158, 210, 23, 243, 153, 38, 129, 234, 207, 141, 33, 195, 63, 93, 174, 243, 190, 78, 174, 207, 253, 169, 113, 255, 24, 216, 163, 184, 123, 161, 122, 111, 143, 59, 187, 83, 229, 99, 118, 236, 233, 149, 158, 4, 118, 25, 186, 49, 126, 199, 71, 198, 67, 30, 124, 127, 255, 109, 212, 124, 165, 135, 14, 5, 7, 231, 11, 182, 108, 164, 168, 27, 213, 230, 45, 138, 221, 62, 136, 97, 98, 214, 60, 18, 225, 100, 240, 99, 83, 7, 80, 172, 191, 168, 177, 115, 255, 90, 151, 64, 122, 44, 58, 178, 99, 13, 129, 135, 230, 194, 138, 247, 205, 251, 49, 137, 80, 203, 7, 61, 226, 24, 65, 175, 83, 0, 57, 253, 220, 84, 54, 33, 8, 211, 116, 44, 71, 109, 195, 209, 218, 245, 93, 33, 156, 98, 238, 201, 43, 175, 114, 17, 136, 68, 131, 124, 167, 113, 192, 241, 211, 57, 187, 135, 124, 59, 166, 152, 70, 128, 78, 251, 226, 245, 86, 97, 215, 223, 239, 130, 119, 155, 138, 16, 99, 214, 177, 211, 195, 70, 226, 95, 110, 209, 210, 209, 24, 70, 158, 192, 46, 135, 241, 16, 233, 12, 140, 55, 164, 206, 96, 115, 8, 53, 106, 29, 177, 113, 239, 108, 246, 11, 202, 66, 40, 207, 45, 220, 96, 208, 81, 154, 145, 198, 243, 255, 175, 209, 193, 65, 21, 243, 63, 122, 55, 109, 175, 142, 121, 137, 249, 131, 190, 72, 222, 181, 226, 36, 181, 27, 253, 36, 17, 240, 42, 212, 11, 106, 216, 64, 196, 206, 219, 95, 13, 123, 74, 64, 103, 216, 201, 131, 73, 24, 195, 184, 158, 230, 38, 124, 1, 120, 133, 196, 76, 239, 17, 28, 38, 119, 55, 61, 50, 142, 9, 182, 97, 36, 195, 32, 13, 92, 175, 134, 17, 229, 205, 56, 221, 114, 191, 48, 73, 171, 223, 214, 62, 58, 33, 20, 40, 189, 176, 224, 100, 229, 17, 148, 160, 148, 25, 68, 180, 24, 154, 84, 167, 74, 187, 147, 237, 232, 109, 194, 234, 76, 11, 170, 33, 171, 233, 89, 7, 241, 173, 255, 80, 119, 190, 86, 234, 0, 26, 243, 201, 27, 36, 102, 5, 38, 206, 18, 229, 169, 1, 196, 43, 249, 3, 207, 3, 244, 243, 161, 165, 105, 151, 187, 120, 164, 100, 114, 225, 38, 7, 217, 129, 138, 219, 8, 139, 46, 72, 167, 220, 35, 201, 32, 76, 194, 178, 200, 150, 4, 162, 158, 238, 124, 5, 243, 67, 89, 156, 23, 123, 232, 115, 128, 158, 220, 223, 250, 239, 119, 167, 198, 141, 88, 155, 110, 21, 39, 66, 146, 21, 225, 136, 68, 107, 218, 107, 233, 22, 234, 188, 199, 43, 111, 110, 235, 230, 113, 254, 230, 59, 206, 247, 249, 32, 216, 92, 67, 77, 250, 18, 164, 105, 188, 251, 217, 91, 75, 42, 187, 163, 249, 238, 91, 204, 84, 182, 83, 106, 10, 209, 129, 134, 88, 134, 222, 118, 129, 14, 44, 76, 89, 47, 235, 166, 43, 126, 3, 9, 121, 2, 50, 183, 76, 147, 57, 176, 232, 220, 9, 184, 107, 248, 253, 53, 119, 35, 3, 159, 249, 77, 174, 98, 248, 165, 148, 251, 124, 144, 238, 48, 248, 189, 61, 88, 191, 31, 19, 1, 85, 48, 155, 8, 153, 63, 163, 175, 147, 133, 232, 57, 188, 188, 6, 128, 3, 120, 27, 24, 99, 246, 63, 188, 136, 67, 147, 231, 192, 50, 174, 249, 2, 250, 0, 72, 46, 108, 131, 237, 16, 146, 21, 110, 51, 254, 117, 72, 92, 119, 217, 50, 113, 142, 251, 17, 37, 216, 146, 244, 221, 212, 212, 203, 45, 173, 106, 137, 11, 170, 125, 104, 159, 58, 93, 204, 139, 112, 186, 7, 80, 224, 140, 162, 18, 203, 254, 152, 1, 137, 186, 116, 236, 85, 36, 41, 35, 200, 176, 8, 102, 167, 20, 237, 160, 210, 38, 28, 82, 116, 160, 193, 49, 18, 149, 111, 18, 101, 23, 39, 13, 153, 139, 95, 26, 47, 74, 248, 28, 207, 177, 36, 204, 66, 55, 229, 210, 90, 81, 159, 233, 92, 219, 129, 252, 63, 4, 69, 124, 11, 140, 217, 153, 236, 157, 171, 64, 21, 249, 137, 40, 51, 158, 190, 111, 44, 158, 236, 197, 71, 92, 30, 135, 169, 121, 30, 80, 1, 124, 38, 236, 163, 240, 56, 115, 200, 236, 169, 240, 12, 250, 16, 214, 34, 63, 50, 22, 133, 163, 182, 172, 113, 57, 219, 126, 173, 39, 136, 230, 57, 194, 192, 120, 49, 203, 4, 212, 3, 221, 5, 184, 40, 121, 217, 10, 125, 124, 209, 66, 174, 125, 103, 249, 221, 111, 227, 92, 163, 171, 170, 228, 206, 229, 52, 53, 13, 18, 68, 42, 230, 243, 222, 78, 114, 251, 163, 211, 69, 33, 231, 216, 62, 93, 178, 32, 18, 191, 169, 1, 125, 104, 80, 237, 129, 127, 18, 193, 105, 69, 65, 60, 46, 70, 40, 50, 131, 156, 236, 109, 177, 234, 19, 42, 169, 153, 109, 93, 95, 245, 89, 43, 188, 184, 97, 160, 53, 121, 91, 73, 139, 107, 113, 132, 238, 17, 184, 4, 69, 119, 239, 37, 248, 95, 128, 141, 173, 246, 49, 73, 21, 105, 82, 97, 138, 63, 82, 123, 75, 207, 139, 226, 90, 183, 193, 239, 111, 231, 198, 95, 28, 50, 153, 253, 168, 30, 214, 53, 216, 152, 117, 204, 57, 34, 39, 5, 162, 1, 10, 76, 210, 121, 143, 91, 130, 247, 141, 113, 247, 197, 240, 205, 244, 238, 26, 84, 67, 32, 114, 221, 188, 66, 126, 78, 202, 151, 121, 159, 140, 198, 102, 180, 148, 214, 177, 195, 12, 114, 51, 45, 26, 109, 155, 203, 107, 84, 214, 73, 88, 81, 226, 79, 173, 110, 3, 55, 233, 64, 88, 158, 229, 32, 79, 64, 207, 79, 103, 243, 66, 32, 107, 149, 214, 47, 193, 194, 220, 9, 211, 220, 21, 84, 119, 89, 36, 132, 106, 122, 227, 134, 199, 91, 164, 117, 103, 68, 1, 60, 141, 92, 154, 6, 82, 240, 134, 104, 255, 79, 89, 102, 214, 71, 108, 192, 74, 133, 252, 99, 60, 194, 10, 238, 244, 240, 40, 240, 95, 53, 151, 46, 118, 183, 35, 89, 228, 62, 18, 33, 82, 20, 7, 211, 147, 167, 204, 10, 99, 252, 58, 181, 101, 165, 156, 180, 23, 35, 155, 194, 226, 90, 7, 188, 129, 102, 92, 16, 227, 89, 154, 138, 106, 103, 54, 112, 84, 215, 254, 134, 83, 59, 162, 159, 224, 131, 221, 207, 221, 246, 164, 209, 60, 61, 68, 103, 119, 133, 107, 197, 149, 212, 64, 240, 181, 22, 223, 48, 33, 14, 170, 12, 250, 58, 106, 84, 51, 63, 217, 234, 11, 183, 197, 146, 118, 239, 7, 120, 110, 138, 188, 189, 133, 105, 157, 23, 167, 73, 45, 197, 14, 29, 123, 91, 124, 171, 56, 113, 57, 14, 128, 255, 0, 147, 32, 76, 170, 182, 68, 188, 200, 116, 88, 30, 219, 82, 49, 202, 178, 141, 182, 169, 242, 150, 67, 168, 208, 207, 84, 158, 159, 217, 240, 87, 177, 63, 16, 138, 47, 252, 77, 173, 76, 79, 172, 214, 228, 139, 82, 226, 9, 123, 160, 211, 166, 159, 234, 7, 147, 201, 96, 6, 229, 223, 23, 170, 242, 140, 32, 24, 239, 250, 136, 181, 92, 55, 190, 94, 46, 86, 112, 49, 233, 234, 229, 61, 26, 105, 78, 184, 200, 211, 157, 54, 238, 125, 199, 199, 162, 204, 164, 140, 107, 209, 177, 223, 61, 239, 155, 95, 177, 211, 118, 35, 219, 162, 232, 156, 28, 237, 155, 35, 252, 41, 34, 220, 93, 123, 208, 212, 114, 156, 123, 130, 242, 128, 137, 225, 58, 114, 221, 173, 239, 245, 78, 111, 255, 126, 235, 88, 110, 222, 27, 219, 7, 187, 93, 64, 121, 46, 254, 123, 159, 1, 234, 187, 190, 180, 131, 60, 34, 154, 189, 168, 159, 209, 24, 63, 89, 75, 64, 80, 113, 190, 161, 4, 113, 216, 34, 50, 115, 15, 244, 135, 15, 70, 117, 110, 75, 100, 159, 118, 120, 41, 170, 223, 151, 235, 52, 133, 121, 108, 5, 140, 93, 75, 32, 171, 71, 102, 30, 209, 97, 113, 250, 106, 184, 224, 43, 187, 6, 192, 183, 8, 58, 105, 31, 25, 189, 114, 240, 252, 85, 221, 192, 3, 123, 120, 157, 62, 234, 225, 87, 183, 132, 146, 128, 199, 64, 202, 22, 110, 68, 238, 109, 237, 228, 206, 38, 163, 57, 96, 176, 115, 1, 115, 193, 25, 126, 221, 124, 7, 47, 164, 42, 43, 39, 142, 116, 118, 43, 180, 4, 199, 1, 90, 94, 175, 204, 17, 132, 223, 10, 201, 6, 234, 72, 145, 230, 237, 219, 20, 233, 57, 125, 131, 31, 49, 112, 253, 111, 134, 250, 29, 102, 124, 136, 26, 217, 47, 180, 153, 48, 192, 103, 141, 148, 74, 26, 223, 38, 87, 7, 48, 31, 73, 173, 255, 172, 7, 110, 110, 97, 9, 211, 236, 221, 155, 186, 172, 216, 132, 242, 123, 45, 195, 16, 235, 152, 7, 8, 56, 17, 77, 114, 120, 21, 247, 117, 190, 5, 39, 70, 87, 220, 136, 48, 167, 225, 204, 92, 55, 2, 130, 200, 24, 115, 132, 17, 57, 152, 183, 220, 152, 136, 85, 53, 135, 52, 63, 42, 193, 128, 202, 238, 104, 243, 241, 92, 30, 123, 129, 178, 53, 133, 70, 89, 12, 110, 35, 203, 147, 68, 208, 163, 126, 42, 243, 29, 140, 162, 209, 234, 131, 15, 223, 38, 0, 152, 216, 222, 211, 57, 100, 111, 96, 196, 91, 106, 65, 228, 253, 109, 71, 188, 177, 28, 77, 105, 212, 213, 240, 4, 3, 27, 224, 89, 83, 9, 60, 194, 201, 136, 75, 25, 169, 180, 82, 77, 188, 123, 169, 223, 163, 254, 124, 42, 95, 131, 75, 215, 152, 76, 253, 220, 154, 30, 14, 188, 230, 128, 10, 109, 120, 41, 238, 189, 131, 53, 4, 25, 111, 237, 168, 25, 234, 75, 254, 152, 21, 95, 181, 231, 150, 239, 116, 99, 216, 142, 162, 112, 26, 236, 190, 73, 41, 244, 126, 78, 42, 38, 42, 123, 200, 109, 142, 93, 128, 113, 52, 23, 160, 242, 34, 161, 203, 243, 195, 174, 25, 16, 74, 52, 103, 75, 142, 243, 135, 65, 28, 23, 26, 92, 188, 240, 213, 2, 113, 201, 165, 51, 122, 131, 69, 61, 6, 255, 192, 225, 232, 30, 65, 85, 151, 125, 241, 25, 96, 21, 196, 122, 167, 83, 234, 8, 54, 156, 114, 11, 112, 205, 118, 194, 106, 104, 215, 87, 240, 84, 16, 156, 39, 131, 196, 202, 214, 57, 211, 115, 118, 61, 69, 38, 71, 0, 156, 11, 117, 123, 121, 25, 250, 50, 59, 225, 51, 9, 87, 129, 165, 192, 201, 161, 207, 163, 129, 21, 171, 125, 221, 254, 93, 179, 29, 54, 168, 98, 21, 105, 95, 242, 4, 62, 36, 98, 123, 127, 204, 183, 107, 37, 117, 48, 189, 154, 245, 203, 253, 240, 239, 95, 153, 200, 59, 70, 87, 103, 144, 65, 225, 39, 250, 254, 211, 61, 239, 136, 10, 185, 6, 98, 52, 108, 23, 46, 243, 227, 209, 88, 199, 76, 1, 30, 183, 156, 75, 77, 26, 165, 101, 214, 187, 188, 80, 190, 229, 248, 166, 63, 144, 237, 102, 54, 251, 184, 199, 2, 62, 212, 149, 26, 11, 89, 12, 86, 244, 18, 83, 70, 189, 91, 146, 63, 126, 81, 5, 187, 211, 37, 128, 27, 87, 21, 148, 221, 110, 26, 253, 231, 37, 245, 67, 8, 3, 223, 111, 10, 163, 115, 195, 197, 14, 75, 216, 253, 196, 112, 181, 226, 5, 176, 185, 44, 131, 195, 57, 229, 126, 82, 41, 4, 146, 201, 224, 53, 147, 113, 16, 114, 16, 100, 179, 93, 47, 168, 60, 198, 174, 112, 204, 241, 190, 99, 67, 45, 111, 217, 141, 225, 220, 41, 105, 230, 129, 19, 145, 248, 181, 191, 163, 100, 118, 101, 31, 49, 251, 122, 231, 236, 119, 165, 94, 236, 137, 226, 238, 131, 15, 24, 118, 142, 17, 92, 136, 4, 211, 1, 206, 73, 152, 153, 108, 218, 70, 200, 198, 215, 1, 149, 0, 175, 50, 134, 240, 128, 85, 8, 163, 125, 219, 214, 183, 29, 90, 130, 121, 189, 167, 71, 64, 132, 97, 17, 53, 239, 222, 144, 84, 221, 215, 114, 47, 88, 244, 51, 94, 16, 150, 108, 164, 180, 61, 102, 221, 68, 4, 196, 246, 197, 29, 230, 56, 14, 131, 191, 169, 144, 163, 83, 250, 189, 133, 20, 236, 244, 200, 2, 135, 128, 128, 40, 136, 13, 131, 1, 8, 87, 252, 21, 0, 199, 215, 172, 29, 131, 241, 255, 176, 120, 174, 155, 29, 83, 180, 15, 11, 255, 89, 180, 109, 76, 118, 136, 110, 38, 205, 76, 82, 126, 4, 162, 95, 145, 98, 82, 195, 89, 202, 106, 109, 168, 25, 215, 115, 191, 241, 160, 139, 15, 77, 231, 189, 161, 206, 153, 242, 92, 169, 78, 24, 120, 90, 172, 233, 231, 83, 170, 182, 57, 56, 179, 145, 50, 41, 43, 6, 205, 0, 147, 119, 70, 37, 203, 140, 152, 41, 153, 75, 22, 199, 3, 254, 189, 244, 141, 75, 231, 100, 71, 112, 80, 113, 39, 14, 138, 199, 176, 169, 13, 188, 201, 189, 49, 236, 223, 28, 19, 205, 225, 1, 83, 90, 131, 226, 147, 108, 62, 134, 51, 89, 126, 102, 165, 205, 244, 63, 86, 99, 104, 231, 46, 43, 196, 63, 118, 104, 76, 182, 156, 181, 207, 75, 17, 158, 110, 13, 202, 178, 1, 67, 10, 184, 40, 166, 31, 177, 174, 134, 35, 38, 117, 205, 152, 209, 218, 223, 161, 192, 192, 221, 17, 142, 197, 81, 42, 124, 2, 44, 110, 141, 146, 115, 36, 236, 203, 92, 73, 139, 72, 126, 175, 233, 195, 126, 75, 74, 81, 41, 245, 106, 20, 247, 231, 242, 166, 72, 139, 132, 41, 174, 20, 193, 227, 229, 43, 19, 10, 118, 108, 57, 161, 136, 18, 236, 237, 153, 198, 152, 133, 38, 8, 62, 151, 99, 253, 23, 124, 229, 202, 51, 8, 192, 218, 167, 232, 77, 181, 73, 219, 198, 50, 179, 117, 176, 163, 193, 55, 26, 182, 224, 4, 219, 126, 255, 165, 205, 164, 18, 158, 168, 223, 72, 70, 88, 252, 22, 41, 98, 179, 103, 225, 118, 223, 7, 92, 117, 13, 215, 78, 74, 227, 217, 61, 89, 144, 90, 156, 235, 213, 17, 70, 20, 214, 125, 40, 133, 147, 128, 50, 200, 198, 84, 187, 154, 204, 246, 180, 133, 94, 182, 240, 219, 196, 237, 12, 86, 52, 202, 39, 136, 248, 102, 148, 67, 42, 227, 186, 23, 145, 76, 17, 136, 10, 209, 59, 144, 87, 153, 67, 205, 143, 68, 254, 84, 10, 43, 87, 214, 250, 152, 231, 89, 176, 26, 219, 146, 4, 112, 243, 59, 186, 76, 147, 65, 113, 103, 204, 86, 40, 50, 77, 140, 165, 124, 243, 110, 97, 234, 132, 206, 161, 68, 6, 224, 2, 239, 48, 198, 252, 215, 251, 229, 136, 104, 32, 193, 75, 91, 162, 130, 64, 29, 133, 196, 185, 86, 51, 79, 221, 240, 114, 123, 188, 16, 101, 180, 74, 59, 2, 198, 144, 136, 89, 164, 144, 153, 214, 90, 149, 77, 65, 201, 103, 59, 75, 23, 114, 3, 181, 152, 176, 25, 188, 218, 36, 150, 163, 142, 227, 234, 143, 62, 177, 207, 3, 236, 52, 201, 4, 55, 251, 230, 47, 136, 148, 102, 87, 240, 223, 25, 255, 216, 117, 241, 37, 71, 241, 197, 196, 162, 89, 187, 242, 11, 116, 229, 218, 53, 104, 250, 73, 77, 241, 189, 226, 219, 250, 173, 185, 203, 76, 167, 173, 58, 43, 40, 251, 78, 159, 183, 202, 145, 98, 44, 161, 209, 35, 94, 93, 218, 53, 89, 103, 106, 54, 135, 47, 68, 168, 109, 62, 77, 239, 214, 161, 253, 194, 138, 250, 246, 203, 195, 29, 226, 226, 87, 118, 192, 148, 253, 205, 87, 106, 251, 229, 15, 201, 201, 0, 230, 201, 80, 160, 121, 83, 163, 193, 189, 8, 114, 79, 37, 42, 207, 201, 52, 41, 151, 182, 227, 38, 192, 236, 170, 29, 201, 211, 252, 84, 208, 77, 44, 157, 62, 255, 185, 255, 64, 183, 159, 40, 7, 175, 144, 80, 47, 75, 179, 93, 146, 145, 248, 7, 14, 138, 69, 65, 150, 208, 80, 127, 83, 232, 122, 209, 190, 159, 181, 106, 49, 118, 115, 26, 40, 9, 48, 58, 18, 118, 235, 38, 66, 225, 87, 28, 39, 52, 65, 53, 84, 74, 32, 41, 14, 63, 242, 241, 247, 128, 8, 180, 139, 15, 146, 203, 62, 96, 147, 88, 228, 119, 88, 70, 130, 234, 102, 174, 27, 98, 161, 167, 178, 228, 175, 51, 226, 233, 227, 145, 41, 153, 29, 52, 243, 47, 143, 40, 248, 175, 185, 161, 40, 222, 107, 60, 177, 116, 72, 231, 130, 191, 110, 164, 31, 193, 145, 255, 61, 103, 177, 18, 26, 203, 232, 128, 11, 45, 130, 153, 237, 83, 193, 197, 3, 176, 5, 55, 239, 151, 68, 134, 185, 110, 68, 189, 151, 180, 36, 30, 48, 214, 213, 118, 144, 245, 129, 67, 169, 196, 99, 155, 107, 227, 214, 219, 141, 12, 184, 197, 16, 154, 74, 232, 66, 146, 19, 168, 158, 2, 124, 49, 241, 53, 59, 5, 78, 167, 243, 196, 86, 167, 243, 30, 202, 166, 55, 178, 19, 82, 56, 158, 247, 42, 217, 185, 71, 233, 42, 17, 214, 61, 86, 173, 130, 3, 249, 130, 99, 10, 69, 5, 82, 118, 196, 97, 158, 7, 174, 97, 128, 58, 189, 148, 29, 170, 31, 156, 136, 134, 116, 150, 220, 101, 33, 182, 237, 102, 112, 187, 125, 73, 21, 57, 45, 189, 189, 67, 54, 130, 61, 218, 37, 162, 210, 143, 73, 104, 222, 7, 187, 45, 80, 70, 42, 119, 60, 241, 156, 105, 119, 79, 207, 125, 217, 107, 34, 18, 178, 229, 66, 165, 243, 151, 168, 68, 148, 205, 227, 12, 22, 14, 15, 71, 99, 59, 135, 234, 73, 226, 79, 241, 56, 243, 139, 27, 11, 219, 105, 40, 174, 12, 36, 105, 15, 2, 31, 215, 217, 56, 157, 110, 175, 132, 221, 98, 141, 27, 168, 4, 131, 241, 70, 225, 93, 255, 232, 145, 217, 197, 204, 239, 243, 196, 71, 140, 59, 155, 29, 98, 85, 169, 156, 73, 196, 190, 144, 164, 217, 158, 58, 249, 204, 30, 54, 119, 216, 26, 245, 148, 216, 9, 245, 56, 98, 105, 53, 46, 176, 17, 138, 113, 161, 170, 213, 107, 171, 61, 90, 175, 197, 45, 141, 227, 236, 77, 254, 72, 153, 253, 20, 26, 78, 8, 227, 200, 250, 59, 176, 52, 68, 36, 178, 89, 114, 176, 204, 59, 41, 184, 134, 207, 113, 11, 17, 12, 44, 38, 70, 156, 224, 229, 239, 36, 128, 166, 156, 45, 220, 213, 108, 89, 22, 72, 129, 255, 182, 125, 213, 22, 209, 234, 191, 169, 112, 26, 105, 119, 26, 88, 26, 140, 46, 45, 145, 93, 11, 87, 71, 0, 13, 93, 104, 98, 192, 160, 131, 205, 211, 77, 29, 75, 232, 176, 210, 226, 102, 168, 107, 24, 38, 62, 92, 175, 254, 79, 73, 65, 193, 59, 62, 17, 3, 26, 121, 123, 213, 1, 241, 203, 246, 209, 62, 89, 4, 90, 37, 51, 1, 221, 140, 108, 17, 174, 241, 233, 185, 36, 41, 222, 103, 234, 86, 96, 67, 182, 177, 20, 1, 183, 144, 69, 18, 112, 182, 138, 125, 134, 129, 81, 104, 7, 79, 59, 231, 21, 37, 240, 210, 172, 80, 255, 104, 4, 57, 138, 179, 74, 40, 190, 72, 98, 110, 24, 232, 14, 217, 193, 168, 96, 52, 157, 196, 246, 223, 25, 76, 199, 250, 36, 2, 116, 167, 230, 51, 204, 203, 12, 225, 228, 23, 65, 55, 157, 18, 88, 240, 135, 166, 62, 248, 106, 211, 7, 82, 53, 82, 23, 110, 199, 205, 191, 30, 94, 27, 140, 151, 13, 67, 156, 87, 187, 238, 120, 162, 154], + [31, 108, 80, 135, 54, 40, 68, 33, 12, 155, 229, 182, 189, 14, 254, 137, 149, 17, 117, 224, 222, 193, 23, 96, 52, 54, 94, 66, 192, 119, 177, 245, 187, 67, 144, 135, 49, 195, 50, 222, 121, 89, 127, 87, 55, 43, 6, 81, 22, 23, 205, 52, 111, 40, 219, 116, 109, 197, 170, 121, 118, 196, 236, 18, 88, 51, 40, 71, 27, 29, 140, 43, 206, 178, 233, 26, 19, 22, 142, 95, 179, 255, 163, 186, 244, 242, 223, 52, 225, 171, 81, 209, 110, 149, 242, 89, 90, 238, 229, 185, 76, 185, 13, 97, 133, 93, 165, 234, 145, 88, 63, 152, 114, 207, 79, 242, 21, 146, 134, 98, 136, 95, 174, 129, 64, 227, 50, 122, 99, 42, 75, 120, 133, 52, 142, 40, 47, 230, 166, 230, 86, 251, 83, 181, 119, 162, 78, 58, 22, 167, 121, 67, 7, 97, 149, 215, 140, 115, 83, 158, 46, 245, 65, 203, 81, 36, 114, 34, 199, 164, 2, 33, 47, 155, 11, 20, 32, 12, 112, 77, 207, 4, 10, 57, 23, 204, 106, 35, 152, 20, 58, 82, 35, 31, 83, 136, 41, 252, 210, 244, 87, 121, 135, 159, 95, 71, 213, 113, 196, 149, 254, 15, 57, 18, 211, 175, 215, 54, 137, 105, 132, 141, 163, 6, 51, 168, 177, 163, 238, 15, 72, 179, 99, 81, 26, 219, 138, 83, 133, 66, 9, 237, 196, 48, 17, 120, 187, 40, 153, 38, 155, 87, 103, 76, 150, 83, 53, 244, 195, 252, 196, 209, 110, 193, 1, 55, 30, 40, 90, 19, 110, 44, 234, 78, 200, 100, 191, 112, 58, 176, 254, 76, 171, 175, 41, 252, 154, 25, 248, 155, 101, 239, 66, 161, 162, 237, 222, 86, 90, 45, 85, 58, 98, 78, 77, 11, 58, 22, 111, 168, 49, 117, 29, 134, 31, 65, 12, 245, 216, 127, 199, 118, 137, 26, 45, 7, 129, 23, 22, 24, 172, 4, 135, 10, 189, 70, 47, 229, 5, 80, 24, 168, 53, 159, 54, 153, 240, 23, 26, 76, 66, 60, 120, 28, 69, 232, 3, 149, 102, 103, 227, 0, 38, 122, 176, 139, 162, 228, 73, 206, 190, 49, 228, 239, 213, 226, 234, 168, 203, 163, 31, 227, 115, 179, 125, 132, 1, 18, 149, 59, 153, 26, 24, 56, 103, 110, 7, 54, 233, 160, 108, 130, 39, 0, 125, 199, 162, 3, 43, 209, 110, 43, 77, 223, 164, 35, 129, 231, 165, 94, 178, 125, 188, 246, 232, 105, 28, 74, 55, 197, 26, 130, 200, 88, 140, 150, 178, 224, 197, 63, 224, 36, 133, 211, 34, 117, 161, 222, 72, 93, 2, 123, 61, 232, 138, 158, 164, 33, 145, 212, 96, 39, 141, 233, 48, 188, 97, 70, 90, 210, 150, 106, 189, 124, 154, 27, 254, 2, 87, 81, 102, 214, 254, 38, 212, 2, 51, 36, 43, 20, 68, 199, 245, 229, 90, 39, 231, 200, 1, 90, 118, 9, 132, 138, 9, 234, 121, 254, 179, 0, 224, 76, 140, 5, 112, 16, 89, 221, 17, 177, 52, 107, 34, 201, 62, 5, 83, 241, 77, 229, 112, 93, 115, 122, 97, 225, 87, 45, 83, 235, 222, 7, 45, 116, 200, 27, 209, 58, 130, 136, 210, 92, 129, 168, 67, 10, 84, 54, 35, 96, 14, 20, 223, 83, 146, 50, 42, 58, 247, 44, 230, 110, 8, 154, 233, 62, 37, 17, 32, 120, 189, 86, 157, 59, 100, 70, 253, 229, 47, 228, 83, 101, 180, 247, 235, 52, 98, 185, 150, 237, 137, 188, 146, 160, 160, 192, 7, 25, 33, 244, 131, 177, 190, 133, 86, 186, 13, 169, 38, 87, 224, 43, 223, 112, 96, 18, 55, 92, 102, 6, 164, 150, 81, 161, 253, 67, 214, 62, 2, 216, 180, 237, 15, 111, 75, 208, 27, 180, 40, 13, 135, 205, 200, 153, 181, 245, 103, 28, 200, 178, 4, 140, 60, 226, 195, 62, 174, 73, 100, 247, 178, 92, 143, 127, 2, 151, 167, 151, 55, 245, 33, 201, 222, 47, 64, 163, 232, 249, 99, 18, 229, 142, 7, 101, 91, 30, 36, 62, 75, 244, 57, 94, 248, 21, 238, 97, 67, 234, 80, 88, 127, 172, 49, 139, 106, 34, 181, 233, 16, 133, 136, 134, 183, 240, 115, 185, 173, 231, 202, 124, 37, 163, 143, 190, 193, 102, 75, 79, 229, 93, 219, 4, 255, 203, 104, 201, 25, 85, 144, 63, 24, 24, 58, 64, 228, 49, 130, 52, 137, 64, 223, 178, 67, 103, 236, 201, 218, 160, 253, 135, 156, 54, 35, 169, 152, 154, 82, 210, 48, 59, 4, 93, 170, 12, 248, 13, 178, 186, 146, 32, 222, 194, 251, 51, 233, 75, 140, 139, 166, 204, 94, 115, 134, 199, 208, 20, 133, 71, 199, 197, 78, 205, 141, 43, 168, 96, 46, 61, 50, 140, 169, 98, 167, 101, 185, 78, 214, 81, 70, 73, 192, 157, 146, 45, 209, 94, 208, 192, 203, 186, 28, 56, 182, 84, 215, 153, 33, 68, 126, 166, 202, 178, 158, 176, 81, 248, 29, 110, 27, 127, 131, 190, 245, 190, 131, 95, 101, 186, 210, 166, 135, 159, 90, 207, 234, 177, 199, 74, 229, 160, 225, 194, 10, 96, 193, 145, 86, 158, 33, 114, 156, 113, 56, 35, 215, 72, 7, 132, 214, 229, 225, 112, 26, 217, 244, 81, 211, 70, 181, 5, 73, 66, 83, 100, 3, 123, 87, 200, 11, 10, 69, 53, 57, 221, 144, 131, 43, 97, 249, 59, 37, 144, 246, 59, 7, 164, 133, 215, 138, 50, 236, 133, 21, 181, 249, 36, 217, 77, 145, 64, 167, 41, 53, 55, 154, 125, 143, 213, 9, 223, 207, 76, 36, 193, 11, 145, 79, 128, 1, 136, 251, 232, 106, 214, 16, 219, 213, 71, 81, 18, 23, 76, 223, 252, 251, 141, 61, 102, 238, 11, 57, 139, 169, 196, 3, 116, 98, 121, 194, 32, 145, 212, 24, 57, 90, 235, 198, 250, 2, 166, 167, 129, 147, 213, 99, 171, 154, 82, 120, 204, 181, 250, 248, 151, 224, 4, 22, 86, 13, 110, 42, 74, 56, 5, 193, 44, 71, 167, 104, 178, 236, 35, 61, 118, 235, 55, 44, 43, 157, 199, 247, 97, 131, 119, 24, 237, 78, 191, 102, 214, 87, 116, 159, 132, 173, 36, 126, 92, 85, 174, 171, 147, 228, 141, 182, 34, 45, 49, 238, 179, 42, 80, 196, 198, 92, 79, 166, 190, 14, 245, 195, 204, 99, 53, 183, 193, 59, 147, 80, 67, 185, 27, 167, 207, 140, 210, 148, 123, 83, 202, 97, 235, 135, 121, 75, 254, 47, 47, 240, 11, 8, 43, 240, 106, 240, 135, 20, 163, 255, 111, 106, 94, 128, 4, 78, 197, 45, 209, 66, 184, 180, 176, 134, 182, 105, 243, 148, 214, 229, 175, 155, 123, 28, 120, 47, 155, 90, 37, 116, 83, 32, 147, 162, 183, 131, 170, 106, 245, 192, 11, 173, 189, 204, 151, 222, 76, 27, 181, 116, 41, 220, 74, 65, 88, 26, 176, 219, 178, 55, 146, 176, 240, 116, 125, 152, 227, 47, 32, 47, 236, 130, 51, 220, 51, 130, 138, 114, 192, 12, 165, 181, 86, 23, 20, 72, 111, 249, 246, 109, 84, 94, 169, 68, 49, 12, 127, 156, 158, 60, 105, 41, 20, 199, 239, 56, 66, 79, 251, 38, 222, 219, 38, 184, 197, 98, 114, 146, 126, 141, 236, 68, 235, 165, 61, 111, 102, 50, 163, 44, 22, 44, 226, 20, 242, 214, 247, 187, 32, 64, 246, 110, 103, 90, 180, 195, 42, 114, 134, 226, 159, 254, 42, 184, 65, 176, 248, 182, 31, 167, 26, 178, 27, 178, 225, 180, 67, 232, 136, 176, 92, 86, 202, 99, 140, 252, 34, 112, 3, 110, 189, 184, 173, 141, 165, 242, 146, 17, 114, 125, 126, 111, 253, 22, 174, 72, 194, 198, 148, 178, 33, 18, 57, 241, 17, 235, 23, 186, 208, 57, 248, 233, 1, 198, 120, 176, 79, 253, 63, 139, 111, 17, 7, 215, 177, 115, 106, 212, 74, 222, 110, 75, 199, 77, 72, 51, 119, 97, 60, 82, 15, 121, 3, 43, 182, 9, 7, 187, 121, 84, 204, 82, 22, 77, 132, 244, 247, 38, 78, 133, 28, 187, 234, 224, 61, 197, 92, 213, 35, 101, 122, 28, 128, 58, 199, 10, 44, 39, 4, 101, 239, 224, 252, 169, 31, 39, 36, 40, 191, 24, 57, 164, 123, 41, 237, 162, 190, 38, 198, 29, 21, 140, 166, 77, 145, 232, 250, 108, 247, 18, 195, 118, 134, 8, 177, 74, 214, 146, 200, 10, 70, 189, 134, 204, 128, 173, 254, 115, 144, 89, 129, 11, 174, 16, 145, 193, 97, 138, 200, 250, 203, 54, 231, 45, 218, 59, 209, 42, 148, 154, 227, 62, 38, 211, 210, 216, 67, 86, 44, 95, 40, 207, 190, 247, 84, 34, 176, 232, 184, 201, 213, 253, 223, 159, 122, 26, 18, 37, 158, 173, 95, 60, 144, 86, 52, 74, 219, 55, 67, 218, 244, 103, 117, 149, 149, 37, 154, 166, 1, 129, 235, 147, 135, 253, 4, 26, 95, 134, 41, 212, 166, 74, 21, 241, 235, 72, 188, 213, 210, 217, 223, 252, 241, 247, 2, 142, 63, 4, 87, 201, 154, 187, 48, 182, 108, 48, 70, 83, 179, 230, 102, 93, 83, 197, 130, 99, 255, 181, 217, 142, 57, 102, 62, 182, 134, 241, 163, 228, 237, 170, 71, 148, 68, 74, 92, 36, 24, 234, 105, 30, 205, 29, 49, 210, 87, 162, 75, 76, 179, 182, 59, 167, 124, 140, 147, 56, 68, 79, 37, 133, 23, 43, 225, 236, 216, 170, 70, 224, 222, 116, 5, 134, 202, 186, 112, 242, 214, 9, 196, 5, 51, 127, 232, 235, 214, 138, 10, 172, 21, 18, 15, 231, 163, 223, 65, 18, 160, 172, 243, 16, 52, 166, 131, 208, 94, 139, 226, 175, 39, 3, 58, 38, 254, 63, 147, 28, 122, 74, 24, 109, 69, 167, 35, 172, 233, 154, 40, 117, 221, 244, 149, 165, 9, 164, 148, 178, 152, 247, 113, 57, 140, 120, 79, 230, 142, 233, 168, 105, 85, 84, 210, 99, 203, 62, 131, 41, 69, 77, 36, 70, 10, 173, 136, 191, 204, 61, 212, 92, 39, 54, 236, 128, 130, 10, 78, 223, 103, 119, 30, 124, 8, 36, 37, 202, 127, 19, 144, 39, 247, 236, 216, 186, 16, 100, 46, 174, 243, 160, 93, 190, 209, 104, 97, 57, 79, 133, 105, 186, 92, 144, 186, 26, 161, 97, 37, 1, 249, 36, 239, 22, 33, 217, 244, 232, 139, 248, 171, 130, 217, 195, 40, 111, 26, 215, 219, 199, 241, 120, 83, 59, 227, 87, 63, 223, 92, 117, 97, 211, 102, 231, 225, 225, 56, 136, 201, 87, 75, 211, 132, 210, 175, 213, 31, 169, 180, 197, 125, 185, 254, 41, 220, 12, 163, 176, 198, 208, 12, 17, 72, 209, 27, 179, 254, 183, 200, 142, 32, 68, 236, 188, 19, 218, 235, 109, 6, 97, 5, 70, 102, 43, 90, 150, 141, 131, 125, 121, 27, 194, 159, 136, 25, 233, 9, 75, 27, 14, 245, 229, 229, 189, 34, 245, 200, 238, 26, 198, 51, 167, 46, 222, 19, 189, 15, 96, 250, 57, 36, 187, 197, 177, 99, 85, 187, 195, 97, 172, 166, 168, 76, 103, 90, 165, 240, 112, 25, 171, 254, 19, 196, 20, 82, 237, 234, 18, 140, 64, 238, 162, 119, 97, 252, 174, 97, 67, 180, 166, 79, 18, 194, 156, 85, 26, 46, 140, 169, 80, 223, 127, 100, 211, 237, 120, 41, 62, 84, 202, 126, 183, 46, 171, 61, 231, 117, 3, 186, 255, 134, 38, 254, 56, 24, 27, 110, 118, 217, 179, 146, 169, 85, 50, 44, 155, 189, 172, 4, 166, 160, 196, 171, 246, 88, 43, 58, 72, 134, 212, 228, 209, 237, 55, 115, 48, 175, 144, 15, 174, 83, 117, 231, 101, 107, 50, 115, 165, 69, 1, 115, 224, 98, 227, 34, 61, 105, 79, 80, 4, 44, 166, 135, 191, 252, 180, 17, 143, 78, 211, 174, 195, 159, 170, 193, 19, 29, 58, 229, 179, 30, 114, 229, 157, 137, 70, 72, 200, 122, 171, 119, 29, 182, 87, 30, 174, 161, 222, 58, 233, 119, 215, 107, 159, 223, 143, 183, 182, 214, 111, 145, 93, 7, 9, 92, 163, 124, 53, 184, 43, 47, 56, 150, 39, 191, 43, 53, 78, 144, 10, 19, 175, 255, 247, 232, 68, 89, 246, 224, 164, 107, 93, 108, 252, 241, 183, 34, 190, 132, 233, 157, 3, 241, 143, 133, 88, 57, 223, 194, 180, 106, 7, 185, 235, 118, 0, 118, 81, 185, 169, 61, 10, 158, 215, 175, 172, 92, 91, 194, 169, 161, 160, 48, 194, 239, 44, 57, 247, 211, 211, 94, 23, 105, 191, 110, 186, 209, 64, 79, 167, 205, 236, 180, 14, 240, 3, 127, 170, 171, 72, 148, 164, 241, 139, 148, 92, 235, 193, 249, 25, 0, 161, 134, 228, 189, 45, 4, 104, 228, 55, 121, 82, 155, 204, 98, 114, 175, 165, 89, 226, 244, 130, 160, 162, 175, 48, 222, 22, 2, 102, 112, 172, 33, 239, 9, 167, 71, 177, 252, 157, 144, 119, 147, 180, 63, 182, 149, 1, 227, 97, 205, 42, 205, 38, 23, 147, 89, 3, 162, 84, 132, 152, 40, 70, 224, 83, 227, 79, 154, 32, 107, 71, 50, 56, 243, 58, 224, 82, 4, 199, 48, 165, 127, 90, 249, 153, 176, 181, 158, 11, 57, 36, 106, 201, 107, 87, 162, 139, 68, 121, 99, 126, 227, 142, 111, 27, 168, 236, 252, 15, 111, 84, 1, 194, 241, 195, 133, 26, 63, 180, 7, 190, 85, 71, 81, 148, 106, 119, 146, 148, 236, 106, 5, 236, 252, 155, 205, 35, 44, 94, 110, 255, 230, 26, 89, 18, 94, 162, 63, 87, 156, 76, 92, 138, 47, 187, 95, 112, 76, 116, 150, 135, 194, 0, 178, 64, 84, 18, 240, 150, 21, 160, 104, 204, 65, 182, 95, 156, 231, 178, 170, 213, 40, 58, 121, 16, 215, 128, 55, 181, 66, 138, 173, 129, 196, 119, 204, 68, 150, 139, 75, 146, 76, 189, 11, 23, 104, 63, 237, 143, 191, 94, 175, 232, 223, 23, 145, 172, 1, 248, 177, 173, 92, 47, 183, 215, 2, 1, 201, 40, 221, 174, 103, 232, 16, 137, 178, 228, 118, 170, 53, 205, 40, 190, 173, 227, 101, 164, 52, 250, 248, 201, 152, 243, 111, 86, 107, 99, 119, 239, 144, 190, 150, 203, 81, 206, 158, 37, 11, 62, 108, 229, 150, 97, 66, 174, 32, 41, 160, 53, 164, 160, 5, 108, 146, 141, 73, 3, 172, 40, 248, 152, 77, 199, 100, 196, 172, 180, 249, 104, 126, 43, 7, 82, 20, 114, 94, 115, 126, 66, 167, 106, 68, 161, 216, 244, 211, 97, 248, 151, 144, 35, 91, 127, 100, 220, 231, 5, 149, 94, 176, 222, 248, 215, 20, 30, 208, 30, 8, 254, 219, 130, 182, 52, 225, 33, 110, 222, 121, 200, 76, 121, 58, 237, 178, 55, 24, 58, 15, 97, 186, 19, 205, 95, 82, 106, 216, 40, 168, 96, 141, 85, 163, 90, 236, 190, 254, 96, 128, 113, 148, 173, 96, 185, 162, 8, 150, 184, 77, 148, 194, 223, 227, 248, 247, 76, 117, 144, 11, 190, 190, 43, 78, 208, 168, 190, 176, 119, 18, 141, 131, 150, 149, 118, 185, 143, 62, 186, 69, 48, 193, 120, 124, 222, 109, 140, 184, 229, 44, 208, 129, 52, 237, 3, 21, 199, 176, 30, 79, 59, 204, 137, 187, 13, 137, 143, 118, 36, 163, 192, 129, 165, 236, 63, 51, 254, 120, 141, 26, 165, 191, 236, 113, 106, 20, 54, 63, 150, 106, 120, 225, 134, 101, 119, 73, 180, 136, 7, 159, 144, 8, 120, 167, 83, 19, 57, 108, 187, 162, 144, 92, 206, 178, 201, 154, 171, 245, 65, 253, 170, 202, 234, 204, 107, 37, 128, 181, 94, 169, 56, 45, 211, 216, 31, 10, 208, 200, 138, 99, 54, 27, 74, 6, 73, 95, 10, 91, 184, 229, 215, 65, 225, 144, 10, 54, 49, 21, 176, 241, 144, 187, 241, 77, 158, 60, 154, 29, 15, 178, 102, 230, 161, 172, 252, 193, 28, 116, 7, 181, 227, 154, 2, 213, 52, 183, 123, 79, 203, 150, 8, 155, 120, 117, 216, 124, 246, 224, 239, 203, 55, 171, 130, 17, 231, 161, 97, 112, 167, 19, 202, 54, 26, 44, 165, 45, 28, 20, 247, 139, 105, 241, 102, 83, 80, 161, 146, 94, 83, 10, 73, 143, 70, 199, 121, 143, 204, 216, 174, 182, 152, 111, 53, 128, 194, 166, 2, 186, 8, 204, 70, 79, 240, 38, 82, 87, 92, 17, 109, 184, 45, 45, 209, 151, 207, 44, 193, 47, 0, 242, 67, 21, 9, 56, 83, 75, 73, 146, 78, 70, 36, 192, 41, 206, 216, 244, 42, 191, 71, 55, 238, 36, 239, 78, 133, 191, 189, 151, 88, 217, 160, 135, 190, 101, 157, 39, 73, 166, 68, 130, 21, 110, 55, 33, 218, 201, 22, 123, 196, 249, 137, 166, 85, 75, 26, 18, 121, 170, 83, 214, 183, 183, 189, 170, 0, 170, 204, 11, 34, 234, 203, 18, 204, 138, 158, 117, 114, 208, 142, 73, 210, 85, 100, 51, 152, 203, 41, 110, 92, 251, 49, 53, 100, 122, 22, 230, 105, 250, 46, 204, 186, 199, 169, 203, 197, 43, 213, 177, 27, 32, 194, 167, 6, 34, 248, 65, 55, 245, 150, 89, 126, 2, 116, 182, 158, 168, 54, 167, 112, 46, 0, 61, 115, 237, 232, 68, 89, 247, 168, 213, 214, 247, 171, 117, 90, 11, 89, 0, 34, 155, 178, 3, 163, 94, 203, 18, 27, 67, 26, 78, 88, 24, 133, 238, 167, 139, 131, 232, 77, 222, 31, 122, 238, 211, 51, 68, 102, 161, 80, 40, 217, 67, 64, 78, 105, 233, 31, 80, 178, 193, 73, 44, 224, 253, 39, 11, 17, 128, 52, 165, 71, 52, 215, 204, 107, 135, 249, 150, 2, 147, 157, 244, 190, 21, 55, 60, 217, 51, 61, 44, 131, 172, 180, 241, 74, 223, 2, 181, 252, 99, 229, 37, 125, 55, 219, 2, 58, 72, 131, 57, 12, 154, 184, 206, 82, 102, 71, 62, 16, 97, 247, 60, 34, 105, 47, 130, 193, 6, 231, 158, 160, 146, 248, 95, 32, 103, 20, 222, 91, 102, 96, 67, 235, 108, 158, 128, 83, 112, 48, 158, 94, 162, 109, 33, 117, 144, 248, 86, 143, 83, 91, 176, 185, 139, 74, 133, 8, 172, 14, 47, 17, 247, 156, 38, 97, 137, 125, 249, 116, 149, 58, 117, 158, 229, 116, 147, 98, 252, 108, 75, 164, 60, 206, 232, 120, 44, 139, 152, 22, 233, 94, 169, 25, 21, 61, 109, 182, 122, 66, 157, 222, 32, 159, 69, 208, 146, 88, 34, 187, 136, 56, 204, 102, 71, 230, 197, 223, 227, 211, 76, 109, 222, 192, 247, 138, 221, 63, 127, 117, 54, 37, 172, 4, 158, 235, 218, 184, 229, 115, 152, 152, 101, 65, 37, 191, 158, 29, 21, 20, 26, 168, 39, 104, 132, 60, 241, 182, 225, 236, 247, 235, 167, 159, 150, 14, 137, 212, 198, 228, 57, 33, 178, 22, 83, 13, 180, 217, 32, 19, 125, 198, 7, 75, 7, 51, 126, 180, 115, 156, 196, 20, 8, 107, 27, 183, 193, 3, 206, 168, 22, 202, 25, 192, 223, 86, 249, 231, 65, 144, 220, 117, 7, 235, 180, 127, 218, 247, 186, 82, 142, 144, 179, 115, 126, 94, 59, 82, 46, 184, 182, 236, 90, 9, 32, 9, 46, 252, 158, 0, 208, 226, 236, 142, 171, 116, 124, 144, 95, 141, 135, 121, 173, 173, 132, 44, 72, 163, 226, 77, 18, 151, 182, 158, 87, 122, 36, 6, 34, 15, 78, 231, 168, 54, 7, 1, 177, 49, 59, 52, 225, 27, 24, 28, 185, 198, 76, 235, 137, 219, 238, 176, 79, 216, 30, 183, 241, 135, 176, 72, 119, 168, 178, 212, 120, 251, 185, 103, 215, 13, 221, 222, 132, 115, 183, 39, 189, 246, 59, 227, 79, 82, 137, 114, 57, 127, 208, 209, 193, 35, 157, 63, 154, 202, 8, 195, 254, 197, 142, 118, 35, 165, 117, 89, 17, 203, 118, 244, 187, 216, 110, 107, 36, 67, 7, 243, 235, 198, 118, 146, 193, 135, 122, 34, 190, 39, 120, 167, 54, 77, 79, 13, 5, 243, 152, 118, 5, 249, 57, 252, 217, 181, 109, 100, 229, 217, 221, 83, 164, 42, 94, 149, 148, 150, 189, 124, 214, 230, 63, 125, 160, 14, 62, 75, 79, 94, 96, 8, 183, 91, 200, 13, 111, 108, 65, 163, 106, 160, 145, 24, 80, 219, 72, 182, 96, 228, 246, 241, 53, 238, 78, 164, 145, 133, 72, 4, 186, 249, 16, 33, 22, 94, 164, 44, 210, 72, 23, 183, 113, 46, 25, 165, 173, 218, 85, 72, 85, 181, 251, 86, 104, 187, 26, 63, 13, 139, 110, 194, 123, 13, 176, 85, 79, 4, 140, 82, 9, 138, 116, 9, 95, 107, 80, 200, 52, 138, 152, 125, 127, 189, 91, 86, 63, 153, 109, 181, 131, 125, 192, 179, 240, 157, 42, 144, 75, 106, 253, 35, 199, 207, 115, 170, 39, 235, 165, 127, 85, 111, 248, 85, 25, 190, 80, 29, 67, 135, 144, 7, 5, 42, 237, 186, 200, 116, 158, 109, 12, 225, 83, 247, 121, 10, 72, 172, 180, 123, 198, 13, 134, 10, 243, 189, 173, 203, 155, 212, 102, 138, 88, 175, 186, 236, 24, 69, 159, 185, 189, 117, 241, 7, 200, 21, 234, 83, 101, 176, 136, 120, 126, 145, 41, 84, 101, 227, 248, 226, 92, 187, 171, 11, 108, 188, 88, 131, 85, 194, 32, 3, 45, 198, 238, 86, 255, 211, 140, 212, 54, 186, 156, 234, 249, 150, 70, 158, 130, 49, 65, 121, 32, 217, 182, 8, 55, 163, 212, 235, 112, 186, 39, 69, 221, 222, 181, 19, 28, 114, 115, 107, 197, 192, 255, 213, 163, 187, 21, 203, 71, 22, 81, 81, 213, 152, 170, 103, 74, 233, 143, 213, 126, 30, 112, 183, 23, 146, 173, 39, 208, 128, 56, 190, 188, 65, 250, 34, 251, 44, 24, 40, 29, 166, 139, 218, 170, 98, 103, 253, 16, 114, 239, 96, 119, 148, 138, 92, 34, 77, 63, 52, 144, 105, 240, 99, 99, 148, 115, 109, 132, 164, 151, 27, 253, 19, 163, 160, 67, 138, 13, 163, 230, 144, 72, 233, 154, 197, 33, 67, 184, 200, 22, 252, 135, 195, 182, 212, 91, 235, 199, 249, 65, 63, 19, 41, 235, 13, 213, 71, 21, 17, 156, 12, 158, 40, 54, 141, 125, 102, 56, 99, 193, 73, 161, 175, 102, 157, 190, 56, 112, 240, 77, 211, 114, 168, 215, 226, 81, 97, 62, 14, 205, 76, 43, 211, 6, 146, 171, 210, 218, 212, 105, 249, 239, 173, 165, 90, 233, 23, 194, 33, 45, 142, 146, 45, 124, 207, 206, 153, 69, 182, 197, 91, 243, 107, 210, 229, 19, 26, 117, 254, 88, 139, 116, 95, 90, 251, 154, 221, 255, 241, 166, 35, 93, 38, 94, 31, 171, 226, 230, 102, 164, 181, 100, 81, 181, 27, 65, 50, 107, 34, 144, 68, 225, 90, 228, 151, 12, 202, 171, 4, 164, 232, 127, 26, 83, 244, 193, 17, 150, 219, 227, 108, 60, 180, 193, 163, 212, 53, 104, 144, 18, 178, 22, 143, 228, 139, 1, 163, 43, 225, 227, 33, 52, 167, 121, 115, 30, 8, 232, 244, 232, 160, 99, 211, 24, 112, 48, 125, 40, 29, 157, 221, 113, 45, 86, 2, 21, 53, 171, 42, 102, 229, 156, 193, 97, 31, 243, 223, 69, 104, 45, 63, 127, 34, 254, 60, 33, 252, 173, 84, 21, 189, 248, 238, 121, 68, 201, 7, 80, 172, 99, 63, 105, 226, 136, 221, 105, 145, 112, 50, 195, 149, 146, 2, 65, 165, 244, 238, 248, 96, 1, 78, 115, 199, 190, 172, 217, 248, 70, 213, 166, 115, 40, 115, 21, 168, 189, 164, 203, 211, 171, 189, 183, 32, 119, 53, 68, 57, 63, 3, 72, 189, 137, 74, 227, 81, 41, 168, 60, 224, 62, 245, 224, 101, 49, 46, 7, 13, 207, 36, 108, 122, 131, 187, 144, 191, 170, 245, 208, 132, 46, 207, 56, 244, 249, 57, 81, 36, 176, 65, 211, 251, 250, 58, 67, 22, 126, 14, 99, 202, 232, 159, 4, 151, 14, 225, 54, 76, 192, 19, 39, 38, 189, 220, 177, 75, 222, 2, 6, 24, 3, 33, 81, 248, 86, 12, 138, 122, 53, 128, 12, 48, 62, 12, 22, 18, 207, 35, 109, 110, 22, 101, 177, 11, 242, 231, 245, 50, 216, 85, 122, 252, 35, 32, 65, 11, 213, 77, 52, 236, 59, 220, 153, 81, 57, 178, 244, 36, 248, 229, 100, 187, 96, 188, 12, 114, 228, 255, 93, 153, 149, 29, 145, 8, 160, 33, 155, 214, 170, 130, 57, 243, 148, 182, 86, 226, 66, 90, 6, 16, 184, 245, 101, 81, 47, 162, 65, 212, 94, 144, 171, 102, 176, 135, 109, 55, 212, 220, 226, 3, 205, 143, 108, 126, 35, 50, 93, 57, 102, 71, 162, 46, 86, 50, 29, 209, 136, 106, 221, 18, 133, 213, 183, 172, 89, 213, 185, 41, 106, 208, 160, 44, 21, 138, 191, 127, 221, 169, 221, 100, 242, 204, 16, 152, 89, 95, 124, 180, 86, 82, 12, 212, 220, 169, 230, 244, 191, 168, 162, 142, 134, 125, 109, 16, 160, 114, 104, 217, 97, 57, 110, 69, 122, 109, 209, 152, 201, 93, 138, 159, 179, 102, 217, 27, 228, 94, 160, 102, 47, 8, 138, 102, 44, 77, 235, 168, 142, 88, 162, 69, 244, 195, 91, 183, 233, 209, 219, 42, 153, 8, 164, 173, 132, 53, 153, 208, 156, 125, 201, 87, 186, 231, 238, 189, 71, 88, 143, 0, 49, 82, 41, 30, 241, 223, 124, 100, 92, 33, 249, 192, 53, 192, 185, 168, 109, 219, 116, 177, 39, 48, 52, 202, 126, 56, 152, 251, 42, 230, 130, 48, 47, 136, 1, 180, 129, 106, 32, 31, 10, 104, 43, 199, 97, 146, 30, 22, 254, 117, 6, 126, 250, 212, 135, 211, 44, 146, 48, 135, 25, 67, 188, 174, 201, 1, 116, 206, 54, 45, 146, 47, 81, 185, 97, 238, 183, 233, 17, 63, 92, 157, 5, 139, 201, 152, 187, 70, 137, 64, 65, 157, 199, 227, 183, 171, 109, 44, 43, 183, 132, 243, 75, 188, 230, 115, 28, 218, 133, 30, 136, 37, 44, 131, 124, 61, 4, 145, 64, 64, 136, 253, 26, 126, 39, 190, 189, 56, 190, 186, 200, 208, 226, 192, 98, 209, 78, 105, 5, 160, 239, 205, 33, 151, 108, 238, 240, 207, 66, 55, 171, 225, 46, 53, 81, 63, 125, 144, 108, 253, 188, 106, 243, 28, 224, 199, 10, 153, 157, 102, 2, 164, 58, 2, 177, 5, 223, 61, 225, 143, 125, 173, 135, 167, 230, 52, 21, 9, 73, 102, 242, 3, 165, 90, 42, 16, 54, 85, 79, 219, 155, 190, 98, 61, 154, 253, 203, 80, 168, 204, 215, 127, 223, 130, 104, 194, 59, 117, 221, 98, 76, 190, 44, 241, 130, 40, 130, 138, 82, 44, 36, 26, 82, 140, 236, 207, 73, 227, 236, 36, 211, 238, 150, 168, 54, 78, 229, 221, 8, 122, 5, 17, 53, 6, 227, 158, 64, 210, 59, 156, 14, 201, 166, 192, 183, 74, 26, 203, 83, 5, 178, 29, 245, 54, 125, 34, 113, 74, 136, 217, 242, 127, 196, 74, 23, 28, 214, 230, 168, 239, 192, 133, 108, 211, 234, 109, 38, 214, 8, 177, 227, 227, 245, 240, 60, 35, 209, 40, 179, 217, 76, 186, 61, 151, 127, 226, 18, 24, 77, 51, 10, 69, 255, 91, 239, 35, 129, 57, 254, 86, 61, 81, 58, 3, 221, 132, 132, 160, 111, 173, 252, 184, 40, 168, 24, 86, 204, 128, 32, 137, 85, 189, 221, 149, 35, 233, 228, 183, 102, 136, 151, 125, 130, 175, 0, 176, 79, 194, 87, 246, 166, 133, 174, 75, 88, 103, 73, 33, 87, 111, 97, 158, 197, 180, 85, 103, 234, 1, 245, 130, 35, 10, 81, 89, 129, 131, 220, 199, 120, 250, 101, 73, 33, 247, 222, 124, 29, 131, 214, 43, 83, 183, 10, 26, 23, 141, 217, 52, 187, 41, 156, 15, 145, 76, 50, 167, 88, 0, 43, 235, 32, 15, 253, 235, 45, 88, 125, 255, 106, 159, 80, 43, 27, 145, 141, 145, 166, 209, 152, 115, 205, 165, 80, 221, 174, 182, 92, 93, 57, 188, 123, 68, 188, 73, 247, 173, 175, 244, 254, 94, 122, 158, 4, 4, 147, 92, 141, 90, 47, 158, 34, 14, 144, 126, 128, 137, 50, 223, 55, 164, 32, 155, 162, 152, 131, 101, 9, 28, 212, 22, 120, 148, 137, 4, 39, 13, 111, 21, 112, 96, 146, 19, 161, 128, 112, 144, 63, 56, 134, 0, 17, 86, 69, 253, 98, 114, 68, 70, 139, 240, 198, 73, 111, 46, 132, 248, 197, 61, 112, 130, 181, 24, 51, 32, 40, 97, 220, 84, 96, 220, 31, 224, 80, 103, 200, 203, 163, 131, 86, 234, 8, 247, 33, 249, 236, 3, 151, 82, 76, 208, 75, 171, 147, 72, 66, 240, 176, 125, 159, 35, 109, 253, 126, 195, 192, 40, 112, 163, 159, 43, 163, 91, 38, 33, 236, 232, 16, 103, 145, 252, 43, 96, 212, 83, 252, 229, 175, 175, 244, 96, 183, 98, 184, 6, 88, 115, 121, 139, 192, 194, 66, 12, 219, 98, 170, 47, 111, 136, 34, 195, 130, 151, 208, 134, 147, 213, 31, 190, 228, 223, 138, 66, 199, 192, 222, 35, 109, 242, 127, 246, 104, 23, 118, 49, 64, 125, 56, 62, 89, 94, 46, 13, 57, 50, 58, 180, 115, 177, 2, 6, 215, 226, 136, 183, 151, 183, 253, 113, 8, 46, 186, 77, 130, 117, 2, 181, 80, 133, 101, 166, 2, 165, 235, 233, 189, 114, 120, 99, 140, 199, 206, 72, 186, 120, 34, 239, 214, 54, 67, 72, 65, 145, 158, 76, 172, 207, 215, 228, 160, 192, 55, 98, 194, 41, 10, 108, 120, 35, 68, 232, 17, 225, 200, 75, 210, 84, 158, 252, 104, 196, 38, 232, 246, 224, 58, 133, 94, 99, 161, 232, 170, 29, 197, 69, 138, 125, 103, 89, 32, 176, 14, 143, 212, 133, 204, 208, 126, 104, 131, 177, 32, 133, 132, 230, 115, 90, 170, 115, 46, 146, 129, 240, 159, 150, 115, 13, 7, 1, 62, 123, 20, 204, 129, 224, 235, 77, 35, 196, 79, 127, 56, 168, 159, 220, 150, 160, 105, 250, 143, 25, 96, 22, 14, 196, 209, 89, 47, 17, 242, 134, 35, 30, 220, 127, 83, 29, 132, 122, 230, 114, 75, 162, 194, 53, 109, 149, 121, 89, 161, 174, 210, 157, 22, 207, 215, 74, 90, 18, 86, 97, 201, 185, 0, 245, 55, 216, 78, 2, 204, 49, 106, 183, 128, 241, 139, 3, 207, 252, 157, 45, 201, 130, 130, 3, 189, 137, 44, 129, 210, 43, 55, 59, 6, 167, 11, 233, 154, 134, 165, 43, 18, 190, 183, 230, 141, 65, 70, 203, 152, 163, 244, 242, 129, 47, 67, 188, 62, 66, 160, 1, 83, 166, 72, 119, 244, 94, 146, 253, 122, 57, 18, 68, 134, 100, 230, 145, 13, 61, 46, 221, 175, 168, 29, 167, 154, 98, 13, 32, 59, 197, 152, 174, 207, 143, 170, 93, 116, 26, 175, 140, 56, 148, 147, 147, 189, 157, 17, 238, 29, 172, 255, 211, 156, 5, 197, 7, 35, 128, 110, 49, 41, 118, 247, 179, 109, 150, 27, 129, 253, 32, 48, 184, 56, 170, 157, 139, 187, 156, 123, 62, 82, 0, 195, 190, 172, 103, 190, 198, 115, 78, 245, 142, 37, 181, 153, 206, 80, 197, 18, 186, 111, 31, 85, 36, 179, 77, 158, 43, 22, 98, 45, 141, 62, 31, 235, 125, 84, 226, 18, 196, 95, 238, 87, 76, 217, 71, 18, 4, 26, 220, 79, 171, 28, 25, 149, 140, 104, 85, 194, 44, 12, 99, 190, 204, 118, 28, 162, 36, 144, 73, 114, 148, 27, 138, 116, 185, 76, 152, 123, 16, 71, 189, 241, 170, 68, 240, 227, 197, 132, 15, 189, 104, 113, 56, 32, 254, 89, 135, 5, 106, 24, 68, 202, 187, 12, 219, 198, 236, 0, 130, 133, 199, 46, 254, 115, 101, 64, 227, 124, 251, 245, 158, 82, 206, 175, 67, 232, 135, 56, 135, 34, 121, 161, 11, 50, 153, 206, 185, 110, 203, 29, 71, 46, 68, 51, 223, 105, 105, 70, 78, 80, 149, 92, 134, 213, 162, 22, 209, 95, 40, 37, 168, 232, 250, 156, 20, 241, 144, 94, 254, 16, 97, 185, 145, 49, 48, 109, 227, 1, 27, 249, 237, 120, 39, 93, 188, 90, 0, 170, 169, 168, 180, 1, 199, 132, 223, 129, 64, 203, 161, 174, 29, 159, 250, 81, 100, 129, 59, 211, 186, 215, 248, 44, 163, 112, 42, 166, 62, 177, 161, 172, 166, 195, 177, 10, 71, 136, 77, 4, 183, 130, 166, 102, 220, 81, 110, 116, 150, 129, 59, 190, 82, 10, 211, 74, 235, 46, 71, 242, 101, 68, 198, 104, 222, 18, 7, 69, 125, 192, 86, 11, 60, 86, 181, 195, 61, 17, 48, 130, 198, 198, 133, 198, 243, 176, 201, 229, 132, 28, 79, 86, 177, 21, 96, 116, 117, 121, 225, 176, 151, 251, 179, 216, 2, 169, 83, 64, 35, 200, 71, 31, 27, 190, 21, 226, 241, 145, 137, 245, 79, 99, 193, 188, 240, 176, 73, 145, 49, 250, 15, 126, 109, 132, 75, 233, 159, 43, 163, 154, 80, 150, 69, 172, 104, 232, 56, 105, 113, 48, 103, 39, 132, 10, 226, 52, 161, 182, 160, 103, 169, 9, 201, 86, 22, 201, 255, 182, 12, 81, 159, 195, 204, 228, 251, 152, 38, 159, 158, 197, 227, 225, 129, 120, 240, 247, 235, 60, 199, 45, 234, 128, 254, 139, 61, 67, 164, 68, 136, 152, 56, 35, 33, 190, 103, 184, 73, 98, 5, 62, 170, 251, 127, 179, 193, 165, 175, 13, 92, 94, 220, 221, 232, 183, 1, 50, 79, 83, 58, 20, 148, 158, 103, 207, 78, 221, 127, 64, 76, 245, 77, 201, 226, 195, 248, 155, 138, 111, 225, 160, 59, 3, 246, 29, 209, 216, 175, 209, 135, 215, 102, 7, 209, 47, 70, 157, 80, 16, 242, 220, 96, 4, 229, 35, 254, 141, 165, 54, 98, 172, 228, 70, 49, 200, 32, 40, 189, 87, 67, 185, 148, 88, 6, 222, 118, 241, 9, 121, 42, 71, 239, 147, 62, 149, 116, 69, 139, 45, 176, 186, 198, 60, 59, 144, 222, 32, 75, 254, 0, 8, 32, 36, 14, 94, 70, 90, 227, 254, 200, 32, 58, 230, 160, 146, 174, 150, 232, 210, 172, 177, 150, 96, 134, 114, 66, 128, 106, 97, 248, 66, 45, 179, 224, 171, 241, 3, 212, 228, 229, 98, 41, 195, 190, 74, 0, 156, 102, 102, 144, 182, 118, 92, 59, 154, 66, 76, 120, 45, 208, 114, 163, 183, 183, 5, 33, 194, 186, 60, 77, 192, 134, 99, 17, 98, 63, 23, 30, 0, 209, 243, 167, 60, 39, 190, 69, 39, 167, 39, 243, 123, 90, 100, 105, 24, 194, 221, 162, 236, 180, 45, 42, 38, 190, 221, 184, 129, 203, 216, 154, 4, 24, 140, 1, 58, 104, 247, 97, 109, 10, 47, 12, 26, 211, 163, 158, 72, 187, 100, 207, 137, 219, 131, 110, 254, 98, 81, 208, 58, 52, 67, 57, 111, 212, 130, 72, 138, 107, 73, 133, 24, 98, 244, 57, 87, 239, 160, 13, 239, 33, 57, 23, 231, 35, 36, 253, 88, 23, 172, 145, 147, 78, 237, 205, 41, 53, 58, 199, 62, 182, 80, 79, 147, 39, 229, 252, 80, 86, 48, 166, 10, 157, 59, 151, 151, 54, 53, 231, 88, 135, 165, 5, 58, 186, 148, 224, 171, 246, 42, 222, 160, 130, 208, 190, 230, 192, 6, 15, 156, 230, 241, 112, 26, 12, 236, 132, 13, 0, 246, 252, 202, 147, 4, 120, 130, 10, 244, 49, 128, 181, 217, 41, 250, 126, 238, 20, 218, 205, 74, 187, 214, 242, 61, 177, 194, 22, 14, 113, 24, 136, 60, 67, 21, 42, 75, 176, 30, 174, 70, 137, 222, 11, 186, 234, 206, 8, 170, 135, 202, 207, 74, 255, 72, 40, 191, 191, 168, 87, 7, 17, 70, 154, 124, 237, 228, 211, 221, 186, 140, 133, 189, 84, 187, 167, 70, 248, 217, 131, 99, 110, 174, 205, 77, 117, 129, 21, 199, 194, 35, 246, 120, 80, 210, 111, 225, 7, 99, 213, 196, 61, 97, 30, 225, 35, 21, 154, 170, 145, 52, 146, 106, 161, 58, 254, 188, 60, 156, 194, 163, 161, 38, 89, 126, 245, 48, 254, 5, 10, 224, 198, 177, 45, 79, 9, 139, 238, 206, 243, 246, 92, 235, 15, 4, 76, 42, 192, 76, 242, 187, 184, 123, 144, 46, 25, 220, 181, 49, 138, 153, 173, 93, 18, 216, 60, 223, 149, 23, 232, 248, 90, 52, 146, 156, 74, 48, 3, 225, 161, 134, 224, 209, 163, 171, 222, 170, 194, 215, 168, 58, 212, 252, 255, 197, 111, 184, 40, 157, 229, 217, 93, 10, 104, 183, 205, 86, 29, 214, 232, 181, 112, 246, 250, 178, 138, 32, 61, 0, 220, 240, 180, 43, 46, 85, 145, 49, 66, 40, 73, 170, 46, 142, 34, 73, 133, 53, 23, 159, 205, 240, 68, 110, 158, 81, 225, 14, 108, 239, 23, 74, 225, 179, 147, 254, 237, 23, 38, 132, 148, 59, 63, 144, 108, 176, 174, 133, 242, 216, 184, 194, 96, 14, 16, 80, 235, 226, 158, 210, 79, 191, 238, 116, 168, 146, 188, 233, 85, 252, 139, 224, 214, 205, 34, 12, 197, 169, 195, 240, 161, 213, 193, 66, 104, 103, 26, 69, 139, 94, 149, 112, 111, 201, 110, 221, 34, 204, 137, 67, 135, 73, 13, 101, 88, 191, 124, 162, 246, 23, 150, 124, 35, 46, 113, 94, 183, 94, 165, 33, 205, 175, 172, 70, 201, 145, 52, 146, 118, 122, 212, 209, 111, 151, 151, 194, 253, 5, 3, 74, 74, 109, 248, 64, 228, 237, 63, 112, 96, 237, 241, 35, 216, 123, 202, 20, 107, 84, 120, 101, 40, 245, 154, 220, 177, 144, 223, 87, 101, 221, 119, 240, 180, 104, 225, 163, 165, 188, 168, 184, 205, 198, 96, 109, 84, 180, 27, 203, 25, 2, 143, 204, 124, 61, 203, 81, 13, 5, 88, 43, 203, 220, 188, 128, 91, 129, 238, 82, 196, 198, 29, 199, 252, 189, 131, 107, 42, 52, 14, 124, 231, 65, 169, 208, 52, 15, 183, 78, 214, 238, 234, 222, 58, 77, 233, 175, 34, 119, 59, 149, 193, 175, 159, 198, 156, 195, 29, 210, 216, 28, 74, 143, 151, 206, 169, 160, 58, 95, 216, 23, 4, 79, 226, 143, 213, 185, 95, 228, 165, 38, 23, 172, 21, 173, 15, 110, 58, 129, 234, 5, 225, 107, 117, 1, 62, 153, 188, 100, 23, 157, 50, 130, 214, 190, 164, 59, 120, 90, 143, 214, 19, 91, 137, 27, 250, 190, 11, 96, 177, 193, 134, 28, 219, 96, 238, 3, 185, 44, 81, 98, 225, 196, 3, 220, 192, 104, 37, 198, 187, 250, 7, 87, 127, 88, 137, 200, 168, 189, 131, 128, 116, 5, 50, 72, 231, 44, 174, 16, 104, 195, 110, 70, 139, 96, 26, 7, 38, 104, 92, 17, 211, 144, 165, 143, 125, 124, 253, 194, 236, 104, 174, 154, 122, 233, 249, 56, 147, 42, 84, 137, 65, 107, 41, 240, 75, 139, 246, 91, 154, 255, 230, 47, 225, 4, 10, 55, 240, 125, 105, 163, 51, 238, 184, 245, 81, 73, 48, 158, 184, 245, 65, 155, 50, 198, 27, 243, 57, 69, 211, 95, 52, 20, 157, 19, 154, 94, 11, 86, 16, 30, 92, 115, 127, 124, 100, 160, 240, 204, 89, 162, 41, 234, 128, 107, 226, 36, 177, 48, 149, 190, 82, 125, 74, 230, 194, 182, 67, 189, 6, 139, 38, 97, 7, 218, 163, 42, 188, 160, 134, 217, 182, 54, 5, 168, 43, 254, 23, 18, 100, 12, 27, 76, 126, 93, 63, 73, 143, 185, 44, 159, 58, 121, 194, 59, 75, 12, 136, 246, 70, 113, 23, 254, 63, 67, 234, 47, 222, 169, 6, 46, 218, 191, 10, 88, 14, 170, 63, 207, 201, 0, 253, 227, 190, 89, 191, 109, 175, 252, 193, 177, 6, 216, 204, 86, 42, 112, 0, 140, 149, 115, 152, 248, 69, 69, 36, 181, 45, 178, 191, 85, 57, 136, 29, 232, 40, 142, 248, 100, 51, 76, 189, 16, 246, 155, 44, 31, 7, 147, 51, 6, 234, 128, 5, 127, 201, 103, 214, 67, 117, 240, 171, 182, 116, 156, 188, 151, 66, 112, 75, 20, 177, 12, 26, 198, 221, 127, 203, 49, 237, 227, 25, 33, 252, 48, 54, 172, 36, 141, 80, 27, 51, 54, 0, 42, 221, 247, 56, 45, 80, 91, 182, 114, 132, 163, 0, 208, 167, 76, 30, 202, 250, 28, 155, 200, 67, 74, 139, 90, 49, 145, 153, 35, 67, 201, 227, 159, 53, 174, 153, 122, 226, 112, 40, 70, 168, 228, 72, 64, 13, 193, 153, 143, 107, 10, 67, 109, 161, 218, 127, 5, 37, 239, 201, 248, 88, 180, 43, 59, 208, 236, 1, 219, 64, 18, 237, 255, 194, 19, 30, 162, 85, 209, 3, 17, 200, 103, 208, 233, 228, 239, 248, 0, 196, 125, 88, 35, 223, 244, 93, 82, 222, 111, 121, 124, 238, 176, 200, 40, 190, 11, 137, 205, 10, 29, 92, 201, 42, 169, 129, 5, 71, 131, 174, 190, 170, 145, 200, 212, 233, 132, 5, 124, 168, 153, 29, 103, 12, 65, 66, 25, 17, 149, 9, 175, 87, 79, 139, 10, 82, 21, 14, 50, 13, 252, 187, 70, 56, 78, 254, 2, 110, 99, 49, 185, 144, 4, 81, 59, 164, 248, 7, 32, 155, 81, 211, 49, 222, 93, 46, 221, 209, 212, 218, 103, 245, 244, 173, 228, 187, 88, 177, 74, 227, 88, 142, 120, 56, 241, 140, 0, 2, 154, 173, 253, 140, 112, 206, 28, 25, 167, 233, 249, 209, 54, 85, 197, 80, 66, 45, 17, 195, 74, 128, 2, 135, 78, 52, 12, 121, 33, 149, 109, 64, 250, 188, 26, 116, 60, 208, 150, 112, 165, 203, 231, 123, 168, 160, 125, 52, 106, 19, 154, 213, 140, 211, 188, 75, 251, 113, 107, 194, 16, 109, 123, 30, 206, 236, 190, 186, 200, 182, 197, 82, 181, 2, 233, 38, 86, 14, 234, 222, 146, 168, 84, 77, 139, 188, 107, 127, 98, 193, 81, 27, 41, 42, 184, 126, 238, 97, 230, 67, 154, 177, 17, 2, 120, 249, 243, 233, 223, 174, 5, 115, 162, 174, 175, 2, 84, 241, 22, 113, 170, 254, 103, 67, 189, 54, 127, 13, 13, 16, 53, 58, 98, 50, 204, 222, 254, 127, 172, 16, 10, 68, 83, 252, 77, 203, 3, 36, 174, 125, 88, 0, 175, 216, 177, 249, 35, 21, 23, 154, 74, 75, 225, 88, 53, 248, 208, 51, 17, 233, 203, 136, 144, 6, 183, 1, 77, 133, 196, 57, 29, 195, 94, 104, 38, 35, 144, 159, 82, 44, 71, 45, 1, 193, 248, 173, 98, 196, 39, 112, 174, 31, 132, 1, 34, 10, 162, 188, 209, 72, 125, 192, 6, 202, 237, 10, 0, 175, 128, 255, 253, 208, 233, 22, 157, 162, 38, 181, 1, 130, 163, 168, 62, 120, 24, 239, 36, 231, 64, 217, 211, 108, 73, 220, 74, 72, 220, 61, 88, 156, 4, 115, 86, 222, 123, 159, 9, 4, 210, 221, 73, 225, 166, 224, 29, 192, 116, 60, 171, 181, 217, 235, 9, 255, 51, 56, 147, 46, 146, 146, 251, 75, 211, 116, 87, 160, 28, 193, 142, 225, 178, 6, 248, 89, 68, 237, 216, 219, 242, 191, 210, 91, 7, 130, 55, 97, 111, 253, 54, 187, 196, 71, 57, 175, 195, 35, 216, 15, 156, 101, 128, 26, 234, 12, 214, 143, 59, 147, 161, 46, 134, 226, 21, 147, 53, 63, 56, 116, 193, 86, 93, 210, 92, 249, 246, 218, 187, 12, 179, 27, 52, 33, 158, 42, 156, 135, 175, 174, 242, 213, 202, 237, 239, 3, 67, 177, 162, 66, 240, 100, 18, 168, 82, 168, 124, 4, 56, 151, 220, 78, 175, 135, 157, 125, 133, 128, 171, 207, 183, 246, 205, 195, 128, 51, 37, 96, 186, 129, 250, 15, 12, 125, 196, 54, 137, 103, 100, 166, 222, 39, 142, 28, 143, 77, 244, 252, 249, 87, 114, 157, 52, 73, 73, 73, 89, 38, 139, 115, 163, 8, 84, 52, 12, 52, 34, 40, 213, 87, 144, 183, 252, 184, 87, 138, 126, 207, 158, 97, 60, 116, 14, 52, 15, 205, 140, 32, 32, 1, 72, 197, 214, 137, 225, 87, 217, 106, 129, 72, 232, 145, 106, 202, 241, 249, 222, 223, 159, 178, 61, 143, 133, 92, 37, 77, 71, 197, 253, 33, 245, 81, 16, 164, 76, 254, 133, 58, 247, 2, 13, 49, 63, 8, 128, 235, 196, 42, 187, 227, 206, 41, 30, 106, 221, 3, 23, 190, 138, 188, 241, 71, 224, 97, 109, 97, 128, 220, 201, 136, 138, 244, 131, 161, 131, 109, 255, 156, 15, 156, 57, 82, 97, 93, 129, 198, 23, 76, 202, 62, 96, 75, 186, 104, 192, 115, 215, 101, 157, 67, 217, 171, 188, 21, 23, 68, 74, 93, 73, 215, 125, 23, 50, 58, 234, 77, 77, 52, 62, 59, 57, 99, 20, 239, 179, 117, 58, 118, 121, 60, 5, 143, 98, 52, 29, 2, 25, 74, 159, 2, 39, 129, 119, 180, 160, 121, 172, 55, 52, 64, 254, 194, 216, 188, 70, 57, 16, 103, 202, 107, 82, 201, 152, 17, 222, 30, 90, 173, 128, 142, 125, 211, 91, 246, 23, 37, 126, 85, 56, 226, 153, 20, 235, 82, 185, 64, 180, 174, 201, 187, 128, 79, 194, 77, 96, 169, 172, 130, 115, 62, 143, 118, 216, 254, 237, 62, 181, 118, 241, 212, 51, 208, 60, 15, 107, 187, 91, 155, 60, 60, 161, 246, 17, 255, 174, 208, 84, 17, 35, 248, 82, 254, 222, 133, 218, 243, 68, 160, 174, 132, 252, 157, 74, 91, 125, 161, 66, 242, 80, 240, 51, 161, 89, 102, 149, 154, 246, 108, 218, 98, 26, 200, 93, 105, 20, 182, 136, 167, 35, 145, 75, 69, 151, 102, 54, 127, 66, 3, 115, 8, 43, 210, 2, 200, 248, 129, 109, 154, 209, 71, 92, 187, 123, 176, 188, 64, 174, 38, 174, 37, 213, 95, 58, 142, 13, 133, 42, 212, 100, 49, 44, 244, 83, 32, 241, 174, 219, 207, 252, 147, 21, 245, 126, 109, 45, 33, 123, 11, 124, 45, 37, 76, 32, 2, 200, 100, 71, 9, 103, 134, 96, 71, 31, 146, 253, 233, 22, 34, 12, 68, 86, 206, 120, 7, 12, 194, 215, 32, 219, 106, 20, 25, 9, 154, 54, 147, 31, 109, 24, 31, 188, 13, 246, 85, 152, 254, 56, 172, 250, 92, 58, 205, 118, 162, 143, 53, 75, 20, 36, 110, 44, 254, 26, 162, 140, 214, 74, 83, 80, 155, 96, 40, 155, 80, 124, 161, 245, 179, 175, 189, 78, 144, 206, 49, 66, 65, 110, 58, 221, 176, 168, 241, 157, 219, 156, 113, 219, 237, 163, 255, 128, 109, 15, 247, 61, 30, 235, 229, 160, 241, 149, 17, 94, 126, 110, 254, 52, 66, 95, 153, 168, 201, 245, 252, 10, 48, 7, 164, 86, 181, 133, 138, 2, 93, 254, 213, 240, 116, 23, 219, 210, 51, 88, 180, 88, 69, 27, 201, 84, 215, 30, 4, 137, 249, 206, 157, 235, 217, 138, 16, 9, 203, 203, 72, 0, 185, 143, 21, 246, 89, 43, 193, 115, 26, 148, 240, 155, 105, 55, 44, 202, 13, 26, 146, 106, 62, 237, 240, 237, 160, 235, 150, 143, 239, 169, 60, 87, 26, 161, 111, 28, 132, 70, 154, 75, 74, 228, 172, 75, 164, 241, 86, 108, 173, 39, 143, 53, 187, 196, 186, 184, 100, 96, 79, 37, 149, 87, 9, 60, 248, 174, 3, 207, 82, 19, 112, 80, 228, 205, 170, 230, 2, 48, 111, 99, 56, 110, 98, 109, 4, 51, 226, 172, 243, 251, 162, 0, 177, 202, 168, 16, 212, 159, 71, 14, 16, 248, 62, 132, 116, 163, 69, 130, 251, 178, 197, 78, 138, 86, 176, 14, 107, 178, 87, 48, 207, 157, 162, 38, 24, 196, 95, 153, 149, 39, 86, 182, 94, 16, 153, 179, 54, 140, 51, 60, 249, 150, 67, 218, 28, 8, 82, 141, 177, 226, 34, 83, 114, 136, 40, 114, 199, 126, 45, 148, 194, 230, 110, 107, 235, 55, 136, 10, 58, 138, 79, 175, 250, 9, 242, 102, 65, 62, 14, 109, 74, 149, 166, 14, 2, 124, 196, 69, 93, 241, 92, 23, 212, 151, 191, 76, 184, 200, 203, 137, 214, 224, 118, 92, 50, 138, 215, 102, 186, 85, 112, 239, 114, 69, 94, 113, 89, 197, 39, 119, 110, 72, 145, 236, 81, 170, 18, 142, 125, 3, 30, 171, 3, 152, 44, 61, 69, 106, 2, 86, 179, 140, 189, 60, 123, 48, 118, 5, 123, 71, 76, 233, 138, 42, 124, 162, 196, 165, 235, 79, 249, 250, 204, 93, 71, 34, 57, 176, 203, 176, 215, 189, 95, 249, 125, 227, 10, 156, 6, 166, 222, 50, 135, 225, 202, 102, 199, 68, 36, 251, 188, 169, 140, 211, 157, 207, 185, 101, 102, 246, 112, 10, 136, 58, 247, 175, 242, 247, 60, 82, 10, 164, 214, 9, 76, 114, 84, 169, 54, 89, 218, 89, 210, 66, 200, 69, 51, 195, 158, 246, 185, 83, 11, 174, 8, 15, 184, 37, 97, 210, 17, 38, 198, 248, 63, 15, 29, 9, 80, 215, 20, 107, 201, 51, 158, 172, 213, 98, 245, 90, 222, 191, 99, 184, 62, 8, 30, 189, 113, 241, 236, 152, 31, 177, 137, 72, 192, 190, 143, 250, 54, 196, 162, 42, 248, 21, 185, 75, 52, 34, 202, 4, 64, 86, 206, 32, 45, 135, 128, 100, 45, 139, 199, 186, 20, 52, 197, 252, 79, 118, 201, 166, 128, 98, 116, 106, 237, 71, 221, 183, 112, 217, 63, 138, 242, 121, 179, 209, 183, 134, 48, 44, 142, 66, 139, 241, 21, 26, 134, 173, 247, 181, 222, 93, 107, 4, 139, 49, 75, 5, 58, 52, 233, 173, 254, 23, 239, 74, 170, 0, 157, 59, 126, 14, 133, 157, 67, 125, 187, 40, 138, 23, 65, 9, 204, 92, 22, 246, 18, 136, 78, 29, 9, 86, 29, 223, 133, 79, 108, 131, 100, 27, 209, 68, 216, 16, 223, 34, 17, 214, 129, 65, 51, 246, 181, 189, 201, 128, 247, 74, 76, 227, 9, 255, 87, 242, 125, 40, 53, 120, 134, 35, 60, 39, 111, 5, 113, 17, 184, 173, 235, 158, 92, 26, 162, 228, 31, 93, 187, 9, 66, 156, 148, 7, 212, 239, 242, 107, 39, 127, 134, 55, 130, 65, 73, 54, 245, 172, 234, 95, 175, 197, 250, 96, 67, 117, 50, 46, 242, 223, 196, 166, 105, 218, 90, 212, 166, 168, 203, 86, 173, 133, 57, 155, 60, 47, 134, 91, 61, 224, 48, 233, 134, 176, 206, 163, 228, 172, 65, 71, 107, 231, 55, 133, 69, 87, 44, 190, 45, 232, 62, 132, 40, 17, 173, 225, 158, 216, 151, 252, 76, 121, 182, 145, 50, 243, 103, 183, 0, 50, 246, 101, 122, 193, 114, 221, 16, 216, 167, 119, 203, 91, 174, 201, 32, 188, 194, 5, 99, 218, 152, 218, 169, 127, 21, 113, 183, 88, 218, 69, 103, 75, 175, 16, 38, 2, 193, 87, 186, 211, 118, 205, 101, 195, 233, 156, 209, 41, 228, 60, 50, 103, 214, 160, 175, 177, 40, 122, 120, 58, 55, 168, 11, 223, 249, 140, 123, 99, 145, 244, 198, 255, 139, 199, 83, 174, 183, 21, 243, 77, 190, 42, 60, 218, 202, 95, 242, 29, 222, 61, 140, 70, 183, 100, 53, 107, 243, 220, 157, 130, 106, 3, 114, 15, 175, 197, 103, 73, 202, 37, 139, 212, 215, 108, 103, 210, 220, 111, 17, 231, 14, 188, 197, 103, 9, 9, 135, 45, 132, 112, 162, 221, 249, 64, 193, 136, 183, 157, 88, 72, 97, 106, 164, 157, 117, 231, 243, 93, 121, 24, 158, 13, 160, 59, 53, 222, 130, 130, 82, 164, 78, 228, 84, 106, 122, 13, 136, 254, 16, 202, 2, 87, 248, 206, 146, 139, 95, 2, 1, 247, 218, 12, 223, 91, 206, 96, 65, 201, 254, 82, 146, 202, 131, 242, 7, 219, 133, 131, 162, 1, 56, 115, 190, 254, 155, 135, 41, 228, 140, 172, 196, 217, 148, 70, 89, 165, 228, 161, 17, 131, 116, 65, 105, 109, 186, 94, 13, 246, 54, 50, 82, 178, 176, 179, 8, 170, 223, 108, 253, 166, 214, 162, 8, 147, 174, 50, 245, 156, 21, 38, 227, 52, 44, 235, 174, 92, 112, 141, 238, 192, 133, 177, 25, 141, 71, 235, 123, 228, 205, 11, 74, 207, 127, 166, 177, 124, 246, 55, 82, 142, 200, 249, 204, 100, 30, 227, 160, 190, 28, 93, 10, 110, 168, 67, 17, 67, 125, 39, 0, 4, 255, 72, 208, 106, 109, 140, 204, 68, 196, 9, 103, 203, 2, 138, 221, 12, 30, 107, 132, 74, 32, 98, 84, 48, 40, 212, 2, 41, 107, 178, 12, 26, 234, 97, 134, 166, 109, 88, 7, 195, 226, 95, 222, 86, 88, 229, 96, 175, 201, 207, 88, 221, 95, 255, 63, 193, 66, 22, 217, 97, 194, 153, 41, 25, 165, 65, 164, 26, 109, 126, 177, 217, 6, 183, 172, 31, 67, 26, 171, 49, 236, 186, 133, 61, 134, 99, 33, 43, 9, 134, 246, 204, 145, 99, 195, 139, 224, 9, 200, 241, 141, 28, 211, 44, 206, 41, 213, 78, 205, 185, 129, 77, 125, 31, 48, 9, 36, 170, 133, 202, 107, 226, 161, 161, 197, 28, 98, 141, 75, 171, 24, 109, 161, 9, 57, 214, 251, 202, 109, 109, 54, 199, 69, 157, 186, 192, 130, 22, 26, 120, 184, 35, 189, 101, 46, 43, 178, 8, 91, 147, 108, 5, 49, 173, 162, 196, 44, 228, 51, 52, 133, 192, 87, 200, 217, 217, 122, 116, 47, 23, 212, 146, 18, 221, 217, 234, 171, 247, 240, 24, 54, 43, 86, 71, 103, 251, 99, 56, 208, 72, 15, 224, 139, 101, 133, 207, 183, 168, 41, 113, 0, 102, 229, 227, 84, 137, 220, 203, 158, 14, 205, 98, 229, 48, 235, 127, 173, 236, 197, 42, 234, 201, 5, 0, 166, 246, 213, 90, 128, 174, 208, 239, 225, 43, 118, 21, 238, 199, 181, 193, 239, 108, 104, 241, 107, 134, 218, 102, 79, 123, 36, 69, 103, 234, 210, 32, 159, 94, 55, 36, 116, 88, 98, 36, 190, 240, 23, 41, 21, 45, 210, 67, 10, 3, 168, 148, 198, 239, 230, 24, 181, 202, 167, 218, 19, 100, 236, 160, 59, 118, 191, 119, 93, 202, 170, 247, 62, 83, 181, 15, 114, 32, 91, 238, 128, 218, 198, 226, 114, 18, 221, 27, 30, 250, 202, 131, 75, 118, 236, 120, 111, 148, 126, 146, 176, 45, 20, 30, 170, 253, 176, 155, 113, 77, 131, 134, 100, 182, 162, 185, 112, 90, 72, 181, 46, 62, 253, 202, 26, 30, 138, 11, 133, 110, 59, 130, 30, 76, 28, 198, 101, 10, 104, 190, 186, 197, 62, 28, 14, 79, 169, 249, 69, 111, 84, 104, 49, 202, 128, 146, 47, 80, 234, 6, 6, 77, 244, 36, 123, 17, 181, 245, 90, 93, 118, 110, 195, 65, 203, 183, 226, 3, 129, 86, 231, 11, 36, 164, 198, 10, 91, 172, 156, 156, 107, 56, 162, 119, 246, 249, 129, 9, 90, 91, 197, 25, 98, 2, 132, 133, 236, 136, 191, 250, 20, 55, 7, 131, 135, 186, 237, 192, 235, 124, 85, 113, 211, 5, 171, 210, 9, 20, 205, 149, 43, 103, 153, 206, 118, 40, 26, 255, 136, 60, 112, 46, 130, 116, 106, 200, 43, 166, 37, 27, 214, 246, 23, 187, 113, 167, 149, 85, 224, 39, 45, 134, 1, 157, 33, 245, 5, 96, 199, 190, 80, 188, 83, 218, 119, 9, 242, 199, 167, 10, 81, 235, 213, 184, 102, 41, 21, 234, 161, 34, 233, 240, 188, 97, 161, 226, 238, 120, 92, 38, 249, 222, 198, 118, 91, 29, 124, 231, 103, 97, 141, 122, 26, 163, 14, 185, 225, 5, 90, 255, 35, 212, 7, 57, 85, 134, 211, 209, 156, 132, 190, 56, 88, 36, 118, 117, 219, 133, 246, 18, 165, 250, 158, 11, 150, 239, 46, 128, 198, 197, 29, 16, 243, 7, 129, 115, 153, 133, 51, 241, 126, 72, 100, 73, 107, 175, 20, 144, 18, 73, 218, 226, 100, 213, 35, 40, 24, 172, 243, 220, 177, 180, 238, 78, 20, 201, 143, 112, 54, 217, 200, 111, 38, 186, 9, 71, 158, 188, 136, 197, 154, 98, 171, 234, 32, 33, 137, 45, 229, 211, 15, 149, 63, 234, 138, 149, 64, 172, 104, 65, 195, 97, 76, 150, 130, 125, 61, 180, 117, 226, 174, 43, 33, 191, 122, 105, 152, 244, 236, 123, 118, 106, 102, 30, 58, 186, 189, 222, 245, 58, 232, 102, 54, 106, 10, 57, 127, 246, 106, 50, 121, 51, 213, 126, 237, 27, 253, 119, 122, 96, 66, 29, 151, 103, 255, 51, 96, 17, 112, 87, 119, 190, 68, 129, 140, 4, 84, 194, 246, 89, 90, 10, 242, 15, 141, 8, 170, 130, 132, 180, 146, 84, 193, 119, 23, 253, 109, 163, 234, 147, 72, 79, 180, 96, 229, 63, 203, 247, 170, 240, 212, 116, 119, 197, 176, 182, 94, 233, 177, 47, 196, 99, 168, 207, 215, 48, 143, 92, 192, 15, 79, 194, 255, 143, 24, 28, 92, 227, 250, 0, 144, 4, 125, 110, 71, 83, 158, 156, 90, 114, 65, 203, 206, 122, 111, 80, 47, 255, 71, 182, 123, 46, 160, 24, 79, 214, 27, 36, 252, 177, 23, 76, 75, 151, 132, 80, 19, 222, 31, 37, 148, 41, 192, 45, 237, 130, 43, 112, 26, 138, 65, 33, 255, 222, 89, 75, 122, 138, 4, 191, 77, 42, 92, 142, 86, 131, 175, 178, 126, 23, 14, 21, 236, 137, 227, 124, 47, 36, 141, 84, 37, 158, 30, 120, 224, 120, 250, 242, 60, 224, 51, 181, 149, 93, 188, 2, 216, 134, 234, 165, 48, 229, 248, 12, 178, 174, 78, 179, 157, 14, 48, 193, 196, 61, 23, 236, 195, 1, 33, 132, 171, 48, 182, 24, 42, 251, 221, 172, 20, 226, 210, 137, 181, 167, 233, 239, 68, 100, 177, 233, 64, 121, 71, 176, 105, 111, 202, 234, 238, 241, 148, 16, 60, 82, 192, 26, 151, 71, 36, 169, 151, 44, 51, 64, 226, 74, 112, 94, 171, 60, 40, 80, 147, 121, 174, 6, 80, 42, 145, 24, 244, 232, 79, 1, 10, 14, 248, 39, 184, 59, 131, 92, 182, 15, 134, 194, 229, 119, 141, 144, 94, 25, 121, 67, 242, 53, 189, 37], + [132, 143, 138, 49, 218, 249, 127, 159, 187, 124, 72, 38, 115, 216, 112, 179, 253, 251, 253, 77, 212, 26, 237, 195, 209, 64, 26, 105, 73, 79, 145, 22, 129, 235, 255, 64, 143, 184, 198, 91, 23, 244, 84, 181, 9, 67, 62, 54, 39, 200, 163, 180, 170, 118, 128, 145, 126, 191, 50, 170, 70, 139, 78, 133, 74, 182, 146, 54, 179, 113, 90, 248, 118, 209, 217, 185, 82, 59, 131, 22, 212, 189, 169, 28, 154, 96, 224, 15, 153, 156, 33, 72, 119, 157, 59, 255, 255, 3, 231, 205, 86, 155, 242, 206, 236, 10, 216, 36, 37, 48, 199, 204, 120, 230, 144, 203, 55, 103, 133, 110, 212, 213, 15, 22, 206, 222, 235, 137, 72, 230, 208, 78, 16, 57, 49, 21, 170, 247, 219, 84, 157, 240, 33, 84, 241, 30, 170, 123, 234, 145, 111, 165, 111, 152, 35, 71, 122, 219, 19, 25, 111, 234, 1, 70, 31, 119, 82, 202, 105, 166, 104, 236, 31, 79, 105, 58, 99, 225, 29, 226, 53, 101, 39, 38, 121, 123, 221, 85, 31, 86, 63, 108, 206, 187, 130, 124, 168, 168, 37, 74, 225, 54, 222, 229, 212, 17, 207, 191, 250, 10, 36, 228, 182, 36, 181, 24, 171, 191, 60, 60, 56, 184, 125, 70, 164, 1, 66, 13, 39, 23, 221, 92, 72, 193, 126, 225, 234, 135, 33, 145, 167, 32, 235, 185, 195, 241, 111, 236, 224, 160, 6, 148, 63, 55, 21, 224, 115, 245, 78, 75, 122, 5, 169, 166, 27, 95, 47, 212, 4, 67, 205, 88, 64, 155, 141, 27, 202, 42, 69, 41, 10, 136, 153, 179, 12, 80, 11, 212, 26, 217, 28, 253, 16, 252, 155, 115, 98, 8, 80, 186, 252, 65, 208, 128, 100, 243, 122, 27, 166, 56, 95, 91, 165, 129, 17, 152, 101, 37, 148, 72, 71, 78, 208, 58, 126, 215, 180, 205, 180, 224, 207, 213, 126, 124, 236, 20, 201, 223, 195, 246, 143, 255, 16, 52, 173, 10, 255, 97, 48, 116, 165, 166, 48, 189, 159, 195, 165, 85, 199, 242, 166, 44, 131, 18, 143, 124, 180, 189, 172, 49, 226, 218, 34, 18, 65, 84, 234, 160, 229, 228, 85, 224, 72, 107, 130, 64, 92, 180, 56, 133, 218, 73, 63, 87, 113, 20, 245, 49, 20, 235, 134, 253, 110, 77, 137, 35, 150, 251, 197, 149, 128, 255, 95, 95, 56, 188, 78, 115, 204, 159, 38, 174, 200, 240, 176, 23, 95, 63, 62, 126, 27, 142, 117, 105, 32, 169, 227, 212, 174, 112, 199, 16, 112, 229, 81, 64, 14, 26, 8, 132, 77, 100, 138, 72, 40, 132, 49, 118, 69, 94, 113, 48, 3, 98, 137, 218, 162, 132, 86, 102, 194, 125, 30, 157, 169, 218, 217, 131, 226, 220, 67, 102, 184, 179, 198, 27, 107, 86, 68, 25, 11, 138, 128, 26, 204, 142, 80, 145, 122, 81, 118, 182, 104, 10, 128, 229, 85, 89, 189, 107, 176, 86, 109, 3, 85, 206, 252, 252, 93, 136, 56, 210, 77, 73, 20, 33, 30, 176, 192, 46, 184, 146, 34, 203, 231, 105, 91, 96, 147, 219, 133, 24, 82, 182, 144, 232, 202, 2, 55, 118, 110, 223, 242, 244, 59, 180, 213, 144, 119, 114, 8, 111, 159, 30, 145, 239, 40, 123, 213, 88, 49, 120, 19, 134, 78, 75, 155, 158, 11, 255, 125, 131, 76, 126, 42, 155, 176, 153, 92, 85, 161, 13, 217, 185, 66, 134, 46, 104, 90, 103, 218, 173, 129, 81, 102, 135, 124, 127, 42, 244, 134, 174, 79, 81, 222, 88, 81, 183, 253, 175, 3, 226, 181, 185, 254, 206, 254, 243, 102, 238, 219, 162, 230, 193, 28, 98, 127, 233, 108, 246, 182, 57, 187, 47, 165, 46, 220, 175, 163, 52, 190, 63, 112, 154, 100, 101, 252, 6, 100, 94, 179, 152, 148, 67, 154, 253, 108, 14, 139, 95, 97, 236, 194, 241, 13, 97, 189, 241, 117, 175, 24, 98, 78, 94, 55, 52, 17, 166, 77, 19, 244, 162, 190, 173, 144, 138, 187, 135, 147, 37, 57, 218, 134, 114, 241, 10, 94, 213, 23, 125, 76, 43, 86, 146, 248, 23, 35, 213, 7, 29, 187, 77, 77, 1, 142, 210, 152, 19, 75, 250, 7, 237, 77, 165, 92, 81, 147, 247, 55, 54, 225, 150, 131, 244, 29, 165, 160, 132, 50, 206, 122, 195, 255, 49, 14, 164, 87, 255, 225, 91, 177, 103, 137, 44, 237, 182, 115, 156, 134, 89, 237, 83, 54, 133, 3, 59, 246, 160, 106, 197, 14, 188, 10, 80, 214, 74, 106, 31, 212, 181, 136, 138, 52, 38, 124, 22, 133, 16, 242, 25, 192, 122, 146, 71, 24, 53, 84, 197, 14, 121, 185, 155, 233, 171, 73, 117, 120, 224, 231, 122, 83, 225, 247, 134, 10, 146, 14, 35, 174, 219, 183, 223, 178, 108, 236, 44, 17, 247, 171, 81, 67, 50, 180, 118, 232, 242, 106, 181, 230, 219, 62, 41, 123, 54, 185, 54, 102, 146, 243, 167, 87, 175, 45, 143, 194, 112, 71, 226, 211, 143, 252, 70, 164, 170, 141, 225, 108, 51, 198, 25, 128, 254, 110, 51, 93, 142, 131, 160, 52, 131, 64, 87, 163, 163, 232, 97, 27, 1, 47, 66, 53, 188, 235, 173, 41, 84, 206, 219, 68, 94, 50, 115, 246, 147, 90, 148, 154, 207, 254, 17, 211, 186, 107, 107, 111, 218, 195, 79, 18, 164, 151, 123, 250, 37, 236, 14, 128, 120, 142, 82, 102, 167, 134, 99, 81, 89, 1, 28, 253, 70, 19, 129, 225, 7, 60, 86, 105, 105, 183, 71, 236, 111, 159, 183, 12, 163, 48, 99, 23, 92, 143, 161, 137, 197, 196, 117, 132, 9, 254, 72, 161, 155, 235, 218, 61, 253, 249, 178, 92, 226, 37, 35, 148, 11, 249, 170, 130, 45, 11, 133, 204, 65, 49, 130, 62, 230, 93, 145, 214, 4, 118, 209, 247, 125, 183, 186, 167, 95, 40, 92, 222, 38, 93, 24, 4, 91, 255, 12, 117, 19, 88, 38, 21, 55, 139, 43, 119, 210, 197, 107, 218, 95, 171, 72, 134, 170, 19, 43, 232, 54, 251, 157, 229, 172, 167, 137, 52, 176, 22, 139, 224, 64, 175, 42, 175, 36, 225, 99, 80, 37, 68, 42, 115, 233, 117, 218, 157, 76, 48, 51, 106, 201, 165, 160, 155, 141, 135, 187, 251, 231, 130, 13, 218, 20, 189, 240, 154, 190, 155, 140, 204, 187, 89, 240, 14, 93, 55, 94, 163, 86, 195, 91, 248, 102, 179, 55, 239, 164, 231, 128, 65, 251, 93, 2, 61, 76, 59, 179, 162, 177, 210, 40, 61, 50, 35, 248, 167, 136, 235, 194, 57, 134, 48, 173, 217, 192, 94, 227, 77, 22, 11, 149, 56, 132, 94, 153, 107, 222, 251, 127, 191, 88, 53, 79, 202, 27, 30, 98, 201, 16, 121, 17, 75, 74, 1, 25, 115, 42, 130, 128, 107, 189, 91, 153, 85, 46, 132, 223, 201, 138, 163, 241, 97, 32, 216, 207, 165, 92, 159, 221, 146, 100, 96, 63, 220, 241, 246, 173, 198, 93, 196, 26, 234, 202, 4, 36, 84, 31, 54, 101, 28, 251, 109, 68, 28, 51, 239, 15, 126, 55, 150, 230, 72, 214, 206, 216, 153, 105, 123, 101, 209, 128, 65, 107, 171, 122, 252, 46, 184, 63, 46, 67, 115, 167, 241, 235, 43, 254, 12, 152, 0, 225, 168, 33, 70, 251, 8, 225, 126, 45, 57, 197, 25, 249, 241, 117, 194, 149, 15, 113, 114, 73, 230, 203, 62, 157, 176, 240, 139, 129, 70, 120, 110, 86, 73, 166, 254, 234, 181, 156, 117, 224, 248, 229, 121, 69, 52, 170, 186, 138, 97, 79, 184, 49, 80, 181, 245, 77, 208, 151, 95, 183, 167, 209, 245, 42, 93, 242, 1, 20, 73, 112, 95, 85, 163, 187, 157, 43, 106, 81, 108, 233, 86, 223, 66, 168, 207, 158, 74, 54, 238, 131, 212, 98, 49, 205, 190, 27, 29, 28, 11, 106, 144, 73, 27, 84, 187, 143, 91, 176, 110, 239, 42, 123, 60, 251, 110, 132, 109, 187, 210, 241, 73, 244, 111, 119, 52, 87, 64, 133, 130, 120, 184, 65, 140, 220, 250, 51, 218, 10, 100, 220, 182, 69, 122, 149, 63, 237, 82, 155, 93, 192, 106, 21, 190, 76, 7, 140, 115, 83, 213, 15, 111, 117, 176, 238, 166, 181, 110, 129, 162, 39, 139, 96, 12, 28, 3, 67, 113, 118, 107, 32, 71, 243, 138, 123, 119, 74, 10, 105, 146, 75, 164, 76, 215, 74, 163, 120, 75, 202, 51, 140, 138, 148, 220, 14, 40, 63, 228, 232, 150, 55, 67, 23, 103, 20, 151, 123, 62, 22, 194, 6, 202, 0, 97, 236, 114, 1, 10, 37, 212, 229, 217, 243, 216, 111, 172, 7, 40, 127, 254, 96, 243, 159, 163, 169, 140, 182, 133, 24, 162, 109, 231, 116, 183, 182, 32, 176, 164, 167, 131, 204, 107, 232, 9, 140, 85, 81, 198, 115, 216, 135, 142, 219, 172, 50, 239, 199, 251, 46, 231, 160, 186, 138, 91, 248, 199, 88, 56, 55, 155, 186, 95, 24, 32, 41, 4, 203, 87, 102, 52, 101, 57, 69, 105, 182, 236, 84, 4, 106, 28, 118, 226, 251, 211, 137, 223, 75, 82, 100, 9, 60, 161, 71, 162, 100, 83, 202, 234, 66, 131, 72, 97, 212, 71, 230, 149, 33, 43, 148, 254, 29, 163, 175, 97, 86, 97, 136, 100, 168, 243, 121, 220, 203, 96, 179, 35, 118, 41, 149, 32, 136, 229, 192, 219, 103, 199, 20, 139, 119, 203, 116, 142, 96, 201, 143, 184, 7, 172, 97, 222, 236, 71, 180, 189, 74, 56, 217, 49, 146, 203, 86, 51, 80, 189, 137, 108, 71, 122, 170, 114, 120, 179, 151, 158, 20, 99, 130, 71, 203, 53, 179, 207, 150, 144, 159, 103, 154, 198, 200, 72, 18, 50, 242, 7, 93, 148, 67, 128, 166, 140, 106, 208, 242, 70, 127, 159, 103, 218, 157, 100, 200, 154, 30, 230, 113, 85, 252, 80, 15, 62, 119, 213, 174, 77, 9, 148, 113, 225, 236, 36, 110, 43, 66, 144, 173, 91, 38, 93, 157, 65, 96, 123, 127, 108, 37, 142, 212, 123, 147, 222, 16, 59, 21, 134, 36, 123, 246, 163, 91, 106, 179, 9, 255, 144, 150, 250, 141, 246, 50, 197, 205, 191, 88, 200, 129, 89, 84, 54, 77, 214, 109, 190, 81, 247, 204, 89, 69, 233, 226, 123, 109, 164, 153, 100, 72, 47, 159, 160, 206, 15, 50, 39, 23, 246, 227, 23, 220, 184, 164, 241, 105, 122, 91, 5, 192, 206, 223, 104, 29, 110, 179, 151, 144, 192, 73, 145, 8, 164, 199, 85, 150, 57, 1, 170, 254, 231, 143, 145, 191, 92, 160, 183, 54, 197, 249, 139, 122, 127, 237, 187, 139, 188, 242, 126, 243, 12, 82, 90, 60, 182, 236, 71, 9, 117, 251, 21, 108, 70, 107, 171, 185, 140, 224, 90, 16, 178, 82, 33, 128, 94, 249, 203, 98, 143, 137, 129, 62, 227, 101, 45, 32, 22, 153, 143, 181, 100, 179, 133, 69, 134, 80, 230, 252, 33, 50, 228, 192, 43, 191, 248, 61, 115, 113, 132, 68, 61, 140, 14, 108, 242, 105, 150, 189, 59, 152, 210, 9, 215, 56, 255, 211, 80, 41, 146, 173, 18, 252, 31, 187, 43, 34, 217, 176, 221, 19, 225, 200, 40, 2, 245, 106, 75, 64, 242, 190, 148, 139, 83, 80, 94, 82, 229, 203, 104, 181, 211, 248, 81, 164, 110, 167, 158, 63, 184, 41, 142, 167, 202, 32, 56, 231, 61, 34, 138, 179, 112, 43, 21, 23, 64, 52, 9, 137, 204, 134, 80, 21, 57, 37, 132, 149, 51, 89, 191, 107, 72, 119, 123, 102, 68, 249, 245, 67, 17, 213, 195, 59, 159, 30, 33, 28, 230, 68, 144, 175, 120, 96, 41, 84, 168, 90, 145, 12, 245, 44, 145, 252, 118, 101, 78, 13, 45, 204, 176, 74, 180, 38, 215, 82, 112, 128, 42, 211, 57, 28, 212, 0, 176, 178, 182, 152, 231, 116, 228, 108, 51, 222, 125, 188, 250, 223, 110, 30, 104, 226, 247, 192, 3, 134, 160, 8, 90, 202, 99, 136, 133, 41, 242, 210, 149, 57, 248, 172, 189, 70, 176, 76, 202, 36, 14, 137, 188, 37, 130, 191, 70, 181, 221, 145, 62, 151, 12, 66, 20, 116, 189, 32, 145, 245, 41, 145, 227, 190, 79, 240, 118, 229, 202, 48, 22, 64, 233, 90, 128, 12, 241, 36, 85, 218, 160, 0, 108, 244, 133, 112, 16, 69, 191, 217, 85, 156, 4, 246, 87, 29, 109, 95, 146, 162, 218, 233, 253, 104, 231, 120, 31, 173, 176, 251, 27, 122, 206, 107, 231, 6, 195, 192, 33, 165, 12, 65, 146, 226, 72, 108, 157, 14, 175, 158, 34, 63, 7, 81, 177, 159, 202, 112, 149, 77, 90, 40, 237, 222, 72, 226, 108, 151, 55, 5, 30, 35, 73, 52, 31, 116, 142, 48, 43, 67, 70, 122, 206, 105, 72, 115, 83, 114, 89, 173, 96, 41, 91, 48, 169, 78, 119, 173, 68, 8, 34, 84, 156, 224, 185, 213, 251, 81, 249, 197, 23, 208, 228, 254, 146, 62, 184, 213, 42, 71, 235, 112, 211, 237, 35, 242, 185, 61, 193, 43, 39, 45, 87, 57, 113, 90, 152, 232, 227, 87, 68, 57, 59, 184, 195, 177, 90, 213, 130, 216, 106, 73, 48, 9, 214, 184, 126, 198, 95, 206, 244, 200, 107, 193, 131, 85, 156, 175, 56, 88, 152, 38, 196, 106, 102, 98, 32, 201, 204, 52, 17, 173, 16, 73, 30, 150, 64, 197, 244, 204, 230, 118, 116, 219, 239, 153, 101, 16, 49, 124, 239, 124, 105, 2, 252, 228, 81, 111, 36, 121, 119, 114, 194, 222, 24, 15, 54, 88, 140, 227, 131, 254, 204, 227, 149, 15, 244, 105, 189, 77, 187, 255, 25, 116, 127, 53, 175, 205, 142, 164, 199, 253, 242, 244, 213, 75, 193, 163, 89, 97, 223, 245, 160, 11, 54, 35, 74, 160, 64, 85, 112, 132, 117, 176, 64, 159, 238, 149, 114, 26, 33, 135, 228, 223, 234, 197, 204, 162, 254, 231, 47, 99, 189, 138, 12, 10, 243, 203, 114, 16, 110, 231, 100, 157, 211, 228, 88, 220, 147, 59, 19, 146, 53, 50, 11, 176, 104, 38, 94, 240, 187, 149, 51, 116, 122, 173, 206, 32, 11, 123, 223, 138, 130, 228, 149, 243, 162, 218, 162, 213, 95, 58, 137, 97, 31, 206, 218, 0, 48, 177, 237, 175, 126, 31, 14, 255, 220, 110, 53, 133, 177, 158, 43, 226, 177, 232, 88, 95, 205, 21, 224, 118, 236, 26, 141, 6, 142, 231, 198, 156, 159, 80, 71, 52, 218, 52, 83, 74, 137, 54, 120, 244, 126, 73, 166, 225, 241, 141, 60, 47, 154, 112, 2, 37, 8, 113, 211, 4, 155, 162, 187, 64, 176, 150, 180, 149, 138, 11, 185, 204, 1, 57, 17, 164, 1, 61, 234, 169, 71, 58, 61, 7, 212, 190, 29, 162, 44, 127, 144, 96, 115, 1, 244, 254, 149, 245, 140, 158, 243, 58, 181, 111, 131, 133, 230, 195, 172, 71, 191, 161, 200, 109, 54, 252, 222, 252, 215, 141, 241, 134, 251, 124, 245, 81, 53, 150, 49, 152, 71, 18, 191, 245, 201, 212, 152, 66, 164, 245, 142, 4, 156, 217, 57, 155, 71, 233, 238, 40, 145, 39, 19, 44, 39, 94, 2, 165, 221, 134, 166, 33, 161, 200, 255, 146, 49, 83, 144, 132, 88, 245, 82, 188, 74, 46, 207, 205, 19, 71, 230, 22, 29, 192, 39, 165, 106, 240, 251, 185, 130, 48, 131, 34, 118, 63, 98, 195, 35, 149, 17, 244, 45, 71, 91, 174, 243, 15, 184, 190, 110, 43, 129, 102, 143, 21, 61, 75, 237, 147, 168, 31, 19, 168, 222, 50, 68, 221, 74, 209, 67, 33, 237, 78, 201, 23, 117, 175, 135, 83, 44, 198, 141, 125, 27, 198, 85, 244, 117, 118, 205, 178, 135, 62, 57, 237, 19, 138, 246, 118, 193, 220, 164, 126, 156, 165, 125, 134, 217, 227, 147, 248, 19, 115, 115, 103, 73, 150, 113, 252, 164, 166, 227, 24, 76, 159, 103, 228, 210, 97, 16, 246, 150, 160, 155, 103, 64, 72, 83, 203, 126, 179, 250, 216, 223, 241, 234, 78, 213, 5, 74, 153, 179, 176, 71, 2, 52, 120, 120, 63, 15, 247, 151, 99, 28, 8, 239, 212, 246, 189, 133, 134, 168, 101, 95, 95, 127, 71, 88, 87, 8, 247, 132, 253, 139, 21, 92, 218, 64, 146, 6, 166, 173, 9, 158, 76, 9, 61, 156, 3, 33, 21, 9, 219, 120, 184, 191, 192, 134, 111, 112, 14, 21, 159, 188, 146, 86, 237, 207, 140, 33, 175, 77, 254, 244, 107, 247, 21, 94, 0, 76, 195, 13, 218, 76, 219, 241, 95, 251, 217, 228, 72, 66, 81, 25, 116, 183, 148, 83, 145, 180, 2, 212, 37, 122, 241, 143, 236, 124, 230, 34, 69, 10, 178, 48, 83, 141, 105, 14, 110, 4, 30, 71, 70, 20, 104, 149, 187, 175, 51, 121, 6, 165, 198, 242, 148, 101, 51, 187, 110, 230, 81, 0, 24, 138, 218, 200, 133, 31, 30, 193, 96, 189, 4, 114, 46, 18, 105, 215, 12, 194, 95, 158, 85, 241, 158, 101, 163, 49, 15, 249, 208, 254, 26, 126, 21, 121, 173, 22, 64, 120, 152, 28, 255, 159, 61, 160, 101, 89, 166, 121, 245, 216, 51, 166, 91, 222, 128, 152, 80, 194, 107, 161, 233, 140, 54, 160, 180, 131, 113, 119, 28, 135, 211, 189, 167, 72, 179, 140, 180, 189, 237, 213, 186, 76, 69, 160, 39, 253, 109, 252, 166, 204, 28, 115, 224, 3, 240, 99, 244, 141, 139, 19, 213, 93, 76, 21, 199, 3, 110, 12, 43, 24, 222, 20, 113, 47, 165, 112, 178, 122, 128, 0, 217, 138, 143, 61, 145, 65, 71, 27, 130, 219, 10, 190, 195, 140, 230, 208, 198, 155, 99, 154, 58, 160, 73, 71, 92, 201, 234, 237, 205, 44, 183, 57, 24, 81, 111, 114, 134, 83, 32, 172, 214, 187, 240, 170, 225, 241, 90, 75, 49, 156, 63, 70, 198, 132, 4, 27, 203, 10, 56, 187, 123, 1, 32, 194, 82, 230, 45, 171, 144, 166, 144, 183, 148, 101, 174, 123, 153, 156, 2, 206, 175, 17, 75, 244, 129, 210, 34, 101, 98, 253, 163, 198, 210, 213, 103, 3, 184, 58, 230, 33, 121, 11, 111, 12, 245, 27, 0, 228, 47, 101, 67, 188, 239, 202, 113, 31, 215, 185, 8, 179, 8, 32, 210, 35, 156, 198, 90, 13, 7, 207, 74, 174, 135, 233, 129, 101, 113, 3, 5, 117, 206, 93, 169, 64, 161, 158, 126, 242, 24, 218, 123, 64, 165, 70, 196, 166, 220, 224, 131, 96, 4, 75, 208, 43, 244, 69, 121, 29, 184, 51, 54, 90, 37, 52, 13, 18, 52, 98, 126, 189, 90, 104, 108, 32, 235, 66, 210, 10, 232, 133, 181, 93, 27, 57, 188, 161, 106, 177, 194, 165, 79, 175, 150, 230, 6, 234, 103, 248, 194, 122, 178, 184, 149, 174, 71, 23, 80, 203, 203, 147, 241, 202, 168, 19, 95, 16, 210, 12, 75, 51, 218, 231, 244, 229, 227, 49, 188, 172, 184, 51, 109, 112, 18, 61, 6, 246, 75, 19, 51, 0, 192, 241, 113, 162, 175, 135, 240, 15, 238, 34, 115, 186, 240, 66, 9, 165, 17, 83, 167, 230, 226, 183, 122, 43, 147, 46, 117, 178, 164, 92, 16, 163, 72, 171, 232, 42, 200, 139, 212, 158, 176, 174, 245, 103, 66, 231, 104, 98, 14, 40, 206, 133, 57, 185, 217, 200, 196, 231, 48, 0, 233, 158, 34, 252, 43, 164, 163, 127, 46, 210, 166, 0, 46, 115, 126, 200, 138, 214, 96, 32, 208, 93, 148, 212, 69, 91, 248, 129, 118, 186, 117, 82, 22, 165, 138, 135, 117, 197, 101, 128, 70, 89, 139, 215, 254, 41, 223, 236, 65, 4, 23, 141, 177, 32, 237, 174, 214, 17, 131, 28, 115, 78, 108, 25, 160, 211, 229, 242, 26, 228, 22, 20, 97, 95, 40, 231, 212, 9, 179, 151, 123, 59, 75, 42, 220, 253, 143, 74, 100, 112, 104, 154, 180, 105, 251, 58, 126, 70, 170, 157, 234, 54, 81, 57, 121, 232, 28, 228, 12, 166, 55, 161, 236, 195, 22, 23, 9, 136, 114, 45, 83, 161, 67, 173, 117, 162, 79, 167, 139, 27, 23, 187, 134, 117, 4, 228, 236, 80, 183, 110, 76, 224, 67, 49, 25, 238, 77, 213, 153, 131, 35, 26, 227, 80, 204, 65, 119, 120, 218, 116, 66, 106, 80, 98, 23, 69, 224, 202, 76, 169, 130, 35, 96, 234, 255, 82, 143, 195, 51, 97, 192, 163, 71, 177, 70, 49, 61, 51, 253, 156, 70, 156, 65, 176, 235, 252, 236, 225, 8, 9, 75, 170, 228, 186, 162, 63, 147, 81, 9, 227, 72, 91, 73, 172, 95, 64, 94, 64, 77, 163, 202, 201, 160, 231, 47, 198, 41, 34, 219, 187, 56, 234, 147, 245, 190, 77, 20, 75, 115, 159, 72, 63, 116, 158, 180, 221, 4, 5, 223, 194, 26, 185, 196, 47, 220, 203, 254, 75, 224, 151, 43, 206, 25, 239, 58, 4, 227, 10, 242, 42, 143, 171, 136, 94, 104, 235, 208, 214, 250, 88, 166, 166, 224, 176, 102, 64, 34, 56, 114, 206, 63, 196, 22, 94, 102, 159, 38, 182, 255, 215, 41, 165, 243, 105, 0, 93, 145, 232, 129, 22, 111, 227, 22, 40, 247, 248, 113, 96, 71, 181, 253, 102, 141, 64, 74, 151, 165, 192, 164, 244, 83, 124, 33, 139, 122, 141, 198, 95, 26, 171, 101, 125, 59, 18, 90, 58, 213, 149, 190, 185, 247, 75, 121, 93, 67, 84, 241, 40, 92, 30, 61, 175, 160, 15, 65, 216, 186, 105, 19, 13, 213, 149, 142, 46, 183, 131, 109, 37, 1, 217, 78, 94, 201, 188, 144, 125, 87, 172, 189, 229, 123, 169, 205, 132, 194, 60, 49, 220, 44, 83, 99, 0, 170, 235, 160, 16, 38, 41, 182, 235, 146, 142, 252, 38, 99, 134, 84, 3, 55, 5, 37, 119, 198, 163, 167, 17, 81, 124, 103, 157, 93, 220, 155, 96, 155, 148, 220, 39, 54, 184, 244, 53, 18, 85, 208, 146, 197, 1, 182, 126, 196, 132, 253, 31, 28, 97, 245, 163, 79, 80, 182, 209, 51, 82, 24, 47, 9, 107, 196, 174, 238, 159, 117, 247, 15, 155, 15, 24, 178, 123, 78, 144, 14, 2, 234, 42, 137, 96, 157, 75, 171, 203, 203, 61, 168, 245, 192, 23, 122, 78, 62, 247, 35, 183, 62, 144, 149, 221, 248, 225, 24, 1, 239, 66, 70, 36, 194, 25, 173, 70, 54, 189, 68, 233, 147, 101, 116, 129, 171, 144, 165, 46, 5, 123, 93, 194, 129, 137, 99, 194, 162, 111, 16, 75, 147, 40, 99, 210, 178, 57, 211, 216, 86, 1, 136, 223, 115, 79, 123, 155, 207, 37, 89, 57, 81, 85, 155, 7, 51, 199, 244, 124, 241, 109, 244, 34, 221, 107, 47, 3, 171, 145, 234, 219, 54, 36, 9, 68, 155, 24, 67, 122, 110, 40, 129, 4, 194, 37, 192, 164, 108, 79, 18, 26, 235, 68, 130, 227, 244, 98, 234, 189, 55, 193, 54, 93, 13, 137, 236, 155, 46, 252, 244, 125, 107, 153, 160, 121, 246, 2, 5, 188, 134, 114, 34, 129, 123, 140, 92, 4, 43, 23, 231, 236, 29, 96, 172, 55, 18, 214, 234, 206, 142, 98, 129, 19, 27, 76, 13, 203, 0, 15, 243, 13, 247, 147, 165, 195, 219, 100, 193, 50, 238, 236, 250, 19, 77, 237, 209, 172, 190, 77, 206, 220, 232, 47, 105, 154, 105, 59, 68, 172, 192, 40, 4, 5, 156, 122, 36, 253, 173, 201, 153, 29, 150, 181, 118, 227, 15, 242, 80, 66, 240, 190, 230, 15, 157, 207, 81, 225, 135, 99, 171, 136, 154, 137, 27, 37, 122, 90, 243, 157, 90, 204, 48, 86, 163, 158, 191, 47, 174, 14, 185, 97, 26, 68, 210, 121, 243, 202, 255, 105, 218, 195, 160, 129, 89, 45, 171, 234, 135, 114, 108, 206, 144, 163, 126, 157, 99, 23, 190, 193, 67, 83, 1, 57, 37, 66, 9, 203, 184, 20, 124, 150, 253, 48, 31, 211, 119, 240, 187, 98, 193, 115, 72, 137, 5, 124, 202, 31, 251, 220, 202, 96, 86, 5, 209, 92, 203, 255, 100, 115, 126, 100, 158, 180, 4, 95, 107, 1, 7, 145, 59, 0, 16, 23, 224, 177, 27, 30, 183, 48, 5, 187, 22, 6, 1, 49, 233, 206, 105, 61, 198, 232, 25, 233, 79, 137, 98, 141, 176, 217, 122, 27, 156, 95, 165, 59, 88, 246, 48, 92, 161, 211, 242, 88, 55, 255, 239, 48, 10, 87, 236, 215, 124, 98, 213, 151, 217, 89, 168, 150, 134, 211, 238, 166, 86, 234, 121, 199, 25, 5, 185, 203, 91, 141, 165, 28, 190, 29, 10, 133, 132, 255, 45, 124, 34, 9, 140, 197, 190, 11, 30, 79, 179, 195, 211, 127, 84, 125, 93, 101, 70, 126, 87, 187, 231, 184, 187, 33, 114, 248, 197, 135, 228, 3, 141, 247, 10, 77, 172, 66, 209, 83, 13, 218, 19, 188, 188, 231, 86, 119, 38, 216, 138, 158, 219, 19, 26, 201, 237, 196, 122, 231, 74, 120, 146, 203, 166, 72, 226, 131, 232, 60, 236, 25, 230, 208, 184, 77, 228, 7, 70, 149, 152, 238, 187, 70, 139, 59, 111, 37, 35, 180, 182, 61, 11, 70, 127, 13, 109, 93, 164, 94, 47, 83, 232, 159, 195, 117, 231, 62, 24, 163, 209, 165, 74, 184, 222, 48, 176, 122, 105, 158, 77, 27, 19, 23, 197, 255, 203, 20, 22, 32, 241, 129, 112, 161, 4, 82, 29, 84, 52, 105, 189, 236, 10, 74, 128, 14, 51, 137, 80, 199, 96, 157, 193, 76, 226, 99, 12, 107, 73, 27, 42, 101, 151, 232, 15, 214, 30, 19, 165, 79, 174, 145, 113, 111, 164, 80, 229, 175, 51, 152, 1, 64, 74, 236, 128, 33, 143, 3, 248, 192, 10, 56, 213, 238, 96, 173, 57, 173, 0, 9, 239, 209, 105, 222, 14, 146, 128, 190, 182, 213, 61, 128, 204, 197, 163, 14, 234, 27, 252, 143, 170, 195, 81, 157, 214, 8, 226, 111, 52, 211, 250, 121, 208, 232, 108, 38, 231, 132, 140, 27, 100, 49, 138, 155, 112, 165, 232, 58, 96, 20, 254, 139, 18, 217, 38, 189, 29, 210, 191, 199, 51, 47, 241, 108, 177, 227, 221, 86, 240, 160, 34, 67, 191, 36, 181, 136, 249, 142, 133, 198, 127, 91, 245, 194, 111, 165, 254, 22, 38, 20, 184, 204, 40, 100, 77, 246, 82, 96, 100, 234, 209, 105, 235, 84, 219, 89, 121, 199, 255, 31, 21, 6, 157, 190, 230, 234, 132, 6, 247, 33, 226, 105, 164, 164, 139, 251, 59, 152, 189, 129, 28, 71, 158, 226, 184, 199, 155, 100, 89, 60, 6, 126, 165, 214, 193, 124, 194, 246, 167, 211, 159, 210, 182, 24, 228, 241, 135, 221, 70, 65, 75, 239, 76, 204, 92, 109, 129, 46, 143, 227, 43, 32, 242, 197, 210, 10, 162, 104, 142, 226, 106, 144, 177, 133, 230, 237, 78, 128, 214, 13, 174, 197, 194, 196, 184, 135, 245, 219, 89, 91, 56, 13, 132, 205, 101, 142, 22, 4, 243, 150, 105, 24, 104, 24, 194, 211, 174, 138, 227, 176, 215, 151, 123, 26, 228, 181, 101, 250, 144, 208, 225, 213, 113, 154, 92, 117, 77, 17, 11, 22, 213, 226, 93, 119, 56, 81, 178, 39, 202, 0, 108, 226, 187, 237, 249, 63, 48, 27, 101, 0, 245, 58, 205, 162, 80, 21, 142, 221, 235, 93, 205, 240, 206, 249, 13, 212, 179, 141, 37, 209, 101, 164, 95, 189, 238, 69, 214, 85, 102, 207, 244, 191, 244, 76, 128, 81, 56, 94, 42, 251, 211, 101, 129, 123, 220, 242, 221, 11, 101, 109, 213, 89, 204, 25, 239, 252, 134, 92, 121, 214, 137, 202, 7, 243, 186, 164, 124, 72, 138, 109, 61, 248, 5, 8, 149, 250, 40, 117, 101, 160, 101, 104, 124, 167, 16, 176, 96, 107, 104, 85, 149, 232, 103, 109, 238, 69, 162, 40, 11, 162, 210, 19, 245, 66, 6, 35, 164, 206, 7, 50, 89, 104, 133, 121, 165, 119, 250, 17, 143, 41, 68, 10, 179, 99, 183, 136, 153, 51, 137, 202, 94, 183, 96, 106, 56, 224, 126, 195, 154, 162, 126, 224, 176, 113, 122, 146, 62, 170, 87, 185, 139, 210, 19, 128, 95, 153, 188, 117, 20, 55, 69, 20, 186, 96, 189, 51, 15, 229, 231, 128, 112, 200, 251, 149, 188, 6, 114, 30, 161, 254, 12, 95, 75, 201, 207, 143, 254, 96, 71, 56, 6, 78, 170, 16, 87, 34, 109, 82, 68, 103, 110, 121, 72, 40, 141, 249, 84, 254, 172, 169, 39, 76, 73, 161, 167, 13, 26, 91, 15, 195, 145, 69, 53, 15, 37, 160, 137, 92, 121, 154, 51, 11, 113, 127, 22, 120, 159, 115, 195, 130, 240, 240, 220, 239, 160, 166, 250, 144, 43, 139, 144, 9, 53, 140, 194, 86, 150, 169, 125, 54, 230, 175, 112, 121, 180, 149, 30, 69, 187, 228, 255, 114, 184, 54, 53, 5, 243, 237, 157, 198, 11, 205, 208, 237, 82, 48, 132, 83, 226, 182, 150, 38, 131, 120, 85, 124, 71, 202, 162, 255, 73, 179, 54, 12, 140, 219, 246, 77, 98, 162, 66, 75, 166, 75, 114, 239, 37, 185, 229, 111, 27, 241, 117, 8, 86, 224, 44, 7, 178, 67, 181, 62, 19, 2, 27, 160, 119, 110, 141, 203, 75, 227, 21, 170, 214, 143, 147, 188, 202, 156, 136, 163, 121, 23, 20, 120, 94, 203, 198, 198, 164, 192, 166, 94, 226, 100, 81, 119, 130, 77, 182, 36, 207, 6, 38, 88, 8, 233, 147, 33, 64, 69, 178, 149, 132, 9, 134, 80, 92, 3, 195, 250, 209, 209, 235, 48, 211, 48, 30, 156, 240, 140, 105, 219, 141, 142, 221, 38, 75, 16, 58, 124, 216, 68, 214, 97, 131, 44, 195, 212, 179, 83, 202, 88, 96, 87, 149, 93, 219, 133, 15, 176, 199, 132, 76, 175, 113, 41, 3, 97, 81, 16, 250, 181, 152, 135, 64, 195, 180, 172, 210, 82, 29, 254, 242, 75, 38, 165, 75, 37, 73, 92, 160, 14, 142, 63, 153, 78, 221, 202, 241, 76, 76, 71, 29, 1, 33, 143, 62, 163, 45, 120, 208, 210, 154, 30, 143, 208, 179, 23, 239, 163, 45, 90, 199, 13, 26, 113, 48, 164, 165, 155, 159, 173, 159, 18, 137, 223, 126, 185, 134, 114, 185, 163, 87, 101, 67, 173, 217, 15, 90, 247, 240, 57, 226, 39, 192, 19, 142, 54, 0, 239, 145, 19, 69, 9, 8, 67, 35, 71, 0, 23, 64, 142, 236, 241, 164, 60, 80, 60, 27, 25, 18, 203, 133, 227, 66, 233, 85, 115, 187, 165, 240, 48, 17, 58, 24, 122, 151, 238, 142, 205, 136, 225, 160, 143, 197, 25, 149, 82, 171, 191, 118, 241, 192, 127, 221, 64, 85, 239, 95, 200, 148, 2, 210, 26, 51, 64, 210, 100, 32, 14, 95, 119, 81, 183, 144, 254, 131, 92, 31, 197, 105, 251, 64, 111, 163, 203, 153, 225, 236, 215, 197, 181, 7, 106, 62, 157, 235, 123, 42, 164, 45, 236, 140, 182, 0, 208, 105, 67, 230, 84, 185, 107, 65, 215, 165, 200, 67, 167, 242, 129, 207, 147, 143, 123, 61, 23, 203, 168, 48, 107, 158, 51, 229, 192, 153, 137, 81, 54, 22, 94, 62, 60, 224, 179, 173, 251, 123, 149, 59, 34, 104, 224, 198, 44, 63, 64, 251, 167, 86, 99, 148, 188, 94, 160, 242, 158, 137, 118, 165, 228, 19, 77, 212, 20, 77, 237, 213, 46, 36, 54, 73, 136, 137, 49, 176, 84, 245, 66, 213, 24, 44, 107, 208, 62, 250, 236, 35, 234, 175, 5, 127, 62, 95, 137, 103, 141, 39, 96, 199, 200, 143, 160, 142, 209, 199, 12, 195, 188, 118, 27, 23, 40, 237, 224, 150, 102, 117, 58, 212, 126, 25, 78, 151, 214, 154, 158, 208, 93, 31, 100, 227, 23, 189, 119, 195, 98, 28, 29, 73, 69, 204, 45, 99, 192, 169, 153, 142, 194, 249, 82, 164, 39, 56, 148, 5, 176, 106, 107, 179, 210, 164, 197, 102, 21, 129, 78, 33, 69, 116, 49, 212, 196, 4, 6, 75, 121, 123, 96, 17, 122, 17, 215, 13, 88, 70, 128, 224, 245, 96, 117, 114, 176, 37, 252, 2, 164, 168, 16, 147, 164, 158, 242, 55, 139, 8, 254, 125, 27, 102, 23, 6, 9, 52, 136, 225, 3, 249, 26, 56, 174, 213, 36, 34, 53, 251, 46, 245, 46, 47, 95, 215, 219, 106, 114, 99, 243, 14, 161, 173, 243, 158, 134, 73, 129, 201, 179, 65, 43, 220, 71, 69, 17, 192, 189, 189, 188, 44, 53, 225, 205, 57, 242, 201, 51, 49, 13, 5, 80, 126, 163, 43, 48, 77, 238, 104, 80, 138, 146, 164, 211, 71, 71, 198, 10, 134, 202, 201, 45, 22, 51, 163, 194, 226, 172, 87, 33, 230, 78, 44, 0, 137, 149, 212, 66, 159, 91, 111, 55, 197, 126, 165, 176, 110, 0, 235, 34, 12, 194, 204, 206, 176, 2, 77, 128, 223, 98, 177, 114, 208, 56, 200, 34, 77, 114, 168, 1, 125, 230, 17, 187, 158, 33, 72, 32, 105, 238, 126, 176, 229, 24, 39, 14, 89, 60, 123, 122, 124, 67, 2, 224, 212, 61, 229, 167, 0, 99, 152, 37, 193, 215, 152, 12, 13, 70, 192, 171, 248, 138, 4, 213, 98, 120, 24, 224, 244, 50, 104, 88, 37, 213, 127, 29, 138, 104, 187, 144, 7, 102, 49, 246, 78, 132, 230, 218, 224, 98, 129, 97, 161, 85, 15, 99, 200, 218, 220, 25, 183, 59, 214, 228, 232, 54, 253, 173, 132, 149, 212, 32, 35, 152, 118, 99, 196, 96, 15, 91, 73, 122, 224, 166, 181, 83, 250, 152, 29, 60, 72, 230, 109, 245, 136, 157, 162, 204, 73, 19, 66, 214, 49, 45, 16, 4, 161, 234, 107, 218, 10, 3, 151, 232, 168, 72, 140, 247, 174, 23, 14, 186, 123, 148, 186, 156, 156, 213, 185, 68, 123, 37, 224, 17, 6, 151, 169, 94, 118, 52, 174, 189, 145, 22, 138, 93, 45, 4, 87, 104, 203, 76, 62, 148, 149, 158, 97, 16, 181, 160, 93, 129, 227, 132, 30, 39, 204, 227, 83, 232, 182, 14, 28, 27, 63, 188, 48, 80, 19, 172, 215, 124, 35, 170, 22, 164, 28, 119, 93, 91, 80, 16, 191, 49, 146, 152, 107, 28, 64, 168, 92, 181, 207, 231, 241, 122, 59, 254, 5, 205, 254, 82, 53, 62, 249, 133, 56, 10, 124, 197, 20, 76, 158, 129, 139, 253, 187, 189, 237, 20, 252, 198, 63, 45, 60, 143, 35, 78, 23, 180, 157, 133, 87, 83, 233, 58, 43, 50, 234, 72, 99, 238, 29, 245, 9, 129, 140, 43, 187, 56, 57, 94, 48, 73, 95, 255, 247, 152, 106, 153, 155, 242, 245, 30, 247, 180, 187, 164, 241, 41, 247, 171, 206, 61, 155, 53, 75, 155, 67, 207, 131, 227, 41, 81, 29, 81, 172, 182, 37, 81, 163, 8, 105, 193, 151, 198, 223, 147, 217, 156, 114, 141, 84, 228, 6, 51, 162, 44, 171, 79, 250, 156, 81, 16, 236, 102, 121, 234, 135, 60, 59, 122, 193, 98, 146, 18, 194, 163, 236, 14, 208, 241, 248, 181, 227, 249, 216, 234, 188, 62, 5, 142, 1, 50, 99, 238, 0, 93, 58, 13, 73, 24, 200, 221, 187, 210, 214, 141, 35, 120, 71, 99, 137, 25, 110, 133, 10, 118, 169, 207, 97, 127, 110, 109, 38, 199, 146, 150, 200, 224, 9, 25, 168, 165, 15, 136, 150, 211, 76, 244, 232, 230, 223, 132, 104, 193, 119, 173, 192, 251, 248, 39, 60, 136, 153, 88, 136, 44, 124, 216, 107, 119, 31, 18, 203, 184, 11, 150, 62, 4, 177, 228, 58, 1, 20, 151, 215, 100, 217, 213, 192, 98, 198, 52, 44, 203, 227, 97, 178, 198, 168, 83, 202, 15, 84, 160, 82, 166, 108, 66, 52, 8, 221, 7, 60, 179, 202, 108, 85, 20, 214, 1, 77, 39, 221, 153, 101, 130, 232, 7, 44, 241, 187, 136, 252, 134, 243, 37, 85, 153, 235, 124, 182, 35, 27, 178, 16, 159, 139, 28, 172, 52, 196, 241, 225, 135, 148, 51, 176, 39, 27, 162, 70, 142, 129, 82, 32, 203, 132, 96, 253, 219, 118, 164, 84, 201, 62, 151, 206, 32, 149, 97, 42, 162, 182, 89, 103, 202, 202, 14, 252, 226, 187, 163, 45, 189, 107, 110, 31, 227, 181, 31, 111, 204, 113, 168, 238, 13, 183, 164, 58, 105, 100, 196, 164, 2, 164, 235, 108, 51, 214, 12, 208, 250, 180, 138, 217, 250, 246, 244, 221, 215, 17, 152, 105, 253, 106, 245, 164, 197, 187, 130, 20, 148, 215, 250, 202, 36, 73, 92, 42, 90, 83, 190, 160, 189, 159, 220, 201, 72, 19, 144, 164, 72, 211, 236, 190, 180, 118, 240, 147, 110, 153, 110, 98, 192, 55, 101, 31, 216, 7, 58, 12, 70, 216, 158, 152, 30, 46, 95, 86, 248, 8, 211, 50, 202, 142, 198, 140, 20, 124, 26, 168, 56, 236, 227, 118, 217, 217, 13, 190, 135, 129, 213, 252, 89, 49, 41, 184, 65, 82, 206, 105, 224, 79, 250, 22, 179, 251, 201, 201, 241, 146, 255, 202, 209, 127, 110, 106, 238, 135, 45, 130, 104, 188, 73, 172, 244, 16, 1, 100, 78, 209, 119, 139, 153, 53, 24, 147, 193, 176, 193, 173, 88, 152, 6, 212, 48, 232, 209, 57, 9, 13, 78, 87, 97, 158, 67, 1, 109, 76, 50, 61, 224, 190, 132, 79, 115, 168, 179, 245, 13, 156, 127, 94, 126, 217, 29, 100, 198, 104, 39, 162, 142, 190, 59, 210, 57, 138, 36, 107, 16, 204, 38, 36, 3, 148, 73, 95, 221, 5, 213, 145, 219, 254, 94, 173, 120, 253, 163, 138, 213, 179, 201, 71, 105, 240, 4, 175, 238, 26, 113, 197, 65, 143, 173, 49, 94, 50, 77, 111, 123, 187, 71, 39, 153, 184, 174, 193, 84, 26, 197, 156, 110, 31, 70, 133, 86, 68, 223, 178, 245, 109, 228, 71, 232, 76, 110, 213, 172, 132, 146, 7, 136, 221, 153, 85, 152, 204, 124, 78, 9, 11, 192, 77, 74, 249, 149, 42, 131, 239, 130, 218, 242, 245, 114, 89, 157, 43, 35, 205, 152, 235, 47, 214, 98, 9, 71, 160, 28, 168, 186, 251, 197, 124, 67, 59, 22, 209, 164, 252, 12, 203, 96, 140, 154, 38, 35, 241, 119, 50, 34, 159, 7, 177, 103, 25, 119, 78, 30, 21, 137, 156, 200, 149, 149, 122, 90, 155, 79, 203, 42, 161, 211, 94, 51, 124, 153, 21, 79, 206, 208, 95, 231, 124, 93, 65, 143, 21, 138, 133, 247, 61, 130, 50, 46, 131, 249, 51, 97, 50, 245, 229, 106, 40, 212, 10, 51, 11, 12, 201, 207, 12, 181, 64, 137, 163, 174, 119, 77, 93, 87, 218, 173, 1, 167, 163, 171, 163, 201, 248, 154, 230, 157, 248, 12, 221, 142, 72, 23, 194, 196, 8, 74, 222, 18, 95, 86, 128, 204, 142, 122, 56, 99, 94, 64, 186, 85, 221, 1, 42, 178, 177, 152, 45, 109, 55, 161, 198, 183, 70, 88, 0, 45, 243, 153, 210, 1, 119, 111, 78, 116, 37, 98, 143, 233, 173, 180, 86, 37, 38, 219, 132, 26, 62, 191, 172, 46, 224, 222, 117, 255, 13, 22, 56, 185, 88, 49, 203, 228, 78, 107, 72, 75, 129, 249, 198, 4, 43, 129, 115, 191, 221, 225, 19, 144, 239, 75, 143, 157, 126, 105, 42, 125, 131, 219, 210, 62, 48, 176, 104, 8, 131, 224, 44, 130, 137, 189, 99, 91, 50, 130, 77, 172, 225, 99, 87, 13, 131, 203, 93, 3, 177, 120, 94, 52, 14, 247, 165, 134, 142, 53, 112, 151, 52, 173, 1, 102, 250, 101, 239, 195, 7, 74, 236, 54, 241, 114, 189, 252, 131, 77, 76, 59, 64, 245, 127, 178, 224, 235, 153, 31, 135, 254, 233, 127, 38, 78, 178, 84, 73, 140, 184, 5, 148, 146, 146, 103, 106, 51, 197, 65, 194, 237, 119, 48, 170, 214, 230, 98, 87, 177, 42, 157, 231, 157, 94, 113, 184, 9, 186, 226, 207, 247, 43, 15, 50, 141, 215, 0, 156, 172, 107, 156, 4, 247, 36, 103, 231, 165, 169, 37, 88, 249, 192, 140, 204, 121, 136, 95, 235, 123, 217, 114, 186, 12, 112, 38, 4, 157, 212, 147, 158, 84, 207, 114, 23, 173, 71, 200, 219, 197, 204, 4, 20, 204, 113, 11, 165, 22, 39, 174, 110, 88, 248, 63, 0, 246, 49, 9, 73, 111, 164, 185, 204, 208, 86, 175, 60, 143, 228, 149, 230, 65, 172, 3, 223, 40, 92, 126, 56, 149, 42, 176, 174, 89, 46, 17, 13, 107, 131, 91, 52, 88, 126, 148, 124, 127, 13, 25, 12, 246, 232, 194, 7, 56, 31, 56, 106, 39, 240, 178, 163, 19, 213, 1, 244, 228, 238, 60, 95, 60, 221, 55, 183, 214, 72, 120, 105, 22, 15, 74, 202, 167, 142, 30, 108, 116, 88, 85, 134, 95, 142, 240, 104, 188, 147, 140, 124, 237, 101, 207, 237, 246, 93, 20, 31, 35, 138, 88, 242, 181, 226, 6, 127, 218, 35, 136, 113, 254, 41, 65, 16, 148, 162, 153, 73, 144, 160, 211, 250, 15, 104, 44, 134, 217, 14, 148, 182, 186, 138, 146, 230, 191, 80, 97, 140, 178, 167, 110, 9, 118, 221, 74, 199, 57, 92, 79, 189, 35, 176, 111, 63, 72, 81, 182, 35, 85, 177, 31, 178, 102, 0, 191, 45, 28, 225, 8, 20, 144, 38, 177, 44, 92, 30, 47, 224, 72, 1, 198, 124, 65, 234, 165, 207, 55, 212, 44, 151, 131, 19, 185, 174, 157, 201, 88, 17, 252, 27, 235, 118, 33, 76, 22, 40, 79, 153, 113, 217, 93, 231, 159, 212, 22, 176, 197, 20, 84, 29, 203, 116, 210, 181, 109, 37, 128, 10, 74, 58, 10, 176, 162, 114, 189, 243, 107, 202, 193, 231, 157, 5, 142, 163, 59, 18, 67, 239, 137, 114, 172, 207, 122, 180, 74, 108, 68, 104, 210, 45, 27, 230, 5, 25, 3, 109, 31, 66, 97, 4, 115, 2, 122, 237, 216, 85, 210, 33, 77, 115, 176, 212, 87, 24, 32, 19, 35, 153, 90, 165, 94, 60, 230, 91, 156, 76, 40, 46, 137, 13, 201, 44, 87, 244, 230, 19, 210, 120, 176, 15, 14, 11, 81, 43, 21, 163, 66, 118, 81, 205, 29, 99, 145, 234, 108, 92, 180, 77, 252, 245, 189, 79, 199, 67, 250, 5, 97, 240, 128, 196, 9, 203, 130, 63, 31, 234, 207, 100, 64, 215, 243, 109, 123, 57, 188, 111, 37, 58, 109, 153, 74, 219, 209, 155, 44, 253, 169, 169, 246, 206, 60, 29, 174, 110, 77, 20, 77, 204, 44, 58, 171, 138, 203, 169, 210, 236, 7, 245, 209, 180, 120, 32, 238, 121, 1, 60, 212, 141, 64, 222, 143, 124, 203, 198, 154, 74, 108, 214, 9, 55, 99, 155, 168, 39, 156, 174, 11, 16, 91, 65, 207, 95, 7, 242, 185, 80, 102, 143, 73, 199, 90, 30, 235, 129, 18, 34, 99, 195, 137, 81, 225, 226, 155, 140, 179, 155, 244, 72, 168, 172, 170, 84, 89, 43, 210, 178, 248, 181, 70, 147, 177, 135, 79, 242, 157, 182, 192, 223, 202, 182, 254, 124, 214, 18, 96, 123, 90, 195, 118, 35, 83, 27, 13, 177, 122, 136, 81, 236, 113, 188, 196, 71, 69, 211, 188, 66, 185, 212, 188, 141, 19, 32, 246, 187, 26, 220, 90, 163, 101, 225, 170, 38, 28, 233, 100, 37, 113, 246, 117, 186, 254, 145, 21, 217, 64, 213, 254, 134, 45, 141, 4, 150, 222, 246, 118, 255, 4, 117, 227, 152, 41, 171, 110, 140, 95, 41, 71, 240, 55, 230, 84, 226, 155, 94, 103, 203, 37, 67, 47, 236, 173, 225, 31, 59, 36, 84, 19, 94, 74, 6, 139, 106, 255, 96, 99, 183, 10, 241, 86, 86, 232, 148, 150, 197, 172, 248, 103, 85, 160, 243, 205, 254, 26, 174, 23, 73, 192, 154, 124, 234, 12, 170, 241, 31, 242, 89, 139, 40, 210, 231, 110, 34, 76, 230, 46, 110, 35, 20, 24, 54, 173, 97, 78, 201, 139, 35, 72, 104, 10, 132, 43, 137, 33, 37, 94, 113, 138, 105, 143, 107, 13, 248, 61, 131, 20, 113, 134, 120, 179, 205, 201, 91, 127, 130, 111, 135, 124, 75, 149, 241, 211, 21, 222, 103, 226, 236, 197, 113, 226, 231, 198, 35, 227, 218, 211, 239, 51, 210, 153, 46, 156, 22, 63, 144, 239, 114, 177, 40, 32, 112, 188, 74, 247, 215, 196, 109, 166, 179, 160, 37, 71, 87, 74, 125, 19, 89, 51, 250, 9, 16, 91, 0, 250, 93, 150, 123, 201, 231, 243, 29, 144, 94, 250, 133, 115, 98, 0, 222, 230, 251, 115, 231, 214, 111, 28, 222, 251, 98, 25, 46, 235, 20, 254, 11, 163, 39, 25, 164, 123, 161, 41, 241, 64, 91, 56, 56, 39, 5, 226, 88, 247, 137, 68, 199, 202, 112, 160, 144, 161, 53, 75, 239, 154, 138, 27, 35, 56, 72, 149, 204, 109, 211, 221, 66, 207, 55, 160, 215, 217, 76, 60, 232, 163, 166, 146, 202, 41, 72, 88, 37, 169, 44, 98, 0, 159, 204, 19, 206, 162, 57, 118, 225, 29, 147, 163, 221, 167, 41, 189, 18, 161, 132, 10, 25, 61, 138, 95, 170, 247, 153, 216, 177, 214, 87, 196, 208, 181, 38, 4, 24, 221, 198, 165, 27, 116, 224, 183, 47, 64, 234, 176, 166, 57, 207, 1, 14, 183, 32, 175, 0, 137, 24, 227, 27, 140, 65, 59, 254, 55, 136, 167, 206, 99, 155, 93, 137, 116, 117, 183, 81, 52, 216, 145, 218, 185, 103, 131, 228, 120, 38, 41, 64, 132, 235, 18, 70, 54, 238, 206, 200, 183, 221, 71, 247, 91, 44, 255, 72, 218, 1, 145, 24, 187, 106, 58, 189, 159, 69, 248, 2, 29, 50, 225, 11, 79, 181, 135, 2, 73, 84, 181, 174, 254, 52, 116, 144, 84, 71, 59, 185, 133, 186, 229, 122, 236, 70, 33, 231, 9, 98, 50, 139, 156, 64, 163, 136, 238, 179, 131, 143, 152, 18, 62, 235, 46, 21, 225, 35, 203, 250, 123, 128, 169, 187, 140, 227, 133, 71, 71, 82, 64, 121, 242, 183, 29, 100, 13, 111, 205, 209, 112, 234, 181, 5, 7, 114, 253, 69, 7, 224, 203, 207, 164, 150, 243, 103, 134, 151, 235, 21, 211, 4, 5, 156, 174, 172, 245, 66, 39, 141, 205, 2, 209, 112, 237, 60, 47, 251, 210, 103, 155, 177, 11, 232, 119, 121, 25, 92, 124, 141, 128, 29, 204, 161, 222, 152, 127, 231, 149, 102, 67, 151, 46, 8, 31, 72, 205, 28, 121, 144, 52, 200, 241, 116, 84, 30, 182, 90, 116, 7, 204, 231, 90, 168, 171, 176, 40, 12, 241, 59, 138, 84, 191, 115, 193, 111, 120, 135, 60, 92, 244, 106, 204, 129, 162, 80, 90, 80, 254, 75, 252, 222, 153, 203, 154, 176, 208, 165, 246, 47, 28, 122, 109, 244, 44, 140, 19, 243, 172, 119, 250, 110, 47, 53, 24, 43, 197, 202, 28, 241, 108, 112, 225, 146, 82, 43, 49, 34, 235, 183, 78, 83, 98, 83, 231, 90, 158, 64, 247, 136, 214, 121, 248, 225, 48, 6, 187, 203, 102, 13, 118, 157, 31, 138, 4, 7, 201, 101, 85, 225, 246, 177, 213, 104, 17, 233, 249, 31, 73, 156, 235, 102, 73, 63, 100, 37, 110, 150, 204, 235, 202, 255, 84, 141, 92, 33, 144, 34, 211, 24, 0, 81, 184, 88, 125, 229, 164, 66, 66, 207, 196, 141, 132, 18, 40, 187, 96, 82, 234, 56, 15, 62, 94, 140, 158, 129, 40, 242, 101, 167, 117, 245, 240, 24, 216, 2, 246, 50, 89, 241, 208, 127, 236, 118, 208, 124, 179, 65, 66, 112, 133, 221, 59, 186, 33, 162, 83, 37, 44, 203, 248, 83, 165, 24, 176, 197, 149, 116, 85, 242, 115, 18, 140, 4, 126, 174, 240, 142, 145, 240, 151, 138, 115, 174, 204, 65, 55, 110, 45, 213, 6, 191, 229, 134, 44, 191, 92, 220, 100, 214, 190, 152, 88, 194, 60, 234, 166, 70, 169, 202, 157, 22, 179, 119, 224, 238, 31, 61, 11, 103, 99, 9, 131, 242, 10, 145, 13, 196, 122, 154, 230, 230, 222, 107, 170, 67, 66, 128, 16, 224, 210, 145, 118, 52, 106, 82, 2, 141, 33, 52, 187, 120, 252, 233, 46, 158, 174, 197, 126, 84, 5, 169, 188, 24, 185, 243, 106, 223, 152, 36, 48, 37, 150, 77, 123, 6, 14, 191, 205, 189, 27, 26, 49, 63, 42, 88, 171, 133, 225, 116, 4, 9, 137, 47, 149, 242, 246, 9, 240, 72, 109, 178, 152, 239, 131, 114, 129, 35, 227, 253, 178, 195, 245, 53, 159, 5, 182, 81, 182, 88, 220, 1, 112, 82, 81, 83, 3, 76, 92, 179, 254, 80, 53, 181, 12, 222, 156, 179, 127, 106, 53, 106, 192, 75, 38, 125, 161, 243, 228, 61, 37, 19, 122, 132, 244, 126, 89, 200, 91, 91, 183, 51, 116, 113, 228, 157, 148, 82, 32, 175, 88, 135, 33, 151, 72, 58, 83, 64, 135, 38, 203, 189, 212, 59, 200, 86, 70, 147, 57, 141, 252, 176, 198, 111, 57, 23, 139, 2, 197, 162, 178, 226, 243, 181, 152, 217, 131, 90, 53, 44, 86, 113, 106, 30, 9, 224, 240, 50, 172, 150, 190, 170, 8, 176, 55, 36, 253, 50, 182, 211, 15, 47, 106, 0, 17, 94, 142, 113, 240, 71, 34, 83, 212, 95, 47, 87, 126, 154, 102, 55, 66, 93, 19, 212, 165, 16, 215, 31, 198, 167, 180, 162, 142, 246, 226, 120, 72, 202, 30, 197, 55, 188, 80, 102, 128, 48, 15, 235, 138, 174, 255, 244, 229, 216, 218, 28, 189, 180, 250, 140, 175, 44, 233, 137, 102, 123, 204, 220, 89, 57, 213, 198, 223, 248, 183, 21, 129, 46, 237, 208, 177, 67, 217, 0, 14, 196, 78, 135, 199, 136, 59, 154, 126, 245, 46, 101, 147, 209, 120, 190, 95, 64, 198, 21, 124, 149, 212, 251, 74, 99, 50, 75, 178, 221, 249, 168, 232, 38, 145, 28, 42, 164, 83, 90, 109, 75, 12, 247, 31, 46, 50, 127, 28, 148, 158, 194, 231, 161, 54, 179, 107, 189, 212, 248, 207, 36, 152, 186, 51, 48, 142, 239, 121, 250, 67, 237, 35, 32, 205, 160, 154, 240, 208, 147, 105, 213, 3, 142, 225, 244, 41, 31, 108, 205, 172, 125, 160, 145, 167, 73, 168, 234, 126, 113, 89, 29, 54, 135, 231, 82, 49, 174, 97, 196, 64, 207, 90, 182, 160, 196, 82, 179, 176, 243, 78, 154, 171, 167, 194, 129, 136, 196, 55, 104, 13, 160, 211, 244, 183, 215, 25, 36, 97, 69, 215, 231, 135, 175, 166, 52, 81, 183, 219, 101, 3, 95, 15, 225, 119, 178, 224, 142, 66, 7, 153, 159, 40, 17, 170, 179, 253, 42, 23, 26, 66, 232, 26, 87, 234, 42, 53, 93, 79, 183, 210, 110, 176, 116, 101, 113, 209, 98, 179, 46, 10, 77, 208, 24, 164, 237, 229, 161, 125, 224, 133, 116, 117, 103, 80, 168, 97, 85, 240, 70, 79, 189, 89, 196, 87, 125, 176, 42, 147, 10, 18, 200, 217, 129, 98, 57, 79, 100, 221, 210, 40, 41, 63, 191, 74, 31, 31, 161, 9, 163, 210, 105, 215, 149, 184, 149, 111, 110, 106, 240, 150, 140, 33, 103, 213, 143, 45, 77, 109, 2, 90, 124, 69, 192, 225, 151, 0, 240, 163, 10, 15, 225, 154, 205, 36, 125, 49, 168, 48, 5, 22, 62, 179, 254, 99, 84, 221, 174, 185, 224, 16, 161, 187, 146, 101, 174, 32, 14, 147, 128, 251, 63, 220, 240, 97, 162, 115, 244, 37, 76, 128, 86, 142, 214, 219, 84, 219, 237, 162, 186, 192, 79, 181, 102, 211, 48, 28, 185, 74, 206, 1, 209, 53, 225, 212, 19, 253, 51, 84, 40, 112, 37, 110, 79, 0, 82, 221, 105, 3, 165, 227, 100, 184, 104, 227, 103, 224, 227, 211, 168, 98, 178, 34, 235, 156, 98, 194, 18, 37, 115, 220, 178, 32, 211, 56, 165, 175, 127, 3, 194, 77, 196, 186, 25, 12, 29, 142, 139, 246, 251, 223, 161, 151, 50, 228, 226, 80, 57, 97, 108, 72, 27, 202, 195, 106, 14, 28, 149, 14, 179, 23, 94, 220, 188, 81, 87, 176, 172, 98, 119, 143, 198, 208, 139, 2, 80, 49, 58, 16, 188, 82, 136, 180, 76, 91, 50, 65, 57, 106, 104, 213, 156, 200, 91, 206, 174, 73, 169, 167, 33, 235, 235, 184, 178, 20, 106, 26, 150, 199, 147, 216, 31, 231, 94, 251, 186, 198, 86, 45, 51, 199, 105, 237, 125, 255, 185, 154, 87, 98, 80, 194, 244, 202, 251, 126, 75, 207, 128, 172, 102, 2, 193, 29, 44, 93, 73, 12, 210, 151, 182, 238, 61, 244, 91, 22, 69, 89, 85, 97, 251, 229, 169, 130, 141, 253, 228, 124, 151, 189, 88, 249, 64, 111, 241, 205, 135, 86, 196, 149, 32, 220, 222, 24, 88, 237, 187, 203, 66, 19, 95, 63, 5, 36, 180, 129, 13, 25, 95, 5, 251, 244, 159, 164, 125, 65, 91, 81, 247, 73, 2, 16, 226, 250, 23, 159, 196, 89, 174, 253, 84, 0, 92, 87, 204, 203, 115, 43, 173, 184, 67, 192, 87, 157, 87, 143, 48, 149, 78, 39, 124, 69, 64, 31, 190, 100, 186, 72, 232, 130, 17, 167, 169, 47, 97, 112, 21, 111, 254, 203, 52, 153, 243, 49, 243, 66, 34, 229, 52, 4, 168, 183, 144, 97, 233, 179, 75, 29, 88, 25, 46, 123, 134, 225, 18, 110, 55, 221, 215, 210, 236, 130, 26, 125, 96, 100, 101, 237, 171, 59, 171, 218, 186, 124, 144, 234, 208, 75, 56, 209, 192, 131, 187, 140, 199, 150, 233, 37, 202, 77, 85, 231, 219, 219, 211, 110, 106, 234, 34, 221, 148, 170, 9, 89, 128, 140, 182, 36, 249, 19, 194, 36, 15, 78, 34, 133, 145, 158, 25, 32, 242, 152, 144, 153, 232, 218, 117, 242, 36, 110, 245, 206, 154, 221, 189, 121, 5, 62, 247, 107, 143, 178, 34, 105, 81, 59, 243, 23, 107, 138, 5, 72, 29, 51, 209, 153, 70, 52, 122, 73, 230, 101, 58, 93, 234, 118, 86, 112, 74, 156, 236, 217, 190, 123, 74, 58, 66, 14, 13, 229, 37, 222, 174, 122, 204, 183, 46, 230, 107, 34, 49, 17, 109, 104, 176, 220, 62, 124, 213, 111, 165, 40, 245, 190, 45, 236, 155, 194, 128, 209, 28, 86, 255, 35, 228, 48, 65, 198, 7, 215, 179, 237, 62, 109, 172, 170, 215, 0, 133, 57, 25, 36, 49, 7, 245, 212, 6, 181, 80, 48, 59, 237, 46, 15, 132, 12, 221, 26, 46, 135, 111, 73, 46, 104, 139, 100, 23, 245, 6, 100, 88, 124, 148, 69, 31, 149, 150, 141, 4, 115, 84, 111, 70, 79, 184, 194, 223, 41, 226, 108, 238, 166, 29, 78, 52, 28, 37, 169, 247, 138, 114, 176, 113, 33, 223, 143, 89, 181, 110, 34, 79, 121, 36, 49, 193, 139, 105, 66, 27, 193, 17, 99, 213, 37, 194, 158, 5, 44, 184, 224, 189, 56, 64, 90, 61, 108, 226, 164, 236, 123, 185, 129, 138, 123, 109, 86, 236, 31, 7, 77, 177, 179, 47, 235, 10, 162, 38, 39, 238, 249, 222, 199, 119, 194, 141, 204, 202, 56, 159, 204, 98, 199, 70, 119, 49, 40, 216, 78, 89, 132, 10, 121, 193, 99, 17, 24, 14, 119, 17, 136, 164, 105, 96, 217, 88, 221, 77, 228, 68, 9, 36, 74, 98, 69, 206, 86, 153, 17, 5, 127, 111, 171, 163, 76, 74, 31, 75, 104, 226, 211, 67, 249, 117, 104, 145, 192, 252, 151, 108, 137, 40, 115, 223, 143, 103, 64, 42, 4, 85, 88, 216, 14, 6, 134, 165, 2, 245, 228, 222, 172, 56, 88, 248, 251, 200, 25, 15, 171, 199, 106, 156, 178, 140, 186, 15, 132, 202, 229, 92, 157, 208, 53, 177, 206, 255, 22, 236, 99, 140, 33, 47, 6, 142, 108, 192, 71, 177, 148, 25, 251, 174, 128, 172, 123, 61, 249, 94, 211, 66, 51, 11, 240, 81, 120, 55, 83, 36, 68, 240, 40, 173, 207, 81, 116, 66, 247, 194, 206, 235, 230, 227, 173, 185, 167, 46, 28, 201, 188, 18, 82, 94, 99, 166, 234, 114, 121, 216, 142, 70, 72, 52, 72, 198, 107, 226, 61, 179, 110, 96, 160, 208, 34, 214, 9, 126, 30, 218, 30, 209, 157, 93, 2, 23, 157, 8, 6, 7, 98, 117, 252, 225, 217, 30, 170, 166, 148, 240, 26, 248, 188, 69, 93, 203, 241, 199, 108, 190, 115, 36, 42, 83, 12, 143, 42, 65, 230, 35, 92, 16, 55, 140, 41, 80, 110, 223, 186, 144, 161, 160, 94, 213, 57, 90, 6, 83, 228, 214, 86, 211, 148, 204, 146, 171, 210, 152, 179, 160, 5, 175, 110, 246, 29, 83, 83, 29, 25, 147, 47, 34, 40, 195, 175, 94, 117, 98, 103, 75, 52, 13, 17, 224, 76, 134, 54, 71, 114, 9, 219, 64, 31, 116, 3, 163, 249, 104, 155, 200, 84, 116, 218, 201, 48, 176, 35, 32, 165, 157, 211, 108, 6, 232, 182, 219, 207, 61, 204, 194, 206, 223, 209, 27, 254, 123, 93, 87, 15, 56, 26, 191, 232, 240, 217, 154, 38, 143, 64, 38, 55, 163, 226, 50, 238, 12, 89, 146, 14, 250, 43, 23, 90, 61, 52, 170, 126, 165, 106, 108, 113, 166, 109, 157, 58, 251, 222, 88, 76, 103, 11, 106, 164, 85, 46, 229, 209, 139, 233, 215, 66, 71, 158, 219, 45, 54, 85, 148, 235, 42, 243, 22, 117, 130, 107, 113, 17, 136, 67, 221, 150, 84, 240, 242, 98, 76, 136, 4, 179, 232, 212, 25, 65, 164, 160, 152, 223, 255, 61, 148, 185, 5, 187, 18, 103, 175, 181, 176, 201, 157, 95, 221, 33, 229, 126, 228, 107, 119, 244, 83, 97, 128, 151, 83, 96, 49, 140, 34, 153, 76, 152, 113, 206, 63, 98, 116, 126, 220, 95, 143, 12, 152, 186, 74, 115, 103, 178, 121, 203, 12, 72, 191, 124, 180, 73, 74, 59, 165, 250, 202, 218, 92, 233, 78, 174, 63, 137, 41], + [210, 180, 99, 191, 255, 201, 117, 4, 53, 122, 144, 193, 248, 119, 198, 48, 67, 80, 148, 179, 68, 32, 83, 244, 0, 213, 78, 58, 128, 92, 150, 59, 206, 45, 174, 142, 167, 198, 167, 250, 240, 209, 68, 121, 65, 181, 107, 112, 211, 79, 24, 54, 215, 136, 237, 189, 44, 153, 161, 116, 87, 112, 88, 200, 51, 14, 253, 96, 252, 86, 31, 173, 24, 22, 156, 80, 95, 28, 210, 6, 6, 204, 29, 36, 165, 69, 20, 66, 47, 211, 60, 112, 129, 143, 66, 160, 212, 44, 169, 246, 9, 237, 32, 158, 97, 183, 206, 84, 134, 232, 39, 37, 128, 205, 8, 132, 122, 113, 248, 223, 60, 124, 0, 15, 68, 242, 251, 214, 250, 20, 118, 193, 213, 219, 159, 179, 115, 66, 57, 212, 150, 224, 234, 204, 84, 215, 235, 236, 72, 109, 129, 224, 78, 182, 155, 140, 66, 50, 9, 196, 139, 49, 32, 186, 32, 106, 237, 6, 120, 178, 16, 160, 27, 185, 57, 41, 213, 168, 74, 143, 206, 208, 74, 186, 252, 121, 92, 183, 10, 243, 227, 242, 183, 240, 66, 156, 117, 207, 74, 145, 131, 197, 72, 81, 23, 33, 72, 18, 231, 111, 56, 217, 94, 250, 130, 125, 228, 140, 166, 121, 5, 161, 91, 190, 45, 149, 162, 141, 211, 217, 206, 22, 215, 145, 227, 62, 225, 213, 247, 113, 45, 128, 211, 70, 22, 156, 196, 116, 49, 253, 234, 83, 210, 127, 32, 190, 173, 1, 148, 8, 136, 176, 222, 116, 48, 144, 166, 94, 250, 81, 167, 179, 23, 32, 104, 16, 199, 6, 82, 15, 91, 166, 231, 174, 185, 128, 135, 79, 221, 3, 68, 224, 211, 4, 47, 84, 96, 248, 224, 115, 144, 123, 62, 102, 72, 239, 174, 138, 198, 94, 41, 113, 141, 95, 233, 85, 196, 211, 124, 84, 167, 72, 29, 246, 30, 223, 105, 78, 120, 96, 29, 16, 50, 67, 118, 130, 150, 245, 168, 11, 171, 164, 41, 97, 187, 132, 86, 157, 215, 207, 8, 10, 107, 153, 183, 146, 167, 120, 213, 186, 72, 157, 227, 218, 173, 80, 15, 214, 14, 154, 49, 107, 38, 199, 184, 87, 215, 196, 13, 11, 155, 68, 153, 163, 145, 119, 126, 4, 199, 116, 139, 220, 11, 75, 243, 252, 241, 55, 136, 14, 162, 34, 142, 205, 236, 20, 29, 241, 35, 219, 190, 201, 21, 94, 96, 153, 222, 140, 186, 90, 227, 101, 78, 213, 124, 99, 153, 113, 130, 14, 114, 121, 217, 205, 234, 159, 111, 239, 160, 153, 187, 107, 49, 212, 188, 147, 22, 141, 187, 225, 202, 188, 178, 174, 164, 107, 151, 142, 178, 189, 190, 70, 23, 49, 167, 94, 123, 78, 171, 154, 194, 112, 57, 56, 147, 162, 138, 95, 6, 59, 92, 80, 47, 110, 91, 172, 215, 29, 17, 18, 203, 179, 232, 70, 164, 232, 174, 240, 129, 175, 21, 199, 125, 73, 72, 217, 145, 180, 179, 73, 31, 176, 150, 91, 46, 195, 25, 176, 151, 70, 152, 240, 92, 135, 136, 237, 159, 111, 16, 248, 31, 143, 175, 115, 135, 7, 120, 54, 166, 242, 240, 245, 240, 121, 242, 232, 183, 243, 246, 18, 228, 233, 53, 193, 200, 50, 228, 21, 103, 139, 68, 174, 159, 20, 232, 173, 14, 185, 123, 123, 48, 79, 56, 87, 155, 232, 34, 141, 28, 240, 235, 69, 62, 129, 68, 67, 1, 108, 110, 175, 74, 168, 99, 153, 48, 75, 239, 18, 139, 28, 7, 41, 171, 145, 29, 112, 121, 30, 238, 158, 253, 251, 95, 201, 126, 218, 124, 164, 226, 10, 24, 73, 239, 253, 113, 99, 118, 76, 69, 163, 62, 5, 167, 250, 70, 224, 138, 70, 14, 59, 127, 70, 65, 90, 192, 137, 208, 243, 0, 76, 77, 82, 104, 147, 130, 163, 51, 50, 231, 240, 39, 239, 21, 81, 78, 232, 154, 27, 200, 205, 123, 252, 119, 54, 27, 29, 46, 105, 172, 128, 206, 129, 131, 127, 167, 66, 1, 28, 253, 52, 46, 15, 180, 213, 224, 118, 115, 150, 227, 139, 222, 241, 7, 144, 232, 165, 236, 44, 222, 156, 174, 197, 41, 40, 149, 45, 232, 100, 62, 54, 146, 125, 137, 154, 139, 4, 131, 85, 117, 30, 253, 193, 32, 32, 64, 175, 114, 35, 17, 91, 119, 248, 114, 72, 161, 191, 38, 220, 25, 116, 59, 175, 73, 29, 243, 119, 183, 148, 215, 241, 93, 101, 165, 128, 229, 135, 103, 195, 138, 33, 170, 157, 60, 237, 9, 246, 229, 48, 56, 166, 244, 146, 2, 66, 140, 49, 60, 3, 88, 207, 66, 41, 186, 183, 125, 49, 156, 252, 111, 86, 54, 40, 133, 215, 214, 81, 3, 46, 230, 161, 243, 211, 63, 113, 249, 199, 147, 184, 69, 177, 126, 197, 165, 10, 177, 171, 171, 118, 245, 229, 99, 127, 126, 24, 13, 195, 190, 108, 139, 198, 24, 249, 69, 177, 13, 40, 66, 234, 216, 153, 207, 47, 241, 101, 41, 248, 3, 184, 207, 252, 187, 122, 132, 124, 164, 202, 41, 193, 129, 138, 200, 177, 89, 170, 22, 214, 201, 135, 83, 54, 195, 240, 172, 228, 149, 198, 138, 96, 185, 225, 157, 161, 2, 49, 100, 214, 126, 218, 75, 88, 246, 59, 29, 59, 141, 183, 224, 182, 209, 46, 104, 113, 181, 243, 64, 102, 79, 127, 75, 213, 50, 7, 119, 68, 152, 62, 139, 127, 215, 94, 157, 213, 150, 103, 24, 106, 221, 19, 247, 186, 171, 192, 57, 239, 54, 199, 91, 113, 107, 83, 213, 3, 132, 221, 101, 106, 41, 238, 249, 71, 48, 177, 36, 142, 7, 92, 39, 195, 144, 31, 174, 240, 193, 58, 22, 139, 42, 202, 183, 247, 13, 205, 156, 241, 32, 2, 125, 220, 27, 33, 52, 11, 218, 252, 101, 164, 76, 169, 134, 214, 30, 20, 48, 42, 116, 179, 154, 230, 83, 45, 211, 59, 73, 2, 14, 202, 61, 94, 56, 172, 79, 80, 180, 171, 116, 82, 37, 217, 191, 248, 164, 95, 48, 27, 27, 145, 159, 11, 228, 139, 118, 114, 141, 244, 73, 70, 20, 57, 137, 212, 241, 6, 21, 210, 22, 64, 231, 150, 119, 192, 245, 113, 173, 39, 47, 112, 20, 213, 171, 19, 30, 244, 246, 231, 221, 212, 186, 70, 217, 55, 29, 215, 8, 132, 89, 76, 148, 114, 240, 30, 175, 181, 235, 110, 245, 141, 190, 76, 134, 236, 96, 231, 210, 29, 31, 100, 82, 194, 77, 68, 117, 250, 10, 202, 138, 144, 250, 6, 16, 83, 122, 131, 56, 251, 28, 210, 29, 81, 158, 206, 79, 71, 205, 221, 144, 61, 88, 131, 26, 68, 140, 250, 207, 63, 94, 98, 239, 123, 231, 196, 250, 153, 220, 169, 138, 182, 118, 82, 107, 133, 98, 112, 10, 103, 23, 236, 167, 204, 187, 97, 229, 103, 114, 80, 3, 136, 244, 231, 97, 35, 214, 92, 169, 51, 25, 95, 51, 149, 113, 219, 218, 26, 176, 11, 79, 13, 245, 137, 196, 166, 194, 94, 156, 59, 80, 247, 80, 197, 20, 237, 18, 110, 10, 147, 33, 230, 197, 235, 184, 208, 176, 110, 138, 118, 170, 3, 90, 117, 226, 139, 219, 47, 5, 189, 148, 154, 225, 120, 161, 139, 113, 70, 119, 108, 244, 203, 126, 120, 104, 204, 4, 106, 202, 208, 151, 254, 60, 191, 111, 107, 162, 84, 41, 135, 167, 26, 82, 148, 16, 24, 209, 112, 255, 205, 164, 119, 203, 213, 25, 134, 17, 93, 60, 167, 116, 162, 168, 127, 103, 66, 226, 40, 107, 104, 94, 252, 129, 0, 136, 206, 220, 11, 40, 49, 120, 110, 174, 118, 42, 19, 131, 91, 200, 65, 162, 159, 223, 211, 133, 23, 188, 180, 146, 61, 106, 71, 104, 124, 57, 22, 88, 92, 201, 118, 142, 178, 68, 236, 176, 131, 162, 131, 133, 171, 157, 251, 58, 64, 96, 104, 169, 1, 8, 118, 50, 89, 22, 50, 217, 166, 240, 90, 136, 72, 105, 251, 134, 23, 41, 192, 209, 160, 72, 175, 28, 45, 55, 241, 252, 255, 172, 241, 159, 22, 227, 252, 118, 62, 71, 174, 141, 214, 250, 73, 136, 211, 120, 79, 104, 118, 28, 184, 112, 219, 248, 136, 51, 119, 77, 125, 193, 14, 207, 223, 138, 26, 6, 101, 86, 93, 2, 88, 106, 55, 87, 36, 77, 143, 134, 140, 41, 7, 44, 222, 155, 1, 238, 93, 14, 61, 220, 145, 116, 46, 103, 220, 6, 203, 88, 113, 65, 41, 198, 50, 18, 62, 209, 247, 29, 81, 144, 216, 182, 19, 161, 19, 211, 179, 165, 41, 147, 164, 57, 38, 156, 47, 242, 114, 24, 17, 156, 126, 202, 141, 188, 125, 137, 106, 89, 139, 127, 170, 185, 150, 232, 72, 248, 94, 33, 62, 188, 102, 190, 131, 116, 223, 134, 58, 81, 228, 170, 224, 134, 77, 137, 35, 37, 4, 192, 133, 170, 134, 197, 225, 26, 82, 194, 116, 202, 218, 117, 12, 88, 133, 236, 208, 175, 168, 176, 247, 194, 201, 42, 219, 104, 167, 18, 251, 3, 31, 54, 223, 14, 240, 48, 10, 235, 179, 185, 230, 199, 29, 161, 32, 12, 135, 41, 228, 25, 125, 3, 207, 197, 246, 58, 226, 114, 196, 184, 126, 126, 28, 60, 47, 202, 58, 89, 135, 196, 104, 139, 40, 28, 243, 188, 130, 137, 57, 131, 34, 132, 150, 240, 207, 62, 126, 193, 2, 138, 177, 141, 11, 118, 106, 6, 221, 192, 117, 53, 103, 134, 36, 0, 21, 245, 227, 25, 158, 156, 189, 149, 178, 220, 45, 102, 149, 139, 96, 241, 137, 185, 240, 225, 93, 117, 28, 0, 68, 104, 51, 136, 61, 190, 142, 175, 159, 68, 224, 101, 149, 213, 238, 11, 70, 146, 119, 37, 124, 255, 69, 240, 199, 216, 112, 175, 31, 163, 106, 242, 170, 148, 36, 185, 94, 111, 44, 215, 188, 13, 236, 92, 3, 123, 247, 84, 80, 26, 166, 47, 143, 5, 174, 38, 91, 128, 137, 10, 35, 170, 21, 165, 43, 4, 127, 220, 124, 154, 86, 105, 24, 182, 193, 197, 196, 114, 50, 210, 12, 170, 226, 117, 40, 183, 192, 135, 246, 20, 231, 175, 9, 232, 249, 196, 108, 63, 166, 87, 5, 246, 246, 181, 60, 46, 170, 42, 33, 142, 46, 41, 156, 241, 216, 159, 21, 39, 40, 95, 47, 12, 146, 118, 203, 228, 14, 87, 97, 117, 84, 142, 49, 134, 137, 140, 57, 48, 246, 213, 215, 106, 82, 75, 83, 200, 173, 103, 31, 126, 44, 141, 22, 4, 191, 212, 97, 225, 39, 116, 64, 69, 247, 209, 123, 176, 28, 106, 147, 89, 27, 121, 42, 127, 120, 194, 206, 235, 159, 99, 142, 213, 130, 119, 78, 32, 231, 109, 148, 176, 99, 36, 67, 225, 63, 51, 17, 135, 5, 114, 222, 33, 101, 47, 146, 1, 55, 33, 92, 200, 223, 6, 73, 221, 189, 93, 41, 241, 229, 169, 93, 196, 143, 229, 209, 213, 135, 66, 45, 254, 55, 196, 110, 151, 15, 24, 183, 164, 148, 168, 15, 10, 85, 209, 138, 141, 182, 252, 175, 46, 12, 116, 247, 50, 26, 93, 31, 174, 130, 131, 129, 118, 145, 212, 16, 190, 217, 176, 247, 42, 194, 196, 82, 8, 71, 60, 0, 5, 234, 132, 199, 35, 55, 157, 32, 171, 167, 155, 139, 4, 32, 150, 64, 139, 177, 13, 56, 86, 167, 36, 5, 190, 33, 43, 6, 208, 188, 214, 215, 166, 117, 198, 57, 78, 182, 59, 38, 24, 92, 86, 105, 187, 39, 172, 201, 12, 165, 39, 42, 238, 232, 173, 27, 200, 229, 220, 133, 151, 68, 179, 88, 22, 123, 237, 140, 43, 7, 247, 81, 15, 47, 208, 200, 168, 223, 192, 7, 67, 91, 36, 89, 65, 127, 44, 176, 23, 251, 179, 141, 193, 163, 196, 135, 2, 9, 62, 144, 139, 194, 0, 49, 73, 33, 166, 165, 55, 130, 216, 137, 103, 97, 111, 62, 155, 70, 220, 209, 86, 88, 118, 178, 223, 98, 165, 174, 234, 65, 249, 159, 25, 123, 211, 123, 184, 141, 240, 37, 251, 35, 85, 79, 224, 175, 97, 116, 39, 164, 226, 166, 65, 177, 29, 85, 117, 128, 250, 143, 170, 80, 191, 244, 79, 155, 99, 155, 35, 124, 243, 219, 237, 182, 30, 64, 209, 226, 158, 112, 133, 102, 11, 145, 112, 174, 2, 18, 237, 114, 82, 197, 107, 186, 131, 112, 182, 201, 98, 224, 97, 111, 143, 180, 24, 248, 31, 156, 107, 78, 24, 137, 235, 164, 201, 217, 38, 122, 112, 185, 153, 239, 193, 115, 91, 5, 51, 146, 3, 93, 21, 235, 246, 166, 75, 101, 100, 235, 220, 140, 8, 11, 142, 198, 77, 16, 84, 188, 176, 121, 54, 158, 3, 255, 124, 95, 27, 80, 141, 21, 194, 181, 123, 126, 18, 170, 111, 224, 163, 137, 18, 72, 236, 163, 179, 10, 223, 134, 174, 119, 210, 234, 47, 136, 194, 206, 96, 154, 149, 15, 218, 147, 189, 107, 118, 122, 60, 31, 208, 99, 32, 123, 178, 97, 255, 236, 88, 124, 176, 204, 8, 134, 57, 93, 187, 55, 141, 62, 21, 59, 159, 169, 212, 70, 158, 17, 183, 23, 31, 149, 151, 169, 54, 183, 154, 109, 117, 67, 168, 154, 181, 153, 79, 61, 97, 154, 41, 122, 146, 187, 30, 136, 223, 154, 220, 164, 156, 67, 88, 72, 195, 64, 104, 41, 53, 213, 74, 140, 35, 134, 87, 202, 68, 159, 22, 95, 245, 96, 79, 236, 185, 84, 6, 198, 157, 131, 57, 54, 76, 128, 92, 219, 189, 33, 184, 186, 56, 155, 42, 99, 250, 161, 56, 239, 110, 34, 95, 35, 11, 202, 32, 137, 112, 211, 124, 119, 148, 195, 227, 185, 200, 145, 35, 173, 45, 66, 221, 28, 182, 82, 98, 27, 18, 179, 29, 208, 207, 179, 67, 231, 63, 166, 183, 71, 150, 152, 30, 27, 7, 60, 101, 253, 71, 39, 189, 250, 182, 14, 203, 232, 39, 238, 72, 42, 74, 212, 194, 85, 0, 196, 13, 47, 195, 218, 42, 103, 211, 91, 50, 104, 109, 15, 34, 117, 198, 39, 165, 242, 129, 144, 205, 22, 166, 65, 68, 44, 15, 210, 107, 63, 149, 152, 226, 226, 128, 200, 194, 19, 148, 234, 57, 177, 70, 83, 226, 115, 7, 52, 216, 90, 127, 141, 88, 234, 143, 84, 70, 31, 122, 210, 169, 253, 110, 158, 64, 250, 144, 14, 214, 81, 184, 22, 184, 74, 94, 137, 231, 208, 134, 251, 45, 68, 113, 111, 62, 189, 217, 51, 127, 58, 19, 187, 31, 24, 51, 6, 165, 3, 163, 234, 11, 152, 28, 182, 152, 5, 78, 218, 102, 63, 199, 103, 232, 197, 147, 128, 30, 222, 52, 236, 216, 110, 229, 188, 36, 64, 98, 13, 40, 126, 75, 218, 60, 78, 36, 139, 172, 253, 192, 88, 69, 154, 54, 113, 202, 233, 210, 240, 211, 18, 241, 119, 143, 76, 71, 48, 171, 74, 186, 44, 130, 156, 181, 101, 131, 150, 49, 42, 86, 229, 138, 239, 188, 213, 177, 96, 102, 71, 246, 90, 208, 121, 67, 39, 246, 203, 121, 244, 143, 103, 67, 63, 207, 108, 17, 188, 120, 215, 40, 186, 34, 105, 55, 58, 223, 164, 156, 42, 91, 16, 13, 110, 70, 60, 69, 155, 13, 163, 26, 10, 244, 114, 98, 44, 56, 141, 108, 22, 33, 38, 234, 87, 223, 179, 62, 13, 151, 58, 164, 103, 169, 167, 189, 212, 117, 17, 187, 176, 106, 10, 193, 165, 229, 220, 88, 244, 111, 3, 238, 73, 221, 105, 38, 140, 172, 205, 84, 31, 213, 170, 4, 201, 243, 176, 54, 195, 32, 174, 206, 77, 195, 58, 67, 139, 48, 29, 159, 117, 92, 26, 172, 80, 252, 18, 189, 3, 158, 75, 121, 156, 134, 158, 83, 243, 103, 161, 210, 26, 108, 202, 30, 130, 84, 184, 30, 118, 205, 123, 67, 47, 247, 50, 59, 114, 137, 217, 45, 137, 41, 167, 203, 68, 210, 136, 122, 202, 201, 76, 81, 119, 4, 183, 58, 49, 70, 144, 231, 40, 117, 251, 79, 237, 178, 245, 146, 57, 192, 104, 181, 145, 184, 238, 74, 100, 166, 222, 85, 253, 44, 83, 133, 207, 138, 176, 228, 66, 98, 24, 172, 236, 23, 111, 43, 2, 198, 236, 125, 226, 196, 71, 60, 206, 3, 152, 187, 134, 172, 69, 12, 107, 56, 125, 253, 25, 217, 30, 154, 134, 67, 202, 153, 203, 8, 180, 103, 172, 58, 191, 35, 176, 203, 186, 99, 107, 117, 39, 216, 109, 198, 213, 173, 190, 254, 133, 112, 79, 87, 13, 146, 182, 157, 233, 76, 132, 229, 189, 159, 84, 124, 204, 163, 233, 53, 118, 7, 168, 227, 138, 21, 180, 114, 177, 134, 119, 73, 65, 161, 57, 139, 193, 156, 123, 203, 126, 159, 33, 228, 235, 110, 123, 168, 143, 197, 149, 20, 9, 235, 249, 99, 51, 194, 146, 18, 38, 95, 229, 61, 68, 238, 168, 23, 204, 236, 72, 23, 149, 100, 229, 198, 102, 116, 16, 65, 143, 231, 234, 22, 15, 89, 53, 148, 73, 85, 220, 199, 140, 22, 199, 130, 145, 107, 251, 27, 35, 164, 180, 203, 227, 251, 200, 231, 191, 81, 126, 137, 202, 116, 163, 223, 163, 26, 201, 176, 179, 253, 68, 53, 127, 132, 34, 191, 97, 180, 197, 196, 19, 255, 35, 11, 64, 30, 153, 49, 94, 220, 0, 227, 14, 173, 229, 204, 229, 156, 22, 158, 73, 101, 129, 160, 216, 126, 91, 68, 102, 77, 111, 198, 183, 24, 60, 141, 218, 195, 186, 100, 222, 18, 181, 232, 148, 173, 237, 141, 125, 42, 205, 112, 166, 50, 55, 113, 90, 241, 110, 2, 97, 36, 113, 255, 203, 118, 224, 197, 181, 77, 254, 125, 116, 46, 208, 46, 222, 117, 240, 7, 142, 23, 188, 216, 243, 158, 224, 118, 138, 198, 246, 110, 172, 25, 22, 134, 51, 129, 228, 144, 132, 210, 159, 203, 174, 241, 216, 99, 66, 49, 118, 31, 113, 92, 10, 77, 114, 15, 54, 89, 58, 123, 142, 175, 114, 154, 206, 230, 170, 238, 152, 54, 166, 183, 48, 30, 123, 220, 184, 84, 230, 121, 35, 98, 204, 148, 216, 205, 84, 163, 88, 45, 149, 161, 5, 54, 135, 43, 104, 25, 56, 165, 127, 139, 59, 140, 222, 188, 79, 5, 53, 150, 4, 199, 252, 163, 12, 49, 253, 7, 187, 55, 59, 51, 67, 148, 54, 128, 141, 5, 155, 229, 5, 247, 174, 52, 249, 157, 28, 139, 101, 250, 45, 236, 229, 216, 104, 206, 33, 61, 43, 228, 17, 209, 5, 121, 232, 244, 41, 202, 219, 27, 194, 246, 84, 192, 99, 194, 187, 69, 247, 122, 223, 59, 195, 36, 155, 11, 235, 185, 118, 182, 245, 11, 120, 221, 114, 40, 244, 93, 122, 26, 17, 237, 38, 75, 196, 96, 41, 98, 165, 184, 187, 200, 145, 206, 210, 197, 201, 77, 12, 148, 22, 226, 167, 139, 98, 84, 110, 136, 226, 195, 142, 18, 12, 101, 212, 101, 117, 153, 197, 249, 67, 1, 1, 45, 53, 9, 21, 64, 13, 39, 129, 95, 53, 152, 4, 76, 28, 202, 162, 84, 72, 192, 135, 41, 16, 130, 2, 242, 127, 66, 241, 149, 178, 198, 236, 41, 102, 50, 100, 169, 134, 231, 63, 25, 179, 172, 66, 81, 134, 234, 8, 145, 120, 61, 91, 89, 16, 207, 208, 62, 154, 210, 21, 35, 193, 173, 69, 226, 35, 87, 191, 147, 120, 142, 120, 136, 57, 3, 66, 152, 182, 43, 8, 157, 110, 193, 51, 80, 56, 17, 139, 162, 20, 238, 150, 195, 228, 110, 53, 120, 225, 139, 90, 102, 185, 224, 101, 190, 213, 64, 226, 227, 145, 161, 119, 180, 100, 193, 36, 45, 197, 175, 98, 117, 24, 239, 194, 86, 159, 169, 111, 123, 133, 169, 184, 101, 211, 119, 103, 146, 16, 228, 33, 37, 78, 204, 23, 134, 191, 58, 21, 81, 7, 98, 121, 11, 70, 254, 252, 119, 52, 40, 69, 237, 179, 87, 228, 227, 43, 32, 175, 227, 30, 92, 92, 231, 233, 249, 142, 255, 221, 103, 29, 208, 101, 249, 91, 236, 109, 198, 27, 143, 120, 158, 238, 7, 158, 50, 210, 44, 226, 211, 162, 37, 69, 101, 164, 21, 72, 68, 226, 78, 40, 198, 163, 255, 60, 208, 29, 47, 234, 24, 205, 37, 10, 83, 20, 164, 23, 81, 222, 77, 102, 101, 3, 134, 105, 62, 47, 146, 101, 245, 88, 121, 137, 113, 195, 51, 188, 149, 242, 114, 184, 231, 64, 115, 108, 113, 151, 195, 161, 75, 52, 240, 134, 83, 175, 188, 167, 106, 14, 43, 246, 168, 213, 95, 131, 59, 177, 7, 110, 37, 53, 62, 213, 4, 7, 13, 72, 234, 173, 131, 176, 128, 250, 201, 53, 142, 137, 95, 11, 13, 55, 31, 250, 84, 80, 190, 108, 120, 14, 23, 183, 174, 143, 59, 117, 193, 148, 140, 220, 21, 52, 197, 95, 244, 180, 5, 22, 189, 99, 1, 136, 46, 34, 30, 8, 151, 153, 86, 76, 13, 209, 61, 56, 91, 114, 159, 24, 17, 218, 233, 138, 67, 83, 188, 229, 64, 133, 36, 238, 47, 255, 52, 53, 217, 49, 64, 210, 189, 159, 71, 145, 103, 164, 255, 111, 123, 88, 243, 81, 157, 82, 246, 151, 111, 129, 255, 178, 233, 129, 84, 56, 246, 155, 52, 70, 247, 193, 0, 65, 193, 140, 154, 27, 166, 24, 188, 189, 76, 241, 254, 91, 78, 157, 124, 30, 179, 23, 254, 164, 62, 19, 117, 58, 65, 183, 71, 60, 33, 130, 77, 150, 136, 68, 24, 164, 243, 70, 209, 245, 135, 22, 206, 242, 200, 105, 41, 220, 41, 87, 50, 113, 118, 242, 50, 104, 167, 170, 37, 203, 112, 206, 141, 223, 102, 10, 153, 2, 172, 181, 115, 111, 161, 38, 149, 30, 86, 67, 151, 26, 113, 38, 194, 86, 131, 33, 168, 129, 197, 162, 252, 227, 79, 0, 127, 210, 206, 98, 59, 31, 250, 68, 92, 132, 88, 238, 52, 237, 206, 172, 167, 52, 48, 127, 225, 78, 176, 130, 205, 151, 58, 207, 223, 151, 218, 217, 211, 156, 174, 120, 212, 200, 37, 227, 19, 98, 128, 137, 222, 213, 147, 182, 4, 93, 27, 18, 34, 160, 224, 54, 95, 191, 14, 125, 201, 130, 20, 197, 248, 78, 172, 126, 68, 113, 233, 123, 221, 134, 144, 101, 200, 41, 138, 139, 221, 116, 20, 115, 139, 237, 242, 31, 253, 209, 208, 63, 123, 47, 243, 15, 151, 23, 67, 172, 72, 12, 127, 52, 79, 169, 96, 148, 202, 95, 241, 134, 169, 219, 6, 86, 237, 175, 138, 190, 58, 215, 215, 25, 63, 225, 252, 57, 40, 22, 45, 138, 140, 186, 168, 234, 194, 148, 153, 114, 93, 187, 65, 40, 126, 193, 99, 216, 193, 250, 239, 37, 205, 80, 122, 77, 126, 191, 77, 0, 138, 150, 192, 44, 3, 240, 47, 39, 226, 107, 179, 211, 55, 26, 233, 169, 75, 214, 125, 140, 46, 103, 160, 65, 202, 169, 125, 173, 32, 197, 0, 177, 99, 1, 253, 59, 191, 16, 95, 230, 205, 206, 166, 101, 52, 46, 172, 32, 158, 126, 106, 135, 74, 221, 115, 119, 188, 240, 201, 52, 141, 244, 191, 178, 45, 223, 174, 216, 92, 92, 36, 233, 139, 47, 41, 114, 214, 214, 168, 61, 156, 92, 199, 139, 100, 113, 192, 246, 147, 205, 101, 71, 51, 174, 186, 7, 218, 129, 80, 218, 133, 222, 195, 239, 26, 7, 145, 163, 188, 159, 18, 77, 44, 143, 120, 179, 194, 181, 80, 195, 116, 90, 9, 193, 17, 158, 201, 181, 180, 153, 20, 51, 48, 93, 212, 125, 13, 162, 66, 117, 14, 135, 156, 100, 38, 123, 4, 222, 120, 211, 235, 168, 102, 240, 60, 253, 81, 145, 225, 104, 232, 10, 179, 196, 69, 180, 22, 196, 184, 152, 185, 193, 157, 69, 230, 225, 143, 15, 152, 171, 42, 255, 158, 25, 38, 111, 8, 243, 100, 213, 168, 169, 243, 212, 146, 68, 227, 47, 211, 36, 124, 198, 105, 233, 192, 92, 8, 240, 184, 177, 197, 165, 225, 26, 108, 23, 61, 80, 144, 15, 60, 142, 196, 173, 103, 112, 196, 53, 214, 105, 165, 158, 237, 216, 16, 10, 152, 165, 157, 165, 220, 126, 115, 191, 5, 201, 253, 104, 36, 4, 206, 185, 56, 76, 24, 173, 193, 216, 227, 108, 170, 77, 9, 54, 18, 179, 76, 230, 103, 115, 111, 64, 83, 78, 108, 250, 158, 100, 53, 136, 148, 78, 108, 191, 188, 2, 77, 142, 0, 197, 62, 251, 69, 28, 111, 147, 164, 42, 198, 26, 157, 132, 157, 69, 184, 219, 97, 224, 159, 124, 82, 44, 44, 190, 147, 186, 96, 129, 111, 236, 49, 160, 112, 35, 205, 191, 93, 54, 105, 216, 176, 204, 217, 132, 201, 106, 58, 123, 44, 176, 196, 145, 251, 4, 37, 118, 172, 218, 32, 173, 171, 59, 45, 56, 14, 57, 149, 11, 25, 73, 44, 156, 60, 103, 188, 183, 170, 68, 154, 249, 36, 63, 200, 126, 248, 149, 114, 129, 220, 29, 22, 63, 49, 39, 235, 22, 201, 75, 159, 252, 148, 30, 230, 59, 246, 40, 229, 57, 205, 152, 173, 62, 171, 19, 141, 60, 244, 119, 255, 223, 67, 49, 140, 86, 85, 112, 138, 78, 121, 143, 12, 30, 34, 51, 241, 224, 248, 36, 141, 84, 2, 116, 159, 6, 98, 33, 221, 15, 36, 216, 250, 247, 159, 234, 122, 250, 255, 206, 193, 37, 113, 120, 52, 49, 235, 97, 198, 212, 19, 195, 93, 174, 224, 206, 209, 96, 55, 116, 91, 126, 16, 235, 64, 141, 248, 134, 45, 252, 9, 161, 135, 58, 111, 181, 80, 63, 76, 50, 87, 143, 34, 83, 155, 86, 227, 168, 131, 212, 48, 96, 6, 40, 100, 229, 170, 88, 96, 189, 27, 14, 189, 249, 125, 5, 131, 43, 171, 193, 56, 246, 157, 229, 203, 196, 22, 124, 165, 186, 57, 243, 75, 102, 2, 151, 9, 153, 3, 52, 217, 162, 11, 44, 194, 146, 64, 95, 149, 177, 121, 240, 241, 196, 211, 79, 130, 235, 33, 174, 23, 213, 196, 85, 156, 168, 27, 144, 26, 46, 180, 71, 202, 16, 128, 48, 99, 113, 55, 1, 23, 59, 68, 25, 103, 28, 143, 79, 172, 141, 97, 56, 149, 59, 190, 13, 18, 7, 116, 233, 222, 152, 147, 246, 238, 201, 236, 26, 106, 223, 32, 8, 191, 177, 126, 217, 55, 135, 13, 10, 175, 67, 99, 145, 102, 68, 27, 154, 123, 140, 46, 102, 63, 48, 114, 140, 122, 148, 149, 86, 251, 195, 113, 61, 35, 17, 122, 152, 59, 68, 201, 117, 239, 50, 112, 107, 123, 255, 60, 239, 85, 209, 189, 12, 193, 41, 32, 27, 120, 110, 2, 178, 108, 75, 112, 146, 199, 93, 189, 143, 37, 45, 7, 149, 205, 25, 12, 218, 39, 70, 83, 31, 138, 155, 82, 56, 175, 56, 82, 160, 180, 9, 196, 137, 126, 195, 23, 34, 63, 210, 64, 63, 58, 121, 42, 226, 97, 152, 37, 95, 166, 225, 140, 40, 73, 181, 122, 133, 227, 76, 80, 191, 198, 123, 237, 52, 134, 39, 121, 58, 156, 205, 227, 58, 201, 190, 194, 168, 32, 150, 19, 173, 207, 95, 54, 133, 222, 63, 124, 194, 80, 135, 166, 147, 241, 123, 131, 56, 149, 180, 175, 175, 165, 62, 246, 14, 174, 43, 216, 60, 241, 224, 46, 174, 96, 97, 140, 95, 183, 91, 35, 128, 43, 227, 227, 98, 185, 48, 18, 156, 135, 128, 143, 130, 161, 121, 66, 167, 228, 34, 219, 65, 23, 154, 60, 117, 74, 203, 134, 180, 177, 202, 40, 40, 122, 24, 86, 192, 85, 19, 234, 104, 176, 203, 179, 45, 69, 127, 211, 229, 246, 183, 242, 204, 222, 141, 5, 233, 134, 9, 184, 198, 149, 68, 242, 167, 205, 54, 102, 254, 38, 150, 2, 65, 20, 246, 156, 15, 16, 129, 56, 129, 6, 228, 9, 185, 247, 240, 5, 215, 194, 106, 58, 34, 60, 250, 164, 95, 136, 235, 196, 109, 135, 49, 57, 109, 72, 26, 48, 116, 92, 145, 231, 163, 89, 49, 97, 179, 40, 175, 197, 54, 14, 183, 78, 6, 23, 141, 213, 87, 202, 176, 102, 71, 140, 180, 251, 45, 225, 111, 213, 211, 248, 162, 243, 1, 192, 233, 65, 216, 213, 85, 86, 182, 147, 23, 111, 76, 94, 230, 251, 192, 229, 70, 111, 137, 146, 2, 34, 229, 188, 171, 113, 142, 95, 163, 158, 206, 243, 18, 37, 5, 225, 205, 117, 18, 75, 162, 90, 241, 24, 48, 29, 71, 79, 56, 206, 232, 152, 76, 119, 106, 125, 187, 18, 155, 96, 223, 69, 86, 234, 68, 226, 187, 190, 123, 52, 131, 206, 251, 181, 5, 15, 196, 142, 98, 185, 96, 139, 118, 20, 18, 75, 90, 133, 159, 251, 239, 37, 100, 106, 163, 99, 57, 235, 40, 75, 138, 95, 120, 59, 179, 97, 218, 205, 149, 38, 63, 147, 228, 71, 194, 43, 135, 166, 242, 52, 215, 200, 184, 151, 155, 243, 31, 19, 12, 122, 212, 111, 240, 53, 208, 122, 100, 180, 104, 115, 219, 143, 120, 80, 198, 240, 157, 223, 76, 186, 187, 124, 77, 184, 213, 25, 225, 41, 49, 44, 117, 84, 135, 123, 191, 254, 180, 13, 153, 215, 30, 97, 176, 21, 160, 157, 46, 136, 68, 15, 37, 160, 64, 115, 130, 85, 188, 114, 248, 114, 179, 82, 31, 183, 138, 152, 79, 141, 7, 124, 123, 214, 202, 246, 134, 18, 41, 68, 53, 22, 205, 223, 60, 192, 9, 50, 235, 227, 100, 192, 174, 3, 180, 151, 169, 44, 27, 193, 204, 123, 141, 160, 62, 140, 140, 251, 204, 254, 11, 48, 86, 229, 47, 178, 205, 116, 2, 107, 181, 174, 179, 234, 21, 111, 133, 137, 4, 36, 174, 5, 70, 24, 136, 98, 240, 228, 65, 172, 50, 205, 87, 202, 191, 88, 138, 113, 194, 67, 122, 218, 164, 192, 208, 155, 171, 174, 74, 117, 117, 183, 180, 49, 85, 242, 32, 177, 28, 125, 209, 246, 42, 129, 9, 202, 133, 160, 109, 100, 187, 138, 138, 239, 187, 158, 249, 241, 111, 192, 61, 90, 206, 149, 57, 206, 159, 81, 191, 211, 207, 179, 138, 154, 50, 97, 130, 164, 3, 189, 112, 35, 130, 87, 42, 67, 185, 150, 204, 67, 48, 189, 14, 72, 177, 247, 175, 71, 195, 98, 246, 82, 7, 70, 131, 218, 106, 34, 178, 144, 83, 179, 133, 34, 40, 13, 245, 89, 153, 238, 34, 24, 98, 121, 56, 136, 67, 109, 77, 63, 60, 178, 138, 25, 249, 6, 179, 170, 113, 66, 121, 173, 185, 111, 168, 247, 119, 236, 66, 201, 170, 84, 7, 120, 183, 130, 132, 143, 241, 52, 125, 213, 54, 91, 59, 30, 253, 243, 107, 24, 204, 17, 230, 243, 51, 13, 191, 38, 18, 10, 224, 224, 237, 195, 213, 217, 45, 34, 63, 60, 216, 161, 15, 103, 238, 223, 51, 72, 151, 246, 111, 76, 137, 29, 207, 225, 26, 138, 12, 14, 224, 76, 223, 35, 116, 40, 48, 126, 224, 92, 255, 6, 124, 215, 183, 233, 71, 87, 34, 88, 127, 71, 235, 29, 79, 14, 85, 34, 130, 95, 72, 111, 40, 252, 78, 224, 254, 253, 22, 76, 16, 6, 239, 214, 217, 171, 65, 135, 6, 101, 113, 129, 174, 217, 60, 189, 203, 101, 162, 244, 215, 231, 182, 28, 250, 163, 113, 124, 191, 190, 220, 106, 143, 150, 164, 51, 3, 151, 138, 62, 161, 187, 109, 62, 60, 135, 235, 6, 38, 83, 154, 155, 90, 251, 98, 94, 192, 182, 145, 124, 60, 139, 42, 224, 144, 212, 239, 25, 183, 170, 111, 91, 73, 71, 163, 159, 125, 220, 34, 211, 46, 43, 102, 97, 81, 137, 83, 205, 72, 175, 123, 11, 77, 124, 19, 132, 187, 58, 40, 239, 18, 247, 184, 133, 235, 204, 195, 121, 132, 169, 160, 98, 9, 107, 19, 172, 135, 75, 77, 62, 240, 194, 147, 53, 182, 107, 98, 41, 65, 98, 214, 116, 2, 20, 212, 243, 222, 73, 215, 28, 194, 45, 8, 224, 55, 193, 200, 100, 85, 35, 230, 109, 137, 58, 214, 42, 33, 157, 228, 252, 25, 157, 104, 255, 246, 162, 119, 97, 238, 110, 230, 157, 68, 130, 94, 232, 48, 149, 81, 87, 72, 16, 46, 195, 134, 120, 216, 191, 55, 202, 226, 52, 130, 146, 3, 138, 92, 161, 218, 55, 192, 16, 65, 2, 172, 8, 175, 19, 124, 7, 45, 50, 172, 35, 94, 169, 105, 164, 134, 131, 91, 168, 71, 25, 244, 176, 181, 104, 243, 47, 51, 98, 193, 159, 71, 181, 55, 250, 225, 195, 140, 143, 238, 141, 6, 207, 166, 200, 18, 1, 57, 32, 39, 11, 238, 182, 126, 111, 13, 253, 26, 24, 239, 128, 42, 191, 177, 150, 36, 180, 197, 69, 184, 250, 33, 181, 206, 191, 123, 80, 36, 185, 246, 175, 14, 215, 218, 29, 228, 240, 24, 91, 169, 179, 140, 143, 104, 248, 214, 206, 9, 227, 55, 118, 225, 60, 118, 102, 52, 24, 200, 89, 156, 115, 25, 251, 29, 250, 120, 113, 18, 220, 32, 62, 75, 201, 237, 143, 96, 239, 16, 91, 194, 32, 217, 89, 126, 228, 205, 68, 158, 32, 168, 57, 132, 133, 32, 223, 185, 107, 168, 1, 112, 193, 190, 46, 240, 3, 58, 105, 178, 151, 199, 98, 18, 223, 229, 211, 37, 154, 52, 140, 34, 201, 128, 245, 118, 42, 68, 180, 220, 34, 150, 177, 226, 180, 172, 38, 68, 237, 42, 146, 172, 171, 116, 208, 217, 95, 137, 65, 27, 63, 188, 69, 55, 121, 233, 159, 12, 24, 118, 132, 201, 66, 59, 146, 154, 44, 29, 178, 174, 204, 130, 173, 10, 40, 123, 78, 214, 91, 165, 233, 211, 209, 111, 132, 38, 92, 94, 135, 242, 202, 16, 216, 227, 104, 247, 67, 222, 105, 185, 154, 78, 100, 243, 242, 172, 154, 125, 49, 130, 169, 71, 122, 228, 34, 89, 138, 221, 191, 113, 109, 150, 145, 249, 208, 219, 127, 153, 226, 178, 196, 211, 124, 188, 57, 233, 242, 90, 239, 8, 113, 94, 245, 225, 36, 251, 4, 229, 187, 164, 135, 217, 216, 32, 157, 119, 237, 80, 127, 72, 93, 43, 242, 46, 211, 3, 191, 15, 213, 252, 166, 250, 177, 252, 74, 105, 211, 161, 16, 243, 127, 242, 196, 13, 205, 37, 69, 107, 13, 155, 253, 57, 48, 49, 100, 54, 38, 36, 87, 249, 200, 20, 40, 246, 13, 223, 61, 166, 48, 17, 39, 17, 104, 119, 0, 112, 119, 70, 4, 32, 29, 193, 79, 77, 40, 19, 68, 87, 90, 235, 38, 155, 74, 22, 47, 168, 200, 47, 120, 6, 183, 212, 38, 120, 121, 37, 54, 193, 194, 29, 112, 186, 72, 181, 18, 134, 68, 27, 82, 13, 204, 98, 181, 115, 68, 111, 15, 102, 129, 193, 143, 44, 245, 143, 82, 229, 70, 41, 123, 96, 143, 66, 203, 121, 77, 255, 193, 91, 222, 40, 83, 26, 65, 163, 39, 154, 73, 191, 11, 139, 210, 97, 249, 173, 224, 167, 38, 217, 57, 10, 177, 13, 98, 99, 164, 153, 67, 217, 125, 115, 39, 175, 195, 59, 110, 99, 1, 231, 252, 43, 36, 138, 116, 141, 22, 40, 177, 67, 83, 75, 3, 124, 83, 227, 144, 212, 38, 148, 243, 119, 134, 102, 163, 230, 176, 101, 167, 44, 160, 176, 208, 111, 170, 255, 34, 65, 105, 25, 127, 32, 31, 61, 182, 26, 239, 134, 5, 175, 147, 241, 14, 70, 3, 98, 94, 11, 19, 66, 62, 207, 146, 162, 74, 108, 1, 119, 252, 99, 50, 43, 151, 117, 140, 111, 12, 54, 249, 125, 211, 166, 8, 3, 39, 36, 83, 138, 187, 89, 110, 65, 16, 145, 70, 192, 4, 116, 77, 80, 102, 50, 196, 83, 73, 38, 165, 17, 179, 164, 69, 229, 231, 204, 147, 125, 106, 163, 39, 170, 233, 91, 228, 94, 206, 1, 39, 87, 221, 111, 193, 149, 95, 52, 255, 100, 166, 85, 7, 181, 128, 11, 216, 132, 109, 172, 172, 50, 48, 126, 150, 161, 253, 144, 66, 21, 82, 163, 76, 130, 144, 53, 227, 156, 188, 152, 183, 43, 157, 161, 97, 105, 68, 142, 47, 149, 210, 134, 81, 138, 107, 233, 113, 228, 104, 39, 183, 38, 234, 131, 60, 49, 144, 188, 55, 55, 50, 203, 99, 20, 247, 39, 177, 85, 95, 248, 37, 137, 171, 163, 29, 18, 115, 81, 95, 252, 141, 219, 247, 119, 185, 163, 1, 128, 63, 208, 175, 176, 76, 158, 40, 75, 249, 238, 236, 100, 228, 190, 215, 207, 212, 142, 10, 179, 245, 249, 172, 173, 221, 110, 167, 75, 196, 55, 146, 18, 52, 73, 110, 157, 176, 42, 169, 117, 186, 20, 127, 119, 204, 98, 255, 113, 166, 239, 45, 91, 195, 41, 59, 97, 51, 237, 31, 210, 76, 139, 163, 20, 112, 135, 89, 159, 242, 230, 197, 76, 8, 236, 169, 219, 120, 19, 200, 255, 183, 173, 19, 20, 21, 65, 90, 228, 114, 165, 118, 179, 94, 233, 209, 5, 197, 225, 152, 35, 0, 2, 154, 125, 164, 220, 197, 231, 177, 179, 181, 70, 250, 134, 109, 229, 221, 12, 234, 57, 32, 233, 37, 211, 209, 172, 213, 190, 3, 245, 3, 233, 10, 131, 196, 126, 228, 10, 98, 242, 131, 25, 223, 225, 164, 58, 88, 166, 251, 196, 87, 128, 159, 43, 118, 118, 232, 125, 189, 132, 108, 233, 144, 64, 2, 96, 225, 95, 42, 58, 103, 13, 166, 37, 113, 240, 32, 173, 61, 22, 42, 67, 125, 29, 185, 232, 184, 126, 208, 149, 190, 111, 252, 110, 80, 234, 170, 116, 62, 92, 50, 100, 213, 187, 75, 119, 71, 154, 215, 35, 153, 93, 203, 42, 134, 206, 63, 138, 73, 47, 166, 2, 132, 240, 51, 238, 84, 112, 143, 133, 96, 186, 202, 42, 134, 83, 174, 112, 240, 218, 109, 201, 4, 111, 222, 87, 40, 4, 147, 62, 208, 184, 44, 103, 87, 185, 175, 156, 95, 5, 89, 182, 4, 74, 208, 133, 179, 49, 61, 113, 84, 216, 100, 185, 239, 67, 128, 144, 243, 185, 220, 65, 183, 146, 237, 248, 116, 192, 72, 105, 240, 231, 244, 250, 2, 140, 28, 126, 104, 130, 20, 20, 194, 25, 14, 10, 34, 64, 126, 25, 160, 17, 94, 110, 113, 233, 110, 164, 112, 40, 67, 31, 211, 56, 3, 103, 188, 159, 44, 193, 118, 131, 5, 22, 157, 228, 14, 233, 196, 38, 248, 71, 37, 118, 143, 83, 156, 230, 226, 229, 12, 227, 97, 52, 188, 8, 41, 95, 212, 223, 100, 32, 8, 20, 125, 110, 190, 117, 238, 33, 237, 231, 134, 186, 49, 214, 82, 95, 39, 127, 220, 199, 157, 62, 11, 163, 34, 88, 64, 176, 83, 103, 252, 210, 195, 42, 69, 41, 137, 148, 62, 168, 89, 16, 158, 102, 88, 169, 172, 145, 247, 215, 108, 241, 65, 78, 32, 246, 209, 169, 143, 179, 102, 19, 204, 99, 160, 37, 206, 246, 159, 108, 191, 187, 41, 222, 132, 27, 186, 198, 67, 79, 190, 142, 246, 96, 18, 41, 127, 162, 19, 5, 108, 38, 226, 36, 117, 212, 174, 22, 75, 178, 116, 39, 169, 8, 240, 7, 165, 29, 18, 64, 238, 63, 230, 120, 138, 94, 154, 232, 167, 4, 180, 217, 184, 182, 240, 13, 19, 124, 19, 47, 121, 2, 71, 255, 4, 194, 82, 81, 215, 234, 153, 125, 50, 65, 71, 183, 26, 218, 103, 175, 73, 165, 43, 189, 17, 255, 171, 164, 21, 63, 233, 169, 23, 49, 35, 178, 106, 149, 238, 131, 87, 137, 222, 92, 240, 89, 62, 27, 153, 104, 161, 18, 41, 135, 25, 40, 96, 40, 237, 151, 190, 180, 67, 9, 145, 42, 96, 100, 87, 150, 129, 50, 126, 45, 129, 236, 98, 65, 190, 173, 225, 131, 76, 235, 228, 223, 226, 131, 192, 179, 226, 50, 238, 150, 33, 1, 94, 83, 186, 70, 50, 247, 140, 2, 27, 32, 71, 103, 165, 102, 61, 51, 192, 184, 69, 217, 171, 83, 146, 128, 159, 171, 34, 112, 60, 104, 137, 71, 107, 217, 91, 67, 146, 93, 142, 3, 53, 41, 162, 121, 189, 93, 221, 191, 0, 238, 145, 90, 239, 156, 18, 86, 175, 82, 8, 41, 17, 61, 173, 207, 16, 141, 226, 129, 68, 132, 245, 149, 163, 146, 173, 137, 230, 141, 71, 89, 106, 107, 74, 33, 204, 21, 74, 139, 144, 132, 112, 128, 57, 189, 27, 217, 4, 218, 218, 158, 83, 153, 13, 224, 96, 230, 129, 195, 0, 3, 34, 76, 223, 199, 0, 13, 201, 216, 186, 67, 50, 153, 81, 218, 91, 16, 59, 235, 22, 245, 229, 206, 13, 204, 57, 69, 153, 55, 249, 22, 149, 132, 165, 49, 53, 83, 10, 84, 2, 0, 116, 222, 240, 148, 202, 186, 124, 33, 213, 146, 162, 211, 214, 40, 123, 244, 151, 104, 30, 173, 12, 125, 67, 101, 36, 113, 181, 109, 197, 243, 165, 172, 116, 143, 182, 99, 251, 106, 43, 154, 65, 132, 38, 163, 231, 199, 232, 131, 63, 171, 34, 0, 4, 20, 255, 219, 136, 190, 75, 121, 234, 74, 186, 67, 119, 120, 97, 172, 135, 65, 182, 44, 166, 248, 21, 180, 64, 229, 179, 214, 89, 42, 115, 3, 37, 186, 71, 39, 224, 176, 255, 90, 210, 132, 139, 217, 15, 70, 152, 105, 132, 251, 117, 251, 28, 191, 226, 42, 79, 216, 122, 61, 88, 31, 101, 60, 10, 181, 253, 183, 179, 197, 141, 166, 223, 55, 130, 83, 82, 104, 184, 14, 142, 27, 67, 220, 249, 14, 96, 162, 132, 128, 173, 156, 13, 3, 47, 234, 247, 158, 165, 253, 3, 142, 243, 18, 211, 146, 139, 100, 165, 111, 26, 244, 102, 206, 49, 21, 79, 108, 80, 152, 34, 35, 234, 204, 118, 6, 113, 233, 156, 120, 233, 107, 250, 96, 54, 6, 225, 69, 64, 158, 124, 196, 35, 208, 39, 37, 92, 47, 59, 195, 201, 174, 106, 251, 241, 197, 24, 95, 128, 20, 175, 77, 146, 182, 126, 55, 76, 106, 71, 112, 230, 181, 13, 199, 157, 126, 228, 196, 69, 68, 226, 32, 237, 90, 60, 146, 247, 139, 137, 178, 5, 104, 27, 15, 167, 71, 190, 137, 126, 154, 9, 21, 121, 134, 84, 104, 243, 44, 185, 22, 249, 196, 64, 130, 46, 211, 183, 187, 78, 149, 84, 128, 239, 52, 22, 50, 214, 44, 17, 252, 108, 208, 238, 49, 182, 94, 61, 148, 9, 22, 175, 213, 243, 209, 55, 116, 210, 44, 46, 22, 92, 95, 102, 18, 228, 238, 249, 237, 100, 186, 103, 241, 245, 66, 0, 203, 194, 121, 184, 124, 175, 57, 127, 163, 76, 43, 25, 227, 174, 10, 38, 16, 20, 149, 69, 128, 68, 11, 195, 10, 10, 20, 164, 115, 247, 98, 238, 76, 241, 142, 50, 114, 170, 175, 28, 155, 21, 36, 80, 6, 19, 149, 116, 68, 60, 1, 254, 52, 45, 147, 82, 197, 254, 1, 30, 178, 56, 161, 22, 132, 60, 151, 151, 251, 215, 57, 62, 122, 220, 7, 189, 91, 213, 186, 76, 92, 15, 84, 165, 63, 112, 24, 36, 62, 198, 237, 184, 127, 155, 22, 8, 124, 216, 185, 237, 16, 48, 77, 33, 203, 174, 135, 30, 24, 222, 93, 120, 80, 52, 63, 64, 223, 63, 40, 208, 31, 148, 170, 230, 214, 251, 39, 250, 32, 151, 13, 106, 247, 11, 42, 55, 110, 121, 255, 115, 200, 167, 157, 12, 59, 79, 47, 203, 57, 178, 18, 150, 94, 36, 224, 48, 249, 129, 178, 70, 31, 110, 79, 179, 30, 216, 242, 84, 216, 162, 57, 137, 66, 61, 0, 226, 72, 183, 240, 171, 52, 254, 127, 162, 45, 163, 72, 251, 42, 252, 188, 12, 145, 167, 32, 48, 227, 3, 34, 107, 209, 90, 227, 159, 25, 58, 192, 232, 156, 146, 68, 68, 6, 106, 140, 206, 25, 65, 251, 104, 90, 120, 181, 85, 89, 119, 221, 19, 106, 134, 216, 167, 231, 51, 141, 36, 228, 160, 12, 175, 67, 93, 19, 18, 132, 92, 43, 87, 116, 111, 169, 145, 11, 56, 119, 174, 30, 195, 215, 72, 31, 174, 161, 31, 95, 134, 101, 182, 184, 118, 20, 132, 111, 182, 73, 115, 214, 201, 169, 235, 238, 228, 154, 130, 86, 180, 108, 241, 184, 37, 252, 245, 128, 196, 29, 49, 67, 49, 56, 53, 62, 84, 66, 225, 0, 10, 164, 3, 16, 71, 194, 187, 40, 37, 194, 237, 236, 190, 143, 79, 232, 153, 16, 33, 51, 170, 116, 221, 31, 118, 52, 240, 35, 80, 111, 80, 97, 5, 40, 80, 184, 247, 79, 79, 197, 177, 215, 23, 77, 48, 129, 64, 83, 187, 236, 207, 162, 89, 43, 158, 84, 219, 213, 141, 125, 116, 183, 20, 109, 57, 23, 23, 10, 152, 173, 114, 255, 175, 154, 88, 11, 128, 18, 108, 47, 9, 147, 85, 195, 42, 91, 119, 90, 23, 24, 4, 92, 255, 91, 167, 153, 141, 79, 86, 128, 47, 113, 239, 160, 21, 190, 209, 120, 26, 98, 76, 94, 206, 55, 22, 185, 28, 137, 138, 144, 99, 187, 122, 188, 144, 54, 128, 169, 69, 40, 114, 117, 13, 108, 12, 22, 99, 169, 227, 231, 203, 121, 19, 73, 228, 243, 182, 71, 208, 48, 186, 186, 1, 190, 34, 11, 249, 151, 68, 197, 237, 222, 38, 126, 56, 249, 213, 245, 127, 101, 93, 112, 29, 180, 121, 37, 147, 189, 61, 120, 138, 133, 203, 66, 6, 128, 61, 50, 32, 229, 235, 111, 128, 125, 249, 220, 110, 205, 241, 233, 33, 250, 101, 58, 68, 230, 73, 188, 217, 111, 64, 172, 156, 58, 229, 164, 107, 27, 30, 125, 106, 121, 246, 110, 65, 78, 83, 100, 108, 12, 141, 31, 78, 177, 142, 254, 18, 176, 196, 99, 0, 202, 218, 251, 137, 89, 113, 221, 194, 33, 127, 186, 125, 45, 71, 2, 76, 244, 105, 97, 91, 138, 88, 119, 171, 231, 254, 37, 248, 43, 35, 189, 176, 51, 66, 69, 142, 37, 139, 182, 45, 160, 218, 239, 228, 205, 144, 250, 216, 39, 74, 97, 165, 150, 16, 136, 144, 255, 142, 0, 182, 200, 232, 80, 24, 137, 215, 22, 118, 153, 105, 181, 42, 6, 9, 134, 252, 16, 8, 126, 84, 34, 29, 129, 40, 162, 161, 10, 151, 72, 148, 150, 214, 26, 158, 145, 72, 100, 250, 251, 44, 109, 39, 220, 2, 246, 84, 239, 2, 86, 47, 220, 19, 228, 162, 80, 226, 253, 223, 103, 142, 154, 55, 231, 230, 241, 121, 5, 36, 61, 240, 77, 196, 147, 126, 11, 198, 232, 146, 92, 64, 76, 83, 228, 74, 173, 11, 178, 36, 99, 185, 32, 60, 60, 120, 14, 128, 142, 57, 55, 63, 249, 60, 126, 202, 249, 235, 10, 254, 109, 99, 196, 229, 239, 10, 25, 229, 103, 181, 89, 241, 216, 203, 60, 12, 120, 174, 158, 106, 176, 241, 192, 113, 128, 202, 126, 42, 203, 110, 116, 245, 168, 167, 161, 239, 155, 203, 4, 243, 26, 61, 68, 34, 9, 58, 47, 221, 165, 5, 109, 43, 72, 66, 20, 12, 114, 163, 234, 214, 105, 163, 155, 214, 82, 203, 10, 36, 253, 90, 50, 64, 174, 17, 26, 211, 68, 167, 221, 149, 90, 253, 217, 109, 38, 180, 17, 79, 202, 130, 140, 151, 33, 233, 122, 244, 203, 207, 173, 213, 120, 249, 188, 242, 195, 160, 118, 13, 19, 75, 241, 86, 163, 41, 218, 58, 43, 138, 239, 2, 36, 155, 191, 116, 122, 133, 215, 144, 210, 166, 12, 250, 197, 84, 150, 236, 105, 91, 71, 117, 250, 100, 230, 236, 72, 94, 100, 190, 193, 82, 149, 133, 221, 49, 237, 10, 38, 208, 181, 214, 11, 108, 133, 99, 179, 30, 213, 47, 147, 120, 123, 79, 77, 15, 183, 111, 77, 121, 28, 217, 216, 113, 46, 86, 166, 229, 191, 76, 201, 165, 191, 37, 234, 32, 41, 130, 74, 148, 85, 124, 104, 197, 125, 61, 130, 145, 78, 154, 227, 137, 201, 9, 37, 6, 253, 233, 0, 221, 128, 18, 38, 149, 234, 118, 229, 160, 2, 162, 147, 13, 156, 71, 184, 48, 20, 49, 89, 172, 217, 27, 141, 235, 0, 16, 218, 222, 227, 57, 186, 171, 51, 190, 82, 244, 32, 247, 54, 52, 190, 172, 77, 149, 178, 238, 174, 13, 24, 31, 154, 170, 98, 127, 233, 211, 87, 83, 166, 157, 52, 223, 149, 183, 80, 153, 100, 218, 114, 31, 207, 119, 4, 178, 38, 129, 35, 220, 24, 94, 166, 97, 179, 27, 53, 46, 32, 62, 2, 211, 146, 95, 230, 208, 166, 24, 47, 200, 190, 209, 120, 253, 158, 172, 153, 119, 242, 142, 214, 46, 111, 97, 153, 21, 20, 64, 52, 165, 230, 192, 82, 54, 152, 244, 207, 88, 23, 116, 24, 53, 84, 5, 228, 66, 229, 77, 3, 138, 161, 228, 44, 250, 226, 88, 201, 199, 142, 212, 109, 124, 154, 111, 153, 113, 221, 88, 212, 80, 192, 135, 159, 32, 80, 66, 115, 87, 206, 176, 240, 74, 33, 111, 240, 76, 213, 15, 240, 246, 79, 23, 14, 64, 96, 111, 180, 18, 235, 183, 109, 229, 129, 16, 195, 212, 10, 245, 128, 61, 157, 230, 144, 183, 102, 180, 87, 97, 50, 51, 54, 56, 86, 185, 161, 101, 200, 149, 151, 178, 231, 153, 237, 29, 7, 137, 168, 118, 164, 49, 48, 86, 185, 41, 42, 115, 10, 36, 235, 125, 252, 22, 41, 41, 220, 166, 226, 43, 154, 83, 233, 156, 252, 203, 179, 131, 192, 213, 118, 144, 103, 0, 103, 245, 88, 177, 146, 13, 252, 50, 174, 247, 250, 221, 165, 8, 61, 175, 201, 138, 97, 157, 232, 221, 146, 35, 111, 228, 79, 97, 101, 154, 88, 46, 119, 139, 198, 134, 63, 59, 254, 246, 78, 224, 193, 191, 79, 247, 178, 214, 44, 36, 227, 22, 152, 19, 99, 64, 177, 224, 53, 209, 160, 44, 253, 12, 63, 33, 103, 199, 4, 228, 194, 56, 86, 62, 26, 6, 225, 172, 219, 217, 116, 162, 110, 85, 47, 110, 3, 108, 19, 138, 141, 91, 13, 176, 220, 138, 93, 105, 169, 7, 134, 134, 72, 82, 54, 153, 37, 49, 45, 188, 4, 255, 137, 95, 84, 56, 216, 10, 253, 52, 153, 144, 189, 105, 38, 189, 100, 211, 57, 145, 222, 42, 163, 66, 153, 194, 63, 20, 24, 120, 204, 215, 21, 225, 90, 236, 157, 163, 119, 58, 153, 207, 232, 25, 82, 135, 3, 106, 112, 142, 7, 129, 216, 221, 225, 61, 190, 167, 50, 25, 22, 50, 182, 83, 88, 86, 54, 53, 176, 237, 79, 178, 92, 105, 166, 59, 215, 59, 35, 247, 186, 250, 160, 32, 20, 141, 13, 205, 237, 137, 188, 35, 11, 126, 13, 85, 16, 83, 146, 215, 189, 136, 218, 84, 208, 80, 246, 251, 224, 100, 61, 167, 185, 144, 103, 137, 109, 223, 147, 172, 81, 110, 156, 70, 32, 32, 199, 32, 248, 6, 121, 33, 157, 199, 127, 94, 144, 164, 125, 78, 3, 152, 35, 183, 229, 71, 26, 200, 205, 140, 192, 100, 183, 136, 128, 94, 75, 198, 153, 57, 44, 30, 154, 235, 134, 25, 188, 17, 139, 176, 228, 243, 246, 31, 181, 5, 83, 233, 180, 255, 175, 242, 181, 16, 250, 97, 107, 122, 255, 127, 12, 54, 142, 166, 213, 13, 186, 41, 233, 0, 212, 208, 19, 185, 186, 155, 251, 140, 91, 176, 149, 246, 131, 38, 133, 151, 158, 52, 100, 130, 227, 79, 156, 219, 227, 221, 65, 105, 203, 51, 220, 75, 229, 55, 47, 113, 177, 31, 39, 172, 229, 227, 165, 203, 114, 57, 161, 186, 199, 177, 121, 153, 212, 243, 232, 97, 66, 133, 185, 159, 25, 110, 9, 234, 9, 201, 168, 209, 63, 213, 160, 103, 47, 169, 33, 215, 106, 48, 134, 96, 224, 232, 210, 214, 55, 50, 233, 208, 140, 233, 250, 90, 111, 14, 44, 96, 5, 254, 124, 132, 118, 74, 179, 101, 20, 188, 58, 38, 82, 221, 181, 158, 76, 47, 166, 39, 18, 100, 223, 205, 126, 14, 187, 46, 210, 157, 205, 88, 227, 159, 171, 170, 210, 45, 28, 80, 84, 34, 15, 250, 14, 159, 157, 75, 67, 35, 109, 57, 220, 156, 218, 124, 7, 59, 154, 196, 255, 64, 22, 166, 58, 87, 255, 70, 78, 130, 53, 56, 111, 253, 15, 224, 10, 238, 184, 91, 216, 221, 41, 66, 66, 35, 193, 221, 83, 162, 246, 111, 30, 114, 249, 60, 147, 147, 40, 209, 97, 241, 189, 28, 92, 139, 203, 253, 62, 158, 37, 49, 106, 202, 151, 123, 7, 39, 56, 168, 253, 155, 105, 100, 153, 113, 255, 80, 14, 66, 127, 73, 237, 115, 86, 207, 177, 166, 208, 237, 248, 165, 228, 240, 16, 233, 166, 161, 73, 7, 114, 167, 20, 75, 25, 203, 15, 187, 20, 164, 21, 100, 76, 60, 242, 71, 120, 120, 216, 10, 142, 158, 0, 190, 236, 59, 64, 79, 81, 47, 86, 235, 41, 91, 133, 2, 132, 189, 250, 116, 60, 235, 112, 235, 148, 74, 218, 236, 101, 15, 189, 253, 136, 252, 204, 212, 15, 86, 232, 231, 43, 37, 217, 132, 85, 161, 78, 253, 38, 242, 5, 51, 201, 30, 96, 100, 184, 144, 160, 53, 38, 221, 222, 232, 214, 154, 251, 248, 84, 180, 92, 237, 161, 111, 254, 78, 151, 229, 91, 161, 122, 187, 75, 132, 156, 134, 211, 149, 162, 164, 165, 13, 164, 188, 243, 110, 167, 99, 20, 45, 155, 150, 230, 213, 71, 96, 137, 167, 3, 230, 157, 176, 42, 180, 60, 231, 91, 95, 242, 244, 112, 44, 139, 116, 154, 49, 128, 234, 29, 87, 83, 26, 164, 6, 237, 57, 118, 64, 223, 133, 173, 76, 131, 30, 218, 175, 130, 149, 93, 222, 164, 4, 198, 151, 98, 123, 248, 110, 85, 146, 226, 2, 180, 154, 52, 0, 54, 205, 31, 167, 26, 233, 36, 179, 23, 20, 194, 56, 104, 168, 213, 103, 13, 243, 255, 133, 50, 166, 108, 89, 47, 51, 49, 51, 183, 26, 34, 194, 60, 108, 214, 214, 206, 40, 197, 207, 69, 43, 52, 7, 219, 171, 54, 25, 207, 124, 84, 52, 170, 222, 145, 175, 196, 94, 109, 175, 103, 117, 137, 187, 221, 250, 177, 116, 171, 15, 57, 110, 234, 222, 233, 132, 29, 97, 178, 205, 140, 199, 17, 135, 217, 52, 92, 57, 23, 190, 105, 243, 63, 243, 136, 15, 82, 34, 233, 230, 128, 137, 96, 153, 29, 42, 135, 232, 123, 37, 28, 96, 11, 102, 63, 190, 213, 126, 88, 2, 170, 170, 185, 54, 199, 121, 223, 124, 122, 182, 73, 74, 243, 244, 110, 83, 4, 84, 190, 108, 145, 28, 229, 114, 33, 114, 177, 53, 76, 152, 247, 155, 132, 96, 125, 124, 70, 162, 222, 82, 205, 141, 40, 104, 16, 46, 42, 98, 65, 45, 38, 53, 225, 243, 232, 9, 72, 200, 83, 11, 228, 130, 232, 151, 53, 44, 226, 91, 161, 197, 215, 5, 42, 211, 185, 230, 65, 3, 90, 227, 109, 96, 23, 127, 76, 193, 186, 18, 88, 156, 202, 220, 68, 110, 0, 150, 205, 15, 192, 41, 81, 47, 255, 228, 116, 219, 42, 236, 251, 5, 46, 25, 245, 10, 36, 183, 185, 246, 54, 43, 184, 189, 252, 122, 32, 176, 160, 128, 35, 133, 252, 206, 30, 49, 184, 2, 70, 121, 211, 249, 90, 212, 103, 182, 166, 31, 28, 91, 182, 28, 155, 141, 182, 111, 212, 109, 148, 240, 237, 236, 75, 142, 39, 238, 241, 131, 57, 17, 172, 234, 209, 53, 11, 3, 24, 199, 196, 249, 113, 167, 219, 71, 224, 162, 112, 175, 109, 136, 20, 60, 34, 223, 255, 126, 161, 33, 48, 232, 76, 89, 132, 157, 248, 10, 48, 100, 62, 239, 210, 243, 213, 113, 71, 64, 148, 224, 5, 168, 216, 225, 76, 255, 239, 87, 58, 252, 189, 17, 80, 122, 5, 70, 116, 64, 222, 45, 136, 125, 201, 61, 194, 97, 96, 136, 133, 14, 250, 43, 50, 251, 74, 83, 145, 244, 151, 43, 167, 86, 255, 71, 148, 207, 161, 127, 243, 80, 26, 218, 22, 71, 167, 25, 61, 232, 207, 100, 248, 229, 112, 197, 54, 221, 141, 163, 139, 131, 125, 70, 126, 71, 151, 197, 45, 189, 152, 54, 100, 224, 67, 64, 144, 44, 243, 51, 235, 225, 8, 47, 42, 40, 61, 111, 200, 193, 98, 226, 87, 200, 213, 159, 154, 139, 49, 250, 21, 48, 37, 125, 187, 86, 52, 234, 204, 150, 47, 53, 36, 89, 236, 34, 143, 200, 24, 243, 54, 207, 145, 143, 37, 179, 117, 63, 105, 163, 165, 132, 21, 185, 50, 48, 123, 250, 184, 22, 196, 104, 20, 193, 223, 43, 143, 237, 13, 120, 156, 142, 56, 222, 144, 137, 238, 3, 140, 180, 150, 72, 140, 33, 173, 180, 42, 143, 60, 238, 139, 57, 244, 130, 35, 125, 228, 20, 171, 172, 18, 156, 59, 1, 119, 77, 78, 63, 207, 118, 92, 49, 72, 90, 39, 54, 106, 159, 235, 64, 34, 59, 92, 24, 74, 18, 228, 144, 23, 223, 15, 157, 203, 151, 139, 100, 168, 224, 193, 153, 157, 118, 28, 161, 33, 253, 128, 235, 84, 162, 190, 181, 249, 158, 215, 19, 170, 54, 152, 230, 20, 118, 16, 205, 38, 138, 239, 22, 202, 51, 216, 49, 180, 193, 3, 124, 99, 45, 29, 62, 164, 29, 100, 210, 254, 66, 243, 194, 216, 119, 106, 128, 182, 151, 189, 42, 120, 159, 13, 107, 130, 75, 68, 73, 6, 101, 16, 35, 160, 183, 215, 10, 166, 129, 0, 138, 128, 134, 23, 167, 134, 93, 126, 51, 7, 161, 84, 92, 171, 173, 74, 242, 62, 68, 46, 132, 126, 179, 115, 53, 94, 123, 52, 84, 39, 255, 253, 87, 79, 10, 36, 125, 95, 138, 142, 134, 26, 175, 170, 105, 95, 31, 153, 245, 193, 169, 181, 2, 227, 119, 125, 59, 2, 13, 216, 92, 171, 243, 102, 109, 142, 146, 151, 0, 176, 20, 134, 164, 158, 225, 15, 36, 100, 175, 205, 234, 237, 60, 18, 146, 55, 111, 168, 224, 253, 117, 71, 221, 29, 143, 147, 223, 171, 19, 133, 141, 56, 128, 161, 176, 89, 175, 20, 194, 200, 25, 104, 65, 153, 128, 12, 183, 185, 226, 215], + [181, 98, 158, 111, 220, 168, 9, 170, 2, 26, 108, 153, 234, 168, 180, 223, 140, 163, 234, 7, 235, 72, 63, 101, 14, 195, 179, 144, 9, 13, 63, 37, 25, 7, 102, 87, 52, 214, 124, 46, 202, 2, 120, 60, 107, 15, 5, 165, 138, 76, 30, 201, 8, 68, 142, 108, 236, 142, 148, 150, 201, 169, 177, 115, 8, 116, 57, 69, 173, 191, 134, 235, 223, 250, 244, 23, 83, 162, 196, 188, 221, 223, 10, 92, 52, 184, 157, 59, 94, 72, 2, 159, 175, 60, 14, 43, 25, 251, 233, 203, 108, 97, 164, 195, 31, 97, 151, 90, 249, 214, 173, 120, 254, 193, 194, 211, 22, 195, 214, 186, 141, 183, 146, 13, 146, 173, 103, 176, 141, 14, 173, 202, 50, 231, 245, 92, 124, 119, 22, 85, 98, 17, 58, 99, 250, 93, 133, 78, 139, 217, 200, 76, 193, 67, 181, 73, 234, 161, 35, 139, 119, 62, 236, 210, 189, 175, 23, 189, 153, 111, 33, 21, 51, 191, 125, 194, 181, 249, 181, 149, 105, 47, 0, 213, 58, 170, 254, 147, 157, 224, 204, 93, 242, 128, 11, 217, 252, 187, 157, 194, 43, 43, 68, 151, 185, 136, 121, 251, 171, 165, 74, 35, 222, 28, 197, 227, 180, 66, 65, 44, 158, 253, 176, 90, 15, 240, 58, 171, 74, 43, 181, 142, 141, 124, 53, 35, 184, 25, 179, 84, 156, 163, 240, 245, 119, 31, 167, 228, 164, 45, 133, 195, 111, 113, 46, 122, 123, 30, 108, 160, 152, 126, 186, 231, 197, 31, 97, 46, 253, 245, 15, 87, 185, 66, 218, 105, 207, 206, 24, 30, 249, 38, 82, 58, 175, 240, 221, 165, 28, 46, 123, 96, 54, 91, 110, 100, 103, 150, 242, 165, 240, 224, 103, 69, 251, 163, 197, 61, 140, 92, 31, 239, 175, 101, 3, 43, 20, 185, 65, 130, 239, 87, 40, 30, 80, 196, 156, 221, 68, 148, 243, 190, 23, 96, 213, 101, 255, 89, 153, 51, 217, 43, 100, 135, 81, 71, 31, 112, 216, 34, 122, 189, 254, 255, 58, 166, 166, 91, 24, 233, 91, 170, 143, 70, 147, 64, 253, 207, 37, 92, 59, 49, 130, 0, 172, 80, 143, 30, 68, 163, 207, 30, 12, 159, 38, 238, 246, 108, 211, 83, 206, 21, 80, 110, 5, 87, 61, 225, 226, 237, 157, 39, 6, 242, 12, 15, 167, 217, 225, 163, 254, 81, 255, 130, 81, 192, 104, 62, 223, 229, 166, 71, 4, 208, 197, 71, 174, 199, 60, 218, 81, 172, 157, 232, 121, 22, 190, 151, 193, 210, 136, 233, 192, 222, 225, 47, 146, 53, 101, 62, 220, 52, 123, 226, 247, 177, 168, 87, 0, 191, 238, 53, 47, 216, 66, 203, 157, 135, 58, 13, 174, 8, 76, 164, 214, 207, 60, 96, 13, 79, 250, 167, 13, 163, 83, 115, 132, 26, 252, 146, 218, 16, 7, 51, 84, 186, 126, 66, 230, 240, 211, 119, 11, 149, 253, 171, 217, 153, 185, 156, 61, 144, 0, 22, 125, 185, 115, 151, 70, 194, 193, 147, 148, 50, 182, 5, 35, 155, 161, 3, 40, 97, 209, 0, 127, 39, 34, 94, 189, 254, 126, 8, 160, 252, 83, 222, 193, 165, 245, 61, 220, 45, 169, 244, 4, 87, 62, 128, 82, 111, 71, 84, 118, 57, 119, 172, 195, 218, 179, 49, 220, 185, 243, 147, 17, 170, 28, 120, 168, 18, 136, 197, 166, 35, 223, 75, 139, 124, 25, 189, 192, 136, 92, 67, 30, 206, 71, 177, 20, 73, 107, 91, 27, 219, 233, 172, 152, 248, 54, 36, 81, 47, 166, 122, 63, 152, 249, 0, 157, 177, 215, 127, 192, 233, 155, 29, 184, 2, 194, 130, 151, 222, 186, 106, 188, 65, 236, 179, 77, 192, 62, 7, 155, 234, 91, 216, 115, 4, 124, 67, 88, 198, 24, 207, 191, 102, 51, 75, 33, 120, 143, 192, 189, 235, 85, 152, 173, 203, 79, 175, 252, 114, 60, 193, 116, 235, 90, 170, 95, 186, 119, 124, 189, 91, 198, 255, 99, 109, 37, 63, 204, 227, 99, 13, 119, 210, 22, 241, 153, 165, 152, 96, 165, 149, 34, 52, 59, 182, 46, 195, 110, 129, 253, 18, 241, 125, 117, 245, 70, 123, 2, 15, 255, 7, 208, 241, 51, 109, 228, 55, 235, 108, 49, 7, 117, 235, 106, 111, 29, 100, 25, 210, 64, 110, 225, 205, 174, 228, 84, 253, 243, 127, 52, 63, 57, 233, 161, 148, 28, 16, 175, 155, 130, 154, 213, 145, 108, 101, 161, 112, 164, 36, 77, 121, 148, 60, 202, 106, 119, 119, 179, 208, 159, 68, 89, 169, 47, 235, 88, 251, 56, 73, 221, 124, 204, 29, 111, 149, 176, 120, 65, 16, 250, 253, 70, 16, 146, 24, 92, 132, 76, 253, 2, 4, 73, 10, 227, 238, 32, 227, 87, 249, 111, 219, 182, 202, 203, 44, 7, 44, 154, 234, 10, 15, 251, 211, 68, 35, 70, 114, 124, 169, 87, 168, 225, 18, 218, 59, 156, 226, 76, 73, 65, 137, 59, 166, 239, 17, 67, 26, 212, 198, 106, 140, 211, 157, 145, 131, 218, 236, 54, 8, 81, 177, 40, 130, 155, 9, 194, 133, 13, 198, 25, 49, 17, 245, 226, 185, 116, 110, 19, 17, 114, 209, 30, 14, 184, 101, 196, 43, 184, 116, 220, 88, 161, 122, 66, 78, 51, 63, 227, 127, 113, 181, 35, 197, 209, 62, 55, 172, 136, 40, 126, 194, 86, 46, 165, 94, 205, 113, 253, 239, 138, 14, 8, 236, 14, 179, 33, 207, 226, 198, 236, 47, 173, 5, 180, 185, 138, 134, 201, 216, 75, 103, 82, 67, 240, 0, 13, 88, 28, 148, 236, 82, 138, 227, 121, 160, 62, 7, 159, 177, 212, 25, 246, 139, 206, 228, 83, 55, 126, 243, 129, 224, 3, 179, 115, 4, 227, 129, 2, 158, 183, 228, 243, 167, 5, 61, 84, 73, 41, 65, 78, 32, 136, 125, 187, 172, 128, 64, 99, 162, 132, 203, 51, 35, 71, 185, 228, 46, 152, 20, 255, 246, 120, 83, 196, 233, 224, 182, 111, 15, 253, 179, 9, 168, 150, 53, 189, 3, 9, 140, 188, 165, 14, 99, 216, 148, 119, 177, 81, 77, 197, 32, 18, 64, 3, 6, 237, 212, 19, 198, 46, 156, 124, 147, 72, 99, 184, 162, 162, 209, 64, 147, 48, 89, 102, 72, 62, 3, 108, 173, 165, 162, 151, 44, 160, 59, 2, 198, 47, 242, 57, 100, 191, 71, 198, 101, 111, 29, 250, 249, 57, 172, 80, 152, 187, 164, 52, 239, 238, 0, 91, 184, 25, 85, 30, 101, 249, 172, 14, 170, 175, 212, 91, 239, 158, 249, 9, 41, 74, 140, 53, 4, 236, 217, 183, 81, 134, 56, 167, 32, 168, 87, 55, 13, 58, 22, 52, 127, 207, 248, 17, 138, 242, 125, 114, 180, 31, 86, 82, 84, 185, 164, 228, 208, 41, 202, 93, 70, 26, 247, 119, 94, 69, 43, 102, 157, 7, 204, 48, 124, 123, 35, 172, 84, 113, 142, 2, 88, 149, 83, 146, 232, 89, 149, 80, 219, 92, 161, 214, 94, 9, 178, 129, 118, 241, 63, 117, 233, 50, 186, 45, 228, 48, 117, 211, 85, 103, 248, 222, 118, 98, 114, 255, 219, 207, 76, 98, 210, 186, 108, 72, 207, 195, 201, 139, 82, 86, 202, 144, 215, 243, 243, 226, 91, 239, 140, 181, 5, 2, 16, 201, 107, 66, 146, 122, 114, 16, 250, 153, 54, 153, 171, 120, 247, 129, 125, 23, 162, 230, 61, 61, 210, 48, 65, 241, 101, 17, 12, 163, 124, 110, 121, 158, 75, 161, 53, 48, 95, 48, 150, 35, 63, 35, 145, 73, 188, 197, 17, 1, 221, 59, 92, 206, 138, 135, 218, 39, 133, 45, 217, 146, 195, 165, 136, 79, 252, 111, 152, 182, 222, 255, 29, 174, 33, 161, 94, 195, 36, 71, 169, 193, 203, 156, 248, 198, 223, 70, 85, 178, 157, 185, 252, 24, 117, 106, 73, 205, 156, 226, 149, 122, 26, 21, 7, 84, 215, 213, 240, 174, 9, 22, 28, 115, 207, 246, 12, 176, 15, 189, 199, 92, 193, 245, 150, 37, 148, 98, 239, 147, 248, 213, 189, 79, 228, 86, 11, 3, 250, 16, 48, 205, 175, 205, 8, 110, 98, 93, 254, 84, 83, 167, 152, 170, 162, 97, 124, 225, 28, 95, 85, 100, 239, 101, 190, 228, 234, 187, 198, 3, 77, 209, 244, 130, 135, 225, 62, 178, 24, 244, 198, 50, 239, 14, 144, 49, 231, 191, 50, 22, 212, 169, 77, 215, 251, 91, 144, 34, 38, 3, 207, 121, 128, 108, 60, 55, 23, 51, 26, 182, 175, 247, 23, 159, 2, 224, 174, 175, 82, 85, 234, 152, 222, 123, 223, 22, 107, 183, 29, 168, 231, 224, 110, 112, 9, 33, 199, 137, 227, 183, 204, 42, 93, 217, 43, 107, 178, 139, 2, 0, 27, 110, 172, 163, 203, 222, 247, 150, 239, 239, 132, 167, 64, 236, 241, 8, 38, 179, 108, 188, 231, 167, 160, 205, 7, 12, 32, 166, 134, 183, 254, 130, 124, 20, 129, 118, 115, 79, 136, 92, 206, 175, 253, 198, 255, 244, 235, 203, 107, 172, 218, 117, 212, 222, 178, 76, 108, 154, 226, 85, 99, 83, 100, 134, 15, 200, 171, 47, 13, 252, 76, 51, 224, 166, 184, 13, 132, 119, 9, 90, 28, 1, 90, 164, 171, 234, 219, 243, 72, 140, 154, 86, 204, 10, 23, 234, 230, 72, 213, 29, 205, 227, 94, 253, 22, 185, 186, 61, 85, 115, 223, 62, 188, 151, 128, 88, 90, 204, 66, 211, 185, 7, 100, 89, 120, 239, 183, 11, 27, 47, 104, 157, 38, 248, 7, 206, 90, 130, 235, 213, 165, 87, 114, 126, 88, 173, 105, 181, 135, 89, 244, 13, 135, 135, 95, 99, 181, 237, 226, 231, 111, 186, 58, 119, 186, 26, 229, 22, 160, 24, 212, 249, 3, 86, 55, 238, 98, 171, 15, 24, 108, 93, 196, 242, 30, 101, 154, 39, 13, 81, 103, 234, 42, 74, 39, 49, 11, 37, 240, 12, 2, 125, 171, 31, 21, 126, 116, 106, 30, 175, 126, 136, 180, 15, 116, 191, 41, 52, 64, 199, 80, 245, 255, 71, 87, 191, 75, 220, 2, 122, 222, 20, 25, 43, 17, 104, 201, 91, 210, 107, 49, 157, 169, 131, 229, 231, 34, 141, 80, 55, 220, 251, 55, 33, 237, 160, 187, 227, 63, 197, 80, 188, 200, 24, 242, 87, 115, 29, 134, 239, 1, 38, 191, 230, 23, 208, 63, 100, 203, 247, 26, 174, 137, 170, 197, 104, 0, 191, 49, 134, 27, 146, 1, 57, 210, 244, 150, 214, 173, 164, 169, 62, 182, 237, 74, 29, 233, 4, 190, 5, 125, 89, 212, 195, 148, 95, 211, 216, 41, 77, 170, 42, 146, 142, 58, 131, 69, 181, 19, 43, 152, 174, 220, 70, 2, 144, 77, 140, 171, 49, 115, 25, 54, 157, 226, 193, 73, 206, 198, 156, 154, 3, 200, 113, 29, 92, 27, 243, 184, 95, 107, 225, 153, 69, 136, 13, 2, 149, 53, 70, 93, 151, 34, 123, 107, 161, 216, 160, 113, 50, 39, 198, 48, 12, 177, 219, 109, 8, 178, 1, 17, 8, 41, 196, 173, 111, 198, 16, 214, 18, 13, 194, 120, 160, 100, 112, 154, 169, 143, 3, 8, 38, 219, 255, 217, 166, 55, 129, 223, 85, 58, 232, 229, 91, 183, 196, 133, 164, 30, 131, 129, 117, 238, 35, 110, 39, 64, 68, 62, 129, 203, 8, 190, 109, 35, 182, 28, 110, 181, 63, 40, 82, 172, 97, 13, 120, 77, 209, 165, 182, 89, 211, 88, 73, 112, 130, 210, 230, 244, 198, 12, 199, 201, 105, 39, 56, 85, 97, 212, 12, 207, 208, 146, 249, 196, 250, 233, 212, 65, 16, 14, 199, 186, 168, 87, 178, 244, 182, 83, 5, 207, 121, 146, 113, 3, 106, 178, 22, 192, 35, 153, 215, 173, 24, 85, 199, 245, 41, 232, 74, 112, 100, 82, 183, 236, 178, 121, 129, 8, 174, 95, 134, 64, 29, 215, 109, 112, 236, 48, 187, 127, 85, 93, 95, 101, 96, 97, 47, 36, 142, 63, 197, 182, 62, 198, 12, 105, 188, 41, 209, 112, 34, 22, 160, 125, 24, 8, 36, 32, 213, 232, 175, 36, 107, 205, 193, 113, 189, 217, 140, 67, 204, 90, 45, 30, 81, 225, 168, 49, 199, 246, 27, 29, 11, 15, 244, 95, 134, 238, 237, 157, 1, 235, 36, 138, 55, 203, 162, 234, 173, 93, 109, 123, 24, 6, 133, 192, 228, 97, 169, 22, 121, 125, 37, 216, 146, 191, 73, 55, 226, 253, 59, 50, 243, 254, 80, 7, 255, 108, 100, 125, 123, 50, 0, 156, 37, 47, 114, 75, 174, 190, 60, 97, 12, 183, 196, 156, 228, 20, 55, 194, 80, 212, 55, 211, 215, 67, 196, 8, 247, 233, 56, 86, 24, 118, 13, 158, 157, 71, 225, 113, 34, 112, 175, 134, 155, 59, 86, 171, 119, 249, 46, 202, 239, 34, 135, 213, 4, 71, 102, 178, 25, 167, 34, 224, 19, 192, 190, 28, 234, 14, 106, 105, 180, 251, 124, 182, 180, 113, 137, 116, 217, 137, 207, 123, 190, 15, 79, 61, 184, 86, 238, 25, 50, 111, 251, 239, 245, 114, 217, 226, 199, 106, 51, 55, 189, 13, 234, 186, 215, 106, 94, 181, 196, 91, 146, 100, 235, 166, 167, 234, 134, 7, 64, 13, 6, 111, 61, 119, 127, 32, 26, 160, 82, 177, 249, 70, 239, 7, 103, 56, 38, 85, 96, 62, 100, 61, 23, 152, 239, 31, 117, 85, 223, 212, 184, 47, 55, 4, 110, 170, 91, 119, 90, 215, 86, 166, 105, 103, 183, 133, 9, 42, 30, 167, 60, 28, 90, 125, 3, 45, 226, 225, 141, 207, 144, 105, 207, 150, 198, 14, 241, 110, 75, 20, 59, 217, 162, 188, 90, 204, 133, 234, 191, 41, 172, 118, 60, 132, 143, 231, 153, 245, 250, 160, 157, 179, 105, 232, 204, 231, 114, 133, 73, 30, 2, 8, 31, 62, 178, 225, 255, 162, 22, 184, 210, 247, 220, 146, 107, 225, 132, 149, 78, 190, 239, 33, 99, 91, 204, 60, 22, 101, 237, 60, 76, 109, 218, 60, 136, 33, 180, 31, 183, 198, 103, 204, 203, 110, 207, 150, 34, 86, 230, 17, 87, 171, 47, 50, 86, 102, 226, 119, 130, 239, 65, 206, 36, 160, 176, 64, 101, 166, 220, 193, 132, 100, 214, 163, 133, 70, 168, 200, 79, 48, 252, 214, 56, 145, 248, 253, 64, 28, 240, 161, 169, 65, 75, 41, 110, 95, 181, 108, 119, 51, 241, 55, 250, 143, 47, 68, 121, 251, 253, 175, 233, 106, 46, 193, 249, 101, 193, 82, 9, 251, 48, 211, 90, 171, 251, 174, 38, 186, 63, 235, 209, 77, 166, 41, 91, 51, 91, 118, 10, 142, 190, 208, 221, 93, 183, 198, 205, 241, 84, 71, 188, 21, 30, 54, 188, 253, 146, 135, 198, 218, 29, 179, 217, 70, 194, 46, 177, 164, 21, 5, 234, 125, 64, 215, 104, 148, 116, 8, 140, 201, 58, 91, 86, 71, 43, 72, 101, 202, 148, 151, 119, 185, 90, 127, 52, 177, 79, 129, 185, 238, 187, 14, 89, 131, 91, 242, 177, 133, 157, 186, 18, 255, 174, 149, 173, 128, 21, 204, 25, 237, 22, 179, 202, 10, 20, 78, 210, 231, 255, 244, 80, 170, 36, 25, 112, 77, 151, 70, 147, 89, 97, 131, 175, 63, 134, 103, 199, 111, 9, 205, 123, 60, 249, 154, 62, 1, 110, 118, 159, 77, 34, 57, 160, 73, 54, 112, 184, 113, 203, 249, 102, 30, 169, 21, 151, 210, 251, 195, 61, 42, 52, 88, 20, 210, 218, 137, 25, 179, 25, 125, 70, 145, 150, 45, 132, 44, 185, 250, 205, 189, 124, 232, 252, 111, 70, 32, 82, 8, 156, 64, 146, 231, 61, 240, 179, 41, 203, 236, 23, 133, 43, 61, 98, 3, 104, 144, 218, 66, 147, 15, 139, 159, 96, 18, 120, 249, 230, 42, 117, 158, 133, 80, 34, 242, 171, 163, 102, 31, 45, 59, 209, 88, 252, 183, 219, 31, 233, 237, 82, 45, 208, 158, 69, 185, 159, 233, 213, 146, 227, 100, 225, 96, 225, 252, 143, 214, 2, 119, 129, 196, 128, 120, 101, 78, 127, 18, 102, 128, 174, 52, 44, 205, 149, 27, 233, 191, 54, 175, 190, 86, 10, 249, 28, 208, 85, 117, 236, 183, 151, 181, 76, 190, 163, 5, 131, 251, 243, 14, 176, 134, 93, 41, 117, 109, 200, 133, 45, 57, 84, 224, 226, 123, 40, 162, 128, 117, 208, 5, 165, 255, 154, 54, 4, 230, 34, 192, 239, 119, 253, 159, 50, 54, 38, 76, 22, 166, 63, 5, 131, 203, 86, 245, 126, 122, 220, 251, 199, 248, 68, 223, 103, 153, 234, 223, 45, 131, 66, 193, 158, 196, 100, 90, 77, 210, 249, 245, 60, 15, 158, 172, 254, 78, 160, 145, 21, 26, 142, 11, 241, 14, 66, 178, 85, 86, 61, 125, 187, 181, 70, 178, 102, 134, 251, 41, 142, 52, 166, 156, 52, 150, 74, 57, 8, 38, 2, 198, 11, 82, 130, 0, 74, 73, 199, 214, 134, 190, 194, 8, 102, 181, 130, 152, 6, 212, 192, 11, 234, 38, 146, 255, 0, 220, 15, 134, 28, 37, 23, 152, 128, 7, 181, 238, 95, 242, 253, 177, 192, 182, 215, 179, 24, 208, 69, 166, 113, 152, 78, 216, 125, 70, 198, 185, 41, 182, 81, 127, 114, 180, 67, 141, 32, 202, 232, 35, 134, 20, 190, 212, 78, 99, 14, 123, 239, 223, 109, 162, 156, 108, 150, 158, 230, 234, 68, 112, 125, 253, 159, 252, 152, 15, 74, 151, 23, 140, 208, 11, 71, 156, 137, 10, 50, 34, 123, 172, 197, 16, 86, 0, 237, 180, 48, 119, 146, 94, 179, 22, 146, 70, 115, 85, 32, 193, 182, 241, 150, 191, 254, 61, 84, 166, 27, 231, 79, 193, 156, 27, 78, 146, 54, 3, 140, 249, 156, 122, 204, 51, 85, 170, 153, 246, 75, 244, 87, 135, 9, 221, 109, 155, 9, 68, 40, 129, 120, 11, 175, 175, 162, 101, 141, 232, 83, 176, 125, 75, 235, 25, 64, 96, 255, 122, 75, 242, 195, 27, 43, 121, 93, 214, 52, 77, 23, 253, 6, 123, 229, 155, 193, 32, 185, 74, 199, 220, 56, 189, 194, 143, 26, 15, 152, 73, 16, 100, 219, 110, 31, 82, 102, 200, 209, 129, 73, 194, 210, 166, 57, 179, 222, 139, 23, 96, 208, 140, 219, 84, 48, 128, 211, 4, 109, 98, 9, 187, 35, 71, 102, 226, 65, 171, 251, 141, 242, 132, 18, 255, 37, 47, 120, 9, 219, 87, 89, 104, 8, 23, 181, 178, 20, 29, 243, 186, 36, 134, 125, 152, 179, 55, 15, 128, 218, 160, 173, 158, 146, 46, 187, 44, 8, 19, 184, 46, 241, 183, 113, 123, 117, 227, 88, 72, 96, 74, 157, 85, 96, 115, 132, 161, 9, 29, 100, 15, 90, 78, 189, 31, 44, 78, 87, 227, 236, 191, 188, 155, 242, 139, 44, 248, 240, 12, 61, 166, 139, 157, 132, 125, 127, 98, 98, 150, 191, 46, 143, 12, 250, 236, 167, 206, 213, 73, 61, 77, 117, 113, 184, 166, 140, 170, 149, 229, 243, 88, 140, 44, 28, 244, 201, 202, 119, 136, 230, 56, 114, 221, 184, 205, 172, 253, 198, 136, 120, 101, 32, 61, 198, 213, 204, 5, 134, 226, 244, 247, 150, 120, 83, 197, 106, 170, 132, 242, 38, 90, 76, 99, 172, 77, 149, 128, 121, 237, 117, 130, 97, 131, 185, 118, 238, 232, 229, 158, 56, 76, 152, 12, 64, 129, 23, 157, 252, 146, 225, 59, 114, 105, 194, 88, 117, 191, 5, 227, 44, 15, 218, 170, 249, 228, 135, 99, 107, 117, 254, 14, 21, 196, 233, 48, 252, 150, 44, 156, 219, 209, 69, 55, 136, 203, 176, 233, 71, 227, 17, 241, 45, 229, 237, 61, 169, 221, 207, 228, 200, 90, 153, 154, 211, 244, 247, 126, 93, 158, 150, 89, 82, 231, 128, 217, 148, 107, 36, 86, 212, 17, 230, 192, 57, 107, 202, 129, 112, 139, 196, 104, 55, 192, 58, 78, 253, 93, 102, 69, 111, 2, 168, 29, 114, 248, 43, 68, 70, 58, 128, 84, 221, 139, 242, 218, 184, 233, 32, 185, 27, 94, 123, 60, 25, 1, 157, 141, 202, 233, 103, 249, 92, 33, 187, 227, 149, 201, 154, 213, 15, 128, 127, 44, 146, 30, 194, 253, 173, 250, 230, 58, 72, 85, 95, 52, 178, 95, 196, 225, 24, 148, 171, 26, 73, 74, 160, 153, 32, 156, 185, 129, 222, 80, 75, 143, 213, 33, 156, 17, 191, 251, 147, 250, 201, 7, 129, 20, 218, 163, 192, 80, 230, 94, 159, 48, 162, 74, 186, 131, 155, 221, 139, 184, 47, 255, 225, 171, 29, 49, 136, 32, 247, 99, 60, 120, 188, 33, 242, 178, 129, 13, 116, 187, 208, 17, 161, 200, 246, 154, 162, 168, 197, 58, 192, 199, 41, 39, 251, 163, 64, 246, 181, 153, 64, 33, 141, 136, 228, 160, 149, 101, 231, 236, 6, 3, 157, 212, 108, 145, 121, 233, 114, 99, 29, 183, 232, 115, 164, 220, 59, 160, 212, 88, 106, 161, 137, 191, 235, 212, 48, 128, 14, 5, 158, 160, 203, 110, 230, 206, 245, 209, 216, 107, 50, 123, 253, 92, 169, 189, 140, 162, 12, 150, 237, 35, 221, 42, 124, 208, 25, 5, 93, 174, 161, 146, 145, 3, 48, 207, 32, 16, 28, 7, 143, 96, 101, 236, 7, 84, 167, 180, 109, 221, 71, 179, 203, 166, 160, 203, 124, 81, 52, 73, 212, 117, 116, 85, 32, 70, 232, 163, 26, 230, 247, 154, 186, 250, 23, 55, 110, 122, 204, 244, 131, 49, 154, 147, 60, 97, 180, 67, 191, 205, 234, 182, 214, 145, 210, 153, 188, 56, 194, 250, 222, 141, 3, 73, 31, 229, 53, 239, 76, 87, 235, 143, 89, 159, 143, 84, 113, 113, 117, 181, 245, 235, 44, 177, 41, 247, 7, 187, 222, 228, 218, 167, 203, 247, 214, 179, 174, 5, 224, 83, 198, 80, 190, 112, 220, 63, 172, 17, 29, 253, 50, 78, 25, 124, 112, 152, 70, 26, 151, 80, 158, 218, 153, 106, 6, 122, 214, 85, 169, 230, 116, 64, 218, 129, 126, 161, 133, 241, 204, 192, 64, 127, 151, 20, 245, 249, 121, 71, 127, 77, 14, 112, 249, 110, 189, 253, 100, 80, 56, 237, 161, 39, 68, 96, 235, 4, 80, 126, 88, 28, 120, 215, 194, 18, 151, 169, 166, 86, 129, 4, 68, 194, 15, 102, 9, 205, 35, 71, 237, 77, 115, 0, 62, 25, 209, 63, 115, 14, 185, 164, 26, 118, 76, 209, 227, 40, 217, 107, 151, 141, 179, 227, 133, 172, 141, 162, 226, 177, 224, 146, 210, 100, 254, 253, 205, 108, 156, 93, 185, 166, 68, 110, 39, 221, 115, 40, 247, 50, 156, 139, 154, 73, 23, 215, 254, 108, 121, 41, 3, 42, 15, 241, 231, 104, 75, 35, 27, 174, 49, 172, 219, 94, 115, 69, 207, 228, 96, 94, 189, 151, 242, 56, 172, 125, 83, 142, 5, 1, 15, 193, 189, 195, 96, 80, 75, 150, 76, 2, 20, 134, 208, 63, 208, 71, 191, 22, 202, 54, 209, 58, 59, 127, 116, 200, 64, 207, 223, 190, 197, 103, 239, 162, 189, 103, 186, 60, 156, 142, 253, 244, 205, 113, 120, 68, 149, 206, 34, 15, 134, 169, 63, 183, 164, 39, 0, 13, 198, 211, 17, 166, 209, 195, 43, 123, 203, 149, 230, 139, 231, 166, 182, 219, 143, 93, 213, 69, 194, 153, 45, 5, 33, 133, 163, 190, 125, 172, 247, 67, 150, 183, 44, 223, 114, 231, 236, 249, 3, 220, 221, 174, 140, 0, 195, 205, 16, 178, 143, 41, 115, 1, 158, 206, 35, 115, 39, 226, 37, 250, 13, 32, 248, 245, 196, 115, 111, 37, 119, 91, 192, 58, 178, 173, 214, 43, 219, 120, 78, 87, 139, 170, 114, 236, 44, 17, 39, 216, 88, 252, 128, 148, 192, 214, 211, 26, 102, 28, 137, 124, 29, 163, 111, 131, 6, 90, 57, 217, 12, 84, 49, 249, 243, 57, 199, 247, 181, 199, 83, 67, 54, 246, 150, 44, 100, 211, 56, 15, 205, 198, 185, 17, 17, 3, 179, 155, 73, 142, 184, 87, 91, 152, 153, 233, 139, 138, 28, 103, 225, 14, 155, 100, 95, 60, 135, 100, 111, 203, 126, 25, 201, 174, 33, 24, 153, 152, 211, 2, 44, 222, 14, 45, 134, 30, 23, 83, 70, 106, 167, 15, 229, 53, 233, 117, 80, 207, 25, 209, 27, 162, 146, 169, 151, 20, 116, 168, 97, 0, 166, 138, 183, 41, 76, 185, 29, 155, 95, 8, 53, 120, 248, 150, 253, 100, 210, 239, 30, 33, 73, 52, 252, 235, 92, 158, 223, 64, 199, 158, 198, 225, 83, 41, 60, 211, 17, 76, 69, 169, 34, 72, 233, 32, 111, 200, 117, 124, 59, 53, 13, 62, 144, 62, 22, 187, 163, 142, 204, 51, 234, 40, 223, 172, 90, 247, 62, 98, 225, 196, 145, 250, 248, 214, 216, 245, 35, 223, 182, 61, 149, 226, 136, 80, 51, 43, 126, 65, 122, 79, 191, 22, 178, 160, 188, 79, 7, 117, 50, 120, 42, 101, 195, 148, 191, 117, 118, 221, 189, 92, 85, 81, 65, 117, 36, 212, 227, 162, 95, 85, 37, 216, 194, 61, 177, 106, 76, 69, 112, 66, 204, 228, 216, 32, 170, 71, 85, 43, 72, 82, 30, 234, 61, 250, 124, 176, 4, 105, 216, 194, 147, 123, 83, 208, 197, 22, 161, 110, 175, 204, 156, 49, 250, 49, 137, 240, 137, 212, 13, 136, 77, 184, 46, 31, 229, 221, 90, 114, 9, 1, 210, 60, 242, 154, 125, 39, 163, 201, 241, 2, 146, 183, 120, 138, 193, 80, 4, 15, 186, 237, 110, 96, 197, 28, 230, 247, 109, 31, 99, 124, 205, 250, 168, 88, 129, 59, 26, 111, 180, 107, 252, 191, 20, 3, 75, 138, 77, 250, 247, 17, 243, 244, 187, 232, 134, 225, 14, 96, 246, 88, 216, 135, 87, 132, 82, 156, 206, 212, 59, 85, 68, 82, 40, 150, 164, 203, 130, 116, 83, 254, 216, 142, 242, 10, 62, 68, 77, 193, 83, 121, 141, 23, 183, 19, 134, 75, 194, 255, 62, 12, 136, 220, 166, 166, 34, 213, 111, 184, 117, 238, 191, 63, 91, 65, 219, 238, 29, 10, 192, 13, 11, 201, 73, 154, 195, 51, 116, 209, 104, 213, 54, 54, 160, 42, 38, 26, 67, 138, 99, 4, 68, 32, 155, 114, 57, 101, 187, 59, 187, 67, 227, 124, 61, 135, 123, 23, 114, 209, 197, 234, 233, 194, 50, 238, 224, 0, 122, 186, 39, 159, 68, 173, 231, 105, 71, 211, 169, 72, 44, 101, 97, 239, 208, 13, 143, 248, 145, 28, 37, 131, 3, 96, 96, 100, 36, 70, 179, 39, 228, 66, 180, 78, 41, 188, 250, 124, 38, 207, 217, 56, 248, 221, 156, 135, 125, 168, 73, 37, 22, 192, 215, 39, 125, 47, 200, 86, 3, 90, 83, 122, 251, 149, 37, 167, 170, 114, 24, 8, 220, 53, 191, 68, 195, 223, 52, 188, 70, 110, 3, 255, 40, 181, 128, 174, 158, 195, 16, 216, 199, 22, 105, 193, 119, 131, 218, 129, 239, 124, 74, 89, 128, 237, 91, 230, 64, 21, 233, 48, 232, 231, 62, 99, 140, 89, 6, 5, 136, 66, 112, 76, 91, 50, 177, 253, 151, 16, 210, 183, 210, 143, 153, 77, 111, 80, 39, 58, 159, 5, 249, 7, 115, 186, 93, 223, 137, 6, 156, 62, 72, 87, 121, 193, 137, 164, 62, 78, 155, 0, 65, 246, 36, 23, 23, 25, 179, 124, 88, 127, 169, 230, 226, 244, 25, 237, 147, 232, 124, 129, 177, 130, 124, 163, 134, 8, 109, 167, 58, 114, 168, 162, 251, 239, 237, 118, 33, 156, 215, 192, 90, 180, 131, 231, 57, 246, 146, 142, 198, 68, 186, 30, 146, 169, 253, 136, 82, 62, 219, 101, 121, 104, 88, 205, 139, 15, 6, 211, 106, 28, 57, 202, 8, 73, 245, 65, 52, 28, 223, 231, 41, 0, 35, 18, 101, 229, 148, 200, 50, 187, 35, 109, 174, 89, 86, 139, 90, 102, 14, 214, 127, 15, 97, 218, 151, 138, 204, 131, 176, 122, 135, 120, 52, 113, 113, 12, 171, 88, 93, 104, 81, 186, 85, 122, 31, 123, 149, 140, 197, 162, 199, 237, 145, 66, 89, 236, 187, 180, 234, 0, 66, 113, 87, 195, 156, 185, 239, 130, 4, 55, 149, 76, 142, 209, 71, 149, 77, 73, 232, 202, 26, 0, 8, 23, 188, 240, 80, 40, 1, 188, 235, 216, 220, 31, 65, 2, 90, 103, 185, 156, 79, 97, 42, 110, 37, 206, 19, 29, 1, 180, 36, 30, 107, 49, 135, 19, 176, 213, 193, 21, 243, 6, 49, 205, 142, 217, 47, 214, 88, 46, 162, 229, 221, 204, 215, 205, 87, 179, 143, 7, 104, 221, 130, 18, 129, 205, 82, 17, 127, 16, 183, 36, 215, 221, 212, 218, 111, 135, 242, 77, 223, 204, 158, 109, 210, 18, 135, 184, 122, 229, 50, 144, 94, 26, 31, 210, 131, 12, 240, 27, 149, 76, 249, 68, 254, 92, 9, 161, 39, 98, 196, 174, 240, 155, 1, 177, 133, 26, 74, 145, 126, 176, 34, 208, 22, 49, 202, 252, 242, 46, 236, 61, 143, 117, 107, 138, 231, 224, 164, 50, 183, 158, 118, 130, 134, 11, 174, 176, 81, 247, 97, 44, 10, 214, 202, 184, 224, 219, 102, 231, 202, 84, 238, 227, 219, 238, 55, 121, 1, 169, 144, 194, 144, 186, 43, 102, 219, 86, 64, 255, 16, 111, 246, 78, 190, 225, 183, 6, 67, 146, 212, 27, 189, 5, 87, 61, 124, 122, 35, 153, 1, 116, 188, 207, 203, 147, 110, 103, 2, 253, 230, 5, 200, 32, 250, 159, 212, 127, 251, 22, 255, 230, 95, 129, 246, 223, 173, 205, 221, 152, 9, 138, 85, 241, 77, 90, 3, 132, 253, 139, 88, 244, 180, 116, 148, 231, 10, 217, 114, 229, 252, 120, 246, 184, 197, 61, 11, 242, 13, 54, 46, 135, 104, 169, 48, 51, 190, 186, 53, 225, 30, 211, 56, 223, 70, 255, 124, 83, 161, 208, 211, 156, 197, 217, 238, 171, 9, 161, 149, 125, 241, 87, 190, 206, 52, 203, 109, 58, 251, 104, 146, 144, 134, 116, 163, 118, 230, 42, 128, 119, 89, 50, 112, 225, 32, 75, 247, 160, 162, 188, 85, 65, 79, 247, 154, 160, 124, 9, 35, 169, 174, 235, 158, 158, 140, 99, 172, 154, 149, 24, 76, 33, 2, 112, 114, 176, 108, 64, 160, 37, 227, 170, 84, 20, 199, 142, 230, 155, 246, 71, 13, 194, 1, 11, 155, 183, 53, 171, 233, 100, 240, 49, 30, 101, 97, 218, 248, 159, 212, 86, 16, 11, 16, 100, 72, 40, 77, 236, 146, 244, 168, 210, 142, 205, 177, 16, 191, 203, 147, 43, 88, 169, 100, 166, 60, 138, 88, 208, 247, 82, 45, 198, 238, 203, 189, 111, 80, 220, 135, 90, 158, 7, 21, 196, 44, 113, 241, 114, 27, 197, 107, 73, 179, 112, 211, 198, 157, 176, 29, 52, 254, 158, 104, 50, 163, 127, 184, 2, 98, 218, 72, 37, 23, 248, 136, 75, 122, 105, 25, 222, 95, 4, 140, 217, 245, 75, 129, 144, 123, 21, 98, 129, 43, 81, 183, 119, 155, 228, 78, 154, 49, 168, 187, 69, 69, 189, 186, 63, 31, 71, 144, 120, 142, 13, 158, 140, 166, 228, 243, 240, 100, 158, 153, 209, 155, 111, 255, 218, 11, 210, 167, 141, 93, 23, 3, 141, 190, 232, 16, 14, 13, 90, 225, 133, 126, 180, 97, 214, 37, 27, 167, 41, 100, 67, 161, 52, 219, 103, 107, 183, 139, 108, 157, 160, 253, 241, 241, 176, 37, 233, 190, 100, 41, 217, 78, 89, 210, 155, 0, 204, 169, 79, 148, 248, 184, 113, 240, 25, 106, 245, 119, 153, 185, 245, 136, 86, 150, 102, 48, 104, 234, 195, 135, 120, 244, 234, 15, 160, 41, 147, 97, 2, 159, 233, 232, 177, 192, 94, 73, 77, 65, 220, 4, 198, 67, 161, 245, 128, 217, 240, 126, 178, 16, 49, 62, 122, 58, 174, 154, 90, 118, 105, 137, 88, 29, 174, 36, 216, 4, 103, 227, 243, 10, 33, 177, 197, 12, 187, 132, 224, 143, 218, 165, 39, 205, 80, 160, 182, 141, 29, 183, 151, 12, 31, 218, 52, 195, 2, 126, 164, 206, 96, 154, 24, 99, 96, 55, 224, 172, 97, 100, 125, 150, 35, 29, 148, 13, 200, 183, 90, 202, 74, 77, 255, 71, 187, 152, 127, 33, 56, 217, 13, 132, 127, 65, 12, 54, 66, 48, 144, 187, 209, 191, 173, 43, 205, 1, 166, 180, 144, 9, 223, 135, 231, 229, 136, 172, 33, 170, 219, 129, 94, 113, 199, 190, 127, 141, 68, 47, 240, 69, 95, 167, 135, 178, 104, 37, 153, 23, 102, 115, 37, 185, 205, 66, 23, 219, 10, 99, 43, 100, 189, 154, 65, 40, 252, 145, 146, 115, 210, 9, 162, 16, 205, 112, 100, 155, 168, 247, 86, 182, 40, 120, 151, 110, 86, 237, 235, 49, 180, 248, 3, 255, 61, 209, 99, 163, 120, 25, 176, 146, 203, 153, 205, 6, 132, 126, 175, 57, 78, 49, 155, 201, 226, 90, 232, 169, 222, 100, 246, 183, 64, 151, 93, 46, 218, 8, 117, 214, 192, 215, 0, 16, 113, 35, 11, 70, 91, 80, 120, 74, 141, 93, 179, 158, 39, 100, 117, 83, 84, 99, 102, 89, 218, 41, 117, 176, 241, 127, 184, 105, 6, 247, 168, 86, 16, 48, 59, 153, 132, 216, 219, 232, 184, 143, 162, 11, 160, 82, 63, 27, 202, 240, 237, 129, 38, 31, 173, 104, 225, 210, 63, 26, 147, 220, 90, 74, 246, 150, 175, 254, 134, 3, 206, 13, 244, 224, 1, 166, 233, 129, 0, 232, 61, 231, 227, 123, 163, 142, 183, 122, 1, 31, 103, 238, 43, 133, 219, 153, 32, 102, 196, 158, 68, 126, 78, 244, 216, 150, 228, 200, 6, 54, 89, 38, 43, 76, 195, 207, 47, 152, 20, 255, 109, 120, 131, 194, 83, 200, 1, 244, 187, 170, 14, 238, 162, 10, 177, 30, 195, 177, 217, 167, 7, 235, 235, 165, 246, 64, 182, 108, 181, 199, 212, 57, 41, 48, 248, 218, 51, 225, 5, 252, 180, 224, 81, 165, 82, 2, 155, 12, 71, 180, 202, 0, 56, 65, 38, 248, 177, 149, 201, 160, 194, 185, 141, 47, 103, 145, 162, 195, 84, 135, 209, 159, 208, 146, 165, 173, 43, 75, 203, 60, 18, 116, 233, 149, 242, 162, 36, 247, 245, 52, 187, 220, 86, 9, 176, 137, 167, 87, 245, 219, 145, 214, 28, 128, 253, 179, 225, 45, 75, 185, 179, 116, 185, 203, 227, 201, 125, 176, 45, 219, 255, 13, 6, 14, 175, 40, 85, 70, 203, 76, 164, 85, 101, 129, 144, 16, 177, 160, 81, 98, 115, 113, 168, 92, 15, 130, 77, 38, 31, 113, 208, 112, 173, 132, 217, 137, 60, 93, 169, 64, 157, 232, 79, 221, 96, 131, 199, 147, 50, 206, 0, 187, 63, 57, 54, 38, 187, 21, 18, 204, 67, 59, 85, 228, 229, 222, 113, 71, 135, 123, 26, 72, 204, 220, 214, 216, 81, 85, 214, 198, 23, 105, 89, 10, 6, 212, 253, 210, 112, 177, 39, 47, 169, 31, 89, 230, 98, 34, 87, 53, 176, 21, 232, 176, 35, 28, 94, 201, 106, 13, 0, 177, 219, 60, 174, 85, 225, 210, 224, 238, 206, 248, 32, 216, 173, 200, 106, 137, 254, 204, 100, 123, 179, 156, 119, 56, 0, 24, 191, 250, 16, 73, 149, 115, 124, 229, 120, 228, 138, 80, 51, 129, 131, 69, 118, 253, 159, 98, 35, 67, 122, 102, 143, 223, 99, 136, 4, 79, 241, 194, 239, 89, 149, 75, 103, 52, 242, 26, 6, 252, 32, 33, 110, 25, 143, 68, 180, 103, 22, 34, 110, 31, 254, 172, 107, 21, 215, 185, 156, 218, 212, 75, 204, 19, 171, 10, 24, 124, 249, 67, 106, 182, 219, 249, 47, 44, 40, 110, 232, 222, 198, 206, 0, 192, 42, 106, 20, 192, 205, 226, 77, 46, 245, 38, 94, 215, 244, 186, 195, 26, 124, 202, 229, 224, 214, 74, 192, 195, 167, 54, 133, 148, 56, 62, 254, 143, 239, 67, 239, 110, 41, 86, 10, 100, 80, 86, 178, 240, 160, 187, 144, 225, 65, 184, 224, 188, 192, 53, 187, 253, 74, 190, 51, 64, 78, 196, 42, 195, 15, 28, 158, 241, 66, 144, 81, 34, 17, 230, 101, 27, 7, 206, 104, 175, 18, 16, 77, 225, 92, 176, 124, 242, 177, 226, 30, 149, 19, 207, 210, 203, 140, 136, 130, 44, 206, 86, 245, 172, 121, 200, 255, 143, 221, 212, 171, 10, 141, 120, 152, 62, 85, 197, 224, 30, 8, 35, 117, 179, 216, 244, 220, 175, 47, 2, 46, 215, 81, 24, 196, 34, 37, 241, 99, 18, 202, 94, 255, 223, 237, 53, 218, 77, 248, 51, 107, 10, 156, 140, 197, 79, 7, 233, 62, 8, 131, 114, 153, 73, 23, 243, 155, 196, 140, 204, 230, 67, 185, 108, 254, 69, 246, 46, 87, 252, 41, 94, 14, 207, 243, 34, 119, 220, 38, 7, 127, 13, 126, 205, 215, 254, 191, 172, 91, 96, 172, 134, 17, 203, 70, 68, 247, 221, 231, 161, 93, 47, 51, 78, 26, 122, 119, 90, 20, 244, 56, 19, 49, 245, 184, 64, 77, 221, 217, 138, 252, 112, 200, 187, 7, 18, 128, 6, 203, 96, 74, 185, 106, 22, 171, 225, 7, 157, 66, 32, 5, 167, 243, 55, 70, 7, 215, 174, 155, 57, 114, 245, 215, 142, 61, 110, 11, 27, 105, 39, 176, 230, 116, 63, 24, 62, 148, 62, 165, 17, 219, 34, 171, 187, 181, 245, 221, 142, 31, 215, 42, 26, 57, 1, 52, 142, 14, 113, 146, 28, 190, 161, 8, 176, 205, 147, 20, 136, 87, 232, 71, 10, 110, 11, 61, 200, 196, 6, 10, 197, 128, 227, 101, 122, 70, 156, 3, 167, 32, 14, 192, 215, 72, 13, 26, 201, 192, 10, 18, 123, 189, 25, 237, 129, 209, 18, 250, 143, 130, 250, 95, 239, 27, 34, 223, 243, 109, 56, 204, 75, 114, 197, 171, 206, 91, 53, 100, 15, 188, 234, 68, 125, 212, 10, 167, 74, 119, 212, 60, 178, 233, 137, 160, 1, 55, 53, 244, 138, 106, 27, 30, 68, 168, 165, 161, 226, 156, 134, 65, 70, 216, 206, 9, 217, 65, 181, 93, 121, 38, 186, 95, 236, 130, 55, 73, 150, 181, 25, 43, 124, 18, 112, 142, 130, 26, 96, 97, 219, 110, 80, 68, 72, 45, 49, 109, 28, 206, 77, 210, 153, 209, 36, 152, 232, 38, 130, 159, 64, 207, 247, 223, 251, 241, 187, 150, 137, 194, 82, 182, 250, 247, 65, 100, 14, 213, 127, 90, 28, 44, 198, 238, 129, 103, 180, 92, 63, 245, 40, 157, 188, 7, 221, 55, 92, 225, 14, 206, 45, 132, 41, 73, 244, 29, 14, 149, 219, 50, 166, 22, 148, 49, 100, 220, 249, 133, 75, 166, 137, 72, 239, 90, 73, 18, 85, 227, 227, 142, 190, 166, 151, 130, 101, 151, 98, 219, 9, 112, 254, 157, 241, 33, 123, 107, 68, 20, 89, 109, 61, 27, 216, 109, 45, 70, 229, 60, 105, 21, 216, 80, 167, 207, 252, 160, 208, 135, 156, 6, 48, 247, 17, 236, 147, 230, 121, 99, 119, 221, 101, 116, 36, 101, 24, 152, 109, 87, 60, 177, 105, 185, 199, 229, 214, 239, 53, 122, 232, 5, 218, 155, 183, 60, 3, 249, 155, 116, 111, 21, 203, 148, 139, 138, 86, 188, 181, 230, 254, 42, 222, 76, 12, 80, 89, 188, 159, 76, 253, 3, 179, 3, 46, 253, 112, 18, 3, 101, 95, 79, 136, 250, 47, 52, 243, 138, 206, 195, 240, 156, 169, 48, 168, 69, 177, 64, 140, 34, 247, 67, 149, 177, 163, 204, 100, 56, 227, 172, 72, 123, 202, 55, 0, 109, 51, 151, 183, 186, 205, 170, 63, 236, 180, 98, 108, 228, 139, 131, 156, 208, 205, 47, 70, 2, 214, 97, 253, 236, 228, 104, 91, 111, 224, 12, 30, 229, 243, 48, 104, 173, 51, 70, 30, 196, 170, 238, 154, 21, 177, 138, 208, 117, 117, 17, 97, 82, 95, 18, 189, 31, 54, 213, 209, 62, 227, 146, 79, 15, 167, 223, 223, 145, 247, 114, 4, 70, 141, 113, 141, 179, 239, 247, 63, 204, 169, 228, 247, 195, 152, 225, 96, 212, 14, 237, 140, 114, 178, 14, 83, 144, 223, 169, 71, 216, 243, 209, 237, 12, 167, 249, 188, 19, 89, 193, 147, 178, 253, 187, 81, 251, 189, 29, 217, 172, 107, 86, 17, 40, 214, 22, 151, 97, 240, 180, 110, 1, 50, 204, 190, 62, 186, 100, 226, 127, 91, 79, 80, 56, 174, 108, 199, 113, 193, 225, 213, 193, 106, 141, 193, 246, 210, 109, 108, 182, 58, 122, 64, 156, 100, 148, 89, 89, 55, 119, 110, 90, 2, 10, 187, 199, 139, 116, 75, 209, 249, 15, 47, 96, 202, 248, 242, 131, 9, 242, 48, 39, 240, 108, 228, 212, 254, 140, 147, 78, 232, 78, 175, 105, 217, 245, 252, 169, 109, 158, 65, 33, 246, 193, 231, 112, 36, 127, 30, 136, 36, 179, 156, 55, 242, 173, 237, 17, 222, 64, 16, 94, 130, 117, 186, 114, 118, 102, 214, 169, 111, 131, 24, 213, 126, 1, 13, 255, 190, 195, 167, 235, 221, 196, 10, 137, 225, 151, 72, 239, 143, 180, 220, 99, 10, 51, 82, 56, 92, 19, 126, 96, 89, 201, 127, 1, 129, 14, 58, 101, 72, 157, 105, 160, 223, 143, 37, 219, 33, 139, 3, 160, 23, 132, 51, 226, 135, 78, 233, 28, 197, 31, 57, 32, 114, 243, 240, 105, 112, 76, 17, 102, 124, 89, 245, 33, 165, 198, 247, 111, 163, 115, 7, 75, 188, 35, 167, 125, 193, 100, 100, 56, 224, 28, 182, 71, 43, 251, 64, 141, 98, 85, 6, 160, 74, 231, 190, 2, 85, 64, 145, 160, 50, 58, 212, 129, 79, 128, 200, 30, 251, 151, 215, 221, 27, 237, 64, 30, 237, 179, 171, 168, 229, 104, 47, 172, 17, 34, 83, 57, 38, 203, 214, 61, 135, 122, 199, 44, 100, 229, 140, 180, 198, 171, 9, 88, 184, 155, 91, 183, 134, 197, 8, 5, 121, 243, 169, 80, 116, 131, 150, 175, 84, 84, 173, 195, 14, 80, 99, 16, 198, 17, 119, 209, 27, 214, 214, 50, 7, 118, 251, 137, 221, 96, 130, 79, 93, 34, 251, 116, 4, 136, 62, 55, 157, 14, 195, 235, 139, 229, 46, 184, 146, 68, 244, 246, 172, 57, 46, 74, 153, 139, 215, 234, 74, 83, 129, 197, 151, 207, 199, 140, 12, 38, 109, 52, 236, 159, 80, 157, 220, 174, 49, 146, 82, 153, 59, 249, 240, 229, 122, 74, 50, 159, 32, 207, 130, 33, 179, 187, 2, 197, 179, 119, 30, 136, 206, 65, 101, 35, 153, 155, 187, 229, 160, 96, 158, 189, 246, 134, 36, 177, 191, 95, 57, 24, 53, 248, 216, 27, 64, 241, 212, 140, 244, 203, 60, 110, 217, 241, 3, 101, 228, 5, 8, 32, 238, 96, 200, 188, 219, 128, 255, 195, 62, 4, 178, 142, 128, 87, 46, 112, 167, 120, 74, 168, 42, 197, 39, 153, 182, 58, 93, 59, 96, 167, 121, 16, 198, 197, 216, 3, 72, 47, 200, 117, 23, 9, 126, 54, 12, 81, 223, 196, 72, 98, 71, 76, 242, 242, 125, 102, 142, 222, 48, 28, 159, 110, 165, 136, 211, 222, 46, 173, 43, 45, 138, 30, 153, 19, 37, 185, 67, 226, 163, 145, 111, 44, 134, 23, 208, 141, 12, 88, 251, 178, 75, 146, 42, 89, 24, 199, 84, 8, 72, 28, 235, 232, 64, 73, 252, 198, 203, 125, 106, 101, 22, 79, 248, 228, 228, 97, 79, 171, 93, 100, 56, 45, 80, 191, 109, 65, 11, 203, 78, 187, 179, 50, 225, 65, 227, 238, 80, 223, 219, 136, 43, 112, 176, 224, 93, 26, 164, 81, 180, 147, 25, 116, 163, 168, 91, 159, 118, 230, 215, 122, 161, 32, 24, 221, 211, 176, 208, 6, 175, 119, 83, 126, 116, 32, 114, 185, 29, 166, 250, 110, 247, 236, 222, 64, 207, 55, 62, 246, 217, 84, 38, 177, 106, 179, 87, 218, 176, 102, 4, 82, 149, 11, 104, 11, 122, 132, 107, 129, 144, 3, 45, 144, 229, 228, 167, 217, 165, 86, 98, 101, 64, 194, 198, 65, 47, 151, 251, 169, 100, 26, 98, 132, 226, 204, 76, 175, 163, 82, 129, 219, 228, 185, 143, 155, 224, 87, 223, 164, 25, 209, 91, 146, 62, 145, 170, 169, 224, 192, 66, 60, 95, 49, 193, 54, 225, 17, 252, 41, 223, 124, 24, 25, 162, 251, 158, 133, 93, 2, 21, 0, 87, 164, 154, 172, 205, 85, 181, 158, 195, 102, 152, 186, 107, 120, 0, 245, 75, 74, 139, 1, 136, 252, 74, 99, 148, 25, 187, 19, 10, 15, 73, 83, 16, 147, 137, 152, 142, 194, 126, 239, 246, 178, 48, 75, 15, 95, 221, 185, 137, 200, 71, 208, 152, 249, 233, 114, 74, 85, 105, 37, 42, 184, 233, 5, 196, 165, 63, 251, 91, 155, 2, 169, 112, 14, 230, 233, 204, 50, 204, 143, 92, 134, 175, 193, 204, 167, 68, 243, 156, 65, 155, 19, 173, 33, 117, 27, 96, 165, 56, 208, 197, 176, 210, 88, 150, 30, 13, 54, 65, 250, 131, 209, 140, 181, 230, 157, 120, 99, 68, 164, 183, 127, 72, 98, 66, 91, 147, 141, 73, 100, 19, 150, 244, 221, 126, 200, 29, 63, 183, 152, 138, 162, 183, 22, 252, 139, 64, 177, 161, 150, 35, 174, 58, 97, 64, 137, 158, 229, 53, 174, 139, 139, 222, 125, 12, 98, 51, 8, 12, 139, 74, 47, 126, 134, 155, 29, 236, 126, 56, 124, 157, 94, 38, 41, 20, 199, 1, 208, 116, 132, 115, 83, 142, 209, 232, 91, 206, 52, 75, 199, 51, 130, 63, 70, 6, 16, 86, 75, 39, 150, 100, 226, 150, 7, 42, 70, 157, 61, 153, 42, 78, 167, 72, 59, 76, 24, 128, 203, 190, 126, 162, 65, 47, 233, 199, 191, 170, 162, 117, 193, 230, 32, 229, 201, 4, 68, 107, 134, 145, 218, 99, 141, 138, 191, 125, 219, 123, 29, 239, 152, 77, 56, 180, 104, 132, 205, 253, 7, 69, 249, 165, 254, 196, 30, 160, 208, 143, 249, 230, 188, 33, 246, 236, 76, 56, 135, 23, 58, 243, 1, 246, 198, 100, 7, 5, 236, 177, 145, 76, 114, 35, 146, 53, 88, 204, 150, 128, 68, 4, 178, 165, 68, 70, 175, 3, 193, 67, 15, 203, 146, 128, 19, 91, 246, 173, 109, 26, 235, 59, 170, 94, 32, 174, 141, 200, 220, 252, 75, 164, 71, 5, 102, 168, 199, 130, 212, 157, 185, 202, 53, 130, 171, 99, 175, 83, 17, 162, 109, 185, 225, 197, 181, 61, 167, 104, 169, 111, 62, 112, 120, 218, 116, 171, 218, 250, 131, 193, 167, 46, 168, 182, 17, 82, 210, 79, 90, 51, 106, 47, 33, 224, 230, 43, 98, 167, 122, 252, 49, 104, 59, 17, 10, 90, 219, 110, 204, 160, 58, 60, 111, 130, 112, 83, 69, 254, 130, 144, 246, 194, 19, 4, 220, 136, 227, 209, 147, 108, 18, 13, 251, 109, 22, 50, 144, 231, 208, 81, 249, 23, 236, 5, 32, 187, 146, 73, 8, 96, 148, 11, 161, 189, 245, 217, 102, 62, 158, 12, 120, 244, 2, 208, 224, 112, 208, 185, 227, 3, 232, 58, 51, 125, 187, 183, 20, 168, 201, 139, 166, 207, 164, 139, 6, 224, 36, 51, 129, 44, 88, 185, 182, 104, 248, 182, 204, 128, 201, 28, 193, 122, 72, 136, 66, 71, 218, 63, 210, 42, 215, 59, 25, 141, 203, 23, 96, 56, 98, 12, 241, 182, 235, 239, 244, 236, 143, 233, 209, 182, 155, 165, 179, 191, 254, 36, 122, 112, 49, 86, 200, 35, 69, 152, 60, 103, 63, 8, 48, 72, 192, 122, 110, 73, 86, 60, 156, 237, 114, 164, 89, 66, 155, 152, 37, 160, 189, 161, 125, 68, 247, 161, 53, 117, 88, 158, 200, 104, 8, 168, 107, 101, 252, 45, 187, 78, 217, 250, 83, 28, 163, 63, 82, 99, 86, 221, 126, 80, 120, 154, 13, 133, 50, 115, 8, 221, 132, 46, 153, 95, 13, 43, 208, 219, 245, 3, 185, 227, 73, 22, 209, 147, 72, 202, 27, 244, 230, 160, 224, 35, 76, 233, 0, 46, 206, 159, 69, 194, 146, 171, 242, 35, 73, 166, 102, 70, 197, 36, 103, 219, 131, 242, 119, 224, 184, 95, 105, 146, 10, 109, 183, 46, 64, 207, 97, 183, 47, 192, 70, 9, 119, 117, 47, 24, 147, 185, 101, 142, 219, 195, 163, 240, 120, 50, 129, 100, 84, 59, 98, 56, 62, 18, 36, 162, 127, 38, 229, 152, 101, 180, 83, 8, 238, 227, 9, 49, 109, 155, 57, 225, 115, 0, 55, 20, 47, 31, 192, 116, 167, 246, 115, 234, 15, 178, 107, 150, 23, 117, 29, 68, 40, 99, 255, 60, 49, 61, 112, 70, 134, 78, 10, 35, 88, 173, 40, 230, 176, 10, 73, 201, 19, 246, 137, 81, 49, 216, 111, 181, 193, 116, 31, 184, 235, 198, 90, 206, 35, 58, 52, 197, 91, 71, 248, 35, 247, 130, 144, 252, 250, 195, 2, 163, 234, 23, 216, 249, 96, 206, 144, 42, 159, 28, 76, 124, 106, 122, 220, 186, 240, 37, 41, 153, 246, 146, 194, 39, 255, 211, 136, 180, 215, 41, 67, 143, 18, 109, 157, 10, 139, 58, 56, 114, 147, 81, 71, 136, 10, 63, 78, 143, 14, 84, 97, 248, 255, 6, 254, 225, 159, 89, 32, 63, 246, 10, 245, 140, 107, 156, 31, 134, 52, 48, 8, 99, 242, 168, 116, 240, 203, 61, 217, 72, 111, 184, 17, 244, 63, 37, 142, 38, 128, 25, 73, 157, 76, 230, 123, 212, 186, 255, 143, 212, 144, 26, 48, 126, 178, 59, 130, 173, 77, 127, 157, 163, 152, 102, 46, 58, 210, 195, 10, 60, 223, 238, 101, 236, 34, 46, 147, 96, 253, 249, 60, 130, 179, 248, 145, 180, 73, 234, 114, 190, 96, 59, 146, 195, 44, 160, 152, 133, 219, 84, 2, 251, 2, 126, 133, 212, 131, 0, 110, 129, 249, 171, 83, 57, 142, 98, 149, 7, 90, 227, 90, 122, 117, 69, 36, 234, 253, 255, 13, 210, 75, 106, 10, 134, 54, 145, 25, 112, 223, 92, 117, 179, 127, 202, 207, 224, 123, 144, 182, 173, 53, 10, 172, 78, 150, 94, 227, 159, 51, 50, 111, 138, 231, 137, 205, 205, 72, 143, 163, 111, 195, 133, 52, 40, 207, 120, 82, 17, 4, 0, 239, 207, 20, 148, 92, 170, 49, 190, 152, 106, 147, 86, 254, 61, 42, 44, 118, 39, 25, 7, 193, 155, 182, 240, 66, 141, 232, 52, 8, 162, 171, 75, 75, 186, 159, 241, 122, 163, 196, 29, 62, 164, 152, 230, 179, 58, 254, 251, 5, 126, 31, 127, 83, 106, 0, 42, 37, 204, 38, 81, 0, 47, 91, 210, 15, 170, 255, 102, 217, 140, 140, 71, 185, 103, 131, 222, 25, 174, 24, 104, 115, 82, 81, 184, 200, 91, 244, 231, 190, 117, 190, 142, 64, 123, 179, 225, 175, 10, 211, 100, 203, 216, 47, 188, 40, 167, 176, 150, 45, 58, 187, 230, 232, 95, 125, 2, 185, 123, 211, 107, 107, 197, 62, 238, 151, 82, 94, 194, 68, 116, 222, 163, 192, 173, 87, 163, 59, 121, 183, 207, 82, 34, 169, 252, 242, 19, 224, 157, 206, 51, 42, 136, 29, 36, 58, 196, 0, 119, 217, 170, 198, 64, 205, 149, 187, 157, 127, 32, 54, 90, 4, 45, 45, 212, 53, 107, 245, 239, 79, 40, 122, 164, 138, 221, 159, 95, 239, 193, 105, 179, 171, 71, 144, 111, 216, 121, 227, 38, 230, 101, 35, 56, 22, 171, 61, 215, 2, 41, 251, 147, 12, 51, 3, 168, 80, 200, 192, 245, 157, 174, 209, 3, 205, 221, 176, 48, 30, 246, 198, 127, 64, 73, 144, 194, 170, 248, 228, 14, 17, 68, 180, 77, 214, 67, 202, 198, 161, 106, 209, 98, 240, 174, 246, 45, 90, 160, 208, 205, 242, 64, 198, 77, 243, 229, 10, 34, 216, 228, 18, 236, 135, 8, 176, 221, 36, 97, 50, 19, 96, 127, 162, 206, 101, 139, 76, 63, 96, 200, 182, 30, 176, 74, 177, 0, 141, 109, 63, 178, 200, 246, 222, 246, 62, 66, 191, 64, 42, 149, 74, 156, 8, 41, 200, 232, 58, 204, 83, 89, 144, 150, 177, 210, 190, 41, 156, 220, 176, 106, 212, 178, 249, 122, 179, 182, 108, 59, 123, 254, 103, 159, 238, 35, 81, 133, 242, 31, 20, 249, 48, 201, 31, 124, 10, 109, 89, 54, 179, 101, 146, 1, 224, 40, 172, 110, 104, 232, 167, 2, 113, 190, 33, 14, 59, 187, 79, 226, 91, 94, 97, 227, 144, 25, 71, 212, 178, 6, 249, 247, 33, 249, 53, 213, 98, 21, 97, 49, 244, 170, 5, 163, 42, 252, 187, 97, 205, 183, 153, 218, 11, 173, 96, 52, 96, 81, 156, 148, 108, 66, 254, 3, 147, 104, 252, 254, 116, 12, 67, 167, 145, 69, 242, 191, 2, 121, 191, 249, 65, 118, 155, 155, 34, 254, 140, 26, 7, 152, 21, 232, 159, 78, 74, 83, 91, 119, 143, 159, 192, 76, 37, 180, 172, 0, 28, 85, 3, 170, 253, 108, 220, 194, 211, 229, 6, 134, 71, 105, 139, 198, 206, 200, 13, 148, 54, 144, 150, 13, 229, 229, 77, 161, 133, 210, 118, 174, 119, 240, 155, 2, 187, 170, 139, 145, 132, 132, 155, 81, 129, 249, 91, 50, 244, 205, 104, 49, 92, 96, 50, 168, 247, 232, 73, 107, 63, 16, 224, 152, 233, 157, 3, 128, 184, 74, 220, 74, 201, 113, 118, 131, 64, 212, 226, 226, 219, 11, 60, 216, 191, 83, 221, 190, 200, 162, 163, 100, 142, 223, 243, 79, 0, 25, 185, 137, 139, 38, 86, 35, 23, 189, 17, 6, 76, 8, 35, 43, 135, 29, 127, 231, 90, 20, 200, 105, 156, 176, 6, 116, 234, 214, 4, 24, 105, 30, 12, 227, 61, 164, 250, 174, 30, 86, 108, 93, 154, 229, 220, 30, 204, 147, 21, 43, 131, 210, 249, 122, 86, 58, 243, 1, 145, 101, 6, 90, 230, 11, 129, 186, 97, 8, 57, 53, 121, 255, 243, 228, 121, 167, 58, 171, 210, 35, 181, 225, 252, 146, 118, 249, 51, 217, 131, 186, 177, 141, 73, 57, 49, 122, 189, 127, 190, 57, 202, 23, 10, 180, 203, 210, 178, 115, 215, 14, 103, 44, 175, 39, 165, 29, 221, 217, 59, 48, 77, 252, 33, 18, 125, 84, 151, 210, 90, 104, 170, 152, 69, 24, 90, 183, 153, 129, 243, 220, 193, 210, 15, 100, 235, 188, 13, 39, 4, 113, 105, 185, 212, 43, 223, 45, 132, 148, 24, 196, 76, 244, 215, 62, 213, 102, 93, 132, 183, 159, 159, 33, 23, 244, 213, 148, 111, 129, 183, 179, 76, 227, 116, 49, 74, 35, 7, 7, 226, 216, 238, 165, 158, 59, 134, 176, 112, 6, 237, 149, 60, 33, 15, 128, 236, 143, 181, 111, 244, 183, 238, 18, 235, 237, 119, 97, 134, 238, 165, 241, 9, 59, 1, 143, 79, 135, 152, 129, 126, 218, 49, 88, 240, 166, 57, 78, 62, 213, 44, 33, 61, 37, 97, 9, 10, 128, 156, 253, 255, 95, 223, 234, 9, 80, 145, 102, 4, 193, 221, 73, 229, 169, 203, 39, 40, 48, 200, 42, 37, 44, 86, 102, 244, 104, 247, 27, 216, 88, 147, 51, 96, 128, 158, 31, 123, 195, 103, 86, 162, 77, 84, 21, 166, 183, 167, 166, 203, 179, 128, 89, 156, 240, 230, 147, 76, 109, 112, 13, 116, 50, 19, 103, 188, 173, 48, 8, 158, 6, 194, 32, 55, 135, 77, 71, 180, 206, 85, 229, 22, 31, 120, 164, 131, 44, 76, 226, 109, 45, 0, 5, 174, 249, 66, 18, 20, 167, 42, 92, 99, 82, 168, 187, 28, 48, 86, 213, 14, 21, 19, 59, 251, 169, 89, 10, 193, 50, 60, 39, 155, 221, 130, 231, 97, 118, 50, 117, 206, 103, 191, 52, 141, 206, 3, 23, 146, 6, 155, 244, 207, 88, 85, 134, 192, 219, 118, 218, 192, 253, 31, 104, 7, 146, 108, 178, 85, 91, 50, 149, 71, 157, 118, 206, 154, 135, 130, 241, 134, 248, 152, 39, 68, 172, 131, 84, 29, 79, 93, 6, 96, 64, 114, 213, 4, 236, 159, 116, 148, 45, 245, 179, 173, 132, 29, 113, 148, 29, 106, 81, 55, 189, 171, 81, 195, 133, 203, 32, 150, 232, 60, 144, 175, 53, 218, 66, 39, 104, 221, 245, 248, 235, 137, 132, 136, 10, 251, 245, 21, 46, 17, 194, 103, 64, 8, 9, 31, 139, 139, 91, 76, 167, 197, 19, 64, 172, 84, 193, 54, 39, 53, 199, 16, 193, 232, 176, 147, 175, 24, 113, 8, 112, 81, 28, 31, 178, 229, 67, 80, 168, 87, 187, 48, 247, 247, 70, 123, 121, 141, 236, 69, 49, 110, 8, 68, 99, 187, 144, 152, 59, 242, 230, 200, 81, 23, 80, 203, 165, 236, 29, 138, 239, 56, 99, 147, 155, 77, 118, 216, 74, 200, 214, 22, 95, 210, 209, 57, 180, 178, 244, 104, 88, 176, 214, 168, 252, 12, 145, 231, 53, 36, 170, 109, 209, 172, 211, 241, 1, 194, 201, 207, 86, 21, 228, 212, 135, 4, 42, 23, 232, 255, 142, 87, 135, 75, 190, 72, 134, 15, 145, 75, 72, 166, 165, 49, 105, 161, 55, 220, 81, 165, 47, 123, 102, 50, 123, 180, 243, 0, 4, 83, 138, 34, 71, 208, 71, 249, 206, 190, 17, 173, 52, 43, 174, 128, 100, 83, 61, 234, 31, 83, 195, 121, 190, 1, 48, 61, 98, 183, 87, 164, 42, 71, 232, 185, 187, 20, 98, 166, 25, 179, 152, 190, 197, 31, 255, 113, 42, 222, 26, 187, 138, 183, 244, 116, 19, 8, 120, 97, 209, 89, 136, 153, 253, 248, 153, 25, 229, 109, 245, 169, 246, 25, 212, 204, 59, 121, 135, 75, 73, 218, 113, 230, 3, 194, 220, 156, 62, 186, 74, 224, 181, 255, 185, 123, 99, 188, 157, 138, 14, 125, 131, 55, 120, 25, 228, 54, 200, 214, 186, 0, 224, 63, 138, 252, 186, 29, 101, 5, 90, 170, 252, 149, 203, 165, 228, 252, 200, 116, 231, 121, 44, 246, 217, 181, 247, 182, 13, 150, 145, 105, 29, 39, 107, 62, 169, 87, 168, 155, 166, 228, 144, 212, 118, 72, 84, 6, 96, 95, 112, 73, 211, 75, 45, 57, 174, 43, 47, 215, 208, 50, 109, 224, 194, 211, 88, 122, 5, 211, 240, 180, 37, 224, 24, 73, 249, 157] + ], + "segmentSize": null + }, + { + "encrypted": [ + [177, 73, 169] + ], + "iv": null, + "key": [126, 207, 254, 60, 117, 133, 129, 182, 174, 178, 143, 192, 91, 168, 32, 183, 141, 234, 35, 154, 179, 35, 197, 78, 214, 159, 231, 158, 227, 56, 173, 84], + "modeOfOperation": "ctr", + "plaintext": [ + [128, 242, 71] + ], + "segmentSize": null + }, + { + "encrypted": [ + [40, 102, 243, 228, 92, 255, 235, 149, 246, 102, 28, 167, 19, 44, 36, 246] + ], + "iv": null, + "key": [77, 205, 156, 30, 11, 111, 122, 212, 77, 184, 214, 61, 125, 81, 108, 247, 223, 241, 15, 206, 168, 83, 42, 119, 28, 177, 222, 20, 12, 34, 30, 187], + "modeOfOperation": "ctr", + "plaintext": [ + [109, 45, 220, 132, 217, 84, 155, 156, 174, 12, 246, 77, 197, 103, 50, 28] + ], + "segmentSize": null + }, + { + "encrypted": [ + [183, 16, 182, 26, 60, 127, 26, 130, 80, 104, 94, 51, 234, 118, 90, 118, 195, 74, 153, 34, 232, 114, 2, 2, 241, 61, 243, 161, 155, 249, 209, 240, 139, 140, 213, 150, 214, 169, 39, 46, 69, 255, 156, 154, 144, 234, 69, 117, 88, 10, 59, 24, 185, 196, 112, 41, 115, 176, 87, 212, 147, 141, 17, 12, 74, 75, 65, 147, 192, 21, 20, 202, 115, 96, 101, 170, 98, 51, 103, 222, 224, 17, 35, 106, 114, 68, 95, 132, 126, 48, 70, 62, 225, 1, 15, 145, 8, 28, 31, 191, 32, 244, 10, 109, 103, 241, 116, 141, 184, 204, 188, 33, 147, 22, 178, 12, 187, 64, 182, 65, 63, 162, 72, 45, 64, 72, 56] + ], + "iv": null, + "key": [32, 109, 182, 14, 168, 50, 116, 13, 193, 67, 239, 195, 99, 141, 58, 149, 248, 4, 170, 131, 160, 5, 31, 61, 160, 75, 181, 147, 201, 124, 228, 29], + "modeOfOperation": "ctr", + "plaintext": [ + [156, 193, 31, 111, 126, 242, 93, 88, 243, 75, 140, 102, 92, 48, 47, 158, 217, 232, 141, 66, 209, 195, 49, 20, 242, 203, 88, 243, 127, 163, 137, 120, 117, 219, 192, 14, 171, 66, 209, 16, 15, 99, 173, 225, 139, 124, 89, 50, 190, 33, 70, 156, 102, 78, 208, 177, 230, 127, 245, 221, 117, 135, 59, 157, 251, 144, 11, 245, 230, 120, 180, 193, 1, 110, 254, 208, 102, 114, 98, 204, 223, 180, 116, 207, 64, 148, 61, 230, 167, 0, 91, 32, 101, 140, 135, 234, 108, 127, 210, 32, 137, 56, 224, 87, 50, 78, 144, 187, 8, 246, 59, 22, 217, 66, 201, 88, 192, 4, 42, 148, 160, 53, 10, 171, 118, 26, 240] + ], + "segmentSize": null + }, + { + "encrypted": [ + [53, 50, 149, 226, 255, 229, 254, 176, 28, 73, 221, 104, 82, 26, 196, 206, 160, 76, 51, 90, 107, 50, 214, 104, 186, 41, 199, 160, 112, 224, 223, 67, 9, 97, 190, 43, 215, 61, 163, 245, 54, 217, 134, 212, 196, 23, 41, 246, 128, 66, 171, 220, 57, 220, 144, 175, 214, 115, 208, 9, 151, 79, 80, 72, 148, 44, 96, 76, 96, 76, 123, 84, 71, 192, 101, 250, 101, 57, 190, 104, 158, 252, 146, 228, 68, 211, 149, 58, 165, 205, 230, 252, 49, 229, 122, 206, 201, 31, 52, 38, 0, 223, 29, 198, 85, 4, 124, 34, 203, 172, 108, 174, 97, 206, 202, 164, 235, 154, 101, 6, 185, 222, 130, 160, 137, 221, 47, 168] + ], + "iv": null, + "key": [75, 224, 65, 54, 17, 203, 209, 79, 96, 194, 221, 119, 211, 245, 103, 91, 141, 122, 155, 219, 208, 246, 202, 56, 167, 65, 68, 20, 160, 57, 177, 230], + "modeOfOperation": "ctr", + "plaintext": [ + [0, 109, 23, 200, 164, 243, 243, 84, 164, 75, 217, 177, 90, 90, 20, 26, 223, 118, 184, 17, 90, 110, 10, 193, 57, 155, 34, 120, 93, 61, 45, 4, 247, 7, 109, 164, 61, 158, 240, 109, 119, 118, 244, 92, 37, 73, 3, 77, 231, 147, 224, 205, 237, 138, 118, 51, 250, 106, 250, 199, 64, 33, 221, 217, 130, 234, 127, 113, 128, 152, 157, 19, 224, 124, 154, 24, 105, 27, 32, 0, 222, 129, 70, 74, 133, 226, 41, 250, 249, 109, 4, 225, 216, 69, 246, 29, 107, 196, 169, 29, 22, 1, 155, 227, 133, 222, 122, 166, 161, 155, 170, 38, 96, 212, 189, 135, 173, 60, 94, 7, 158, 156, 241, 128, 185, 191, 57, 26] + ], + "segmentSize": null + }, + { + "encrypted": [ + [42, 191, 219, 124, 120, 175, 37, 137, 147, 95, 196, 105, 228, 66, 249, 191, 109, 5, 43, 181, 138, 184, 134, 247, 24, 135, 34, 87, 72, 66, 123, 145, 203, 186, 38, 59, 30, 44, 242, 151, 175, 104, 118, 76, 168, 45, 118, 226, 143, 175, 224, 164, 188, 226, 74, 59, 65, 118, 115, 195, 33, 106, 194, 186, 125, 159, 105, 12, 184, 167, 37, 29, 203, 96, 55, 199, 204, 171, 132, 157, 225, 32, 172, 153, 214, 43, 175, 93, 69, 43, 179, 207, 235, 224, 240, 0, 141, 132, 120, 8, 164, 216, 241, 68, 188, 253, 246, 59, 224, 50, 131, 234, 171, 87, 38, 175, 71, 235, 13, 240, 103, 250, 154, 10, 219, 147, 38, 19, 151] + ], + "iv": null, + "key": [92, 180, 22, 224, 122, 19, 57, 67, 58, 29, 241, 178, 65, 90, 78, 192, 191, 195, 205, 134, 116, 26, 252, 92, 64, 132, 84, 233, 5, 185, 104, 224], + "modeOfOperation": "ctr", + "plaintext": [ + [141, 211, 109, 47, 152, 14, 96, 46, 203, 217, 177, 179, 237, 117, 92, 0, 136, 200, 53, 62, 230, 12, 95, 60, 76, 38, 74, 11, 206, 65, 26, 60, 64, 57, 1, 144, 224, 195, 104, 88, 156, 203, 136, 241, 181, 222, 145, 155, 235, 23, 164, 183, 116, 196, 206, 149, 254, 103, 204, 90, 5, 95, 149, 198, 83, 116, 190, 14, 241, 6, 108, 200, 14, 101, 86, 13, 168, 24, 15, 178, 232, 2, 56, 210, 156, 159, 254, 204, 227, 95, 42, 93, 206, 220, 33, 4, 76, 231, 13, 208, 73, 210, 196, 226, 209, 107, 111, 156, 150, 125, 67, 26, 244, 168, 68, 61, 245, 209, 206, 25, 108, 196, 176, 244, 93, 145, 230, 10, 54] + ], + "segmentSize": null + }, + { + "encrypted": [ + [180, 113, 101, 84, 91, 241, 11, 137, 243, 108, 237, 206, 142, 116, 34, 225, 114, 148, 10, 99, 125, 171, 75, 206, 244, 52, 235, 108, 233, 205, 88, 170, 74, 242, 241, 72, 241, 121, 126, 121, 37, 57, 252, 198, 218, 0, 255, 131, 51, 182, 22, 14, 9, 197, 16, 28, 52, 134, 60, 162, 221, 137, 248, 236, 6, 43, 20, 67, 94, 57, 93, 172, 105, 205, 212, 142, 53, 234, 251, 132, 177, 18, 181, 198, 163, 140, 235, 110, 12, 149, 130, 121, 104, 12, 194, 204, 47, 32, 179, 161, 76, 175, 73, 247, 36, 187, 22, 238, 96, 199, 238, 75, 254, 63, 207, 87, 122, 112, 72, 190, 231, 46, 189, 119, 251, 161, 152, 80, 230, 133, 110, 30, 75, 26, 166, 41, 98, 243, 219, 13, 225, 25, 21, 245, 128, 231, 63, 1, 183, 252, 251, 152, 253, 24, 92, 223, 142, 153, 32, 20, 9, 208, 117, 151, 207, 77, 75, 198, 217, 116, 202, 162, 165, 223, 124, 29, 176, 36, 9, 210, 169, 157, 156, 99, 45, 145, 185, 79, 3, 190, 54, 196, 78, 150, 218, 67, 26, 182, 150, 236, 37, 212, 53, 129, 219, 8, 222, 171, 87, 201, 38, 150, 7, 188, 61, 109, 97, 153, 167, 158, 114, 206, 34, 99, 100, 191, 65, 131, 196, 139, 184, 151, 112, 235, 196, 248, 52, 254, 42, 220, 16, 208, 226, 57, 198, 78, 52, 11, 21, 217, 55, 190, 197, 37, 254, 232, 78, 62, 132, 27, 131, 36, 108, 227, 16, 20, 124, 112, 48, 125, 179, 194, 188, 166, 152, 67, 241, 244, 48, 58, 114, 75, 112, 119, 28, 236, 78, 17, 102, 137, 235, 209, 129, 97, 238, 57, 237, 146, 246, 26, 43, 114, 146, 120, 119, 30, 128, 176, 98, 202, 184, 25, 99, 185, 200, 140, 68, 42, 232, 106, 195, 34, 234, 88, 142, 190, 72, 62, 87, 17, 52, 110, 149, 155, 10, 82, 159, 53, 78, 226, 200, 168, 137, 3, 130, 254, 161, 195, 80, 141, 28, 5, 119, 61, 243, 31, 191, 77, 135, 199, 249, 56, 97, 21, 73, 85, 191, 58, 215, 165, 89, 76, 167, 203, 48, 240, 19, 111, 159, 210, 213, 33, 72, 133, 120, 89, 76, 115, 181, 119, 83, 254, 119, 96, 36, 192, 56, 189, 47, 12, 167, 214, 83, 130, 70, 43, 83, 232, 1, 92, 158, 26, 69, 111, 138, 161, 185, 154, 253, 10, 64, 246, 168, 48, 100, 206, 84, 207, 64, 69, 101, 135, 49, 1, 99, 173, 15, 79, 185, 171, 185, 1, 218, 128, 156, 25, 84, 231, 187, 24, 184, 104, 39, 183, 147, 87, 19, 49, 77, 13, 9, 7, 109, 133, 105, 136, 95, 210, 46, 153, 248, 113, 227, 142, 254, 209, 219, 245, 242, 2, 40, 73, 225, 80, 190, 25, 72, 4, 199, 153, 169, 144, 60, 15, 126, 154, 187, 254, 124, 119, 110, 32, 171, 25, 47, 48, 102, 179, 164, 199, 171, 80, 61, 183, 201, 40, 41, 217, 65, 139, 239, 33, 3, 20, 133, 15, 64, 126, 131, 57, 249, 110, 243, 131, 212, 127, 234, 100, 98, 180, 165, 80, 35, 168, 143, 39, 59, 115, 183, 25, 121, 84, 116, 101, 230, 228, 20, 94, 27, 242, 105, 227, 24, 35, 29, 13, 132, 227, 63, 162, 30, 29, 224, 152, 222, 59, 17, 28, 109, 206, 114, 203, 188, 222, 106, 183, 121, 126, 71, 165, 210, 249, 64, 141, 81, 168, 139, 178, 23, 168, 37, 83, 110, 83, 13, 89, 233, 250, 104, 214, 201, 196, 197, 165, 53, 30, 89, 198, 204, 178, 195, 156, 103, 145, 126, 147, 66, 89, 132, 9, 228, 152, 53, 101, 41, 198, 160, 145, 136, 164, 130, 200, 199, 62, 92, 238, 43, 64, 106, 79, 34, 232, 133, 95, 77, 169, 244, 233, 199, 45, 223, 187, 108, 40, 156, 52, 24, 216, 136, 170, 187, 231, 173, 147, 29, 233, 103, 154, 57, 88, 199, 13, 88, 122, 139, 206, 96, 133, 139, 142, 72, 67, 132, 36, 174, 244, 192, 39, 252, 157, 218, 145, 119, 126, 22, 160, 119, 2, 167, 150, 33, 92, 155, 46, 62, 151, 223, 45, 136, 23, 6, 201, 227, 137, 134, 243, 222, 237, 54, 29, 195, 183, 151, 184, 35, 30, 196, 251, 41, 174, 242, 146, 80, 121, 58, 135, 94, 164, 119, 239, 169, 201, 175, 112, 163, 123, 202, 192, 198, 228, 125, 142, 166, 179, 194, 40, 158, 97, 0, 162, 214, 24, 165, 25, 52, 154, 129, 111, 12, 131, 187, 139, 136, 60, 27, 81, 240, 198, 146, 118, 192, 73, 197, 234, 4, 149, 30, 83, 18, 227, 217, 16, 59, 28, 221, 214, 55, 142, 122, 139, 100, 1, 23, 60, 131, 196, 53, 134, 88, 2, 97, 67, 232, 224, 102, 9, 53, 254, 138, 47, 174, 135, 120, 44, 189, 209, 178, 15, 222, 137, 219, 200, 96, 181, 162, 58, 171, 241, 170, 221, 50, 153, 80, 103, 193, 158, 44, 141, 230, 254, 150, 105, 185, 27, 139, 213, 222, 251, 116, 113, 126, 19, 169, 58, 217, 82, 9, 241, 1, 83, 200, 5, 6, 247, 140, 200, 114, 217, 133, 84, 123, 134, 255, 12, 203, 175, 60, 132, 163, 195, 115, 234, 169, 99, 222, 200, 133, 187, 53, 79, 157, 124, 79, 199, 129, 123, 158, 241, 41, 132, 33, 12, 79, 81, 233, 96, 55, 154, 80, 28, 127, 30, 131, 211, 188, 178, 167, 21, 73, 27, 47, 22, 172, 103, 6, 106, 194, 49, 254, 111, 93, 211, 119, 41, 21, 171, 89, 142, 163, 106, 166, 233, 46, 190, 167, 172, 233, 254, 109, 193, 77, 10, 251, 20, 219, 183, 52, 40, 142, 252, 235, 140, 193, 189, 254, 187, 26, 100, 213, 51, 36, 234, 233, 58, 128, 57, 122, 217, 152, 160, 177, 108, 227, 179, 112, 151, 209, 8, 105, 13, 178, 250, 171, 116, 131, 220, 18, 250, 195, 195, 209, 206, 232, 19, 173, 202, 81, 60, 128, 128, 243, 116, 121, 214, 231, 107, 68, 219, 240, 194, 99, 133, 157, 223, 190, 70, 166, 217, 197, 56, 157, 236, 208, 119, 8, 169, 242, 62, 254, 55, 250, 255, 200, 39, 70, 134, 192, 63, 148, 177, 224, 94, 94, 127, 220, 69, 25, 244, 67, 207, 162, 254, 222, 197, 59, 24, 17, 66, 98, 173, 4, 225, 207, 236, 0, 215, 7, 234, 64, 128, 180, 90, 79, 25, 111, 217, 15, 191, 239, 61, 13, 90, 80, 11, 126, 213, 236, 34, 188, 58, 89, 202, 196, 93, 33, 126, 125, 180, 78, 39, 172, 54, 77, 64, 155, 185, 46, 52, 158, 126, 248, 227, 112, 213, 62, 179, 239, 99, 154, 84, 26, 46, 109, 112, 30, 52, 72, 202, 191, 146, 246, 100, 76, 43, 124, 162, 136, 154, 233, 240, 28, 75, 21, 227, 60, 1, 132, 251, 154, 109, 141, 126, 13, 49, 226, 73, 222, 54, 82, 65, 207, 155, 89, 51, 189, 56, 100, 255, 168, 163, 154, 106, 108, 207, 116, 64, 242, 107, 21, 91, 86, 143, 175, 226, 64, 87, 29, 111, 212, 44, 128, 126, 88, 88, 103, 137, 175, 224, 142, 92, 169, 193, 78, 191, 117, 39, 141, 153, 30, 101, 114, 26, 128, 33, 211, 240, 146, 126, 111, 88, 39, 203, 240, 3, 107, 43, 142, 152, 2, 49, 220, 113, 189, 100, 33, 254, 253, 208, 155, 46, 173, 151, 85, 193, 72, 156, 26, 10, 226, 15, 168, 172, 32, 31, 117, 31, 81, 91, 114, 212, 93, 6, 59, 198, 124, 254, 16, 56, 56, 162, 197, 249, 122, 128, 21, 28, 253, 93, 62, 19, 234, 159, 80, 23, 209, 39, 175, 161, 97, 198, 50, 226, 126, 46, 148, 163, 255, 51, 54, 234, 228, 49, 149, 245, 92, 187, 0, 37, 9, 111, 107, 210, 139, 137, 253, 185, 216, 92, 12, 10, 226, 171, 78, 53, 21, 207, 29, 49, 223, 58, 50, 248, 175, 10, 230, 174, 173, 145, 71, 152, 165, 202, 174, 90, 84, 11, 181, 28, 48, 60, 124, 210, 239, 218, 133, 200, 143, 59, 127, 31, 103, 55, 162, 13, 192, 228, 47, 175, 107, 124, 33, 45, 58, 39, 99, 175, 90, 10, 69, 82, 114, 136, 103, 37, 173, 2, 106, 225, 196, 26, 30, 168, 83, 10, 25, 151, 67, 49, 136, 159, 13, 70, 69, 9, 225, 161, 211, 71, 150, 219, 199, 49, 163, 195, 252, 83, 230, 20, 224, 43, 166, 13, 102, 215, 154, 211, 112, 56, 43, 10, 202, 225, 180, 63, 107, 35, 160, 118, 121, 149, 125, 128, 76, 121, 225, 143, 75, 78, 54, 204, 162, 155, 1, 128, 244, 252, 216, 2, 8, 196, 49, 45, 23, 105, 234, 152, 213, 34, 145, 174], + [111, 225, 255, 48, 4, 138, 147, 238, 238, 126, 75, 82, 179, 74, 191, 202, 9, 164, 252, 5, 103, 207, 215, 174, 217, 161, 247, 200, 209, 88, 39, 239, 163, 51, 190, 122, 44, 252, 216, 116, 106, 251, 187, 70, 13, 79, 162, 91, 204, 141, 195, 107, 101, 99, 160, 70, 249, 212, 65, 187, 92, 50, 20, 130, 29, 120, 101, 5, 79, 204, 43, 139, 80, 44, 7, 98, 216, 186, 221, 151, 107, 222, 165, 17, 45, 71, 112, 98, 60, 109, 127, 90, 17, 201, 231, 38, 33, 106, 59, 151, 18, 184, 38, 78, 190, 153, 139, 76, 164, 2, 217, 203, 124, 248, 234, 60, 66, 33, 32, 8, 161, 152, 180, 142, 216, 110, 54, 250, 159, 209, 110, 47, 142, 172, 19, 118, 214, 192, 85, 248, 99, 28, 0, 177, 231, 208, 89, 118, 99, 182, 179, 97, 96, 178, 250, 18, 100, 186, 16, 220, 58, 177, 85, 104, 21, 42, 186, 38, 112, 58, 171, 103, 252, 99, 116, 83, 209, 202, 29, 239, 173, 54, 71, 223, 118, 13, 141, 71, 147, 39, 2, 48, 35, 60, 104, 119, 7, 215, 79, 209, 84, 155, 53, 153, 110, 207, 65, 28, 176, 82, 208, 212, 186, 200, 28, 160, 175, 69, 12, 165, 95, 38, 221, 250, 189, 103, 48, 15, 109, 119, 131, 207, 133, 12, 151, 221, 25, 233, 153, 168, 15, 134, 53, 208, 117, 186, 64, 88, 42, 163, 140, 202, 151, 35, 124, 219, 4, 135, 97, 156, 11, 156, 67, 161, 12, 203, 35, 202, 203, 247, 35, 85, 61, 102, 184, 126, 130, 234, 93, 197, 119, 225, 112, 240, 124, 167, 94, 112, 36, 162, 128, 5, 62, 43, 50, 220, 146, 51, 52, 207, 156, 113, 120, 1, 201, 45, 23, 215, 130, 100, 178, 169, 96, 115, 32, 80, 187, 1, 45, 103, 110, 70, 22, 140, 146, 212, 88, 58, 148, 167, 41, 170, 149, 154, 202, 117, 195, 146, 181, 82, 199, 255, 37, 81, 149, 244, 142, 43, 239, 50, 163, 17, 149, 133, 248, 219, 125, 114, 8, 249, 81, 76, 80, 63, 26, 208, 205, 192, 31, 151, 60, 245, 178, 125, 17, 74, 44, 150, 51, 200, 42, 38, 244, 38, 74, 11, 182, 253, 68, 87, 197, 97, 136, 176, 8, 14, 97, 138, 246, 238, 121, 6, 147, 81, 131, 113, 140, 122, 206, 214, 251, 99, 239, 191, 235, 194, 81, 115, 152, 34, 210, 215, 56, 222, 71, 156, 48, 148, 136, 38, 29, 246, 176, 214, 213, 147, 209, 88, 122, 42, 50, 92, 126, 189, 60, 99, 52, 113, 216, 24, 70, 69, 193, 199, 178, 29, 118, 5, 98, 247, 14, 95, 40, 181, 22, 253, 148, 153, 224, 14, 10, 113, 165, 32, 4, 68, 40, 160, 176, 57, 166, 60, 65, 215, 149, 156, 162, 100, 35, 176, 33, 199, 115, 255, 236, 60, 160, 15, 89, 95, 155, 130, 248, 55, 75, 29, 47, 1, 25, 161, 251, 122, 14, 50, 37, 48, 173, 66, 217, 22, 16, 4, 191, 159, 3, 45, 198, 223, 82, 193, 191, 6, 190, 72, 157, 19, 175, 208, 38, 20, 10, 169, 126, 146, 241, 83, 197, 253, 157, 228, 170, 126, 134, 43, 230, 60, 206, 87, 37, 96, 68, 18, 126, 136, 222, 83, 99, 100, 109, 86, 67, 152, 159, 63, 250, 189, 246, 130, 255, 36, 128, 153, 32, 126, 135, 123, 0, 11, 230, 221, 86, 241, 181, 37, 249, 12, 158, 216, 10, 222, 35, 123, 121, 185, 8, 235, 206, 51, 60, 58, 39, 97, 92, 6, 132, 140, 81, 254, 239, 187, 212, 159, 160, 156, 181, 214, 78, 239, 58, 48, 200, 229, 204, 137, 32, 31, 177, 76, 31, 213, 30, 50, 135, 211, 15, 239, 201, 183, 107, 59, 203, 32, 136, 110, 76, 21, 166, 220, 185, 181, 190, 150, 182, 30, 222, 10, 198, 146, 100, 104, 78, 39, 50, 192, 158, 158, 133, 139, 110, 169, 20, 223, 54, 255, 150, 97, 254, 160, 150, 185, 164, 26, 197, 144, 254, 183, 236, 25, 189, 227, 19, 28, 74, 130, 86, 52, 80, 196, 243, 60, 82, 50, 54, 89, 110, 166, 242, 40, 26, 68, 123, 241, 196, 126, 156, 94, 131, 158, 95, 78, 64, 0, 49, 123, 81, 168, 73, 222, 129, 200, 245, 235, 87, 37, 82, 155, 175, 23, 200, 236, 240, 91, 178, 37, 174, 164, 235, 236, 115, 55, 20, 250, 173, 185, 126, 106, 122, 119, 113, 189, 9, 32, 219, 123, 68, 159, 35, 201, 28, 250, 44, 39, 36, 60, 159, 101, 210, 11, 115, 237, 224, 83, 187, 147, 138, 126, 255, 152, 170, 161, 124, 111, 211, 231, 119, 44, 86, 112, 82, 236, 181, 122, 223, 9, 167, 122, 48, 215, 53, 118, 49, 91, 174, 95, 53, 243, 37, 224, 241, 156, 156, 188, 221, 228, 25, 176, 136, 153, 254, 11, 58, 190, 52, 12, 139, 42, 25, 149, 150, 46, 187, 116, 173, 214, 99, 92, 0, 24, 61, 3, 96, 141, 181, 130, 54, 238, 42, 113, 161, 91, 113, 65, 10, 238, 129, 161, 187, 202, 45, 54, 222, 135, 189, 157, 219, 85, 216, 150, 226, 93, 165, 212, 33, 88, 82, 139, 43, 246, 214, 253, 154, 160, 85, 31, 250, 51, 84, 10, 17, 67, 13, 202, 23, 126, 46, 196, 156, 212, 227, 244, 206, 61, 199, 140, 47, 248, 166, 138, 97, 6, 21, 78, 112, 33, 253, 12, 135, 89, 72, 255, 8, 29, 125, 246, 168, 182, 28, 212, 242, 40, 41, 217, 225, 221, 30, 200, 196, 154, 94, 30, 117, 219, 100, 108, 32, 151, 39, 75, 29, 18, 4, 79, 67, 176, 64, 27, 135, 22, 117, 90, 154, 80, 212, 156, 29, 18, 190, 196, 8, 25, 245, 237, 119, 72, 156, 28, 232, 0, 122, 57, 214, 14, 17, 97, 241, 122, 171, 16, 121, 176, 232, 119, 1, 204, 109, 89, 252, 146, 166, 127, 16, 230, 236, 226, 2, 62, 147, 106, 127, 147, 228, 19, 99, 60, 244, 110, 142, 68, 226, 187, 4, 92, 92, 206, 151, 227, 195, 204, 89, 74, 150, 166, 25, 112, 192, 56, 199, 129, 221, 243, 68, 63, 106, 251, 211, 124, 5, 246, 174, 136, 164, 200, 131, 50, 8, 67, 2, 150, 59, 193, 211, 223, 110, 68, 16, 52, 178, 156, 191, 197, 186, 252, 175, 162, 146, 162, 4, 186, 215, 33, 8, 69, 7, 167, 93, 90, 132, 169, 162, 200, 54, 244, 250, 222, 226, 103, 252, 148, 167, 222, 209, 102, 232, 179, 13, 103, 127, 175, 14, 223, 107, 182, 82, 180, 89, 164, 92, 90, 154, 193, 66, 167, 255, 95, 195, 166, 216, 100, 232, 88, 108, 111, 252, 206, 189, 20, 217, 156, 94, 163, 71, 144, 67, 175, 110, 4, 183, 87, 105, 164, 174, 132, 191, 227, 3, 176, 168, 152, 218, 89, 210, 134, 163, 2, 87, 142, 230, 140, 211, 186, 129, 222, 36, 243, 95, 38, 128, 198, 254, 138, 14, 254, 3, 177, 132, 239, 74, 106, 183, 247, 60, 39, 142, 239, 41, 151, 174, 161, 125, 142, 248, 126, 204, 207, 93, 17, 12, 10, 148, 4, 226, 25, 28, 24, 191, 7, 1, 235, 155, 93, 36, 163, 22, 11, 249, 34, 59, 182, 162, 9, 218, 42, 112, 175, 114, 146, 5, 13, 68, 131, 137, 239, 9, 8, 193, 45, 123, 129, 7, 199, 230, 209, 253, 218, 244, 138, 18, 158, 111, 79, 72, 248, 145, 186, 59, 79, 0, 161, 49, 54, 75, 216, 127, 39, 150, 112, 190, 109, 156, 90, 206, 21, 7, 126, 151, 62, 131, 87, 53, 141, 41, 246, 105, 205, 111, 133, 17, 25, 207, 108, 46, 112, 126, 45, 17, 59, 226, 204, 234, 231, 156, 12, 43, 222, 223, 162, 7, 221, 164, 29, 247, 140, 169, 154, 251, 89, 5, 42, 10, 5, 103, 170, 89, 69, 228, 19, 180, 7, 10, 169, 96, 150, 219, 81, 96, 50, 184, 14, 124, 215, 94, 248, 249, 129, 42, 149, 250, 167, 84, 95, 245, 92, 156, 103, 48, 35, 76, 79, 5, 19, 133, 183, 219, 179, 143, 103, 19, 211, 223, 71, 144, 135, 110, 249, 67, 44, 250, 226, 169, 83, 232, 78, 126, 86, 72, 11, 48, 136, 1, 192, 111, 187, 130, 39, 242, 67, 76, 228, 134, 88, 247, 155, 40, 100, 143, 237, 15, 229, 239, 63, 216, 73, 246, 12, 69, 202, 56, 54, 132, 223, 88, 199, 229, 97, 97, 105, 202, 226, 157, 136, 208, 201, 168, 14, 93, 155, 131, 221, 24, 245, 235, 112, 85, 46, 39, 102, 184, 27, 58, 86, 66, 50, 68, 168, 23, 252, 14, 190, 23, 22, 40, 194, 92, 181, 139, 17, 184, 149, 7, 201], + [117, 105, 67, 98, 110, 12, 21, 66, 26, 72, 208, 245, 223, 174, 124, 205, 33, 103, 191, 77, 40, 199, 228, 133, 149, 119, 128, 218, 171, 211, 231, 162, 176, 187, 115, 56, 226, 116, 61, 232, 12, 18, 134, 30, 185, 124, 112, 139, 230, 20, 72, 92, 184, 165, 166, 34, 121, 195, 135, 5, 229, 31, 149, 197, 14, 126, 164, 245, 16, 6, 112, 28, 110, 169, 74, 181, 17, 250, 121, 28, 136, 57, 17, 126, 155, 2, 21, 180, 111, 143, 78, 205, 1, 254, 249, 214, 110, 103, 66, 49, 232, 153, 86, 51, 222, 217, 212, 168, 204, 13, 122, 208, 83, 252, 71, 233, 117, 238, 199, 212, 103, 9, 94, 46, 37, 142, 123, 239, 247, 192, 97, 4, 158, 162, 35, 150, 152, 17, 99, 79, 243, 105, 250, 192, 122, 30, 79, 49, 220, 244, 186, 216, 27, 240, 112, 16, 222, 92, 153, 116, 238, 49, 209, 78, 72, 176, 160, 163, 50, 241, 29, 118, 172, 58, 219, 207, 10, 187, 199, 125, 61, 128, 113, 220, 6, 252, 9, 170, 39, 65, 235, 112, 24, 189, 85, 113, 65, 241, 181, 175, 222, 105, 70, 222, 233, 62, 226, 240, 13, 109, 206, 16, 89, 73, 223, 248, 66, 117, 156, 237, 62, 179, 104, 144, 142, 214, 171, 53, 162, 13, 192, 155, 106, 78, 173, 11, 190, 164, 126, 78, 150, 9, 176, 230, 148, 55, 194, 162, 31, 107, 222, 140, 23, 83, 143, 204, 24, 254, 231, 17, 161, 14, 93, 196, 88, 235, 219, 41, 232, 19, 232, 212, 35, 104, 82, 207, 207, 85, 233, 229, 198, 94, 66, 226, 15, 103, 224, 17, 239, 246, 188, 47, 180, 254, 234, 108, 22, 160, 227, 57, 123, 59, 230, 126, 116, 32, 71, 126, 116, 138, 157, 106, 106, 46, 138, 124, 49, 54, 148, 78, 188, 49, 31, 26, 121, 69, 80, 47, 156, 8, 126, 217, 54, 34, 54, 135, 90, 220, 152, 186, 234, 254, 114, 157, 124, 172, 154, 133, 179, 248, 171, 121, 190, 145, 23, 154, 241, 202, 192, 236, 104, 160, 113, 82, 250, 48, 85, 188, 203, 250, 189, 139, 134, 81, 255, 61, 182, 119, 93, 5, 25, 69, 128, 146, 20, 254, 155, 23, 181, 1, 117, 147, 80, 32, 112, 88, 11, 172, 27, 165, 195, 184, 0, 216, 195, 18, 216, 182, 205, 203, 29, 228, 207, 165, 105, 195, 147, 6, 138, 74, 131, 138, 213, 69, 209, 136, 166, 71, 160, 137, 39, 173, 231, 57, 68, 51, 79, 134, 153, 203, 73, 245, 218, 66, 194, 174, 57, 112, 104, 142, 14, 107, 246, 160, 255, 59, 131, 1, 200, 89, 88, 176, 87, 233, 35, 229, 45, 70, 107, 36, 73, 2, 103, 39, 154, 143, 175, 118, 127, 172, 1, 22, 151, 144, 219, 128, 218, 154, 133, 164, 44, 189, 168, 115, 115, 75, 241, 201, 170, 90, 59, 255, 7, 15, 97, 33, 181, 102, 121, 120, 183, 21, 18, 62, 70, 112, 124, 244, 137, 211, 39, 38, 144, 144, 206, 154, 238, 36, 44, 204, 167, 184, 108, 90, 178, 10, 243, 196, 59, 38, 13, 34, 42, 220, 148, 29, 18, 116, 206, 195, 214, 0, 150, 172, 67, 15, 213, 252, 201, 136, 210, 178, 222, 225, 244, 83, 220, 137, 46, 144, 27, 248, 135, 224, 155, 53, 131, 132, 36, 188, 78, 48, 54, 79, 182, 1, 159, 103, 21, 4, 15, 177, 125, 153, 144, 104, 163, 158, 225, 38, 53, 182, 77, 123, 66, 221, 130, 123, 66, 152, 192, 172, 2, 19, 252, 81, 100, 157, 42, 96, 103, 30, 121, 39, 8, 93, 138, 199, 251, 110, 211, 165, 69, 65, 122, 154, 154, 239, 238, 90, 89, 122, 184, 217, 160, 126, 117, 156, 94, 198, 38, 235, 177, 36, 170, 157, 202, 54, 121, 213, 48, 200, 44, 122, 17, 211, 207, 73, 152, 28, 246, 202, 41, 104, 83, 28, 205, 114, 249, 62, 217, 236, 12, 58, 143, 226, 60, 249, 191, 128, 52, 49, 139, 198, 94, 247, 118, 207, 20, 150, 180, 102, 62, 218, 186, 97, 203, 34, 37, 234, 59, 62, 73, 253, 52, 105, 90, 214, 144, 146, 76, 209, 141, 6, 91, 45, 160, 54, 152, 71, 247, 237, 86, 41, 199, 77, 210, 124, 1, 172, 150, 245, 203, 62, 48, 228, 150, 248, 25, 33, 9, 3, 186, 148, 4, 210, 18, 22, 62, 135, 159, 135, 174, 37, 98, 10, 152, 237, 69, 242, 86, 7, 169, 220, 224, 7, 36, 173, 51, 81, 101, 71, 211, 53, 250, 94, 233, 81, 25, 240, 43, 30, 44, 83, 48, 221, 121, 187, 65, 101, 222, 92, 57, 36, 106, 22, 41, 242, 48, 161, 72, 100, 38, 215, 171, 235, 134, 231, 6, 245, 24, 226, 204, 5, 129, 234, 178, 189, 66, 119, 149, 176, 31, 114, 230, 251, 59, 46, 45, 57, 108, 51, 51, 56, 171, 99, 85, 143, 50, 125, 199, 103, 137, 124, 250, 162, 182, 40, 54, 12, 111, 176, 67, 231, 134, 201, 133, 181, 141, 62, 187, 72, 148, 201, 54, 59, 43, 24, 4, 50, 104, 177, 235, 180, 158, 7, 126, 68, 190, 1, 168, 17, 98, 240, 104, 233, 249, 200, 119, 14, 252, 31, 123, 187, 50, 235, 13, 4, 42, 201, 161, 177, 158, 138, 148, 248, 55, 254, 60, 139, 24, 61, 55, 215, 239, 93, 163, 237, 227, 106, 94, 147, 225, 166, 56, 40, 75, 225, 167, 226, 22, 94, 202, 89, 17, 101, 102, 241, 89, 66, 103, 230, 0, 35, 67, 145, 145, 84, 189, 9, 204, 214, 40, 123, 29, 148, 193, 179, 237, 99, 214, 1, 205, 22, 51, 226, 228, 7, 237, 238, 102, 22, 155, 126, 118, 21, 44, 196, 237, 113, 178, 52, 66, 27, 197, 150, 60, 12, 234, 65, 121, 53, 162, 120, 109, 67, 33, 143, 69, 34, 146, 236, 2, 2, 35, 109, 81, 237, 100, 133, 25, 75, 16, 7, 200, 23, 153, 32, 236, 75, 113, 176, 254, 87, 239, 175, 166, 155, 54, 169, 218, 148, 7, 20, 94, 85, 118, 47, 252, 115, 172, 97, 139, 253, 225, 154, 182, 119, 234, 72, 93, 152, 88, 200, 204, 243, 203, 2, 136, 88, 18, 78, 104, 140, 97, 72, 238, 82, 112, 32, 232, 135, 149, 174, 78, 62, 14, 118, 176, 67, 235, 143, 124, 201, 51, 238, 84, 103, 207, 21, 91, 101, 165, 10, 152, 16, 131, 212, 249, 107, 1, 216, 246, 206, 233, 243, 87, 243, 148, 2, 47, 99, 29, 96, 245, 151, 162, 57, 101, 167, 112, 135, 13, 111, 89, 114, 138, 208, 57, 108, 12, 156, 142, 110, 53, 98, 64, 201, 189, 187, 166, 204, 102, 149, 233, 213, 124, 193, 250, 231, 34, 146, 239, 127, 120, 184, 133, 7, 134, 117, 200, 3, 149, 246, 203, 68, 191, 44, 135, 156, 228, 49, 113, 236, 52, 201, 200, 244, 15, 168, 226, 76, 55, 220, 168, 162, 187, 240, 120, 146, 71, 13, 197, 158, 102, 218, 55, 237, 49, 103, 15, 250, 121, 67, 0, 2, 95, 197, 214, 228, 233, 207, 158, 44, 156, 30, 234, 239, 189, 137, 40, 224, 131, 41, 133, 210, 147, 8, 129, 179, 252, 120, 123, 218, 146, 142, 180, 222, 224, 35, 40, 91, 154, 4, 149, 220, 237, 185, 230, 196, 161, 224, 30, 226, 10, 172, 161, 92, 69, 151, 73, 255, 157, 197, 139, 5, 220, 125, 169, 136, 122, 71, 164, 85, 120, 111, 80, 50, 77, 64, 130, 116, 163, 177, 153, 140, 233, 36, 234, 214, 41, 3, 171, 12, 202, 171, 179, 220, 127, 183, 63, 176, 76, 129, 208, 106, 7, 254, 166, 220, 0, 182, 92, 82, 108, 176, 123, 28, 30, 2, 173, 32, 151, 20, 33, 242, 252, 114, 126, 17, 22, 152, 42, 132, 67, 207, 24, 22, 72, 242, 28, 65, 112, 72, 18, 226, 64, 160, 11, 44, 202, 183, 147, 32, 186, 104, 163, 51, 211, 191, 72, 209, 59, 250, 219, 63, 221, 87, 21, 221, 2, 56, 194, 63, 142, 118, 238, 168, 21, 212, 48, 72, 167, 248, 71, 179, 29, 226, 143, 103, 113, 228, 39, 218, 11, 148, 124, 102, 37, 82, 130, 67, 147, 55, 146, 30, 249, 57, 18, 180, 48, 242, 37, 212, 168, 134, 192, 85, 226, 4, 148, 145, 159, 7, 182, 70, 3, 228, 122, 84, 189, 147, 111, 144, 124, 27, 105, 187, 0, 239, 29, 250, 165, 196, 40, 123, 195, 35, 106, 83, 15, 93, 52, 69, 5, 188, 217, 133, 173, 111, 239, 154, 77, 122, 94, 151, 110, 17, 168, 192, 9, 45, 229, 248, 37, 43, 29, 223, 231, 149, 54, 20, 151, 189, 122, 209, 155, 104, 244, 38], + [147, 107, 3, 67, 236, 5, 14, 153, 149, 229, 103, 113, 70, 82, 56, 4, 184, 61, 14, 60, 41, 107, 3, 162, 228, 97, 32, 27, 253, 214, 99, 67, 48, 168, 227, 6, 240, 102, 144, 69, 26, 176, 187, 45, 163, 140, 98, 86, 11, 234, 119, 31, 103, 145, 163, 243, 54, 194, 39, 128, 26, 44, 249, 6, 252, 123, 114, 13, 225, 97, 104, 122, 233, 98, 97, 54, 171, 249, 17, 107, 2, 165, 86, 138, 174, 238, 218, 26, 81, 8, 197, 61, 174, 54, 221, 31, 78, 241, 199, 0, 218, 49, 123, 10, 177, 103, 109, 32, 62, 33, 17, 16, 206, 172, 186, 196, 90, 252, 239, 27, 5, 61, 51, 151, 17, 72, 55, 248, 150, 53, 15, 152, 11, 18, 84, 30, 46, 108, 202, 182, 107, 34, 37, 154, 9, 16, 210, 154, 102, 19, 201, 166, 74, 214, 59, 236, 230, 171, 211, 3, 74, 110, 61, 173, 234, 82, 30, 168, 65, 187, 33, 170, 184, 142, 55, 9, 169, 77, 192, 204, 162, 90, 44, 69, 140, 13, 106, 131, 176, 57, 139, 64, 184, 76, 200, 37, 166, 136, 120, 6, 10, 232, 206, 89, 134, 58, 228, 51, 168, 91, 144, 241, 180, 203, 28, 51, 229, 180, 67, 94, 6, 39, 98, 248, 181, 227, 246, 34, 40, 77, 128, 221, 32, 138, 28, 59, 63, 78, 48, 33, 7, 229, 234, 230, 65, 209, 139, 119, 69, 232, 109, 54, 92, 210, 66, 74, 219, 160, 194, 247, 57, 241, 91, 36, 36, 233, 249, 245, 182, 198, 123, 109, 12, 188, 218, 131, 165, 200, 50, 99, 249, 136, 241, 68, 17, 25, 176, 141, 222, 61, 152, 154, 59, 115, 185, 233, 154, 121, 136, 121, 47, 106, 55, 135, 240, 114, 222, 92, 222, 199, 70, 100, 185, 206, 188, 56, 118, 114, 52, 171, 224, 155, 99, 101, 4, 42, 150, 56, 204, 214, 80, 129, 43, 246, 20, 32, 168, 45, 144, 239, 68, 201, 88, 179, 153, 174, 220, 152, 80, 183, 123, 17, 135, 238, 49, 230, 40, 152, 242, 38, 94, 223, 132, 106, 106, 255, 54, 202, 59, 35, 101, 226, 76, 226, 150, 57, 158, 133, 246, 170, 79, 180, 87, 129, 223, 16, 41, 37, 150, 73, 136, 65, 61, 235, 210, 152, 184, 99, 107, 25, 95, 65, 143, 89, 210, 225, 80, 71, 128, 4, 23, 155, 33, 49, 122, 160, 207, 172, 37, 243, 251, 107, 59, 115, 237, 148, 146, 175, 23, 138, 62, 245, 27, 96, 213, 60, 154, 143, 233, 127, 19, 246, 22, 132, 222, 122, 145, 97, 140, 231, 206, 233, 68, 173, 184, 190, 247, 239, 54, 39, 185, 60, 127, 103, 207, 0, 161, 212, 0, 108, 165, 42, 184, 40, 155, 117, 233, 165, 26, 75, 204, 2, 209, 248, 255, 127, 28, 135, 93, 229, 230, 239, 76, 206, 224, 251, 173, 57, 142, 61, 5, 6, 136, 66, 130, 38, 31, 59, 127, 179, 174, 187, 144, 171, 254, 71, 130, 84, 130, 176, 148, 178, 247, 145, 232, 151, 111, 148, 17, 18, 236, 57, 127, 162, 94, 17, 79, 131, 189, 251, 196, 255, 222, 12, 146, 71, 197, 8, 22, 48, 202, 4, 199, 196, 153, 94, 201, 183, 170, 206, 114, 241, 243, 55, 251, 97, 218, 40, 6, 175, 179, 38, 193, 160, 118, 229, 230, 89, 47, 90, 253, 163, 105, 191, 75, 236, 198, 132, 61, 228, 121, 78, 77, 113, 103, 34, 193, 1, 118, 24, 203, 151, 224, 154, 77, 55, 121, 68, 163, 154, 105, 233, 58, 193, 187, 192, 211, 63, 44, 64, 211, 160, 175, 68, 119, 103, 96, 5, 26, 133, 190, 80, 118, 59, 255, 149, 37, 201, 203, 239, 107, 222, 123, 184, 162, 73, 83, 11, 1, 136, 66, 28, 214, 68, 31, 219, 18, 206, 172, 112, 6, 210, 136, 104, 215, 242, 87, 133, 53, 21, 91, 58, 184, 252, 199, 181, 87, 82, 188, 2, 29, 8, 161, 13, 200, 65, 249, 138, 73, 122, 27, 216, 54, 236, 155, 4, 124, 26, 196, 163, 252, 124, 223, 36, 87, 122, 14, 228, 80, 218, 236, 51, 38, 85, 63, 100, 251, 171, 137, 53, 169, 250, 45, 8, 108, 132, 20, 224, 63, 29, 206, 243, 160, 34, 185, 191, 47, 199, 200, 196, 151, 44, 233, 237, 89, 11, 72, 65, 98, 168, 108, 31, 7, 246, 56, 108, 166, 174, 128, 89, 145, 95, 181, 234, 84, 8, 98, 155, 40, 151, 213, 201, 248, 192, 234, 28, 103, 144, 10, 211, 3, 74, 165, 93, 107, 234, 3, 34, 194, 165, 162, 209, 108, 81, 21, 49, 6, 144, 39, 176, 44, 66, 216, 107, 223, 184, 201, 167, 195, 81, 67, 171, 32, 32, 30, 80, 20, 0, 235, 82, 134, 244, 238, 73, 62, 120, 104, 111, 246, 92, 246, 109, 239, 59, 234, 159, 10, 250, 138, 202, 217, 63, 177, 78, 104, 27, 86, 143, 5, 202, 151, 239, 39, 71, 164, 211, 166, 133, 70, 128, 151, 39, 153, 193, 232, 76, 35, 192, 19, 18, 26, 161, 63, 97, 3, 42, 189, 133, 28, 4, 222, 36, 36, 202, 134, 81, 135, 121, 55, 121, 56, 178, 21, 170, 220, 134, 203, 171, 226, 107, 216, 63, 183, 206, 47, 76, 149, 250, 143, 100, 75, 110, 2, 81, 98, 15, 22, 135, 242, 69, 138, 196, 71, 119, 193, 55, 194, 175, 203, 141, 124, 67, 225, 242, 56, 20, 192, 40, 97, 198, 161, 67, 37, 110, 72, 39, 5, 143, 157, 233, 193, 86, 190, 144, 192, 32, 134, 107, 107, 125, 230, 149, 15, 73, 223, 87, 142, 102, 13, 173, 230, 77, 142, 34, 214, 116, 61, 49, 109, 154, 188, 164, 79, 249, 183, 187, 102, 89, 217, 16, 7, 184, 95, 52, 85, 121, 186, 109, 39, 205, 248, 226, 149, 136, 168, 247, 51, 197, 27, 144, 122, 122, 239, 80, 31, 241, 196, 219, 168, 23, 74, 189, 239, 140, 191, 123, 53, 142, 61, 238, 193, 36, 19, 145, 132, 162, 247, 180, 187, 70, 202, 120, 21, 180, 15, 100, 25, 177, 142, 160, 198, 247, 26, 125, 120, 179, 208, 129, 54, 206, 50, 12, 216, 37, 158, 6, 126, 118, 107, 21, 155, 34, 215, 81, 215, 25, 50, 26, 54, 146, 161, 72, 2, 43, 156, 48, 100, 140, 112, 21, 94, 218, 24, 190, 33, 184, 71, 61, 111, 192, 234, 254, 48, 77, 84, 40, 82, 31, 233, 16, 157, 16, 146, 117, 212, 227, 173, 237, 134, 187, 48, 6, 192, 39, 75, 192, 128, 202, 37, 168, 166, 202, 241, 169, 144, 121, 227, 224, 146, 74, 222, 73, 16, 174, 94, 69, 86, 220, 122, 138, 96, 66, 204, 208, 8, 225, 169, 13, 19, 37, 177, 2, 3, 190, 249, 161, 108, 228, 225, 155, 225, 66, 42, 137, 102, 156, 169, 49, 246, 29, 11, 206, 92, 249, 159, 134, 12, 156, 162, 129, 225, 250, 120, 224, 145, 239, 59, 72, 105, 62, 105, 148, 251, 247, 171, 67, 121, 49, 63, 191, 158, 153, 208, 38, 109, 15, 75, 248, 67, 244, 128, 114, 127, 122, 62, 51, 216, 248, 83, 54, 76, 78, 224, 155, 28, 65, 217, 251, 238, 244, 117, 227, 181, 204, 232, 243, 41, 163, 177, 248, 68, 197, 59, 10, 105, 247, 211, 183, 185, 207, 135, 240, 18, 252, 46, 251, 10, 38, 181, 135, 21, 162, 211, 109, 14, 230, 234, 21, 112, 40, 8, 153, 184, 32, 72, 88, 155, 185, 216, 90, 234, 99, 51, 163, 254, 187, 96, 23, 203, 189, 18, 71, 66, 237, 30, 140, 160, 188, 65, 71, 215, 150, 198, 175, 23, 140, 169, 117, 255, 13, 146, 52, 221, 44, 189, 47, 79, 105, 174, 74, 188, 34, 219, 59, 67, 97, 18, 154, 61, 89, 121, 227, 209, 120, 192, 26, 16, 64, 34, 47, 148, 6, 225, 236, 214, 183, 229, 250, 133, 117, 5, 184, 232, 107, 181, 70, 180, 79, 128, 30, 43, 93, 107, 249, 23, 52, 234, 21, 47, 170, 155, 194, 99, 233, 126, 41, 56, 191, 191, 60, 97, 174, 8, 16, 216, 56, 89, 73, 228, 194, 76, 241, 142, 146, 41, 21, 60, 72, 240, 114, 211, 72, 180, 140, 60, 203, 181, 97, 246, 135, 53, 57, 165, 227, 191, 128, 75, 151, 104, 29, 41, 124, 112, 102, 199, 117, 204, 123, 28, 152, 44, 254, 34, 220, 157, 146, 141, 138, 214, 161, 76, 52, 201, 224, 143, 137, 219, 34, 220, 171, 147, 61, 228, 12, 93, 149, 41, 225, 60, 25, 89, 164, 71, 215, 179, 27, 172, 52, 33, 125, 48, 53, 186, 103, 158, 127, 231, 176, 12, 197, 108, 152, 10, 45, 135, 68, 124, 160, 233, 123], + [145, 176, 173, 221, 206, 52, 92, 252, 245, 226, 0, 50, 19, 159, 254, 27, 218, 44, 143, 61, 50, 71, 191, 142, 24, 103, 49, 70, 79, 146, 135, 23, 254, 108, 31, 196, 164, 145, 206, 112, 194, 204, 34, 124, 187, 7, 176, 74, 136, 52, 129, 55, 20, 18, 221, 29, 116, 48, 49, 37, 77, 2, 101, 93, 209, 142, 115, 130, 220, 178, 20, 117, 39, 93, 134, 90, 109, 103, 208, 222, 157, 78, 86, 215, 143, 188, 147, 48, 169, 177, 42, 4, 252, 39, 225, 98, 162, 1, 238, 129, 38, 156, 52, 211, 171, 106, 83, 132, 56, 38, 7, 195, 9, 38, 141, 140, 31, 110, 252, 93, 34, 61, 144, 28, 156, 186, 15, 182, 40, 19, 36, 187, 60, 68, 240, 244, 188, 111, 107, 50, 120, 23, 80, 118, 113, 1, 224, 188, 184, 198, 196, 86, 152, 115, 115, 172, 142, 133, 24, 93, 69, 181, 232, 72, 208, 226, 29, 58, 74, 45, 6, 49, 102, 21, 228, 176, 163, 36, 15, 26, 191, 33, 122, 212, 37, 119, 100, 188, 169, 252, 188, 10, 230, 215, 194, 207, 134, 150, 119, 111, 45, 12, 12, 32, 22, 37, 165, 38, 238, 139, 119, 68, 74, 214, 130, 171, 72, 167, 50, 178, 1, 231, 240, 37, 36, 228, 78, 247, 152, 54, 6, 123, 250, 183, 97, 54, 77, 121, 12, 132, 171, 51, 8, 107, 157, 27, 102, 83, 5, 70, 251, 150, 23, 156, 15, 83, 105, 157, 164, 200, 247, 190, 50, 201, 6, 238, 81, 131, 203, 232, 199, 105, 119, 136, 160, 70, 113, 255, 242, 3, 117, 169, 102, 220, 23, 26, 165, 95, 58, 108, 119, 245, 233, 210, 85, 217, 160, 13, 106, 249, 228, 147, 45, 89, 156, 36, 203, 8, 133, 226, 221, 96, 193, 169, 210, 54, 90, 67, 249, 122, 244, 52, 233, 47, 252, 203, 127, 71, 194, 157, 251, 228, 252, 134, 70, 45, 181, 199, 100, 234, 41, 246, 8, 45, 67, 203, 235, 178, 23, 179, 189, 49, 119, 158, 180, 215, 22, 245, 175, 154, 177, 36, 55, 48, 97, 189, 107, 126, 227, 203, 158, 189, 93, 157, 10, 37, 95, 112, 33, 24, 164, 183, 228, 114, 59, 121, 163, 205, 110, 255, 111, 176, 120, 122, 157, 173, 160, 138, 68, 102, 50, 102, 21, 220, 198, 30, 204, 170, 116, 188, 62, 23, 185, 130, 215, 178, 223, 61, 104, 225, 104, 157, 5, 102, 82, 46, 201, 96, 0, 200, 18, 76, 116, 251, 152, 106, 211, 157, 65, 113, 15, 124, 66, 212, 80, 23, 219, 93, 25, 196, 60, 118, 200, 69, 66, 33, 72, 132, 243, 66, 16, 126, 232, 161, 80, 140, 109, 160, 171, 96, 195, 112, 18, 248, 8, 176, 20, 253, 73, 243, 36, 189, 28, 22, 84, 54, 13, 134, 11, 27, 57, 94, 2, 78, 212, 175, 5, 178, 244, 206, 203, 37, 52, 138, 152, 74, 23, 69, 57, 6, 135, 80, 188, 15, 20, 132, 204, 112, 128, 189, 24, 133, 68, 157, 75, 34, 59, 183, 216, 59, 116, 87, 243, 88, 173, 197, 255, 79, 255, 159, 178, 68, 184, 135, 96, 198, 8, 184, 82, 126, 193, 28, 169, 134, 101, 80, 76, 122, 163, 213, 154, 250, 35, 39, 61, 55, 60, 65, 221, 76, 165, 94, 13, 66, 137, 89, 236, 155, 137, 148, 211, 63, 45, 230, 77, 2, 152, 160, 190, 242, 195, 72, 43, 96, 255, 44, 49, 134, 9, 64, 44, 90, 146, 40, 84, 8, 172, 144, 231, 26, 44, 69, 216, 126, 158, 17, 8, 29, 111, 128, 133, 121, 10, 123, 201, 7, 127, 168, 128, 8, 23, 84, 25, 107, 246, 70, 180, 181, 239, 104, 10, 118, 85, 143, 121, 181, 44, 32, 86, 132, 14, 79, 221, 43, 95, 49, 64, 76, 93, 84, 152, 136, 86, 126, 175, 177, 90, 106, 177, 150, 225, 94, 103, 114, 41, 254, 100, 141, 216, 243, 210, 87, 221, 39, 249, 153, 67, 109, 37, 233, 102, 219, 99, 90, 245, 222, 12, 105, 136, 84, 111, 21, 30, 184, 27, 127, 218, 8, 21, 171, 165, 196, 109, 224, 234, 189, 130, 74, 238, 253, 27, 16, 93, 42, 113, 27, 13, 104, 152, 201, 31, 251, 38, 1, 206, 121, 151, 102, 87, 115, 197, 116, 161, 242, 135, 252, 79, 62, 163, 204, 247, 115, 130, 34, 38, 74, 16, 191, 48, 204, 212, 205, 241, 207, 195, 105, 239, 243, 184, 120, 3, 199, 130, 148, 29, 246, 150, 153, 197, 49, 228, 9, 253, 117, 212, 233, 101, 97, 198, 54, 50, 125, 87, 81, 12, 211, 185, 193, 151, 37, 156, 195, 110, 232, 104, 88, 122, 114, 113, 34, 10, 35, 210, 204, 200, 225, 112, 114, 189, 205, 78, 40, 22, 5, 228, 38, 189, 43, 139, 88, 131, 222, 104, 251, 250, 37, 4, 20, 67, 160, 94, 130, 60, 89, 140, 165, 39, 163, 70, 118, 120, 225, 61, 15, 78, 102, 38, 128, 232, 144, 124, 152, 54, 102, 17, 23, 26, 187, 188, 100, 124, 10, 143, 130, 94, 89, 81, 66, 105, 234, 150, 71, 69, 149, 138, 232, 16, 17, 179, 254, 70, 202, 175, 247, 141, 132, 106, 96, 107, 200, 153, 129, 14, 141, 252, 251, 7, 51, 23, 241, 18, 132, 158, 41, 159, 29, 89, 172, 158, 116, 46, 170, 209, 126, 43, 148, 78, 184, 142, 197, 167, 127, 223, 204, 203, 242, 125, 155, 150, 23, 132, 52, 97, 221, 6, 102, 123, 56, 199, 162, 223, 42, 237, 17, 93, 229, 54, 235, 100, 227, 123, 209, 13, 131, 78, 2, 241, 42, 45, 131, 109, 159, 139, 45, 39, 241, 223, 199, 248, 97, 0, 205, 221, 156, 192, 213, 16, 196, 28, 252, 187, 163, 36, 59, 163, 107, 52, 31, 146, 136, 39, 99, 175, 99, 30, 200, 27, 185, 73, 148, 39, 6, 40, 68, 132, 117, 53, 31, 192, 31, 113, 162, 192, 75, 41, 52, 7, 77, 99, 142, 221, 42, 155, 225, 107, 1, 111, 27, 114, 252, 109, 125, 202, 38, 237, 4, 141, 143, 50, 190, 252, 128, 100, 235, 152, 240, 174, 101, 112, 170, 116, 186, 176, 114, 77, 51, 211, 161, 137, 15, 177, 10, 146, 246, 158, 7, 64, 214, 92, 178, 37, 87, 184, 30, 80, 223, 29, 48, 197, 171, 195, 156, 119, 53, 253, 29, 40, 230, 75, 149, 243, 27, 234, 122, 176, 5, 115, 24, 219, 47, 33, 177, 158, 58, 107, 247, 102, 175, 95, 201, 150, 126, 73, 247, 51, 222, 237, 51, 214, 239, 206, 105, 63, 72, 230, 53, 248, 70, 142, 224, 202, 222, 53, 21, 204, 181, 100, 170, 21, 232, 72, 80, 52, 143, 62, 161, 198, 241, 240, 8, 100, 226, 156, 233, 97, 9, 247, 92, 70, 39, 170, 182, 22, 179, 229, 157, 132, 4, 40, 23, 161, 56, 213, 152, 65, 58, 161, 8, 39, 43, 111, 107, 237, 224, 239, 8, 205, 71, 193, 188, 203, 25, 113, 240, 38, 165, 166, 136, 72, 130, 47, 169, 46, 193, 110, 129, 20, 1, 137, 194, 138, 13, 169, 77, 152, 225, 197, 131, 213, 147, 85, 63, 171, 142, 169, 13, 30, 148, 165, 21, 151, 219, 73, 203, 58, 77, 33, 206, 101, 140, 149, 131, 99, 115, 173, 177, 141, 70, 229, 154, 13, 189, 249, 107, 150, 225, 161, 97, 21, 86, 23, 142, 225, 123, 185, 223, 143, 221, 210, 166, 39, 213, 220, 179, 175, 26, 25, 48, 112, 115, 149, 118, 137, 29, 190, 189, 195, 251, 243, 161, 171, 27, 103, 22, 225, 96, 79, 192, 98, 183, 8, 68, 79, 199, 173, 144, 131, 215, 127, 43, 40, 185, 62, 124, 139, 185, 196, 141, 82, 35, 120, 99, 215, 207, 180, 248, 6, 105, 215, 13, 118, 93, 254, 225, 178, 195, 246, 211, 35, 190, 32, 109, 8, 160, 85, 235, 100, 251, 193, 96, 104, 127, 8, 205, 171, 223, 247, 210, 130, 65, 117, 122, 105, 152, 128, 229, 249, 56, 49, 254, 245, 93, 82, 107, 60, 178, 48, 64, 28, 31, 189, 39, 188, 49, 122, 42, 201, 94, 232, 202, 170, 7, 208, 10, 251, 37, 13, 63, 4, 240, 211, 107, 254, 114, 255, 11, 142, 180, 204, 154, 67, 187, 25, 136, 253, 166, 28, 155, 25, 108, 90, 216, 248, 121, 50, 6, 248, 114, 153, 162, 57, 134, 93, 135, 42, 231, 147, 201, 22, 82, 251, 13, 231, 55, 236, 108, 250, 27, 130, 80, 49, 113, 6, 103, 75, 107, 202, 36, 193, 61, 206, 51, 90, 241, 112, 139, 18, 138, 159, 179, 158, 66, 13, 99, 239, 195, 235, 240, 210, 104, 163, 50, 249, 124, 29, 81, 88, 7, 157, 163], + [176, 211, 241, 224, 247, 224, 197, 87, 186, 55, 155, 63, 82, 118, 60, 217, 72, 203, 24, 89, 80, 114, 193, 49, 177, 162, 98, 148, 133, 241, 87, 64, 155, 182, 208, 82, 220, 188, 24, 47, 211, 67, 110, 181, 116, 237, 85, 69, 132, 244, 56, 204, 225, 41, 217, 186, 178, 248, 255, 43, 132, 6, 127, 180, 186, 26, 102, 229, 217, 181, 3, 186, 101, 102, 230, 185, 176, 2, 91, 227, 99, 53, 89, 161, 18, 223, 45, 136, 99, 125, 48, 113, 30, 48, 47, 18, 86, 16, 175, 88, 191, 123, 244, 95, 177, 176, 47, 233, 147, 198, 228, 132, 171, 2, 120, 118, 235, 178, 47, 73, 183, 197, 185, 206, 54, 52, 26, 179, 146, 92, 22, 241, 118, 14, 254, 57, 108, 243, 61, 44, 31, 190, 218, 93, 56, 17, 48, 172, 50, 3, 164, 1, 181, 248, 158, 185, 182, 38, 111, 250, 28, 67, 122, 227, 28, 59, 150, 89, 120, 148, 95, 151, 37, 234, 122, 245, 162, 221, 182, 177, 212, 22, 56, 4, 120, 12, 129, 116, 157, 13, 50, 45, 82, 93, 102, 20, 2, 213, 190, 1, 77, 211, 96, 180, 94, 71, 229, 27, 239, 59, 236, 133, 30, 105, 104, 141, 179, 158, 36, 45, 102, 58, 179, 137, 76, 53, 156, 141, 130, 74, 11, 246, 100, 15, 127, 146, 88, 16, 161, 191, 61, 200, 46, 217, 74, 236, 28, 232, 104, 142, 246, 8, 119, 143, 64, 181, 124, 114, 229, 147, 105, 246, 66, 53, 200, 15, 251, 36, 139, 171, 10, 56, 54, 60, 241, 82, 228, 36, 204, 89, 188, 90, 91, 156, 234, 66, 65, 239, 59, 145, 98, 10, 45, 62, 117, 64, 98, 237, 166, 53, 134, 61, 132, 68, 143, 20, 35, 134, 110, 196, 26, 1, 19, 205, 28, 77, 211, 165, 28, 208, 125, 5, 87, 226, 73, 65, 252, 48, 76, 33, 159, 175, 121, 17, 109, 161, 91, 32, 254, 131, 90, 154, 144, 193, 13, 138, 62, 235, 233, 162, 128, 211, 46, 217, 86, 150, 133, 126, 170, 42, 160, 43, 176, 104, 166, 127, 71, 5, 227, 216, 130, 107, 109, 108, 148, 35, 233, 178, 221, 184, 206, 74, 192, 102, 137, 208, 236, 237, 97, 187, 45, 195, 194, 30, 233, 178, 195, 198, 21, 160, 110, 242, 63, 48, 87, 143, 116, 117, 228, 20, 104, 104, 196, 159, 48, 138, 19, 136, 178, 161, 253, 154, 97, 128, 114, 71, 33, 249, 221, 160, 125, 69, 160, 59, 213, 26, 224, 148, 89, 58, 123, 212, 116, 62, 50, 239, 31, 1, 227, 189, 9, 170, 185, 247, 249, 248, 136, 150, 232, 62, 116, 159, 231, 27, 52, 151, 127, 25, 131, 53, 79, 250, 204, 164, 241, 240, 99, 189, 112, 154, 61, 21, 159, 74, 138, 222, 40, 185, 105, 138, 185, 15, 144, 237, 108, 235, 210, 91, 209, 54, 159, 60, 148, 72, 128, 229, 38, 202, 55, 17, 172, 176, 7, 134, 23, 39, 55, 167, 229, 127, 81, 191, 174, 173, 156, 34, 103, 72, 208, 240, 249, 43, 9, 249, 198, 57, 26, 38, 158, 141, 228, 202, 212, 142, 238, 111, 82, 195, 68, 73, 100, 224, 153, 65, 22, 92, 217, 54, 70, 93, 62, 153, 205, 66, 239, 12, 62, 73, 1, 75, 187, 120, 118, 19, 40, 14, 147, 198, 182, 208, 169, 140, 32, 25, 10, 128, 243, 36, 8, 215, 5, 2, 230, 51, 115, 246, 97, 42, 221, 98, 4, 212, 79, 13, 182, 74, 155, 83, 138, 184, 165, 101, 121, 168, 209, 206, 61, 132, 25, 0, 147, 219, 30, 143, 162, 182, 217, 125, 14, 240, 222, 252, 213, 118, 145, 31, 95, 170, 7, 163, 10, 125, 207, 64, 157, 34, 192, 157, 158, 60, 70, 175, 212, 55, 238, 22, 91, 249, 134, 195, 40, 201, 232, 91, 24, 116, 156, 42, 88, 91, 189, 19, 183, 208, 8, 104, 101, 201, 64, 174, 180, 226, 108, 6, 44, 182, 54, 250, 145, 76, 209, 151, 66, 188, 10, 5, 111, 41, 32, 236, 149, 97, 169, 114, 129, 166, 3, 120, 85, 218, 61, 12, 239, 102, 53, 129, 42, 189, 209, 207, 245, 63, 96, 213, 7, 80, 55, 132, 220, 238, 141, 159, 133, 42, 163, 251, 90, 60, 135, 182, 113, 185, 244, 1, 98, 80, 100, 200, 34, 58, 59, 71, 161, 29, 13, 5, 185, 81, 247, 202, 181, 8, 13, 124, 215, 10, 83, 43, 255, 145, 30, 243, 115, 11, 192, 122, 67, 49, 72, 201, 82, 122, 247, 134, 252, 119, 234, 51, 6, 104, 19, 87, 134, 5, 200, 218, 120, 202, 161, 111, 247, 116, 51, 52, 158, 125, 227, 160, 180, 116, 63, 50, 231, 34, 138, 253, 202, 108, 170, 103, 59, 79, 239, 23, 83, 161, 196, 163, 27, 62, 21, 232, 88, 1, 118, 248, 0, 166, 80, 32, 207, 189, 1, 225, 6, 145, 194, 87, 255, 66, 3, 47, 146, 113, 222, 68, 140, 61, 241, 223, 198, 149, 139, 125, 157, 168, 13, 254, 177, 174, 203, 2, 208, 51, 46, 140, 130, 182, 159, 80, 42, 30, 161, 40, 25, 46, 47, 109, 247, 91, 90, 129, 151, 135, 151, 53, 153, 162, 12, 19, 185, 230, 134, 10, 75, 204, 129, 235, 134, 197, 73, 127, 252, 24, 218, 48, 240, 158, 49, 177, 2, 125, 108, 232, 231, 81, 223, 81, 70, 242, 24, 8, 140, 92, 151, 153, 207, 25, 148, 59, 72, 158, 193, 136, 251, 242, 14, 105, 85, 249, 107, 189, 162, 38, 218, 250, 104, 119, 39, 138, 253, 47, 82, 69, 94, 251, 178, 219, 90, 61, 238, 104, 56, 40, 9, 175, 206, 140, 170, 73, 178, 139, 185, 35, 138, 231, 130, 134, 138, 17, 211, 15, 108, 216, 110, 101, 174, 7, 172, 227, 162, 114, 29, 240, 34, 10, 217, 72, 18, 68, 217, 21, 3, 183, 121, 166, 235, 96, 233, 0, 236, 135, 151, 24, 102, 251, 163, 177, 117, 144, 37, 48, 72, 230, 133, 172, 192, 82, 243, 12, 154, 113, 174, 18, 33, 155, 205, 32, 75, 208, 124, 179, 206, 104, 216, 149, 117, 209, 78, 145, 80, 205, 221, 152, 23, 64, 90, 249, 167, 145, 240, 84, 110, 228, 207, 86, 103, 127, 124, 136, 80, 253, 131, 20, 197, 44, 3, 213, 124, 119, 9, 11, 111, 54, 24, 205, 255, 245, 86, 25, 174, 172, 127, 244, 42, 142, 238, 245, 201, 93, 138, 120, 115, 71, 127, 69, 70, 76, 112, 6, 185, 27, 210, 185, 149, 69, 168, 227, 107, 158, 251, 150, 237, 175, 252, 40, 182, 146, 56, 208, 233, 194, 77, 11, 80, 183, 161, 146, 196, 73, 204, 138, 46, 27, 143, 251, 208, 24, 157, 219, 234, 220, 2, 43, 140, 246, 203, 52, 19, 203, 139, 44, 230, 163, 55, 206, 216, 213, 5, 36, 233, 156, 198, 164, 3, 10, 142, 159, 14, 199, 126, 229, 202, 149, 109, 76, 195, 245, 41, 58, 125, 144, 120, 41, 249, 11, 202, 57, 101, 238, 249, 149, 3, 11, 7, 57, 149, 150, 193, 136, 66, 129, 56, 72, 202, 94, 190, 58, 59, 210, 136, 77, 89, 206, 140, 8, 232, 131, 125, 79, 147, 82, 52, 90, 131, 213, 40, 119, 83, 92, 80, 230, 221, 110, 82, 203, 95, 215, 185, 56, 17, 88, 121, 122, 86, 223, 41, 240, 10, 99, 13, 59, 20, 47, 137, 25, 229, 155, 11, 4, 56, 72, 43, 121, 221, 185, 212, 113, 218, 221, 147, 96, 216, 9, 124, 247, 158, 56, 157, 201, 166, 219, 94, 198, 240, 138, 90, 221, 122, 74, 35, 5, 4, 155, 13, 1, 14, 254, 174, 219, 205, 131, 240, 74, 205, 122, 156, 156, 59, 15, 33, 199, 15, 42, 73, 142, 196, 91, 145, 133, 52, 20, 208, 193, 180, 144, 4, 246, 211, 212, 212, 108, 74, 121, 21, 200, 210, 189, 8, 222, 28, 183, 29, 180, 184, 115, 193, 152, 197, 12, 88, 211, 154, 222, 159, 136, 161, 196, 219, 88, 85, 26, 163, 66, 226, 214, 241, 253, 0, 56, 154, 94, 191, 218, 123, 56, 104, 13, 139, 125, 141, 158, 13, 175, 96, 212, 140, 67, 191, 52, 148, 64, 3, 64, 5, 72, 214, 144, 183, 234, 242, 125, 79, 156, 118, 112, 249, 120, 250, 255, 152, 163, 41, 22, 55, 124, 60, 107, 115, 250, 39, 154, 1, 21, 111, 63, 249, 131, 123, 8, 185, 223, 83, 242, 227, 7, 179, 44, 219, 24, 103, 158, 180, 76, 187, 237, 115, 239, 241, 98, 173, 154, 17, 13, 174, 230, 11, 30, 100, 115, 250, 190, 253, 37, 191, 61, 183, 140, 223, 42, 181, 76, 53, 23, 68, 162, 99, 79, 89, 181] + ], + "iv": null, + "key": [144, 119, 239, 159, 167, 69, 122, 142, 217, 226, 127, 75, 144, 189, 72, 131, 115, 95, 217, 27, 71, 32, 5, 17, 151, 54, 31, 149, 38, 164, 28, 36], + "modeOfOperation": "ctr", + "plaintext": [ + [188, 140, 82, 148, 20, 97, 140, 101, 161, 23, 201, 59, 77, 232, 37, 76, 215, 220, 38, 165, 253, 8, 238, 127, 188, 234, 213, 66, 223, 236, 103, 136, 215, 101, 124, 19, 162, 80, 232, 226, 167, 68, 47, 132, 151, 45, 123, 175, 126, 175, 229, 66, 74, 100, 58, 0, 205, 55, 144, 109, 244, 241, 161, 199, 7, 19, 130, 90, 70, 127, 167, 98, 153, 65, 195, 86, 92, 162, 66, 66, 215, 171, 176, 185, 213, 235, 122, 197, 70, 41, 207, 189, 37, 155, 138, 54, 175, 100, 168, 9, 173, 14, 12, 12, 166, 146, 198, 184, 198, 92, 74, 219, 147, 231, 159, 125, 30, 37, 251, 209, 19, 147, 44, 120, 194, 196, 52, 161, 180, 42, 110, 246, 90, 8, 22, 84, 230, 182, 191, 242, 191, 35, 89, 244, 79, 184, 78, 105, 180, 79, 91, 253, 5, 46, 34, 161, 17, 177, 239, 30, 51, 201, 179, 18, 138, 222, 1, 198, 112, 122, 89, 78, 150, 19, 100, 247, 132, 27, 214, 64, 22, 115, 237, 215, 135, 167, 207, 126, 243, 251, 214, 206, 249, 141, 114, 51, 73, 197, 62, 117, 179, 144, 156, 253, 180, 203, 203, 50, 198, 58, 40, 220, 204, 114, 124, 160, 129, 166, 238, 2, 145, 91, 90, 11, 100, 3, 201, 28, 69, 147, 84, 159, 211, 182, 121, 244, 65, 81, 35, 195, 82, 170, 19, 68, 5, 168, 111, 185, 206, 77, 63, 51, 164, 227, 93, 99, 215, 240, 184, 138, 53, 87, 184, 145, 197, 103, 59, 5, 84, 111, 248, 82, 205, 211, 59, 26, 12, 135, 81, 243, 253, 81, 149, 217, 56, 241, 103, 162, 118, 253, 195, 64, 8, 163, 90, 255, 251, 116, 128, 49, 213, 207, 71, 7, 76, 41, 52, 14, 143, 104, 142, 224, 89, 213, 222, 9, 47, 206, 173, 167, 173, 157, 180, 111, 176, 187, 231, 191, 52, 192, 208, 162, 11, 196, 209, 223, 253, 247, 114, 213, 163, 69, 113, 183, 35, 46, 94, 61, 85, 4, 36, 5, 227, 70, 230, 11, 169, 91, 16, 149, 174, 142, 54, 179, 81, 131, 139, 194, 63, 82, 47, 156, 202, 52, 150, 119, 190, 118, 79, 206, 71, 146, 127, 175, 166, 103, 239, 208, 218, 103, 76, 25, 75, 145, 16, 139, 35, 108, 122, 105, 155, 232, 5, 44, 255, 70, 206, 81, 162, 15, 210, 67, 132, 107, 55, 42, 223, 147, 223, 27, 209, 60, 57, 166, 142, 219, 204, 2, 162, 221, 96, 87, 135, 167, 110, 129, 137, 206, 12, 240, 209, 39, 55, 237, 28, 208, 7, 113, 254, 159, 110, 43, 23, 23, 128, 161, 78, 237, 102, 168, 147, 54, 225, 140, 148, 210, 125, 36, 68, 214, 105, 229, 114, 3, 56, 189, 23, 76, 239, 132, 199, 201, 213, 105, 24, 147, 29, 204, 244, 94, 101, 148, 191, 1, 56, 233, 83, 178, 242, 11, 10, 88, 206, 95, 190, 127, 184, 141, 56, 247, 50, 151, 236, 237, 44, 4, 185, 95, 147, 170, 253, 17, 134, 232, 135, 133, 38, 152, 80, 156, 29, 150, 89, 230, 144, 122, 149, 206, 222, 186, 51, 156, 128, 218, 107, 199, 44, 77, 160, 215, 127, 49, 43, 1, 166, 143, 200, 150, 91, 137, 99, 216, 111, 128, 51, 25, 200, 63, 114, 121, 20, 211, 25, 112, 221, 216, 43, 160, 219, 149, 88, 129, 253, 161, 87, 97, 74, 116, 150, 157, 203, 244, 223, 232, 65, 107, 7, 107, 118, 219, 182, 174, 54, 125, 236, 242, 157, 84, 123, 245, 166, 43, 149, 238, 23, 14, 169, 35, 214, 16, 130, 113, 57, 65, 73, 195, 129, 119, 49, 66, 36, 170, 150, 75, 244, 133, 31, 64, 248, 114, 36, 196, 134, 111, 189, 189, 9, 131, 63, 5, 140, 72, 210, 232, 196, 1, 96, 110, 62, 93, 252, 95, 168, 84, 132, 166, 195, 248, 20, 17, 234, 44, 30, 96, 26, 159, 65, 56, 198, 183, 119, 28, 173, 194, 255, 104, 166, 117, 125, 189, 159, 105, 234, 5, 108, 58, 221, 233, 183, 239, 243, 143, 244, 5, 4, 180, 250, 54, 233, 118, 203, 210, 219, 48, 167, 91, 206, 166, 160, 97, 250, 222, 60, 69, 171, 200, 126, 225, 28, 130, 85, 47, 33, 206, 225, 165, 219, 108, 174, 64, 11, 14, 211, 247, 211, 142, 202, 143, 247, 65, 188, 1, 198, 167, 37, 183, 207, 196, 157, 46, 135, 144, 5, 39, 79, 242, 190, 140, 35, 135, 226, 139, 251, 189, 234, 159, 219, 96, 224, 80, 221, 87, 61, 186, 36, 94, 54, 63, 224, 7, 158, 66, 81, 87, 87, 120, 228, 57, 110, 158, 46, 57, 36, 135, 52, 237, 87, 236, 44, 19, 234, 25, 134, 107, 62, 200, 39, 136, 162, 226, 86, 105, 174, 118, 7, 86, 147, 119, 142, 139, 146, 233, 100, 85, 88, 213, 145, 141, 87, 188, 149, 57, 60, 74, 224, 185, 217, 37, 6, 40, 20, 85, 121, 237, 114, 62, 198, 212, 196, 72, 96, 4, 237, 58, 44, 131, 23, 72, 128, 31, 5, 7, 168, 76, 211, 114, 137, 177, 108, 141, 31, 37, 6, 245, 116, 82, 153, 100, 20, 235, 152, 26, 200, 110, 201, 11, 245, 192, 25, 24, 179, 150, 166, 36, 178, 24, 152, 186, 209, 247, 129, 250, 102, 236, 22, 124, 132, 20, 84, 249, 33, 97, 195, 71, 3, 156, 6, 144, 118, 236, 184, 219, 221, 157, 134, 73, 79, 250, 233, 252, 31, 248, 26, 14, 92, 242, 246, 245, 164, 19, 169, 96, 107, 31, 166, 253, 102, 23, 144, 67, 136, 169, 110, 238, 70, 27, 151, 16, 48, 129, 61, 75, 43, 102, 103, 232, 108, 51, 72, 188, 247, 41, 67, 114, 103, 4, 89, 147, 243, 26, 136, 44, 232, 145, 237, 12, 150, 146, 164, 247, 97, 255, 98, 124, 26, 47, 123, 254, 93, 243, 89, 183, 93, 254, 68, 70, 247, 181, 74, 199, 129, 6, 73, 233, 32, 33, 163, 111, 54, 188, 14, 150, 91, 218, 35, 100, 200, 10, 23, 52, 24, 121, 185, 52, 102, 33, 131, 239, 88, 71, 95, 13, 98, 130, 83, 152, 8, 247, 9, 189, 33, 52, 237, 138, 217, 247, 72, 243, 58, 119, 11, 192, 75, 161, 0, 49, 144, 249, 45, 115, 132, 193, 250, 39, 125, 50, 0, 238, 172, 112, 171, 41, 148, 187, 165, 181, 231, 207, 195, 216, 109, 109, 236, 52, 59, 218, 142, 75, 168, 191, 218, 40, 20, 238, 193, 159, 64, 135, 35, 185, 5, 214, 154, 81, 237, 212, 149, 219, 67, 118, 62, 169, 29, 221, 196, 204, 58, 249, 195, 231, 169, 98, 239, 138, 133, 239, 91, 135, 100, 248, 200, 116, 62, 97, 183, 45, 108, 199, 13, 121, 156, 115, 2, 170, 129, 76, 2, 50, 173, 115, 51, 65, 98, 229, 220, 134, 93, 202, 20, 249, 204, 74, 159, 165, 28, 41, 178, 87, 153, 229, 201, 153, 4, 254, 191, 226, 62, 47, 255, 88, 36, 30, 44, 158, 91, 236, 229, 65, 32, 235, 245, 236, 76, 254, 28, 3, 51, 43, 112, 121, 134, 151, 25, 88, 48, 220, 40, 105, 140, 114, 13, 10, 65, 101, 250, 147, 254, 143, 198, 251, 135, 180, 161, 139, 66, 48, 250, 90, 242, 206, 252, 10, 30, 31, 230, 122, 239, 224, 44, 29, 109, 118, 246, 125, 68, 103, 98, 110, 40, 158, 119, 222, 22, 83, 36, 149, 218, 18, 141, 76, 241, 164, 18, 238, 212, 215, 127, 166, 116, 38, 57, 91, 53, 153, 50, 45, 245, 165, 110, 217, 42, 69, 195, 151, 83, 45, 84, 76, 247, 30, 252, 241, 65, 191, 184, 202, 191, 249, 96, 248, 113, 9, 91, 16, 180, 14, 168, 108, 41, 127, 239, 55, 245, 98, 129, 11, 221, 190, 200, 40, 8, 57, 52, 231, 104, 250, 182, 15, 106, 7, 113, 43, 7, 102, 240, 131, 57, 110, 215, 176, 115, 243, 191, 5, 24, 17, 177, 179, 123, 37, 32, 211, 133, 200, 132, 122, 50, 245, 51, 132, 29, 92, 12, 201, 192, 72, 10, 11, 77, 144, 0, 235, 163, 2, 220, 9, 80, 79, 189, 5, 81, 58, 107, 68, 143, 148, 103, 44, 143, 176, 21, 226, 192, 121, 231, 81, 152, 48, 72, 140, 231, 187, 179, 67, 244, 159, 89, 220, 69, 67, 176, 128, 113, 61, 162, 87, 241, 214, 187, 66, 97, 248, 10, 247, 21, 39, 194, 234, 16, 68, 4, 105, 37, 152, 204, 82, 110, 81, 164, 154, 250, 124, 72, 70, 173, 192, 145, 191, 126, 136, 186, 154, 61, 251, 85, 107, 15, 55, 66, 252, 57, 39, 160, 223, 35, 179, 38, 234, 34, 165, 148, 125, 48, 54, 72, 203, 190, 208, 226, 95], + [219, 8, 15, 37, 79, 144, 134, 54, 204, 145, 111, 37, 64, 39, 68, 47, 157, 208, 202, 115, 45, 183, 101, 185, 104, 76, 182, 198, 55, 178, 70, 210, 115, 64, 224, 168, 210, 6, 36, 191, 218, 181, 182, 253, 127, 228, 125, 111, 209, 172, 180, 117, 127, 17, 203, 153, 92, 67, 10, 169, 238, 206, 156, 146, 201, 24, 164, 209, 77, 15, 122, 80, 2, 52, 77, 84, 146, 49, 113, 150, 21, 90, 39, 233, 47, 130, 31, 223, 235, 119, 162, 180, 251, 12, 41, 68, 217, 32, 156, 131, 194, 201, 6, 73, 6, 185, 11, 251, 95, 50, 23, 78, 119, 6, 238, 239, 158, 215, 222, 5, 133, 73, 145, 162, 165, 141, 181, 215, 129, 199, 147, 66, 70, 141, 95, 150, 36, 230, 215, 124, 184, 211, 163, 126, 162, 91, 165, 14, 28, 226, 150, 253, 244, 250, 253, 175, 198, 150, 19, 234, 60, 37, 17, 209, 29, 109, 189, 108, 247, 207, 197, 87, 210, 5, 169, 192, 159, 17, 125, 23, 116, 42, 235, 226, 116, 132, 104, 251, 23, 58, 120, 33, 193, 211, 148, 196, 96, 65, 242, 59, 207, 200, 123, 195, 250, 84, 46, 33, 66, 61, 98, 201, 234, 77, 107, 248, 73, 136, 179, 76, 254, 134, 225, 46, 37, 180, 225, 208, 102, 6, 113, 26, 201, 203, 103, 220, 189, 73, 109, 114, 111, 108, 229, 0, 120, 28, 222, 26, 36, 0, 85, 25, 217, 246, 120, 61, 133, 125, 127, 140, 182, 236, 100, 80, 5, 55, 219, 106, 68, 141, 189, 66, 226, 195, 84, 54, 134, 173, 25, 19, 237, 46, 28, 102, 14, 54, 240, 90, 57, 180, 248, 67, 131, 216, 221, 81, 78, 64, 220, 107, 57, 190, 28, 167, 190, 77, 229, 240, 55, 173, 196, 232, 171, 2, 250, 241, 77, 253, 148, 229, 74, 206, 19, 179, 7, 253, 195, 154, 22, 73, 219, 191, 219, 181, 77, 240, 178, 32, 176, 33, 143, 142, 100, 157, 245, 64, 98, 36, 149, 223, 156, 111, 189, 248, 121, 103, 219, 133, 254, 212, 59, 23, 230, 9, 100, 148, 121, 20, 137, 208, 64, 102, 127, 8, 255, 199, 57, 121, 82, 117, 74, 170, 238, 21, 187, 30, 63, 11, 4, 143, 44, 100, 43, 223, 1, 168, 172, 152, 167, 40, 62, 81, 234, 87, 30, 181, 206, 188, 17, 117, 38, 16, 184, 33, 200, 191, 15, 227, 139, 76, 109, 18, 217, 163, 106, 219, 187, 59, 169, 6, 100, 21, 78, 104, 242, 255, 98, 190, 212, 166, 138, 71, 1, 73, 98, 82, 168, 252, 221, 122, 66, 5, 211, 209, 26, 84, 65, 38, 231, 54, 146, 171, 63, 188, 242, 145, 93, 239, 179, 8, 180, 182, 49, 246, 139, 154, 114, 180, 211, 158, 176, 144, 83, 213, 53, 212, 61, 142, 20, 199, 44, 181, 98, 57, 240, 13, 172, 136, 234, 249, 131, 173, 7, 191, 63, 214, 236, 44, 228, 218, 13, 129, 15, 234, 82, 15, 62, 191, 25, 140, 55, 67, 33, 181, 15, 55, 54, 28, 219, 15, 159, 124, 84, 237, 20, 138, 158, 255, 165, 10, 205, 136, 45, 252, 210, 219, 162, 194, 102, 33, 72, 251, 71, 87, 132, 210, 57, 138, 111, 230, 253, 213, 111, 4, 199, 28, 127, 19, 13, 131, 87, 219, 88, 238, 244, 122, 241, 3, 86, 94, 70, 40, 46, 182, 163, 27, 254, 155, 98, 252, 108, 168, 222, 43, 220, 155, 55, 236, 247, 40, 9, 222, 3, 219, 59, 200, 165, 251, 113, 52, 62, 141, 191, 156, 249, 191, 150, 110, 69, 229, 152, 153, 163, 189, 133, 37, 111, 90, 219, 43, 2, 245, 227, 72, 83, 172, 145, 213, 222, 137, 131, 21, 43, 74, 80, 218, 25, 121, 228, 136, 220, 67, 94, 164, 222, 103, 180, 159, 142, 78, 209, 172, 221, 81, 0, 147, 81, 188, 129, 221, 13, 51, 65, 73, 62, 212, 43, 57, 31, 47, 243, 120, 165, 162, 14, 64, 217, 16, 40, 145, 158, 73, 240, 170, 174, 2, 163, 190, 92, 138, 224, 207, 188, 157, 123, 203, 101, 35, 10, 178, 98, 64, 98, 182, 30, 7, 76, 131, 35, 9, 185, 205, 79, 162, 11, 241, 141, 210, 173, 109, 90, 183, 233, 17, 161, 58, 4, 43, 71, 128, 241, 137, 185, 156, 22, 94, 129, 15, 185, 179, 17, 110, 242, 24, 167, 253, 113, 228, 99, 71, 227, 60, 205, 78, 146, 129, 181, 48, 243, 166, 230, 222, 102, 83, 207, 102, 250, 3, 71, 209, 77, 82, 18, 68, 62, 187, 83, 236, 126, 39, 203, 29, 99, 143, 34, 0, 197, 181, 23, 193, 247, 186, 55, 100, 202, 224, 13, 111, 213, 82, 70, 186, 124, 223, 168, 225, 199, 22, 228, 190, 183, 204, 5, 155, 218, 194, 224, 114, 181, 32, 18, 122, 92, 105, 46, 47, 128, 52, 244, 27, 140, 210, 67, 165, 195, 90, 12, 135, 220, 55, 38, 93, 103, 165, 145, 159, 86, 154, 118, 150, 94, 252, 109, 212, 230, 49, 215, 240, 13, 163, 93, 225, 224, 101, 159, 209, 47, 236, 115, 224, 125, 246, 247, 44, 206, 15, 128, 197, 219, 71, 17, 61, 10, 116, 103, 250, 10, 111, 122, 247, 246, 177, 195, 123, 0, 38, 205, 108, 173, 132, 31, 39, 38, 26, 249, 118, 46, 67, 103, 129, 53, 56, 122, 65, 55, 255, 51, 248, 123, 231, 132, 186, 234, 78, 99, 51, 99, 165, 122, 74, 219, 37, 93, 88, 183, 216, 51, 77, 7, 128, 82, 51, 137, 19, 3, 53, 164, 19, 245, 138, 33, 16, 229, 159, 153, 111, 164, 65, 46, 198, 120, 109, 237, 70, 6, 164, 135, 136, 210, 69, 182, 249, 115, 200, 12, 86, 4, 162, 96, 96, 42, 20, 78, 126, 185, 104, 95, 35, 29, 100, 37, 155, 233, 10, 146, 45, 3, 69, 193, 27, 88, 143, 230, 87, 92, 176, 154, 225, 134, 94, 181, 217, 153, 95, 113, 19, 230, 6, 176, 75, 221, 190, 206, 156, 7, 39, 213, 156, 233, 54, 193, 96, 119, 136, 139, 177, 117, 43, 180, 92, 70, 110, 217, 245, 118, 57, 226, 100, 24, 10, 146, 151, 202, 210, 48, 24, 29, 109, 150, 167, 10, 63, 64, 161, 44, 195, 19, 150, 11, 254, 153, 144, 7, 63, 5, 97, 36, 154, 106, 137, 117, 244, 116, 222, 138, 204, 10, 109, 0, 22, 189, 196, 176, 247, 117, 81, 12, 218, 151, 4, 159, 253, 118, 221, 194, 199, 206, 153, 231, 253, 37, 197, 53, 155, 39, 56, 85, 41, 208, 130, 10, 248, 135, 245, 146, 247, 6, 60, 178, 86, 63, 247, 145, 73, 147, 15, 89, 189, 0, 175, 123, 163, 47, 84, 188, 120, 41, 118, 254, 189, 78, 131, 207, 102, 226, 30, 24, 242, 137, 50, 64, 15, 192, 144, 84, 66, 13, 188, 139, 182, 161, 9, 22, 229, 210, 87, 9, 123, 100, 124, 171, 202, 173, 109, 224, 105, 245, 222, 103, 110, 110, 116, 1, 204, 29, 24, 198, 247, 65, 71, 181, 107, 40, 207, 215, 105, 254, 91, 181, 82, 65, 133, 170, 196, 184, 94, 200, 130, 11, 147, 33, 110, 31, 192, 93, 5, 140, 52, 210, 253, 158, 91, 14, 126, 0, 234, 6, 158, 76, 57, 28, 247, 50, 201, 214, 87, 75, 23, 168, 255, 193, 224, 124, 40, 245, 1, 29, 225, 102, 174, 5, 80, 226, 71, 82, 231, 165, 9, 220, 168, 120, 85, 53, 216, 126, 83, 166, 122, 193, 230, 71, 99, 186, 177, 163, 135, 181, 172, 114, 191, 175, 143, 228, 225, 149, 42, 178, 90, 132, 152, 179, 246, 100, 252, 39, 194, 31, 118, 5, 54, 250, 238, 204, 54, 77, 167, 66, 145, 141, 211, 178, 204, 35, 228, 22, 50, 158, 76, 156, 230, 209, 179, 119, 142, 42, 127, 197, 34, 217, 84, 149, 53, 18, 120, 13, 52, 194, 129, 41, 204, 156, 66, 175, 4, 116, 206, 148, 175, 150, 119, 198, 240, 47, 147, 66, 13, 62, 216, 39, 146, 245, 115, 110, 14, 186, 3, 179, 135, 41, 98, 38, 45, 229, 235, 86, 182, 237, 31, 51, 208, 241, 183, 193, 125, 71, 123, 63, 190, 236, 86, 135, 28, 125, 150, 86, 10, 186, 156, 207, 255, 157, 21, 154, 46, 224, 186, 214, 56, 14, 112, 4, 73, 51, 213, 77, 184, 77, 54, 223, 97, 199, 196, 141, 244, 238, 123, 233, 203, 48, 38, 26, 253, 247, 101, 98, 63, 36, 110, 204, 149, 134, 177, 204, 6, 45, 137, 101, 233, 159, 35, 198, 106, 140, 181, 33, 197, 122, 252, 30, 24, 8, 2, 226, 134, 99, 202, 212, 176, 158, 66, 12, 193, 187, 229, 216, 74, 167, 238, 151, 218], + [130, 169, 162, 28, 122, 69, 85, 224, 99, 48, 83, 70, 154, 115, 121, 217, 122, 174, 187, 141, 94, 169, 241, 3, 89, 67, 243, 66, 46, 98, 81, 233, 235, 76, 240, 46, 223, 122, 173, 156, 226, 233, 227, 143, 161, 119, 239, 237, 3, 189, 251, 187, 170, 203, 62, 65, 89, 157, 87, 32, 135, 160, 13, 90, 174, 199, 124, 22, 115, 136, 100, 228, 119, 84, 232, 22, 34, 93, 202, 53, 108, 133, 183, 106, 99, 137, 123, 12, 31, 53, 173, 173, 254, 86, 39, 56, 202, 41, 50, 67, 127, 157, 176, 15, 91, 163, 38, 238, 168, 122, 254, 181, 48, 33, 241, 227, 23, 234, 210, 172, 152, 6, 102, 81, 240, 221, 196, 239, 250, 94, 7, 233, 2, 248, 87, 208, 175, 47, 243, 172, 85, 144, 29, 192, 58, 20, 196, 147, 145, 83, 160, 191, 66, 188, 221, 75, 242, 215, 184, 169, 28, 43, 134, 119, 154, 64, 7, 212, 88, 154, 206, 192, 169, 139, 10, 42, 245, 255, 121, 125, 115, 28, 182, 116, 187, 205, 13, 22, 62, 97, 175, 185, 202, 204, 2, 5, 16, 235, 189, 119, 157, 27, 100, 83, 60, 197, 146, 62, 243, 209, 15, 21, 255, 62, 147, 185, 47, 133, 173, 194, 162, 71, 34, 192, 211, 3, 20, 49, 199, 122, 48, 173, 181, 174, 52, 82, 17, 182, 2, 210, 130, 168, 135, 17, 37, 149, 127, 228, 27, 161, 0, 172, 140, 68, 27, 186, 5, 171, 6, 64, 140, 17, 254, 118, 80, 215, 62, 118, 205, 102, 230, 55, 220, 172, 220, 155, 93, 190, 224, 249, 38, 66, 233, 243, 165, 14, 235, 172, 140, 80, 159, 184, 3, 176, 72, 67, 158, 47, 204, 28, 52, 203, 217, 64, 7, 94, 215, 124, 218, 106, 151, 69, 187, 96, 136, 72, 10, 203, 113, 245, 83, 73, 143, 75, 251, 84, 96, 84, 109, 143, 61, 132, 49, 137, 251, 176, 13, 35, 6, 111, 94, 160, 195, 251, 63, 55, 206, 6, 175, 158, 91, 161, 96, 231, 146, 171, 103, 58, 194, 255, 18, 190, 107, 165, 99, 133, 231, 81, 176, 121, 2, 43, 219, 146, 174, 126, 106, 49, 12, 218, 189, 150, 11, 38, 171, 173, 176, 21, 7, 151, 36, 118, 143, 131, 121, 7, 39, 250, 115, 224, 172, 110, 159, 212, 68, 134, 110, 8, 12, 113, 159, 7, 185, 163, 194, 127, 232, 255, 91, 49, 91, 176, 11, 37, 221, 93, 223, 107, 4, 36, 176, 242, 214, 203, 82, 235, 27, 98, 174, 120, 139, 63, 55, 51, 36, 31, 7, 185, 132, 227, 160, 83, 216, 243, 96, 22, 40, 158, 37, 195, 135, 118, 143, 247, 81, 219, 102, 151, 224, 235, 161, 62, 31, 220, 236, 47, 120, 35, 24, 133, 119, 91, 84, 230, 209, 140, 155, 68, 29, 217, 240, 74, 238, 193, 132, 40, 4, 19, 33, 38, 38, 96, 206, 94, 172, 82, 155, 188, 140, 197, 39, 26, 178, 211, 233, 30, 234, 180, 215, 43, 127, 209, 105, 133, 231, 25, 227, 176, 53, 43, 154, 20, 249, 249, 86, 69, 167, 40, 128, 5, 106, 135, 14, 136, 92, 206, 76, 188, 99, 132, 104, 180, 99, 66, 74, 134, 40, 124, 3, 64, 72, 237, 228, 200, 40, 31, 42, 174, 67, 231, 119, 43, 96, 179, 189, 178, 5, 115, 100, 93, 122, 7, 233, 234, 199, 189, 128, 144, 67, 245, 238, 96, 198, 31, 81, 81, 83, 26, 160, 233, 220, 52, 211, 134, 100, 34, 60, 152, 159, 110, 186, 224, 157, 97, 228, 246, 203, 106, 74, 230, 156, 176, 175, 248, 214, 68, 74, 42, 237, 113, 40, 128, 111, 106, 198, 252, 204, 112, 110, 244, 125, 209, 227, 136, 86, 83, 108, 14, 114, 232, 206, 17, 209, 184, 181, 111, 185, 49, 169, 70, 133, 134, 168, 253, 109, 250, 153, 215, 254, 162, 58, 211, 57, 253, 119, 184, 14, 42, 187, 63, 137, 183, 231, 61, 243, 21, 226, 47, 9, 110, 45, 226, 101, 137, 19, 94, 105, 245, 126, 37, 161, 15, 253, 59, 204, 136, 130, 7, 31, 51, 47, 148, 85, 52, 125, 162, 169, 134, 55, 253, 100, 65, 203, 227, 7, 119, 172, 140, 166, 244, 168, 32, 155, 155, 56, 54, 1, 138, 209, 173, 52, 10, 102, 208, 127, 215, 105, 241, 19, 154, 175, 7, 176, 115, 111, 77, 79, 191, 178, 63, 148, 150, 247, 5, 75, 124, 231, 20, 131, 26, 141, 185, 120, 231, 158, 101, 202, 113, 78, 132, 148, 181, 177, 141, 235, 160, 92, 236, 70, 173, 130, 12, 198, 156, 49, 138, 174, 170, 131, 80, 128, 56, 153, 185, 60, 40, 50, 29, 23, 48, 217, 168, 147, 193, 101, 111, 69, 47, 247, 248, 152, 110, 157, 52, 118, 150, 202, 145, 194, 61, 231, 187, 16, 80, 90, 207, 100, 174, 212, 162, 10, 17, 75, 69, 81, 181, 100, 214, 173, 93, 249, 111, 119, 93, 48, 81, 92, 1, 189, 85, 212, 119, 254, 103, 223, 90, 102, 136, 164, 57, 38, 61, 182, 61, 235, 203, 228, 191, 206, 87, 158, 154, 218, 3, 127, 168, 86, 142, 77, 100, 58, 20, 10, 50, 67, 138, 30, 200, 158, 112, 38, 174, 69, 150, 215, 248, 255, 235, 153, 222, 250, 149, 75, 59, 238, 41, 83, 3, 91, 60, 215, 219, 120, 98, 51, 171, 134, 58, 65, 38, 101, 78, 147, 94, 235, 122, 244, 196, 114, 212, 158, 1, 58, 252, 248, 9, 199, 203, 244, 95, 245, 205, 244, 27, 212, 47, 57, 147, 175, 98, 44, 124, 32, 140, 126, 173, 112, 158, 53, 128, 85, 127, 246, 37, 102, 97, 214, 245, 91, 68, 211, 118, 225, 129, 254, 158, 60, 40, 220, 114, 77, 85, 185, 176, 253, 177, 248, 32, 116, 253, 210, 8, 196, 1, 1, 32, 116, 229, 219, 142, 17, 133, 170, 124, 72, 57, 204, 195, 144, 104, 217, 65, 173, 179, 146, 246, 23, 191, 157, 208, 216, 135, 34, 30, 91, 123, 66, 248, 160, 231, 84, 206, 22, 36, 152, 243, 17, 226, 134, 177, 91, 67, 133, 69, 186, 80, 72, 118, 36, 224, 247, 97, 241, 104, 172, 110, 77, 81, 52, 238, 29, 243, 77, 35, 229, 231, 252, 37, 20, 87, 158, 172, 179, 101, 110, 60, 35, 208, 157, 96, 137, 209, 70, 254, 165, 160, 221, 183, 143, 46, 37, 135, 38, 51, 237, 239, 14, 35, 64, 186, 91, 122, 126, 158, 153, 42, 96, 93, 210, 130, 10, 244, 32, 1, 154, 251, 222, 102, 41, 33, 171, 147, 234, 69, 238, 91, 103, 8, 168, 111, 164, 240, 137, 137, 136, 152, 127, 191, 250, 101, 140, 187, 61, 191, 142, 51, 233, 146, 126, 26, 110, 107, 223, 223, 17, 126, 115, 152, 150, 68, 149, 163, 208, 151, 175, 136, 161, 27, 100, 151, 246, 240, 4, 51, 189, 3, 237, 115, 92, 85, 60, 212, 53, 138, 45, 230, 138, 78, 88, 146, 151, 12, 20, 47, 151, 217, 152, 232, 21, 115, 242, 148, 191, 185, 172, 229, 157, 23, 41, 75, 39, 206, 70, 33, 187, 0, 148, 117, 232, 112, 211, 22, 242, 159, 195, 134, 230, 222, 32, 5, 15, 253, 98, 255, 15, 252, 203, 212, 230, 75, 30, 22, 107, 191, 176, 174, 21, 96, 89, 175, 80, 19, 151, 133, 42, 192, 195, 77, 71, 71, 208, 115, 167, 167, 43, 74, 231, 212, 151, 214, 89, 142, 38, 9, 5, 12, 146, 151, 184, 207, 185, 72, 194, 194, 176, 54, 111, 113, 199, 30, 131, 39, 165, 254, 44, 210, 185, 240, 146, 11, 61, 119, 187, 77, 46, 50, 137, 225, 32, 182, 113, 162, 13, 90, 142, 197, 21, 186, 16, 3, 201, 242, 222, 107, 13, 108, 117, 130, 177, 204, 35, 239, 245, 18, 90, 113, 75, 207, 133, 133, 56, 219, 36, 238, 128, 240, 89, 215, 49, 79, 158, 222, 120, 40, 205, 252, 212, 242, 248, 14, 170, 92, 153, 106, 85, 49, 110, 55, 197, 44, 59, 121, 172, 234, 255, 47, 117, 110, 5, 126, 41, 201, 167, 184, 63, 1, 78, 115, 57, 65, 39, 144, 203, 84, 41, 113, 58, 119, 19, 32, 225, 154, 145, 199, 97, 206, 103, 219, 206, 16, 99, 208, 211, 59, 27, 167, 227, 170, 163, 183, 84, 98, 158, 214, 105, 1, 101, 186, 9, 58, 188, 90, 174, 101, 132, 248, 82, 158, 188, 160, 61, 186, 246, 186, 184, 165, 11, 7, 54, 216, 134, 192, 121, 16, 225, 231, 147, 139, 176, 94, 220, 75, 190, 34, 215, 2, 89, 97, 193, 108, 19, 155, 246, 52, 15, 202, 98, 201, 62, 164, 26, 244, 160, 0, 38, 154, 79, 74, 179, 140], + [191, 46, 213, 229, 238, 218, 164, 113, 158, 86, 223, 82, 147, 204, 8, 249, 140, 89, 211, 64, 210, 145, 223, 102, 15, 105, 144, 128, 24, 204, 249, 198, 93, 49, 115, 130, 4, 94, 30, 179, 166, 198, 156, 41, 195, 43, 21, 67, 122, 135, 7, 210, 71, 202, 162, 101, 90, 65, 152, 181, 104, 55, 54, 69, 205, 227, 128, 53, 231, 107, 70, 50, 42, 12, 46, 223, 70, 248, 12, 186, 209, 43, 243, 192, 150, 194, 56, 198, 155, 85, 221, 214, 6, 161, 95, 100, 197, 223, 93, 54, 71, 180, 209, 250, 62, 217, 102, 231, 235, 25, 73, 216, 45, 80, 4, 241, 15, 95, 80, 173, 45, 231, 35, 157, 227, 158, 114, 74, 30, 86, 209, 225, 53, 144, 12, 213, 243, 49, 1, 10, 40, 84, 98, 158, 79, 165, 216, 163, 127, 231, 208, 168, 158, 0, 148, 231, 73, 238, 54, 88, 141, 36, 129, 45, 78, 116, 195, 39, 37, 45, 59, 250, 14, 36, 240, 190, 95, 177, 126, 245, 16, 214, 129, 188, 195, 134, 184, 229, 231, 201, 236, 139, 92, 184, 47, 113, 242, 94, 18, 184, 89, 117, 168, 12, 252, 39, 121, 52, 85, 215, 215, 213, 156, 9, 83, 88, 115, 192, 255, 77, 216, 48, 167, 31, 3, 105, 149, 170, 116, 221, 154, 153, 52, 78, 89, 154, 175, 235, 70, 240, 202, 194, 48, 97, 20, 94, 232, 123, 141, 121, 186, 99, 160, 77, 170, 194, 155, 20, 127, 226, 91, 27, 197, 140, 111, 99, 134, 201, 108, 186, 176, 30, 51, 202, 188, 148, 4, 102, 55, 133, 180, 20, 23, 54, 217, 38, 176, 87, 35, 210, 57, 235, 26, 76, 253, 96, 247, 135, 3, 141, 120, 222, 149, 192, 161, 22, 26, 69, 148, 192, 105, 223, 27, 8, 182, 19, 163, 188, 204, 150, 125, 224, 112, 230, 27, 60, 239, 181, 254, 108, 34, 153, 65, 243, 64, 65, 35, 230, 185, 137, 157, 184, 83, 109, 119, 149, 16, 119, 173, 244, 1, 162, 49, 84, 4, 197, 15, 202, 165, 169, 103, 38, 181, 126, 92, 3, 240, 213, 26, 139, 43, 221, 166, 231, 24, 247, 243, 140, 7, 170, 240, 141, 43, 130, 90, 149, 156, 150, 31, 109, 140, 128, 217, 68, 219, 240, 143, 198, 134, 241, 178, 36, 136, 63, 99, 177, 250, 208, 79, 185, 185, 99, 145, 28, 150, 190, 233, 205, 181, 141, 56, 22, 216, 37, 190, 160, 0, 203, 5, 108, 244, 2, 38, 205, 234, 106, 78, 62, 107, 215, 126, 19, 107, 38, 137, 151, 154, 47, 136, 57, 253, 240, 102, 44, 173, 158, 185, 23, 247, 197, 203, 197, 178, 133, 107, 182, 242, 238, 189, 76, 107, 191, 21, 151, 15, 186, 166, 216, 66, 67, 127, 97, 33, 2, 179, 63, 60, 240, 36, 146, 148, 94, 58, 169, 46, 72, 103, 230, 28, 217, 219, 168, 71, 50, 169, 222, 132, 36, 200, 32, 109, 55, 135, 87, 229, 227, 4, 27, 155, 219, 127, 24, 46, 235, 130, 201, 164, 48, 185, 188, 233, 14, 97, 145, 179, 238, 25, 214, 111, 216, 26, 144, 215, 162, 86, 38, 159, 18, 24, 85, 14, 12, 173, 148, 62, 57, 21, 200, 137, 239, 71, 235, 69, 162, 199, 199, 121, 154, 69, 165, 63, 162, 84, 152, 39, 55, 49, 38, 62, 162, 32, 101, 240, 211, 134, 34, 61, 46, 159, 192, 172, 226, 213, 15, 9, 217, 231, 205, 12, 48, 58, 85, 43, 240, 4, 175, 150, 105, 213, 107, 3, 74, 201, 144, 250, 38, 214, 177, 84, 76, 64, 168, 167, 63, 119, 96, 226, 145, 95, 12, 97, 51, 118, 130, 96, 239, 220, 75, 61, 139, 62, 57, 157, 46, 183, 151, 46, 124, 164, 179, 98, 7, 93, 219, 51, 90, 159, 211, 213, 141, 241, 78, 84, 163, 190, 41, 185, 219, 106, 26, 5, 11, 40, 62, 98, 244, 213, 181, 46, 175, 141, 42, 42, 231, 106, 10, 52, 226, 32, 179, 121, 115, 107, 138, 252, 138, 186, 16, 90, 12, 17, 101, 241, 65, 194, 248, 163, 157, 57, 198, 19, 21, 117, 119, 241, 38, 230, 70, 17, 31, 248, 192, 7, 97, 245, 249, 23, 207, 37, 133, 108, 163, 205, 70, 3, 202, 54, 237, 214, 99, 114, 95, 222, 89, 140, 4, 210, 150, 127, 132, 222, 145, 234, 8, 209, 205, 54, 9, 220, 93, 175, 151, 204, 11, 124, 30, 58, 47, 59, 123, 183, 68, 222, 173, 205, 198, 85, 51, 26, 10, 234, 15, 15, 62, 163, 114, 112, 254, 220, 236, 175, 32, 54, 108, 236, 153, 113, 112, 187, 33, 14, 227, 216, 53, 174, 68, 203, 242, 183, 34, 128, 221, 18, 199, 103, 173, 167, 208, 37, 181, 219, 111, 7, 72, 208, 156, 197, 221, 24, 198, 224, 170, 181, 197, 191, 65, 2, 6, 170, 55, 234, 135, 244, 244, 141, 188, 238, 29, 116, 42, 97, 56, 11, 225, 101, 159, 51, 146, 235, 155, 75, 202, 83, 142, 254, 152, 220, 192, 17, 151, 169, 236, 209, 221, 144, 39, 216, 96, 206, 171, 189, 155, 154, 229, 127, 239, 210, 124, 182, 90, 1, 127, 250, 171, 110, 122, 124, 215, 252, 71, 236, 23, 240, 185, 116, 73, 53, 58, 237, 210, 77, 214, 88, 24, 196, 61, 95, 83, 26, 150, 22, 40, 5, 196, 39, 212, 187, 77, 121, 229, 62, 180, 242, 76, 132, 63, 199, 236, 220, 124, 212, 6, 89, 83, 177, 128, 203, 112, 9, 69, 184, 188, 159, 228, 173, 197, 225, 177, 243, 170, 220, 22, 168, 137, 77, 134, 212, 243, 212, 74, 203, 117, 195, 76, 253, 5, 238, 161, 193, 151, 63, 75, 200, 150, 144, 68, 3, 26, 123, 249, 212, 227, 37, 255, 249, 44, 61, 122, 131, 227, 56, 35, 89, 79, 147, 242, 238, 65, 89, 210, 160, 23, 187, 254, 99, 35, 76, 203, 136, 77, 52, 13, 27, 23, 96, 230, 72, 232, 50, 69, 134, 38, 86, 34, 236, 22, 118, 126, 169, 212, 236, 126, 139, 165, 96, 149, 136, 91, 131, 89, 75, 76, 241, 22, 7, 90, 88, 32, 159, 7, 44, 80, 58, 236, 218, 222, 22, 188, 68, 107, 16, 215, 114, 232, 107, 122, 66, 42, 145, 233, 1, 60, 146, 195, 7, 11, 171, 14, 132, 96, 224, 78, 134, 160, 10, 93, 39, 112, 72, 13, 163, 122, 10, 186, 38, 82, 138, 224, 152, 121, 180, 122, 173, 71, 173, 150, 76, 32, 15, 21, 26, 179, 31, 192, 213, 186, 7, 159, 154, 82, 130, 146, 111, 209, 62, 224, 122, 5, 204, 195, 11, 6, 119, 191, 157, 185, 35, 15, 70, 206, 255, 201, 8, 236, 248, 148, 219, 81, 229, 142, 107, 246, 167, 37, 88, 30, 38, 142, 168, 97, 141, 195, 144, 203, 193, 29, 57, 81, 123, 41, 165, 235, 158, 191, 55, 210, 178, 20, 239, 109, 208, 249, 132, 74, 165, 93, 118, 53, 127, 98, 186, 73, 193, 242, 175, 23, 64, 28, 38, 76, 155, 169, 7, 182, 42, 111, 133, 185, 129, 232, 15, 239, 220, 153, 70, 209, 188, 110, 226, 177, 101, 140, 219, 19, 154, 178, 78, 213, 105, 54, 137, 48, 223, 84, 58, 46, 110, 113, 201, 175, 253, 187, 140, 139, 26, 247, 116, 212, 232, 107, 193, 114, 69, 29, 78, 254, 86, 219, 86, 45, 68, 153, 42, 185, 255, 186, 159, 51, 158, 19, 21, 44, 135, 74, 241, 80, 180, 47, 90, 91, 228, 109, 54, 2, 206, 90, 234, 251, 156, 113, 131, 74, 129, 85, 37, 180, 58, 122, 146, 157, 160, 35, 116, 84, 92, 134, 242, 34, 194, 230, 231, 4, 146, 181, 177, 109, 49, 206, 153, 117, 147, 41, 122, 255, 148, 172, 254, 218, 125, 205, 108, 62, 53, 66, 126, 29, 246, 95, 87, 5, 64, 114, 117, 144, 96, 89, 14, 174, 184, 61, 218, 252, 86, 86, 153, 72, 63, 147, 236, 148, 118, 145, 207, 147, 255, 33, 240, 180, 35, 173, 50, 192, 234, 130, 116, 100, 234, 64, 103, 71, 249, 249, 132, 70, 33, 61, 207, 31, 253, 225, 172, 188, 164, 160, 144, 74, 164, 198, 240, 23, 247, 232, 161, 51, 104, 204, 64, 9, 8, 21, 179, 5, 107, 186, 14, 206, 239, 130, 50, 91, 27, 33, 29, 250, 196, 217, 148, 100, 248, 224, 134, 24, 252, 239, 239, 96, 52, 47, 191, 106, 17, 229, 65, 163, 150, 54, 156, 180, 53, 237, 190, 160, 143, 81, 160, 169, 138, 166, 180, 143, 229, 250, 253, 18, 230, 1, 214, 233, 234, 4, 211, 192, 31, 104, 101, 85, 241, 171, 36, 165, 90, 176, 240, 199, 115, 60, 198, 217, 9, 189], + [145, 168, 96, 12, 53, 35, 136, 249, 103, 206, 138, 208, 101, 102, 252, 202, 75, 122, 15, 239, 135, 26, 125, 172, 134, 200, 228, 89, 179, 150, 93, 59, 141, 147, 153, 9, 136, 166, 12, 25, 169, 106, 128, 117, 94, 108, 179, 9, 10, 23, 12, 121, 12, 110, 0, 129, 221, 143, 247, 34, 27, 104, 226, 148, 142, 252, 226, 96, 127, 151, 197, 192, 127, 101, 195, 213, 200, 224, 45, 72, 234, 239, 195, 65, 207, 251, 109, 97, 47, 155, 219, 44, 9, 34, 59, 150, 220, 228, 247, 193, 247, 104, 242, 242, 93, 34, 216, 5, 169, 255, 13, 205, 30, 175, 231, 6, 46, 154, 46, 6, 112, 227, 41, 126, 120, 108, 190, 99, 69, 142, 36, 45, 201, 54, 65, 177, 100, 83, 44, 25, 194, 138, 132, 201, 1, 193, 49, 76, 32, 84, 125, 243, 72, 160, 232, 7, 148, 221, 17, 240, 41, 30, 174, 134, 135, 106, 171, 49, 22, 199, 194, 124, 19, 187, 206, 209, 99, 15, 143, 51, 209, 103, 47, 49, 254, 166, 178, 204, 235, 1, 222, 113, 246, 77, 55, 92, 52, 49, 136, 155, 221, 89, 127, 113, 132, 144, 83, 178, 137, 68, 118, 79, 152, 1, 6, 129, 48, 10, 119, 16, 15, 211, 157, 51, 193, 234, 45, 12, 11, 79, 176, 164, 26, 100, 93, 169, 122, 233, 29, 222, 111, 159, 130, 4, 61, 107, 101, 1, 129, 167, 63, 50, 106, 193, 37, 125, 92, 181, 170, 201, 157, 133, 130, 202, 219, 117, 100, 218, 39, 118, 194, 214, 56, 31, 69, 115, 253, 104, 167, 34, 26, 136, 20, 226, 69, 62, 85, 171, 9, 113, 26, 20, 116, 193, 40, 33, 251, 74, 105, 247, 7, 193, 104, 129, 124, 227, 180, 134, 230, 91, 97, 113, 69, 202, 138, 209, 157, 88, 214, 206, 182, 24, 102, 205, 106, 105, 112, 200, 243, 186, 253, 68, 26, 233, 106, 225, 177, 124, 101, 217, 3, 8, 27, 147, 119, 198, 106, 134, 114, 179, 220, 119, 231, 8, 164, 189, 28, 74, 178, 165, 69, 67, 141, 84, 229, 45, 247, 29, 199, 8, 147, 52, 220, 181, 109, 17, 142, 57, 58, 97, 52, 137, 7, 205, 11, 78, 14, 199, 90, 227, 183, 218, 84, 210, 59, 143, 129, 173, 51, 165, 165, 88, 115, 145, 134, 0, 19, 149, 25, 224, 171, 232, 42, 109, 109, 222, 162, 210, 129, 49, 108, 76, 234, 203, 235, 40, 56, 252, 169, 243, 171, 248, 54, 126, 115, 40, 79, 72, 39, 146, 25, 73, 98, 231, 149, 254, 131, 93, 1, 220, 118, 124, 143, 56, 85, 120, 119, 206, 130, 239, 89, 97, 109, 128, 49, 17, 219, 170, 116, 232, 240, 150, 26, 173, 132, 28, 14, 31, 219, 75, 14, 212, 170, 130, 56, 181, 61, 140, 190, 80, 137, 2, 30, 188, 71, 249, 68, 64, 190, 13, 23, 224, 108, 205, 174, 188, 145, 96, 169, 143, 227, 139, 72, 162, 104, 213, 4, 42, 48, 56, 124, 22, 197, 210, 220, 198, 135, 24, 32, 106, 207, 238, 115, 108, 0, 243, 193, 120, 181, 133, 99, 46, 79, 207, 15, 42, 147, 236, 43, 242, 210, 239, 187, 125, 93, 166, 3, 144, 131, 159, 206, 68, 150, 96, 100, 141, 164, 45, 29, 75, 13, 53, 44, 79, 217, 66, 206, 221, 91, 37, 47, 25, 239, 215, 79, 84, 164, 236, 236, 253, 186, 169, 107, 73, 118, 149, 37, 221, 171, 149, 173, 204, 130, 97, 142, 231, 172, 110, 63, 95, 246, 156, 142, 69, 34, 160, 172, 111, 179, 218, 173, 44, 129, 43, 211, 88, 106, 93, 99, 45, 64, 171, 111, 137, 70, 90, 108, 66, 13, 60, 87, 97, 83, 174, 119, 202, 153, 181, 62, 245, 59, 182, 110, 26, 10, 228, 224, 32, 154, 179, 193, 51, 171, 252, 239, 25, 231, 235, 210, 37, 143, 124, 169, 185, 15, 89, 174, 255, 167, 162, 65, 218, 207, 197, 212, 188, 110, 61, 1, 54, 158, 88, 57, 29, 173, 11, 196, 56, 64, 199, 8, 244, 230, 116, 22, 138, 57, 47, 71, 12, 182, 25, 16, 6, 152, 100, 214, 157, 109, 171, 231, 56, 29, 219, 241, 159, 104, 224, 254, 219, 100, 133, 30, 199, 208, 49, 253, 226, 187, 185, 127, 94, 66, 156, 231, 220, 43, 244, 144, 46, 59, 154, 192, 65, 243, 51, 117, 203, 6, 130, 83, 76, 133, 128, 175, 169, 2, 229, 224, 85, 0, 101, 43, 111, 48, 103, 238, 147, 28, 187, 47, 220, 209, 136, 123, 131, 2, 145, 44, 163, 114, 254, 37, 168, 62, 162, 166, 26, 166, 63, 181, 161, 255, 106, 33, 69, 234, 44, 213, 144, 164, 75, 10, 192, 44, 240, 81, 84, 11, 196, 233, 103, 16, 102, 84, 112, 242, 145, 214, 208, 24, 81, 49, 36, 15, 207, 178, 128, 67, 249, 54, 87, 197, 213, 126, 119, 253, 27, 98, 17, 88, 113, 62, 55, 162, 157, 241, 73, 236, 74, 170, 213, 219, 122, 20, 159, 19, 89, 116, 152, 13, 179, 7, 167, 152, 128, 131, 103, 249, 225, 70, 209, 143, 5, 131, 196, 3, 123, 78, 163, 154, 236, 204, 16, 57, 128, 38, 5, 225, 136, 81, 100, 150, 196, 223, 160, 115, 39, 45, 165, 0, 19, 95, 178, 165, 175, 25, 183, 165, 58, 44, 190, 206, 203, 146, 226, 232, 113, 133, 60, 33, 99, 99, 52, 203, 145, 29, 118, 21, 84, 214, 164, 181, 250, 241, 4, 54, 107, 160, 104, 141, 140, 41, 20, 16, 99, 36, 9, 7, 112, 250, 203, 105, 171, 202, 243, 214, 78, 28, 119, 210, 175, 2, 11, 121, 55, 110, 139, 58, 2, 40, 113, 155, 72, 38, 90, 233, 120, 117, 186, 174, 44, 88, 98, 123, 102, 116, 194, 230, 216, 42, 140, 247, 194, 85, 89, 57, 122, 168, 88, 166, 243, 66, 130, 133, 129, 60, 128, 121, 15, 102, 53, 196, 2, 59, 235, 112, 235, 52, 155, 20, 1, 82, 214, 155, 218, 160, 116, 112, 162, 211, 127, 253, 254, 142, 206, 232, 111, 130, 37, 157, 180, 90, 108, 0, 175, 53, 58, 136, 76, 226, 2, 48, 6, 171, 234, 197, 143, 138, 182, 239, 251, 61, 242, 235, 248, 82, 60, 124, 252, 46, 231, 137, 173, 40, 40, 144, 98, 128, 155, 120, 53, 134, 23, 78, 253, 212, 16, 249, 246, 49, 233, 223, 130, 177, 201, 10, 216, 29, 183, 241, 72, 26, 173, 184, 159, 173, 208, 195, 191, 132, 33, 58, 202, 105, 155, 180, 175, 135, 109, 248, 169, 205, 250, 55, 171, 89, 120, 36, 62, 37, 88, 142, 57, 27, 99, 90, 24, 26, 133, 97, 74, 21, 116, 105, 160, 101, 165, 16, 51, 213, 64, 253, 30, 123, 168, 108, 102, 236, 37, 233, 201, 70, 178, 99, 203, 231, 140, 152, 246, 37, 115, 81, 236, 207, 240, 11, 185, 253, 140, 69, 196, 159, 119, 244, 132, 172, 251, 67, 187, 164, 210, 80, 62, 91, 228, 78, 119, 207, 208, 136, 162, 208, 218, 186, 120, 106, 132, 23, 153, 109, 247, 62, 124, 174, 30, 166, 45, 96, 211, 60, 209, 196, 151, 226, 35, 18, 220, 195, 154, 170, 134, 44, 148, 241, 65, 116, 132, 60, 170, 173, 172, 66, 171, 81, 220, 107, 15, 194, 127, 190, 1, 179, 180, 195, 173, 78, 177, 10, 177, 246, 42, 140, 228, 128, 184, 95, 241, 184, 217, 215, 141, 243, 143, 19, 3, 179, 115, 97, 162, 199, 176, 66, 170, 191, 3, 226, 6, 130, 116, 106, 174, 52, 49, 131, 29, 231, 85, 73, 27, 10, 91, 166, 10, 191, 167, 116, 199, 232, 216, 223, 146, 166, 83, 7, 112, 217, 127, 236, 200, 146, 240, 60, 12, 254, 73, 95, 242, 241, 80, 221, 168, 137, 167, 67, 37, 8, 233, 80, 242, 147, 160, 157, 45, 45, 25, 163, 45, 65, 123, 170, 8, 45, 6, 249, 197, 121, 138, 174, 67, 79, 164, 228, 185, 0, 142, 174, 28, 214, 129, 98, 106, 56, 91, 130, 134, 242, 143, 29, 57, 26, 214, 147, 172, 162, 237, 233, 51, 15, 113, 204, 150, 91, 183, 155, 134, 117, 156, 45, 127, 132, 235, 66, 46, 233, 245, 26, 188, 183, 221, 153, 9, 100, 215, 104, 171, 56, 60, 207, 141, 80, 150, 21, 11, 32, 210, 146, 13, 230, 62, 231, 237, 156, 229, 63, 153, 34, 18, 183, 72, 173, 162, 45, 46, 98, 119, 95, 208, 219, 101, 48, 209, 156, 218, 124, 205, 195, 220, 251, 137, 38, 175, 42, 79, 24, 182, 224, 99, 65, 175, 192, 91, 211, 89, 23, 161, 2, 86, 203, 1, 29, 16, 240, 6, 183, 106, 140, 148, 74, 204], + [117, 176, 137, 133, 153, 6, 241, 212, 204, 212, 158, 2, 220, 213, 209, 145, 204, 3, 250, 219, 191, 46, 20, 97, 70, 85, 123, 12, 159, 242, 19, 157, 235, 211, 222, 168, 94, 187, 2, 193, 53, 47, 30, 213, 140, 208, 206, 181, 117, 76, 205, 71, 254, 206, 2, 115, 159, 111, 175, 62, 30, 221, 62, 138, 187, 127, 22, 56, 91, 61, 107, 157, 235, 114, 187, 34, 37, 20, 193, 72, 162, 199, 220, 170, 68, 189, 246, 24, 110, 15, 174, 60, 170, 62, 95, 114, 23, 49, 156, 56, 35, 235, 90, 248, 70, 210, 209, 57, 67, 33, 23, 189, 6, 163, 207, 10, 0, 27, 89, 24, 60, 141, 90, 232, 24, 68, 152, 204, 89, 17, 235, 223, 7, 49, 231, 96, 119, 144, 0, 163, 189, 171, 214, 7, 158, 246, 151, 152, 60, 218, 15, 0, 105, 12, 240, 96, 122, 6, 1, 113, 102, 230, 52, 195, 105, 31, 123, 209, 31, 119, 142, 250, 167, 130, 155, 195, 11, 103, 200, 94, 55, 20, 106, 35, 125, 252, 128, 38, 22, 210, 55, 117, 2, 93, 8, 146, 106, 50, 4, 240, 201, 144, 144, 132, 87, 28, 129, 96, 253, 118, 15, 145, 191, 108, 228, 13, 216, 188, 240, 245, 91, 209, 56, 163, 37, 250, 167, 164, 42, 46, 66, 100, 134, 48, 39, 14, 92, 234, 128, 129, 243, 178, 116, 209, 243, 118, 29, 62, 217, 126, 14, 220, 156, 79, 10, 179, 73, 159, 192, 221, 242, 23, 46, 70, 219, 162, 228, 106, 139, 253, 104, 26, 204, 104, 170, 221, 151, 142, 11, 119, 20, 71, 33, 79, 57, 73, 96, 207, 220, 250, 171, 196, 152, 53, 15, 154, 86, 122, 220, 111, 131, 129, 88, 156, 26, 205, 167, 206, 33, 123, 88, 30, 14, 160, 133, 0, 126, 173, 130, 165, 146, 201, 138, 102, 92, 109, 205, 159, 131, 40, 250, 74, 233, 143, 1, 171, 6, 117, 73, 190, 89, 143, 244, 206, 174, 201, 113, 164, 44, 38, 220, 192, 229, 135, 214, 6, 191, 117, 111, 29, 9, 54, 56, 244, 192, 173, 69, 225, 52, 124, 105, 251, 140, 238, 56, 56, 199, 5, 68, 94, 200, 119, 226, 97, 180, 113, 90, 171, 198, 162, 126, 153, 217, 232, 108, 102, 46, 27, 192, 125, 219, 146, 142, 191, 100, 142, 208, 9, 24, 221, 220, 124, 21, 53, 102, 57, 216, 14, 156, 176, 119, 26, 235, 204, 93, 133, 188, 174, 224, 114, 139, 58, 255, 205, 133, 142, 139, 183, 42, 97, 184, 107, 122, 18, 161, 189, 41, 67, 250, 143, 195, 28, 244, 187, 54, 240, 97, 247, 49, 1, 3, 5, 107, 30, 104, 154, 18, 131, 250, 89, 68, 43, 113, 6, 251, 29, 80, 143, 125, 101, 81, 37, 107, 9, 174, 152, 178, 45, 35, 85, 67, 36, 131, 37, 190, 32, 155, 249, 101, 89, 76, 191, 120, 28, 86, 64, 248, 135, 180, 238, 226, 46, 141, 99, 140, 137, 169, 118, 132, 39, 154, 176, 83, 187, 200, 135, 124, 173, 111, 169, 134, 86, 55, 88, 120, 103, 34, 71, 104, 43, 248, 147, 130, 96, 98, 16, 249, 17, 30, 8, 122, 223, 182, 119, 120, 141, 195, 115, 248, 181, 131, 238, 173, 128, 17, 200, 49, 54, 25, 135, 160, 164, 114, 72, 177, 146, 113, 216, 186, 131, 27, 164, 211, 54, 72, 165, 248, 181, 17, 188, 166, 186, 251, 21, 24, 45, 122, 50, 190, 167, 50, 201, 139, 96, 251, 82, 134, 81, 117, 16, 69, 119, 155, 38, 153, 122, 44, 84, 252, 54, 153, 42, 135, 209, 195, 252, 104, 53, 69, 27, 156, 135, 92, 63, 59, 94, 23, 214, 63, 144, 49, 183, 242, 148, 122, 136, 253, 252, 109, 193, 22, 121, 43, 136, 7, 211, 154, 223, 190, 230, 231, 42, 9, 7, 141, 249, 95, 56, 40, 212, 153, 161, 79, 137, 239, 174, 229, 116, 51, 239, 253, 179, 137, 95, 19, 196, 109, 77, 62, 181, 28, 81, 21, 248, 83, 226, 223, 231, 230, 238, 248, 199, 184, 78, 227, 212, 93, 236, 44, 246, 101, 192, 20, 177, 236, 170, 91, 176, 225, 112, 121, 79, 57, 75, 177, 133, 54, 33, 145, 136, 165, 245, 148, 185, 152, 186, 199, 29, 65, 220, 192, 72, 68, 239, 197, 227, 84, 163, 110, 90, 206, 79, 80, 2, 184, 92, 123, 200, 127, 123, 188, 158, 2, 10, 143, 120, 102, 60, 138, 64, 69, 7, 141, 212, 71, 169, 6, 86, 165, 175, 216, 14, 128, 164, 95, 92, 223, 255, 255, 3, 162, 176, 159, 90, 74, 145, 88, 66, 37, 10, 251, 108, 235, 252, 82, 19, 169, 12, 26, 210, 138, 152, 238, 203, 208, 254, 75, 71, 80, 98, 15, 35, 243, 138, 115, 12, 224, 75, 36, 158, 35, 133, 23, 210, 250, 135, 143, 119, 221, 240, 65, 178, 78, 14, 19, 66, 223, 95, 61, 204, 141, 171, 156, 71, 137, 76, 43, 71, 118, 137, 207, 176, 118, 120, 104, 248, 218, 113, 118, 121, 159, 77, 160, 151, 124, 12, 80, 55, 38, 199, 235, 37, 95, 244, 21, 255, 51, 78, 49, 49, 99, 21, 218, 109, 74, 105, 251, 99, 2, 163, 219, 139, 242, 194, 181, 178, 89, 109, 3, 49, 56, 6, 60, 150, 10, 43, 200, 219, 208, 25, 69, 182, 30, 201, 226, 4, 115, 238, 2, 188, 60, 209, 82, 111, 38, 135, 171, 40, 125, 253, 129, 71, 244, 52, 228, 197, 185, 173, 25, 132, 99, 88, 92, 231, 199, 48, 127, 141, 240, 53, 113, 44, 16, 11, 115, 39, 38, 17, 50, 208, 67, 8, 63, 76, 90, 192, 143, 11, 118, 67, 104, 158, 254, 143, 237, 74, 222, 216, 166, 213, 28, 87, 206, 33, 108, 156, 205, 239, 219, 75, 155, 28, 133, 73, 116, 240, 163, 84, 110, 89, 29, 39, 201, 60, 108, 67, 231, 68, 188, 55, 195, 125, 234, 33, 95, 184, 200, 5, 47, 108, 201, 79, 59, 226, 115, 92, 148, 102, 56, 195, 148, 140, 27, 30, 47, 229, 42, 205, 49, 0, 80, 102, 103, 65, 114, 138, 15, 13, 18, 227, 130, 23, 36, 81, 28, 35, 144, 62, 61, 83, 96, 193, 98, 6, 244, 202, 127, 120, 102, 219, 23, 151, 119, 226, 76, 121, 7, 70, 104, 205, 95, 14, 115, 145, 30, 165, 193, 39, 145, 142, 24, 60, 144, 97, 214, 101, 55, 61, 138, 208, 109, 147, 138, 102, 64, 49, 249, 86, 200, 202, 101, 2, 124, 40, 227, 217, 179, 47, 227, 216, 214, 138, 238, 220, 143, 231, 27, 165, 41, 32, 123, 172, 97, 84, 92, 131, 191, 65, 252, 248, 147, 21, 162, 134, 115, 22, 50, 4, 53, 82, 216, 114, 153, 253, 216, 8, 200, 112, 173, 64, 230, 233, 96, 50, 59, 59, 120, 137, 55, 90, 207, 251, 2, 95, 216, 47, 98, 103, 186, 11, 251, 24, 232, 246, 161, 59, 177, 201, 50, 141, 169, 233, 139, 151, 49, 150, 206, 22, 22, 253, 19, 222, 42, 233, 190, 22, 157, 227, 73, 117, 101, 234, 62, 188, 20, 37, 109, 38, 201, 103, 233, 202, 193, 205, 119, 141, 100, 141, 119, 77, 33, 11, 22, 195, 23, 216, 21, 71, 203, 91, 33, 73, 150, 1, 181, 12, 8, 44, 118, 254, 196, 150, 135, 64, 214, 34, 46, 254, 188, 85, 22, 104, 130, 248, 213, 53, 178, 17, 54, 205, 160, 55, 164, 251, 70, 84, 35, 194, 163, 64, 237, 91, 80, 19, 33, 203, 232, 45, 209, 132, 245, 234, 245, 63, 177, 211, 179, 207, 177, 249, 188, 87, 138, 125, 221, 44, 207, 157, 228, 22, 50, 35, 245, 237, 119, 46, 251, 150, 87, 164, 170, 137, 222, 0, 95, 12, 179, 76, 28, 117, 254, 105, 145, 221, 119, 194, 134, 97, 24, 109, 93, 176, 231, 123, 68, 82, 32, 164, 196, 43, 35, 141, 99, 56, 110, 57, 135, 142, 85, 145, 235, 202, 201, 211, 200, 6, 119, 107, 67, 119, 209, 24, 15, 185, 35, 230, 169, 35, 181, 166, 50, 81, 171, 71, 227, 172, 215, 117, 93, 86, 54, 241, 188, 206, 77, 62, 152, 62, 234, 19, 123, 94, 95, 93, 88, 53, 88, 10, 227, 108, 111, 67, 104, 60, 237, 118, 45, 92, 84, 217, 146, 224, 80, 86, 234, 216, 120, 157, 229, 112, 99, 149, 146, 49, 8, 56, 247, 99, 195, 149, 89, 44, 82, 193, 149, 35, 191, 85, 99, 35, 163, 87, 123, 125, 14, 132, 253, 5, 30, 3, 165, 248, 219, 26, 130, 96, 5, 174, 114, 110, 62, 172, 7, 158, 99, 77, 147, 99, 136, 64, 210, 142, 30, 49, 173, 196, 209, 61, 83, 36] + ], + "segmentSize": null + }, + { + "encrypted": [ + [147, 10, 90, 51, 8, 120, 221, 138, 55, 61, 54, 203, 60, 35, 121, 163, 223, 91, 158, 55, 212, 120, 224, 105, 223, 73, 81, 129, 63, 176, 243, 52, 148, 138, 148, 131, 55, 229, 209, 158, 212, 10, 146, 176, 16, 147, 49, 230, 94, 81, 181, 103, 109, 83, 177, 65, 56, 222, 249, 40, 94, 154, 251, 160, 200, 141, 96, 76, 97, 199, 11, 226, 193, 219, 251, 55, 27, 0, 125, 32, 10, 29, 0, 160, 49, 29, 49, 47, 91, 90, 134, 158, 238, 92, 31, 254, 45, 182, 109, 4, 172, 214, 129, 175, 64, 153, 117, 117, 183, 180, 114, 187, 70, 148, 119, 207, 28, 243, 7, 172, 80, 157, 238, 177, 12, 88, 249, 104, 22, 134, 220, 64, 192, 117, 94, 10, 205, 245, 129, 172, 196, 230, 4, 74, 51, 222, 69, 101, 165, 186, 166, 178, 151, 208, 251, 72, 109, 177, 181, 38, 53, 96, 96, 23, 207, 251, 151, 18, 113, 251, 30, 161, 39, 109, 116, 113, 28, 232, 223, 34, 137, 109, 0, 252, 153, 79, 173, 157, 77, 70, 86, 17, 196, 152, 93, 222, 240, 14, 255, 20, 81, 204, 112, 164, 24, 0, 148, 7, 40, 71, 201, 134, 105, 163, 41, 247, 148, 134, 79, 144, 92, 155, 162, 40, 207, 175, 219, 243, 107, 83, 208, 44, 83, 255, 248, 95, 162, 198, 144, 12, 238, 234, 197, 27, 29, 71, 104, 200, 227, 19, 91, 138, 221, 145, 141, 126, 220, 71, 254, 74, 147, 212, 232, 150, 168, 178, 103, 214, 51, 81, 197, 207, 168, 254, 132, 175, 134, 182, 237, 199, 248, 241, 163, 145, 124, 150, 175, 13, 33, 227, 117, 158, 201, 180, 145, 92, 9, 83, 252, 227, 190, 81, 6, 27, 180, 117, 249, 86, 203, 114, 172, 222, 190, 193, 52, 43, 135, 65, 173, 184, 189, 98, 190, 202, 113, 249, 233, 202, 38, 242, 201, 71, 6, 189, 137, 147, 124, 252, 31, 83, 12, 238, 142, 82, 231, 249, 41, 187, 93, 205, 38, 162, 165, 24, 223, 125, 9, 15, 31, 115, 26, 174, 165, 123, 194, 68, 1, 140, 97, 10, 252, 213, 140, 250, 254, 18, 211, 118, 217, 222, 184, 15, 232, 8, 187, 148, 226, 21, 102, 186, 233, 94, 6, 42, 234, 189, 159, 24, 209, 227, 159, 110, 108, 212, 238, 158, 102, 252, 70, 7, 195, 116, 138, 232, 239, 163, 20, 8, 70, 74, 2, 190, 142, 249, 65, 41, 198, 252, 171, 63, 63, 195, 134, 67, 140, 98, 2, 203, 166, 117, 159, 11, 204, 41, 133, 191, 195, 27, 179, 1, 252, 87, 129, 148, 114, 204, 119, 217, 8, 27, 141, 150, 27, 18, 20, 233, 124, 181, 103, 66, 21, 110, 55, 166, 126, 170, 83, 245, 37, 174, 250, 38, 228, 179, 65, 159, 210, 117, 215, 249, 65, 33, 198, 185, 31, 243, 93, 107, 173, 156, 255, 24, 64, 118, 184, 228, 211, 199, 249, 130, 60, 126, 78, 117, 170, 137, 123, 40, 7, 25, 81, 139, 17, 166, 11, 75, 129, 154, 68, 63, 128, 148, 151, 96, 55, 26, 219, 13, 71, 30, 2, 161, 148, 38, 198, 113, 8, 154, 65, 162, 78, 146, 248, 14, 44, 152, 152, 27, 49, 248, 80, 233, 151, 239, 62, 81, 34, 122, 195, 159, 18, 190, 90, 40, 152, 24, 81, 121, 110, 88, 173, 251, 128, 171, 123, 183, 129, 163, 42, 140, 140, 58, 21, 169, 190, 106, 48, 221, 175, 38, 150, 252, 247, 206, 111, 216, 55, 181, 64, 168, 181, 188, 83, 144, 37, 123, 216, 177, 227, 182, 30, 230, 198, 90, 63, 177, 243, 194, 157, 231, 122, 83, 195, 64, 4, 90, 68, 137, 96, 246, 38, 203, 215, 47, 20, 59, 115, 25, 213, 230, 209, 71, 67, 29, 147, 104, 233, 6, 215, 78, 137, 40, 171, 201, 156, 103, 31, 209, 220, 150, 249, 72, 212, 216, 11, 175, 206, 225, 145, 36, 228, 44, 224, 125, 206, 83, 46, 63, 103, 214, 114, 188, 19, 165, 130, 137, 68, 130, 39, 101, 147, 102, 7, 200, 249, 143, 18, 12, 165, 238, 250, 233, 102, 124, 59, 170, 168, 184, 39, 122, 21, 124, 113, 215, 199, 68, 218, 213, 125, 25, 132, 39, 37, 74, 22, 131, 67, 197, 124, 178, 165, 120, 153, 152, 244, 98, 38, 83, 179, 191, 255, 147, 96, 157, 77, 167, 42, 42, 179, 128, 112, 69, 154, 240, 165, 121, 12, 192, 194, 174, 18, 41, 35, 65, 56, 159, 78, 1, 47, 172, 22, 45, 155, 228, 101, 190, 247, 168, 190, 174, 191, 109, 50, 223, 166, 179, 209, 12, 163, 197, 232, 190, 108, 96, 158, 207, 28, 81, 202, 46, 105, 102, 75, 244, 72, 110, 197, 176, 201, 127, 82, 5, 5, 14, 59, 147, 183, 51, 38, 178, 224, 201, 52, 126, 47, 103, 147, 153, 73, 165, 193, 201, 41, 241, 90, 113, 120, 56, 127, 197, 150, 77, 99, 19, 0, 27, 203, 189, 97, 81, 17, 187, 13, 84, 7, 158, 170, 33, 25, 62, 253, 241, 82, 55, 254, 11, 26, 99, 254, 213, 99, 35, 217, 81, 108, 39, 8, 220, 235, 161, 193, 86, 64, 47, 105, 184, 214, 171, 220, 244, 142, 230, 110, 113, 237, 196, 214, 122, 167, 210, 10, 74, 235, 196, 194, 175, 107, 74, 191, 111, 47, 227, 119, 190, 185, 145, 70, 220, 233, 5, 37, 159, 168, 60, 222, 106, 238, 63, 35, 46, 247, 224, 168, 45, 183, 139, 36, 50, 227, 172, 65, 233, 101, 220, 188, 218, 58, 163, 150, 28, 53, 122, 192, 41, 39, 11, 13, 234, 247, 171, 26, 23, 114, 71, 192, 140, 38, 65, 202, 187, 158, 178, 145, 229, 98, 149, 8, 127, 26, 199, 236, 224, 60, 62, 127, 104, 189, 128, 220, 205, 250, 122, 82, 10, 34, 201, 238, 193, 234, 167, 244, 70, 9, 74, 242, 9, 239, 163, 58, 154, 164, 34, 137, 66, 100, 186, 116, 153, 193, 113, 200, 203, 126, 177, 97, 137, 200, 25, 99, 164, 39, 55, 225, 252, 159, 208, 208, 248, 176, 244, 100, 171, 115, 71, 82, 128, 54, 187, 146, 2, 56, 81, 98, 96, 88, 74, 203, 223, 245, 96, 3, 118, 28, 134, 199, 92, 144, 67, 143, 11, 172, 28, 135, 235, 90, 153, 237, 127, 186, 78, 218, 204, 161, 145, 36, 51, 159, 86, 142, 168, 54, 63, 47, 47, 251, 160, 55, 97, 235, 175, 136, 127, 82, 34, 216, 10, 76, 109, 254, 41, 190, 188, 15, 14, 47, 81, 74, 18, 37, 49, 3, 143, 185, 132, 7, 161, 201, 200, 24, 64, 220, 87, 164, 229, 105, 108, 13, 4, 185, 225, 59, 146, 26, 42, 40, 128, 131, 148, 148, 168, 21, 114, 157, 43, 224, 142, 232, 155, 14, 220, 129, 12, 42, 183, 123, 235, 78, 122, 78, 191, 29, 92, 165, 68, 172, 107, 243, 117, 58, 185, 204, 231, 226, 187, 67, 32, 127, 26, 52, 62, 195, 222, 233, 236, 247, 70, 173, 65, 153, 148, 28, 193, 13, 147, 216, 28, 145, 219, 34, 230, 35, 100, 11, 108, 87, 142, 140, 165, 224, 130, 229, 35, 95, 84, 173, 245, 183, 137, 116, 80, 26, 35, 239, 224, 4, 243, 250, 96, 221, 37, 254, 57, 187, 99, 149, 192, 87, 235, 63, 236, 206, 237, 118, 188, 238, 191, 207, 38, 154, 53, 252, 208, 121, 177, 156, 57, 118, 52, 43, 3, 60, 51, 198, 165, 112, 63, 130, 188, 169, 1, 14, 167, 100, 151, 45, 149, 44, 253, 39, 170, 90, 65, 201, 14, 91, 95, 76, 60, 44, 249, 12, 178, 112, 153, 102, 244, 45, 105, 207, 135, 233, 206, 26, 228, 230, 61, 42, 135, 99, 125, 21, 134, 190, 215, 46, 220, 19, 1, 12, 10, 1, 80, 10, 238, 62, 51, 23, 123, 3, 245, 21, 129, 56, 142, 100, 41, 166, 234, 96, 174, 145, 18, 60, 246, 249, 64, 130, 126, 147, 82, 161, 129, 184, 242, 7, 215, 245, 224, 192, 52, 35, 10, 215, 170, 165, 131, 173, 99, 13, 231, 187, 193, 70, 220, 145, 210, 0, 66, 204, 221, 249, 56, 18, 135, 115, 221, 153, 32, 42, 228, 213, 54, 190, 184, 22, 153, 99, 239, 197, 197, 251, 163, 152, 79, 201, 3, 65, 83, 77, 173, 125, 128, 3, 130, 20, 191, 247, 49, 233, 62, 20, 2, 134, 130, 52, 158, 48, 217, 99, 175, 215, 21, 48, 77, 26, 138, 190, 91, 99, 150, 143, 217, 4, 153, 117, 249, 102, 12, 65, 16, 96, 234, 86, 101, 151, 142, 121, 55, 182, 57, 239, 150, 37, 246, 39, 244, 29, 86, 44, 2, 177, 227, 180, 9, 210, 152, 240, 159, 19, 121, 135, 46, 27, 129, 202, 2, 131, 15, 221, 105, 174, 80, 146, 247, 20, 5, 43, 23, 162, 76, 195, 198, 180, 71, 114, 190, 123, 218, 135, 0, 90, 75, 149, 158, 205, 20, 189, 94, 82, 89, 156, 170, 14, 133, 239, 18, 99, 168, 252, 0, 162, 85, 247, 148, 177, 5, 116, 53, 113, 125, 170, 145, 11, 123, 237, 214, 101, 20, 200, 12, 241, 168, 165, 127, 104, 19, 170, 92, 133, 144, 54, 88, 124, 37, 117, 233, 126, 88, 184, 180, 237, 196, 234, 144, 93, 242, 229, 230, 58, 217, 239, 233, 6, 126, 111, 37, 102, 187, 168, 25, 154, 41, 16, 102, 122, 133, 53, 95, 57, 236, 165, 81, 154, 156, 95, 92, 0, 222, 178, 68, 95, 225, 179, 19, 189, 252, 160, 30, 95, 218, 253, 189, 111, 81, 40, 186, 60, 31, 120, 4, 172, 99, 142, 3, 144, 93, 214, 143, 101, 249, 167, 183, 110, 82, 202, 43, 70, 103, 172, 77, 19, 7, 115, 242, 54, 13, 75, 39, 175, 56, 213, 200, 161, 252, 143, 40, 238, 53, 223, 250, 196, 198, 150, 245, 83, 8, 220, 116, 224, 125, 124, 249, 230, 33, 157, 131, 18, 81, 158, 199, 151, 14, 15, 54, 80, 15, 110, 84, 206, 10, 52, 30, 206, 181, 21, 41, 146, 253, 103, 242, 29, 4, 26, 41, 131, 90, 241, 237, 111, 49, 140, 98, 138, 14, 215, 182, 246, 11, 235, 190, 196, 12, 41, 228, 121, 3, 128, 98, 83, 237, 203, 219, 118, 220, 134, 186, 251, 65, 190, 88, 65, 87, 86, 135, 115, 47, 167, 124, 209, 92, 133, 15, 231, 37, 141, 76, 177, 229, 227, 186, 223, 239, 250, 83, 213, 176, 106, 34, 118, 12, 229, 70, 185, 127, 67, 97, 224, 180, 125, 163, 90, 37, 13, 39, 154, 163, 56, 190, 113, 24, 207, 210, 161, 53, 160, 100, 232, 13, 181, 144, 114, 183, 39, 189, 23, 112, 254, 130, 30, 165, 223, 163, 17, 206, 208, 66, 64, 156, 64, 117, 209, 99, 4, 247, 207, 90, 72, 57, 47, 141, 59, 146, 32, 209, 143, 170, 74, 136, 45, 40, 200, 250, 48, 85, 92, 58, 180, 25, 213, 35, 200, 43, 17, 125, 67, 178, 163, 174, 234, 186, 70, 211, 120, 19, 195, 247, 154, 146, 245, 34, 226, 225, 76, 96, 52, 140, 179, 1, 52, 214, 117, 47, 77, 117, 247, 204, 12, 46, 183, 10, 127, 124, 75, 16, 203, 109, 149, 100, 50, 159, 25, 9, 217, 138, 190, 113, 161, 170, 184, 64, 71, 162, 137, 124, 217, 220, 12, 247, 173, 141, 171, 185, 57, 170, 103, 134, 172, 92, 224, 186, 122, 66, 221, 142, 171, 93, 193, 178, 93, 179, 121, 152, 183, 24, 83, 92, 119, 73, 18, 137, 136, 251, 135, 123, 220, 63, 254, 14, 85, 20, 73, 238, 119, 147, 208, 73, 132, 77, 244, 143, 130, 154, 104, 44, 79, 194, 126, 17, 86, 214, 138, 205, 40, 53, 134, 192, 107, 158, 156, 231, 8, 213, 187, 100, 67, 83, 109, 70, 251, 4, 247, 175, 31, 207, 57, 155, 32, 26, 143, 95, 32, 238, 13, 21, 146, 117, 82, 123, 59, 49, 114, 244, 54, 128, 193, 19, 217, 199, 27, 156, 97, 84, 112, 134, 41, 213, 75, 54, 146, 38, 156, 62, 39, 15, 74, 51, 43, 231, 51, 9, 136, 167, 20, 117, 116, 19, 91, 56, 7, 112, 67, 80, 91, 60, 197, 77, 33, 220, 166, 138, 60, 107, 172, 231, 254, 198, 24, 178, 215, 4, 52, 105, 71, 45, 55, 200, 116, 254, 55, 32, 62, 31, 79, 44, 240, 61, 226, 144, 234, 119, 17, 67, 60, 234, 161, 237, 115, 171, 143, 217, 113, 95, 207, 243, 126, 222, 130, 10, 184, 1, 180, 149, 166, 51, 233, 109, 103, 175, 118, 85, 179, 251, 58, 21, 55, 192, 167, 118, 96, 43, 127, 203, 232, 205, 242, 247, 147, 187, 150, 110, 130, 180, 20, 51, 7, 7, 230, 156, 77, 18, 240, 28, 173, 149, 9, 2, 161, 185, 237, 236, 148, 198, 65, 30, 102, 189, 1, 209, 82, 101, 45, 21, 166, 166, 103, 24, 66, 32, 79, 222, 237, 54, 10, 37, 29, 241, 17, 98, 0, 179, 168, 155, 58, 208, 13, 107, 233, 30, 192, 79, 224, 93, 97, 253, 125, 29, 62, 167, 0, 229, 243, 166, 73, 17, 154, 190, 41, 127, 213, 214, 167, 13, 128, 224, 153, 211, 121, 230, 51, 23, 118, 148, 65, 241, 187, 133, 85, 220, 158, 201, 21, 70, 23, 57, 103, 89, 84, 89, 146, 166, 226, 253, 94, 43, 139, 195, 143, 209, 113, 234, 53, 146, 226, 190, 107, 197, 49, 79, 139, 128, 82, 123, 207, 201, 61, 111, 158, 157, 154, 73, 80, 234, 241, 113, 9, 76, 62, 209, 210, 108, 46, 24, 88, 218, 191, 132, 129, 252, 176, 110, 51, 128, 38, 51, 100, 235, 144, 187, 137, 50, 31, 82, 24, 159, 146, 163, 59, 95, 205, 87, 35, 36, 168, 214, 78, 185, 103, 114, 185, 42, 81, 45, 210, 177, 193, 176, 214, 27, 109, 53, 93, 29, 183, 17, 4, 206, 39, 170, 145, 42, 149, 68, 44, 233, 52, 133, 118, 244, 106, 194, 153, 248, 179, 47, 245, 94, 43, 99, 81, 231, 15, 177, 12, 66, 226, 220, 132, 57, 239, 255, 122, 69, 64, 100, 242, 147, 188, 157, 250, 74, 54, 112, 137, 234, 251, 251, 6, 73, 86, 253, 177, 161, 31, 170, 184, 164, 205, 93, 95, 105, 165, 166, 133, 207, 188, 237, 44, 212, 173, 199, 184, 125, 37, 129, 184, 43, 241, 229, 204, 57, 105, 134, 220, 88, 191, 221, 65, 19, 100, 27, 32, 183, 91, 249, 75, 175, 92, 35, 161, 241, 109, 51, 53, 129, 8, 240, 164, 156, 46, 248, 38, 65, 239, 182, 197, 237, 99, 114, 50, 212, 89, 139, 59, 29, 56, 42, 167, 26, 122, 205, 180, 247, 238, 148, 120, 22, 249, 235, 20, 14, 137, 217, 76, 88, 19, 111, 225, 149, 64, 246, 235, 116, 91, 64, 70, 53, 59, 234, 136, 70, 11, 100, 51, 144, 178, 254, 148, 88, 176, 89, 227, 77, 95, 248, 235, 19, 230, 106, 192, 237, 170, 156, 124, 40, 249, 80, 167, 49, 93, 135, 210, 35, 137, 201, 26, 16, 119, 116, 111, 62, 106, 246, 78, 147, 19, 202, 34, 195, 99, 255, 96, 202, 92, 181, 60, 207, 75, 220, 77, 100, 231, 35, 10, 164, 67, 239, 239, 224, 117, 59, 35, 184, 150, 143, 165, 139, 47, 201, 133, 153, 6, 216, 149, 6, 166, 151, 142, 105, 195, 39, 193, 231, 73, 177, 75, 22, 223, 104, 251, 164, 232, 174, 111, 196, 47, 56, 207, 189, 75, 0, 93, 19, 152, 172, 37, 70, 242, 161, 154, 6, 184, 240, 217, 87, 13, 90, 16, 198, 14, 209, 248, 123, 204, 203, 92, 109, 3, 128, 19, 144, 249, 194, 131, 231, 199, 124, 201, 163, 196, 231, 56, 59, 177, 183, 142, 149, 198, 157, 161, 220, 125, 157, 9, 122, 195, 172, 98, 243, 95, 250, 8, 165, 247, 110, 162, 81, 0, 221, 12, 6, 208, 132, 22, 185, 182, 251, 20, 27, 165, 224, 118, 234, 14, 100, 39, 239, 224, 208, 111, 147, 220, 91, 16, 203, 86, 219, 226, 161, 219, 18, 67, 178, 135, 30, 28, 68, 157, 79, 255, 148, 243, 84, 161, 28, 88, 39, 134, 206, 79, 95, 217, 4, 86, 62, 174, 10, 79, 195, 16, 41, 197, 235, 251, 115, 94, 143, 16, 18, 192, 135, 225, 58, 232, 227, 138, 76, 2, 211, 80, 45, 113, 183, 21, 30, 91, 23, 174, 148, 242, 228, 95, 210, 16, 203, 39, 138, 17, 181, 75, 110, 106, 236, 213, 159, 50, 111, 119, 81, 190, 52, 139, 20, 69, 79, 52, 108, 82, 109, 234, 163, 134, 20, 112, 49, 126, 109, 235, 16, 146, 42, 136, 96, 59, 110, 206, 15, 72, 11, 250, 169, 140, 5, 100, 172, 185, 128, 167, 188, 105, 217, 223, 53, 188, 230, 238, 150, 122, 160, 186, 162, 146, 121, 12, 161, 253, 32, 236, 73, 84, 80, 11, 120, 154, 60, 25, 184, 143, 104, 194, 230, 153, 252, 115, 168, 143, 226, 54, 231, 18, 128, 198, 219, 59, 38, 74, 95, 49, 198, 230, 190, 236, 122, 126, 121, 106, 112, 22, 82, 244, 14, 202, 148, 96, 153, 160, 12, 55, 249, 81, 146, 188, 102, 224, 236, 143, 120, 80, 114, 3, 45, 232, 85, 158, 198, 135, 128, 145, 143, 64, 48, 189, 199, 223, 107, 161, 78, 159, 200, 76, 192, 40, 103, 21, 13, 117, 156, 191, 252, 77, 75, 217, 155, 231, 242, 31, 29, 255, 228, 23, 173, 76, 158, 180, 150, 11, 225, 169, 71, 92, 40, 209, 32, 163, 29, 111, 74, 131, 253, 148, 49, 166, 0, 195, 53, 149, 223, 92, 169, 63, 249, 84, 251, 75, 242, 240, 55, 205, 249, 84, 181, 6, 39, 227, 187, 7, 29, 154, 21, 220, 48, 156, 179, 121, 80, 196, 0, 187, 207, 81, 225, 112, 95, 135, 20, 234, 40, 87, 108, 15, 189, 21, 38, 109, 195, 86, 84, 210, 196, 166, 227, 230, 209, 24, 47, 154, 196, 128, 79, 139, 234, 122, 96, 45, 168, 83, 183, 177, 221, 27, 123, 174, 25, 167, 89, 77, 183, 158, 131, 201, 160, 179, 208, 122, 120, 214, 31, 158, 217, 84, 175, 241, 160, 185, 223, 88, 72, 223, 89, 19, 239, 14, 51, 142, 241, 240, 176, 22, 122, 232, 212, 236, 71, 211, 12, 182, 108, 96, 236, 109, 110, 74, 168, 82, 153, 86, 92, 228, 6, 9, 115, 12, 137, 63, 182, 100, 214, 84, 213, 246, 221, 18, 208, 74, 220, 144, 131, 136, 4, 58, 164, 114, 24, 166, 133, 181, 99, 167, 43, 231, 105, 230, 13, 45, 88, 232, 143, 242, 160, 115, 65, 92, 155, 196, 24, 212, 53, 30, 122, 160, 240, 73, 32, 233, 202, 15, 41, 15, 215, 100, 67, 20, 191, 229, 97, 217, 6, 225, 249, 26, 162, 88, 234, 158, 228, 105, 114, 83, 62, 183, 37, 250, 63, 139, 167, 159, 148, 89, 128, 250, 41, 90, 79, 26, 50, 26, 221, 70, 51, 170, 95, 210, 127, 69, 188, 62, 80, 22, 37, 20, 44, 231, 147, 10, 73, 11, 210, 186, 57, 8, 13, 70, 103, 176, 74, 231, 119, 233, 44, 242, 157, 224, 222, 110, 34, 205, 9, 210, 117, 112, 122, 98, 37, 239, 206, 59, 31, 248, 59, 166, 245, 176, 122, 69, 211, 39, 62, 252, 168, 230, 96, 251, 250, 222, 180, 182, 231, 169, 201, 115, 175, 116, 1, 91, 151, 177, 55, 68, 10, 207, 198, 209, 156, 211, 110, 37, 204, 231, 61, 34, 107, 57, 17, 230, 132, 126, 140, 83, 34, 83, 205, 40, 123, 144, 37, 171, 193, 127, 96, 59, 109, 10, 71, 200, 199, 126, 130, 36, 37, 53, 220, 15, 96, 39, 88, 192, 123, 68, 197, 60, 131, 148, 201, 152, 131, 119, 202, 55, 51, 199, 226, 216, 185, 172, 146, 103, 142, 146, 111, 71, 221, 165, 230, 71, 238, 13, 168, 142, 202, 58, 167, 159, 164, 228, 5, 140, 129, 126, 251, 114, 12, 183, 29, 79, 130, 254, 15, 164, 171, 184, 121, 86, 244, 28, 168, 5, 113, 219, 115, 202, 200, 173, 84, 10, 49, 222, 115, 9, 125, 28, 185, 48, 56, 130, 223, 170, 64, 65, 203, 173, 127, 142, 143, 244, 115, 43, 33, 148, 191, 49, 98, 220, 105, 194, 140, 236, 190, 99, 152, 102, 187, 114, 74, 233, 218, 130, 99, 12, 104, 166, 122, 161, 185, 232, 98, 241, 96, 229, 24, 252, 204, 12, 39, 74, 237, 220, 202, 57, 182, 55, 105, 83, 143, 142, 190, 52, 155, 248, 152, 82, 113, 175, 69, 51, 81, 85, 250, 71, 161, 131, 27, 244, 49, 112, 232, 206, 16, 140, 97, 208, 69, 145, 123, 223, 209, 59, 245, 142, 125, 71, 169, 40, 178, 118, 42, 5, 99, 195, 162, 155, 38, 243, 76, 218, 248, 13, 113, 191, 134, 160, 192, 179, 254, 252, 230, 79, 241, 250, 88, 60, 186, 104, 210, 170, 168, 199, 199, 14, 185, 211, 65, 67, 157, 100, 135, 155, 229, 208, 131, 170, 219, 8, 247, 63, 138, 39, 98, 38, 225, 205, 251, 198, 119, 148, 198, 48, 206, 70, 92, 237, 232, 116, 112, 133, 165, 136, 239, 139, 62, 88, 86, 197, 131, 136, 129, 168, 250, 16, 82, 193, 170, 139, 201, 223, 165, 214, 163, 225, 3, 0, 162, 30, 42, 244, 183, 120, 147, 250, 95, 185, 141, 37, 245, 15, 153, 215, 175, 26, 244, 6, 172, 140, 245, 69, 62, 141, 193, 61, 194, 226, 195, 208, 190, 116, 162, 239, 223, 174, 85, 233, 215, 210, 28, 246, 86, 170, 175, 72, 154, 156, 171, 235, 13, 190, 243, 172, 240, 207, 214, 149, 236, 11, 130, 177, 60, 197, 236, 116, 222, 71, 98, 245, 151, 248, 174, 53, 43, 91, 121, 151, 211, 55, 210, 209, 68, 14, 175, 235, 28, 118, 6, 240, 69, 48, 174, 190, 169, 87, 46, 50, 76, 233, 101, 13, 5, 232, 5, 203, 93, 100, 216, 87, 204, 191, 223, 157, 251, 6, 165, 40, 114, 179, 182, 168, 54, 125, 123, 174, 241, 119, 29, 240, 138, 189, 80, 169, 89, 97, 97, 195, 81, 18, 206, 139, 193, 227, 234, 0, 107, 46, 60, 157, 100, 102, 143, 161, 224, 18, 205, 89, 246, 119, 180, 138, 195, 1, 168, 57, 234, 228, 230, 147, 239, 133, 232, 10, 22, 173, 251, 205, 154, 18, 43, 70, 113, 5, 3, 117, 36, 19, 16, 240, 38, 34, 83, 184, 96, 152, 37, 86, 133, 192, 18, 246, 104, 221, 252, 104, 60, 250, 217, 35, 238, 239, 43, 127, 83, 69, 13, 147, 32, 93, 65, 29, 190, 106, 55, 165, 185, 26, 43, 98, 64, 129, 217, 250, 52, 104, 138, 212, 109, 220, 247, 9, 139, 139, 95, 19, 208, 251, 235, 139, 157, 130, 73, 2, 30, 134, 9, 188, 27, 125, 20, 8, 77, 206, 138, 28, 65, 7, 78, 83, 240, 247, 127, 241, 114, 182, 60, 36, 42, 113, 169, 241, 204, 8, 159, 16, 121, 254, 137, 161, 25, 243, 144, 119, 56, 32, 89, 208, 23, 175, 69, 40, 102, 156, 17, 227, 51, 201, 123, 252, 63, 20, 245, 184, 164, 254, 158, 78, 38, 142, 192, 129, 194, 219, 208, 223, 158, 67, 128, 54, 101, 9, 3, 131, 24, 33, 222, 246, 242, 113, 125, 114, 18, 139, 236, 251, 191, 19, 76, 188, 248, 204, 192, 244, 33, 109, 133, 46, 33, 9, 79, 159, 105, 41, 218, 23, 59, 68, 227, 87, 135, 190, 76, 34, 113, 248, 45, 154, 159, 216, 91, 3, 57, 128, 89, 130, 63, 80, 40, 137, 36, 101, 82, 190, 90, 206, 191, 101, 204, 43, 29, 82, 228, 105, 23, 217, 101, 15, 94, 80, 184, 143, 215, 0, 155, 156, 192, 56, 152, 241, 136, 156, 204, 249, 250, 22, 29, 69, 223, 112, 210, 142, 53, 60, 39, 233, 82, 66, 109, 18, 100, 168, 81, 91, 71, 58, 184, 95, 139, 184, 235, 124, 206, 110, 229, 119, 10, 237, 45, 150, 95, 209, 158, 149, 136, 137, 103, 131, 209, 209, 13, 78, 2, 108, 108, 35, 36, 161, 238, 208, 127, 157, 209, 119, 5, 210, 54, 118, 239, 4, 128, 124, 178, 1, 158, 189, 242, 138, 202, 248, 107, 121, 143, 33, 205, 70, 189, 51, 5, 224, 85, 51, 253, 208, 115, 138, 187, 233, 248, 143, 102, 220, 18, 16, 129, 189, 236, 239, 69, 223, 96, 156, 226, 35, 171, 94, 222, 173, 154, 133, 12, 118, 156, 55, 18, 155, 174, 21, 199, 91, 77, 52, 38, 77, 230, 96, 250, 24, 0, 170, 59, 188, 35, 178, 195, 119, 117, 192, 188, 224, 63, 253, 189, 242, 149, 225, 97, 177, 49, 252, 172, 175, 52, 205, 41, 92, 155, 78, 180, 22, 152, 195, 152, 136, 195, 143, 244, 79, 120, 60, 79, 66, 180, 88, 130, 35, 40, 112, 9, 112, 86, 95, 210, 175, 205, 218, 131, 212, 111, 52, 204, 214, 107, 104, 131, 40, 64, 163, 196, 152, 16, 223, 153, 192, 58, 15, 81, 7, 219, 208, 237, 38, 61, 53, 196, 168, 226, 192, 171, 227, 104, 238, 108, 199, 6, 127, 226, 200, 252, 117, 38, 110, 100, 77, 154, 15, 248, 190, 107, 4, 174, 40, 126, 9, 179, 197, 110, 59, 88, 196, 39, 218, 89, 222, 151, 205, 183, 147, 174, 193, 76, 184, 95, 224, 214, 137, 151, 143, 39, 22, 222, 222, 116, 216, 43, 75, 232, 238, 39, 67, 33, 243, 97, 87, 231, 5, 202, 71, 156, 0, 251, 90, 238, 223, 206, 155, 47, 111, 21, 204, 116, 44, 179, 64, 21, 75, 154, 23, 108, 228, 180, 130, 87, 191, 73, 134, 178, 91, 85, 72, 98, 15, 14, 143, 82, 5, 241, 106, 190, 232, 243, 59, 219, 199, 195, 176, 143, 128, 1, 120, 232, 183, 45, 202, 74, 152, 8, 32, 82, 255, 161, 53, 36, 195, 124, 119, 51, 66, 58, 23, 87, 120, 26, 138, 80, 89, 167, 167, 84, 191, 163, 86, 33, 173, 81, 16, 52, 248, 17, 235, 204, 253, 136, 96, 201, 179, 178, 168, 255, 64, 161, 42, 73, 185, 123, 246, 24, 147, 233, 18, 139, 195, 194, 45, 248, 228, 143, 117, 255, 206, 95, 129, 23, 109, 47, 251, 51, 67, 28, 74, 255, 144, 133, 50, 213, 200, 203, 189, 112, 75, 226, 241, 84, 161, 228, 207, 220, 135, 61, 1, 101, 33, 200, 209, 115, 82, 38, 97, 248, 21, 72, 244, 59, 172, 144, 156, 233, 196, 76, 55, 125, 0, 178, 35, 229, 120, 29, 43, 246, 253, 80, 152, 137, 151, 106, 164, 132, 18, 98, 187, 67, 31, 153, 237, 217, 179, 164, 154, 44, 185, 251, 193, 108, 88, 72, 244, 124, 143, 103, 135, 165, 50, 220, 224, 110, 146, 187, 85, 7, 136, 231, 95, 23, 243, 83, 0, 166, 204, 128, 128, 163, 246, 31, 21, 67, 109, 232, 28, 107, 68, 82, 105, 247, 237, 116, 21, 147, 199, 21, 12, 243, 176, 197, 170, 74, 58, 70, 49, 226, 69, 219, 189, 207, 25, 217, 41, 43, 117, 169, 239, 164, 47, 219, 216, 170, 133, 62, 59, 82, 160, 150, 20, 222, 216, 89, 59, 80, 114, 20, 22, 131, 119, 75, 100, 174, 83, 145, 181, 177, 239, 229, 160, 117, 51, 86, 133, 93, 33, 109, 189, 21, 230, 84, 202, 109, 76, 13, 27, 74, 75, 198, 28, 16, 4, 51, 59, 229, 13, 97, 18, 38, 68, 199, 113, 184, 65, 218, 23, 166, 188, 219, 128, 79, 31, 73, 144, 57, 120, 212, 163, 74, 220, 221, 110, 229, 191, 124, 81, 55, 99, 134, 179, 53, 242, 161, 155, 161, 246, 207, 190, 253, 180, 146, 237, 237, 11, 198, 40, 116, 60, 59, 9, 54, 71, 239, 196, 230, 104, 165, 233, 250, 153, 9, 209, 96, 145, 32, 193, 152, 22, 70, 225, 193, 135, 157, 158, 212, 189, 92, 106, 0, 25, 196, 210, 208, 242, 2, 103, 34, 173, 177, 215, 163, 54, 244, 215, 152, 68, 204, 236, 126, 93, 215, 26, 246, 206, 28, 3, 29, 237, 47, 211, 227, 250, 234, 116, 34, 203, 36, 93, 171, 61, 3, 160, 243, 244, 248, 106, 189, 218, 218, 234, 96, 213, 246, 218, 74, 229, 255, 57, 147, 244, 15, 67, 93, 242, 117, 246, 83, 30, 237, 79, 181, 194, 154, 106, 193, 186, 133, 51, 164, 94, 9, 156, 67, 232, 209, 35, 10, 48, 76, 222, 138, 233, 81, 39, 57, 97, 224, 28, 42, 175, 174, 247, 215, 71, 204, 48, 177, 150, 161, 192, 133, 193, 25, 233, 177, 246, 84, 33, 245, 19, 201, 155, 102, 222, 210, 215, 5, 186, 123, 135, 172, 58, 148, 143, 66, 252, 175, 78, 105, 155, 91, 223, 211, 101, 145, 72, 139, 116, 204, 20, 0, 209, 185, 219, 199, 35, 40, 253, 143, 78, 219, 117, 59, 172, 192, 250, 85, 29, 108, 27, 73, 91, 190, 214, 5, 9, 107, 172, 154, 225, 223, 69, 96, 244, 10, 137, 182, 26, 225, 56, 19, 18, 10, 192, 214, 203, 130, 13, 77, 69, 198, 189, 82, 104, 190, 195, 68, 16, 70, 118, 101, 108, 96, 49, 101, 216, 143, 213, 52, 95, 26, 16, 20, 34, 125, 189, 118, 206, 47, 250, 51, 188, 160, 195, 111, 157, 79, 196, 227, 137, 63, 140, 202, 221, 30, 60, 122, 99, 248, 164, 211, 161, 129, 66, 78, 167, 248, 219, 217, 138, 63, 167, 120, 199, 249, 91, 13, 135, 33, 58, 23, 48, 255, 134, 233, 5, 83, 74, 2, 38, 0, 35, 146, 98, 85, 44, 212, 146, 84, 84, 153, 65, 108, 146, 251, 20, 3, 142, 247, 129, 254, 177, 12, 98, 168, 252, 114, 67, 214, 54, 173, 214, 87, 20, 150, 158, 1, 72, 110, 193, 38, 18, 201, 77, 140, 158, 140, 58, 255, 62, 189, 121, 226, 1, 224, 171, 241, 237, 253, 201, 148, 214, 82, 161, 161, 151, 82, 146, 142, 210, 50, 68, 173, 100, 55, 160, 247, 50, 209, 176, 66, 223, 72, 218, 49, 240, 11, 226, 35, 184, 21, 87, 47, 177, 243, 33, 254, 52, 14, 132, 42, 242, 139, 246, 128, 238, 91, 115, 195, 35, 241, 168, 178, 252, 154, 81, 32, 148, 227, 251, 74, 143, 86, 90, 14, 106, 114, 178, 188, 123, 65, 155, 183, 186, 238, 56, 246, 148, 215, 250, 249, 113, 116, 170, 93, 1, 126, 126, 123, 78, 231, 195, 53, 34, 129, 218, 112, 0, 20, 254, 115, 175, 228, 21, 167, 225, 86, 254, 86, 144, 226, 105, 67, 82, 9, 104, 11, 83, 28, 124, 112, 50, 167, 142, 114, 226, 248, 176, 147, 155, 126, 35, 174, 76, 219, 241, 6, 3, 24, 34, 206, 203, 29, 248, 92, 232, 2, 235, 45, 163, 84, 191, 175, 34, 187, 54, 75, 223, 152, 11, 43, 74, 255, 178, 59, 41, 113, 167, 27, 194, 21, 164, 103, 149, 160, 115, 249, 210, 24, 3, 140, 166, 174, 93, 62, 234, 174, 16, 144, 170, 14, 157, 246, 225, 249, 128, 4, 84, 230, 64, 187, 36, 180, 58, 88, 183, 208, 52, 223, 165, 10, 110, 48, 42, 125, 146, 64, 195, 91, 243, 58, 89, 0, 248, 86, 71, 214, 15, 152, 222, 43, 14, 88, 20, 20, 49, 6, 85, 150, 30, 235, 9, 101, 4, 153, 89, 63, 48, 77, 142, 208, 241, 186, 204, 78, 8, 81, 80, 49, 64, 86, 120, 236, 104, 153, 233, 143, 206, 32, 195, 141, 200, 91, 199, 64, 84, 24, 95, 99, 68, 38, 176, 195, 127, 122, 108, 155, 233, 183, 213, 84, 112, 15, 165, 208, 116, 135, 104, 209, 206, 127, 146, 255, 20, 215, 110, 62, 133, 235, 34, 246, 230, 37, 252, 146, 238, 85, 211, 215, 17, 6, 216, 250, 115, 103, 28, 65, 97, 238, 115, 84, 154, 146, 118, 44, 29, 146, 140, 222, 47, 181, 82, 35, 30, 93, 242, 199, 186, 236, 143, 69, 238, 73, 61, 13, 249, 94, 7, 107, 54, 178, 108, 25, 199, 184, 100, 143, 82, 95, 133, 218, 88, 202, 193, 113, 23, 32, 132, 223, 115, 163, 125, 49, 97, 47, 209, 31, 85, 82, 110, 157, 253, 71, 57, 199, 175, 82, 61, 165, 39, 183, 80, 231, 111, 69, 32, 10, 79, 251, 33, 118, 167, 51, 5, 211, 146, 112, 3, 58, 64, 188, 150, 180, 252, 192, 239, 93, 180, 145, 191, 197, 202, 192, 102, 245, 142, 186, 99, 40, 190, 186, 163, 211, 234, 150, 32, 88, 68, 247, 159, 62, 246, 79, 23, 215, 78, 87, 188, 118, 175, 128, 6, 57, 253, 241, 6, 183, 211, 25, 147, 225, 56, 105, 163, 80, 77, 208, 171, 110, 163, 119, 152, 172, 246, 133, 139, 49, 18, 26, 69, 159, 224, 216, 236, 97, 126, 175, 38, 132, 171, 41, 2, 250, 190, 73, 203, 172, 151, 203, 121, 154, 243, 226, 71, 28, 77, 151, 252, 234, 82, 199, 169, 21, 154, 135, 142, 153, 24, 165, 230, 180, 171, 91, 149, 15, 41, 78, 202, 34, 67, 248, 115, 217, 34, 46, 40, 183, 193, 213, 97, 214, 119, 149, 32, 11, 198, 54, 162, 185, 208, 196, 235, 45, 28, 67, 2, 13, 163, 42, 201, 48, 54, 236, 128, 104, 3, 109, 86, 180, 212, 87, 164, 251, 249, 140, 46, 206, 125, 62, 163, 1, 211, 9, 71, 48, 182, 93, 52, 222, 133, 187, 84, 41, 186, 157, 59, 239, 234, 162, 70, 112, 230, 154, 174, 87, 222, 78, 250, 219, 141, 224, 168, 217, 89, 13, 78, 146, 195, 72, 198, 134, 17, 124, 15, 210, 206, 102, 218, 51, 126, 249, 127, 252, 39, 240, 32, 19, 196, 79, 254, 95, 64, 194, 241, 102, 248, 15, 141, 66, 153, 243, 225, 37, 231, 95, 93, 137, 175, 154, 205, 40, 111, 98, 233, 13, 35, 164, 13, 43, 172, 193, 16, 111, 66, 242, 218, 220, 20, 76, 110, 48, 239, 140, 151, 146, 157, 19, 169, 45, 222, 27, 70, 131, 3, 2, 65, 193, 50, 237, 40, 167, 96, 37, 89, 85, 238, 173, 172, 54, 63, 71, 90, 224, 64, 84, 252, 43, 237, 162, 61, 178, 74, 87, 251, 211, 184, 128, 230, 60, 190, 110, 223, 119, 48, 16, 172, 59, 34, 217, 215, 0, 17, 212, 191, 255, 175, 234, 125, 193, 255, 148, 87, 51, 71, 143, 249, 24, 136, 157, 63, 48, 42, 21, 4, 0, 194, 175, 41, 102, 8, 73, 234, 215, 17, 129, 245, 113, 213, 23, 132, 244, 100, 11, 70, 153, 185, 130, 240, 135, 105, 128, 166, 101, 197, 39, 237, 176, 153, 155, 37, 130, 156, 188, 214, 81, 255, 31, 209, 109, 99, 231, 92, 210, 194, 192, 218, 222, 129, 156, 4, 26, 125, 210, 18, 32, 116, 203, 79, 40, 162, 161, 59, 181, 10, 221, 249, 49, 240, 16, 200, 218, 229, 210, 202, 2, 145, 154, 87, 152, 30, 236, 90, 7, 114, 240, 143, 101, 252, 92, 109, 174, 14, 10, 114, 168, 101, 200, 159, 68, 200, 106, 180, 87, 51, 80, 53, 228, 70, 142, 9, 26, 15, 212, 147, 242, 21, 0, 59, 146, 106, 9, 245, 62, 127, 165, 140, 242, 58, 34, 176, 82, 38, 140, 195, 123, 32, 79, 92, 234, 183, 252, 97, 162, 208, 230, 121, 12, 114, 80, 52, 26, 16, 30, 141, 8, 252, 141, 117, 105, 229, 250, 234, 244, 9, 223, 115, 9, 169, 47, 60, 112, 78, 211, 201, 251, 37, 230, 158, 61, 60, 119, 91, 56, 25, 53, 193, 212, 234, 145, 82, 103, 201, 249, 129, 103, 158, 98, 252, 109, 60, 162, 80, 239, 184, 66, 197, 112, 252, 94, 107, 150, 79, 163, 207, 228, 192, 102, 168, 238, 53, 194, 30, 254, 34, 190, 197, 191, 226, 118, 224, 112, 142, 107, 222, 156, 231, 175, 200, 141, 194, 27, 100, 85, 192, 129, 207, 16, 252, 37, 145, 234, 20, 88, 3, 165, 13, 226, 186, 30, 166, 197, 198, 143, 51, 210, 37, 131, 144, 15, 187, 50, 140, 146, 214, 23, 0, 48, 55, 133, 130, 98, 93, 134, 166, 211, 153, 32, 150, 230, 201, 15, 34, 8, 222, 10, 26, 186, 7, 8, 88, 204, 45, 218, 140, 214, 184, 151, 248, 89, 151, 174, 87, 236, 226, 91, 114, 164, 11, 69, 160, 193, 14, 214, 59, 19, 1, 245, 14, 85, 152, 71, 4, 69, 187, 68, 255, 34, 120, 37, 4, 146, 92, 36, 110, 114, 184, 67, 85, 254, 242, 127, 98, 67, 80, 151, 85, 109, 247, 107, 138, 25, 134, 25, 215, 219, 54, 227, 40, 169, 178, 245, 71, 134, 56, 23, 138, 165, 97, 227, 156, 235, 184, 120, 139, 78, 154, 7, 129, 18, 185, 168, 155, 194, 96, 115, 123, 180, 245, 230, 199, 5, 6, 43, 12, 85, 152, 201, 191, 69, 15, 182, 149, 28, 33, 154, 18, 122, 212, 217, 206, 1, 86, 143, 182, 120, 129, 45, 109, 87, 98, 164, 213, 126, 238, 248, 195, 254, 210, 224, 205, 11, 114, 72, 30, 220, 134, 186, 164, 170, 37, 255, 161, 58, 46, 253, 138, 189, 31, 52, 83, 25, 11, 166, 11, 236, 212, 70, 3, 8, 182, 189, 131, 107, 61, 221, 25, 228, 110, 86, 244, 65, 217, 255, 122, 153, 144, 93, 9, 184, 108, 140, 99, 112, 240, 180, 213, 85, 69, 39, 112, 254, 8, 84, 138, 92, 164, 209, 46, 119, 19, 160, 47, 238, 65, 84, 124, 134, 250, 149, 42, 91, 184, 41, 214, 122, 238, 3, 193, 220, 251, 92, 116, 226, 85, 126, 218, 187, 95, 211, 118, 105, 239, 27, 251, 122, 57, 185, 65, 127, 179, 205, 10, 6, 12, 214, 142, 154, 18, 232, 139, 175, 229, 159, 152, 192, 86, 106, 19, 207, 120, 156, 29, 125, 119, 128, 103, 171, 190, 185, 166, 65, 254, 199, 40, 2, 192, 30, 32, 162, 117, 63, 45, 243, 251, 148, 147, 187, 179, 87, 27, 85, 68, 13, 109, 154, 53, 131, 121, 194, 69, 210, 206, 235, 29, 185, 63, 178, 240, 47, 87, 218, 211, 167, 237, 78, 231, 124, 178, 230, 48, 200, 48, 255, 229, 52, 33, 50, 107, 163, 6, 229, 214, 8, 29, 240, 127, 164, 11, 104, 202, 7, 50, 43, 168, 224, 73, 80, 212, 165, 34, 137, 30, 239, 5, 170, 169, 99, 154, 42, 145, 254, 47, 119, 110, 17, 154, 202, 82, 29, 11, 158, 158, 70, 63, 176, 230, 151, 135, 72, 100, 144, 82, 242, 227, 53, 236, 248, 32, 53, 195, 72, 86, 133, 204, 13, 207, 8, 90, 227, 140, 47, 147, 39, 154, 81, 27, 169, 140, 225, 93, 35, 158, 200, 93, 50, 248, 9, 15, 180, 207, 170, 97, 193, 90, 117, 194, 95, 80, 255, 110, 60, 111, 130, 88, 128, 96, 8, 64, 34, 232, 229, 34, 136, 236, 93, 202, 12, 183, 196, 208, 125, 109, 176, 215, 213, 48, 115, 116, 98, 51, 170, 164, 11, 19, 28, 212, 199, 20, 58, 201, 147, 63, 171, 178, 237, 174, 236, 164, 87, 249, 102, 187, 18, 75, 36, 128, 124, 179, 41, 39, 27, 225, 143, 53, 248, 75, 209, 110, 153, 68, 117, 179, 243, 238, 27, 83, 47, 69, 27, 129, 82, 12, 20, 176, 244, 97, 196, 11, 201, 148, 201, 81, 208, 239, 244, 118, 20, 255, 178, 174, 141, 114, 245, 86, 16, 55, 177, 169, 200, 202, 240, 101, 166, 222, 248, 54, 218, 106, 51, 25, 124, 135, 137, 238, 88, 190, 250, 59, 154, 225, 148, 14, 250, 245, 184, 58, 110, 201, 170, 172, 35, 159, 53, 17, 93, 141, 61, 189, 157, 27, 194, 34, 30, 56, 71, 220, 211, 161, 136, 181, 57, 13, 132, 39, 107, 41, 163, 108, 223, 4, 128, 138, 218, 76, 138, 119, 212, 159, 87, 131, 150, 48, 39, 28, 9, 133, 251, 184, 62, 201, 89, 72, 75, 105, 59, 175, 235, 24, 26, 214, 183, 218, 250, 9, 23, 118, 52, 35, 173, 77, 3, 46, 251, 13, 240, 235, 252, 97, 34, 89, 117, 66, 46, 255, 227, 129, 189, 62, 58, 100, 52, 131, 137, 51, 73, 82, 125, 25, 19, 212, 236, 97, 148, 25, 111, 245, 105, 254, 139, 87, 184, 53, 247, 208, 129, 15, 93, 225, 8, 37, 96, 240, 143, 64, 10, 231, 44, 205, 31, 101, 7, 76, 36, 181, 84, 51, 142, 176, 130, 224, 32, 17, 39, 33, 201, 219, 126, 91, 47, 223, 157, 185, 202, 68, 121, 64, 125, 44, 238, 217, 121, 240, 159, 43, 231, 20, 63, 72, 239, 172, 8, 147, 226, 182, 225, 213, 66, 170, 183, 39, 23, 92, 9, 27, 105, 229, 250, 177, 174, 219, 117, 153, 255, 214, 254, 153, 71, 220, 102, 210, 202, 214, 94, 44, 227, 95, 125, 27, 142, 177, 43, 246, 98, 132, 14, 188, 75, 162, 187, 22, 220, 167, 15, 218, 151, 174, 42, 35, 78, 142, 42, 44, 80, 39, 12, 61, 133, 182, 47, 34, 237, 254, 84, 87, 35, 100, 202, 44, 66, 184, 213, 103, 41, 127, 117, 66, 137, 127, 224, 221, 37, 130, 151, 166, 16, 1, 82, 13, 249, 27, 43, 20, 180, 172, 81, 0, 117, 98, 24, 198, 122, 219, 193, 87, 99, 197, 28, 223, 104, 149, 228, 52, 228, 86, 203, 101, 156, 191, 31, 214, 87, 162, 28, 233, 182, 195, 52, 37, 59, 57, 148, 219, 32, 170, 98, 33, 59, 21, 49, 249, 192, 59, 66, 21, 193, 89, 144, 51, 50, 115, 225, 169, 59, 100, 52, 214, 214, 61, 178, 128, 25, 135, 70, 227, 80, 181, 17, 196, 73, 84, 141, 84, 159, 139, 246, 242, 183, 124, 150, 109, 39, 188, 126, 58, 204, 219, 50, 172, 206, 67, 187, 94, 76, 248, 175, 15, 121, 12, 95, 17, 6, 255, 105, 172, 174, 136, 90, 60, 168, 42, 92, 75, 116, 23, 176, 97, 216, 135, 176, 220, 215, 254, 107, 231, 12, 102, 138, 244, 65, 211, 19, 36, 176, 34, 104, 146, 238, 199, 195, 58, 168, 82, 12, 82, 10, 12, 228, 19, 206, 103, 139, 179, 243, 18, 47, 181, 136, 122, 229, 238, 114, 168, 105, 66, 217, 96, 160, 122, 13, 16, 42, 225, 132, 155, 162, 167, 188, 157, 209, 225, 86, 153, 69, 149, 1, 31, 97, 8, 221, 97, 231, 37, 196, 11, 232, 236, 66, 51, 166, 223, 222, 158, 227, 116, 241, 242, 17, 74, 155, 22, 231, 228, 137, 208, 108, 195, 148, 189, 211, 171, 145, 218, 122, 123, 56, 152, 209, 72, 187, 255, 172, 55, 237, 64, 2, 247, 151, 124, 250, 12, 243, 248, 222, 80, 237, 114, 73, 34, 146, 119, 53, 120, 2, 212, 68, 196, 32, 244, 148, 187, 186, 200, 37, 92, 228, 192, 237, 23, 246, 208, 61, 82, 105, 183, 76, 201, 181, 201, 138, 237, 145, 54, 207, 25, 15, 173, 140, 57, 64, 53, 130, 75, 200, 145, 171, 175, 104, 132, 213, 218, 103, 228, 211, 11, 70, 25, 237, 123, 99, 0, 127, 54, 208, 154, 59, 237, 26, 80, 144, 46, 139, 141, 79, 31, 96, 116, 231, 133, 19, 225, 247, 112, 242, 248, 233, 53, 133, 181, 33, 27, 29, 192, 225, 17, 15, 50, 178, 124, 128, 70, 115, 216, 157, 60, 14, 108, 128, 133, 185, 203, 139, 4, 138, 155, 59, 45, 235, 186, 73, 200, 248, 21, 45, 225, 234, 176, 234, 98, 73, 211, 138, 161, 161, 162, 217, 143, 64, 91, 108, 235, 35, 244, 83, 63, 214, 193, 89, 112, 64, 111, 181, 32, 60, 109, 206, 115, 54, 61, 148, 185, 227, 225, 36, 49, 66, 207, 237, 70, 155, 228, 164, 135, 81, 154, 234, 54, 141, 157, 68, 132, 0, 255, 97, 112, 124, 96, 19, 27, 185, 198, 71, 121, 51, 209, 77, 233, 207, 182, 182, 163, 92, 96, 91, 241, 167, 126, 126, 40, 108, 202, 216, 182, 69, 83, 225, 123, 189, 119, 155, 152, 193, 2, 187, 116, 246, 64, 125, 102, 78, 249, 11, 253, 77, 200, 98, 72, 219, 88, 75, 254, 167, 230, 135, 74, 81, 222, 115, 94, 58, 82, 204, 89, 78, 230, 173, 2, 46, 127, 55, 177, 36, 104, 96, 244, 163, 181, 74, 58, 87, 200, 183, 86, 207, 177, 220, 83, 29, 206, 218, 84, 231, 188, 74, 48, 74, 107, 107, 143, 206, 239, 181, 87, 30, 198, 194, 15, 21, 39, 35, 27, 48, 197, 19, 10, 60, 164, 55, 181, 246, 73, 144, 129, 81, 72, 147, 14, 81, 126, 187, 183, 235, 211, 173, 122, 229, 93, 124, 53, 83, 46, 92, 62, 50, 220, 243, 161, 133, 233, 15, 20, 102, 73, 132, 100, 3, 154, 1, 72, 246, 162, 176, 237, 49, 240, 58, 65, 48, 0, 180, 197, 89, 196, 94, 176, 244, 54, 154, 16, 149, 53, 198, 179, 32, 38, 119, 75, 248, 188, 176, 0, 61, 75, 70, 84, 234, 153, 128, 215, 25, 50, 0, 47, 158, 162, 166, 204, 20, 27, 133, 150, 215, 232, 249, 39, 71, 117, 244, 181, 88, 126, 115, 2, 162, 15, 186, 0, 34, 113, 143, 126, 25, 39, 222, 30, 92, 255, 222, 0, 125, 148, 140, 150, 198, 73, 31, 218, 126, 216, 5, 248, 247, 95, 225, 249, 226, 238, 110, 123, 247, 244, 146, 85, 103, 59, 45, 188, 38, 11, 78, 44, 71, 248, 175, 69, 73, 91, 254, 77, 127, 109, 99, 101, 34, 20, 213, 206, 213, 11, 120, 32, 189, 53, 217, 233, 107, 158, 242, 122, 102, 231, 115, 99, 142, 159, 177, 10, 33, 30, 182, 91, 106, 90, 22, 233, 197, 38, 91, 43, 171, 212, 221, 246, 52, 246, 153, 85, 62, 241, 63, 94, 231, 147, 217, 158, 146, 70, 245, 211, 103, 9, 1, 246, 172, 200, 97, 144, 127, 15, 210, 6, 118, 11, 62, 120, 126, 182, 230, 81, 33, 149, 165, 28, 227, 57, 233, 178, 187, 146, 35, 23, 163, 23, 225, 52, 5, 200, 210, 188, 57, 79, 175, 33, 73, 68, 50, 112, 135, 24, 37, 117, 118, 168, 84, 18, 55, 217, 120, 44, 220, 212, 194, 70, 59, 111, 240, 97, 242, 240, 77, 81, 158, 189, 211, 40, 158, 71, 165, 106, 119, 128, 108, 114, 224, 97, 226, 141, 169, 23, 32, 104, 143, 171, 158, 227, 170, 211, 76, 116, 222, 3, 181, 108, 150, 54, 68, 64, 33, 169, 96, 56, 253, 102, 14, 216, 47, 30, 213, 223, 75, 17, 243, 38, 77, 149, 159, 58, 127, 27, 10, 225, 200, 69, 70, 42, 167, 216, 71, 211, 196, 44, 58, 170, 0, 249, 212, 185, 64, 124, 138, 16, 37, 97, 132, 91, 36, 223, 65, 199, 17, 176, 178, 84, 45, 135, 21, 182, 238, 177, 124, 214, 204, 182, 243, 155, 99, 174, 218, 167, 212, 94, 165, 79, 211, 120, 10, 62, 205, 120, 18, 95, 144, 223, 253, 251, 79, 93, 188, 33, 193, 174, 132, 196, 237, 213, 148, 139, 240, 239, 157, 111, 46, 49, 48, 48, 87, 34, 234, 153, 73, 238, 247, 236, 133, 5, 200, 59, 73, 143, 75, 59, 59, 28, 28, 66, 211, 90, 91, 3, 211, 22, 60, 176, 216, 222, 18, 149, 221, 216, 56, 59, 26, 52, 243, 99, 7, 200, 88, 235, 28, 210, 18, 245, 59, 83, 62, 223, 209, 155, 219, 188, 226, 252, 63, 224, 196, 95, 174, 170, 79, 52, 99, 14, 96, 19, 66, 175, 5, 120, 49, 72, 61, 163, 245, 250, 180, 237, 237, 230, 89, 151, 69, 204, 155, 127, 225, 117, 110, 236, 166, 175, 183, 235, 114, 245, 77, 54, 55, 17, 219, 222, 42, 36, 14, 148, 42, 21, 228, 32, 181, 90, 91, 8, 225, 199, 5, 213, 43, 176, 160, 179, 183, 46, 198, 197, 78, 65, 192, 82, 18, 106, 216, 173, 190, 162, 216, 8, 254, 229, 254, 242, 84, 18, 131, 125, 56, 25, 86, 191, 206, 67, 90, 154, 211, 51, 167, 251, 195, 212, 77, 217, 181, 152, 233, 134, 243, 195, 57, 144, 124, 229, 248, 206, 151, 83, 190, 136, 191, 152, 147, 233, 212, 172, 90, 99, 72, 148, 125, 174, 156, 110, 83, 54, 139, 50, 89, 28, 243, 146, 41, 255, 170, 44, 32, 247, 177, 196, 48, 73, 241, 113, 119, 228, 147, 11, 180, 27, 155, 191, 137, 224, 139, 245, 52, 162, 172, 1, 4, 21, 157, 183, 168, 137, 23, 235, 21, 54, 191, 178, 12, 146, 166, 53, 147, 249, 15, 92, 120, 113, 199, 21, 82, 20, 149, 190, 50, 232, 113, 6, 178, 220, 37, 80, 70, 128, 1, 26, 29, 136, 159, 167, 169, 61, 103, 95, 49, 230, 120, 14, 252, 145, 62, 103, 46, 252, 181, 93, 235, 133, 45, 48, 165, 93, 180, 172, 211, 156, 232, 240, 94, 32, 119, 135, 56, 21, 247, 16, 227, 153, 217, 12, 25, 163, 193, 99, 17, 3, 49, 217, 59, 120, 121, 226, 79, 5, 242, 251, 5, 227, 116, 206, 69, 67, 38, 157, 130, 120, 189, 61, 99, 171, 10, 92, 110, 174, 232, 114, 229, 132, 36, 53, 203, 47, 215, 207, 147, 56, 183, 12, 166, 134, 226, 5, 113, 150, 146, 80, 160, 243, 7, 27, 173, 6, 110, 142, 7, 74, 53, 46, 128, 193, 254, 131, 9, 40, 157, 152, 14, 45, 53, 135, 35, 56, 26, 101, 110, 236, 233, 3, 30, 172, 39, 208, 95, 98, 165, 131, 195, 108, 108, 87, 39, 216, 125, 220, 254, 119, 40, 101, 216, 44, 108, 235, 20, 182, 75, 141, 12, 109, 0, 245, 252, 35, 2, 112, 77, 55, 83, 150, 79, 160, 55, 47, 242, 107, 249, 185, 175, 13, 24, 213, 139, 33, 155, 31, 237, 254, 41, 107, 253, 197, 158, 138, 115, 115, 187, 64, 33, 117, 151, 248, 44, 57, 40, 234, 101, 230, 108, 37, 63, 193, 149, 25, 117, 119, 253, 21, 148, 54, 10, 77, 58, 134, 51, 236, 137, 2, 244, 93, 151, 235, 236, 246, 218, 73, 255, 191, 14, 42, 66, 29, 60, 243, 46, 89, 186, 26, 108, 5, 247, 176, 202, 175, 144, 173, 28, 59, 244, 68, 19, 60, 238, 67, 65, 222, 13, 166, 4, 74, 169, 65, 181, 221, 95, 89, 205, 45, 144, 187, 18, 184, 29, 193, 27, 225, 112, 202, 149, 30, 99, 253, 158, 198, 166, 30, 217, 10, 143, 215, 173, 194, 149, 254, 126, 134, 186, 123, 49, 6, 106, 146, 6, 125, 220, 119, 145, 228, 246, 44, 215, 95, 55, 113, 190, 192, 90, 232, 238, 228, 254, 172, 31, 160, 185, 226, 245, 10, 244, 111, 75, 247, 250, 205, 52, 9, 227, 128, 252, 154, 235, 218, 127, 48, 44, 62, 81, 93, 132, 200, 123, 22, 128, 89, 182, 79, 123, 157, 149, 185, 231, 53, 172, 22, 27, 26, 254, 15, 84, 209, 199, 39, 98, 157, 145, 46, 127, 118, 240, 231, 170, 205, 26, 154, 81, 253, 154, 102, 95, 4, 103, 27, 82, 79, 61, 250, 116, 190, 254, 10, 109, 214, 135, 64, 108, 220, 47, 2, 103, 210, 107, 107, 102, 175, 207, 224, 163, 196, 58, 123, 189, 121, 255, 37, 45, 175, 143, 123, 216, 74, 17, 126, 147, 212, 255, 29, 65, 70, 155, 154, 52, 243, 164, 231, 232, 109, 14, 115, 43, 109, 64, 64, 138, 6, 5, 49, 31, 158, 148, 79, 191, 234, 181, 97, 103, 13, 2, 179, 20, 100, 244, 74, 10, 171, 252, 170, 220, 60, 244, 85, 188, 163, 179, 33, 161, 29, 246, 112, 236, 162, 74, 161, 139, 226, 121, 89, 33, 231, 177, 179, 121, 245, 35, 184, 115, 97, 94, 41, 185, 98, 151, 83, 120, 250, 157, 188, 54, 69, 153, 45, 61, 240, 95, 15, 15, 7, 231, 53, 199, 48, 111, 159, 163, 184, 240, 184, 96, 0, 247, 98, 21, 244, 145, 210, 170, 36, 139, 251, 200, 73, 157, 238, 25, 137, 179, 174, 174, 10, 60, 216, 255, 127, 54, 207, 137, 13, 60, 115, 108, 43, 254, 133, 164, 92, 247, 67, 7, 194, 203, 253, 190, 171, 189, 9, 184, 166, 149, 150, 244, 18, 65, 76, 102, 146, 190, 171, 179, 69, 157, 248, 63, 143, 140, 34, 9, 73, 242, 12, 242, 104, 206, 133, 253, 38, 41, 255, 84, 239, 48, 11, 244, 204, 87, 137, 32, 79, 159, 92, 140, 70, 89, 72, 134, 170, 21, 182, 44, 17, 49, 117, 12, 79, 99, 19, 166, 36, 175, 98, 251, 248, 170, 40, 54, 69, 61, 241, 52, 192, 123, 238, 69, 186, 101, 32, 167, 11, 212, 20, 114, 146, 182, 70, 176, 18, 176, 64, 194, 221, 168, 177, 76, 232, 237, 240, 213, 2, 249, 103, 66, 34, 225, 75, 1, 3, 7, 184, 69, 73, 75, 7, 79, 41, 197, 103, 71, 125, 63, 229, 120, 178, 86, 28, 196, 150, 1, 227, 199, 76, 189, 233, 58, 75, 178, 7, 208, 101, 253, 77, 242, 1, 44, 152, 74, 124, 229, 200, 79, 247, 18, 113, 192, 39, 120, 28, 120, 137, 39, 83, 99, 182, 181, 93, 93, 71, 166, 134, 196, 72, 30, 149, 100, 105, 191, 17, 129, 217, 46, 108, 162, 211, 75, 6, 17, 90, 85, 244, 204, 231, 4, 210, 233, 105, 209, 161, 251, 196, 139, 137, 15, 227, 223, 204, 156, 155, 49, 47, 160, 56, 11, 58, 243, 159, 143, 37, 217, 55, 222, 136, 204, 176, 203, 16, 150, 114, 179, 56, 184, 14, 169, 102, 64, 128, 226, 164, 84, 91, 117, 40, 194, 32, 156, 193, 38, 253, 53, 156, 241, 85, 143, 194, 250, 73, 212, 171, 173, 17, 124, 71, 62, 151, 210, 18, 222, 253, 55, 198, 43, 80, 5, 26, 116, 45, 82, 224, 128, 250, 248, 144, 192, 111, 244, 156, 9, 116, 179, 245, 94, 240, 64, 1, 174, 130, 72, 251, 42, 27, 67, 68, 180, 48, 116, 200, 9, 94, 107, 222, 110, 127, 128, 51, 43, 172, 174, 85, 63, 144, 46, 18, 85, 87, 52, 199, 13, 188, 247, 153, 248, 231, 11, 142, 18, 148, 129, 186, 37, 84, 198, 120, 240, 188, 78, 44, 209, 46, 238, 24, 29, 108, 41, 93, 216, 17, 56, 76, 58, 6, 200, 233, 233, 169, 244, 111, 137, 153, 22, 121, 233, 82, 247, 225, 100, 41, 206, 119, 194, 54, 177, 102, 100, 134, 161, 57, 126, 116, 127, 78, 188, 167, 17, 117, 211, 44, 189, 87, 225, 197, 97, 205, 196, 114, 63, 144, 192, 123, 192, 215, 150, 149, 49, 43, 212, 226, 188, 42, 176, 153, 31, 69, 70, 211, 112, 146, 7, 51, 50, 137, 196, 156, 103, 3, 39, 86, 29, 180, 133, 65, 248, 43, 102, 228, 252, 116, 212, 63, 189, 209, 124, 63, 23, 133, 125, 231, 144, 70, 247, 194, 191, 172, 204, 0, 197, 152, 204, 168, 221, 166, 190, 78, 12, 194, 160, 47, 63, 83, 201, 19, 34, 47, 61, 16, 77, 79, 132, 0, 64, 75, 130, 170, 15, 254, 200, 199, 167, 65, 181, 120, 151, 181, 207, 75, 210, 33, 152, 129, 165, 167, 9, 21, 73, 153, 60, 182, 31, 40, 128, 186, 29, 183, 161, 245, 84, 65, 95, 51, 31, 28, 63, 91, 42, 203, 112, 185, 208, 42, 194, 163, 163, 44, 110, 167, 183, 136, 1, 160, 104, 143, 215, 168, 241, 125, 104, 183, 44, 174, 186, 143, 247, 240, 150, 240, 236, 186, 243, 56, 170, 38, 26, 92, 68, 215, 40, 124, 45, 29, 4, 94, 244, 171, 66, 219, 199, 81, 36, 170, 186, 155, 126, 93, 28, 204, 184, 142, 6, 191, 207, 218, 219, 156, 247, 69, 165, 11, 251, 119, 110, 30, 154, 94, 89, 47, 174, 211, 139, 222, 96, 177, 85, 108, 92, 105, 140, 81, 138, 106, 179, 155, 177, 29, 203, 164, 229, 43, 154, 240, 124, 126, 4, 48, 205, 54, 239, 191, 122, 224, 169, 6, 73, 16, 207, 13, 162, 200, 35, 198, 255, 49, 99, 175, 130, 160, 174, 34, 65, 127, 241, 63, 83, 242, 32, 42, 234, 152, 229, 229, 88, 31, 128, 69, 174, 204, 1, 156, 172, 191, 202, 144, 165, 238, 106, 103, 188, 215, 169, 174, 92, 211, 160, 145, 62, 81, 219, 145, 182, 134, 143, 76, 18, 135, 245, 197, 177, 115, 233, 218, 237, 164, 136, 134, 25, 54, 232, 15, 154, 67, 247, 40, 20, 202, 48, 13, 184, 231, 207, 107, 105, 52, 197, 88, 58, 199, 46, 78, 127, 108, 237, 140, 190, 15, 138, 98, 181, 211, 157, 16, 160, 182, 135, 84, 226, 214, 173, 170, 151, 224, 76, 185, 231, 165, 22, 96, 181, 188, 154, 10, 43, 66, 73, 41, 217, 66, 111, 140, 52, 77, 30, 201, 219, 55, 236, 146, 31, 232, 190, 128, 29, 61, 99, 149, 111, 117, 23, 83, 216, 217, 226, 152, 6, 136, 195, 41, 88, 49, 140, 173, 114, 171, 213, 82, 220, 0, 40, 189, 53, 68, 57, 121, 37, 199, 130, 163, 196, 171, 121, 161, 24, 218, 199, 59, 217, 231, 53, 222, 180, 214, 15, 153, 187, 76, 223, 24, 26, 128, 18, 82, 253, 158, 183, 124, 245, 113, 11, 164, 128, 151, 126, 70, 226, 180, 240, 229, 53, 126, 190, 210, 209, 108, 209, 247, 20, 223, 155, 182, 132, 215, 236, 191, 191, 18, 111, 24, 48, 181, 185, 65, 123, 64, 191, 14, 95, 9, 218, 139, 151, 254, 2, 81, 203, 58, 3, 41, 236, 66, 209, 46, 118, 48, 54, 230, 142, 233, 36, 35, 66, 240, 106, 47, 205, 46, 3, 150, 199, 115, 218, 90, 29, 42, 189, 152, 199, 232, 30, 33, 193, 205, 176, 79, 73, 11, 4, 65, 225, 62, 118, 65, 146, 153, 139, 179, 167, 208, 52, 196, 209, 14, 143, 232, 2, 6, 236, 199, 214, 83, 215, 49, 146, 43, 13, 54, 139, 72, 238, 9, 170, 174, 52, 18, 15, 219, 125, 93, 238, 24, 141, 197, 216, 120, 231, 130, 118, 59, 229, 9, 188, 214, 72, 28, 226, 192, 165, 67, 90, 30, 57, 2, 33, 130, 173, 210, 218, 204, 207, 134, 63, 70, 73, 222, 111, 56, 232, 253, 191, 160, 8, 89, 7, 215, 155, 133, 152, 147, 29, 190, 60, 74, 207, 247, 187, 84, 29, 104, 136, 139, 49, 45, 183, 199, 209, 157, 181], + [153, 96, 133, 103, 9, 80, 228, 171, 86, 29, 101, 104, 176, 188, 220, 141, 50, 30, 206, 29, 61, 69, 220, 39, 220, 89, 125, 155, 15, 165, 39, 71, 122, 237, 62, 95, 60, 95, 190, 4, 210, 119, 83, 193, 133, 111, 233, 225, 95, 35, 204, 124, 119, 81, 69, 32, 225, 79, 35, 222, 222, 232, 119, 5, 64, 154, 140, 246, 9, 209, 5, 228, 236, 81, 212, 194, 185, 8, 18, 93, 159, 103, 165, 114, 47, 40, 90, 206, 160, 57, 224, 104, 64, 211, 138, 191, 210, 2, 252, 201, 38, 64, 34, 41, 133, 73, 0, 241, 183, 252, 242, 212, 138, 40, 88, 240, 21, 103, 135, 24, 231, 238, 207, 140, 80, 105, 236, 30, 49, 93, 232, 169, 170, 138, 141, 197, 114, 170, 100, 180, 173, 2, 214, 240, 2, 46, 18, 196, 80, 98, 180, 10, 2, 216, 68, 201, 109, 49, 170, 146, 130, 32, 6, 218, 106, 32, 143, 79, 141, 161, 156, 146, 89, 163, 114, 140, 223, 128, 124, 147, 127, 20, 39, 247, 185, 186, 165, 217, 100, 24, 185, 116, 62, 20, 44, 56, 16, 213, 194, 35, 134, 44, 14, 88, 49, 48, 20, 43, 139, 45, 193, 181, 133, 212, 171, 255, 241, 248, 176, 2, 148, 187, 3, 85, 75, 99, 82, 85, 48, 50, 151, 95, 254, 189, 117, 148, 176, 238, 142, 171, 41, 69, 176, 21, 76, 186, 196, 233, 206, 71, 135, 81, 91, 194, 173, 106, 45, 198, 230, 27, 210, 207, 198, 220, 54, 229, 13, 203, 143, 144, 213, 107, 173, 230, 54, 89, 193, 224, 83, 58, 42, 202, 19, 77, 93, 63, 69, 241, 229, 31, 160, 122, 131, 223, 95, 164, 3, 162, 58, 36, 21, 108, 240, 111, 161, 53, 127, 227, 18, 110, 9, 161, 214, 235, 150, 124, 183, 10, 31, 15, 180, 12, 104, 161, 77, 196, 214, 30, 154, 229, 81, 8, 166, 83, 151, 20, 50, 118, 162, 136, 79, 116, 247, 216, 173, 220, 198, 2, 208, 90, 108, 187, 40, 221, 125, 39, 25, 93, 131, 251, 160, 130, 215, 108, 28, 252, 165, 51, 44, 185, 24, 91, 159, 139, 77, 16, 237, 177, 73, 57, 172, 102, 180, 236, 6, 7, 164, 68, 81, 0, 14, 101, 189, 175, 171, 93, 46, 132, 20, 119, 73, 197, 138, 16, 15, 111, 152, 36, 246, 130, 25, 151, 229, 28, 13, 11, 29, 35, 114, 56, 127, 144, 213, 172, 50, 16, 42, 138, 220, 17, 101, 55, 241, 60, 89, 173, 186, 34, 163, 19, 239, 65, 19, 203, 183, 218, 19, 221, 195, 120, 155, 61, 27, 171, 224, 139, 99, 56, 171, 53, 229, 186, 117, 199, 149, 69, 92, 10, 223, 158, 143, 205, 195, 84, 28, 100, 188, 213, 10, 45, 41, 199, 49, 33, 159, 187, 217, 120, 85, 249, 41, 150, 87, 248, 40, 27, 62, 6, 218, 82, 141, 52, 54, 146, 108, 15, 193, 187, 14, 196, 162, 77, 159, 124, 116, 61, 216, 66, 248, 217, 85, 184, 167, 138, 128, 42, 125, 163, 158, 132, 246, 60, 11, 204, 200, 203, 100, 152, 94, 177, 28, 158, 160, 109, 59, 159, 68, 124, 235, 211, 214, 187, 58, 174, 99, 229, 218, 202, 207, 26, 41, 166, 212, 125, 216, 132, 249, 118, 200, 78, 217, 34, 194, 24, 38, 219, 223, 37, 181, 249, 67, 41, 184, 23, 235, 125, 2, 103, 199, 66, 119, 209, 171, 92, 176, 210, 9, 67, 60, 169, 134, 145, 13, 157, 135, 193, 160, 246, 27, 194, 118, 32, 59, 109, 217, 86, 144, 223, 72, 86, 246, 147, 96, 240, 62, 231, 155, 19, 153, 26, 1, 239, 7, 199, 105, 144, 239, 66, 203, 4, 41, 167, 101, 156, 189, 91, 1, 120, 174, 45, 225, 219, 178, 102, 167, 249, 231, 160, 233, 230, 114, 138, 98, 40, 172, 176, 249, 245, 208, 112, 19, 18, 53, 203, 27, 162, 157, 137, 123, 59, 98, 51, 20, 22, 142, 170, 221, 235, 249, 54, 91, 4, 26, 110, 225, 144, 167, 140, 141, 23, 71, 88, 191, 137, 180, 59, 220, 198, 122, 109, 130, 255, 241, 117, 139, 251, 165, 241, 89, 143, 233, 252, 253, 153, 234, 39, 19, 233, 14, 226, 155, 120, 92, 126, 46, 10, 129, 226, 163, 128, 8, 136, 78, 24, 42, 32, 115, 64, 122, 149, 112, 132, 191, 191, 156, 10, 25, 156, 125, 111, 36, 122, 95, 51, 218, 190, 204, 81, 241, 66, 107, 66, 10, 127, 33, 210, 7, 82, 5, 188, 103, 225, 221, 35, 208, 49, 216, 132, 109, 227, 56, 183, 111, 1, 79, 198, 211, 232, 229, 139, 72, 74, 22, 229, 5, 12, 110, 209, 161, 143, 166, 126, 254, 2, 8, 166, 26, 49, 245, 150, 17, 48, 117, 26, 92, 105, 168, 218, 52, 234, 204, 60, 238, 137, 38, 78, 247, 71, 63, 98, 30, 129, 158, 68, 70, 143, 148, 28, 183, 95, 169, 17, 15, 250, 53, 29, 197, 172, 170, 248, 210, 186, 209, 200, 151, 51, 232, 232, 217, 191, 58, 215, 53, 78, 87, 229, 63, 116, 13, 134, 90, 39, 177, 100, 90, 58, 21, 121, 235, 153, 194, 244, 249, 228, 113, 50, 21, 109, 35, 99, 120, 205, 34, 129, 6, 112, 199, 204, 23, 155, 187, 80, 140, 87, 180, 170, 129, 214, 205, 199, 47, 248, 200, 42, 204, 133, 115, 89, 7, 102, 34, 206, 210, 161, 179, 162, 230, 49, 63, 121, 110, 115, 171, 134, 86, 240, 59, 181, 116, 246, 183, 73, 140, 210, 50, 144, 175, 144, 20, 142, 249, 252, 160, 203, 0, 144, 28, 13, 116, 246, 213, 240, 232, 97, 243, 31, 214, 233, 42, 15, 164, 14, 129, 220, 176, 156, 127, 45, 189, 130, 142, 33, 45, 154, 102, 227, 107, 162, 138, 52, 191, 143, 2, 176, 33, 78, 27, 61, 148, 64, 130, 204, 243, 66, 161, 65, 37, 230, 121, 135, 158, 246, 221, 245, 222, 196, 24, 102, 112, 225, 109, 220, 94, 139, 47, 63, 249, 228, 231, 250, 242, 66, 213, 15, 6, 217, 86, 198, 164, 36, 184, 92, 143, 47, 190, 19, 199, 19, 13, 106, 58, 9, 85, 94, 1, 124, 253, 102, 129, 70, 217, 91, 181, 144, 9, 205, 126, 96, 180, 87, 74, 78, 77, 128, 69, 95, 21, 112, 179, 226, 21, 223, 43, 190, 222, 223, 80, 179, 254, 135, 194, 31, 192, 158, 156, 204, 189, 192, 101, 196, 184, 246, 78, 148, 4, 145, 22, 84, 192, 247, 245, 7, 227, 223, 155, 56, 10, 69, 164, 138, 181, 34, 241, 145, 235, 53, 200, 147, 169, 91, 143, 34, 34, 42, 206, 247, 158, 48, 120, 181, 8, 203, 91, 252, 238, 57, 76, 46, 199, 243, 172, 118, 253, 16, 41, 36, 170, 220, 127, 29, 85, 204, 170, 211, 157, 211, 153, 181, 36, 144, 217, 144, 199, 55, 88, 188, 124, 203, 222, 216, 199, 106, 227, 117, 38, 189, 228, 198, 89, 126, 168, 216, 242, 240, 134, 194, 146, 41, 27, 48, 146, 176, 223, 238, 205, 60, 3, 193, 244, 28, 238, 108, 195, 195, 210, 220, 158, 111, 123, 91, 160, 95, 13, 252, 10, 137, 121, 200, 52, 112, 128, 205, 173, 78, 119, 185, 9, 56, 212, 20, 122, 166, 36, 81, 131, 70, 168, 34, 231, 174, 9, 6, 127, 16, 33, 137, 96, 189, 110, 251, 227, 220, 78, 185, 77, 0, 28, 11, 109, 203, 16, 181, 84, 239, 67, 115, 176, 174, 244, 41, 142, 93, 161, 88, 238, 57, 83, 216, 68, 250, 77, 18, 142, 238, 215, 48, 186, 209, 83, 73, 137, 181, 254, 153, 26, 10, 174, 185, 117, 86, 54, 195, 37, 227, 146, 241, 35, 86, 11, 197, 125, 95, 175, 8, 19, 116, 59, 119, 183, 144, 64, 164, 113, 117, 164, 236, 22, 51, 107, 160, 160, 93, 9, 80, 98, 155, 50, 57, 54, 176, 142, 224, 35, 38, 71, 237, 153, 175, 252, 177, 87, 50, 89, 252, 63, 120, 197, 116, 76, 234, 47, 146, 178, 128, 138, 192, 204, 163, 59, 129, 150, 126, 56, 76, 36, 190, 172, 53, 231, 194, 93, 162, 71, 47, 84, 187, 81, 21, 45, 125, 106, 202, 113, 110, 0, 59, 225, 116, 157, 123, 171, 33, 243, 104, 124, 250, 157, 81, 227, 148, 188, 96, 205, 140, 202, 153, 58, 194, 252, 201, 151, 60, 95, 82, 175, 137, 96, 7, 155, 255, 99, 42, 236, 62, 138, 203, 255, 46, 226, 158, 14, 163, 135, 96, 129, 153, 35, 242, 32, 60, 46, 231, 167, 145, 106, 139, 241, 220, 242, 135, 76, 232, 255, 206, 193, 160, 72, 12, 226, 229, 109, 19, 53, 51, 37, 197, 109, 2, 43, 165, 32, 254, 108, 201, 210, 134, 141, 156, 152, 172, 39, 61, 5, 197, 1, 144, 177, 194, 52, 110, 199, 80, 60, 27, 160, 142, 222, 157, 218, 177, 229, 26, 240, 140, 104, 251, 120, 116, 175, 34, 222, 209, 134, 189, 212, 211, 53, 121, 39, 133, 66, 154, 194, 100, 175, 82, 164, 46, 249, 203, 144, 243, 65, 62, 102, 4, 14, 216, 58, 227, 56, 131, 58, 48, 114, 158, 107, 232, 72, 203, 131, 176, 68, 213, 81, 72, 134, 242, 117, 117, 115, 121, 99, 204, 155, 50, 20, 183, 35, 19, 17, 113, 133, 134, 83, 189, 9, 150, 10, 10, 53, 164, 29, 132, 193, 165, 35, 121, 224, 64, 16, 216, 39, 192, 79, 116, 32, 4, 22, 198, 119, 120, 234, 56, 162, 12, 10, 160, 153, 74, 217, 251, 80, 73, 107, 196, 51, 198, 190, 117, 120, 3, 206, 156, 96, 153, 241, 71, 16, 117, 74, 220, 132, 227, 55, 157, 31, 19, 3, 33, 189, 244, 155, 238, 46, 91, 113, 246, 199, 197, 193, 14, 155, 174, 213, 3, 255, 184, 176, 93, 129, 90, 5, 120, 190, 65, 77, 229, 195, 222, 29, 27, 204, 123, 252, 235, 255, 200, 100, 170, 44, 87, 7, 246, 48, 245, 75, 88, 196, 114, 0, 16, 16, 186, 151, 231, 2, 90, 196, 128, 197, 135, 52, 161, 77, 10, 223, 206, 59, 5, 101, 177, 58, 73, 50, 84, 187, 72, 30, 152, 205, 41, 44, 76, 62, 142, 248, 48, 74, 236, 189, 78, 2, 238, 23, 78, 5, 141, 199, 26, 179, 55, 9, 139, 161, 130, 20, 74, 165, 186, 64, 45, 136, 80, 143, 53, 72, 120, 218, 33, 158, 236, 99, 198, 43, 97, 104, 126, 60, 93, 157, 21, 236, 142, 82, 66, 170, 42, 216, 144, 124, 163, 112, 9, 38, 246, 27, 52, 20, 237, 78, 124, 132, 248, 199, 99, 74, 49, 236, 177, 105, 72, 235, 204, 251, 175, 173, 178, 151, 144, 32, 48, 165, 118, 118, 32, 24, 68, 118, 83, 46, 188, 80, 65, 167, 81, 88, 154, 193, 123, 193, 198, 97, 108, 99, 167, 250, 141, 45, 197, 95, 149, 144, 204, 253, 27, 19, 156, 142, 102, 57, 52, 0, 63, 74, 210, 240, 25, 80, 34, 123, 24, 142, 227, 116, 254, 82, 153, 95, 13, 95, 136, 20, 237, 94, 200, 5, 211, 49, 104, 233, 8, 250, 9, 220, 0, 35, 107, 75, 252, 220, 183, 47, 8, 0, 199, 57, 77, 221, 112, 92, 63, 245, 123, 6, 241, 189, 127, 56, 123, 144, 206, 57, 176, 14, 121, 38, 14, 34, 203, 171, 131, 49, 113, 131, 214, 19, 112, 160, 110, 35, 137, 45, 37, 97, 49, 130, 82, 227, 60, 62, 115, 110, 153, 93, 30, 67, 137, 145, 201, 167, 118, 188, 231, 207, 118, 173, 131, 29, 183, 94, 184, 43, 13, 220, 82, 234, 207, 1, 244, 14, 10, 144, 201, 105, 114, 52, 176, 4, 46, 206, 114, 135, 132, 67, 172, 129, 24, 111, 178, 49, 122, 180, 30, 255, 174, 143, 230, 227, 177, 63, 94, 33, 250, 15, 199, 76, 17, 176, 189, 131, 248, 26, 115, 105, 101, 169, 211, 249, 111, 118, 72, 53, 205, 105, 33, 44, 228, 6, 72, 131, 91, 202, 181, 8, 190, 47, 47, 165, 217, 244, 199, 141, 84, 13, 13, 90, 53, 43, 157, 202, 59, 106, 230, 189, 66, 237, 130, 2, 144, 16, 84, 50, 157, 94, 123, 160, 127, 49, 101, 214, 164, 182, 135, 172, 184, 229, 237, 217, 230, 130, 122, 63, 90, 37, 87, 184, 220, 138, 176, 54, 70, 76, 36, 20, 162, 210, 83, 153, 173, 116, 170, 187, 114, 212, 30, 90, 214, 235, 233, 133, 37, 128, 98, 63, 180, 193, 97, 167, 40, 238, 110, 73, 23, 79, 106, 252, 135, 4, 244, 255, 27, 43, 37, 69, 16, 216, 111, 127, 240, 224, 145, 2, 105, 93, 176, 105, 202, 113, 234, 225, 228, 125, 147, 124, 147, 200, 7, 135, 37, 67, 210, 70, 5, 61, 154, 44, 14, 199, 98, 35, 71, 38, 50, 209, 121, 106, 191, 162, 128, 68, 136, 197, 45, 204, 202, 143, 129, 146, 177, 55, 32, 64, 53, 90, 227, 94, 77, 160, 170, 166, 208, 26, 73, 194, 123, 68, 119, 205, 63, 153, 194, 19, 249, 189, 215, 107, 93, 79, 140, 38, 12, 103, 159, 214, 60, 246, 10, 0, 45, 162, 134, 188, 100, 170, 233, 147, 65, 21, 138, 47, 236, 106, 102, 0, 223, 138, 96, 12, 111, 61, 113, 158, 105, 19, 95, 81, 228, 126, 101, 97, 55, 27, 75, 231, 204, 205, 66, 163, 230, 232, 214, 206, 23, 88, 66, 92, 192, 9, 175, 11, 55, 203, 67, 158, 236, 12, 27, 29, 131, 86, 2, 202, 126, 126, 9, 105, 174, 66, 50, 220, 130, 250, 18, 143, 233, 25, 233, 124, 93, 242, 22, 77, 97, 87, 94, 28, 200, 5, 1, 147, 162, 34, 209, 108, 35, 15, 24, 241, 78, 177, 137, 157, 107, 2, 233, 209, 239, 156, 224, 200, 30, 197, 106, 71, 61, 128, 142, 243, 193, 171, 68, 254, 238, 201, 53, 75, 222, 232, 62, 119, 219, 245, 22, 155, 86, 21, 71, 96, 102, 88, 52, 20, 85, 37, 8, 95, 123, 193, 74, 188, 41, 75, 195, 115, 2, 9, 58, 143, 88, 222, 68, 20, 152, 17, 224, 58, 206, 166, 215, 194, 6, 102, 1, 99, 58, 230, 1, 182, 197, 227, 198, 132, 45, 192, 28, 216, 154, 49, 75, 176, 137, 95, 243, 125, 159, 26, 187, 46, 171, 254, 158, 192, 106, 178, 178, 163, 191, 207, 179, 242, 160, 99, 136, 7, 230, 244, 99, 2, 35, 11, 50, 108, 26, 183, 123, 140, 150, 35, 131, 47, 223, 195, 55, 149, 64, 143, 15, 79, 187, 208, 156, 70, 119, 76, 37, 99, 127, 109, 121, 109, 121, 162, 192, 214, 106, 38, 25, 44, 250, 206, 206, 70, 59, 128, 44, 149, 7, 103, 197, 124, 131, 174, 176, 233, 241, 100, 112, 164, 211, 201, 81, 104, 240, 84, 72, 234, 67, 123, 132, 5, 200, 50, 171, 201, 237, 254, 220, 228, 16, 71, 107, 22, 135, 2, 209, 174, 97, 138, 1, 178, 150, 64, 63, 171, 171, 12, 159, 43, 191, 194, 5, 59, 7, 20, 111, 42, 216, 167, 233, 149, 36, 253, 122, 129, 248, 89, 186, 205, 245, 243, 126, 85, 102, 178, 198, 216, 73, 19, 50, 138, 82, 37, 44, 236, 71, 124, 91, 10, 169, 91, 158, 179, 139, 59, 162, 45, 151, 200, 224, 243, 205, 193, 161, 146, 244, 184, 229, 137, 218, 215, 128, 94, 79, 1, 229, 217, 200, 204, 219, 184, 23, 173, 10, 129, 165, 91, 24, 18, 246, 203, 208, 167, 168, 89, 197, 180, 99, 224, 46, 217, 144, 180, 249, 149, 140, 120, 15, 19, 4, 186, 137, 204, 232, 123, 136, 184, 141, 15, 169, 9, 171, 221, 235, 44, 200, 81, 34, 145, 15, 75, 250, 92, 189, 192, 115, 65, 172, 246, 72, 125, 147, 190, 87, 232, 69, 137, 63, 79, 148, 218, 58, 100, 76, 56, 169, 101, 146, 75, 57, 94, 195, 147, 239, 90, 69, 159, 172, 80, 153, 171, 145, 166, 208, 227, 48, 101, 143, 133, 144, 48, 243, 211, 95, 132, 229, 93, 4, 226, 75, 254, 128, 124, 83, 218, 76, 147, 124, 179, 171, 98, 198, 79, 46, 33, 26, 99, 95, 60, 140, 46, 242, 176, 93, 165, 133, 5, 72, 113, 165, 153, 230, 155, 22, 75, 65, 97, 181, 90, 32, 74, 180, 66, 204, 64, 9, 111, 155, 46, 169, 167, 240, 29, 184, 51, 24, 163, 72, 122, 120, 98, 123, 232, 42, 101, 126, 31, 74, 194, 120, 87, 19, 232, 204, 176, 103, 45, 32, 240, 189, 104, 242, 155, 115, 235, 230, 166, 38, 157, 197, 38, 33, 133, 1, 185, 211, 22, 115, 143, 1, 15, 155, 29, 77, 48, 72, 215, 131, 137, 83, 16, 104, 64, 183, 160, 182, 46, 197, 122, 189, 123, 88, 209, 88, 124, 255, 198, 106, 109, 183, 140, 11, 77, 136, 149, 25, 239, 255, 39, 226, 98, 124, 185, 201, 121, 121, 225, 63, 81, 109, 7, 41, 198, 160, 36, 85, 49, 38, 44, 137, 103, 225, 145, 132, 41, 126, 153, 22, 143, 144, 40, 101, 150, 251, 72, 223, 221, 125, 16, 51, 197, 209, 103, 124, 241, 78, 234, 153, 34, 8, 103, 15, 243, 29, 44, 68, 171, 121, 43, 103, 130, 145, 137, 194, 252, 251, 218, 184, 126, 89, 139, 179, 248, 170, 118, 75, 85, 135, 238, 30, 53, 185, 233, 125, 214, 172, 232, 169, 42, 160, 60, 149, 182, 10, 68, 194, 43, 38, 191, 15, 198, 105, 150, 59, 69, 65, 35, 245, 49, 120, 47, 195, 151, 191, 94, 60, 56, 69, 168, 98, 147, 148, 9, 71, 131, 163, 30, 89, 11, 144, 89, 35, 183, 70, 107, 134, 105, 219, 129, 39, 187, 13, 76, 138, 252, 244, 176, 255, 103, 35, 171, 190, 164, 46, 133, 192, 239, 154, 209, 157, 62, 132, 164, 230, 118, 16, 9, 203, 22, 250, 108, 1, 137, 250, 196, 45, 3, 224, 202, 147, 150, 193, 124, 189, 222, 20, 75, 253, 54, 168, 97, 183, 204, 142, 188, 12, 136, 223, 250, 232, 56, 228, 153, 198, 114, 86, 17, 50, 41, 59, 219, 248, 146, 116, 254, 55, 152, 63, 75, 194, 206, 47, 110, 129, 31, 1, 73, 56, 54, 86, 36, 211, 100, 74, 76, 165, 90, 177, 94, 222, 162, 181, 145, 101, 36, 193, 239, 108, 190, 23, 175, 166, 193, 114, 18, 183, 86, 218, 229, 31, 238, 161, 253, 108, 223, 142, 201, 229, 40, 30, 128, 9, 235, 97, 138, 6, 182, 7, 5, 59, 171, 98, 171, 227, 45, 118, 62, 39, 185, 229, 206, 63, 25, 80, 251, 80, 253, 233, 4, 232, 147, 120, 198, 28, 248, 54, 75, 40, 74, 201, 3, 8, 183, 144, 12, 115, 134, 164, 183, 142, 30, 211, 63, 128, 87, 163, 47, 4, 137, 250, 80, 233, 84, 175, 243, 177, 94, 143, 32, 156, 224, 160, 187, 176, 149, 150, 20, 154, 176, 7, 198, 179, 27, 197, 220, 118, 112, 225, 1, 170, 94, 149, 85, 169, 166, 13, 48, 119, 116, 176, 57, 255, 127, 207, 54, 149, 36, 248, 199, 253, 151, 159, 227, 238, 129, 46, 64, 114, 173, 249, 219, 77, 32, 43, 170, 70, 144, 110, 104, 83, 141, 228, 32, 94, 213, 231, 135, 195, 12, 196, 9, 40, 38, 39, 76, 116, 23, 204, 137, 173, 146, 51, 5, 179, 188, 25, 181, 92, 224, 59, 105, 79, 108, 212, 110, 95, 130, 65, 104, 115, 141, 190, 214, 220, 242, 8, 140, 187, 157, 133, 231, 27, 203, 245, 198, 224, 146, 210, 198, 50, 168, 78, 108, 84, 224, 100, 74, 227, 160, 62, 65, 90, 235, 139, 130, 80, 251, 71, 236, 63, 41, 24, 195, 209, 161, 116, 233, 124, 141, 187, 175, 60, 44, 174, 142, 197, 81, 43, 120, 113, 21, 1, 177, 157, 15, 236, 228, 23, 225, 11, 31, 159, 146, 142, 66, 232, 28, 217, 159, 245, 75, 229, 185, 16, 39, 230, 84, 92, 161, 151, 226, 58, 21, 153, 166, 129, 199, 239, 71, 62, 123, 36, 204, 84, 125, 205, 170, 206, 252, 98, 13, 135, 26, 215, 94, 21, 204, 73, 177, 146, 249, 62, 176, 95, 91, 148, 13, 229, 162, 169, 217, 78, 6, 145, 224, 28, 74, 218, 8, 114, 235, 222, 85, 78, 13, 9, 117, 217, 140, 104, 3, 165, 23, 93, 182, 152, 229, 194, 90, 94, 131, 54, 127, 74, 97, 143, 71, 115, 97, 36, 145, 11, 183, 229, 202, 47, 190, 70, 111, 176, 5, 225, 28, 26, 141, 248, 64, 45, 13, 17, 216, 128, 210, 180, 194, 73, 121, 192, 51, 254, 251, 76, 188, 208, 101, 20, 93, 90, 172, 193, 193, 209, 61, 220, 195, 27, 230, 214, 140, 115, 250, 232, 68, 27, 86, 232, 53, 129, 55, 110, 240, 216, 73, 17, 47, 142, 6, 59, 86, 57, 194, 46, 159, 180, 107, 40, 84, 236, 68, 107, 209, 180, 218, 28, 69, 140, 148, 54, 159, 58, 180, 202, 222, 170, 9, 56, 207, 221, 79, 163, 15, 46, 40, 240, 117, 166, 37, 164, 47, 119, 30, 180, 102, 109, 102, 124, 61, 65, 26, 29, 80, 101, 103, 248, 128, 152, 119, 85, 55, 221, 140, 57, 244, 84, 249, 0, 35, 23, 47, 168, 108, 230, 86, 167, 27, 30, 120, 222, 150, 192, 228, 138, 29, 56, 24, 148, 10, 242, 8, 228, 204, 190, 210, 22, 112, 70, 157, 46, 46, 59, 33, 208, 89, 203, 164, 213, 37, 246, 3, 109, 215, 39, 255, 206, 39, 211, 135, 111, 29, 81, 220, 205, 27, 240, 82, 220, 24, 168, 225, 134, 82, 7, 119, 141, 75, 26, 34, 177, 21, 253, 180, 106, 151, 179, 105, 0, 250, 205, 30, 133, 128, 154, 249, 70, 82, 19, 53, 181, 113, 35, 22, 189, 194, 176, 159, 3, 226, 217, 111, 26, 52, 99, 228, 217, 223, 123, 197, 24, 239, 131, 157, 119, 202, 41, 221, 110, 188, 19, 225, 176, 17, 49, 200, 100, 239, 24, 175, 198, 41, 149, 247, 48, 253, 159, 166, 47, 72, 64, 132, 54, 247, 74, 28, 150, 175, 33, 115, 7, 75, 205, 11, 152, 59, 3, 130, 105, 73, 33, 11, 110, 77, 21, 226, 108, 5, 157, 179, 43, 124, 92, 206, 18, 35, 47, 8, 162, 53, 27, 184, 69, 39, 143, 160, 196, 172, 195, 83, 35, 178, 230, 148, 86, 211, 195, 227, 18, 137, 35, 31, 241, 75, 139, 57, 0, 12, 248, 75, 57, 220, 30, 9, 214, 24, 36, 41, 70, 207, 173, 43, 10, 84, 15, 48, 202, 207, 3, 88, 48, 131, 142, 28, 90, 113, 20, 136, 181, 103, 154, 228, 72, 135, 159, 45, 62, 236, 37, 202, 20, 17, 196, 151, 155, 118, 85, 201, 144, 118, 19, 196, 230, 126, 41, 206, 94, 176, 76, 117, 208, 122, 181, 231, 178, 211, 58, 2, 205, 221, 70, 124, 239, 123, 18, 251, 73, 38, 91, 24, 71, 110, 201, 102, 164, 177, 113, 121, 205, 254, 17, 73, 204, 215, 170, 135, 72, 8, 14, 177, 182, 120, 145, 231, 98, 161, 81, 163, 255, 149, 96, 169, 3, 117, 59, 124, 123, 166, 206, 54, 156, 118, 239, 96, 48, 250, 102, 30, 204, 238, 40, 164, 223, 111, 194, 22, 18, 125, 38, 220, 207, 76, 186, 213, 5, 117, 4, 141, 97, 237, 17, 90, 110, 46, 213, 210, 44, 157, 58, 197, 201, 21, 179, 182, 182, 214, 147, 46, 182, 157, 222, 196, 135, 248, 7, 128, 39, 232, 172, 0, 158, 13, 127, 247, 1, 228, 194, 171, 104, 105, 192, 36, 198, 252, 24, 209, 235, 223, 69, 9, 226, 223, 205, 167, 60, 237, 96, 89, 187, 130, 7, 113, 211, 177, 176, 104, 124, 182, 206, 44, 52, 159, 133, 244, 253, 210, 222, 126, 79, 220, 84, 43, 83, 27, 77, 53, 32, 250, 214, 4, 166, 22, 215, 163, 142, 151, 69, 56, 189, 237, 109, 128, 149, 233, 238, 81, 128, 223, 127, 74, 29, 148, 247, 194, 252, 214, 4, 154, 10, 203, 135, 122, 152, 222, 216, 104, 42, 5, 65, 223, 155, 94, 15, 48, 198, 82, 176, 27, 72, 35, 62, 225, 49, 63, 114, 255, 104, 138, 137, 152, 179, 223, 108, 22, 90, 116, 174, 215, 61, 174, 99, 210, 29, 247, 14, 62, 165, 51, 225, 96, 96, 73, 239, 254, 3, 232, 35, 174, 223, 80, 144, 9, 212, 123, 62, 18, 79, 139, 60, 182, 187, 62, 158, 104, 252, 31, 164, 73, 247, 243, 47, 72, 73, 4, 63, 42, 22, 250, 143, 227, 55, 32, 146, 61, 213, 142, 5, 169, 184, 96, 171, 43, 216, 140, 89, 105, 109, 78, 5, 38, 184, 163, 71, 224, 167, 231, 163, 59, 166, 40, 35, 37, 181, 144, 87, 31, 215, 52, 16, 150, 212, 48, 167, 66, 76, 96, 80, 61, 61, 114, 73, 175, 105, 162, 208, 81, 83, 48, 227, 63, 194, 143, 17, 13, 187, 21, 116, 35, 206, 71, 222, 219, 151, 2, 146, 125, 135, 7, 24, 42, 167, 104, 125, 151, 71, 187, 127, 161, 220, 53, 181, 43, 62, 65, 167, 213, 82, 188, 130, 90, 110, 203, 97, 108, 152, 191, 157, 62, 89, 180, 174, 248, 25, 209, 27, 113, 138, 132, 171, 71, 218, 233, 64, 143, 107, 149, 57, 87, 38, 15, 222, 31, 123, 174, 98, 19, 1, 37, 148, 124, 78, 254, 136, 217, 155, 209, 37, 247, 44, 203, 51, 235, 67, 108, 126, 152, 7, 114, 19, 99, 148, 73, 157, 25, 71, 247, 97, 225, 66, 236, 2, 56, 173, 71, 244, 154, 160, 100, 101, 66, 243, 59, 174, 76, 111, 134, 252, 206, 104, 41, 31, 215, 223, 138, 169, 9, 134, 33, 51, 170, 120, 74, 85, 130, 92, 47, 211, 147, 105, 103, 223, 217, 37, 248, 226, 1, 160, 71, 23, 83, 30, 236, 111, 233, 45, 184, 162, 3, 226, 24, 215, 96, 55, 76, 119, 131, 20, 161, 219, 172, 171, 202, 107, 224, 25, 244, 51, 162, 66, 145, 59, 167, 89, 209, 5, 119, 210, 177, 135, 125, 142, 187, 74, 236, 147, 111, 98, 240, 89, 221, 231, 142, 46, 16, 151, 220, 241, 36, 119, 140, 193, 64, 72, 210, 242, 52, 33, 73, 130, 168, 173, 158, 240, 100, 242, 231, 62, 201, 185, 35, 8, 61, 189, 199, 231, 236, 220, 251, 120, 134, 48, 164, 231, 143, 175, 225, 226, 18, 251, 0, 4, 70, 170, 124, 142, 95, 152, 203, 152, 73, 128, 115, 31, 236, 137, 220, 205, 183, 175, 136, 217, 54, 25, 71, 71, 246, 84, 63, 166, 81, 252, 47, 73, 213, 194, 61, 124, 38, 242, 99, 163, 242, 8, 243, 62, 242, 155, 242, 184, 33, 93, 232, 152, 200, 219, 70, 147, 64, 142, 144, 151, 125, 87, 57, 153, 215, 186, 205, 34, 52, 116, 189, 75, 254, 147, 189, 225, 243, 92, 7, 193, 51, 141, 162, 202, 195, 38, 135, 192, 138, 2, 242, 2, 114, 136, 28, 236, 53, 233, 19, 16, 47, 255, 58, 103, 58, 49, 154, 46, 161, 26, 74, 135, 135, 246, 157, 112, 83, 169, 27, 9, 130, 215, 150, 45, 119, 147, 54, 185, 92, 34, 67, 189, 177, 41, 141, 6, 218, 22, 106, 160, 130, 191, 176, 184, 159, 23, 1, 29, 248, 186, 46, 215, 66, 171, 4, 228, 239, 156, 208, 90, 218, 64, 191, 203, 228, 1, 186, 27, 10, 33, 59, 36, 216, 92, 249, 60, 79, 132, 33, 150, 13, 204, 209, 253, 207, 149, 38, 198, 93, 128, 223, 108, 169, 180, 148, 44, 89, 135, 124, 117, 163, 124, 122, 122, 51, 78, 226, 234, 62, 250, 73, 207, 95, 68, 195, 213, 80, 240, 210, 7, 194, 144, 38, 11, 172, 49, 57, 26, 101, 217, 206, 103, 64, 233, 187, 8, 72, 64, 240, 152, 81, 21, 181, 115, 106, 85, 193, 81, 131, 22, 74, 245, 78, 103, 205, 191, 238, 230, 11, 139, 52, 157, 112, 48, 86, 120, 37, 231, 75, 151, 94, 93, 91, 252, 110, 42, 199, 189, 198, 76, 177, 205, 247, 16, 193, 36, 4, 198, 64, 225, 68, 36, 1, 29, 182, 111, 245, 215, 209, 55, 177, 246, 148, 230, 42, 189, 160, 131, 105, 89, 78, 209, 84, 56, 134, 168, 27, 188, 193, 65, 254, 29, 57, 18, 40, 127, 80, 140, 37, 172, 160, 92, 230, 64, 184, 150, 250, 197, 131, 58, 80, 91, 113, 236, 212, 218, 181, 177, 93, 143, 7, 71, 9, 250, 183, 158, 224, 243, 69, 228, 135, 1, 129, 30, 234, 196, 253, 30, 215, 104, 170, 83, 248, 69, 130, 109, 35, 230, 132, 143, 190, 29, 111, 64, 79, 84, 25, 128, 212, 63, 140, 147, 45, 214, 137, 169, 94, 29, 91, 48, 167, 239, 175, 129, 205, 80, 29, 179, 186, 187, 34, 85, 18, 170, 171, 89, 26, 164, 44, 204, 111, 181, 1, 104, 149, 195, 92, 112, 125, 228, 172, 27, 163, 135, 152, 211, 145, 126, 75, 224, 70, 28, 212, 153, 68, 82, 20, 158, 85, 117, 148, 207, 63, 33, 109, 4, 189, 18, 36, 57, 54, 248, 20, 156, 5, 43, 114, 219, 168, 124, 204, 169, 209, 20, 13, 20, 19, 248, 255, 69, 219, 127, 247, 53, 168, 132, 251, 86, 142, 187, 58, 87, 156, 231, 173, 52, 138, 117, 80, 8, 238, 243, 60, 200, 188, 60, 84, 195, 39, 84, 132, 9, 50, 189, 171, 55, 221, 97, 1, 3, 177, 38, 243, 162, 239, 120, 82, 244, 129, 139, 183, 101, 44, 38, 238, 235, 135, 227, 240, 190, 39, 161, 49, 181, 241, 57, 92, 74, 251, 0, 214, 139, 49, 110, 79, 178, 94, 35, 138, 114, 27, 205, 136, 195, 50, 78, 212, 126, 178, 117, 232, 169, 1, 182, 170, 170, 81, 96, 74, 224, 221, 235, 155, 81, 94, 105, 108, 196, 171, 121, 168, 51, 2, 34, 166, 187, 30, 225, 83, 204, 175, 63, 164, 79, 206, 117, 225, 229, 197, 6, 181, 218, 1, 138, 41, 114, 4, 127, 107, 123, 92, 197, 227, 174, 88, 125, 42, 250, 143, 172, 34, 26, 159, 95, 241, 187, 5, 12, 87, 67, 73, 71, 70, 63, 97, 176, 106, 1, 186, 217, 57, 178, 25, 125, 220, 95, 253, 33, 163, 153, 155, 120, 26, 142, 237, 113, 135, 55, 163, 55, 70, 221, 183, 173, 17, 87, 60, 115, 58, 255, 129, 80, 168, 125, 144, 50, 207, 220, 126, 85, 71, 58, 223, 243, 223, 68, 146, 23, 142, 141, 146, 193, 219, 33, 83, 189, 12, 57, 133, 227, 127, 87, 240, 192, 82, 240, 12, 248, 92, 51, 228, 199, 138, 173, 25, 17, 133, 149, 146, 6, 105, 43, 160, 7, 224, 34, 236, 131, 25, 25, 28, 191, 57, 249, 88, 196, 66, 253, 76, 35, 46, 34, 28, 92, 59, 22, 90, 143, 105, 27, 15, 83, 24, 2, 48, 49, 85, 41, 48, 137, 142, 70, 168, 78, 142, 180, 208, 68, 48, 86, 126, 141, 95, 1, 95, 85, 242, 85, 59, 105, 188, 223, 63, 183, 172, 212, 38, 75, 18, 78, 62, 132, 237, 102, 85, 87, 131, 52, 125, 34, 113, 114, 175, 172, 229, 56, 238, 249, 215, 64, 163, 84, 163, 96, 202, 194, 72, 175, 118, 127, 82, 242, 144, 135, 205, 170, 157, 26, 203, 30, 226, 198, 111, 84, 49, 239, 121, 85, 227, 236, 164, 80, 148, 169, 77, 144, 248, 172, 231, 54, 183, 87, 117, 0, 170, 168, 158, 53, 238, 213, 30, 189, 207, 15, 115, 60, 78, 183, 39, 234, 203, 129, 135, 197, 66, 105, 231, 36, 5, 84, 146, 65, 42, 236, 43, 176, 31, 96, 211, 217, 245, 122, 242, 241, 251, 202, 241, 206, 39, 26, 179, 21, 15, 122, 55, 179, 141, 217, 231, 169, 192, 19, 170, 152, 198, 207, 106, 61, 214, 170, 157, 81, 141, 98, 249, 150, 124, 161, 75, 223, 154, 158, 134, 109, 37, 251, 216, 51, 96, 20, 236, 206, 104, 180, 197, 33, 243, 162, 178, 219, 90, 169, 201, 184, 189, 150, 122, 53, 206, 62, 51, 87, 244, 126, 206, 23, 43, 70, 163, 117, 97, 130, 239, 141, 53, 62, 199, 167, 158, 124, 52, 93, 102, 83, 229, 90, 27, 119, 222, 88, 253, 193, 58, 43, 37, 234, 110, 56, 14, 164, 79, 114, 4, 113, 52, 18, 169, 238, 149, 126, 164, 95, 85, 217, 173, 98, 9, 230, 97, 147, 226, 154, 159, 184, 96, 243, 168, 152, 77, 11, 126, 196, 205, 118, 250, 67, 13, 144, 143, 22, 129, 59, 209, 234, 231, 4, 122, 135, 65, 188, 34, 53, 25, 245, 59, 53, 61, 168, 132, 138, 172, 132, 146, 7, 151, 140, 219, 223, 142, 120, 14, 5, 135, 235, 104, 199, 49, 130, 95, 48, 10, 56, 244, 10, 45, 63, 170, 209, 125, 52, 88, 0, 176, 78, 110, 202, 161, 31, 70, 129, 57, 232, 159, 99, 139, 82, 118, 39, 208, 62, 99, 204, 225, 83, 29, 168, 126, 98, 65, 181, 138, 106, 174, 234, 49, 103, 78, 40, 250, 130, 183, 94, 52, 168, 35, 216, 125, 234, 14, 55, 172, 245, 214, 223, 57, 157, 193, 140, 68, 20, 57, 50, 253, 79, 20, 0, 69, 19, 204, 221, 233, 130, 93, 58, 130, 60, 248, 118, 242, 39, 162, 94, 81, 179, 65, 210, 12, 169, 31, 168, 170, 218, 18, 137, 186, 23, 136, 67, 121, 156, 205, 116, 21, 88, 212, 148, 187, 210, 83, 10, 98, 70, 18, 55, 137, 201, 105, 47, 82, 3, 29, 96, 254, 215, 12, 24, 162, 247, 179, 95, 3, 210, 251, 250, 92, 76, 228, 22, 7, 204, 73, 169, 50, 84, 14, 144, 146, 30, 5, 151, 128, 64, 134, 9, 106, 118, 161, 231, 217, 139, 172, 128, 142, 0, 182, 27, 196, 118, 220, 94, 129, 174, 133, 117, 2, 6, 242, 35, 179, 221, 187, 52, 244, 203, 102, 148, 231, 37, 101, 78, 217, 226, 112, 154, 146, 163, 13, 215, 59, 167, 89, 33, 208, 12, 139, 250, 85, 219, 198, 138, 173, 150, 9, 177, 149, 234, 118, 111, 233, 151, 2, 111, 172, 248, 120, 168, 235, 3, 235, 81, 130, 27, 141, 28, 7, 48, 106, 92, 15, 152, 148, 246, 47, 84, 166, 234, 187, 190, 190, 68, 211, 173, 72, 225, 73, 212, 23, 230, 61, 191, 44, 171, 110, 88, 118, 33, 71, 214, 54, 183, 210, 200, 111, 150, 206, 127, 115, 97, 70, 12, 10, 248, 108, 207, 40, 23, 185, 229, 123, 125, 221, 98, 40, 93, 170, 73, 67, 187, 42, 242, 167, 154, 179, 105, 76, 248, 217, 143, 62, 184, 222, 43, 158, 246, 175, 38, 147, 86, 177, 13, 245, 218, 180, 244, 35, 65, 76, 228, 52, 250, 150, 188, 75, 242, 144, 29, 228, 220, 51, 127, 100, 77, 228, 178, 213, 198, 152, 192, 92, 139, 106, 80, 93, 17, 228, 24, 127, 176, 129, 172, 192, 5, 224, 164, 105, 54, 0, 59, 198, 27, 107, 141, 58, 133, 52, 178, 180, 119, 229, 12, 4, 39, 22, 183, 232, 247, 246, 244, 209, 128, 89, 185, 127, 115, 232, 11, 212, 113, 63, 79, 143, 189, 149, 83, 9, 27, 41, 4, 14, 120, 228, 95, 22, 187, 39, 7, 9, 16, 81, 135, 25, 252, 72, 56, 90, 58, 120, 202, 204, 255, 130, 103, 39, 67, 110, 186, 93, 71, 200, 135, 191, 134, 53, 221, 24, 27, 166, 140, 98, 207, 249, 81, 67, 12, 19, 91, 242, 99, 77, 196, 209, 216, 59, 194, 167, 57, 242, 8, 206, 111, 75, 8, 242, 29, 226, 112, 208, 185, 48, 66, 170, 102, 227, 164, 247, 115, 221, 63, 117, 191, 55, 157, 203, 200, 65, 171, 149, 107, 48, 4, 36, 220, 34, 73, 143, 215, 147, 251, 247, 72, 103, 146, 190, 34, 69, 174, 119, 24, 125, 127, 197, 129, 23, 198, 82, 250, 179, 149, 248, 46, 253, 217, 46, 132, 40, 171, 17, 120, 2, 105, 18, 58, 173, 206, 192, 112, 122, 75, 113, 109, 113, 235, 151, 25, 93, 15, 243, 206, 40, 107, 201, 238, 157, 44, 97, 186, 27, 136, 249, 111, 86, 178, 160, 108, 41, 108, 16, 1, 64, 193, 123, 248, 30, 31, 25, 5, 172, 216, 237, 100, 126, 162, 177, 114, 201, 119, 5, 149, 237, 127, 144, 232, 125, 206, 157, 91, 3, 24, 255, 117, 170, 118, 173, 153, 133, 232, 20, 110, 170, 111, 35, 201, 226, 91, 203, 234, 17, 140, 162, 155, 173, 204, 58, 5, 207, 252, 164, 197, 29, 150, 214, 178, 142, 17, 213, 169, 27, 192, 16, 113, 158, 96, 178, 196, 129, 50, 28, 63, 112, 85, 103, 61, 224, 228, 36, 202, 179, 79, 207, 39, 157, 243, 37, 146, 158, 214, 170, 80, 77, 122, 184, 54, 130, 125, 76, 46, 243, 52, 161, 62, 232, 218, 225, 18, 99, 105, 90, 186, 84, 19, 39, 149, 135, 232, 117, 16, 23, 63, 13, 1, 10, 190, 158, 64, 4, 107, 31, 156, 125, 183, 65, 26, 218, 12, 78, 49, 14, 138, 100, 21, 138, 178, 94, 56, 153, 6, 193, 117, 21, 189, 201, 126, 195, 68, 235, 9, 50, 215, 101, 88, 132, 40, 124, 226, 230, 204, 253, 92, 141, 116, 194, 40, 71, 152, 180, 255, 148, 162, 52, 16, 152, 242, 248, 13, 28, 3, 138, 99, 21, 42, 249, 84, 233, 161, 156, 72, 168, 97, 191, 17, 86, 213, 41, 129, 49, 174, 0, 85, 70, 143, 252, 163, 143, 233, 223, 20, 63, 222, 74, 110, 151, 98, 11, 171, 40, 39, 85, 243, 96, 27, 109, 53, 70, 97, 23, 210, 213, 81, 160, 70, 109, 252, 228, 56, 65, 227, 240, 190, 199, 43, 112, 81, 69, 42, 148, 152, 20, 82, 141, 5, 216, 97, 77, 196, 36, 163, 113, 216, 173, 175, 152, 188, 154, 96, 226, 111, 91, 162, 246, 84, 102, 3, 128, 60, 243, 189, 101, 96, 15, 64, 117, 59, 36, 145, 131, 114, 36, 193, 214, 84, 54, 206, 107, 197, 147, 216, 199, 229, 132, 233, 77, 131, 237, 246, 191, 136, 181, 59, 132, 15, 10, 217, 127, 207, 231, 112, 7, 220, 248, 63, 155, 148, 159, 105, 18, 185, 163, 168, 48, 225, 71, 181, 47, 82, 234, 113, 213, 200, 227, 228, 161, 157, 102, 126, 212, 71, 110, 63, 153, 114, 157, 255, 56, 60, 107, 64, 37, 141, 241, 171, 16, 219, 54, 164, 26, 48, 171, 108, 187, 199, 219, 12, 16, 197, 164, 221, 204, 43, 75, 17, 197, 169, 229, 35, 78, 34, 206, 227, 129, 54, 229, 248, 206, 248, 165, 238, 180, 253, 163, 131, 162, 156, 48, 98, 88, 114, 226, 147, 104, 0, 193, 81, 231, 6, 208, 202, 162, 169, 27, 219, 78, 168, 207, 242, 49, 31, 99, 16, 117, 231, 21, 248, 200, 58, 64, 74, 215, 238, 190, 58, 105, 126, 250, 57, 50, 225, 93, 120, 119, 224, 72, 67, 71, 161, 29, 196, 118, 106, 60, 37, 2, 152, 203, 221, 186, 83, 58, 32, 221, 159, 34, 215, 220, 194, 227, 43, 230, 1, 177, 58, 37, 244, 99, 109, 112, 159, 124, 232, 201, 72, 187, 67, 241, 94, 175, 105, 195, 98, 97, 183, 66, 131, 254, 76, 121, 224, 142, 43, 149, 171, 119, 73, 78, 113, 93, 19, 0, 182, 130, 105, 143, 225, 26, 6, 206, 158, 98, 70, 85, 150, 192, 182, 191, 181, 236, 175, 106, 59, 213, 4, 123, 20, 1, 124, 151, 114, 14, 194, 3, 168, 126, 190, 23, 177, 111, 40, 143, 185, 15, 225, 89, 74, 176, 3, 183, 63, 90, 23, 213, 194, 88, 104, 229, 2, 147, 47, 238, 98, 96, 240, 51, 216, 134, 53, 6, 3, 231, 186, 248, 163, 117, 235, 164, 137, 92, 126, 67, 58, 209, 184, 54, 14, 36, 234, 66, 192, 236, 132, 191, 187, 159, 205, 56, 32, 227, 235, 252, 210, 113, 12, 254, 66, 126, 63, 113, 234, 89, 235, 93, 244, 246, 70, 166, 74, 233, 120, 119, 243, 23, 246, 59, 181, 193, 179, 123, 7, 185, 77, 119, 206, 234, 145, 45, 1, 57, 158, 175, 181, 171, 27, 211, 212, 63, 146, 139, 157, 103, 102, 28, 104, 189, 190, 197, 17, 222, 126, 92, 175, 15, 161, 73, 255, 202, 89, 103, 25, 240, 68, 81, 134, 107, 169, 191, 187, 219, 5, 219, 124, 107, 223, 80, 20, 146, 73, 240, 86, 185, 18, 239, 34, 109, 232, 46, 122, 43, 61, 106, 251, 200, 89, 156, 73, 238, 133, 162, 182, 112, 190, 32, 211, 161, 231, 244, 202, 229, 171, 3, 182, 240, 219, 16, 19, 205, 127, 42, 103, 169, 128, 148, 5, 62, 106, 157, 38, 122, 43, 59, 244, 37, 15, 231, 154, 74, 177, 185, 180, 30, 50, 121, 97, 123, 242, 22, 25, 62, 94, 251, 90, 66, 90, 72, 12, 94, 94, 93, 162, 100, 178, 215, 75, 63, 46, 148, 36, 241, 177, 224, 201, 54, 91, 171, 13, 63, 203, 182, 204, 250, 30, 255, 206, 81, 119, 22, 32, 38, 150, 36, 36, 254, 122, 90, 1, 8, 226, 190, 118, 81, 193, 215, 244, 70, 247, 7, 253, 89, 142, 174, 111, 11, 129, 10, 160, 78, 113, 114, 64, 153, 96, 231, 43, 194, 43, 149, 56, 217, 112, 93, 170, 78, 47, 35, 118, 81, 218, 32, 131, 6, 22, 84, 104, 115, 79, 66, 99, 141, 49, 1, 126, 255, 146, 161, 79, 181, 85, 12, 144, 34, 40, 148, 24, 156, 22, 197, 19, 70, 220, 66, 71, 78, 63, 26, 209, 220, 118, 210, 247, 79, 166, 82, 179, 44, 175, 230, 10, 255, 141, 56, 96, 160, 143, 23, 196, 61, 29, 235, 187, 38, 209, 171, 244, 244, 214, 107, 179, 67, 109, 140, 94, 6, 84, 101, 137, 163, 183, 63, 127, 89, 238, 46, 205, 109, 51, 62, 175, 49, 45, 140, 201, 145, 21, 125, 183, 147, 206, 88, 181, 211, 183, 46, 34, 48, 39, 179, 147, 137, 41, 116, 150, 232, 153, 86, 231, 153, 115, 171, 138, 145, 139, 95, 56, 152, 175, 176, 201, 126, 105, 126, 38, 207, 197, 157, 29, 198, 139, 58, 155, 144, 207, 38, 45, 70, 178, 195, 89, 140, 161, 183, 236, 93, 110, 183, 171, 52, 49, 240, 31, 38, 22, 101, 163, 148, 228, 138, 236, 97, 181, 148, 212, 12, 174, 52, 90, 134, 217, 150, 134, 237, 193, 50, 110, 17, 192, 7, 178, 245, 39, 113, 254, 44, 39, 57, 179, 171, 88, 223, 72, 175, 167, 26, 136, 146, 145, 243, 72, 59, 42, 202, 166, 159, 234, 9, 168, 41, 220, 34, 106, 145, 11, 118, 117, 195, 55, 109, 117, 184, 231, 205, 62, 158, 173, 11, 82, 170, 13, 114, 13, 240, 181, 90, 33, 97, 50, 101, 157, 67, 4, 213, 221, 124, 253, 219, 48, 135, 63, 212, 38, 206, 104, 250, 229, 214, 117, 6, 157, 149, 32, 247, 93, 154, 70, 113, 176, 52, 146, 205, 174, 197, 215, 31, 77, 222, 252, 49, 233, 205, 194, 195, 246, 163, 239, 194, 239, 74, 186, 174, 28, 195, 217, 49, 167, 146, 164, 90, 26, 67, 48, 147, 54, 184, 41, 244, 225, 122, 142, 181, 118, 35, 254, 132, 84, 56, 77, 162, 26, 203, 106, 189, 246, 49, 231, 189, 239, 57, 216, 253, 107, 107, 183, 52, 182, 23, 92, 3, 226, 115, 102, 224, 161, 132, 130, 81, 95, 169, 50, 193, 131, 8, 137, 183, 20, 145, 149, 127, 2, 94, 97, 50, 243, 132, 252, 225, 78, 36, 254, 50, 159, 45, 195, 65, 231, 33, 111, 87, 243, 207, 89, 105, 65, 60, 87, 132, 184, 21, 150, 162, 166, 33, 120, 101, 136, 107, 178, 81, 48, 13, 14, 20, 139, 39, 221, 141, 80, 250, 202, 157, 34, 217, 6, 48, 19, 222, 144, 130, 115, 251, 88, 104, 9, 100, 2, 20, 121, 62, 46, 20, 24, 20, 183, 8, 179, 70, 143, 90, 228, 162, 120, 219, 81, 96, 38, 33, 63, 152, 220, 186, 233, 203, 4, 202, 133, 129, 142, 80, 244, 12, 140, 112, 245, 235, 131, 126, 26, 16, 163, 24, 190, 33, 72, 100, 214, 105, 57, 58, 85, 40, 92, 167, 190, 46, 172, 0, 132, 192, 245, 239, 42, 163, 251, 206, 128, 93, 82, 20, 161, 233, 138, 14, 87, 72, 208, 104, 106, 73, 158, 144, 158, 241, 9, 34, 10, 10, 214, 19, 136, 113, 50, 253, 78, 112, 23, 6, 4, 180, 16, 191, 161, 191, 156, 202, 42, 161, 52, 142, 49, 7, 224, 165, 45, 179, 136, 62, 115, 126, 148, 60, 45, 31, 117, 64, 117, 57, 96, 126, 119, 83, 23, 48, 51, 186, 149, 201, 96, 139, 123, 166, 36, 133, 89, 252, 125, 209, 63, 85, 102, 118, 68, 147, 110, 49, 180, 195, 177, 109, 111, 70, 90, 51, 176, 188, 212, 249, 87, 79, 14, 199, 156, 13, 54, 209, 109, 246, 189, 232, 93, 94, 235, 71, 118, 72, 140, 86, 218, 175, 235, 195, 188, 242, 126, 147, 41, 142, 33, 151, 222, 6, 136, 158, 230, 151, 181, 82, 250, 156, 20, 29, 52, 208, 112, 113, 212, 254, 40, 68, 131, 22, 164, 180, 134, 74, 129, 36, 89, 59, 38, 226, 69, 146, 244, 151, 79, 102, 172, 119, 142, 91, 230, 95, 222, 244, 228, 122, 151, 154, 250, 133, 51, 176, 232, 117, 250, 122, 98, 211, 10, 136, 140, 123, 154, 216, 24, 86, 203, 197, 54, 217, 15, 149, 9, 244, 221, 59, 226, 158, 42, 159, 40, 158, 232, 158, 124, 7, 24, 252, 1, 102, 72, 157, 13, 97, 29, 196, 254, 200, 165, 148, 96, 178, 151, 180, 99, 194, 124, 216, 0, 17, 216, 199, 176, 214, 241, 156, 67, 60, 85, 144, 187, 184, 221, 52, 222, 250, 62, 65, 166, 22, 105, 55, 120, 18, 51, 211, 127, 87, 68, 81, 96, 108, 60, 42, 146, 53, 65, 98, 218, 179, 111, 193, 25, 143, 132, 64, 255, 147, 189, 35, 85, 32, 26, 162, 87, 83, 53, 190, 40, 57, 218, 41, 220, 30, 70, 29, 1, 190, 197, 107, 20, 223, 121, 113, 16, 68, 131, 188, 81, 20, 200, 41, 29, 3, 164, 171, 239, 154, 9, 161, 86, 96, 27, 38, 35, 24, 209, 239, 219, 19, 120, 132, 106, 116, 85, 109, 151, 233, 196, 93, 173, 82, 243, 122, 235, 125, 59, 182, 38, 127, 162, 162, 5, 94, 47, 235, 17, 132, 27, 233, 98, 154, 41, 219, 201, 128, 26, 57, 34, 33, 100, 11, 23, 133, 22, 251, 225, 198, 229, 162, 61, 132, 217, 97, 197, 118, 53, 235, 161, 60, 21, 71, 229, 14, 80, 67, 142, 182, 152, 8, 118, 243, 230, 161, 64, 14, 204, 14, 15, 207, 140, 19, 217, 171, 52, 116, 28, 2, 249, 221, 107, 55, 190, 127, 133, 14, 14, 42, 232, 236, 69, 88, 160, 68, 95, 168, 241, 219, 90, 166, 56, 59, 24, 205, 79, 140, 112, 229, 82, 77, 210, 130, 178, 156, 115, 248, 18, 229, 94, 129, 3, 198, 118, 159, 158, 126, 241, 81, 157, 212, 8, 246, 216, 152, 12, 171, 130, 188, 117, 250, 47, 162, 149, 131, 155, 37, 147, 179, 142, 187, 122, 85, 219, 97, 31, 67, 49, 49, 170, 36, 96, 53, 11, 186, 176, 167, 71, 201, 189, 137, 166, 181, 220, 67, 193, 162, 183, 136, 141, 72, 239, 25, 219, 31, 223, 19, 202, 42, 186, 18, 16, 242, 170, 189, 161, 197, 20, 51, 131, 226, 129, 41, 255, 27, 36, 9, 106, 216, 60, 253, 228, 60, 188, 41, 189, 69, 71, 24, 236, 172, 227, 46, 254, 2, 147, 40, 39, 241, 118, 0, 222, 250, 178, 237, 106, 45, 81, 86, 47, 116, 211, 225, 73, 9, 2, 27, 73, 47, 73, 42, 230, 232, 237, 71, 83, 122, 21, 15, 84, 139, 144, 190, 123, 21, 236, 35, 167, 61, 123, 159, 61, 182, 161, 254, 219, 59, 18, 187, 163, 41, 248, 39, 78, 150, 142, 74, 184, 46, 209, 156, 189, 36, 149, 187, 130, 152, 49, 218, 209, 100, 131, 4, 14, 183, 157, 9, 73, 164, 190, 161, 84, 34, 190, 53, 15, 229, 226, 177, 31, 233, 198, 176, 246, 83, 65, 147, 105, 204, 246, 254, 61, 149, 233, 182, 92, 108, 84, 167, 60, 100, 60, 115, 226, 133, 246, 154, 76, 169, 76, 75, 175, 178, 184, 134, 52, 232, 156, 218, 116, 184, 154, 211, 224, 59, 53, 154, 55, 139, 86, 95, 198, 23, 93, 184, 98, 235, 222, 122, 121, 165, 41, 180, 56, 201, 7, 25, 100, 49, 183, 199, 71, 113, 98, 80, 56, 40, 58, 192, 179, 77, 125, 127, 105, 203, 97, 226, 94, 178, 40, 245, 0, 218, 55, 196, 199, 166, 192, 186, 211, 186, 254, 81, 129, 223, 180, 82, 19, 50, 222, 214, 227, 252, 103, 206, 104, 221, 61, 246, 129, 86, 16, 100, 43, 159, 180, 206, 85, 93, 216, 223, 170, 108, 206, 78, 112, 31, 184, 173, 173, 31, 140, 190, 185, 49, 243, 125, 216, 13, 120, 220, 9, 158, 142, 105, 128, 201, 78, 89, 29, 37, 5, 60, 176, 233, 77, 17, 104, 25, 174, 165, 81, 102, 71, 2, 83, 95, 102, 130, 134, 143, 235, 102, 204, 114, 41, 26, 183, 185, 249, 51, 233, 26, 134, 7, 114, 119, 1, 253, 125, 118, 33, 175, 0, 50, 202, 108, 146, 140, 181, 63, 10, 79, 68, 155, 121, 53, 75, 34, 53, 248, 4, 9, 64, 49, 224, 152, 39, 172, 250, 188, 130, 205, 216, 191, 86, 76, 145, 105, 30, 181, 205, 206, 8, 128, 166, 152, 64, 115, 55, 201, 101, 82, 139, 203, 97, 209, 244, 94, 52, 44, 34, 47, 251, 50, 85, 104, 247, 162, 250, 139, 67, 195, 219, 141, 61, 53, 132, 123, 200, 249, 26, 96, 126, 70, 185, 185, 140, 244, 39, 150, 253, 142, 173, 238, 17, 240, 102, 106, 49, 13, 121, 188, 32, 34, 21, 127, 153, 161, 85, 163, 64, 29, 25, 206, 108, 11, 205, 106, 236, 173, 138, 203, 98, 185, 183, 78, 107, 5, 233, 34, 228, 154, 126, 148, 138, 217, 63, 41, 89, 5, 251, 145, 27, 240, 90, 168, 56, 8, 36, 131, 234, 137, 245, 144, 82, 110, 86, 187, 222, 164, 224, 46, 77, 213, 12, 192, 227, 44, 156, 207, 111, 36, 208, 143, 177, 18, 21, 205, 29, 181, 77, 235, 104, 243, 72, 124, 127, 141, 217, 151, 130, 131, 150, 69, 186, 174, 27, 217, 8, 37, 21, 164, 81, 87, 194, 178, 34, 135, 235, 205, 42, 77, 159, 111, 35, 12, 149, 67, 114, 9, 108, 51, 173, 158, 95, 179, 224, 48, 30, 118, 162, 133, 99, 199, 2, 98, 176, 144, 86, 124, 216, 177, 232, 141, 35, 149, 199, 206, 230, 147, 240, 205, 224, 83, 14, 245, 80, 235, 7, 133, 107, 206, 99, 147, 28, 2, 208, 43, 166, 167, 64, 244, 223, 196, 134, 203, 36, 33, 200, 26, 183, 104, 246, 181, 243, 111, 12, 211, 84, 141, 224, 135, 58, 34, 160, 97, 159, 88, 193, 45, 153, 15, 32, 203, 151, 121, 20, 182, 185, 51, 4, 171, 67, 253, 220, 177, 83, 187, 152, 224, 164, 182, 139, 62, 99, 170, 128, 208, 86, 76, 57, 188, 235, 187, 176, 208, 111, 169, 18, 150, 73, 198, 114, 86, 93, 17, 159, 200, 121, 42, 59, 221, 8, 21, 93, 217, 124, 200, 98, 154, 59, 19, 172, 218, 54, 9, 16, 250, 27, 74, 70, 123, 131, 13, 45, 251, 245, 240, 179, 2, 52, 123, 2, 163, 197, 32, 205, 87, 126, 11, 94, 144, 58, 70, 45, 47, 191, 143, 247, 230, 247, 225, 93, 192, 31, 221, 175, 10, 165, 20, 139, 4, 2, 32, 108, 149, 187, 55, 208, 183, 135, 51, 105, 168, 162, 83, 130, 220, 129, 175, 102, 160, 105, 178, 61, 174, 223, 109, 108, 165, 46, 41, 183, 139, 241, 97, 82, 181, 21, 74, 172, 87, 239, 126, 233, 224, 207, 20, 204, 68, 1, 197, 105, 222, 118, 134, 11, 93, 13, 139, 42, 243, 5, 94, 146, 125, 160, 239, 70, 222, 152, 7, 46, 154, 103, 128, 120, 2, 215, 172, 73, 198, 68, 229, 7, 50, 20, 223, 194, 104, 72, 37, 54, 48, 168, 76, 200, 204, 81, 182, 59, 113, 152, 131, 197, 106, 20, 116, 220, 16, 248, 116, 68, 136, 126, 107, 132, 185, 102, 148, 138, 227, 125, 245, 39, 44, 130, 25, 129, 106, 70, 236, 253, 244, 23, 197, 107, 70, 16, 235, 131, 22, 140, 76, 238, 115, 72, 220, 83, 218, 122, 55, 194, 79, 242, 96, 20, 79, 172, 20, 46, 233, 252, 6, 73, 87, 92, 105, 56, 67, 82, 162, 214, 70, 33, 235, 238, 25, 5, 233, 16, 2, 118, 142, 105, 210, 46, 34, 93, 21, 60, 20, 84, 27, 205, 63, 180, 102, 21, 213, 238, 191, 227, 13, 121, 133, 255, 212, 164, 204, 105, 77, 212, 120, 14, 4, 254, 126, 125, 209, 181, 129, 108, 39, 179, 199, 158, 3, 242, 64, 160, 125, 64, 27, 136, 199, 71, 221, 225, 205, 184, 185, 128, 52, 146, 104, 210, 120, 153, 57, 162, 59, 200, 81, 232, 89, 113, 131, 167, 67, 198, 41, 19, 180, 21, 3, 36, 243, 242, 191, 225, 35, 147, 80, 11, 79, 24, 58, 215, 36, 134, 80, 154, 170, 254, 172, 77, 51, 36, 198, 151, 123, 197, 246, 47, 217, 203, 216, 177, 212, 177, 90, 252, 174, 94, 204, 25, 35, 175, 187, 191, 203, 79, 10, 253, 81, 34, 5, 116, 38, 217, 0, 105, 203, 190, 155, 113, 84, 207, 46, 207, 14, 157, 102, 77, 200, 179, 243, 14, 89, 103, 66, 164, 190, 3, 118, 42, 226, 165, 166, 90, 24, 207, 223, 177, 240, 131, 103, 214, 186, 151, 39, 153, 212, 123, 119, 93, 184, 103, 156, 154, 240, 242, 66, 200, 8, 172, 201, 13, 14, 250, 128, 250, 187, 176, 195, 103, 38, 67, 144, 244, 242, 29, 204, 176, 97, 183, 232, 66, 149, 190, 84, 167, 219, 209, 97, 252, 188, 241, 4, 140, 159, 78, 116, 28, 251, 9, 7, 31, 252, 199, 74, 120, 214, 175, 40, 178, 237, 36, 183, 205, 208, 123, 67, 55, 105, 233, 51, 249, 218, 105, 225, 100, 70, 139, 145, 150, 23, 0, 138, 56, 176, 139, 101, 13, 243, 222, 124, 123, 173, 223, 27, 159, 95, 168, 31, 39, 119, 16, 35, 71, 73, 26, 216, 202, 64, 208, 247, 45, 192, 119, 235, 27, 206, 152, 128, 22, 6, 220, 183, 141, 248, 154, 184, 112, 121, 137, 130, 211, 137, 24, 70, 196, 65, 131, 127, 67, 185, 156, 150, 126, 102, 164, 120, 229, 187, 195, 248, 4, 213, 6, 212, 7, 211, 239, 81, 149, 11, 222, 21, 206, 60, 215, 43, 34, 86, 196, 28, 82, 238, 136, 107, 112, 114, 25, 41, 72, 72, 97, 66, 139, 46, 27, 47, 236, 98, 48, 112, 117, 103, 159, 78, 151, 246, 33, 145, 215, 7, 163, 233, 106, 172, 114, 14, 195, 137, 35, 33, 172, 66, 147, 176, 92, 26, 16, 131, 219, 213, 133, 112, 166, 58, 208, 150, 137, 81, 173, 242, 179, 10, 207, 27, 134, 107, 222, 66, 193, 161, 174, 109, 134, 241, 21, 213, 246, 161, 239, 158, 134, 140, 252, 106, 164, 57, 244, 40, 188, 113, 184, 94, 234, 18, 221, 118, 23, 6, 216, 106, 205, 80, 253, 169, 44, 126, 188, 86, 148, 17, 196, 203, 71, 209, 61, 152, 85, 62, 175, 202, 217, 146, 244, 97, 225, 44, 247, 143, 91, 70, 35, 57, 139, 54, 57, 116, 38, 186, 118, 87, 103, 75, 177, 143, 89, 11, 226, 83, 185, 184, 141, 84, 108, 6, 48, 229, 155, 97, 49, 184, 31, 246, 176, 192, 154, 240, 239, 190, 145, 226, 241, 211, 41, 217, 80, 161, 111, 216, 64, 18, 246, 204, 16, 10, 140, 15, 176, 92, 249, 33, 67, 133, 144, 22, 210, 159, 38, 74, 173, 80, 142, 20, 227, 222, 229, 255, 242, 53, 237, 127, 164, 249, 251, 186, 105, 168, 88, 51, 234, 174, 84, 192, 122, 167, 97, 49, 61, 92, 98, 80, 103, 95, 145, 133, 4, 181, 128, 228, 8, 96, 82, 84, 120, 170, 78, 248, 159, 167, 148, 250, 219, 90, 12, 15, 137, 71, 79, 36, 28, 4, 152, 244, 110, 230, 10, 168, 118, 110, 192, 67, 131, 179, 163, 38, 148, 233, 38, 78, 21, 170, 224, 198, 198, 213, 34, 5, 31, 53, 104, 32, 119, 151, 114, 97, 101, 82, 137, 75, 45, 138, 205, 68, 23, 75, 222, 218, 110, 216, 135, 100, 7, 220, 222, 198, 110, 88, 86, 116, 219, 233, 138, 208, 239, 12, 58, 101, 9, 204, 184, 28, 158, 141, 131, 81, 181, 228, 27, 185, 81, 80, 173, 223, 149, 9, 215, 181, 236, 225, 9, 37, 87, 233, 240, 237, 174, 30, 29, 249, 138, 246, 25, 48, 234, 173, 3, 31, 195, 207, 175, 214, 185, 54, 161, 121, 154, 219, 185, 101, 248, 2, 178, 79, 15, 84, 119, 213, 129, 32, 201, 51, 168, 75, 166, 81, 116, 70, 147, 1, 151, 79, 25, 17, 180, 192, 115, 133, 76, 142, 62, 138, 16, 170, 231, 254, 121, 9, 61, 124, 232, 81, 200, 179, 79, 162, 130, 144, 65, 207, 98, 253, 109, 75, 123, 115, 231, 15, 215, 193, 169, 200, 251, 127, 214, 86, 243, 168, 219, 74, 160, 140, 86, 14, 104, 49, 172, 96, 220, 152, 40, 242, 135, 10, 37, 220, 49, 235, 169, 84, 160, 17, 120, 24, 171, 110, 1, 77, 32, 127, 155, 89, 30, 40, 94, 114, 24, 78, 178, 191, 49, 100, 9, 218, 179, 201, 3, 144, 215, 224, 70, 236, 109, 241, 229, 50, 172, 248, 253, 202, 163, 169, 108, 6, 8, 136, 64, 72, 161, 179, 72, 11, 12, 112, 142, 221, 161, 113, 252, 91, 229, 55, 102, 97, 71, 145, 55, 0, 11, 143, 37, 248, 112, 57, 106, 115, 112, 9, 68, 90, 117, 146, 223, 124, 35, 169, 129, 150, 173, 233, 67, 46, 37, 129, 237, 185, 88, 41, 78, 143, 37], + [148, 181, 103, 64, 223, 77, 216, 254, 69, 235, 46, 221, 89, 135, 44, 121, 94, 14, 21, 106, 239, 2, 112, 106, 254, 238, 233, 73, 34, 94, 82, 74, 180, 237, 252, 248, 178, 135, 54, 250, 95, 129, 184, 237, 63, 1, 140, 21, 72, 197, 222, 106, 139, 235, 122, 15, 109, 79, 93, 5, 240, 6, 219, 248, 220, 206, 146, 43, 250, 142, 168, 84, 171, 137, 166, 255, 27, 0, 122, 85, 67, 77, 82, 118, 240, 75, 219, 6, 142, 237, 67, 187, 249, 120, 100, 200, 18, 71, 116, 112, 117, 174, 118, 179, 105, 77, 80, 217, 44, 205, 6, 180, 231, 112, 120, 22, 51, 130, 80, 199, 102, 14, 236, 66, 48, 178, 133, 83, 251, 158, 44, 84, 196, 179, 59, 21, 247, 17, 74, 252, 104, 103, 177, 200, 70, 92, 33, 84, 3, 102, 226, 181, 162, 61, 113, 112, 222, 90, 235, 186, 109, 122, 24, 108, 173, 108, 10, 199, 162, 62, 217, 212, 77, 210, 153, 118, 200, 253, 53, 172, 17, 141, 199, 125, 165, 82, 138, 120, 79, 117, 37, 102, 191, 122, 50, 214, 89, 168, 37, 31, 81, 223, 16, 133, 80, 62, 161, 141, 6, 157, 245, 85, 234, 117, 193, 34, 120, 172, 180, 215, 127, 199, 222, 195, 199, 51, 53, 211, 221, 124, 147, 91, 39, 145, 157, 68, 201, 100, 194, 52, 93, 20, 175, 170, 45, 172, 227, 30, 153, 113, 181, 11, 72, 89, 143, 239, 244, 236, 249, 236, 45, 81, 47, 2, 80, 42, 164, 212, 136, 215, 68, 24, 222, 182, 200, 247, 171, 161, 65, 66, 217, 81, 92, 104, 199, 23, 64, 240, 196, 118, 149, 221, 5, 86, 27, 47, 244, 251, 245, 84, 38, 194, 27, 180, 83, 206, 236, 40, 184, 239, 12, 115, 15, 125, 128, 57, 143, 79, 25, 244, 162, 156, 114, 205, 93, 145, 222, 124, 71, 82, 127, 212, 116, 26, 68, 68, 131, 255, 64, 100, 66, 183, 173, 58, 137, 246, 94, 98, 224, 177, 186, 67, 107, 34, 144, 4, 67, 164, 141, 206, 50, 246, 91, 118, 133, 146, 7, 190, 214, 181, 91, 216, 208, 131, 104, 128, 123, 186, 223, 212, 127, 39, 253, 82, 143, 180, 255, 234, 215, 188, 116, 110, 188, 197, 195, 120, 67, 53, 48, 110, 154, 74, 82, 160, 185, 53, 172, 40, 181, 170, 28, 230, 225, 247, 191, 153, 196, 203, 89, 52, 211, 247, 35, 224, 25, 117, 221, 185, 195, 161, 168, 64, 147, 213, 54, 95, 87, 142, 9, 146, 152, 14, 93, 32, 244, 0, 89, 198, 236, 30, 232, 240, 84, 142, 248, 189, 33, 198, 131, 170, 153, 61, 30, 132, 70, 253, 124, 29, 10, 203, 47, 33, 226, 11, 32, 149, 48, 158, 133, 217, 118, 27, 72, 22, 80, 246, 223, 165, 218, 60, 143, 141, 48, 101, 7, 228, 84, 225, 223, 37, 203, 205, 145, 84, 133, 98, 197, 218, 2, 207, 132, 109, 28, 8, 205, 25, 45, 79, 82, 166, 99, 134, 214, 207, 254, 130, 71, 102, 115, 79, 65, 130, 150, 119, 170, 180, 191, 50, 108, 85, 69, 133, 177, 153, 93, 219, 90, 188, 127, 170, 165, 49, 144, 247, 89, 177, 156, 248, 165, 204, 111, 109, 0, 166, 194, 34, 176, 42, 16, 241, 53, 218, 124, 218, 249, 153, 221, 20, 156, 5, 139, 53, 97, 119, 49, 18, 252, 231, 47, 151, 12, 252, 76, 211, 172, 205, 3, 107, 5, 238, 158, 23, 107, 78, 122, 206, 160, 213, 195, 63, 235, 49, 44, 151, 20, 169, 1, 175, 247, 69, 24, 184, 154, 213, 120, 252, 35, 168, 230, 102, 154, 54, 139, 253, 167, 177, 241, 0, 170, 203, 197, 103, 144, 159, 161, 180, 213, 223, 12, 170, 119, 230, 179, 242, 239, 9, 227, 187, 252, 69, 221, 205, 18, 71, 201, 15, 241, 67, 51, 220, 135, 148, 119, 196, 62, 123, 202, 148, 32, 182, 90, 150, 129, 204, 189, 156, 201, 223, 179, 104, 27, 21, 175, 49, 11, 59, 66, 142, 233, 206, 77, 74, 223, 63, 191, 234, 167, 114, 73, 132, 53, 213, 229, 155, 213, 47, 112, 111, 57, 179, 182, 97, 35, 69, 247, 5, 11, 62, 38, 213, 213, 16, 73, 156, 215, 91, 32, 59, 213, 99, 187, 27, 66, 5, 30, 107, 150, 137, 101, 99, 32, 4, 31, 12, 231, 253, 148, 47, 104, 138, 0, 85, 126, 222, 58, 71, 42, 75, 40, 127, 123, 16, 36, 53, 228, 217, 188, 79, 165, 222, 99, 227, 176, 102, 5, 247, 217, 159, 194, 124, 93, 179, 27, 0, 158, 131, 217, 15, 32, 199, 88, 121, 198, 57, 86, 26, 70, 188, 140, 115, 227, 251, 85, 112, 39, 214, 91, 2, 87, 226, 191, 157, 254, 213, 158, 225, 125, 103, 243, 43, 180, 192, 185, 62, 219, 224, 147, 126, 40, 39, 226, 25, 221, 233, 209, 51, 136, 85, 37, 38, 26, 26, 124, 3, 103, 10, 166, 223, 49, 30, 145, 231, 153, 63, 244, 250, 140, 253, 112, 1, 30, 119, 24, 38, 117, 131, 174, 20, 166, 174, 238, 221, 200, 239, 171, 27, 186, 230, 189, 92, 16, 73, 170, 129, 80, 36, 153, 37, 56, 146, 240, 168, 175, 215, 95, 178, 119, 130, 130, 112, 170, 251, 212, 165, 90, 92, 230, 177, 37, 103, 55, 222, 101, 180, 88, 63, 140, 230, 249, 26, 10, 251, 40, 181, 97, 45, 139, 248, 69, 200, 229, 185, 72, 192, 41, 205, 187, 163, 188, 76, 32, 45, 98, 236, 97, 240, 227, 169, 194, 239, 59, 141, 192, 40, 205, 55, 37, 143, 127, 105, 161, 122, 5, 45, 208, 48, 147, 66, 213, 28, 189, 98, 99, 168, 91, 234, 224, 20, 29, 138, 196, 53, 185, 108, 90, 138, 217, 122, 155, 81, 221, 150, 76, 238, 73, 230, 4, 172, 153, 12, 119, 49, 186, 98, 194, 5, 32, 78, 99, 91, 219, 158, 0, 207, 99, 91, 212, 188, 158, 221, 119, 163, 123, 25, 177, 220, 106, 30, 4, 37, 8, 229, 59, 194, 206, 214, 247, 55, 78, 148, 209, 208, 181, 2, 93, 15, 19, 194, 25, 196, 128, 155, 217, 60, 47, 228, 103, 225, 227, 107, 144, 22, 233, 155, 213, 19, 85, 20, 82, 148, 81, 103, 132, 20, 233, 172, 172, 70, 150, 82, 209, 72, 89, 175, 190, 238, 79, 96, 170, 196, 110, 136, 141, 85, 235, 131, 171, 131, 97, 199, 118, 44, 148, 227, 7, 42, 121, 9, 23, 188, 100, 106, 220, 142, 83, 86, 111, 69, 24, 190, 73, 218, 95, 253, 220, 190, 145, 36, 69, 63, 204, 99, 152, 204, 63, 70, 85, 135, 165, 178, 65, 200, 1, 36, 199, 59, 140, 214, 23, 187, 105, 155, 93, 59, 190, 171, 97, 24, 84, 209, 184, 253, 235, 146, 149, 157, 221, 45, 235, 208, 62, 160, 128, 88, 16, 155, 67, 172, 249, 182, 173, 169, 122, 244, 225, 91, 199, 104, 121, 169, 44, 110, 177, 159, 150, 185, 147, 81, 95, 152, 31, 129, 71, 78, 67, 184, 200, 224, 217, 76, 239, 253, 188, 174, 149, 209, 200, 170, 29, 17, 159, 165, 182, 218, 192, 226, 74, 31, 138, 188, 24, 49, 147, 88, 107, 72, 64, 216, 239, 196, 236, 124, 159, 200, 255, 114, 171, 12, 242, 149, 201, 158, 45, 242, 242, 101, 41, 107, 5, 204, 44, 254, 117, 219, 76, 171, 141, 115, 245, 189, 22, 11, 216, 193, 38, 236, 33, 51, 251, 72, 17, 167, 213, 221, 210, 188, 229, 55, 93, 201, 101, 72, 147, 234, 78, 88, 149, 142, 218, 193, 216, 196, 63, 120, 37, 135, 102, 75, 220, 166, 115, 65, 253, 95, 175, 38, 14, 244, 209, 164, 75, 155, 49, 146, 199, 4, 74, 250, 212, 242, 180, 29, 138, 133, 11, 139, 165, 11, 45, 78, 116, 82, 160, 158, 209, 198, 158, 202, 26, 130, 44, 217, 22, 22, 12, 0, 54, 191, 78, 184, 124, 101, 249, 141, 222, 127, 138, 180, 168, 107, 37, 68, 6, 62, 56, 161, 33, 139, 234, 13, 29, 8, 48, 77, 41, 166, 233, 183, 67, 173, 87, 111, 113, 54, 157, 114, 47, 36, 25, 255, 54, 1, 19, 157, 118, 38, 158, 125, 110, 193, 94, 58, 52, 154, 146, 222, 221, 44, 182, 252, 143, 248, 160, 89, 218, 122, 125, 121, 8, 163, 28, 102, 116, 131, 245, 242, 141, 42, 115, 228, 69, 219, 56, 250, 119, 116, 130, 182, 173, 228, 182, 77, 89, 151, 130, 59, 255, 253, 92, 164, 157, 181, 207, 157, 139, 15, 4, 29, 204, 62, 130, 122, 227, 197, 235, 253, 212, 84, 5, 17, 170, 223, 66, 87, 46, 251, 130, 121, 149, 191, 133, 29, 203, 249, 79, 253, 138, 198, 217, 125, 57, 187, 216, 18, 21, 184, 201, 168, 97, 199, 99, 118, 24, 188, 129, 152, 180, 92, 107, 254, 102, 15, 180, 213, 70, 30, 198, 215, 229, 89, 46, 184, 50, 212, 115, 224, 57, 78, 147, 82, 115, 38, 6, 61, 187, 130, 216, 118, 54, 125, 56, 222, 235, 172, 12, 87, 244, 127, 211, 121, 1, 99, 73, 90, 229, 56, 46, 223, 163, 86, 157, 44, 37, 116, 237, 110, 121, 172, 230, 245, 131, 30, 93, 189, 228, 124, 102, 222, 109, 77, 37, 95, 244, 81, 64, 64, 147, 228, 142, 231, 171, 166, 16, 140, 100, 12, 244, 144, 134, 53, 247, 207, 3, 77, 108, 242, 211, 209, 242, 245, 159, 125, 189, 35, 68, 204, 152, 71, 156, 135, 245, 93, 42, 13, 0, 34, 14, 245, 86, 194, 147, 152, 157, 248, 233, 66, 15, 224, 41, 74, 38, 173, 68, 189, 171, 94, 89, 161, 171, 137, 157, 90, 154, 60, 75, 94, 46, 103, 24, 6, 178, 48, 249, 103, 158, 63, 48, 104, 249, 142, 255, 167, 20, 182, 181, 121, 164, 65, 43, 20, 208, 64, 137, 212, 151, 70, 231, 10, 139, 236, 221, 58, 50, 71, 81, 199, 51, 220, 29, 81, 154, 119, 166, 137, 251, 252, 237, 82, 76, 71, 191, 108, 16, 70, 169, 142, 196, 181, 252, 40, 106, 143, 90, 193, 153, 210, 199, 195, 75, 118, 186, 190, 191, 241, 157, 224, 104, 44, 105, 81, 31, 147, 31, 16, 97, 154, 168, 215, 226, 180, 172, 37, 221, 221, 177, 245, 150, 113, 234, 220, 133, 142, 162, 253, 18, 221, 101, 104, 50, 35, 199, 165, 67, 13, 106, 231, 51, 246, 27, 221, 65, 36, 80, 193, 188, 1, 40, 100, 30, 178, 112, 68, 13, 164, 94, 78, 246, 135, 230, 225, 245, 245, 79, 162, 206, 168, 206, 78, 76, 0, 87, 163, 39, 83, 34, 13, 47, 71, 107, 149, 93, 26, 3, 155, 210, 198, 208, 37, 209, 181, 4, 1, 47, 237, 28, 122, 126, 173, 84, 217, 74, 225, 96, 226, 6, 248, 204, 120, 4, 157, 143, 120, 76, 184, 139, 76, 234, 187, 11, 43, 235, 218, 248, 199, 162, 44, 76, 251, 198, 248, 58, 35, 89, 59, 111, 171, 17, 174, 77, 114, 214, 255, 95, 73, 170, 168, 44, 187, 31, 111, 88, 233, 91, 182, 43, 135, 217, 212, 241, 79, 202, 151, 42, 53, 147, 182, 214, 153, 195, 33, 3, 216, 196, 67, 168, 207, 179, 116, 149, 18, 79, 221, 60, 184, 63, 46, 139, 189, 48, 80, 6, 22, 98, 119, 225, 88, 16, 138, 5, 193, 241, 130, 25, 30, 206, 221, 138, 239, 200, 171, 6, 10, 10, 120, 216, 217, 131, 155, 70, 82, 155, 76, 216, 146, 16, 251, 108, 108, 203, 93, 36, 122, 91, 32, 99, 207, 49, 34, 175, 215, 239, 25, 205, 254, 129, 47, 117, 168, 9, 10, 123, 100, 101, 142, 213, 59, 37, 196, 235, 252, 220, 234, 52, 68, 19, 181, 37, 89, 52, 21, 77, 137, 110, 253, 133, 155, 225, 49, 37, 4, 200, 236, 189, 170, 137, 173, 118, 142, 176, 0, 3, 14, 157, 188, 138, 131, 190, 72, 72, 156, 234, 179, 57, 137, 250, 52, 21, 7, 172, 174, 199, 0, 2, 57, 240, 60, 54, 111, 225, 3, 151, 135, 7, 103, 38, 192, 157, 2, 21, 102, 16, 180, 207, 147, 14, 26, 44, 158, 75, 152, 38, 202, 160, 54, 173, 195, 99, 238, 152, 28, 161, 221, 180, 61, 222, 184, 109, 222, 40, 31, 226, 53, 198, 200, 65, 219, 111, 47, 71, 51, 74, 54, 231, 196, 193, 120, 107, 96, 44, 160, 98, 98, 223, 62, 87, 220, 30, 2, 54, 65, 9, 110, 188, 165, 72, 21, 24, 120, 103, 200, 54, 150, 20, 13, 62, 187, 166, 227, 149, 5, 154, 45, 10, 250, 6, 125, 171, 28, 183, 34, 213, 198, 158, 247, 248, 226, 135, 191, 31, 88, 146, 179, 143, 228, 60, 167, 119, 0, 153, 209, 241, 202, 203, 38, 150, 75, 211, 4, 207, 45, 171, 0, 248, 74, 183, 121, 215, 99, 208, 3, 153, 177, 90, 116, 70, 184, 190, 188, 92, 133, 10, 187, 73, 52, 151, 199, 12, 165, 46, 17, 232, 138, 35, 101, 69, 133, 184, 197, 17, 194, 111, 149, 26, 18, 217, 190, 16, 247, 38, 242, 53, 232, 176, 4, 68, 105, 241, 111, 79, 214, 15, 173, 77, 126, 149, 132, 183, 208, 255, 69, 145, 147, 117, 202, 165, 222, 44, 59, 192, 51, 207, 183, 239, 38, 246, 229, 12, 27, 151, 151, 222, 210, 135, 205, 200, 253, 109, 240, 41, 254, 142, 62, 215, 195, 199, 106, 113, 83, 55, 43, 6, 254, 2, 102, 177, 84, 219, 165, 246, 204, 96, 0, 219, 247, 248, 130, 231, 39, 169, 177, 76, 124, 194, 55, 17, 228, 38, 233, 235, 11, 146, 139, 173, 16, 72, 72, 198, 87, 16, 61, 70, 41, 46, 62, 119, 33, 222, 66, 193, 238, 4, 209, 78, 161, 83, 97, 123, 182, 69, 72, 217, 126, 5, 169, 81, 175, 43, 63, 117, 129, 122, 239, 156, 174, 50, 252, 125, 102, 134, 73, 93, 202, 86, 121, 45, 39, 248, 38, 187, 199, 107, 198, 40, 198, 121, 204, 14, 37, 144, 132, 241, 170, 157, 174, 103, 69, 200, 72, 108, 172, 28, 166, 181, 96, 116, 1, 26, 83, 64, 132, 106, 0, 194, 237, 129, 112, 83, 193, 170, 3, 72, 16, 38, 31, 34, 64, 21, 151, 61, 219, 185, 229, 174, 59, 61, 105, 5, 11, 32, 198, 9, 78, 119, 19, 62, 147, 169, 109, 29, 145, 46, 17, 49, 34, 10, 178, 228, 131, 220, 75, 132, 125, 21, 51, 41, 65, 118, 65, 111, 41, 75, 9, 140, 45, 110, 65, 8, 240, 59, 148, 59, 112, 48, 2, 164, 238, 124, 207, 221, 127, 168, 175, 136, 39, 84, 203, 252, 131, 44, 167, 159, 20, 14, 237, 27, 233, 64, 61, 180, 203, 244, 32, 31, 225, 125, 194, 172, 220, 184, 118, 238, 35, 85, 1, 52, 87, 182, 106, 26, 201, 181, 70, 149, 152, 143, 232, 219, 62, 138, 154, 170, 79, 185, 254, 41, 240, 253, 9, 12, 40, 73, 130, 108, 170, 15, 36, 183, 160, 215, 185, 70, 66, 116, 174, 7, 158, 122, 51, 112, 247, 23, 168, 187, 245, 124, 16, 57, 62, 217, 104, 108, 131, 154, 240, 241, 144, 252, 30, 185, 129, 43, 237, 236, 250, 224, 86, 90, 192, 42, 149, 48, 40, 60, 148, 102, 229, 227, 79, 251, 243, 38, 33, 91, 200, 170, 145, 24, 19, 72, 69, 132, 158, 57, 244, 117, 232, 90, 147, 208, 149, 247, 187, 236, 71, 128, 247, 194, 168, 103, 87, 28, 195, 208, 30, 217, 69, 117, 186, 227, 149, 140, 171, 134, 127, 159, 47, 172, 104, 157, 216, 206, 35, 136, 167, 63, 156, 75, 230, 177, 194, 24, 123, 51, 66, 52, 249, 5, 129, 249, 214, 214, 8, 232, 236, 59, 102, 219, 28, 246, 151, 11, 156, 200, 47, 220, 67, 119, 194, 216, 150, 245, 9, 253, 176, 175, 154, 2, 195, 98, 94, 137, 32, 241, 118, 107, 54, 157, 49, 145, 46, 0, 227, 84, 29, 141, 29, 131, 251, 5, 116, 182, 3, 6, 64, 110, 210, 69, 211, 218, 83, 51, 242, 244, 77, 130, 215, 241, 36, 217, 101, 184, 28, 180, 189, 247, 60, 30, 179, 43, 128, 178, 24, 133, 222, 134, 59, 168, 129, 34, 26, 175, 156, 125, 207, 240, 69, 38, 188, 116, 222, 2, 244, 5, 5, 181, 88, 200, 109, 43, 156, 245, 247, 181, 157, 202, 158, 119, 124, 219, 235, 178, 141, 162, 163, 115, 7, 220, 177, 228, 22, 18, 217, 218, 122, 29, 170, 0, 16, 66, 235, 174, 69, 137, 156, 75, 114, 207, 22, 63, 21, 225, 22, 228, 202, 148, 244, 58, 239, 95, 96, 117, 41, 43, 69, 138, 40, 59, 117, 185, 234, 51, 59, 111, 219, 129, 174, 139, 148, 112, 1, 95, 36, 54, 127, 98, 154, 73, 59, 130, 96, 245, 214, 80, 149, 99, 185, 132, 207, 92, 181, 156, 0, 190, 31, 237, 31, 231, 79, 61, 244, 234, 97, 248, 83, 38, 127, 220, 146, 157, 54, 253, 125, 143, 15, 141, 247, 108, 187, 184, 34, 34, 20, 12, 80, 146, 195, 248, 89, 25, 126, 60, 59, 79, 118, 245, 196, 91, 107, 129, 89, 98, 75, 38, 192, 142, 244, 50, 127, 108, 138, 74, 248, 58, 78, 242, 196, 153, 126, 158, 206, 48, 179, 8, 11, 242, 114, 89, 179, 246, 44, 15, 155, 192, 109, 83, 149, 224, 44, 252, 151, 155, 180, 31, 123, 167, 139, 233, 225, 202, 64, 112, 227, 77, 77, 90, 62, 58, 134, 119, 115, 210, 135, 121, 94, 123, 108, 59, 191, 184, 161, 31, 217, 194, 116, 39, 178, 168, 226, 135, 94, 204, 141, 158, 174, 239, 21, 73, 124, 118, 100, 15, 111, 67, 155, 110, 11, 187, 166, 69, 179, 92, 56, 183, 35, 206, 170, 16, 116, 65, 66, 29, 34, 89, 116, 14, 75, 179, 225, 224, 28, 32, 161, 37, 210, 49, 215, 22, 176, 190, 105, 163, 189, 117, 243, 22, 110, 121, 53, 84, 197, 88, 109, 155, 69, 154, 225, 222, 186, 194, 103, 221, 175, 182, 217, 199, 198, 251, 81, 237, 22, 158, 212, 184, 150, 242, 176, 142, 55, 36, 102, 171, 229, 233, 43, 243, 76, 174, 92, 164, 60, 145, 1, 223, 76, 15, 75, 165, 128, 239, 43, 101, 32, 241, 82, 168, 213, 95, 225, 5, 8, 147, 211, 3, 171, 169, 132, 78, 228, 66, 82, 215, 197, 130, 231, 132, 50, 174, 152, 98, 236, 231, 180, 91, 234, 56, 56, 74, 106, 114, 211, 60, 224, 207, 237, 21, 56, 189, 35, 108, 188, 60, 216, 96, 90, 227, 32, 120, 64, 234, 211, 153, 7, 14, 254, 245, 83, 186, 249, 233, 53, 176, 124, 77, 49, 142, 68, 35, 1, 114, 172, 102, 2, 152, 217, 23, 54, 76, 253, 170, 204, 245, 121, 69, 18, 220, 114, 43, 65, 125, 240, 187, 117, 89, 88, 240, 238, 136, 170, 183, 93, 35, 51, 158, 101, 86, 147, 94, 184, 98, 116, 9, 237, 36, 106, 171, 149, 196, 82, 45, 170, 141, 253, 19, 175, 224, 56, 231, 186, 110, 245, 152, 185, 118, 0, 146, 175, 180, 123, 173, 49, 52, 1, 177, 203, 165, 126, 201, 86, 49, 211, 157, 229, 26, 156, 74, 142, 133, 215, 88, 23, 149, 137, 102, 14, 145, 199, 56, 76, 221, 198, 19, 69, 64, 114, 188, 63, 199, 114, 54, 90, 187, 18, 85, 200, 125, 204, 42, 6, 245, 191, 151, 236, 119, 53, 144, 244, 162, 190, 72, 63, 121, 46, 242, 72, 92, 14, 224, 22, 81, 189, 87, 73, 52, 178, 201, 222, 25, 217, 106, 62, 159, 190, 154, 140, 124, 159, 139, 199, 193, 90, 43, 228, 112, 129, 212, 23, 70, 180, 102, 241, 142, 51, 134, 135, 95, 129, 180, 61, 177, 65, 232, 158, 63, 203, 194, 82, 241, 114, 47, 139, 152, 66, 142, 168, 65, 76, 233, 160, 20, 44, 202, 62, 13, 173, 183, 238, 149, 75, 75, 186, 32, 224, 199, 182, 71, 208, 148, 193, 90, 9, 211, 151, 241, 86, 111, 89, 84, 208, 22, 223, 128, 130, 193, 98, 10, 86, 28, 96, 85, 224, 202, 200, 78, 189, 228, 122, 98, 50, 80, 120, 191, 70, 99, 138, 24, 240, 17, 161, 172, 66, 170, 234, 157, 222, 41, 238, 168, 129, 227, 13, 200, 139, 240, 166, 127, 91, 37, 175, 188, 39, 65, 135, 181, 167, 141, 35, 210, 44, 36, 20, 161, 119, 229, 243, 71, 128, 207, 58, 67, 20, 69, 28, 117, 196, 8, 178, 40, 44, 148, 52, 181, 159, 111, 19, 114, 1, 27, 118, 246, 155, 183, 68, 141, 123, 86, 221, 33, 54, 115, 217, 58, 244, 187, 237, 237, 58, 187, 34, 58, 5, 132, 154, 125, 136, 220, 100, 85, 100, 248, 9, 134, 196, 26, 130, 142, 108, 228, 117, 11, 19, 78, 5, 97, 173, 176, 99, 19, 129, 221, 164, 95, 146, 229, 223, 143, 24, 124, 83, 54, 232, 199, 254, 187, 23, 28, 221, 118, 211, 2, 185, 227, 236, 50, 143, 136, 160, 233, 136, 126, 63, 233, 243, 26, 99, 165, 67, 116, 63, 75, 76, 150, 190, 51, 16, 87, 122, 253, 31, 59, 181, 91, 95, 167, 175, 24, 51, 140, 94, 80, 18, 141, 255, 160, 159, 161, 95, 247, 110, 22, 226, 147, 69, 54, 45, 48, 188, 61, 46, 119, 108, 104, 65, 153, 133, 178, 128, 3, 55, 97, 167, 245, 214, 255, 0, 244, 145, 25, 186, 236, 168, 77, 81, 48, 22, 46, 195, 11, 97, 105, 6, 114, 91, 167, 242, 123, 251, 12, 229, 176, 166, 19, 31, 165, 51, 94, 247, 245, 241, 1, 155, 210, 167, 56, 212, 165, 244, 178, 27, 65, 150, 143, 119, 169, 225, 25, 209, 191, 216, 51, 95, 164, 44, 207, 63, 180, 101, 183, 142, 1, 53, 208, 108, 193, 123, 129, 146, 0, 213, 89, 25, 178, 137, 97, 0, 91, 158, 124, 23, 250, 151, 167, 30, 35, 22, 114, 77, 56, 93, 209, 119, 144, 95, 235, 125, 177, 52, 146, 233, 200, 243, 105, 71, 116, 114, 65, 65, 44, 124, 101, 19, 180, 72, 57, 202, 20, 114, 45, 216, 108, 52, 4, 77, 215, 209, 233, 118, 10, 54, 137, 169, 74, 171, 112, 222, 75, 77, 164, 40, 179, 251, 171, 100, 184, 161, 246, 76, 228, 86, 24, 146, 117, 108, 229, 135, 35, 135, 180, 139, 89, 255, 222, 132, 85, 68, 52, 56, 9, 2, 99, 189, 116, 13, 15, 136, 152, 2, 170, 242, 243, 21, 14, 35, 206, 36, 27, 46, 176, 37, 77, 233, 240, 157, 130, 93, 227, 193, 185, 250, 3, 232, 10, 77, 223, 249, 195, 126, 157, 67, 22, 55, 52, 228, 148, 186, 95, 70, 56, 253, 69, 61, 156, 173, 255, 129, 182, 132, 180, 79, 212, 23, 121, 88, 66, 252, 114, 252, 242, 193, 73, 234, 78, 109, 1, 37, 37, 131, 193, 115, 243, 232, 73, 149, 95, 85, 228, 188, 145, 213, 168, 2, 129, 186, 99, 142, 88, 69, 127, 145, 26, 130, 232, 13, 182, 0, 183, 173, 113, 186, 243, 211, 116, 16, 99, 36, 115, 221, 166, 199, 62, 8, 101, 209, 164, 78, 254, 14, 172, 66, 103, 70, 187, 122, 148, 47, 128, 30, 20, 82, 9, 225, 166, 81, 69, 183, 246, 52, 205, 124, 204, 178, 150, 14, 97, 233, 96, 153, 207, 50, 71, 104, 35, 63, 164, 178, 202, 123, 132, 175, 223, 178, 39, 57, 132, 217, 53, 167, 96, 166, 105, 124, 2, 29, 39, 191, 44, 223, 22, 128, 157, 143, 225, 165, 19, 91, 73, 157, 123, 66, 96, 219, 126, 181, 131, 67, 185, 110, 208, 228, 80, 51, 117, 69, 236, 185, 124, 46, 88, 178, 28, 221, 101, 54, 101, 117, 151, 213, 210, 65, 185, 56, 56, 112, 135, 3, 37, 133, 156, 7, 60, 194, 137, 71, 192, 153, 203, 108, 181, 47, 53, 82, 222, 0, 65, 244, 152, 16, 92, 37, 143, 95, 62, 140, 166, 144, 31, 53, 172, 19, 109, 139, 63, 134, 205, 125, 87, 200, 243, 222, 191, 206, 193, 160, 142, 48, 74, 29, 209, 176, 125, 95, 182, 92, 247, 159, 145, 94, 167, 211, 24, 229, 197, 82, 97, 159, 206, 85, 60, 104, 78, 182, 129, 214, 111, 21, 68, 15, 88, 81, 79, 191, 160, 28, 15, 184, 59, 41, 171, 146, 198, 126, 104, 101, 69, 42, 185, 21, 165, 61, 9, 32, 235, 168, 193, 129, 213, 85, 122, 100, 100, 107, 140, 3, 141, 125, 78, 168, 159, 203, 42, 234, 203, 152, 44, 129, 29, 244, 3, 58, 100, 209, 68, 179, 148, 23, 182, 214, 246, 109, 253, 100, 84, 244, 57, 130, 112, 252, 72, 96, 105, 194, 61, 159, 130, 247, 120, 208, 33, 234, 197, 200, 90, 136, 146, 169, 198, 189, 23, 99, 243, 252, 196, 141, 242, 56, 125, 129, 3, 134, 156, 13, 36, 129, 155, 184, 246, 64, 133, 55, 169, 235, 93, 204, 45, 58, 181, 132, 109, 9, 155, 135, 166, 161, 40, 27, 242, 162, 229, 194, 146, 9, 60, 41, 91, 157, 182, 241, 34, 66, 79, 243, 14, 41, 103, 198, 228, 42, 49, 239, 134, 194, 155, 35, 179, 112, 138, 6, 56, 173, 27, 248, 173, 255, 253, 177, 142, 40, 11, 219, 3, 115, 62, 247, 170, 55, 0, 26, 221, 24, 33, 44, 192, 87, 226, 227, 197, 146, 20, 55, 221, 206, 99, 62, 197, 105, 207, 28, 43, 167, 150, 119, 119, 134, 180, 35, 51, 61, 101, 29, 245, 129, 207, 65, 139, 202, 79, 25, 215, 83, 135, 70, 55, 197, 31, 168, 151, 149, 178, 231, 99, 229, 104, 207, 254, 65, 246, 63, 14, 207, 45, 209, 196, 7, 243, 6, 246, 149, 37, 133, 217, 212, 134, 163, 42, 20, 202, 194, 212, 231, 20, 75, 83, 206, 6, 68, 248, 16, 23, 33, 194, 58, 94, 236, 131, 97, 83, 228, 232, 155, 255, 199, 41, 236, 87, 244, 126, 123, 139, 22, 175, 134, 127, 66, 83, 24, 244, 209, 222, 87, 230, 34, 191, 4, 135, 246, 162, 10, 193, 213, 171, 0, 94, 252, 11, 13, 19, 232, 91, 8, 126, 113, 21, 74, 248, 143, 71, 135, 107, 207, 130, 172, 31, 71, 143, 38, 55, 102, 4, 33, 122, 92, 74, 59, 145, 52, 197, 195, 237, 58, 191, 91, 3, 209, 169, 203, 58, 38, 143, 4, 31, 134, 121, 160, 212, 193, 78, 6, 61, 188, 136, 120, 179, 116, 42, 206, 241, 82, 53, 101, 79, 171, 43, 53, 65, 73, 67, 20, 237, 61, 170, 244, 175, 140, 203, 121, 92, 145, 225, 105, 155, 4, 2, 80, 149, 123, 15, 78, 225, 233, 181, 80, 42, 244, 176, 21, 195, 133, 49, 118, 163, 76, 240, 237, 96, 64, 77, 121, 68, 124, 201, 242, 199, 255, 139, 174, 109, 9, 103, 198, 89, 2, 44, 199, 248, 135, 1, 214, 72, 110, 251, 167, 243, 232, 43, 43, 50, 197, 138, 94, 106, 70, 147, 69, 67, 255, 25, 45, 47, 44, 162, 98, 138, 7, 112, 38, 36, 47, 198, 236, 128, 60, 232, 206, 52, 34, 168, 198, 200, 21, 12, 73, 175, 198, 159, 213, 159, 164, 116, 180, 155, 28, 220, 138, 26, 223, 69, 60, 224, 148, 182, 90, 189, 193, 71, 20, 146, 237, 186, 44, 174, 186, 252, 39, 246, 138, 230, 53, 47, 103, 40, 23, 73, 209, 124, 184, 198, 20, 177, 89, 35, 210, 83, 216, 110, 221, 154, 114, 6, 54, 16, 42, 128, 226, 73, 21, 142, 49, 211, 233, 217, 252, 86, 7, 251, 193, 106, 142, 250, 19, 215, 194, 175, 52, 114, 127, 134, 11, 79, 127, 15, 131, 135, 109, 74, 198, 250, 46, 26, 116, 154, 244, 180, 105, 98, 226, 233, 141, 185, 96, 123, 121, 230, 164, 237, 50, 182, 212, 159, 123, 65, 128, 22, 42, 156, 16, 38, 98, 250, 146, 202, 188, 202, 116, 226, 241, 33, 96, 203, 254, 254, 18, 13, 157, 158, 86, 14, 37, 170, 70, 90, 221, 54, 13, 34, 179, 70, 229, 210, 115, 110, 239, 237, 251, 200, 189, 234, 248, 201, 161, 224, 60, 14, 130, 192, 12, 145, 245, 37, 138, 152, 16, 185, 214, 245, 127, 232, 80, 185, 238, 22, 241, 165, 136, 238, 122, 188, 249, 247, 77, 187, 60, 80, 45, 98, 127, 31, 46, 76, 37, 59, 216, 12, 79, 42, 15, 84, 110, 128, 82, 110, 216, 52, 87, 17, 12, 207, 61, 21, 183, 221, 77, 129, 95, 53, 20, 97, 100, 63, 200, 228, 237, 174, 189, 238, 150, 10, 138, 29, 111, 199, 130, 25, 69, 23, 53, 63, 28, 211, 247, 174, 167, 6, 106, 128, 49, 159, 132, 37, 75, 58, 153, 219, 93, 229, 225, 14, 252, 28, 195, 234, 128, 8, 175, 225, 245, 59, 185, 70, 195, 134, 222, 219, 154, 231, 108, 194, 203, 123, 216, 154, 29, 173, 1, 60, 220, 87, 84, 222, 37, 188, 4, 206, 100, 81, 122, 63, 55, 244, 77, 199, 95, 58, 130, 122, 35, 140, 117, 72, 98, 63, 206, 134, 209, 248, 253, 97, 208, 200, 189, 158, 194, 173, 120, 138, 115, 49, 0, 172, 201, 103, 132, 160, 112, 79, 69, 57, 166, 220, 183, 175, 147, 132, 86, 24, 12, 90, 157, 96, 72, 26, 15, 136, 7, 157, 127, 123, 105, 227, 178, 233, 12, 85, 159, 189, 70, 207, 137, 162, 14, 58, 32, 125, 101, 26, 169, 96, 234, 96, 60, 110, 133, 151, 23, 66, 179, 136, 15, 52, 218, 208, 107, 172, 112, 25, 252, 208, 54, 130, 192, 66, 152, 59, 133, 21, 98, 114, 0, 216, 200, 73, 101, 109, 65, 222, 252, 25, 8, 78, 46, 206, 90, 185, 71, 199, 140, 222, 48, 125, 253, 101, 198, 126, 195, 180, 166, 145, 237, 239, 101, 92, 55, 18, 148, 6, 70, 134, 206, 49, 84, 184, 224, 8, 22, 254, 145, 127, 133, 34, 97, 98, 119, 69, 162, 215, 190, 239, 151, 172, 32, 235, 153, 62, 71, 181, 229, 175, 253, 108, 151, 148, 173, 120, 118, 161, 213, 157, 196, 72, 186, 178, 175, 54, 83, 81, 189, 200, 118, 206, 8, 108, 33, 16, 20, 194, 147, 152, 248, 168, 149, 116, 124, 238, 90, 5, 46, 34, 91, 162, 77, 97, 104, 41, 88, 132, 241, 85, 94, 27, 25, 130, 233, 19, 103, 207, 109, 21, 88, 212, 57, 37, 82, 118, 248, 94, 230, 69, 195, 21, 9, 17, 82, 7, 112, 145, 229, 86, 113, 199, 169, 216, 52, 89, 165, 86, 138, 28, 150, 255, 250, 198, 58, 109, 94, 219, 78, 196, 174, 100, 178, 82, 31, 66, 73, 99, 251, 30, 211, 102, 49, 239, 16, 58, 49, 140, 10, 188, 91, 251, 184, 0, 149, 225, 152, 27, 1, 145, 100, 222, 96, 17, 11, 147, 27, 12, 183, 172, 122, 176, 37, 140, 35, 7, 240, 106, 41, 116, 75, 77, 131, 101, 29, 63, 7, 156, 42, 124, 150, 92, 68, 184, 45, 31, 138, 180, 120, 160, 25, 139, 177, 1, 140, 154, 251, 74, 6, 165, 37, 58, 157, 79, 246, 78, 132, 128, 231, 36, 220, 55, 155, 133, 154, 179, 179, 42, 93, 50, 35, 119, 34, 39, 182, 219, 136, 220, 184, 47, 233, 71, 37, 22, 8, 33, 212, 159, 232, 240, 234, 217, 214, 140, 206, 7, 39, 151, 63, 119, 21, 46, 114, 60, 81, 246, 186, 9, 48, 95, 148, 253, 234, 148, 196, 71, 105, 135, 16, 53, 3, 59, 195, 206, 167, 16, 204, 17, 120, 153, 9, 179, 33, 159, 81, 146, 207, 101, 40, 72, 227, 63, 246, 84, 210, 48, 62, 170, 79, 247, 78, 160, 123, 62, 19, 135, 91, 3, 45, 30, 224, 129, 220, 214, 208, 176, 110, 131, 109, 247, 19, 205, 0, 162, 6, 5, 162, 217, 107, 113, 253, 13, 107, 156, 169, 94, 212, 33, 19, 124, 189, 175, 170, 234, 181, 189, 119, 24, 212, 8, 82, 15, 196, 176, 83, 143, 198, 236, 183, 111, 89, 99, 86, 145, 218, 182, 207, 214, 126, 127, 128, 22, 194, 219, 24, 37, 165, 209, 89, 24, 36, 2, 168, 139, 168, 72, 32, 112, 224, 18, 142, 103, 124, 241, 235, 145, 179, 222, 194, 169, 154, 32, 45, 126, 67, 41, 184, 16, 70, 173, 72, 14, 215, 71, 61, 209, 255, 120, 156, 170, 164, 24, 79, 50, 122, 206, 56, 187, 45, 188, 128, 143, 8, 117, 91, 113, 137, 208, 6, 99, 26, 218, 226, 15, 143, 36, 94, 65, 149, 22, 120, 48, 50, 130, 232, 37, 75, 156, 124, 111, 46, 102, 134, 69, 76, 206, 22, 82, 95, 239, 101, 180, 8, 244, 51, 166, 231, 166, 181, 52, 208, 102, 50, 35, 111, 177, 129, 252, 204, 233, 10, 234, 28, 78, 16, 133, 202, 141, 91, 246, 141, 205, 182, 59, 214, 132, 119, 120, 247, 129, 166, 26, 50, 249, 244, 96, 190, 223, 201, 146, 166, 238, 118, 206, 106, 107, 21, 186, 139, 84, 38, 23, 230, 9, 13, 148, 51, 127, 233, 20, 42, 85, 47, 45, 177, 83, 166, 231, 179, 253, 81, 143, 154, 245, 1, 40, 39, 130, 202, 78, 90, 7, 93, 62, 155, 226, 203, 65, 180, 229, 75, 29, 99, 232, 1, 31, 252, 140, 144, 139, 42, 174, 84, 230, 5, 234, 33, 84, 43, 203, 20, 239, 141, 241, 215, 134, 81, 113, 218, 28, 96, 132, 39, 55, 62, 9, 96, 125, 153, 7, 185, 114, 90, 18, 4, 248, 6, 210, 56, 244, 121, 158, 236, 129, 212, 199, 2, 175, 199, 210, 172, 58, 40, 69, 181, 10, 8, 247, 137, 44, 102, 222, 144, 92, 246, 160, 69, 185, 121, 109, 102, 175, 179, 44, 51, 43, 84, 118, 214, 155, 169, 4, 244, 80, 182, 239, 206, 68, 31, 115, 246, 239, 52, 101, 32, 72, 69, 31, 159, 61, 167, 68, 93, 34, 125, 110, 251, 136, 12, 156, 132, 226, 97, 254, 23, 22, 255, 135, 203, 103, 33, 65, 209, 195, 167, 233, 5, 240, 179, 16, 136, 18, 221, 20, 209, 206, 109, 162, 223, 242, 142, 159, 228, 177, 10, 38, 244, 213, 85, 62, 239, 177, 90, 57, 159, 72, 135, 64, 229, 53, 14, 108, 92, 21, 44, 3, 88, 50, 122, 86, 198, 102, 140, 126, 170, 204, 187, 140, 166, 156, 52, 129, 218, 189, 149, 27, 254, 142, 213, 83, 116, 84, 212, 43, 65, 240, 34, 234, 237, 13, 213, 3, 43, 132, 247, 137, 106, 239, 236, 133, 156, 18, 153, 247, 70, 44, 113, 255, 65, 188, 61, 113, 1, 138, 62, 104, 195, 201, 169, 30, 193, 242, 255, 81, 252, 239, 128, 66, 252, 208, 19, 188, 136, 58, 144, 28, 88, 3, 76, 117, 129, 191, 76, 234, 177, 75, 118, 22, 168, 249, 76, 34, 42, 190, 35, 202, 233, 208, 1, 104, 213, 73, 91, 229, 42, 44, 150, 14, 122, 216, 164, 237, 200, 151, 250, 200, 241, 223, 88, 72, 51, 147, 109, 170, 26, 249, 251, 108, 19, 250, 45, 31, 35, 151, 14, 28, 4, 92, 4, 177, 252, 213, 149, 225, 209, 197, 207, 62, 231, 104, 255, 187, 30, 253, 206, 222, 177, 41, 18, 62, 38, 254, 132, 211, 152, 242, 76, 110, 172, 198, 91, 122, 4, 129, 198, 134, 123, 67, 78, 127, 202, 89, 91, 108, 200, 138, 105, 127, 50, 108, 66, 111, 197, 199, 8, 38, 56, 26, 111, 242, 225, 19, 34, 47, 62, 7, 251, 231, 55, 123, 17, 165, 82, 31, 85, 92, 152, 135, 130, 124, 13, 220, 241, 238, 116, 207, 221, 83, 72, 204, 235, 44, 197, 119, 161, 254, 71, 72, 9, 143, 207, 143, 196, 224, 135, 19, 202, 112, 208, 123, 87, 190, 174, 91, 194, 129, 120, 186, 99, 36, 5, 160, 60, 144, 96, 229, 209, 211, 223, 2, 243, 192, 142, 61, 203, 75, 62, 174, 63, 31, 146, 203, 102, 150, 129, 205, 59, 19, 194, 216, 76, 184, 245, 70, 76, 102, 192, 233, 134, 98, 87, 150, 54, 135, 197, 196, 76, 137, 17, 39, 34, 54, 46, 176, 162, 229, 86, 99, 39, 75, 6, 113, 179, 166, 76, 102, 198, 45, 65, 147, 8, 55, 151, 53, 44, 250, 100, 170, 178, 120, 239, 228, 113, 224, 66, 41, 230, 238, 97, 245, 90, 59, 1, 163, 68, 126, 18, 194, 35, 147, 219, 205, 201, 155, 69, 144, 172, 188, 203, 115, 31, 44, 245, 20, 20, 105, 240, 112, 211, 248, 31, 225, 126, 62, 57, 89, 213, 166, 69, 94, 124, 183, 89, 26, 89, 24, 86, 26, 33, 81, 165, 118, 126, 6, 216, 158, 174, 65, 45, 134, 181, 171, 51, 27, 195, 40, 127, 237, 150, 167, 144, 177, 183, 0, 47, 115, 250, 229, 61, 46, 175, 145, 154, 211, 57, 238, 186, 7, 61, 211, 43, 29, 82, 222, 181, 254, 58, 3, 77, 39, 239, 124, 177, 67, 111, 247, 142, 119, 170, 213, 99, 209, 58, 72, 166, 196, 242, 30, 87, 190, 92, 3, 155, 113, 156, 121, 17, 219, 247, 119, 128, 200, 0, 172, 38, 83, 188, 20, 244, 167, 110, 247, 14, 198, 112, 205, 217, 46, 26, 120, 73, 173, 172, 154, 26, 113, 97, 97, 191, 121, 51, 133, 250, 29, 29, 99, 192, 124, 204, 134, 250, 57, 23, 202, 54, 195, 214, 153, 175, 29, 151, 210, 76, 234, 232, 76, 100, 89, 243, 4, 217, 50, 42, 90, 141, 93, 218, 190, 182, 226, 80, 159, 115, 240, 183, 208, 82, 154, 239, 33, 241, 221, 75, 126, 230, 66, 42, 129, 76, 63, 38, 89, 107, 132, 34, 234, 150, 250, 143, 120, 237, 80, 56, 224, 229, 121, 19, 68, 24, 25, 175, 134, 240, 85, 169, 144, 229, 168, 14, 177, 250, 69, 229, 171, 138, 116, 114, 24, 173, 107, 3, 186, 119, 175, 136, 97, 154, 61, 23, 170, 86, 173, 201, 75, 138, 181, 64, 88, 155, 191, 43, 165, 229, 143, 61, 175, 64, 215, 147, 126, 51, 3, 22, 110, 168, 192, 166, 157, 164, 0, 161, 29, 245, 177, 86, 231, 110, 66, 118, 182, 159, 159, 169, 236, 240, 147, 157, 18, 19, 101, 227, 0, 147, 125, 1, 90, 255, 169, 61, 128, 43, 121, 3, 66, 185, 207, 115, 238, 150, 244, 48, 182, 242, 237, 192, 195, 177, 132, 214, 116, 9, 86, 87, 69, 250, 8, 236, 66, 3, 85, 253, 45, 109, 253, 49, 203, 177, 215, 30, 205, 186, 131, 177, 4, 159, 230, 20, 171, 81, 86, 110, 15, 162, 93, 37, 22, 252, 75, 222, 102, 85, 40, 119, 127, 101, 13, 205, 27, 17, 114, 148, 67, 118, 66, 217, 223, 113, 3, 171, 104, 83, 163, 96, 10, 188, 110, 145, 100, 207, 84, 175, 98, 254, 187, 117, 165, 91, 204, 235, 75, 72, 21, 177, 4, 0, 50, 91, 71, 142, 107, 83, 176, 204, 83, 6, 88, 154, 167, 67, 141, 231, 163, 22, 161, 215, 217, 75, 20, 40, 248, 133, 138, 132, 206, 48, 50, 81, 199, 14, 12, 33, 162, 222, 28, 250, 81, 61, 135, 135, 55, 14, 129, 219, 148, 149, 29, 113, 124, 72, 29, 82, 54, 138, 196, 92, 15, 210, 74, 224, 238, 59, 25, 28, 225, 202, 250, 81, 147, 190, 248, 39, 112, 184, 41, 150, 191, 99, 36, 159, 128, 215, 191, 35, 138, 149, 220, 110, 150, 47, 238, 60, 155, 204, 228, 71, 72, 179, 188, 145, 148, 162, 165, 235, 81, 18, 75, 192, 170, 13, 129, 129, 207, 45, 231, 98, 28, 36, 148, 157, 250, 65, 115, 162, 129, 120, 96, 227, 179, 88, 137, 91, 51, 168, 222, 87, 190, 155, 172, 131, 44, 219, 214, 37, 126, 237, 242, 106, 6, 240, 211, 153, 140, 120, 226, 232, 2, 161, 112, 34, 236, 102, 68, 233, 251, 69, 227, 185, 177, 218, 127, 160, 112, 36, 200, 158, 94, 57, 142, 78, 199, 146, 221, 175, 127, 255, 253, 211, 137, 6, 169, 229, 151, 143, 167, 59, 97, 242, 189, 101, 23, 231, 86, 49, 160, 99, 102, 68, 245, 243, 98, 210, 141, 122, 120, 157, 232, 220, 85, 103, 24, 65, 110, 32, 36, 130, 138, 70, 191, 221, 132, 190, 80, 162, 191, 53, 251, 207, 232, 18, 220, 59, 66, 35, 211, 75, 224, 14, 125, 189, 103, 28, 194, 245, 156, 252, 19, 125, 133, 190, 93, 1, 164, 165, 245, 214, 24, 152, 104, 76, 57, 171, 87, 20, 114, 34, 26, 13, 13, 188, 57, 240, 117, 186, 170, 118, 102, 121, 220, 134, 9, 173, 86, 73, 142, 62, 198, 40, 233, 235, 172, 236, 91, 188, 66, 231, 0, 9, 46, 176, 40, 109, 221, 110, 88, 52, 60, 57, 58, 116, 131, 92, 242, 105, 49, 95, 228, 89, 97, 175, 71, 86, 84, 27, 134, 53, 29, 13, 103, 153, 76, 149, 126, 113, 199, 158, 1, 176, 226, 48, 194, 161, 213, 148, 18, 120, 226, 112, 21, 198, 101, 44, 242, 148, 147, 77, 40, 21, 37, 222, 75, 3, 48, 152, 160, 77, 215, 87, 49, 65, 152, 144, 91, 93, 238, 119, 45, 255, 156, 79, 117, 158, 202, 24, 67, 17, 109, 249, 53, 99, 132, 48, 9, 136, 169, 78, 57, 143, 80, 3, 174, 213, 66, 217, 186, 211, 43, 162, 193, 31, 225, 52, 34, 61, 45, 7, 216, 154, 88, 111, 216, 228, 124, 77, 33, 127, 60, 157, 58, 143, 5, 217, 196, 140, 19, 77, 217, 27, 250, 100, 88, 24, 192, 60, 29, 230, 96, 6, 83, 143, 12, 249, 174, 55, 31, 134, 147, 40, 193, 123, 70, 203, 110, 133, 124, 198, 120, 36, 199, 91, 66, 159, 9, 7, 18, 236, 235, 195, 43, 138, 145, 223, 182, 185, 213, 47, 10, 31, 57, 193, 244, 43, 207, 228, 136, 215, 75, 71, 135, 130, 175, 104, 132, 71, 181, 182, 110, 95, 23, 80, 190, 176, 123, 6, 95, 232, 87, 112, 63, 115, 159, 85, 69, 187, 159, 202, 178, 166, 99, 203, 91, 17, 114, 69, 132, 236, 214, 180, 9, 165, 158, 61, 100, 207, 92, 243, 155, 213, 196, 88, 166, 210, 94, 195, 150, 107, 32, 134, 102, 224, 159, 12, 157, 247, 237, 69, 216, 68, 227, 9, 50, 142, 87, 5, 255, 16, 154, 39, 205, 198, 37, 129, 99, 9, 50, 108, 170, 23, 136, 245, 87, 179, 141, 230, 116, 166, 87, 7, 78, 65, 88, 196, 151, 89, 253, 120, 39, 61, 172, 233, 35, 2, 214, 65, 206, 39, 223, 193, 250, 175, 240, 0, 167, 207, 245, 167, 61, 135, 179, 197, 104, 67, 202, 231, 77, 39, 102, 197, 70, 204, 157, 154, 138, 103, 97, 234, 68, 250, 86, 244, 184, 160, 176, 136, 97, 137, 235, 42, 121, 82, 173, 114, 178, 99, 196, 193, 245, 141, 176, 208, 254, 225, 239, 67, 74, 117, 145, 226, 232, 44, 30, 160, 215, 165, 12, 32, 104, 116, 210, 44, 249, 34, 203, 91, 199, 120, 26, 0, 138, 138, 28, 52, 164, 128, 25, 164, 48, 186, 40, 52, 155, 38, 82, 57, 150, 166, 231, 204, 170, 126, 201, 98, 154, 16, 92, 173, 144, 147, 190, 214, 201, 221, 118, 94, 37, 120, 70, 5, 15, 192, 81, 254, 29, 102, 188, 0, 70, 55, 115, 43, 40, 227, 182, 217, 27, 7, 5, 127, 44, 193, 99, 33, 138, 219, 240, 155, 107, 184, 48, 161, 66, 236, 19, 2, 214, 27, 70, 101, 143, 8, 80, 176, 239, 42, 98, 184, 8, 171, 82, 222, 71, 208, 115, 121, 51, 4, 170, 41, 187, 174, 228, 66, 152, 181, 251, 45, 47, 167, 237, 124, 114, 84, 45, 234, 106, 242, 195, 223, 205, 96, 20, 137, 187, 13, 228, 112, 180, 66, 98, 19, 237, 97, 255, 151, 153, 241, 245, 22, 140, 164, 49, 143, 91, 41, 167, 140, 67, 73, 57, 153, 12, 144, 195, 192, 227, 232, 116, 144, 226, 117, 68, 97, 38, 196, 182, 220, 84, 64, 82, 152, 141, 163, 140, 236, 21, 147, 30, 49, 126, 204, 37, 30, 88, 105, 46, 201, 59, 201, 149, 81, 228, 143, 188, 33, 106, 66, 164, 140, 24, 182, 91, 9, 8, 40, 77, 25, 33, 104, 80, 124, 219, 49, 88, 24, 233, 46, 225, 66, 168, 222, 72, 231, 247, 20, 33, 217, 213, 0, 135, 209, 171, 91, 221, 191, 81, 141, 252, 243, 201, 172, 144, 227, 237, 189, 196, 234, 43, 173, 156, 151, 170, 254, 114, 159, 195, 232, 243, 105, 94, 198, 71, 221, 140, 219, 40, 37, 21, 39, 230, 39, 41, 137, 85, 149, 21, 157, 44, 109, 230, 142, 197, 228, 107, 160, 72, 237, 197, 50, 15, 120, 157, 157, 183, 231, 56, 136, 244, 83, 106, 14, 101, 156, 46, 18, 10, 111, 129, 240, 152, 215, 39, 184, 124, 52, 243, 109, 244, 163, 100, 157, 180, 108, 43, 250, 246, 233, 127, 100, 27, 136, 40, 34, 173, 119, 180, 81, 240, 36, 234, 65, 162, 1, 53, 85, 198, 5, 163, 212, 121, 227, 27, 3, 127, 218, 224, 122, 197, 54, 123, 242, 134, 224, 235, 15, 153, 64, 194, 136, 239, 44, 1, 162, 41, 93, 42, 137, 239, 193, 15, 238, 99, 85, 104, 28, 86, 64, 49, 201, 51, 14, 174, 237, 104, 131, 119, 218, 226, 120, 199, 162, 161, 22, 215, 249, 62, 185, 106, 84, 30, 203, 216, 206, 72, 40, 114, 154, 9, 122, 82, 176, 249, 33, 125, 171, 181, 37, 61, 139, 199, 84, 187, 56, 189, 165, 147, 186, 168, 109, 137, 13, 146, 227, 194, 77, 157, 45, 90, 111, 144, 236, 117, 165, 145, 9, 127, 171, 194, 196, 232, 51, 225, 170, 239, 46, 152, 61, 48, 215, 49, 167, 12, 13, 247, 211, 119, 125, 41, 156, 236, 71, 42, 191, 156, 134, 83, 73, 236, 105, 178, 222, 196, 102, 179, 4, 135, 24, 172, 138, 134, 130, 206, 20, 173, 208, 210, 57, 155, 249, 245, 96, 66, 213, 58, 146, 23, 157, 9, 153, 254, 60, 115, 101, 66, 32, 181, 229, 207, 225, 77, 231, 172, 136, 148, 59, 180, 5, 198, 154, 77, 202, 116, 10, 229, 157, 119, 28, 28, 59, 251, 139, 209, 15, 71, 83, 65, 243, 234, 47, 227, 18, 167, 207, 157, 33, 212, 244, 211, 233, 227, 66, 116, 60, 215, 4, 40, 145, 26, 228, 193, 58, 83, 244, 83, 232, 55, 98, 196, 228, 190, 40, 57, 40, 216, 106, 93, 21, 144, 217, 182, 167, 120, 32, 110, 77, 85, 152, 233, 47, 49, 76, 53, 125, 183, 222, 234, 204, 1, 144, 137, 142, 135, 197, 51, 103, 181, 134, 223, 228, 79, 202, 190, 191, 139, 38, 229, 27, 214, 89, 200, 180, 190, 119, 208, 193, 154, 156, 133, 148, 195, 230, 131, 224, 188, 44, 23, 200, 140, 150, 195, 13, 195, 36, 109, 103, 10, 42, 66, 43, 35, 62, 167, 82, 63, 133, 227, 30, 156, 178, 85, 247, 11, 117, 244, 27, 93, 212, 50, 17, 73, 194, 179, 179, 29, 197, 71, 193, 137, 122, 27, 19, 115, 92, 132, 102, 159, 175, 119, 114, 89, 51, 35, 176, 95, 40, 106, 187, 244, 12, 239, 249, 87, 29, 248, 148, 103, 106, 58, 190, 91, 229, 130, 167, 18, 131, 248, 29, 227, 213, 104, 181, 211, 142, 110, 222, 111, 159, 35, 150, 138, 168, 111, 34, 68, 42, 57, 183, 232, 75, 246, 88, 222, 106, 23, 246, 68, 174, 232, 158, 241, 41, 92, 138, 204, 179, 255, 5, 116, 253, 8, 255, 45, 85, 76, 149, 201, 227, 178, 121, 69, 41, 153, 41, 203, 160, 207, 143, 239, 60, 16, 158, 193, 44, 215, 28, 43, 216, 156, 213, 245, 82, 230, 6, 54, 30, 255, 93, 168, 5, 59, 66, 54, 26, 13, 200, 230, 154, 233, 58, 71, 240, 245, 226, 137, 62, 65, 4, 128, 144, 158, 10, 120, 104, 113, 47, 22, 241, 120, 196, 49, 98, 223, 47, 223, 149, 66, 238, 245, 111, 211, 229, 45, 252, 218, 237, 226, 59, 218, 57, 23, 41, 53, 27, 29, 27, 98, 131, 124, 36, 189, 254, 27, 129, 253, 127, 96, 133, 169, 2, 212, 239, 232, 110, 241, 56, 168, 123, 148, 113, 194, 79, 67, 61, 139, 134, 120, 58, 225, 145, 12, 7, 159, 12, 241, 185, 167, 200, 180, 55, 103, 222, 148, 12, 210, 253, 73, 136, 175, 164, 227, 85, 45, 243, 136, 141, 46, 100, 114, 201, 198, 254, 56, 109, 84, 203, 32, 199, 61, 161, 101, 62, 94, 25, 239, 207, 102, 32, 13, 66, 134, 174, 107, 115, 131, 248, 239, 248, 195, 215, 20, 91, 21, 169, 226, 150, 136, 189, 23, 246, 195, 41, 230, 160, 182, 103, 226, 162, 101, 150, 236, 177, 61, 41, 122, 99, 163, 197, 35, 243, 147, 189, 77, 20, 180, 163, 56, 74, 201, 184, 39, 172, 37, 21, 192, 53, 102, 224, 20, 231, 122, 235, 56, 204, 40, 165, 3, 145, 190, 113, 95, 110, 45, 161, 106, 42, 63, 90, 116, 145, 12, 5, 107, 36, 172, 32, 124, 191, 246, 238, 162, 214, 136, 85, 241, 126, 114, 24, 96, 62, 244, 130, 55, 237, 143, 111, 113, 235, 132, 62, 210, 64, 239, 204, 247, 21, 25, 175, 203, 160, 202, 253, 197, 243, 248, 233, 164, 122, 60, 214, 1, 125, 52, 205, 47, 211, 72, 143, 25, 95, 98, 203, 69, 75, 168, 186, 90, 100, 86, 247, 20, 155, 59, 212, 116, 60, 230, 116, 127, 106, 145, 232, 197, 48, 87, 202, 173, 158, 194, 73, 172, 17, 32, 121, 171, 45, 188, 32, 129, 114, 121, 183, 217, 5, 154, 50, 195, 188, 151, 230, 185, 139, 232, 69, 190, 186, 53, 211, 90, 105, 116, 195, 159, 61, 64, 2, 107, 49, 150, 207, 180, 247, 135, 168, 254, 68, 218, 168, 14, 102, 35, 229, 43, 35, 152, 220, 161, 42, 63, 6, 95, 163, 104, 58, 6, 176, 252, 213, 84, 56, 250, 242, 114, 100, 186, 103, 100, 81, 203, 1, 189, 237, 53, 50, 150, 175, 30, 83, 84, 82, 190, 219, 13, 237, 49, 231, 248, 203, 87, 117, 29, 71, 49, 187, 254, 165, 163, 165, 109, 140, 13, 58, 76, 7, 143, 185, 171, 195, 58, 38, 126, 75, 35, 93, 178, 75, 76, 202, 68, 90, 196, 135, 71, 103, 89, 105, 200, 188, 242, 148, 222, 42, 118, 111, 203, 238, 14, 250, 222, 61, 195, 239, 244, 127, 226, 185, 165, 203, 31, 221, 217, 109, 172, 177, 183, 158, 163, 218, 107, 60, 197, 102, 11, 190, 50, 23, 78, 220, 168, 136, 50, 130, 154, 228, 237, 176, 244, 5, 153, 41, 209, 58, 255, 161, 171, 194, 154, 72, 112, 58, 6, 130, 128, 241, 15, 221, 113, 112, 76, 140, 72, 3, 208, 231, 226, 108, 189, 206, 45, 170, 153, 171, 228, 31, 62, 69, 159, 243, 20, 226, 33, 245, 98, 73, 61, 159, 110, 128, 188, 141, 185, 130, 209, 243, 251, 89, 29, 178, 235, 60, 79, 113, 14, 74, 21, 205, 241, 12, 234, 45, 68, 145, 114, 117, 7, 207, 170, 21, 93, 240, 206, 204, 241, 15, 161, 243, 121, 255, 191, 131, 60, 45, 110, 111, 106, 113, 156, 51, 210, 193, 200, 21, 215, 60, 9, 58, 156, 248, 49, 82, 2, 203, 112, 63, 177, 237, 73, 178, 201, 20, 113, 92, 91, 11, 1, 40, 238, 238, 39, 146, 72, 5, 142, 202, 243, 71, 97, 147, 158, 227, 77, 91, 183, 181, 160, 238, 196, 203, 168, 37, 242, 182, 59, 36, 167, 207, 191, 136, 244, 109, 207, 226, 173, 100, 205, 93, 49, 208, 231, 122, 151, 122, 66, 35, 195, 194, 71, 91, 76, 212, 48, 87, 12, 213, 132, 193, 147, 164, 152, 138, 67, 203, 164, 140, 165, 112, 28, 177, 189, 178, 19, 147, 193, 165, 148, 212, 87, 74, 22, 89, 222, 92, 3, 239, 186, 79, 18, 217, 196, 215, 45, 19, 124, 213, 166, 17, 66, 127, 144, 128, 120, 220, 155, 248, 218, 208, 37, 182, 217, 40, 228, 83, 8, 120, 249, 242, 186, 238, 149, 185, 253, 162, 190, 174, 250, 218, 73, 101, 38, 53, 206, 109, 8, 175, 85, 127, 221, 219, 115, 133, 67, 40, 230, 146, 156, 47, 161, 185, 57, 10, 34, 204, 241, 43, 44, 75, 35, 162, 41, 190, 210, 19, 30, 192, 196, 101, 3, 97, 55, 166, 241, 105, 149, 48, 182, 80, 186, 75, 134, 234, 168, 84, 76, 2, 126, 164, 132, 172, 110, 168, 170, 138, 246, 32, 153, 227, 23, 164, 70, 50, 47, 39, 68, 134, 104, 65, 98, 192, 123, 34, 152, 246, 209, 109, 15, 31, 185, 204, 28, 190, 188, 105, 246, 139, 174, 14, 168, 189, 151, 227, 238, 146, 90, 104, 41, 34, 249, 184, 55, 15, 195, 64, 112, 236, 190, 96, 2, 173, 29, 161, 30, 235, 238, 161, 176, 191, 52, 50, 179, 7, 14, 209, 224, 31, 193, 134, 151, 165, 12, 106, 158, 244, 251, 123, 176, 29, 23, 163, 147, 26, 15, 168, 216, 105, 23, 216, 42, 106, 246, 222, 6, 78, 197, 184, 212, 159, 29, 247, 254, 228, 133, 32, 15, 229, 10, 37, 29, 9, 47, 156, 34, 123, 49, 152, 203, 74, 17, 224, 17, 238, 142, 118, 9, 16, 1, 21, 245, 171, 62, 53, 164, 110, 193, 230, 20, 243, 118, 194, 13, 214, 134, 18, 162, 210, 254, 178, 221, 92, 24, 163, 173, 206, 252, 7, 140, 173, 143, 67, 225, 19, 182, 49, 56, 126, 131, 65, 80, 221, 97, 252, 26, 5, 118, 49, 188, 245, 10, 186, 60, 66, 175, 81, 24, 170, 188, 58, 129, 31, 229, 139, 59, 177, 81, 9, 72, 121, 48, 78, 146, 179, 166, 124, 111, 115, 246, 216, 173, 43, 137, 138, 237, 57, 243, 49, 198, 119, 95, 173, 105, 137, 34, 247, 83, 157, 83, 212, 116, 90, 238, 8, 110, 210, 212, 64, 161, 254, 164, 196, 121, 98, 101, 22, 248, 67, 76, 228, 85, 63, 40, 229, 27, 101, 182, 19, 48, 71, 158, 254, 111, 249, 18, 170, 208, 182, 163, 188, 96, 190, 21, 181, 145, 51, 226, 179, 163, 145, 238, 45, 11, 183, 144, 16, 99, 95, 88, 118, 162, 54, 175, 66, 12, 95, 113, 11, 54, 199, 252, 70, 18, 150, 30, 207, 1, 169, 151, 110, 41, 7, 103, 39, 101, 82, 118, 176, 180, 239, 240, 189, 210, 46, 197, 126, 7, 79, 6, 113, 196, 21, 120, 208, 51, 39, 253, 103, 20, 143, 47, 160, 117, 29, 37, 230, 63, 226, 239, 245, 161, 180, 220, 243, 225, 49, 229, 85, 64, 142, 97, 213, 105, 114, 253, 57, 41, 210, 154, 179, 152, 156, 200, 115, 183, 36, 185, 32, 63, 173, 212, 238, 141, 29, 117, 219, 82, 64, 65, 147, 134, 88, 23, 151, 7, 141, 15, 115, 201, 181, 231, 11, 18, 250, 209, 232, 6, 18, 252, 129, 243, 50, 44, 42, 176, 138, 191, 201, 186, 238, 169, 99, 72, 59, 187, 62, 209, 173, 247, 138, 59, 64, 184, 8, 61, 145, 134, 156, 33, 184, 77, 126, 45, 62, 62, 128, 202, 191, 74, 148, 109, 165, 75, 143, 201, 71, 252, 106, 38, 137, 234, 225, 30, 81, 209, 231, 170, 157, 228, 159, 63, 217, 147, 49, 48, 82, 180, 41, 89, 241, 190, 144, 232, 13, 194, 146, 209, 11, 58, 168, 109, 32, 171, 70, 125, 36, 30, 17, 121, 197, 199, 151, 226, 46, 134, 75, 151, 132, 144, 136, 17, 193, 230, 149, 35, 106, 31, 115, 233, 41, 204, 213, 22, 230, 220, 181, 68, 93, 38, 50, 201, 125, 200, 49, 18, 52, 76, 224, 76, 160, 95, 77, 54, 112, 9, 35, 214, 119, 94, 26, 187, 214, 20, 111, 247, 68, 44, 217, 202, 67, 27, 51, 196, 119, 19, 52, 17, 128, 64, 186, 41, 65, 151, 140, 216, 166, 72, 47, 57, 65, 97, 190, 49, 240, 232, 4, 62, 18, 233, 151, 10, 40, 142, 189, 75, 152, 89, 137, 45, 229, 218, 15, 13, 179, 106, 205, 96, 78, 182, 186, 106, 176, 215, 29, 48, 47, 238, 239, 92, 56, 243, 35, 37, 82, 14, 24, 105, 191, 138, 142, 25, 4, 1, 10, 208, 210, 80, 143, 89, 55, 60, 198, 4, 201, 45, 85, 67, 173, 228, 88, 33, 240, 159, 232, 146, 25, 217, 124, 132, 59, 65, 11, 63, 130, 162, 115, 60, 35, 46, 162, 21, 159, 76, 24, 129, 255, 84, 126, 222, 181, 1, 52, 180, 64, 129, 33, 84, 239, 13, 134, 41, 145, 66, 166, 243, 92, 248, 255, 172, 239, 207, 213, 169, 109, 124, 138, 157, 124, 189, 71, 137, 145, 119, 208, 15, 176, 22, 31, 44, 251, 148, 106, 54, 115, 251, 100, 91, 255, 160, 137, 241, 177, 160, 81, 38, 213, 114, 22, 165, 40, 120, 211, 122, 14, 103, 35, 81, 15, 168, 131, 145, 82, 109, 198, 255, 148, 150, 247, 73, 158, 64, 69, 63, 30, 232, 52, 210, 197, 52, 16, 201, 103, 120, 174, 6, 44, 0, 120, 123, 118, 168, 47, 49, 49, 20, 193, 196, 164, 188, 180, 216, 131, 190, 24, 205, 131, 230, 37, 142, 15, 189, 77, 49, 175, 255, 132, 187, 151, 166, 39, 40, 128, 81, 193, 48, 31, 9, 245, 54, 121, 100, 231, 205, 187, 12, 124, 116, 35, 203, 148, 178, 182, 222, 166, 131, 151, 113, 120, 146, 227, 70, 117, 200, 176, 122, 147, 58, 53, 243, 255, 30, 160, 52, 86, 131, 136, 198, 82, 214, 25, 61, 1, 154, 234, 74, 172, 1, 104, 60, 120, 250, 143, 200, 7, 217, 244, 216, 45, 233, 191, 94, 236, 210, 177, 81, 235, 233, 75, 69, 67, 70, 122, 47, 164, 9, 141, 66, 4, 22, 166, 179, 202, 208, 14, 224, 93, 150, 108, 175, 156, 221, 138, 94, 172, 192, 204, 50, 78, 74, 22, 18, 86, 32, 244, 20, 32, 188, 32, 230, 138, 215, 235, 248, 169, 177, 157, 91, 115, 226, 18, 234, 5, 148, 217, 237, 101, 53, 136, 114, 126, 229, 68], + [198, 216, 8, 83, 27, 253, 60, 224, 251, 85, 93, 77, 69, 45, 154, 161, 78, 188, 209, 242, 69, 203, 160, 59, 76, 95, 1, 218, 95, 226, 125, 61, 200, 61, 104, 126, 215, 116, 88, 112, 118, 209, 163, 172, 10, 211, 10, 137, 13, 230, 226, 128, 109, 255, 59, 216, 108, 79, 180, 84, 240, 157, 21, 6, 18, 31, 109, 158, 50, 16, 130, 3, 151, 251, 154, 24, 19, 156, 255, 47, 201, 153, 240, 126, 102, 59, 120, 179, 77, 108, 230, 76, 169, 68, 141, 127, 38, 101, 156, 129, 134, 176, 4, 204, 90, 251, 74, 233, 189, 100, 34, 47, 81, 66, 45, 104, 106, 242, 170, 36, 58, 104, 125, 253, 186, 200, 222, 50, 95, 245, 223, 96, 153, 132, 177, 166, 209, 0, 4, 109, 224, 110, 244, 129, 106, 240, 158, 80, 97, 253, 135, 109, 126, 233, 217, 172, 113, 81, 81, 140, 204, 36, 214, 172, 1, 7, 36, 96, 27, 197, 202, 4, 80, 57, 219, 18, 225, 178, 212, 35, 131, 65, 96, 200, 63, 206, 17, 112, 212, 23, 10, 18, 236, 168, 45, 124, 54, 47, 58, 178, 93, 241, 234, 25, 40, 144, 70, 176, 185, 66, 141, 225, 221, 12, 106, 19, 184, 255, 164, 149, 173, 105, 78, 11, 205, 141, 235, 173, 226, 125, 190, 16, 18, 101, 30, 239, 200, 54, 74, 223, 109, 214, 52, 115, 221, 86, 42, 136, 170, 129, 148, 63, 210, 125, 108, 206, 26, 192, 116, 159, 102, 247, 249, 165, 214, 187, 247, 1, 165, 159, 219, 116, 200, 131, 118, 213, 38, 133, 160, 123, 111, 207, 64, 231, 24, 211, 125, 108, 149, 38, 53, 216, 157, 181, 223, 136, 238, 49, 181, 207, 7, 217, 131, 169, 48, 31, 8, 78, 37, 204, 94, 120, 156, 245, 189, 45, 231, 128, 150, 52, 125, 22, 157, 236, 76, 135, 58, 141, 125, 253, 164, 208, 124, 111, 247, 240, 6, 123, 207, 65, 71, 19, 146, 153, 251, 40, 46, 118, 235, 61, 90, 253, 160, 28, 182, 123, 217, 223, 78, 127, 176, 0, 48, 185, 33, 225, 228, 34, 176, 241, 157, 213, 10, 45, 157, 74, 221, 210, 116, 13, 90, 34, 178, 202, 146, 225, 248, 144, 55, 128, 47, 32, 115, 3, 90, 29, 74, 99, 56, 55, 59, 49, 118, 43, 4, 56, 157, 242, 93, 57, 108, 192, 81, 105, 109, 162, 222, 42, 182, 23, 82, 137, 255, 99, 153, 52, 224, 192, 100, 198, 184, 242, 66, 39, 167, 14, 138, 32, 182, 73, 105, 90, 47, 12, 232, 233, 55, 183, 119, 78, 50, 99, 191, 252, 214, 90, 93, 26, 188, 38, 240, 187, 220, 188, 166, 111, 196, 49, 11, 145, 180, 108, 75, 88, 230, 181, 221, 35, 176, 222, 145, 248, 201, 129, 85, 61, 45, 73, 111, 224, 41, 208, 244, 114, 5, 123, 215, 173, 71, 95, 142, 139, 8, 60, 116, 48, 234, 118, 159, 65, 235, 57, 175, 155, 119, 254, 154, 105, 100, 165, 201, 219, 240, 21, 38, 44, 67, 53, 29, 195, 83, 168, 245, 153, 94, 239, 241, 164, 248, 137, 125, 206, 159, 255, 108, 83, 78, 114, 19, 122, 100, 102, 171, 232, 192, 116, 248, 152, 74, 209, 141, 95, 200, 112, 235, 61, 130, 42, 129, 242, 109, 228, 236, 245, 231, 91, 206, 255, 207, 190, 194, 188, 157, 147, 229, 38, 83, 185, 82, 138, 232, 36, 216, 107, 158, 15, 59, 161, 12, 50, 89, 45, 144, 129, 103, 131, 8, 94, 176, 217, 234, 209, 51, 100, 126, 185, 227, 199, 182, 61, 131, 206, 65, 153, 244, 75, 30, 127, 34, 193, 178, 65, 246, 15, 141, 121, 200, 12, 54, 21, 204, 95, 65, 232, 114, 200, 193, 172, 105, 215, 92, 54, 229, 206, 191, 124, 22, 33, 181, 144, 167, 186, 150, 205, 188, 147, 91, 120, 73, 119, 241, 130, 73, 36, 121, 104, 189, 63, 164, 186, 9, 133, 240, 138, 198, 12, 159, 100, 108, 161, 138, 225, 40, 5, 147, 230, 64, 174, 125, 109, 85, 32, 191, 103, 98, 54, 51, 197, 194, 16, 36, 99, 198, 106, 120, 55, 5, 233, 137, 158, 123, 154, 40, 47, 134, 203, 40, 222, 127, 113, 182, 132, 228, 67, 123, 149, 145, 204, 207, 194, 65, 48, 25, 72, 247, 105, 197, 164, 90, 230, 139, 111, 111, 181, 109, 76, 95, 93, 11, 55, 216, 60, 83, 111, 255, 92, 104, 191, 205, 246, 159, 189, 194, 173, 174, 121, 71, 118, 174, 84, 142, 219, 96, 92, 241, 42, 116, 177, 167, 34, 227, 253, 12, 173, 233, 161, 236, 165, 19, 187, 232, 205, 190, 158, 101, 79, 81, 47, 27, 58, 68, 93, 5, 37, 244, 168, 246, 34, 146, 182, 61, 248, 181, 6, 253, 76, 62, 67, 240, 150, 225, 29, 32, 160, 144, 216, 165, 86, 54, 161, 96, 219, 221, 82, 162, 3, 229, 64, 237, 93, 173, 85, 172, 25, 123, 89, 94, 41, 198, 234, 212, 17, 198, 5, 242, 103, 241, 202, 12, 173, 193, 51, 24, 51, 35, 47, 179, 24, 195, 59, 242, 8, 35, 43, 226, 180, 247, 177, 225, 0, 159, 171, 98, 78, 244, 241, 130, 125, 159, 102, 51, 100, 140, 235, 182, 236, 218, 154, 83, 163, 225, 103, 231, 12, 53, 94, 51, 249, 226, 50, 21, 200, 135, 58, 74, 197, 165, 78, 106, 176, 52, 209, 108, 206, 252, 16, 172, 12, 63, 26, 117, 83, 5, 203, 38, 252, 236, 49, 203, 153, 8, 36, 76, 126, 234, 62, 125, 206, 105, 234, 112, 207, 204, 31, 49, 72, 103, 61, 95, 230, 182, 163, 109, 233, 92, 82, 222, 22, 172, 221, 148, 102, 46, 93, 217, 107, 57, 62, 237, 241, 88, 237, 80, 3, 59, 148, 89, 133, 1, 49, 37, 191, 248, 128, 139, 182, 104, 222, 238, 1, 113, 1, 211, 140, 129, 66, 87, 123, 229, 39, 189, 199, 200, 222, 95, 174, 110, 211, 58, 237, 138, 104, 185, 170, 157, 173, 211, 9, 228, 9, 229, 0, 94, 5, 9, 142, 253, 194, 150, 151, 249, 90, 191, 203, 100, 163, 218, 223, 75, 73, 149, 114, 75, 119, 60, 70, 28, 152, 112, 85, 127, 219, 169, 51, 207, 246, 246, 178, 31, 195, 243, 37, 215, 143, 251, 100, 178, 7, 101, 167, 223, 180, 245, 75, 158, 140, 91, 151, 91, 135, 30, 77, 230, 75, 25, 192, 104, 117, 90, 242, 1, 53, 11, 221, 110, 87, 10, 18, 9, 177, 138, 246, 198, 160, 251, 13, 86, 193, 33, 217, 78, 41, 181, 170, 92, 48, 227, 32, 100, 22, 101, 30, 110, 234, 218, 21, 81, 161, 28, 26, 165, 235, 215, 230, 215, 55, 232, 154, 30, 97, 12, 9, 76, 163, 237, 92, 62, 201, 61, 229, 237, 85, 209, 70, 202, 86, 131, 238, 247, 150, 102, 67, 141, 174, 35, 205, 182, 13, 219, 16, 127, 173, 112, 72, 116, 23, 42, 255, 226, 123, 178, 34, 138, 146, 177, 234, 222, 101, 248, 53, 46, 32, 45, 253, 234, 11, 53, 68, 188, 173, 67, 114, 187, 34, 65, 213, 173, 27, 159, 133, 36, 12, 158, 106, 87, 29, 254, 105, 14, 161, 224, 212, 145, 83, 183, 132, 7, 225, 13, 253, 78, 83, 51, 49, 151, 136, 222, 164, 96, 207, 41, 101, 204, 183, 117, 200, 14, 209, 162, 43, 154, 189, 237, 22, 230, 61, 195, 152, 50, 214, 227, 114, 85, 108, 128, 63, 42, 100, 13, 35, 82, 157, 20, 79, 225, 134, 12, 4, 137, 95, 248, 127, 134, 214, 163, 122, 77, 168, 167, 98, 118, 99, 66, 83, 21, 218, 126, 237, 220, 35, 209, 71, 120, 41, 71, 139, 65, 119, 91, 185, 118, 54, 203, 222, 151, 53, 216, 211, 255, 151, 243, 153, 110, 29, 97, 144, 235, 180, 159, 206, 67, 148, 102, 197, 17, 169, 179, 41, 219, 75, 171, 35, 14, 42, 115, 100, 180, 162, 88, 0, 220, 21, 208, 169, 16, 204, 142, 135, 47, 72, 118, 6, 162, 175, 133, 50, 147, 3, 204, 237, 51, 144, 122, 177, 107, 198, 207, 30, 224, 204, 223, 215, 64, 0, 207, 137, 222, 231, 185, 34, 92, 177, 64, 55, 118, 73, 4, 88, 4, 114, 46, 55, 17, 168, 133, 92, 148, 198, 190, 8, 182, 147, 3, 83, 23, 143, 3, 83, 148, 26, 210, 242, 173, 216, 189, 54, 220, 201, 181, 49, 30, 113, 190, 16, 3, 13, 223, 101, 34, 69, 114, 59, 48, 127, 73, 14, 65, 129, 112, 201, 57, 29, 47, 214, 227, 86, 129, 87, 110, 165, 206, 35, 164, 35, 232, 217, 1, 245, 121, 153, 211, 36, 162, 148, 200, 14, 224, 119, 221, 106, 236, 102, 231, 111, 82, 174, 209, 207, 246, 176, 191, 141, 16, 104, 165, 54, 147, 45, 197, 213, 166, 234, 47, 232, 97, 160, 182, 220, 4, 250, 244, 124, 242, 137, 234, 22, 92, 146, 124, 157, 165, 81, 176, 87, 235, 221, 154, 84, 64, 253, 151, 230, 171, 119, 80, 248, 175, 146, 200, 185, 196, 246, 75, 87, 125, 240, 130, 86, 105, 225, 246, 39, 148, 188, 2, 126, 61, 67, 95, 176, 247, 17, 135, 96, 44, 163, 75, 67, 145, 38, 234, 176, 31, 13, 73, 133, 186, 97, 233, 146, 139, 226, 72, 167, 9, 252, 194, 31, 133, 35, 157, 81, 86, 131, 73, 185, 203, 2, 174, 110, 149, 160, 49, 238, 84, 148, 48, 169, 47, 148, 156, 134, 99, 220, 178, 220, 9, 249, 107, 234, 82, 142, 255, 240, 107, 166, 200, 247, 193, 33, 64, 217, 182, 224, 146, 120, 213, 234, 111, 154, 87, 109, 86, 152, 194, 222, 98, 96, 137, 96, 106, 220, 112, 160, 14, 44, 201, 49, 78, 192, 116, 68, 154, 43, 13, 235, 170, 57, 54, 76, 157, 180, 21, 220, 239, 51, 39, 176, 139, 177, 136, 204, 163, 232, 77, 92, 250, 119, 83, 90, 204, 72, 242, 199, 29, 84, 81, 176, 180, 93, 78, 6, 247, 165, 198, 137, 233, 48, 252, 81, 202, 12, 46, 151, 54, 185, 128, 97, 79, 3, 13, 113, 9, 41, 43, 220, 4, 167, 42, 160, 133, 140, 172, 163, 221, 38, 185, 23, 100, 29, 17, 191, 236, 93, 92, 58, 166, 114, 213, 37, 17, 94, 184, 244, 109, 26, 146, 57, 38, 114, 181, 44, 142, 207, 13, 58, 98, 173, 15, 85, 49, 0, 94, 97, 226, 75, 161, 125, 156, 190, 57, 121, 0, 243, 53, 228, 244, 12, 109, 9, 225, 37, 27, 235, 121, 233, 46, 8, 58, 73, 206, 94, 43, 224, 0, 69, 69, 238, 131, 183, 23, 207, 15, 140, 177, 176, 181, 219, 89, 214, 32, 46, 184, 180, 196, 75, 161, 14, 239, 159, 104, 84, 169, 36, 240, 128, 226, 174, 242, 149, 151, 208, 62, 171, 21, 153, 46, 30, 92, 37, 193, 153, 21, 146, 76, 191, 217, 161, 176, 205, 133, 162, 166, 160, 13, 241, 185, 169, 189, 92, 39, 123, 232, 94, 138, 94, 45, 16, 22, 57, 246, 110, 32, 58, 163, 80, 245, 108, 95, 59, 164, 60, 218, 1, 249, 34, 141, 72, 36, 164, 76, 216, 57, 211, 123, 4, 30, 137, 15, 252, 152, 65, 118, 110, 134, 80, 254, 11, 205, 52, 249, 178, 74, 64, 246, 250, 118, 161, 215, 214, 178, 98, 189, 61, 141, 44, 77, 123, 196, 58, 29, 131, 255, 123, 246, 148, 237, 161, 35, 224, 222, 231, 203, 253, 96, 189, 22, 212, 60, 37, 158, 32, 129, 67, 239, 100, 115, 236, 211, 189, 187, 130, 192, 51, 167, 94, 141, 178, 22, 184, 50, 198, 164, 231, 137, 40, 108, 155, 241, 70, 38, 252, 25, 166, 175, 17, 219, 246, 243, 19, 167, 252, 71, 137, 255, 205, 65, 9, 181, 228, 140, 197, 198, 246, 64, 212, 191, 249, 124, 254, 174, 128, 42, 245, 93, 75, 91, 243, 120, 245, 14, 24, 160, 52, 45, 72, 130, 193, 28, 155, 193, 77, 76, 152, 206, 27, 55, 119, 124, 78, 20, 82, 135, 201, 76, 7, 243, 172, 124, 165, 185, 70, 147, 213, 15, 69, 141, 232, 59, 104, 62, 230, 83, 3, 57, 62, 255, 104, 89, 171, 120, 74, 41, 231, 79, 7, 219, 251, 149, 118, 215, 138, 188, 75, 227, 229, 24, 127, 228, 186, 133, 56, 136, 15, 126, 217, 254, 27, 40, 149, 112, 89, 114, 161, 7, 198, 212, 89, 17, 60, 75, 78, 50, 102, 216, 61, 152, 26, 23, 228, 13, 14, 156, 63, 85, 82, 203, 140, 16, 68, 25, 43, 238, 237, 232, 23, 231, 5, 73, 201, 58, 157, 63, 88, 141, 126, 132, 29, 60, 242, 32, 187, 174, 120, 9, 161, 248, 220, 141, 72, 21, 137, 212, 138, 222, 236, 106, 170, 124, 30, 83, 228, 61, 209, 66, 106, 178, 172, 33, 109, 6, 176, 142, 129, 222, 22, 163, 86, 9, 179, 253, 216, 1, 162, 225, 23, 47, 125, 54, 186, 5, 212, 229, 117, 186, 109, 23, 130, 241, 74, 197, 200, 254, 32, 249, 194, 53, 53, 142, 213, 92, 156, 204, 0, 220, 100, 37, 10, 199, 204, 233, 22, 228, 76, 203, 74, 36, 42, 196, 240, 92, 133, 37, 76, 117, 65, 205, 190, 26, 239, 140, 150, 102, 107, 2, 143, 186, 110, 159, 235, 159, 250, 60, 24, 135, 215, 39, 236, 127, 56, 253, 56, 117, 50, 194, 147, 94, 6, 78, 158, 206, 89, 35, 40, 101, 199, 119, 104, 129, 143, 195, 88, 6, 194, 14, 13, 82, 158, 133, 192, 249, 50, 41, 124, 198, 183, 48, 107, 3, 51, 233, 188, 169, 204, 142, 141, 207, 39, 231, 46, 64, 143, 172, 233, 0, 112, 252, 85, 32, 2, 160, 150, 9, 123, 0, 176, 33, 167, 147, 194, 185, 80, 163, 94, 221, 231, 176, 127, 28, 205, 38, 229, 69, 167, 223, 60, 202, 153, 114, 151, 105, 74, 117, 90, 148, 13, 125, 202, 12, 14, 139, 167, 189, 192, 65, 50, 139, 33, 250, 150, 48, 31, 169, 20, 48, 60, 158, 186, 2, 84, 86, 84, 23, 187, 93, 117, 21, 7, 171, 33, 90, 32, 137, 239, 58, 63, 47, 231, 159, 103, 57, 121, 245, 251, 8, 235, 101, 233, 16, 70, 134, 85, 76, 53, 79, 103, 48, 35, 112, 6, 164, 110, 0, 67, 110, 216, 116, 130, 66, 72, 229, 68, 218, 131, 91, 106, 8, 230, 33, 166, 251, 54, 146, 209, 149, 214, 253, 139, 81, 239, 162, 16, 163, 105, 15, 22, 180, 111, 205, 236, 142, 223, 245, 150, 118, 10, 218, 109, 234, 145, 115, 92, 190, 195, 147, 86, 232, 208, 1, 8, 148, 150, 157, 107, 62, 56, 44, 29, 255, 55, 42, 178, 119, 253, 220, 226, 129, 233, 238, 70, 246, 111, 45, 136, 45, 31, 113, 109, 4, 73, 172, 193, 165, 202, 114, 57, 163, 204, 216, 214, 88, 58, 100, 224, 186, 253, 209, 71, 183, 221, 103, 244, 124, 233, 140, 233, 173, 235, 244, 0, 202, 12, 210, 118, 105, 236, 98, 105, 72, 240, 237, 71, 96, 219, 4, 232, 67, 151, 196, 104, 253, 126, 42, 160, 208, 34, 87, 172, 43, 80, 159, 214, 18, 141, 83, 234, 201, 22, 7, 227, 205, 127, 209, 173, 203, 145, 1, 101, 23, 216, 27, 48, 164, 91, 1, 130, 250, 231, 115, 181, 136, 34, 111, 165, 248, 134, 253, 42, 250, 132, 182, 52, 10, 62, 13, 138, 118, 184, 153, 220, 162, 10, 171, 94, 251, 95, 239, 209, 242, 204, 227, 149, 194, 171, 33, 90, 180, 124, 196, 48, 98, 49, 41, 188, 119, 209, 1, 77, 77, 10, 200, 112, 222, 70, 158, 88, 183, 242, 155, 136, 97, 5, 65, 251, 146, 33, 155, 144, 120, 173, 32, 110, 93, 98, 79, 81, 193, 92, 174, 58, 150, 65, 166, 192, 43, 217, 255, 82, 202, 255, 141, 36, 147, 73, 60, 147, 16, 24, 172, 30, 78, 219, 152, 139, 98, 221, 188, 1, 227, 253, 213, 230, 22, 123, 58, 235, 166, 91, 122, 49, 214, 86, 31, 68, 92, 75, 243, 255, 128, 221, 201, 130, 223, 141, 46, 155, 154, 5, 177, 233, 123, 238, 124, 100, 109, 192, 237, 182, 72, 240, 104, 0, 157, 210, 180, 252, 50, 134, 220, 9, 239, 134, 178, 143, 197, 59, 118, 218, 161, 101, 44, 223, 95, 180, 172, 185, 135, 16, 15, 209, 61, 89, 188, 41, 46, 52, 238, 160, 191, 142, 51, 218, 212, 221, 71, 145, 82, 23, 223, 213, 138, 245, 231, 153, 47, 39, 60, 54, 19, 71, 197, 50, 106, 149, 62, 174, 159, 114, 182, 176, 107, 3, 215, 42, 18, 53, 220, 89, 19, 102, 56, 250, 89, 29, 92, 70, 139, 78, 26, 64, 129, 1, 246, 75, 124, 136, 14, 67, 66, 201, 111, 188, 30, 124, 231, 70, 150, 68, 249, 77, 64, 25, 12, 73, 83, 216, 94, 208, 234, 197, 227, 207, 35, 74, 162, 160, 58, 32, 157, 64, 107, 38, 210, 22, 163, 218, 100, 75, 24, 213, 112, 48, 214, 254, 251, 26, 176, 187, 89, 81, 146, 0, 213, 188, 70, 93, 43, 126, 8, 182, 40, 159, 136, 9, 163, 120, 146, 190, 246, 50, 3, 217, 161, 57, 57, 14, 120, 148, 174, 46, 30, 169, 193, 168, 160, 238, 61, 139, 48, 182, 35, 75, 28, 15, 70, 177, 30, 48, 73, 120, 161, 135, 67, 30, 121, 184, 46, 131, 174, 181, 34, 185, 212, 236, 189, 189, 172, 67, 237, 79, 133, 7, 2, 103, 156, 235, 128, 225, 102, 110, 17, 68, 214, 158, 212, 76, 99, 63, 232, 15, 29, 197, 184, 205, 116, 177, 26, 137, 161, 125, 162, 188, 54, 27, 144, 154, 157, 120, 135, 143, 237, 145, 237, 178, 143, 192, 198, 52, 68, 105, 14, 228, 172, 23, 6, 19, 7, 59, 141, 61, 78, 119, 56, 51, 160, 237, 7, 133, 216, 11, 42, 7, 86, 147, 91, 226, 84, 99, 81, 221, 164, 4, 233, 46, 3, 16, 195, 240, 94, 240, 111, 89, 158, 123, 56, 135, 242, 69, 181, 211, 165, 164, 253, 94, 2, 11, 19, 214, 171, 83, 49, 183, 236, 132, 34, 111, 89, 210, 29, 244, 80, 26, 233, 190, 181, 13, 148, 152, 68, 49, 79, 183, 248, 72, 79, 95, 137, 27, 64, 222, 139, 217, 226, 207, 131, 204, 204, 252, 124, 242, 133, 155, 44, 46, 255, 1, 36, 145, 232, 18, 63, 35, 250, 151, 109, 108, 176, 60, 132, 72, 201, 165, 5, 1, 22, 52, 144, 140, 92, 138, 4, 194, 51, 218, 172, 204, 115, 57, 47, 225, 71, 182, 235, 188, 101, 170, 224, 14, 2, 211, 233, 19, 101, 215, 110, 38, 81, 2, 0, 216, 97, 232, 221, 207, 94, 171, 216, 188, 135, 122, 250, 63, 220, 193, 32, 37, 122, 184, 196, 148, 1, 237, 90, 247, 109, 123, 136, 226, 148, 247, 52, 168, 184, 212, 172, 76, 146, 177, 248, 163, 122, 178, 60, 104, 59, 87, 190, 162, 151, 200, 3, 190, 253, 66, 247, 94, 190, 203, 52, 241, 140, 39, 139, 198, 173, 195, 140, 139, 167, 208, 38, 191, 222, 33, 182, 60, 202, 43, 141, 254, 35, 144, 218, 26, 214, 16, 244, 92, 81, 207, 192, 125, 26, 162, 250, 83, 200, 234, 254, 73, 46, 67, 139, 176, 96, 151, 170, 203, 151, 37, 222, 120, 3, 106, 163, 67, 90, 237, 131, 16, 205, 208, 188, 239, 239, 80, 5, 55, 230, 37, 5, 42, 29, 109, 83, 140, 176, 214, 220, 31, 18, 176, 199, 209, 179, 41, 242, 161, 80, 224, 145, 173, 41, 220, 160, 237, 89, 239, 122, 216, 235, 71, 47, 103, 54, 0, 123, 127, 20, 78, 123, 219, 70, 119, 52, 206, 230, 14, 173, 28, 183, 44, 54, 73, 138, 181, 231, 138, 246, 151, 6, 135, 38, 173, 7, 72, 17, 8, 162, 124, 73, 197, 240, 36, 84, 12, 234, 164, 208, 248, 97, 115, 212, 29, 221, 158, 27, 195, 244, 151, 10, 209, 38, 121, 0, 94, 105, 96, 97, 15, 1, 94, 36, 253, 103, 161, 238, 78, 180, 229, 194, 255, 134, 255, 119, 96, 186, 82, 49, 204, 127, 197, 65, 125, 192, 204, 19, 33, 59, 35, 48, 4, 171, 129, 146, 140, 193, 10, 204, 237, 197, 237, 39, 78, 63, 10, 215, 49, 51, 184, 26, 158, 213, 174, 99, 241, 94, 250, 90, 252, 59, 38, 246, 142, 211, 15, 93, 103, 176, 89, 45, 219, 232, 59, 59, 206, 74, 147, 0, 67, 125, 91, 53, 216, 121, 5, 154, 154, 226, 226, 41, 53, 193, 64, 85, 199, 90, 44, 33, 71, 175, 51, 32, 31, 95, 200, 156, 183, 95, 126, 78, 184, 117, 113, 130, 161, 33, 170, 227, 142, 198, 245, 176, 52, 186, 2, 183, 153, 172, 212, 108, 166, 149, 76, 115, 18, 221, 36, 63, 65, 130, 200, 86, 253, 51, 251, 193, 210, 85, 167, 192, 102, 62, 24, 112, 209, 23, 71, 82, 165, 41, 200, 116, 144, 123, 254, 90, 241, 177, 97, 149, 28, 80, 65, 87, 70, 100, 191, 89, 35, 26, 206, 192, 42, 102, 225, 219, 108, 251, 20, 172, 161, 175, 116, 180, 131, 45, 195, 64, 54, 155, 254, 228, 129, 74, 22, 107, 166, 15, 229, 164, 40, 50, 196, 2, 222, 142, 82, 237, 63, 131, 22, 214, 78, 74, 46, 162, 27, 204, 227, 175, 241, 252, 186, 110, 79, 25, 84, 51, 119, 81, 122, 59, 208, 53, 245, 78, 35, 201, 118, 192, 134, 9, 130, 65, 39, 73, 138, 108, 114, 217, 137, 85, 2, 152, 217, 181, 245, 95, 238, 65, 120, 157, 77, 106, 60, 142, 151, 143, 215, 108, 168, 246, 157, 133, 33, 15, 216, 72, 8, 34, 44, 47, 57, 242, 252, 50, 170, 39, 104, 72, 148, 218, 65, 119, 112, 254, 16, 168, 173, 167, 52, 76, 170, 253, 229, 77, 3, 243, 37, 200, 168, 35, 97, 242, 45, 64, 14, 203, 220, 35, 95, 119, 202, 12, 30, 222, 117, 219, 84, 77, 196, 186, 61, 74, 233, 172, 108, 22, 171, 47, 133, 90, 98, 218, 248, 216, 227, 52, 65, 254, 26, 15, 12, 34, 59, 79, 73, 141, 55, 85, 194, 157, 225, 194, 142, 79, 136, 52, 49, 252, 104, 31, 188, 80, 48, 207, 163, 185, 47, 176, 47, 121, 73, 5, 133, 134, 101, 228, 13, 113, 83, 129, 0, 245, 4, 136, 205, 9, 200, 83, 105, 51, 238, 119, 86, 146, 34, 232, 147, 168, 190, 48, 201, 102, 10, 113, 162, 115, 96, 131, 166, 124, 185, 191, 32, 52, 247, 21, 218, 67, 38, 151, 1, 186, 129, 6, 62, 231, 243, 85, 165, 213, 1, 90, 19, 226, 193, 220, 149, 189, 101, 193, 60, 46, 148, 145, 201, 98, 93, 185, 187, 247, 91, 50, 30, 234, 96, 101, 114, 73, 18, 64, 48, 224, 119, 121, 116, 163, 188, 171, 46, 164, 51, 94, 101, 193, 153, 63, 59, 49, 122, 207, 220, 98, 116, 142, 81, 83, 81, 18, 187, 171, 192, 146, 131, 253, 100, 78, 90, 129, 170, 174, 225, 255, 165, 98, 155, 136, 110, 60, 252, 112, 96, 179, 223, 87, 88, 72, 75, 129, 216, 16, 250, 187, 94, 188, 36, 6, 48, 10, 76, 4, 247, 96, 170, 240, 194, 169, 238, 225, 180, 163, 56, 52, 213, 173, 94, 169, 77, 187, 226, 209, 151, 241, 105, 11, 163, 252, 237, 215, 161, 24, 133, 106, 89, 141, 250, 133, 141, 57, 48, 79, 97, 101, 5, 216, 210, 208, 59, 67, 232, 104, 60, 191, 115, 201, 63, 194, 177, 111, 181, 62, 51, 77, 214, 170, 172, 50, 42, 36, 99, 88, 187, 175, 73, 40, 26, 244, 221, 89, 88, 14, 245, 182, 224, 200, 133, 136, 171, 37, 109, 135, 173, 67, 47, 10, 153, 138, 76, 41, 94, 125, 207, 132, 110, 11, 117, 83, 44, 7, 31, 229, 215, 173, 77, 121, 71, 58, 206, 8, 237, 98, 95, 176, 119, 131, 12, 217, 179, 64, 152, 149, 203, 128, 13, 59, 117, 223, 53, 124, 81, 14, 144, 98, 28, 242, 194, 166, 240, 151, 221, 61, 220, 235, 239, 220, 93, 4, 147, 240, 176, 13, 112, 160, 94, 1, 206, 164, 251, 98, 58, 219, 176, 24, 46, 123, 230, 226, 89, 16, 155, 181, 189, 94, 79, 111, 112, 202, 251, 20, 175, 17, 195, 162, 3, 124, 110, 50, 4, 201, 43, 164, 175, 21, 29, 142, 138, 151, 27, 81, 193, 95, 240, 141, 145, 36, 212, 31, 1, 106, 48, 147, 247, 93, 180, 171, 107, 197, 227, 10, 189, 42, 131, 42, 69, 211, 10, 84, 242, 108, 178, 193, 139, 33, 9, 251, 56, 222, 176, 79, 78, 182, 133, 113, 165, 236, 158, 181, 157, 118, 36, 184, 231, 83, 234, 251, 23, 234, 222, 90, 245, 44, 248, 220, 165, 244, 125, 77, 88, 5, 124, 78, 215, 102, 114, 54, 93, 84, 233, 170, 246, 202, 179, 119, 86, 143, 76, 1, 141, 21, 127, 106, 90, 150, 154, 179, 135, 12, 236, 36, 96, 237, 95, 114, 172, 158, 127, 182, 0, 242, 99, 161, 194, 18, 91, 106, 129, 218, 130, 143, 26, 13, 4, 214, 246, 147, 189, 160, 195, 103, 167, 4, 102, 136, 19, 196, 6, 129, 170, 164, 150, 219, 141, 239, 204, 74, 183, 163, 158, 191, 63, 207, 141, 27, 7, 216, 16, 26, 147, 0, 72, 61, 106, 68, 33, 91, 221, 234, 82, 33, 8, 31, 134, 232, 141, 157, 240, 239, 207, 127, 56, 87, 230, 159, 10, 69, 86, 167, 40, 72, 6, 126, 34, 146, 15, 96, 99, 248, 215, 178, 73, 157, 65, 221, 197, 94, 96, 166, 255, 46, 182, 62, 72, 161, 24, 59, 231, 4, 249, 193, 77, 58, 194, 117, 118, 219, 91, 130, 233, 95, 124, 120, 123, 25, 249, 222, 213, 178, 50, 102, 218, 231, 183, 234, 52, 228, 231, 137, 141, 202, 126, 100, 70, 247, 15, 238, 208, 193, 141, 112, 43, 202, 106, 195, 88, 88, 178, 79, 234, 214, 75, 96, 67, 108, 163, 141, 171, 41, 144, 6, 113, 206, 180, 59, 148, 173, 191, 185, 123, 94, 3, 238, 164, 97, 34, 125, 66, 177, 152, 233, 51, 109, 136, 202, 28, 216, 62, 83, 40, 231, 145, 195, 215, 244, 162, 24, 193, 205, 97, 204, 147, 243, 248, 235, 215, 90, 32, 79, 217, 140, 38, 134, 165, 252, 185, 217, 95, 37, 15, 133, 147, 168, 97, 128, 117, 25, 170, 209, 40, 161, 8, 210, 209, 91, 139, 99, 182, 103, 9, 32, 124, 57, 7, 173, 46, 83, 45, 168, 17, 173, 246, 243, 140, 201, 248, 32, 60, 225, 228, 245, 163, 229, 233, 150, 156, 4, 214, 36, 209, 113, 53, 186, 98, 223, 155, 107, 237, 202, 244, 149, 45, 160, 41, 100, 216, 140, 219, 200, 102, 118, 243, 96, 119, 224, 113, 90, 20, 147, 190, 91, 220, 48, 177, 221, 8, 76, 36, 246, 127, 73, 24, 77, 204, 88, 48, 201, 162, 4, 139, 144, 1, 86, 224, 83, 83, 68, 72, 161, 119, 170, 114, 10, 204, 55, 95, 180, 105, 84, 22, 237, 177, 231, 39, 221, 236, 100, 226, 154, 113, 172, 120, 169, 208, 102, 13, 95, 190, 44, 105, 171, 11, 19, 39, 225, 151, 39, 33, 174, 45, 143, 74, 170, 6, 153, 27, 163, 6, 201, 81, 231, 32, 173, 142, 85, 213, 195, 15, 133, 248, 177, 104, 157, 63, 52, 92, 224, 15, 238, 31, 116, 233, 98, 82, 117, 42, 182, 203, 173, 156, 77, 103, 251, 65, 203, 25, 236, 57, 146, 36, 50, 153, 107, 110, 101, 192, 178, 50, 174, 72, 50, 186, 172, 116, 96, 123, 116, 78, 214, 228, 198, 35, 116, 224, 221, 174, 108, 89, 220, 136, 139, 27, 98, 135, 90, 10, 51, 253, 65, 65, 154, 20, 54, 61, 212, 172, 146, 44, 33, 195, 18, 252, 70, 103, 105, 235, 17, 133, 25, 194, 121, 105, 121, 246, 201, 59, 131, 120, 239, 113, 241, 161, 182, 212, 70, 47, 47, 27, 168, 103, 24, 121, 118, 159, 168, 238, 13, 209, 82, 133, 200, 231, 175, 54, 11, 6, 0, 149, 188, 157, 186, 71, 48, 251, 242, 156, 71, 28, 106, 190, 47, 93, 233, 238, 17, 28, 163, 248, 196, 87, 202, 218, 235, 127, 148, 140, 34, 26, 228, 108, 71, 59, 166, 249, 7, 198, 111, 6, 45, 179, 116, 171, 212, 132, 98, 26, 59, 121, 89, 158, 224, 30, 183, 107, 51, 24, 161, 40, 31, 137, 77, 249, 210, 221, 156, 153, 69, 170, 172, 130, 139, 185, 50, 254, 113, 82, 26, 83, 132, 47, 81, 173, 122, 73, 28, 207, 121, 250, 172, 193, 176, 174, 200, 119, 53, 109, 252, 159, 87, 133, 28, 216, 108, 245, 127, 27, 166, 168, 154, 187, 107, 73, 26, 217, 0, 204, 53, 141, 66, 221, 159, 28, 5, 208, 255, 200, 23, 173, 209, 28, 48, 254, 159, 253, 100, 3, 244, 166, 73, 157, 179, 22, 226, 94, 110, 196, 27, 65, 77, 10, 143, 255, 215, 233, 13, 58, 230, 21, 145, 31, 219, 50, 7, 104, 97, 61, 175, 175, 151, 220, 235, 85, 207, 24, 118, 32, 101, 126, 44, 18, 59, 122, 30, 234, 208, 99, 129, 40, 206, 34, 56, 144, 226, 35, 154, 87, 50, 208, 137, 114, 204, 173, 58, 163, 141, 158, 243, 85, 11, 186, 55, 111, 54, 107, 63, 185, 85, 25, 197, 116, 238, 196, 69, 168, 88, 93, 69, 234, 128, 5, 39, 185, 111, 44, 193, 225, 32, 196, 95, 234, 125, 41, 243, 104, 199, 152, 170, 154, 127, 188, 27, 47, 92, 233, 131, 223, 205, 41, 230, 170, 224, 235, 40, 2, 242, 30, 1, 70, 16, 159, 48, 29, 188, 50, 215, 30, 17, 68, 190, 206, 130, 198, 208, 25, 255, 186, 180, 128, 63, 200, 249, 97, 224, 12, 59, 22, 137, 145, 184, 110, 166, 229, 181, 48, 179, 188, 88, 118, 31, 106, 225, 144, 68, 192, 32, 79, 60, 140, 35, 93, 239, 200, 114, 111, 59, 114, 208, 81, 11, 54, 40, 31, 105, 82, 8, 235, 121, 130, 171, 82, 210, 39, 226, 163, 51, 30, 112, 75, 11, 203, 220, 48, 79, 214, 218, 143, 51, 70, 2, 112, 134, 188, 251, 222, 74, 144, 232, 102, 169, 69, 58, 198, 75, 41, 14, 209, 136, 246, 109, 164, 234, 83, 237, 181, 221, 202, 96, 150, 166, 128, 119, 197, 77, 7, 236, 251, 7, 150, 225, 189, 221, 210, 77, 29, 139, 130, 195, 84, 189, 121, 114, 127, 3, 152, 137, 189, 97, 82, 117, 42, 167, 200, 184, 62, 11, 217, 9, 185, 32, 93, 150, 92, 102, 116, 60, 4, 23, 3, 83, 124, 43, 1, 178, 193, 213, 224, 129, 9, 44, 90, 82, 236, 84, 145, 220, 155, 8, 162, 194, 60, 64, 65, 173, 170, 42, 114, 203, 177, 35, 28, 229, 108, 48, 228, 95, 245, 212, 185, 52, 4, 31, 35, 195, 95, 131, 182, 167, 64, 90, 28, 88, 55, 48, 68, 84, 24, 220, 183, 41, 14, 107, 169, 7, 186, 134, 177, 23, 180, 28, 32, 224, 27, 234, 146, 76, 122, 3, 243, 216, 228, 53, 86, 159, 244, 239, 253, 244, 242, 210, 149, 45, 68, 209, 225, 168, 140, 252, 37, 253, 136, 109, 241, 2, 214, 55, 20, 59, 134, 252, 213, 192, 210, 108, 190, 156, 70, 143, 219, 95, 98, 98, 36, 34, 130, 4, 154, 67, 146, 212, 101, 84, 32, 89, 87, 215, 231, 71, 201, 136, 36, 238, 4, 33, 40, 250, 176, 20, 40, 105, 60, 126, 96, 60, 192, 214, 10, 185, 58, 148, 106, 18, 182, 37, 52, 158, 216, 6, 196, 186, 127, 153, 129, 37, 191, 209, 140, 21, 44, 182, 39, 32, 125, 127, 240, 106, 228, 153, 93, 229, 91, 127, 106, 121, 130, 217, 83, 63, 198, 146, 102, 203, 196, 165, 61, 154, 139, 35, 255, 166, 250, 103, 29, 223, 187, 153, 170, 65, 163, 120, 191, 16, 131, 128, 136, 42, 96, 116, 45, 181, 109, 207, 207, 248, 151, 11, 7, 132, 123, 121, 254, 51, 39, 179, 217, 185, 112, 154, 131, 140, 7, 186, 112, 39, 117, 161, 35, 35, 80, 171, 187, 235, 215, 199, 123, 237, 116, 87, 59, 194, 20, 99, 66, 105, 116, 147, 108, 229, 75, 84, 69, 198, 24, 134, 57, 248, 86, 56, 189, 100, 55, 141, 245, 197, 218, 97, 58, 91, 82, 44, 43, 157, 93, 59, 128, 42, 135, 95, 188, 62, 247, 162, 21, 117, 73, 24, 77, 224, 47, 133, 40, 139, 136, 251, 8, 30, 178, 13, 82, 75, 18, 134, 57, 162, 42, 131, 39, 29, 65, 36, 22, 35, 135, 227, 67, 76, 18, 96, 250, 144, 172, 128, 201, 145, 10, 177, 92, 102, 183, 62, 183, 64, 86, 159, 69, 120, 150, 146, 199, 146, 53, 39, 212, 92, 57, 6, 23, 249, 182, 174, 193, 75, 207, 83, 162, 127, 25, 221, 69, 160, 45, 75, 173, 186, 57, 41, 232, 209, 247, 99, 196, 149, 208, 112, 238, 177, 219, 244, 100, 90, 253, 169, 80, 252, 247, 181, 200, 161, 143, 39, 23, 114, 147, 202, 194, 69, 55, 203, 187, 89, 216, 224, 119, 167, 180, 66, 188, 92, 202, 127, 221, 93, 26, 29, 212, 95, 91, 164, 206, 146, 185, 4, 134, 176, 45, 215, 195, 79, 214, 35, 133, 227, 13, 234, 89, 212, 247, 8, 247, 35, 81, 205, 50, 236, 146, 140, 229, 163, 96, 137, 249, 117, 173, 21, 173, 157, 245, 53, 149, 250, 239, 30, 181, 222, 11, 229, 174, 55, 142, 161, 238, 85, 237, 63, 101, 28, 86, 154, 142, 138, 205, 184, 163, 202, 13, 170, 168, 246, 119, 145, 38, 226, 241, 177, 176, 66, 100, 208, 40, 165, 41, 190, 133, 210, 103, 230, 78, 35, 175, 179, 133, 131, 179, 61, 101, 255, 50, 10, 18, 211, 219, 62, 44, 182, 85, 234, 83, 83, 175, 54, 153, 83, 17, 138, 11, 223, 183, 155, 23, 17, 188, 61, 42, 204, 195, 72, 86, 99, 42, 198, 8, 2, 181, 249, 194, 52, 250, 234, 92, 48, 130, 185, 74, 68, 55, 235, 95, 130, 161, 38, 114, 131, 177, 177, 134, 210, 108, 177, 127, 91, 131, 10, 32, 208, 167, 182, 222, 247, 92, 67, 10, 168, 237, 30, 198, 11, 19, 167, 113, 139, 131, 76, 46, 59, 44, 251, 111, 64, 47, 245, 117, 166, 61, 94, 62, 44, 202, 175, 74, 238, 41, 249, 100, 105, 72, 59, 130, 143, 62, 208, 152, 75, 104, 55, 86, 63, 57, 120, 73, 150, 83, 189, 167, 216, 26, 110, 173, 152, 242, 6, 57, 109, 192, 129, 238, 99, 71, 227, 90, 24, 63, 38, 200, 13, 86, 146, 210, 126, 189, 195, 48, 145, 42, 165, 25, 98, 97, 253, 107, 183, 199, 7, 182, 14, 89, 155, 100, 246, 46, 199, 76, 189, 207, 205, 129, 196, 38, 117, 201, 233, 113, 170, 184, 73, 172, 201, 222, 105, 100, 120, 216, 234, 143, 75, 20, 171, 199, 1, 39, 12, 5, 113, 127, 126, 116, 236, 44, 65, 200, 108, 196, 204, 62, 3, 241, 222, 244, 91, 2, 255, 2, 163, 46, 83, 85, 224, 52, 18, 129, 254, 28, 255, 246, 13, 62, 19, 81, 211, 183, 159, 70, 213, 121, 180, 11, 68, 199, 219, 241, 242, 2, 117, 117, 4, 218, 209, 29, 28, 232, 211, 13, 200, 176, 143, 72, 141, 60, 129, 220, 134, 203, 12, 188, 42, 34, 128, 53, 235, 9, 207, 134, 45, 62, 25, 62, 135, 204, 202, 252, 209, 95, 194, 183, 214, 32, 55, 198, 205, 134, 65, 169, 169, 209, 19, 1, 96, 193, 252, 68, 154, 216, 139, 23, 66, 154, 2, 61, 27, 57, 221, 243, 232, 176, 137, 78, 58, 158, 189, 206, 237, 218, 213, 90, 186, 38, 225, 26, 118, 73, 24, 170, 227, 110, 158, 161, 26, 8, 169, 93, 138, 137, 154, 232, 18, 206, 61, 9, 250, 111, 100, 80, 72, 63, 67, 235, 56, 156, 194, 231, 55, 195, 213, 225, 64, 163, 249, 85, 42, 39, 176, 46, 73, 173, 125, 154, 209, 108, 92, 206, 91, 202, 155, 225, 114, 165, 251, 167, 179, 49, 55, 213, 163, 112, 70, 76, 45, 1, 108, 247, 112, 90, 255, 210, 227, 201, 245, 115, 115, 26, 78, 39, 58, 36, 175, 3, 150, 249, 75, 116, 23, 145, 148, 238, 44, 98, 188, 114, 162, 125, 252, 1, 76, 243, 152, 117, 207, 237, 252, 162, 144, 87, 117, 135, 227, 61, 190, 55, 57, 147, 130, 212, 50, 89, 68, 131, 245, 12, 87, 97, 102, 144, 71, 47, 92, 120, 147, 26, 192, 132, 13, 22, 69, 184, 126, 148, 80, 172, 29, 44, 254, 137, 31, 39, 70, 141, 192, 36, 108, 192, 51, 128, 11, 166, 174, 210, 111, 222, 180, 161, 105, 101, 233, 186, 179, 231, 128, 72, 73, 28, 122, 166, 176, 137, 216, 73, 147, 187, 41, 129, 136, 109, 12, 95, 181, 194, 36, 15, 255, 120, 142, 41, 119, 229, 28, 30, 223, 226, 224, 9, 35, 10, 211, 157, 24, 208, 209, 192, 76, 149, 138, 123, 132, 135, 234, 242, 243, 118, 170, 112, 38, 208, 7, 18, 99, 111, 3, 233, 179, 84, 168, 42, 250, 97, 200, 37, 205, 121, 245, 153, 39, 217, 58, 133, 33, 24, 19, 208, 61, 62, 195, 151, 29, 72, 209, 27, 107, 200, 164, 24, 184, 78, 70, 42, 246, 207, 140, 1, 124, 108, 5, 121, 247, 130, 238, 221, 194, 254, 115, 93, 22, 235, 251, 16, 16, 87, 161, 70, 202, 1, 70, 162, 181, 95, 211, 84, 238, 227, 221, 207, 92, 182, 109, 134, 178, 23, 33, 188, 61, 72, 242, 62, 86, 198, 24, 22, 93, 3, 87, 67, 170, 113, 69, 103, 204, 219, 130, 67, 109, 103, 196, 194, 242, 103, 125, 179, 32, 94, 151, 19, 43, 3, 243, 247, 228, 243, 76, 129, 85, 138, 217, 101, 62, 133, 193, 222, 22, 30, 207, 179, 90, 201, 220, 69, 47, 143, 197, 30, 233, 77, 230, 132, 171, 193, 59, 13, 13, 33, 228, 64, 84, 250, 54, 217, 224, 107, 233, 9, 230, 25, 95, 212, 69, 75, 194, 160, 155, 212, 65, 22, 163, 80, 105, 171, 233, 67, 56, 31, 183, 38, 143, 89, 175, 237, 222, 254, 108, 171, 94, 49, 68, 31, 161, 101, 78, 250, 251, 48, 5, 168, 45, 117, 11, 203, 142, 148, 207, 95, 219, 191, 17, 247, 102, 130, 207, 250, 43, 68, 105, 239, 48, 69, 234, 15, 72, 122, 169, 98, 9, 210, 79, 27, 69, 174, 106, 184, 32, 15, 135, 235, 55, 137, 206, 86, 214, 176, 23, 156, 200, 54, 121, 147, 157, 213, 86, 179, 87, 102, 181, 185, 58, 213, 79, 45, 125, 72, 233, 2, 70, 130, 198, 157, 41, 245, 254, 147, 234, 216, 126, 213, 249, 24, 4, 252, 47, 25, 184, 71, 106, 85, 35, 16, 129, 246, 101, 90, 114, 44, 164, 17, 24, 163, 2, 132, 186, 75, 115, 1, 37, 24, 57, 222, 59, 253, 205, 137, 118, 110, 94, 241, 229, 3, 245, 236, 167, 222, 64, 89, 41, 63, 23, 9, 233, 207, 114, 8, 187, 104, 31, 107, 237, 218, 85, 176, 31, 226, 52, 36, 80, 115, 120, 213, 115, 178, 87, 152, 120, 114, 138, 27, 123, 8, 210, 172, 76, 177, 4, 245, 112, 176, 60, 182, 175, 140, 196, 40, 164, 214, 208, 190, 131, 6, 10, 96, 250, 43, 193, 96, 135, 22, 236, 152, 27, 199, 33, 79, 245, 232, 2, 116, 108, 136, 53, 239, 74, 203, 157, 104, 152, 129, 228, 190, 35, 209, 79, 132, 190, 240, 66, 12, 130, 110, 195, 228, 225, 126, 82, 7, 248, 69, 213, 227, 172, 139, 55, 54, 109, 21, 23, 32, 110, 69, 195, 31, 183, 137, 210, 217, 155, 83, 156, 229, 48, 8, 85, 89, 45, 205, 69, 137, 153, 224, 57, 192, 251, 118, 253, 128, 116, 78, 179, 125, 226, 73, 108, 235, 218, 182, 58, 51, 110, 125, 208, 69, 149, 76, 74, 137, 125, 100, 32, 5, 117, 154, 13, 124, 130, 241, 185, 157, 188, 202, 191, 158, 150, 159, 132, 96, 29, 127, 153, 197, 27, 61, 74, 168, 214, 10, 102, 218, 90, 90, 220, 225, 233, 93, 106, 174, 184, 44, 123, 51, 0, 60, 216, 194, 14, 12, 93, 34, 75, 164, 247, 195, 29, 224, 251, 154, 128, 38, 157, 134, 147, 143, 3, 109, 43, 34, 58, 167, 183, 96, 249, 210, 40, 251, 254, 131, 211, 155, 58, 157, 209, 233, 149, 242, 87, 118, 146, 169, 58, 107, 153, 74, 101, 19, 74, 30, 38, 53, 45, 242, 69, 207, 146, 3, 160, 95, 66, 71, 200, 194, 246, 111, 232, 129, 23, 239, 237, 121, 113, 154, 139, 1, 178, 183, 125, 201, 49, 27, 197, 208, 198, 95, 173, 222, 75, 16, 65, 39, 108, 209, 6, 174, 221, 213, 114, 160, 38, 3, 136, 35, 116, 119, 34, 224, 12, 100, 84, 244, 21, 193, 143, 60, 175, 0, 44, 117, 178, 103, 197, 132, 17, 204, 70, 239, 45, 39, 102, 210, 238, 147, 43, 225, 62, 118, 220, 216, 239, 160, 39, 9, 191, 136, 204, 226, 13, 251, 82, 171, 124, 8, 251, 121, 138, 200, 36, 126, 155, 8, 194, 79, 230, 67, 205, 77, 36, 173, 16, 224, 206, 72, 1, 63, 120, 24, 133, 109, 4, 1, 81, 13, 219, 174, 247, 116, 93, 158, 130, 225, 222, 4, 27, 205, 225, 187, 125, 234, 71, 214, 71, 233, 88, 207, 136, 8, 191, 28, 48, 196, 10, 164, 253, 184, 94, 154, 219, 248, 176, 152, 148, 130, 37, 125, 163, 180, 177, 234, 50, 90, 12, 130, 110, 25, 224, 4, 34, 13, 116, 197, 118, 223, 223, 92, 105, 176, 28, 157, 136, 158, 147, 140, 110, 94, 68, 246, 82, 52, 167, 151, 172, 247, 211, 153, 117, 143, 246, 107, 159, 173, 103, 60, 70, 126, 3, 206, 208, 81, 153, 37, 158, 41, 176, 133, 222, 242, 23, 251, 25, 1, 81, 202, 114, 92, 162, 30, 50, 166, 197, 148, 254, 0, 39, 199, 177, 247, 64, 14, 233, 248, 225, 54, 237, 36, 172, 142, 54, 42, 68, 239, 57, 39, 24, 6, 108, 47, 38, 43, 151, 139, 1, 134, 120, 136, 33, 245, 156, 219, 165, 158, 193, 122, 71, 237, 194, 200, 228, 36, 81, 194, 13, 53, 137, 208, 178, 69, 227, 72, 176, 75, 9, 234, 229, 182, 160, 151, 215, 202, 20, 137, 2, 15, 57, 48, 159, 188, 243, 225, 190, 151, 94, 48, 175, 151, 61, 117, 42, 183, 200, 218, 171, 7, 219, 16, 194, 22, 25, 106, 97, 68, 4, 131, 254, 236, 0, 184, 202, 204, 139, 36, 192, 47, 41, 118, 216, 167, 136, 170, 47, 249, 238, 92, 75, 195, 95, 68, 139, 8, 249, 43, 143, 161, 32, 55, 156, 204, 3, 186, 230, 3, 107, 99, 242, 120, 157, 131, 52, 173, 117, 28, 182, 145, 173, 208, 170, 15, 56, 27, 52, 152, 152, 190, 237, 232, 170, 138, 173, 217, 224, 76, 211, 245, 23, 89, 231, 122, 194, 223, 240, 76, 182, 210, 199, 14, 166, 112, 170, 171, 172, 3, 215, 78, 38, 144, 157, 95, 186, 53, 190, 55, 227, 168, 40, 254, 169, 56, 44, 161, 103, 157, 149, 15, 135, 186, 122, 189, 235, 207, 82, 142, 37, 204, 10, 244, 207, 100, 126, 144, 177, 246, 153, 53, 181, 168, 92, 186, 223, 85, 190, 169, 217, 219, 71, 47, 35, 8, 251, 97, 133, 154, 31, 32, 131, 253, 139, 249, 57, 101, 51, 205, 240, 43, 220, 2, 179, 58, 139, 138, 22, 164, 184, 170, 154, 24, 181, 54, 231, 213, 177, 70, 144, 26, 214, 250, 50, 217, 125, 56, 7, 40, 85, 116, 89, 245, 107, 88, 94, 91, 138, 85, 58, 50, 157, 157, 26, 61, 120, 86, 67, 239, 167, 121, 110, 201, 216, 162, 175, 8, 29, 107, 90, 15, 49, 129, 24, 11, 65, 33, 15, 74, 41, 250, 102, 62, 187, 153, 64, 170, 32, 252, 118, 116, 234, 19, 232, 208, 150, 30, 149, 55, 251, 139, 118, 6, 160, 203, 74, 68, 209, 194, 122, 67, 39, 141, 87, 29, 117, 153, 103, 156, 205, 255, 163, 184, 78, 74, 17, 192, 133, 203, 16, 226, 169, 136, 222, 93, 155, 8, 178, 26, 69, 202, 15, 228, 197, 10, 5, 135, 233, 111, 182, 140, 63, 171, 165, 12, 46, 24, 254, 161, 205, 32, 13, 144, 43, 61, 98, 19, 77, 1, 225, 116, 143, 114, 37, 208, 102, 158, 55, 198, 104, 126, 180, 198, 123, 183, 7, 7, 247, 168, 179, 199, 185, 42, 193, 145, 5, 79, 89, 231, 147, 92, 137, 6, 110, 142, 50, 206, 54, 164, 235, 250, 218, 211, 49, 40, 238, 231, 161, 186, 51, 29, 131, 253, 4, 194, 248, 12, 28, 216, 130, 16, 45, 125, 239, 103, 188, 5, 61, 80, 170, 235, 68, 214, 43, 204, 137, 2, 42, 27, 211, 123, 127, 173, 136, 89, 99, 79, 2, 143, 112, 179, 138, 169, 79, 244, 0, 97, 114, 69, 172, 84, 54, 1, 90, 176, 126, 231, 145, 20, 148, 138, 188, 122, 179, 143, 10, 168, 147, 48, 172, 53, 123, 216, 153, 109, 102, 112, 167, 182, 55, 52, 74, 192, 124, 171, 242, 252, 50, 180, 6, 252, 147, 108, 85, 210, 77, 243, 222, 79, 252, 205, 67, 26, 65, 2, 82, 160, 57, 10, 248, 63, 148, 205, 29, 191, 123, 189, 192, 38, 154, 20, 73, 58, 176, 168, 180, 238, 224, 73, 150, 217, 10, 57, 28, 86, 7, 59, 169, 40, 0, 122, 37, 233, 206, 237, 62, 125, 155, 131, 247, 101, 213, 4, 9, 140, 100, 18, 104, 159, 74, 142, 210, 197, 98, 124, 132, 35, 11, 188, 214, 141, 25, 211, 154, 236, 12, 36, 112, 196, 233, 250, 84, 57, 114, 68, 3, 176, 68, 6, 10, 215, 92, 33, 16, 253, 180, 94, 134, 45, 228, 11, 216, 24, 152, 242, 209, 55, 115, 2, 189, 156, 90, 207, 158, 43, 194, 69, 57, 104, 206, 89, 21, 195, 134, 231, 91, 12, 32, 183, 176, 207, 216, 249, 93, 59, 123, 94, 60, 134, 146, 60, 205, 176, 184, 23, 79, 228, 22, 82, 165, 108, 247, 138, 36, 192, 157, 97, 121, 227, 35, 118, 117, 217, 136, 196, 164, 224, 91, 132, 84, 89, 71, 213, 79, 106, 15, 149, 121, 163, 145, 239, 28, 165, 175, 235, 17, 75, 118, 218, 189, 204, 238, 193, 163, 231, 90, 176, 177, 88, 170, 58, 159, 45, 90, 131, 157, 8, 128, 228, 212, 73, 208, 55, 39, 249, 35, 244, 39, 248, 10, 57, 93, 97, 51, 101, 39, 246, 134, 185, 197, 62, 255, 129, 194, 48, 170, 104, 68, 244, 58, 123, 161, 159, 20, 61, 35, 197, 132, 151, 23, 17, 184, 122, 126, 240, 196, 242, 192, 181, 110, 27, 178, 72, 69, 241, 213, 201, 96, 150, 206, 97, 10, 171, 118, 153, 247, 251, 81, 23, 209, 232, 185, 248, 177, 61, 224, 252, 71, 120, 174, 166, 207, 101, 60, 59, 170, 114, 26, 22, 225, 142, 238, 31, 155, 248, 248, 49, 153, 212, 194, 130, 195, 132, 61, 9, 100, 164, 92, 36, 0, 176, 204, 81, 176, 68, 103, 52, 182, 83, 13, 166, 136, 121, 234, 25, 187, 99, 50, 133, 250, 186, 157, 224, 156, 207, 151, 174, 118, 58, 19, 74, 26, 162, 33, 235, 132, 195, 180, 14, 29, 113, 144, 97, 235, 22, 110, 35, 64, 121, 205, 12, 204, 140, 250, 132, 173, 109, 41, 43, 50, 22, 204, 217, 107, 105, 151, 171, 154, 251, 188, 4, 235, 65, 177, 101, 156, 113, 50, 127, 40, 226, 244, 41, 251, 37, 90, 39, 169, 71, 170, 143, 213, 236, 224, 225, 228, 73, 61, 117, 180, 76, 86, 135, 130, 65, 33, 157, 97, 106, 131, 176, 207, 246, 126, 226, 104, 111, 234, 130, 67, 201, 81, 40, 155, 201, 34, 56, 136, 180, 98, 136, 96, 204, 117, 163, 138, 55, 43, 66, 136, 233, 112, 172, 4, 135, 88, 184, 234, 191, 155, 164, 232, 240, 152, 207, 64, 61, 183, 128, 25, 144, 151, 255, 97, 18, 132, 9, 190, 45, 219, 6, 121, 129, 218, 94, 140, 65, 36, 57, 245, 143, 118, 106, 113, 3, 239, 223, 31, 115, 8, 135, 101, 52, 85, 171, 247, 57, 19, 222, 107, 107, 99, 208, 2, 219, 218, 251, 253, 175, 41, 15, 74, 247, 97, 43, 48, 120, 253, 57, 89, 101, 28, 234, 181, 103, 92, 5, 246, 199, 57, 167, 254, 212, 30, 164, 189, 82, 98, 109, 207, 95, 79, 219, 88, 191, 121, 34, 214, 214, 231, 111, 82, 103, 181, 25, 19, 189, 36, 158, 121, 219, 144, 39, 32, 20, 75, 185, 27, 102, 199, 29, 77, 134, 165, 92, 164, 36, 215, 166, 89, 255, 159, 0, 122, 7, 114, 18, 144, 239, 216, 179, 16, 22, 49, 135, 14, 110, 201, 217, 103, 161, 159, 42, 251, 35, 120, 221, 159, 148, 34, 201, 11, 210, 139, 60, 149, 127, 115, 7, 185, 121, 10, 8, 223, 60, 59, 41, 14, 192, 27, 186, 140, 217, 183, 182, 10, 72, 69, 106, 93, 125, 195, 121, 140, 212, 204, 250, 65, 234, 73, 40, 41, 145, 125, 172, 44, 5, 251, 33, 0, 224, 121, 65, 186, 51, 166, 109, 191, 192, 5, 238, 188, 114, 153, 114, 213, 187, 111, 108, 50, 70, 231, 132, 80, 198, 34, 72, 131, 66, 128, 130, 229, 178, 171, 50, 215, 246, 107, 211, 5, 70, 86, 178, 165, 163, 236, 71, 250, 112, 86, 108, 183, 57, 240, 250, 90, 146, 1, 2, 241, 84, 82, 202, 33, 134, 143, 138, 224, 7, 33, 82, 111, 143, 212, 38, 156, 183, 149, 136, 214, 61, 130, 153, 96, 52, 33, 218, 91, 69, 113, 185, 89, 237, 12, 223, 151, 221, 66, 236, 201, 69, 177, 112, 32, 215, 2, 144, 201, 12, 156, 62, 163, 106, 42, 255, 15, 180, 225, 62, 191, 15, 181, 60, 117, 181, 93, 40, 178, 40, 73, 170, 41, 150, 151, 189, 221, 32, 219, 71, 83, 187, 6, 48, 171, 27, 245, 42, 166, 209, 255, 40, 37, 142, 203, 30, 199, 191, 150, 164, 96, 71, 180, 201, 3, 90, 200, 35, 96, 62, 153, 245, 147, 130, 62, 14, 185, 91, 207, 52, 201, 102, 9, 56, 154, 24, 167, 92, 153, 143, 66, 105, 124, 154, 59, 108, 206, 25, 112, 75, 40, 45, 141, 38, 176, 19, 5, 69, 104, 66, 149, 244, 9, 182, 198, 208, 22, 117, 6, 175, 204, 190, 94, 74, 90, 98, 221, 30, 158, 204, 117, 234, 14, 89, 80, 222, 61, 13, 191, 185, 251, 112, 58, 85, 105, 15, 210, 39, 236, 182, 146, 64, 47, 31, 99, 76, 211, 108, 42, 26, 192, 83, 165, 127, 167, 149, 18, 3, 100, 188, 77, 250, 110, 182, 138, 247, 46, 166, 229, 85, 252, 237, 172, 204, 53, 87, 168, 208, 24, 143, 170, 81, 240, 174, 57, 53, 57, 21, 47, 149, 177, 183, 150, 121, 9, 21, 238, 178, 227, 13, 125, 214, 204, 158, 102, 227, 109, 7, 127, 159, 235, 104, 124, 90, 129, 189, 211, 206, 37, 137, 42, 194, 97, 247, 219, 134, 63, 42, 161, 55, 223, 131, 173, 191, 215, 226, 54, 124, 236, 207, 170, 62, 235, 27, 29, 3, 254, 199, 251, 117, 255, 238, 183, 63, 255, 182, 190, 145, 53, 231, 63, 197, 108, 46, 65, 181, 238, 137, 44, 12, 123, 105, 21, 148, 10, 107, 218, 73, 154, 149, 77, 113, 126, 89, 62, 1, 201, 102, 71, 180, 147, 244, 84, 95, 44, 95, 7, 34, 194, 59, 136, 133, 30, 152, 203, 53, 19, 46, 100, 76, 28, 30, 153, 171, 87, 215, 63, 58, 239, 27, 231, 210, 85, 153, 17, 44, 214, 134, 253, 35, 149, 172, 231, 14, 42, 190, 233, 204, 6, 30, 62, 120, 248, 224, 143, 77, 152, 45, 137, 178, 42, 98, 65, 96, 119, 11, 137, 40, 155, 94, 196, 32, 24, 62, 76, 184, 113, 78, 102, 20, 24, 26, 19, 207, 50, 59, 147, 243, 243, 96, 209, 66, 10, 131, 57, 144, 149, 164, 231, 123, 134, 137, 179, 100, 247, 153, 139, 76, 108, 163, 87, 201, 54, 57, 115, 4, 142, 120, 141, 139, 88, 138, 203, 15, 150, 9, 238, 148, 89, 152, 192, 219, 208, 66, 104, 88, 62, 240, 86, 52, 203, 236, 8, 141, 138, 223, 18, 175, 17, 50, 99, 31, 94, 59, 129, 116, 108, 148, 205, 41, 114, 129, 20, 136, 180, 35, 191, 240, 188, 63, 141, 237, 65, 136, 203, 193, 209, 40, 240, 82, 43, 201, 239, 172, 21, 99, 167, 86, 237, 104, 93, 185, 224, 90, 42, 22, 109, 29, 251, 26, 143, 242, 185, 172, 114, 125, 245, 134, 29, 145, 134, 189, 114, 148, 147, 32, 62, 112, 241, 180, 120, 64, 123, 140, 127, 207, 193, 184, 235, 146, 43, 137, 194, 132, 183, 158, 26, 46, 67, 3, 219, 45, 40, 165, 29, 242, 181, 228, 83, 229, 226, 118, 253, 214, 66, 95, 248, 5, 143, 195, 240, 243, 52, 27, 99, 101, 162, 106, 133, 6, 100, 91, 254, 179, 80, 241, 131, 96, 50, 174, 204, 126, 219, 61, 218, 194, 81, 81, 104, 149, 203, 21, 81, 207, 7, 234, 103, 168, 31, 222, 46, 32, 71, 226, 164, 200, 236, 168, 83, 29, 196, 141, 88, 23, 197, 246, 193, 144, 107, 205, 184, 141, 111, 53, 119, 233, 240, 117, 45, 191, 34, 113, 174, 179, 27, 20, 62, 164, 35, 133, 79, 63, 93, 115, 126, 187, 163, 47, 114, 155, 121, 200, 200, 62, 221, 193, 165, 183, 218, 186, 118, 162, 225, 173, 206, 72, 76, 231, 163, 223, 58, 61, 37, 16, 199, 55, 108, 43, 43, 139, 20, 237, 61, 61, 254, 159, 116, 27, 251, 110, 28, 107, 134, 224, 107, 83, 169, 130, 77, 225, 138, 40, 112, 232, 68, 119, 191, 7, 66, 219, 88, 5, 105, 186, 21, 55, 97, 50, 133, 155, 186, 107, 109, 96, 208, 25, 118, 241, 78, 238, 166, 183, 126, 92, 61, 49, 34, 37, 106, 181, 46, 21, 155, 247, 248, 104, 9, 250, 194, 101, 249, 215, 140, 123, 102, 49, 119, 27, 245, 136, 155, 21, 64, 104, 100, 205, 50, 67, 60, 3, 2, 250, 99, 161, 31, 245, 245, 130, 85, 18, 1, 29, 38, 180, 108, 63, 67, 161, 116, 174, 51, 60, 11, 212, 28, 99, 99, 24, 245, 93, 68, 220, 32, 49, 208, 28, 229, 253, 240, 144, 125, 75, 201, 2, 68, 162, 104, 63, 4, 234, 113, 0, 141, 139, 163, 34, 44, 200, 159, 232, 227, 241, 123, 146, 107, 60, 66, 20, 188, 208, 37, 173, 42, 9, 161, 66, 201, 242, 96, 37, 190, 236, 240, 117, 228, 205, 44, 242, 239, 80, 47, 84, 105, 240, 3, 54, 228, 205, 94, 35, 50, 112, 221, 198, 17, 86, 16, 36, 170, 62, 51, 207, 210, 190, 96, 123, 101, 176, 89, 1, 35, 195, 241, 31, 215, 76, 63, 176, 222, 93, 106, 62, 174, 163, 127, 32, 67, 129, 254, 17, 196, 84, 28, 71, 170, 31, 226, 74, 255, 255, 241, 74, 79, 47, 88, 125, 12, 245, 209, 100, 45, 53, 50, 92, 15, 63, 36, 72, 165, 21, 186, 95, 74, 168, 140, 129, 156, 152, 74, 63, 225, 242, 200, 101, 166, 28, 234, 157, 193, 11, 154, 176, 33, 35, 195, 88, 131, 144, 97, 169, 87, 154, 184, 145, 86, 181, 69, 24, 165, 206, 81, 21, 194, 185, 164, 172, 149, 0, 13, 65, 14, 35, 20, 148, 127, 225, 231, 181, 163, 245, 77, 29, 217, 17, 140, 87, 160, 77, 25, 90, 59, 176, 227, 5, 200, 0, 150, 185, 28, 7, 242, 123, 4, 36, 103, 128, 168, 108, 46, 203, 111, 110, 109, 234, 239, 51, 40, 241, 236, 86, 87, 106, 77, 111, 103, 32, 66, 89, 143, 110, 66, 77, 239, 147, 55, 117, 110, 73, 186, 8, 56, 190, 167, 193, 91, 112, 137, 245, 97, 19, 59, 245, 174, 249, 204, 22, 9, 67, 39, 184, 134, 42, 161, 149, 178, 130, 162, 245, 192, 178, 134, 98, 197, 105, 62, 11, 205, 98, 34, 184, 222, 14, 7, 189, 69, 224, 49, 38, 119, 108, 29, 99, 222, 252, 8, 80, 169, 139, 105, 162, 20, 86, 26, 18, 161, 144, 210, 13, 87, 246, 77, 122, 144, 34, 226, 64, 251, 94, 147, 122, 103, 94, 198, 90, 175, 208, 171, 61, 119, 218, 88, 120, 111, 80, 112, 217, 188, 22, 108, 253, 77, 203, 27, 12, 155, 135, 47, 253, 4, 21, 55, 86, 242, 131, 25, 120, 94, 135, 41, 47, 1, 227, 4, 168, 107, 178, 151, 248, 233, 81, 42, 244, 69, 133, 221, 69, 173, 74, 46, 254, 213, 226, 42, 148, 100, 221, 89, 106, 116, 93, 30, 73, 4, 125, 28, 89, 55, 9, 244, 215, 85, 107, 205, 99, 247, 21, 27, 208, 92, 172, 207, 82, 242, 91, 245, 6, 187, 45, 76, 132, 32, 50, 56, 63, 142, 228, 219, 80, 93, 84, 108, 216, 77, 62, 73, 148, 36, 235, 111, 247, 183, 98, 32, 173, 87, 237, 118, 195, 55, 212, 212, 249, 70, 154, 217, 254, 144, 121, 238, 209, 144, 235, 225, 21, 148, 152, 155, 39, 174, 61, 146, 128, 84, 67, 225, 136, 106, 234, 209, 97, 88, 73, 84, 141, 103, 224, 20, 111, 132, 20, 25, 116, 248, 5, 82, 37, 97, 113, 136, 40, 88, 233, 36, 6, 63, 229, 85, 205, 104, 246, 192, 66, 20, 207, 16, 5, 36, 84, 210, 90, 14, 155, 62, 239, 76, 226, 136, 207, 121, 171, 29, 226, 54, 20, 140, 46, 71, 182, 206, 148, 44, 146, 218, 23, 223, 190, 111, 216, 97, 237, 51, 101, 148, 93, 95, 101, 226, 245, 193, 229, 219, 96, 200, 203, 17, 214, 164, 97, 193, 238, 235, 95], + [140, 146, 79, 105, 126, 63, 202, 214, 133, 174, 101, 60, 45, 179, 182, 200, 203, 249, 155, 38, 243, 239, 8, 182, 15, 59, 132, 134, 37, 223, 149, 167, 155, 95, 233, 149, 67, 229, 180, 68, 8, 164, 214, 31, 247, 163, 86, 222, 20, 185, 123, 115, 155, 156, 53, 178, 198, 236, 147, 98, 228, 171, 18, 91, 154, 132, 167, 97, 171, 163, 114, 184, 61, 164, 113, 236, 231, 33, 74, 51, 242, 146, 172, 217, 4, 131, 174, 223, 211, 51, 98, 113, 40, 56, 242, 22, 69, 70, 183, 179, 21, 184, 118, 111, 251, 255, 58, 226, 17, 81, 56, 57, 118, 145, 149, 39, 244, 216, 76, 176, 193, 167, 111, 20, 7, 84, 106, 19, 13, 43, 199, 187, 211, 36, 214, 128, 50, 132, 175, 36, 121, 213, 103, 31, 130, 43, 19, 42, 34, 95, 17, 114, 204, 166, 125, 14, 20, 117, 14, 232, 142, 65, 158, 90, 153, 230, 58, 218, 28, 208, 8, 129, 161, 139, 254, 60, 85, 26, 214, 137, 115, 85, 203, 185, 95, 122, 58, 167, 111, 174, 205, 107, 103, 232, 238, 152, 209, 21, 205, 48, 234, 38, 51, 250, 31, 253, 113, 13, 238, 246, 116, 235, 77, 152, 208, 104, 133, 141, 234, 145, 141, 42, 150, 27, 192, 167, 111, 22, 11, 75, 249, 172, 127, 100, 16, 209, 180, 21, 240, 46, 200, 57, 192, 24, 95, 149, 84, 89, 73, 17, 102, 224, 156, 137, 153, 140, 57, 130, 161, 75, 191, 52, 120, 17, 48, 23, 164, 177, 186, 82, 141, 2, 91, 10, 64, 177, 117, 108, 113, 193, 140, 100, 183, 139, 46, 158, 98, 237, 125, 27, 60, 224, 202, 195, 184, 11, 138, 184, 227, 96, 31, 29, 99, 32, 197, 137, 148, 73, 128, 25, 214, 193, 40, 91, 15, 190, 145, 74, 67, 24, 204, 200, 52, 197, 117, 188, 223, 32, 0, 242, 74, 136, 12, 248, 60, 158, 121, 150, 173, 219, 6, 198, 215, 188, 149, 253, 18, 250, 209, 170, 59, 139, 197, 53, 93, 195, 119, 53, 153, 54, 192, 131, 234, 149, 49, 44, 243, 212, 208, 104, 235, 204, 26, 190, 254, 18, 28, 171, 69, 83, 237, 161, 206, 151, 112, 179, 207, 168, 44, 155, 189, 61, 19, 208, 213, 201, 163, 160, 186, 129, 138, 23, 218, 16, 12, 224, 100, 113, 229, 165, 55, 85, 218, 99, 78, 95, 226, 221, 176, 129, 239, 221, 100, 48, 167, 38, 167, 79, 183, 248, 28, 131, 97, 164, 95, 203, 212, 176, 157, 136, 186, 189, 71, 34, 28, 115, 35, 35, 166, 82, 254, 153, 131, 142, 133, 190, 143, 169, 200, 131, 202, 253, 221, 182, 82, 17, 159, 78, 205, 213, 206, 10, 89, 102, 237, 108, 96, 106, 221, 64, 134, 250, 12, 235, 190, 60, 88, 159, 64, 90, 71, 23, 85, 180, 70, 252, 122, 172, 28, 193, 55, 239, 163, 35, 146, 96, 71, 131, 96, 130, 218, 112, 25, 74, 219, 238, 247, 16, 129, 243, 54, 154, 11, 101, 245, 186, 38, 198, 161, 186, 127, 184, 174, 180, 143, 165, 245, 181, 64, 159, 142, 124, 29, 67, 66, 50, 17, 139, 234, 93, 192, 10, 84, 13, 157, 129, 150, 225, 132, 174, 30, 64, 183, 221, 116, 71, 143, 209, 142, 174, 29, 87, 106, 124, 97, 182, 29, 120, 107, 136, 105, 36, 159, 126, 42, 226, 32, 156, 11, 212, 37, 87, 65, 46, 49, 111, 81, 236, 21, 223, 87, 69, 208, 188, 254, 57, 78, 20, 49, 155, 41, 160, 165, 214, 99, 0, 110, 108, 82, 204, 13, 195, 255, 91, 62, 238, 48, 234, 135, 35, 137, 122, 74, 232, 2, 58, 250, 195, 93, 155, 14, 203, 144, 87, 73, 4, 245, 18, 118, 160, 228, 46, 152, 110, 6, 188, 162, 80, 75, 166, 146, 230, 141, 197, 117, 250, 243, 198, 97, 126, 248, 112, 191, 32, 56, 39, 214, 253, 189, 237, 181, 59, 88, 244, 243, 30, 201, 137, 246, 174, 120, 5, 193, 71, 196, 157, 115, 52, 192, 250, 124, 35, 101, 13, 55, 223, 123, 80, 30, 33, 21, 211, 14, 8, 94, 90, 148, 176, 4, 187, 235, 169, 85, 120, 96, 42, 114, 28, 41, 59, 18, 114, 27, 158, 118, 95, 70, 80, 42, 145, 217, 167, 104, 242, 233, 2, 149, 182, 188, 219, 68, 8, 246, 34, 123, 23, 35, 185, 91, 124, 149, 208, 12, 248, 24, 115, 210, 28, 123, 168, 221, 94, 6, 146, 130, 82, 155, 237, 154, 77, 22, 122, 142, 160, 195, 120, 120, 138, 128, 113, 147, 31, 163, 219, 45, 151, 122, 150, 183, 239, 92, 191, 241, 23, 213, 223, 91, 172, 249, 53, 156, 129, 61, 186, 61, 66, 24, 191, 161, 186, 98, 227, 63, 135, 177, 0, 175, 131, 90, 172, 45, 128, 18, 135, 197, 10, 219, 107, 62, 64, 19, 219, 238, 225, 30, 124, 75, 199, 242, 84, 113, 247, 50, 63, 146, 4, 135, 244, 8, 168, 130, 81, 198, 75, 227, 252, 175, 30, 151, 105, 103, 129, 34, 222, 46, 61, 112, 168, 102, 245, 237, 15, 96, 197, 158, 231, 41, 183, 218, 216, 216, 42, 190, 12, 192, 115, 185, 4, 183, 95, 120, 148, 40, 193, 52, 175, 213, 217, 238, 93, 209, 39, 135, 130, 193, 47, 150, 93, 233, 163, 66, 168, 115, 234, 43, 153, 162, 219, 50, 43, 153, 63, 23, 195, 126, 183, 233, 240, 81, 78, 148, 44, 172, 60, 248, 191, 19, 211, 114, 2, 242, 175, 57, 175, 248, 50, 33, 71, 198, 17, 145, 233, 130, 63, 222, 245, 122, 87, 222, 123, 218, 142, 89, 133, 91, 44, 128, 206, 167, 42, 37, 199, 102, 236, 21, 223, 23, 125, 10, 21, 73, 55, 162, 230, 80, 148, 75, 41, 207, 251, 208, 121, 76, 187, 179, 183, 134, 181, 200, 246, 42, 139, 159, 199, 41, 142, 202, 99, 116, 194, 122, 163, 12, 95, 128, 207, 186, 167, 233, 247, 52, 59, 230, 158, 196, 175, 119, 7, 43, 179, 234, 109, 205, 43, 137, 40, 134, 129, 223, 217, 201, 80, 175, 240, 252, 16, 189, 133, 59, 149, 193, 102, 31, 160, 139, 254, 103, 229, 13, 228, 78, 5, 156, 24, 229, 245, 41, 127, 211, 229, 83, 126, 134, 127, 144, 74, 59, 153, 6, 202, 125, 196, 18, 135, 143, 166, 179, 213, 197, 63, 88, 155, 123, 194, 99, 91, 167, 42, 104, 243, 208, 160, 145, 101, 222, 88, 105, 159, 142, 141, 177, 84, 248, 68, 4, 39, 133, 231, 42, 40, 30, 101, 238, 133, 187, 31, 128, 173, 27, 96, 146, 44, 27, 235, 110, 172, 22, 54, 26, 236, 40, 83, 81, 211, 184, 199, 160, 226, 74, 165, 10, 252, 52, 9, 238, 183, 179, 67, 111, 254, 123, 92, 30, 170, 183, 41, 27, 143, 205, 83, 225, 182, 203, 75, 200, 158, 51, 36, 245, 69, 147, 140, 62, 102, 248, 248, 181, 52, 66, 213, 20, 16, 135, 11, 114, 173, 160, 91, 69, 50, 254, 26, 2, 140, 161, 250, 51, 134, 75, 240, 244, 161, 176, 198, 1, 37, 29, 33, 98, 186, 38, 122, 238, 209, 101, 159, 137, 35, 24, 239, 200, 218, 235, 155, 101, 210, 81, 134, 41, 35, 205, 80, 81, 229, 235, 186, 203, 123, 246, 207, 103, 217, 94, 236, 246, 226, 18, 90, 33, 31, 41, 254, 107, 66, 26, 25, 103, 71, 170, 249, 183, 208, 163, 27, 214, 48, 152, 77, 7, 76, 1, 220, 178, 158, 71, 207, 41, 51, 77, 10, 178, 77, 61, 152, 6, 247, 228, 171, 11, 134, 43, 225, 114, 31, 244, 207, 82, 153, 183, 18, 57, 215, 75, 186, 193, 146, 211, 134, 144, 66, 92, 63, 54, 49, 27, 155, 205, 18, 249, 197, 15, 103, 229, 155, 106, 149, 104, 255, 223, 253, 115, 6, 165, 240, 187, 189, 17, 83, 190, 136, 175, 171, 101, 136, 213, 109, 136, 8, 6, 219, 241, 231, 198, 203, 112, 49, 228, 47, 169, 148, 251, 202, 211, 53, 81, 101, 17, 36, 93, 117, 103, 142, 112, 252, 26, 69, 86, 153, 220, 208, 19, 118, 168, 108, 204, 117, 191, 189, 97, 3, 15, 50, 167, 188, 46, 20, 199, 46, 69, 139, 96, 4, 185, 39, 16, 174, 231, 21, 160, 13, 98, 209, 206, 17, 40, 107, 163, 106, 243, 195, 46, 138, 5, 69, 150, 7, 90, 61, 13, 236, 231, 12, 92, 251, 184, 120, 170, 51, 163, 251, 166, 140, 167, 191, 94, 250, 121, 77, 152, 204, 142, 154, 154, 186, 212, 212, 55, 155, 134, 13, 145, 194, 61, 60, 131, 46, 97, 250, 122, 67, 164, 245, 83, 122, 140, 122, 41, 212, 2, 190, 161, 90, 199, 195, 186, 97, 234, 41, 186, 225, 34, 26, 14, 7, 159, 172, 228, 7, 27, 243, 250, 108, 246, 200, 218, 247, 140, 109, 175, 187, 250, 135, 231, 161, 5, 201, 235, 216, 64, 165, 132, 139, 75, 120, 78, 196, 8, 5, 98, 184, 241, 36, 83, 105, 69, 153, 6, 127, 161, 35, 123, 110, 91, 208, 220, 255, 111, 121, 14, 109, 173, 161, 100, 145, 120, 74, 86, 190, 154, 182, 173, 54, 197, 238, 123, 62, 115, 27, 67, 170, 15, 1, 37, 35, 221, 214, 226, 113, 253, 125, 75, 245, 92, 63, 167, 120, 37, 124, 151, 214, 108, 252, 165, 60, 130, 185, 75, 212, 54, 30, 195, 64, 59, 41, 60, 23, 115, 31, 14, 18, 199, 55, 10, 227, 146, 19, 25, 168, 24, 98, 246, 114, 202, 80, 253, 95, 120, 42, 27, 190, 4, 20, 72, 201, 251, 70, 99, 119, 66, 11, 223, 144, 159, 92, 80, 142, 148, 131, 99, 228, 217, 218, 231, 89, 105, 206, 177, 66, 58, 229, 47, 67, 71, 176, 163, 147, 7, 86, 70, 167, 248, 228, 17, 106, 216, 161, 119, 25, 199, 151, 140, 107, 97, 0, 175, 129, 107, 131, 43, 205, 70, 218, 85, 87, 185, 37, 125, 184, 5, 115, 70, 234, 154, 58, 90, 44, 218, 121, 173, 3, 3, 232, 67, 25, 131, 104, 131, 20, 253, 175, 78, 184, 108, 201, 160, 222, 94, 95, 156, 111, 14, 178, 26, 95, 125, 61, 104, 132, 100, 74, 159, 88, 194, 83, 163, 129, 133, 204, 157, 128, 208, 255, 19, 119, 16, 166, 219, 253, 168, 145, 4, 156, 13, 70, 218, 53, 248, 81, 61, 50, 239, 162, 59, 219, 238, 154, 127, 235, 98, 220, 148, 63, 79, 77, 40, 176, 227, 150, 216, 149, 190, 240, 9, 195, 90, 6, 8, 63, 92, 84, 214, 176, 235, 185, 98, 102, 222, 158, 155, 38, 25, 3, 193, 90, 78, 31, 159, 25, 133, 213, 1, 219, 236, 6, 37, 5, 214, 64, 13, 99, 136, 194, 99, 18, 105, 184, 7, 200, 152, 16, 28, 60, 186, 123, 106, 93, 205, 239, 178, 207, 204, 86, 142, 96, 104, 40, 206, 48, 41, 165, 51, 137, 213, 214, 163, 174, 216, 168, 228, 87, 236, 9, 228, 143, 42, 134, 180, 155, 31, 154, 197, 193, 255, 115, 53, 61, 31, 111, 107, 31, 31, 119, 138, 233, 71, 70, 57, 223, 231, 221, 51, 187, 9, 117, 198, 107, 206, 96, 79, 150, 60, 193, 30, 159, 64, 68, 90, 211, 101, 32, 88, 142, 140, 221, 173, 237, 137, 188, 221, 231, 16, 149, 100, 64, 230, 122, 56, 124, 46, 195, 180, 166, 56, 190, 88, 217, 206, 102, 65, 19, 88, 164, 147, 233, 219, 2, 81, 194, 48, 14, 201, 58, 204, 30, 179, 46, 11, 139, 251, 198, 84, 166, 27, 80, 97, 249, 116, 164, 220, 125, 130, 145, 2, 120, 228, 244, 15, 112, 121, 2, 241, 85, 11, 99, 154, 49, 37, 4, 51, 204, 135, 164, 196, 111, 16, 198, 59, 125, 182, 191, 249, 176, 212, 235, 50, 241, 245, 59, 201, 36, 133, 177, 239, 79, 109, 234, 223, 30, 228, 84, 101, 61, 22, 221, 111, 40, 122, 106, 10, 149, 143, 49, 229, 115, 253, 139, 158, 152, 139, 203, 138, 123, 216, 175, 203, 162, 161, 148, 105, 7, 48, 51, 116, 222, 112, 211, 251, 107, 245, 52, 66, 187, 211, 244, 209, 79, 227, 238, 121, 66, 172, 147, 91, 144, 174, 123, 196, 232, 83, 188, 0, 199, 90, 189, 200, 155, 133, 135, 157, 135, 94, 24, 97, 250, 45, 156, 95, 208, 138, 83, 163, 253, 38, 37, 53, 208, 21, 15, 100, 92, 148, 65, 204, 104, 218, 120, 77, 140, 9, 164, 216, 189, 154, 146, 197, 200, 223, 221, 109, 181, 107, 218, 114, 129, 105, 170, 183, 16, 143, 0, 250, 199, 188, 151, 5, 69, 28, 134, 68, 109, 187, 250, 217, 199, 196, 153, 76, 205, 225, 248, 38, 24, 34, 26, 116, 36, 159, 106, 214, 94, 90, 168, 46, 178, 7, 244, 201, 82, 237, 5, 16, 120, 195, 182, 239, 51, 250, 50, 63, 63, 220, 175, 243, 102, 158, 15, 147, 41, 64, 82, 3, 22, 29, 34, 137, 87, 122, 235, 228, 2, 130, 69, 213, 99, 191, 27, 222, 65, 219, 65, 27, 206, 159, 210, 134, 154, 87, 179, 36, 230, 150, 206, 186, 251, 36, 199, 196, 2, 160, 116, 126, 104, 107, 60, 221, 22, 68, 221, 32, 150, 70, 13, 23, 48, 66, 23, 116, 107, 114, 179, 13, 255, 200, 48, 254, 134, 103, 0, 172, 123, 19, 128, 171, 89, 217, 207, 67, 247, 189, 228, 167, 204, 110, 37, 36, 130, 165, 67, 170, 216, 33, 217, 162, 57, 227, 165, 246, 150, 2, 18, 129, 211, 192, 93, 26, 78, 206, 45, 53, 79, 112, 45, 200, 149, 140, 61, 142, 1, 231, 51, 250, 28, 45, 204, 161, 93, 103, 238, 209, 96, 82, 97, 44, 242, 134, 236, 125, 68, 218, 131, 159, 124, 81, 250, 33, 142, 0, 83, 90, 213, 146, 128, 217, 150, 157, 247, 82, 18, 204, 34, 191, 19, 114, 124, 120, 142, 35, 161, 150, 125, 242, 207, 237, 124, 130, 221, 167, 5, 56, 114, 154, 10, 29, 114, 102, 204, 162, 198, 81, 182, 117, 156, 79, 5, 191, 153, 248, 83, 206, 169, 4, 25, 73, 91, 68, 180, 184, 189, 99, 27, 1, 106, 59, 74, 208, 200, 36, 60, 74, 74, 74, 205, 16, 214, 230, 134, 130, 81, 62, 130, 47, 169, 126, 84, 236, 143, 62, 104, 88, 149, 124, 139, 203, 214, 69, 90, 226, 91, 91, 91, 48, 88, 185, 130, 217, 175, 152, 240, 59, 139, 24, 6, 89, 122, 216, 136, 223, 34, 182, 252, 231, 237, 79, 15, 57, 12, 88, 229, 221, 225, 223, 238, 159, 152, 70, 181, 233, 94, 179, 140, 243, 109, 108, 159, 32, 138, 73, 36, 142, 45, 18, 11, 63, 55, 239, 13, 157, 4, 17, 159, 67, 12, 5, 217, 255, 133, 121, 136, 138, 9, 92, 34, 11, 179, 52, 172, 239, 60, 187, 117, 219, 155, 129, 80, 201, 202, 189, 63, 175, 80, 116, 129, 202, 32, 135, 250, 129, 27, 136, 22, 174, 234, 22, 216, 182, 57, 96, 235, 10, 248, 206, 98, 46, 144, 125, 35, 45, 255, 165, 129, 53, 85, 196, 231, 16, 161, 226, 58, 115, 36, 97, 242, 40, 188, 222, 209, 186, 171, 120, 173, 90, 89, 40, 80, 0, 180, 194, 249, 195, 215, 244, 124, 24, 120, 121, 122, 77, 101, 106, 188, 60, 166, 97, 76, 152, 244, 215, 32, 37, 74, 36, 15, 251, 5, 74, 45, 110, 79, 155, 36, 151, 154, 252, 234, 245, 81, 224, 168, 171, 138, 120, 197, 254, 15, 102, 44, 198, 231, 214, 158, 78, 165, 77, 110, 53, 21, 40, 205, 10, 244, 148, 75, 168, 92, 31, 143, 212, 230, 34, 124, 7, 228, 200, 80, 76, 22, 129, 110, 26, 115, 118, 161, 127, 208, 197, 138, 45, 244, 6, 157, 18, 26, 178, 233, 202, 159, 237, 13, 217, 250, 247, 217, 168, 214, 226, 160, 179, 76, 244, 14, 203, 162, 69, 112, 41, 161, 13, 127, 9, 2, 45, 142, 237, 23, 29, 231, 247, 16, 32, 21, 126, 86, 156, 121, 209, 136, 131, 93, 158, 166, 141, 80, 170, 111, 78, 29, 114, 124, 60, 180, 146, 4, 59, 12, 21, 249, 248, 93, 13, 90, 253, 77, 155, 58, 122, 23, 133, 103, 201, 202, 181, 0, 208, 147, 64, 5, 103, 14, 155, 39, 7, 255, 168, 91, 196, 207, 20, 48, 112, 29, 14, 193, 126, 101, 147, 253, 10, 192, 150, 178, 159, 31, 81, 47, 234, 1, 244, 176, 216, 158, 135, 31, 126, 201, 109, 125, 120, 33, 227, 8, 97, 177, 151, 27, 110, 216, 122, 110, 250, 4, 254, 100, 164, 93, 194, 74, 129, 90, 134, 80, 112, 209, 138, 201, 238, 39, 124, 5, 196, 227, 45, 238, 234, 176, 129, 71, 70, 160, 23, 39, 153, 19, 59, 83, 172, 244, 149, 220, 91, 223, 192, 215, 206, 244, 168, 174, 200, 121, 239, 103, 241, 195, 218, 255, 107, 64, 218, 48, 229, 31, 99, 176, 69, 182, 156, 169, 133, 164, 37, 126, 20, 162, 97, 8, 32, 235, 203, 89, 165, 41, 180, 236, 215, 5, 28, 40, 138, 248, 36, 231, 137, 242, 135, 206, 85, 99, 199, 121, 234, 73, 104, 0, 249, 133, 56, 6, 211, 75, 27, 34, 236, 195, 18, 111, 79, 202, 190, 253, 14, 252, 231, 17, 108, 190, 33, 200, 59, 163, 194, 184, 14, 70, 49, 53, 185, 200, 207, 44, 71, 245, 76, 117, 40, 207, 34, 250, 126, 24, 231, 32, 248, 218, 156, 213, 67, 168, 95, 175, 193, 68, 228, 170, 82, 203, 56, 204, 167, 68, 34, 38, 198, 62, 46, 136, 184, 192, 122, 105, 138, 17, 158, 9, 203, 96, 255, 152, 14, 171, 17, 83, 202, 151, 10, 151, 104, 89, 51, 144, 13, 95, 154, 243, 212, 37, 253, 116, 84, 3, 151, 20, 198, 55, 58, 154, 37, 210, 167, 209, 21, 224, 54, 232, 248, 106, 208, 216, 153, 253, 76, 191, 123, 148, 250, 23, 248, 108, 221, 104, 147, 150, 64, 208, 105, 171, 64, 223, 141, 154, 11, 210, 18, 242, 206, 239, 30, 213, 97, 145, 163, 148, 232, 37, 218, 8, 242, 183, 105, 214, 150, 71, 86, 214, 171, 202, 131, 6, 53, 70, 242, 198, 224, 145, 131, 254, 71, 192, 98, 69, 24, 173, 238, 190, 213, 26, 53, 222, 215, 0, 137, 247, 116, 233, 13, 104, 143, 155, 105, 236, 24, 127, 91, 130, 8, 215, 157, 247, 243, 22, 162, 198, 97, 118, 253, 108, 77, 213, 50, 155, 37, 239, 102, 227, 237, 136, 157, 34, 37, 87, 191, 172, 174, 147, 26, 31, 140, 70, 212, 111, 206, 181, 84, 208, 45, 181, 206, 159, 68, 162, 247, 75, 10, 23, 239, 247, 199, 61, 229, 57, 141, 29, 34, 3, 132, 15, 64, 178, 132, 184, 185, 127, 197, 20, 80, 4, 20, 136, 86, 84, 132, 164, 222, 174, 139, 96, 148, 50, 218, 61, 77, 76, 89, 249, 212, 3, 149, 152, 12, 120, 13, 169, 238, 243, 146, 149, 55, 97, 120, 5, 24, 181, 182, 60, 54, 178, 93, 178, 204, 216, 21, 1, 19, 217, 57, 210, 134, 253, 219, 109, 133, 102, 122, 178, 240, 191, 165, 93, 180, 4, 128, 2, 120, 134, 229, 15, 23, 211, 25, 125, 4, 96, 31, 120, 233, 72, 53, 254, 86, 227, 135, 28, 147, 16, 134, 185, 210, 158, 102, 235, 158, 40, 196, 140, 99, 151, 249, 86, 234, 172, 229, 120, 171, 102, 230, 109, 207, 40, 210, 234, 96, 141, 178, 6, 243, 184, 171, 49, 180, 131, 208, 125, 101, 104, 53, 4, 232, 69, 72, 118, 79, 162, 46, 2, 80, 113, 134, 104, 51, 222, 11, 255, 226, 181, 106, 33, 76, 189, 123, 74, 4, 241, 231, 150, 29, 210, 117, 122, 173, 176, 23, 206, 108, 180, 130, 13, 241, 53, 4, 200, 142, 216, 216, 37, 75, 236, 25, 174, 195, 18, 11, 209, 186, 7, 146, 234, 113, 89, 172, 52, 115, 104, 132, 42, 144, 35, 75, 178, 13, 98, 17, 115, 48, 4, 47, 125, 222, 25, 239, 215, 125, 58, 3, 97, 80, 79, 230, 2, 213, 107, 229, 221, 31, 6, 41, 22, 197, 43, 118, 143, 80, 181, 23, 135, 95, 70, 153, 68, 71, 65, 15, 21, 179, 58, 89, 228, 224, 135, 129, 21, 249, 46, 145, 54, 14, 252, 184, 105, 72, 105, 98, 141, 47, 48, 108, 95, 17, 251, 231, 124, 240, 157, 137, 16, 217, 30, 249, 78, 180, 240, 233, 54, 114, 82, 198, 85, 31, 10, 102, 131, 45, 82, 11, 30, 230, 108, 123, 85, 184, 86, 235, 79, 65, 180, 94, 132, 38, 140, 187, 115, 243, 71, 153, 143, 83, 182, 153, 115, 99, 95, 64, 112, 8, 3, 160, 212, 68, 113, 136, 247, 30, 185, 62, 5, 78, 16, 229, 121, 199, 122, 167, 66, 106, 84, 156, 241, 71, 10, 169, 227, 140, 153, 141, 105, 21, 151, 121, 177, 209, 233, 27, 223, 150, 188, 68, 40, 106, 252, 213, 148, 169, 19, 209, 221, 185, 155, 18, 100, 168, 84, 94, 102, 248, 49, 179, 211, 21, 151, 208, 180, 131, 34, 96, 163, 155, 26, 151, 157, 105, 206, 58, 175, 193, 5, 106, 8, 137, 101, 168, 220, 147, 73, 138, 73, 108, 233, 161, 43, 219, 241, 140, 237, 6, 176, 223, 193, 185, 5, 210, 87, 98, 231, 180, 37, 126, 226, 244, 117, 87, 185, 160, 25, 11, 160, 244, 91, 59, 85, 149, 51, 70, 102, 134, 40, 127, 94, 22, 202, 192, 40, 198, 155, 92, 233, 92, 77, 224, 84, 101, 79, 240, 104, 7, 161, 167, 173, 114, 159, 82, 179, 49, 255, 61, 79, 160, 252, 224, 80, 14, 31, 40, 190, 186, 139, 87, 42, 229, 233, 197, 24, 252, 5, 51, 114, 29, 208, 202, 54, 99, 131, 226, 85, 212, 95, 123, 165, 67, 95, 80, 169, 37, 184, 77, 61, 224, 169, 140, 223, 11, 65, 184, 79, 71, 59, 48, 207, 38, 205, 2, 132, 197, 179, 78, 100, 152, 33, 242, 126, 25, 143, 198, 101, 16, 167, 89, 16, 103, 83, 153, 175, 134, 120, 5, 62, 235, 119, 48, 164, 138, 107, 23, 126, 228, 128, 255, 12, 88, 24, 210, 8, 187, 151, 212, 117, 229, 210, 233, 136, 1, 249, 139, 34, 161, 167, 72, 166, 10, 12, 123, 82, 110, 232, 75, 21, 224, 251, 204, 114, 103, 152, 45, 180, 177, 171, 36, 4, 128, 255, 246, 154, 141, 143, 173, 202, 127, 242, 144, 229, 11, 83, 248, 117, 192, 146, 5, 1, 212, 158, 109, 93, 46, 223, 72, 194, 205, 112, 196, 31, 153, 62, 142, 2, 67, 60, 7, 221, 11, 241, 222, 110, 119, 237, 82, 88, 189, 49, 146, 157, 219, 154, 62, 10, 48, 168, 255, 96, 162, 227, 50, 230, 224, 61, 218, 29, 21, 182, 241, 199, 13, 248, 246, 187, 216, 207, 109, 30, 159, 96, 89, 60, 203, 24, 241, 95, 35, 70, 202, 66, 35, 114, 15, 249, 212, 62, 111, 38, 142, 117, 114, 199, 116, 54, 36, 215, 142, 163, 151, 55, 210, 154, 53, 218, 38, 106, 192, 151, 87, 65, 241, 152, 202, 233, 120, 178, 127, 230, 249, 221, 4, 32, 41, 103, 139, 183, 32, 36, 165, 75, 107, 54, 42, 173, 19, 65, 16, 81, 155, 178, 228, 124, 38, 113, 36, 95, 116, 202, 243, 32, 6, 140, 248, 3, 2, 151, 224, 90, 249, 5, 156, 184, 243, 70, 48, 37, 17, 75, 181, 174, 155, 237, 15, 54, 83, 21, 227, 5, 100, 232, 218, 217, 104, 227, 195, 28, 63, 50, 220, 0, 164, 244, 246, 252, 2, 163, 250, 109, 132, 20, 95, 18, 59, 193, 88, 88, 237, 112, 97, 49, 28, 115, 74, 209, 181, 119, 28, 178, 5, 230, 71, 160, 148, 46, 223, 4, 213, 103, 170, 163, 9, 132, 138, 87, 126, 115, 248, 190, 163, 254, 9, 172, 248, 137, 216, 202, 152, 215, 201, 24, 41, 0, 194, 219, 152, 184, 116, 105, 179, 22, 208, 58, 132, 5, 21, 97, 181, 80, 146, 58, 159, 232, 150, 176, 243, 85, 118, 7, 199, 205, 205, 98, 76, 243, 110, 109, 14, 233, 21, 223, 75, 5, 205, 98, 174, 33, 210, 63, 167, 188, 196, 33, 236, 97, 116, 88, 238, 27, 135, 155, 162, 192, 98, 159, 231, 100, 130, 194, 240, 4, 81, 118, 12, 138, 45, 68, 49, 252, 221, 30, 224, 170, 11, 232, 62, 63, 24, 76, 188, 240, 85, 48, 119, 240, 64, 41, 48, 74, 187, 122, 184, 215, 167, 158, 254, 96, 232, 251, 188, 233, 180, 99, 72, 253, 84, 85, 54, 83, 199, 48, 36, 233, 224, 190, 190, 153, 170, 233, 244, 79, 187, 165, 139, 27, 150, 254, 210, 75, 82, 249, 140, 28, 3, 124, 75, 62, 205, 116, 236, 9, 159, 195, 133, 22, 86, 156, 42, 6, 251, 50, 175, 154, 87, 41, 11, 143, 240, 150, 190, 170, 188, 161, 209, 196, 225, 199, 241, 244, 230, 164, 246, 57, 144, 248, 28, 124, 206, 32, 224, 131, 75, 56, 140, 131, 73, 5, 0, 12, 147, 60, 238, 115, 184, 18, 95, 138, 150, 169, 249, 96, 204, 189, 44, 97, 45, 48, 185, 85, 47, 231, 146, 176, 25, 236, 246, 201, 147, 254, 90, 161, 66, 177, 44, 185, 104, 9, 176, 194, 215, 114, 22, 149, 219, 216, 3, 46, 156, 227, 157, 19, 48, 128, 137, 36, 135, 20, 218, 204, 215, 5, 83, 172, 142, 11, 0, 190, 70, 55, 96, 89, 209, 67, 136, 168, 113, 9, 95, 89, 198, 219, 96, 207, 46, 108, 238, 118, 190, 115, 26, 252, 24, 69, 236, 234, 86, 20, 128, 47, 218, 241, 200, 148, 212, 192, 138, 63, 144, 170, 111, 24, 145, 33, 151, 173, 238, 231, 254, 102, 108, 213, 17, 136, 31, 104, 241, 56, 248, 93, 141, 156, 96, 148, 251, 129, 113, 71, 145, 156, 22, 82, 52, 41, 104, 56, 160, 247, 30, 53, 65, 133, 104, 144, 170, 188, 34, 55, 122, 35, 232, 192, 97, 62, 164, 244, 0, 183, 106, 17, 152, 76, 245, 244, 120, 207, 99, 37, 0, 160, 68, 11, 32, 96, 244, 23, 148, 92, 207, 236, 88, 97, 140, 166, 108, 143, 157, 93, 70, 65, 130, 147, 159, 59, 9, 46, 202, 26, 158, 4, 225, 240, 51, 246, 173, 243, 224, 60, 0, 150, 248, 228, 161, 82, 180, 129, 2, 210, 200, 0, 46, 100, 86, 63, 48, 21, 89, 250, 127, 195, 221, 10, 77, 26, 164, 27, 76, 41, 160, 66, 146, 154, 58, 9, 220, 242, 240, 133, 220, 100, 229, 232, 6, 241, 102, 95, 223, 248, 153, 59, 1, 137, 49, 39, 109, 83, 112, 249, 167, 104, 144, 129, 202, 125, 245, 239, 94, 156, 62, 107, 242, 121, 129, 191, 98, 24, 30, 183, 216, 145, 164, 201, 202, 207, 6, 120, 147, 240, 220, 242, 13, 66, 233, 102, 225, 241, 248, 36, 125, 167, 189, 15, 145, 226, 171, 218, 239, 179, 152, 215, 97, 187, 1, 5, 223, 61, 167, 252, 21, 254, 64, 45, 16, 51, 71, 239, 1, 130, 88, 93, 236, 96, 179, 36, 121, 70, 106, 71, 44, 109, 70, 217, 220, 2, 137, 0, 29, 127, 170, 87, 89, 203, 112, 25, 47, 245, 0, 24, 78, 53, 253, 2, 35, 24, 182, 234, 150, 11, 85, 94, 124, 185, 65, 63, 70, 23, 90, 109, 53, 43, 232, 69, 98, 152, 237, 189, 70, 233, 158, 192, 14, 160, 169, 221, 218, 252, 80, 153, 206, 142, 85, 168, 145, 200, 130, 234, 116, 106, 247, 227, 16, 119, 3, 103, 109, 101, 204, 136, 196, 251, 13, 186, 77, 23, 2, 54, 66, 195, 200, 98, 154, 205, 57, 51, 172, 161, 30, 9, 57, 27, 73, 214, 195, 244, 109, 95, 16, 193, 169, 141, 212, 29, 11, 10, 254, 44, 40, 158, 124, 10, 244, 14, 90, 115, 21, 40, 33, 111, 187, 192, 98, 150, 241, 109, 89, 194, 200, 101, 175, 249, 183, 214, 89, 69, 105, 71, 65, 55, 176, 48, 104, 103, 97, 75, 229, 183, 219, 177, 109, 166, 23, 77, 40, 181, 93, 3, 45, 251, 45, 167, 153, 157, 162, 55, 120, 167, 246, 42, 238, 123, 143, 64, 11, 158, 74, 217, 23, 206, 153, 200, 165, 143, 149, 154, 100, 98, 213, 205, 221, 55, 164, 240, 37, 113, 151, 181, 245, 95, 199, 55, 147, 64, 73, 247, 131, 39, 144, 68, 50, 192, 245, 122, 18, 200, 154, 151, 235, 185, 158, 84, 191, 107, 45, 215, 167, 165, 46, 58, 146, 203, 63, 147, 15, 44, 220, 16, 149, 23, 184, 5, 48, 233, 80, 193, 80, 26, 92, 118, 45, 148, 54, 177, 128, 254, 58, 210, 160, 209, 47, 61, 69, 153, 29, 12, 129, 40, 4, 47, 35, 34, 112, 199, 186, 58, 203, 149, 67, 32, 85, 203, 56, 107, 171, 130, 90, 218, 219, 9, 133, 215, 140, 108, 152, 236, 58, 17, 41, 201, 109, 28, 29, 241, 252, 176, 178, 248, 158, 50, 30, 148, 82, 224, 225, 111, 143, 211, 135, 249, 210, 131, 64, 30, 219, 238, 88, 70, 142, 146, 84, 49, 102, 163, 116, 2, 73, 35, 55, 17, 112, 19, 194, 4, 168, 178, 171, 152, 149, 221, 67, 209, 140, 19, 247, 165, 165, 198, 61, 96, 93, 174, 199, 85, 183, 98, 183, 237, 70, 234, 78, 255, 70, 52, 87, 213, 225, 6, 122, 29, 83, 136, 230, 45, 47, 26, 12, 77, 112, 185, 109, 123, 170, 135, 189, 182, 36, 24, 104, 206, 175, 29, 191, 35, 40, 87, 63, 29, 236, 72, 28, 58, 147, 101, 36, 68, 44, 162, 165, 209, 206, 73, 79, 158, 92, 148, 176, 73, 247, 255, 95, 140, 128, 58, 210, 179, 39, 140, 100, 223, 91, 58, 88, 157, 23, 183, 156, 58, 14, 131, 59, 135, 141, 173, 248, 26, 161, 72, 242, 173, 154, 112, 119, 243, 163, 85, 139, 54, 227, 231, 255, 89, 234, 13, 145, 86, 254, 177, 53, 87, 155, 69, 17, 156, 129, 147, 73, 80, 15, 234, 39, 157, 105, 0, 220, 216, 117, 222, 2, 168, 224, 152, 248, 117, 0, 247, 247, 164, 30, 178, 190, 134, 66, 87, 106, 5, 22, 231, 103, 81, 12, 200, 57, 128, 46, 177, 74, 65, 128, 66, 124, 17, 165, 92, 27, 177, 226, 106, 141, 254, 17, 42, 118, 78, 141, 68, 147, 36, 155, 43, 119, 139, 97, 176, 183, 125, 122, 230, 245, 85, 230, 46, 23, 224, 171, 242, 24, 218, 199, 86, 1, 6, 188, 59, 221, 169, 50, 151, 86, 15, 125, 68, 82, 201, 37, 252, 225, 0, 77, 45, 14, 139, 28, 141, 224, 22, 231, 201, 74, 114, 62, 244, 254, 104, 99, 175, 88, 69, 27, 84, 115, 156, 235, 220, 18, 54, 81, 221, 152, 200, 16, 125, 119, 86, 14, 163, 159, 97, 198, 46, 149, 109, 63, 50, 40, 191, 162, 71, 251, 14, 215, 28, 202, 101, 216, 225, 130, 18, 74, 61, 233, 143, 96, 154, 35, 99, 87, 153, 187, 98, 2, 59, 200, 27, 191, 169, 92, 206, 170, 193, 83, 122, 247, 227, 191, 147, 175, 225, 245, 230, 115, 125, 110, 248, 118, 4, 80, 214, 107, 91, 236, 221, 233, 86, 201, 172, 69, 191, 69, 191, 17, 232, 141, 250, 12, 196, 19, 90, 80, 106, 87, 29, 64, 72, 81, 236, 112, 215, 191, 76, 118, 88, 174, 193, 149, 55, 208, 190, 159, 31, 25, 187, 46, 112, 85, 205, 59, 208, 11, 45, 239, 189, 65, 133, 79, 106, 52, 191, 56, 50, 199, 191, 37, 92, 118, 31, 140, 188, 14, 78, 232, 235, 68, 3, 207, 23, 127, 20, 62, 237, 54, 45, 95, 236, 71, 217, 55, 121, 196, 17, 237, 142, 24, 199, 85, 249, 83, 18, 149, 208, 111, 227, 3, 120, 229, 39, 167, 28, 194, 24, 134, 143, 173, 186, 71, 33, 245, 22, 161, 153, 181, 49, 52, 25, 29, 16, 183, 221, 76, 130, 2, 142, 123, 108, 154, 116, 12, 132, 21, 141, 241, 124, 249, 67, 70, 151, 102, 202, 109, 177, 181, 111, 80, 46, 221, 58, 150, 150, 29, 189, 74, 76, 102, 205, 255, 111, 100, 115, 242, 187, 190, 95, 142, 102, 12, 250, 21, 18, 123, 80, 38, 234, 249, 63, 77, 112, 40, 202, 187, 23, 176, 104, 240, 62, 0, 105, 220, 232, 177, 187, 80, 154, 215, 1, 68, 68, 122, 106, 141, 17, 115, 53, 43, 14, 50, 41, 50, 179, 160, 106, 146, 99, 64, 143, 152, 169, 105, 50, 194, 147, 149, 204, 165, 252, 24, 200, 236, 48, 174, 16, 192, 88, 170, 148, 189, 153, 130, 118, 44, 38, 110, 208, 95, 191, 3, 164, 129, 120, 1, 18, 206, 31, 147, 13, 51, 28, 194, 112, 194, 133, 115, 240, 45, 215, 20, 173, 32, 101, 67, 227, 112, 197, 121, 192, 225, 76, 32, 119, 28, 214, 171, 181, 240, 146, 48, 173, 173, 34, 189, 212, 88, 63, 8, 154, 95, 234, 225, 228, 52, 2, 105, 35, 134, 191, 155, 52, 242, 222, 0, 130, 80, 115, 59, 244, 114, 41, 38, 238, 138, 42, 56, 121, 111, 254, 137, 18, 104, 56, 152, 41, 92, 125, 206, 62, 107, 234, 59, 149, 38, 200, 148, 28, 101, 162, 144, 12, 64, 212, 193, 231, 90, 39, 44, 103, 1, 91, 36, 33, 159, 255, 19, 140, 69, 91, 11, 83, 165, 78, 211, 85, 190, 70, 71, 21, 20, 9, 186, 124, 191, 122, 69, 91, 227, 25, 180, 30, 13, 0, 245, 130, 253, 189, 227, 252, 168, 102, 116, 195, 177, 22, 6, 216, 116, 243, 253, 163, 248, 19, 217, 194, 81, 222, 1, 28, 91, 19, 110, 96, 120, 241, 51, 159, 175, 94, 235, 75, 182, 204, 108, 1, 143, 201, 166, 101, 10, 158, 147, 119, 246, 238, 42, 73, 203, 130, 60, 15, 34, 217, 97, 145, 178, 71, 34, 210, 255, 137, 174, 16, 144, 198, 74, 125, 92, 89, 216, 131, 16, 245, 4, 203, 27, 147, 242, 253, 28, 135, 190, 151, 16, 246, 247, 26, 76, 51, 190, 56, 114, 12, 219, 156, 244, 159, 103, 33, 218, 93, 124, 255, 194, 112, 172, 124, 166, 58, 24, 28, 173, 49, 231, 149, 46, 146, 123, 183, 98, 141, 150, 184, 41, 227, 17, 149, 120, 165, 144, 230, 113, 224, 236, 59, 134, 20, 223, 91, 80, 70, 133, 179, 247, 53, 111, 241, 11, 117, 228, 96, 35, 248, 134, 122, 62, 61, 28, 251, 180, 68, 248, 218, 140, 137, 184, 78, 172, 74, 247, 50, 134, 87, 227, 171, 30, 45, 202, 165, 152, 15, 91, 236, 55, 76, 133, 39, 171, 183, 149, 88, 198, 9, 119, 90, 174, 250, 128, 103, 4, 48, 119, 148, 219, 151, 8, 164, 93, 20, 24, 145, 85, 122, 236, 194, 17, 58, 196, 188, 121, 140, 158, 144, 217, 125, 111, 2, 199, 64, 59, 168, 169, 133, 54, 221, 250, 3, 54, 44, 55, 64, 151, 69, 147, 95, 151, 91, 133, 106, 204, 38, 21, 54, 114, 203, 169, 90, 123, 134, 187, 199, 243, 153, 90, 127, 222, 82, 242, 192, 193, 209, 17, 156, 110, 15, 229, 215, 24, 205, 179, 66, 138, 186, 54, 32, 104, 181, 164, 46, 72, 75, 143, 174, 212, 163, 180, 126, 122, 239, 241, 232, 66, 110, 0, 149, 109, 14, 210, 159, 28, 3, 81, 33, 78, 233, 99, 240, 231, 217, 27, 87, 137, 25, 174, 227, 56, 226, 102, 202, 230, 73, 225, 77, 172, 102, 4, 232, 112, 240, 255, 209, 115, 80, 212, 91, 221, 151, 134, 42, 191, 26, 97, 101, 102, 23, 3, 137, 198, 166, 37, 224, 13, 173, 186, 155, 97, 172, 209, 62, 23, 242, 31, 2, 87, 109, 39, 55, 201, 87, 220, 24, 237, 163, 51, 102, 79, 244, 170, 135, 196, 114, 230, 247, 123, 141, 29, 95, 117, 208, 16, 24, 228, 58, 12, 44, 154, 15, 206, 241, 182, 207, 126, 104, 227, 44, 31, 139, 117, 116, 66, 244, 254, 50, 15, 140, 19, 14, 72, 231, 253, 29, 243, 254, 188, 171, 105, 93, 116, 160, 42, 143, 16, 177, 68, 251, 94, 245, 100, 178, 122, 94, 122, 77, 176, 212, 177, 193, 222, 98, 3, 137, 96, 21, 76, 154, 250, 48, 241, 130, 134, 44, 200, 91, 103, 75, 67, 200, 200, 124, 55, 228, 85, 148, 16, 7, 200, 158, 250, 184, 83, 244, 185, 206, 214, 172, 253, 7, 212, 195, 114, 5, 32, 198, 107, 36, 15, 86, 25, 110, 242, 37, 248, 18, 152, 171, 42, 2, 236, 5, 224, 35, 195, 57, 30, 115, 218, 99, 191, 72, 179, 246, 47, 82, 122, 142, 111, 154, 61, 28, 180, 151, 17, 252, 29, 225, 117, 60, 137, 96, 65, 223, 100, 72, 81, 88, 72, 121, 119, 163, 204, 124, 77, 223, 93, 124, 44, 16, 211, 66, 38, 190, 157, 99, 228, 67, 108, 5, 47, 75, 130, 78, 165, 154, 176, 249, 247, 54, 41, 221, 225, 97, 93, 208, 161, 154, 115, 212, 255, 69, 47, 40, 153, 99, 222, 22, 241, 169, 247, 121, 14, 180, 4, 91, 1, 221, 168, 215, 188, 22, 233, 60, 111, 113, 184, 7, 247, 147, 148, 2, 116, 16, 251, 191, 22, 16, 109, 52, 192, 180, 160, 41, 51, 51, 164, 142, 48, 11, 149, 62, 157, 139, 115, 187, 33, 234, 222, 113, 218, 183, 54, 51, 209, 16, 213, 165, 57, 200, 18, 179, 137, 19, 134, 195, 137, 254, 169, 100, 188, 190, 90, 159, 67, 38, 218, 124, 175, 28, 249, 16, 221, 103, 58, 156, 103, 13, 16, 198, 144, 103, 139, 124, 63, 252, 234, 193, 63, 177, 81, 171, 85, 89, 155, 176, 72, 113, 236, 17, 37, 47, 108, 92, 65, 131, 151, 11, 196, 172, 18, 20, 222, 224, 85, 116, 70, 227, 191, 4, 126, 73, 109, 100, 41, 1, 229, 0, 221, 169, 117, 113, 85, 86, 86, 13, 68, 10, 7, 44, 222, 183, 197, 72, 8, 15, 178, 188, 135, 118, 179, 161, 245, 19, 16, 93, 206, 225, 98, 161, 57, 39, 5, 45, 130, 61, 62, 82, 42, 80, 230, 122, 150, 46, 191, 23, 252, 112, 11, 145, 172, 214, 114, 30, 111, 91, 203, 5, 136, 206, 247, 11, 57, 190, 100, 182, 18, 52, 87, 196, 96, 87, 40, 188, 73, 79, 238, 112, 185, 189, 191, 164, 27, 143, 170, 43, 251, 148, 152, 188, 96, 31, 237, 1, 135, 94, 139, 164, 51, 157, 64, 198, 196, 65, 219, 126, 207, 54, 122, 141, 62, 141, 90, 123, 233, 70, 240, 1, 11, 37, 196, 103, 80, 242, 112, 189, 17, 247, 88, 214, 220, 44, 42, 136, 88, 244, 78, 87, 156, 217, 42, 7, 32, 152, 143, 10, 111, 170, 6, 209, 116, 188, 164, 132, 115, 84, 83, 193, 251, 192, 14, 185, 33, 34, 17, 130, 18, 155, 55, 146, 205, 168, 158, 51, 250, 135, 75, 255, 146, 163, 196, 191, 158, 251, 67, 44, 206, 226, 179, 189, 174, 215, 51, 78, 84, 123, 160, 127, 230, 137, 141, 42, 223, 214, 169, 52, 142, 246, 140, 221, 79, 130, 240, 96, 142, 87, 254, 130, 215, 123, 227, 16, 228, 238, 63, 51, 164, 75, 163, 129, 18, 249, 82, 241, 130, 113, 67, 84, 252, 88, 27, 8, 233, 216, 108, 104, 253, 226, 103, 250, 119, 123, 246, 18, 83, 5, 79, 113, 233, 45, 97, 41, 171, 242, 198, 125, 28, 103, 181, 70, 153, 23, 202, 90, 145, 27, 245, 103, 249, 72, 121, 187, 245, 160, 45, 81, 224, 156, 141, 64, 203, 249, 43, 213, 181, 120, 178, 178, 29, 128, 1, 242, 221, 75, 190, 103, 219, 148, 66, 213, 106, 106, 1, 94, 62, 42, 251, 14, 105, 82, 185, 171, 141, 157, 227, 211, 152, 157, 25, 146, 96, 192, 180, 26, 239, 34, 203, 154, 99, 117, 5, 127, 252, 189, 111, 35, 49, 89, 244, 203, 43, 71, 81, 215, 221, 197, 168, 192, 229, 193, 34, 234, 40, 23, 215, 167, 98, 236, 153, 252, 59, 208, 164, 8, 66, 168, 76, 118, 209, 156, 119, 186, 218, 60, 5, 235, 243, 29, 21, 188, 75, 172, 245, 158, 75, 194, 230, 233, 178, 87, 6, 85, 67, 201, 108, 170, 170, 45, 251, 223, 44, 230, 55, 78, 87, 96, 93, 255, 165, 120, 83, 186, 221, 244, 155, 35, 38, 142, 107, 205, 90, 243, 233, 185, 108, 231, 133, 196, 51, 79, 241, 84, 196, 132, 193, 60, 237, 26, 59, 224, 40, 74, 88, 130, 74, 162, 60, 151, 37, 27, 108, 153, 237, 102, 71, 158, 105, 34, 36, 105, 32, 221, 173, 216, 25, 46, 84, 112, 166, 16, 3, 186, 150, 11, 87, 85, 41, 125, 223, 42, 134, 35, 207, 102, 164, 106, 215, 188, 28, 3, 191, 100, 187, 215, 48, 226, 128, 207, 15, 10, 106, 150, 119, 145, 186, 102, 131, 174, 23, 231, 144, 76, 97, 134, 96, 131, 16, 0, 118, 180, 156, 206, 186, 191, 182, 187, 243, 187, 248, 123, 171, 96, 136, 45, 119, 175, 8, 57, 48, 201, 237, 189, 29, 152, 25, 102, 155, 30, 1, 111, 167, 120, 9, 245, 223, 164, 122, 106, 107, 16, 222, 245, 30, 168, 219, 75, 5, 76, 247, 223, 43, 146, 122, 212, 165, 212, 230, 111, 52, 194, 123, 183, 110, 35, 248, 81, 210, 32, 87, 67, 99, 202, 232, 4, 200, 240, 82, 38, 15, 149, 157, 145, 192, 58, 39, 91, 11, 1, 136, 68, 159, 160, 165, 172, 22, 145, 148, 41, 130, 4, 127, 8, 133, 60, 154, 131, 44, 246, 80, 3, 88, 183, 239, 92, 116, 241, 51, 139, 79, 29, 20, 53, 13, 217, 5, 171, 114, 92, 169, 49, 128, 60, 71, 8, 177, 199, 200, 190, 73, 185, 83, 138, 166, 17, 187, 145, 99, 232, 218, 246, 235, 132, 202, 172, 190, 128, 155, 174, 34, 187, 63, 96, 138, 98, 235, 156, 69, 2, 119, 216, 80, 190, 46, 228, 44, 153, 217, 192, 178, 166, 5, 62, 195, 173, 41, 234, 132, 217, 201, 231, 119, 91, 238, 182, 152, 12, 40, 136, 176, 254, 116, 130, 164, 119, 107, 124, 172, 141, 226, 142, 183, 44, 223, 143, 72, 225, 188, 235, 27, 224, 35, 66, 25, 45, 87, 167, 116, 78, 234, 237, 137, 238, 148, 18, 19, 63, 111, 219, 192, 79, 228, 230, 171, 208, 240, 51, 61, 175, 251, 171, 87, 69, 23, 239, 240, 185, 223, 116, 77, 116, 170, 87, 239, 68, 101, 144, 16, 195, 46, 61, 0, 96, 250, 7, 93, 197, 140, 152, 26, 91, 108, 26, 89, 145, 121, 27, 255, 118, 73, 220, 231, 184, 141, 123, 30, 111, 57, 223, 19, 135, 100, 143, 194, 71, 35, 123, 109, 214, 183, 136, 48, 145, 196, 55, 92, 140, 50, 3, 238, 31, 103, 254, 23, 59, 5, 58, 227, 50, 244, 235, 191, 156, 18, 35, 12, 76, 234, 179, 14, 250, 192, 75, 83, 128, 34, 135, 212, 207, 195, 82, 111, 190, 176, 68, 97, 119, 189, 243, 112, 24, 103, 28, 173, 255, 79, 21, 40, 148, 182, 35, 195, 145, 93, 86, 120, 106, 90, 4, 242, 186, 233, 84, 9, 36, 104, 67, 36, 233, 34, 59, 159, 179, 79, 182, 113, 157, 126, 37, 36, 47, 112, 91, 217, 81, 187, 246, 36, 124, 75, 27, 90, 107, 201, 215, 253, 125, 189, 168, 45, 236, 103, 220, 129, 207, 117, 156, 185, 30, 31, 168, 96, 131, 123, 103, 52, 224, 246, 116, 71, 76, 114, 182, 42, 176, 69, 141, 195, 89, 72, 137, 7, 237, 85, 42, 212, 108, 201, 127, 194, 195, 90, 214, 145, 202, 186, 171, 171, 109, 141, 244, 121, 81, 187, 16, 126, 199, 14, 38, 18, 178, 72, 87, 117, 110, 202, 125, 179, 56, 147, 72, 200, 175, 206, 248, 22, 173, 144, 72, 188, 165, 195, 90, 140, 32, 253, 183, 212, 213, 183, 112, 229, 246, 22, 150, 178, 170, 13, 123, 61, 51, 202, 55, 46, 82, 27, 77, 130, 108, 66, 83, 48, 154, 231, 193, 197, 34, 138, 187, 224, 89, 110, 62, 45, 238, 252, 34, 178, 173, 47, 183, 232, 50, 234, 252, 52, 214, 85, 83, 219, 79, 150, 84, 30, 151, 41, 87, 44, 247, 65, 32, 191, 151, 44, 131, 174, 173, 95, 87, 104, 59, 168, 35, 234, 246, 189, 128, 42, 160, 134, 84, 179, 138, 168, 9, 109, 180, 184, 116, 39, 118, 43, 113, 232, 220, 149, 135, 105, 21, 93, 78, 71, 92, 65, 151, 61, 221, 94, 73, 199, 166, 134, 114, 135, 7, 228, 79, 124, 231, 52, 171, 111, 239, 198, 41, 130, 197, 141, 225, 95, 149, 34, 225, 102, 166, 219, 200, 16, 102, 162, 71, 194, 6, 217, 131, 135, 154, 134, 239, 62, 145, 81, 144, 70, 23, 193, 21, 131, 54, 42, 32, 61, 108, 78, 151, 25, 11, 169, 230, 36, 180, 12, 226, 28, 215, 254, 3, 179, 115, 67, 207, 217, 193, 7, 25, 217, 153, 98, 251, 184, 215, 202, 89, 187, 34, 43, 50, 38, 13, 211, 179, 17, 27, 111, 18, 48, 32, 7, 34, 16, 90, 166, 8, 249, 42, 35, 33, 162, 197, 220, 219, 20, 73, 74, 117, 209, 82, 86, 130, 42, 212, 88, 4, 233, 110, 141, 112, 208, 178, 149, 141, 246, 13, 104, 119, 105, 103, 229, 82, 95, 134, 70, 99, 30, 20, 182, 33, 126, 179, 80, 95, 200, 75, 14, 254, 31, 17, 69, 79, 55, 18, 238, 157, 78, 166, 126, 42, 50, 145, 70, 76, 139, 101, 193, 154, 74, 96, 182, 77, 249, 58, 144, 245, 8, 205, 216, 23, 95, 85, 168, 99, 29, 145, 227, 180, 238, 180, 117, 241, 120, 241, 63, 214, 150, 19, 143, 187, 4, 121, 48, 216, 39, 116, 65, 123, 86, 112, 244, 106, 215, 54, 20, 181, 113, 36, 6, 165, 192, 59, 30, 11, 237, 159, 78, 208, 220, 234, 250, 235, 49, 135, 123, 23, 47, 224, 92, 122, 153, 103, 142, 251, 222, 33, 221, 7, 241, 3, 218, 42, 144, 192, 23, 167, 237, 33, 69, 58, 79, 7, 59, 128, 184, 87, 69, 135, 171, 248, 124, 45, 187, 54, 178, 106, 172, 184, 77, 30, 61, 189, 164, 131, 40, 166, 252, 115, 97, 113, 19, 40, 238, 89, 192, 182, 73, 195, 22, 134, 70, 36, 30, 195, 66, 44, 235, 122, 197, 123, 61, 22, 11, 114, 147, 6, 253, 36, 255, 252, 41, 196, 179, 196, 141, 150, 24, 33, 117, 202, 174, 126, 41, 182, 108, 18, 39, 46, 229, 93, 177, 230, 66, 242, 34, 90, 185, 86, 149, 196, 161, 245, 101, 191, 188, 201, 108, 147, 98, 29, 174, 23, 70, 103, 30, 78, 193, 252, 113, 11, 139, 242, 100, 79, 29, 92, 48, 207, 113, 136, 189, 226, 215, 237, 212, 101, 198, 117, 48, 86, 69, 213, 34, 121, 132, 1, 50, 196, 66, 106, 237, 47, 186, 216, 177, 119, 45, 8, 69, 202, 187, 51, 80, 42, 21, 22, 101, 250, 6, 126, 37, 162, 26, 28, 142, 150, 254, 226, 49, 15, 200, 173, 135, 71, 213, 122, 132, 221, 228, 96, 82, 180, 10, 219, 28, 255, 250, 1, 225, 151, 4, 244, 87, 215, 45, 187, 24, 57, 248, 246, 76, 57, 59, 187, 189, 248, 5, 95, 197, 210, 96, 46, 75, 151, 177, 229, 254, 251, 74, 96, 73, 163, 117, 21, 247, 150, 34, 219, 237, 191, 113, 94, 181, 164, 187, 67, 24, 78, 220, 130, 146, 75, 175, 26, 108, 151, 101, 68, 189, 209, 39, 48, 17, 194, 208, 183, 94, 126, 55, 107, 245, 204, 111, 47, 176, 227, 28, 54, 165, 241, 170, 115, 14, 135, 117, 239, 62, 230, 82, 35, 162, 7, 225, 184, 102, 199, 110, 174, 110, 96, 160, 68, 204, 246, 77, 112, 82, 28, 142, 188, 160, 212, 37, 97, 52, 16, 94, 43, 179, 154, 89, 209, 66, 12, 224, 105, 102, 28, 28, 174, 3, 134, 74, 142, 158, 183, 154, 237, 113, 175, 254, 79, 103, 127, 232, 28, 189, 159, 20, 53, 81, 169, 65, 107, 82, 61, 197, 4, 14, 43, 73, 145, 38, 38, 207, 148, 109, 56, 35, 40, 76, 168, 146, 77, 204, 79, 76, 2, 111, 252, 43, 106, 96, 122, 210, 156, 124, 229, 50, 129, 83, 29, 5, 145, 189, 94, 84, 61, 56, 72, 132, 136, 221, 213, 107, 190, 214, 141, 219, 237, 102, 60, 208, 225, 109, 48, 87, 13, 214, 185, 158, 92, 96, 76, 52, 234, 94, 19, 133, 244, 206, 118, 98, 185, 141, 109, 127, 89, 213, 221, 117, 126, 54, 178, 199, 27, 199, 211, 60, 141, 213, 54, 38, 73, 233, 101, 196, 209, 85, 203, 15, 220, 172, 27, 184, 170, 215, 168, 94, 95, 133, 161, 71, 229, 94, 27, 191, 176, 134, 103, 57, 132, 190, 39, 144, 197, 252, 103, 205, 235, 214, 78, 74, 188, 214, 110, 190, 147, 165, 92, 12, 232, 5, 149, 219, 77, 135, 93, 14, 123, 211, 39, 38, 70, 99, 20, 172, 174, 243, 215, 68, 50, 220, 42, 70, 141, 36, 12, 128, 123, 229, 174, 165, 171, 254, 13, 216, 184, 145, 194, 24, 6, 120, 196, 48, 209, 234, 56, 16, 141, 218, 36, 170, 86, 63, 198, 166, 140, 121, 119, 27, 214, 179, 79, 117, 250, 83, 54, 209, 227, 63, 238, 92, 77, 183, 62, 14, 43, 60, 203, 109, 139, 92, 57, 240, 10, 32, 63, 77, 211, 4, 148, 107, 157, 133, 107, 237, 203, 63, 80, 231, 65, 151, 177, 249, 204, 246, 60, 95, 153, 236, 202, 103, 214, 201, 14, 98, 56, 37, 47, 135, 173, 123, 171, 29, 32, 3, 192, 238, 7, 224, 61, 58, 92, 239, 21, 96, 244, 125, 158, 70, 28, 178, 46, 36, 95, 219, 21, 195, 119, 85, 139, 85, 149, 253, 139, 137, 82, 232, 225, 3, 130, 159, 232, 137, 145, 78, 143, 107, 153, 104, 253, 133, 122, 11, 193, 191, 25, 2, 162, 113, 180, 106, 95, 171, 196, 248, 85, 254, 117, 228, 79, 220, 118, 47, 9, 47, 183, 215, 246, 140, 40, 18, 102, 182, 75, 227, 49, 206, 7, 104, 218, 7, 222, 238, 7, 100, 238, 167, 81, 120, 47, 21, 100, 37, 100, 9, 36, 84, 186, 155, 96, 133, 93, 232, 171, 188, 118, 93, 130, 46, 173, 190, 2, 126, 192, 68, 44, 101, 115, 253, 207, 169, 184, 177, 77, 10, 235, 86, 19, 5, 117, 244, 23, 139, 254, 71, 213, 104, 8, 185, 185, 152, 128, 84, 106, 130, 180, 10, 26, 131, 172, 20, 224, 158, 60, 38, 39, 75, 43, 142, 189, 208, 105, 54, 147, 155, 90, 232, 240, 155, 72, 160, 159, 233, 135, 164, 82, 26, 125, 244, 181, 178, 27, 131, 137, 121, 238, 243, 55, 90, 126, 119, 208, 33, 87, 180, 163, 217, 45, 189, 17, 102, 85, 54, 227, 164, 187, 43, 222, 9, 60, 196, 111, 74, 67, 77, 196, 255, 136, 55, 158, 107, 77, 110, 107, 248, 52, 76, 8, 12, 118, 206, 139, 91, 17, 88, 250, 6, 242, 222, 194, 126, 178, 240, 138, 67, 28, 21, 46, 81, 173, 242, 128, 90, 198, 186, 121, 231, 237, 86, 86, 217, 72, 237, 44, 39, 41, 24, 91, 194, 86, 177, 24, 250, 59, 28, 70, 50, 60, 34, 227, 217, 124, 124, 58, 64, 209, 148, 17, 109, 174, 48, 125, 211, 162, 52, 176, 211, 16, 165, 116, 92, 104, 131, 29, 41, 85, 181, 135, 234, 59, 209, 233, 99, 111, 137, 188, 118, 207, 64, 15, 251, 111, 135, 193, 53, 215, 125, 171, 67, 142, 72, 114, 55, 79, 202, 72, 166, 246, 45, 15, 66, 127, 128, 30, 209, 202, 130, 179, 27, 160, 159, 97, 56, 232, 41, 17, 113, 120, 60, 39, 65, 228, 172, 49, 177, 35, 22, 56, 102, 157, 0, 3, 184, 247, 46, 194, 208, 136, 96, 226, 197, 176, 107, 180, 239, 153, 106, 165, 65, 186, 145, 98, 247, 8, 182, 133, 142, 229, 216, 149, 35, 220, 68, 152, 211, 241, 16, 28, 9, 105, 254, 9, 197, 66, 193, 186, 31, 234, 128, 31, 52, 163, 176, 116, 8, 134, 207, 165, 66, 64, 82, 94, 88, 69, 249, 155, 108, 115, 21, 32, 177, 3, 80, 165, 22, 26, 150, 150, 111, 191, 151, 66, 203, 37, 89, 232, 132, 38, 63, 167, 76, 244, 61, 31, 52, 7, 16, 68, 119, 255, 186, 56, 34, 37, 197, 241, 210, 35, 23, 156, 129, 43, 146, 251, 110, 118, 119, 50, 253, 152, 238, 180, 158, 119, 238, 117, 0, 205, 8, 138, 231, 126, 98, 42, 192, 165, 62, 184, 155, 59, 26, 238, 222, 6, 47, 33, 125, 184, 191, 4, 89, 3, 188, 104, 18, 15, 190, 39, 31, 219, 87, 107, 223, 183, 206, 95, 71, 181, 169, 63, 141, 222, 208, 142, 70, 39, 16, 178, 224, 142, 42, 244, 114, 127, 26, 183, 108, 210, 145, 179, 221, 232, 54, 12, 241, 107, 94, 197, 68, 208, 171, 62, 108, 232, 247, 23, 67, 84, 93, 52, 0, 190, 240, 122, 79, 71, 12, 224, 22, 208, 173, 91, 234, 26, 159, 35, 52, 43, 243, 135, 76, 177, 15, 68, 179, 239, 161, 128, 101, 207, 61, 227, 122, 1, 46, 155, 239, 89, 254, 15, 81, 253, 155, 12, 88, 28, 167, 192, 221, 98, 118, 81, 131, 125, 181, 90, 147, 227, 113, 175, 179, 196, 61, 203, 103, 114, 132, 53, 230, 123, 173, 177, 4, 119, 68, 98, 27, 124, 220, 88, 176, 44, 225, 121, 195, 172, 76, 226, 30, 111, 23, 110, 195, 153, 12, 39, 250, 134, 242, 82, 58, 92, 85, 165, 109, 76, 211, 126, 171, 121, 128, 8, 3, 212, 143, 179, 251, 202, 19, 80, 70, 0, 112, 178, 56, 148, 14, 1, 206, 50, 154, 191, 245, 155, 132, 63, 60, 172, 142, 31, 220, 87, 57, 235, 250, 240, 67, 113, 133, 210, 230, 102, 157, 91, 13, 197, 112, 57, 7, 117, 145, 60, 87, 172, 187, 243, 15, 220, 80, 188, 186, 77, 117, 152, 17, 105, 7, 164, 134, 105, 180, 213, 48, 47, 81, 129, 72, 188, 156, 47, 86, 247, 53, 142, 71, 177, 194, 21, 124, 30, 246, 68, 31, 242, 111, 211, 16, 152, 195, 198, 61, 99, 210, 6, 238, 23, 100, 204, 227, 208, 73, 250, 152, 18, 154, 246, 48, 64, 224, 82, 137, 153, 54, 87, 185, 144, 54, 160, 188, 133, 150, 211, 95, 202, 147, 131, 56, 159, 53, 180, 179, 59, 146, 36, 180, 193, 7, 111, 113, 104, 227, 184, 126, 234, 183, 85, 185, 131, 237, 100, 158, 108, 95, 221, 113, 171, 10, 221, 175, 255, 31, 138, 163, 250, 149, 165, 157, 251, 123, 42, 131, 189, 172, 83, 110, 177, 214, 82, 108, 1, 76, 56, 65, 59, 115, 92, 191, 177, 173, 144, 223, 179, 9, 168, 128, 54, 203, 92, 14, 123, 224, 124, 125, 223, 49, 159, 209, 139, 191, 207, 89, 37, 121, 101, 65, 160, 115, 106, 153, 71, 69, 3, 241, 123, 199, 119, 152, 103, 67, 115, 106, 43, 108, 172, 24, 184, 188, 159, 176, 43, 182, 22, 207, 72, 125, 178, 73, 201, 57, 211, 230, 234, 58, 92, 54, 18, 179, 110, 65, 62, 135, 118, 11, 240, 25, 62, 72, 113, 122, 82, 105, 185, 101, 152, 176, 217, 44, 231, 108, 59, 90, 115, 115, 15, 74, 31, 125, 2, 238, 221, 76, 207, 244, 178, 17, 92, 82, 245, 84, 194, 34, 126, 84, 45, 88, 136, 121, 181, 87, 158, 123, 254, 27, 34, 25, 255, 66, 10, 14, 25, 205, 41, 202, 78, 89, 164, 231, 168, 146, 182, 208, 219, 192, 28, 114, 74, 195, 55, 192, 76, 96, 108, 170, 242, 153, 181, 116, 154, 101, 223, 227, 176, 221, 74, 25, 127, 127, 193, 124, 209, 32, 174, 14, 232, 108, 27, 159, 60, 4, 226, 5, 59, 232, 215, 242, 15, 192, 96, 144, 58, 232, 150, 214, 215, 189, 231, 146, 81, 56, 238, 156, 204, 2, 212, 135, 178, 6, 154, 23, 165, 241, 143, 131, 18, 82, 49, 203, 73, 140, 39, 21, 246, 1, 88, 126, 68, 189, 85, 82, 190, 168, 22, 102, 124, 186, 136, 39, 93, 254, 40, 64, 202, 34, 107, 105, 182, 234, 11, 222, 83, 175, 23, 213, 144, 71, 71, 42, 26, 122, 161, 12, 174, 220, 95, 245, 78, 242, 154, 110, 99, 82, 69, 184, 145, 245, 26, 168, 236, 27, 20, 74, 241, 205, 248, 240, 95, 99, 36, 6, 113, 39, 210, 77, 104, 234, 43, 195, 244, 245, 36, 80, 62, 221, 81, 242, 22, 17, 136, 40, 28, 11, 190, 182, 175, 29, 60, 176, 54, 172, 32, 29, 27, 79, 182, 187, 82, 233, 230, 106, 154, 66, 47, 253, 112, 48, 228, 139, 20, 227, 239, 77, 100, 140, 184, 28, 7, 93, 30, 77, 1, 168, 24, 177, 44, 210, 64, 37, 58, 234, 34, 86, 205, 219, 16, 10, 214, 91, 147, 156, 119, 216, 253, 130, 73, 189, 86, 255, 221, 243, 204, 77, 153, 182, 127, 24, 145, 206, 127, 213, 121, 152, 249, 109, 189, 101, 122, 105, 164, 140, 216, 17, 53, 71, 193, 244, 140, 255, 173, 135, 57, 87, 241, 11, 152, 221, 231, 225, 216, 214, 240, 58, 222, 213, 219, 177, 46, 174, 157, 91, 130, 213, 157, 48, 21, 82, 130, 23, 22, 128, 20, 70, 122, 131, 241, 79, 41, 81, 92, 196, 139, 208, 40, 152, 171, 86, 68, 248, 151, 65, 130, 138, 209, 80, 39, 156, 205, 0, 249, 177, 127, 83, 160, 131, 183, 6, 54, 66, 215, 59, 40, 1, 26, 27, 8, 221, 228, 104, 233, 92, 194, 215, 148, 245, 41, 47, 147, 246, 113, 225, 201, 189, 154, 179, 138, 217, 126, 177, 35, 0, 213, 135, 120, 229, 96, 111, 45, 118, 235, 93, 183, 63, 163, 10, 238, 211, 46, 24, 128, 161, 186, 104, 209, 105, 9, 148, 13, 168, 201], + [51, 21, 43, 143, 136, 96, 178, 140, 4, 67, 11, 163, 161, 240, 68, 150, 201, 38, 120, 196, 148, 199, 225, 192, 4, 243, 160, 74, 198, 71, 104, 123, 226, 38, 9, 251, 106, 24, 76, 229, 246, 194, 158, 214, 47, 141, 153, 11, 133, 21, 243, 30, 234, 56, 33, 103, 86, 92, 196, 165, 158, 128, 49, 85, 242, 91, 151, 232, 97, 180, 58, 150, 96, 217, 212, 207, 86, 36, 77, 241, 159, 35, 44, 251, 114, 205, 201, 90, 34, 161, 101, 150, 94, 238, 206, 204, 51, 0, 3, 27, 244, 243, 231, 109, 155, 4, 24, 133, 150, 177, 191, 253, 87, 130, 25, 78, 43, 57, 166, 135, 248, 197, 179, 1, 51, 184, 112, 76, 107, 171, 234, 121, 123, 165, 148, 66, 98, 207, 222, 32, 86, 250, 217, 76, 5, 190, 237, 20, 106, 18, 132, 168, 89, 10, 183, 234, 177, 140, 188, 24, 211, 23, 15, 126, 252, 173, 3, 141, 158, 223, 85, 146, 93, 152, 233, 99, 232, 138, 56, 76, 69, 91, 87, 48, 242, 156, 122, 52, 254, 215, 103, 214, 95, 250, 104, 253, 61, 2, 126, 143, 168, 24, 247, 0, 95, 253, 239, 157, 53, 126, 138, 12, 250, 32, 169, 99, 57, 180, 135, 158, 196, 63, 22, 83, 35, 119, 151, 11, 74, 25, 153, 126, 22, 98, 126, 187, 188, 74, 21, 24, 190, 58, 101, 101, 36, 130, 185, 125, 79, 160, 251, 230, 191, 237, 192, 62, 66, 202, 249, 153, 157, 15, 176, 6, 22, 125, 239, 57, 161, 7, 44, 13, 213, 13, 50, 150, 139, 118, 222, 85, 124, 70, 124, 210, 5, 98, 141, 182, 160, 231, 122, 166, 173, 215, 33, 159, 247, 254, 4, 110, 212, 203, 192, 234, 73, 46, 55, 48, 193, 76, 21, 153, 217, 48, 101, 213, 213, 219, 88, 199, 249, 132, 112, 214, 216, 212, 246, 189, 164, 126, 58, 109, 52, 171, 196, 23, 27, 129, 209, 220, 232, 192, 109, 246, 140, 207, 196, 135, 231, 143, 164, 70, 180, 216, 173, 120, 229, 186, 202, 51, 182, 95, 29, 149, 176, 153, 22, 39, 66, 191, 196, 197, 16, 156, 5, 203, 54, 113, 160, 43, 230, 138, 97, 11, 247, 89, 150, 72, 72, 230, 114, 95, 29, 57, 109, 31, 231, 27, 119, 169, 58, 122, 0, 87, 247, 161, 36, 106, 189, 236, 230, 244, 127, 64, 115, 178, 0, 242, 133, 105, 106, 61, 198, 107, 146, 212, 66, 205, 225, 72, 180, 7, 47, 115, 93, 168, 84, 16, 114, 121, 246, 180, 155, 202, 7, 73, 220, 85, 191, 196, 152, 15, 11, 142, 140, 169, 92, 216, 224, 82, 111, 79, 37, 163, 240, 103, 135, 192, 236, 224, 133, 255, 73, 161, 170, 224, 181, 34, 95, 190, 190, 47, 115, 141, 221, 59, 26, 100, 254, 138, 172, 144, 185, 179, 48, 250, 210, 8, 96, 108, 95, 210, 48, 172, 72, 102, 234, 39, 30, 93, 79, 97, 143, 242, 170, 253, 114, 26, 66, 151, 202, 162, 179, 149, 10, 162, 23, 131, 26, 239, 190, 152, 89, 88, 116, 86, 154, 118, 204, 237, 82, 54, 83, 90, 81, 51, 88, 19, 148, 82, 97, 171, 17, 245, 181, 37, 47, 218, 204, 138, 174, 26, 24, 117, 178, 13, 237, 225, 230, 3, 71, 192, 85, 25, 44, 156, 182, 175, 114, 14, 81, 196, 255, 212, 150, 49, 60, 7, 189, 36, 132, 110, 185, 67, 139, 16, 216, 36, 148, 35, 252, 213, 4, 178, 254, 143, 30, 142, 162, 52, 53, 13, 192, 186, 5, 147, 139, 45, 79, 101, 246, 51, 71, 27, 253, 92, 206, 21, 249, 100, 101, 104, 221, 211, 60, 110, 240, 110, 144, 132, 151, 123, 168, 69, 10, 68, 225, 135, 71, 76, 231, 216, 146, 59, 238, 197, 198, 146, 59, 197, 113, 153, 250, 184, 104, 88, 176, 234, 187, 148, 73, 212, 248, 86, 162, 53, 33, 126, 180, 248, 118, 132, 181, 2, 65, 21, 242, 96, 145, 247, 171, 135, 25, 120, 71, 186, 15, 40, 121, 183, 161, 201, 69, 5, 27, 148, 120, 213, 198, 9, 247, 212, 145, 227, 145, 234, 226, 212, 148, 123, 46, 201, 161, 31, 173, 98, 161, 158, 55, 86, 41, 76, 188, 115, 30, 12, 75, 68, 30, 46, 104, 203, 59, 174, 0, 133, 205, 107, 101, 167, 159, 171, 159, 51, 152, 74, 116, 208, 126, 38, 193, 172, 247, 238, 187, 207, 0, 108, 27, 17, 156, 185, 190, 109, 119, 196, 94, 1, 42, 165, 232, 207, 207, 74, 11, 218, 140, 136, 13, 162, 62, 210, 188, 105, 202, 103, 196, 179, 226, 61, 240, 86, 181, 28, 136, 151, 32, 169, 179, 13, 237, 229, 70, 63, 103, 195, 170, 34, 124, 60, 61, 248, 197, 161, 141, 95, 147, 157, 39, 141, 150, 220, 89, 39, 17, 224, 182, 121, 135, 192, 173, 211, 141, 167, 143, 150, 20, 44, 41, 149, 16, 117, 110, 70, 211, 46, 134, 123, 201, 139, 242, 155, 131, 199, 147, 159, 93, 59, 193, 231, 254, 231, 17, 135, 35, 11, 132, 191, 190, 119, 122, 175, 86, 236, 80, 79, 93, 141, 173, 230, 77, 239, 231, 12, 90, 63, 234, 157, 247, 198, 22, 60, 178, 14, 74, 152, 130, 103, 16, 126, 171, 212, 162, 58, 87, 89, 113, 71, 52, 220, 68, 215, 103, 22, 243, 111, 138, 145, 147, 157, 71, 178, 25, 227, 211, 210, 181, 168, 184, 220, 86, 60, 119, 103, 230, 202, 19, 54, 1, 199, 38, 117, 154, 17, 217, 198, 192, 165, 187, 234, 153, 58, 69, 247, 0, 229, 17, 18, 201, 244, 182, 126, 6, 141, 199, 206, 94, 153, 242, 61, 152, 61, 94, 129, 162, 203, 104, 251, 117, 207, 141, 180, 115, 187, 78, 163, 114, 121, 68, 140, 73, 143, 136, 17, 247, 54, 28, 237, 96, 4, 10, 144, 62, 1, 46, 90, 133, 100, 25, 160, 192, 212, 76, 155, 129, 108, 117, 98, 182, 58, 36, 185, 104, 161, 237, 19, 217, 17, 253, 193, 22, 67, 78, 67, 103, 57, 0, 69, 138, 203, 222, 94, 229, 30, 51, 213, 252, 122, 197, 236, 153, 86, 213, 121, 30, 59, 139, 2, 5, 29, 112, 169, 151, 147, 246, 126, 40, 64, 18, 34, 129, 78, 29, 184, 44, 213, 175, 179, 217, 30, 237, 22, 117, 81, 114, 33, 106, 117, 236, 119, 225, 66, 215, 203, 182, 6, 129, 131, 210, 198, 64, 75, 151, 190, 23, 249, 206, 21, 226, 44, 93, 74, 125, 14, 62, 126, 40, 187, 236, 241, 69, 29, 162, 213, 163, 146, 69, 93, 17, 45, 235, 34, 241, 214, 79, 238, 130, 0, 84, 30, 162, 218, 100, 122, 255, 75, 75, 245, 1, 105, 20, 108, 220, 117, 176, 32, 203, 120, 189, 20, 130, 64, 23, 169, 225, 10, 85, 98, 156, 111, 239, 82, 106, 197, 78, 34, 164, 111, 238, 53, 168, 102, 247, 172, 104, 86, 233, 6, 201, 157, 80, 159, 97, 224, 51, 233, 33, 195, 8, 110, 3, 128, 123, 75, 12, 151, 151, 53, 237, 234, 194, 214, 11, 198, 175, 78, 34, 208, 241, 152, 214, 219, 19, 100, 42, 56, 62, 23, 73, 184, 105, 184, 11, 239, 239, 244, 227, 17, 139, 128, 229, 245, 100, 59, 10, 71, 45, 247, 38, 131, 95, 91, 54, 165, 161, 145, 10, 33, 236, 255, 226, 97, 109, 135, 3, 31, 30, 2, 19, 127, 222, 17, 123, 100, 58, 25, 222, 82, 60, 75, 176, 15, 18, 106, 19, 109, 116, 177, 169, 100, 100, 73, 86, 22, 155, 49, 244, 79, 133, 96, 125, 214, 26, 39, 146, 196, 221, 205, 72, 211, 180, 252, 197, 191, 207, 214, 203, 233, 91, 116, 74, 105, 105, 38, 98, 81, 44, 248, 189, 16, 156, 226, 159, 211, 35, 198, 149, 111, 48, 192, 69, 127, 187, 146, 77, 98, 6, 65, 220, 68, 238, 162, 182, 140, 174, 159, 246, 50, 171, 220, 86, 254, 58, 185, 46, 187, 78, 35, 207, 13, 45, 1, 199, 14, 96, 178, 35, 61, 77, 248, 93, 251, 114, 128, 204, 37, 37, 200, 106, 223, 126, 15, 129, 150, 83, 45, 100, 7, 65, 61, 218, 118, 161, 234, 117, 33, 253, 206, 194, 172, 9, 182, 26, 70, 72, 246, 238, 89, 47, 81, 63, 138, 51, 165, 170, 170, 135, 85, 174, 242, 128, 235, 153, 240, 181, 159, 31, 135, 135, 118, 29, 148, 218, 111, 101, 193, 227, 61, 193, 77, 48, 74, 110, 204, 23, 60, 159, 164, 113, 86, 209, 37, 157, 17, 197, 67, 30, 56, 83, 215, 1, 108, 205, 64, 10, 94, 180, 231, 33, 171, 131, 168, 51, 106, 157, 42, 114, 96, 58, 98, 194, 171, 237, 158, 93, 125, 255, 229, 112, 213, 136, 192, 217, 93, 221, 9, 252, 71, 12, 226, 247, 62, 138, 121, 4, 19, 150, 73, 156, 187, 166, 22, 84, 5, 184, 28, 38, 30, 193, 117, 211, 7, 100, 60, 16, 140, 143, 234, 176, 84, 110, 183, 227, 151, 63, 16, 5, 208, 68, 221, 242, 142, 22, 123, 25, 226, 118, 45, 65, 252, 163, 235, 238, 42, 97, 181, 246, 15, 48, 212, 159, 51, 220, 111, 202, 43, 43, 93, 245, 22, 225, 57, 75, 162, 19, 212, 109, 120, 27, 46, 152, 76, 247, 87, 87, 54, 50, 15, 131, 55, 251, 54, 55, 56, 141, 234, 5, 65, 80, 42, 150, 73, 42, 64, 255, 195, 84, 63, 5, 49, 55, 76, 91, 38, 59, 91, 68, 131, 70, 97, 78, 120, 54, 105, 98, 136, 128, 129, 65, 33, 17, 245, 34, 213, 9, 243, 219, 201, 5, 137, 153, 48, 82, 215, 150, 204, 92, 143, 69, 209, 206, 191, 97, 96, 198, 179, 241, 37, 41, 138, 69, 145, 201, 234, 124, 189, 255, 2, 215, 211, 32, 245, 182, 83, 67, 189, 193, 185, 159, 136, 163, 178, 87, 238, 161, 205, 161, 207, 116, 163, 217, 236, 38, 121, 173, 89, 180, 61, 59, 35, 218, 89, 52, 188, 7, 196, 129, 124, 246, 194, 61, 185, 7, 220, 172, 253, 49, 52, 243, 28, 52, 16, 213, 121, 25, 178, 59, 101, 51, 115, 177, 152, 79, 214, 149, 124, 97, 242, 44, 83, 51, 200, 242, 176, 29, 42, 128, 56, 36, 34, 160, 223, 14, 70, 188, 237, 221, 180, 64, 221, 87, 93, 54, 191, 211, 145, 103, 26, 118, 106, 171, 5, 13, 86, 149, 50, 14, 48, 41, 68, 98, 20, 41, 229, 123, 131, 229, 122, 203, 100, 88, 253, 153, 218, 143, 251, 136, 22, 245, 154, 122, 155, 162, 236, 76, 213, 161, 80, 94, 80, 82, 10, 59, 194, 179, 167, 251, 151, 128, 54, 49, 4, 37, 133, 136, 159, 121, 175, 128, 200, 134, 189, 63, 54, 88, 200, 214, 180, 72, 223, 55, 184, 163, 242, 198, 216, 220, 176, 94, 88, 115, 185, 142, 242, 148, 90, 7, 243, 66, 16, 181, 253, 72, 43, 156, 243, 239, 201, 247, 12, 59, 167, 246, 133, 83, 101, 197, 169, 230, 144, 47, 64, 120, 148, 36, 92, 74, 90, 198, 192, 49, 86, 22, 112, 207, 183, 132, 244, 163, 117, 26, 13, 249, 122, 170, 66, 200, 108, 90, 142, 48, 103, 62, 253, 6, 18, 85, 62, 110, 134, 121, 75, 240, 30, 104, 16, 114, 23, 160, 202, 231, 142, 64, 3, 187, 240, 94, 88, 75, 248, 108, 210, 169, 58, 198, 171, 137, 200, 5, 95, 62, 35, 107, 139, 112, 31, 244, 64, 67, 243, 95, 157, 101, 94, 74, 216, 40, 62, 56, 100, 224, 120, 111, 1, 244, 137, 112, 96, 136, 104, 217, 13, 224, 101, 14, 0, 42, 201, 41, 184, 189, 147, 197, 231, 46, 244, 197, 141, 69, 4, 114, 229, 45, 225, 204, 45, 132, 68, 128, 128, 238, 198, 200, 233, 204, 252, 31, 242, 161, 163, 210, 143, 165, 136, 19, 220, 251, 29, 62, 107, 222, 62, 161, 133, 180, 237, 63, 68, 170, 85, 241, 38, 176, 82, 34, 254, 153, 170, 161, 94, 97, 231, 196, 136, 44, 1, 204, 70, 103, 17, 160, 25, 87, 40, 38, 201, 55, 69, 195, 160, 176, 165, 25, 119, 97, 210, 112, 134, 44, 166, 117, 195, 170, 24, 158, 165, 64, 135, 41, 94, 19, 250, 71, 24, 37, 134, 186, 38, 239, 223, 56, 170, 240, 104, 93, 130, 152, 59, 137, 180, 135, 233, 92, 155, 144, 200, 229, 161, 91, 235, 27, 193, 157, 212, 52, 210, 18, 59, 247, 41, 65, 97, 80, 9, 66, 64, 222, 57, 42, 83, 45, 47, 99, 167, 69, 6, 37, 103, 127, 240, 82, 201, 36, 24, 66, 71, 32, 27, 137, 102, 0, 59, 85, 65, 247, 126, 167, 102, 56, 56, 83, 191, 67, 161, 146, 99, 221, 31, 206, 222, 74, 90, 27, 151, 121, 128, 149, 5, 180, 229, 2, 93, 28, 106, 184, 102, 83, 194, 231, 69, 7, 201, 58, 77, 165, 219, 172, 213, 109, 202, 116, 238, 113, 63, 82, 177, 104, 72, 173, 71, 36, 242, 109, 168, 236, 42, 231, 201, 104, 208, 100, 131, 98, 106, 173, 247, 253, 182, 213, 31, 212, 89, 78, 193, 156, 15, 151, 133, 105, 127, 180, 99, 230, 249, 37, 92, 161, 41, 231, 127, 122, 230, 199, 192, 33, 52, 143, 39, 124, 36, 25, 4, 214, 76, 24, 219, 117, 103, 238, 180, 137, 199, 149, 221, 59, 140, 13, 193, 176, 175, 60, 58, 242, 61, 6, 185, 39, 239, 0, 59, 200, 233, 133, 31, 50, 164, 20, 83, 20, 234, 224, 122, 79, 243, 213, 131, 41, 165, 185, 56, 121, 13, 126, 90, 194, 234, 65, 138, 97, 136, 236, 37, 23, 39, 153, 214, 243, 91, 66, 150, 178, 93, 212, 42, 17, 139, 224, 91, 104, 22, 111, 163, 98, 7, 180, 196, 78, 66, 168, 255, 87, 205, 54, 202, 183, 244, 45, 136, 117, 63, 49, 0, 127, 137, 197, 25, 143, 128, 228, 11, 125, 201, 158, 250, 247, 38, 57, 24, 2, 164, 241, 161, 10, 85, 70, 151, 248, 28, 247, 253, 48, 22, 44, 231, 62, 175, 217, 12, 150, 123, 250, 140, 80, 192, 226, 223, 189, 23, 8, 233, 74, 92, 69, 155, 26, 251, 214, 79, 187, 255, 252, 231, 253, 238, 205, 161, 230, 68, 137, 179, 88, 29, 206, 203, 91, 76, 70, 42, 68, 90, 200, 88, 244, 231, 221, 17, 57, 219, 28, 142, 178, 219, 197, 57, 34, 186, 107, 174, 78, 41, 84, 240, 46, 247, 36, 113, 245, 144, 149, 7, 32, 149, 240, 95, 217, 13, 93, 147, 241, 218, 30, 4, 120, 192, 213, 51, 97, 16, 79, 143, 67, 167, 196, 90, 27, 196, 178, 13, 103, 174, 74, 158, 172, 121, 5, 200, 138, 218, 2, 10, 17, 214, 136, 115, 214, 80, 50, 2, 182, 83, 235, 225, 38, 178, 79, 121, 204, 150, 42, 136, 218, 23, 142, 73, 161, 215, 82, 157, 18, 132, 255, 206, 85, 200, 186, 99, 144, 204, 23, 140, 80, 32, 254, 23, 99, 110, 237, 12, 38, 76, 38, 209, 35, 254, 140, 127, 83, 46, 77, 142, 115, 255, 192, 137, 176, 124, 70, 165, 101, 28, 243, 130, 73, 100, 21, 198, 67, 226, 94, 103, 12, 28, 161, 111, 173, 243, 10, 24, 148, 123, 218, 159, 214, 135, 119, 255, 143, 166, 136, 95, 3, 60, 246, 31, 249, 89, 95, 126, 64, 51, 68, 10, 173, 212, 217, 43, 229, 32, 155, 97, 65, 62, 43, 103, 89, 123, 184, 230, 60, 92, 18, 231, 86, 214, 82, 66, 11, 129, 42, 22, 162, 254, 139, 241, 32, 42, 192, 114, 17, 207, 244, 187, 74, 135, 57, 153, 150, 49, 11, 224, 193, 83, 144, 29, 230, 190, 9, 220, 183, 56, 215, 133, 40, 40, 53, 210, 35, 105, 85, 161, 41, 61, 161, 149, 157, 138, 16, 38, 31, 218, 37, 195, 102, 158, 29, 57, 6, 65, 184, 246, 141, 19, 220, 195, 86, 239, 68, 43, 94, 251, 254, 67, 62, 27, 100, 123, 134, 101, 33, 112, 60, 250, 61, 171, 90, 60, 23, 46, 190, 216, 227, 70, 145, 201, 195, 197, 200, 214, 182, 169, 222, 153, 90, 40, 13, 164, 133, 136, 220, 246, 207, 176, 34, 105, 0, 127, 251, 91, 134, 43, 139, 143, 92, 225, 21, 83, 87, 37, 238, 91, 143, 89, 169, 235, 206, 53, 199, 7, 177, 218, 169, 236, 36, 86, 33, 224, 242, 247, 244, 116, 178, 146, 130, 115, 248, 14, 169, 153, 226, 48, 243, 6, 97, 71, 125, 0, 128, 198, 27, 146, 150, 2, 26, 197, 74, 152, 99, 4, 0, 90, 244, 169, 94, 156, 190, 202, 185, 97, 55, 59, 197, 167, 223, 220, 8, 48, 248, 79, 80, 128, 38, 31, 186, 252, 19, 39, 63, 55, 119, 72, 129, 104, 78, 68, 129, 104, 143, 184, 35, 156, 147, 37, 150, 12, 242, 53, 223, 127, 65, 39, 113, 139, 139, 8, 172, 215, 88, 48, 212, 154, 59, 110, 231, 195, 59, 131, 159, 9, 245, 188, 243, 0, 135, 254, 15, 93, 172, 66, 176, 159, 97, 36, 223, 9, 166, 151, 105, 19, 8, 92, 209, 62, 95, 100, 151, 212, 167, 109, 207, 169, 194, 70, 119, 199, 123, 70, 105, 132, 70, 156, 219, 58, 21, 162, 161, 87, 21, 204, 161, 226, 128, 32, 155, 113, 213, 250, 216, 60, 95, 255, 50, 119, 158, 248, 153, 14, 113, 42, 164, 153, 231, 109, 15, 95, 161, 137, 122, 87, 1, 197, 225, 232, 89, 54, 60, 225, 186, 244, 108, 238, 146, 65, 4, 46, 99, 26, 134, 56, 80, 245, 45, 85, 135, 70, 70, 205, 4, 55, 48, 128, 181, 97, 208, 251, 44, 230, 210, 107, 141, 229, 68, 65, 3, 157, 58, 229, 121, 42, 135, 147, 221, 90, 211, 32, 104, 210, 193, 123, 170, 147, 126, 220, 120, 232, 234, 82, 151, 91, 42, 91, 66, 219, 76, 214, 113, 213, 156, 255, 52, 116, 191, 139, 91, 105, 6, 48, 80, 115, 138, 6, 132, 125, 245, 186, 117, 208, 133, 175, 81, 110, 4, 157, 162, 72, 2, 12, 187, 121, 229, 61, 108, 134, 133, 228, 156, 105, 22, 222, 95, 197, 206, 111, 205, 178, 215, 138, 219, 78, 50, 69, 231, 150, 190, 8, 195, 167, 130, 62, 155, 49, 140, 255, 59, 2, 121, 250, 106, 145, 61, 22, 219, 108, 111, 7, 75, 9, 180, 149, 134, 37, 39, 57, 183, 254, 128, 246, 51, 131, 225, 23, 255, 158, 129, 105, 36, 209, 183, 134, 53, 244, 61, 1, 55, 200, 200, 183, 67, 10, 77, 208, 250, 53, 88, 234, 89, 168, 32, 91, 159, 186, 67, 50, 204, 210, 253, 26, 179, 72, 202, 141, 71, 133, 79, 154, 177, 28, 212, 215, 103, 115, 228, 19, 6, 133, 148, 98, 13, 29, 236, 209, 5, 47, 159, 231, 160, 138, 145, 227, 77, 160, 250, 208, 187, 226, 149, 171, 108, 12, 233, 123, 105, 73, 16, 169, 153, 54, 214, 185, 132, 89, 189, 83, 72, 253, 111, 88, 122, 39, 56, 229, 176, 144, 178, 38, 78, 211, 231, 130, 236, 30, 165, 23, 181, 252, 15, 253, 30, 69, 62, 72, 69, 76, 243, 46, 0, 130, 181, 142, 17, 36, 249, 212, 202, 44, 48, 144, 91, 39, 180, 14, 166, 240, 62, 97, 82, 107, 58, 131, 91, 178, 130, 229, 70, 43, 51, 43, 49, 194, 230, 156, 153, 122, 147, 157, 33, 97, 166, 46, 220, 13, 210, 19, 153, 103, 29, 4, 234, 53, 102, 25, 201, 11, 14, 41, 145, 177, 97, 201, 208, 212, 111, 162, 6, 195, 55, 88, 201, 12, 86, 165, 42, 159, 0, 18, 149, 238, 97, 242, 92, 118, 227, 0, 153, 156, 182, 237, 135, 155, 201, 179, 234, 160, 18, 157, 218, 219, 248, 179, 98, 234, 212, 230, 64, 146, 159, 246, 199, 234, 207, 228, 61, 198, 196, 31, 111, 225, 123, 59, 212, 19, 133, 132, 228, 247, 254, 80, 127, 54, 112, 85, 181, 39, 82, 158, 153, 124, 143, 229, 224, 236, 190, 252, 173, 224, 166, 248, 88, 125, 161, 189, 106, 106, 110, 73, 48, 108, 100, 26, 150, 50, 155, 150, 51, 249, 129, 111, 249, 117, 232, 129, 229, 113, 62, 117, 57, 44, 238, 167, 38, 33, 150, 4, 151, 142, 40, 199, 111, 42, 190, 151, 86, 153, 65, 55, 71, 253, 162, 223, 22, 197, 148, 113, 14, 88, 51, 162, 54, 9, 62, 252, 167, 63, 51, 62, 239, 67, 39, 190, 178, 166, 192, 184, 124, 97, 116, 88, 192, 133, 13, 252, 31, 103, 186, 127, 41, 211, 118, 23, 24, 19, 52, 228, 51, 196, 139, 31, 82, 49, 230, 226, 180, 53, 129, 49, 232, 210, 195, 108, 241, 24, 5, 188, 131, 236, 56, 136, 35, 89, 117, 196, 68, 20, 70, 94, 107, 242, 249, 35, 92, 39, 116, 218, 241, 66, 192, 109, 176, 65, 141, 241, 94, 227, 5, 58, 206, 143, 185, 85, 135, 89, 186, 72, 15, 144, 64, 159, 18, 123, 96, 198, 190, 196, 41, 13, 54, 168, 194, 146, 11, 185, 178, 94, 213, 169, 233, 18, 145, 65, 178, 53, 121, 91, 204, 98, 123, 239, 109, 132, 71, 100, 56, 18, 247, 85, 20, 198, 90, 251, 213, 155, 120, 208, 214, 28, 15, 50, 201, 214, 35, 94, 167, 252, 94, 251, 177, 253, 152, 186, 155, 210, 172, 230, 219, 160, 206, 99, 151, 140, 86, 49, 112, 110, 177, 27, 202, 81, 167, 212, 145, 54, 231, 241, 175, 251, 241, 15, 140, 134, 255, 124, 210, 233, 129, 1, 179, 137, 112, 174, 65, 203, 112, 96, 28, 47, 142, 126, 188, 137, 253, 163, 192, 215, 175, 102, 97, 4, 137, 31, 8, 228, 40, 16, 56, 61, 46, 239, 208, 130, 87, 117, 168, 222, 52, 221, 113, 140, 62, 76, 25, 255, 137, 252, 155, 232, 141, 140, 232, 37, 7, 5, 146, 136, 183, 102, 64, 81, 149, 199, 95, 191, 249, 121, 109, 87, 174, 64, 57, 114, 1, 232, 11, 75, 59, 28, 233, 237, 64, 101, 169, 77, 80, 55, 90, 112, 72, 176, 236, 165, 233, 181, 225, 24, 101, 142, 247, 136, 175, 218, 8, 237, 211, 161, 67, 225, 166, 143, 36, 97, 214, 103, 219, 106, 67, 95, 109, 236, 194, 45, 132, 25, 125, 27, 169, 215, 6, 49, 74, 124, 170, 136, 180, 52, 225, 105, 111, 82, 190, 209, 9, 217, 11, 245, 185, 216, 152, 230, 124, 143, 216, 219, 153, 25, 54, 93, 137, 203, 42, 180, 166, 154, 52, 22, 178, 189, 50, 76, 161, 153, 132, 211, 217, 120, 137, 24, 184, 79, 87, 60, 76, 181, 161, 218, 204, 176, 188, 122, 33, 187, 38, 245, 229, 143, 121, 158, 91, 74, 209, 81, 196, 230, 164, 189, 203, 91, 55, 194, 85, 68, 47, 56, 38, 159, 249, 236, 237, 217, 145, 94, 218, 14, 251, 40, 176, 138, 9, 7, 123, 62, 144, 217, 222, 95, 184, 191, 95, 215, 170, 67, 142, 21, 162, 133, 218, 161, 122, 248, 73, 30, 177, 175, 24, 170, 31, 130, 90, 14, 71, 128, 232, 131, 184, 100, 142, 219, 40, 99, 49, 138, 205, 87, 146, 70, 2, 93, 149, 207, 137, 89, 84, 253, 227, 56, 137, 161, 35, 65, 75, 15, 115, 85, 103, 184, 223, 211, 82, 110, 76, 127, 11, 87, 84, 167, 251, 72, 199, 98, 19, 72, 15, 118, 22, 7, 40, 41, 228, 248, 177, 175, 97, 242, 164, 207, 233, 199, 206, 63, 24, 98, 155, 252, 247, 254, 134, 126, 95, 194, 134, 6, 125, 101, 241, 60, 2, 152, 226, 247, 93, 79, 147, 124, 85, 76, 158, 171, 7, 32, 102, 178, 101, 153, 232, 149, 160, 11, 146, 95, 28, 143, 151, 15, 189, 72, 81, 184, 11, 24, 135, 181, 203, 96, 91, 9, 70, 175, 206, 98, 169, 231, 162, 241, 243, 225, 242, 45, 253, 194, 180, 45, 197, 186, 206, 162, 113, 42, 141, 100, 216, 91, 12, 179, 74, 19, 60, 252, 113, 44, 44, 99, 123, 215, 153, 239, 2, 78, 163, 39, 39, 43, 118, 244, 139, 222, 156, 189, 119, 188, 83, 90, 6, 16, 168, 90, 175, 87, 233, 105, 88, 241, 123, 246, 126, 208, 102, 12, 50, 156, 105, 190, 79, 99, 87, 218, 85, 217, 227, 243, 75, 114, 150, 175, 9, 217, 87, 8, 220, 112, 243, 242, 32, 149, 178, 87, 44, 29, 67, 133, 20, 163, 42, 63, 171, 191, 157, 173, 193, 129, 66, 238, 71, 139, 155, 49, 39, 113, 196, 39, 98, 142, 106, 8, 73, 219, 147, 148, 90, 129, 99, 178, 13, 104, 254, 162, 145, 104, 61, 85, 196, 213, 82, 214, 50, 200, 213, 114, 24, 160, 16, 232, 145, 196, 162, 42, 217, 40, 219, 159, 133, 236, 122, 118, 8, 78, 25, 119, 90, 150, 236, 184, 45, 252, 218, 188, 253, 163, 125, 22, 27, 142, 156, 201, 107, 241, 51, 51, 137, 117, 151, 125, 165, 17, 106, 85, 36, 186, 171, 60, 122, 74, 207, 165, 207, 78, 118, 149, 165, 147, 159, 141, 90, 238, 17, 197, 238, 79, 81, 118, 28, 179, 58, 125, 60, 195, 125, 51, 46, 153, 159, 201, 95, 128, 245, 100, 202, 98, 239, 127, 222, 20, 163, 131, 30, 217, 149, 191, 218, 27, 26, 74, 125, 136, 211, 17, 223, 163, 34, 172, 255, 29, 114, 175, 205, 26, 166, 158, 141, 100, 124, 133, 175, 144, 152, 63, 54, 119, 240, 205, 203, 249, 230, 246, 143, 252, 40, 31, 142, 80, 206, 70, 87, 78, 84, 42, 63, 77, 192, 68, 15, 210, 140, 175, 115, 29, 162, 220, 157, 189, 131, 102, 199, 90, 43, 101, 198, 95, 45, 227, 63, 42, 152, 222, 139, 205, 216, 112, 38, 133, 241, 114, 149, 9, 3, 250, 221, 100, 176, 77, 225, 2, 224, 87, 103, 168, 122, 64, 67, 220, 110, 173, 93, 93, 57, 238, 159, 78, 96, 38, 130, 237, 51, 40, 31, 138, 66, 146, 79, 201, 110, 197, 110, 179, 243, 32, 130, 96, 87, 34, 164, 150, 89, 35, 229, 170, 10, 238, 90, 107, 163, 139, 12, 249, 235, 119, 36, 231, 152, 61, 144, 187, 48, 125, 1, 200, 219, 126, 241, 191, 183, 30, 88, 49, 146, 127, 81, 42, 152, 198, 255, 70, 63, 118, 15, 86, 76, 252, 179, 144, 162, 225, 134, 173, 155, 51, 213, 15, 1, 122, 156, 227, 241, 32, 212, 178, 148, 245, 226, 148, 253, 0, 99, 253, 60, 97, 153, 25, 226, 45, 51, 118, 56, 120, 111, 72, 134, 99, 17, 124, 218, 21, 22, 145, 138, 151, 10, 41, 213, 121, 160, 230, 168, 196, 228, 222, 31, 99, 93, 246, 233, 95, 178, 109, 72, 83, 144, 24, 109, 70, 23, 214, 48, 60, 132, 154, 44, 166, 32, 250, 159, 228, 63, 180, 28, 108, 164, 12, 164, 84, 129, 69, 211, 4, 153, 76, 116, 50, 145, 204, 116, 91, 214, 255, 21, 103, 92, 186, 84, 44, 150, 70, 145, 178, 12, 75, 94, 168, 13, 41, 197, 191, 166, 13, 14, 215, 221, 220, 88, 186, 108, 215, 164, 215, 190, 66, 83, 183, 101, 19, 40, 47, 224, 215, 217, 124, 34, 196, 72, 239, 183, 192, 128, 216, 181, 70, 29, 8, 226, 168, 170, 240, 117, 135, 155, 205, 76, 91, 181, 79, 197, 13, 53, 171, 165, 29, 203, 172, 79, 200, 74, 107, 203, 59, 14, 30, 251, 248, 182, 205, 25, 154, 53, 63, 32, 240, 48, 7, 1, 239, 160, 170, 205, 81, 92, 71, 208, 4, 115, 222, 19, 25, 114, 8, 237, 167, 181, 187, 253, 8, 128, 129, 227, 49, 151, 149, 101, 230, 64, 68, 222, 227, 206, 114, 97, 121, 240, 80, 225, 5, 68, 54, 27, 239, 44, 182, 46, 56, 149, 232, 146, 142, 115, 32, 111, 45, 118, 254, 202, 21, 70, 77, 75, 128, 39, 0, 98, 228, 222, 45, 151, 205, 138, 108, 97, 223, 171, 248, 17, 173, 137, 197, 84, 116, 212, 174, 152, 13, 194, 244, 217, 53, 22, 8, 193, 24, 223, 38, 16, 56, 79, 116, 23, 123, 99, 63, 20, 225, 136, 123, 188, 107, 202, 246, 11, 226, 205, 230, 244, 122, 77, 4, 86, 130, 193, 125, 209, 208, 208, 77, 43, 62, 172, 132, 27, 106, 195, 30, 235, 54, 184, 233, 98, 229, 98, 153, 241, 0, 139, 109, 248, 102, 125, 92, 74, 165, 84, 165, 161, 123, 39, 229, 208, 236, 246, 238, 127, 180, 190, 64, 176, 219, 145, 124, 227, 110, 250, 37, 30, 66, 134, 179, 40, 149, 155, 9, 146, 35, 25, 139, 248, 122, 75, 217, 230, 6, 111, 25, 124, 25, 24, 29, 218, 133, 127, 230, 44, 46, 254, 205, 184, 244, 144, 233, 45, 214, 126, 107, 203, 36, 144, 9, 219, 6, 83, 31, 128, 165, 44, 195, 17, 252, 60, 122, 178, 153, 150, 248, 185, 158, 11, 51, 28, 53, 217, 49, 61, 188, 43, 125, 51, 174, 139, 85, 64, 241, 37, 238, 222, 47, 150, 166, 106, 7, 20, 39, 236, 147, 221, 138, 231, 58, 218, 154, 99, 16, 15, 250, 165, 23, 80, 102, 115, 29, 63, 245, 95, 1, 11, 64, 225, 191, 96, 230, 200, 145, 232, 191, 70, 28, 30, 72, 101, 42, 228, 36, 226, 121, 23, 243, 20, 81, 72, 111, 103, 181, 85, 8, 97, 129, 184, 150, 199, 116, 85, 107, 239, 4, 47, 183, 199, 244, 133, 243, 56, 84, 7, 215, 43, 62, 221, 194, 199, 8, 34, 74, 179, 103, 185, 54, 3, 67, 172, 19, 169, 88, 90, 154, 210, 18, 107, 123, 54, 100, 132, 173, 185, 40, 128, 252, 118, 81, 227, 182, 108, 235, 121, 244, 232, 250, 82, 182, 36, 63, 142, 15, 132, 167, 2, 203, 3, 104, 198, 25, 69, 4, 82, 182, 205, 54, 148, 57, 116, 224, 3, 228, 154, 159, 68, 107, 92, 111, 70, 18, 52, 103, 121, 32, 125, 18, 155, 206, 12, 90, 239, 68, 5, 250, 65, 76, 196, 86, 38, 93, 98, 196, 97, 47, 17, 236, 42, 113, 63, 183, 86, 87, 240, 6, 197, 238, 171, 59, 91, 225, 208, 234, 203, 50, 70, 250, 248, 73, 118, 237, 187, 3, 75, 108, 10, 227, 180, 121, 121, 20, 20, 130, 116, 196, 116, 6, 151, 149, 125, 164, 118, 216, 170, 46, 92, 114, 154, 15, 105, 47, 79, 153, 22, 51, 181, 170, 187, 254, 102, 189, 112, 232, 245, 145, 14, 85, 156, 98, 25, 138, 204, 59, 32, 180, 146, 99, 10, 147, 179, 139, 67, 227, 12, 73, 200, 216, 90, 9, 109, 32, 150, 37, 197, 11, 17, 224, 49, 108, 155, 176, 115, 209, 199, 165, 68, 9, 70, 155, 178, 205, 226, 143, 65, 195, 223, 98, 72, 134, 132, 186, 171, 157, 101, 68, 36, 208, 91, 147, 238, 18, 177, 191, 181, 185, 188, 199, 164, 183, 117, 215, 127, 38, 83, 207, 192, 16, 87, 251, 108, 239, 11, 150, 69, 33, 102, 178, 120, 228, 171, 177, 55, 55, 103, 230, 189, 121, 65, 51, 99, 5, 5, 198, 122, 2, 112, 194, 144, 63, 63, 45, 40, 161, 242, 159, 169, 110, 97, 42, 156, 204, 195, 28, 48, 250, 1, 108, 121, 166, 29, 69, 61, 29, 82, 206, 163, 22, 150, 85, 30, 21, 15, 159, 143, 236, 133, 44, 164, 19, 32, 153, 153, 247, 119, 13, 16, 124, 234, 26, 14, 225, 155, 183, 245, 111, 60, 128, 37, 187, 9, 162, 61, 141, 30, 35, 46, 225, 46, 167, 89, 3, 218, 205, 179, 21, 97, 118, 0, 47, 15, 204, 181, 71, 76, 38, 134, 52, 156, 90, 21, 18, 21, 5, 30, 41, 91, 26, 71, 83, 78, 93, 38, 63, 64, 219, 11, 154, 129, 233, 92, 165, 104, 77, 70, 143, 252, 221, 178, 51, 215, 128, 10, 185, 137, 216, 185, 102, 105, 107, 90, 240, 31, 174, 188, 225, 134, 16, 19, 202, 93, 67, 212, 165, 244, 177, 233, 59, 220, 101, 1, 26, 245, 0, 87, 29, 16, 204, 147, 132, 208, 37, 29, 104, 32, 76, 65, 99, 34, 126, 157, 114, 36, 55, 11, 172, 69, 200, 27, 106, 201, 211, 6, 30, 115, 30, 56, 18, 90, 109, 195, 27, 206, 205, 182, 49, 134, 91, 203, 106, 249, 73, 2, 122, 51, 104, 123, 115, 44, 158, 93, 36, 192, 36, 67, 100, 19, 25, 165, 62, 56, 59, 183, 233, 174, 58, 187, 178, 165, 27, 250, 79, 232, 22, 208, 194, 53, 10, 57, 177, 107, 44, 111, 199, 38, 137, 53, 147, 40, 72, 204, 26, 62, 66, 63, 84, 252, 173, 211, 232, 172, 121, 236, 108, 204, 95, 218, 147, 217, 61, 151, 64, 90, 72, 32, 231, 135, 74, 60, 219, 24, 66, 209, 220, 200, 136, 102, 62, 73, 72, 198, 81, 111, 83, 80, 197, 57, 99, 223, 63, 52, 226, 95, 171, 169, 178, 163, 175, 236, 147, 54, 226, 208, 199, 52, 107, 138, 114, 116, 119, 240, 98, 4, 229, 200, 133, 9, 182, 29, 210, 83, 175, 140, 120, 10, 232, 145, 90, 53, 102, 34, 4, 77, 211, 195, 37, 6, 253, 97, 82, 223, 44, 20, 188, 63, 3, 241, 242, 5, 130, 198, 203, 141, 245, 46, 74, 168, 215, 16, 168, 155, 72, 3, 37, 17, 192, 132, 253, 244, 146, 74, 122, 41, 172, 171, 44, 64, 8, 188, 206, 71, 193, 110, 107, 49, 238, 224, 76, 12, 73, 100, 76, 146, 149, 8, 64, 170, 78, 106, 119, 27, 65, 9, 171, 150, 87, 160, 33, 248, 234, 185, 72, 6, 34, 243, 15, 6, 217, 156, 51, 232, 35, 189, 201, 41, 173, 83, 243, 222, 42, 188, 243, 167, 218, 220, 185, 100, 69, 15, 115, 102, 239, 190, 156, 135, 81, 146, 40, 186, 92, 13, 204, 63, 110, 1, 138, 64, 117, 181, 159, 71, 243, 187, 250, 39, 32, 116, 144, 174, 27, 233, 46, 170, 207, 245, 157, 2, 203, 218, 2, 183, 124, 114, 169, 131, 225, 217, 43, 145, 101, 187, 28, 81, 208, 244, 196, 66, 170, 141, 130, 166, 74, 206, 239, 0, 134, 68, 166, 50, 27, 203, 193, 126, 135, 186, 89, 184, 111, 250, 242, 253, 113, 183, 242, 90, 37, 177, 3, 76, 214, 124, 218, 142, 99, 46, 26, 95, 33, 76, 201, 53, 182, 253, 115, 46, 133, 115, 51, 79, 95, 96, 151, 209, 89, 124, 195, 176, 195, 235, 171, 206, 7, 170, 124, 115, 162, 236, 160, 117, 221, 217, 71, 38, 163, 86, 108, 141, 206, 125, 180, 9, 48, 29, 96, 127, 187, 9, 16, 176, 63, 158, 48, 246, 44, 69, 167, 108, 107, 167, 168, 230, 210, 237, 187, 6, 67, 179, 81, 128, 61, 25, 203, 117, 237, 20, 224, 29, 210, 100, 143, 44, 197, 87, 18, 233, 148, 167, 184, 39, 109, 117, 206, 230, 132, 209, 186, 180, 234, 95, 56, 14, 116, 242, 211, 163, 123, 24, 160, 134, 223, 131, 161, 200, 132, 214, 162, 218, 114, 94, 227, 211, 180, 145, 22, 55, 89, 162, 154, 31, 182, 182, 94, 233, 55, 203, 206, 37, 117, 126, 100, 40, 233, 101, 88, 109, 32, 98, 113, 106, 4, 243, 166, 74, 243, 152, 121, 193, 41, 54, 95, 148, 184, 61, 223, 46, 217, 55, 224, 230, 198, 181, 151, 71, 219, 213, 1, 122, 22, 51, 207, 169, 61, 15, 223, 59, 238, 253, 63, 176, 209, 170, 122, 104, 190, 222, 72, 150, 74, 208, 191, 20, 212, 26, 155, 172, 218, 124, 176, 108, 114, 117, 76, 64, 92, 139, 87, 218, 248, 211, 242, 168, 203, 169, 51, 134, 179, 34, 144, 114, 37, 213, 145, 28, 59, 19, 114, 241, 88, 28, 29, 73, 245, 137, 134, 167, 223, 138, 180, 112, 173, 203, 106, 31, 29, 255, 1, 79, 11, 152, 252, 97, 210, 200, 60, 179, 143, 129, 6, 201, 93, 193, 40, 24, 31, 97, 155, 201, 15, 125, 86, 62, 4, 111, 169, 134, 91, 75, 30, 196, 16, 47, 133, 157, 88, 69, 181, 66, 10, 73, 213, 121, 202, 108, 239, 248, 165, 116, 171, 4, 201, 252, 134, 191, 6, 193, 216, 249, 6, 90, 190, 150, 38, 120, 39, 152, 58, 46, 137, 250, 186, 135, 130, 92, 59, 61, 25, 153, 196, 112, 163, 162, 228, 4, 15, 103, 43, 116, 55, 78, 20, 41, 166, 30, 133, 77, 109, 84, 110, 9, 121, 109, 117, 26, 93, 24, 103, 65, 106, 180, 201, 179, 252, 144, 94, 158, 173, 217, 154, 190, 235, 203, 226, 160, 118, 35, 206, 138, 28, 248, 147, 27, 66, 253, 234, 143, 112, 62, 52, 16, 55, 16, 158, 100, 239, 162, 140, 228, 15, 81, 248, 173, 56, 240, 188, 238, 19, 161, 16, 66, 81, 74, 77, 135, 188, 23, 202, 203, 248, 192, 9, 245, 146, 106, 84, 194, 200, 105, 91, 51, 148, 180, 195, 216, 177, 40, 242, 90, 6, 80, 200, 100, 78, 87, 176, 209, 95, 236, 132, 248, 102, 144, 18, 39, 184, 68, 234, 223, 130, 39, 121, 235, 184, 6, 30, 133, 200, 161, 197, 157, 8, 33, 235, 161, 64, 148, 241, 46, 132, 235, 49, 130, 228, 225, 23, 132, 148, 40, 255, 128, 202, 120, 135, 137, 105, 10, 133, 58, 16, 138, 75, 178, 102, 208, 205, 64, 254, 31, 250, 128, 78, 0, 235, 129, 119, 120, 206, 206, 75, 5, 106, 207, 98, 18, 62, 171, 61, 155, 218, 227, 252, 134, 209, 136, 55, 100, 237, 141, 179, 189, 247, 125, 236, 101, 138, 243, 254, 168, 86, 229, 131, 6, 235, 84, 105, 36, 140, 60, 253, 172, 253, 130, 231, 6, 26, 122, 31, 194, 185, 237, 61, 242, 48, 242, 225, 93, 9, 212, 223, 80, 125, 162, 48, 110, 141, 220, 221, 134, 121, 108, 250, 255, 112, 232, 160, 110, 244, 243, 82, 102, 120, 23, 187, 228, 218, 186, 187, 15, 83, 253, 210, 172, 160, 15, 223, 32, 101, 163, 18, 93, 98, 84, 173, 122, 95, 131, 10, 102, 27, 13, 184, 236, 238, 7, 124, 131, 23, 190, 100, 163, 34, 235, 68, 91, 255, 150, 182, 142, 202, 73, 101, 94, 79, 214, 109, 12, 124, 11, 59, 38, 189, 230, 157, 94, 150, 243, 198, 131, 111, 228, 221, 227, 7, 213, 80, 176, 214, 80, 133, 16, 90, 2, 1, 215, 27, 115, 134, 107, 254, 227, 160, 25, 134, 87, 95, 39, 110, 35, 178, 8, 253, 141, 133, 112, 105, 81, 251, 45, 64, 111, 14, 198, 213, 237, 127, 73, 72, 207, 1, 57, 161, 232, 90, 20, 241, 77, 107, 113, 255, 11, 205, 106, 35, 15, 119, 51, 154, 215, 241, 5, 245, 6, 59, 245, 22, 254, 28, 149, 171, 242, 160, 158, 76, 135, 134, 11, 74, 146, 113, 88, 48, 26, 117, 29, 176, 203, 177, 243, 31, 205, 4, 37, 62, 249, 80, 100, 46, 8, 72, 141, 4, 94, 249, 78, 161, 124, 122, 35, 211, 200, 52, 160, 63, 24, 233, 245, 202, 96, 157, 33, 39, 170, 4, 88, 178, 56, 139, 86, 6, 107, 215, 58, 97, 108, 73, 157, 151, 84, 48, 38, 182, 137, 47, 141, 75, 196, 232, 117, 97, 203, 226, 66, 147, 104, 192, 112, 18, 74, 104, 154, 165, 59, 150, 218, 38, 6, 57, 210, 152, 65, 130, 82, 208, 148, 170, 76, 136, 26, 222, 25, 49, 80, 144, 14, 141, 17, 181, 127, 222, 7, 173, 139, 85, 69, 217, 44, 41, 247, 85, 133, 194, 194, 219, 105, 4, 216, 184, 9, 156, 124, 101, 31, 103, 148, 59, 209, 91, 17, 250, 244, 196, 172, 99, 106, 186, 122, 189, 134, 49, 221, 48, 97, 231, 170, 173, 21, 12, 69, 63, 141, 79, 29, 89, 31, 9, 74, 158, 241, 142, 242, 226, 244, 132, 163, 160, 80, 91, 12, 119, 30, 23, 64, 210, 124, 170, 173, 205, 160, 155, 167, 41, 59, 208, 29, 235, 94, 167, 181, 5, 207, 29, 52, 77, 194, 34, 42, 159, 136, 2, 44, 187, 208, 60, 121, 186, 144, 205, 0, 86, 107, 254, 31, 167, 215, 236, 114, 91, 200, 203, 154, 175, 226, 177, 84, 218, 100, 79, 149, 247, 171, 92, 131, 86, 94, 110, 143, 191, 55, 68, 253, 7, 165, 205, 84, 179, 24, 99, 181, 0, 75, 129, 233, 253, 207, 226, 91, 195, 218, 172, 92, 95, 6, 121, 55, 233, 217, 9, 193, 76, 105, 24, 41, 214, 217, 158, 240, 125, 40, 147, 165, 136, 47, 242, 20, 114, 95, 114, 236, 104, 20, 86, 251, 134, 224, 21, 248, 229, 167, 124, 132, 103, 27, 114, 42, 47, 154, 209, 207, 16, 186, 234, 101, 224, 209, 159, 56, 196, 110, 4, 141, 237, 25, 211, 141, 27, 132, 250, 243, 170, 7, 241, 177, 219, 248, 196, 144, 139, 32, 116, 157, 9, 131, 243, 245, 59, 82, 34, 62, 220, 45, 27, 136, 139, 133, 172, 7, 47, 161, 0, 123, 105, 41, 101, 78, 227, 217, 22, 179, 138, 49, 170, 150, 0, 181, 159, 29, 191, 169, 237, 115, 165, 81, 122, 13, 251, 213, 152, 156, 152, 140, 191, 132, 94, 126, 121, 170, 85, 228, 112, 22, 127, 45, 46, 202, 71, 210, 93, 74, 233, 99, 223, 159, 232, 96, 142, 232, 208, 129, 128, 56, 235, 34, 178, 144, 92, 219, 188, 213, 121, 184, 194, 131, 29, 171, 144, 60, 12, 158, 59, 218, 156, 245, 171, 143, 90, 171, 105, 183, 123, 191, 176, 78, 193, 51, 1, 74, 226, 30, 65, 251, 202, 166, 22, 243, 50, 175, 17, 231, 195, 226, 209, 21, 37, 234, 231, 151, 111, 144, 224, 47, 194, 207, 217, 41, 31, 112, 210, 181, 43, 207, 180, 89, 239, 12, 58, 178, 237, 11, 92, 1, 130, 93, 89, 169, 10, 153, 27, 72, 219, 185, 137, 238, 164, 115, 124, 13, 75, 157, 24, 231, 175, 51, 71, 198, 88, 70, 79, 15, 79, 234, 147, 55, 23, 45, 121, 197, 43, 195, 75, 4, 208, 11, 38, 232, 116, 30, 71, 6, 138, 161, 24, 73, 78, 210, 44, 33, 168, 222, 124, 249, 161, 29, 110, 99, 104, 246, 208, 53, 16, 151, 195, 33, 3, 71, 95, 154, 220, 152, 12, 242, 36, 74, 100, 145, 200, 157, 197, 243, 0, 151, 159, 242, 181, 165, 251, 160, 98, 132, 44, 228, 22, 153, 216, 30, 244, 155, 130, 202, 36, 188, 208, 230, 131, 72, 97, 43, 251, 78, 149, 152, 105, 209, 52, 56, 65, 235, 165, 58, 14, 195, 3, 52, 241, 4, 71, 4, 26, 231, 91, 109, 97, 231, 193, 116, 115, 45, 94, 213, 157, 102, 63, 215, 15, 148, 94, 206, 174, 172, 19, 156, 230, 73, 228, 173, 195, 197, 61, 137, 56, 108, 103, 253, 179, 150, 250, 208, 157, 75, 100, 217, 194, 35, 129, 228, 53, 158, 89, 153, 130, 173, 21, 195, 92, 112, 127, 168, 48, 87, 224, 72, 252, 20, 177, 183, 103, 249, 193, 109, 100, 27, 1, 125, 164, 226, 243, 206, 197, 145, 166, 178, 228, 157, 121, 188, 86, 76, 126, 225, 247, 164, 94, 137, 113, 100, 199, 58, 225, 239, 179, 164, 224, 160, 90, 26, 194, 212, 129, 16, 0, 161, 243, 131, 193, 124, 246, 231, 153, 48, 238, 189, 199, 67, 255, 206, 20, 113, 109, 198, 170, 73, 73, 162, 108, 82, 228, 159, 220, 136, 80, 58, 167, 100, 253, 5, 41, 41, 145, 32, 16, 235, 107, 201, 23, 106, 110, 226, 52, 78, 9, 148, 250, 248, 25, 213, 200, 36, 131, 19, 164, 42, 173, 175, 237, 136, 173, 140, 156, 96, 36, 126, 158, 255, 55, 244, 0, 60, 111, 54, 241, 82, 247, 119, 80, 68, 102, 110, 95, 82, 144, 2, 246, 187, 167, 134, 18, 40, 48, 129, 145, 202, 70, 219, 183, 163, 48, 185, 223, 8, 6, 116, 235, 48, 219, 2, 199, 158, 56, 235, 194, 37, 146, 53, 58, 174, 6, 3, 252, 110, 82, 149, 234, 0, 191, 241, 9, 58, 43, 61, 17, 92, 34, 133, 106, 105, 196, 100, 133, 30, 67, 132, 104, 250, 181, 169, 133, 19, 159, 37, 247, 214, 191, 142, 88, 16, 104, 74, 26, 238, 162, 99, 102, 29, 28, 161, 245, 125, 188, 107, 13, 132, 110, 214, 233, 159, 205, 167, 7, 196, 149, 13, 225, 208, 154, 161, 6, 192, 59, 79, 85, 24, 174, 97, 16, 93, 224, 102, 47, 82, 111, 246, 4, 174, 119, 11, 110, 204, 245, 114, 33, 125, 90, 109, 94, 180, 219, 34, 202, 16, 59, 156, 115, 15, 234, 182, 19, 16, 163, 213, 183, 107, 0, 148, 62, 210, 105, 38, 251, 171, 34, 211, 108, 39, 156, 14, 75, 59, 229, 99, 176, 161, 144, 127, 133, 253, 35, 152, 86, 12, 180, 214, 155, 116, 121, 203, 95, 37, 255, 73, 218, 123, 95, 106, 248, 138, 46, 191, 11, 131, 84, 3, 226, 76, 67, 119, 187, 245, 103, 108, 7, 50, 33, 65, 227, 74, 113, 204, 130, 114, 4, 50, 141, 13, 154, 115, 106, 2, 26, 125, 221, 119, 155, 180, 21, 206, 177, 197, 231, 52, 233, 14, 137, 135, 243, 134, 133, 149, 237, 75, 140, 52, 228, 176, 79, 187, 133, 226, 12, 111, 54, 207, 82, 201, 160, 1, 194, 47, 41, 129, 85, 199, 194, 82, 144, 87, 164, 56, 58, 9, 24, 166, 128, 181, 52, 41, 111, 46, 221, 58, 95, 8, 80, 101, 94, 18, 0, 146, 67, 165, 109, 101, 73, 229, 143, 215, 143, 116, 159, 33, 241, 174, 241, 151, 210, 252, 159, 177, 159, 181, 113, 8, 137, 137, 11, 7, 63, 227, 58, 52, 122, 25, 245, 21, 57, 77, 63, 37, 173, 245, 27, 67, 145, 116, 199, 167, 31, 17, 247, 24, 186, 149, 7, 234, 14, 131, 38, 129, 254, 78, 240, 35, 145, 110, 9, 18, 111, 190, 157, 91, 8, 212, 154, 163, 21, 253, 105, 178, 31, 111, 181, 191, 136, 146, 102, 102, 85, 24, 162, 178, 52, 93, 55, 62, 184, 160, 145, 37, 97, 94, 191, 20, 87, 142, 14, 36, 190, 170, 10, 148, 86, 56, 251, 83, 24, 169, 163, 211, 140, 32, 101, 137, 227, 120, 209, 177, 148, 166, 125, 73, 97, 94, 202, 131, 230, 54, 172, 229, 152, 53, 41, 231, 207, 200, 219, 99, 146, 64, 78, 69, 182, 62, 136, 217, 131, 139, 18, 193, 55, 157, 80, 22, 199, 199, 131, 233, 245, 98, 114, 251, 33, 79, 233, 219, 244, 237, 243, 68, 117, 156, 76, 202, 52, 100, 101, 135, 13, 16, 55, 31, 77, 205, 11, 109, 182, 181, 201, 141, 163, 199, 165, 86, 52, 156, 233, 102, 50, 248, 70, 108, 39, 215, 56, 146, 106, 111, 74, 88, 195, 23, 225, 14, 51, 162, 205, 220, 255, 72, 193, 157, 91, 24, 22, 25, 200, 212, 228, 67, 99, 91, 12, 196, 246, 25, 175, 234, 124, 239, 252, 219, 201, 253, 233, 160, 54, 224, 122, 238, 142, 89, 220, 73, 212, 156, 119, 147, 252, 81, 6, 170, 5, 224, 56, 41, 142, 200, 158, 18, 127, 123, 215, 154, 144, 182, 100, 81, 66, 163, 73, 254, 152, 126, 70, 110, 165, 7, 92, 98, 19, 189, 86, 241, 247, 80, 24, 224, 164, 68, 122, 144, 233, 216, 48, 202, 56, 30, 105, 160, 158, 243, 170, 72, 223, 234, 174, 130, 189, 163, 154, 11, 110, 92, 108, 246, 15, 116, 124, 12, 190, 97, 8, 16, 124, 30, 2, 248, 138, 34, 91, 203, 255, 69, 68, 54, 237, 153, 10, 114, 50, 167, 119, 44, 164, 210, 51, 145, 22, 151, 170, 3, 163, 178, 149, 228, 205, 95, 99, 16, 160, 26, 91, 153, 249, 230, 237, 18, 249, 172, 43, 194, 72, 215, 147, 146, 161, 155, 35, 43, 255, 40, 120, 149, 153, 179, 84, 129, 181, 95, 20, 172, 237, 194, 121, 197, 11, 67, 252, 183, 5, 32, 35, 40, 115, 29, 2, 241, 15, 168, 157, 51, 161, 63, 15, 219, 190, 106, 232, 116, 193, 247, 33, 127, 236, 5, 11, 179, 84, 242, 243, 81, 40, 93, 90, 8, 202, 143, 54, 194, 106, 73, 235, 131, 26, 181, 146, 150, 178, 63, 40, 50, 111, 28, 197, 106, 14, 59, 3, 117, 245, 172, 223, 224, 93, 214, 214, 211, 190, 99, 254, 233, 87, 216, 74, 207, 145, 49, 153, 220, 8, 136, 183, 188, 212, 96, 226, 66, 155, 187, 138, 22, 239, 174, 30, 119, 65, 30, 221, 70, 9, 0, 69, 34, 175, 220, 159, 61, 226, 241, 169, 149, 117, 195, 179, 249, 163, 186, 108, 163, 51, 220, 39, 85, 99, 177, 242, 22, 173, 15, 14, 118, 26, 159, 96, 247, 230, 127, 110, 94, 57, 128, 94, 107, 116, 50, 161, 39, 210, 29, 82, 89, 11, 118, 21, 236, 130, 221, 110, 116, 247, 198, 8, 198, 11, 224, 157, 29, 194, 127, 180, 84, 143, 233, 236, 243, 40, 22, 35, 54, 86, 66, 164, 105, 236, 244, 237, 231, 26, 152, 226, 32, 151, 168, 80, 177, 200, 186, 70, 231, 82, 179, 187, 174, 86, 168, 48, 114, 254, 58, 95, 65, 205, 171, 3, 64, 100, 143, 106, 173, 107, 230, 238, 207, 23, 87, 70, 120, 53, 139, 60, 235, 254, 38, 119, 128, 47, 130, 81, 71, 88, 140, 209, 2, 61, 108, 164, 54, 121, 126, 184, 63, 40, 179, 49, 214, 123, 10, 123, 237, 172, 37, 216, 125, 110, 34, 196, 130, 230, 114, 30, 214, 156, 5, 144, 168, 131, 180, 35, 81, 194, 124, 97, 86, 14, 231, 7, 56, 100, 125, 161, 199, 36, 168, 86, 231, 226, 169, 202, 211, 145, 161, 18, 63, 74, 183, 166, 12, 138, 64, 247, 36, 245, 82, 24, 72, 196, 122, 120, 218, 163, 247, 129, 199, 250, 194, 231, 34, 253, 49, 35, 79, 142, 207, 42, 82, 213, 254, 148, 181, 158, 192, 253, 211, 219, 124, 52, 98, 250, 162, 112, 162, 98, 209, 177, 128, 167, 59, 176, 172, 119, 232, 131, 25, 146, 227, 116, 0, 118, 231, 151, 83, 51, 149, 16, 250, 107, 136, 230, 247, 161, 5, 32, 56, 183, 151, 248, 136, 32, 231, 85, 252, 242, 181, 16, 151, 177, 219, 50, 133, 13, 15, 12, 38, 252, 40, 5, 89, 104, 197, 130, 239, 212, 201, 181, 215, 164, 178, 237, 131, 49, 201, 198, 241, 189, 144, 24, 5, 25, 165, 33, 142, 252, 228, 18, 230, 56, 19, 44, 152, 147, 141, 36, 89, 253, 61, 227, 133, 24, 168, 146, 12, 4, 108, 156, 150, 110, 57, 15, 43, 218, 6, 214, 154, 209, 8, 14, 235, 186, 220, 94, 175, 170, 77, 80, 207, 216, 74, 32, 82, 125, 30, 66, 65, 165, 102, 76, 21, 70, 207, 239, 217, 154, 158, 213, 254, 18, 153, 155, 158, 197, 142, 194, 202, 190, 9, 85, 217, 66, 113, 237, 183, 102, 22, 43, 95, 240, 173, 181, 183, 109, 79, 9, 109, 10, 181, 209, 113, 226, 146, 84, 108, 26, 134, 183, 119, 95, 19, 110, 81, 6, 254, 103, 124, 240, 164, 223, 240, 232, 104, 86, 23, 78, 52, 14, 102, 151, 145, 186, 67, 189, 218, 252, 183, 37, 115, 166, 226, 148, 21, 212, 105, 131, 47, 25, 227, 37, 70, 167, 193, 157, 29, 43, 128, 57, 237, 223, 231, 153, 47, 57, 57, 110, 143, 182, 107, 61, 74, 45, 26, 213, 220, 217, 231, 220, 95, 193, 174, 226, 77, 202, 83, 33, 128, 181, 84, 224, 237, 143, 201, 236, 18, 28, 157, 86, 20, 211, 136, 50, 90, 190, 98, 228, 184, 69, 194, 123, 140, 126, 79, 58, 194, 46, 12, 98, 126, 241, 122, 98, 66, 197, 148, 94, 127, 193, 207, 202, 48, 244, 131, 168, 201, 80, 226, 109, 127, 5, 190, 93, 192, 81, 120, 8, 31, 156, 185, 251, 52, 61, 7, 255, 1, 1, 232, 153, 232, 69, 252, 243, 80, 134, 189, 217, 202, 31, 28, 33, 247, 190, 1, 154, 224, 57, 253, 209, 92, 9, 173, 32, 6, 186, 95, 166, 206, 133, 34, 194, 217, 185, 202, 149, 90, 74, 205, 244, 68, 237, 53, 65, 59, 255, 145, 178, 170, 171, 83, 89, 196, 210, 61, 128, 91, 69, 25, 213, 201, 55, 71, 175, 89, 51, 50, 228, 21, 125, 76, 8, 86, 247, 205, 190, 149, 49, 223, 65, 98, 116, 36, 163, 130, 219, 252, 10, 30, 195, 110, 164, 62, 175, 185, 198, 196, 184, 69, 148, 170, 164, 113, 82, 51, 209, 186, 174, 141, 186, 78, 220, 60, 62, 63, 53, 189, 156, 104, 67, 39, 217, 229, 106, 113, 35, 152, 66, 48, 190, 253, 99, 35, 9, 196, 210, 109, 54, 247, 8, 194, 111, 198, 49, 55, 151, 170, 115, 80, 198, 65, 137, 246, 197, 131, 148, 204, 8, 227, 160, 225, 79, 19, 144, 41, 182, 44, 34, 230, 70, 139, 56, 32, 34, 234, 124, 95, 29, 0, 17, 217, 234, 146, 105, 160, 106, 101, 203, 0, 236, 150, 184, 143, 247, 30, 37, 14, 8, 117, 55, 236, 231, 186, 224, 73, 214, 238, 88, 109, 174, 130, 236, 69, 27, 11, 27, 60, 61, 133, 158, 106, 162, 41, 49, 180, 107, 127, 197, 207, 206, 107, 106, 176, 56, 180, 149, 130, 252, 77, 221, 189, 230, 20, 173, 46, 159, 68, 169, 168, 161, 178, 74, 189, 58, 156, 221, 9, 137, 216, 110, 102, 218, 181, 154, 56, 78, 32, 233, 148, 28, 13, 4, 25, 111, 103, 140, 66, 64, 133, 115, 226, 247, 44, 34, 11, 127, 29, 240, 30, 11, 62, 127, 120, 156, 48, 125, 53, 133, 235, 60, 179, 217, 115, 212, 20, 223, 150, 218, 220, 158, 244, 143, 225, 228, 222, 81, 249, 214, 190, 56, 48, 122, 98, 223, 120, 164, 148, 115, 26, 143, 3, 78, 253, 114, 180, 139, 122, 81, 243, 141, 103, 52, 184, 170, 216, 78, 161, 192, 25, 25, 184, 125, 131, 200, 96, 106, 111, 164, 153, 141, 43, 14, 192, 10, 106, 45, 178, 72, 114, 57, 161, 78, 33, 161, 97, 57, 205, 252, 145, 102, 38, 164, 229, 9, 55, 44, 83, 101, 83, 114, 180, 144, 19, 30, 245, 2, 9, 7, 98, 59, 77, 18, 234, 98, 230, 37, 85, 211, 113, 183, 84, 231, 228, 204, 139, 222, 46, 48, 222, 99, 51, 127, 162, 252, 129, 100, 124, 2, 203, 192, 114, 184, 139, 213, 58, 238, 253, 203, 60, 67, 205, 2, 114, 215, 83, 0, 95, 79, 122, 206, 164, 87, 157, 159, 208, 6, 243, 26, 27, 249, 63, 130, 172, 79, 10, 208, 171, 125, 247, 132, 218, 91, 68, 136, 159, 1, 36, 164, 3, 156, 7, 164, 105, 35, 227, 188, 166, 57, 178, 44, 77, 4, 171, 126, 243, 54, 24, 185, 41, 219, 116, 234, 103, 21, 189, 40, 123, 116, 76, 37, 133, 44, 109, 74, 81, 165, 96, 77, 230, 146, 102, 16, 111, 234, 104, 84, 62, 40, 122, 202, 162, 86, 235, 199, 127, 187, 254, 117, 182, 95, 253, 5, 111, 98, 54, 112, 237, 169, 123, 213, 243, 190, 221, 12, 181, 151, 57, 7, 178, 234, 123, 59, 167, 224, 236, 66, 214, 125, 215, 160, 38, 232, 100, 138, 148, 47, 168, 115, 121, 33, 254, 48, 194, 47, 44, 190, 33, 49, 127, 173, 182, 240, 31, 18, 14, 198, 231, 187, 91, 74, 202, 78, 65, 133, 178, 151, 48, 159, 201, 95, 213, 128, 78, 85, 216, 98, 3, 79, 24, 119, 47, 147, 211, 94, 16, 226, 139, 112, 162, 43, 170, 211, 203, 225, 173, 141, 215, 142, 214, 157, 23, 171, 3, 41, 101, 142, 180, 63, 165, 139, 10, 187, 14, 129, 34, 241, 33, 214, 38, 179, 4, 20, 231, 13, 199, 102, 156, 216, 19, 43, 106, 65, 47, 153, 104, 114, 133, 167, 231, 136, 5, 182, 208, 66, 220, 49, 161, 143, 119, 120, 0, 24, 91, 170, 128, 225, 112, 158, 244, 95, 208, 157, 15, 166, 101, 204, 248, 108, 23, 212, 138, 130, 117, 0, 195, 44, 26, 113, 196, 124, 136, 99, 247, 221, 76, 109, 115, 198, 252, 244, 174, 253, 228, 215, 52, 27, 242, 64, 246, 136, 137, 191, 239, 38, 247, 199, 82, 190, 181, 103, 34, 222, 234, 218, 161, 180, 99, 130, 142, 27, 72, 252, 62, 30, 209, 109, 104, 238, 113, 33, 25, 12, 59, 85, 181, 117, 10, 221, 38, 149, 11, 18, 198, 82, 254, 109, 232, 1, 40, 155, 36, 114, 203, 206, 14, 255, 8, 164, 90, 144, 15, 107, 183, 153, 153, 153, 202, 98, 200, 84, 191, 82, 103, 40, 90, 26, 183, 208, 237, 134, 12, 181, 176, 126, 117, 152, 255, 162, 247, 139, 159, 238, 43, 85, 103, 23, 188, 188, 195, 73, 165, 29, 227, 197, 8, 78, 234, 194, 185, 242, 194, 95, 48, 42, 45, 252, 76, 162, 71, 40, 189, 177, 163, 42, 30, 38, 84, 188, 137, 111, 151, 57, 205, 39, 53, 106, 103, 250, 222, 148, 192, 254, 149, 65, 173, 1, 101, 113, 115, 147, 224, 233, 125, 49, 208, 24, 192, 221, 44, 100, 106, 190, 213, 136, 86, 84, 183, 128, 216, 110, 228, 19, 187, 121, 150, 134, 254, 73, 119, 220, 92, 78, 136, 38, 128, 99, 134, 221, 246, 153, 248, 103, 250, 196, 181, 94, 171, 75, 54, 8, 196, 66, 241, 161, 31, 161, 142, 120, 0, 181, 71, 27, 65, 223, 65, 47, 104, 5, 146, 159, 148, 245, 250, 243, 71, 57, 200, 203, 215, 106, 35, 6, 14, 19, 250, 52, 124, 69, 68, 11, 128, 70, 200, 9, 65, 132, 123, 219, 125, 40, 100, 36, 198, 210, 5, 172, 114, 125, 140, 222, 85, 203, 189, 175, 139, 160, 225, 121, 194, 183, 225, 107, 26, 45, 192, 229, 13, 226, 16, 51, 229, 3, 142, 91, 123, 115, 249, 121, 22, 25, 254, 25, 146, 244, 198, 185, 157, 178, 53, 165, 93, 79, 140, 17, 131, 195, 157, 46, 41, 208, 60, 133, 218, 90, 197, 193, 213, 233, 229, 95, 134, 231, 196, 160, 81, 12, 69, 163, 240, 56, 244, 62], + [62, 91, 104, 1, 154, 77, 202, 22, 195, 51, 29, 214, 143, 99, 34, 138, 105, 54, 255, 66, 237, 43, 77, 180, 239, 82, 159, 232, 128, 196, 185, 19, 50, 44, 2, 67, 197, 57, 221, 47, 161, 184, 11, 206, 133, 63, 139, 151, 51, 59, 142, 224, 179, 34, 215, 1, 217, 160, 107, 219, 219, 191, 51, 129, 18, 198, 15, 165, 171, 73, 193, 10, 106, 32, 221, 162, 83, 96, 15, 109, 16, 109, 219, 13, 91, 237, 208, 192, 41, 126, 134, 7, 82, 44, 245, 155, 64, 219, 89, 109, 207, 208, 190, 228, 163, 36, 56, 189, 78, 170, 90, 126, 40, 137, 238, 215, 208, 109, 120, 152, 248, 127, 0, 36, 41, 9, 175, 121, 189, 207, 221, 229, 119, 112, 18, 112, 134, 134, 1, 16, 59, 177, 65, 58, 83, 100, 226, 179, 10, 36, 200, 12, 246, 6, 45, 131, 4, 12, 41, 38, 44, 26, 242, 201, 64, 224, 228, 227, 251, 98, 234, 201, 134, 197, 197, 117, 120, 83, 171, 189, 207, 239, 144, 204, 211, 46, 225, 144, 103, 95, 224, 95, 186, 36, 126, 202, 46, 154, 4, 103, 241, 67, 223, 221, 209, 253, 178, 94, 180, 13, 225, 41, 143, 49, 86, 114, 163, 54, 216, 235, 186, 159, 98, 189, 232, 77, 165, 84, 182, 227, 187, 125, 130, 135, 150, 180, 51, 13, 222, 65, 242, 181, 134, 41, 47, 104, 52, 154, 213, 92, 225, 67, 216, 11, 245, 50, 200, 29, 0, 9, 134, 167, 106, 73, 22, 207, 138, 249, 46, 26, 219, 49, 69, 149, 14, 69, 99, 13, 87, 205, 215, 232, 20, 134, 192, 202, 253, 172, 116, 205, 223, 183, 79, 49, 197, 175, 183, 188, 245, 99, 179, 156, 146, 96, 71, 79, 159, 117, 66, 233, 233, 46, 88, 195, 189, 168, 163, 52, 21, 232, 18, 78, 224, 119, 234, 147, 188, 151, 158, 8, 51, 96, 224, 36, 73, 226, 78, 1, 28, 32, 53, 84, 48, 14, 204, 107, 238, 37, 195, 80, 127, 27, 31, 65, 36, 240, 213, 216, 130, 184, 34, 243, 169, 183, 124, 3, 251, 202, 112, 209, 147, 56, 241, 39, 11, 43, 167, 155, 79, 65, 36, 108, 104, 109, 64, 44, 118, 5, 119, 27, 174, 134, 33, 170, 22, 253, 16, 220, 253, 191, 190, 87, 74, 209, 54, 190, 171, 229, 54, 166, 131, 172, 46, 64, 112, 99, 187, 91, 122, 180, 164, 157, 205, 233, 24, 111, 71, 88, 234, 14, 113, 106, 147, 89, 207, 133, 188, 169, 55, 14, 155, 178, 14, 178, 184, 226, 174, 126, 217, 191, 3, 29, 30, 233, 172, 151, 41, 234, 208, 166, 41, 220, 155, 166, 120, 122, 113, 146, 168, 230, 242, 135, 10, 37, 191, 213, 242, 170, 21, 124, 109, 173, 45, 99, 41, 28, 35, 141, 29, 203, 81, 2, 120, 89, 225, 25, 6, 46, 62, 215, 122, 186, 155, 126, 231, 119, 93, 211, 192, 184, 85, 83, 23, 55, 157, 230, 165, 78, 227, 248, 32, 138, 188, 15, 26, 81, 251, 156, 178, 77, 233, 118, 78, 1, 172, 127, 18, 130, 75, 254, 143, 119, 196, 18, 96, 47, 216, 18, 59, 54, 73, 214, 46, 55, 22, 105, 15, 10, 117, 146, 76, 195, 166, 20, 253, 42, 19, 160, 30, 109, 237, 199, 163, 63, 172, 174, 138, 238, 201, 227, 106, 220, 59, 254, 73, 155, 249, 182, 68, 91, 183, 92, 37, 140, 129, 105, 40, 70, 129, 41, 141, 142, 177, 0, 21, 47, 122, 203, 19, 230, 131, 99, 160, 92, 15, 17, 215, 167, 170, 179, 38, 96, 12, 201, 101, 89, 5, 185, 63, 154, 237, 154, 156, 230, 74, 60, 191, 91, 112, 162, 133, 76, 243, 182, 12, 171, 27, 68, 169, 164, 195, 98, 67, 86, 177, 142, 160, 224, 17, 2, 93, 69, 49, 63, 71, 87, 69, 73, 125, 217, 76, 119, 150, 24, 89, 95, 29, 76, 149, 221, 165, 4, 72, 74, 243, 193, 226, 175, 184, 8, 238, 231, 149, 21, 239, 10, 10, 23, 54, 122, 83, 30, 142, 106, 136, 221, 169, 241, 131, 33, 153, 202, 191, 31, 155, 63, 252, 255, 99, 183, 174, 190, 234, 215, 90, 72, 122, 25, 60, 53, 54, 67, 209, 33, 89, 31, 151, 186, 131, 225, 15, 9, 176, 220, 184, 168, 35, 134, 173, 81, 152, 179, 97, 225, 122, 46, 168, 13, 142, 193, 147, 4, 1, 153, 24, 230, 194, 201, 222, 42, 227, 110, 143, 142, 19, 173, 219, 176, 123, 77, 160, 227, 137, 205, 57, 22, 206, 120, 74, 131, 45, 135, 157, 88, 253, 111, 240, 243, 207, 252, 199, 227, 192, 201, 178, 57, 172, 184, 134, 159, 130, 196, 158, 106, 211, 66, 44, 102, 88, 64, 77, 70, 239, 151, 182, 111, 234, 159, 250, 42, 69, 44, 187, 69, 197, 45, 204, 109, 62, 9, 71, 36, 215, 19, 136, 229, 189, 204, 251, 245, 38, 244, 159, 148, 134, 173, 56, 232, 158, 109, 244, 135, 135, 61, 8, 139, 63, 145, 175, 79, 206, 242, 58, 201, 81, 33, 105, 153, 207, 49, 202, 219, 244, 88, 65, 248, 140, 249, 16, 136, 128, 53, 43, 15, 100, 191, 25, 247, 98, 86, 103, 61, 121, 249, 8, 100, 123, 105, 56, 220, 61, 57, 89, 188, 186, 188, 102, 139, 61, 228, 118, 255, 51, 199, 129, 21, 77, 191, 39, 213, 41, 147, 155, 216, 59, 31, 161, 201, 157, 95, 85, 133, 195, 135, 27, 155, 228, 145, 44, 101, 161, 245, 233, 111, 190, 104, 102, 188, 103, 228, 145, 200, 170, 153, 180, 168, 143, 173, 163, 249, 219, 113, 100, 202, 142, 103, 102, 73, 44, 168, 241, 237, 235, 252, 46, 247, 241, 17, 70, 247, 131, 76, 255, 106, 204, 5, 247, 181, 96, 222, 168, 18, 183, 205, 207, 83, 104, 166, 133, 73, 150, 37, 112, 223, 117, 180, 79, 190, 105, 186, 23, 78, 120, 220, 143, 66, 138, 201, 132, 206, 174, 86, 38, 185, 211, 57, 144, 207, 116, 158, 181, 75, 225, 104, 222, 181, 99, 139, 239, 143, 202, 126, 213, 35, 242, 53, 203, 125, 119, 76, 152, 49, 62, 99, 174, 146, 101, 45, 214, 240, 229, 34, 105, 18, 238, 123, 25, 28, 238, 187, 156, 230, 114, 182, 254, 194, 115, 123, 39, 81, 45, 49, 20, 218, 93, 127, 16, 183, 252, 7, 30, 163, 200, 185, 39, 114, 138, 182, 50, 51, 34, 36, 24, 88, 180, 136, 73, 178, 186, 79, 93, 49, 123, 159, 109, 185, 163, 164, 48, 157, 239, 211, 11, 19, 138, 42, 237, 89, 51, 202, 143, 11, 56, 36, 122, 159, 25, 185, 6, 81, 6, 198, 98, 189, 153, 125, 59, 57, 236, 110, 37, 197, 185, 121, 250, 50, 56, 74, 41, 221, 158, 10, 136, 242, 40, 16, 85, 69, 239, 220, 93, 109, 194, 182, 155, 89, 205, 42, 238, 149, 25, 41, 172, 216, 92, 194, 55, 209, 226, 175, 157, 131, 134, 206, 159, 88, 203, 250, 30, 101, 5, 130, 241, 34, 76, 11, 126, 130, 192, 34, 36, 30, 227, 221, 136, 110, 42, 165, 248, 0, 239, 175, 207, 99, 239, 70, 32, 92, 206, 239, 128, 131, 212, 81, 185, 179, 153, 51, 146, 160, 66, 163, 178, 82, 167, 4, 185, 181, 22, 243, 237, 79, 213, 202, 42, 99, 65, 148, 117, 151, 65, 102, 240, 154, 198, 66, 67, 121, 86, 101, 232, 89, 254, 176, 84, 245, 112, 185, 6, 36, 151, 80, 214, 72, 247, 53, 29, 183, 129, 16, 39, 236, 13, 173, 16, 181, 231, 115, 84, 92, 44, 243, 129, 98, 56, 143, 208, 99, 114, 13, 185, 147, 170, 234, 238, 123, 30, 148, 134, 33, 247, 106, 216, 159, 128, 24, 46, 186, 18, 188, 131, 128, 112, 93, 254, 74, 103, 220, 24, 75, 75, 28, 149, 46, 12, 206, 69, 243, 188, 171, 45, 127, 184, 196, 31, 234, 210, 21, 221, 224, 254, 8, 113, 181, 91, 6, 253, 61, 79, 68, 25, 64, 148, 224, 196, 247, 212, 194, 6, 250, 195, 210, 101, 195, 130, 222, 219, 255, 29, 134, 34, 116, 67, 233, 216, 215, 2, 20, 67, 176, 81, 118, 112, 35, 86, 238, 62, 174, 39, 36, 43, 66, 161, 109, 11, 203, 135, 217, 52, 153, 12, 138, 188, 107, 0, 54, 209, 92, 108, 137, 254, 62, 144, 114, 41, 207, 100, 214, 37, 86, 117, 131, 175, 218, 127, 18, 6, 4, 41, 96, 218, 62, 67, 35, 139, 170, 215, 11, 86, 239, 196, 143, 243, 25, 194, 139, 115, 135, 222, 186, 25, 13, 176, 180, 75, 239, 100, 201, 26, 7, 169, 251, 36, 170, 224, 160, 65, 214, 64, 213, 114, 198, 29, 200, 113, 5, 177, 40, 231, 108, 229, 4, 88, 184, 191, 7, 250, 187, 215, 194, 146, 228, 17, 199, 44, 8, 3, 95, 132, 23, 225, 151, 14, 110, 167, 241, 74, 132, 5, 8, 187, 223, 205, 192, 21, 27, 93, 78, 175, 209, 166, 131, 164, 9, 239, 165, 224, 190, 203, 82, 229, 204, 101, 148, 243, 230, 33, 143, 63, 126, 181, 135, 96, 87, 127, 255, 85, 242, 27, 23, 147, 152, 149, 182, 89, 236, 141, 171, 33, 9, 36, 85, 81, 98, 115, 39, 198, 1, 5, 158, 75, 85, 224, 102, 29, 35, 62, 156, 106, 166, 182, 191, 88, 167, 65, 211, 214, 17, 222, 177, 233, 230, 247, 144, 160, 137, 198, 45, 207, 141, 63, 139, 143, 91, 79, 126, 89, 170, 66, 173, 248, 57, 103, 234, 99, 16, 91, 55, 169, 113, 156, 125, 135, 71, 52, 51, 228, 177, 231, 114, 131, 255, 226, 63, 241, 131, 42, 13, 95, 181, 92, 180, 192, 63, 107, 64, 5, 146, 19, 155, 189, 162, 146, 111, 105, 171, 145, 40, 201, 185, 153, 116, 203, 27, 248, 177, 1, 121, 94, 220, 21, 148, 28, 252, 141, 65, 33, 251, 88, 17, 27, 31, 246, 133, 222, 61, 191, 147, 18, 57, 202, 56, 223, 111, 8, 128, 190, 223, 106, 240, 68, 13, 245, 22, 53, 45, 196, 56, 208, 4, 93, 158, 121, 253, 152, 39, 72, 122, 238, 138, 198, 87, 25, 230, 140, 242, 196, 127, 148, 113, 238, 219, 184, 1, 177, 17, 164, 18, 133, 104, 130, 232, 71, 179, 110, 203, 163, 176, 224, 225, 55, 56, 184, 135, 21, 175, 98, 223, 207, 151, 62, 140, 155, 20, 117, 131, 89, 64, 130, 22, 231, 85, 194, 211, 227, 16, 182, 241, 153, 97, 30, 84, 163, 5, 22, 45, 31, 122, 197, 255, 87, 157, 114, 102, 147, 52, 151, 56, 7, 69, 101, 246, 220, 231, 13, 204, 152, 202, 247, 230, 121, 171, 34, 93, 17, 12, 177, 112, 88, 15, 15, 115, 208, 141, 81, 154, 209, 62, 252, 33, 143, 112, 113, 217, 64, 158, 236, 35, 241, 197, 2, 25, 206, 60, 194, 177, 131, 101, 217, 146, 40, 80, 64, 141, 127, 199, 123, 16, 191, 85, 202, 205, 57, 93, 107, 154, 4, 213, 248, 144, 2, 109, 135, 182, 186, 73, 190, 253, 2, 0, 40, 124, 194, 135, 57, 175, 214, 72, 31, 197, 62, 42, 54, 177, 136, 179, 233, 122, 100, 142, 102, 11, 229, 153, 204, 67, 197, 44, 166, 140, 223, 149, 5, 220, 203, 105, 34, 152, 195, 116, 35, 37, 72, 156, 71, 139, 145, 188, 252, 80, 149, 65, 39, 238, 120, 103, 24, 236, 7, 229, 147, 255, 150, 105, 31, 6, 154, 231, 53, 206, 96, 126, 246, 96, 7, 164, 128, 27, 151, 5, 45, 24, 96, 146, 166, 205, 144, 192, 128, 97, 5, 52, 63, 167, 129, 61, 56, 0, 251, 98, 5, 242, 47, 88, 208, 149, 63, 255, 137, 72, 53, 250, 141, 100, 88, 53, 119, 137, 19, 214, 125, 224, 158, 128, 125, 243, 60, 16, 235, 4, 127, 124, 61, 24, 215, 201, 56, 132, 103, 149, 40, 165, 185, 66, 171, 21, 142, 121, 140, 142, 142, 106, 66, 205, 183, 14, 18, 47, 195, 167, 251, 178, 154, 80, 137, 90, 196, 117, 27, 133, 198, 78, 56, 198, 125, 134, 73, 42, 83, 89, 27, 226, 252, 21, 239, 36, 55, 170, 197, 96, 229, 194, 239, 62, 218, 123, 148, 127, 158, 216, 102, 96, 211, 9, 165, 92, 18, 10, 233, 31, 218, 150, 93, 69, 248, 139, 84, 220, 108, 110, 196, 52, 80, 134, 33, 82, 221, 1, 127, 200, 138, 21, 248, 36, 243, 250, 181, 114, 197, 60, 6, 53, 146, 41, 28, 128, 50, 83, 175, 63, 215, 249, 131, 19, 186, 87, 1, 196, 127, 1, 15, 149, 45, 18, 182, 104, 171, 93, 159, 1, 119, 225, 95, 230, 133, 206, 196, 6, 52, 27, 12, 197, 165, 50, 112, 229, 58, 235, 216, 196, 106, 35, 225, 189, 106, 222, 23, 145, 103, 225, 253, 251, 54, 162, 169, 127, 67, 229, 44, 33, 89, 114, 145, 236, 102, 185, 238, 248, 55, 54, 10, 189, 28, 10, 34, 59, 46, 180, 219, 209, 140, 103, 220, 201, 76, 71, 96, 127, 51, 180, 250, 101, 183, 54, 94, 232, 191, 195, 34, 89, 183, 159, 88, 172, 38, 204, 35, 77, 194, 38, 158, 169, 204, 45, 129, 130, 162, 194, 77, 146, 126, 82, 88, 38, 144, 225, 48, 38, 153, 8, 36, 104, 4, 11, 178, 232, 160, 83, 59, 104, 162, 134, 137, 163, 48, 27, 38, 116, 46, 232, 123, 244, 1, 200, 35, 131, 163, 118, 145, 204, 0, 149, 22, 77, 245, 156, 119, 212, 9, 72, 5, 202, 156, 110, 184, 71, 231, 144, 168, 57, 243, 153, 144, 100, 252, 251, 200, 56, 96, 1, 157, 238, 193, 252, 235, 86, 202, 208, 2, 58, 213, 109, 41, 45, 182, 131, 168, 207, 57, 48, 95, 158, 33, 149, 44, 250, 56, 28, 137, 125, 112, 242, 117, 154, 163, 77, 163, 133, 68, 74, 64, 168, 194, 228, 35, 119, 98, 116, 26, 240, 83, 189, 34, 243, 137, 52, 185, 143, 147, 184, 125, 179, 174, 124, 99, 28, 101, 144, 194, 212, 236, 61, 116, 202, 167, 207, 221, 235, 68, 229, 232, 177, 246, 196, 186, 96, 181, 231, 230, 219, 149, 208, 53, 96, 141, 172, 138, 29, 78, 250, 184, 253, 210, 172, 116, 249, 204, 118, 186, 42, 47, 87, 164, 29, 6, 17, 178, 197, 248, 66, 120, 6, 13, 1, 1, 99, 11, 247, 190, 254, 54, 94, 82, 205, 145, 8, 54, 169, 233, 48, 165, 60, 146, 86, 10, 241, 224, 213, 56, 185, 29, 189, 79, 248, 88, 28, 193, 112, 128, 130, 187, 116, 69, 43, 4, 218, 147, 115, 25, 165, 69, 236, 91, 74, 135, 129, 28, 155, 116, 240, 189, 40, 161, 81, 189, 69, 47, 21, 9, 59, 3, 1, 51, 192, 128, 143, 66, 56, 73, 80, 15, 159, 31, 127, 109, 202, 149, 166, 36, 17, 231, 243, 61, 7, 131, 220, 230, 199, 64, 114, 127, 90, 194, 107, 20, 11, 227, 230, 107, 165, 187, 135, 104, 118, 70, 127, 18, 87, 194, 99, 59, 209, 150, 136, 237, 65, 159, 160, 123, 22, 243, 51, 149, 153, 226, 224, 76, 82, 109, 89, 91, 221, 117, 109, 80, 106, 182, 254, 192, 77, 107, 92, 190, 71, 72, 41, 27, 252, 83, 27, 106, 247, 162, 90, 190, 45, 107, 27, 248, 249, 147, 248, 3, 125, 0, 204, 113, 211, 135, 35, 215, 53, 77, 218, 141, 220, 121, 248, 76, 113, 0, 113, 33, 216, 217, 127, 141, 188, 5, 181, 196, 138, 109, 255, 62, 160, 17, 148, 137, 179, 176, 135, 32, 194, 220, 184, 49, 213, 21, 238, 181, 31, 150, 247, 104, 41, 188, 0, 238, 81, 7, 129, 170, 203, 139, 116, 81, 97, 176, 132, 57, 66, 90, 71, 99, 248, 220, 184, 111, 170, 218, 16, 2, 79, 18, 157, 250, 193, 181, 108, 19, 189, 156, 3, 166, 79, 96, 73, 1, 191, 51, 143, 84, 31, 151, 88, 243, 255, 203, 184, 126, 143, 250, 152, 12, 126, 1, 84, 5, 159, 234, 11, 120, 22, 80, 192, 73, 47, 216, 42, 6, 42, 153, 252, 178, 0, 127, 55, 101, 109, 10, 224, 24, 133, 175, 193, 69, 226, 100, 134, 161, 108, 210, 64, 156, 207, 107, 236, 233, 56, 235, 174, 115, 48, 236, 246, 148, 228, 163, 229, 173, 154, 19, 212, 170, 206, 173, 180, 205, 71, 92, 221, 165, 130, 72, 61, 40, 251, 116, 106, 230, 225, 16, 39, 229, 18, 106, 108, 215, 139, 71, 215, 82, 33, 75, 253, 106, 133, 107, 39, 86, 227, 103, 206, 140, 17, 194, 57, 52, 229, 142, 104, 4, 41, 88, 28, 112, 134, 50, 92, 145, 246, 251, 141, 255, 238, 134, 38, 128, 184, 192, 67, 43, 145, 146, 50, 128, 13, 50, 85, 121, 121, 28, 240, 237, 60, 41, 147, 124, 218, 149, 248, 236, 36, 125, 129, 140, 2, 239, 9, 26, 207, 229, 7, 187, 5, 121, 102, 190, 242, 189, 10, 223, 21, 176, 241, 243, 234, 17, 181, 10, 248, 123, 200, 44, 27, 13, 159, 68, 39, 158, 219, 15, 157, 130, 87, 244, 184, 33, 169, 116, 31, 184, 17, 6, 168, 208, 149, 17, 92, 253, 48, 78, 161, 222, 109, 246, 41, 212, 88, 137, 215, 120, 172, 151, 6, 221, 3, 208, 235, 233, 161, 185, 10, 143, 117, 71, 16, 37, 120, 10, 106, 8, 246, 176, 57, 52, 178, 203, 187, 151, 207, 16, 138, 114, 26, 228, 167, 255, 36, 3, 73, 48, 239, 32, 11, 31, 10, 238, 221, 138, 196, 25, 187, 137, 97, 189, 127, 144, 78, 12, 248, 245, 196, 161, 144, 52, 76, 181, 79, 31, 90, 42, 60, 148, 213, 168, 241, 108, 217, 47, 174, 219, 124, 250, 63, 148, 65, 181, 180, 128, 187, 172, 40, 150, 160, 189, 115, 45, 47, 250, 136, 47, 223, 78, 120, 129, 7, 255, 88, 185, 156, 76, 44, 216, 181, 150, 46, 67, 30, 82, 179, 114, 137, 44, 109, 101, 246, 124, 36, 27, 94, 46, 195, 163, 141, 36, 212, 91, 207, 178, 14, 134, 139, 7, 247, 175, 199, 42, 87, 30, 133, 126, 157, 253, 15, 14, 131, 189, 47, 201, 117, 70, 160, 121, 157, 107, 171, 185, 243, 197, 183, 92, 79, 86, 115, 173, 1, 10, 167, 198, 146, 174, 218, 46, 31, 47, 21, 7, 186, 239, 204, 36, 129, 105, 90, 148, 135, 10, 131, 129, 20, 130, 150, 90, 70, 229, 84, 170, 206, 117, 123, 52, 233, 218, 150, 154, 206, 238, 129, 225, 32, 186, 116, 147, 143, 57, 57, 32, 6, 37, 66, 248, 177, 96, 233, 98, 22, 251, 135, 191, 57, 19, 106, 9, 195, 228, 86, 163, 247, 86, 30, 198, 121, 188, 119, 36, 50, 24, 44, 159, 9, 126, 77, 117, 150, 241, 239, 38, 75, 127, 20, 56, 155, 221, 77, 135, 19, 186, 245, 146, 221, 91, 94, 16, 193, 163, 14, 99, 94, 233, 219, 0, 254, 60, 153, 179, 91, 30, 167, 163, 215, 4, 154, 59, 0, 58, 190, 242, 153, 253, 211, 33, 144, 187, 106, 98, 142, 44, 54, 205, 92, 219, 181, 188, 68, 196, 192, 59, 14, 199, 154, 220, 103, 242, 10, 152, 251, 8, 132, 169, 56, 178, 128, 93, 244, 145, 37, 232, 71, 33, 169, 105, 140, 40, 146, 208, 229, 58, 206, 109, 91, 151, 189, 87, 162, 242, 115, 125, 203, 152, 174, 210, 30, 37, 93, 196, 21, 253, 162, 138, 66, 241, 43, 166, 96, 211, 105, 7, 210, 38, 45, 199, 245, 172, 82, 174, 45, 126, 188, 121, 234, 150, 242, 185, 165, 125, 0, 72, 80, 72, 156, 186, 214, 223, 109, 109, 69, 6, 76, 135, 208, 163, 104, 204, 34, 21, 90, 225, 99, 179, 170, 38, 52, 58, 34, 135, 220, 50, 135, 196, 86, 225, 161, 253, 36, 152, 221, 223, 238, 95, 189, 175, 107, 34, 179, 189, 115, 164, 186, 62, 56, 226, 171, 111, 97, 149, 113, 147, 192, 172, 15, 205, 185, 129, 93, 29, 209, 166, 127, 188, 216, 203, 190, 143, 31, 154, 67, 36, 79, 149, 197, 101, 112, 22, 26, 98, 99, 176, 20, 29, 35, 33, 45, 107, 181, 200, 140, 201, 179, 113, 66, 35, 185, 254, 48, 142, 45, 147, 104, 186, 147, 167, 219, 72, 93, 61, 201, 25, 7, 153, 202, 72, 165, 249, 183, 168, 219, 22, 21, 150, 227, 76, 160, 24, 162, 202, 22, 69, 116, 246, 40, 21, 213, 6, 212, 146, 41, 51, 97, 60, 145, 31, 137, 65, 38, 190, 123, 190, 66, 60, 207, 96, 251, 97, 251, 158, 33, 184, 244, 49, 22, 121, 55, 235, 239, 85, 94, 72, 190, 34, 240, 1, 244, 19, 8, 86, 65, 122, 222, 155, 76, 17, 209, 48, 27, 249, 221, 125, 107, 117, 211, 91, 64, 233, 184, 222, 116, 226, 7, 62, 60, 5, 126, 73, 251, 129, 113, 203, 61, 166, 209, 118, 24, 35, 148, 129, 207, 135, 156, 212, 42, 232, 205, 6, 126, 112, 128, 153, 89, 36, 145, 229, 112, 147, 66, 6, 79, 19, 6, 27, 90, 135, 151, 45, 59, 94, 248, 214, 207, 154, 31, 172, 209, 244, 227, 9, 201, 192, 37, 125, 232, 177, 86, 231, 103, 181, 56, 243, 112, 28, 97, 64, 2, 139, 13, 186, 69, 205, 140, 94, 241, 240, 111, 74, 104, 195, 65, 66, 106, 71, 52, 122, 55, 85, 221, 9, 57, 111, 246, 51, 33, 234, 73, 32, 74, 231, 170, 68, 173, 125, 87, 130, 67, 65, 172, 58, 25, 84, 130, 133, 185, 166, 209, 203, 100, 227, 34, 43, 228, 206, 191, 93, 64, 191, 154, 46, 254, 41, 178, 63, 217, 170, 164, 19, 14, 58, 225, 54, 225, 146, 166, 104, 78, 61, 194, 46, 43, 99, 139, 24, 20, 45, 47, 105, 94, 243, 238, 111, 254, 38, 188, 200, 135, 49, 81, 198, 30, 239, 218, 176, 127, 66, 47, 238, 147, 95, 89, 7, 21, 127, 220, 38, 62, 151, 120, 50, 52, 8, 217, 106, 42, 136, 91, 127, 175, 151, 225, 14, 74, 198, 73, 102, 209, 164, 202, 217, 40, 127, 188, 140, 89, 194, 198, 89, 40, 113, 180, 52, 244, 22, 164, 124, 2, 76, 18, 173, 30, 196, 222, 75, 154, 145, 182, 1, 138, 26, 4, 84, 105, 23, 182, 102, 187, 43, 70, 134, 241, 124, 165, 237, 90, 0, 70, 210, 3, 158, 188, 176, 4, 3, 118, 161, 132, 89, 210, 106, 137, 103, 243, 125, 53, 142, 154, 19, 191, 40, 174, 190, 102, 124, 231, 107, 1, 23, 77, 75, 55, 199, 214, 154, 115, 204, 135, 11, 172, 187, 139, 208, 20, 57, 49, 201, 149, 206, 221, 47, 235, 66, 135, 48, 73, 10, 114, 7, 238, 111, 160, 175, 243, 183, 126, 61, 158, 66, 110, 166, 140, 162, 24, 120, 244, 249, 154, 226, 30, 59, 83, 154, 114, 168, 72, 247, 242, 136, 93, 76, 67, 97, 160, 77, 112, 130, 134, 143, 120, 55, 225, 13, 42, 242, 93, 68, 125, 48, 15, 97, 172, 190, 184, 142, 146, 208, 167, 246, 29, 224, 247, 41, 191, 144, 42, 107, 82, 30, 139, 245, 193, 50, 54, 192, 195, 222, 124, 226, 236, 193, 192, 0, 120, 239, 44, 214, 203, 211, 215, 110, 5, 209, 71, 10, 38, 149, 182, 190, 243, 15, 150, 228, 125, 27, 254, 210, 213, 243, 90, 249, 173, 128, 93, 195, 97, 16, 246, 165, 95, 27, 0, 39, 214, 80, 77, 194, 126, 79, 186, 85, 110, 220, 75, 151, 220, 47, 202, 138, 26, 84, 240, 14, 178, 138, 58, 155, 240, 184, 95, 61, 74, 158, 33, 241, 179, 11, 123, 210, 37, 160, 248, 10, 29, 27, 139, 85, 204, 124, 48, 241, 101, 41, 51, 158, 252, 156, 57, 25, 32, 151, 106, 174, 201, 112, 47, 109, 78, 210, 252, 236, 227, 179, 217, 69, 100, 196, 5, 110, 197, 199, 162, 253, 150, 201, 126, 113, 113, 236, 79, 188, 85, 191, 155, 112, 53, 194, 2, 221, 78, 120, 80, 37, 211, 176, 210, 116, 181, 6, 64, 1, 158, 198, 80, 178, 69, 68, 240, 202, 136, 178, 210, 29, 53, 17, 232, 243, 248, 197, 93, 75, 136, 20, 32, 35, 90, 12, 246, 80, 249, 72, 251, 14, 172, 223, 250, 68, 219, 167, 66, 107, 214, 228, 166, 248, 50, 78, 78, 32, 169, 216, 179, 6, 180, 222, 41, 160, 158, 51, 103, 227, 87, 58, 71, 188, 104, 86, 77, 25, 120, 148, 136, 137, 170, 7, 76, 36, 105, 77, 91, 230, 69, 171, 52, 97, 123, 215, 195, 182, 42, 25, 144, 178, 174, 24, 119, 51, 196, 73, 223, 84, 152, 136, 150, 10, 167, 131, 211, 4, 218, 37, 101, 214, 85, 222, 7, 224, 60, 245, 48, 87, 151, 207, 155, 195, 96, 159, 77, 126, 69, 196, 43, 134, 37, 52, 132, 252, 30, 162, 109, 243, 178, 39, 21, 235, 176, 253, 225, 134, 251, 50, 146, 216, 154, 46, 70, 230, 147, 6, 201, 37, 86, 91, 66, 157, 69, 137, 168, 52, 236, 2, 195, 225, 35, 97, 227, 122, 110, 81, 173, 118, 52, 184, 101, 60, 128, 239, 45, 43, 208, 184, 218, 174, 218, 8, 131, 147, 126, 32, 236, 17, 180, 165, 77, 81, 188, 84, 188, 128, 113, 6, 188, 0, 89, 162, 57, 53, 33, 215, 236, 45, 99, 124, 201, 170, 152, 138, 24, 95, 222, 204, 150, 240, 224, 221, 161, 71, 6, 32, 38, 115, 46, 83, 102, 87, 59, 0, 210, 221, 142, 27, 236, 224, 225, 109, 67, 35, 116, 10, 239, 161, 87, 163, 218, 43, 14, 26, 4, 140, 79, 74, 35, 62, 57, 140, 111, 180, 129, 116, 249, 211, 101, 252, 39, 105, 218, 29, 78, 194, 187, 230, 140, 111, 171, 213, 224, 207, 83, 148, 33, 235, 140, 57, 72, 55, 115, 144, 51, 115, 87, 99, 104, 210, 125, 171, 203, 30, 153, 76, 142, 173, 253, 26, 220, 19, 208, 75, 206, 2, 67, 107, 159, 96, 231, 67, 240, 22, 54, 248, 175, 68, 114, 119, 70, 0, 37, 236, 54, 130, 79, 49, 111, 172, 123, 97, 24, 70, 16, 65, 187, 81, 182, 49, 165, 238, 225, 3, 15, 76, 215, 248, 131, 150, 17, 112, 69, 3, 41, 6, 72, 6, 251, 197, 64, 96, 235, 197, 17, 254, 10, 205, 181, 95, 57, 36, 90, 215, 169, 114, 46, 212, 198, 248, 34, 217, 189, 146, 169, 51, 2, 127, 174, 180, 24, 150, 74, 245, 223, 249, 72, 147, 151, 185, 128, 153, 77, 129, 164, 112, 51, 88, 116, 161, 117, 116, 160, 194, 11, 151, 104, 114, 29, 34, 124, 59, 7, 233, 100, 216, 175, 33, 73, 24, 125, 1, 36, 99, 132, 249, 247, 142, 186, 197, 215, 97, 28, 139, 249, 116, 188, 232, 81, 138, 60, 12, 104, 36, 130, 203, 181, 188, 85, 38, 93, 250, 225, 246, 5, 188, 104, 77, 170, 118, 201, 89, 61, 61, 37, 63, 123, 215, 153, 37, 195, 186, 125, 83, 102, 165, 139, 235, 73, 74, 199, 126, 138, 191, 57, 70, 139, 135, 168, 92, 211, 69, 165, 248, 130, 3, 218, 54, 102, 240, 173, 45, 59, 134, 110, 87, 68, 145, 154, 253, 248, 212, 62, 207, 153, 165, 74, 253, 73, 194, 187, 24, 36, 158, 168, 118, 146, 193, 149, 128, 88, 238, 249, 171, 50, 75, 249, 233, 153, 230, 108, 241, 41, 243, 233, 212, 150, 253, 27, 188, 26, 23, 226, 82, 17, 253, 129, 241, 208, 173, 247, 20, 184, 207, 142, 142, 145, 102, 19, 238, 67, 14, 213, 145, 251, 65, 133, 235, 24, 40, 250, 82, 120, 90, 23, 48, 197, 217, 57, 101, 240, 58, 185, 14, 145, 101, 198, 189, 58, 10, 251, 203, 47, 53, 110, 65, 6, 114, 109, 6, 78, 61, 54, 230, 214, 146, 136, 39, 34, 207, 95, 80, 213, 22, 247, 59, 192, 181, 36, 43, 84, 68, 99, 231, 225, 59, 250, 72, 186, 160, 234, 59, 67, 198, 132, 33, 205, 180, 12, 193, 54, 235, 176, 95, 200, 34, 194, 147, 175, 189, 162, 188, 106, 156, 174, 141, 197, 199, 8, 149, 15, 59, 137, 94, 30, 160, 48, 5, 242, 180, 64, 6, 36, 8, 94, 162, 30, 199, 224, 178, 237, 129, 63, 48, 179, 2, 195, 70, 193, 115, 146, 17, 41, 183, 35, 100, 139, 251, 114, 127, 230, 255, 233, 205, 122, 232, 208, 29, 240, 84, 140, 54, 138, 228, 39, 245, 234, 25, 220, 146, 63, 58, 36, 33, 130, 135, 5, 99, 63, 232, 160, 143, 178, 191, 82, 133, 175, 242, 36, 150, 13, 29, 204, 167, 49, 224, 132, 169, 199, 17, 187, 151, 57, 201, 4, 44, 110, 225, 210, 126, 129, 200, 164, 201, 249, 141, 215, 82, 250, 29, 98, 217, 136, 187, 78, 151, 187, 87, 177, 168, 244, 36, 68, 49, 78, 119, 226, 181, 67, 14, 159, 17, 110, 25, 186, 1, 244, 206, 170, 155, 172, 196, 2, 138, 196, 219, 59, 32, 14, 80, 125, 137, 152, 24, 88, 228, 252, 33, 185, 212, 118, 157, 14, 247, 240, 39, 121, 27, 106, 130, 143, 44, 79, 75, 12, 228, 159, 107, 154, 94, 230, 211, 57, 245, 11, 38, 100, 95, 255, 87, 153, 182, 174, 55, 75, 146, 23, 242, 218, 44, 198, 128, 90, 250, 54, 227, 171, 211, 53, 86, 126, 64, 76, 227, 171, 10, 21, 22, 27, 222, 154, 230, 69, 131, 107, 174, 173, 182, 248, 71, 140, 86, 112, 50, 228, 86, 59, 146, 107, 163, 202, 213, 145, 18, 73, 37, 192, 220, 121, 72, 162, 90, 105, 100, 160, 161, 0, 254, 136, 132, 120, 140, 198, 214, 101, 126, 118, 173, 228, 36, 210, 35, 186, 11, 84, 1, 207, 13, 91, 75, 95, 237, 196, 201, 191, 78, 170, 169, 39, 165, 213, 14, 75, 110, 184, 143, 65, 37, 150, 118, 58, 123, 228, 198, 72, 250, 191, 255, 42, 6, 17, 152, 140, 239, 68, 196, 133, 2, 194, 209, 196, 173, 100, 215, 104, 222, 215, 251, 178, 191, 97, 187, 128, 5, 183, 77, 43, 95, 23, 93, 137, 46, 70, 219, 25, 11, 146, 113, 61, 68, 48, 67, 240, 188, 60, 5, 127, 113, 22, 196, 221, 170, 35, 218, 185, 8, 229, 61, 44, 122, 134, 132, 202, 141, 186, 225, 57, 223, 24, 209, 23, 104, 107, 228, 177, 154, 7, 166, 147, 201, 215, 194, 153, 152, 251, 100, 180, 60, 57, 153, 25, 47, 196, 127, 191, 94, 104, 233, 152, 166, 61, 216, 87, 132, 109, 76, 0, 19, 95, 128, 34, 219, 195, 195, 186, 1, 147, 158, 95, 141, 73, 235, 66, 8, 6, 50, 56, 100, 175, 10, 66, 164, 141, 92, 66, 13, 121, 197, 80, 148, 155, 183, 27, 59, 144, 240, 154, 246, 126, 180, 36, 145, 238, 143, 252, 49, 249, 96, 141, 86, 32, 138, 255, 227, 188, 206, 111, 157, 33, 99, 202, 221, 67, 123, 121, 251, 245, 95, 71, 93, 98, 213, 187, 40, 221, 99, 34, 253, 128, 24, 202, 102, 147, 148, 82, 213, 170, 22, 212, 172, 178, 156, 141, 219, 141, 233, 92, 156, 176, 196, 238, 92, 8, 86, 40, 22, 44, 56, 250, 70, 179, 101, 77, 53, 41, 216, 118, 55, 37, 187, 122, 133, 41, 124, 171, 72, 112, 113, 141, 41, 248, 135, 46, 126, 123, 19, 33, 89, 180, 99, 194, 238, 159, 82, 232, 7, 43, 42, 168, 41, 100, 162, 79, 174, 79, 250, 131, 233, 243, 140, 11, 44, 235, 61, 59, 144, 53, 100, 232, 104, 72, 208, 189, 84, 109, 121, 190, 229, 63, 36, 163, 36, 235, 141, 54, 65, 178, 140, 229, 115, 72, 210, 47, 38, 160, 225, 32, 4, 136, 94, 106, 117, 219, 168, 47, 11, 63, 167, 220, 215, 225, 149, 198, 7, 119, 134, 217, 222, 189, 41, 57, 178, 114, 87, 217, 52, 53, 231, 97, 4, 33, 173, 181, 10, 241, 112, 219, 220, 180, 22, 25, 225, 179, 9, 72, 193, 225, 165, 202, 179, 154, 195, 40, 156, 246, 95, 83, 215, 130, 212, 73, 50, 167, 38, 115, 87, 168, 49, 78, 155, 183, 244, 132, 84, 248, 87, 109, 153, 255, 11, 201, 183, 160, 59, 112, 225, 33, 137, 252, 218, 119, 79, 181, 87, 145, 153, 47, 133, 201, 231, 202, 161, 247, 103, 198, 192, 232, 101, 52, 116, 170, 35, 141, 235, 109, 150, 77, 171, 95, 9, 214, 141, 214, 129, 125, 66, 114, 220, 201, 56, 22, 160, 118, 31, 1, 147, 148, 9, 218, 78, 206, 29, 170, 40, 103, 128, 119, 72, 95, 66, 75, 213, 127, 116, 52, 179, 131, 25, 150, 75, 93, 146, 95, 92, 150, 233, 250, 199, 6, 149, 101, 176, 109, 147, 89, 77, 40, 111, 156, 54, 39, 146, 239, 129, 234, 162, 182, 210, 108, 87, 50, 181, 161, 156, 220, 88, 156, 247, 163, 57, 199, 117, 246, 209, 136, 238, 198, 54, 255, 36, 31, 222, 58, 172, 248, 59, 241, 158, 177, 58, 96, 32, 169, 160, 145, 74, 92, 31, 153, 73, 97, 222, 52, 248, 232, 140, 109, 74, 65, 26, 96, 122, 72, 104, 169, 228, 197, 32, 136, 81, 45, 80, 120, 48, 40, 152, 128, 162, 204, 40, 73, 29, 166, 183, 195, 142, 5, 106, 16, 76, 163, 196, 194, 87, 50, 224, 4, 173, 105, 178, 53, 169, 65, 32, 94, 54, 150, 225, 107, 120, 148, 149, 15, 228, 107, 211, 75, 249, 117, 138, 38, 33, 141, 164, 121, 136, 84, 23, 136, 0, 127, 231, 12, 36, 174, 164, 67, 237, 252, 129, 105, 57, 81, 66, 138, 135, 70, 169, 213, 88, 59, 111, 231, 118, 250, 76, 57, 182, 206, 67, 244, 109, 114, 137, 255, 104, 129, 39, 206, 179, 53, 54, 4, 91, 135, 80, 247, 104, 57, 220, 57, 167, 160, 127, 29, 10, 67, 236, 93, 126, 141, 73, 104, 85, 170, 183, 159, 44, 22, 227, 37, 182, 17, 50, 12, 140, 23, 236, 189, 103, 164, 194, 229, 255, 50, 177, 236, 128, 99, 161, 102, 174, 41, 237, 169, 199, 191, 197, 126, 161, 231, 6, 167, 20, 58, 46, 217, 64, 59, 35, 57, 187, 132, 118, 248, 96, 21, 255, 170, 85, 42, 90, 58, 183, 206, 138, 153, 44, 41, 227, 49, 11, 208, 172, 231, 4, 87, 214, 184, 128, 160, 112, 253, 219, 87, 190, 205, 94, 118, 218, 106, 197, 177, 108, 163, 135, 105, 72, 244, 12, 212, 199, 198, 111, 209, 195, 151, 228, 167, 194, 25, 112, 118, 127, 48, 81, 91, 12, 175, 8, 31, 75, 121, 164, 214, 109, 12, 86, 51, 210, 92, 193, 161, 142, 209, 182, 75, 4, 153, 233, 34, 236, 83, 228, 157, 110, 11, 29, 90, 146, 166, 29, 232, 94, 85, 139, 137, 204, 42, 236, 226, 213, 89, 169, 1, 244, 77, 102, 10, 247, 1, 184, 114, 136, 196, 131, 158, 249, 126, 172, 113, 81, 14, 79, 248, 221, 2, 107, 7, 161, 20, 210, 84, 230, 103, 142, 239, 179, 205, 17, 229, 121, 166, 67, 87, 120, 186, 187, 54, 157, 45, 110, 213, 143, 110, 160, 45, 242, 115, 139, 193, 168, 176, 174, 254, 110, 175, 176, 234, 105, 47, 16, 214, 197, 172, 195, 73, 240, 192, 129, 175, 131, 191, 43, 52, 87, 102, 113, 1, 242, 248, 26, 78, 222, 128, 248, 62, 188, 107, 245, 249, 160, 209, 96, 107, 163, 173, 185, 116, 150, 221, 62, 214, 219, 223, 230, 4, 190, 99, 9, 21, 22, 197, 172, 250, 101, 89, 22, 44, 220, 128, 174, 2, 175, 210, 130, 26, 70, 132, 149, 156, 108, 70, 54, 76, 202, 64, 107, 82, 216, 148, 178, 110, 175, 120, 111, 159, 46, 156, 75, 219, 86, 221, 147, 130, 89, 112, 9, 152, 89, 66, 18, 26, 153, 200, 126, 55, 219, 62, 13, 9, 165, 11, 155, 195, 147, 31, 101, 33, 142, 129, 172, 175, 26, 113, 215, 220, 203, 171, 161, 104, 55, 227, 230, 234, 145, 104, 51, 86, 204, 214, 149, 248, 208, 81, 147, 215, 243, 86, 237, 240, 213, 176, 192, 39, 156, 68, 63, 158, 81, 125, 7, 166, 179, 31, 175, 156, 28, 122, 184, 159, 159, 194, 212, 195, 17, 36, 220, 190, 170, 13, 0, 63, 109, 115, 239, 164, 50, 149, 3, 33, 33, 147, 184, 134, 219, 213, 204, 124, 242, 140, 33, 192, 9, 253, 133, 59, 102, 68, 68, 4, 28, 107, 68, 175, 61, 137, 252, 115, 208, 34, 96, 47, 88, 82, 192, 113, 98, 62, 91, 15, 7, 238, 115, 153, 27, 58, 228, 64, 62, 238, 243, 135, 218, 41, 218, 123, 226, 149, 174, 158, 52, 68, 78, 37, 168, 33, 75, 61, 221, 169, 224, 197, 205, 207, 205, 253, 208, 219, 170, 241, 0, 92, 0, 108, 188, 108, 91, 99, 211, 84, 171, 233, 201, 22, 130, 106, 59, 237, 196, 62, 155, 19, 94, 160, 3, 12, 3, 64, 232, 196, 32, 52, 132, 111, 18, 147, 126, 158, 194, 149, 68, 51, 23, 197, 76, 183, 98, 108, 172, 246, 153, 171, 100, 97, 120, 148, 139, 147, 90, 39, 215, 193, 69, 102, 21, 165, 114, 214, 228, 35, 36, 36, 209, 231, 2, 40, 155, 169, 85, 85, 1, 152, 245, 196, 136, 100, 226, 228, 191, 183, 116, 220, 138, 11, 84, 153, 23, 195, 81, 180, 82, 234, 186, 41, 142, 246, 205, 206, 30, 81, 57, 242, 189, 116, 26, 181, 94, 43, 66, 40, 224, 133, 223, 73, 217, 205, 209, 125, 86, 148, 81, 53, 243, 4, 187, 162, 7, 198, 121, 119, 211, 157, 41, 105, 134, 231, 111, 235, 37, 50, 237, 67, 206, 168, 250, 141, 125, 175, 154, 198, 21, 102, 113, 221, 86, 13, 172, 119, 153, 137, 31, 4, 54, 67, 178, 11, 246, 56, 106, 165, 165, 82, 79, 67, 31, 82, 145, 6, 116, 119, 33, 98, 160, 85, 185, 80, 47, 6, 152, 222, 65, 154, 20, 209, 138, 157, 14, 84, 209, 41, 116, 177, 51, 232, 255, 203, 131, 178, 232, 154, 194, 166, 155, 47, 75, 55, 203, 148, 92, 123, 230, 197, 148, 208, 194, 180, 108, 203, 240, 179, 24, 38, 123, 249, 147, 100, 0, 41, 226, 236, 155, 48, 68, 168, 168, 240, 241, 173, 204, 40, 11, 218, 234, 5, 109, 66, 150, 102, 160, 206, 253, 199, 33, 95, 187, 58, 66, 216, 135, 197, 113, 98, 58, 158, 188, 245, 174, 139, 228, 192, 217, 46, 111, 148, 25, 4, 122, 195, 172, 181, 71, 114, 87, 248, 128, 1, 76, 83, 229, 120, 118, 26, 43, 110, 124, 152, 191, 182, 213, 139, 229, 176, 3, 142, 56, 193, 253, 166, 229, 168, 212, 29, 101, 179, 188, 189, 113, 246, 73, 152, 105, 240, 221, 250, 154, 227, 26, 135, 11, 126, 206, 229, 157, 42, 152, 175, 207, 19, 144, 151, 138, 6, 17, 234, 130, 132, 25, 68, 127, 59, 209, 25, 203, 91, 32, 15, 163, 129, 12, 15, 140, 118, 202, 235, 142, 135, 187, 175, 33, 37, 109, 115, 17, 185, 128, 124, 175, 49, 242, 138, 148, 236, 121, 4, 207, 246, 187, 75, 40, 175, 30, 14, 231, 127, 214, 165, 24, 210, 46, 81, 170, 95, 111, 173, 127, 197, 151, 249, 194, 243, 111, 40, 108, 171, 50, 201, 73, 209, 98, 33, 87, 66, 227, 240, 8, 22, 211, 86, 137, 151, 95, 144, 167, 199, 170, 177, 229, 173, 93, 88, 66, 185, 72, 42, 35, 78, 232, 169, 56, 192, 26, 65, 111, 198, 151, 227, 115, 165, 114, 5, 91, 56, 193, 31, 78, 111, 173, 63, 210, 91, 148, 146, 92, 251, 208, 171, 60, 61, 44, 5, 66, 25, 253, 243, 195, 30, 211, 117, 220, 247, 50, 236, 62, 144, 182, 104, 112, 221, 186, 46, 95, 124, 207, 255, 12, 59, 38, 182, 191, 101, 227, 27, 96, 121, 188, 63, 114, 56, 30, 174, 68, 99, 217, 195, 210, 238, 47, 27, 130, 130, 145, 114, 123, 56, 243, 102, 242, 37, 232, 215, 96, 162, 139, 63, 114, 124, 197, 141, 107, 154, 229, 63, 228, 85, 79, 170, 33, 12, 12, 98, 26, 50, 36, 91, 170, 26, 229, 167, 32, 243, 197, 225, 144, 166, 222, 36, 124, 129, 68, 20, 99, 23, 157, 89, 60, 22, 54, 148, 67, 121, 77, 200, 75, 184, 169, 175, 192, 249, 30, 213, 209, 178, 162, 87, 38, 158, 156, 163, 55, 27, 71, 14, 81, 250, 239, 37, 47, 138, 61, 239, 238, 123, 63, 177, 214, 185, 11, 189, 222, 168, 171, 216, 57, 35, 170, 216, 43, 49, 119, 196, 58, 231, 117, 62, 251, 123, 139, 213, 66, 109, 145, 81, 133, 200, 25, 66, 170, 226, 114, 211, 228, 47, 60, 54, 31, 165, 210, 230, 149, 6, 43, 26, 139, 177, 148, 95, 40, 45, 80, 238, 186, 254, 120, 144, 214, 33, 202, 20, 208, 94, 102, 165, 207, 112, 174, 149, 89, 207, 120, 127, 246, 140, 117, 96, 245, 141, 162, 157, 189, 72, 128, 91, 10, 7, 224, 45, 155, 216, 88, 10, 165, 138, 19, 101, 203, 133, 10, 151, 150, 27, 186, 142, 197, 82, 237, 172, 139, 62, 150, 150, 19, 194, 209, 48, 125, 148, 167, 104, 179, 250, 169, 188, 223, 90, 13, 190, 242, 32, 219, 145, 213, 49, 146, 18, 164, 158, 166, 74, 238, 165, 28, 255, 182, 147, 23, 233, 245, 219, 50, 191, 228, 189, 212, 1, 249, 216, 155, 121, 129, 183, 28, 105, 215, 138, 167, 37, 150, 141, 29, 27, 102, 70, 165, 7, 229, 110, 40, 93, 150, 205, 79, 49, 253, 239, 29, 50, 92, 183, 30, 25, 200, 229, 0, 148, 150, 130, 90, 82, 224, 7, 221, 215, 78, 227, 251, 82, 51, 98, 143, 23, 38, 215, 83, 9, 64, 93, 167, 74, 125, 161, 93, 170, 96, 236, 138, 168, 248, 5, 98, 224, 53, 181, 206, 180, 35, 149, 71, 54, 101, 11, 64, 80, 221, 126, 69, 78, 152, 199, 200, 160, 120, 32, 242, 40, 10, 60, 163, 126, 22, 253, 185, 13, 229, 232, 24, 9, 173, 73, 181, 33, 39, 15, 203, 180, 19, 103, 104, 184, 223, 88, 107, 91, 100, 40, 74, 175, 134, 164, 201, 47, 6, 221, 111, 71, 171, 190, 221, 81, 57, 241, 14, 162, 212, 168, 195, 56, 46, 71, 175, 193, 147, 90, 145, 4, 63, 139, 186, 248, 169, 251, 190, 101, 27, 62, 87, 21, 250, 54, 193, 107, 246, 185, 53, 233, 164, 163, 170, 156, 203, 176, 123, 173, 24, 242, 241, 132, 2, 10, 206, 237, 10, 107, 81, 76, 186, 248, 187, 144, 223, 89, 151, 98, 8, 251, 129, 183, 113, 18, 8, 221, 59, 168, 36, 91, 17, 193, 62, 76, 134, 36, 4, 75, 69, 131, 109, 57, 78, 1, 41, 84, 233, 145, 147, 255, 159, 186, 50, 237, 181, 237, 182, 2, 114, 183, 14, 241, 110, 49, 20, 42, 73, 75, 51, 212, 26, 71, 204, 71, 62, 74, 84, 182, 238, 250, 64, 219, 234, 3, 235, 155, 30, 166, 215, 140, 107, 136, 255, 77, 75, 180, 21, 40, 1, 247, 159, 117, 96, 61, 207, 227, 82, 126, 109, 242, 239, 143, 70, 247, 185, 199, 76, 180, 14, 89, 26, 234, 7, 231, 87, 108, 234, 216, 34, 168, 86, 55, 63, 147, 7, 166, 122, 203, 235, 23, 143, 7, 64, 100, 223, 161, 187, 60, 152, 210, 188, 36, 36, 170, 244, 7, 235, 137, 179, 135, 38, 195, 113, 194, 135, 203, 144, 25, 135, 22, 180, 4, 31, 182, 247, 227, 136, 3, 110, 205, 57, 88, 151, 64, 84, 119, 201, 238, 105, 102, 125, 221, 238, 115, 82, 93, 91, 91, 195, 76, 87, 236, 215, 3, 220, 124, 71, 110, 188, 52, 90, 86, 185, 167, 132, 116, 31, 59, 228, 226, 28, 81, 206, 81, 200, 239, 162, 184, 207, 1, 65, 24, 175, 240, 20, 12, 159, 44, 138, 235, 78, 157, 13, 225, 232, 119, 58, 238, 6, 27, 81, 79, 21, 232, 159, 57, 35, 118, 83, 152, 24, 231, 132, 236, 113, 239, 111, 165, 133, 68, 32, 156, 250, 172, 16, 122, 55, 155, 9, 131, 3, 255, 33, 3, 88, 187, 103, 171, 171, 133, 131, 176, 212, 8, 42, 162, 89, 178, 47, 240, 169, 153, 25, 34, 53, 53, 213, 155, 239, 134, 66, 104, 244, 64, 81, 182, 168, 30, 219, 94, 103, 187, 140, 174, 25, 170, 55, 227, 182, 211, 123, 247, 2, 241, 5, 145, 248, 145, 22, 202, 128, 202, 7, 9, 21, 202, 148, 159, 33, 77, 186, 171, 21, 218, 252, 86, 43, 217, 123, 196, 71, 85, 166, 4, 44, 177, 201, 57, 161, 244, 41, 131, 75, 224, 38, 132, 56, 237, 235, 63, 253, 175, 42, 119, 191, 183, 240, 7, 76, 100, 43, 15, 151, 84, 21, 136, 194, 91, 146, 64, 79, 94, 224, 231, 252, 174, 191, 36, 43, 137, 103, 251, 134, 209, 162, 65, 214, 142, 223, 115, 237, 126, 90, 134, 233, 235, 49, 82, 55, 233, 18, 105, 12, 47, 208, 121, 12, 238, 155, 27, 98, 47, 23, 220, 12, 105, 195, 202, 114, 175, 34, 228, 94, 186, 68, 41, 209, 227, 200, 145, 131, 163, 25, 160, 62, 231, 220, 156, 161, 4, 44, 205, 140, 44, 206, 151, 55, 48, 243, 15, 122, 20, 76, 44, 241, 136, 232, 47, 189, 141, 96, 255, 213, 168, 33, 61, 55, 8, 106, 150, 168, 104, 176, 23, 253, 166, 255, 29, 202, 75, 145, 124, 34, 101, 149, 171, 105, 221, 173, 161, 75, 147, 249, 105, 46, 196, 127, 104, 229, 195, 211, 231, 255, 181, 218, 247, 107, 182, 26, 74, 146, 240, 17, 234, 0, 237, 1, 23, 107, 58, 99, 98, 86, 17, 11, 115, 121, 135, 107, 227, 183, 215, 152, 59, 148, 172, 116, 203, 92, 185, 150, 242, 25, 226, 242, 50, 37, 231, 228, 121, 127, 39, 75, 176, 15, 95, 38, 150, 117, 191, 35, 222, 45, 9, 188, 185, 207, 86, 54, 117, 51, 169, 250, 10, 245, 172, 27, 54, 107, 95, 53, 54, 11, 157, 146, 121, 108, 255, 140, 153, 223, 107, 176, 251, 96, 217, 92, 91, 170, 194, 105, 184, 55, 174, 126, 83, 143, 170, 75, 95, 7, 169, 233, 38, 16, 251, 205, 70, 104, 216, 57, 50, 155, 74, 144, 76, 63, 106, 158, 118, 168, 15, 44, 94, 144, 127, 69, 42, 194, 166, 163, 251, 14, 21, 135, 103, 131, 205, 71, 155, 59, 159, 46, 183, 146, 214, 208, 88, 47, 213, 158, 146, 52, 91, 169, 177, 244, 86, 235, 220, 123, 153, 56, 197, 179, 167, 214, 185, 45, 183, 12, 33, 121, 70, 215, 180, 241, 182, 131, 95, 48, 184, 148, 9, 125, 240, 12, 149, 50, 140, 46, 120, 18, 246, 160, 51, 56, 133, 92, 253, 102, 147, 119, 133, 176, 28, 173, 213, 71, 59, 112, 240, 37, 191, 114, 1, 54, 179, 2, 59, 129, 180, 55, 77, 21, 194, 163, 188, 78, 141, 245, 171, 11, 115, 161, 251, 227, 163, 23, 73, 3, 234, 56, 156, 3, 68, 78, 219, 220, 172, 115, 38, 200, 190, 102, 7, 136, 66, 141, 40, 201, 245, 95, 220, 129, 74, 45, 200, 195, 242, 78, 167, 126, 222, 120, 16, 80, 31, 153, 155, 50, 32, 84, 238, 216, 76, 176, 122, 82, 204, 145, 93, 112, 143, 0, 3, 194, 235, 184, 1, 241, 156, 106, 31, 106, 207, 128, 117, 39, 244, 25, 104, 21, 178, 176, 214, 173, 99, 45, 146, 95, 155, 40, 249, 158, 124, 8, 220, 244, 3, 5, 193, 92, 108, 239, 60, 88, 40, 116, 153, 13, 159, 67, 129, 20, 227, 44, 204, 192, 199, 104, 162, 122, 169, 72, 218, 168, 160, 56, 77, 203, 161, 244, 145, 20, 224, 144, 119, 245, 136, 93, 148, 42, 45, 14, 23, 32, 235, 108, 2, 178, 161, 210, 20, 64, 201, 226, 49, 40, 122, 243, 145, 81, 158, 25, 251, 100, 166, 37, 106, 230, 226, 222, 153, 108, 210, 249, 188, 153, 81, 69, 164, 226, 105, 127, 253, 55, 182, 224, 194, 2, 183, 140, 208, 203, 2, 148, 58, 158, 132, 104, 33, 228, 210, 242, 250, 131, 226, 119, 150, 178, 200, 94, 30, 157, 251, 110, 125, 179, 216, 74, 99, 65, 50, 121, 172, 16, 90, 167, 88, 74, 219, 191, 158, 9, 143, 128, 207, 229, 114, 31, 62, 169, 114, 113, 9, 190, 40, 237, 42, 154, 233, 193, 211, 46, 148, 177, 161, 109, 153, 0, 138, 109, 69, 8, 172, 85, 11, 101, 143, 217, 163, 221, 55, 5, 93, 225, 101, 132, 138, 237, 42, 231, 52, 169, 217, 133, 147, 137, 128, 204, 254, 144, 127, 254, 117, 169, 135, 27, 137, 152, 22, 117, 101, 115, 84, 24, 89, 73, 100, 31, 155, 208, 204, 7, 36, 105, 142, 216, 75, 240, 231, 91, 32, 125, 142, 220, 241, 157, 82, 87, 172, 236, 186, 61, 114, 168, 157, 88, 219, 171, 63, 38, 242, 51, 193, 199, 25, 237, 170, 74, 227, 96, 134, 42, 41, 196, 45, 239, 65, 222, 239, 189, 100, 117, 137, 242, 15, 77, 223, 97, 240, 29, 13, 121, 18, 54, 209, 179, 203, 39, 183, 84, 32, 239, 80, 15, 90, 119, 83, 96, 52, 7, 209, 227, 201, 130, 9, 60, 125, 242, 147, 43, 218, 244, 228, 241, 65, 179, 56, 202, 138, 38, 149, 86, 204, 69, 65, 115, 65, 137, 124, 215, 162, 93, 128, 201, 79, 159, 8, 59, 233, 125, 38, 15, 164, 199, 43, 109, 68, 219, 75, 125, 3, 245, 117, 21, 187, 124, 75, 231, 22, 172, 147, 177, 78, 39, 192, 160, 72, 250, 9, 215, 181, 77, 210, 171, 110, 125, 102, 184, 52, 56, 217, 164, 140, 86, 102, 130, 211, 138, 220, 77, 135, 11, 148, 200, 72, 190, 180, 205, 144, 165, 177, 98, 99, 125, 175, 218, 52, 65, 156, 160, 250, 45, 138, 120, 92, 20, 32, 22, 121, 107, 197, 247, 78, 199, 142, 170, 213, 123, 51, 127, 155, 43, 194, 154, 231, 230, 221, 121, 147, 64, 111, 3, 12, 171, 203, 203, 170, 116, 123, 60, 145, 145, 254, 101, 80, 216, 196, 23, 92, 148, 219, 138, 64, 208, 172, 113, 155, 25, 102, 92, 204, 170, 10, 36, 241, 174, 127, 214, 212, 207, 48, 91, 150, 206, 76, 26, 201, 143, 176, 70, 129, 176, 170, 215, 5, 181, 174, 14, 181, 253, 41, 160, 52, 71, 176, 213, 103, 245, 3, 130, 41, 173, 76, 137, 161, 168, 221, 192, 53, 229, 187, 185, 212, 187, 229, 243, 41, 19, 181, 80, 243, 182, 120, 10, 208, 133, 13, 22, 151, 203, 228, 160, 207, 17, 92, 214, 205, 144, 29, 29, 108, 155, 179, 72, 189, 76, 0, 155, 71, 72, 64, 87, 156, 180, 207, 239, 196, 112, 23, 200, 138, 41, 151, 104, 69, 97, 153, 190, 18, 179, 72, 26, 21, 91, 231, 205, 134, 223, 240, 12, 220, 18, 132, 250, 92, 103, 180, 177, 219, 253, 187, 188, 197, 126, 239, 156, 38, 7, 32, 129, 231, 246, 221, 186, 102, 138, 27, 81, 19, 16, 54, 48, 129, 216, 163, 2, 213, 249, 51, 176, 222, 255, 105, 90, 234, 132, 152, 49, 201, 81, 186, 250, 224, 183, 54, 245, 37, 190, 226, 188, 179, 35, 247, 179, 142, 105, 37, 100, 21, 244, 136, 207, 131, 236, 210, 206, 221, 205, 240, 59, 249, 49, 101, 228, 123, 139, 156, 29, 253, 207, 186, 226, 168, 241, 166, 240, 146, 209, 39, 115, 208, 102, 185, 15, 254, 72, 83, 114, 232, 22, 214, 221, 200, 59, 10, 160, 111, 211, 162, 59, 2, 17, 168, 88, 191, 65, 107, 173, 167, 94, 77, 164, 96, 100, 98, 184, 68, 123, 81, 139, 8, 210, 140, 73, 96, 119, 234, 59, 5, 36, 99, 30, 183, 118, 172, 236, 232, 243, 38, 14, 255, 99, 101, 100, 9, 203, 68, 0, 195, 193, 205, 58, 69, 74, 116, 196, 74, 229, 174, 17, 247, 115, 187, 82, 204, 164, 218, 81, 254, 187, 131, 25, 45, 117, 217, 102, 175, 20, 56, 167, 20, 91, 185, 46, 183, 119, 2, 128, 158, 153, 75, 2, 165, 29, 23, 1, 41, 204, 86, 216, 71, 229, 33, 82, 106, 43, 254, 204, 173, 172, 230, 175, 240, 29, 58, 12, 37, 131, 66, 79, 241, 142, 139, 245, 253, 244, 199, 120, 44, 14, 0, 70, 20, 207, 50, 38, 57, 130, 46, 161, 110, 206, 209, 30, 146, 219, 123, 168, 9, 243, 22, 151, 57, 76, 163, 238, 135, 131, 81, 5, 189, 119, 240, 237, 20, 24, 115, 128, 169, 26, 121, 131, 87, 106, 254, 124, 2, 74, 85, 134, 108, 227, 210, 251, 85, 211, 106, 34, 30, 234, 149, 164, 65, 134, 55, 53, 65, 20, 116, 195, 88, 158, 136, 151, 141, 90, 183, 41, 81, 189, 154, 166, 242, 181, 240, 101, 8, 210, 64, 77, 189, 252, 24, 42, 190, 76, 197, 83, 45, 148, 28, 213, 76, 207, 122, 160, 120, 234, 91, 229, 7, 63, 119, 225, 200, 194, 99, 29, 148, 188, 161, 125, 146, 156, 153, 227, 208, 109, 192, 82, 185, 255, 137, 187, 211, 151, 154, 63, 175, 38, 214, 39, 220, 192, 176, 8, 152, 18, 223, 229, 114, 113, 0, 107, 240, 178, 110, 84, 149, 11, 212, 233, 49, 15, 164, 232, 197, 105, 135, 250, 92, 135, 96, 237, 220, 88, 198, 68, 227, 171, 191, 169, 247, 99, 88, 46, 166, 46, 26, 209, 150, 162, 103, 77, 54, 27, 100, 238, 233, 249, 49, 138, 254, 86, 219, 52, 204, 60, 248, 93, 149, 164, 212, 141, 182, 194, 112, 26, 38, 155, 248, 252, 107, 131, 234, 122, 179, 125, 84, 125, 191, 225, 250, 111, 125, 244, 132, 43, 245, 40, 170, 2, 192, 81, 171, 68, 16, 67, 152, 172, 195, 249, 122, 76, 142, 7, 156, 31, 231, 137, 225, 250, 177, 248, 122, 179, 107, 51, 236, 30, 51, 34, 236, 15, 172, 217, 212, 221, 202, 227, 187, 67, 37, 222, 187, 114, 1, 90, 38, 46, 134, 6, 90, 195, 25, 15, 241, 201, 114, 105, 165, 105, 218, 25, 230, 122, 194, 47, 82, 207, 170, 189, 61, 130, 219, 62, 179, 112, 228, 86, 252, 103, 181, 7, 236, 96, 11, 0, 249, 247, 221, 74, 217, 43, 211, 228, 173, 126, 1, 190, 161, 103, 212, 126, 92, 71, 61, 187, 175, 53, 247, 60, 91, 81, 128, 223, 202, 9, 160, 109, 253, 202, 172, 95, 162, 126, 232, 69, 239, 92, 181, 48, 77, 234, 176, 127, 41, 215, 43, 176, 193, 13, 58, 173, 194, 228, 67, 230, 192, 73, 82, 113, 224, 211, 38, 48, 159, 46, 205, 26, 24, 213, 197, 1, 187, 226, 41, 55, 51, 192, 20, 221, 192, 112, 43, 102, 133, 170, 85, 123, 182, 5, 44, 109, 140, 117, 209, 25, 148, 2, 121, 79, 193, 166, 28, 213, 31, 78, 163, 231, 45, 69, 68, 213, 14, 102, 77, 28, 156, 163, 144, 170, 250, 16, 136, 73, 203, 181, 141, 102, 196, 163, 123, 212, 34, 209, 109, 155, 40, 171, 160, 222, 6, 143, 118, 219, 49, 170, 52, 171, 247, 145, 83, 66, 138, 234, 72, 13, 104, 245, 220, 32, 30, 236, 70, 195, 150, 158, 150, 229, 159, 191, 107, 99, 21, 118, 213, 169, 102, 15, 63, 13, 246, 59, 167, 99, 57, 111, 118, 11, 35, 198, 83, 104, 103, 45, 209, 221, 122, 235, 193, 208, 80, 211, 152, 55, 238, 65, 26, 90, 10, 6, 107, 60, 206, 64, 11, 42, 75, 16, 172, 140, 244, 62, 14, 68, 192, 95, 157, 250, 134, 39, 125, 251, 62, 101, 129, 140, 196, 55, 77, 141, 157, 146, 233, 215, 79, 163, 67, 231, 186, 112, 28, 102, 174, 243, 58, 55, 245, 24, 146, 113, 164, 156, 191, 226, 159, 232, 16, 219, 177, 138, 23, 56, 13, 96, 184, 22, 92, 152, 188, 40, 145, 92, 60, 118, 18, 243, 186, 84, 135, 19, 164, 77, 206, 148, 23, 171, 62, 98, 21, 64, 214, 2, 254, 84, 149, 66, 231, 194, 56, 94, 142, 201, 14, 45, 175, 180, 94, 22, 111, 60, 209, 48, 172, 135, 88, 44, 94, 217, 102, 133, 183, 76, 246, 141, 225, 177, 51, 127, 232, 76, 217, 149, 101, 46, 201, 229, 183, 19, 50, 54, 49, 89, 62, 105, 80, 42, 11, 164, 3, 222, 21, 4, 153, 21, 61, 137, 173, 1, 48, 233, 20, 30, 52, 126, 76, 236, 61, 138, 53, 142, 241, 158, 23, 112, 246, 216, 72, 217, 227, 190, 213, 185, 194, 218, 28, 244, 218, 135, 107, 214, 19, 56, 154, 132, 45, 130, 228, 87, 60, 198, 9, 55, 239, 215, 172, 190, 244, 118, 125, 197, 195, 177, 26, 244, 63, 165, 79, 56, 232, 100, 142, 104, 138, 243, 224, 197, 181, 120, 131, 161, 128, 232, 202, 102, 75, 24, 25, 80, 217, 240, 139, 230, 16, 113, 215, 191, 185, 58, 200, 122, 7, 61, 46, 24, 221, 255, 182, 38, 245, 56, 95, 179, 40, 243, 52, 11, 30, 183, 74, 95, 74, 137, 194, 126, 29, 118, 40, 18, 110, 139, 159, 158, 92, 248, 56, 35, 128, 121, 165, 120, 9, 109, 155, 160, 230, 244, 251, 207, 215, 109, 159, 38, 177, 81, 234, 27, 29, 228, 183, 224, 42, 170, 175, 105, 60, 172, 67, 244, 171, 197, 176, 28, 88, 126, 191, 194, 136, 120, 50, 72, 8, 145, 244, 119, 36, 198, 48, 139, 149, 17, 56, 173, 93, 54, 201, 74, 143, 134, 192, 192, 100, 203, 125, 176, 86, 154, 227, 50, 51, 69, 78, 45, 2, 251, 126, 130, 143, 255, 251, 19, 102, 5, 160, 217, 109, 38, 99, 227, 1, 56, 80, 0, 237, 225, 174, 138, 143, 155, 230, 101, 245, 42, 67, 81, 79, 79, 71, 53, 106, 97, 118, 135, 83, 102, 45, 118, 96, 104, 217, 195, 131, 149, 85, 46, 247, 121, 93, 114, 157, 118, 182] + ], + "iv": null, + "key": [160, 96, 207, 51, 23, 219, 98, 82, 235, 82, 211, 70, 120, 212, 209, 193, 184, 139, 111, 217, 153, 165, 61, 40, 206, 209, 57, 53, 224, 161, 205, 180], + "modeOfOperation": "ctr", + "plaintext": [ + [26, 76, 24, 117, 112, 151, 114, 155, 223, 94, 223, 216, 184, 246, 135, 170, 124, 24, 153, 196, 144, 230, 253, 86, 53, 244, 149, 167, 213, 36, 178, 205, 210, 228, 240, 89, 128, 28, 67, 168, 161, 245, 164, 245, 154, 119, 237, 64, 83, 118, 232, 14, 89, 198, 214, 79, 230, 65, 82, 233, 210, 53, 166, 21, 80, 23, 17, 92, 103, 0, 143, 201, 100, 223, 71, 117, 199, 95, 173, 207, 146, 71, 96, 53, 136, 4, 211, 35, 38, 26, 215, 119, 198, 199, 217, 175, 38, 129, 42, 94, 188, 93, 87, 213, 178, 199, 59, 247, 223, 18, 61, 48, 244, 110, 15, 20, 102, 195, 91, 52, 152, 44, 142, 166, 153, 110, 250, 241, 192, 151, 44, 51, 208, 59, 6, 235, 122, 116, 152, 96, 46, 153, 184, 211, 209, 61, 171, 136, 175, 93, 65, 226, 148, 36, 99, 22, 77, 52, 197, 6, 93, 12, 8, 74, 223, 22, 111, 161, 89, 114, 70, 71, 13, 142, 3, 36, 163, 236, 129, 89, 89, 36, 139, 201, 181, 243, 106, 94, 44, 244, 128, 119, 33, 149, 167, 241, 240, 71, 181, 123, 120, 125, 206, 20, 19, 248, 1, 249, 187, 34, 3, 103, 117, 100, 90, 202, 66, 39, 134, 30, 15, 221, 103, 117, 16, 227, 124, 230, 207, 107, 66, 132, 105, 198, 184, 103, 40, 124, 165, 221, 5, 219, 40, 234, 42, 166, 138, 238, 107, 205, 59, 102, 131, 218, 151, 234, 94, 252, 239, 130, 190, 126, 135, 251, 44, 3, 253, 59, 106, 22, 103, 191, 116, 57, 129, 40, 208, 55, 234, 62, 232, 1, 176, 209, 246, 250, 247, 182, 249, 138, 22, 199, 92, 245, 68, 45, 101, 147, 250, 254, 255, 126, 9, 246, 67, 196, 6, 84, 37, 242, 61, 139, 164, 140, 46, 225, 211, 127, 131, 218, 181, 227, 180, 53, 80, 59, 176, 223, 158, 177, 123, 113, 63, 130, 15, 172, 145, 71, 220, 112, 46, 28, 204, 244, 229, 215, 94, 194, 172, 44, 0, 71, 29, 154, 67, 71, 226, 231, 218, 219, 54, 105, 247, 137, 78, 33, 91, 246, 116, 184, 25, 32, 254, 232, 247, 186, 126, 124, 0, 129, 154, 55, 153, 199, 38, 195, 169, 192, 150, 63, 205, 181, 183, 67, 175, 110, 248, 67, 104, 211, 89, 65, 145, 219, 110, 105, 84, 204, 5, 40, 214, 109, 201, 122, 60, 202, 105, 214, 58, 247, 198, 250, 218, 123, 242, 72, 147, 10, 83, 249, 219, 54, 232, 181, 117, 220, 229, 125, 122, 10, 40, 3, 165, 231, 249, 111, 91, 173, 226, 41, 81, 93, 40, 152, 130, 222, 159, 34, 234, 218, 7, 237, 120, 15, 107, 201, 27, 245, 197, 101, 38, 85, 240, 180, 206, 113, 145, 221, 1, 220, 92, 240, 202, 47, 29, 191, 81, 172, 199, 74, 180, 130, 200, 146, 49, 236, 66, 145, 161, 87, 38, 15, 196, 146, 69, 58, 177, 164, 202, 200, 46, 64, 139, 215, 57, 98, 117, 40, 54, 156, 100, 205, 194, 155, 6, 86, 12, 195, 28, 104, 242, 7, 30, 204, 162, 193, 51, 48, 141, 165, 30, 227, 2, 210, 61, 53, 49, 93, 108, 47, 54, 131, 201, 226, 179, 151, 71, 18, 235, 188, 135, 107, 113, 173, 94, 255, 52, 113, 151, 60, 9, 96, 137, 146, 123, 6, 95, 133, 167, 160, 98, 99, 3, 52, 138, 45, 7, 205, 190, 161, 21, 76, 4, 75, 222, 121, 232, 244, 168, 67, 170, 80, 55, 147, 255, 137, 198, 79, 121, 229, 62, 82, 105, 44, 135, 208, 140, 91, 227, 87, 45, 234, 103, 118, 144, 242, 8, 192, 111, 12, 108, 17, 82, 40, 149, 139, 177, 28, 158, 13, 84, 163, 248, 120, 209, 246, 151, 106, 236, 222, 68, 42, 228, 95, 47, 148, 103, 150, 71, 230, 18, 251, 171, 50, 250, 126, 90, 59, 157, 3, 44, 53, 141, 90, 7, 222, 156, 29, 30, 160, 173, 213, 107, 82, 195, 0, 83, 98, 63, 206, 35, 165, 159, 236, 142, 25, 68, 184, 227, 190, 189, 129, 74, 213, 17, 43, 228, 149, 53, 69, 182, 43, 171, 39, 105, 9, 233, 133, 236, 89, 206, 193, 221, 100, 151, 205, 59, 83, 97, 17, 144, 89, 23, 125, 89, 207, 48, 240, 11, 1, 113, 254, 33, 242, 230, 232, 241, 242, 237, 202, 91, 204, 154, 206, 192, 47, 46, 113, 167, 216, 19, 66, 226, 15, 36, 134, 18, 87, 140, 48, 174, 73, 234, 29, 3, 248, 224, 26, 249, 79, 193, 95, 212, 230, 21, 152, 119, 111, 4, 140, 204, 247, 156, 157, 86, 35, 0, 14, 93, 17, 192, 231, 26, 52, 13, 224, 201, 153, 167, 49, 206, 130, 223, 145, 229, 22, 137, 131, 60, 175, 240, 51, 101, 78, 240, 182, 24, 24, 213, 104, 72, 208, 214, 83, 59, 219, 9, 180, 144, 68, 63, 7, 220, 71, 105, 95, 49, 137, 136, 210, 200, 207, 18, 134, 146, 210, 47, 16, 228, 225, 187, 40, 114, 102, 171, 251, 165, 90, 12, 204, 93, 86, 79, 11, 178, 219, 191, 129, 4, 224, 74, 235, 138, 107, 176, 139, 8, 233, 68, 70, 239, 126, 152, 209, 140, 246, 16, 252, 196, 188, 201, 222, 171, 253, 37, 70, 24, 219, 61, 74, 36, 172, 195, 114, 139, 63, 32, 88, 198, 152, 121, 121, 201, 33, 203, 51, 221, 144, 128, 74, 37, 103, 7, 82, 84, 185, 239, 2, 223, 71, 77, 62, 227, 36, 102, 225, 227, 144, 168, 53, 149, 228, 242, 48, 96, 64, 7, 52, 248, 148, 62, 73, 20, 29, 155, 164, 224, 151, 166, 206, 182, 179, 234, 211, 102, 162, 83, 76, 165, 1, 121, 188, 120, 139, 49, 82, 151, 215, 108, 18, 53, 35, 111, 232, 239, 168, 201, 19, 99, 183, 53, 75, 49, 83, 112, 52, 25, 221, 60, 106, 118, 49, 163, 212, 37, 166, 103, 23, 186, 190, 235, 1, 251, 219, 123, 54, 124, 239, 59, 234, 18, 24, 9, 0, 227, 217, 87, 139, 95, 196, 231, 61, 8, 223, 72, 53, 150, 43, 224, 155, 54, 75, 31, 105, 37, 248, 182, 117, 5, 52, 39, 130, 136, 136, 107, 61, 70, 23, 112, 61, 47, 115, 149, 88, 79, 20, 163, 22, 117, 22, 117, 152, 230, 231, 233, 129, 172, 138, 159, 112, 73, 169, 133, 176, 5, 207, 179, 29, 66, 32, 77, 85, 253, 168, 73, 87, 224, 109, 61, 214, 147, 25, 244, 210, 221, 112, 46, 17, 196, 27, 95, 139, 210, 47, 85, 212, 182, 34, 248, 129, 234, 10, 112, 15, 135, 118, 59, 104, 188, 37, 225, 168, 123, 172, 41, 111, 85, 6, 183, 133, 104, 230, 229, 94, 245, 63, 46, 168, 37, 34, 21, 35, 9, 58, 246, 231, 80, 205, 4, 54, 89, 81, 131, 40, 146, 69, 117, 164, 20, 100, 36, 174, 166, 103, 27, 166, 155, 112, 7, 64, 115, 203, 76, 10, 49, 18, 25, 186, 187, 196, 164, 37, 124, 98, 216, 102, 73, 16, 225, 241, 171, 188, 59, 251, 43, 171, 84, 85, 5, 63, 85, 3, 59, 217, 195, 242, 33, 107, 57, 236, 22, 229, 124, 238, 109, 246, 166, 31, 235, 180, 36, 113, 199, 57, 133, 130, 58, 254, 78, 106, 180, 115, 201, 198, 55, 79, 151, 49, 236, 66, 227, 234, 21, 229, 42, 130, 25, 186, 195, 4, 51, 60, 201, 167, 101, 82, 199, 211, 34, 88, 69, 148, 166, 181, 33, 72, 245, 253, 223, 97, 209, 185, 145, 160, 112, 119, 67, 205, 200, 125, 253, 170, 148, 217, 189, 91, 34, 53, 180, 224, 140, 214, 91, 171, 100, 228, 64, 236, 172, 97, 14, 0, 27, 124, 61, 37, 56, 180, 222, 27, 156, 84, 95, 28, 147, 110, 69, 70, 219, 245, 54, 88, 179, 31, 121, 158, 127, 21, 178, 34, 15, 254, 221, 202, 172, 23, 231, 73, 205, 148, 81, 228, 114, 98, 111, 254, 242, 232, 46, 199, 69, 110, 168, 135, 48, 140, 19, 204, 237, 23, 206, 6, 43, 21, 243, 189, 110, 11, 13, 108, 177, 24, 168, 122, 129, 62, 63, 103, 215, 175, 51, 29, 60, 199, 82, 151, 52, 5, 144, 149, 188, 193, 17, 181, 74, 125, 47, 251, 166, 103, 226, 167, 95, 126, 149, 193, 56, 64, 40, 205, 152, 252, 130, 20, 155, 34, 1, 104, 219, 181, 35, 144, 161, 189, 108, 77, 131, 142, 119, 154, 238, 198, 26, 18, 41, 217, 9, 160, 44, 214, 54, 16, 141, 125, 127, 225, 201, 83, 64, 226, 119, 60, 25, 194, 183, 246, 23, 53, 199, 73, 3, 79, 31, 51, 117, 217, 149, 12, 187, 61, 177, 52, 100, 17, 171, 242, 0, 47, 248, 7, 45, 9, 167, 45, 64, 96, 130, 26, 94, 3, 236, 222, 1, 222, 63, 132, 217, 194, 18, 202, 186, 199, 201, 187, 99, 15, 254, 228, 153, 68, 22, 116, 61, 167, 6, 14, 190, 202, 254, 193, 220, 86, 114, 252, 201, 17, 129, 217, 231, 140, 42, 211, 159, 1, 192, 223, 227, 67, 239, 182, 197, 97, 171, 59, 206, 145, 206, 46, 90, 159, 102, 52, 255, 249, 131, 122, 78, 71, 66, 83, 47, 151, 27, 37, 92, 188, 241, 26, 93, 154, 15, 58, 126, 241, 108, 95, 61, 248, 111, 32, 67, 110, 147, 96, 224, 20, 180, 7, 157, 136, 232, 251, 228, 74, 164, 88, 215, 116, 186, 27, 83, 250, 18, 244, 52, 175, 99, 172, 213, 4, 115, 196, 220, 191, 7, 206, 38, 75, 93, 119, 177, 182, 144, 17, 55, 128, 186, 17, 227, 137, 239, 99, 176, 130, 192, 56, 243, 246, 209, 168, 252, 189, 23, 103, 111, 236, 124, 149, 86, 230, 52, 175, 60, 130, 158, 244, 195, 230, 81, 235, 89, 65, 11, 169, 20, 174, 219, 42, 28, 32, 228, 49, 7, 110, 183, 66, 208, 28, 220, 7, 50, 162, 139, 217, 196, 242, 245, 3, 112, 73, 86, 223, 145, 151, 180, 30, 218, 207, 176, 168, 239, 200, 47, 76, 64, 139, 16, 122, 170, 184, 171, 207, 220, 40, 67, 197, 42, 10, 22, 180, 218, 243, 125, 102, 247, 253, 40, 104, 218, 196, 148, 223, 172, 95, 170, 255, 95, 153, 11, 184, 72, 114, 195, 249, 139, 189, 166, 66, 10, 0, 163, 130, 215, 165, 213, 11, 53, 18, 27, 228, 214, 19, 118, 1, 220, 155, 78, 73, 255, 179, 164, 160, 147, 243, 92, 121, 117, 76, 183, 56, 110, 102, 145, 61, 179, 59, 222, 102, 172, 33, 38, 229, 63, 189, 116, 44, 21, 184, 184, 85, 2, 164, 170, 6, 251, 197, 254, 80, 81, 131, 16, 36, 103, 202, 224, 36, 255, 18, 209, 205, 206, 7, 78, 230, 24, 13, 54, 61, 15, 16, 206, 107, 148, 188, 103, 252, 150, 101, 32, 12, 186, 45, 142, 153, 164, 37, 157, 133, 202, 180, 34, 130, 48, 160, 65, 153, 154, 249, 33, 163, 53, 202, 79, 165, 13, 103, 194, 236, 160, 139, 117, 35, 73, 232, 80, 246, 67, 97, 129, 101, 222, 100, 38, 6, 242, 166, 14, 87, 214, 137, 236, 117, 60, 94, 108, 169, 154, 253, 32, 240, 53, 172, 173, 173, 80, 45, 123, 27, 113, 120, 11, 135, 60, 30, 61, 196, 90, 33, 100, 228, 155, 211, 106, 154, 33, 15, 66, 2, 127, 47, 193, 119, 70, 86, 18, 195, 188, 180, 146, 170, 151, 204, 224, 35, 239, 135, 162, 149, 18, 23, 85, 72, 177, 68, 20, 233, 180, 40, 214, 85, 226, 224, 75, 130, 51, 17, 214, 67, 167, 250, 203, 194, 107, 20, 179, 242, 60, 82, 185, 42, 160, 118, 138, 127, 30, 189, 22, 207, 215, 162, 26, 131, 171, 22, 90, 198, 0, 143, 61, 218, 207, 71, 38, 112, 58, 163, 55, 147, 245, 152, 5, 91, 120, 239, 1, 218, 122, 255, 115, 255, 14, 169, 128, 101, 176, 31, 191, 245, 245, 114, 210, 74, 154, 72, 152, 0, 22, 125, 178, 82, 125, 119, 168, 47, 239, 192, 134, 63, 152, 144, 169, 31, 93, 253, 213, 41, 48, 184, 190, 161, 70, 242, 19, 229, 25, 203, 186, 94, 115, 246, 158, 138, 135, 177, 86, 16, 113, 245, 176, 23, 182, 139, 94, 83, 35, 28, 232, 19, 231, 97, 197, 64, 190, 88, 104, 30, 215, 41, 63, 113, 234, 186, 155, 197, 46, 141, 37, 39, 111, 42, 85, 143, 29, 46, 122, 186, 233, 15, 221, 151, 232, 27, 196, 52, 193, 31, 208, 240, 125, 162, 218, 70, 20, 96, 87, 30, 112, 241, 163, 110, 179, 140, 225, 197, 147, 58, 117, 145, 222, 137, 57, 26, 86, 117, 217, 240, 85, 215, 13, 148, 250, 65, 230, 204, 4, 146, 119, 44, 184, 204, 36, 21, 213, 247, 182, 204, 191, 0, 138, 68, 189, 35, 119, 216, 188, 59, 195, 38, 129, 76, 82, 58, 170, 32, 225, 210, 20, 98, 111, 122, 172, 251, 58, 145, 170, 249, 150, 20, 72, 97, 48, 176, 100, 178, 180, 153, 182, 6, 173, 222, 170, 234, 231, 197, 237, 65, 161, 47, 35, 125, 159, 123, 168, 68, 90, 106, 97, 248, 18, 49, 21, 150, 175, 86, 245, 147, 238, 219, 221, 20, 124, 39, 109, 95, 42, 122, 24, 25, 191, 33, 69, 2, 123, 225, 202, 87, 3, 43, 149, 205, 179, 75, 173, 139, 74, 24, 63, 216, 67, 159, 49, 208, 159, 251, 51, 25, 31, 139, 76, 154, 134, 16, 5, 132, 246, 84, 23, 68, 9, 171, 51, 52, 39, 218, 238, 57, 98, 85, 229, 106, 176, 84, 50, 214, 99, 249, 95, 199, 46, 220, 187, 39, 230, 161, 136, 232, 183, 125, 69, 153, 194, 174, 189, 37, 3, 36, 194, 101, 58, 125, 228, 46, 186, 197, 184, 149, 200, 244, 236, 101, 45, 253, 136, 161, 207, 50, 61, 123, 133, 248, 206, 125, 195, 102, 191, 147, 112, 211, 30, 185, 100, 182, 50, 206, 154, 55, 22, 56, 225, 9, 77, 11, 202, 29, 157, 103, 115, 228, 143, 246, 242, 202, 55, 209, 131, 198, 248, 161, 128, 127, 125, 136, 126, 90, 6, 222, 73, 131, 66, 128, 39, 31, 248, 229, 126, 243, 209, 236, 238, 170, 57, 253, 4, 255, 51, 8, 255, 197, 2, 80, 4, 118, 170, 181, 43, 84, 172, 47, 209, 106, 132, 96, 117, 129, 194, 160, 208, 233, 86, 205, 235, 201, 165, 82, 69, 36, 217, 236, 207, 123, 55, 84, 63, 78, 216, 51, 17, 43, 97, 73, 61, 155, 51, 98, 19, 110, 59, 252, 144, 29, 33, 106, 52, 58, 81, 29, 130, 103, 74, 34, 25, 49, 125, 208, 88, 199, 86, 179, 185, 127, 15, 197, 71, 173, 70, 182, 30, 1, 68, 187, 80, 46, 220, 52, 17, 90, 16, 102, 194, 40, 42, 226, 148, 104, 119, 204, 230, 115, 104, 123, 242, 250, 19, 83, 248, 223, 25, 108, 164, 125, 123, 49, 238, 73, 135, 181, 244, 115, 113, 151, 210, 75, 92, 19, 168, 70, 229, 172, 190, 71, 48, 28, 170, 215, 33, 171, 183, 3, 188, 36, 208, 180, 13, 64, 47, 232, 214, 37, 215, 146, 89, 173, 34, 99, 166, 89, 250, 162, 40, 166, 30, 92, 5, 80, 170, 32, 221, 14, 245, 240, 90, 78, 217, 92, 172, 176, 107, 101, 70, 250, 43, 166, 66, 95, 109, 32, 176, 96, 229, 97, 130, 96, 170, 164, 5, 235, 182, 241, 201, 210, 128, 15, 127, 131, 123, 179, 161, 197, 61, 179, 39, 245, 61, 21, 93, 88, 190, 233, 124, 46, 196, 45, 76, 217, 236, 34, 157, 224, 128, 49, 11, 124, 242, 7, 98, 149, 65, 56, 166, 89, 139, 249, 0, 149, 121, 30, 9, 141, 115, 190, 13, 183, 112, 78, 38, 214, 94, 144, 253, 236, 71, 151, 146, 108, 103, 131, 90, 219, 14, 93, 168, 22, 10, 156, 148, 48, 103, 175, 179, 108, 225, 152, 237, 81, 87, 106, 13, 181, 81, 71, 169, 223, 134, 153, 151, 72, 126, 59, 163, 15, 66, 114, 229, 52, 115, 159, 101, 170, 96, 61, 79, 205, 93, 192, 241, 219, 161, 193, 31, 189, 63, 181, 33, 210, 198, 75, 36, 65, 29, 80, 3, 55, 137, 100, 227, 32, 52, 11, 81, 232, 17, 65, 143, 180, 118, 117, 80, 42, 201, 8, 145, 84, 14, 220, 104, 53, 207, 77, 100, 26, 85, 79, 54, 198, 153, 217, 17, 197, 181, 100, 217, 86, 118, 253, 183, 101, 112, 158, 51, 116, 26, 216, 180, 180, 200, 111, 214, 48, 19, 225, 159, 132, 123, 70, 202, 96, 97, 158, 42, 141, 179, 39, 76, 97, 115, 40, 221, 236, 174, 151, 107, 48, 122, 147, 148, 42, 102, 255, 121, 192, 63, 78, 252, 15, 166, 77, 21, 215, 52, 253, 153, 73, 155, 125, 56, 218, 127, 54, 102, 36, 8, 80, 72, 233, 25, 65, 136, 85, 246, 25, 84, 154, 199, 39, 60, 249, 72, 7, 222, 136, 107, 47, 232, 211, 39, 32, 182, 164, 213, 254, 235, 158, 60, 74, 95, 2, 184, 173, 21, 167, 93, 30, 32, 207, 163, 111, 115, 30, 155, 209, 41, 112, 135, 65, 11, 145, 66, 251, 16, 198, 149, 168, 181, 92, 181, 212, 245, 11, 127, 91, 221, 146, 50, 67, 247, 15, 219, 51, 26, 199, 7, 29, 91, 29, 185, 183, 187, 109, 245, 224, 175, 226, 141, 28, 150, 252, 117, 27, 46, 134, 156, 208, 3, 191, 179, 95, 210, 128, 213, 51, 98, 63, 160, 117, 192, 20, 146, 185, 215, 102, 118, 122, 118, 153, 203, 141, 137, 207, 212, 68, 138, 63, 1, 190, 209, 240, 111, 201, 211, 169, 241, 230, 249, 34, 86, 166, 132, 23, 138, 16, 207, 29, 95, 206, 203, 37, 62, 170, 244, 112, 224, 116, 240, 182, 131, 200, 191, 12, 40, 160, 1, 129, 123, 164, 175, 222, 147, 121, 163, 197, 71, 19, 11, 98, 183, 129, 117, 101, 107, 156, 103, 174, 255, 143, 107, 70, 103, 180, 92, 9, 159, 74, 166, 80, 54, 159, 210, 120, 90, 234, 217, 114, 17, 27, 61, 143, 19, 251, 74, 162, 71, 247, 122, 171, 98, 111, 117, 96, 52, 94, 20, 84, 118, 94, 175, 248, 247, 142, 216, 16, 172, 76, 198, 109, 1, 229, 157, 157, 16, 117, 173, 145, 113, 168, 11, 56, 231, 76, 184, 66, 35, 10, 8, 205, 123, 14, 8, 70, 169, 101, 36, 207, 80, 216, 46, 36, 235, 60, 16, 108, 80, 49, 246, 158, 219, 181, 123, 163, 130, 148, 74, 31, 183, 4, 71, 225, 181, 199, 175, 13, 195, 88, 101, 102, 35, 205, 25, 127, 86, 167, 255, 107, 26, 63, 135, 136, 201, 106, 244, 207, 44, 20, 176, 136, 106, 55, 255, 55, 5, 71, 207, 3, 234, 107, 43, 30, 161, 110, 237, 161, 208, 92, 179, 10, 255, 171, 33, 211, 25, 159, 75, 58, 166, 237, 106, 132, 165, 138, 234, 25, 45, 186, 8, 9, 36, 120, 207, 48, 51, 86, 61, 17, 148, 100, 73, 117, 215, 189, 129, 186, 57, 135, 62, 88, 57, 190, 207, 38, 112, 72, 119, 121, 69, 141, 158, 94, 30, 30, 96, 244, 237, 190, 190, 37, 65, 234, 96, 28, 23, 16, 143, 155, 28, 90, 160, 153, 141, 62, 82, 66, 5, 187, 248, 21, 19, 58, 76, 227, 119, 177, 114, 222, 58, 183, 99, 55, 155, 179, 38, 53, 125, 104, 243, 46, 77, 58, 54, 225, 111, 8, 230, 248, 188, 187, 215, 254, 222, 37, 49, 204, 121, 103, 0, 232, 50, 163, 73, 232, 184, 175, 139, 27, 55, 54, 168, 13, 23, 121, 138, 54, 185, 183, 145, 192, 85, 225, 115, 127, 118, 11, 198, 123, 35, 24, 93, 45, 10, 59, 243, 183, 107, 160, 22, 172, 97, 147, 103, 3, 32, 104, 204, 121, 82, 64, 37, 62, 98, 87, 67, 234, 182, 33, 247, 69, 131, 249, 76, 216, 147, 5, 86, 148, 35, 128, 13, 178, 124, 75, 6, 54, 189, 240, 18, 183, 247, 5, 234, 146, 224, 140, 44, 241, 233, 34, 98, 147, 65, 169, 224, 76, 211, 141, 112, 165, 191, 252, 43, 20, 245, 84, 19, 215, 98, 201, 72, 103, 214, 134, 212, 71, 224, 202, 191, 183, 23, 202, 23, 90, 23, 221, 47, 38, 161, 253, 2, 83, 159, 83, 198, 156, 151, 129, 144, 175, 211, 9, 153, 26, 97, 108, 39, 49, 96, 244, 194, 217, 191, 124, 54, 183, 143, 192, 140, 51, 87, 80, 20, 174, 74, 46, 229, 78, 58, 119, 202, 124, 0, 94, 2, 141, 175, 44, 8, 127, 228, 103, 113, 203, 233, 93, 189, 54, 86, 124, 179, 51, 252, 87, 101, 252, 253, 90, 15, 224, 231, 171, 48, 175, 118, 91, 78, 60, 109, 71, 203, 79, 60, 177, 82, 89, 164, 108, 242, 77, 173, 122, 121, 100, 211, 154, 57, 39, 188, 35, 205, 55, 232, 233, 226, 119, 162, 244, 36, 31, 73, 187, 141, 110, 108, 208, 169, 117, 151, 212, 39, 123, 225, 241, 19, 195, 31, 167, 115, 23, 161, 221, 132, 77, 53, 58, 104, 36, 51, 57, 154, 54, 203, 59, 30, 83, 52, 200, 95, 240, 245, 35, 115, 177, 232, 66, 37, 47, 148, 129, 155, 155, 159, 229, 56, 75, 241, 40, 194, 227, 86, 50, 218, 48, 19, 153, 144, 91, 126, 188, 30, 88, 4, 98, 194, 133, 139, 38, 51, 189, 222, 107, 145, 97, 238, 197, 254, 233, 202, 96, 24, 73, 171, 170, 222, 38, 42, 63, 143, 130, 106, 16, 54, 13, 184, 0, 8, 169, 11, 250, 0, 183, 168, 141, 46, 185, 247, 34, 94, 227, 37, 79, 214, 231, 110, 156, 47, 187, 67, 33, 10, 46, 29, 58, 117, 80, 157, 186, 223, 233, 92, 70, 93, 183, 130, 94, 143, 183, 38, 66, 170, 43, 116, 246, 23, 124, 65, 164, 122, 118, 193, 114, 103, 51, 158, 78, 145, 229, 101, 56, 15, 149, 120, 60, 48, 3, 206, 16, 147, 239, 92, 196, 236, 198, 197, 54, 241, 46, 64, 121, 71, 230, 1, 149, 209, 113, 182, 186, 201, 189, 42, 251, 14, 88, 164, 39, 87, 198, 162, 48, 221, 128, 18, 205, 112, 251, 117, 82, 202, 57, 211, 252, 155, 136, 37, 165, 133, 219, 36, 40, 178, 249, 177, 79, 116, 140, 8, 18, 28, 165, 89, 249, 15, 122, 35, 220, 212, 229, 142, 196, 66, 74, 185, 97, 223, 112, 124, 127, 36, 185, 9, 0, 2, 133, 47, 237, 251, 148, 199, 16, 17, 82, 42, 254, 154, 84, 136, 214, 123, 101, 178, 246, 240, 223, 12, 37, 253, 214, 31, 127, 161, 205, 160, 228, 249, 232, 176, 145, 193, 104, 223, 76, 143, 217, 27, 131, 220, 20, 253, 74, 27, 33, 173, 226, 156, 197, 172, 153, 164, 206, 173, 31, 11, 240, 251, 246, 164, 197, 173, 95, 37, 27, 64, 11, 127, 174, 117, 237, 180, 189, 71, 141, 211, 146, 32, 242, 140, 59, 8, 136, 234, 215, 20, 7, 124, 229, 196, 179, 214, 55, 81, 133, 193, 184, 17, 151, 254, 98, 176, 71, 101, 141, 114, 37, 151, 251, 39, 166, 41, 54, 1, 67, 74, 185, 151, 218, 0, 174, 31, 238, 238, 57, 48, 70, 16, 50, 194, 124, 56, 248, 231, 163, 218, 29, 191, 136, 1, 97, 104, 246, 244, 129, 205, 113, 166, 129, 147, 82, 171, 21, 116, 181, 25, 187, 4, 226, 107, 6, 65, 238, 250, 38, 79, 230, 189, 195, 228, 129, 151, 87, 223, 68, 174, 243, 18, 78, 79, 121, 38, 217, 211, 228, 170, 217, 26, 128, 99, 246, 67, 66, 190, 168, 217, 9, 8, 102, 44, 187, 179, 171, 22, 187, 98, 188, 206, 44, 21, 42, 31, 69, 171, 174, 217, 72, 21, 9, 132, 151, 120, 231, 170, 195, 221, 143, 57, 173, 167, 220, 52, 37, 25, 151, 217, 118, 32, 50, 56, 97, 211, 2, 95, 52, 124, 222, 47, 214, 71, 135, 22, 143, 177, 89, 108, 85, 181, 251, 99, 50, 37, 225, 122, 10, 139, 248, 168, 61, 187, 93, 213, 124, 12, 166, 209, 48, 172, 236, 252, 193, 130, 17, 148, 224, 189, 72, 67, 194, 133, 79, 113, 241, 165, 154, 223, 173, 219, 170, 144, 83, 197, 110, 23, 201, 11, 19, 144, 77, 181, 221, 17, 117, 99, 72, 224, 156, 189, 203, 125, 218, 164, 94, 17, 68, 184, 181, 102, 56, 142, 67, 246, 26, 80, 130, 248, 77, 141, 12, 36, 24, 242, 13, 192, 170, 60, 242, 70, 168, 8, 82, 145, 155, 129, 239, 86, 120, 101, 119, 117, 180, 187, 58, 80, 227, 48, 66, 29, 40, 144, 248, 179, 117, 124, 48, 208, 218, 235, 139, 29, 69, 69, 140, 90, 200, 179, 80, 109, 25, 13, 213, 192, 180, 33, 187, 89, 132, 166, 14, 249, 137, 28, 49, 95, 70, 134, 205, 149, 159, 53, 222, 179, 253, 146, 33, 17, 142, 61, 108, 209, 208, 184, 227, 146, 70, 164, 239, 76, 19, 98, 192, 143, 3, 41, 220, 186, 246, 136, 48, 12, 253, 228, 119, 145, 86, 143, 165, 113, 188, 41, 219, 246, 108, 79, 20, 108, 84, 192, 74, 75, 77, 34, 86, 114, 241, 27, 112, 205, 223, 142, 13, 212, 224, 241, 143, 223, 29, 84, 70, 248, 145, 90, 23, 175, 242, 4, 189, 60, 195, 111, 82, 42, 167, 200, 88, 212, 69, 134, 27, 244, 149, 142, 28, 146, 217, 119, 219, 244, 173, 119, 176, 55, 17, 21, 50, 234, 252, 223, 48, 123, 112, 37, 26, 230, 53, 116, 153, 161, 55, 79, 178, 118, 213, 116, 208, 39, 96, 147, 5, 27, 70, 109, 143, 196, 57, 230, 55, 169, 161, 95, 13, 193, 18, 117, 223, 147, 2, 223, 99, 170, 68, 115, 72, 165, 53, 251, 189, 31, 252, 218, 96, 112, 51, 230, 223, 144, 16, 243, 127, 222, 108, 211, 84, 247, 60, 176, 245, 168, 196, 74, 39, 206, 25, 43, 89, 164, 142, 247, 122, 24, 153, 129, 206, 115, 128, 26, 17, 207, 162, 102, 178, 97, 38, 147, 62, 134, 33, 154, 43, 76, 113, 33, 149, 40, 19, 73, 217, 133, 10, 196, 251, 117, 159, 6, 82, 221, 189, 152, 118, 12, 71, 98, 186, 177, 196, 244, 113, 158, 87, 191, 104, 186, 76, 37, 86, 224, 121, 24, 159, 79, 246, 191, 200, 69, 187, 240, 209, 90, 53, 144, 128, 221, 187, 121, 23, 5, 118, 162, 170, 95, 167, 3, 54, 54, 211, 76, 179, 64, 61, 149, 218, 175, 232, 247, 166, 97, 170, 182, 6, 246, 82, 202, 108, 222, 30, 97, 0, 219, 50, 0, 206, 95, 106, 84, 168, 203, 169, 141, 217, 80, 157, 193, 13, 79, 145, 220, 234, 148, 102, 215, 159, 243, 144, 142, 79, 29, 250, 247, 228, 201, 110, 206, 98, 100, 222, 188, 76, 185, 113, 196, 121, 248, 186, 3, 243, 179, 101, 140, 225, 255, 49, 143, 202, 112, 213, 84, 161, 61, 88, 172, 157, 244, 91, 202, 240, 98, 1, 37, 200, 11, 79, 167, 152, 236, 84, 102, 228, 132, 181, 173, 108, 77, 165, 60, 10, 185, 174, 161, 170, 95, 13, 97, 247, 103, 32, 191, 242, 3, 244, 117, 227, 48, 39, 111, 58, 170, 114, 12, 25, 146, 35, 150, 218, 104, 174, 234, 202, 120, 233, 17, 121, 118, 41, 231, 175, 95, 248, 17, 214, 185, 9, 212, 177, 240, 98, 248, 47, 88, 35, 155, 98, 180, 110, 59, 86, 216, 125, 91, 49, 92, 116, 251, 98, 168, 243, 247, 135, 196, 201, 158, 72, 140, 116, 231, 106, 86, 169, 91, 0, 187, 216, 134, 204, 139, 253, 49, 48, 80, 98, 248, 8, 147, 94, 69, 108, 55, 74, 132, 207, 214, 69, 23, 50, 68, 6, 95, 177, 201, 223, 40, 136, 227, 51, 208, 158, 36, 132, 111, 112, 175, 133, 254, 94, 95, 168, 137, 23, 61, 77, 233, 115, 11, 24, 88, 239, 130, 162, 35, 56, 204, 80, 183, 31, 226, 33, 46, 36, 98, 76, 44, 86, 39, 226, 47, 141, 181, 169, 218, 194, 34, 91, 111, 205, 110, 133, 48, 118, 199, 60, 126, 85, 14, 255, 174, 95, 107, 235, 40, 121, 99, 156, 25, 93, 96, 53, 232, 220, 238, 181, 172, 17, 104, 32, 122, 97, 254, 135, 99, 129, 94, 100, 207, 8, 118, 207, 81, 32, 108, 53, 100, 56, 215, 18, 10, 51, 30, 159, 88, 161, 70, 89, 18, 240, 145, 11, 89, 197, 190, 25, 66, 98, 157, 216, 165, 200, 23, 238, 133, 80, 178, 28, 89, 84, 87, 255, 13, 164, 104, 146, 39, 241, 160, 252, 67, 93, 120, 66, 154, 187, 165, 218, 54, 90, 43, 66, 161, 213, 153, 105, 30, 18, 244, 33, 141, 118, 91, 230, 24, 108, 94, 114, 142, 65, 34, 67, 9, 50, 210, 38, 242, 173, 137, 226, 94, 245, 48, 229, 63, 177, 2, 238, 37, 171, 210, 91, 218, 68, 243, 255, 227, 38, 158, 249, 36, 161, 37, 233, 86, 71, 208, 241, 176, 116, 162, 205, 237, 138, 76, 165, 213, 194, 236, 191, 178, 1, 220, 230, 67, 226, 212, 182, 104, 37, 128, 1, 37, 230, 65, 162, 119, 8, 229, 204, 85, 207, 141, 67, 39, 228, 24, 54, 136, 145, 22, 245, 120, 110, 62, 108, 72, 76, 48, 69, 148, 196, 188, 239, 96, 210, 106, 74, 179, 112, 0, 98, 95, 99, 121, 151, 15, 123, 219, 107, 52, 85, 120, 40, 50, 144, 4, 98, 110, 24, 183, 161, 207, 227, 135, 207, 48, 177, 87, 0, 173, 243, 187, 87, 230, 121, 179, 22, 151, 239, 118, 182, 175, 214, 104, 120, 56, 99, 106, 20, 115, 8, 228, 223, 172, 93, 54, 20, 82, 134, 25, 231, 92, 109, 169, 84, 250, 247, 36, 252, 131, 187, 187, 111, 188, 91, 206, 134, 54, 37, 180, 233, 194, 243, 65, 34, 238, 47, 125, 140, 140, 26, 42, 48, 222, 152, 51, 117, 126, 117, 174, 188, 93, 129, 125, 155, 15, 224, 179, 98, 185, 98, 18, 150, 93, 210, 184, 32, 19, 238, 106, 172, 61, 193, 188, 190, 227, 235, 117, 161, 237, 109, 188, 32, 92, 97, 110, 166, 67, 61, 173, 100, 89, 84, 90, 113, 44, 151, 126, 189, 245, 233, 96, 144, 205, 28, 222, 217, 63, 191, 234, 158, 77, 147, 159, 149, 54, 137, 63, 21, 154, 30, 16, 245, 103, 171, 254, 6, 14, 219, 54, 186, 117, 30, 206, 212, 15, 219, 198, 227, 24, 228, 242, 223, 22, 247, 131, 60, 172, 68, 179, 44, 87, 20, 82, 253, 148, 219, 135, 107, 60, 46, 159, 153, 56, 64, 54, 49, 10, 121, 12, 151, 223, 209, 233, 214, 155, 207, 196, 225, 102, 40, 186, 20, 72, 60, 80, 179, 180, 37, 63, 59, 123, 30, 189, 44, 170, 72, 156, 231, 236, 69, 146, 12, 176, 82, 173, 6, 173, 71, 129, 126, 237, 24, 145, 147, 74, 221, 80, 240, 204, 124, 64, 196, 239, 110, 220, 64, 27, 194, 77, 211, 103, 150, 149, 194, 12, 30, 238, 170, 35, 40, 72, 133, 141, 153, 50, 177, 110, 218, 62, 133, 121, 74, 212, 83, 246, 50, 40, 32, 181, 89, 4, 242, 108, 217, 218, 246, 65, 19, 163, 169, 93, 142, 198, 21, 117, 210, 135, 24, 243, 212, 92, 162, 222, 198, 157, 215, 176, 140, 157, 42, 174, 193, 119, 193, 40, 117, 226, 43, 160, 107, 137, 87, 83, 121, 239, 214, 20, 134, 157, 9, 85, 39, 82, 138, 236, 20, 46, 95, 255, 197, 145, 135, 222, 38, 199, 146, 74, 8, 229, 122, 178, 194, 76, 177, 31, 18, 186, 228, 146, 113, 207, 236, 106, 32, 222, 167, 56, 1, 150, 152, 106, 142, 145, 219, 114, 107, 235, 200, 220, 4, 191, 1, 124, 194, 138, 235, 89, 147, 153, 75, 126, 190, 21, 184, 180, 78, 45, 53, 3, 62, 114, 37, 251, 113, 252, 180, 198, 201, 76, 81, 105, 246, 220, 66, 164, 111, 32, 141, 113, 82, 146, 15, 64, 207, 18, 113, 203, 219, 46, 63, 81, 46, 67, 237, 78, 202, 73, 212, 194, 76, 23, 86, 19, 236, 127, 90, 242, 148, 27, 200, 105, 210, 252, 99, 104, 180, 189, 208, 61, 39, 126, 201, 100, 190, 221, 94, 218, 123, 234, 208, 254, 231, 193, 151, 80, 34, 214, 86, 54, 94, 248, 239, 76, 234, 83, 88, 34, 23, 202, 157, 43, 6, 67, 186, 196, 252, 88, 76, 239, 149, 233, 75, 129, 37, 155, 181, 138, 208, 233, 185, 225, 180, 130, 224, 220, 72, 201, 93, 150, 12, 157, 77, 148, 201, 179, 67, 51, 57, 146, 74, 128, 101, 137, 82, 195, 11, 210, 132, 16, 193, 39, 55, 114, 81, 106, 143, 161, 128, 55, 8, 35, 223, 28, 170, 182, 235, 106, 112, 168, 131, 91, 87, 92, 190, 224, 18, 128, 3, 42, 181, 201, 122, 53, 29, 11, 132, 138, 48, 217, 106, 234, 207, 237, 232, 161, 19, 24, 57, 213, 28, 139, 152, 33, 153, 89, 192, 7, 27, 7, 34, 56, 131, 200, 214, 80, 158, 219, 80, 17, 95, 175, 191, 108, 166, 197, 125, 168, 178, 46, 25, 251, 17, 223, 157, 103, 242, 243, 19, 104, 121, 195, 244, 55, 140, 196, 155, 84, 176, 237, 153, 158, 177, 81, 30, 131, 113, 237, 169, 236, 87, 117, 218, 73, 106, 137, 76, 86, 175, 52, 106, 66, 225, 69, 217, 245, 43, 26, 112, 87, 134, 63, 89, 226, 201, 31, 237, 59, 16, 227, 6, 78, 121, 183, 238, 79, 31, 145, 174, 87, 191, 106, 109, 44, 136, 209, 26, 154, 219, 85, 62, 69, 34, 34, 153, 73, 0, 254, 136, 37, 200, 52, 72, 242, 255, 49, 23, 60, 139, 229, 146, 153, 153, 9, 209, 88, 195, 110, 13, 131, 105, 236, 95, 67, 190, 186, 60, 186, 134, 183, 180, 46, 139, 238, 108, 94, 29, 132, 80, 153, 41, 254, 233, 227, 60, 111, 220, 152, 158, 42, 166, 170, 6, 147, 170, 171, 37, 148, 217, 137, 168, 213, 188, 219, 245, 246, 227, 148, 59, 138, 68, 38, 64, 147, 84, 118, 135, 184, 187, 143, 53, 8, 124, 153, 12, 244, 97, 254, 49, 88, 146, 65, 99, 230, 82, 80, 56, 178, 150, 213, 161, 183, 223, 204, 141, 168, 222, 185, 81, 41, 22, 67, 114, 123, 119, 250, 205, 217, 78, 214, 70, 84, 216, 89, 124, 142, 164, 109, 154, 195, 136, 228, 239, 68, 205, 209, 43, 236, 4, 112, 91, 92, 53, 33, 142, 228, 0, 239, 250, 185, 105, 123, 93, 224, 193, 103, 127, 0, 153, 207, 160, 1, 3, 231, 198, 206, 95, 208, 36, 93, 151, 47, 50, 86, 220, 203, 95, 11, 32, 98, 193, 119, 188, 171, 115, 183, 29, 247, 64, 56, 157, 154, 65, 132, 129, 156, 150, 178, 18, 2, 254, 213, 67, 16, 204, 210, 86, 199, 161, 143, 130, 136, 135, 101, 87, 195, 170, 1, 110, 53, 13, 110, 148, 145, 85, 157, 199, 124, 131, 240, 73, 190, 55, 216, 14, 188, 128, 104, 37, 248, 169, 163, 191, 45, 101, 81, 134, 51, 227, 145, 29, 2, 95, 14, 37, 114, 153, 74, 227, 144, 169, 19, 14, 97, 242, 87, 51, 232, 48, 254, 78, 40, 34, 153, 151, 186, 93, 2, 169, 220, 164, 206, 189, 116, 185, 178, 183, 168, 181, 248, 249, 35, 42, 137, 136, 153, 222, 243, 26, 20, 69, 0, 13, 242, 140, 119, 181, 187, 201, 7, 137, 158, 22, 161, 167, 3, 227, 250, 68, 177, 41, 107, 195, 206, 6, 100, 47, 225, 155, 21, 106, 253, 71, 133, 146, 31, 209, 58, 185, 143, 253, 130, 168, 143, 235, 136, 112, 67, 123, 234, 113, 34, 51, 48, 161, 130, 213, 61, 124, 245, 69, 9, 154, 150, 231, 48, 31, 205, 40, 38, 54, 92, 180, 109, 121, 130, 187, 34, 97, 194, 16, 2, 53, 42, 26, 175, 242, 233, 29, 248, 216, 33, 184, 178, 165, 61, 147, 250, 236, 56, 164, 71, 211, 95, 195, 234, 181, 249, 131, 118, 218, 156, 94, 73, 120, 138, 241, 147, 62, 124, 93, 95, 168, 126, 199, 129, 188, 29, 23, 157, 201, 7, 215, 168, 128, 171, 128, 110, 76, 223, 157, 229, 35, 150, 145, 196, 222, 165, 104, 206, 250, 236, 249, 4, 194, 107, 224, 105, 91, 185, 76, 70, 104, 96, 104, 36, 243, 54, 187, 236, 240, 21, 66, 43, 109, 14, 122, 39, 92, 74, 154, 16, 63, 6, 45, 35, 98, 38, 17, 147, 132, 182, 67, 163, 60, 60, 97, 97, 143, 47, 19, 74, 244, 248, 125, 227, 84, 69, 94, 209, 235, 109, 113, 224, 254, 137, 82, 94, 175, 125, 107, 28, 244, 135, 43, 18, 12, 200, 51, 85, 8, 83, 229, 109, 238, 79, 79, 227, 108, 72, 7, 165, 235, 185, 116, 84, 123, 145, 140, 73, 85, 237, 186, 101, 137, 56, 68, 190, 162, 16, 51, 236, 170, 208, 8, 92, 251, 176, 103, 154, 68, 18, 214, 172, 92, 41, 188, 105, 226, 109, 221, 88, 224, 13, 15, 36, 216, 100, 80, 0, 172, 218, 45, 156, 154, 44, 4, 152, 199, 28, 146, 24, 3, 193, 117, 119, 42, 66, 58, 3, 0, 253, 235, 253, 102, 155, 179, 226, 82, 241, 208, 151, 23, 153, 94, 157, 130, 118, 156, 227, 95, 62, 235, 209, 179, 44, 71, 234, 120, 188, 228, 35, 79, 61, 121, 33, 11, 12, 134, 75, 117, 65, 97, 208, 37, 209, 191, 156, 2, 39, 245, 110, 59, 9, 41, 219, 17, 68, 101, 103, 155, 66, 75, 33, 65, 217, 120, 8, 222, 166, 244, 20, 113, 111, 89, 121, 103, 138, 11, 203, 208, 223, 223, 125, 115, 185, 93, 198, 176, 247, 227, 240, 135, 172, 168, 171, 85, 232, 95, 199, 163, 235, 182, 144, 110, 202, 226, 219, 121, 41, 223, 76, 186, 19, 184, 54, 246, 10, 217, 33, 28, 158, 156, 197, 157, 47, 10, 103, 58, 88, 134, 213, 155, 200, 84, 136, 112, 196, 45, 120, 230, 190, 187, 96, 95, 234, 73, 86, 60, 17, 82, 179, 107, 81, 224, 254, 134, 55, 123, 22, 106, 168, 101, 45, 172, 182, 84, 240, 223, 91, 134, 1, 53, 150, 196, 129, 230, 120, 101, 119, 99, 177, 28, 164, 178, 31, 91, 134, 176, 60, 234, 207, 122, 26, 110, 165, 172, 139, 124, 229, 154, 249, 12, 114, 45, 37, 113, 182, 183, 6, 55, 173, 179, 34, 187, 183, 121, 134, 106, 54, 97, 107, 125, 21, 179, 83, 3, 147, 73, 56, 187, 193, 171, 121, 40, 118, 66, 146, 52, 213, 1, 52, 68, 108, 244, 36, 23, 49, 62, 209, 14, 106, 64, 70, 84, 155, 141, 77, 32, 140, 183, 85, 181, 75, 46, 108, 131, 254, 14, 167, 236, 211, 52, 6, 24, 92, 50, 211, 237, 136, 180, 186, 154, 7, 212, 98, 59, 195, 83, 27, 26, 6, 161, 174, 194, 46, 75, 201, 100, 93, 136, 179, 52, 132, 208, 141, 184, 25, 31, 90, 4, 153, 23, 150, 197, 163, 244, 135, 255, 14, 121, 138, 100, 199, 130, 245, 240, 120, 234, 242, 98, 106, 235, 137, 52, 245, 185, 5, 149, 253, 22, 182, 126, 228, 150, 226, 94, 92, 184, 215, 166, 207, 106, 160, 15, 182, 89, 223, 221, 68, 126, 4, 31, 73, 184, 189, 241, 103, 172, 223, 243, 130, 211, 35, 145, 42, 33, 16, 122, 148, 231, 9, 42, 173, 152, 45, 15, 242, 231, 109, 137, 102, 48, 124, 200, 144, 220, 80, 45, 128, 247, 114, 124, 192, 8, 49, 31, 120, 230, 77, 137, 66, 245, 239, 53, 225, 178, 176, 108, 147, 207, 226, 120, 42, 24, 142, 221, 71, 229, 174, 212, 84, 80, 98, 45, 48, 253, 166, 160, 169, 69, 176, 93, 72, 178, 69, 79, 235, 17, 247, 136, 248, 106, 195, 15, 155, 135, 68, 226, 167, 1, 142, 106, 245, 178, 67, 151, 53, 162, 7, 118, 17, 158, 117, 190, 138, 89, 165, 193, 75, 244, 164, 109, 15, 57, 102, 79, 224, 77, 32, 84, 42, 241, 41, 177, 175, 31, 27, 166, 117, 131, 19, 182, 46, 188, 72, 215, 132, 47, 11, 47, 249, 219, 235, 101, 215, 92, 51, 206, 253, 248, 48, 216, 65, 85, 88, 133, 87, 123, 21, 244, 12, 26, 28, 107, 28, 116, 24, 214, 234, 65, 214, 102, 171, 7, 170, 14, 38, 131, 26, 209, 50, 201, 28, 149, 191, 115, 143, 97, 87, 253, 234, 193, 102, 94, 163, 12, 222, 134, 238, 83, 79, 140, 22, 190, 37, 138, 151, 154, 158, 115, 0, 139, 190, 180, 113, 62, 79, 168, 126, 213, 156, 44, 90, 67, 57, 242, 14, 194, 52, 170, 146, 105, 69, 172, 218, 224, 172, 180, 40, 254, 60, 215, 188, 24, 12, 139, 84, 89, 6, 7, 215, 81, 93, 19, 206, 125, 164, 127, 133, 242, 122, 111, 9, 101, 16, 169, 236, 244, 238, 234, 11, 188, 0, 174, 181, 31, 252, 180, 177, 229, 80, 2, 162, 92, 227, 61, 95, 182, 167, 205, 227, 255, 216, 126, 192, 56, 116, 59, 147, 36, 189, 80, 192, 94, 31, 168, 224, 72, 217, 22, 219, 106, 168, 146, 113, 50, 89, 125, 12, 167, 205, 118, 24, 202, 50, 223, 204, 46, 29, 112, 46, 179, 122, 182, 219, 14, 143, 74, 191, 12, 164, 196, 169, 154, 47, 35, 200, 146, 71, 10, 164, 126, 150, 109, 142, 17, 106, 176, 157, 165, 49, 5, 130, 44, 195, 9, 244, 137, 165, 46, 130, 89, 252, 10, 169, 21, 166, 157, 30, 254, 21, 90, 2, 96, 254, 172, 28, 128, 249, 176, 113, 96, 49, 126, 35, 32, 187, 145, 84, 167, 92, 147, 221, 177, 120, 8, 37, 99, 52, 32, 87, 211, 235, 33, 140, 156, 194, 250, 223, 236, 16, 122, 179, 72, 18, 81, 194, 207, 65, 148, 93, 238, 120, 248, 44, 10, 196, 42, 110, 37, 54, 77, 120, 89, 208, 136, 15, 35, 93, 130, 249, 90, 55, 195, 236, 220, 194, 113, 89, 212, 209, 37, 177, 28, 22, 160, 66, 188, 109, 247, 13, 170, 122, 98, 234, 197, 244, 194, 79, 167, 159, 68, 27, 152, 216, 216, 159, 236, 227, 57, 50, 145, 30, 217, 159, 74, 229, 104, 39, 131, 133, 128, 214, 2, 222, 142, 23, 42, 72, 165, 149, 110, 192, 46, 211, 171, 99, 11, 176, 39, 170, 207, 148, 94, 155, 20, 19, 76, 232, 49, 214, 166, 120, 18, 58, 99, 228, 54, 145, 133, 174, 233, 199, 147, 192, 255, 156, 189, 50, 246, 74, 71, 174, 89, 8, 189, 218, 129, 159, 50, 63, 205, 35, 154, 82, 25, 42, 29, 99, 84, 57, 15, 164, 30, 86, 126, 14, 61, 48, 154, 2, 11, 173, 187, 140, 170, 1, 125, 87, 93, 167, 196, 165, 113, 222, 27, 232, 56, 11, 212, 140, 202, 123, 156, 236, 139, 225, 49, 14, 58, 108, 192, 65, 13, 133, 181, 152, 204, 140, 8, 190, 152, 31, 74, 181, 231, 247, 41, 246, 140, 71, 204, 37, 230, 248, 215, 88, 20, 186, 75, 148, 82, 66, 72, 169, 228, 63, 203, 180, 243, 186, 20, 57, 74, 223, 60, 239, 103, 159, 240, 45, 27, 185, 163, 107, 170, 222, 86, 181, 181, 46, 78, 121, 181, 51, 36, 67, 18, 176, 252, 113, 96, 88, 200, 64, 62, 185, 111, 86, 108, 31, 115, 43, 81, 129, 57, 59, 55, 10, 244, 77, 4, 196, 1, 227, 151, 170, 251, 11, 52, 89, 115, 128, 80, 165, 132, 248, 24, 74, 80, 50, 128, 113, 199, 148, 245, 243, 163, 181, 221, 124, 124, 22, 99, 239, 94, 15, 68, 216, 192, 79, 64, 84, 155, 0, 12, 22, 221, 208, 138, 112, 67, 244, 211, 214, 212, 231, 57, 141, 183, 236, 135, 7, 72, 25, 67, 210, 36, 232, 3, 166, 171, 32, 205, 172, 57, 19, 119, 140, 42, 122, 50, 92, 146, 175, 234, 115, 218, 221, 99, 232, 145, 25, 32, 232, 27, 69, 124, 42, 93, 253, 18, 59, 211, 145, 221, 59, 195, 56, 15, 35, 26, 38, 198, 27, 90, 143, 238, 26, 19, 188, 209, 231, 214, 55, 89, 172, 254, 31, 250, 87, 47, 148, 41, 123, 24, 177, 201, 117, 143, 235, 44, 32, 208, 118, 10, 179, 153, 87, 151, 116, 171, 178, 92, 208, 135, 214, 241, 125, 136, 113, 10, 255, 175, 114, 0, 116, 89, 169, 19, 120, 197, 24, 74, 50, 83, 136, 254, 49, 115, 185, 34, 215, 113, 37, 58, 175, 212, 126, 100, 216, 213, 222, 56, 221, 174, 165, 156, 193, 80, 250, 169, 67, 130, 108, 147, 56, 247, 64, 171, 175, 186, 254, 181, 146, 205, 190, 167, 82, 94, 164, 12, 60, 212, 216, 115, 11, 27, 103, 162, 238, 12, 16, 29, 209, 154, 123, 135, 130, 116, 60, 33, 110, 208, 77, 85, 139, 75, 146, 235, 206, 24, 36, 51, 253, 39, 52, 4, 103, 142, 158, 98, 206, 34, 101, 208, 100, 215, 49, 156, 53, 71, 30, 0, 103, 113, 241, 49, 104, 74, 129, 134, 229, 31, 76, 220, 106, 165, 178, 123, 180, 97, 19, 253, 189, 186, 72, 200, 107, 96, 198, 58, 92, 85, 109, 74, 123, 32, 148, 4, 140, 16, 177, 180, 94, 150, 62, 107, 59, 14, 123, 201, 114, 39, 27, 106, 232, 55, 10, 5, 31, 39, 102, 155, 37, 171, 34, 91, 167, 146, 186, 184, 144, 187, 245, 233, 50, 106, 97, 19, 21, 120, 210, 10, 122, 121, 109, 114, 213, 163, 67, 126, 172, 226, 10, 99, 183, 195, 12, 73, 195, 231, 87, 99, 216, 226, 189, 205, 64, 124, 174, 160, 73, 159, 89, 120, 104, 150, 228, 102, 146, 192, 204, 104, 133, 26, 169, 71, 49, 20, 28, 242, 141, 221, 208, 108, 160, 132, 168, 254, 139, 216, 194, 179, 145, 15, 253, 218, 46, 95, 89, 63, 40, 172, 178, 216, 191, 250, 114, 165, 27, 137, 105, 154, 38, 53, 155, 156, 186, 235, 212, 77, 0, 144, 103, 160, 19, 184, 148, 42, 109, 236, 157, 253, 203, 5, 211, 25, 104, 48, 225, 121, 144, 27, 120, 62, 7, 25, 78, 42, 46, 7, 228, 27, 22, 110, 17, 51, 126, 197, 231, 9, 134, 112, 73, 207, 191, 227, 126, 12, 196, 142, 132, 19, 133, 231, 29, 25, 147, 198, 38, 111, 75, 60, 128, 92, 68, 127, 226, 44, 106, 37, 172, 81, 84, 235, 243, 158, 246, 128, 191, 35, 200, 154, 27, 204, 111, 96, 234, 77, 242, 64, 219, 79, 215, 72, 93, 221, 251, 130, 206, 210, 156, 232, 248, 241, 18, 238, 133, 182, 145, 216, 90, 247, 213, 132, 87, 25, 4, 108, 71, 1, 129, 164, 133, 140, 67, 53, 251, 90, 140, 17, 115, 6, 120, 2, 224, 54, 238, 60, 157, 203, 111, 152, 73, 24, 117, 112, 93, 110, 144, 52, 15, 242, 93, 101, 208, 154, 22, 95, 37, 109, 245, 6, 80, 218, 79, 175, 151, 71, 11, 192, 223, 133, 217, 71, 22, 28, 54, 209, 45, 229, 147, 207, 235, 86, 176, 159, 51, 173, 113, 208, 70, 125, 232, 104, 138, 35, 69, 104, 175, 188, 209, 98, 177, 81, 54, 37, 111, 121, 219, 148, 179, 218, 195, 41, 33, 249, 103, 208, 160, 156, 240, 48, 187, 58, 159, 101, 230, 36, 189, 134, 85, 136, 201, 12, 222, 43, 96, 234, 191, 137, 169, 17, 222, 95, 88, 156, 134, 221, 224, 18, 208, 18, 114, 86, 159, 51, 192, 250, 59, 103, 193, 221, 206, 80, 10, 90, 191, 0, 175, 254, 150, 206, 2, 35, 84, 180, 22, 91, 141, 227, 77, 205, 103, 222, 43, 110, 136, 97, 56, 201, 64, 46, 203, 44, 163, 249, 33, 229, 239, 208, 39, 209, 185, 133, 199, 21, 146, 81, 105, 220, 201, 150, 138, 174, 29, 18, 189, 218, 28, 94, 62, 85, 1, 41, 215, 109, 100, 28, 120, 51, 3, 236, 27, 195, 92, 221, 89, 0, 133, 58, 201, 140, 129, 187, 170, 131, 116, 89, 252, 67, 89, 162, 80, 238, 44, 156, 129, 98, 48, 138, 248, 161, 94, 1, 33, 133, 9, 187, 2, 218, 239, 250, 210, 91, 106, 229, 147, 86, 194, 197, 157, 59, 47, 214, 186, 124, 98, 172, 207, 237, 100, 15, 161, 16, 132, 190, 12, 186, 131, 140, 248, 179, 6, 165, 122, 118, 175, 250, 225, 30, 174, 5, 61, 131, 216, 91, 34, 7, 81, 75, 141, 61, 224, 171, 27, 12, 152, 112, 246, 253, 74, 17, 25, 243, 67, 64, 159, 107, 154, 2, 143, 234, 187, 215, 100, 198, 191, 138, 12, 186, 54, 33, 242, 157, 63, 13, 236, 25, 140, 76, 150, 193, 73, 207, 210, 111, 122, 13, 91, 140, 224, 153, 75, 36, 138, 18, 86, 104, 193, 25, 254, 159, 192, 37, 198, 31, 102, 219, 178, 26, 95, 188, 190, 213, 174, 158, 186, 222, 184, 96, 255, 229, 51, 126, 24, 173, 144, 43, 1, 79, 130, 144, 85, 74, 182, 160, 21, 96, 234, 200, 66, 171, 181, 58, 130, 61, 157, 202, 109, 222, 186, 251, 207, 197, 41, 137, 7, 223, 56, 209, 100, 39, 170, 194, 233, 248, 185, 220, 181, 132, 157, 227, 195, 121, 9, 210, 151, 27, 170, 81, 79, 154, 10, 44, 148, 88, 206, 199, 79, 210, 192, 123, 147, 94, 97, 138, 253, 221, 132, 125, 8, 12, 123, 165, 23, 110, 127, 177, 222, 246, 229, 97, 190, 148, 197, 85, 182, 92, 57, 119, 74, 119, 71, 18, 174, 144, 108, 73, 188, 206, 84, 185, 221, 64, 206, 221, 180, 22, 42, 96, 85, 68, 243, 27, 80, 25, 50, 12, 69, 169, 192, 54, 191, 190, 69, 72, 130, 209, 48, 153, 40, 90, 68, 105, 238, 54, 184, 173, 57, 221, 51, 82, 76, 90, 41, 78, 249, 54, 193, 63, 30, 188, 128, 135, 208, 13, 75, 120, 187, 141, 207, 43, 227, 62, 2, 78, 15, 146, 245, 42, 138, 158, 116, 154, 44, 82, 125, 36, 60, 94, 43, 1, 171, 75, 59, 194, 36, 163, 184, 236, 30, 242, 178, 209, 74, 61, 69, 114, 219, 165, 50, 83, 80, 219, 140, 253, 187, 212, 81, 142, 177, 7, 64, 146, 192, 48, 74, 253, 169, 195, 112, 14, 129, 4, 138, 165, 31, 76, 53, 97, 187, 190, 150, 159, 83, 182, 88, 211, 175, 64, 57, 193, 13, 134, 230, 31, 42, 229, 138, 32, 24, 83, 100, 57, 24, 22, 177, 220, 142, 91, 81, 73, 193, 61, 182, 234, 235, 17, 123, 68, 59, 246, 28, 199, 158, 51, 102, 187, 195, 78, 189, 34, 226, 65, 178, 43, 150, 253, 254, 156, 67, 164, 230, 54, 56, 211, 244, 196, 75, 192, 215, 212, 132, 118, 135, 253, 140, 186, 242, 194, 43, 50, 81, 218, 159, 49, 85, 249, 176, 56, 32, 205, 35, 245, 151, 228, 43, 122, 231, 58, 192, 5, 57, 92, 41, 128, 140, 50, 151, 80, 206, 221, 160, 57, 100, 230, 86, 156, 186, 71, 94, 54, 181, 75, 194, 176, 192, 145, 205, 241, 135, 125, 218, 225, 69, 67, 139, 210, 209, 219, 104, 106, 53, 136, 25, 15, 248, 158, 136, 204, 208, 3, 40, 84, 219, 132, 110, 89, 118, 230, 55, 141, 246, 18, 159, 76, 218, 250, 23, 174, 24, 51, 153, 245, 146, 56, 68, 192, 78, 181, 19, 51, 93, 1, 121, 10, 229, 195, 50, 64, 237, 58, 119, 155, 223, 53, 22, 230, 226, 139, 136, 134, 156, 57, 222, 56, 154, 221, 170, 107, 173, 113, 15, 44, 233, 162, 7, 84, 202, 60, 166, 147, 66, 108, 24, 185, 245, 39, 213, 52, 224, 245, 34, 43, 228, 31, 39, 80, 117, 73, 19, 204, 121, 234, 77, 102, 31, 142, 44, 229, 96, 90, 138, 127, 104, 217, 231, 139, 60, 219, 82, 166, 82, 244, 110, 219, 91, 101, 115, 166, 210, 32, 92, 55, 238, 140, 189, 91, 54, 177, 118, 226, 1, 172, 156, 20, 57, 128, 154, 194, 55, 153, 85, 177, 0, 61, 177, 186, 45, 3, 210, 6, 188, 250, 50, 117, 208, 200, 177, 229, 95, 10, 131, 237, 155, 56, 13, 198, 13, 154, 209, 85, 180, 245, 14, 102, 108, 142, 234, 108, 245, 98, 1, 122, 177, 233, 7, 218, 97, 130, 230, 164, 245, 7, 119, 183, 157, 72, 236, 193, 240, 35, 75, 56, 58, 37, 22, 209, 73, 201, 157, 44, 164, 105, 38, 237, 21, 18, 147, 85, 129, 58, 70, 52, 123, 162, 80, 248, 85, 45, 250, 140, 254, 203, 97, 209, 191, 200, 161, 195, 193, 250, 28, 209, 205, 127, 139, 99, 34, 8, 191, 120, 198, 99, 86, 7, 116, 158, 185, 90, 65, 219, 142, 45, 251, 153, 3, 13, 137, 141, 9, 205, 8, 35, 130, 186, 146, 238, 105, 130, 189, 143, 226, 5, 184, 74, 16, 240, 89, 184, 192, 73, 94, 225, 181, 255, 161, 88, 254, 70, 10, 230, 1, 176, 201, 207, 153, 121, 54, 43, 64, 63, 119, 43, 217, 86, 156, 121, 172, 143, 129, 9, 141, 74, 146, 88, 169, 41, 33, 180, 23, 87, 175, 119, 219, 130, 242, 200, 56, 144, 162, 240, 119, 88, 95, 86, 121, 171, 217, 220, 221, 61, 26, 196, 195, 146, 213, 145, 14, 85, 216, 217, 201, 222, 132, 128, 155, 145, 61, 102, 225, 100, 99, 77, 178, 133, 221, 205, 134, 194, 25, 215, 186, 16, 171, 91, 99, 47, 245, 200, 224, 99, 74, 47, 130, 238, 249, 55, 24, 138, 221, 189, 8, 87, 35, 240, 236, 102, 129, 30, 250, 222, 255, 162, 67, 124, 173, 161, 240, 19, 245, 19, 31, 247, 122, 152, 71, 145, 122, 161, 206, 139, 3, 213, 200, 96, 201, 14, 166, 37, 181, 57, 13, 187, 206, 84, 87, 247, 243, 98, 44, 51, 35, 69, 240, 220, 119, 221, 126, 51, 57, 153, 85, 43, 50, 91, 135, 98, 4, 109, 175, 117, 125, 188, 128, 61, 19, 155, 16, 189, 70, 161, 87, 83, 199, 173, 149, 140, 130, 14, 173, 108, 152, 62, 87, 217, 99, 182, 137, 149, 233, 208, 52, 101, 4, 41, 214, 144, 30, 49, 26, 135, 140, 52, 127, 249, 222, 120, 156, 45, 174, 153, 190, 223, 218, 145, 26, 73, 188, 73, 157, 38, 231, 121, 242, 31, 124, 192, 9, 103, 120, 175, 104, 5, 144, 227, 245, 157, 156, 67, 218, 184, 214, 35, 236, 35, 117, 251, 54, 104, 174, 30, 7, 103, 180, 176, 96, 223, 117, 214, 5, 124, 112, 203, 84, 13, 8, 129, 142, 149, 60, 108, 27, 30, 3, 95, 118, 112, 166, 201, 46, 60, 8, 227, 197, 233, 96, 22, 36, 16, 28, 255, 174, 233, 87, 74, 14, 74, 141, 47, 171, 133, 134, 193, 245, 60, 122, 48, 96, 239, 178, 230, 157, 45, 124, 116, 22, 75, 254, 56, 159, 211, 107, 105, 74, 202, 227, 48, 110, 181, 107, 28, 182, 19, 193, 249, 93, 23, 129, 30, 88, 15, 247, 195, 57, 139, 247, 111, 224, 102, 253, 212, 245, 78, 192, 241, 90, 237, 188, 64, 184, 140, 170, 134, 44, 133, 164, 40, 141, 211, 186, 138, 204, 128, 143, 35, 33, 211, 228, 120, 241, 124, 134, 38, 44, 251, 204, 227, 192, 94, 33, 233, 73, 255, 222, 150, 10, 32, 165, 225, 78, 190, 144, 122, 81, 236, 246, 202, 57, 14, 193, 38, 57, 179, 116, 174, 36, 135, 31, 24, 245, 15, 116, 50, 109, 54, 130, 91, 66, 99, 55, 83, 135, 70, 176, 118, 74, 19, 148, 193, 241, 14, 109, 91, 96, 145, 127, 54, 214, 4, 159, 210, 166, 136, 198, 114, 29, 91, 118, 146, 166, 70, 83, 147, 49, 142, 198, 107, 108, 135, 239, 88, 212, 48, 154, 159, 249, 8, 239, 139, 170, 106, 124, 63, 70, 113, 61, 191, 234, 205, 152, 252, 85, 152, 65, 254, 34, 127, 62, 137, 71, 52, 199, 251, 173, 173, 29, 4, 221, 9, 197, 118, 142, 29, 19, 197, 89, 148, 124, 157, 71, 185, 238, 110, 56, 231, 43, 78, 6, 131, 54, 49, 215, 96, 134, 251, 157, 211, 200, 124, 71, 106, 104, 113, 138, 92, 3, 120, 116, 48, 69, 33, 130, 252, 205, 176, 109, 237, 160, 54, 232, 124, 78, 213, 121, 120, 219, 173, 191, 63, 229, 81, 252, 135, 115, 229, 246, 54, 236, 189, 21, 47, 98, 125, 42, 159, 218, 146, 218, 185, 135, 51, 62, 160, 20, 216, 139, 189, 179, 9, 183, 8, 89, 168, 203, 88, 102, 5, 146, 240, 215, 143, 128, 210, 235, 37, 61, 146, 114, 8, 82, 167, 179, 115, 82, 161, 104, 82, 78, 120, 60, 150, 155, 144, 121, 104, 131, 170, 47, 204, 36, 146, 148, 182, 19, 94, 206, 35, 103, 131, 245, 44, 155, 150, 205, 32, 89, 102, 13, 106, 130, 219, 196, 32, 52, 110, 239, 21, 18, 157, 27, 217, 219, 227, 229, 104, 7, 152, 211, 191, 248, 33, 173, 127, 29, 198, 191, 154, 130, 177, 234, 247, 82, 110, 116, 201, 136, 232, 135, 117, 169, 16, 243, 50, 10, 206, 122, 130, 204, 219, 42, 104, 70, 252, 38, 183, 141, 253, 184, 3, 66, 39, 28, 197, 219, 184, 83, 190, 71, 222, 232, 36, 162, 32, 35, 4, 74, 99, 176, 50, 189, 13, 180, 193, 76, 98, 58, 249, 38, 21, 80, 73, 112, 22, 130, 109, 126, 151, 18, 226, 241, 195, 141, 170, 168, 173, 224, 186, 138, 50, 70, 74, 136, 39, 199, 2, 149, 235, 177, 180, 156, 222, 226, 19, 102, 224, 74, 58, 255, 50, 51, 131, 111, 98, 104, 136, 16, 9, 192, 174, 33, 75, 56, 227, 219, 54, 148, 16, 144, 187, 188, 188, 244, 86, 59, 180, 35, 31, 243, 97, 69, 28, 73, 81, 172, 159, 249, 79, 25, 47, 47, 34, 32, 125, 185, 75, 42, 130, 170, 196, 204, 80, 91, 26, 242, 248, 195, 108, 75, 212, 195, 182, 135, 7, 40, 19, 46, 35, 166, 33, 146, 243, 152, 185, 91, 73, 221, 119, 217, 233, 90, 52, 104, 148, 246, 222, 161, 49, 166, 30, 18, 40, 1, 21, 183, 67, 247, 109, 135, 107, 212, 113], + [89, 102, 88, 86, 250, 183, 77, 2, 127, 9, 100, 38, 134, 32, 202, 132, 240, 109, 106, 58, 197, 108, 86, 45, 62, 177, 229, 183, 84, 5, 189, 197, 220, 53, 81, 163, 172, 221, 57, 67, 169, 136, 229, 90, 252, 9, 122, 194, 212, 5, 221, 105, 27, 155, 75, 142, 163, 161, 58, 226, 45, 131, 116, 75, 195, 72, 154, 225, 5, 243, 21, 33, 83, 202, 176, 136, 246, 176, 181, 209, 63, 216, 93, 154, 116, 205, 107, 79, 187, 91, 61, 160, 172, 93, 212, 16, 151, 151, 79, 143, 52, 119, 230, 111, 251, 252, 133, 210, 227, 142, 240, 189, 207, 92, 144, 60, 42, 133, 78, 99, 136, 75, 149, 250, 238, 146, 177, 157, 91, 97, 48, 63, 194, 134, 97, 236, 104, 127, 48, 117, 131, 252, 247, 209, 221, 132, 106, 133, 78, 143, 133, 178, 57, 212, 252, 48, 239, 207, 133, 221, 80, 188, 138, 35, 154, 169, 164, 111, 182, 92, 83, 2, 148, 191, 139, 32, 175, 90, 91, 84, 84, 224, 211, 232, 134, 104, 111, 156, 186, 225, 30, 231, 101, 17, 131, 9, 104, 51, 60, 189, 1, 3, 101, 60, 77, 226, 181, 234, 19, 244, 62, 193, 74, 254, 127, 142, 39, 252, 243, 187, 95, 143, 135, 228, 175, 157, 226, 208, 193, 35, 47, 161, 184, 118, 188, 140, 135, 202, 49, 113, 167, 199, 13, 185, 245, 145, 238, 222, 116, 177, 144, 65, 156, 194, 244, 56, 26, 192, 111, 188, 133, 41, 207, 205, 120, 210, 40, 117, 4, 8, 19, 113, 26, 45, 231, 159, 22, 243, 145, 222, 93, 181, 156, 181, 21, 20, 242, 231, 85, 135, 233, 172, 246, 252, 60, 224, 202, 244, 194, 86, 255, 233, 67, 186, 19, 102, 60, 84, 56, 190, 15, 20, 60, 174, 238, 77, 26, 200, 135, 77, 255, 160, 13, 107, 126, 18, 174, 114, 168, 185, 196, 200, 153, 102, 227, 110, 13, 251, 221, 30, 40, 122, 181, 161, 90, 158, 41, 234, 237, 25, 59, 27, 88, 168, 1, 21, 188, 189, 172, 236, 60, 255, 76, 192, 156, 192, 88, 226, 87, 50, 33, 120, 190, 98, 145, 249, 139, 28, 255, 86, 254, 3, 52, 163, 251, 231, 134, 108, 46, 139, 205, 23, 76, 165, 124, 1, 35, 12, 255, 237, 231, 51, 167, 135, 17, 240, 32, 26, 156, 80, 79, 111, 91, 138, 176, 114, 58, 63, 23, 150, 204, 60, 99, 105, 248, 247, 66, 29, 74, 137, 135, 242, 242, 105, 90, 77, 32, 214, 1, 197, 205, 206, 93, 74, 223, 135, 32, 27, 122, 138, 76, 124, 120, 56, 53, 25, 224, 46, 124, 72, 228, 85, 198, 156, 93, 180, 179, 185, 227, 134, 19, 119, 234, 120, 148, 6, 2, 12, 74, 43, 106, 39, 92, 45, 12, 137, 114, 255, 33, 171, 9, 247, 133, 224, 35, 208, 121, 135, 133, 80, 26, 227, 137, 16, 85, 136, 247, 13, 24, 86, 227, 130, 191, 187, 234, 53, 244, 101, 120, 191, 254, 39, 204, 176, 110, 99, 145, 142, 208, 182, 86, 202, 73, 227, 203, 161, 125, 128, 35, 173, 54, 11, 89, 182, 93, 247, 86, 172, 208, 71, 162, 174, 129, 82, 253, 68, 208, 13, 119, 202, 216, 55, 180, 253, 217, 218, 15, 44, 193, 177, 151, 212, 87, 95, 123, 218, 36, 36, 45, 168, 242, 107, 222, 134, 168, 13, 249, 120, 121, 224, 196, 242, 64, 99, 238, 111, 247, 88, 159, 91, 143, 216, 232, 227, 191, 17, 49, 26, 125, 0, 241, 45, 126, 203, 39, 108, 133, 233, 144, 19, 241, 81, 254, 180, 109, 58, 189, 251, 205, 224, 65, 110, 96, 246, 235, 38, 179, 249, 146, 107, 36, 58, 178, 81, 164, 63, 202, 128, 101, 111, 188, 170, 195, 202, 250, 83, 133, 60, 253, 60, 152, 197, 1, 28, 193, 115, 89, 57, 66, 174, 92, 25, 208, 166, 204, 71, 124, 219, 5, 212, 235, 79, 96, 45, 132, 210, 28, 111, 42, 28, 110, 29, 110, 90, 176, 93, 60, 188, 167, 52, 129, 210, 197, 32, 162, 134, 154, 243, 125, 29, 252, 16, 254, 73, 219, 175, 189, 69, 131, 71, 141, 156, 113, 55, 96, 172, 54, 77, 215, 24, 140, 211, 77, 51, 242, 42, 16, 72, 110, 65, 72, 255, 207, 82, 70, 234, 157, 221, 137, 235, 80, 25, 252, 157, 42, 99, 182, 160, 189, 219, 34, 14, 160, 42, 157, 194, 216, 57, 0, 241, 143, 34, 233, 45, 10, 104, 110, 21, 57, 48, 156, 2, 11, 186, 146, 158, 98, 26, 246, 170, 128, 57, 129, 123, 203, 44, 207, 71, 98, 173, 114, 160, 248, 24, 70, 176, 202, 137, 26, 27, 110, 175, 188, 136, 213, 168, 16, 244, 226, 62, 11, 189, 95, 133, 163, 166, 225, 202, 91, 119, 71, 26, 38, 27, 109, 207, 2, 202, 246, 9, 155, 208, 228, 105, 174, 54, 150, 225, 116, 118, 172, 182, 83, 83, 144, 254, 94, 16, 134, 4, 72, 59, 153, 93, 20, 55, 177, 187, 128, 41, 47, 137, 46, 53, 210, 177, 234, 176, 75, 105, 83, 160, 252, 83, 196, 10, 177, 252, 112, 91, 75, 248, 187, 57, 114, 24, 63, 64, 251, 67, 64, 180, 35, 208, 199, 68, 4, 34, 99, 62, 103, 108, 114, 108, 229, 194, 13, 76, 114, 54, 236, 51, 68, 142, 71, 134, 113, 70, 155, 160, 32, 127, 148, 208, 103, 253, 65, 26, 139, 137, 247, 188, 143, 221, 194, 214, 255, 67, 45, 101, 158, 116, 78, 147, 108, 208, 32, 223, 115, 189, 12, 219, 167, 124, 9, 94, 29, 191, 158, 232, 224, 193, 24, 180, 240, 189, 140, 95, 66, 72, 130, 187, 163, 178, 34, 19, 217, 140, 174, 135, 87, 5, 229, 19, 24, 6, 80, 75, 242, 28, 128, 89, 21, 169, 48, 174, 9, 88, 164, 50, 79, 82, 35, 1, 224, 246, 70, 97, 108, 19, 55, 247, 77, 135, 194, 20, 229, 141, 187, 157, 135, 86, 9, 58, 139, 153, 15, 164, 104, 52, 240, 175, 183, 31, 210, 166, 137, 187, 65, 129, 74, 22, 161, 2, 139, 36, 132, 145, 138, 249, 52, 76, 89, 102, 242, 206, 60, 77, 133, 115, 244, 210, 12, 122, 114, 38, 52, 88, 222, 44, 152, 17, 215, 144, 251, 239, 240, 140, 3, 114, 2, 56, 81, 213, 11, 85, 236, 170, 123, 177, 232, 181, 71, 145, 240, 217, 44, 255, 55, 56, 169, 32, 6, 3, 178, 33, 198, 68, 244, 116, 102, 244, 221, 144, 236, 126, 146, 1, 146, 252, 168, 91, 97, 183, 74, 31, 22, 153, 5, 207, 95, 232, 71, 77, 137, 81, 4, 56, 74, 159, 7, 89, 220, 34, 50, 205, 156, 240, 135, 86, 142, 135, 75, 32, 66, 207, 82, 89, 250, 137, 210, 132, 140, 149, 35, 230, 9, 10, 179, 118, 71, 132, 196, 48, 95, 223, 109, 11, 83, 2, 159, 77, 190, 188, 27, 206, 114, 228, 222, 170, 224, 88, 76, 230, 125, 3, 157, 162, 95, 100, 47, 15, 134, 59, 57, 239, 251, 58, 214, 185, 93, 13, 173, 103, 37, 0, 239, 79, 248, 241, 215, 196, 178, 153, 169, 134, 213, 91, 93, 155, 69, 68, 215, 107, 142, 72, 95, 227, 27, 122, 109, 100, 51, 162, 181, 118, 5, 254, 111, 78, 215, 8, 245, 120, 121, 154, 70, 203, 122, 97, 163, 121, 166, 166, 95, 186, 64, 141, 86, 177, 154, 146, 1, 47, 21, 47, 72, 37, 35, 160, 253, 71, 48, 140, 4, 35, 118, 206, 199, 85, 225, 8, 38, 143, 220, 31, 1, 86, 234, 176, 254, 120, 48, 17, 23, 69, 34, 65, 170, 70, 43, 214, 146, 112, 237, 156, 121, 63, 176, 4, 74, 223, 236, 230, 174, 191, 88, 25, 179, 248, 92, 17, 204, 232, 180, 191, 8, 26, 88, 213, 139, 197, 52, 168, 58, 137, 23, 161, 10, 52, 208, 145, 122, 112, 142, 227, 30, 39, 162, 205, 114, 142, 89, 195, 192, 232, 11, 185, 116, 77, 96, 187, 111, 163, 79, 160, 105, 191, 105, 109, 180, 85, 231, 102, 229, 106, 139, 24, 150, 211, 186, 219, 81, 149, 109, 45, 4, 68, 61, 139, 89, 198, 244, 232, 13, 149, 14, 180, 106, 38, 251, 213, 106, 224, 9, 183, 78, 189, 215, 112, 18, 121, 28, 207, 73, 196, 134, 61, 123, 197, 167, 254, 172, 136, 145, 57, 176, 217, 53, 27, 248, 1, 157, 12, 219, 95, 178, 164, 98, 167, 245, 24, 250, 36, 133, 87, 60, 146, 164, 247, 203, 18, 3, 32, 241, 107, 157, 55, 179, 220, 150, 238, 174, 189, 36, 6, 25, 187, 79, 157, 111, 16, 250, 109, 108, 198, 73, 52, 104, 221, 11, 115, 228, 103, 118, 133, 182, 162, 238, 44, 173, 106, 165, 93, 114, 132, 139, 223, 176, 162, 126, 182, 167, 158, 118, 246, 252, 246, 203, 105, 10, 57, 37, 85, 126, 117, 182, 168, 156, 87, 46, 6, 241, 8, 117, 159, 147, 18, 19, 7, 249, 31, 9, 222, 91, 246, 13, 57, 129, 52, 238, 24, 57, 105, 170, 87, 187, 215, 184, 3, 176, 203, 232, 234, 158, 187, 207, 191, 181, 144, 207, 8, 62, 58, 110, 37, 134, 237, 27, 23, 182, 52, 199, 149, 165, 228, 137, 103, 15, 93, 166, 62, 197, 204, 190, 11, 176, 1, 213, 66, 147, 44, 246, 225, 116, 177, 32, 51, 188, 64, 186, 11, 3, 249, 90, 18, 49, 167, 146, 169, 84, 196, 185, 221, 70, 103, 116, 146, 153, 44, 156, 0, 32, 90, 48, 34, 159, 211, 191, 159, 27, 0, 119, 17, 74, 69, 86, 55, 159, 132, 90, 232, 224, 32, 199, 99, 154, 79, 49, 206, 15, 216, 86, 8, 124, 223, 170, 135, 39, 196, 166, 29, 230, 115, 29, 20, 20, 103, 14, 5, 161, 34, 180, 91, 65, 126, 63, 116, 38, 242, 87, 101, 70, 232, 247, 102, 243, 191, 15, 59, 155, 167, 172, 220, 105, 204, 233, 99, 23, 29, 56, 20, 172, 132, 254, 130, 64, 34, 137, 249, 49, 47, 12, 145, 31, 183, 24, 42, 98, 200, 95, 29, 64, 143, 184, 154, 35, 8, 80, 146, 107, 177, 110, 128, 78, 104, 121, 62, 218, 204, 215, 133, 129, 232, 51, 17, 95, 95, 73, 86, 28, 76, 76, 24, 64, 50, 55, 56, 253, 229, 95, 58, 204, 82, 148, 96, 93, 219, 71, 158, 46, 164, 11, 61, 164, 9, 20, 160, 58, 219, 187, 2, 181, 111, 245, 132, 78, 40, 40, 59, 211, 216, 181, 196, 178, 46, 2, 181, 115, 124, 217, 67, 171, 63, 56, 218, 108, 48, 115, 199, 142, 9, 34, 113, 57, 45, 255, 12, 115, 36, 23, 208, 242, 162, 188, 167, 153, 207, 87, 134, 89, 11, 63, 255, 10, 48, 255, 195, 164, 14, 180, 46, 249, 50, 247, 147, 115, 133, 69, 236, 149, 254, 145, 184, 245, 222, 208, 63, 30, 205, 43, 131, 111, 103, 251, 145, 54, 205, 123, 116, 4, 66, 112, 15, 34, 62, 191, 145, 95, 59, 154, 62, 73, 110, 172, 125, 157, 14, 79, 14, 193, 223, 251, 35, 14, 5, 180, 86, 228, 191, 117, 228, 102, 127, 139, 148, 233, 0, 247, 111, 44, 253, 103, 249, 150, 226, 155, 200, 191, 193, 167, 245, 119, 66, 94, 201, 203, 43, 31, 111, 185, 123, 62, 29, 61, 60, 117, 146, 245, 107, 112, 123, 21, 14, 174, 61, 153, 219, 242, 216, 127, 96, 121, 127, 255, 85, 155, 100, 30, 104, 131, 167, 208, 84, 222, 8, 14, 139, 47, 45, 142, 155, 246, 158, 41, 240, 179, 134, 109, 217, 115, 229, 252, 132, 173, 191, 6, 239, 37, 19, 200, 142, 164, 179, 161, 197, 31, 227, 134, 219, 222, 235, 212, 59, 163, 174, 119, 169, 177, 93, 27, 248, 73, 78, 67, 139, 120, 123, 216, 214, 39, 92, 189, 237, 159, 17, 147, 49, 185, 197, 104, 92, 239, 42, 134, 47, 79, 1, 232, 11, 129, 248, 63, 186, 246, 243, 246, 104, 84, 115, 9, 64, 211, 237, 3, 4, 153, 223, 173, 162, 193, 252, 187, 212, 15, 244, 54, 120, 54, 10, 112, 186, 207, 61, 137, 71, 202, 66, 57, 212, 48, 138, 9, 114, 91, 169, 158, 162, 54, 83, 182, 100, 81, 188, 35, 146, 47, 98, 205, 66, 50, 93, 212, 13, 130, 133, 6, 152, 162, 130, 130, 148, 202, 208, 122, 91, 150, 3, 108, 121, 74, 155, 114, 40, 152, 75, 164, 61, 129, 120, 151, 120, 166, 127, 161, 40, 165, 61, 89, 224, 166, 50, 117, 194, 172, 93, 238, 82, 233, 75, 212, 121, 103, 231, 179, 218, 253, 205, 183, 106, 63, 84, 193, 35, 208, 245, 33, 72, 124, 108, 57, 155, 168, 38, 43, 60, 8, 152, 137, 194, 208, 50, 228, 54, 147, 234, 212, 127, 157, 197, 45, 189, 14, 201, 126, 44, 124, 186, 249, 165, 125, 169, 47, 117, 15, 162, 193, 98, 228, 1, 156, 125, 107, 28, 232, 252, 123, 9, 211, 141, 156, 186, 177, 181, 247, 178, 52, 30, 242, 122, 9, 67, 247, 49, 90, 157, 42, 199, 36, 163, 171, 123, 129, 92, 167, 242, 85, 54, 167, 113, 1, 164, 186, 40, 10, 106, 51, 157, 191, 61, 227, 130, 57, 153, 20, 212, 142, 42, 156, 82, 166, 77, 19, 175, 211, 140, 32, 161, 36, 250, 74, 221, 55, 75, 2, 137, 76, 177, 47, 227, 176, 79, 50, 221, 116, 32, 210, 169, 55, 154, 175, 245, 59, 109, 99, 70, 249, 130, 77, 203, 83, 247, 81, 73, 77, 53, 17, 206, 195, 50, 157, 187, 26, 161, 182, 42, 203, 53, 7, 136, 219, 164, 99, 170, 122, 18, 139, 175, 69, 155, 69, 155, 211, 135, 63, 27, 93, 128, 173, 35, 130, 76, 4, 33, 57, 235, 43, 2, 78, 71, 3, 31, 172, 63, 82, 194, 58, 243, 71, 235, 236, 123, 195, 4, 107, 238, 172, 9, 98, 207, 231, 11, 238, 88, 80, 201, 192, 75, 64, 217, 130, 34, 106, 183, 18, 174, 163, 226, 15, 39, 180, 5, 34, 231, 100, 61, 170, 159, 70, 154, 254, 145, 134, 101, 192, 233, 93, 88, 197, 209, 170, 186, 213, 226, 243, 79, 3, 163, 102, 169, 196, 23, 98, 8, 78, 218, 195, 58, 189, 94, 193, 34, 178, 175, 215, 148, 101, 94, 74, 86, 180, 227, 234, 100, 108, 243, 99, 74, 73, 167, 241, 25, 195, 137, 162, 235, 10, 226, 35, 168, 206, 36, 252, 78, 141, 218, 23, 47, 45, 193, 32, 144, 198, 221, 167, 148, 234, 247, 212, 211, 234, 27, 75, 222, 100, 96, 227, 173, 184, 207, 190, 17, 70, 203, 251, 155, 139, 215, 44, 55, 10, 219, 248, 145, 49, 129, 62, 209, 66, 193, 62, 29, 0, 86, 198, 132, 189, 124, 158, 201, 59, 179, 162, 30, 94, 101, 88, 58, 222, 151, 237, 194, 141, 139, 74, 169, 30, 69, 118, 170, 76, 13, 115, 246, 77, 159, 9, 61, 112, 174, 36, 123, 131, 77, 52, 195, 227, 246, 223, 61, 12, 1, 118, 134, 149, 108, 254, 80, 76, 5, 164, 196, 60, 57, 90, 83, 111, 209, 247, 139, 0, 220, 107, 21, 32, 79, 224, 69, 183, 221, 188, 74, 39, 47, 91, 53, 225, 69, 87, 30, 253, 66, 25, 190, 181, 158, 146, 202, 151, 240, 169, 97, 70, 116, 200, 105, 108, 12, 213, 103, 149, 152, 238, 123, 167, 180, 100, 18, 55, 253, 20, 38, 127, 77, 210, 178, 111, 55, 100, 174, 120, 44, 157, 170, 77, 200, 184, 49, 103, 5, 70, 200, 154, 141, 132, 84, 58, 100, 205, 95, 147, 188, 1, 102, 228, 14, 91, 132, 62, 193, 90, 188, 77, 40, 219, 116, 97, 125, 164, 42, 114, 254, 236, 241, 27, 32, 57, 197, 104, 70, 5, 45, 187, 159, 205, 16, 253, 192, 35, 14, 145, 122, 186, 84, 105, 170, 125, 108, 196, 247, 221, 123, 136, 19, 239, 253, 22, 108, 31, 13, 182, 83, 246, 134, 92, 106, 20, 29, 226, 39, 44, 224, 158, 36, 201, 5, 126, 73, 244, 224, 214, 145, 241, 123, 4, 110, 47, 148, 129, 196, 206, 199, 235, 15, 33, 189, 243, 85, 134, 128, 147, 76, 93, 92, 60, 125, 215, 96, 43, 14, 89, 173, 112, 45, 55, 164, 209, 111, 171, 77, 84, 117, 58, 184, 186, 167, 102, 112, 136, 149, 242, 56, 61, 234, 54, 90, 145, 78, 240, 3, 63, 87, 53, 189, 8, 239, 95, 153, 8, 139, 0, 12, 47, 231, 186, 128, 230, 139, 160, 77, 3, 17, 17, 161, 221, 48, 16, 86, 109, 243, 162, 211, 217, 113, 9, 129, 141, 223, 167, 197, 185, 221, 55, 88, 141, 166, 10, 8, 116, 94, 154, 215, 215, 65, 90, 167, 183, 156, 197, 167, 85, 62, 140, 234, 214, 179, 224, 161, 130, 147, 209, 127, 14, 72, 117, 112, 85, 9, 73, 237, 45, 54, 130, 154, 179, 32, 254, 149, 99, 101, 4, 115, 44, 19, 171, 59, 117, 120, 69, 116, 132, 252, 254, 39, 177, 227, 112, 48, 132, 251, 191, 8, 195, 15, 235, 170, 205, 121, 51, 147, 174, 196, 153, 244, 186, 168, 1, 40, 234, 34, 199, 126, 148, 24, 237, 121, 145, 217, 106, 37, 177, 133, 215, 235, 58, 73, 235, 189, 203, 195, 138, 104, 52, 82, 143, 245, 99, 44, 59, 10, 67, 244, 204, 220, 52, 112, 18, 76, 176, 173, 60, 89, 76, 223, 6, 206, 59, 61, 136, 76, 236, 159, 10, 233, 34, 117, 80, 30, 196, 225, 33, 144, 174, 105, 13, 40, 235, 218, 133, 107, 11, 167, 129, 63, 176, 233, 75, 148, 27, 218, 51, 225, 162, 122, 253, 89, 202, 100, 67, 240, 203, 24, 117, 39, 99, 121, 172, 170, 44, 67, 200, 108, 54, 254, 11, 94, 219, 125, 237, 46, 107, 159, 149, 27, 197, 168, 43, 229, 68, 193, 76, 30, 253, 82, 42, 145, 17, 248, 110, 8, 26, 237, 100, 184, 219, 171, 23, 183, 195, 44, 14, 127, 233, 18, 7, 119, 232, 188, 0, 31, 11, 84, 196, 160, 193, 106, 144, 77, 39, 12, 190, 30, 166, 117, 218, 233, 147, 85, 210, 145, 204, 52, 157, 215, 164, 64, 67, 6, 255, 12, 230, 234, 183, 42, 153, 70, 255, 70, 117, 190, 218, 152, 50, 173, 50, 109, 99, 162, 193, 40, 119, 191, 140, 23, 174, 75, 67, 108, 206, 149, 86, 21, 3, 217, 173, 189, 245, 29, 86, 63, 104, 118, 7, 135, 24, 36, 77, 107, 233, 11, 167, 239, 33, 72, 39, 158, 207, 188, 44, 134, 144, 8, 171, 38, 56, 128, 159, 100, 200, 230, 48, 98, 125, 128, 255, 119, 166, 234, 255, 100, 2, 57, 39, 179, 181, 186, 241, 163, 110, 93, 243, 231, 232, 28, 109, 222, 97, 236, 175, 223, 5, 102, 137, 74, 6, 212, 15, 7, 101, 2, 42, 203, 60, 247, 160, 164, 252, 161, 225, 239, 237, 96, 170, 234, 219, 246, 50, 80, 100, 15, 130, 126, 139, 4, 126, 80, 94, 175, 84, 215, 177, 186, 218, 102, 64, 98, 219, 140, 209, 203, 94, 63, 26, 194, 76, 229, 187, 238, 179, 175, 109, 49, 39, 216, 104, 220, 55, 79, 122, 100, 127, 254, 82, 79, 176, 194, 231, 222, 98, 197, 246, 31, 229, 12, 13, 83, 202, 196, 0, 15, 188, 73, 41, 49, 177, 238, 127, 96, 24, 96, 204, 241, 139, 166, 158, 56, 247, 32, 151, 143, 211, 61, 11, 36, 116, 139, 147, 101, 36, 198, 200, 80, 64, 226, 100, 201, 54, 251, 204, 81, 138, 182, 241, 126, 91, 7, 59, 244, 3, 127, 230, 41, 136, 244, 13, 195, 161, 103, 4, 77, 65, 137, 68, 22, 184, 221, 92, 42, 183, 8, 47, 93, 191, 76, 90, 63, 232, 136, 117, 174, 110, 54, 61, 217, 178, 184, 141, 197, 0, 204, 185, 117, 77, 240, 43, 215, 35, 120, 18, 241, 229, 186, 233, 141, 1, 25, 18, 29, 187, 64, 120, 115, 82, 166, 72, 64, 142, 172, 185, 249, 18, 37, 190, 196, 254, 81, 49, 201, 118, 188, 246, 9, 189, 199, 24, 190, 90, 70, 41, 38, 2, 93, 92, 3, 165, 193, 92, 80, 128, 75, 20, 6, 160, 117, 198, 55, 226, 97, 173, 240, 121, 113, 21, 26, 27, 116, 219, 84, 0, 109, 103, 249, 201, 113, 7, 174, 238, 176, 109, 252, 245, 50, 232, 139, 132, 98, 9, 241, 255, 119, 183, 241, 65, 104, 143, 42, 176, 206, 198, 34, 203, 41, 111, 27, 69, 20, 18, 166, 157, 177, 121, 195, 194, 227, 32, 67, 156, 194, 25, 201, 71, 117, 245, 20, 148, 70, 211, 188, 48, 24, 253, 58, 213, 194, 187, 99, 86, 193, 164, 116, 11, 10, 233, 16, 250, 35, 162, 240, 33, 61, 215, 91, 233, 132, 214, 207, 69, 255, 78, 157, 142, 169, 135, 124, 152, 23, 216, 245, 105, 10, 161, 155, 205, 150, 183, 22, 27, 5, 59, 171, 66, 179, 124, 1, 120, 158, 21, 21, 73, 199, 157, 38, 165, 97, 198, 108, 174, 162, 228, 28, 116, 163, 57, 16, 64, 153, 47, 72, 121, 144, 163, 154, 232, 165, 155, 174, 77, 85, 129, 150, 97, 187, 86, 128, 243, 201, 202, 58, 222, 52, 84, 221, 107, 237, 72, 182, 118, 2, 139, 175, 158, 162, 62, 151, 135, 37, 115, 33, 83, 125, 21, 121, 184, 113, 254, 38, 221, 125, 18, 160, 115, 154, 20, 242, 11, 223, 169, 65, 24, 248, 80, 130, 197, 69, 167, 57, 11, 88, 42, 45, 26, 117, 217, 207, 137, 255, 35, 212, 126, 177, 168, 126, 81, 126, 41, 240, 167, 107, 112, 125, 221, 79, 217, 17, 238, 35, 239, 45, 237, 176, 96, 55, 143, 156, 209, 90, 238, 4, 234, 196, 241, 173, 9, 12, 4, 136, 195, 117, 158, 122, 66, 78, 170, 17, 88, 49, 48, 188, 125, 134, 189, 36, 143, 20, 172, 70, 87, 10, 59, 120, 193, 2, 28, 211, 216, 111, 115, 44, 14, 200, 66, 195, 189, 127, 15, 85, 72, 232, 148, 58, 134, 99, 237, 167, 59, 29, 156, 134, 4, 64, 146, 204, 136, 79, 3, 85, 108, 236, 8, 171, 205, 168, 195, 86, 150, 136, 195, 171, 41, 82, 140, 248, 6, 67, 123, 30, 220, 41, 147, 173, 220, 79, 202, 43, 254, 149, 183, 33, 81, 160, 219, 24, 220, 206, 145, 55, 231, 91, 156, 36, 108, 23, 79, 70, 56, 47, 230, 200, 162, 205, 213, 14, 106, 51, 114, 118, 89, 38, 84, 127, 19, 68, 178, 135, 19, 28, 47, 240, 44, 241, 234, 54, 198, 85, 243, 221, 3, 196, 102, 195, 35, 57, 209, 247, 164, 93, 241, 117, 137, 15, 24, 99, 127, 144, 13, 82, 78, 174, 60, 68, 110, 218, 91, 122, 235, 1, 164, 236, 249, 100, 210, 194, 13, 91, 118, 152, 247, 125, 68, 150, 246, 133, 220, 117, 102, 33, 200, 64, 175, 142, 248, 226, 167, 161, 219, 128, 191, 13, 64, 148, 170, 22, 53, 125, 131, 138, 214, 79, 37, 98, 83, 85, 217, 49, 156, 150, 46, 75, 125, 80, 13, 245, 56, 64, 90, 167, 199, 124, 193, 27, 175, 225, 187, 208, 88, 198, 141, 14, 244, 57, 241, 82, 232, 146, 222, 219, 210, 177, 216, 9, 240, 79, 168, 203, 86, 39, 89, 20, 186, 64, 135, 81, 145, 228, 88, 97, 244, 192, 3, 14, 68, 19, 11, 238, 105, 38, 246, 65, 161, 148, 119, 11, 253, 88, 208, 109, 96, 67, 107, 65, 219, 148, 172, 222, 252, 53, 220, 39, 99, 186, 169, 203, 102, 24, 144, 98, 235, 70, 107, 165, 1, 116, 14, 196, 192, 33, 61, 228, 96, 45, 125, 65, 51, 104, 185, 146, 178, 249, 5, 31, 196, 163, 84, 166, 210, 26, 239, 143, 111, 93, 172, 163, 160, 90, 56, 121, 243, 12, 165, 244, 31, 131, 177, 195, 63, 68, 213, 145, 207, 254, 193, 92, 65, 243, 179, 103, 96, 246, 217, 125, 194, 205, 240, 76, 34, 201, 150, 25, 243, 80, 228, 219, 254, 149, 249, 84, 180, 174, 70, 44, 205, 74, 18, 53, 172, 178, 205, 219, 193, 248, 6, 239, 105, 155, 157, 63, 120, 69, 19, 46, 28, 9, 62, 195, 55, 24, 182, 124, 154, 135, 166, 2, 107, 12, 33, 171, 72, 14, 103, 203, 111, 248, 121, 42, 107, 253, 247, 22, 132, 50, 99, 182, 4, 205, 44, 35, 28, 82, 152, 152, 19, 149, 130, 76, 39, 51, 154, 122, 209, 40, 223, 24, 148, 38, 225, 250, 133, 112, 255, 35, 101, 99, 133, 79, 147, 75, 11, 28, 41, 240, 41, 88, 219, 231, 57, 124, 187, 159, 112, 202, 12, 217, 106, 161, 172, 52, 76, 12, 110, 255, 168, 209, 192, 63, 146, 5, 154, 229, 128, 153, 70, 119, 76, 55, 43, 84, 29, 202, 194, 253, 8, 183, 159, 4, 11, 34, 106, 150, 182, 204, 226, 244, 222, 167, 205, 214, 104, 16, 39, 113, 236, 34, 83, 235, 159, 247, 216, 121, 65, 44, 170, 48, 10, 43, 135, 216, 47, 214, 206, 117, 209, 168, 121, 214, 126, 102, 10, 187, 232, 141, 2, 63, 121, 59, 136, 96, 96, 195, 179, 57, 154, 131, 237, 208, 241, 19, 40, 3, 143, 111, 185, 221, 37, 229, 160, 125, 249, 5, 62, 237, 194, 8, 87, 144, 106, 191, 107, 254, 11, 126, 142, 128, 40, 232, 18, 131, 25, 89, 134, 148, 55, 11, 76, 188, 103, 174, 91, 142, 244, 33, 218, 167, 120, 79, 193, 63, 243, 64, 101, 226, 102, 71, 28, 118, 204, 23, 109, 151, 236, 51, 65, 186, 107, 225, 233, 103, 129, 18, 84, 150, 156, 83, 181, 128, 76, 187, 235, 77, 111, 0, 191, 147, 189, 243, 135, 255, 20, 38, 128, 62, 162, 231, 208, 195, 62, 163, 74, 195, 111, 45, 53, 119, 98, 129, 129, 45, 244, 175, 153, 210, 108, 180, 34, 149, 196, 45, 61, 203, 167, 73, 96, 129, 46, 62, 132, 55, 168, 223, 146, 224, 135, 71, 1, 159, 113, 148, 173, 56, 185, 53, 127, 247, 62, 20, 170, 41, 23, 61, 207, 70, 187, 237, 242, 226, 129, 230, 5, 141, 232, 174, 248, 191, 197, 36, 122, 141, 14, 158, 66, 3, 63, 132, 219, 132, 65, 66, 158, 90, 10, 44, 107, 122, 201, 188, 66, 206, 183, 130, 218, 98, 231, 95, 121, 95, 31, 128, 151, 162, 30, 50, 177, 99, 50, 98, 200, 242, 42, 226, 61, 112, 60, 111, 171, 85, 111, 18, 18, 65, 253, 210, 187, 14, 4, 74, 184, 222, 102, 245, 103, 90, 244, 39, 45, 69, 67, 168, 85, 122, 222, 225, 32, 178, 165, 239, 138, 66, 191, 160, 91, 32, 47, 97, 162, 97, 109, 238, 195, 204, 151, 35, 179, 247, 178, 62, 214, 46, 126, 201, 32, 36, 22, 5, 237, 77, 47, 18, 84, 84, 57, 78, 25, 71, 129, 230, 110, 161, 47, 215, 40, 199, 169, 213, 5, 22, 0, 83, 137, 162, 40, 200, 184, 38, 51, 242, 20, 191, 154, 30, 134, 92, 233, 251, 103, 238, 202, 231, 27, 0, 22, 175, 38, 41, 175, 230, 238, 58, 162, 132, 21, 65, 126, 165, 125, 236, 234, 162, 202, 48, 131, 187, 237, 218, 68, 143, 248, 106, 219, 67, 119, 80, 219, 248, 185, 163, 148, 216, 156, 52, 177, 116, 239, 242, 170, 150, 240, 241, 118, 218, 230, 114, 159, 73, 159, 223, 212, 202, 176, 204, 129, 197, 6, 157, 78, 163, 237, 179, 159, 52, 66, 103, 201, 176, 233, 45, 122, 190, 171, 48, 16, 26, 104, 179, 150, 12, 48, 56, 166, 247, 167, 173, 219, 181, 204, 172, 9, 36, 222, 174, 28, 244, 78, 196, 179, 102, 131, 75, 43, 132, 31, 43, 108, 6, 137, 132, 200, 138, 219, 167, 162, 224, 40, 147, 76, 245, 230, 103, 44, 55, 117, 126, 181, 225, 6, 252, 163, 56, 160, 40, 141, 247, 216, 183, 12, 170, 12, 187, 204, 241, 228, 70, 29, 168, 171, 224, 176, 9, 236, 8, 139, 191, 162, 131, 132, 133, 52, 233, 62, 176, 249, 143, 69, 3, 10, 46, 114, 237, 213, 138, 218, 81, 114, 20, 69, 152, 230, 123, 27, 24, 57, 152, 90, 52, 253, 190, 128, 61, 196, 174, 3, 108, 141, 21, 173, 99, 171, 17, 204, 231, 1, 175, 85, 124, 57, 115, 210, 22, 228, 229, 95, 216, 149, 99, 36, 152, 3, 50, 35, 217, 127, 224, 208, 71, 193, 225, 197, 137, 184, 47, 191, 183, 126, 103, 219, 58, 45, 189, 6, 231, 69, 193, 16, 226, 167, 86, 77, 117, 58, 108, 223, 19, 110, 126, 244, 40, 229, 112, 168, 107, 71, 101, 74, 239, 78, 220, 164, 85, 7, 192, 230, 12, 161, 152, 57, 88, 159, 212, 231, 100, 173, 88, 190, 75, 212, 11, 124, 198, 19, 187, 160, 221, 25, 130, 120, 85, 121, 245, 118, 181, 68, 73, 218, 22, 222, 102, 56, 148, 21, 69, 179, 237, 67, 119, 155, 30, 85, 31, 127, 180, 53, 188, 189, 144, 157, 243, 18, 158, 14, 30, 222, 102, 75, 226, 227, 107, 224, 240, 9, 58, 45, 163, 85, 56, 31, 131, 87, 188, 44, 124, 197, 1, 175, 1, 84, 252, 66, 79, 12, 168, 63, 147, 165, 52, 85, 151, 54, 193, 191, 166, 74, 57, 0, 76, 63, 153, 128, 131, 242, 247, 62, 66, 25, 47, 93, 109, 178, 42, 109, 146, 81, 162, 192, 0, 206, 91, 16, 97, 191, 16, 149, 223, 218, 207, 7, 160, 91, 134, 45, 16, 216, 211, 37, 159, 59, 164, 37, 140, 239, 68, 226, 189, 175, 115, 105, 22, 23, 161, 206, 74, 159, 163, 109, 51, 71, 32, 143, 222, 188, 254, 114, 170, 88, 101, 7, 209, 21, 90, 148, 149, 117, 65, 236, 103, 243, 248, 252, 221, 138, 190, 43, 159, 215, 41, 119, 78, 0, 130, 145, 25, 78, 122, 161, 121, 57, 148, 1, 29, 38, 90, 195, 54, 10, 35, 159, 99, 29, 182, 240, 133, 200, 238, 190, 255, 249, 107, 248, 140, 148, 254, 37, 3, 45, 165, 171, 189, 252, 228, 229, 22, 250, 10, 193, 226, 16, 39, 27, 105, 214, 145, 161, 102, 10, 50, 247, 230, 26, 65, 223, 164, 46, 84, 101, 84, 230, 245, 178, 8, 35, 212, 42, 247, 130, 135, 234, 58, 159, 16, 3, 124, 213, 220, 169, 241, 168, 227, 107, 174, 54, 198, 104, 123, 175, 233, 137, 222, 148, 136, 234, 54, 63, 27, 255, 9, 112, 16, 27, 195, 52, 222, 249, 134, 84, 224, 71, 195, 103, 97, 143, 191, 90, 125, 98, 226, 53, 167, 173, 166, 117, 183, 113, 103, 92, 141, 175, 241, 215, 42, 122, 68, 13, 243, 99, 64, 143, 196, 106, 96, 67, 176, 242, 92, 230, 31, 104, 131, 235, 143, 154, 167, 68, 210, 22, 134, 168, 68, 106, 85, 100, 220, 122, 20, 55, 36, 34, 210, 82, 75, 22, 251, 132, 123, 183, 49, 29, 230, 2, 194, 27, 226, 79, 200, 98, 199, 200, 46, 2, 133, 237, 107, 62, 119, 251, 42, 217, 81, 151, 20, 78, 63, 116, 189, 1, 33, 213, 70, 116, 220, 82, 140, 246, 222, 134, 98, 157, 79, 86, 225, 189, 160, 185, 207, 236, 180, 57, 155, 206, 208, 73, 109, 233, 232, 19, 109, 226, 252, 234, 251, 100, 111, 87, 187, 186, 8, 124, 78, 82, 126, 80, 114, 98, 195, 12, 192, 226, 87, 223, 240, 135, 217, 128, 6, 108, 59, 53, 129, 26, 94, 230, 129, 180, 113, 215, 41, 237, 59, 196, 26, 222, 96, 11, 184, 192, 83, 227, 7, 116, 20, 59, 34, 78, 147, 244, 132, 192, 31, 105, 70, 25, 55, 1, 65, 41, 183, 180, 34, 93, 20, 153, 1, 8, 2, 16, 194, 12, 233, 24, 40, 235, 92, 153, 224, 168, 30, 108, 185, 220, 139, 94, 217, 116, 9, 172, 158, 125, 219, 79, 173, 40, 26, 27, 165, 159, 76, 31, 169, 218, 142, 62, 7, 218, 74, 46, 46, 246, 171, 60, 152, 224, 85, 4, 137, 52, 86, 197, 191, 38, 188, 252, 22, 84, 95, 31, 212, 167, 39, 46, 230, 41, 135, 86, 76, 221, 228, 60, 223, 116, 75, 212, 235, 92, 2, 242, 217, 99, 103, 79, 75, 110, 98, 223, 169, 87, 174, 59, 231, 163, 101, 160, 215, 44, 240, 115, 10, 235, 113, 13, 28, 214, 115, 252, 96, 151, 22, 81, 102, 168, 124, 236, 187, 158, 102, 146, 81, 10, 180, 199, 179, 232, 245, 145, 88, 6, 234, 152, 78, 122, 213, 106, 177, 96, 94, 42, 212, 218, 254, 41, 160, 63, 231, 79, 122, 11, 118, 30, 142, 200, 57, 243, 153, 220, 248, 21, 147, 251, 172, 7, 112, 76, 96, 200, 213, 146, 9, 51, 127, 135, 95, 202, 209, 203, 149, 178, 52, 15, 35, 24, 90, 64, 84, 158, 153, 10, 160, 94, 101, 57, 139, 217, 150, 99, 129, 240, 250, 17, 28, 104, 100, 6, 126, 72, 214, 3, 221, 185, 13, 228, 118, 106, 186, 241, 255, 43, 24, 122, 180, 108, 24, 125, 202, 198, 73, 90, 14, 199, 223, 188, 43, 254, 232, 215, 72, 183, 220, 94, 208, 59, 172, 101, 1, 51, 248, 48, 121, 126, 249, 251, 168, 139, 113, 16, 158, 204, 204, 189, 42, 145, 231, 104, 196, 212, 57, 151, 45, 90, 53, 151, 170, 19, 28, 41, 69, 181, 214, 125, 86, 35, 9, 95, 57, 138, 5, 136, 34, 223, 42, 67, 43, 63, 1, 123, 26, 200, 95, 190, 10, 189, 0, 251, 151, 157, 121, 113, 101, 94, 231, 97, 102, 229, 200, 252, 35, 136, 149, 200, 98, 205, 64, 213, 90, 175, 95, 17, 59, 142, 14, 83, 96, 53, 96, 209, 123, 231, 3, 91, 130, 93, 33, 232, 66, 66, 15, 212, 195, 47, 109, 253, 14, 77, 75, 174, 234, 4, 37, 246, 87, 87, 162, 144, 54, 179, 40, 161, 37, 17, 106, 172, 113, 110, 140, 199, 219, 42, 6, 210, 190, 52, 162, 65, 11, 116, 74, 72, 240, 215, 225, 188, 186, 140, 17, 62, 187, 150, 3, 216, 124, 16, 118, 213, 200, 184, 198, 20, 226, 125, 188, 112, 199, 248, 111, 214, 155, 95, 171, 164, 33, 15, 93, 172, 91, 216, 183, 92, 126, 83, 36, 202, 53, 96, 237, 43, 202, 195, 37, 6, 220, 55, 2, 242, 251, 156, 201, 178, 226, 60, 176, 119, 82, 172, 180, 98, 20, 168, 42, 9, 53, 102, 110, 161, 65, 74, 31, 164, 108, 133, 184, 255, 119, 17, 113, 186, 255, 192, 150, 202, 111, 180, 234, 195, 234, 203, 180, 242, 88, 187, 156, 166, 51, 253, 180, 240, 144, 109, 45, 206, 142, 102, 53, 32, 55, 25, 214, 241, 66, 120, 95, 115, 145, 9, 27, 126, 85, 43, 94, 58, 116, 31, 150, 205, 46, 117, 6, 104, 58, 39, 72, 170, 179, 118, 5, 95, 36, 163, 226, 211, 92, 196, 251, 151, 170, 88, 1, 142, 148, 207, 115, 20, 86, 120, 6, 18, 58, 97, 44, 206, 156, 128, 140, 154, 6, 244, 220, 21, 237, 138, 45, 83, 204, 99, 79, 144, 86, 31, 103, 144, 255, 23, 112, 198, 197, 172, 241, 44, 142, 48, 170, 175, 112, 224, 166, 55, 148, 35, 202, 208, 88, 131, 251, 164, 89, 35, 214, 245, 188, 147, 165, 18, 235, 154, 201, 208, 245, 230, 139, 51, 209, 107, 101, 151, 128, 247, 216, 58, 10, 125, 171, 47, 132, 168, 218, 7, 157, 253, 90, 132, 6, 64, 125, 239, 189, 169, 217, 57, 8, 175, 229, 117, 58, 10, 217, 155, 103, 211, 5, 96, 114, 187, 239, 146, 213, 213, 185, 35, 132, 223, 242, 186, 74, 149, 58, 137, 82, 10, 15, 14, 21, 150, 126, 247, 205, 143, 78, 131, 145, 53, 128, 147, 198, 75, 73, 239, 210, 140, 16, 208, 92, 249, 235, 134, 6, 204, 167, 48, 144, 76, 162, 180, 17, 118, 135, 72, 204, 95, 124, 135, 93, 246, 254, 177, 65, 34, 69, 178, 120, 71, 124, 6, 14, 37, 96, 102, 2, 102, 141, 53, 149, 81, 190, 26, 49, 123, 205, 26, 245, 234, 113, 151, 130, 105, 15, 163, 31, 14, 163, 88, 190, 41, 44, 243, 150, 247, 27, 109, 219, 47, 156, 153, 156, 74, 72, 178, 209, 12, 141, 244, 92, 103, 170, 51, 239, 51, 125, 146, 216, 22, 99, 140, 47, 211, 95, 206, 1, 228, 188, 18, 35, 157, 170, 6, 223, 201, 213, 37, 161, 239, 155, 65, 253, 146, 33, 223, 54, 234, 224, 11, 151, 71, 161, 1, 173, 190, 60, 78, 129, 53, 173, 252, 77, 252, 253, 168, 131, 16, 184, 171, 91, 243, 48, 246, 74, 243, 65, 38, 31, 192, 189, 118, 113, 210, 120, 19, 135, 153, 103, 75, 43, 69, 72, 96, 34, 167, 128, 174, 135, 243, 158, 148, 85, 137, 100, 87, 244, 58, 188, 143, 121, 24, 122, 214, 152, 74, 59, 242, 12, 252, 112, 59, 113, 200, 242, 219, 81, 184, 13, 175, 150, 65, 254, 245, 90, 109, 94, 244, 149, 114, 252, 108, 168, 230, 63, 182, 62, 245, 215, 172, 58, 120, 184, 127, 100, 161, 227, 41, 109, 1, 81, 195, 162, 116, 205, 233, 108, 214, 117, 205, 152, 225, 173, 74, 109, 135, 143, 166, 219, 180, 235, 248, 185, 243, 219, 55, 177, 81, 57, 107, 22, 28, 248, 242, 183, 158, 148, 22, 158, 88, 128, 114, 105, 241, 74, 178, 151, 136, 46, 193, 12, 249, 173, 53, 153, 160, 116, 32, 107, 13, 81, 75, 211, 64, 4, 111, 205, 99, 32, 46, 30, 6, 72, 116, 131, 223, 132, 144, 158, 161, 253, 174, 244, 171, 202, 77, 136, 76, 27, 47, 48, 222, 229, 51, 98, 131, 137, 240, 114, 234, 180, 100, 191, 117, 107, 28, 198, 165, 239, 96, 192, 73, 185, 41, 102, 11, 55, 179, 78, 161, 216, 5, 37, 231, 4, 152, 145, 216, 42, 168, 78, 142, 124, 251, 17, 34, 224, 204, 51, 185, 19, 6, 54, 165, 156, 172, 144, 254, 108, 168, 218, 119, 229, 192, 170, 45, 14, 122, 238, 80, 86, 103, 82, 133, 112, 215, 143, 200, 12, 35, 79, 146, 152, 191, 124, 64, 34, 195, 221, 227, 59, 132, 225, 224, 47, 48, 143, 50, 155, 148, 90, 30, 255, 74, 99, 120, 49, 21, 58, 171, 152, 36, 222, 221, 218, 246, 166, 59, 113, 236, 53, 85, 118, 172, 43, 92, 96, 182, 153, 194, 162, 227, 9, 89, 77, 115, 196, 142, 102, 181, 253, 122, 63, 185, 43, 78, 99, 228, 2, 129, 65, 13, 190, 191, 164, 145, 236, 245, 44, 198, 106, 32, 129, 84, 230, 15, 110, 245, 120, 63, 80, 14, 153, 228, 64, 205, 76, 196, 231, 185, 167, 216, 118, 163, 182, 91, 212, 154, 198, 17, 154, 200, 243, 12, 174, 161, 199, 1, 228, 190, 14, 49, 249, 122, 150, 124, 94, 176, 176, 171, 34, 223, 73, 247, 52, 181, 25, 170, 205, 53, 22, 254, 45, 235, 6, 113, 22, 138, 32, 133, 65, 95, 152, 193, 40, 149, 253, 174, 42, 172, 99, 150, 253, 210, 230, 198, 165, 214, 236, 198, 171, 255, 63, 22, 96, 81, 122, 144, 199, 237, 227, 246, 190, 71, 4, 239, 139, 179, 179, 91, 27, 250, 23, 141, 147, 73, 173, 208, 254, 122, 112, 74, 114, 100, 131, 229, 141, 24, 94, 149, 92, 126, 123, 183, 96, 6, 67, 69, 106, 52, 143, 106, 168, 179, 219, 121, 158, 183, 132, 180, 197, 195, 24, 176, 79, 152, 155, 215, 79, 23, 159, 218, 166, 127, 100, 135, 21, 208, 85, 197, 159, 169, 179, 246, 206, 87, 196, 226, 134, 76, 92, 204, 2, 107, 201, 231, 203, 181, 116, 76, 181, 128, 5, 66, 7, 147, 135, 27, 87, 247, 123, 103, 85, 46, 195, 175, 82, 173, 10, 205, 51, 51, 163, 233, 60, 228, 93, 206, 33, 121, 212, 4, 165, 36, 11, 24, 182, 230, 199, 7, 179, 118, 216, 26, 181, 64, 178, 161, 144, 173, 202, 217, 61, 191, 103, 121, 234, 225, 91, 1, 150, 153, 217, 179, 91, 8, 123, 243, 46, 11, 115, 232, 39, 25, 169, 114, 53, 52, 97, 18, 219, 161, 23, 190, 191, 36, 12, 167, 27, 188, 216, 20, 144, 220, 189, 149, 198, 226, 74, 190, 156, 116, 28, 77, 59, 13, 235, 59, 196, 213, 55, 248, 101, 126, 154, 105, 139, 94, 83, 90, 1, 222, 23, 107, 102, 178, 127, 177, 32, 78, 6, 199, 60, 64, 102, 80, 207, 100, 86, 218, 147, 129, 57, 13, 124, 160, 244, 20, 168, 183, 227, 38, 110, 65, 46, 164, 61, 236, 225, 183, 109, 107, 83, 249, 186, 255, 210, 126, 136, 205, 143, 135, 97, 39, 0, 94, 204, 53, 48, 129, 216, 34, 125, 231, 151, 67, 197, 145, 94, 7, 115, 160, 236, 191, 197, 43, 33, 213, 214, 240, 163, 237, 5, 97, 43, 23, 131, 147, 171, 94, 177, 113, 30, 120, 33, 229, 123, 70, 72, 43, 48, 189, 183, 54, 151, 8, 145, 114, 180, 112, 243, 94, 51, 167, 138, 254, 159, 239, 180, 44, 87, 59, 56, 207, 18, 206, 152, 51, 153, 243, 113, 48, 55, 134, 17, 61, 136, 39, 188, 59, 166, 59, 119, 136, 179, 153, 82, 167, 64, 74, 156, 245, 193, 251, 242, 187, 40, 147, 104, 52, 23, 166, 206, 86, 73, 45, 148, 77, 23, 248, 164, 149, 46, 119, 71, 178, 70, 40, 202, 179, 83, 99, 218, 122, 100, 123, 189, 62, 198, 204, 214, 216, 223, 109, 245, 180, 207, 109, 92, 185, 8, 66, 244, 254, 91, 121, 46, 49, 83, 208, 116, 25, 149, 87, 36, 223, 87, 5, 175, 214, 37, 17, 93, 167, 21, 184, 0, 83, 201, 104, 202, 186, 242, 105, 251, 173, 119, 82, 111, 250, 156, 67, 118, 177, 58, 102, 41, 147, 64, 85, 163, 136, 248, 247, 95, 13, 15, 65, 215, 16, 101, 104, 69, 5, 20, 212, 254, 132, 19, 52, 38, 250, 63, 33, 220, 29, 37, 229, 83, 4, 79, 209, 162, 93, 147, 128, 64, 119, 168, 62, 222, 240, 193, 135, 20, 63, 168, 234, 20, 56, 171, 142, 42, 99, 133, 135, 212, 105, 213, 240, 145, 134, 42, 179, 82, 4, 147, 135, 172, 62, 232, 3, 69, 18, 99, 144, 215, 184, 11, 222, 246, 236, 9, 167, 16, 242, 77, 237, 48, 13, 155, 79, 131, 241, 11, 44, 72, 195, 46, 84, 140, 172, 136, 207, 180, 31, 76, 152, 163, 102, 118, 131, 119, 202, 145, 155, 234, 102, 102, 211, 233, 91, 198, 76, 147, 201, 249, 61, 91, 8, 141, 124, 212, 234, 101, 153, 87, 180, 141, 29, 57, 83, 254, 129, 207, 179, 51, 249, 70, 209, 179, 173, 86, 37, 143, 36, 134, 78, 41, 99, 73, 241, 238, 232, 10, 235, 115, 120, 135, 86, 165, 82, 127, 43, 77, 199, 156, 103, 235, 35, 8, 179, 24, 132, 150, 62, 48, 220, 79, 8, 239, 105, 102, 238, 148, 24, 164, 193, 227, 96, 135, 71, 174, 202, 74, 161, 31, 140, 187, 54, 223, 216, 62, 22, 109, 48, 205, 54, 39, 216, 123, 99, 242, 72, 8, 134, 21, 233, 101, 146, 125, 158, 62, 197, 163, 209, 144, 255, 136, 233, 137, 119, 176, 98, 202, 240, 80, 220, 224, 224, 104, 44, 6, 246, 35, 183, 138, 167, 177, 114, 193, 48, 216, 50, 113, 64, 22, 189, 103, 250, 201, 246, 108, 229, 59, 222, 191, 130, 55, 221, 142, 15, 69, 143, 1, 28, 89, 144, 116, 124, 168, 73, 19, 163, 109, 92, 123, 208, 42, 192, 110, 158, 51, 125, 106, 32, 31, 172, 197, 130, 181, 7, 160, 194, 146, 16, 117, 107, 147, 52, 65, 193, 77, 24, 172, 21, 246, 147, 240, 26, 242, 111, 154, 215, 183, 173, 199, 197, 25, 108, 24, 140, 247, 101, 15, 170, 217, 62, 101, 85, 34, 249, 91, 98, 72, 14, 221, 203, 181, 190, 48, 126, 168, 47, 108, 40, 145, 141, 107, 30, 228, 51, 37, 100, 100, 233, 109, 17, 174, 44, 160, 36, 101, 47, 164, 19, 146, 191, 247, 2, 192, 191, 153, 151, 81, 33, 103, 211, 205, 24, 53, 14, 114, 159, 102, 47, 14, 139, 52, 50, 126, 24, 253, 169, 120, 69, 121, 230, 54, 27, 213, 9, 116, 173, 159, 49, 200, 240, 191, 202, 183, 221, 244, 82, 15, 41, 5, 227, 0, 24, 247, 227, 189, 41, 59, 60, 163, 207, 112, 76, 94, 57, 45, 200, 212, 238, 183, 68, 89, 60, 67, 90, 243, 208, 81, 164, 111, 184, 196, 227, 155, 129, 227, 190, 130, 46, 233, 68, 250, 209, 2, 15, 188, 254, 110, 238, 251, 4, 235, 241, 247, 20, 164, 184, 163, 194, 35, 52, 3, 229, 164, 192, 210, 254, 89, 222, 110, 138, 5, 252, 52, 167, 232, 20, 168, 8, 199, 58, 223, 111, 189, 29, 24, 44, 148, 186, 22, 204, 219, 46, 217, 32, 141, 35, 181, 70, 238, 180, 103, 247, 115, 38, 237, 178, 193, 104, 224, 214, 190, 108, 255, 151, 27, 156, 121, 251, 234, 227, 155, 90, 186, 87, 89, 88, 10, 56, 254, 152, 225, 197, 24, 193, 208, 101, 105, 245, 126, 54, 25, 159, 204, 68, 65, 56, 239, 102, 83, 113, 160, 79, 234, 155, 137, 190, 173, 108, 120, 141, 62, 136, 173, 23, 64, 31, 199, 204, 100, 22, 238, 95, 34, 5, 255, 245, 137, 161, 183, 29, 149, 176, 170, 156, 110, 172, 83, 159, 92, 212, 133, 144, 27, 170, 62, 235, 200, 236, 179, 45, 106, 138, 175, 74, 82, 119, 76, 66, 157, 33, 136, 6, 139, 9, 62, 49, 199, 216, 245, 16, 201, 251, 103, 83, 65, 46, 213, 12, 149, 169, 241, 245, 63, 211, 21, 8, 77, 33, 219, 191, 225, 132, 12, 72, 28, 190, 247, 213, 103, 27, 87, 113, 162, 206, 93, 156, 160, 150, 241, 141, 236, 164, 226, 64, 172, 234, 148, 236, 207, 3, 12, 52, 254, 75, 174, 61, 31, 15, 219, 137, 6, 173, 141, 63, 78, 36, 63, 173, 91, 157, 6, 156, 233, 255, 105, 228, 210, 23, 30, 190, 31, 159, 164, 84, 198, 184, 128, 67, 189, 43, 91, 4, 96, 188, 97, 233, 173, 77, 45, 100, 159, 156, 186, 20, 83, 47, 33, 19, 254, 137, 54, 233, 125, 238, 125, 250, 93, 244, 162, 20, 241, 156, 55, 1, 91, 36, 131, 119, 82, 238, 218, 177, 199, 192, 34, 71, 126, 199, 65, 223, 45, 247, 247, 160, 50, 202, 224, 161, 249, 47, 24, 222, 96, 30, 35, 149, 230, 243, 40, 205, 196, 27, 162, 193, 172, 197, 205, 168, 12, 17, 244, 202, 97, 137, 230, 21, 247, 147, 153, 29, 200, 89, 4, 38, 151, 217, 162, 138, 67, 193, 238, 10, 88, 49, 237, 184, 232, 123, 62, 144, 153, 77, 183, 38, 123, 93, 131, 153, 1, 235, 188, 225, 191, 211, 243, 39, 219, 45, 49, 119, 154, 30, 176, 15, 239, 39, 71, 158, 183, 239, 91, 206, 54, 52, 207, 80, 63, 47, 94, 203, 63, 143, 17, 27, 15, 93, 76, 227, 124, 136, 26, 224, 60, 58, 3, 16, 188, 52, 29, 63, 163, 97, 109, 204, 241, 87, 85, 195, 0, 184, 51, 88, 189, 166, 52, 85, 238, 51, 168, 155, 181, 175, 40, 150, 50, 118, 106, 195, 51, 155, 24, 189, 213, 128, 70, 198, 171, 114, 181, 246, 114, 213, 0, 53, 117, 168, 152, 54, 168, 5, 145, 95, 4, 172, 43, 232, 193, 235, 32, 216, 68, 59, 21, 62, 191, 102, 83, 19, 180, 178, 34, 62, 199, 248, 140, 127, 199, 179, 54, 36, 8, 48, 67, 251, 232, 182, 140, 103, 73, 184, 3, 6, 104, 251, 161, 51, 161, 25, 159, 61, 142, 14, 113, 181, 28, 231, 56, 178, 218, 41, 212, 165, 39, 105, 207, 45, 67, 120, 8, 115, 22, 243, 105, 14, 156, 146, 189, 184, 11, 125, 199, 156, 109, 72, 135, 155, 242, 7, 46, 167, 247, 47, 88, 146, 170, 227, 203, 51, 83, 174, 137, 160, 172, 71, 8, 19, 156, 35, 251, 82, 18, 174, 0, 65, 237, 69, 179, 195, 17, 33, 171, 185, 189, 68, 145, 94, 95, 30, 240, 43, 8, 188, 129, 15, 236, 119, 245, 53, 171, 175, 223, 99, 24, 44, 182, 10, 247, 115, 6, 183, 189, 160, 248, 199, 124, 90, 103, 41, 62, 96, 168, 94, 254, 51, 110, 71, 178, 86, 118, 245, 43, 249, 201, 144, 8, 152, 8, 183, 31, 123, 136, 69, 71, 210, 90, 62, 112, 206, 255, 135, 218, 226, 178, 248, 123, 21, 232, 82, 226, 248, 93, 19, 34, 175, 47, 155, 180, 82, 171, 194, 115, 209, 101, 46, 16, 66, 164, 249, 239, 76, 217, 43, 195, 159, 31, 104, 111, 252, 218, 241, 166, 252, 12, 38, 79, 125, 13, 102, 146, 73, 121, 120, 111, 188, 121, 87, 165, 121, 131, 193, 166, 136, 88, 249, 225, 202, 254, 65, 234, 154, 79, 45, 227, 23, 76, 232, 101, 87, 184, 212, 16, 77, 11, 56, 209, 191, 27, 171, 106, 42, 247, 3, 98, 0, 158, 115, 12, 136, 8, 71, 105, 183, 223, 82, 226, 8, 236, 218, 137, 56, 231, 62, 252, 85, 150, 14, 12, 47, 252, 1, 70, 8, 250, 60, 146, 45, 59, 195, 159, 104, 173, 67, 1, 145, 227, 192, 59, 145, 176, 75, 73, 148, 130, 7, 191, 5, 51, 186, 60, 139, 47, 215, 220, 89, 196, 8, 43, 25, 198, 127, 29, 70, 173, 30, 42, 27, 176, 171, 127, 81, 145, 223, 19, 232, 253, 58, 54, 211, 252, 59, 179, 117, 248, 207, 123, 187, 152, 191, 241, 119, 183, 47, 211, 43, 179, 15, 219, 236, 89, 242, 155, 78, 202, 208, 111, 204, 161, 125, 82, 153, 241, 163, 133, 181, 64, 223, 65, 255, 155, 79, 239, 70, 34, 181, 224, 157, 33, 104, 235, 173, 128, 118, 140, 227, 79, 131, 104, 241, 117, 116, 171, 192, 199, 98, 63, 166, 250, 2, 156, 170, 31, 123, 168, 135, 127, 18, 187, 109, 250, 208, 212, 121, 254, 27, 101, 186, 187, 193, 220, 64, 171, 129, 35, 91, 53, 222, 162, 205, 69, 24, 123, 29, 235, 29, 146, 204, 74, 221, 142, 201, 144, 18, 38, 58, 221, 162, 61, 69, 26, 152, 151, 77, 157, 14, 185, 190, 199, 172, 16, 82, 92, 179, 84, 74, 220, 81, 53, 231, 187, 81, 217, 251, 200, 128, 238, 242, 107, 133, 237, 74, 100, 215, 43, 162, 139, 69, 75, 81, 156, 100, 159, 200, 193, 245, 86, 32, 129, 95, 198, 16, 221, 252, 231, 182, 53, 111, 35, 239, 149, 83, 104, 203, 206, 169, 73, 94, 60, 68, 30, 167, 67, 95, 64, 44, 103, 89, 149, 37, 203, 41, 242, 199, 212, 212, 215, 34, 139, 11, 241, 157, 94, 64, 4, 190, 102, 64, 57, 53, 130, 149, 69, 1, 108, 101, 211, 36, 137, 69, 161, 238, 223, 133, 176, 169, 151, 128, 136, 26, 45, 127, 76, 213, 9, 113, 49, 132, 85, 111, 178, 83, 153, 182, 120, 80, 16, 48, 171, 230, 235, 96, 150, 181, 0, 218, 180, 222, 140, 239, 166, 221, 175, 76, 169, 153, 40, 61, 198, 13, 212, 14, 45, 58, 142, 103, 186, 228, 225, 177, 133, 5, 211, 96, 94, 194, 17, 145, 241, 231, 219, 6, 239, 155, 252, 41, 242, 98, 190, 154, 161, 242, 99, 60, 190, 191, 128, 117, 183, 252, 190, 200, 51, 141, 1, 59, 105, 9, 118, 188, 194, 140, 94, 227, 119, 182, 82, 55, 89, 43, 58, 210, 62, 120, 34, 80, 126, 225, 200, 191, 91, 11, 118, 198, 204, 122, 228, 87, 170, 171, 216, 111, 18, 164, 187, 211, 99, 186, 51, 32, 118, 22, 199, 244, 209, 24, 91, 208, 152, 167, 202, 220, 89, 122, 176, 220, 162, 150, 146, 62, 36, 45, 116, 125, 50, 55, 167, 109, 163, 222, 44, 63, 16, 171, 238, 68, 41, 180, 65, 201, 49, 130, 222, 86, 107, 160, 4, 212, 168, 211, 163, 41, 146, 212, 63, 211, 179, 36, 175, 118, 149, 65, 98, 151, 1, 31, 160, 193, 100, 76, 163, 164, 173, 131, 188, 185, 132, 60, 18, 156, 216, 67, 146, 98, 216, 205, 200, 96, 52, 62, 47, 213, 167, 23, 63, 98, 69, 215, 224, 117, 238, 136, 16, 39, 149, 195, 57, 148, 57, 153, 80, 98, 210, 17, 8, 38, 13, 123, 174, 125, 221, 50, 137, 43, 197, 157, 12, 30, 17, 199, 255, 94, 76, 160, 18, 222, 37, 104, 7, 68, 14, 30, 47, 31, 101, 249, 32, 59, 21, 126, 210, 115, 144, 207, 176, 84, 55, 100, 12, 141, 50, 179, 231, 171, 254, 185, 233, 9, 127, 53, 103, 200, 213, 76, 112, 221, 200, 125, 45, 33, 249, 63, 127, 86, 143, 150, 14, 81, 57, 181, 177, 155, 222, 156, 251, 166, 54, 94, 167, 46, 63, 152, 66, 17, 203, 226, 159, 69, 136, 251, 239, 176, 56, 2, 31, 160, 181, 30, 63, 166, 31, 95, 162, 123, 197, 117, 17, 131, 45, 46, 121, 232, 36, 236, 141, 147, 203, 74, 56, 85, 224, 210, 108, 12, 144, 67, 167, 56, 72, 14, 29, 70, 59, 171, 233, 88, 108, 192, 238, 254, 87, 158, 190, 161, 235, 63, 190, 65, 111, 6, 146, 102, 6, 56, 207, 150, 58, 216, 162, 188, 242, 125, 78, 79, 159, 40, 248, 105, 60, 255, 167, 220, 237, 151, 33, 220, 94, 201, 45, 45, 52, 237, 82, 98, 79, 10, 252, 111, 251, 224, 118, 108, 60, 189, 144, 123, 21, 83, 121, 197, 246, 115, 171, 171, 241, 79, 79, 28, 71, 0, 129, 131, 202, 125, 130, 111, 119, 218, 207, 0, 217, 118, 218, 10, 41, 230, 183, 171, 209, 1, 68, 207, 126, 226, 1, 172, 254, 182, 247, 51, 38, 188, 130, 23, 222, 253, 179, 148, 65, 136, 62, 232, 62, 37, 191, 158, 126, 206, 14, 164, 195, 72, 231, 16, 236, 228, 226, 21, 116, 252, 78, 79, 28, 177, 133, 175, 88, 57, 59, 114, 223, 7, 193, 34, 251, 220, 108, 154, 116, 253, 96, 169, 1, 173, 119, 4, 153, 46, 100, 69, 89, 33, 11, 185, 208, 189, 92, 165, 219, 178, 92, 60, 208, 225, 93, 37, 218, 127, 218, 40, 49, 142, 211, 221, 54, 96, 55, 7, 175, 72, 1, 153, 209, 144, 60, 202, 249, 134, 73, 205, 109, 124, 182, 32, 247, 150, 159, 152, 81, 189, 20, 8, 136, 240, 171, 109, 58, 71, 115, 210, 70, 93, 124, 34, 249, 31, 97, 34, 231, 1, 223, 156, 241, 81, 136, 18, 115, 217, 195, 133, 205, 105, 209, 177, 187, 240, 248, 218, 91, 156, 122, 49, 44, 170, 119, 31, 73, 215, 68, 112, 109, 74, 8, 120, 41, 155, 160, 245, 9, 51, 85, 186, 251, 155, 76, 8, 156, 206, 117, 17, 164, 166, 223, 50, 58, 107, 84, 67, 193, 89, 90, 249, 202, 229, 109, 252, 29, 201, 214, 174, 50, 50, 237, 216, 95, 158, 252, 20, 161, 113, 8, 36, 232, 203, 178, 11, 160, 44, 220, 24, 2, 25, 47, 19, 39, 114, 21, 30, 237, 98, 1, 85, 76, 189, 6, 139, 68, 162, 209, 97, 205, 176, 48, 58, 48, 116, 45, 52, 91, 125, 122, 10, 88, 215, 241, 215, 27, 117, 232, 15, 169, 5, 190, 14, 129, 80, 67, 5, 21, 172, 196, 20, 66, 184, 49, 66, 143, 105, 198, 213, 173, 119, 50, 208, 188, 178, 119, 87, 1, 58, 204, 129, 13, 131, 113, 165, 170, 14, 89, 160, 157, 152, 144, 12, 26, 237, 113, 91, 141, 47, 84, 15, 127, 54, 135, 120, 147, 188, 55, 16, 182, 134, 95, 58, 172, 250, 150, 153, 137, 148, 179, 29, 75, 37, 101, 38, 96, 243, 135, 114, 255, 199, 181, 48, 113, 111, 160, 127, 124, 194, 128, 171, 9, 50, 1, 42, 1, 179, 171, 190, 146, 219, 227, 201, 193, 193, 165, 177, 237, 176, 112, 218, 3, 190, 221, 205, 170, 44, 108, 36, 165, 183, 35, 69, 188, 8, 247, 123, 81, 248, 179, 34, 119, 175, 8, 28, 31, 168, 206, 16, 116, 60, 126, 177, 254, 10, 223, 28, 65, 176, 33, 94, 238, 19, 153, 5, 240, 176, 30, 56, 242, 100, 174, 63, 14, 40, 118, 161, 193, 232, 86, 132, 53, 90, 164, 39, 171, 197, 51, 16, 91, 28, 67, 68, 163, 137, 222, 3, 139, 167, 117, 93, 226, 137, 128, 232, 9, 218, 167, 196, 31, 215, 144, 6, 31, 149, 123, 80, 188, 32, 1, 126, 88, 71, 127, 116, 152, 96, 102, 139, 102, 185, 41, 103, 225, 102, 113, 20, 168, 177, 137, 247, 113, 171, 200, 159, 191, 110, 35, 145, 192, 195, 76, 68, 69, 216, 66, 26, 186, 129, 248, 85, 77, 171, 53, 109, 66, 143, 164, 192, 109, 117, 103, 187, 92, 81, 125, 91, 32, 60, 29, 83, 80, 33, 48, 115, 123, 52, 212, 15, 173, 21, 23, 43, 87, 83, 176, 189, 107, 4, 85, 9, 39, 199, 107, 60, 114, 156, 177, 189, 158, 200, 185, 209, 16, 157, 74, 155, 106, 88, 10, 193, 172, 103, 8, 241, 23, 95, 39, 134, 36, 248, 20, 9, 243, 45, 84, 169, 193, 136, 7, 250, 234, 213, 179, 141, 102, 158, 85, 198, 120, 162, 77, 194, 140, 70, 147, 86, 42, 193, 131, 166, 236, 111, 96, 26, 53, 35, 204, 19, 161, 37, 8, 126, 49, 224, 56, 231, 78, 216, 55, 211, 76, 128, 106, 9, 254, 5, 25, 135, 128, 241, 121, 203, 43, 25, 200, 89, 186, 49, 72, 67, 221, 187, 249, 96, 231, 16, 29, 100, 211, 233, 45, 85, 95, 52, 121, 174, 241, 240, 84, 169, 165, 139, 32, 235, 7, 129, 72, 94, 95, 85, 217, 23, 240, 87, 88, 143, 82, 171, 66, 121, 41, 216, 154, 9, 179, 27, 20, 195, 59, 145, 143, 37, 77, 88, 29, 82, 108, 8, 182, 187, 121, 53, 39, 157, 121, 51, 128, 136, 132], + [131, 53, 77, 220, 183, 219, 196, 48, 228, 139, 208, 41, 249, 16, 52, 44, 105, 172, 75, 161, 38, 128, 104, 214, 175, 218, 54, 235, 2, 169, 195, 95, 233, 47, 16, 3, 234, 126, 79, 248, 68, 130, 180, 79, 177, 212, 238, 27, 5, 200, 196, 79, 47, 177, 51, 217, 129, 176, 58, 133, 42, 143, 129, 182, 77, 94, 23, 218, 124, 183, 233, 23, 168, 116, 76, 157, 62, 201, 10, 34, 195, 85, 0, 100, 229, 115, 217, 183, 15, 252, 83, 31, 67, 202, 26, 35, 153, 149, 36, 214, 44, 99, 49, 67, 195, 87, 16, 250, 127, 94, 220, 27, 192, 63, 189, 251, 47, 218, 18, 39, 200, 134, 176, 57, 10, 79, 220, 131, 78, 1, 79, 189, 216, 123, 66, 237, 221, 137, 159, 99, 142, 219, 18, 62, 208, 110, 165, 49, 179, 162, 2, 78, 41, 190, 140, 175, 127, 135, 87, 196, 254, 204, 124, 199, 59, 135, 192, 39, 32, 240, 71, 148, 223, 10, 203, 210, 165, 61, 81, 247, 18, 51, 179, 85, 48, 123, 207, 152, 226, 93, 241, 255, 64, 229, 122, 179, 204, 169, 183, 206, 199, 55, 180, 249, 33, 93, 136, 96, 124, 125, 157, 76, 84, 148, 67, 68, 211, 109, 208, 3, 108, 249, 22, 11, 197, 105, 117, 53, 185, 102, 172, 78, 211, 175, 56, 190, 214, 55, 147, 243, 107, 237, 181, 249, 100, 163, 191, 198, 161, 125, 124, 110, 244, 174, 224, 191, 66, 7, 227, 107, 167, 145, 99, 46, 84, 209, 15, 167, 99, 152, 94, 227, 49, 189, 111, 37, 175, 54, 255, 193, 170, 107, 170, 55, 126, 180, 111, 138, 26, 234, 3, 97, 133, 114, 179, 0, 230, 39, 143, 187, 213, 195, 77, 191, 247, 66, 135, 182, 201, 118, 221, 159, 210, 182, 63, 48, 197, 97, 131, 65, 202, 17, 225, 80, 245, 235, 155, 62, 115, 98, 220, 4, 241, 160, 129, 118, 200, 81, 226, 153, 233, 141, 206, 227, 171, 101, 240, 209, 161, 229, 82, 154, 225, 150, 213, 250, 86, 164, 121, 70, 130, 169, 135, 189, 23, 54, 26, 140, 163, 135, 60, 229, 249, 198, 182, 194, 205, 54, 144, 139, 28, 69, 34, 101, 233, 204, 118, 18, 28, 11, 184, 194, 202, 143, 57, 18, 49, 73, 214, 216, 211, 197, 32, 2, 183, 217, 87, 201, 94, 19, 137, 33, 151, 113, 247, 29, 126, 253, 253, 190, 69, 44, 76, 118, 53, 42, 210, 3, 230, 225, 143, 122, 255, 67, 36, 123, 32, 112, 95, 251, 119, 144, 214, 222, 184, 207, 119, 210, 176, 249, 185, 107, 52, 169, 206, 54, 99, 123, 9, 8, 13, 255, 223, 155, 72, 39, 104, 202, 65, 176, 229, 100, 232, 98, 120, 152, 45, 46, 78, 234, 71, 92, 136, 91, 97, 170, 21, 208, 68, 163, 161, 239, 187, 7, 242, 69, 163, 55, 165, 174, 124, 215, 108, 103, 238, 207, 126, 180, 89, 203, 31, 48, 76, 11, 251, 9, 227, 220, 134, 148, 139, 129, 145, 247, 70, 242, 158, 92, 215, 138, 215, 35, 218, 57, 245, 123, 136, 149, 104, 102, 21, 251, 223, 70, 0, 140, 143, 86, 105, 127, 210, 16, 229, 243, 53, 208, 223, 39, 67, 188, 68, 130, 30, 224, 146, 229, 134, 212, 106, 9, 137, 52, 14, 172, 123, 74, 107, 215, 162, 226, 163, 57, 62, 174, 19, 245, 124, 162, 236, 99, 73, 189, 42, 6, 47, 78, 203, 237, 144, 131, 175, 35, 72, 58, 118, 232, 34, 123, 89, 14, 148, 219, 126, 26, 227, 208, 253, 101, 209, 7, 52, 79, 131, 78, 210, 169, 119, 64, 68, 31, 94, 56, 27, 166, 0, 71, 239, 174, 84, 252, 139, 64, 71, 201, 246, 195, 42, 207, 135, 49, 118, 24, 66, 97, 58, 193, 125, 153, 178, 199, 39, 127, 249, 32, 18, 176, 78, 188, 176, 230, 93, 192, 248, 94, 192, 217, 61, 222, 226, 58, 132, 74, 15, 61, 221, 40, 199, 214, 82, 72, 223, 72, 246, 101, 123, 4, 79, 137, 141, 221, 152, 100, 233, 83, 178, 116, 229, 246, 76, 21, 24, 172, 146, 108, 209, 199, 75, 23, 227, 162, 142, 31, 125, 98, 48, 103, 65, 75, 238, 10, 78, 134, 168, 56, 249, 24, 209, 72, 75, 101, 232, 167, 236, 255, 134, 80, 237, 208, 86, 133, 104, 132, 28, 86, 212, 140, 7, 215, 177, 70, 149, 216, 62, 168, 39, 96, 222, 7, 180, 160, 87, 150, 109, 212, 190, 79, 24, 203, 25, 100, 166, 33, 188, 50, 147, 220, 217, 150, 180, 107, 63, 242, 156, 140, 241, 95, 160, 35, 149, 178, 161, 147, 228, 140, 24, 91, 122, 57, 242, 138, 183, 223, 123, 7, 225, 202, 53, 221, 201, 235, 4, 202, 238, 135, 116, 153, 157, 116, 176, 218, 189, 254, 117, 124, 46, 240, 64, 116, 83, 84, 148, 130, 128, 136, 26, 176, 176, 5, 203, 165, 147, 203, 180, 245, 189, 67, 181, 26, 9, 9, 184, 244, 231, 59, 26, 178, 125, 143, 16, 229, 125, 186, 24, 241, 164, 244, 213, 139, 237, 30, 66, 7, 92, 103, 251, 191, 64, 129, 251, 78, 70, 19, 127, 215, 80, 200, 69, 81, 43, 163, 252, 158, 151, 11, 104, 190, 60, 145, 141, 201, 186, 163, 55, 39, 28, 132, 35, 163, 138, 162, 147, 111, 206, 70, 175, 151, 205, 181, 3, 83, 209, 31, 125, 131, 172, 198, 81, 144, 107, 205, 120, 80, 129, 118, 199, 51, 86, 165, 46, 198, 32, 87, 142, 104, 212, 19, 240, 188, 211, 123, 13, 89, 181, 229, 58, 69, 85, 134, 107, 161, 168, 217, 117, 244, 142, 2, 176, 134, 146, 215, 170, 44, 227, 166, 23, 161, 214, 152, 4, 76, 184, 138, 203, 229, 22, 161, 105, 46, 44, 16, 131, 219, 114, 131, 17, 29, 232, 39, 164, 35, 50, 201, 164, 255, 144, 23, 182, 214, 236, 165, 235, 63, 128, 5, 17, 135, 242, 154, 216, 243, 174, 107, 18, 34, 30, 40, 241, 95, 42, 14, 48, 169, 112, 30, 220, 197, 233, 196, 181, 172, 38, 112, 136, 69, 236, 35, 243, 26, 127, 114, 181, 197, 94, 110, 160, 75, 54, 38, 124, 121, 238, 109, 13, 172, 35, 115, 162, 139, 128, 2, 134, 207, 141, 44, 118, 47, 87, 59, 151, 235, 169, 154, 109, 213, 180, 160, 185, 17, 77, 48, 140, 169, 176, 157, 5, 178, 157, 14, 238, 168, 186, 145, 17, 7, 5, 142, 210, 124, 145, 126, 67, 26, 12, 43, 95, 28, 216, 30, 236, 212, 240, 135, 230, 28, 193, 33, 215, 121, 79, 110, 198, 131, 190, 35, 231, 181, 224, 145, 119, 167, 161, 84, 247, 228, 94, 133, 238, 92, 53, 7, 13, 79, 141, 10, 23, 109, 254, 201, 15, 225, 109, 185, 82, 223, 104, 42, 246, 23, 99, 206, 227, 205, 123, 85, 175, 247, 143, 68, 54, 161, 62, 141, 33, 164, 94, 86, 255, 233, 72, 175, 12, 250, 199, 188, 58, 152, 153, 219, 89, 169, 112, 209, 213, 213, 48, 112, 19, 179, 99, 109, 78, 99, 0, 56, 125, 22, 33, 197, 106, 153, 2, 9, 239, 158, 114, 231, 86, 103, 83, 54, 247, 4, 231, 196, 35, 140, 85, 254, 86, 80, 66, 47, 2, 193, 104, 52, 213, 202, 214, 130, 11, 180, 156, 207, 17, 243, 121, 174, 248, 247, 177, 79, 193, 227, 59, 203, 8, 185, 55, 112, 73, 60, 194, 125, 123, 165, 175, 246, 174, 38, 145, 190, 116, 21, 247, 161, 240, 17, 160, 73, 42, 234, 78, 183, 89, 217, 166, 27, 37, 186, 238, 23, 241, 48, 26, 15, 216, 218, 10, 112, 198, 85, 93, 196, 205, 0, 246, 1, 138, 29, 0, 221, 122, 111, 70, 122, 247, 150, 131, 58, 46, 191, 115, 247, 54, 85, 36, 94, 19, 79, 10, 44, 42, 187, 45, 162, 107, 38, 212, 49, 218, 122, 112, 248, 196, 4, 76, 47, 207, 81, 238, 219, 75, 162, 37, 137, 81, 226, 35, 161, 98, 39, 41, 50, 16, 217, 23, 182, 18, 17, 31, 148, 108, 8, 231, 234, 219, 107, 218, 45, 29, 53, 2, 147, 114, 67, 157, 181, 65, 199, 134, 164, 166, 181, 96, 66, 88, 25, 140, 214, 19, 99, 200, 41, 251, 226, 118, 140, 250, 224, 227, 74, 213, 246, 213, 168, 125, 200, 151, 105, 55, 253, 244, 111, 168, 25, 145, 37, 40, 54, 140, 118, 155, 65, 244, 20, 79, 53, 55, 221, 163, 41, 129, 126, 37, 37, 249, 56, 160, 94, 143, 152, 232, 145, 100, 172, 187, 166, 23, 166, 131, 54, 97, 181, 86, 72, 198, 31, 122, 39, 2, 120, 65, 140, 142, 103, 187, 35, 66, 124, 177, 151, 10, 205, 54, 141, 88, 152, 136, 41, 108, 54, 118, 68, 241, 46, 176, 216, 196, 25, 61, 26, 13, 63, 202, 186, 179, 111, 194, 207, 120, 122, 167, 158, 91, 36, 68, 159, 153, 236, 171, 232, 73, 195, 108, 178, 199, 85, 189, 18, 113, 89, 123, 193, 232, 64, 106, 223, 231, 241, 24, 146, 102, 138, 218, 163, 186, 244, 60, 142, 131, 18, 115, 205, 221, 173, 253, 242, 37, 99, 178, 65, 92, 252, 58, 149, 235, 34, 111, 228, 235, 195, 40, 212, 110, 34, 154, 74, 202, 21, 29, 198, 24, 126, 1, 94, 143, 10, 243, 154, 34, 163, 234, 18, 49, 1, 238, 112, 209, 20, 114, 199, 230, 50, 178, 145, 2, 66, 47, 91, 189, 219, 171, 41, 15, 29, 49, 29, 85, 165, 168, 173, 255, 94, 63, 116, 245, 80, 106, 133, 1, 186, 231, 200, 167, 170, 224, 202, 10, 151, 192, 210, 218, 242, 84, 116, 84, 2, 5, 24, 195, 91, 226, 153, 68, 120, 111, 131, 182, 22, 219, 130, 197, 188, 255, 197, 195, 216, 81, 161, 59, 84, 199, 182, 5, 113, 45, 145, 232, 244, 20, 67, 62, 84, 96, 121, 214, 149, 249, 31, 179, 137, 178, 78, 229, 242, 167, 246, 234, 19, 99, 236, 94, 60, 22, 19, 162, 89, 210, 187, 13, 12, 180, 209, 222, 57, 168, 111, 147, 253, 225, 134, 137, 59, 100, 45, 97, 119, 89, 120, 118, 32, 246, 218, 82, 107, 131, 211, 27, 122, 198, 241, 181, 100, 62, 117, 191, 222, 64, 227, 78, 203, 232, 246, 10, 207, 233, 170, 7, 137, 162, 42, 61, 59, 180, 159, 221, 131, 79, 187, 102, 83, 174, 31, 82, 243, 226, 93, 66, 135, 197, 40, 196, 211, 240, 10, 213, 176, 241, 222, 66, 48, 98, 214, 22, 24, 18, 239, 212, 245, 17, 99, 220, 148, 69, 40, 26, 138, 38, 55, 99, 24, 195, 160, 213, 96, 108, 80, 119, 42, 49, 64, 107, 124, 141, 55, 44, 7, 92, 122, 93, 184, 215, 112, 172, 142, 238, 252, 101, 41, 145, 148, 62, 217, 27, 36, 174, 58, 89, 118, 250, 5, 1, 119, 171, 80, 189, 58, 246, 36, 214, 66, 101, 130, 108, 102, 64, 183, 69, 166, 149, 147, 121, 178, 145, 103, 54, 242, 30, 184, 153, 8, 61, 46, 206, 78, 134, 68, 223, 150, 157, 125, 182, 116, 21, 135, 206, 9, 3, 98, 192, 110, 99, 201, 179, 87, 166, 95, 59, 120, 129, 117, 242, 246, 213, 223, 25, 220, 29, 227, 204, 127, 12, 113, 103, 2, 50, 189, 255, 194, 143, 173, 168, 126, 156, 118, 110, 2, 39, 12, 45, 130, 100, 171, 32, 84, 148, 19, 88, 205, 190, 188, 123, 205, 236, 201, 130, 242, 191, 6, 119, 184, 186, 141, 240, 149, 95, 28, 200, 181, 213, 194, 28, 166, 21, 49, 59, 57, 174, 168, 31, 105, 220, 169, 69, 163, 200, 59, 14, 197, 51, 221, 96, 96, 237, 2, 0, 171, 255, 25, 227, 242, 85, 55, 253, 176, 119, 252, 72, 131, 209, 141, 175, 234, 231, 26, 156, 131, 74, 185, 34, 22, 175, 23, 218, 207, 223, 77, 151, 8, 41, 36, 210, 21, 49, 202, 100, 60, 50, 78, 136, 18, 159, 5, 237, 249, 0, 13, 198, 114, 239, 245, 42, 101, 96, 230, 183, 80, 139, 235, 61, 80, 237, 226, 161, 174, 182, 19, 151, 118, 163, 248, 77, 120, 7, 29, 243, 0, 50, 216, 221, 231, 242, 155, 70, 165, 136, 12, 1, 225, 58, 130, 251, 103, 202, 2, 36, 226, 174, 199, 148, 211, 132, 57, 54, 73, 230, 137, 172, 237, 237, 73, 130, 211, 131, 172, 48, 112, 251, 118, 10, 163, 198, 149, 80, 40, 137, 80, 65, 37, 16, 202, 75, 187, 82, 97, 78, 213, 58, 231, 209, 31, 188, 247, 24, 96, 84, 255, 230, 15, 168, 94, 66, 156, 71, 11, 115, 243, 33, 127, 137, 174, 159, 106, 89, 78, 108, 250, 230, 12, 114, 158, 219, 46, 195, 98, 214, 109, 20, 60, 225, 128, 245, 200, 157, 138, 33, 117, 163, 63, 191, 182, 104, 123, 169, 45, 74, 227, 5, 172, 156, 68, 191, 227, 146, 35, 179, 127, 31, 49, 193, 88, 27, 176, 224, 109, 39, 39, 236, 181, 181, 170, 78, 17, 57, 191, 9, 124, 220, 205, 11, 155, 170, 185, 228, 34, 137, 105, 71, 218, 50, 17, 224, 36, 65, 121, 145, 25, 47, 86, 177, 36, 198, 52, 79, 84, 143, 106, 18, 93, 138, 237, 95, 58, 131, 64, 189, 103, 38, 181, 179, 105, 97, 51, 206, 199, 55, 245, 52, 33, 81, 121, 38, 47, 53, 227, 212, 114, 64, 74, 241, 253, 82, 148, 236, 121, 115, 227, 77, 90, 196, 197, 166, 95, 52, 178, 140, 203, 223, 196, 151, 29, 60, 34, 74, 89, 73, 19, 51, 86, 250, 203, 71, 5, 47, 107, 62, 114, 134, 87, 124, 179, 204, 38, 11, 126, 38, 190, 236, 197, 5, 192, 212, 209, 57, 73, 81, 30, 59, 225, 82, 207, 88, 40, 140, 176, 228, 142, 209, 109, 185, 16, 250, 252, 91, 137, 93, 37, 9, 198, 134, 208, 194, 78, 35, 230, 57, 126, 103, 170, 177, 52, 21, 11, 1, 5, 70, 41, 22, 34, 47, 11, 65, 147, 57, 25, 212, 47, 233, 245, 124, 203, 145, 218, 156, 150, 60, 212, 154, 144, 207, 209, 153, 245, 13, 19, 111, 166, 15, 213, 141, 64, 164, 7, 250, 61, 95, 170, 106, 189, 80, 89, 95, 206, 225, 100, 47, 228, 84, 206, 129, 251, 154, 166, 116, 186, 241, 140, 69, 250, 156, 239, 47, 77, 113, 85, 179, 231, 251, 238, 204, 55, 100, 219, 31, 150, 79, 116, 5, 194, 121, 75, 54, 20, 248, 249, 122, 87, 199, 177, 85, 23, 39, 108, 169, 229, 107, 130, 52, 154, 83, 198, 230, 54, 214, 112, 57, 71, 131, 181, 7, 121, 19, 227, 64, 162, 233, 139, 38, 156, 72, 130, 118, 231, 15, 100, 0, 5, 232, 168, 215, 140, 114, 146, 182, 137, 115, 9, 236, 170, 63, 251, 200, 174, 229, 177, 131, 253, 68, 179, 12, 174, 201, 153, 45, 79, 126, 128, 84, 134, 111, 249, 177, 136, 142, 64, 191, 27, 65, 21, 77, 103, 138, 255, 84, 176, 134, 85, 139, 108, 63, 187, 119, 103, 189, 8, 21, 172, 26, 164, 126, 230, 85, 38, 203, 93, 213, 77, 54, 158, 189, 119, 236, 243, 87, 79, 180, 99, 138, 120, 237, 26, 55, 152, 223, 190, 239, 8, 181, 60, 194, 47, 162, 253, 155, 168, 199, 212, 48, 186, 100, 134, 113, 4, 197, 195, 25, 217, 17, 217, 52, 209, 63, 150, 44, 252, 153, 165, 17, 48, 52, 218, 56, 140, 95, 166, 33, 69, 15, 146, 4, 220, 194, 198, 92, 41, 197, 54, 133, 140, 112, 22, 183, 129, 166, 28, 91, 38, 34, 245, 18, 230, 203, 121, 4, 105, 108, 212, 91, 127, 42, 251, 111, 90, 85, 97, 187, 15, 169, 38, 98, 78, 216, 6, 128, 13, 130, 58, 7, 9, 97, 239, 226, 213, 198, 250, 252, 60, 10, 191, 44, 8, 30, 160, 154, 96, 33, 61, 3, 71, 47, 18, 132, 241, 222, 53, 231, 15, 144, 223, 240, 73, 57, 155, 237, 112, 89, 130, 165, 12, 149, 104, 120, 3, 101, 165, 171, 196, 70, 142, 206, 61, 4, 116, 154, 237, 231, 71, 225, 72, 64, 249, 164, 249, 188, 17, 97, 72, 108, 2, 9, 44, 250, 86, 67, 222, 41, 1, 203, 228, 29, 251, 238, 189, 188, 76, 34, 101, 220, 144, 158, 64, 140, 240, 18, 219, 38, 112, 126, 255, 247, 41, 31, 150, 7, 88, 245, 14, 135, 135, 226, 247, 204, 130, 8, 136, 49, 241, 219, 15, 231, 214, 208, 253, 74, 205, 176, 85, 98, 0, 219, 134, 170, 238, 163, 14, 121, 121, 89, 238, 201, 89, 192, 103, 104, 146, 146, 255, 14, 130, 74, 80, 116, 25, 44, 5, 232, 229, 91, 176, 181, 134, 231, 10, 118, 87, 20, 255, 108, 170, 164, 177, 172, 244, 81, 7, 93, 76, 148, 211, 5, 232, 171, 142, 220, 232, 218, 248, 160, 80, 205, 32, 156, 100, 86, 170, 16, 221, 162, 246, 210, 1, 219, 85, 37, 176, 235, 239, 171, 253, 76, 84, 144, 130, 32, 111, 247, 30, 79, 189, 244, 70, 190, 147, 189, 54, 129, 215, 15, 221, 149, 87, 141, 236, 128, 166, 197, 220, 69, 62, 99, 241, 79, 255, 132, 57, 215, 36, 175, 121, 201, 137, 62, 90, 94, 94, 197, 2, 217, 162, 132, 132, 198, 210, 62, 178, 182, 159, 121, 215, 254, 50, 110, 190, 89, 20, 82, 12, 208, 154, 167, 242, 25, 159, 12, 69, 136, 128, 247, 249, 29, 197, 95, 51, 10, 129, 114, 52, 154, 97, 87, 160, 182, 88, 225, 218, 214, 9, 22, 121, 92, 175, 93, 148, 47, 139, 17, 66, 40, 204, 56, 235, 133, 216, 69, 166, 9, 113, 92, 121, 122, 7, 250, 37, 216, 174, 253, 202, 11, 228, 245, 128, 15, 114, 83, 175, 244, 190, 60, 157, 236, 127, 55, 31, 89, 171, 223, 103, 84, 148, 141, 142, 130, 119, 85, 164, 40, 201, 46, 193, 176, 23, 80, 87, 12, 76, 26, 105, 223, 133, 108, 183, 48, 226, 206, 15, 160, 199, 141, 148, 53, 167, 139, 231, 18, 208, 82, 178, 41, 176, 176, 121, 82, 208, 195, 99, 248, 134, 149, 32, 202, 249, 227, 79, 16, 230, 238, 160, 233, 170, 110, 122, 173, 154, 212, 206, 84, 163, 69, 85, 181, 209, 107, 105, 159, 57, 1, 229, 194, 24, 241, 55, 30, 151, 6, 133, 230, 80, 118, 94, 14, 133, 199, 49, 216, 181, 118, 201, 154, 236, 47, 48, 167, 196, 120, 27, 239, 121, 54, 253, 11, 186, 69, 90, 141, 130, 120, 191, 215, 241, 208, 172, 107, 79, 236, 182, 103, 244, 6, 211, 196, 21, 128, 229, 94, 246, 143, 119, 4, 175, 71, 72, 206, 128, 97, 14, 49, 88, 54, 182, 43, 112, 177, 120, 13, 253, 178, 198, 12, 209, 86, 154, 138, 27, 181, 247, 141, 23, 3, 133, 229, 203, 171, 36, 181, 37, 136, 44, 222, 168, 140, 59, 116, 161, 184, 17, 249, 16, 104, 73, 53, 235, 77, 12, 237, 65, 137, 156, 42, 4, 205, 30, 45, 58, 220, 232, 5, 253, 3, 155, 6, 71, 166, 68, 184, 244, 143, 34, 204, 140, 67, 53, 109, 250, 22, 210, 154, 147, 71, 214, 6, 52, 91, 35, 212, 191, 31, 110, 57, 135, 4, 150, 80, 212, 186, 251, 132, 63, 58, 190, 230, 8, 255, 18, 18, 45, 153, 135, 96, 66, 61, 14, 251, 77, 110, 165, 25, 89, 96, 162, 113, 190, 169, 253, 173, 136, 130, 223, 28, 47, 227, 154, 227, 228, 158, 229, 37, 25, 19, 145, 147, 93, 246, 98, 210, 137, 215, 90, 31, 142, 94, 182, 207, 53, 186, 48, 178, 223, 214, 41, 60, 157, 109, 105, 214, 76, 9, 234, 73, 21, 52, 140, 136, 162, 196, 158, 201, 101, 145, 117, 65, 57, 4, 131, 62, 15, 243, 100, 26, 77, 187, 72, 132, 209, 134, 68, 9, 182, 235, 74, 229, 74, 227, 154, 185, 112, 186, 140, 232, 185, 125, 46, 239, 229, 197, 193, 49, 79, 61, 195, 55, 60, 5, 41, 10, 221, 21, 203, 119, 34, 99, 2, 8, 149, 19, 211, 209, 147, 25, 17, 20, 58, 167, 142, 147, 123, 224, 180, 96, 123, 226, 223, 162, 3, 26, 71, 114, 241, 138, 41, 144, 14, 94, 40, 65, 34, 89, 66, 67, 28, 160, 156, 47, 180, 10, 7, 129, 159, 45, 252, 155, 86, 74, 101, 147, 166, 61, 48, 182, 51, 65, 193, 190, 77, 104, 227, 14, 234, 20, 175, 1, 236, 17, 238, 64, 34, 230, 89, 55, 161, 193, 168, 244, 201, 31, 237, 98, 128, 160, 226, 21, 152, 189, 30, 192, 48, 212, 63, 155, 53, 229, 248, 25, 88, 155, 116, 206, 168, 242, 43, 5, 70, 178, 229, 82, 44, 205, 229, 36, 76, 10, 67, 88, 205, 34, 99, 154, 151, 17, 155, 223, 65, 15, 60, 243, 25, 69, 65, 166, 91, 127, 204, 219, 242, 144, 254, 172, 187, 109, 126, 84, 198, 157, 15, 95, 251, 75, 133, 175, 239, 145, 144, 85, 23, 71, 15, 8, 231, 159, 43, 111, 199, 201, 72, 223, 36, 198, 73, 2, 9, 217, 60, 120, 218, 106, 211, 99, 183, 41, 236, 225, 115, 176, 180, 153, 105, 153, 117, 229, 184, 3, 176, 66, 48, 130, 240, 186, 161, 11, 38, 45, 218, 95, 66, 6, 9, 15, 157, 73, 122, 84, 195, 62, 46, 206, 164, 191, 101, 102, 250, 150, 34, 108, 105, 116, 31, 222, 191, 158, 45, 174, 69, 224, 114, 163, 113, 51, 203, 36, 99, 219, 24, 81, 125, 174, 169, 115, 231, 163, 55, 195, 161, 133, 255, 238, 191, 10, 35, 49, 89, 114, 141, 72, 147, 159, 119, 14, 14, 70, 58, 238, 172, 99, 105, 103, 134, 146, 76, 87, 163, 38, 0, 184, 113, 239, 21, 87, 116, 106, 147, 83, 45, 47, 25, 114, 50, 187, 153, 167, 92, 217, 173, 14, 233, 213, 202, 62, 201, 153, 39, 31, 103, 163, 189, 199, 148, 52, 31, 179, 37, 21, 91, 15, 161, 25, 200, 184, 176, 33, 116, 34, 110, 152, 118, 173, 233, 237, 122, 17, 77, 158, 23, 121, 235, 234, 111, 36, 246, 15, 216, 216, 51, 145, 35, 114, 226, 40, 147, 147, 30, 141, 231, 111, 14, 194, 17, 201, 57, 159, 121, 219, 202, 67, 176, 238, 94, 88, 66, 150, 214, 185, 24, 246, 69, 190, 213, 12, 195, 212, 193, 210, 251, 3, 1, 108, 253, 92, 200, 80, 251, 12, 115, 194, 253, 4, 182, 170, 174, 92, 95, 45, 192, 255, 49, 193, 110, 203, 175, 228, 12, 193, 123, 180, 204, 11, 179, 123, 7, 253, 209, 154, 23, 252, 39, 73, 203, 184, 227, 94, 37, 189, 27, 7, 2, 206, 72, 4, 95, 66, 73, 77, 20, 171, 2, 36, 182, 76, 159, 46, 9, 87, 172, 20, 152, 253, 160, 234, 10, 72, 131, 49, 157, 6, 88, 148, 41, 215, 221, 185, 67, 92, 114, 237, 153, 152, 107, 179, 176, 220, 70, 172, 90, 144, 122, 80, 33, 178, 235, 242, 167, 244, 162, 231, 133, 129, 28, 67, 248, 93, 42, 186, 105, 7, 91, 71, 52, 166, 136, 238, 32, 16, 167, 168, 117, 53, 90, 155, 152, 30, 0, 127, 149, 42, 169, 159, 253, 199, 51, 73, 133, 238, 12, 138, 207, 72, 55, 119, 230, 235, 226, 138, 29, 143, 157, 28, 1, 59, 77, 229, 175, 85, 69, 196, 68, 116, 200, 97, 222, 170, 83, 125, 177, 94, 237, 100, 212, 1, 94, 17, 154, 81, 176, 217, 4, 162, 170, 253, 9, 118, 234, 81, 98, 52, 117, 128, 185, 248, 196, 154, 232, 140, 203, 140, 70, 103, 23, 216, 28, 99, 14, 12, 115, 148, 102, 197, 26, 229, 255, 89, 194, 162, 135, 177, 16, 154, 238, 109, 243, 239, 77, 38, 150, 132, 162, 245, 33, 79, 157, 126, 238, 203, 182, 127, 162, 151, 178, 33, 71, 130, 229, 185, 45, 219, 16, 206, 206, 149, 67, 172, 141, 188, 206, 236, 183, 207, 121, 38, 243, 59, 27, 210, 176, 46, 73, 58, 235, 35, 189, 239, 93, 235, 47, 122, 195, 105, 107, 238, 165, 111, 1, 73, 233, 167, 205, 100, 3, 95, 94, 145, 221, 106, 147, 46, 36, 61, 51, 70, 196, 53, 214, 110, 53, 28, 114, 148, 10, 225, 252, 194, 144, 128, 140, 58, 0, 55, 187, 89, 88, 186, 48, 47, 98, 10, 175, 15, 42, 252, 81, 123, 130, 162, 81, 140, 49, 49, 99, 15, 206, 231, 236, 116, 42, 226, 55, 46, 255, 96, 74, 124, 70, 241, 143, 76, 239, 87, 33, 219, 106, 128, 67, 37, 203, 196, 159, 147, 120, 42, 144, 105, 180, 120, 38, 175, 22, 3, 186, 49, 81, 131, 34, 221, 220, 91, 196, 3, 69, 202, 9, 80, 93, 226, 100, 12, 234, 53, 33, 27, 151, 133, 236, 247, 73, 113, 169, 74, 61, 39, 121, 181, 29, 91, 2, 248, 200, 121, 244, 153, 81, 78, 38, 185, 70, 230, 138, 136, 217, 148, 154, 163, 128, 156, 219, 202, 212, 52, 73, 232, 60, 182, 99, 136, 64, 15, 195, 88, 148, 139, 179, 78, 190, 13, 120, 214, 194, 167, 231, 185, 179, 62, 89, 225, 224, 216, 254, 199, 90, 61, 12, 183, 164, 128, 190, 14, 237, 220, 53, 212, 227, 41, 139, 235, 34, 221, 191, 77, 61, 235, 125, 220, 27, 49, 42, 17, 38, 115, 38, 24, 48, 162, 46, 231, 75, 162, 38, 182, 89, 101, 35, 106, 193, 85, 97, 224, 79, 141, 241, 229, 227, 162, 191, 212, 130, 220, 121, 94, 28, 52, 147, 96, 158, 21, 187, 229, 196, 227, 212, 194, 189, 171, 240, 153, 232, 121, 243, 22, 129, 243, 232, 162, 165, 232, 209, 132, 135, 72, 98, 207, 195, 229, 29, 228, 112, 196, 85, 117, 40, 166, 223, 29, 153, 243, 16, 17, 222, 154, 86, 9, 161, 184, 242, 202, 123, 47, 47, 190, 33, 164, 239, 84, 194, 148, 4, 62, 171, 12, 123, 221, 28, 91, 24, 116, 243, 207, 87, 136, 228, 104, 218, 238, 225, 33, 150, 123, 194, 12, 198, 120, 67, 167, 243, 228, 31, 46, 157, 193, 190, 31, 34, 21, 190, 0, 16, 252, 9, 253, 144, 213, 14, 64, 99, 210, 151, 238, 211, 9, 157, 177, 111, 2, 67, 2, 136, 37, 12, 91, 147, 134, 45, 193, 50, 155, 97, 153, 107, 71, 121, 68, 139, 34, 171, 241, 49, 3, 232, 17, 118, 181, 142, 248, 57, 75, 90, 129, 153, 124, 206, 38, 108, 203, 95, 24, 100, 13, 29, 8, 14, 221, 197, 183, 82, 214, 125, 145, 229, 226, 200, 144, 127, 218, 225, 249, 177, 144, 248, 102, 114, 119, 25, 22, 189, 128, 29, 226, 172, 192, 244, 110, 125, 114, 200, 152, 42, 76, 88, 36, 226, 62, 141, 168, 140, 152, 77, 181, 200, 13, 190, 142, 73, 205, 166, 231, 153, 23, 37, 210, 237, 197, 125, 187, 21, 103, 218, 190, 16, 6, 122, 20, 128, 186, 12, 244, 66, 79, 187, 8, 246, 101, 106, 224, 150, 178, 201, 218, 226, 8, 55, 69, 28, 238, 119, 156, 23, 26, 169, 142, 70, 246, 194, 46, 213, 167, 252, 252, 188, 13, 113, 146, 210, 149, 69, 19, 147, 90, 240, 183, 32, 169, 244, 254, 114, 69, 83, 103, 24, 239, 52, 162, 173, 121, 108, 242, 135, 108, 67, 139, 4, 109, 60, 184, 69, 181, 42, 13, 159, 106, 170, 246, 34, 161, 235, 160, 67, 198, 17, 87, 214, 81, 94, 205, 50, 46, 37, 199, 146, 24, 162, 118, 23, 117, 28, 250, 56, 230, 109, 114, 41, 229, 89, 188, 21, 209, 16, 155, 211, 189, 189, 69, 65, 232, 233, 192, 169, 124, 225, 174, 102, 38, 56, 166, 56, 164, 242, 10, 87, 92, 50, 10, 196, 59, 204, 40, 182, 30, 10, 137, 32, 238, 35, 233, 164, 215, 91, 216, 62, 201, 143, 174, 135, 160, 162, 126, 252, 130, 159, 23, 220, 75, 197, 46, 28, 210, 3, 245, 152, 217, 167, 73, 215, 232, 244, 106, 122, 122, 246, 171, 76, 100, 53, 173, 32, 16, 248, 94, 64, 13, 109, 52, 123, 147, 106, 181, 80, 126, 166, 89, 243, 32, 50, 244, 123, 9, 132, 173, 246, 31, 0, 174, 44, 85, 233, 74, 214, 221, 129, 48, 75, 174, 56, 85, 249, 20, 79, 209, 249, 139, 36, 81, 16, 139, 82, 28, 24, 187, 22, 196, 115, 252, 90, 112, 237, 101, 251, 7, 42, 60, 253, 213, 92, 222, 85, 73, 51, 211, 237, 121, 17, 161, 203, 125, 108, 90, 76, 222, 37, 41, 206, 73, 167, 204, 32, 97, 87, 91, 14, 98, 126, 205, 40, 131, 0, 2, 38, 63, 68, 60, 131, 91, 38, 198, 177, 222, 188, 89, 23, 23, 169, 247, 230, 8, 97, 230, 58, 151, 238, 112, 23, 241, 169, 204, 125, 172, 106, 239, 137, 15, 169, 33, 121, 19, 29, 71, 245, 213, 177, 207, 14, 250, 140, 15, 112, 24, 25, 227, 8, 151, 86, 52, 71, 131, 44, 25, 112, 182, 193, 126, 178, 37, 183, 108, 80, 252, 195, 166, 230, 135, 48, 53, 215, 243, 105, 157, 133, 179, 253, 230, 243, 245, 252, 145, 152, 140, 205, 180, 146, 231, 138, 181, 48, 78, 204, 117, 152, 172, 77, 145, 216, 66, 200, 44, 170, 96, 149, 117, 154, 66, 179, 193, 230, 49, 133, 225, 163, 75, 36, 70, 62, 115, 75, 71, 15, 214, 245, 21, 38, 27, 99, 21, 162, 237, 6, 201, 219, 110, 172, 45, 141, 216, 76, 51, 9, 138, 110, 222, 80, 91, 101, 120, 64, 224, 1, 190, 143, 188, 149, 130, 30, 151, 38, 5, 43, 134, 217, 171, 156, 69, 156, 115, 216, 97, 111, 2, 118, 173, 165, 235, 93, 20, 187, 56, 156, 87, 244, 252, 241, 91, 75, 151, 124, 41, 189, 93, 39, 188, 3, 153, 173, 184, 204, 77, 78, 130, 74, 42, 45, 235, 191, 118, 86, 205, 55, 57, 205, 144, 165, 151, 114, 219, 153, 85, 183, 153, 61, 141, 152, 100, 197, 227, 209, 198, 130, 197, 31, 47, 118, 92, 103, 104, 197, 24, 209, 54, 70, 157, 69, 146, 224, 237, 115, 244, 13, 87, 228, 212, 192, 81, 191, 145, 139, 62, 191, 115, 197, 101, 193, 243, 180, 188, 197, 44, 45, 43, 16, 125, 21, 165, 129, 30, 210, 104, 215, 53, 212, 186, 156, 45, 233, 145, 29, 144, 149, 26, 39, 126, 87, 123, 124, 82, 118, 140, 117, 150, 142, 244, 162, 145, 240, 57, 168, 27, 159, 158, 30, 118, 205, 199, 130, 18, 203, 14, 186, 32, 90, 212, 52, 67, 225, 58, 206, 230, 107, 249, 142, 64, 99, 5, 208, 215, 218, 179, 85, 134, 206, 251, 177, 61, 222, 42, 227, 97, 209, 242, 169, 175, 138, 39, 46, 56, 188, 107, 154, 148, 187, 214, 172, 74, 83, 30, 100, 253, 239, 244, 39, 9, 82, 164, 82, 34, 56, 232, 78, 191, 152, 235, 114, 155, 70, 54, 241, 206, 117, 192, 202, 158, 21, 242, 39, 101, 245, 6, 93, 96, 74, 75, 232, 23, 234, 250, 131, 110, 167, 68, 251, 141, 191, 221, 19, 10, 228, 96, 70, 31, 61, 154, 102, 209, 229, 247, 49, 93, 56, 197, 69, 210, 251, 240, 245, 9, 180, 63, 121, 147, 248, 97, 118, 91, 51, 195, 244, 47, 246, 48, 206, 10, 110, 9, 195, 211, 219, 204, 81, 182, 58, 184, 230, 48, 247, 170, 169, 162, 15, 162, 201, 227, 5, 253, 248, 7, 181, 201, 1, 30, 126, 40, 77, 86, 222, 109, 208, 122, 208, 223, 27, 232, 92, 182, 87, 121, 184, 21, 70, 135, 108, 10, 154, 128, 162, 117, 160, 165, 71, 152, 155, 126, 244, 53, 168, 53, 21, 105, 90, 170, 248, 233, 31, 143, 166, 250, 24, 152, 16, 137, 184, 253, 95, 163, 131, 151, 146, 41, 65, 205, 90, 152, 244, 254, 200, 77, 81, 4, 6, 11, 232, 57, 29, 114, 246, 114, 29, 206, 26, 4, 31, 136, 35, 121, 118, 131, 169, 189, 64, 118, 50, 212, 111, 163, 152, 1, 186, 255, 233, 126, 172, 27, 12, 253, 255, 247, 14, 183, 39, 80, 148, 31, 114, 103, 107, 251, 249, 184, 27, 90, 129, 214, 166, 84, 109, 62, 160, 130, 99, 194, 194, 169, 199, 34, 64, 25, 86, 219, 10, 77, 48, 125, 137, 68, 220, 234, 26, 152, 177, 191, 247, 128, 143, 146, 246, 126, 87, 71, 35, 11, 10, 41, 210, 204, 51, 205, 90, 84, 229, 183, 73, 245, 205, 212, 229, 180, 3, 209, 247, 163, 171, 241, 118, 143, 90, 89, 217, 167, 115, 25, 47, 235, 15, 131, 169, 69, 247, 153, 128, 138, 79, 148, 192, 36, 93, 241, 55, 227, 23, 22, 26, 53, 49, 204, 255, 205, 24, 105, 121, 101, 78, 69, 191, 116, 196, 185, 52, 5, 184, 75, 162, 240, 198, 20, 238, 207, 251, 94, 41, 101, 224, 103, 50, 22, 184, 25, 164, 188, 159, 156, 111, 62, 148, 67, 167, 72, 189, 105, 51, 63, 218, 246, 194, 217, 81, 202, 100, 171, 4, 137, 209, 166, 185, 117, 189, 171, 128, 68, 106, 229, 241, 252, 68, 5, 218, 30, 113, 174, 181, 175, 233, 59, 33, 38, 178, 78, 177, 200, 211, 186, 119, 217, 217, 243, 201, 187, 80, 229, 163, 138, 128, 247, 169, 156, 254, 137, 154, 243, 92, 214, 223, 125, 160, 203, 45, 119, 0, 80, 75, 182, 17, 248, 141, 180, 242, 71, 74, 88, 170, 41, 99, 205, 114, 156, 253, 83, 233, 174, 25, 4, 189, 151, 31, 130, 214, 103, 45, 0, 54, 148, 55, 63, 195, 137, 31, 231, 136, 52, 83, 62, 25, 229, 191, 39, 167, 165, 140, 13, 32, 99, 82, 216, 249, 45, 100, 214, 124, 153, 138, 140, 113, 50, 47, 30, 86, 82, 250, 216, 201, 192, 148, 179, 42, 231, 230, 147, 151, 50, 221, 27, 242, 126, 211, 74, 163, 229, 64, 158, 161, 34, 118, 98, 138, 94, 66, 101, 147, 35, 78, 148, 156, 177, 213, 126, 141, 174, 223, 162, 250, 82, 124, 20, 41, 168, 229, 135, 214, 89, 205, 112, 155, 210, 87, 74, 85, 198, 182, 246, 142, 244, 102, 104, 117, 27, 5, 114, 238, 149, 147, 69, 111, 185, 117, 45, 151, 229, 236, 174, 138, 104, 175, 78, 181, 40, 49, 28, 23, 121, 144, 47, 58, 142, 214, 192, 20, 25, 205, 60, 202, 126, 106, 135, 249, 54, 209, 126, 60, 160, 107, 15, 154, 216, 27, 74, 181, 59, 255, 171, 6, 174, 2, 233, 153, 181, 195, 83, 236, 90, 59, 40, 142, 32, 11, 239, 243, 36, 89, 85, 217, 233, 145, 10, 180, 137, 8, 69, 238, 55, 117, 142, 82, 34, 72, 197, 226, 117, 101, 171, 224, 4, 223, 216, 137, 52, 196, 112, 128, 169, 136, 26, 99, 174, 245, 31, 190, 82, 172, 128, 220, 29, 32, 183, 21, 189, 10, 188, 55, 247, 219, 130, 21, 174, 236, 124, 50, 198, 156, 255, 21, 253, 224, 52, 220, 231, 116, 248, 172, 231, 183, 112, 13, 86, 42, 88, 111, 95, 46, 252, 54, 149, 93, 34, 130, 218, 171, 15, 146, 52, 94, 186, 252, 193, 99, 40, 91, 56, 131, 144, 142, 220, 106, 207, 113, 98, 218, 222, 58, 5, 108, 213, 244, 35, 159, 55, 136, 245, 182, 95, 221, 94, 9, 184, 228, 77, 252, 192, 31, 71, 248, 54, 154, 224, 142, 156, 232, 155, 14, 48, 133, 13, 60, 61, 95, 130, 67, 116, 191, 31, 83, 184, 91, 126, 97, 61, 219, 193, 84, 8, 68, 81, 78, 100, 89, 147, 110, 200, 83, 92, 64, 101, 59, 230, 240, 203, 73, 254, 147, 62, 158, 17, 72, 183, 239, 166, 186, 6, 117, 143, 188, 241, 139, 220, 46, 18, 20, 157, 111, 73, 130, 90, 35, 117, 18, 207, 61, 180, 196, 126, 30, 143, 16, 39, 65, 69, 46, 84, 31, 122, 87, 58, 21, 202, 113, 165, 38, 79, 77, 162, 170, 160, 130, 14, 153, 187, 152, 134, 181, 195, 31, 49, 2, 113, 55, 206, 12, 200, 87, 101, 104, 56, 127, 144, 223, 16, 128, 47, 162, 78, 14, 233, 180, 155, 236, 69, 218, 180, 173, 198, 96, 185, 209, 239, 136, 248, 253, 24, 69, 76, 78, 42, 243, 38, 43, 10, 98, 231, 202, 137, 84, 66, 104, 243, 209, 253, 51, 218, 167, 13, 98, 127, 55, 37, 70, 125, 220, 234, 161, 113, 4, 156, 58, 184, 56, 164, 245, 154, 208, 181, 195, 146, 213, 188, 86, 222, 61, 238, 150, 75, 209, 18, 201, 102, 1, 127, 59, 240, 96, 209, 119, 30, 208, 87, 200, 63, 1, 234, 155, 99, 98, 140, 27, 94, 255, 150, 251, 151, 112, 126, 35, 112, 73, 203, 200, 221, 170, 115, 219, 250, 18, 28, 212, 214, 162, 183, 52, 232, 20, 21, 41, 16, 47, 110, 86, 194, 138, 146, 132, 241, 16, 224, 167, 3, 78, 139, 147, 235, 61, 107, 195, 146, 57, 33, 35, 118, 69, 145, 88, 21, 52, 144, 210, 164, 151, 189, 33, 146, 174, 46, 101, 35, 6, 65, 17, 248, 142, 26, 203, 222, 34, 63, 227, 51, 167, 44, 95, 247, 4, 198, 238, 39, 217, 164, 18, 26, 37, 193, 196, 151, 242, 150, 109, 27, 18, 68, 57, 68, 134, 242, 131, 249, 241, 213, 146, 69, 185, 212, 253, 219, 117, 90, 152, 133, 95, 95, 19, 232, 127, 229, 66, 197, 32, 78, 81, 145, 56, 81, 191, 81, 202, 195, 130, 164, 170, 121, 35, 52, 56, 102, 132, 113, 18, 111, 8, 23, 92, 7, 26, 80, 240, 92, 106, 100, 253, 180, 233, 166, 81, 156, 97, 240, 173, 20, 178, 90, 198, 120, 186, 110, 159, 23, 132, 11, 31, 33, 242, 247, 131, 228, 165, 102, 37, 12, 123, 138, 198, 20, 137, 41, 216, 181, 138, 112, 218, 198, 195, 150, 102, 178, 177, 57, 191, 119, 135, 250, 178, 145, 132, 130, 36, 108, 223, 37, 206, 60, 16, 222, 113, 254, 90, 219, 53, 174, 25, 245, 31, 6, 24, 99, 204, 5, 66, 126, 18, 118, 247, 23, 83, 117, 232, 113, 169, 24, 240, 113, 34, 222, 118, 205, 255, 113, 213, 169, 23, 240, 241, 27, 222, 200, 102, 12, 231, 54, 10, 125, 179, 244, 22, 106, 189, 54, 205, 114, 113, 142, 93, 121, 102, 10, 78, 34, 173, 65, 202, 1, 125, 143, 207, 127, 70, 157, 81, 27, 213, 20, 150, 149, 133, 255, 145, 87, 221, 62, 90, 49, 171, 244, 107, 17, 124, 19, 96, 236, 253, 229, 254, 80, 147, 157, 250, 12, 165, 202, 43, 199, 95, 215, 162, 15, 21, 193, 74, 155, 239, 120, 150, 250, 126, 84, 43, 85, 182, 51, 32, 76, 244, 28, 114, 254, 252, 68, 78, 193, 186, 55, 6, 227, 185, 35, 134, 92, 225, 100, 28, 44, 204, 252, 185, 192, 9, 171, 123, 201, 185, 11, 83, 111, 165, 61, 43, 172, 165, 252, 73, 25, 19, 87, 21, 133, 227, 45, 252, 239, 177, 206, 15, 53, 243, 42, 9, 181, 91, 255, 86, 96, 32, 149, 79, 192, 109, 166, 159, 39, 118, 96, 160, 136, 219, 19, 245, 195, 60, 48, 60, 252, 129, 233, 97, 215, 112, 99, 125, 204, 21, 253, 111, 141, 84, 64, 188, 144, 4, 94, 191, 61, 74, 35, 185, 180, 214, 93, 173, 167, 214, 191, 141, 162, 65, 108, 236, 193, 72, 92, 134, 250, 233, 7, 81, 248, 171, 78, 96, 183, 249, 104, 26, 244, 37, 208, 26, 75, 191, 9, 208, 241, 246, 232, 80, 105, 157, 56, 227, 63, 251, 137, 222, 23, 14, 205, 242, 192, 80, 14, 234, 120, 201, 45, 252, 245, 144, 163, 128, 91, 40, 49, 53, 82, 114, 192, 89, 184, 25, 108, 182, 85, 138, 122, 86, 79, 172, 165, 32, 164, 38, 0, 114, 189, 164, 89, 37, 10, 209, 16, 160, 90, 81, 106, 43, 203, 218, 128, 143, 88, 14, 240, 118, 156, 24, 209, 102, 24, 213, 64, 185, 123, 100, 150, 20, 68, 2, 164, 198, 74, 142, 160, 201, 16, 160, 26, 251, 54, 61, 42, 61, 239, 77, 143, 193, 98, 226, 251, 12, 212, 142, 252, 179, 19, 128, 195, 71, 100, 11, 198, 33, 161, 204, 61, 90, 182, 39, 68, 184, 37, 42, 152, 252, 99, 94, 10, 230, 100, 68, 173, 12, 157, 82, 0, 151, 27, 201, 15, 154, 114, 245, 90, 243, 239, 111, 147, 20, 181, 189, 139, 172, 74, 221, 231, 143, 178, 174, 92, 142, 196, 86, 33, 68, 161, 46, 52, 125, 41, 192, 156, 151, 222, 211, 32, 203, 81, 53, 150, 48, 83, 8, 104, 176, 40, 59, 153, 65, 250, 112, 12, 136, 106, 64, 216, 52, 133, 143, 169, 196, 61, 57, 230, 96, 210, 234, 24, 201, 151, 232, 152, 35, 65, 176, 177, 62, 232, 198, 32, 71, 222, 231, 159, 232, 45, 149, 87, 27, 105, 78, 114, 143, 197, 204, 75, 38, 225, 106, 193, 73, 144, 174, 59, 181, 74, 130, 130, 210, 79, 167, 66, 40, 81, 191, 89, 108, 166, 112, 126, 115, 130, 144, 186, 76, 34, 179, 80, 35, 61, 37, 212, 25, 23, 242, 115, 253, 17, 226, 237, 7, 95, 223, 90, 186, 211, 148, 136, 83, 224, 177, 236, 220, 4, 182, 178, 148, 204, 92, 197, 190, 91, 100, 10, 161, 208, 71, 76, 142, 52, 61, 202, 131, 194, 46, 57, 48, 107, 220, 55, 138, 100, 73, 251, 229, 101, 218, 231, 5, 8, 35, 108, 168, 157, 126, 150, 46, 49, 129, 247, 210, 78, 67, 112, 66, 91, 26, 237, 141, 3, 146, 230, 59, 211, 103, 110, 111, 27, 18, 221, 209, 71, 74, 35, 51, 44, 47, 41, 35, 238, 8, 237, 13, 119, 178, 79, 153, 111, 18, 251, 118, 156, 127, 101, 0, 41, 223, 32, 184, 77, 185, 182, 215, 16, 147, 120, 218, 186, 1, 23, 57, 129, 216, 53, 160, 197, 134, 100, 169, 3, 89, 52, 242, 9, 158, 54, 212, 175, 59, 104, 195, 9, 156, 123, 13, 220, 121, 203, 1, 236, 225, 147, 233, 237, 58, 154, 197, 108, 100, 97, 177, 29, 177, 166, 86, 66, 170, 162, 181, 194, 237, 188, 231, 101, 154, 119, 254, 139, 243, 68, 177, 125, 141, 33, 52, 37, 27, 209, 69, 180, 118, 137, 14, 193, 143, 154, 91, 237, 165, 183, 113, 17, 194, 80, 116, 136, 2, 251, 237, 1, 190, 162, 194, 196, 83, 198, 106, 50, 75, 172, 171, 73, 64, 60, 133, 150, 176, 192, 129, 167, 152, 205, 180, 44, 53, 90, 50, 30, 9, 85, 205, 209, 10, 191, 150, 75, 214, 105, 65, 101, 108, 120, 78, 167, 37, 100, 174, 60, 75, 113, 106, 176, 211, 202, 209, 118, 202, 70, 152, 229, 195, 215, 164, 9, 198, 37, 8, 138, 249, 206, 169, 185, 156, 144, 35, 177, 171, 38, 141, 66, 47, 145, 226, 249, 31, 32, 147, 243, 192, 72, 170, 171, 43, 241, 85, 51, 186, 202, 75, 230, 72, 22, 168, 120, 179, 232, 210, 150, 94, 10, 235, 15, 17, 142, 102, 49, 138, 122, 85, 61, 133, 229, 142, 255, 198, 226, 112, 244, 208, 231, 3, 135, 137, 133, 239, 165, 41, 220, 31, 56, 109, 130, 56, 68, 71, 120, 46, 222, 83, 58, 90, 84, 92, 154, 246, 178, 177, 49, 89, 240, 204, 210, 55, 20, 127, 236, 247, 33, 250, 9, 232, 31, 107, 194, 9, 187, 40, 130, 183, 20, 219, 44, 79, 86, 96, 75, 200, 80, 191, 86, 211, 81, 244, 87, 75, 189, 52, 223, 54, 13, 74, 147, 71, 85, 192, 125, 209, 242, 203, 161, 53, 132, 226, 254, 232, 24, 149, 206, 59, 109, 48, 91, 112, 210, 95, 5, 5, 17, 154, 24, 70, 78, 194, 153, 57, 98, 89, 84, 194, 101, 218, 81, 94, 248, 45, 27, 99, 161, 231, 56, 105, 163, 132, 171, 230, 105, 91, 239, 134, 29, 17, 171, 150, 191, 90, 90, 199, 18, 213, 237, 74, 95, 94, 108, 130, 25, 81, 21, 41, 240, 209, 203, 143, 27, 82, 182, 1, 33, 40, 186, 175, 148, 215, 178, 157, 46, 22, 38, 39, 234, 165, 35, 32, 78, 187, 243, 47, 37, 103, 192, 123, 42, 246, 109, 109, 229, 49, 58, 161, 103, 106, 219, 87, 34, 138, 153, 231, 62, 214, 54, 237, 145, 0, 208, 110, 192, 196, 251, 20, 251, 11, 167, 36, 20, 187, 79, 137, 139, 54, 57, 38, 76, 118, 160, 101, 182, 24, 38, 115, 46, 52, 133, 205, 161, 188, 64, 43, 58, 44, 3, 214, 103, 131, 90, 124, 8, 105, 206, 75, 158, 178, 39, 117, 203, 3, 115, 236, 20, 123, 219, 229, 151, 155, 113, 177, 152, 183, 74, 89, 243, 167, 106, 62, 39, 166, 175, 50, 175, 68, 167, 16, 185, 30, 82, 14, 208, 218, 253, 9, 229, 181, 217, 46, 113, 129, 66, 92, 63, 32, 196, 229, 231, 174, 137, 144, 159, 41, 155, 203, 208, 127, 220, 74, 159, 101, 23, 249, 59, 159, 35, 104, 87, 224, 10, 237, 179, 3, 64, 246, 66, 129, 152, 191, 216, 5, 241, 242, 97, 14, 90, 193, 18, 65, 35, 217, 56, 125, 58, 213, 250, 186, 201, 226, 124, 146, 32, 174, 84, 134, 145, 87, 255, 77, 90, 146, 201, 232, 82, 202, 9, 18, 248, 102, 212, 89, 163, 236, 173, 134, 151, 151, 188, 59, 208, 234, 10, 223, 69, 192, 86, 35, 159, 235, 30, 29, 38, 87, 114, 136, 138, 78, 151, 117, 246, 90, 151, 120, 112, 211, 44, 23, 9, 199, 89, 127, 189, 174, 36, 48, 173, 133, 248, 111, 192, 73, 210, 75, 231, 49, 250, 245, 133, 51, 145, 26, 114, 175, 152, 20, 137, 40, 140, 164, 71, 185, 15, 126, 148, 241, 72, 155, 186, 70, 2, 73, 85, 133, 5, 29, 151, 79, 183, 75, 148, 240, 171, 168, 130, 190, 6, 171, 164, 243, 106, 248, 159, 34, 41, 200, 14, 43, 175, 5, 50, 186, 193, 135, 113, 149, 187, 45, 91, 13, 36, 248, 9, 146, 132, 220, 101, 40, 103, 21, 23, 49, 2, 94, 123, 216, 92, 28, 35, 21, 100, 117, 42, 138, 113, 122, 214, 139, 35, 216, 122, 214, 173, 155, 167, 231, 189, 199, 249, 58, 188, 244, 251, 235, 30, 97, 30, 67, 56, 55, 166, 167, 170, 41, 146, 163, 154, 143, 81, 66, 134, 147, 17, 230, 47, 97, 116, 236, 252, 202, 196, 106, 115, 27, 201, 237, 183, 144, 181, 134, 124, 222, 119, 7, 80, 28, 115, 114, 227, 170, 249, 229, 255, 112, 174, 212, 83, 231, 127, 175, 167, 55, 190, 80, 159, 193, 86, 147, 121, 60, 219, 119, 114, 63, 85, 170, 145, 12, 86, 45, 69, 164, 74, 135, 177, 168, 118, 73, 191, 92, 89, 65, 192, 218, 232, 255, 150, 150, 17, 110, 191, 195, 127, 190, 254, 15, 239, 253, 125, 45, 117, 194, 143, 167, 102, 162, 49, 213, 110, 244, 254, 26, 34, 199, 185, 53, 105, 234, 110, 96, 190, 60, 163, 94, 247, 118, 166, 110, 226, 62, 246, 227, 85, 157, 250, 249, 215, 233, 132, 167, 138, 29, 123, 247, 193, 164, 203, 254, 152, 52, 173, 163, 78, 223, 182, 138, 26, 11, 45, 6, 37, 71, 139, 32, 37, 105, 211, 62, 162, 222, 33, 117, 10, 193, 247, 59, 108, 222, 132, 90, 100, 165, 221, 192, 4, 53, 220, 170, 129, 12, 46, 128, 32, 10, 116, 15, 95, 22, 44, 84, 24, 177, 50, 150, 80, 190, 116, 179, 149, 187, 92, 251, 48, 209, 222, 246, 87, 78, 139, 62, 168, 188, 235, 204, 252, 59, 19, 105, 225, 167, 206, 88, 237, 213, 168, 94, 92, 171, 43, 88, 2, 203, 118, 17, 109, 55, 72, 3, 110, 96, 85, 87, 63, 230, 249, 203, 149, 43, 101, 82, 180, 145, 73, 129, 214, 133, 169, 39, 56, 148, 68, 201, 205, 187, 35, 94, 245, 167, 215, 92, 204, 99, 136, 142, 137, 85, 72, 18, 54, 154, 202, 104, 75, 34, 137, 151, 56, 183, 228, 35, 101, 69, 45, 72, 75, 185, 11, 225, 0, 47, 84, 64, 149, 108, 54, 85, 0, 35, 54, 119, 3, 232, 167, 186, 242, 86, 217, 239, 153, 67, 141, 134, 42, 140, 101, 173, 87, 205, 228, 236, 226, 173, 140, 71, 241, 236, 177, 106, 80, 8, 73, 139, 70, 205, 194, 154, 126, 188, 27, 138, 218, 25, 231, 58, 120, 85, 225, 11, 162, 229, 222, 96, 37, 54, 96, 157, 233, 98, 222, 170, 194, 11, 105, 247, 21, 143, 142, 106, 170, 29, 139, 250, 243, 145, 43, 39, 148, 142, 203, 161, 236, 38, 52, 27, 18, 9, 243, 151, 215, 169, 88, 101, 237, 242, 48, 125, 64, 83, 182, 47, 41, 188, 11, 82, 52, 60, 26, 140, 38, 242, 99, 70, 62, 251, 134, 115, 63, 110, 27, 23, 17, 248, 35, 172, 131, 151, 55, 249, 165, 173, 160, 164, 229, 183, 117, 114, 140, 250, 159, 231, 176, 38, 109, 219, 60, 237, 67, 55, 195, 42, 69, 69, 94, 128, 216, 46, 18, 144, 246, 148, 186, 190, 106, 216, 93, 84, 69, 157, 112, 45, 61, 127, 230, 204, 119, 45, 138, 159, 238, 169, 137, 157, 0, 11, 91, 116, 180, 178, 56, 221, 7, 16, 89, 70, 225, 198, 247, 139, 123, 39, 0, 159, 69, 94, 60, 221, 164, 27, 80, 246, 71, 134, 136, 168, 146, 55, 97, 64, 177, 26, 82, 30, 147, 186, 212, 136, 238, 220, 114, 188, 61, 200, 66, 202, 163, 108, 0, 67, 30, 112, 129, 230, 142, 156, 158, 86, 174, 38, 183, 196, 246, 164, 182, 145, 225, 131, 26, 174, 182, 205, 152, 66, 87, 145, 15, 22, 56, 226, 192, 75, 97, 89, 63, 19, 69, 236, 97, 66, 91, 66, 248, 231, 106, 91, 193, 77, 35, 214, 129, 149, 59, 134, 201, 235, 203, 86, 247, 156, 160, 5, 2, 128, 62, 38, 118, 66, 93, 218, 159, 33, 129, 212, 59, 105, 226, 51, 221, 196, 44, 223, 200, 32, 76, 3, 69, 19, 206, 57, 77, 86, 198, 142, 240, 176, 154, 32, 84, 190, 39, 234, 94, 141, 75, 21, 31, 173, 29, 144, 40, 37, 144, 73, 215, 35, 26, 163, 245, 201, 156, 176, 56, 91, 133, 155, 176, 119, 56, 112, 221, 174, 234, 173, 238, 188, 72, 39, 60, 161, 52, 7, 29, 147, 228, 158, 100, 64, 171, 167, 177, 66, 28, 161, 168, 177, 91, 230, 181, 236, 28, 207, 234, 237, 50, 212, 48, 180, 162, 97, 133, 20, 63, 194, 17, 251, 23, 248, 109, 159, 38, 98, 14, 53, 165, 136, 131, 222, 162, 48, 58, 34, 229, 233, 20, 101, 53, 226, 181, 97, 23, 48, 21, 63, 143, 120, 249, 93, 145, 141, 73, 143, 185, 74, 46, 133, 168, 214, 207, 47, 234, 26, 249, 27, 78, 24, 254, 176, 143, 150, 85, 165, 17, 76, 81, 173, 253, 191, 77, 65, 158, 250, 98, 221, 254, 42, 195, 61, 166, 29, 242, 93, 181, 216, 28, 91, 255, 114, 35, 63, 216, 242, 34, 87, 68, 64, 179, 68, 30, 6, 233, 209, 73, 231, 12, 131, 251, 104, 221, 39, 0, 63, 71, 253, 255, 170, 30, 192, 157, 217, 23, 25, 137, 214, 220, 238, 218, 42, 151, 13, 67, 45, 40, 220, 64, 199, 251, 137, 137, 7, 23, 122, 177, 171, 147, 28, 6, 209, 209, 209, 209, 27, 211, 57, 55, 10, 225, 114, 255, 73, 99, 167, 225, 139, 237, 229, 15, 66, 131, 228, 173, 59, 146, 176, 33, 218, 207, 24, 193, 205, 168, 61, 15, 146, 193, 101, 196, 253, 207, 150, 216, 232, 85, 17, 240, 153, 198, 103, 255, 166, 95, 135, 116, 34, 29, 226, 54, 204, 172, 55, 108, 37, 36, 187, 230, 51, 254, 58, 247, 4, 245, 42, 107, 23, 253, 183, 149, 21, 53, 225, 72, 213, 133, 172, 57, 156, 148, 226, 123, 157, 165, 216, 91, 46, 166, 178, 11, 254, 136, 166, 10, 24, 118, 130, 162, 199, 94, 168, 26, 206, 50, 41, 89, 205, 206, 108, 15, 67, 199, 94, 27, 226, 119, 48, 53, 206, 165, 231, 187, 188, 116, 222, 111, 177, 44, 80, 143, 225, 128, 246, 185, 41, 39, 79, 66, 198, 34, 253, 251, 18, 76, 157, 135, 250, 193, 186, 92, 109, 90, 78, 45, 60, 115, 111, 254, 64, 168, 200, 227, 166, 222, 34, 177, 247, 71, 186, 170, 100, 237, 184, 55, 90, 46, 248, 94, 115, 154, 67, 255, 240, 245, 73, 251, 77, 221, 240, 81, 134, 118, 81, 176, 152, 119, 46, 132, 234, 70, 18, 207, 14, 103, 192, 12, 138, 110, 129, 255, 129, 141, 235, 78, 67, 73, 118, 128, 174, 215, 3, 163, 255, 172, 236, 102, 253, 160, 168, 171, 174, 71, 164, 178, 115, 114, 148, 243, 243, 63, 206, 93, 211, 73, 137, 170, 182, 245, 128, 180, 101, 127, 217, 195, 132, 147, 228, 101, 252, 10, 31, 240, 245, 201, 255, 31, 48, 134, 198, 149, 116, 18, 200, 119, 100, 108, 14, 21, 233, 57, 178, 24, 194, 1, 177, 198, 3, 234, 43, 95, 156, 246, 146, 102, 169, 134, 249, 81, 185, 49, 159, 138, 56, 73, 173, 2, 17, 94, 89, 40, 135, 1, 214, 32, 56, 48, 241, 160, 187, 24, 191, 228, 118, 39, 201, 88, 12, 208, 201, 128, 97, 73, 162, 225, 185, 213, 10, 151, 246, 153, 249, 164, 151, 231, 195, 11, 110, 113, 187, 79, 162, 163, 55, 33, 149, 128, 0, 226, 22, 37, 159, 93, 223, 37, 92, 72, 219, 241, 43, 70, 34, 17, 20, 12, 41, 46, 103, 227, 63, 171, 55, 228, 228, 62, 51, 78, 211, 105, 105, 246, 41, 236, 57, 120, 102, 228, 106, 229, 178, 114, 112, 52, 60, 148, 234, 80, 190, 185, 5, 207, 224, 205, 36, 224, 167, 80, 37, 218, 230, 228, 166, 202, 212, 123, 208, 157, 73, 78, 239, 84, 189, 241, 3, 217, 47, 31, 154, 196, 88, 224, 239, 248, 254, 188, 192, 133, 153, 112, 171, 9, 20, 187, 53, 184, 214, 157, 246, 237, 80, 0, 22, 181, 4, 43, 147, 145, 87, 207, 156, 109, 138, 221, 188, 28, 236, 230, 167, 52, 51, 39, 183, 40, 166, 102, 54, 193, 210, 3, 108, 245, 51, 66, 169, 107, 103, 197, 137, 129, 153, 251, 114, 9, 110, 101, 232, 93, 144, 241, 56, 57, 177, 123, 205, 48, 30, 114, 224, 103, 82, 177, 196, 26, 23, 134, 25, 149, 92, 156, 218, 155, 105, 149, 132, 245, 14, 244, 43, 202, 114, 167, 72, 108, 221, 249, 203, 160, 136, 45, 142, 239, 97, 232, 27, 49, 232, 69, 167, 193, 34, 67, 178, 188, 4, 46, 166, 242, 101, 250, 140, 42, 84, 168, 44, 197, 251, 135, 58, 21, 99, 4, 130, 213, 252, 21, 179, 190, 21, 121, 252, 135, 60, 41, 200, 179, 74, 138, 203, 203, 241, 98, 117, 42, 173, 127, 148, 243, 165, 242, 106, 125, 181, 207, 85, 42, 232, 187, 126, 205, 156, 255, 166, 177, 117, 2, 68, 30, 169, 130, 70, 111, 56, 251, 216, 80, 126, 63, 234, 65, 99, 169, 132, 215, 19, 112, 33, 117, 99, 93, 249, 30, 170, 29, 151, 146, 119, 133, 226, 121, 61, 12, 118, 150, 99, 74, 220, 234, 106, 59, 13, 124, 35, 235, 10, 171, 239, 6, 108, 195, 75, 243, 200, 51, 15, 56, 157, 158, 192, 245, 20, 13, 145, 14, 42, 126, 208, 86, 30, 4, 135, 50, 176, 50, 73, 21, 70, 40, 101, 32, 138, 157, 152, 202, 171, 163, 97, 20, 194, 212, 66, 230, 165, 195, 243, 157, 109, 213, 223, 220, 227, 34, 236, 78, 52, 71, 217, 145, 206, 238, 158, 0, 49, 248, 135, 218, 50, 228, 45, 127, 255, 69, 229, 122, 178, 174, 127, 107, 114, 176, 14, 2, 70, 146, 198, 192, 62, 119, 200, 39, 38, 242, 29, 152, 158, 224, 81, 191, 169, 154, 93, 64, 246, 232, 99, 78, 143, 153, 83, 181, 61, 151, 131, 99, 67, 149, 170, 98, 177, 252, 127, 57, 77, 30, 177, 107, 59, 78, 207, 69, 61, 39, 198, 253, 21, 250, 184, 80, 213, 144, 197, 208, 33, 51, 79, 1, 158, 84, 132, 90, 166, 124, 71, 126, 104, 63, 215, 12, 76, 164, 230, 116, 160, 13, 66, 161, 227, 191, 204, 12, 76, 233, 20, 185, 98, 90, 25, 8, 125, 193, 16, 99, 95, 84, 9, 131, 121, 19, 248, 163, 33, 203, 216, 92, 173, 51, 128, 183, 69, 182, 71, 171, 206, 143, 72, 207, 9, 0, 139, 52, 253, 161, 23, 63, 240, 90, 120, 103, 187, 164, 202, 45, 207, 44, 120, 64, 92, 249, 198, 30, 208, 109, 19, 11, 70, 65, 135, 177, 20, 220, 82, 175, 138, 210, 65, 92, 174, 50, 54, 3, 150, 137, 37, 225, 10, 101, 80, 10, 49, 196, 126, 100, 137, 249, 76, 164, 69, 254, 73, 118, 157, 8, 73, 232, 197, 234, 41, 219, 193, 239, 35, 246, 51, 202, 172, 154, 186, 24, 169, 185, 195, 253, 36, 44, 14, 166, 8, 95, 107, 147, 235, 43, 66, 87, 57, 204, 220, 139, 36, 115, 201, 112, 26, 90, 35, 119, 16, 193, 0, 101, 109, 31, 113, 65, 106, 251, 61, 34, 92, 242, 177, 29, 247, 214, 239, 41, 70, 23, 250, 215, 165, 110, 116, 2, 50, 251, 28, 16, 159, 242, 224, 229, 179, 140, 150, 51, 106, 204, 27, 40, 245, 80, 28, 182, 107, 42, 95, 8, 166, 202, 125, 228, 203, 30, 205, 147, 250, 231, 27, 56, 10, 108, 191, 163, 203, 131, 39, 68, 118, 216, 3, 104, 86, 74, 153, 138, 68, 128, 92, 225, 15, 160, 101, 28, 51, 209, 147, 100, 169, 214, 42, 120, 185, 89, 197, 177, 177, 106, 180, 217, 71, 136, 106, 216, 168, 152, 62, 123, 226, 139, 208, 143, 83, 152, 14, 150, 10, 11, 136, 241, 49, 213, 180, 248, 103, 109, 76, 246, 174, 81, 233, 18, 57], + [122, 191, 80, 239, 118, 189, 252, 88, 192, 221, 81, 230, 99, 2, 183, 4, 186, 148, 2, 77, 243, 238, 82, 175, 83, 182, 108, 224, 25, 69, 75, 157, 65, 143, 109, 197, 193, 169, 177, 209, 247, 0, 155, 141, 21, 208, 21, 156, 103, 30, 73, 89, 150, 24, 13, 19, 83, 76, 110, 80, 30, 8, 245, 140, 94, 52, 103, 184, 224, 93, 52, 234, 135, 203, 228, 206, 65, 168, 158, 234, 178, 9, 71, 58, 204, 100, 165, 104, 246, 86, 204, 212, 84, 244, 105, 104, 48, 41, 56, 49, 162, 224, 255, 173, 57, 67, 102, 22, 234, 213, 112, 249, 222, 169, 61, 126, 17, 254, 154, 32, 227, 121, 169, 52, 170, 163, 207, 118, 144, 34, 54, 155, 36, 64, 67, 171, 30, 202, 103, 60, 187, 68, 183, 91, 168, 42, 244, 10, 49, 114, 170, 216, 213, 158, 191, 160, 110, 14, 243, 202, 127, 166, 238, 77, 124, 42, 170, 178, 162, 160, 172, 253, 161, 70, 66, 13, 100, 97, 157, 45, 40, 217, 84, 217, 159, 11, 141, 80, 90, 0, 161, 235, 110, 168, 81, 84, 78, 173, 188, 81, 108, 80, 156, 219, 142, 74, 22, 222, 60, 139, 124, 61, 218, 140, 24, 71, 95, 142, 1, 179, 211, 247, 249, 66, 18, 138, 209, 165, 234, 162, 127, 197, 221, 36, 192, 155, 141, 202, 156, 231, 4, 72, 33, 140, 144, 40, 145, 196, 56, 16, 227, 224, 175, 226, 197, 127, 211, 87, 123, 9, 6, 160, 151, 16, 201, 250, 47, 147, 136, 113, 116, 30, 179, 98, 84, 218, 233, 126, 176, 171, 197, 148, 240, 201, 178, 249, 222, 231, 46, 167, 160, 195, 2, 175, 29, 100, 29, 81, 34, 99, 240, 215, 85, 175, 221, 225, 229, 128, 234, 143, 222, 108, 183, 165, 71, 212, 254, 174, 3, 56, 72, 137, 141, 4, 173, 176, 219, 9, 112, 91, 184, 101, 36, 193, 225, 234, 167, 249, 220, 164, 175, 249, 101, 155, 135, 202, 153, 53, 200, 229, 213, 130, 134, 153, 68, 23, 184, 88, 71, 113, 177, 7, 120, 254, 78, 17, 231, 133, 52, 22, 198, 19, 202, 78, 248, 76, 34, 51, 66, 225, 168, 247, 208, 23, 231, 98, 91, 100, 32, 103, 160, 247, 32, 168, 10, 75, 21, 201, 202, 174, 227, 44, 149, 27, 202, 202, 200, 230, 89, 34, 50, 101, 205, 150, 154, 76, 203, 95, 238, 231, 1, 80, 67, 207, 57, 157, 148, 13, 130, 246, 156, 194, 188, 229, 35, 98, 127, 18, 154, 237, 215, 48, 59, 180, 75, 10, 138, 104, 72, 75, 77, 106, 43, 205, 23, 127, 166, 55, 133, 18, 248, 136, 152, 13, 35, 130, 107, 49, 142, 73, 18, 214, 150, 81, 142, 15, 129, 20, 141, 39, 0, 147, 3, 113, 54, 76, 186, 182, 89, 76, 158, 130, 179, 13, 137, 213, 14, 198, 48, 183, 186, 87, 5, 91, 98, 14, 83, 172, 84, 221, 155, 228, 24, 98, 0, 101, 37, 113, 190, 103, 238, 203, 51, 104, 122, 123, 96, 227, 95, 119, 96, 235, 53, 88, 62, 82, 99, 114, 38, 216, 227, 253, 251, 74, 67, 210, 16, 252, 153, 195, 21, 46, 75, 96, 213, 148, 108, 251, 173, 190, 237, 2, 142, 107, 135, 169, 42, 34, 113, 149, 101, 208, 64, 40, 154, 23, 130, 205, 87, 250, 28, 36, 16, 146, 27, 114, 202, 57, 112, 187, 139, 187, 95, 49, 140, 83, 162, 119, 189, 205, 68, 107, 114, 144, 123, 76, 208, 176, 201, 63, 15, 32, 205, 38, 206, 165, 181, 23, 243, 193, 228, 235, 167, 32, 32, 147, 86, 107, 91, 202, 240, 212, 170, 234, 235, 54, 179, 124, 229, 233, 31, 82, 109, 170, 177, 163, 141, 41, 55, 138, 173, 148, 238, 30, 200, 1, 156, 141, 236, 234, 61, 105, 53, 161, 200, 244, 225, 235, 51, 216, 63, 231, 116, 88, 25, 172, 240, 89, 182, 187, 89, 106, 251, 160, 83, 220, 36, 55, 26, 231, 167, 171, 193, 26, 113, 135, 245, 205, 31, 249, 236, 10, 96, 93, 202, 225, 30, 95, 10, 228, 255, 157, 115, 168, 248, 175, 152, 201, 44, 103, 4, 19, 115, 157, 105, 165, 121, 155, 15, 155, 249, 17, 11, 143, 221, 68, 223, 110, 129, 222, 248, 82, 14, 149, 31, 104, 38, 75, 242, 87, 15, 233, 235, 118, 173, 130, 167, 200, 158, 55, 204, 24, 90, 47, 41, 53, 138, 168, 137, 188, 185, 68, 173, 160, 93, 69, 3, 229, 49, 118, 220, 41, 53, 167, 226, 153, 101, 221, 41, 54, 51, 15, 207, 15, 62, 140, 254, 210, 45, 197, 75, 71, 210, 215, 81, 190, 226, 222, 73, 7, 170, 147, 35, 49, 104, 93, 155, 39, 189, 92, 141, 198, 80, 128, 136, 28, 209, 21, 185, 241, 134, 235, 78, 18, 51, 105, 18, 4, 82, 181, 37, 133, 233, 244, 140, 13, 124, 179, 30, 187, 84, 64, 10, 233, 126, 195, 161, 240, 92, 38, 69, 189, 5, 5, 142, 94, 226, 159, 70, 6, 172, 123, 166, 66, 116, 92, 231, 62, 107, 206, 196, 60, 64, 0, 106, 255, 99, 99, 191, 192, 248, 71, 197, 177, 14, 216, 178, 48, 170, 170, 210, 235, 4, 96, 162, 62, 92, 23, 171, 74, 93, 132, 44, 10, 61, 53, 171, 59, 200, 141, 154, 43, 145, 87, 134, 17, 46, 120, 137, 106, 6, 178, 138, 103, 248, 110, 22, 41, 140, 137, 94, 22, 13, 176, 216, 73, 182, 75, 224, 212, 38, 201, 22, 32, 44, 203, 127, 255, 179, 128, 192, 254, 240, 251, 28, 114, 28, 117, 63, 243, 91, 246, 215, 79, 192, 137, 170, 210, 35, 132, 225, 240, 35, 245, 226, 196, 98, 134, 179, 187, 236, 66, 164, 181, 69, 198, 90, 227, 192, 185, 123, 36, 206, 5, 79, 174, 108, 70, 88, 46, 19, 200, 148, 21, 252, 98, 176, 53, 33, 244, 165, 220, 46, 144, 50, 182, 250, 204, 54, 76, 246, 116, 108, 145, 162, 153, 136, 18, 34, 58, 59, 68, 62, 61, 227, 190, 97, 107, 157, 60, 39, 34, 1, 57, 253, 212, 207, 38, 14, 48, 28, 91, 135, 118, 95, 92, 231, 185, 36, 77, 41, 11, 246, 14, 142, 162, 184, 222, 163, 126, 47, 221, 53, 33, 213, 202, 248, 180, 40, 200, 85, 196, 156, 124, 182, 163, 240, 198, 224, 75, 87, 77, 230, 154, 33, 149, 91, 215, 127, 195, 77, 38, 49, 119, 14, 203, 188, 0, 223, 25, 173, 177, 163, 168, 176, 245, 42, 104, 14, 220, 117, 50, 103, 32, 15, 141, 78, 174, 51, 31, 77, 201, 122, 36, 160, 157, 238, 25, 49, 196, 96, 135, 130, 68, 252, 16, 89, 113, 200, 242, 92, 233, 158, 215, 150, 249, 26, 160, 95, 40, 155, 197, 177, 175, 136, 191, 99, 171, 35, 236, 43, 48, 230, 222, 117, 2, 220, 9, 215, 138, 16, 185, 229, 11, 151, 202, 233, 241, 100, 61, 181, 130, 250, 47, 38, 13, 28, 253, 14, 21, 84, 77, 223, 215, 199, 19, 117, 227, 181, 136, 23, 66, 189, 150, 68, 20, 34, 148, 1, 69, 174, 9, 38, 53, 37, 24, 12, 91, 174, 125, 230, 202, 23, 229, 149, 223, 101, 235, 17, 153, 95, 230, 71, 162, 138, 249, 37, 97, 8, 189, 82, 49, 6, 108, 235, 123, 118, 181, 92, 167, 0, 2, 123, 96, 120, 183, 173, 218, 138, 167, 224, 173, 2, 94, 203, 43, 240, 108, 206, 26, 235, 7, 27, 194, 214, 166, 114, 240, 187, 188, 191, 212, 155, 16, 74, 216, 249, 32, 16, 69, 89, 111, 179, 90, 137, 39, 41, 18, 250, 181, 154, 18, 127, 159, 207, 82, 25, 136, 221, 89, 48, 39, 17, 224, 223, 53, 72, 22, 90, 86, 98, 112, 249, 97, 177, 15, 90, 55, 101, 33, 183, 86, 15, 71, 198, 90, 99, 200, 213, 91, 239, 149, 100, 115, 217, 40, 21, 196, 108, 116, 57, 169, 126, 57, 62, 136, 252, 220, 225, 188, 237, 67, 233, 232, 113, 131, 61, 207, 216, 173, 186, 42, 82, 71, 11, 89, 12, 12, 33, 126, 96, 68, 35, 25, 173, 53, 58, 181, 42, 179, 145, 107, 80, 182, 139, 217, 247, 247, 208, 93, 92, 106, 17, 108, 27, 119, 149, 50, 209, 80, 39, 87, 247, 172, 230, 157, 95, 131, 204, 244, 13, 210, 238, 191, 208, 226, 217, 220, 215, 85, 155, 102, 211, 188, 56, 225, 130, 65, 221, 32, 212, 136, 196, 105, 209, 36, 147, 88, 31, 178, 180, 227, 221, 1, 59, 80, 115, 44, 232, 123, 28, 113, 141, 160, 117, 228, 253, 104, 45, 120, 168, 225, 119, 66, 148, 36, 138, 83, 133, 19, 52, 111, 88, 150, 79, 240, 152, 158, 117, 67, 159, 196, 47, 17, 73, 83, 12, 176, 219, 71, 28, 182, 17, 106, 247, 218, 85, 194, 153, 124, 155, 124, 104, 196, 204, 44, 228, 234, 211, 58, 135, 89, 184, 185, 64, 60, 37, 38, 230, 169, 13, 137, 225, 133, 240, 169, 233, 186, 16, 107, 235, 63, 45, 94, 106, 193, 30, 218, 13, 38, 140, 159, 188, 151, 159, 116, 182, 85, 254, 254, 195, 105, 87, 2, 154, 43, 113, 152, 56, 50, 223, 52, 39, 87, 79, 144, 124, 220, 193, 107, 130, 67, 120, 244, 210, 13, 14, 100, 104, 30, 110, 170, 169, 20, 170, 217, 192, 22, 79, 124, 149, 104, 206, 212, 84, 107, 25, 160, 139, 187, 148, 251, 124, 217, 131, 32, 194, 66, 193, 197, 117, 211, 53, 148, 20, 88, 41, 180, 217, 123, 44, 155, 100, 230, 187, 227, 8, 227, 202, 226, 30, 29, 55, 57, 135, 87, 171, 27, 220, 56, 55, 174, 153, 196, 141, 202, 18, 207, 103, 223, 225, 49, 61, 158, 40, 214, 220, 244, 186, 206, 135, 172, 33, 224, 179, 120, 195, 7, 184, 125, 93, 245, 112, 148, 243, 153, 155, 209, 161, 141, 57, 219, 219, 202, 83, 131, 149, 191, 187, 255, 151, 7, 238, 17, 192, 136, 207, 250, 74, 210, 209, 11, 43, 13, 50, 147, 228, 37, 76, 62, 60, 151, 233, 86, 6, 37, 112, 18, 212, 128, 73, 194, 200, 117, 0, 122, 58, 187, 80, 225, 195, 59, 253, 3, 67, 72, 215, 145, 175, 187, 191, 135, 25, 128, 62, 137, 52, 161, 66, 247, 254, 221, 169, 141, 195, 51, 148, 90, 133, 213, 250, 120, 99, 71, 168, 40, 13, 225, 74, 8, 60, 53, 150, 113, 135, 165, 191, 245, 153, 183, 70, 56, 166, 255, 205, 0, 175, 68, 196, 61, 131, 169, 25, 0, 178, 2, 109, 116, 235, 165, 72, 29, 92, 103, 119, 173, 22, 67, 191, 96, 132, 147, 218, 134, 155, 132, 105, 146, 119, 65, 246, 232, 21, 174, 117, 186, 15, 115, 120, 105, 80, 201, 185, 133, 83, 90, 163, 181, 213, 83, 146, 116, 208, 244, 194, 87, 26, 197, 70, 113, 129, 158, 93, 155, 73, 154, 245, 222, 209, 98, 89, 127, 118, 254, 234, 172, 142, 198, 146, 43, 215, 212, 56, 28, 138, 160, 247, 141, 216, 178, 98, 201, 74, 149, 234, 92, 29, 1, 34, 144, 255, 41, 197, 122, 78, 240, 121, 4, 39, 112, 143, 104, 6, 244, 209, 81, 180, 96, 130, 134, 28, 48, 11, 73, 97, 63, 198, 64, 212, 67, 163, 87, 210, 193, 138, 156, 97, 71, 214, 79, 142, 161, 94, 121, 161, 247, 112, 248, 173, 94, 171, 138, 1, 119, 76, 173, 167, 3, 251, 79, 196, 255, 18, 169, 177, 229, 240, 210, 16, 110, 245, 117, 234, 143, 131, 253, 79, 126, 246, 240, 35, 86, 142, 52, 211, 57, 72, 56, 88, 188, 248, 34, 254, 143, 209, 215, 157, 237, 237, 31, 96, 167, 135, 237, 52, 80, 75, 69, 103, 106, 112, 255, 154, 63, 201, 107, 32, 40, 226, 135, 150, 244, 248, 129, 217, 90, 56, 114, 166, 94, 117, 228, 245, 83, 116, 32, 73, 152, 62, 232, 65, 187, 16, 150, 109, 92, 214, 51, 143, 7, 117, 210, 173, 133, 231, 115, 113, 27, 221, 196, 219, 21, 159, 140, 142, 47, 209, 11, 81, 17, 136, 42, 143, 75, 25, 223, 60, 176, 92, 247, 205, 139, 69, 43, 97, 36, 144, 173, 63, 217, 188, 149, 112, 57, 254, 174, 89, 134, 42, 177, 30, 100, 175, 102, 199, 186, 119, 252, 233, 165, 17, 182, 6, 107, 90, 191, 113, 165, 14, 57, 206, 28, 187, 141, 182, 187, 122, 170, 226, 200, 154, 111, 64, 142, 76, 14, 170, 91, 90, 142, 232, 117, 25, 243, 84, 141, 18, 225, 109, 50, 136, 0, 20, 64, 30, 148, 63, 160, 78, 23, 204, 113, 116, 121, 250, 152, 49, 139, 68, 27, 4, 50, 95, 203, 248, 105, 79, 18, 219, 240, 169, 243, 97, 240, 18, 123, 118, 27, 216, 9, 195, 177, 208, 149, 168, 48, 95, 164, 133, 155, 245, 47, 9, 180, 251, 184, 171, 50, 48, 54, 114, 76, 191, 60, 205, 53, 159, 116, 135, 106, 8, 174, 143, 111, 43, 190, 158, 154, 103, 233, 235, 207, 174, 140, 78, 181, 174, 53, 74, 141, 33, 203, 108, 71, 235, 82, 117, 223, 16, 3, 102, 90, 176, 202, 23, 129, 74, 200, 157, 140, 4, 215, 222, 53, 167, 191, 118, 208, 151, 64, 19, 25, 187, 144, 3, 131, 201, 53, 179, 120, 248, 220, 214, 143, 195, 81, 213, 92, 220, 79, 229, 236, 137, 110, 41, 229, 168, 20, 58, 0, 101, 220, 59, 137, 26, 19, 20, 58, 62, 202, 143, 58, 48, 165, 90, 164, 174, 203, 154, 235, 109, 26, 206, 121, 11, 173, 169, 47, 90, 176, 186, 90, 161, 54, 74, 86, 151, 214, 218, 154, 236, 100, 35, 88, 161, 136, 242, 229, 120, 180, 253, 188, 255, 104, 15, 154, 172, 193, 237, 148, 25, 147, 3, 68, 185, 147, 81, 136, 210, 241, 24, 128, 8, 253, 147, 227, 25, 201, 147, 158, 55, 210, 209, 190, 59, 221, 39, 175, 225, 244, 224, 67, 143, 242, 67, 171, 77, 227, 129, 110, 147, 163, 208, 229, 249, 13, 91, 28, 44, 231, 85, 238, 128, 65, 187, 55, 200, 247, 167, 93, 86, 7, 228, 160, 92, 78, 90, 53, 128, 69, 120, 68, 158, 231, 124, 23, 145, 112, 246, 204, 170, 128, 191, 233, 115, 55, 133, 175, 183, 240, 30, 125, 13, 180, 79, 48, 191, 181, 53, 75, 25, 176, 67, 58, 30, 194, 109, 201, 195, 48, 89, 66, 179, 68, 128, 157, 161, 92, 20, 0, 150, 241, 91, 109, 17, 15, 174, 214, 73, 30, 48, 241, 228, 173, 70, 24, 114, 234, 26, 194, 200, 197, 47, 73, 183, 3, 95, 64, 212, 142, 22, 47, 9, 41, 154, 56, 81, 145, 126, 63, 192, 59, 55, 49, 12, 142, 217, 162, 212, 51, 74, 110, 194, 65, 97, 42, 36, 203, 7, 180, 10, 37, 74, 72, 189, 117, 178, 235, 169, 121, 188, 63, 85, 25, 66, 235, 89, 98, 163, 185, 197, 229, 189, 175, 8, 221, 71, 253, 75, 234, 237, 222, 147, 246, 104, 177, 33, 156, 9, 129, 141, 182, 20, 194, 123, 235, 77, 107, 150, 166, 253, 18, 252, 94, 85, 193, 174, 94, 150, 223, 250, 153, 93, 85, 200, 221, 149, 125, 160, 175, 3, 154, 210, 30, 120, 24, 55, 175, 44, 12, 248, 212, 165, 121, 113, 89, 95, 245, 172, 130, 139, 105, 207, 175, 186, 233, 100, 161, 5, 81, 47, 234, 112, 155, 6, 67, 203, 88, 103, 64, 61, 42, 227, 44, 70, 200, 102, 110, 247, 33, 116, 145, 147, 75, 104, 47, 171, 193, 100, 83, 98, 105, 236, 233, 246, 221, 250, 196, 213, 3, 43, 24, 202, 219, 95, 213, 87, 251, 90, 234, 50, 57, 30, 173, 215, 241, 111, 8, 70, 21, 41, 110, 55, 139, 172, 212, 120, 132, 21, 144, 139, 218, 55, 68, 210, 109, 52, 0, 178, 165, 131, 161, 117, 163, 156, 128, 150, 50, 85, 75, 65, 135, 203, 13, 229, 185, 206, 66, 242, 40, 183, 81, 129, 19, 42, 166, 147, 78, 85, 184, 242, 253, 193, 135, 249, 226, 72, 192, 219, 185, 220, 88, 138, 209, 153, 159, 168, 2, 33, 171, 64, 18, 196, 109, 158, 147, 54, 94, 38, 37, 89, 176, 42, 35, 165, 42, 207, 163, 254, 25, 224, 175, 31, 239, 98, 238, 170, 69, 180, 252, 115, 94, 49, 86, 154, 113, 246, 33, 46, 75, 75, 55, 87, 28, 125, 81, 50, 49, 178, 87, 98, 248, 247, 229, 13, 50, 167, 251, 55, 91, 178, 252, 244, 116, 29, 81, 60, 64, 135, 139, 98, 238, 23, 210, 124, 53, 0, 58, 247, 17, 232, 17, 121, 29, 203, 204, 172, 20, 39, 58, 114, 94, 106, 148, 213, 8, 212, 173, 242, 174, 81, 10, 30, 27, 123, 120, 61, 103, 150, 118, 226, 62, 137, 17, 123, 112, 164, 147, 179, 249, 42, 122, 45, 238, 25, 201, 170, 47, 203, 215, 177, 175, 124, 145, 75, 81, 56, 85, 131, 75, 48, 46, 173, 74, 86, 33, 220, 10, 44, 36, 222, 206, 74, 12, 4, 233, 8, 137, 84, 41, 243, 99, 190, 91, 82, 251, 1, 162, 238, 95, 217, 253, 134, 244, 75, 116, 246, 189, 81, 175, 40, 107, 29, 57, 127, 246, 48, 188, 142, 212, 160, 13, 120, 162, 28, 120, 165, 127, 200, 157, 138, 31, 135, 120, 235, 9, 80, 63, 49, 13, 183, 153, 92, 116, 220, 255, 144, 194, 108, 192, 172, 153, 151, 140, 197, 192, 70, 255, 114, 11, 168, 125, 86, 22, 60, 17, 173, 38, 183, 86, 125, 33, 170, 231, 159, 157, 68, 154, 136, 148, 154, 70, 40, 68, 29, 54, 106, 112, 142, 217, 14, 245, 55, 12, 237, 112, 153, 156, 72, 4, 40, 76, 128, 161, 172, 140, 211, 43, 151, 150, 241, 253, 19, 167, 48, 124, 138, 19, 214, 80, 12, 180, 156, 105, 157, 138, 118, 88, 39, 6, 132, 7, 112, 145, 213, 3, 117, 51, 24, 129, 51, 28, 130, 212, 113, 251, 76, 83, 61, 210, 96, 246, 36, 135, 10, 178, 63, 223, 67, 163, 201, 68, 97, 32, 104, 40, 184, 122, 19, 141, 188, 80, 235, 121, 127, 207, 1, 182, 204, 252, 232, 213, 64, 176, 180, 228, 51, 58, 224, 146, 95, 159, 106, 49, 143, 228, 155, 168, 98, 7, 243, 158, 121, 40, 88, 39, 136, 88, 206, 254, 135, 105, 167, 141, 177, 33, 129, 114, 206, 126, 100, 110, 176, 210, 123, 52, 19, 173, 178, 23, 147, 17, 6, 13, 141, 29, 207, 144, 199, 233, 20, 156, 46, 111, 180, 81, 122, 84, 143, 207, 64, 138, 27, 110, 108, 182, 44, 22, 75, 36, 9, 133, 130, 159, 56, 53, 154, 208, 84, 95, 107, 194, 131, 199, 225, 71, 137, 110, 162, 104, 147, 85, 253, 116, 160, 121, 125, 108, 233, 237, 253, 27, 49, 87, 188, 65, 116, 76, 192, 243, 74, 0, 28, 39, 193, 22, 225, 188, 168, 112, 240, 169, 104, 253, 191, 172, 69, 48, 33, 186, 29, 201, 71, 215, 249, 30, 249, 7, 68, 233, 42, 82, 160, 137, 244, 180, 61, 235, 24, 204, 113, 83, 244, 222, 20, 97, 88, 78, 219, 204, 44, 160, 2, 135, 40, 139, 147, 188, 163, 61, 120, 149, 30, 85, 156, 220, 173, 144, 3, 150, 222, 79, 239, 7, 141, 171, 121, 24, 88, 161, 120, 190, 47, 158, 51, 179, 72, 136, 62, 21, 94, 18, 245, 106, 240, 113, 52, 239, 114, 190, 142, 120, 204, 64, 83, 212, 192, 104, 224, 139, 5, 233, 133, 67, 180, 153, 49, 6, 211, 99, 23, 102, 148, 113, 163, 13, 97, 28, 22, 221, 111, 152, 44, 49, 207, 28, 81, 81, 173, 28, 205, 212, 105, 177, 57, 215, 115, 198, 49, 171, 248, 84, 252, 140, 232, 193, 152, 186, 167, 17, 234, 224, 225, 120, 96, 231, 139, 220, 26, 137, 104, 147, 99, 221, 156, 43, 7, 153, 90, 152, 187, 99, 103, 99, 119, 38, 235, 55, 233, 15, 81, 221, 253, 240, 220, 105, 130, 1, 224, 11, 238, 63, 155, 237, 8, 133, 224, 115, 212, 67, 2, 47, 191, 244, 87, 230, 108, 130, 224, 64, 37, 139, 121, 125, 5, 60, 54, 146, 218, 159, 51, 240, 93, 194, 208, 108, 47, 240, 226, 49, 219, 37, 49, 225, 195, 53, 194, 93, 87, 120, 100, 70, 14, 217, 170, 84, 123, 245, 21, 225, 25, 30, 24, 164, 203, 254, 38, 165, 189, 194, 179, 40, 56, 141, 34, 152, 126, 82, 242, 107, 207, 3, 23, 156, 244, 151, 25, 5, 77, 67, 136, 125, 199, 172, 136, 118, 230, 35, 40, 166, 112, 63, 37, 231, 244, 214, 3, 170, 27, 100, 45, 229, 211, 104, 124, 190, 83, 174, 16, 212, 121, 194, 94, 114, 27, 112, 49, 135, 218, 80, 20, 91, 180, 172, 204, 0, 143, 13, 33, 212, 35, 200, 72, 193, 91, 127, 142, 53, 81, 15, 82, 76, 216, 76, 20, 200, 83, 20, 198, 211, 16, 19, 121, 158, 159, 25, 245, 206, 119, 18, 238, 240, 219, 212, 9, 204, 27, 117, 6, 9, 112, 113, 118, 206, 160, 228, 4, 220, 237, 97, 18, 218, 166, 255, 124, 116, 96, 5, 242, 85, 5, 33, 33, 161, 149, 205, 24, 94, 47, 87, 134, 85, 226, 249, 249, 5, 227, 197, 223, 91, 128, 37, 145, 3, 96, 65, 74, 206, 160, 205, 17, 140, 49, 16, 124, 69, 229, 77, 147, 72, 195, 149, 211, 84, 148, 226, 162, 175, 93, 198, 251, 199, 132, 49, 167, 21, 89, 87, 205, 150, 41, 174, 160, 213, 125, 15, 15, 65, 96, 192, 67, 252, 206, 13, 103, 38, 154, 252, 72, 21, 156, 116, 67, 237, 172, 17, 108, 46, 200, 167, 4, 20, 190, 2, 62, 24, 188, 138, 137, 65, 223, 60, 175, 127, 5, 232, 205, 110, 122, 124, 42, 165, 128, 70, 229, 185, 170, 111, 202, 121, 244, 92, 171, 157, 138, 193, 245, 84, 75, 54, 39, 97, 4, 59, 209, 20, 218, 154, 67, 110, 234, 107, 114, 14, 141, 118, 141, 138, 138, 47, 119, 36, 141, 72, 25, 14, 177, 56, 43, 49, 180, 241, 114, 7, 147, 99, 214, 187, 57, 34, 226, 164, 120, 226, 222, 52, 116, 202, 181, 50, 85, 154, 29, 35, 109, 169, 3, 139, 175, 193, 131, 79, 80, 146, 136, 155, 47, 33, 196, 225, 189, 248, 228, 20, 187, 129, 70, 61, 72, 219, 224, 74, 177, 116, 127, 162, 5, 198, 39, 113, 176, 183, 223, 135, 54, 54, 218, 179, 112, 43, 190, 64, 39, 74, 135, 56, 200, 178, 87, 9, 51, 97, 186, 209, 101, 169, 64, 52, 31, 21, 137, 29, 238, 154, 107, 217, 59, 182, 253, 228, 200, 215, 119, 88, 232, 148, 113, 61, 51, 13, 154, 66, 32, 26, 105, 35, 212, 65, 0, 69, 26, 96, 231, 4, 164, 172, 255, 172, 249, 38, 4, 25, 122, 2, 156, 112, 7, 112, 169, 93, 31, 153, 45, 45, 135, 144, 37, 82, 19, 219, 242, 235, 49, 6, 44, 125, 86, 225, 78, 176, 86, 67, 9, 67, 51, 85, 140, 13, 234, 177, 235, 61, 1, 186, 132, 117, 132, 184, 184, 142, 230, 82, 216, 22, 143, 124, 32, 223, 67, 57, 26, 42, 242, 122, 66, 68, 167, 12, 69, 145, 117, 239, 210, 161, 126, 247, 154, 118, 227, 72, 251, 36, 7, 74, 103, 159, 103, 162, 191, 232, 0, 190, 34, 56, 228, 53, 66, 112, 109, 127, 70, 220, 53, 182, 216, 65, 195, 23, 100, 143, 113, 195, 185, 149, 15, 46, 94, 47, 106, 47, 75, 56, 190, 152, 113, 151, 131, 191, 32, 98, 130, 32, 68, 86, 174, 104, 130, 8, 241, 214, 34, 184, 220, 171, 129, 121, 62, 245, 113, 251, 95, 131, 215, 195, 27, 28, 57, 105, 41, 243, 113, 60, 128, 55, 14, 95, 24, 141, 67, 96, 254, 137, 70, 44, 31, 228, 119, 1, 70, 159, 203, 153, 145, 144, 120, 115, 45, 178, 225, 152, 151, 214, 131, 133, 29, 131, 96, 80, 163, 219, 209, 34, 166, 127, 187, 168, 202, 22, 207, 223, 174, 112, 218, 130, 99, 117, 44, 39, 108, 5, 193, 135, 251, 185, 50, 205, 170, 66, 192, 85, 145, 11, 31, 91, 165, 120, 196, 241, 202, 251, 10, 112, 211, 219, 140, 235, 65, 85, 38, 31, 234, 53, 152, 173, 149, 177, 44, 120, 204, 187, 41, 215, 20, 212, 169, 64, 208, 118, 7, 223, 34, 177, 51, 254, 45, 125, 50, 124, 103, 223, 15, 86, 151, 188, 127, 200, 98, 227, 167, 1, 107, 83, 10, 82, 184, 234, 216, 49, 83, 33, 238, 64, 197, 22, 119, 38, 182, 188, 206, 172, 93, 204, 14, 167, 72, 175, 218, 226, 52, 249, 169, 112, 40, 242, 129, 111, 186, 127, 50, 235, 242, 254, 196, 217, 93, 175, 35, 148, 119, 31, 157, 45, 137, 243, 139, 144, 134, 25, 145, 12, 105, 94, 5, 108, 232, 202, 179, 253, 149, 120, 141, 98, 36, 142, 129, 178, 67, 92, 246, 126, 31, 99, 204, 192, 213, 90, 185, 80, 4, 140, 47, 189, 66, 101, 38, 9, 143, 79, 84, 72, 65, 207, 25, 84, 203, 107, 174, 86, 20, 73, 129, 124, 141, 51, 122, 250, 223, 152, 214, 107, 72, 139, 161, 104, 194, 244, 103, 108, 156, 60, 149, 212, 38, 213, 99, 249, 128, 65, 226, 70, 104, 181, 65, 230, 241, 51, 89, 31, 134, 3, 142, 75, 30, 24, 245, 46, 152, 78, 113, 119, 175, 217, 242, 83, 172, 90, 114, 51, 7, 180, 10, 123, 231, 131, 40, 222, 33, 60, 17, 5, 178, 82, 196, 68, 243, 105, 45, 241, 166, 54, 25, 249, 144, 130, 245, 129, 222, 134, 192, 54, 68, 36, 248, 29, 146, 99, 172, 230, 191, 251, 152, 49, 47, 233, 129, 97, 164, 206, 180, 8, 92, 156, 214, 160, 213, 103, 167, 124, 23, 10, 160, 209, 8, 151, 239, 173, 103, 116, 131, 119, 118, 51, 181, 136, 190, 39, 40, 249, 106, 204, 108, 119, 155, 166, 198, 74, 213, 180, 225, 166, 160, 219, 112, 162, 250, 105, 46, 190, 192, 166, 38, 41, 111, 90, 219, 82, 189, 123, 18, 131, 2, 229, 193, 214, 150, 95, 251, 191, 67, 153, 209, 87, 65, 194, 71, 233, 131, 198, 129, 220, 54, 88, 48, 73, 151, 63, 230, 224, 0, 50, 134, 46, 238, 254, 89, 140, 32, 80, 112, 64, 36, 246, 184, 221, 164, 210, 54, 181, 163, 102, 153, 47, 116, 110, 166, 149, 224, 116, 200, 137, 104, 201, 159, 254, 177, 62, 62, 39, 133, 113, 37, 25, 173, 74, 92, 124, 65, 16, 221, 60, 4, 223, 249, 118, 0, 180, 233, 192, 52, 216, 30, 10, 11, 96, 88, 173, 1, 102, 64, 206, 130, 104, 25, 43, 129, 40, 154, 209, 33, 162, 242, 218, 44, 24, 210, 90, 119, 230, 158, 172, 200, 62, 124, 47, 140, 0, 192, 57, 156, 123, 139, 195, 200, 142, 43, 122, 228, 190, 214, 216, 207, 194, 94, 115, 183, 232, 232, 188, 135, 235, 123, 37, 60, 251, 53, 92, 95, 76, 120, 176, 158, 239, 176, 89, 242, 165, 59, 40, 255, 2, 108, 237, 42, 5, 173, 165, 90, 77, 17, 95, 82, 55, 240, 75, 35, 76, 1, 48, 245, 2, 82, 2, 229, 112, 53, 50, 217, 45, 137, 17, 129, 203, 164, 174, 193, 162, 189, 70, 81, 245, 207, 90, 65, 202, 24, 252, 77, 126, 127, 75, 115, 245, 177, 172, 28, 41, 218, 14, 32, 0, 51, 37, 78, 31, 0, 110, 49, 242, 183, 245, 202, 212, 58, 85, 203, 178, 185, 212, 198, 216, 151, 199, 116, 139, 247, 42, 231, 51, 236, 211, 52, 211, 99, 200, 219, 57, 101, 100, 154, 193, 13, 23, 198, 75, 152, 237, 53, 3, 70, 53, 154, 60, 153, 248, 25, 103, 107, 121, 137, 1, 81, 157, 23, 180, 214, 165, 70, 132, 48, 38, 233, 26, 252, 136, 71, 193, 129, 65, 190, 212, 168, 90, 157, 178, 134, 147, 60, 156, 185, 4, 187, 49, 37, 173, 164, 18, 129, 216, 207, 48, 186, 141, 72, 147, 181, 25, 171, 62, 183, 243, 14, 187, 28, 221, 213, 170, 174, 211, 66, 86, 251, 224, 62, 37, 236, 24, 28, 70, 22, 194, 14, 56, 109, 102, 178, 53, 3, 218, 248, 70, 68, 170, 27, 179, 106, 82, 210, 142, 242, 223, 8, 103, 215, 166, 137, 104, 136, 202, 47, 0, 151, 82, 176, 74, 113, 209, 61, 114, 92, 187, 107, 153, 19, 195, 125, 14, 166, 231, 107, 68, 68, 139, 184, 181, 6, 50, 176, 126, 7, 83, 61, 79, 79, 203, 45, 111, 241, 213, 75, 66, 250, 187, 69, 90, 148, 19, 225, 220, 211, 194, 104, 40, 60, 161, 228, 191, 18, 226, 38, 233, 228, 164, 235, 253, 120, 234, 228, 161, 119, 78, 242, 161, 46, 87, 78, 17, 115, 234, 196, 118, 147, 229, 118, 62, 250, 88, 246, 218, 65, 184, 110, 229, 81, 234, 148, 143, 201, 25, 89, 2, 229, 191, 19, 221, 170, 109, 143, 104, 124, 173, 79, 87, 157, 109, 54, 236, 185, 156, 141, 225, 116, 23, 208, 64, 37, 140, 84, 136, 0, 152, 12, 32, 201, 156, 149, 178, 121, 175, 242, 183, 198, 122, 17, 206, 137, 203, 208, 56, 164, 249, 175, 255, 193, 174, 123, 55, 160, 82, 107, 186, 103, 26, 84, 27, 27, 127, 55, 20, 245, 38, 196, 126, 173, 109, 234, 57, 68, 95, 124, 185, 129, 90, 93, 228, 228, 179, 190, 82, 172, 185, 22, 130, 114, 236, 207, 224, 211, 90, 149, 116, 42, 137, 254, 220, 58, 172, 230, 19, 136, 174, 207, 223, 5, 200, 156, 64, 15, 37, 69, 166, 145, 120, 154, 165, 229, 124, 188, 96, 61, 56, 3, 41, 138, 140, 55, 253, 82, 196, 234, 178, 38, 187, 171, 244, 114, 217, 149, 108, 151, 220, 106, 45, 59, 65, 84, 214, 183, 111, 17, 12, 42, 155, 95, 110, 173, 76, 65, 159, 156, 250, 138, 35, 228, 169, 168, 127, 205, 49, 82, 207, 108, 150, 69, 185, 214, 191, 160, 124, 58, 169, 18, 38, 7, 244, 218, 210, 186, 17, 47, 69, 116, 161, 88, 211, 252, 110, 177, 207, 120, 187, 139, 63, 216, 9, 8, 205, 224, 97, 101, 179, 164, 84, 211, 136, 112, 227, 161, 179, 222, 96, 152, 10, 53, 21, 29, 230, 77, 139, 8, 230, 95, 152, 153, 34, 187, 164, 116, 0, 165, 205, 166, 149, 236, 107, 216, 112, 173, 153, 98, 6, 201, 102, 121, 89, 166, 240, 112, 211, 123, 170, 202, 145, 107, 233, 76, 37, 119, 245, 220, 108, 183, 228, 127, 60, 130, 79, 80, 193, 119, 9, 144, 188, 1, 138, 234, 59, 239, 155, 25, 173, 172, 15, 50, 30, 90, 172, 55, 25, 25, 225, 148, 161, 97, 125, 236, 51, 101, 163, 174, 222, 144, 192, 174, 58, 73, 2, 83, 65, 55, 181, 21, 116, 229, 54, 196, 173, 59, 45, 57, 173, 182, 169, 194, 98, 198, 2, 116, 100, 109, 50, 141, 253, 79, 185, 255, 141, 168, 96, 51, 41, 106, 255, 252, 174, 45, 31, 197, 1, 222, 183, 50, 200, 108, 161, 197, 207, 0, 128, 252, 91, 147, 122, 180, 110, 113, 157, 59, 27, 177, 17, 226, 112, 42, 237, 84, 78, 77, 234, 25, 172, 104, 106, 243, 143, 170, 196, 61, 19, 172, 89, 227, 0, 251, 61, 140, 50, 55, 154, 82, 190, 162, 49, 227, 76, 111, 218, 23, 196, 227, 3, 151, 44, 107, 89, 80, 121, 94, 87, 112, 69, 246, 52, 237, 138, 192, 22, 152, 84, 239, 193, 233, 232, 155, 81, 133, 73, 120, 99, 194, 17, 67, 219, 126, 242, 98, 203, 254, 227, 173, 126, 98, 102, 158, 34, 21, 11, 178, 151, 158, 72, 53, 53, 94, 233, 8, 132, 134, 21, 178, 134, 173, 112, 167, 172, 198, 153, 180, 226, 126, 70, 45, 90, 134, 165, 133, 217, 119, 62, 245, 225, 8, 142, 220, 99, 87, 228, 183, 198, 8, 143, 253, 228, 109, 48, 159, 250, 133, 69, 241, 30, 113, 56, 121, 8, 22, 145, 117, 189, 190, 39, 186, 26, 221, 231, 6, 24, 249, 179, 117, 250, 68, 181, 165, 77, 43, 172, 216, 68, 63, 172, 239, 19, 240, 248, 87, 219, 44, 20, 142, 77, 186, 202, 73, 47, 87, 141, 196, 27, 104, 196, 59, 145, 3, 31, 140, 254, 198, 172, 77, 125, 193, 158, 155, 22, 15, 139, 42, 9, 87, 74, 55, 109, 191, 219, 103, 125, 104, 203, 99, 246, 152, 32, 114, 67, 53, 248, 200, 184, 63, 123, 0, 128, 179, 254, 214, 11, 64, 23, 100, 211, 15, 40, 220, 88, 126, 12, 253, 182, 18, 11, 208, 180, 55, 242, 151, 224, 5, 254, 35, 149, 246, 145, 5, 76, 192, 177, 213, 177, 70, 69, 12, 141, 251, 80, 113, 132, 134, 51, 183, 27, 153, 121, 185, 211, 174, 198, 86, 223, 25, 133, 193, 245, 17, 69, 113, 243, 76, 16, 197, 166, 89, 81, 95, 214, 253, 220, 56, 158, 235, 175, 181, 254, 224, 111, 226, 233, 107, 254, 236, 241, 249, 230, 116, 37, 110, 35, 110, 201, 75, 177, 12, 181, 252, 39, 151, 71, 190, 202, 172, 111, 244, 236, 230, 3, 145, 79, 159, 171, 70, 61, 86, 77, 41, 55, 4, 69, 215, 39, 232, 115, 218, 38, 66, 231, 147, 214, 224, 0, 235, 17, 13, 239, 232, 161, 8, 252, 53, 78, 1, 80, 198, 15, 191, 126, 64, 116, 31, 107, 174, 212, 248, 93, 122, 96, 194, 33, 76, 190, 210, 110, 161, 223, 213, 181, 223, 5, 92, 162, 161, 44, 0, 9, 72, 59, 62, 3, 34, 2, 148, 6, 191, 138, 116, 41, 13, 39, 133, 228, 246, 117, 120, 219, 177, 197, 107, 235, 25, 112, 166, 158, 190, 162, 18, 158, 73, 169, 199, 23, 30, 225, 169, 217, 197, 130, 251, 199, 98, 208, 255, 68, 32, 220, 56, 171, 142, 182, 204, 177, 237, 249, 147, 162, 63, 67, 206, 78, 205, 107, 110, 121, 82, 68, 93, 48, 38, 122, 90, 126, 39, 33, 34, 138, 245, 41, 248, 7, 172, 80, 136, 22, 161, 136, 11, 26, 33, 122, 140, 191, 147, 94, 142, 159, 220, 90, 225, 68, 210, 230, 159, 40, 97, 250, 16, 150, 207, 149, 161, 208, 19, 180, 6, 3, 205, 29, 110, 115, 99, 92, 251, 23, 135, 180, 54, 230, 7, 74, 137, 178, 39, 76, 218, 177, 226, 31, 209, 137, 210, 40, 189, 5, 40, 7, 79, 255, 238, 200, 53, 111, 13, 154, 109, 36, 23, 82, 43, 207, 106, 110, 20, 208, 106, 240, 240, 240, 21, 65, 230, 190, 89, 241, 202, 118, 151, 110, 17, 134, 80, 218, 190, 6, 245, 58, 213, 142, 76, 149, 181, 170, 21, 240, 186, 108, 137, 230, 29, 2, 7, 46, 12, 161, 205, 137, 31, 68, 157, 218, 228, 154, 148, 222, 128, 52, 186, 144, 124, 137, 34, 204, 0, 236, 130, 41, 234, 219, 162, 137, 46, 164, 19, 37, 13, 160, 153, 245, 99, 186, 84, 30, 128, 75, 1, 106, 70, 75, 65, 127, 31, 199, 85, 176, 15, 64, 24, 98, 131, 211, 158, 58, 155, 126, 85, 55, 247, 22, 138, 105, 170, 97, 145, 56, 234, 44, 149, 129, 156, 216, 226, 166, 96, 177, 159, 15, 9, 207, 44, 4, 160, 106, 122, 68, 245, 205, 42, 45, 173, 173, 162, 184, 134, 246, 105, 183, 101, 197, 64, 122, 217, 68, 79, 24, 107, 124, 8, 146, 183, 249, 42, 62, 2, 107, 193, 19, 158, 183, 45, 213, 151, 129, 191, 117, 26, 115, 245, 132, 91, 231, 41, 34, 56, 0, 178, 97, 104, 224, 147, 188, 201, 24, 190, 173, 202, 217, 248, 87, 231, 84, 152, 152, 15, 170, 120, 60, 6, 210, 204, 214, 109, 67, 253, 86, 195, 83, 77, 43, 242, 34, 54, 218, 45, 80, 56, 251, 142, 24, 71, 235, 250, 123, 75, 140, 142, 37, 201, 238, 16, 219, 131, 89, 29, 236, 45, 63, 63, 161, 106, 117, 187, 164, 244, 66, 2, 15, 12, 48, 167, 33, 72, 41, 15, 12, 63, 40, 26, 105, 121, 73, 149, 212, 58, 173, 163, 149, 123, 125, 212, 167, 13, 176, 245, 141, 247, 175, 72, 197, 130, 73, 25, 238, 9, 61, 13, 207, 253, 2, 199, 250, 98, 125, 64, 166, 65, 27, 172, 253, 158, 154, 32, 166, 2, 167, 72, 153, 75, 4, 85, 140, 78, 217, 18, 198, 171, 21, 136, 232, 99, 134, 221, 33, 108, 127, 223, 72, 34, 222, 95, 116, 247, 220, 143, 176, 92, 144, 153, 91, 171, 116, 5, 44, 23, 175, 103, 175, 149, 135, 166, 245, 243, 183, 49, 221, 151, 225, 240, 255, 145, 5, 54, 32, 99, 200, 29, 141, 249, 95, 183, 94, 117, 86, 196, 81, 179, 94, 180, 127, 249, 84, 79, 6, 153, 165, 159, 220, 169, 173, 37, 118, 155, 142, 187, 246, 187, 40, 199, 254, 6, 5, 228, 203, 4, 14, 140, 95, 52, 174, 159, 177, 8, 232, 212, 209, 65, 12, 30, 185, 173, 68, 99, 85, 102, 39, 226, 11, 37, 188, 28, 8, 58, 193, 11, 119, 219, 110, 247, 202, 84, 200, 112, 231, 144, 25, 18, 183, 190, 48, 169, 113, 126, 130, 157, 77, 240, 1, 212, 148, 128, 63, 19, 160, 138, 26, 231, 199, 120, 45, 40, 189, 245, 4, 117, 208, 158, 101, 31, 222, 69, 166, 62, 226, 45, 8, 78, 244, 96, 142, 187, 38, 174, 137, 42, 68, 154, 211, 160, 225, 34, 228, 63, 7, 113, 29, 14, 184, 32, 17, 1, 154, 87, 41, 143, 32, 94, 128, 156, 77, 105, 84, 84, 253, 185, 220, 25, 5, 186, 157, 251, 229, 140, 42, 136, 74, 6, 191, 165, 155, 210, 126, 232, 187, 61, 185, 61, 148, 9, 88, 52, 32, 241, 11, 39, 233, 247, 35, 169, 241, 78, 147, 194, 159, 129, 39, 124, 50, 176, 229, 68, 185, 157, 103, 12, 178, 215, 95, 39, 40, 141, 123, 202, 107, 117, 56, 228, 252, 101, 32, 73, 29, 121, 74, 241, 99, 164, 133, 178, 135, 201, 24, 26, 154, 105, 27, 155, 38, 49, 129, 12, 103, 154, 186, 69, 54, 89, 200, 213, 152, 160, 230, 165, 191, 251, 126, 124, 225, 112, 37, 154, 154, 171, 223, 186, 108, 124, 45, 120, 138, 10, 28, 239, 70, 143, 58, 142, 209, 118, 14, 151, 114, 15, 77, 121, 40, 191, 164, 233, 211, 89, 98, 75, 32, 48, 75, 44, 188, 40, 160, 38, 187, 56, 156, 98, 99, 2, 102, 209, 176, 247, 103, 179, 234, 146, 86, 133, 168, 177, 166, 250, 237, 39, 73, 89, 120, 105, 74, 210, 151, 252, 189, 65, 237, 135, 137, 24, 59, 209, 0, 189, 203, 45, 110, 220, 59, 168, 248, 242, 17, 33, 58, 233, 111, 240, 241, 98, 160, 111, 182, 113, 206, 175, 0, 175, 8, 139, 100, 8, 22, 124, 128, 190, 88, 24, 205, 158, 206, 105, 39, 55, 88, 144, 105, 242, 153, 122, 0, 202, 121, 223, 252, 120, 208, 170, 235, 179, 47, 136, 34, 56, 169, 253, 117, 183, 124, 100, 5, 90, 104, 113, 82, 11, 9, 228, 165, 110, 192, 6, 87, 133, 53, 64, 91, 11, 12, 207, 94, 115, 158, 106, 58, 117, 254, 97, 97, 190, 38, 175, 192, 175, 103, 106, 9, 30, 220, 75, 157, 38, 123, 17, 98, 169, 211, 51, 250, 173, 128, 40, 89, 220, 134, 216, 58, 92, 143, 209, 124, 145, 250, 48, 222, 88, 92, 3, 251, 102, 17, 179, 38, 47, 151, 109, 97, 2, 78, 237, 200, 76, 216, 225, 135, 243, 151, 92, 205, 211, 76, 212, 44, 47, 184, 84, 197, 10, 112, 243, 143, 83, 129, 148, 166, 169, 21, 147, 178, 236, 143, 148, 229, 167, 95, 128, 238, 185, 158, 243, 9, 177, 64, 199, 222, 195, 47, 98, 129, 34, 19, 48, 63, 90, 187, 120, 115, 86, 7, 106, 66, 245, 241, 145, 65, 164, 91, 116, 38, 226, 196, 121, 1, 189, 17, 42, 191, 215, 162, 11, 212, 253, 60, 3, 10, 20, 90, 47, 202, 67, 30, 176, 27, 137, 44, 235, 253, 112, 186, 47, 62, 220, 22, 93, 58, 61, 141, 214, 30, 3, 120, 188, 208, 45, 252, 78, 232, 135, 237, 85, 150, 243, 121, 183, 0, 173, 20, 197, 217, 174, 208, 86, 180, 89, 26, 141, 126, 15, 56, 198, 252, 17, 113, 115, 80, 105, 252, 6, 122, 80, 91, 83, 167, 8, 213, 26, 57, 111, 215, 134, 72, 96, 47, 212, 57, 72, 217, 34, 196, 3, 25, 227, 61, 183, 96, 81, 177, 203, 168, 254, 157, 75, 84, 125, 6, 101, 109, 141, 110, 148, 56, 11, 160, 30, 30, 42, 194, 245, 29, 54, 95, 152, 16, 189, 54, 149, 54, 232, 130, 236, 147, 137, 194, 195, 224, 151, 247, 14, 242, 248, 183, 19, 164, 201, 143, 189, 139, 119, 235, 189, 195, 80, 238, 21, 213, 121, 212, 161, 66, 96, 3, 114, 10, 83, 130, 255, 180, 104, 176, 217, 249, 97, 14, 73, 228, 90, 247, 245, 32, 138, 58, 176, 167, 156, 22, 41, 115, 131, 122, 6, 175, 250, 53, 40, 156, 90, 133, 217, 42, 244, 143, 128, 223, 39, 241, 95, 47, 20, 214, 108, 178, 233, 171, 38, 76, 135, 143, 182, 205, 232, 41, 69, 212, 116, 197, 143, 27, 181, 227, 132, 203, 47, 10, 48, 254, 66, 235, 244, 66, 44, 253, 134, 214, 213, 39, 149, 175, 136, 103, 135, 21, 222, 216, 250, 159, 227, 151, 81, 150, 40, 229, 232, 243, 165, 143, 200, 67, 82, 192, 62, 112, 202, 171, 38, 48, 162, 29, 39, 245, 88, 201, 240, 186, 153, 36, 21, 125, 86, 190, 139, 245, 247, 13, 135, 134, 163, 124, 50, 240, 37, 32, 67, 141, 229, 196, 159, 216, 103, 94, 113, 167, 130, 193, 60, 245, 154, 160, 8, 188, 109, 211, 242, 18, 65, 122, 116, 100, 34, 84, 184, 144, 229, 206, 107, 144, 126, 248, 124, 176, 79, 63, 136, 21, 100, 103, 193, 141, 100, 82, 134, 97, 201, 190, 41, 236, 149, 0, 32, 94, 195, 121, 69, 61, 92, 216, 56, 215, 38, 105, 154, 145, 121, 121, 40, 118, 117, 71, 64, 153, 138, 64, 70, 243, 82, 88, 38, 238, 172, 163, 4, 221, 131, 29, 201, 145, 15, 94, 221, 2, 37, 88, 124, 219, 221, 189, 31, 167, 185, 180, 219, 2, 141, 139, 81, 112, 248, 252, 39, 38, 44, 101, 63, 50, 7, 119, 70, 65, 75, 53, 13, 57, 177, 88, 253, 199, 97, 53, 83, 76, 54, 34, 187, 197, 85, 5, 102, 122, 144, 45, 28, 13, 192, 237, 74, 100, 157, 202, 8, 83, 231, 101, 26, 196, 185, 39, 2, 20, 164, 159, 9, 78, 154, 1, 20, 133, 207, 143, 110, 196, 184, 50, 39, 111, 143, 253, 102, 63, 170, 174, 236, 72, 122, 124, 138, 248, 152, 231, 115, 244, 92, 19, 129, 248, 211, 61, 173, 48, 184, 108, 138, 235, 24, 3, 81, 125, 127, 58, 246, 13, 178, 221, 201, 216, 112, 74, 46, 236, 84, 157, 244, 134, 4, 241, 71, 15, 150, 61, 215, 81, 102, 5, 51, 218, 84, 124, 130, 63, 148, 213, 246, 135, 177, 181, 244, 227, 114, 7, 20, 240, 202, 17, 5, 54, 101, 77, 217, 243, 96, 157, 161, 7, 220, 24, 56, 3, 15, 182, 112, 174, 130, 252, 70, 60, 181, 216, 15, 3, 136, 32, 166, 97, 20, 153, 93, 84, 112, 162, 66, 18, 199, 130, 192, 183, 117, 151, 52, 51, 218, 58, 71, 217, 0, 241, 61, 10, 105, 150, 146, 246, 85, 239, 242, 230, 211, 8, 212, 201, 20, 160, 24, 50, 35, 237, 83, 215, 41, 238, 108, 247, 1, 55, 212, 165, 170, 13, 114, 6, 14, 219, 55, 155, 203, 204, 144, 195, 85, 54, 183, 70, 240, 249, 119, 66, 38, 225, 40, 9, 32, 10, 206, 13, 59, 42, 14, 220, 144, 91, 214, 215, 172, 139, 21, 172, 254, 85, 175, 235, 153, 98, 242, 229, 175, 161, 116, 81, 160, 169, 29, 175, 226, 244, 231, 151, 114, 39, 23, 97, 200, 102, 114, 135, 210, 161, 67, 226, 11, 121, 73, 241, 36, 163, 13, 39, 124, 63, 167, 242, 42, 70, 204, 64, 191, 14, 3, 165, 10, 6, 137, 200, 123, 113, 134, 20, 201, 10, 89, 135, 45, 80, 176, 214, 122, 93, 115, 0, 254, 226, 181, 172, 81, 194, 143, 67, 86, 100, 190, 49, 6, 214, 233, 147, 49, 150, 109, 158, 92, 23, 181, 177, 92, 32, 183, 221, 192, 83, 129, 103, 174, 90, 181, 178, 112, 20, 110, 213, 68, 252, 46, 12, 193, 162, 59, 139, 156, 229, 8, 162, 77, 204, 25, 188, 107, 164, 19, 227, 55, 236, 132, 239, 81, 175, 164, 192, 175, 226, 59, 175, 40, 133, 246, 82, 24, 253, 170, 223, 87, 187, 192, 210, 229, 30, 162, 17, 135, 76, 216, 194, 208, 107, 69, 104, 154, 135, 3, 103, 5, 26, 170, 85, 37, 202, 3, 198, 75, 68, 211, 166, 153, 193, 225, 9, 126, 17, 168, 91, 84, 186, 245, 77, 2, 111, 11, 174, 193, 68, 171, 199, 3, 179, 115, 135, 167, 126, 4, 128, 131, 20, 163, 84, 70, 103, 130, 42, 108, 171, 134, 116, 6, 179, 113, 83, 83, 165, 76, 242, 241, 169, 128, 58, 224, 41, 108, 239, 52, 11, 73, 154, 58, 91, 119, 118, 198, 78, 10, 12, 50, 67, 130, 245, 23, 128, 133, 248, 73, 211, 12, 64, 39, 109, 241, 38, 80, 72, 109, 169, 144, 86, 121, 21, 167, 145, 235, 135, 38, 98, 226, 190, 127, 31, 179, 38, 12, 27, 80, 82, 156, 169, 10, 113, 240, 113, 246, 33, 143, 80, 90, 26, 214, 195, 46, 25, 255, 54, 162, 93, 32, 6, 174, 175, 245, 214, 102, 9, 50, 235, 33, 204, 232, 227, 114, 105, 43, 122, 234, 163, 198, 178, 6, 206, 193, 38, 90, 221, 175, 179, 224, 114, 54, 116, 199, 122, 49, 223, 102, 164, 60, 43, 114, 206, 138, 128, 174, 53, 66, 41, 253, 168, 94, 93, 99, 230, 242, 101, 22, 228, 124, 234, 184, 87, 0, 9, 51, 250, 140, 98, 65, 66, 98, 194, 107, 61, 209, 181, 105, 238, 129, 152, 12, 47, 244, 113, 248, 59, 123, 89, 175, 240, 182, 198, 180, 147, 213, 38, 51, 109, 166, 221, 20, 101, 103, 97, 9, 250, 241, 34, 39, 99, 192, 89, 198, 75, 56, 12, 200, 45, 96, 75, 179, 209, 120, 160, 141, 45, 127, 77, 55, 195, 0, 97, 249, 238, 141, 59, 238, 195, 17, 249, 216, 170, 163, 64, 1, 196, 152, 21, 71, 31, 22, 230, 81, 178, 246, 249, 19, 217, 71, 95, 131, 78, 120, 4, 173, 111, 118, 128, 253, 151, 7, 145, 75, 231, 165, 132, 42, 182, 249, 17, 128, 158, 22, 121, 164, 212, 211, 62, 205, 183, 201, 93, 216, 244, 85, 92, 245, 58, 90, 133, 70, 58, 36, 154, 88, 144, 42, 185, 67, 110, 216, 141, 15, 119, 232, 177, 174, 102, 35, 141, 201, 23, 254, 61, 254, 12, 70, 156, 37, 164, 115, 154, 99, 11, 36, 226, 7, 224, 168, 109, 54, 31, 197, 54, 3, 5, 169, 51, 100, 99, 112, 72, 241, 125, 188, 18, 15, 236, 145, 162, 251, 171, 142, 252, 30, 189, 206, 225, 111, 248, 248, 30, 53, 52, 185, 145, 222, 222, 239, 136, 113, 163, 98, 105, 150, 173, 184, 217, 24, 103, 168, 70, 110, 237, 35, 106, 254, 122, 46, 249, 162, 199, 21, 99, 192, 223, 250, 118, 82, 170, 129, 65, 12, 200, 97, 205, 86, 102, 26, 165, 136, 51, 93, 21, 30, 137, 211, 19, 99, 23, 136, 85, 168, 179, 58, 48, 43, 232, 224, 27, 75, 233, 110, 95, 40, 244, 33, 151, 22, 225, 189, 81, 61, 57, 249, 187, 142, 178, 98, 149, 233, 169, 51, 81, 191, 255, 239, 128, 45, 76, 158, 184, 168, 14, 225, 187, 180, 223, 122, 228, 197, 46, 14, 146, 137, 66, 54, 153, 115, 42, 244, 88, 98, 55, 198, 53, 0, 39, 54, 32, 206, 24, 1, 113, 229, 116, 196, 68, 194, 213, 113, 145, 228, 14, 13, 178, 50, 178, 39, 34, 16, 22, 6, 224, 114, 42, 119, 213, 89, 213, 53, 23, 190, 139, 80, 175, 195, 223, 50, 25, 39, 228, 33, 72, 222, 131, 121, 216, 115, 223, 1, 50, 71, 149, 104, 42, 24, 102, 17, 226, 189, 248, 146, 149, 247, 225, 232, 139, 255, 21, 176, 190, 91, 148, 245, 193, 192, 88, 255, 87, 144, 59, 15, 60, 209, 88, 131, 53, 92, 5, 69, 85, 163, 104, 169, 44, 206, 11, 151, 148, 35, 66, 88, 61, 206, 99, 226, 128, 24, 151, 12, 43, 98, 35, 3, 251, 206, 124, 104, 223, 244, 100, 215, 203, 220, 142, 107, 140, 48, 144, 164, 250, 246, 230, 241, 65, 164, 126, 70, 209, 25, 52, 156, 214, 101, 132, 133, 7, 61, 176, 20, 194, 247, 85, 197, 4, 245, 17, 61, 27, 0, 65, 29, 199, 216, 189, 74, 207, 45, 229, 86, 73, 35, 85, 186, 152, 24, 178, 20, 202, 16, 177, 126, 148, 226, 244, 111, 11, 70, 19, 131, 33, 85, 245, 174, 24, 106, 254, 99, 123, 39, 211, 253, 42, 100, 17, 3, 205, 42, 115, 154, 226, 25, 168, 227, 200, 112, 214, 212, 254, 71, 242, 6, 23, 41, 178, 152, 76, 144, 95, 54, 247, 161, 170, 168, 49, 218, 12, 171, 5, 232, 115, 163, 144, 165, 103, 54, 59, 144, 216, 159, 220, 62, 20, 106, 14, 137, 33, 143, 57, 199, 195, 37, 3, 215, 48, 135, 172, 233, 155, 56, 72, 207, 87, 93, 109, 222, 34, 15, 73, 23, 48, 239, 81, 248, 117, 57, 155, 156, 215, 100, 35, 103, 69, 112, 95, 219, 170, 91, 58, 222, 201, 196, 52, 21, 204, 160, 223, 58, 99, 61, 27, 177, 126, 51, 47, 184, 142, 255, 26, 207, 141, 239, 125, 170, 198, 74, 187, 220, 83, 15, 66, 251, 72, 243, 95, 241, 124, 204, 72, 24, 56, 196, 27, 24, 29, 229, 98, 144, 165, 83, 24, 121, 194, 165, 229, 151, 239, 53, 202, 92, 205, 56, 219, 8, 237, 64, 98, 2, 41, 16, 138, 5, 168, 127, 123, 129, 227, 245, 214, 253, 182, 126, 153, 165, 93, 98, 85, 227, 193, 91, 4, 128, 186, 87, 209, 93, 234, 27, 118, 156, 174, 206, 239, 231, 136, 122, 232, 166, 188, 113, 104, 239, 161, 239, 75, 219, 5, 180, 234, 118, 255, 136, 157, 14, 253, 7, 6, 19, 206, 215, 200, 9, 51, 168, 88, 80, 239, 244, 47, 24, 15, 93, 160, 115, 154, 45, 118, 64, 63, 83, 70, 74, 80, 180, 17, 39, 49, 97, 135, 133, 185, 6, 202, 98, 113, 29, 138, 92, 8, 76, 17, 193, 73, 170, 170, 112, 240, 59, 41, 127, 217, 159, 72, 191, 142, 77, 19, 59, 124, 150, 156, 79, 208, 212, 116, 122, 228, 226, 135, 194, 137, 117, 233, 134, 102, 149, 208, 232, 4, 169, 254, 66, 27, 66, 88, 133, 115, 85, 83, 150, 252, 79, 22, 8, 157, 23, 148, 153, 101, 61, 40, 131, 170, 100, 52, 27, 220, 78, 91, 191, 82, 143, 75, 49, 249, 189, 154, 50, 161, 61, 7, 159, 75, 88, 171, 139, 69, 86, 113, 246, 247, 63, 108, 151, 109, 253, 177, 23, 137, 150, 119, 79, 157, 235, 246, 20, 104, 79, 200, 146, 85, 182, 116, 54, 226, 102, 218, 155, 145, 42, 217, 125, 66, 224, 134, 143, 129, 41, 221, 118, 69, 237, 6, 157, 23, 117, 203, 2, 84, 100, 125, 214, 121, 38, 142, 171, 102, 209, 10, 6, 201, 54, 202, 243, 103, 139, 186, 19, 233, 176, 125, 55, 12, 95, 86, 69, 57, 141, 143, 227, 27, 2, 196, 57, 154, 8, 44, 172, 182, 250, 45, 217, 78, 226, 112, 238, 155, 207, 57, 140, 135, 84, 59, 152, 58, 32, 93, 111, 13, 79, 141, 56, 178, 173, 82, 79, 221, 236, 12, 0, 179, 248, 127, 181, 59, 190, 239, 19, 52, 107, 202, 58, 210, 237, 248, 123, 47, 186, 47, 17, 100, 141, 112, 28, 228, 44, 86, 34, 219, 45, 153, 182, 117, 74, 183, 144, 198, 118, 195, 116, 201, 208, 108, 167, 90, 68, 151, 160, 194, 50, 173, 21, 26, 213, 173, 223, 175, 121, 127, 170, 113, 27, 248, 146, 119, 42, 74, 161, 133, 185, 102, 99, 214, 68, 207, 43, 212, 214, 201, 211, 47, 163, 79, 31, 76, 74, 216, 60, 159, 36, 65, 229, 79, 10, 30, 123, 80, 108, 75, 13, 123, 241, 183, 137, 163, 99, 186, 46, 0, 241, 214, 116, 58, 182, 86, 202, 141, 78, 177, 204, 123, 33, 154, 20, 183, 191, 47, 122, 254, 13, 153, 42, 244, 243, 6, 41, 95, 40, 125, 55, 230, 189, 18, 43, 213, 33, 92, 158, 118, 238, 143, 97, 126, 83, 53, 206, 87, 99, 125, 114, 144, 251, 30, 25, 129, 205, 239, 214, 85, 130, 252, 226, 225, 207, 214, 15, 232, 80, 29, 40, 246, 229, 210, 228, 41, 177, 197, 251, 219, 0, 93, 163, 177, 161, 146, 88, 11, 237, 47, 120, 109, 136, 205, 53, 87, 217, 224, 142, 218, 129, 81, 67, 176, 14, 47, 208, 87, 95, 188, 147, 170, 16, 53, 110, 127, 161, 199, 209, 113, 138, 53, 178, 43, 173, 87, 133, 79, 51, 158, 230, 138, 176, 114, 170, 81, 68, 41, 112, 17, 51, 26, 215, 30, 119, 172, 76, 175, 123, 69, 126, 34, 160, 212, 14, 1, 17, 5, 148, 6, 226, 24, 12, 240, 126, 7, 86, 109, 101, 58, 168, 152, 2, 116, 131, 95, 23, 4, 98, 35, 54, 182, 203, 168, 30, 84, 207, 198, 37, 119, 2, 27, 107, 205, 163, 77, 111, 8, 219, 25, 244, 62, 158, 113, 227, 67, 164, 61, 121, 78, 129, 127, 252, 144, 0, 192, 103, 193, 34, 60, 98, 28, 107, 239, 137, 46, 204, 111, 10, 210, 174, 66, 81, 223, 91, 179, 145, 154, 199, 205, 160, 139, 158, 174, 51, 233, 186, 100, 148, 239, 76, 177, 184, 164, 43, 142, 40, 80, 166, 41, 75, 136, 116, 219, 84, 105, 99, 185, 71, 83, 27, 91, 103, 123, 231, 160, 55, 5, 164, 164, 129, 209, 229, 147, 22, 151, 162, 98, 193, 97, 195, 36, 163, 29, 114, 80, 102, 70, 155, 206, 254, 14, 84, 140, 250, 46, 99, 213, 128, 66, 131, 163, 85, 31, 51, 14, 179, 37, 153, 23, 203, 227, 252, 172, 23, 207, 122, 24, 143, 228, 202, 50, 109, 27, 222, 64, 65, 4, 92, 237, 116, 58, 28, 229, 114, 55, 144, 119, 170, 66, 140, 114, 179, 208, 204, 76, 211, 143, 191, 226, 49, 28, 149, 164, 142, 215, 155, 6, 9, 30, 105, 10, 34, 56, 231, 27, 123, 40, 32, 41, 171, 32, 166, 78, 56, 56, 163, 214, 33, 46, 246, 140, 161, 166, 185, 211, 163, 79, 192, 254, 27, 19, 82, 134, 32, 95, 47, 178, 131, 40, 31, 214, 208, 197, 24, 39, 153, 179, 12, 172, 178, 13, 244, 183, 198, 161, 148, 137, 183, 6, 151, 16, 12, 206, 73, 99, 179, 145, 195, 212, 98, 50, 147, 43, 246, 9, 198, 190, 26, 17, 21, 43, 74, 48, 183, 96, 243, 34, 13, 153, 19, 218, 202, 74, 169, 71, 16, 192, 17, 218, 210, 152, 230, 97, 252, 165, 241, 235, 181, 92, 24, 167, 40, 66, 248, 167, 174, 183, 66, 250, 166, 54, 60, 103, 111, 171, 72, 83, 193, 255, 61, 77, 161, 107, 76, 109, 221, 10, 213, 62, 147, 243, 105, 113, 252, 235, 9, 29, 26, 21, 151, 228, 219, 17, 136, 80, 130, 35, 8, 118, 118, 158, 166, 133, 238, 77, 58, 155, 148, 195, 141, 120, 18, 5, 141, 230, 177, 125, 241, 236, 98, 214, 188, 115, 16, 56, 213, 148, 161, 46, 216, 201, 142, 65, 76, 213, 238, 75, 187, 243, 226, 197, 179, 225, 52, 181, 227, 47, 193, 152, 220, 43, 61, 94, 95, 248, 125, 128, 22, 213, 85, 75, 233, 163, 171, 111, 247, 149, 75, 184, 201, 93, 104, 216, 223, 70, 212, 0, 110, 46, 138, 27, 22, 132, 156, 229, 186, 12, 1, 44, 122, 92, 234, 98, 16, 125, 37, 104, 224, 24, 18, 105, 244, 6, 247, 124, 117, 207, 246, 185, 215, 223, 16, 206, 160, 85, 2, 38, 175, 75, 65, 254, 122, 83, 114, 10, 173, 148, 251, 248, 54, 175, 195, 11, 251, 121, 170, 216, 31, 30, 110, 73, 93, 55, 122, 12, 118, 41, 139, 188, 68, 151, 118, 144, 203, 82, 79, 51, 149, 233, 117, 71, 199, 45, 121, 10, 244, 212, 74, 153, 28, 209, 197, 52, 231, 226, 255, 197, 61, 122, 50, 221, 221, 104, 42, 55, 108, 119, 200, 194, 212, 156, 60, 123, 203, 164, 19, 58, 80, 253, 147, 96, 138, 57, 105, 166, 183, 181, 146, 7, 181, 135, 246, 10, 40, 151, 227, 103, 104, 57, 92, 104, 168, 106, 213, 162, 72, 162, 94, 57, 84, 138, 124, 54, 160, 164, 34, 63, 168, 37, 88, 191, 220, 5, 204, 193, 209, 108, 12, 148, 226, 140, 174, 85, 235, 162, 86, 78, 238, 141, 170, 53, 153, 31, 15, 112, 47, 50, 139, 225, 242, 191, 165, 232, 187, 24, 205, 78, 188, 40, 141, 18, 254, 188, 29, 206, 123, 78, 94, 150, 252, 39, 249, 252, 81, 220, 47, 6, 35, 55, 88, 78, 113, 169, 252, 1, 92, 116, 122, 40, 51, 148, 56, 81, 227, 215, 229, 59, 78, 16, 93, 97, 168, 51, 49, 109, 56, 83, 156, 239, 11, 133, 165, 168, 47, 15, 43, 73, 249, 36, 93, 220, 203, 222, 79, 224, 77, 154, 147, 158, 62, 52, 117, 7, 249, 70, 123, 233, 99, 53, 156, 12], + [107, 54, 162, 221, 79, 169, 5, 55, 35, 56, 20, 146, 122, 72, 104, 48, 171, 146, 115, 75, 97, 174, 213, 71, 250, 93, 48, 96, 69, 80, 116, 231, 39, 78, 7, 183, 19, 193, 162, 65, 116, 240, 74, 30, 49, 222, 210, 34, 129, 112, 144, 57, 131, 39, 235, 80, 153, 42, 102, 148, 62, 196, 209, 66, 188, 107, 16, 93, 247, 72, 250, 230, 131, 199, 131, 164, 13, 144, 80, 89, 13, 156, 25, 35, 13, 254, 7, 143, 157, 54, 172, 9, 233, 150, 39, 187, 222, 188, 94, 173, 28, 190, 20, 215, 136, 204, 254, 82, 216, 147, 71, 241, 180, 57, 129, 87, 60, 72, 97, 188, 198, 101, 35, 201, 104, 173, 207, 10, 23, 162, 229, 85, 222, 139, 111, 215, 233, 85, 45, 187, 163, 186, 41, 113, 188, 217, 128, 20, 121, 62, 140, 170, 147, 99, 126, 69, 204, 83, 95, 43, 119, 76, 84, 80, 0, 215, 244, 105, 191, 176, 92, 135, 46, 244, 50, 106, 246, 45, 107, 43, 192, 95, 64, 185, 21, 86, 217, 238, 235, 40, 223, 168, 207, 156, 129, 244, 228, 152, 26, 215, 245, 58, 112, 130, 12, 188, 52, 231, 64, 82, 123, 10, 49, 151, 126, 25, 7, 249, 226, 120, 33, 250, 30, 80, 165, 203, 0, 157, 119, 62, 82, 231, 182, 47, 247, 81, 140, 232, 226, 66, 162, 76, 127, 231, 134, 117, 43, 4, 81, 26, 104, 161, 226, 3, 219, 54, 162, 158, 142, 116, 56, 198, 111, 61, 64, 126, 202, 237, 134, 22, 196, 215, 218, 62, 158, 75, 69, 42, 33, 124, 164, 195, 26, 8, 132, 87, 7, 194, 254, 129, 103, 66, 207, 37, 164, 146, 155, 131, 245, 12, 159, 82, 73, 6, 142, 137, 216, 154, 236, 120, 44, 44, 137, 18, 242, 143, 232, 247, 146, 66, 142, 150, 230, 252, 70, 81, 32, 253, 60, 10, 156, 151, 203, 79, 104, 114, 218, 184, 159, 56, 232, 195, 29, 156, 41, 187, 154, 233, 35, 161, 62, 139, 185, 195, 27, 71, 119, 103, 50, 128, 205, 216, 65, 10, 69, 21, 223, 21, 135, 83, 239, 212, 208, 42, 106, 241, 16, 9, 241, 186, 198, 129, 146, 125, 76, 203, 83, 196, 139, 179, 164, 165, 111, 11, 231, 220, 58, 175, 213, 222, 82, 148, 237, 196, 84, 67, 225, 147, 103, 73, 252, 244, 69, 240, 80, 247, 71, 88, 16, 148, 109, 239, 7, 27, 236, 17, 105, 159, 227, 10, 211, 240, 160, 208, 175, 77, 227, 168, 78, 140, 61, 67, 65, 167, 239, 180, 20, 91, 232, 163, 7, 25, 20, 118, 196, 233, 125, 42, 239, 13, 114, 213, 138, 147, 106, 175, 172, 89, 212, 21, 32, 190, 128, 246, 12, 170, 45, 181, 220, 234, 116, 45, 242, 252, 99, 96, 32, 22, 66, 65, 207, 84, 134, 116, 13, 112, 120, 42, 115, 40, 181, 150, 225, 144, 88, 201, 251, 50, 193, 238, 27, 18, 16, 254, 185, 234, 171, 146, 199, 159, 220, 152, 157, 145, 162, 83, 228, 98, 195, 115, 153, 253, 143, 136, 172, 192, 234, 28, 152, 151, 49, 203, 88, 188, 101, 124, 139, 217, 145, 120, 187, 131, 204, 46, 45, 101, 8, 180, 218, 113, 19, 139, 159, 156, 193, 54, 187, 60, 107, 24, 220, 234, 176, 178, 153, 193, 156, 121, 92, 217, 67, 221, 157, 215, 59, 0, 15, 138, 234, 192, 88, 141, 146, 15, 100, 2, 222, 192, 27, 246, 126, 58, 129, 114, 21, 170, 166, 41, 6, 198, 233, 102, 117, 191, 183, 140, 226, 152, 170, 77, 185, 121, 55, 84, 170, 5, 43, 151, 78, 52, 55, 48, 93, 41, 150, 220, 122, 204, 227, 200, 98, 150, 126, 207, 112, 130, 178, 254, 206, 62, 38, 178, 44, 247, 251, 17, 206, 107, 60, 9, 196, 158, 154, 29, 119, 15, 198, 231, 76, 9, 106, 244, 128, 22, 21, 255, 129, 85, 248, 225, 97, 189, 54, 144, 2, 192, 42, 157, 78, 81, 17, 230, 110, 52, 38, 122, 179, 209, 34, 75, 251, 181, 228, 76, 220, 156, 160, 28, 240, 23, 115, 154, 15, 135, 243, 204, 207, 125, 146, 98, 174, 176, 107, 120, 60, 170, 110, 251, 50, 122, 135, 93, 192, 188, 160, 16, 107, 186, 206, 3, 117, 157, 192, 87, 44, 238, 48, 57, 138, 32, 38, 246, 146, 80, 170, 84, 161, 58, 15, 180, 146, 126, 24, 128, 115, 14, 38, 12, 133, 75, 36, 56, 233, 29, 74, 43, 96, 104, 17, 123, 253, 152, 27, 48, 243, 240, 59, 57, 242, 245, 93, 147, 125, 122, 119, 139, 59, 3, 0, 106, 106, 38, 86, 127, 129, 1, 55, 176, 130, 144, 0, 82, 144, 178, 4, 37, 110, 95, 97, 214, 208, 29, 245, 67, 254, 213, 63, 232, 147, 89, 53, 239, 116, 248, 34, 253, 192, 30, 155, 13, 230, 122, 229, 236, 66, 213, 147, 130, 151, 194, 26, 48, 17, 197, 172, 70, 54, 137, 230, 229, 213, 170, 153, 156, 237, 137, 183, 97, 213, 36, 14, 248, 70, 225, 172, 79, 200, 16, 184, 98, 239, 153, 9, 64, 251, 253, 52, 167, 41, 1, 180, 124, 183, 99, 108, 97, 151, 52, 188, 55, 9, 245, 221, 15, 134, 231, 1, 134, 92, 232, 152, 195, 99, 42, 12, 188, 108, 43, 44, 238, 7, 220, 172, 31, 16, 97, 155, 249, 179, 17, 126, 167, 77, 193, 0, 159, 217, 120, 235, 1, 105, 23, 155, 196, 41, 18, 28, 249, 134, 177, 237, 48, 32, 70, 162, 110, 157, 39, 186, 143, 126, 156, 245, 205, 81, 41, 114, 75, 150, 88, 17, 237, 170, 87, 145, 135, 96, 170, 61, 206, 175, 19, 221, 201, 67, 2, 31, 199, 96, 223, 195, 20, 47, 181, 30, 231, 218, 183, 68, 36, 176, 197, 26, 154, 57, 50, 153, 135, 204, 247, 188, 229, 146, 196, 43, 190, 239, 193, 236, 212, 232, 216, 25, 2, 68, 18, 227, 59, 104, 68, 156, 8, 170, 75, 102, 180, 248, 29, 17, 118, 46, 247, 76, 76, 208, 15, 207, 171, 233, 90, 145, 146, 177, 97, 149, 110, 15, 34, 159, 246, 56, 165, 250, 174, 158, 169, 6, 20, 134, 74, 174, 29, 16, 1, 60, 8, 8, 90, 117, 92, 47, 112, 210, 150, 254, 6, 37, 139, 151, 11, 245, 188, 57, 198, 26, 126, 159, 56, 70, 137, 243, 66, 125, 33, 150, 147, 170, 138, 225, 202, 30, 21, 225, 23, 244, 186, 178, 213, 124, 79, 34, 38, 135, 176, 143, 108, 204, 28, 123, 210, 42, 244, 245, 203, 13, 101, 61, 198, 115, 128, 195, 130, 188, 160, 212, 199, 241, 49, 20, 92, 126, 90, 116, 6, 171, 71, 7, 228, 115, 183, 66, 6, 61, 47, 105, 145, 160, 152, 124, 109, 177, 33, 184, 30, 57, 171, 8, 93, 187, 209, 247, 81, 164, 72, 80, 8, 198, 128, 76, 26, 151, 82, 231, 198, 1, 72, 1, 147, 39, 185, 219, 206, 88, 96, 115, 75, 136, 117, 55, 1, 199, 234, 54, 14, 248, 79, 248, 181, 193, 74, 124, 18, 29, 40, 88, 33, 52, 138, 183, 226, 78, 207, 198, 109, 197, 43, 186, 166, 253, 103, 149, 180, 201, 118, 27, 229, 214, 217, 242, 139, 52, 198, 140, 132, 30, 210, 246, 178, 154, 144, 90, 32, 94, 56, 100, 38, 139, 35, 107, 98, 208, 102, 186, 95, 14, 100, 144, 233, 60, 162, 35, 141, 196, 18, 86, 81, 24, 57, 79, 130, 35, 185, 175, 120, 25, 239, 224, 81, 14, 55, 115, 121, 48, 23, 251, 59, 229, 45, 241, 139, 75, 141, 241, 182, 3, 249, 60, 175, 27, 180, 214, 170, 224, 171, 30, 6, 122, 98, 195, 44, 226, 136, 55, 47, 36, 82, 183, 206, 171, 201, 158, 61, 26, 12, 34, 243, 25, 150, 135, 9, 161, 248, 213, 67, 184, 195, 137, 223, 225, 43, 116, 167, 254, 176, 189, 165, 234, 177, 107, 170, 230, 213, 161, 8, 255, 183, 31, 131, 203, 6, 226, 120, 88, 86, 123, 157, 219, 208, 113, 122, 154, 194, 140, 211, 53, 207, 163, 57, 95, 141, 205, 77, 172, 20, 244, 181, 40, 77, 190, 1, 146, 169, 137, 240, 225, 122, 194, 119, 141, 163, 185, 67, 147, 5, 152, 184, 126, 43, 184, 101, 110, 169, 242, 3, 144, 112, 83, 108, 173, 254, 147, 84, 3, 234, 178, 215, 4, 164, 180, 188, 90, 221, 8, 83, 214, 57, 57, 48, 188, 170, 57, 81, 174, 167, 192, 209, 102, 145, 76, 172, 185, 119, 162, 102, 112, 76, 29, 130, 40, 103, 14, 255, 15, 53, 150, 80, 248, 10, 22, 146, 57, 45, 114, 76, 148, 46, 242, 142, 210, 255, 82, 220, 72, 212, 117, 152, 248, 153, 253, 141, 219, 236, 217, 162, 208, 27, 140, 100, 123, 138, 231, 156, 149, 189, 115, 110, 234, 199, 239, 249, 22, 17, 148, 105, 105, 156, 27, 106, 84, 198, 12, 51, 150, 196, 240, 142, 140, 208, 71, 150, 219, 42, 150, 79, 220, 230, 217, 112, 133, 239, 95, 207, 131, 226, 217, 50, 75, 91, 37, 227, 69, 116, 212, 253, 100, 46, 238, 27, 135, 87, 45, 28, 12, 74, 16, 179, 117, 86, 86, 34, 14, 181, 222, 136, 3, 28, 9, 70, 128, 114, 23, 252, 176, 165, 81, 116, 60, 143, 33, 133, 145, 61, 250, 20, 90, 2, 99, 131, 85, 16, 67, 248, 230, 97, 167, 205, 126, 40, 155, 15, 99, 224, 77, 246, 10, 123, 175, 130, 22, 178, 24, 232, 227, 77, 145, 88, 84, 216, 121, 2, 74, 16, 112, 177, 195, 35, 113, 135, 36, 224, 103, 179, 10, 59, 88, 65, 72, 30, 184, 160, 161, 93, 44, 33, 38, 189, 134, 54, 138, 193, 113, 218, 203, 240, 114, 89, 126, 131, 16, 230, 70, 92, 142, 101, 240, 91, 152, 131, 52, 171, 100, 239, 37, 59, 183, 37, 232, 208, 11, 245, 228, 151, 144, 80, 55, 177, 255, 107, 0, 138, 98, 178, 226, 147, 235, 86, 115, 42, 111, 143, 112, 242, 179, 234, 97, 79, 228, 175, 117, 28, 164, 83, 39, 163, 64, 66, 144, 32, 223, 123, 252, 134, 223, 79, 51, 193, 144, 3, 214, 79, 123, 153, 210, 27, 131, 144, 164, 87, 62, 52, 12, 100, 231, 101, 15, 19, 12, 250, 56, 100, 135, 194, 70, 106, 183, 86, 120, 183, 237, 84, 113, 52, 143, 236, 230, 59, 118, 66, 214, 99, 177, 41, 120, 98, 187, 88, 50, 247, 228, 199, 232, 36, 217, 4, 105, 184, 174, 43, 111, 24, 154, 89, 207, 177, 85, 231, 242, 111, 126, 89, 188, 9, 4, 79, 209, 157, 181, 84, 20, 174, 37, 254, 56, 52, 229, 90, 51, 170, 7, 177, 152, 167, 14, 29, 221, 31, 57, 252, 125, 86, 208, 210, 78, 129, 80, 50, 119, 217, 10, 188, 139, 98, 102, 49, 181, 84, 218, 59, 162, 116, 25, 62, 43, 129, 27, 168, 229, 83, 20, 149, 155, 53, 190, 216, 42, 14, 40, 43, 189, 185, 27, 198, 129, 215, 63, 2, 25, 208, 2, 242, 218, 179, 209, 227, 66, 178, 209, 228, 144, 164, 122, 214, 248, 40, 215, 199, 214, 163, 223, 231, 56, 184, 197, 168, 218, 176, 240, 82, 143, 249, 128, 152, 142, 179, 114, 209, 97, 29, 201, 62, 88, 126, 143, 116, 206, 180, 214, 57, 61, 236, 154, 163, 68, 108, 44, 213, 149, 216, 117, 195, 98, 228, 99, 224, 73, 184, 45, 111, 233, 207, 173, 102, 147, 54, 222, 17, 121, 159, 166, 215, 159, 240, 128, 93, 255, 230, 59, 104, 10, 184, 57, 30, 17, 232, 129, 30, 11, 240, 109, 135, 119, 208, 212, 83, 135, 100, 13, 255, 24, 147, 26, 236, 12, 226, 89, 223, 239, 74, 86, 201, 74, 38, 236, 43, 37, 251, 2, 180, 113, 12, 22, 6, 4, 239, 213, 36, 241, 114, 228, 1, 78, 110, 48, 20, 42, 82, 122, 228, 128, 51, 180, 28, 135, 39, 183, 185, 34, 107, 116, 76, 92, 37, 11, 175, 41, 198, 189, 57, 15, 54, 92, 20, 72, 96, 31, 136, 221, 8, 52, 174, 108, 10, 200, 87, 148, 118, 225, 205, 54, 245, 195, 127, 79, 221, 131, 200, 58, 246, 148, 225, 111, 2, 221, 122, 7, 57, 226, 219, 17, 235, 203, 60, 43, 85, 8, 213, 77, 126, 154, 241, 5, 188, 109, 217, 4, 46, 62, 74, 163, 173, 3, 93, 14, 43, 216, 39, 250, 170, 39, 252, 3, 146, 142, 190, 70, 142, 255, 252, 53, 41, 140, 12, 63, 94, 246, 200, 97, 185, 183, 211, 245, 49, 85, 83, 0, 120, 238, 174, 131, 33, 11, 114, 75, 4, 97, 126, 133, 146, 123, 235, 34, 133, 201, 197, 184, 98, 0, 3, 237, 221, 125, 96, 242, 200, 53, 93, 199, 41, 69, 64, 130, 88, 123, 57, 26, 181, 72, 192, 155, 254, 247, 52, 91, 58, 214, 107, 130, 51, 58, 250, 151, 155, 170, 31, 248, 217, 43, 151, 195, 226, 137, 32, 133, 204, 53, 19, 192, 45, 70, 189, 124, 142, 204, 19, 16, 170, 90, 112, 141, 236, 133, 237, 135, 104, 143, 101, 90, 247, 60, 233, 91, 63, 116, 134, 143, 66, 15, 229, 97, 165, 2, 52, 158, 68, 87, 247, 8, 95, 202, 7, 78, 127, 75, 20, 166, 136, 116, 42, 4, 192, 128, 254, 247, 90, 8, 88, 121, 130, 63, 151, 60, 254, 37, 28, 231, 138, 185, 176, 193, 58, 79, 52, 175, 25, 198, 162, 247, 120, 208, 190, 172, 191, 14, 211, 208, 127, 166, 172, 18, 15, 150, 148, 21, 171, 165, 52, 78, 115, 129, 113, 228, 143, 155, 42, 4, 11, 213, 13, 246, 117, 172, 182, 247, 241, 153, 80, 3, 245, 228, 44, 124, 201, 181, 246, 207, 216, 119, 108, 244, 92, 51, 235, 33, 92, 219, 229, 193, 158, 63, 85, 135, 145, 134, 71, 111, 188, 182, 111, 63, 211, 0, 76, 203, 135, 110, 199, 122, 147, 34, 161, 86, 113, 211, 66, 2, 65, 110, 170, 64, 215, 171, 236, 50, 236, 191, 76, 217, 23, 59, 126, 148, 190, 149, 77, 161, 209, 231, 215, 42, 21, 169, 74, 254, 21, 125, 150, 127, 165, 67, 223, 181, 22, 234, 98, 122, 104, 53, 134, 166, 204, 9, 14, 142, 62, 232, 212, 253, 202, 12, 184, 19, 28, 89, 67, 47, 142, 157, 54, 74, 143, 88, 34, 43, 166, 146, 245, 143, 253, 120, 160, 52, 180, 76, 27, 70, 154, 82, 63, 142, 3, 20, 165, 207, 19, 193, 81, 42, 236, 38, 118, 93, 252, 150, 243, 26, 20, 131, 1, 46, 109, 62, 7, 130, 160, 196, 181, 53, 197, 251, 170, 123, 41, 117, 81, 20, 233, 249, 33, 42, 27, 39, 253, 120, 78, 240, 72, 20, 143, 43, 120, 56, 151, 111, 81, 4, 24, 109, 57, 95, 87, 121, 173, 220, 9, 114, 239, 51, 221, 180, 186, 251, 235, 234, 227, 30, 136, 191, 22, 199, 112, 64, 93, 146, 139, 68, 242, 33, 93, 44, 170, 247, 244, 47, 179, 214, 21, 62, 10, 78, 69, 94, 92, 242, 171, 104, 250, 232, 13, 84, 132, 242, 193, 57, 59, 238, 170, 157, 250, 38, 20, 12, 229, 120, 146, 140, 13, 85, 186, 174, 205, 114, 238, 123, 135, 6, 174, 3, 166, 145, 23, 200, 81, 232, 217, 31, 102, 114, 205, 19, 68, 249, 50, 152, 94, 97, 140, 200, 97, 134, 14, 110, 116, 17, 23, 79, 127, 219, 165, 148, 50, 105, 227, 246, 220, 158, 244, 193, 83, 157, 6, 88, 185, 68, 109, 70, 38, 30, 125, 39, 158, 85, 113, 19, 130, 92, 182, 20, 103, 85, 133, 19, 148, 220, 162, 99, 225, 88, 218, 174, 2, 162, 67, 234, 93, 84, 212, 100, 172, 252, 255, 116, 86, 245, 35, 172, 28, 172, 253, 210, 216, 38, 24, 53, 127, 115, 174, 15, 177, 84, 96, 81, 21, 65, 217, 90, 12, 163, 66, 17, 0, 106, 161, 141, 100, 222, 173, 20, 72, 11, 180, 23, 79, 231, 176, 222, 22, 110, 126, 136, 40, 102, 222, 44, 205, 51, 184, 91, 221, 150, 133, 55, 39, 198, 57, 244, 241, 226, 117, 213, 151, 158, 201, 123, 19, 145, 141, 48, 122, 108, 222, 232, 253, 85, 37, 67, 25, 198, 202, 47, 45, 59, 182, 82, 253, 101, 215, 246, 94, 171, 98, 163, 203, 163, 89, 225, 184, 232, 34, 107, 110, 253, 98, 0, 181, 215, 87, 3, 33, 86, 86, 89, 203, 66, 14, 120, 219, 211, 150, 176, 106, 113, 126, 146, 191, 27, 214, 132, 229, 181, 87, 53, 103, 252, 152, 45, 169, 97, 227, 105, 252, 90, 245, 68, 44, 226, 25, 24, 191, 113, 206, 230, 59, 61, 195, 55, 109, 144, 148, 53, 34, 165, 8, 228, 126, 174, 167, 178, 187, 178, 65, 235, 19, 178, 229, 99, 105, 35, 96, 36, 68, 150, 164, 159, 196, 86, 254, 208, 127, 128, 212, 80, 224, 155, 30, 152, 249, 119, 234, 10, 129, 220, 117, 83, 203, 48, 130, 233, 130, 34, 92, 119, 2, 133, 138, 225, 210, 34, 158, 111, 173, 52, 248, 161, 247, 216, 69, 20, 255, 102, 199, 152, 236, 31, 121, 171, 53, 65, 66, 169, 205, 140, 94, 108, 210, 109, 142, 169, 118, 217, 9, 137, 40, 136, 143, 88, 5, 197, 31, 22, 70, 4, 168, 44, 151, 182, 95, 198, 255, 100, 147, 11, 133, 96, 30, 149, 194, 234, 36, 84, 244, 18, 212, 57, 222, 14, 164, 117, 244, 236, 172, 12, 106, 201, 230, 158, 64, 126, 190, 194, 209, 16, 194, 159, 87, 232, 151, 220, 162, 46, 113, 223, 187, 11, 131, 0, 153, 20, 165, 128, 227, 65, 113, 128, 174, 151, 44, 34, 202, 137, 28, 150, 10, 7, 24, 195, 23, 58, 143, 34, 174, 142, 127, 88, 241, 42, 85, 204, 67, 183, 74, 18, 75, 238, 32, 123, 105, 37, 218, 68, 252, 221, 184, 215, 104, 189, 58, 71, 119, 128, 151, 10, 127, 22, 252, 67, 255, 31, 236, 13, 143, 167, 39, 238, 91, 38, 28, 1, 171, 243, 213, 94, 16, 251, 47, 95, 203, 159, 84, 132, 201, 39, 121, 129, 107, 126, 235, 126, 22, 175, 63, 220, 214, 67, 19, 64, 245, 184, 205, 123, 132, 30, 172, 31, 23, 186, 44, 61, 208, 61, 216, 91, 126, 217, 105, 171, 72, 103, 164, 212, 90, 44, 84, 87, 181, 64, 91, 4, 88, 206, 211, 252, 70, 95, 242, 160, 78, 103, 116, 78, 193, 250, 111, 91, 36, 85, 48, 149, 14, 142, 183, 105, 88, 132, 102, 14, 120, 119, 44, 51, 46, 52, 200, 220, 41, 32, 16, 219, 203, 97, 42, 201, 140, 202, 137, 227, 160, 255, 113, 188, 200, 69, 173, 215, 68, 35, 137, 254, 206, 244, 147, 3, 89, 69, 89, 14, 204, 60, 150, 3, 54, 153, 44, 215, 141, 78, 46, 26, 60, 58, 236, 86, 185, 143, 59, 51, 127, 229, 179, 59, 9, 33, 72, 69, 86, 113, 124, 109, 75, 61, 156, 51, 69, 145, 137, 51, 85, 125, 166, 188, 245, 212, 236, 181, 98, 163, 16, 72, 52, 49, 71, 168, 170, 116, 54, 142, 62, 208, 87, 122, 29, 156, 103, 216, 224, 220, 52, 190, 79, 186, 83, 43, 205, 250, 1, 142, 2, 7, 194, 109, 170, 162, 98, 212, 151, 188, 110, 94, 55, 155, 145, 176, 120, 93, 70, 55, 236, 139, 43, 181, 100, 175, 159, 6, 251, 201, 84, 220, 191, 207, 64, 198, 120, 171, 95, 153, 115, 150, 147, 184, 189, 107, 194, 153, 5, 120, 86, 134, 20, 150, 133, 196, 149, 183, 156, 89, 224, 240, 216, 197, 45, 33, 45, 112, 7, 41, 193, 238, 36, 207, 239, 57, 58, 198, 21, 249, 129, 176, 8, 159, 12, 147, 217, 33, 23, 51, 51, 154, 215, 146, 248, 230, 112, 36, 153, 69, 112, 156, 133, 147, 213, 36, 135, 242, 45, 124, 159, 198, 54, 160, 31, 178, 67, 69, 146, 254, 149, 219, 76, 229, 207, 152, 17, 129, 11, 119, 6, 108, 74, 119, 96, 171, 41, 238, 16, 108, 104, 30, 24, 1, 112, 133, 71, 86, 144, 93, 241, 8, 82, 144, 93, 98, 81, 45, 178, 251, 31, 12, 27, 165, 35, 199, 182, 13, 171, 42, 28, 142, 83, 31, 39, 229, 186, 164, 59, 139, 56, 79, 185, 187, 254, 123, 47, 144, 120, 133, 115, 109, 237, 150, 32, 139, 87, 114, 252, 188, 222, 105, 202, 183, 185, 60, 108, 138, 161, 247, 203, 83, 133, 210, 162, 176, 224, 136, 45, 150, 247, 216, 19, 122, 146, 148, 221, 93, 97, 150, 5, 152, 30, 217, 249, 93, 51, 4, 163, 199, 19, 134, 177, 64, 71, 87, 71, 224, 104, 19, 98, 106, 213, 25, 167, 159, 91, 27, 125, 248, 157, 171, 91, 36, 74, 53, 156, 6, 206, 76, 52, 78, 69, 53, 221, 98, 140, 222, 238, 241, 88, 1, 237, 137, 52, 106, 191, 167, 144, 66, 24, 63, 124, 238, 249, 152, 1, 41, 243, 111, 157, 142, 235, 17, 207, 15, 103, 168, 1, 164, 213, 114, 90, 239, 181, 51, 249, 36, 127, 214, 58, 229, 157, 198, 147, 189, 0, 15, 138, 69, 146, 71, 123, 226, 16, 116, 140, 140, 232, 70, 171, 181, 234, 1, 153, 18, 74, 107, 69, 215, 197, 50, 90, 192, 21, 8, 243, 47, 139, 13, 76, 158, 31, 183, 109, 28, 70, 59, 252, 92, 186, 169, 8, 191, 126, 79, 133, 67, 105, 116, 196, 118, 137, 57, 225, 219, 102, 179, 4, 218, 42, 127, 44, 166, 26, 127, 156, 39, 17, 232, 254, 110, 32, 201, 231, 109, 231, 237, 131, 30, 190, 63, 237, 123, 138, 18, 14, 105, 74, 178, 125, 126, 83, 154, 221, 68, 158, 185, 137, 237, 247, 230, 59, 65, 61, 154, 160, 32, 188, 173, 50, 121, 253, 187, 57, 33, 52, 152, 51, 150, 9, 141, 9, 86, 253, 161, 121, 213, 242, 97, 4, 226, 92, 130, 249, 83, 109, 37, 56, 234, 235, 251, 12, 144, 9, 53, 140, 77, 29, 78, 159, 123, 184, 160, 25, 238, 167, 113, 21, 56, 164, 161, 191, 96, 197, 85, 118, 40, 74, 19, 195, 30, 200, 134, 156, 103, 31, 170, 100, 49, 180, 208, 134, 57, 21, 114, 245, 93, 217, 84, 31, 199, 17, 114, 115, 230, 105, 214, 219, 66, 53, 255, 8, 16, 70, 153, 23, 199, 51, 112, 89, 186, 121, 171, 126, 166, 21, 127, 154, 244, 171, 130, 211, 50, 140, 206, 204, 211, 167, 128, 168, 56, 77, 57, 98, 241, 174, 6, 225, 167, 87, 165, 187, 47, 153, 77, 73, 229, 45, 0, 14, 157, 202, 32, 153, 205, 142, 17, 125, 118, 114, 2, 47, 157, 198, 54, 247, 6, 202, 203, 68, 255, 103, 34, 17, 148, 234, 84, 34, 67, 194, 72, 220, 172, 12, 29, 81, 11, 51, 11, 40, 46, 230, 208, 214, 65, 4, 244, 252, 122, 136, 133, 255, 175, 87, 204, 10, 136, 160, 41, 67, 167, 85, 213, 37, 210, 14, 116, 179, 190, 45, 46, 52, 157, 3, 98, 222, 138, 101, 73, 111, 213, 9, 172, 56, 233, 82, 53, 56, 223, 40, 204, 239, 51, 1, 219, 127, 246, 123, 160, 56, 42, 69, 140, 36, 68, 36, 86, 60, 52, 172, 110, 191, 244, 62, 65, 191, 121, 216, 168, 33, 61, 230, 110, 107, 242, 239, 250, 202, 19, 77, 203, 175, 214, 165, 22, 147, 80, 67, 54, 27, 244, 155, 243, 152, 213, 241, 215, 158, 187, 199, 94, 238, 56, 207, 225, 22, 162, 86, 93, 247, 113, 174, 244, 102, 142, 252, 145, 35, 210, 118, 41, 171, 28, 204, 246, 115, 118, 110, 89, 76, 184, 31, 49, 12, 135, 228, 11, 132, 7, 157, 196, 19, 202, 171, 140, 34, 20, 233, 2, 110, 114, 166, 171, 249, 33, 88, 80, 181, 60, 50, 25, 60, 189, 189, 8, 156, 214, 35, 156, 135, 237, 104, 253, 213, 207, 92, 125, 63, 227, 48, 5, 171, 7, 177, 254, 127, 89, 159, 104, 132, 63, 147, 8, 195, 145, 3, 51, 195, 24, 213, 11, 196, 29, 238, 200, 55, 236, 39, 250, 218, 168, 148, 26, 179, 83, 231, 88, 82, 177, 37, 111, 129, 187, 127, 32, 78, 170, 71, 42, 168, 188, 37, 40, 58, 48, 52, 121, 35, 156, 163, 180, 54, 119, 102, 7, 0, 164, 210, 190, 204, 24, 67, 47, 20, 33, 39, 223, 238, 207, 37, 30, 156, 15, 130, 40, 63, 125, 254, 178, 198, 2, 164, 93, 207, 133, 68, 2, 199, 73, 25, 27, 216, 68, 36, 11, 125, 232, 131, 133, 32, 21, 238, 177, 104, 239, 145, 12, 217, 179, 16, 103, 16, 60, 59, 208, 9, 84, 238, 61, 86, 11, 213, 35, 185, 239, 67, 166, 90, 163, 148, 64, 145, 143, 235, 105, 144, 253, 5, 94, 19, 183, 230, 51, 103, 7, 255, 127, 71, 210, 156, 198, 36, 90, 28, 84, 36, 72, 133, 67, 127, 44, 232, 218, 107, 153, 65, 74, 83, 160, 228, 239, 57, 218, 7, 182, 45, 27, 194, 82, 94, 90, 137, 184, 66, 204, 252, 60, 164, 221, 60, 254, 89, 243, 210, 131, 118, 94, 250, 56, 75, 120, 29, 15, 208, 139, 212, 202, 22, 239, 109, 246, 237, 1, 22, 179, 218, 71, 43, 145, 136, 159, 115, 162, 250, 12, 250, 16, 116, 105, 170, 233, 53, 71, 66, 186, 107, 108, 115, 158, 136, 4, 82, 158, 3, 6, 233, 240, 101, 39, 98, 38, 133, 219, 173, 201, 171, 132, 157, 12, 213, 9, 199, 253, 184, 161, 203, 134, 112, 41, 122, 157, 224, 54, 152, 235, 86, 26, 45, 238, 93, 90, 242, 25, 243, 159, 239, 22, 251, 19, 92, 111, 67, 225, 4, 44, 85, 111, 164, 104, 75, 218, 19, 226, 144, 131, 136, 190, 92, 210, 49, 103, 179, 177, 74, 153, 227, 64, 165, 74, 194, 177, 83, 139, 217, 232, 70, 148, 121, 132, 178, 172, 84, 25, 54, 41, 231, 10, 4, 152, 120, 166, 96, 76, 25, 49, 223, 172, 223, 66, 109, 130, 218, 200, 124, 233, 149, 246, 24, 105, 244, 177, 4, 128, 154, 54, 49, 64, 31, 72, 121, 186, 170, 205, 18, 105, 191, 168, 159, 93, 57, 99, 93, 54, 124, 148, 117, 248, 192, 66, 110, 13, 36, 28, 155, 251, 197, 153, 87, 223, 17, 166, 7, 121, 208, 108, 126, 39, 118, 124, 233, 125, 63, 162, 180, 227, 28, 25, 92, 97, 148, 147, 27, 222, 255, 158, 142, 255, 204, 155, 19, 243, 220, 47, 37, 77, 217, 187, 195, 7, 187, 110, 191, 144, 111, 220, 173, 114, 17, 212, 73, 222, 185, 244, 155, 158, 146, 130, 163, 158, 109, 152, 245, 118, 81, 232, 39, 21, 219, 72, 133, 51, 51, 71, 33, 46, 124, 24, 146, 92, 213, 222, 141, 27, 151, 222, 148, 152, 45, 169, 79, 6, 39, 117, 122, 213, 134, 130, 141, 95, 169, 108, 144, 185, 28, 124, 170, 77, 90, 196, 46, 182, 70, 242, 167, 255, 81, 143, 129, 132, 131, 223, 61, 132, 236, 66, 61, 44, 250, 160, 241, 21, 113, 177, 201, 217, 61, 51, 61, 239, 81, 228, 112, 105, 80, 139, 187, 147, 235, 171, 37, 186, 80, 5, 142, 12, 195, 107, 123, 173, 49, 110, 110, 105, 105, 234, 51, 135, 81, 149, 148, 172, 208, 214, 52, 117, 47, 167, 62, 169, 59, 180, 109, 245, 63, 27, 120, 252, 177, 25, 133, 24, 52, 94, 64, 108, 196, 123, 246, 164, 112, 245, 112, 114, 174, 216, 37, 150, 141, 211, 66, 96, 71, 31, 243, 248, 206, 234, 120, 156, 197, 75, 168, 85, 6, 191, 138, 93, 54, 219, 249, 239, 14, 20, 43, 127, 161, 189, 3, 168, 52, 251, 200, 20, 173, 236, 126, 200, 217, 36, 131, 255, 15, 213, 239, 232, 235, 194, 205, 115, 118, 111, 151, 83, 234, 169, 118, 182, 211, 255, 180, 210, 71, 83, 85, 97, 100, 38, 70, 217, 192, 96, 59, 131, 185, 192, 125, 240, 205, 149, 159, 63, 141, 190, 220, 49, 137, 6, 46, 180, 226, 18, 85, 70, 85, 145, 25, 156, 80, 155, 82, 59, 0, 19, 217, 186, 41, 13, 141, 73, 71, 214, 104, 59, 194, 176, 61, 33, 247, 201, 99, 166, 49, 84, 239, 16, 16, 97, 231, 146, 37, 218, 202, 114, 122, 172, 91, 234, 38, 61, 100, 38, 191, 135, 97, 142, 208, 237, 150, 70, 185, 241, 164, 20, 100, 173, 207, 182, 105, 3, 141, 187, 182, 48, 115, 236, 196, 40, 144, 73, 120, 91, 46, 195, 169, 170, 85, 163, 86, 171, 37, 149, 183, 235, 224, 168, 57, 198, 145, 220, 65, 24, 209, 135, 246, 187, 77, 58, 32, 98, 113, 164, 164, 129, 155, 225, 112, 203, 160, 106, 101, 107, 182, 198, 114, 215, 9, 166, 186, 33, 181, 124, 78, 76, 25, 198, 64, 162, 22, 61, 18, 31, 46, 41, 85, 74, 122, 101, 131, 57, 174, 155, 252, 3, 132, 216, 50, 80, 115, 20, 148, 150, 46, 202, 204, 198, 229, 156, 133, 69, 24, 134, 33, 210, 3, 79, 197, 96, 216, 178, 176, 176, 79, 30, 96, 18, 213, 131, 149, 75, 255, 142, 178, 219, 165, 61, 184, 65, 99, 159, 89, 39, 74, 48, 91, 7, 28, 117, 200, 116, 174, 101, 32, 87, 190, 230, 50, 56, 205, 144, 155, 197, 55, 102, 150, 217, 78, 6, 55, 166, 244, 161, 2, 90, 202, 237, 46, 233, 53, 74, 224, 30, 72, 14, 38, 155, 48, 81, 144, 141, 199, 79, 129, 113, 2, 41, 219, 179, 111, 47, 247, 183, 132, 221, 150, 179, 249, 227, 29, 98, 96, 53, 127, 90, 183, 188, 130, 89, 20, 59, 24, 137, 186, 155, 69, 71, 49, 33, 32, 42, 26, 95, 237, 34, 38, 165, 179, 102, 78, 27, 80, 10, 204, 196, 252, 249, 36, 41, 83, 126, 209, 233, 8, 12, 243, 47, 146, 172, 139, 118, 67, 175, 179, 26, 225, 238, 252, 135, 168, 71, 141, 135, 41, 216, 121, 34, 95, 190, 126, 203, 193, 102, 39, 189, 255, 79, 228, 224, 47, 181, 37, 13, 67, 43, 144, 202, 215, 170, 214, 221, 83, 243, 255, 245, 217, 235, 235, 121, 156, 21, 3, 126, 43, 218, 19, 138, 243, 74, 60, 76, 13, 124, 119, 77, 30, 198, 32, 215, 6, 129, 157, 77, 41, 57, 121, 107, 33, 190, 138, 24, 84, 46, 218, 152, 158, 216, 247, 52, 75, 148, 243, 73, 248, 131, 150, 21, 202, 246, 136, 151, 128, 89, 187, 225, 33, 191, 88, 171, 71, 52, 174, 247, 206, 124, 87, 81, 236, 239, 8, 40, 58, 235, 38, 60, 82, 127, 5, 129, 78, 193, 180, 73, 195, 235, 71, 206, 225, 55, 0, 169, 166, 218, 171, 227, 223, 206, 244, 7, 175, 23, 47, 112, 74, 57, 187, 147, 73, 157, 208, 81, 52, 195, 202, 58, 30, 185, 255, 200, 142, 73, 35, 8, 81, 56, 83, 37, 37, 136, 159, 149, 191, 223, 43, 61, 83, 163, 188, 54, 73, 248, 53, 106, 100, 128, 73, 37, 58, 89, 143, 205, 2, 232, 59, 101, 133, 207, 239, 212, 70, 241, 228, 143, 119, 71, 223, 134, 183, 189, 99, 28, 69, 84, 17, 232, 51, 163, 107, 134, 242, 168, 214, 63, 149, 221, 72, 76, 131, 4, 40, 160, 160, 142, 88, 39, 202, 188, 25, 59, 6, 69, 68, 235, 36, 164, 101, 41, 240, 8, 52, 172, 184, 51, 89, 244, 162, 36, 254, 182, 203, 122, 123, 223, 105, 142, 172, 27, 106, 108, 112, 54, 67, 200, 198, 30, 190, 107, 229, 107, 116, 133, 7, 217, 136, 174, 81, 7, 36, 210, 34, 98, 192, 228, 57, 237, 12, 152, 108, 10, 63, 98, 93, 60, 93, 89, 31, 161, 253, 126, 96, 161, 151, 99, 216, 153, 238, 55, 92, 242, 64, 223, 48, 214, 125, 243, 189, 216, 70, 62, 67, 8, 56, 2, 81, 32, 81, 166, 147, 22, 232, 229, 22, 215, 51, 255, 126, 112, 147, 81, 236, 15, 123, 128, 74, 237, 9, 23, 100, 241, 249, 168, 189, 210, 79, 97, 146, 162, 21, 14, 62, 166, 105, 210, 73, 48, 237, 93, 27, 194, 180, 39, 210, 79, 36, 73, 5, 112, 20, 52, 116, 98, 28, 12, 134, 38, 122, 64, 255, 72, 195, 236, 121, 63, 100, 171, 200, 163, 200, 212, 127, 59, 223, 206, 164, 152, 74, 51, 170, 155, 239, 30, 211, 15, 246, 230, 196, 23, 11, 25, 90, 210, 182, 108, 47, 105, 178, 21, 206, 197, 21, 224, 179, 160, 222, 161, 218, 215, 26, 139, 64, 54, 248, 7, 42, 149, 241, 157, 69, 218, 213, 227, 163, 29, 120, 110, 97, 161, 246, 210, 164, 171, 11, 202, 219, 156, 50, 62, 225, 229, 97, 242, 96, 164, 185, 150, 71, 182, 205, 248, 97, 180, 163, 45, 70, 106, 226, 78, 183, 102, 196, 18, 228, 10, 57, 119, 151, 87, 99, 94, 160, 156, 240, 247, 116, 40, 147, 121, 162, 198, 114, 149, 66, 68, 130, 14, 171, 93, 78, 120, 103, 117, 189, 81, 160, 224, 248, 140, 13, 25, 53, 151, 184, 149, 231, 101, 153, 142, 166, 26, 174, 81, 79, 108, 65, 3, 216, 59, 189, 132, 237, 66, 120, 194, 207, 201, 213, 208, 90, 233, 229, 178, 210, 252, 120, 142, 62, 121, 117, 115, 12, 6, 209, 16, 135, 52, 147, 172, 11, 36, 212, 12, 157, 22, 8, 232, 20, 82, 178, 231, 99, 161, 230, 159, 114, 44, 56, 134, 149, 76, 109, 59, 241, 78, 182, 85, 18, 225, 67, 137, 97, 114, 187, 140, 217, 244, 108, 89, 115, 80, 161, 43, 83, 220, 9, 153, 246, 103, 111, 138, 80, 240, 252, 8, 234, 200, 72, 131, 21, 72, 179, 146, 50, 83, 18, 131, 145, 227, 113, 188, 11, 119, 143, 66, 217, 122, 95, 227, 242, 96, 26, 8, 193, 166, 242, 112, 179, 55, 126, 166, 39, 50, 233, 71, 135, 21, 188, 101, 67, 45, 241, 161, 157, 85, 40, 106, 1, 177, 118, 62, 249, 65, 134, 96, 189, 188, 116, 225, 114, 70, 46, 74, 240, 189, 111, 236, 41, 188, 85, 78, 209, 95, 179, 46, 123, 253, 155, 118, 203, 240, 120, 51, 212, 125, 212, 93, 58, 121, 22, 164, 159, 116, 52, 49, 171, 157, 205, 113, 145, 121, 10, 215, 125, 139, 251, 240, 58, 149, 70, 143, 100, 90, 58, 34, 185, 151, 103, 216, 229, 226, 183, 171, 107, 181, 252, 162, 79, 40, 56, 48, 117, 199, 134, 21, 244, 246, 178, 188, 71, 109, 27, 239, 81, 109, 169, 155, 54, 150, 132, 67, 48, 150, 183, 189, 175, 11, 177, 128, 61, 116, 42, 102, 168, 170, 96, 111, 238, 136, 252, 175, 238, 133, 72, 143, 190, 52, 126, 74, 227, 186, 39, 236, 173, 168, 144, 134, 118, 63, 59, 13, 83, 150, 17, 104, 14, 206, 92, 130, 226, 83, 193, 83, 190, 127, 202, 210, 239, 140, 176, 39, 4, 53, 182, 128, 89, 58, 198, 204, 126, 92, 54, 93, 151, 33, 131, 241, 185, 2, 13, 210, 75, 244, 51, 83, 219, 248, 238, 14, 249, 114, 16, 142, 129, 120, 208, 193, 43, 105, 80, 223, 41, 65, 138, 243, 153, 119, 41, 186, 128, 140, 231, 236, 204, 72, 210, 237, 169, 64, 117, 74, 241, 150, 62, 117, 183, 183, 138, 34, 195, 190, 238, 185, 29, 143, 77, 95, 112, 146, 80, 119, 157, 218, 153, 40, 15, 141, 178, 253, 99, 202, 67, 144, 139, 220, 173, 76, 77, 143, 217, 72, 168, 37, 158, 39, 182, 195, 106, 59, 133, 190, 73, 202, 209, 17, 93, 67, 110, 249, 15, 104, 183, 148, 239, 199, 97, 6, 131, 225, 163, 51, 176, 135, 104, 44, 157, 145, 150, 171, 48, 52, 226, 73, 175, 71, 20, 158, 213, 81, 71, 251, 45, 178, 183, 130, 66, 17, 240, 96, 224, 149, 132, 141, 161, 238, 176, 124, 89, 68, 110, 149, 168, 219, 216, 50, 180, 232, 173, 231, 22, 239, 181, 11, 254, 238, 80, 48, 233, 31, 225, 108, 168, 241, 155, 22, 145, 70, 38, 152, 247, 163, 36, 143, 179, 99, 115, 219, 55, 51, 231, 130, 145, 50, 12, 252, 193, 29, 140, 44, 192, 64, 206, 119, 51, 228, 173, 37, 15, 190, 180, 57, 148, 54, 131, 220, 84, 2, 124, 227, 232, 9, 14, 4, 129, 71, 97, 112, 179, 82, 132, 32, 116, 157, 202, 63, 22, 92, 216, 175, 10, 63, 158, 201, 26, 195, 99, 148, 86, 44, 66, 228, 64, 234, 160, 175, 41, 212, 66, 87, 141, 160, 92, 218, 147, 179, 202, 132, 32, 13, 253, 225, 145, 109, 65, 28, 109, 79, 35, 150, 95, 53, 102, 84, 82, 25, 199, 170, 228, 155, 193, 147, 16, 226, 240, 107, 100, 157, 10, 139, 21, 31, 253, 153, 11, 124, 204, 237, 71, 193, 155, 88, 234, 196, 82, 186, 21, 95, 12, 135, 34, 255, 231, 80, 149, 163, 151, 214, 203, 48, 173, 21, 12, 77, 223, 1, 237, 245, 30, 201, 0, 179, 50, 181, 217, 67, 120, 110, 58, 186, 153, 205, 16, 75, 102, 160, 224, 145, 220, 56, 74, 109, 173, 165, 155, 11, 85, 17, 99, 135, 43, 206, 163, 35, 202, 200, 103, 219, 76, 147, 91, 83, 198, 65, 96, 11, 137, 94, 91, 31, 132, 143, 209, 94, 143, 56, 155, 190, 183, 15, 223, 214, 110, 99, 58, 111, 185, 88, 156, 198, 211, 22, 50, 253, 80, 46, 113, 2, 245, 211, 130, 200, 228, 109, 145, 89, 203, 138, 121, 129, 145, 10, 107, 135, 2, 54, 213, 76, 132, 177, 116, 235, 181, 48, 246, 117, 175, 139, 252, 250, 45, 180, 83, 123, 245, 123, 5, 142, 89, 203, 106, 156, 156, 201, 35, 147, 187, 6, 136, 249, 241, 169, 227, 160, 237, 237, 150, 226, 225, 231, 173, 76, 120, 31, 242, 127, 219, 150, 94, 191, 49, 3, 114, 118, 185, 175, 92, 117, 139, 131, 35, 187, 88, 161, 171, 77, 207, 3, 191, 98, 153, 14, 148, 96, 81, 94, 171, 239, 179, 96, 14, 165, 155, 172, 138, 41, 104, 248, 227, 97, 171, 135, 235, 7, 217, 170, 156, 153, 205, 45, 5, 2, 144, 248, 9, 138, 101, 218, 253, 97, 35, 183, 35, 168, 139, 174, 55, 245, 45, 50, 253, 41, 42, 232, 65, 155, 130, 138, 153, 138, 36, 129, 230, 75, 6, 96, 84, 105, 215, 151, 203, 107, 24, 93, 213, 196, 77, 235, 18, 248, 157, 16, 165, 24, 151, 125, 118, 11, 156, 110, 9, 175, 144, 106, 24, 102, 42, 179, 148, 183, 159, 4, 8, 135, 132, 106, 135, 19, 11, 250, 127, 213, 231, 164, 76, 25, 218, 100, 6, 234, 131, 198, 191, 169, 15, 144, 167, 164, 58, 118, 231, 146, 37, 7, 151, 92, 229, 155, 110, 83, 106, 196, 81, 122, 158, 40, 242, 117, 210, 254, 35, 114, 139, 224, 15, 252, 119, 195, 189, 161, 54, 47, 128, 82, 99, 88, 217, 237, 139, 125, 112, 68, 30, 45, 222, 132, 49, 22, 203, 153, 211, 179, 162, 251, 63, 125, 140, 115, 14, 130, 157, 237, 112, 224, 171, 184, 51, 7, 173, 203, 52, 139, 62, 218, 171, 90, 53, 202, 115, 108, 48, 29, 120, 170, 141, 149, 240, 211, 192, 183, 6, 66, 247, 56, 237, 128, 68, 7, 95, 49, 214, 89, 101, 139, 255, 182, 73, 146, 169, 159, 15, 197, 83, 122, 113, 58, 23, 14, 92, 227, 33, 42, 228, 230, 8, 176, 248, 95, 162, 102, 47, 9, 180, 41, 227, 195, 131, 130, 10, 116, 245, 210, 160, 207, 4, 215, 239, 232, 83, 120, 140, 2, 108, 112, 8, 111, 244, 158, 236, 173, 187, 57, 122, 106, 150, 83, 135, 8, 16, 144, 188, 106, 29, 237, 177, 169, 121, 134, 65, 215, 142, 25, 242, 201, 14, 148, 37, 182, 142, 113, 48, 127, 18, 28, 175, 190, 122, 189, 152, 152, 107, 50, 138, 9, 82, 61, 121, 227, 142, 156, 125, 249, 245, 168, 155, 32, 119, 140, 37, 186, 95, 148, 255, 222, 56, 1, 16, 155, 80, 176, 251, 37, 4, 108, 179, 175, 171, 159, 51, 233, 48, 255, 230, 124, 139, 240, 137, 143, 115, 12, 60, 215, 75, 101, 82, 24, 103, 83, 150, 57, 79, 9, 193, 101, 61, 10, 42, 43, 136, 158, 2, 11, 49, 115, 186, 161, 169, 119, 130, 6, 133, 134, 203, 88, 23, 226, 16, 4, 102, 194, 232, 77, 9, 119, 194, 223, 231, 52, 152, 44, 37, 42, 231, 117, 53, 231, 122, 55, 216, 184, 87, 96, 43, 87, 206, 42, 145, 175, 210, 23, 171, 194, 12, 162, 15, 195, 198, 140, 27, 125, 211, 167, 111, 24, 177, 115, 143, 171, 99, 212, 116, 37, 202, 108, 73, 116, 11, 72, 248, 153, 57, 182, 75, 209, 41, 18, 169, 72, 96, 116, 156, 106, 72, 72, 194, 176, 62, 54, 51, 186, 149, 6, 155, 135, 94, 57, 46, 196, 129, 235, 49, 196, 138, 26, 91, 33, 20, 118, 254, 179, 193, 220, 35, 177, 87, 169, 98, 92, 242, 29, 151, 107, 70, 236, 212, 7, 217, 135, 144, 165, 171, 184, 186, 159, 32, 100, 120, 139, 149, 112, 22, 69, 207, 224, 119, 191, 133, 162, 227, 207, 30, 156, 239, 245, 48, 83, 162, 183, 53, 65, 146, 24, 131, 201, 206, 120, 227, 103, 51, 243, 94, 151, 79, 36, 83, 150, 79, 193, 94, 196, 94, 25, 203, 105, 194, 150, 222, 133, 170, 11, 39, 178, 245, 8, 121, 26, 56, 152, 70, 217, 196, 205, 75, 94, 96, 98, 169, 217, 242, 201, 243, 232, 169, 97, 45, 94, 236, 74, 53, 172, 34, 205, 235, 73, 46, 6, 39, 34, 133, 58, 213, 221, 86, 7, 65, 27, 115, 220, 173, 68, 207, 25, 186, 19, 26, 210, 236, 142, 144, 85, 119, 35, 74, 28, 197, 135, 252, 248, 48, 67, 56, 163, 93, 185, 246, 86, 112, 177, 77, 212, 34, 42, 168, 49, 249, 109, 198, 133, 162, 190, 46, 129, 91, 7, 44, 6, 14, 235, 166, 127, 253, 191, 37, 240, 103, 187, 250, 183, 221, 54, 14, 13, 229, 2, 217, 221, 74, 53, 30, 122, 68, 64, 60, 33, 61, 82, 170, 164, 179, 77, 231, 75, 130, 71, 96, 255, 128, 168, 141, 110, 99, 156, 105, 50, 107, 43, 38, 188, 198, 169, 75, 201, 189, 109, 158, 109, 206, 207, 98, 165, 189, 149, 97, 247, 19, 247, 13, 69, 98, 245, 133, 179, 44, 118, 69, 201, 189, 61, 20, 67, 26, 139, 55, 80, 2, 182, 230, 247, 217, 144, 211, 64, 185, 241, 127, 236, 113, 156, 207, 11, 42, 98, 223, 30, 97, 201, 141, 162, 120, 28, 11, 66, 241, 208, 46, 48, 35, 242, 11, 73, 13, 217, 35, 227, 5, 73, 244, 221, 184, 228, 180, 200, 255, 59, 54, 72, 189, 17, 104, 115, 187, 160, 48, 209, 117, 248, 224, 121, 82, 167, 234, 49, 100, 30, 204, 51, 26, 48, 171, 88, 47, 108, 193, 236, 128, 250, 58, 79, 9, 46, 229, 28, 150, 186, 124, 30, 193, 183, 79, 197, 113, 217, 93, 71, 152, 129, 135, 198, 0, 15, 223, 243, 136, 181, 174, 30, 72, 91, 78, 28, 132, 134, 220, 19, 13, 11, 5, 76, 39, 117, 212, 181, 40, 128, 128, 63, 218, 53, 118, 148, 228, 165, 70, 22, 230, 144, 156, 211, 168, 235, 175, 175, 124, 2, 196, 14, 228, 43, 64, 5, 155, 68, 131, 103, 18, 95, 174, 213, 170, 2, 242, 189, 205, 127, 45, 233, 95, 184, 239, 27, 47, 69, 126, 198, 133, 104, 62, 219, 0, 31, 106, 212, 159, 136, 141, 110, 6, 68, 160, 37, 77, 68, 103, 125, 69, 153, 132, 136, 252, 22, 147, 54, 165, 44, 14, 118, 246, 223, 180, 161, 213, 66, 14, 250, 191, 169, 11, 162, 0, 207, 142, 139, 49, 22, 79, 191, 14, 185, 145, 237, 32, 132, 192, 247, 63, 110, 222, 216, 113, 76, 86, 239, 37, 162, 60, 1, 104, 22, 179, 255, 122, 149, 151, 125, 205, 139, 19, 93, 90, 253, 97, 0, 118, 164, 221, 182, 111, 108, 108, 243, 251, 83, 16, 227, 188, 132, 206, 208, 189, 112, 7, 21, 183, 247, 135, 69, 39, 115, 249, 17, 203, 162, 216, 242, 129, 252, 128, 141, 26, 240, 151, 208, 197, 88, 68, 160, 154, 241, 70, 40, 97, 79, 227, 40, 71, 239, 138, 37, 224, 161, 151, 59, 32, 66, 190, 142, 60, 145, 54, 122, 61, 71, 208, 235, 168, 67, 3, 27, 69, 212, 223, 102, 77, 237, 186, 224, 214, 242, 89, 254, 210, 118, 224, 237, 223, 196, 156, 195, 58, 111, 252, 23, 204, 68, 95, 113, 130, 160, 184, 213, 72, 162, 28, 226, 216, 136, 55, 44, 208, 87, 122, 243, 85, 218, 103, 174, 99, 146, 145, 228, 224, 157, 57, 161, 74, 180, 234, 240, 225, 212, 17, 253, 42, 151, 128, 191, 197, 221, 240, 242, 234, 212, 46, 183, 204, 190, 73, 71, 156, 77, 165, 69, 113, 87, 148, 154, 165, 35, 206, 180, 245, 144, 224, 155, 178, 68, 224, 119, 17, 212, 236, 222, 255, 223, 171, 125, 40, 112, 124, 215, 87, 217, 145, 235, 110, 75, 1, 8, 168, 187, 24, 61, 151, 32, 176, 45, 141, 65, 156, 12, 45, 220, 39, 28, 209, 136, 234, 208, 68, 27, 82, 120, 124, 76, 157, 202, 112, 79, 49, 54, 174, 168, 202, 0, 188, 16, 186, 148, 7, 0, 106, 240, 152, 65, 238, 88, 244, 106, 165, 46, 155, 196, 15, 16, 83, 210, 104, 77, 62, 66, 116, 18, 240, 114, 10, 25, 133, 97, 102, 49, 245, 36, 253, 81, 237, 85, 229, 24, 20, 30, 123, 76, 190, 151, 213, 41, 24, 59, 24, 35, 50, 29, 29, 31, 146, 129, 163, 19, 231, 17, 118, 237, 79, 121, 108, 200, 151, 107, 117, 197, 227, 114, 13, 48, 204, 216, 173, 177, 45, 238, 50, 219, 48, 151, 192, 183, 77, 11, 244, 176, 235, 42, 36, 8, 229, 107, 83, 225, 240, 131, 66, 147, 7, 66, 126, 249, 88, 104, 49, 79, 61, 155, 227, 37, 44, 109, 208, 95, 239, 148, 137, 192, 129, 174, 13, 94, 110, 171, 108, 50, 173, 83, 133, 29, 184, 48, 191, 229, 197, 132, 179, 52, 70, 148, 48, 43, 253, 210, 199, 151, 131, 48, 17, 251, 144, 148, 211, 197, 157, 210, 76, 134, 248, 56, 244, 51, 126, 22, 76, 166, 108, 36, 239, 214, 168, 190, 117, 191, 92, 184, 63, 122, 119, 156, 26, 43, 243, 142, 57, 60, 133, 248, 21, 176, 38, 49, 163, 82, 166, 100, 251, 189, 247, 191, 56, 27, 32, 168, 170, 193, 129, 150, 168, 123, 33, 138, 211, 178, 87, 29, 62, 179, 206, 116, 129, 142, 124, 62, 235, 22, 197, 193, 203, 191, 13, 205, 111, 87, 18, 23, 246, 187, 104, 160, 78, 220, 142, 57, 97, 239, 161, 24, 128, 177, 192, 221, 235, 118, 25, 254, 164, 56, 220, 93, 213, 187, 132, 238, 33, 34, 136, 153, 141, 22, 66, 66, 228, 149, 111, 211, 176, 124, 215, 101, 131, 240, 246, 61, 160, 120, 249, 81, 228, 53, 177, 195, 38, 186, 76, 44, 45, 12, 149, 249, 254, 108, 68, 166, 118, 77, 243, 160, 172, 198, 68, 192, 131, 233, 125, 102, 221, 58, 88, 138, 24, 243, 68, 194, 209, 20, 35, 216, 21, 113, 243, 61, 222, 230, 18, 209, 88, 185, 204, 221, 168, 205, 106, 93, 154, 80, 110, 159, 70, 230, 82, 157, 0, 218, 166, 150, 178, 107, 225, 32, 254, 15, 109, 229, 149, 23, 146, 190, 191, 111, 19, 236, 240, 224, 248, 32, 38, 88, 153, 29, 133, 183, 160, 192, 229, 117, 219, 43, 248, 226, 22, 61, 7, 36, 191, 39, 114, 246, 229, 205, 169, 200, 56, 189, 208, 183, 65, 22, 101, 196, 84, 3, 183, 92, 218, 246, 125, 196, 246, 73, 209, 56, 27, 100, 62, 163, 247, 87, 56, 120, 48, 16, 112, 49, 94, 185, 139, 127, 198, 248, 166, 131, 76, 133, 243, 136, 172, 194, 14, 90, 252, 128, 209, 222, 128, 172, 87, 152, 141, 204, 16, 218, 215, 97, 155, 178, 19, 69, 98, 253, 66, 179, 238, 167, 114, 143, 134, 254, 182, 151, 80, 221, 157, 129, 87, 162, 69, 140, 12, 86, 75, 158, 45, 127, 61, 208, 46, 158, 139, 198, 228, 94, 97, 195, 217, 174, 161, 50, 167, 3, 13, 237, 166, 192, 48, 58, 240, 125, 202, 94, 247, 4, 152, 211, 60, 128, 56, 227, 216, 65, 237, 22, 125, 118, 230, 97, 20, 71, 214, 58, 242, 30, 166, 192, 124, 189, 148, 244, 2, 59, 71, 34, 26, 169, 74, 158, 203, 49, 5, 21, 49, 250, 61, 229, 234, 214, 194, 238, 193, 242, 229, 130, 237, 210, 59, 8, 207, 80, 240, 242, 97, 229, 121, 213, 115, 250, 131, 129, 69, 227, 2, 182, 94, 188, 239, 157, 104, 189, 57, 22, 26, 45, 97, 255, 153, 44, 156, 152, 58, 134, 23, 228, 62, 1, 65, 117, 91, 49, 30, 128, 241, 47, 156, 224, 125, 77, 32, 186, 104, 153, 226, 84, 157, 1, 65, 119, 22, 140, 85, 98, 118, 100, 106, 245, 223, 241, 83, 216, 176, 213, 221, 184, 49, 205, 97, 188, 107, 208, 103, 226, 187, 180, 228, 122, 163, 175, 68, 201, 175, 30, 177, 109, 100, 188, 30, 61, 219, 143, 39, 252, 209, 243, 208, 168, 20, 228, 137, 186, 54, 71, 186, 60, 92, 9, 53, 97, 137, 47, 254, 37, 243, 197, 142, 66, 155, 110, 18, 75, 191, 228, 71, 50, 19, 50, 137, 190, 54, 93, 131, 76, 152, 9, 226, 8, 238, 81, 26, 200, 38, 115, 143, 236, 22, 175, 134, 118, 222, 236, 202, 205, 164, 78, 33, 43, 86, 86, 167, 227, 99, 230, 67, 132, 63, 163, 226, 90, 93, 67, 13, 218, 245, 58, 111, 162, 14, 195, 124, 114, 172, 248, 145, 118, 101, 180, 242, 46, 35, 25, 79, 41, 85, 214, 84, 104, 19, 68, 154, 214, 129, 228, 99, 20, 45, 98, 87, 22, 150, 92, 105, 130, 247, 137, 35, 248, 96, 80, 118, 93, 176, 177, 63, 214, 241, 106, 147, 14, 17, 74, 48, 103, 11, 21, 227, 158, 10, 85, 104, 41, 225, 206, 250, 60, 156, 195, 220, 106, 14, 37, 144, 185, 187, 8, 162, 48, 51, 46, 49, 118, 209, 112, 199, 23, 3, 134, 174, 79, 220, 66, 47, 219, 190, 32, 150, 108, 113, 81, 92, 161, 162, 187, 67, 94, 186, 180, 146, 143, 43, 149, 0, 59, 86, 201, 46, 153, 1, 5, 84, 163, 130, 96, 202, 203, 75, 158, 86, 109, 149, 160, 183, 238, 34, 20, 14, 206, 230, 24, 198, 17, 127, 60, 12, 118, 8, 132, 52, 230, 251, 249, 149, 196, 51, 120, 26, 174, 89, 16, 138, 33, 121, 135, 137, 83, 49, 184, 142, 4, 170, 52, 64, 68, 10, 251, 44, 194, 38, 73, 53, 184, 13, 79, 248, 121, 249, 223, 108, 249, 137, 138, 119, 51, 222, 90, 237, 81, 63, 237, 161, 162, 237, 210, 48, 53, 236, 17, 122, 111, 46, 195, 77, 28, 62, 220, 179, 167, 25, 48, 193, 115, 31, 181, 139, 252, 37, 212, 183, 51, 40, 121, 165, 189, 245, 36, 250, 137, 6, 186, 255, 180, 152, 230, 90, 95, 227, 241, 167, 255, 212, 45, 95, 75, 71, 139, 212, 243, 1, 223, 171, 128, 173, 205, 169, 97, 16, 211, 26, 205, 149, 9, 206, 95, 200, 42, 201, 126, 213, 246, 115, 23, 189, 136, 183, 224, 142, 218, 236, 102, 5, 207, 254, 143, 183, 150, 169, 145, 189, 169, 232, 250, 119, 183, 16, 73, 86, 241, 69, 202, 155, 231, 102, 142, 162, 239, 187, 245, 224, 213, 138, 121, 233, 104, 50, 223, 134, 155, 204, 236, 70, 77, 27, 238, 94, 229, 222, 76, 102, 89, 141, 45, 106, 115, 248, 14, 234, 87, 166, 119, 83, 167, 227, 208, 9, 209, 254, 55, 191, 196, 29, 189, 103, 43, 236, 44, 203, 215, 83, 42, 143, 180, 125, 248, 186, 122, 156, 53, 140, 157, 13, 226, 55, 204, 195, 143, 154, 114, 61, 198, 255, 250, 39, 29, 17, 47, 243, 234, 235, 232, 179, 227, 252, 182, 33, 232, 150, 40, 234, 77, 14, 34, 233, 23, 158, 26, 236, 74, 113, 6, 92, 25, 103, 180, 168, 58, 209, 213, 8, 30, 74, 166, 227, 81, 52, 185, 101, 237, 191, 157, 89, 14, 238, 15, 206, 70, 167, 76, 250, 140, 77, 17, 231, 208, 234, 15, 119, 114, 56, 224, 50, 235, 95, 200, 172, 16, 75, 49, 157, 59, 137, 48, 56, 153, 51, 64, 96, 218, 18, 5, 23, 228, 226, 197, 66, 128, 68, 244, 206, 34, 2, 149, 39, 41, 195, 17, 83, 113, 132, 162, 154, 165, 173, 170, 210, 145, 62, 232, 79, 56, 49, 34, 188, 104, 142, 110, 55, 147, 5, 230, 97, 95, 16, 88, 135, 89, 135, 63, 67, 217, 77, 19, 8, 207, 11, 32, 149, 129, 252, 132, 255, 60, 238, 24, 131, 86, 32, 50, 167, 150, 136, 236, 90, 14, 212, 155, 165, 68, 114, 9, 18, 63, 182, 34, 215, 236, 223, 70, 214, 55, 232, 114, 246, 206, 193, 242, 254, 182, 177, 107, 40, 230, 68, 168, 97, 238, 18, 14, 160, 225, 200, 6, 34, 35, 83, 251, 114, 104, 189, 71, 109, 18, 232, 53, 145, 37, 86, 226, 152, 26, 4, 149, 186, 5, 30, 61, 62, 246, 39, 25, 236, 137, 130, 211, 34, 206, 95, 54, 178, 18, 244, 43, 15, 199, 81, 79, 102, 220, 232, 120, 156, 31, 105, 28, 185, 112, 204, 226, 109, 178, 198, 1, 184, 19, 194, 146, 21, 149, 254, 223, 27, 129, 112, 143, 9, 5, 157, 47, 58, 20, 10, 189, 136, 97, 122, 187, 17, 231, 200, 242, 60, 133, 55, 205, 45, 168, 178, 47, 152, 125, 242, 36, 49, 58, 128, 191, 147, 26, 96, 76, 168, 239, 205, 46, 67, 194, 113, 106, 194, 168, 229, 235, 188, 67, 228, 194, 154, 24, 128, 85, 166, 250, 80, 99, 59, 208, 97, 132, 179, 145, 83, 97, 170, 238, 185, 148, 66, 206, 170, 64, 3, 185, 165, 73, 30, 151, 165, 56, 108, 162, 191, 18, 203, 57, 251, 24, 160, 47, 86, 16, 144, 119, 58, 5, 242, 131, 117, 73, 60, 32, 158, 105, 32, 53, 162, 10, 103, 69, 229, 31, 223, 48, 134, 82, 197, 172, 167, 15, 179, 5, 50, 125, 253, 183, 231, 211, 78, 212, 110, 32, 140, 71, 58, 45, 179, 181, 72, 4, 29, 253, 89, 136, 137, 176, 181, 157, 175, 41, 51, 227, 33, 35, 242, 81, 127, 15, 18, 118, 211, 199, 47, 99, 19, 80, 88, 28, 203, 172, 83, 243, 78, 126, 202, 32, 225, 93, 180, 174, 130, 29, 61, 3, 6, 83, 202, 9, 172, 20, 88, 220, 191, 244, 188, 247, 127, 77, 85, 138, 138, 14, 156, 72, 134, 150, 48, 187, 99, 9, 31, 137, 100, 111, 252, 12, 103, 101, 154, 186, 187, 228, 107, 110, 46, 166, 173, 11, 143, 42, 255, 150, 213, 225, 146, 189, 111, 118, 95, 83, 236, 122, 63, 125, 153, 40, 169, 96, 202, 245, 93, 227, 120, 83, 166, 215, 40, 124, 30, 100, 165, 157, 76, 34, 252, 164, 200, 220, 226, 178, 50, 31, 230, 131, 236, 87, 80, 170, 138, 252, 191, 22, 65, 125, 132, 67, 120, 131, 246, 241, 195, 38, 55, 222, 239, 69, 42, 215, 103, 50, 169, 43, 153, 116, 105, 61, 214, 158, 79, 84, 10, 21, 78, 169, 182, 138, 112, 74, 125, 30, 193, 179, 67, 131, 125, 212, 161, 86, 159, 159, 161, 250, 251, 254, 144, 207, 32, 3, 9, 17, 225, 66, 225, 196, 255, 116, 96, 136, 144, 179, 119, 159, 211, 111, 47, 78, 184, 71, 12, 190, 54, 149, 232, 78, 31, 76, 151, 198, 154, 157, 56, 152, 88, 54, 247, 48, 148, 107, 180, 223, 15, 72, 126, 239, 40, 13, 204, 201, 187, 5, 196, 51, 31, 83, 8, 78, 123, 245, 34, 95, 49, 169, 136, 101, 252, 123, 235, 234, 135, 50, 190, 194, 236, 126, 150, 112, 190, 247, 93, 122, 41, 54, 208, 166, 33, 51, 98, 28, 254, 251, 2, 8, 125, 233, 118, 249, 18, 183, 208, 93, 253, 22, 34, 0, 240, 163, 40, 162, 224, 242, 203, 1, 28, 97, 230, 23, 137, 85, 149, 193, 140, 202, 86, 51, 196, 248, 106, 61, 69, 135, 253, 84, 204, 95, 101, 246, 208, 255, 9, 161, 224, 158, 146, 105, 128, 243, 118, 223, 250, 225, 16, 92, 39, 216, 10, 144, 85, 209, 127, 137, 140, 75, 149, 85, 201, 13, 197, 111, 196, 182, 174, 135, 103, 117, 128, 147, 149, 12, 10, 217, 120, 8, 147, 83, 164, 37, 221, 4, 1, 94, 193, 144, 14, 116, 21, 202, 206, 34, 222, 200, 46, 47, 7, 23, 110, 253, 54, 225, 215, 81, 247, 180, 27, 248, 203, 128, 253, 150, 130, 197, 33, 206, 242, 186, 75, 25, 68, 248, 102, 191, 194, 88, 142, 13, 169, 203, 71, 121, 8, 97, 116, 172, 24, 253, 19, 128, 43, 110, 249, 134, 216, 167, 12, 29, 149, 208, 29, 234, 189, 114, 9, 253, 154, 170, 44, 188, 155, 157, 121, 229, 119, 109, 212, 206, 24, 215, 151, 121, 141, 153, 102, 243, 80, 76, 137, 149, 175, 67, 248, 22, 128, 81, 115, 72, 110, 131, 24, 201, 103, 5, 156, 123, 112, 234, 20, 137, 243, 107, 48, 80, 94, 112, 149, 77, 61, 138, 148, 61, 169, 137, 75, 34, 21, 101, 155, 240, 78, 79, 87, 124, 171, 105, 35, 207, 150, 130, 162, 247, 144, 157, 167, 182, 231, 195, 128, 202, 40, 28, 175, 85, 157, 59, 12, 222, 215, 105, 198, 201, 13, 198, 156, 46, 6, 4, 142, 139, 161, 199, 90, 33, 162], + [57, 171, 66, 15, 161, 182, 55, 228, 9, 124, 113, 101, 71, 125, 189, 229, 113, 162, 125, 181, 212, 4, 201, 145, 255, 156, 247, 107, 61, 111, 12, 51, 78, 95, 58, 206, 59, 45, 254, 180, 19, 209, 158, 225, 152, 95, 39, 84, 183, 214, 62, 146, 149, 249, 172, 8, 170, 91, 124, 128, 162, 189, 90, 162, 6, 109, 101, 38, 105, 126, 115, 55, 114, 18, 60, 63, 146, 254, 14, 188, 104, 102, 19, 187, 107, 218, 202, 158, 164, 235, 61, 24, 255, 212, 32, 179, 226, 119, 76, 204, 160, 235, 148, 115, 233, 248, 178, 50, 60, 202, 145, 184, 222, 147, 14, 206, 74, 207, 14, 119, 219, 108, 169, 200, 194, 198, 93, 125, 223, 9, 142, 6, 184, 222, 120, 65, 5, 171, 80, 218, 100, 26, 138, 119, 56, 179, 15, 103, 244, 25, 193, 133, 166, 107, 7, 127, 209, 226, 89, 161, 196, 209, 119, 77, 108, 138, 171, 57, 63, 93, 198, 109, 19, 251, 63, 254, 13, 202, 62, 214, 156, 48, 113, 70, 220, 247, 97, 67, 38, 185, 5, 249, 87, 231, 200, 97, 37, 68, 86, 165, 136, 120, 225, 219, 124, 156, 196, 197, 155, 199, 117, 24, 78, 86, 203, 131, 121, 9, 215, 97, 164, 42, 60, 175, 104, 89, 43, 217, 139, 170, 12, 56, 52, 171, 180, 21, 23, 208, 164, 221, 210, 95, 62, 132, 232, 200, 70, 78, 229, 78, 77, 173, 136, 178, 125, 199, 222, 247, 75, 145, 12, 171, 73, 6, 8, 193, 91, 230, 103, 210, 48, 64, 231, 173, 94, 101, 60, 182, 156, 240, 236, 237, 71, 230, 224, 122, 246, 43, 199, 241, 92, 95, 120, 172, 113, 94, 9, 27, 189, 225, 127, 107, 13, 68, 58, 139, 221, 55, 24, 20, 239, 56, 192, 127, 3, 187, 140, 38, 215, 251, 21, 123, 58, 146, 243, 83, 169, 79, 31, 239, 208, 36, 130, 174, 166, 191, 95, 51, 44, 243, 167, 177, 151, 204, 26, 144, 189, 251, 31, 223, 201, 151, 172, 234, 180, 120, 175, 227, 142, 38, 113, 146, 4, 136, 140, 21, 188, 87, 48, 129, 35, 29, 248, 69, 64, 108, 122, 154, 149, 237, 62, 59, 94, 33, 100, 223, 88, 43, 244, 172, 139, 16, 44, 164, 133, 254, 249, 81, 158, 8, 181, 78, 80, 208, 140, 69, 193, 169, 133, 218, 222, 116, 176, 216, 234, 209, 113, 187, 37, 172, 202, 184, 59, 154, 41, 75, 66, 160, 17, 12, 99, 48, 66, 173, 218, 105, 110, 142, 122, 126, 91, 45, 166, 212, 207, 109, 115, 54, 182, 24, 222, 125, 7, 61, 48, 109, 229, 51, 228, 29, 123, 61, 105, 252, 132, 13, 156, 192, 221, 11, 138, 201, 234, 145, 211, 172, 142, 94, 147, 6, 165, 153, 85, 15, 39, 183, 94, 214, 91, 210, 78, 230, 169, 121, 133, 220, 177, 54, 145, 118, 73, 24, 208, 200, 188, 255, 166, 212, 166, 59, 36, 30, 111, 198, 134, 56, 59, 85, 163, 86, 69, 141, 91, 5, 145, 50, 77, 39, 190, 61, 188, 201, 143, 144, 228, 111, 155, 72, 226, 135, 85, 180, 67, 162, 147, 148, 32, 139, 79, 43, 116, 221, 11, 211, 194, 176, 33, 230, 209, 156, 130, 92, 243, 117, 96, 248, 117, 253, 185, 58, 123, 208, 187, 160, 218, 136, 14, 47, 100, 69, 80, 170, 33, 197, 43, 118, 177, 123, 115, 21, 207, 35, 123, 64, 147, 122, 52, 44, 92, 86, 216, 144, 229, 14, 232, 254, 33, 72, 68, 144, 198, 34, 55, 183, 29, 92, 99, 72, 118, 122, 199, 180, 15, 183, 150, 74, 207, 4, 88, 115, 112, 50, 184, 173, 126, 106, 155, 204, 53, 95, 123, 190, 22, 173, 191, 131, 59, 66, 253, 182, 187, 71, 136, 154, 33, 185, 112, 213, 19, 5, 82, 243, 178, 243, 13, 170, 169, 143, 33, 50, 240, 5, 51, 184, 165, 197, 162, 85, 4, 148, 5, 192, 8, 40, 103, 205, 26, 226, 158, 131, 137, 28, 24, 126, 115, 177, 151, 5, 157, 47, 99, 229, 188, 165, 153, 233, 50, 208, 94, 151, 38, 153, 151, 239, 51, 209, 105, 64, 119, 195, 74, 130, 33, 8, 189, 141, 90, 1, 87, 81, 201, 213, 179, 235, 105, 251, 135, 226, 77, 62, 9, 15, 194, 118, 138, 248, 164, 169, 88, 140, 17, 98, 20, 29, 0, 8, 163, 108, 70, 125, 119, 67, 12, 43, 114, 64, 99, 99, 45, 121, 37, 158, 240, 29, 44, 115, 251, 244, 174, 16, 243, 226, 47, 217, 132, 103, 19, 207, 227, 207, 242, 14, 128, 30, 168, 4, 95, 236, 250, 129, 190, 255, 221, 198, 177, 223, 93, 153, 244, 26, 254, 76, 160, 241, 1, 199, 236, 167, 195, 8, 123, 158, 42, 7, 192, 191, 215, 144, 216, 133, 148, 158, 209, 181, 222, 102, 30, 70, 91, 162, 70, 20, 165, 108, 206, 213, 99, 9, 30, 148, 5, 133, 121, 100, 205, 120, 167, 24, 101, 36, 188, 137, 239, 235, 215, 12, 208, 74, 219, 118, 197, 49, 192, 19, 61, 249, 140, 241, 51, 209, 164, 145, 102, 26, 184, 138, 17, 100, 102, 11, 91, 22, 79, 87, 156, 70, 218, 164, 252, 162, 8, 66, 199, 251, 190, 32, 219, 236, 138, 251, 20, 243, 117, 228, 142, 160, 59, 67, 47, 131, 238, 1, 200, 130, 48, 125, 53, 13, 139, 193, 221, 123, 14, 60, 254, 37, 25, 110, 39, 210, 214, 149, 168, 128, 244, 203, 45, 166, 82, 83, 221, 191, 23, 70, 221, 1, 104, 239, 126, 47, 65, 115, 174, 54, 94, 240, 240, 154, 137, 66, 223, 233, 237, 31, 46, 125, 132, 64, 147, 252, 34, 158, 45, 79, 149, 206, 19, 69, 235, 186, 13, 72, 68, 250, 178, 128, 80, 162, 39, 219, 252, 240, 208, 228, 149, 40, 155, 44, 235, 1, 73, 68, 115, 34, 161, 146, 126, 218, 143, 62, 115, 86, 113, 80, 136, 141, 178, 139, 45, 131, 219, 108, 139, 22, 67, 44, 225, 223, 198, 113, 229, 50, 109, 206, 83, 166, 91, 106, 2, 117, 227, 10, 11, 23, 166, 223, 26, 239, 68, 255, 91, 222, 32, 12, 43, 152, 82, 182, 158, 186, 35, 203, 212, 139, 123, 10, 115, 30, 212, 226, 125, 9, 3, 218, 59, 79, 6, 145, 148, 223, 140, 236, 192, 30, 211, 149, 220, 197, 20, 224, 139, 111, 155, 46, 189, 207, 91, 37, 194, 70, 33, 125, 56, 0, 248, 36, 53, 196, 238, 6, 174, 0, 101, 84, 11, 150, 230, 88, 28, 200, 147, 193, 141, 96, 184, 99, 223, 107, 188, 154, 168, 192, 63, 224, 24, 61, 96, 62, 73, 226, 99, 98, 190, 96, 119, 245, 141, 91, 102, 218, 147, 243, 9, 72, 199, 125, 35, 51, 50, 241, 48, 54, 247, 206, 198, 134, 182, 223, 210, 227, 128, 226, 108, 50, 192, 18, 91, 246, 79, 88, 23, 78, 110, 212, 177, 103, 65, 67, 245, 135, 108, 182, 148, 209, 100, 0, 155, 61, 236, 153, 216, 126, 67, 68, 30, 149, 70, 86, 16, 196, 148, 86, 3, 44, 222, 147, 33, 16, 86, 74, 240, 212, 104, 250, 135, 129, 84, 169, 114, 146, 113, 101, 202, 204, 167, 215, 12, 179, 55, 66, 233, 17, 80, 113, 88, 240, 1, 219, 60, 231, 153, 83, 219, 157, 150, 254, 177, 120, 98, 70, 163, 168, 253, 94, 21, 102, 230, 173, 38, 170, 126, 5, 209, 158, 25, 208, 194, 145, 175, 95, 87, 236, 212, 98, 63, 198, 163, 47, 85, 251, 136, 253, 195, 43, 119, 174, 52, 202, 95, 245, 178, 222, 186, 167, 239, 206, 17, 81, 252, 232, 220, 251, 83, 144, 42, 180, 53, 26, 72, 38, 248, 245, 121, 237, 187, 0, 6, 168, 190, 224, 149, 45, 72, 247, 183, 107, 10, 36, 17, 71, 201, 144, 68, 245, 128, 56, 244, 68, 214, 238, 99, 171, 89, 228, 49, 134, 222, 100, 23, 251, 42, 164, 67, 152, 163, 174, 61, 126, 110, 93, 70, 158, 40, 102, 195, 2, 21, 175, 63, 155, 30, 221, 61, 89, 61, 141, 125, 69, 109, 206, 26, 65, 152, 240, 236, 95, 25, 171, 252, 154, 30, 32, 209, 132, 242, 135, 9, 181, 187, 34, 110, 169, 168, 11, 17, 2, 57, 71, 126, 14, 180, 98, 218, 176, 38, 64, 53, 63, 65, 57, 84, 187, 144, 117, 84, 73, 182, 135, 227, 69, 185, 255, 232, 176, 158, 165, 124, 154, 109, 92, 71, 40, 254, 211, 187, 181, 18, 222, 78, 185, 97, 194, 75, 247, 99, 182, 207, 221, 234, 189, 28, 197, 14, 54, 94, 135, 237, 142, 13, 205, 62, 152, 81, 84, 197, 171, 32, 207, 77, 29, 132, 211, 172, 50, 39, 115, 99, 195, 94, 217, 135, 158, 94, 163, 164, 28, 30, 243, 115, 123, 76, 144, 159, 70, 212, 250, 252, 108, 117, 140, 222, 229, 141, 70, 251, 215, 143, 184, 35, 98, 28, 87, 254, 232, 107, 34, 114, 53, 41, 198, 65, 140, 129, 84, 139, 228, 95, 245, 236, 105, 89, 11, 90, 145, 147, 220, 151, 101, 4, 245, 214, 211, 116, 59, 30, 181, 63, 32, 111, 95, 74, 1, 174, 22, 102, 246, 247, 158, 24, 217, 18, 103, 190, 104, 160, 173, 203, 72, 31, 114, 9, 36, 56, 74, 172, 106, 107, 95, 119, 145, 4, 146, 111, 130, 122, 188, 184, 154, 241, 137, 94, 82, 37, 138, 183, 48, 139, 89, 80, 96, 203, 152, 208, 223, 24, 90, 4, 97, 95, 112, 43, 250, 102, 56, 76, 4, 32, 249, 116, 145, 44, 181, 90, 25, 34, 248, 110, 243, 145, 7, 202, 104, 25, 11, 239, 111, 97, 67, 46, 140, 243, 140, 209, 161, 81, 65, 15, 104, 243, 200, 224, 162, 139, 116, 114, 217, 46, 135, 217, 25, 76, 238, 239, 125, 109, 120, 101, 141, 44, 143, 113, 62, 218, 8, 25, 1, 149, 95, 37, 39, 137, 186, 12, 57, 97, 247, 225, 206, 83, 56, 194, 6, 11, 173, 96, 165, 121, 71, 91, 159, 77, 142, 111, 219, 92, 79, 52, 164, 97, 148, 131, 139, 42, 183, 72, 122, 155, 61, 162, 201, 170, 12, 216, 221, 128, 112, 98, 138, 120, 31, 17, 250, 65, 146, 217, 121, 92, 163, 167, 211, 180, 241, 239, 250, 199, 252, 241, 48, 31, 170, 78, 162, 32, 138, 189, 147, 161, 115, 119, 106, 52, 91, 5, 19, 36, 231, 162, 22, 0, 195, 245, 105, 81, 38, 35, 147, 248, 116, 84, 230, 196, 254, 177, 229, 235, 138, 111, 147, 122, 137, 90, 7, 39, 234, 11, 163, 119, 88, 235, 106, 85, 155, 43, 208, 247, 203, 87, 95, 18, 88, 111, 42, 173, 159, 219, 66, 201, 206, 54, 82, 30, 5, 108, 222, 61, 18, 105, 113, 190, 35, 131, 185, 233, 251, 94, 240, 192, 22, 102, 143, 17, 40, 6, 93, 218, 197, 210, 113, 150, 86, 244, 105, 149, 71, 54, 231, 187, 168, 221, 237, 99, 231, 20, 129, 195, 131, 32, 133, 100, 239, 201, 146, 225, 203, 162, 191, 212, 179, 229, 168, 133, 123, 180, 246, 119, 48, 86, 141, 35, 95, 118, 230, 2, 92, 195, 237, 241, 135, 196, 232, 123, 154, 153, 91, 255, 97, 216, 53, 53, 56, 23, 55, 185, 143, 230, 186, 12, 230, 13, 159, 219, 119, 8, 160, 227, 228, 16, 118, 83, 174, 6, 113, 121, 180, 36, 9, 161, 64, 187, 67, 110, 111, 29, 191, 149, 238, 132, 153, 118, 64, 152, 200, 223, 53, 70, 240, 250, 198, 187, 96, 0, 46, 254, 244, 226, 22, 146, 36, 47, 99, 46, 93, 255, 24, 3, 135, 233, 180, 1, 206, 220, 65, 115, 88, 180, 75, 83, 218, 50, 170, 179, 141, 54, 32, 32, 116, 135, 67, 245, 114, 106, 99, 1, 239, 156, 63, 13, 50, 190, 108, 249, 181, 49, 123, 235, 215, 15, 71, 157, 16, 57, 122, 113, 126, 111, 160, 34, 104, 109, 190, 158, 158, 159, 179, 138, 32, 166, 127, 105, 233, 65, 52, 211, 116, 3, 232, 124, 96, 121, 93, 255, 167, 227, 218, 245, 124, 212, 229, 218, 46, 203, 102, 213, 78, 138, 179, 183, 112, 254, 92, 80, 58, 133, 83, 161, 221, 72, 91, 124, 66, 162, 230, 165, 137, 31, 156, 30, 172, 77, 43, 234, 8, 241, 99, 116, 89, 88, 217, 95, 209, 167, 113, 121, 97, 221, 73, 199, 18, 185, 103, 242, 222, 249, 182, 201, 121, 58, 225, 118, 26, 74, 212, 37, 18, 42, 214, 140, 31, 179, 221, 200, 99, 59, 225, 179, 203, 185, 27, 9, 114, 164, 140, 107, 42, 31, 15, 171, 30, 211, 219, 14, 81, 32, 203, 11, 164, 12, 93, 65, 230, 87, 4, 166, 54, 252, 239, 79, 98, 5, 203, 169, 204, 230, 107, 131, 87, 198, 81, 83, 188, 232, 72, 221, 245, 134, 112, 141, 173, 198, 145, 207, 53, 171, 58, 223, 77, 227, 96, 244, 50, 202, 215, 105, 239, 41, 52, 143, 221, 107, 186, 8, 232, 200, 60, 43, 144, 30, 33, 7, 185, 60, 108, 25, 223, 24, 112, 157, 183, 37, 7, 150, 153, 213, 94, 162, 4, 17, 165, 10, 65, 75, 235, 247, 160, 31, 42, 101, 105, 71, 150, 232, 249, 163, 189, 222, 10, 158, 31, 182, 40, 211, 185, 24, 4, 211, 252, 133, 104, 47, 132, 228, 15, 38, 56, 137, 159, 43, 178, 63, 61, 224, 42, 67, 86, 2, 140, 71, 75, 233, 251, 224, 123, 21, 60, 123, 63, 94, 93, 42, 109, 65, 65, 51, 28, 189, 153, 166, 148, 198, 67, 64, 253, 168, 59, 248, 137, 60, 131, 183, 203, 190, 14, 94, 61, 178, 118, 30, 214, 68, 215, 124, 101, 135, 66, 241, 89, 8, 52, 57, 61, 185, 232, 64, 55, 113, 40, 231, 130, 77, 114, 11, 130, 179, 106, 80, 63, 188, 91, 131, 161, 155, 178, 184, 165, 18, 65, 86, 37, 191, 68, 22, 124, 104, 226, 67, 112, 168, 161, 75, 193, 83, 3, 135, 234, 82, 80, 49, 219, 185, 254, 215, 227, 38, 240, 147, 251, 131, 67, 242, 12, 75, 1, 104, 243, 236, 211, 101, 206, 103, 113, 130, 90, 250, 233, 27, 246, 135, 95, 20, 29, 243, 203, 166, 128, 208, 71, 136, 244, 51, 78, 143, 221, 150, 168, 7, 212, 6, 36, 40, 26, 28, 133, 119, 20, 101, 153, 244, 133, 67, 122, 86, 68, 85, 136, 178, 235, 53, 117, 17, 69, 220, 54, 166, 230, 99, 122, 220, 207, 235, 172, 13, 139, 25, 80, 60, 125, 99, 182, 23, 155, 179, 20, 25, 79, 237, 147, 71, 250, 89, 62, 28, 26, 97, 205, 119, 90, 211, 72, 229, 192, 108, 229, 146, 208, 138, 209, 61, 69, 221, 20, 185, 239, 19, 113, 51, 153, 171, 140, 28, 80, 118, 151, 16, 16, 39, 82, 250, 187, 37, 61, 143, 182, 97, 188, 45, 112, 223, 75, 241, 17, 130, 91, 73, 69, 225, 58, 12, 180, 183, 138, 176, 191, 54, 110, 99, 180, 26, 98, 117, 230, 117, 67, 209, 100, 160, 9, 132, 151, 161, 148, 69, 38, 135, 108, 150, 73, 30, 112, 247, 199, 20, 117, 184, 183, 233, 234, 183, 123, 214, 159, 73, 108, 32, 176, 209, 233, 172, 230, 212, 61, 229, 175, 139, 168, 95, 196, 76, 104, 114, 170, 213, 21, 88, 175, 247, 53, 249, 67, 19, 177, 160, 48, 225, 6, 152, 77, 118, 60, 108, 225, 24, 54, 244, 124, 141, 29, 46, 187, 105, 180, 252, 132, 213, 231, 56, 136, 8, 86, 126, 184, 108, 166, 103, 6, 215, 48, 85, 177, 151, 219, 47, 190, 249, 57, 221, 62, 60, 99, 56, 125, 19, 133, 78, 190, 105, 109, 121, 79, 254, 6, 129, 192, 138, 83, 212, 24, 137, 178, 237, 252, 156, 250, 15, 70, 165, 154, 112, 203, 119, 60, 254, 243, 151, 215, 143, 76, 45, 206, 173, 5, 158, 190, 55, 145, 12, 208, 231, 43, 80, 150, 225, 207, 88, 42, 10, 145, 19, 226, 154, 95, 136, 254, 45, 218, 154, 103, 93, 62, 22, 21, 202, 171, 236, 183, 40, 219, 104, 215, 85, 201, 111, 166, 130, 104, 169, 241, 122, 169, 4, 105, 136, 15, 23, 233, 211, 209, 170, 75, 199, 143, 38, 40, 172, 221, 14, 195, 65, 56, 79, 1, 123, 222, 8, 18, 38, 118, 73, 181, 223, 164, 177, 58, 157, 32, 236, 74, 68, 179, 204, 118, 142, 222, 21, 99, 44, 254, 75, 80, 249, 14, 168, 183, 149, 34, 103, 53, 180, 191, 161, 194, 51, 170, 93, 113, 72, 46, 18, 146, 215, 233, 90, 254, 167, 235, 113, 248, 246, 110, 36, 159, 172, 145, 235, 150, 218, 148, 183, 232, 99, 116, 90, 169, 7, 33, 75, 114, 6, 27, 47, 206, 166, 128, 251, 183, 246, 243, 166, 139, 71, 3, 88, 236, 111, 224, 87, 196, 78, 39, 85, 137, 216, 46, 172, 102, 22, 36, 15, 82, 144, 57, 149, 64, 128, 16, 133, 88, 131, 61, 86, 169, 16, 152, 69, 36, 8, 154, 117, 85, 244, 244, 190, 8, 123, 203, 167, 223, 113, 113, 220, 135, 125, 138, 161, 205, 244, 192, 166, 154, 240, 39, 13, 191, 194, 239, 83, 48, 159, 200, 29, 178, 147, 198, 121, 104, 32, 245, 94, 10, 34, 137, 161, 95, 39, 224, 115, 165, 67, 196, 79, 160, 75, 81, 201, 84, 76, 32, 68, 151, 222, 131, 62, 92, 51, 163, 20, 10, 36, 69, 52, 254, 7, 177, 237, 199, 168, 168, 38, 189, 56, 117, 142, 187, 22, 83, 250, 112, 23, 169, 156, 218, 44, 185, 65, 190, 43, 154, 25, 255, 234, 24, 82, 8, 196, 225, 15, 71, 145, 144, 9, 248, 49, 74, 179, 190, 47, 66, 169, 213, 112, 19, 43, 235, 136, 185, 128, 47, 250, 61, 168, 207, 216, 70, 175, 105, 236, 36, 105, 83, 54, 88, 201, 107, 0, 169, 197, 160, 117, 100, 245, 120, 88, 215, 22, 162, 7, 112, 148, 5, 218, 206, 99, 180, 114, 182, 171, 76, 18, 193, 53, 32, 59, 93, 199, 228, 11, 250, 148, 48, 99, 128, 255, 255, 26, 169, 35, 115, 6, 157, 46, 127, 250, 36, 59, 12, 243, 180, 46, 66, 132, 201, 245, 61, 43, 16, 111, 56, 14, 25, 132, 152, 15, 13, 152, 172, 241, 65, 69, 163, 129, 57, 198, 67, 10, 58, 119, 41, 118, 44, 55, 68, 112, 219, 20, 78, 73, 242, 138, 141, 134, 202, 49, 34, 185, 176, 181, 181, 78, 224, 68, 147, 45, 149, 231, 136, 64, 175, 76, 160, 196, 27, 81, 14, 206, 161, 165, 54, 227, 76, 143, 200, 106, 189, 55, 80, 48, 255, 102, 59, 6, 52, 196, 144, 226, 190, 191, 68, 147, 121, 62, 243, 56, 73, 172, 13, 126, 149, 106, 214, 28, 168, 39, 91, 247, 81, 33, 106, 165, 5, 123, 144, 117, 125, 50, 139, 114, 197, 196, 38, 53, 207, 74, 59, 70, 11, 117, 102, 18, 11, 93, 13, 83, 255, 203, 142, 73, 160, 122, 108, 95, 238, 32, 149, 0, 105, 114, 243, 162, 9, 128, 15, 110, 238, 34, 178, 240, 173, 37, 140, 6, 240, 37, 181, 236, 155, 92, 160, 184, 228, 20, 103, 201, 0, 156, 9, 31, 219, 193, 74, 222, 110, 240, 198, 22, 232, 112, 83, 155, 37, 223, 106, 196, 47, 51, 228, 226, 235, 6, 246, 112, 194, 106, 229, 81, 53, 58, 214, 216, 241, 156, 184, 37, 20, 145, 126, 146, 65, 177, 99, 214, 254, 58, 245, 127, 153, 54, 101, 197, 86, 113, 59, 108, 157, 66, 102, 120, 173, 64, 82, 244, 29, 143, 201, 246, 38, 239, 172, 105, 120, 145, 254, 114, 61, 227, 56, 71, 128, 77, 107, 65, 81, 210, 22, 176, 172, 102, 49, 32, 11, 141, 245, 168, 121, 250, 108, 33, 146, 57, 197, 82, 217, 179, 171, 14, 224, 222, 22, 56, 45, 66, 2, 73, 108, 78, 150, 158, 203, 48, 151, 22, 233, 209, 198, 113, 85, 151, 157, 17, 240, 238, 118, 218, 223, 0, 54, 251, 45, 2, 38, 54, 161, 55, 56, 173, 0, 132, 224, 61, 172, 32, 226, 140, 122, 96, 183, 227, 186, 176, 161, 203, 141, 112, 157, 142, 139, 146, 28, 113, 180, 89, 242, 218, 229, 84, 185, 105, 85, 198, 83, 108, 88, 53, 73, 85, 94, 152, 248, 208, 63, 241, 182, 92, 13, 242, 127, 221, 54, 8, 237, 226, 140, 89, 220, 248, 166, 153, 233, 40, 33, 235, 22, 27, 246, 112, 191, 161, 101, 111, 133, 60, 191, 43, 97, 133, 179, 102, 172, 123, 246, 127, 33, 41, 45, 12, 200, 114, 83, 143, 193, 137, 32, 208, 173, 154, 211, 108, 179, 243, 154, 28, 164, 178, 16, 27, 26, 1, 91, 148, 146, 150, 227, 22, 8, 185, 8, 195, 104, 67, 81, 166, 101, 128, 92, 208, 171, 12, 245, 118, 2, 90, 238, 204, 85, 122, 198, 215, 107, 23, 40, 145, 104, 164, 194, 15, 185, 155, 56, 182, 233, 180, 155, 91, 143, 239, 75, 78, 150, 44, 93, 146, 2, 244, 179, 57, 154, 28, 70, 92, 163, 10, 70, 128, 217, 148, 191, 204, 234, 20, 193, 216, 114, 128, 139, 104, 223, 233, 195, 254, 70, 120, 243, 96, 79, 88, 144, 118, 144, 246, 45, 242, 26, 165, 82, 61, 17, 117, 55, 168, 122, 150, 154, 62, 206, 169, 222, 122, 224, 171, 139, 162, 147, 227, 144, 107, 92, 52, 133, 115, 26, 176, 155, 251, 95, 48, 83, 235, 59, 141, 129, 147, 240, 170, 39, 198, 54, 237, 187, 109, 80, 55, 198, 192, 95, 51, 176, 7, 221, 175, 55, 160, 233, 47, 138, 35, 79, 251, 3, 175, 73, 243, 165, 35, 79, 68, 62, 55, 28, 34, 42, 77, 15, 8, 123, 136, 187, 100, 230, 76, 98, 202, 97, 161, 73, 11, 227, 128, 141, 93, 252, 131, 72, 251, 119, 11, 222, 155, 100, 118, 115, 164, 79, 88, 234, 141, 62, 172, 41, 42, 159, 128, 248, 57, 249, 161, 222, 151, 6, 249, 109, 170, 116, 197, 212, 46, 79, 129, 221, 124, 232, 175, 56, 67, 97, 68, 108, 172, 7, 133, 76, 14, 186, 244, 203, 169, 131, 97, 186, 98, 249, 6, 206, 1, 28, 175, 163, 135, 80, 241, 91, 41, 81, 140, 160, 61, 141, 96, 63, 229, 85, 157, 132, 249, 115, 17, 230, 147, 198, 130, 155, 161, 221, 11, 163, 130, 69, 24, 42, 232, 23, 180, 106, 118, 55, 232, 153, 135, 113, 80, 152, 193, 17, 81, 236, 250, 86, 53, 129, 172, 194, 252, 34, 178, 84, 153, 8, 116, 91, 145, 208, 0, 71, 108, 131, 143, 210, 215, 225, 66, 213, 39, 109, 39, 206, 235, 63, 239, 137, 118, 192, 112, 202, 147, 72, 26, 101, 223, 48, 192, 111, 235, 99, 178, 111, 155, 226, 37, 95, 142, 104, 69, 112, 43, 152, 32, 57, 150, 126, 218, 84, 52, 182, 235, 76, 177, 24, 70, 212, 113, 64, 252, 182, 160, 3, 159, 160, 171, 62, 95, 229, 33, 124, 89, 75, 111, 169, 104, 49, 158, 34, 49, 215, 61, 100, 197, 64, 16, 223, 196, 215, 181, 241, 1, 192, 241, 8, 126, 124, 132, 151, 107, 51, 57, 68, 42, 79, 15, 146, 242, 89, 24, 216, 74, 237, 142, 170, 101, 225, 186, 57, 207, 72, 15, 158, 142, 115, 114, 189, 150, 132, 159, 83, 199, 146, 11, 123, 75, 30, 36, 238, 215, 112, 104, 168, 2, 89, 53, 60, 188, 123, 226, 149, 110, 123, 61, 20, 241, 34, 208, 155, 176, 121, 74, 203, 2, 246, 65, 225, 90, 68, 116, 183, 127, 32, 43, 227, 221, 248, 202, 128, 239, 38, 145, 160, 10, 100, 104, 52, 250, 246, 231, 236, 2, 198, 207, 231, 221, 213, 198, 106, 140, 110, 230, 153, 156, 113, 241, 117, 107, 194, 69, 240, 35, 214, 198, 217, 147, 117, 134, 170, 83, 220, 162, 108, 3, 135, 134, 114, 77, 244, 190, 25, 98, 29, 157, 242, 54, 67, 182, 164, 252, 248, 13, 209, 231, 41, 119, 234, 63, 94, 123, 169, 5, 176, 197, 224, 185, 211, 70, 40, 196, 123, 252, 46, 185, 67, 90, 186, 142, 43, 10, 71, 19, 173, 1, 141, 134, 226, 126, 53, 42, 14, 26, 217, 177, 5, 100, 239, 183, 22, 168, 20, 62, 48, 142, 24, 91, 126, 194, 80, 41, 160, 175, 106, 116, 87, 73, 185, 147, 93, 54, 198, 252, 54, 180, 213, 84, 182, 177, 53, 7, 81, 67, 96, 137, 114, 84, 218, 245, 188, 115, 92, 228, 63, 148, 180, 122, 86, 206, 115, 136, 123, 139, 130, 73, 157, 118, 221, 100, 7, 169, 195, 101, 143, 230, 40, 221, 237, 195, 160, 24, 144, 173, 166, 0, 254, 169, 16, 57, 83, 133, 0, 217, 131, 201, 170, 106, 4, 175, 217, 250, 149, 16, 203, 130, 64, 76, 44, 230, 239, 214, 35, 41, 184, 223, 125, 55, 248, 184, 11, 248, 57, 93, 54, 146, 73, 219, 87, 250, 129, 84, 59, 47, 135, 140, 239, 51, 117, 97, 118, 122, 172, 99, 45, 5, 220, 186, 113, 12, 237, 152, 177, 28, 173, 181, 5, 87, 64, 251, 30, 41, 14, 30, 52, 251, 182, 169, 79, 80, 39, 144, 109, 164, 39, 159, 57, 139, 42, 224, 104, 83, 147, 213, 53, 157, 66, 85, 75, 111, 184, 85, 1, 84, 73, 11, 179, 230, 143, 16, 214, 147, 250, 53, 216, 171, 64, 158, 29, 94, 232, 50, 124, 45, 152, 157, 73, 204, 156, 3, 27, 181, 7, 166, 164, 92, 206, 32, 231, 121, 148, 134, 229, 180, 82, 193, 180, 87, 186, 168, 170, 144, 120, 243, 236, 209, 236, 48, 152, 121, 170, 175, 34, 97, 60, 7, 236, 179, 153, 127, 212, 66, 52, 190, 23, 122, 17, 110, 2, 37, 141, 249, 122, 172, 255, 77, 156, 74, 138, 188, 224, 87, 25, 11, 241, 222, 29, 80, 169, 209, 104, 2, 212, 160, 28, 123, 227, 61, 66, 139, 11, 247, 123, 232, 177, 230, 163, 59, 149, 150, 73, 179, 252, 107, 162, 61, 108, 3, 73, 70, 131, 191, 227, 101, 213, 30, 246, 222, 162, 150, 250, 6, 238, 169, 215, 85, 46, 202, 174, 25, 123, 125, 200, 108, 72, 215, 5, 99, 84, 252, 214, 118, 50, 146, 175, 42, 180, 88, 32, 191, 110, 78, 190, 73, 45, 81, 41, 163, 168, 140, 72, 27, 95, 51, 33, 125, 29, 184, 206, 238, 42, 8, 63, 123, 34, 168, 127, 143, 24, 76, 25, 116, 100, 35, 37, 78, 242, 243, 41, 147, 56, 242, 100, 216, 167, 217, 184, 99, 129, 96, 89, 90, 68, 108, 113, 9, 160, 7, 5, 79, 204, 226, 23, 194, 127, 125, 244, 149, 39, 46, 227, 26, 159, 77, 15, 60, 119, 30, 160, 40, 145, 116, 193, 169, 3, 164, 186, 113, 99, 73, 5, 243, 238, 47, 153, 218, 99, 176, 119, 70, 30, 44, 52, 200, 126, 32, 33, 28, 154, 5, 185, 131, 203, 47, 56, 127, 55, 151, 86, 3, 143, 66, 120, 238, 33, 184, 23, 27, 33, 180, 238, 203, 82, 218, 64, 9, 125, 0, 67, 182, 152, 255, 67, 33, 159, 158, 91, 139, 189, 241, 107, 24, 110, 46, 30, 193, 174, 134, 5, 168, 131, 144, 152, 216, 246, 197, 87, 207, 55, 26, 158, 179, 233, 35, 114, 57, 201, 234, 174, 254, 229, 93, 133, 9, 183, 170, 217, 2, 248, 209, 113, 70, 162, 81, 255, 168, 118, 208, 235, 138, 141, 37, 125, 99, 28, 82, 228, 159, 26, 40, 75, 67, 18, 203, 177, 162, 230, 225, 55, 218, 234, 239, 123, 39, 163, 84, 229, 226, 162, 159, 142, 134, 44, 204, 48, 141, 253, 201, 208, 79, 109, 209, 159, 8, 97, 139, 14, 70, 234, 207, 5, 91, 245, 38, 42, 196, 10, 52, 230, 167, 210, 205, 182, 117, 195, 29, 186, 67, 185, 197, 212, 16, 252, 35, 212, 93, 85, 68, 92, 130, 221, 140, 177, 16, 248, 8, 106, 112, 159, 139, 238, 223, 170, 245, 44, 155, 147, 136, 63, 110, 128, 162, 115, 208, 156, 79, 177, 95, 128, 216, 55, 251, 58, 101, 146, 102, 98, 227, 5, 28, 153, 110, 137, 121, 125, 82, 116, 233, 209, 28, 155, 222, 206, 95, 221, 249, 16, 81, 70, 183, 72, 249, 230, 36, 137, 197, 166, 173, 184, 222, 31, 147, 251, 159, 140, 103, 187, 125, 51, 198, 248, 87, 79, 67, 180, 14, 249, 183, 148, 51, 121, 111, 14, 27, 46, 13, 58, 186, 74, 242, 185, 123, 75, 201, 101, 43, 250, 28, 77, 67, 125, 168, 120, 215, 106, 17, 193, 43, 175, 242, 39, 74, 205, 111, 165, 139, 162, 61, 75, 240, 45, 27, 58, 199, 190, 175, 151, 26, 247, 76, 234, 169, 183, 245, 127, 220, 129, 48, 254, 94, 128, 107, 125, 180, 68, 96, 24, 103, 175, 144, 157, 231, 185, 34, 218, 153, 212, 49, 255, 222, 160, 93, 55, 83, 212, 13, 111, 152, 95, 175, 25, 97, 70, 74, 104, 53, 215, 209, 152, 57, 102, 105, 1, 218, 213, 239, 192, 81, 134, 21, 24, 107, 34, 105, 5, 145, 54, 17, 178, 37, 89, 248, 237, 226, 188, 229, 40, 216, 174, 58, 148, 204, 175, 100, 142, 142, 68, 39, 135, 4, 226, 62, 71, 176, 137, 21, 240, 237, 56, 10, 160, 107, 193, 124, 18, 94, 199, 179, 237, 211, 41, 148, 75, 3, 21, 108, 215, 27, 180, 8, 72, 85, 118, 250, 10, 178, 224, 132, 179, 122, 188, 65, 4, 138, 162, 148, 193, 88, 131, 145, 208, 94, 234, 72, 168, 251, 6, 143, 210, 14, 138, 168, 11, 85, 210, 227, 3, 209, 13, 160, 116, 40, 22, 118, 192, 246, 224, 164, 27, 5, 218, 128, 136, 217, 67, 90, 227, 103, 76, 219, 80, 94, 254, 203, 130, 24, 49, 236, 235, 225, 221, 52, 45, 31, 31, 226, 54, 211, 4, 227, 36, 233, 88, 23, 239, 108, 63, 90, 86, 104, 68, 158, 167, 84, 192, 196, 189, 215, 83, 241, 194, 223, 92, 41, 8, 122, 42, 151, 60, 203, 76, 128, 234, 123, 79, 155, 216, 210, 98, 103, 197, 3, 85, 28, 100, 29, 25, 20, 202, 223, 160, 210, 63, 248, 227, 83, 165, 138, 199, 99, 241, 220, 16, 90, 60, 42, 171, 247, 213, 40, 88, 51, 181, 153, 152, 9, 194, 218, 61, 78, 186, 133, 11, 105, 138, 5, 239, 172, 122, 154, 177, 47, 66, 178, 139, 161, 189, 63, 9, 105, 248, 0, 27, 165, 181, 79, 60, 251, 205, 12, 246, 231, 199, 32, 62, 234, 81, 218, 229, 42, 75, 37, 18, 57, 204, 53, 231, 55, 182, 145, 95, 226, 232, 169, 216, 21, 185, 167, 81, 141, 24, 46, 126, 23, 178, 115, 224, 175, 169, 84, 143, 146, 194, 150, 152, 77, 47, 182, 175, 95, 218, 17, 210, 122, 64, 3, 131, 62, 143, 141, 192, 197, 72, 8, 239, 82, 84, 205, 165, 184, 97, 255, 100, 50, 61, 213, 42, 19, 107, 118, 69, 246, 3, 67, 44, 66, 98, 34, 255, 201, 205, 59, 93, 128, 199, 148, 123, 251, 6, 37, 128, 138, 82, 62, 165, 32, 69, 147, 99, 221, 20, 102, 159, 204, 211, 119, 17, 199, 192, 70, 225, 35, 22, 196, 46, 231, 133, 183, 184, 96, 116, 140, 162, 237, 155, 183, 135, 7, 194, 57, 82, 131, 121, 93, 50, 19, 242, 170, 201, 113, 219, 223, 60, 208, 177, 71, 138, 154, 229, 171, 244, 192, 114, 109, 103, 120, 63, 88, 120, 209, 57, 128, 180, 122, 14, 224, 80, 89, 62, 73, 158, 50, 43, 148, 105, 64, 23, 37, 32, 159, 154, 158, 230, 158, 16, 116, 247, 21, 48, 137, 247, 69, 55, 60, 90, 32, 225, 158, 9, 235, 241, 229, 93, 157, 100, 236, 125, 156, 84, 126, 6, 80, 217, 70, 17, 1, 166, 4, 98, 217, 166, 106, 252, 160, 8, 54, 213, 35, 120, 10, 118, 99, 135, 139, 53, 6, 3, 119, 189, 158, 246, 151, 97, 132, 150, 140, 214, 230, 185, 76, 113, 77, 212, 197, 162, 249, 237, 33, 9, 46, 38, 192, 153, 41, 151, 175, 145, 166, 19, 63, 132, 11, 5, 68, 245, 89, 22, 220, 231, 232, 135, 220, 114, 2, 194, 88, 177, 39, 253, 195, 165, 140, 216, 186, 89, 23, 131, 253, 68, 146, 156, 135, 84, 84, 4, 30, 153, 151, 55, 3, 176, 121, 7, 97, 9, 44, 104, 71, 100, 26, 185, 187, 200, 175, 211, 14, 9, 222, 107, 79, 184, 230, 201, 151, 253, 35, 184, 7, 241, 50, 182, 37, 177, 183, 90, 100, 250, 87, 202, 180, 76, 28, 84, 11, 101, 255, 50, 180, 95, 89, 161, 9, 25, 55, 250, 96, 224, 109, 45, 147, 4, 160, 142, 99, 246, 182, 6, 18, 250, 251, 143, 97, 218, 206, 157, 106, 210, 222, 42, 110, 216, 136, 109, 165, 199, 232, 215, 158, 22, 88, 183, 8, 33, 111, 19, 60, 15, 83, 89, 79, 194, 77, 231, 63, 7, 210, 142, 233, 1, 179, 149, 137, 194, 170, 241, 90, 201, 94, 55, 185, 240, 223, 125, 238, 200, 178, 222, 186, 135, 87, 51, 148, 218, 223, 166, 144, 190, 58, 76, 17, 65, 184, 208, 247, 146, 159, 202, 242, 77, 105, 186, 241, 21, 211, 150, 225, 67, 164, 81, 255, 10, 82, 39, 241, 228, 234, 240, 22, 7, 196, 62, 25, 31, 77, 28, 50, 65, 51, 85, 160, 72, 236, 111, 127, 170, 236, 196, 147, 169, 241, 134, 191, 246, 156, 164, 17, 125, 176, 208, 223, 136, 112, 237, 57, 194, 126, 62, 85, 178, 174, 28, 27, 39, 99, 247, 220, 185, 199, 148, 198, 233, 47, 135, 87, 146, 91, 152, 61, 36, 97, 3, 253, 163, 115, 184, 217, 60, 245, 115, 48, 72, 48, 139, 185, 57, 163, 112, 100, 243, 232, 216, 140, 237, 33, 185, 111, 36, 165, 170, 252, 22, 99, 254, 50, 63, 157, 46, 151, 198, 17, 210, 6, 10, 76, 250, 150, 131, 41, 160, 107, 142, 251, 27, 171, 160, 204, 179, 233, 71, 100, 198, 122, 42, 177, 183, 103, 37, 10, 218, 140, 87, 41, 82, 150, 199, 83, 101, 32, 213, 95, 38, 46, 109, 118, 159, 179, 167, 138, 143, 111, 19, 99, 117, 162, 195, 95, 166, 253, 188, 119, 43, 51, 56, 247, 222, 248, 194, 14, 104, 9, 222, 120, 145, 108, 6, 152, 213, 241, 101, 148, 77, 205, 38, 51, 225, 7, 193, 140, 189, 23, 216, 142, 124, 3, 4, 62, 195, 194, 139, 156, 224, 35, 113, 152, 20, 36, 88, 149, 99, 124, 38, 84, 168, 136, 139, 132, 245, 100, 236, 218, 121, 215, 52, 221, 104, 3, 114, 12, 172, 18, 155, 146, 226, 126, 166, 109, 198, 131, 5, 221, 212, 6, 237, 67, 150, 163, 249, 7, 102, 206, 216, 209, 71, 234, 225, 20, 147, 129, 178, 84, 210, 226, 201, 135, 113, 225, 223, 3, 101, 204, 224, 85, 15, 30, 77, 100, 155, 207, 110, 15, 210, 76, 176, 156, 168, 160, 9, 185, 114, 3, 157, 79, 146, 13, 208, 3, 202, 26, 102, 141, 139, 7, 45, 86, 14, 117, 112, 203, 185, 63, 141, 132, 141, 65, 184, 19, 58, 238, 250, 41, 253, 176, 143, 149, 162, 140, 77, 127, 246, 251, 149, 144, 180, 209, 139, 57, 151, 174, 50, 158, 182, 175, 176, 250, 180, 95, 88, 143, 1, 56, 149, 223, 67, 67, 7, 0, 88, 84, 204, 36, 63, 117, 47, 167, 95, 124, 254, 51, 53, 96, 123, 43, 175, 203, 226, 229, 77, 155, 65, 90, 132, 179, 19, 203, 205, 139, 159, 42, 66, 233, 96, 102, 237, 8, 111, 239, 228, 167, 135, 56, 208, 214, 193, 95, 178, 223, 16, 6, 53, 97, 93, 193, 45, 126, 29, 244, 205, 131, 2, 212, 215, 88, 101, 134, 77, 219, 25, 44, 113, 134, 122, 66, 217, 29, 150, 73, 23, 240, 239, 176, 28, 153, 69, 29, 46, 103, 227, 85, 112, 68, 216, 31, 252, 114, 152, 37, 226, 178, 179, 169, 118, 2, 82, 55, 255, 241, 154, 53, 49, 237, 238, 1, 103, 9, 45, 15, 99, 46, 48, 187, 33, 102, 125, 135, 214, 200, 13, 80, 75, 80, 110, 30, 120, 232, 175, 66, 216, 78, 91, 105, 45, 221, 86, 22, 163, 18, 5, 193, 112, 99, 189, 142, 245, 35, 16, 155, 159, 220, 22, 141, 106, 77, 11, 24, 207, 223, 85, 41, 173, 116, 255, 95, 254, 193, 131, 19, 65, 216, 100, 34, 9, 123, 68, 142, 253, 4, 160, 24, 218, 51, 97, 213, 5, 9, 91, 227, 118, 218, 29, 94, 248, 135, 62, 86, 16, 235, 115, 101, 32, 131, 241, 148, 216, 110, 73, 189, 165, 220, 246, 11, 228, 20, 115, 247, 25, 200, 62, 57, 171, 36, 171, 55, 67, 101, 189, 44, 209, 80, 27, 210, 149, 138, 130, 102, 202, 25, 132, 32, 112, 62, 37, 17, 198, 201, 193, 167, 64, 45, 67, 113, 238, 101, 99, 61, 46, 108, 166, 163, 112, 188, 204, 60, 235, 4, 235, 18, 165, 194, 83, 190, 90, 196, 135, 120, 170, 115, 160, 48, 138, 35, 191, 80, 42, 129, 201, 35, 252, 156, 222, 46, 150, 239, 110, 125, 218, 187, 182, 62, 180, 49, 230, 142, 2, 172, 241, 240, 108, 60, 1, 183, 18, 157, 172, 1, 81, 208, 136, 82, 134, 90, 25, 79, 87, 116, 187, 97, 143, 157, 238, 71, 138, 254, 194, 247, 97, 217, 246, 213, 84, 83, 184, 15, 237, 195, 182, 132, 202, 67, 84, 43, 209, 251, 197, 7, 187, 109, 93, 120, 125, 56, 56, 245, 151, 23, 34, 252, 34, 114, 52, 211, 157, 25, 175, 28, 118, 65, 71, 241, 121, 109, 52, 106, 158, 245, 206, 138, 214, 180, 156, 254, 4, 130, 115, 169, 127, 45, 237, 208, 120, 3, 10, 117, 88, 24, 155, 59, 209, 186, 31, 123, 233, 2, 28, 51, 56, 240, 158, 112, 225, 187, 239, 214, 162, 35, 143, 206, 50, 152, 50, 30, 43, 13, 60, 144, 4, 161, 216, 58, 22, 110, 153, 48, 205, 46, 199, 182, 54, 197, 9, 101, 164, 209, 64, 59, 57, 185, 160, 142, 243, 30, 242, 227, 211, 29, 193, 126, 44, 92, 212, 94, 150, 147, 236, 61, 9, 26, 201, 59, 218, 194, 59, 26, 14, 215, 24, 238, 165, 59, 28, 116, 108, 35, 156, 227, 63, 53, 145, 127, 140, 116, 107, 33, 53, 238, 161, 176, 99, 127, 40, 200, 158, 235, 13, 110, 247, 237, 52, 206, 118, 131, 212, 39, 62, 186, 48, 42, 77, 131, 48, 129, 179, 106, 7, 126, 8, 183, 66, 80, 175, 145, 192, 54, 218, 244, 245, 69, 32, 233, 158, 108, 68, 209, 132, 244, 209, 95, 246, 103, 55, 98, 88, 53, 154, 124, 159, 1, 170, 150, 161, 173, 112, 53, 230, 201, 121, 242, 198, 107, 169, 158, 24, 107, 155, 90, 179, 175, 228, 8, 158, 66, 92, 119, 103, 114, 65, 151, 36, 108, 184, 52, 220, 48, 54, 54, 88, 60, 62, 206, 48, 59, 115, 16, 188, 254, 208, 75, 184, 234, 238, 29, 27, 220, 120, 166, 72, 58, 78, 194, 6, 53, 180, 160, 113, 43, 43, 105, 142, 168, 206, 204, 116, 15, 231, 219, 141, 188, 163, 83, 234, 183, 85, 127, 7, 23, 17, 10, 227, 156, 201, 129, 158, 78, 128, 92, 29, 109, 131, 166, 93, 72, 206, 98, 55, 244, 166, 147, 222, 94, 5, 134, 175, 84, 222, 61, 24, 152, 247, 129, 119, 175, 198, 190, 192, 135, 89, 153, 157, 92, 195, 36, 48, 46, 246, 82, 217, 254, 53, 208, 204, 221, 47, 194, 62, 116, 244, 229, 130, 171, 107, 204, 58, 4, 33, 132, 89, 58, 78, 103, 110, 20, 102, 70, 235, 194, 102, 5, 76, 144, 107, 57, 144, 66, 170, 116, 17, 95, 190, 135, 72, 139, 133, 219, 197, 61, 218, 8, 182, 215, 207, 135, 151, 181, 3, 13, 159, 17, 171, 8, 167, 119, 215, 97, 154, 167, 251, 54, 16, 134, 203, 238, 7, 50, 50, 55, 63, 152, 108, 203, 159, 223, 2, 126, 143, 176, 83, 86, 75, 160, 6, 159, 181, 198, 47, 203, 79, 153, 160, 191, 212, 216, 105, 212, 193, 149, 175, 94, 29, 237, 222, 4, 183, 12, 178, 188, 87, 107, 198, 95, 102, 106, 224, 127, 115, 106, 78, 134, 241, 35, 204, 159, 134, 61, 50, 4, 250, 18, 4, 192, 14, 174, 229, 213, 7, 195, 85, 60, 94, 1, 139, 97, 170, 177, 25, 240, 99, 247, 147, 158, 245, 5, 119, 76, 18, 32, 159, 12, 3, 82, 241, 90, 47, 140, 122, 42, 222, 230, 140, 146, 16, 136, 71, 180, 60, 15, 35, 61, 107, 68, 34, 103, 28, 1, 233, 53, 249, 77, 91, 17, 0, 79, 160, 137, 155, 23, 58, 194, 92, 243, 43, 22, 225, 6, 123, 62, 87, 152, 201, 111, 30, 161, 48, 201, 32, 126, 138, 254, 231, 14, 35, 57, 66, 81, 162, 15, 91, 125, 34, 61, 99, 242, 7, 90, 203, 160, 64, 140, 178, 65, 150, 190, 74, 22, 243, 17, 72, 29, 198, 141, 251, 26, 192, 202, 227, 96, 240, 58, 1, 138, 253, 54, 29, 119, 169, 35, 201, 1, 91, 87, 81, 114, 251, 112, 189, 170, 248, 14, 218, 147, 206, 67, 133, 236, 240, 252, 221, 11, 167, 115, 90, 29, 87, 177, 167, 42, 43, 133, 148, 189, 120, 241, 93, 220, 70, 201, 76, 52, 210, 237, 239, 222, 140, 10, 144, 169, 44, 54, 76, 40, 59, 18, 242, 111, 93, 66, 202, 194, 239, 222, 39, 148, 10, 42, 201, 161, 7, 171, 51, 240, 161, 65, 129, 98, 165, 181, 24, 61, 188, 220, 68, 88, 11, 4, 40, 201, 182, 116, 199, 82, 39, 83, 254, 53, 239, 123, 235, 26, 5, 220, 165, 63, 228, 250, 98, 229, 102, 192, 230, 157, 152, 215, 252, 68, 234, 70, 110, 9, 203, 134, 244, 171, 74, 10, 101, 208, 85, 24, 6, 104, 47, 18, 225, 159, 87, 92, 118, 130, 38, 184, 247, 234, 166, 110, 213, 44, 108, 140, 251, 72, 33, 240, 182, 3, 91, 35, 249, 245, 46, 185, 82, 153, 151, 211, 75, 149, 125, 166, 23, 28, 230, 19, 158, 234, 113, 30, 146, 200, 168, 203, 185, 239, 32, 180, 103, 54, 160, 78, 229, 77, 135, 28, 141, 124, 191, 34, 162, 220, 148, 190, 250, 63, 182, 197, 52, 1, 150, 35, 14, 87, 225, 112, 84, 94, 213, 202, 177, 214, 103, 130, 13, 167, 225, 147, 97, 27, 91, 124, 2, 227, 234, 173, 136, 68, 115, 99, 45, 216, 186, 84, 146, 111, 79, 134, 74, 178, 162, 198, 230, 122, 129, 153, 156, 21, 158, 249, 2, 178, 171, 57, 102, 135, 11, 255, 174, 254, 222, 204, 9, 125, 111, 92, 88, 46, 223, 43, 216, 64, 33, 202, 106, 115, 87, 225, 160, 248, 238, 26, 46, 127, 125, 59, 172, 84, 19, 177, 95, 153, 210, 181, 25, 142, 38, 184, 28, 68, 215, 55, 32, 106, 129, 81, 122, 20, 12, 213, 115, 193, 146, 162, 201, 235, 138, 118, 176, 235, 174, 123, 70, 8, 170, 147, 122, 225, 176, 0, 21, 114, 134, 203, 159, 50, 49, 42, 203, 58, 173, 27, 209, 16, 48, 146, 237, 208, 226, 206, 33, 18, 176, 71, 193, 189, 148, 77, 221, 193, 153, 133, 42, 197, 84, 170, 184, 93, 81, 101, 60, 147, 217, 100, 178, 105, 79, 136, 52, 186, 35, 92, 130, 1, 23, 113, 76, 58, 34, 160, 222, 237, 134, 46, 164, 244, 214, 207, 157, 255, 188, 99, 73, 169, 11, 179, 253, 135, 100, 15, 88, 200, 54, 147, 30, 142, 55, 150, 217, 144, 75, 37, 95, 122, 97, 72, 93, 145, 192, 164, 102, 215, 212, 217, 140, 223, 223, 160, 80, 129, 220, 12, 119, 170, 216, 118, 101, 228, 54, 14, 101, 156, 182, 75, 50, 169, 136, 86, 49, 22, 225, 52, 205, 46, 170, 12, 193, 48, 98, 84, 211, 124, 121, 95, 114, 179, 255, 44, 61, 51, 152, 213, 116, 182, 83, 131, 27, 61, 156, 65, 86, 72, 23, 5, 96, 215, 67, 86, 55, 97, 233, 11, 42, 55, 223, 168, 179, 89, 0, 183, 232, 153, 139, 68, 122, 150, 30, 37, 102, 180, 127, 19, 91, 48, 106, 214, 146, 97, 19, 150, 222, 3, 192, 105, 126, 221, 194, 4, 51, 127, 233, 225, 86, 219, 135, 45, 162, 38, 80, 181, 28, 229, 171, 94, 141, 11, 54, 17, 225, 191, 156, 30, 14, 179, 226, 106, 31, 87, 192, 253, 164, 234, 139, 215, 147, 59, 116, 116, 171, 193, 199, 235, 137, 186, 113, 158, 164, 108, 41, 8, 8, 180, 173, 192, 132, 210, 213, 93, 48, 171, 26, 211, 180, 219, 107, 217, 149, 183, 176, 197, 35, 55, 197, 53, 116, 150, 196, 50, 128, 59, 136, 217, 197, 185, 182, 197, 6, 105, 63, 159, 197, 71, 78, 154, 27, 149, 12, 31, 135, 135, 158, 191, 133, 231, 111, 82, 197, 236, 235, 34, 166, 111, 76, 33, 28, 43, 80, 121, 201, 220, 180, 99, 0, 192, 148, 93, 31, 224, 51, 97, 155, 254, 219, 45, 227, 209, 57, 224, 53, 234, 68, 10, 80, 131, 158, 223, 128, 177, 176, 193, 197, 11, 190, 115, 39, 64, 252, 243, 225, 57, 97, 168, 73, 70, 77, 39, 30, 64, 222, 208, 189, 245, 45, 119, 94, 222, 244, 197, 148, 98, 58, 241, 82, 160, 21, 115, 50, 232, 131, 23, 142, 3, 40, 170, 22, 222, 73, 57, 66, 211, 156, 66, 226, 88, 100, 245, 20, 10, 50, 199, 63, 159, 107, 213, 204, 41, 132, 251, 185, 77, 37, 30, 203, 110, 239, 219, 60, 21, 137, 64, 198, 82, 16, 174, 11, 102, 197, 240, 191, 99, 168, 143, 83, 129, 40, 36, 111, 14, 97, 5, 183, 38, 104, 30, 252, 213, 146, 189, 33, 41, 243, 234, 10, 73, 186, 36, 30, 210, 204, 210, 138, 44, 203, 112, 53, 228, 122, 38, 169, 209, 10, 48, 212, 118, 243, 17, 212, 152, 253, 64, 156, 208, 171, 79, 22, 15, 141, 86, 60, 160, 144, 151, 183, 118, 138, 57, 127, 74, 139, 233, 212, 100, 71, 110, 51, 64, 255, 200, 65, 87, 197, 129, 121, 111, 241, 152, 31, 137, 163, 48, 166, 7, 102, 239, 205, 198, 141, 219, 124, 7, 68, 63, 60, 17, 120, 157, 118, 19, 245, 27, 161, 109, 221, 138, 50, 195, 247, 13, 92, 206, 87, 210, 31, 112, 248, 130, 117, 21, 134, 70, 85, 193, 151, 58, 215, 86, 239, 97, 4, 192, 248, 240, 189, 231, 89, 172, 91, 171, 72, 183, 190, 54, 65, 130, 194, 125, 207, 97, 245, 179, 137, 56, 79, 249, 144, 116, 142, 74, 48, 96, 152, 28, 28, 168, 82, 205, 102, 188, 149, 161, 42, 71, 197, 1, 118, 70, 214, 99, 211, 11, 255, 168, 162, 47, 46, 157, 48, 84, 233, 207, 218, 149, 113, 199, 155, 63, 81, 187, 187, 75, 107, 144, 27, 235, 137, 124, 14, 98, 57, 123, 216, 142, 167, 138, 9, 193, 41, 174, 106, 145, 160, 168, 170, 142, 196, 39, 55, 241, 187, 243, 228, 208, 240, 232, 158, 11, 100, 127, 224, 0, 203, 183, 185, 66, 87, 145, 64, 116, 130, 155, 15, 245, 66, 131, 26, 41, 178, 111, 53, 168, 79, 140, 31, 21, 226, 105, 19, 69, 156, 20, 221, 158, 11, 14, 229, 156, 35, 124, 170, 74, 58, 204, 113, 52, 15, 94, 72, 220, 0, 114, 207, 120, 3, 19, 245, 2, 225, 77, 11, 235, 226, 215, 47, 201, 40, 38, 42, 35, 46, 192, 22, 119, 51, 81, 1, 98, 135, 47, 110, 128, 164, 176, 197, 239, 29, 60, 92, 27, 210, 58, 209, 27, 147, 85, 22, 239, 165, 96, 163, 37, 229, 88, 50, 32, 105, 223, 57, 143, 152, 89, 56, 108, 251, 72, 58, 177, 18, 194, 225, 236, 78, 198, 105, 105, 18, 251, 239, 208, 107, 57, 105, 158, 225, 48, 228, 205, 157, 20, 138, 246, 163, 89, 81, 218, 32, 202, 200, 238, 0, 12, 206, 213, 38, 71, 163, 154, 147, 125, 163, 254, 162, 28, 177, 120, 92, 183, 70, 229, 117, 149, 62, 145, 88, 85, 107, 247, 74, 145, 119, 11, 162, 218, 224, 44, 187, 111, 61, 193, 46, 139, 51, 170, 252, 149, 159, 163, 111, 224, 76, 160, 213, 173, 54, 33, 76, 132, 121, 159, 248, 192, 143, 60, 183, 85, 96, 14, 171, 86, 144, 210, 128, 88, 24, 142, 85, 141, 221, 63, 54, 229, 84, 18, 251, 40, 44, 165, 253, 112, 134, 40, 145, 140, 233, 87, 87, 97, 167, 234, 230, 44, 216, 132, 104, 142, 52, 150, 36, 40, 9, 81, 77, 206, 88, 4, 143, 69, 32, 45, 45, 79, 81, 237, 5, 174, 79, 71, 112, 125, 90, 160, 3, 253, 235, 125, 120, 126, 233, 158, 40, 106, 248, 80, 217, 89, 111, 61, 12, 72, 184, 152, 65, 155, 112, 146, 24, 160, 198, 183, 146, 29, 23, 8, 150, 148, 255, 186, 223, 0, 74, 19, 93, 50, 201, 173, 23, 84, 160, 138, 245, 186, 177, 138, 118, 254, 216, 53, 69, 159, 220, 57, 76, 65, 148, 108, 201, 67, 233, 94, 49, 237, 42, 57, 110, 184, 100, 252, 222, 5, 20, 92, 7, 90, 187, 200, 165, 10, 123, 1, 209, 86, 69, 139, 215, 51, 220, 108, 24, 142, 154, 253, 215, 249, 209, 108, 100, 158, 118, 74, 134, 69, 249, 235, 59, 232, 176, 228, 54, 127, 133, 77, 103, 157, 239, 248, 139, 120, 161, 120, 123, 58, 187, 219, 103, 249, 35, 106, 62, 44, 239, 113, 48, 161, 245, 115, 79, 92, 186, 145, 192, 159, 111, 216, 14, 42, 85, 15, 231, 21, 226, 202, 68, 14, 62, 113, 146, 73, 71, 211, 7, 16, 183, 230, 26, 82, 185, 222, 136, 208, 158, 181, 71, 107, 136, 6, 182, 254, 94, 227, 74, 136, 191, 247, 174, 6, 211, 155, 131, 121, 34, 147, 199, 45, 31, 251, 153, 202, 43, 242, 145, 74, 22, 16, 189, 154, 64, 223, 206, 226, 17, 208, 168, 195, 79, 198, 38, 137, 18, 205, 163, 31, 202, 0, 64, 227, 27, 175, 127, 244, 185, 193, 103, 138, 18, 38, 245, 87, 181, 72, 87, 143, 181, 161, 187, 181, 190, 94, 32, 153, 71, 159, 140, 12, 255, 104, 181, 220, 110, 22, 85, 155, 221, 94, 56, 66, 151, 197, 119, 221, 195, 246, 20, 91, 93, 246, 199, 99, 56, 234, 147, 221, 49, 201, 65, 45, 22, 82, 140, 171, 79, 233, 105, 51, 147, 116, 154, 47, 189, 75, 135, 239, 211, 55, 17, 45, 80, 217, 255, 202, 28, 204, 105, 187, 171, 124, 103, 102, 79, 35, 192, 138, 108, 45, 205, 231, 63, 137, 55, 5, 44, 36, 218, 46, 55, 23, 83, 31, 33, 98, 145, 17, 132, 222, 170, 145, 89, 23, 79, 222, 227, 248, 58, 233, 215, 96, 101, 237, 224, 57, 140, 54, 96, 241, 242, 142, 23, 108, 112, 60, 90, 206, 166, 80, 49, 182, 9, 232, 242, 199, 158, 122, 132, 144, 19, 163, 46, 52, 52, 82, 227, 248, 184, 11, 249, 4, 31, 171, 102, 150, 163, 18, 9, 142, 43, 192, 96, 166, 136, 131, 221, 137, 238, 205, 135, 135, 51, 61, 141, 30, 246, 69, 192, 151, 51, 95, 27, 21, 99, 36, 213, 220, 199, 143, 229, 187, 149, 212, 234, 67, 117, 129, 26, 238, 19, 178, 38, 119, 221, 158, 25, 15, 134, 213, 252, 54, 191, 201, 124, 156, 156, 64, 194, 195, 11, 74, 112, 199, 13, 103, 224, 90, 23, 27, 84, 199, 50, 143, 35, 55, 83, 20, 87, 139, 105, 126, 108, 130, 231, 188, 68, 236, 200, 230, 182, 92, 121, 70, 182, 53, 124, 190, 100, 244, 32, 60, 179, 179, 205, 136, 138, 74, 99, 182, 122, 20, 77, 61, 248, 76, 241, 124, 6, 129, 103, 64, 176, 45, 23, 35, 176, 94, 127, 157, 131, 151, 118, 147, 84, 123, 50, 223, 246, 227, 12, 84, 52, 229, 244, 102, 254, 134, 4, 137, 177, 186, 79, 173, 68, 22, 8, 237, 245, 199, 124, 170, 246, 152, 59, 116, 104, 94, 223, 89, 58, 163, 193, 75, 177, 220, 232, 34, 49, 70, 58, 16, 14, 126, 214, 214, 129, 213, 60, 102, 246, 78, 216, 17, 181, 64, 37, 68, 190, 196, 250, 117, 139, 46, 119, 190, 254, 129, 115, 7, 74, 22, 217, 17, 215, 250, 207, 27, 144, 225, 147, 243, 95, 149, 48, 212, 21, 39, 213, 139, 211, 54, 105, 90, 35, 30, 176, 248, 218, 233, 224, 29, 94, 12, 189, 127, 192, 234, 83, 204, 157, 12, 237, 55, 42, 251, 197, 152, 96, 123, 39, 183, 68, 159, 212, 96, 123, 193, 156, 19, 75, 224, 226, 208, 127, 110, 180, 39, 95, 185, 40, 134, 82, 36, 54, 108, 57, 92, 188, 169, 128, 207, 186, 17, 2, 94, 77, 48, 62, 168, 245, 155, 159, 58, 201, 239, 67, 80, 116, 239, 54, 207, 40, 168, 33, 72, 130, 234, 97, 165, 246, 186, 232, 1, 214, 47, 230, 202, 101, 81, 2, 26, 199, 8, 166, 104, 179, 195, 139, 77, 18, 136, 221, 127, 38, 178, 180, 32, 182, 70, 237, 11, 94, 101, 115, 127, 60, 83, 244, 200, 99, 68, 188, 17, 180, 117, 25, 213, 26, 253, 238, 95, 112, 179, 55, 63, 21, 216, 207, 254, 128, 6, 172, 88, 47, 74, 111, 52, 84, 21, 208, 250, 232, 110, 95, 136, 123, 190, 249, 87, 203, 166, 118, 22, 65, 143, 73, 162, 8, 119, 103, 136, 241, 20, 12, 100, 144, 226, 172, 81, 254, 135, 135, 150, 173, 198, 162, 49, 255, 221, 18, 204, 196, 246, 22, 165, 169, 30, 34, 82, 170, 60, 102, 9, 35, 180, 151, 251, 50, 173, 241, 226, 216, 119, 85, 207, 72, 106, 90, 134, 235, 46, 72, 34, 214, 239, 241, 12, 111, 16, 113, 19, 176, 19, 240, 141, 104, 17, 51, 128, 251, 47, 27, 179, 244, 24, 151, 228, 80, 188, 127, 254, 245, 20, 74, 146, 245, 202, 170, 136, 124, 14, 186, 201, 3, 51, 84, 111, 167, 165, 86, 3, 170, 91, 186, 222, 157, 218, 146, 214, 51, 146, 83, 117, 104, 242, 197, 53, 72, 144, 173, 241, 187, 159, 188, 193, 121, 87, 99, 123, 41, 211, 141, 87, 201, 77, 114, 10, 199, 3, 50, 234, 91, 250, 98, 101, 149, 217, 137, 59, 66, 100, 35, 74, 232, 102, 193, 51, 237, 181, 237, 227, 129, 255, 69, 173, 205, 203, 226, 19, 188, 129, 132, 201, 159, 132, 7, 168, 146, 142, 82, 27, 247, 58, 154, 5, 127, 99, 98, 143, 107, 145, 147, 148, 67, 217, 17, 92, 202, 109, 198, 246, 197, 181, 160, 26, 89, 167, 71, 32, 122, 58, 52, 132, 7, 2, 188, 131, 110, 95, 82, 58, 93, 231, 9, 154, 52, 233, 95, 236, 87, 252, 241, 115, 62, 150, 37, 253, 154, 245, 201, 165, 223, 91, 26, 95, 112, 11, 10, 249, 195, 122, 181, 206, 160, 186, 128, 182, 227, 228, 136, 28, 152, 87, 79, 204, 108, 76, 16, 162, 188, 221, 41, 202, 168, 32, 212, 22, 229, 248, 8, 155, 198, 121, 24, 167, 230, 6, 19, 188, 221, 72, 119, 172, 23, 205, 216, 49, 31, 134, 88, 69, 19, 96, 1, 105, 196, 122, 112, 215, 229, 199, 180, 36, 33, 42, 26, 121, 114, 31, 112, 232, 162, 79, 218, 149, 128, 253, 217, 187, 28, 29, 142, 187, 73, 118, 244, 51, 21, 90, 198, 225, 72, 225, 34, 58, 42, 166, 49, 157, 119, 208, 114, 238, 212, 151, 76, 146, 70, 221, 180, 60, 220, 52, 99, 183, 52, 52, 202, 2, 21, 72, 230, 49, 22, 5, 151, 105, 67, 153, 80, 227, 122, 74, 174, 156, 157, 95, 90, 19, 242, 123, 179, 182, 57, 248, 129, 77, 96, 231, 197, 93, 125, 110, 55, 80, 86, 23, 39, 168, 128, 97, 204, 36, 47, 83, 222, 94, 57, 4, 52, 163, 75, 97, 151, 52, 44, 96, 65, 70, 187, 218, 132, 200, 157, 95, 37, 102, 217, 114, 164, 73, 0, 197, 253, 31, 22, 181, 77, 211, 92, 68, 155, 168, 45, 17, 4, 40, 173, 53, 94, 49, 80, 142, 171, 0, 188, 61, 148, 159, 247, 146, 223, 134, 228, 78, 101, 221, 185, 254, 155, 112, 61, 109, 22, 34, 211, 105, 147, 94, 96, 50, 75, 105, 195, 174, 114, 80, 236, 73, 251, 238, 24, 216, 64, 46, 7, 184, 171, 3, 0, 89, 61, 133, 148, 6, 114, 172, 99, 38, 195, 50, 164, 156, 136, 154, 43, 54, 196, 217, 27, 226, 246, 22, 79, 100, 20, 72, 40, 154, 197, 207, 182, 84, 175, 218, 8, 250, 12, 184, 121, 84, 94, 244, 249, 169, 215, 21, 38, 176, 149, 170, 193, 155, 244, 57, 90, 46, 182, 159, 25, 232, 237, 115, 242, 42, 171, 12, 97, 105, 68, 252, 226, 249, 50, 239, 223, 149, 115, 87, 144, 147, 131, 183, 103, 129, 50, 73, 17, 220, 225, 67, 135, 17, 174, 162, 140, 89, 241, 6, 130, 97, 180, 4, 85, 55, 183, 116, 134, 65, 101, 235, 135, 135, 167, 136, 38, 190, 242, 247, 228, 217, 164, 42, 248, 108, 233, 179, 215, 43, 101, 210, 120, 76, 219, 44, 126, 201, 0, 117, 59, 143, 155, 44, 142, 14, 112, 245, 137, 204, 65, 126, 206, 242, 106, 66, 243, 234, 98, 214, 179, 196, 96, 178, 124, 48, 54, 2, 75, 190, 233, 148, 23, 87, 224, 68, 93, 148, 137, 30, 200, 117, 219, 23, 45, 4, 99, 171, 132, 166, 120, 4, 96, 113, 105, 251, 131, 104, 175, 58, 35, 86, 110, 104, 177, 96, 235, 120, 89, 69, 58, 183, 109, 113, 164, 101, 101, 213, 86, 201, 18, 189, 108, 2, 116, 119, 140, 251, 152, 139, 50, 255, 56, 163, 209, 57, 248], + [105, 10, 204, 16, 254, 3, 56, 185, 29, 220, 24, 86, 18, 153, 170, 195, 138, 96, 207, 146, 52, 234, 27, 88, 191, 144, 53, 151, 62, 231, 93, 185, 44, 186, 138, 160, 208, 145, 3, 72, 191, 206, 127, 18, 5, 118, 178, 190, 50, 36, 13, 154, 188, 243, 137, 31, 82, 138, 169, 215, 196, 4, 29, 138, 116, 118, 140, 104, 199, 126, 227, 172, 74, 45, 200, 105, 227, 228, 156, 129, 166, 97, 47, 211, 71, 24, 128, 146, 11, 104, 97, 166, 144, 168, 154, 196, 115, 15, 64, 107, 188, 4, 48, 214, 6, 238, 227, 65, 27, 21, 162, 144, 88, 240, 0, 154, 103, 97, 7, 145, 94, 168, 235, 241, 63, 178, 152, 92, 50, 48, 216, 52, 198, 183, 127, 143, 184, 121, 146, 193, 253, 247, 156, 155, 181, 136, 0, 62, 251, 7, 41, 214, 75, 166, 249, 80, 44, 103, 205, 240, 255, 218, 108, 103, 36, 242, 108, 7, 49, 151, 169, 23, 116, 16, 223, 141, 129, 5, 250, 209, 15, 134, 227, 119, 18, 56, 152, 182, 45, 79, 202, 77, 173, 222, 35, 148, 204, 29, 64, 100, 225, 153, 132, 75, 39, 225, 150, 130, 205, 216, 130, 162, 119, 77, 137, 147, 222, 175, 224, 115, 116, 231, 205, 48, 139, 179, 146, 64, 6, 211, 254, 181, 50, 73, 248, 243, 223, 65, 172, 175, 186, 15, 3, 55, 169, 149, 112, 60, 54, 58, 219, 216, 75, 86, 113, 201, 21, 94, 208, 92, 152, 93, 192, 61, 160, 76, 17, 74, 207, 116, 178, 74, 42, 116, 75, 85, 188, 90, 196, 165, 83, 167, 93, 1, 198, 114, 57, 135, 73, 154, 187, 255, 176, 238, 120, 107, 31, 222, 72, 135, 223, 235, 5, 219, 20, 189, 116, 55, 177, 214, 148, 122, 200, 98, 2, 21, 229, 246, 68, 44, 20, 46, 180, 58, 218, 39, 97, 163, 11, 209, 171, 208, 247, 242, 192, 88, 181, 134, 236, 64, 255, 167, 40, 42, 73, 158, 35, 67, 169, 117, 8, 102, 241, 136, 82, 144, 127, 164, 132, 205, 237, 180, 137, 20, 82, 66, 59, 65, 245, 168, 77, 62, 59, 138, 203, 116, 240, 175, 69, 247, 78, 204, 243, 210, 73, 201, 197, 163, 130, 226, 162, 199, 113, 30, 205, 22, 26, 26, 93, 180, 142, 5, 150, 31, 117, 48, 119, 236, 28, 124, 45, 37, 62, 213, 86, 69, 59, 29, 116, 107, 202, 22, 208, 184, 35, 20, 204, 94, 85, 163, 18, 152, 203, 125, 149, 96, 126, 26, 163, 78, 154, 248, 45, 99, 104, 185, 165, 115, 129, 190, 235, 252, 97, 163, 186, 254, 26, 189, 223, 45, 214, 113, 34, 186, 3, 155, 84, 41, 161, 37, 183, 89, 227, 181, 233, 203, 34, 116, 78, 26, 149, 241, 122, 153, 243, 25, 57, 49, 62, 14, 95, 104, 36, 134, 66, 90, 176, 13, 61, 118, 238, 119, 146, 248, 206, 132, 4, 46, 64, 196, 108, 118, 224, 108, 45, 181, 233, 34, 95, 86, 181, 163, 76, 115, 198, 193, 42, 5, 87, 202, 27, 111, 5, 95, 92, 160, 107, 143, 99, 238, 234, 112, 73, 221, 25, 76, 119, 90, 198, 122, 232, 39, 169, 216, 226, 199, 93, 192, 138, 192, 245, 190, 83, 244, 54, 61, 205, 83, 102, 103, 58, 107, 185, 134, 223, 125, 83, 253, 142, 101, 104, 223, 50, 241, 242, 76, 193, 170, 141, 248, 253, 0, 131, 95, 73, 10, 197, 250, 180, 216, 134, 212, 33, 168, 80, 95, 154, 252, 38, 86, 246, 16, 130, 70, 157, 229, 201, 75, 219, 209, 146, 64, 131, 188, 101, 22, 202, 33, 17, 0, 135, 105, 83, 133, 72, 39, 75, 141, 182, 203, 7, 238, 55, 100, 174, 120, 246, 246, 35, 150, 103, 63, 154, 194, 58, 142, 129, 167, 209, 1, 87, 194, 84, 131, 60, 8, 163, 222, 109, 151, 210, 178, 210, 61, 213, 214, 155, 170, 64, 252, 64, 28, 33, 174, 95, 108, 38, 40, 201, 42, 168, 113, 200, 161, 239, 60, 6, 96, 131, 112, 32, 170, 93, 241, 15, 253, 145, 31, 185, 70, 98, 78, 246, 19, 49, 7, 118, 86, 175, 216, 166, 133, 218, 4, 8, 238, 153, 46, 160, 254, 247, 142, 119, 102, 227, 28, 166, 27, 37, 198, 185, 246, 57, 251, 147, 157, 156, 254, 61, 234, 14, 231, 40, 28, 71, 50, 218, 225, 35, 115, 8, 23, 46, 107, 176, 138, 211, 175, 155, 136, 18, 13, 135, 96, 82, 193, 238, 227, 166, 14, 144, 7, 148, 35, 72, 186, 242, 195, 59, 249, 203, 229, 137, 31, 157, 135, 201, 244, 176, 176, 54, 194, 74, 100, 89, 216, 123, 27, 232, 53, 99, 237, 234, 66, 127, 75, 48, 159, 242, 154, 98, 214, 161, 127, 246, 145, 132, 196, 196, 82, 87, 97, 109, 39, 59, 57, 91, 67, 127, 85, 18, 245, 191, 44, 235, 228, 61, 120, 69, 118, 27, 130, 149, 217, 34, 173, 52, 16, 37, 81, 48, 1, 186, 21, 173, 135, 146, 148, 62, 89, 122, 141, 72, 35, 48, 178, 219, 215, 154, 28, 233, 254, 141, 90, 200, 88, 54, 18, 215, 32, 13, 20, 246, 152, 191, 203, 172, 48, 90, 224, 160, 179, 134, 65, 206, 254, 60, 177, 14, 117, 120, 10, 151, 71, 60, 3, 214, 110, 218, 78, 33, 67, 66, 140, 77, 52, 138, 27, 126, 172, 169, 168, 125, 222, 161, 79, 40, 83, 180, 12, 146, 178, 0, 73, 210, 204, 97, 11, 232, 27, 39, 201, 48, 201, 62, 217, 94, 255, 172, 212, 246, 76, 147, 80, 55, 192, 115, 181, 81, 11, 154, 245, 235, 145, 59, 112, 251, 182, 74, 55, 102, 11, 245, 140, 93, 226, 180, 134, 184, 240, 115, 165, 17, 161, 185, 232, 92, 50, 65, 9, 141, 129, 251, 239, 252, 181, 88, 1, 222, 106, 110, 184, 31, 132, 236, 113, 58, 180, 78, 216, 210, 216, 11, 35, 111, 89, 192, 60, 65, 145, 124, 150, 77, 174, 67, 17, 193, 253, 1, 193, 71, 236, 21, 166, 242, 174, 115, 203, 165, 246, 54, 170, 56, 91, 175, 242, 0, 139, 174, 209, 102, 176, 195, 80, 113, 62, 151, 126, 149, 129, 100, 96, 12, 76, 156, 247, 72, 149, 165, 94, 210, 66, 92, 104, 67, 118, 55, 154, 230, 133, 161, 169, 233, 235, 188, 34, 106, 36, 237, 27, 159, 110, 169, 226, 209, 130, 131, 86, 100, 125, 187, 235, 6, 232, 245, 121, 224, 45, 239, 173, 64, 35, 63, 25, 212, 154, 54, 190, 3, 248, 43, 69, 245, 232, 246, 228, 2, 25, 23, 239, 248, 23, 61, 176, 122, 249, 142, 57, 239, 37, 237, 187, 153, 183, 48, 224, 207, 14, 179, 48, 195, 128, 176, 175, 48, 85, 180, 195, 115, 145, 207, 121, 53, 83, 183, 146, 36, 216, 9, 146, 207, 191, 207, 205, 95, 250, 84, 130, 70, 52, 60, 229, 155, 56, 7, 69, 144, 247, 167, 162, 11, 32, 65, 6, 118, 69, 60, 203, 102, 29, 119, 137, 228, 46, 237, 42, 37, 133, 161, 138, 89, 189, 86, 51, 39, 154, 86, 61, 57, 131, 176, 84, 23, 238, 28, 62, 186, 212, 18, 27, 213, 207, 183, 70, 138, 31, 214, 112, 40, 209, 28, 93, 94, 204, 59, 185, 242, 20, 11, 237, 220, 129, 177, 226, 236, 114, 162, 97, 192, 237, 104, 210, 182, 126, 210, 64, 62, 190, 42, 25, 61, 21, 122, 180, 237, 6, 153, 211, 224, 152, 93, 131, 195, 199, 58, 80, 86, 206, 62, 138, 25, 121, 85, 72, 149, 26, 141, 182, 81, 214, 224, 55, 165, 108, 186, 201, 78, 239, 46, 102, 166, 15, 97, 235, 177, 210, 117, 116, 60, 191, 176, 226, 139, 38, 194, 131, 68, 48, 222, 241, 156, 56, 67, 200, 232, 143, 80, 120, 176, 120, 80, 63, 220, 147, 80, 160, 18, 100, 47, 21, 215, 191, 137, 219, 80, 204, 154, 22, 25, 226, 57, 108, 94, 219, 103, 153, 22, 107, 184, 59, 141, 93, 185, 19, 236, 63, 32, 85, 233, 182, 169, 149, 107, 195, 138, 139, 178, 34, 239, 72, 35, 165, 148, 248, 250, 179, 232, 105, 76, 255, 55, 171, 86, 147, 101, 119, 167, 141, 67, 183, 174, 177, 212, 170, 62, 98, 10, 212, 196, 37, 115, 11, 143, 254, 10, 84, 74, 131, 117, 219, 6, 50, 30, 150, 208, 128, 76, 32, 72, 129, 150, 129, 223, 107, 225, 221, 238, 151, 143, 0, 245, 92, 90, 26, 58, 220, 11, 5, 40, 135, 63, 3, 19, 198, 243, 118, 58, 88, 142, 162, 121, 13, 14, 24, 32, 85, 106, 230, 169, 244, 17, 205, 111, 62, 35, 123, 163, 59, 216, 7, 238, 82, 30, 43, 255, 161, 137, 177, 246, 100, 51, 214, 189, 198, 225, 71, 96, 62, 196, 11, 136, 216, 129, 144, 254, 5, 162, 208, 201, 94, 28, 174, 56, 125, 11, 116, 201, 252, 69, 79, 202, 81, 210, 106, 119, 206, 82, 231, 154, 8, 251, 208, 201, 230, 82, 211, 110, 175, 177, 230, 135, 170, 115, 3, 151, 216, 42, 236, 176, 35, 19, 103, 207, 66, 29, 56, 225, 1, 56, 200, 36, 203, 123, 174, 231, 198, 11, 131, 186, 181, 109, 247, 180, 123, 55, 244, 61, 90, 110, 235, 63, 106, 133, 161, 220, 163, 15, 165, 8, 248, 18, 167, 65, 29, 89, 155, 136, 206, 184, 172, 30, 197, 83, 131, 156, 249, 36, 54, 148, 181, 175, 51, 18, 149, 166, 190, 207, 192, 63, 138, 144, 117, 124, 45, 106, 204, 149, 222, 59, 126, 242, 24, 247, 29, 226, 207, 30, 109, 17, 119, 238, 112, 63, 147, 0, 201, 249, 242, 179, 54, 34, 203, 83, 45, 40, 38, 108, 32, 250, 155, 218, 188, 54, 3, 16, 207, 129, 232, 190, 133, 199, 115, 247, 74, 219, 139, 203, 226, 85, 121, 1, 113, 39, 239, 130, 62, 232, 142, 2, 83, 56, 175, 169, 170, 203, 140, 155, 227, 36, 150, 168, 36, 102, 220, 12, 99, 59, 207, 230, 173, 229, 162, 115, 206, 28, 233, 185, 143, 250, 183, 94, 126, 21, 182, 215, 63, 214, 91, 21, 197, 173, 4, 88, 201, 18, 64, 120, 74, 238, 126, 201, 242, 117, 44, 42, 185, 50, 81, 25, 15, 181, 148, 22, 242, 242, 8, 220, 50, 25, 0, 90, 77, 117, 13, 112, 124, 170, 212, 138, 158, 84, 92, 71, 7, 207, 133, 106, 61, 45, 159, 95, 161, 166, 98, 204, 14, 201, 37, 21, 50, 211, 89, 31, 185, 189, 22, 94, 149, 56, 142, 126, 0, 251, 76, 229, 182, 145, 225, 86, 25, 84, 108, 104, 26, 181, 7, 37, 191, 240, 38, 104, 184, 107, 191, 124, 11, 228, 211, 132, 14, 85, 237, 46, 91, 252, 63, 109, 162, 26, 157, 107, 203, 97, 251, 110, 136, 187, 213, 69, 127, 99, 181, 41, 48, 69, 45, 151, 90, 139, 76, 118, 196, 23, 7, 45, 111, 50, 191, 255, 164, 80, 113, 226, 255, 64, 55, 93, 116, 211, 35, 232, 131, 227, 60, 34, 177, 64, 139, 230, 34, 254, 193, 27, 233, 173, 253, 133, 158, 94, 41, 163, 96, 88, 155, 136, 206, 252, 43, 135, 155, 12, 248, 175, 52, 146, 101, 61, 132, 78, 157, 61, 77, 108, 252, 200, 57, 202, 67, 38, 76, 74, 28, 61, 108, 225, 157, 15, 230, 161, 252, 101, 242, 133, 12, 106, 115, 113, 116, 197, 144, 151, 173, 202, 145, 9, 221, 158, 229, 113, 22, 35, 55, 235, 201, 226, 88, 153, 221, 28, 156, 184, 31, 132, 252, 110, 169, 253, 145, 78, 116, 133, 73, 202, 40, 194, 179, 4, 197, 188, 218, 168, 121, 46, 107, 124, 163, 174, 184, 231, 145, 177, 137, 246, 122, 4, 93, 10, 182, 18, 106, 245, 156, 28, 236, 27, 128, 212, 105, 33, 222, 188, 130, 193, 185, 139, 136, 200, 115, 252, 121, 45, 112, 190, 148, 165, 126, 96, 143, 46, 218, 3, 109, 133, 22, 85, 192, 63, 33, 77, 199, 34, 29, 114, 61, 96, 241, 69, 248, 180, 63, 196, 139, 132, 136, 128, 9, 67, 221, 51, 245, 214, 146, 128, 103, 1, 27, 136, 17, 203, 68, 230, 103, 141, 74, 213, 179, 154, 232, 99, 183, 91, 91, 135, 183, 188, 89, 213, 99, 92, 100, 218, 184, 63, 189, 168, 214, 75, 105, 221, 163, 221, 14, 138, 206, 240, 201, 145, 115, 151, 228, 132, 251, 79, 159, 221, 13, 252, 40, 207, 250, 134, 130, 162, 136, 158, 0, 61, 23, 186, 20, 188, 38, 145, 32, 12, 231, 168, 117, 224, 169, 95, 171, 227, 15, 190, 53, 48, 218, 70, 29, 208, 194, 103, 199, 143, 196, 87, 197, 192, 226, 208, 143, 192, 128, 132, 170, 82, 175, 81, 26, 191, 4, 191, 185, 4, 72, 156, 242, 182, 46, 216, 197, 188, 242, 213, 154, 251, 42, 249, 0, 82, 80, 116, 142, 104, 157, 116, 99, 118, 222, 83, 12, 200, 112, 133, 96, 101, 78, 121, 86, 39, 25, 44, 15, 174, 185, 164, 193, 0, 247, 46, 79, 83, 49, 2, 224, 214, 27, 226, 35, 213, 175, 80, 41, 72, 71, 40, 199, 35, 49, 100, 41, 166, 200, 19, 74, 136, 39, 74, 167, 141, 112, 32, 246, 154, 223, 126, 126, 183, 226, 169, 119, 251, 95, 219, 121, 247, 74, 227, 15, 77, 231, 166, 234, 196, 39, 176, 116, 159, 65, 30, 31, 149, 148, 143, 138, 223, 147, 9, 119, 88, 203, 48, 195, 14, 57, 181, 70, 110, 243, 201, 174, 228, 205, 104, 86, 0, 218, 57, 140, 74, 171, 166, 7, 176, 230, 142, 27, 233, 165, 4, 215, 53, 140, 167, 192, 223, 238, 100, 148, 209, 103, 70, 208, 93, 109, 167, 229, 151, 124, 64, 209, 28, 33, 103, 186, 194, 140, 202, 63, 76, 119, 30, 164, 4, 143, 111, 152, 143, 238, 4, 165, 104, 248, 207, 103, 100, 74, 135, 154, 71, 215, 125, 168, 214, 162, 55, 206, 105, 68, 205, 142, 9, 212, 201, 97, 51, 234, 215, 44, 59, 200, 103, 4, 19, 9, 115, 203, 178, 31, 18, 214, 44, 151, 69, 73, 63, 136, 103, 98, 112, 190, 22, 110, 170, 25, 43, 15, 58, 25, 20, 177, 66, 66, 251, 113, 133, 162, 1, 5, 3, 22, 126, 105, 23, 121, 187, 5, 204, 65, 204, 125, 179, 154, 52, 204, 247, 167, 82, 8, 74, 149, 149, 67, 248, 164, 210, 111, 193, 222, 161, 66, 238, 121, 247, 214, 50, 55, 1, 97, 210, 23, 131, 39, 163, 91, 105, 76, 4, 180, 40, 166, 64, 167, 56, 132, 25, 83, 115, 89, 120, 196, 38, 32, 32, 180, 109, 89, 220, 157, 184, 70, 148, 111, 203, 107, 162, 64, 236, 92, 95, 208, 227, 122, 198, 155, 39, 20, 37, 19, 140, 234, 82, 237, 116, 87, 191, 44, 115, 156, 93, 201, 126, 175, 171, 26, 2, 29, 195, 179, 142, 184, 85, 144, 197, 51, 245, 221, 169, 127, 230, 148, 180, 50, 92, 197, 103, 53, 229, 30, 105, 85, 125, 216, 66, 224, 8, 229, 91, 98, 239, 180, 178, 202, 128, 112, 118, 233, 186, 200, 122, 244, 147, 112, 102, 179, 180, 115, 109, 17, 28, 172, 40, 197, 239, 140, 177, 211, 112, 14, 150, 67, 35, 243, 249, 189, 45, 34, 175, 40, 37, 66, 157, 86, 130, 232, 211, 110, 210, 241, 85, 19, 170, 166, 205, 8, 253, 225, 22, 128, 215, 125, 20, 16, 137, 66, 61, 101, 22, 231, 139, 15, 21, 203, 107, 117, 210, 165, 69, 107, 200, 9, 150, 150, 51, 251, 227, 16, 162, 132, 59, 50, 40, 151, 127, 117, 202, 133, 39, 132, 34, 99, 112, 33, 53, 248, 232, 112, 18, 12, 13, 55, 86, 91, 109, 219, 170, 112, 201, 17, 155, 146, 145, 245, 102, 20, 183, 77, 200, 141, 62, 95, 75, 211, 23, 46, 101, 18, 62, 7, 94, 44, 250, 184, 236, 38, 242, 219, 72, 159, 236, 202, 95, 20, 152, 190, 82, 112, 139, 158, 192, 121, 14, 70, 46, 13, 235, 87, 79, 160, 22, 113, 181, 211, 18, 194, 1, 9, 33, 173, 182, 6, 33, 232, 13, 21, 163, 69, 199, 32, 103, 208, 108, 112, 96, 110, 181, 47, 200, 110, 32, 66, 40, 230, 153, 34, 57, 115, 53, 201, 34, 140, 63, 165, 47, 40, 81, 70, 6, 225, 6, 219, 60, 237, 208, 127, 153, 92, 81, 68, 180, 84, 201, 210, 114, 181, 120, 243, 101, 26, 121, 234, 20, 200, 235, 172, 108, 179, 190, 173, 82, 99, 250, 96, 246, 149, 8, 212, 227, 193, 107, 208, 237, 63, 114, 169, 36, 238, 217, 172, 127, 2, 179, 116, 18, 237, 191, 42, 18, 45, 119, 30, 143, 93, 206, 17, 203, 163, 104, 67, 5, 136, 76, 148, 39, 76, 155, 164, 78, 34, 163, 243, 138, 19, 252, 68, 129, 233, 36, 125, 133, 210, 80, 145, 97, 120, 141, 64, 208, 251, 63, 195, 74, 43, 247, 154, 227, 166, 43, 201, 248, 168, 183, 49, 166, 58, 255, 105, 206, 124, 162, 116, 195, 61, 61, 127, 50, 176, 62, 206, 39, 175, 39, 26, 57, 194, 10, 15, 223, 150, 254, 84, 141, 204, 60, 186, 43, 52, 60, 208, 236, 2, 112, 18, 26, 164, 229, 96, 29, 168, 142, 141, 246, 250, 133, 146, 60, 72, 47, 109, 255, 234, 3, 66, 160, 203, 60, 18, 252, 152, 123, 71, 54, 186, 5, 225, 71, 25, 240, 58, 67, 136, 142, 148, 33, 149, 215, 89, 196, 56, 174, 82, 98, 26, 133, 4, 91, 121, 144, 194, 106, 173, 51, 98, 3, 219, 131, 107, 217, 47, 92, 19, 117, 160, 48, 14, 219, 48, 81, 30, 144, 146, 217, 30, 116, 96, 167, 125, 245, 132, 52, 36, 126, 19, 191, 30, 178, 53, 90, 82, 147, 210, 163, 6, 120, 208, 141, 194, 76, 12, 120, 141, 25, 145, 156, 229, 135, 67, 226, 178, 162, 33, 225, 215, 132, 181, 252, 62, 163, 210, 50, 6, 125, 185, 13, 174, 181, 103, 2, 47, 87, 121, 29, 120, 231, 106, 34, 109, 241, 50, 236, 24, 35, 195, 237, 245, 18, 149, 81, 36, 199, 81, 254, 59, 103, 234, 84, 163, 146, 63, 42, 203, 83, 182, 0, 43, 133, 49, 161, 52, 240, 245, 8, 94, 175, 164, 50, 27, 55, 96, 35, 23, 211, 70, 66, 57, 183, 233, 245, 113, 108, 200, 87, 187, 157, 99, 173, 103, 48, 23, 148, 48, 149, 194, 217, 160, 36, 114, 76, 98, 207, 67, 134, 184, 173, 230, 2, 42, 237, 4, 130, 207, 26, 50, 65, 125, 246, 11, 245, 9, 145, 142, 43, 48, 134, 25, 209, 123, 161, 58, 148, 111, 148, 155, 213, 255, 232, 33, 46, 74, 16, 211, 253, 14, 64, 32, 78, 240, 31, 186, 19, 175, 244, 189, 107, 129, 121, 255, 6, 40, 20, 49, 173, 142, 134, 9, 170, 230, 128, 89, 59, 126, 212, 71, 207, 175, 180, 77, 163, 151, 58, 173, 87, 168, 89, 100, 215, 178, 238, 9, 168, 216, 153, 175, 83, 16, 18, 104, 101, 112, 115, 249, 90, 204, 209, 217, 108, 60, 235, 168, 33, 161, 208, 81, 185, 78, 66, 166, 86, 198, 144, 20, 56, 35, 208, 46, 177, 129, 143, 83, 248, 186, 35, 216, 143, 99, 11, 217, 141, 85, 157, 125, 193, 206, 52, 60, 102, 48, 229, 142, 8, 100, 111, 154, 64, 196, 221, 159, 161, 186, 95, 241, 134, 213, 116, 154, 119, 35, 27, 19, 64, 223, 97, 175, 181, 24, 31, 73, 33, 1, 60, 181, 232, 163, 212, 99, 115, 49, 101, 4, 34, 39, 182, 50, 174, 245, 0, 61, 228, 160, 148, 74, 252, 129, 245, 145, 38, 106, 183, 99, 170, 18, 45, 198, 49, 212, 205, 93, 2, 252, 84, 18, 93, 129, 187, 15, 123, 68, 83, 35, 13, 188, 230, 104, 156, 94, 60, 67, 232, 63, 232, 99, 16, 32, 169, 47, 177, 239, 121, 12, 170, 173, 71, 98, 190, 243, 81, 157, 161, 22, 0, 101, 159, 43, 61, 189, 176, 113, 33, 42, 229, 111, 1, 236, 164, 14, 120, 116, 33, 182, 219, 245, 212, 206, 82, 193, 173, 162, 71, 6, 115, 137, 67, 210, 11, 193, 9, 92, 95, 33, 74, 61, 211, 193, 39, 113, 91, 245, 192, 246, 15, 220, 30, 135, 69, 226, 173, 231, 32, 146, 31, 124, 111, 219, 188, 179, 138, 53, 8, 61, 243, 43, 244, 175, 106, 221, 55, 128, 224, 27, 232, 11, 150, 75, 214, 166, 200, 126, 11, 50, 207, 198, 38, 120, 174, 85, 39, 247, 211, 237, 212, 28, 46, 136, 114, 139, 140, 248, 110, 172, 126, 126, 20, 88, 43, 227, 74, 67, 88, 227, 178, 94, 31, 131, 77, 219, 94, 165, 206, 99, 150, 242, 135, 8, 186, 206, 226, 27, 237, 147, 181, 239, 182, 236, 80, 68, 219, 249, 160, 135, 134, 91, 242, 231, 155, 55, 125, 228, 230, 215, 248, 36, 119, 5, 17, 7, 105, 203, 95, 171, 123, 34, 9, 216, 231, 99, 50, 154, 160, 6, 112, 201, 33, 26, 14, 44, 197, 149, 53, 55, 143, 22, 39, 248, 105, 143, 7, 235, 91, 15, 185, 58, 19, 107, 20, 139, 39, 30, 18, 54, 58, 171, 140, 215, 227, 91, 9, 73, 253, 178, 35, 144, 243, 234, 88, 207, 241, 147, 206, 12, 136, 231, 247, 151, 163, 179, 84, 64, 209, 133, 180, 165, 187, 58, 184, 78, 246, 13, 53, 46, 174, 44, 184, 112, 126, 237, 133, 63, 154, 131, 225, 138, 162, 28, 240, 203, 50, 40, 170, 146, 33, 6, 136, 56, 77, 133, 10, 94, 140, 71, 109, 117, 7, 131, 209, 234, 210, 123, 51, 141, 47, 46, 210, 81, 254, 134, 133, 253, 72, 75, 12, 35, 112, 85, 108, 52, 110, 165, 23, 125, 56, 29, 80, 59, 221, 219, 202, 155, 186, 232, 110, 213, 235, 104, 178, 223, 204, 50, 147, 169, 135, 238, 205, 19, 188, 142, 226, 82, 212, 247, 167, 189, 220, 62, 82, 167, 165, 33, 113, 108, 93, 108, 141, 28, 89, 43, 6, 200, 35, 228, 229, 116, 145, 215, 152, 112, 92, 14, 186, 3, 59, 222, 138, 157, 188, 18, 51, 63, 168, 7, 180, 229, 82, 245, 109, 110, 67, 120, 242, 158, 85, 122, 252, 172, 30, 129, 101, 247, 40, 191, 21, 22, 82, 207, 30, 144, 64, 22, 89, 164, 146, 176, 195, 207, 252, 106, 142, 225, 24, 149, 128, 40, 110, 147, 63, 96, 112, 251, 224, 33, 209, 125, 69, 135, 139, 111, 107, 55, 243, 35, 185, 232, 178, 51, 202, 87, 196, 71, 132, 74, 246, 184, 210, 251, 91, 121, 70, 253, 69, 121, 69, 217, 87, 247, 62, 235, 12, 130, 220, 117, 121, 93, 4, 94, 105, 134, 36, 164, 194, 193, 209, 249, 226, 60, 144, 16, 218, 85, 4, 224, 124, 85, 158, 6, 58, 53, 92, 115, 179, 238, 107, 97, 126, 16, 149, 203, 91, 215, 163, 180, 155, 21, 233, 241, 68, 147, 98, 238, 132, 129, 2, 11, 243, 47, 29, 179, 229, 194, 87, 24, 69, 196, 43, 126, 189, 160, 166, 205, 151, 99, 183, 39, 237, 250, 8, 252, 214, 76, 245, 219, 63, 174, 107, 102, 228, 54, 182, 188, 174, 117, 193, 72, 53, 126, 90, 219, 22, 207, 76, 132, 24, 55, 29, 52, 235, 19, 1, 44, 166, 37, 235, 131, 180, 250, 160, 249, 78, 30, 132, 6, 89, 73, 132, 113, 213, 127, 35, 235, 145, 93, 167, 62, 58, 197, 164, 31, 169, 218, 143, 156, 38, 56, 253, 51, 102, 41, 166, 116, 166, 166, 196, 152, 208, 110, 19, 57, 34, 48, 219, 217, 56, 87, 49, 129, 106, 150, 31, 205, 67, 225, 253, 226, 209, 152, 197, 252, 31, 141, 162, 91, 47, 115, 72, 24, 144, 138, 138, 78, 234, 89, 206, 160, 197, 104, 136, 101, 208, 225, 84, 142, 60, 154, 25, 64, 82, 104, 242, 179, 152, 255, 128, 112, 108, 73, 52, 131, 19, 216, 57, 58, 136, 77, 148, 54, 28, 119, 243, 14, 230, 100, 180, 250, 26, 54, 224, 39, 124, 234, 150, 7, 32, 125, 55, 234, 157, 248, 222, 75, 217, 16, 186, 211, 183, 107, 165, 38, 122, 173, 139, 69, 213, 226, 192, 62, 10, 88, 253, 219, 175, 227, 2, 204, 137, 117, 168, 128, 123, 149, 159, 58, 177, 40, 161, 255, 184, 180, 113, 135, 47, 95, 11, 103, 153, 74, 116, 209, 169, 244, 103, 167, 192, 44, 223, 183, 190, 194, 143, 163, 216, 236, 28, 153, 127, 66, 241, 248, 162, 68, 219, 34, 254, 108, 233, 6, 188, 126, 170, 133, 2, 209, 58, 237, 155, 227, 21, 97, 182, 222, 65, 68, 249, 174, 150, 216, 180, 183, 60, 82, 252, 97, 105, 28, 201, 30, 196, 79, 8, 23, 34, 187, 103, 33, 62, 59, 224, 149, 100, 63, 26, 10, 123, 176, 91, 140, 145, 182, 127, 54, 44, 2, 30, 101, 44, 100, 139, 188, 238, 77, 231, 5, 200, 168, 60, 104, 122, 23, 151, 201, 30, 160, 161, 198, 226, 20, 176, 142, 162, 38, 142, 36, 123, 168, 114, 166, 82, 187, 86, 211, 3, 106, 173, 142, 57, 213, 37, 150, 250, 224, 225, 230, 253, 94, 10, 34, 93, 13, 58, 35, 149, 188, 245, 107, 10, 207, 69, 248, 235, 169, 167, 78, 101, 116, 254, 28, 177, 23, 165, 169, 149, 42, 15, 50, 118, 222, 168, 242, 35, 211, 160, 139, 199, 116, 82, 196, 211, 192, 140, 83, 35, 90, 120, 161, 199, 177, 22, 162, 138, 57, 9, 91, 48, 44, 167, 248, 67, 188, 37, 81, 174, 80, 207, 114, 218, 198, 102, 233, 24, 21, 99, 197, 49, 115, 251, 248, 63, 147, 80, 117, 163, 30, 69, 232, 155, 66, 98, 141, 178, 100, 21, 85, 144, 77, 246, 172, 54, 157, 134, 101, 161, 147, 77, 105, 71, 121, 99, 178, 65, 225, 66, 197, 38, 93, 205, 120, 160, 234, 12, 173, 240, 58, 241, 84, 221, 40, 177, 147, 119, 130, 46, 157, 75, 240, 8, 105, 104, 144, 157, 137, 147, 46, 121, 143, 100, 52, 59, 178, 15, 30, 239, 188, 169, 154, 240, 136, 216, 168, 100, 206, 10, 183, 135, 222, 126, 86, 189, 109, 45, 31, 15, 86, 63, 163, 219, 253, 105, 154, 102, 26, 160, 239, 205, 16, 58, 173, 205, 246, 170, 159, 130, 105, 139, 138, 44, 144, 191, 207, 54, 122, 181, 225, 34, 23, 240, 87, 117, 161, 193, 191, 109, 251, 115, 23, 117, 12, 186, 110, 161, 54, 121, 8, 66, 233, 149, 84, 236, 183, 177, 252, 187, 83, 73, 209, 89, 83, 141, 255, 215, 193, 227, 153, 0, 73, 252, 118, 246, 109, 35, 156, 205, 225, 99, 128, 159, 32, 53, 213, 228, 248, 169, 43, 161, 239, 168, 90, 68, 191, 162, 41, 194, 222, 121, 156, 113, 46, 125, 220, 69, 241, 10, 248, 13, 83, 219, 210, 30, 246, 75, 147, 104, 242, 231, 4, 145, 167, 128, 208, 90, 136, 127, 96, 208, 109, 40, 58, 190, 248, 212, 80, 240, 184, 116, 26, 24, 202, 207, 243, 230, 173, 129, 163, 243, 173, 154, 149, 196, 212, 228, 36, 14, 177, 98, 153, 55, 168, 183, 222, 63, 69, 191, 14, 137, 124, 56, 21, 71, 79, 223, 238, 170, 84, 4, 220, 42, 252, 161, 63, 67, 161, 72, 66, 255, 24, 69, 14, 76, 140, 249, 169, 200, 103, 89, 165, 159, 128, 21, 158, 85, 171, 39, 40, 159, 76, 192, 185, 67, 162, 87, 239, 184, 165, 73, 156, 255, 134, 224, 184, 28, 225, 72, 192, 94, 1, 156, 142, 158, 193, 185, 140, 20, 36, 79, 86, 81, 30, 26, 251, 171, 102, 75, 170, 135, 254, 180, 174, 4, 115, 223, 71, 8, 24, 3, 47, 216, 42, 128, 80, 156, 10, 41, 251, 56, 12, 162, 195, 148, 251, 221, 206, 171, 116, 191, 134, 63, 99, 215, 101, 49, 129, 137, 229, 149, 135, 164, 177, 132, 85, 201, 69, 0, 224, 86, 20, 115, 55, 28, 79, 4, 153, 43, 102, 24, 29, 47, 92, 152, 183, 202, 158, 72, 155, 62, 232, 135, 107, 3, 205, 235, 41, 89, 133, 78, 0, 134, 213, 103, 103, 19, 201, 203, 246, 91, 240, 253, 26, 97, 211, 11, 111, 175, 4, 205, 6, 155, 175, 154, 255, 160, 104, 182, 174, 68, 181, 222, 232, 190, 75, 74, 68, 11, 20, 191, 186, 80, 160, 25, 65, 72, 187, 19, 49, 7, 52, 226, 169, 148, 90, 170, 133, 43, 123, 51, 8, 44, 10, 134, 115, 45, 214, 52, 30, 122, 5, 82, 86, 165, 108, 215, 211, 185, 82, 213, 115, 131, 11, 130, 57, 78, 5, 226, 164, 203, 104, 70, 51, 202, 104, 203, 135, 18, 228, 206, 166, 184, 71, 159, 223, 53, 101, 146, 92, 168, 163, 7, 100, 186, 143, 32, 69, 162, 102, 182, 114, 102, 97, 47, 203, 52, 59, 255, 226, 110, 159, 1, 46, 120, 78, 95, 37, 132, 106, 224, 7, 117, 152, 242, 123, 45, 238, 93, 119, 73, 139, 217, 160, 146, 87, 14, 212, 189, 195, 235, 109, 130, 186, 128, 192, 101, 65, 128, 75, 75, 84, 3, 174, 116, 32, 188, 105, 180, 32, 189, 187, 109, 33, 73, 157, 183, 36, 44, 40, 241, 225, 131, 172, 190, 26, 138, 191, 136, 66, 39, 238, 71, 48, 222, 175, 185, 152, 159, 53, 132, 89, 126, 7, 170, 254, 130, 130, 155, 175, 234, 187, 248, 121, 177, 121, 112, 170, 110, 54, 150, 66, 66, 23, 199, 34, 15, 41, 114, 187, 67, 131, 150, 218, 60, 128, 12, 75, 61, 159, 73, 231, 222, 191, 143, 159, 22, 118, 199, 24, 234, 107, 129, 209, 100, 143, 237, 61, 147, 27, 43, 112, 56, 97, 46, 84, 89, 194, 157, 100, 147, 197, 127, 10, 171, 166, 107, 5, 156, 48, 220, 247, 237, 201, 14, 190, 127, 10, 0, 30, 79, 150, 47, 195, 215, 233, 255, 44, 137, 169, 179, 5, 123, 151, 126, 128, 241, 119, 52, 174, 238, 227, 11, 143, 111, 180, 140, 19, 121, 155, 64, 192, 187, 37, 140, 133, 157, 217, 3, 28, 92, 34, 14, 236, 182, 168, 8, 13, 149, 47, 108, 76, 196, 24, 30, 165, 231, 54, 34, 56, 190, 10, 136, 11, 249, 122, 168, 22, 107, 104, 54, 156, 36, 202, 137, 99, 103, 114, 176, 61, 96, 185, 147, 17, 234, 122, 121, 134, 133, 109, 159, 117, 98, 95, 234, 214, 47, 42, 246, 109, 178, 215, 90, 152, 128, 251, 16, 141, 167, 239, 161, 123, 184, 140, 164, 117, 37, 94, 2, 221, 206, 151, 194, 7, 193, 188, 11, 185, 255, 200, 198, 57, 202, 138, 23, 228, 153, 211, 108, 219, 44, 216, 37, 96, 242, 177, 11, 87, 253, 192, 62, 89, 136, 53, 112, 66, 195, 199, 110, 54, 236, 32, 54, 237, 59, 29, 38, 126, 229, 98, 34, 232, 166, 46, 149, 66, 247, 18, 191, 246, 131, 23, 63, 123, 125, 5, 145, 60, 242, 249, 174, 62, 71, 169, 112, 69, 118, 224, 126, 187, 157, 177, 240, 216, 202, 8, 56, 185, 156, 191, 85, 169, 243, 36, 51, 231, 23, 199, 72, 21, 248, 50, 116, 57, 86, 12, 88, 131, 192, 28, 80, 172, 82, 237, 249, 221, 50, 138, 206, 88, 69, 47, 165, 167, 212, 209, 16, 94, 91, 189, 121, 209, 55, 215, 221, 252, 207, 44, 23, 184, 235, 244, 212, 67, 113, 15, 60, 174, 23, 133, 184, 113, 209, 9, 129, 116, 185, 157, 100, 90, 45, 189, 68, 101, 179, 138, 253, 84, 131, 160, 34, 50, 249, 1, 0, 64, 253, 177, 63, 47, 253, 55, 197, 107, 111, 13, 199, 89, 198, 91, 90, 223, 10, 234, 30, 88, 146, 108, 134, 214, 57, 248, 115, 180, 28, 199, 68, 182, 31, 7, 15, 97, 239, 26, 95, 184, 247, 76, 202, 29, 191, 38, 137, 206, 21, 174, 94, 149, 242, 22, 89, 57, 48, 240, 28, 195, 93, 77, 87, 111, 222, 43, 50, 241, 107, 20, 193, 141, 170, 33, 35, 25, 88, 103, 59, 31, 160, 132, 184, 29, 136, 78, 61, 156, 108, 32, 62, 198, 86, 0, 21, 129, 237, 37, 212, 252, 213, 3, 236, 52, 48, 69, 169, 155, 116, 136, 15, 41, 126, 243, 115, 247, 129, 199, 213, 29, 1, 144, 21, 165, 103, 95, 208, 75, 115, 233, 175, 230, 83, 44, 132, 74, 11, 144, 194, 222, 60, 179, 76, 48, 43, 231, 131, 100, 221, 164, 204, 192, 75, 215, 55, 73, 75, 113, 94, 167, 134, 67, 199, 130, 73, 26, 165, 93, 118, 138, 210, 18, 111, 220, 124, 147, 44, 218, 143, 193, 69, 249, 31, 241, 27, 66, 180, 83, 245, 13, 208, 94, 253, 42, 70, 170, 12, 29, 88, 25, 196, 81, 111, 100, 120, 3, 96, 25, 11, 253, 214, 144, 246, 181, 55, 251, 0, 225, 194, 151, 123, 169, 53, 88, 158, 123, 60, 108, 139, 173, 170, 40, 17, 64, 51, 57, 41, 105, 17, 90, 252, 16, 129, 238, 118, 250, 210, 113, 75, 137, 45, 238, 211, 35, 14, 127, 243, 193, 250, 6, 230, 129, 54, 64, 38, 143, 98, 144, 188, 226, 55, 119, 29, 59, 49, 235, 51, 201, 201, 160, 9, 36, 75, 208, 84, 111, 10, 4, 252, 219, 197, 184, 39, 201, 99, 188, 28, 45, 174, 180, 135, 66, 94, 63, 158, 214, 107, 251, 93, 168, 14, 52, 132, 33, 21, 195, 148, 245, 44, 23, 85, 22, 196, 170, 111, 44, 148, 138, 239, 162, 221, 123, 234, 91, 112, 36, 26, 243, 22, 223, 35, 164, 165, 176, 32, 55, 26, 218, 42, 130, 136, 54, 114, 126, 167, 134, 242, 183, 6, 121, 104, 113, 89, 232, 216, 61, 215, 248, 64, 216, 250, 55, 23, 221, 157, 224, 161, 166, 42, 122, 3, 7, 15, 168, 218, 36, 214, 215, 245, 148, 5, 13, 84, 116, 16, 127, 241, 22, 95, 5, 134, 237, 52, 124, 36, 105, 102, 28, 195, 191, 85, 105, 46, 162, 88, 51, 218, 72, 71, 217, 131, 56, 121, 16, 124, 249, 245, 160, 30, 187, 11, 9, 30, 64, 119, 231, 76, 102, 236, 107, 17, 77, 234, 97, 255, 149, 18, 241, 109, 45, 178, 196, 151, 196, 198, 46, 66, 222, 115, 147, 137, 10, 136, 89, 69, 157, 205, 246, 2, 29, 233, 53, 126, 25, 117, 239, 244, 127, 126, 28, 53, 31, 42, 181, 79, 212, 134, 9, 100, 219, 98, 7, 85, 9, 78, 227, 184, 166, 200, 187, 186, 30, 98, 129, 76, 82, 217, 24, 61, 114, 20, 54, 128, 208, 174, 138, 51, 43, 20, 211, 134, 92, 188, 97, 221, 156, 9, 255, 75, 30, 105, 215, 105, 188, 230, 93, 93, 23, 4, 150, 141, 90, 226, 248, 209, 59, 65, 123, 181, 199, 246, 102, 1, 43, 62, 143, 38, 20, 215, 209, 160, 211, 210, 230, 227, 1, 103, 249, 83, 226, 128, 43, 169, 121, 182, 106, 176, 10, 137, 129, 247, 230, 168, 70, 153, 199, 171, 78, 117, 10, 55, 116, 83, 128, 237, 79, 235, 189, 20, 154, 31, 126, 138, 121, 123, 28, 128, 242, 72, 178, 149, 100, 129, 134, 67, 160, 31, 38, 239, 237, 72, 80, 144, 192, 4, 65, 95, 94, 25, 57, 246, 205, 105, 248, 98, 213, 13, 91, 190, 122, 81, 193, 192, 18, 46, 36, 90, 222, 128, 92, 125, 73, 232, 33, 16, 47, 38, 117, 206, 12, 162, 58, 78, 105, 1, 44, 86, 63, 137, 59, 229, 106, 250, 67, 16, 32, 1, 255, 236, 176, 84, 147, 5, 156, 225, 40, 122, 237, 195, 253, 179, 115, 16, 178, 54, 153, 217, 130, 182, 93, 69, 88, 210, 7, 163, 175, 234, 190, 233, 16, 63, 130, 192, 29, 223, 229, 162, 172, 250, 243, 48, 121, 235, 19, 175, 72, 48, 64, 187, 17, 142, 122, 100, 149, 121, 41, 236, 245, 246, 105, 129, 41, 253, 194, 162, 69, 168, 190, 235, 187, 188, 16, 49, 246, 187, 9, 243, 74, 145, 254, 50, 91, 84, 255, 83, 169, 255, 143, 225, 153, 121, 65, 116, 173, 139, 177, 114, 182, 228, 159, 183, 16, 147, 214, 10, 41, 68, 255, 203, 182, 168, 33, 166, 78, 76, 171, 54, 10, 192, 22, 94, 31, 75, 35, 142, 175, 194, 240, 214, 147, 255, 12, 119, 8, 79, 112, 194, 225, 105, 38, 92, 90, 29, 104, 235, 250, 216, 252, 69, 171, 148, 104, 7, 165, 180, 208, 221, 155, 181, 217, 92, 215, 194, 82, 48, 156, 187, 249, 230, 205, 153, 202, 244, 149, 237, 180, 26, 49, 193, 188, 235, 74, 121, 127, 98, 57, 254, 196, 250, 204, 110, 251, 135, 194, 104, 230, 174, 211, 105, 90, 17, 33, 128, 195, 145, 60, 64, 39, 102, 95, 133, 91, 42, 210, 30, 69, 29, 188, 247, 57, 215, 197, 192, 184, 54, 105, 38, 7, 220, 166, 176, 146, 174, 146, 146, 99, 100, 237, 220, 193, 220, 3, 185, 229, 64, 56, 180, 206, 139, 16, 150, 0, 187, 106, 97, 231, 243, 33, 220, 165, 35, 30, 207, 31, 102, 125, 115, 167, 170, 87, 196, 112, 204, 187, 53, 126, 155, 162, 179, 192, 116, 32, 139, 208, 126, 225, 229, 189, 81, 206, 107, 252, 217, 200, 155, 17, 32, 16, 60, 40, 101, 129, 107, 146, 74, 186, 39, 201, 137, 23, 175, 180, 79, 66, 197, 163, 88, 33, 45, 7, 44, 61, 230, 211, 22, 116, 225, 134, 231, 200, 198, 134, 168, 216, 195, 110, 153, 253, 8, 159, 232, 137, 46, 67, 63, 117, 28, 144, 148, 181, 228, 174, 145, 95, 209, 137, 155, 233, 205, 7, 205, 172, 175, 91, 153, 48, 157, 54, 72, 13, 142, 121, 206, 71, 122, 22, 106, 155, 0, 56, 3, 230, 234, 226, 199, 66, 223, 111, 31, 187, 125, 251, 197, 110, 166, 148, 83, 120, 16, 212, 243, 45, 63, 205, 99, 225, 191, 196, 47, 251, 190, 197, 148, 74, 226, 155, 37, 231, 55, 67, 17, 72, 219, 214, 163, 173, 124, 33, 77, 50, 204, 108, 220, 11, 194, 75, 215, 18, 108, 192, 217, 246, 184, 223, 206, 173, 204, 163, 169, 240, 165, 52, 227, 200, 243, 175, 11, 200, 73, 230, 218, 159, 125, 190, 0, 205, 113, 111, 10, 63, 77, 194, 100, 131, 46, 31, 7, 21, 171, 166, 72, 128, 60, 172, 134, 21, 105, 139, 88, 93, 50, 163, 244, 52, 131, 187, 70, 113, 157, 74, 200, 249, 174, 139, 102, 52, 242, 137, 34, 229, 168, 132, 201, 216, 150, 177, 7, 177, 115, 44, 73, 123, 239, 0, 167, 34, 202, 127, 229, 223, 175, 178, 122, 125, 118, 255, 101, 21, 191, 62, 72, 44, 139, 198, 158, 48, 243, 76, 33, 251, 2, 222, 89, 224, 167, 87, 172, 174, 172, 186, 242, 162, 129, 225, 137, 250, 52, 164, 111, 195, 28, 194, 192, 24, 248, 56, 82, 231, 38, 99, 128, 17, 8, 89, 255, 189, 193, 13, 110, 159, 127, 35, 37, 49, 124, 240, 146, 74, 226, 141, 42, 143, 144, 208, 243, 151, 16, 39, 142, 74, 82, 2, 141, 131, 53, 130, 186, 113, 70, 159, 156, 166, 25, 135, 126, 114, 201, 63, 12, 239, 165, 252, 127, 220, 187, 248, 236, 116, 140, 87, 109, 169, 130, 192, 77, 158, 153, 151, 180, 5, 128, 30, 36, 118, 41, 114, 39, 77, 70, 172, 13, 48, 231, 58, 29, 145, 228, 86, 148, 56, 109, 180, 52, 101, 183, 88, 110, 171, 21, 113, 223, 90, 122, 133, 190, 40, 59, 156, 247, 107, 233, 81, 47, 199, 118, 195, 227, 228, 145, 192, 52, 65, 223, 233, 195, 32, 5, 80, 3, 224, 174, 204, 254, 252, 2, 165, 219, 101, 137, 121, 234, 100, 251, 188, 63, 48, 60, 42, 188, 224, 118, 148, 42, 157, 58, 98, 214, 183, 35, 154, 98, 3, 56, 88, 80, 19, 57, 255, 248, 86, 17, 65, 106, 142, 204, 103, 70, 4, 253, 230, 181, 76, 149, 143, 182, 225, 126, 217, 152, 162, 242, 161, 61, 131, 62, 115, 192, 91, 89, 71, 184, 17, 130, 119, 81, 62, 116, 52, 30, 240, 0, 145, 158, 196, 25, 60, 187, 111, 204, 252, 132, 29, 18, 162, 228, 17, 242, 143, 249, 146, 244, 3, 73, 152, 109, 94, 203, 145, 215, 29, 190, 206, 74, 174, 2, 112, 75, 180, 205, 200, 232, 175, 55, 162, 254, 214, 237, 204, 99, 166, 148, 211, 65, 23, 35, 167, 168, 25, 6, 186, 195, 235, 254, 169, 106, 1, 255, 149, 247, 139, 183, 53, 154, 3, 121, 109, 42, 244, 5, 75, 53, 32, 110, 175, 87, 54, 190, 8, 191, 169, 217, 20, 73, 146, 83, 11, 51, 72, 226, 224, 4, 112, 38, 88, 113, 141, 80, 100, 126, 170, 34, 130, 40, 196, 1, 199, 122, 33, 243, 62, 242, 192, 7, 8, 87, 29, 141, 238, 105, 154, 68, 9, 208, 95, 116, 67, 168, 119, 170, 50, 154, 6, 197, 9, 100, 39, 101, 135, 67, 15, 227, 210, 8, 75, 49, 22, 64, 111, 77, 46, 108, 81, 52, 66, 184, 152, 229, 80, 194, 183, 17, 145, 190, 254, 94, 108, 197, 80, 164, 169, 195, 127, 152, 42, 206, 112, 177, 132, 134, 74, 122, 180, 228, 192, 23, 111, 219, 127, 91, 51, 63, 148, 58, 9, 55, 205, 111, 76, 203, 220, 164, 163, 5, 107, 224, 55, 113, 15, 25, 253, 34, 5, 152, 183, 82, 88, 39, 186, 31, 128, 103, 128, 188, 18, 212, 191, 77, 95, 141, 75, 37, 0, 6, 134, 113, 113, 4, 171, 182, 56, 206, 232, 148, 244, 40, 71, 191, 73, 159, 158, 16, 165, 112, 4, 89, 230, 137, 54, 199, 30, 164, 109, 14, 46, 128, 184, 114, 50, 110, 179, 30, 222, 241, 143, 86, 162, 91, 155, 225, 213, 27, 68, 112, 56, 104, 101, 170, 10, 83, 132, 12, 64, 89, 50, 99, 145, 50, 183, 202, 58, 135, 149, 113, 34, 40, 232, 60, 77, 56, 76, 189, 143, 247, 198, 2, 95, 124, 18, 130, 225, 149, 232, 189, 180, 244, 234, 169, 206, 162, 142, 133, 31, 23, 107, 231, 53, 28, 212, 29, 234, 50, 84, 197, 235, 138, 8, 236, 151, 32, 200, 250, 172, 228, 11, 183, 98, 170, 94, 215, 244, 112, 159, 71, 132, 76, 240, 123, 172, 186, 211, 137, 52, 143, 155, 92, 107, 50, 214, 18, 222, 150, 18, 141, 218, 217, 69, 50, 199, 210, 35, 212, 145, 79, 93, 139, 238, 63, 230, 197, 86, 246, 183, 216, 80, 181, 69, 29, 17, 235, 172, 127, 244, 224, 147, 61, 254, 160, 190, 250, 65, 213, 153, 79, 164, 252, 233, 236, 197, 151, 203, 184, 68, 192, 38, 71, 204, 5, 180, 61, 250, 70, 85, 222, 69, 101, 190, 38, 58, 89, 28, 32, 65, 165, 229, 64, 41, 149, 28, 179, 114, 25, 20, 105, 228, 179, 181, 160, 165, 59, 239, 158, 24, 237, 160, 3, 182, 14, 125, 21, 35, 51, 240, 174, 49, 15, 110, 137, 220, 66, 188, 179, 7, 80, 84, 53, 208, 241, 204, 68, 117, 78, 189, 141, 209, 12, 252, 93, 151, 174, 4, 203, 220, 162, 222, 148, 55, 138, 117, 119, 177, 190, 149, 151, 90, 194, 122, 179, 254, 217, 199, 144, 203, 161, 78, 18, 247, 178, 144, 170, 71, 101, 51, 211, 27, 37, 77, 207, 212, 139, 228, 86, 230, 5, 90, 185, 140, 143, 233, 149, 243, 153, 107, 242, 230, 238, 169, 15, 89, 148, 158, 17, 202, 96, 164, 27, 194, 156, 186, 55, 76, 149, 246, 17, 78, 193, 163, 165, 219, 93, 245, 117, 164, 189, 211, 85, 17, 22, 48, 224, 238, 178, 143, 112, 158, 198, 191, 170, 25, 113, 41, 206, 83, 199, 96, 155, 198, 132, 223, 202, 68, 233, 248, 18, 3, 90, 22, 99, 89, 38, 21, 46, 8, 199, 230, 109, 196, 43, 224, 186, 77, 54, 54, 69, 255, 16, 22, 125, 53, 217, 45, 122, 144, 210, 178, 208, 102, 114, 29, 195, 158, 36, 238, 128, 245, 35, 212, 215, 172, 109, 161, 67, 185, 159, 151, 194, 63, 242, 35, 51, 101, 30, 178, 200, 151, 149, 218, 188, 202, 170, 161, 210, 110, 204, 62, 18, 39, 195, 223, 149, 177, 164, 64, 99, 45, 7, 101, 87, 224, 47, 247, 37, 31, 49, 150, 20, 135, 247, 156, 50, 120, 18, 42, 5, 123, 91, 110, 215, 45, 119, 29, 124, 47, 216, 242, 219, 191, 1, 115, 163, 234, 10, 168, 179, 149, 26, 50, 11, 248, 202, 252, 155, 115, 143, 12, 198, 232, 228, 47, 74, 92, 47, 142, 58, 142, 163, 39, 184, 160, 154, 111, 240, 156, 17, 8, 60, 63, 254, 25, 222, 154, 174, 131, 69, 219, 56, 188, 200, 31, 37, 0, 116, 169, 170, 197, 94, 72, 108, 107, 126, 101, 62, 153, 54, 241, 105, 79, 178, 148, 4, 1, 164, 72, 12, 231, 237, 209, 180, 128, 77, 208, 206, 61, 147, 235, 19, 104, 76, 198, 209, 203, 33, 217, 38, 40, 202, 15, 180, 195, 72, 141, 200, 111, 223, 111, 51, 115, 179, 102, 82, 142, 201, 77, 5, 143, 39, 65, 212, 131, 75, 146, 45, 69, 244, 109, 68, 22, 0, 0, 222, 193, 221, 65, 189, 3, 16, 179, 57, 222, 119, 181, 42, 246, 76, 234, 133, 203, 140, 7, 117, 227, 96, 214, 126, 13, 87, 195, 179, 244, 50, 154, 157, 184, 68, 226, 62, 221, 232, 75, 103, 165, 116, 39, 37, 157, 248, 81, 178, 249, 154, 24, 157, 88, 120, 135, 64, 174, 7, 67, 241, 236, 151, 207, 119, 158, 45, 222, 37, 74, 196, 49, 197, 42, 140, 11, 221, 148, 226, 69, 44, 155, 11, 128, 96, 244, 185, 103, 43, 12, 241, 85, 241, 145, 218, 213, 205, 117, 238, 243, 105, 59, 166, 1, 53, 194, 225, 188, 235, 103, 164, 53, 243, 97, 163, 30, 213, 0, 146, 198, 233, 173, 158, 87, 1, 233, 78, 102, 168, 12, 23, 79, 17, 66, 236, 88, 182, 2, 201, 75, 201, 134, 44, 99, 81, 31, 163, 203, 80, 216, 143, 38, 101, 7, 159, 208, 143, 132, 136, 248, 134, 214, 145, 200, 58, 238, 103, 69, 74, 232, 119, 131, 210, 17, 135, 242, 158, 187, 95, 88, 218, 243, 135, 173, 61, 97, 142, 5, 42, 207, 95, 2, 152, 160, 171, 141, 64, 221, 138, 148, 162, 116, 195, 161, 191, 37, 246, 178, 31, 242, 202, 182, 133, 183, 222, 108, 114, 74, 62, 44, 138, 163, 138, 224, 115, 11, 100, 160, 27, 28, 105, 145, 100, 239, 157, 184, 111, 134, 167, 76, 4, 129, 216, 141, 168, 159, 25, 61, 64, 42, 190, 224, 8, 190, 176, 15, 105, 163, 49, 209, 6, 7, 107, 228, 75, 237, 27, 215, 226, 155, 128, 92, 230, 90, 128, 200, 13, 29, 249, 63, 53, 155, 189, 6, 38, 125, 238, 92, 84, 7, 209, 160, 115, 152, 78, 24, 91, 252, 216, 186, 205, 110, 134, 56, 122, 183, 231, 194, 29, 167, 21, 94, 23, 247, 252, 48, 76, 20, 65, 135, 232, 32, 155, 205, 129, 172, 47, 205, 175, 118, 4, 123, 101, 25, 38, 242, 85, 165, 112, 90, 112, 177, 61, 120, 188, 38, 44, 21, 158, 173, 7, 122, 74, 247, 60, 130, 250, 110, 168, 235, 92, 39, 229, 198, 204, 102, 62, 253, 222, 253, 77, 104, 106, 158, 162, 155, 58, 162, 57, 223, 15, 153, 204, 32, 241, 210, 130, 158, 239, 159, 41, 100, 41, 172, 46, 108, 12, 95, 178, 55, 76, 123, 40, 91, 185, 153, 212, 148, 84, 59, 46, 40, 4, 162, 108, 244, 226, 185, 235, 65, 81, 103, 29, 71, 177, 175, 179, 135, 254, 141, 190, 162, 70, 93, 56, 16, 36, 153, 158, 79, 229, 98, 59, 249, 37, 174, 38, 56, 51, 49, 230, 230, 54, 70, 38, 32, 199, 174, 69, 197, 54, 234, 156, 177, 14, 113, 251, 145, 100, 117, 139, 193, 150, 109, 144, 108, 91, 155, 63, 3, 118, 253, 251, 7, 242, 146, 59, 193, 85, 74, 67, 214, 220, 212, 68, 215, 154, 29, 13, 129, 29, 63, 243, 106, 159, 100, 110, 198, 27, 5, 168, 194, 23, 148, 211, 237, 122, 119, 37, 104, 107, 126, 251, 230, 152, 78, 218, 39, 156, 36, 16, 152, 131, 79, 50, 172, 178, 98, 144, 221, 237, 224, 16, 211, 160, 111, 125, 65, 171, 183, 237, 137, 93, 96, 3, 143, 205, 59, 55, 206, 238, 106, 181, 157, 97, 114, 85, 131, 84, 57, 100, 74, 69, 97, 219, 200, 134, 103, 77, 129, 144, 132, 175, 85, 44, 89, 198, 104, 194, 66, 215, 37, 39, 216, 38, 156, 27, 161, 23, 122, 224, 138, 64, 130, 143, 67, 107, 52, 134, 152, 96, 19, 69, 72, 200, 89, 79, 104, 46, 30, 227, 69, 45, 59, 82, 104, 158, 128, 140, 66, 238, 55, 55, 47, 100, 7, 93, 147, 6, 102, 206, 208, 88, 161, 110, 115, 76, 53, 126, 9, 94, 90, 56, 50, 60, 13, 198, 6, 113, 242, 45, 115, 160, 108, 80, 63, 51, 79, 39, 234, 18, 95, 231, 208, 244, 129, 81, 91, 45, 104, 182, 51, 31, 173, 119, 99, 122, 70, 120, 233, 68, 72, 70, 53, 191, 223, 115, 75, 196, 51, 221, 238, 174, 122, 5, 104, 109, 178, 187, 96, 106, 248, 241, 234, 99, 234, 173, 40, 242, 194, 230, 126, 69, 0, 77, 241, 181, 243, 65, 29, 20, 2, 29, 95, 161, 225, 31, 20, 134, 79, 135, 229, 29, 232, 81, 19, 248, 186, 104, 2, 2, 24, 50, 16, 34, 111, 159, 116, 45, 212, 93, 254, 97, 210, 70, 37, 166, 211, 46, 10, 121, 123, 106, 227, 183, 5, 43, 154, 100, 22, 225, 78, 157, 219, 251, 194, 122, 183, 100, 25, 14, 88, 139, 198, 80, 172, 253, 102, 146, 164, 221, 50, 184, 236, 160, 204, 140, 103, 38, 103, 83, 61, 37, 164, 51, 63, 143, 20, 5, 109, 112, 163, 1, 121, 193, 178, 13, 141, 127, 149, 64, 239, 66, 249, 1, 160, 190, 228, 49, 115, 30, 157, 198, 38, 236, 57, 233, 247, 139, 96, 117, 251, 85, 117, 213, 131, 181, 148, 57, 226, 7, 136, 185, 119, 51, 208, 165, 190, 211, 74, 88, 61, 169, 80, 112, 28, 199, 142, 140, 184, 132, 239, 10, 9, 44, 174, 162, 246, 219, 27, 74, 54, 206, 176, 30, 232, 209, 116, 81, 186, 95, 102, 27, 34, 134, 212, 70, 48, 252, 167, 226, 251, 199, 37, 29, 5, 186, 43, 242, 255, 10, 163, 113, 19, 133, 207, 205, 202, 64, 20, 86, 2, 67, 206, 63, 14, 46, 98, 212, 192, 99, 111, 197, 155, 171, 242, 161, 248, 95, 148, 226, 145, 137, 238, 197, 112, 141, 210, 142, 61, 138, 188, 190, 160, 238, 148, 193, 248, 170, 150, 8, 232, 134, 190, 111, 166, 133, 166, 16, 45, 210, 167, 208, 184, 67, 189, 156, 36, 67, 29, 31, 32, 131, 214, 42, 124, 104, 116, 242, 246, 93, 220, 100, 90, 14, 91, 220, 77, 87, 254, 218, 168, 217, 245, 118, 119, 6, 237, 183, 115, 194, 234, 250, 132, 168, 91, 191, 238, 53, 7, 71, 54, 234, 143, 227, 107, 197, 6, 206, 215, 93, 150, 28, 9, 2, 46, 242, 200, 139, 48, 58, 10, 162, 65, 26, 187, 81, 74, 62, 63, 196, 107, 226, 114, 231, 64, 226, 160, 96, 185, 82, 131, 222, 238, 33, 171, 182, 145, 64, 11, 56, 191, 145, 33, 6, 13, 165, 32, 5, 39, 233, 74, 191, 160, 189, 234, 99, 199, 102, 76, 227, 249, 161, 95, 196, 47, 19, 115, 175, 131, 78, 175, 11, 17, 125, 105, 122, 14, 37, 128, 20, 187, 236, 190, 139, 129, 171, 52, 218, 54, 88, 56, 177, 184, 73, 165, 224, 206, 70, 53, 231, 78, 96, 176, 52, 254, 108, 41, 116, 17, 8, 90, 98, 109, 172, 2, 242, 2, 100, 46, 115, 199, 239, 31, 25, 165, 31, 220, 216, 73, 126, 107, 45, 9, 10, 172, 233, 80, 62, 144, 225, 34, 51, 176, 200, 197, 223, 163, 213, 111, 147, 167, 137, 223, 137, 54, 65, 96, 139, 100, 108, 63, 113, 48, 52, 248, 172, 57, 104, 243, 169, 240, 239, 37, 137, 210, 152, 204, 89, 149, 55, 188, 177, 212, 94, 7, 173, 204, 60, 234, 123, 151, 101, 141, 68, 3, 119, 213, 241, 55, 118, 73, 163, 248, 66, 146, 71, 54, 139, 226, 91, 205, 128, 190, 23, 179, 75, 46, 238, 118, 161, 24, 93, 132, 185, 112, 103, 159, 198, 84, 69, 72, 199, 24, 145, 234, 218, 152, 87, 21, 15, 246, 54, 126, 182, 131, 118, 232, 136, 60, 128, 232, 238, 187, 172, 118, 49, 212, 2, 195, 189, 107, 170, 146, 114, 133, 224, 88, 96, 96, 76, 179, 158, 163, 229, 24, 241, 151, 49, 120, 5, 201, 221, 173, 100, 167, 197, 238, 77, 99, 3, 221, 252, 136, 48, 204, 66, 212, 221, 150, 187, 93, 134, 255, 165, 153, 190, 86, 8, 200, 119, 151, 88, 254, 230, 162, 105, 42, 225, 65, 212, 15, 228, 111, 152, 84, 6, 160, 104, 208, 24, 88, 35, 54, 131, 108, 157, 153, 223, 214, 106, 71, 107, 117, 118, 157, 19, 61, 21, 167, 38, 249, 180, 76, 79, 44, 15, 57, 98, 144, 123, 68, 180, 180, 243, 113, 190, 161, 116, 236, 5, 38, 26, 252, 164, 135, 137, 190, 155, 40, 232, 252, 51, 109, 87, 89, 121, 130, 179, 168, 116, 23, 19, 12, 144, 39, 197, 6, 206, 66, 85, 181, 34, 60, 177, 157, 78, 179, 229, 183, 215, 191, 118, 140, 130, 250, 162, 133, 27, 65, 236, 71, 64, 63, 105, 200, 102, 103, 69, 136, 98, 71, 208, 200, 254, 64, 163, 40, 198, 44, 44, 18, 72, 36, 177, 183, 225, 167, 2, 132, 87, 13, 244, 9, 127, 64, 186, 212, 92, 146, 221, 57, 111, 114, 146, 125, 88, 209, 148, 170, 149, 58, 59, 187, 147, 172, 42, 89, 189, 131, 72, 109, 223, 58, 149, 199, 66, 155, 218, 187, 247, 47, 147, 40, 60, 112, 5, 164, 63, 69, 193, 119, 91, 151, 54, 248, 159, 126, 4, 49, 162, 238, 81, 132, 82, 29, 112, 215, 103, 247, 235, 104, 204, 213, 51, 185, 24, 52, 227, 236, 154, 99, 216, 26, 77, 240, 234, 203, 180, 109, 204, 185, 25, 180, 66, 173, 115, 89, 127, 194, 111, 184, 19, 249, 126, 111, 112, 254, 50, 163, 70, 177, 242, 170, 8, 75, 135, 6, 222, 75, 7, 149, 253, 32, 190, 179, 241, 216, 13, 1, 124, 251, 152, 238, 35, 202, 90, 216, 30, 75, 126, 12, 32, 71, 142, 67, 4, 33, 139, 26, 146, 131, 242, 167, 80, 244, 53, 39, 42, 121, 141, 124, 64, 88, 148, 64, 39, 29, 36, 80, 116, 134, 67, 24, 77, 87, 97, 231, 184, 42, 19, 147, 239, 45, 83, 209, 205, 13, 115, 194, 40, 71, 47, 186, 26, 201, 100, 218, 80, 164, 81, 211, 236, 163, 200, 170, 30, 124, 193, 19, 200, 173, 117, 47, 2, 194, 239, 142, 171, 163, 37, 221, 180, 161, 210, 212, 135, 233, 22, 73, 130, 174, 147, 244, 100, 153, 146, 211, 130, 235, 125, 138, 199, 167, 72, 27, 154, 185, 241, 44, 124, 248, 234, 82, 69, 221, 35, 216, 135, 191, 148, 65, 156, 118, 98, 41, 8, 115, 100, 211, 37, 219, 33, 141, 74, 129, 136, 23, 93, 211, 88, 40, 33, 3, 244, 202, 174, 180, 22, 42, 228, 222, 241, 246, 67, 196, 63, 131, 5, 145, 50, 60, 58, 158, 89, 184, 153, 8, 180, 190, 231, 156, 168, 146, 3, 30, 245, 173, 25, 199, 38, 154, 188, 35, 116, 137, 142, 50, 91, 65, 228, 240, 37, 111, 58, 32, 69, 28, 84, 43, 112, 224, 210, 123, 238, 15, 237, 78, 175, 118, 94, 157, 161, 10, 238, 146, 8, 81, 80, 222, 212, 228, 63, 37, 68, 221, 232, 242, 184, 17, 197, 141, 74, 23, 140, 194, 217, 194, 146, 83, 216, 25, 65, 146, 167, 68, 183, 8, 93, 29, 232, 111, 130, 54, 228, 28, 133, 92, 233, 83, 170, 15, 6, 203, 150, 64, 121, 149, 215, 95, 10, 131, 52, 105, 247, 0, 118, 113, 86, 68, 14, 168, 75, 60, 168, 155, 45, 162, 236, 39, 241, 64, 196, 228, 95, 176, 86, 100, 152, 112, 54, 37, 129, 47, 178, 180, 224, 91, 49, 41, 26, 57, 213, 72, 145, 192, 25, 129, 214, 133, 19, 87, 2, 52, 77, 44, 210, 126, 116, 28, 12, 57, 96, 17, 102, 216, 109, 178, 146, 16, 186, 133, 119, 29, 247, 238, 214, 227, 198, 32, 12, 57, 8, 155, 175, 19, 63, 18, 13, 179, 164, 180, 251, 248, 171, 159, 187, 27, 152, 195, 213, 58, 96, 43, 150, 239, 31, 79, 215, 211, 73, 140, 245, 36, 225, 47, 160, 214, 118, 86, 177, 135, 249, 185, 162, 57, 117, 181, 31, 254, 79, 66, 100, 100, 209, 155, 120, 5, 63, 51, 242, 211, 232, 93, 145, 251, 4, 238, 234, 54, 45, 248, 207, 242, 83, 172, 108, 161, 45, 116, 141, 89, 141, 101, 196, 84, 45, 130, 166, 240, 193, 149, 210, 70, 144, 94, 169, 186, 123, 196, 49, 84, 18, 125, 63, 95, 51, 246, 181, 40, 77, 244, 223, 57, 33, 43, 29, 140, 21, 218, 19, 48, 182, 61, 74, 138, 170, 214, 8, 90, 182, 54, 234, 36, 188, 232, 91, 142, 47, 42, 81, 73, 210, 115, 119, 4, 245, 213, 104, 221, 219, 51, 246, 77, 182, 122, 28, 81, 195, 53, 131, 248, 132, 239, 176, 85, 203, 184, 176, 69, 217, 207, 197, 214, 157, 246, 212, 80, 100, 61, 49, 104, 70, 14, 23, 50, 245, 123, 26, 51, 235, 123, 77, 20, 179, 20, 85, 33, 124, 222, 143, 74, 137, 77, 129, 180, 127, 178, 6, 39, 55, 236, 160, 75, 39, 204] + ], + "segmentSize": null + }, + { + "encrypted": [ + [10, 2, 221, 232, 213] + ], + "iv": [234, 243, 221, 102, 188, 160, 245, 24, 151, 245, 149, 158, 46, 133, 177, 179], + "key": [78, 86, 20, 211, 131, 56, 37, 48, 20, 138, 199, 193, 232, 249, 158, 48], + "modeOfOperation": "cfb", + "plaintext": [ + [192, 24, 26, 143, 162] + ], + "segmentSize": 1 + }, + { + "encrypted": [ + [44, 114, 205, 175, 42, 233, 170, 197, 16, 65], + [119, 226, 142, 13, 88, 205, 110, 143, 157, 175] + ], + "iv": [36, 103, 47, 177, 19, 198, 110, 111, 22, 218, 248, 81, 37, 103, 246, 137], + "key": [255, 21, 194, 207, 0, 91, 247, 241, 23, 5, 14, 63, 157, 182, 39, 160], + "modeOfOperation": "cfb", + "plaintext": [ + [105, 183, 37, 78, 54, 238, 15, 45, 58, 18], + [125, 200, 239, 127, 157, 204, 185, 147, 35, 139] + ], + "segmentSize": 2 + }, + { + "encrypted": [ + [139, 167, 181, 230, 242, 32, 91, 3, 80, 226, 203, 235, 33, 45, 58], + [211, 117, 40, 211, 233, 59, 216, 135, 255, 124, 207, 243, 112, 119, 238], + [121, 120, 201, 22, 16, 241, 34, 175, 105, 220, 159, 216, 31, 32, 7] + ], + "iv": [19, 52, 134, 44, 111, 50, 100, 155, 128, 139, 229, 250, 184, 108, 42, 157], + "key": [159, 236, 88, 63, 198, 98, 160, 134, 113, 165, 83, 139, 1, 186, 32, 217], + "modeOfOperation": "cfb", + "plaintext": [ + [249, 208, 52, 6, 172, 237, 121, 123, 59, 20, 99, 1, 140, 13, 129], + [131, 17, 90, 0, 213, 209, 72, 248, 120, 133, 30, 165, 84, 0, 2], + [112, 94, 234, 234, 119, 7, 213, 250, 55, 203, 238, 2, 158, 51, 60] + ], + "segmentSize": 3 + }, + { + "encrypted": [ + [34, 95, 165, 68, 191, 185, 49, 180, 202, 99, 31, 39, 57, 166, 228, 47, 160, 220, 105, 24], + [96, 241, 21, 6, 204, 207, 215, 125, 53, 73, 221, 121, 5, 30, 230, 192, 194, 254, 137, 197], + [76, 143, 247, 252, 110, 58, 64, 175, 78, 24, 143, 116, 227, 136, 170, 168, 91, 242, 42, 69], + [222, 206, 34, 45, 117, 31, 67, 139, 58, 58, 185, 173, 10, 41, 185, 52, 112, 74, 131, 205] + ], + "iv": [32, 2, 176, 109, 167, 57, 123, 142, 135, 155, 180, 151, 248, 159, 186, 76], + "key": [95, 43, 106, 13, 149, 179, 19, 15, 195, 147, 252, 129, 71, 85, 126, 55], + "modeOfOperation": "cfb", + "plaintext": [ + [80, 176, 49, 151, 119, 128, 171, 76, 234, 37, 101, 225, 164, 47, 88, 163, 199, 196, 243, 13], + [53, 246, 236, 7, 10, 159, 210, 70, 82, 207, 76, 94, 26, 208, 147, 76, 49, 57, 197, 11], + [211, 21, 174, 145, 251, 98, 65, 98, 84, 123, 131, 92, 106, 115, 31, 253, 135, 50, 70, 162], + [151, 7, 240, 221, 148, 73, 46, 104, 192, 77, 147, 88, 2, 194, 18, 5, 164, 213, 220, 13] + ], + "segmentSize": 4 + }, + { + "encrypted": [ + [242, 141, 31, 240, 157, 155, 33, 113, 239, 55, 220, 117, 175, 205, 172, 47, 112, 254, 62, 7, 207, 180, 134, 149, 152], + [224, 109, 150, 162, 94, 161, 93, 159, 39, 118, 39, 152, 250, 188, 39, 142, 78, 68, 5, 8, 190, 190, 152, 248, 238], + [151, 128, 232, 219, 174, 24, 139, 207, 153, 226, 103, 85, 165, 39, 255, 90, 178, 61, 67, 218, 200, 182, 24, 180, 228], + [49, 114, 133, 10, 236, 70, 35, 76, 243, 112, 143, 122, 220, 194, 170, 182, 212, 38, 36, 72, 53, 227, 227, 179, 162], + [241, 32, 51, 7, 78, 237, 15, 221, 82, 217, 180, 173, 35, 201, 228, 154, 133, 55, 86, 162, 166, 29, 10, 127, 245] + ], + "iv": [101, 4, 155, 140, 37, 167, 54, 13, 159, 238, 168, 30, 152, 243, 183, 124], + "key": [138, 40, 60, 243, 149, 5, 182, 255, 250, 209, 153, 118, 119, 227, 240, 195], + "modeOfOperation": "cfb", + "plaintext": [ + [231, 146, 221, 123, 75, 77, 71, 16, 169, 80, 233, 160, 46, 49, 188, 143, 164, 208, 173, 163, 199, 74, 39, 206, 110], + [248, 215, 140, 22, 184, 142, 46, 147, 226, 93, 16, 130, 169, 223, 73, 117, 171, 91, 24, 75, 100, 240, 102, 197, 178], + [109, 11, 25, 130, 123, 9, 62, 199, 155, 42, 220, 243, 238, 221, 126, 213, 34, 74, 134, 223, 132, 217, 192, 92, 87], + [41, 199, 39, 128, 21, 89, 254, 72, 6, 127, 101, 28, 1, 156, 7, 169, 120, 139, 235, 166, 56, 30, 64, 87, 186], + [220, 107, 240, 97, 91, 181, 134, 170, 46, 67, 106, 7, 156, 192, 148, 130, 129, 73, 41, 96, 171, 148, 226, 215, 99] + ], + "segmentSize": 5 + }, + { + "encrypted": [ + [71, 0, 93, 40, 63, 80, 127, 193, 83, 134, 10, 251, 102, 68, 141, 251, 28, 200, 117, 216, 137, 159, 3, 54, 68, 218, 129, 48, 218, 228], + [52, 207, 103, 204, 227, 114, 212, 214, 196, 92, 171, 186, 251, 177, 173, 39, 180, 123, 172, 207, 98, 56, 26, 128, 85, 164, 248, 89, 233, 166], + [38, 150, 63, 169, 20, 129, 251, 249, 110, 138, 130, 89, 104, 12, 239, 128, 171, 109, 73, 207, 206, 213, 140, 48, 138, 239, 49, 217, 178, 247], + [177, 50, 26, 3, 200, 223, 64, 242, 86, 33, 161, 137, 182, 103, 31, 247, 32, 182, 176, 0, 82, 204, 243, 223, 109, 109, 100, 86, 31, 223], + [212, 154, 251, 104, 168, 188, 144, 201, 59, 131, 99, 129, 253, 208, 17, 211, 99, 248, 41, 185, 140, 250, 135, 0, 117, 152, 184, 168, 28, 160], + [52, 100, 15, 171, 229, 148, 76, 252, 105, 194, 86, 116, 177, 62, 10, 125, 61, 39, 251, 137, 201, 168, 253, 64, 11, 80, 136, 20, 91, 42] + ], + "iv": [37, 238, 152, 185, 129, 245, 245, 196, 62, 242, 105, 233, 214, 135, 114, 94], + "key": [75, 86, 25, 233, 33, 23, 63, 169, 83, 98, 137, 227, 67, 226, 132, 26], + "modeOfOperation": "cfb", + "plaintext": [ + [116, 210, 117, 91, 191, 39, 122, 129, 115, 237, 22, 215, 209, 166, 211, 143, 20, 78, 113, 43, 86, 201, 67, 132, 164, 13, 193, 4, 77, 79], + [240, 102, 141, 201, 0, 45, 68, 154, 150, 60, 149, 92, 191, 152, 141, 92, 236, 79, 184, 123, 70, 233, 104, 248, 241, 19, 134, 201, 50, 121], + [152, 196, 160, 243, 154, 77, 209, 147, 220, 185, 137, 248, 41, 37, 232, 13, 95, 38, 186, 164, 95, 217, 14, 214, 133, 15, 102, 133, 240, 126], + [107, 36, 90, 54, 225, 58, 110, 41, 92, 25, 161, 221, 24, 98, 33, 231, 199, 70, 139, 36, 16, 15, 25, 232, 230, 21, 127, 154, 88, 19], + [195, 134, 20, 29, 102, 115, 247, 247, 197, 156, 101, 6, 36, 30, 164, 238, 163, 181, 239, 70, 152, 60, 84, 130, 53, 81, 98, 177, 19, 92], + [20, 232, 176, 166, 5, 233, 31, 118, 71, 88, 227, 174, 224, 117, 3, 227, 8, 200, 253, 119, 214, 255, 158, 42, 13, 43, 44, 76, 25, 44] + ], + "segmentSize": 6 + }, + { + "encrypted": [ + [144, 1, 184, 245, 21, 228, 47, 203, 99, 160, 11, 151, 119, 54, 224, 4, 115, 93, 43, 70, 116, 19, 115, 68, 145, 119, 22, 63, 28, 167, 116, 197, 237, 39, 242], + [192, 147, 108, 0, 177, 48, 229, 86, 216, 171, 10, 224, 154, 81, 69, 179, 16, 173, 218, 255, 10, 64, 87, 59, 64, 205, 160, 28, 92, 101, 192, 50, 40, 230, 137], + [165, 108, 110, 39, 218, 18, 143, 157, 62, 45, 230, 25, 207, 2, 234, 0, 226, 226, 210, 164, 169, 249, 102, 108, 113, 204, 60, 69, 39, 39, 128, 227, 228, 17, 169], + [58, 69, 231, 103, 57, 239, 134, 231, 173, 155, 19, 151, 76, 227, 239, 22, 190, 233, 141, 142, 191, 233, 198, 78, 58, 95, 152, 224, 137, 217, 228, 77, 1, 188, 67], + [192, 81, 233, 77, 110, 225, 205, 135, 206, 152, 28, 96, 9, 11, 239, 2, 21, 61, 175, 80, 113, 22, 235, 155, 197, 222, 192, 165, 207, 130, 59, 171, 210, 112, 75], + [210, 174, 228, 182, 216, 227, 25, 225, 248, 35, 114, 224, 43, 249, 82, 238, 128, 158, 223, 148, 164, 197, 50, 101, 4, 187, 229, 44, 230, 32, 9, 36, 142, 217, 104], + [55, 235, 95, 73, 229, 159, 189, 159, 178, 255, 177, 253, 72, 219, 177, 0, 35, 166, 29, 201, 107, 124, 55, 169, 79, 236, 114, 234, 23, 104, 20, 170, 29, 198, 138] + ], + "iv": [187, 204, 247, 158, 135, 194, 247, 120, 120, 106, 60, 2, 70, 235, 60, 182], + "key": [53, 13, 109, 167, 74, 44, 8, 37, 154, 67, 180, 16, 166, 160, 146, 121], + "modeOfOperation": "cfb", + "plaintext": [ + [104, 109, 143, 83, 101, 219, 113, 108, 20, 175, 182, 12, 117, 206, 221, 54, 250, 191, 254, 131, 136, 160, 95, 201, 198, 77, 170, 213, 147, 153, 238, 10, 173, 158, 248], + [236, 128, 52, 172, 88, 177, 22, 179, 129, 59, 156, 219, 30, 108, 249, 251, 99, 38, 55, 102, 19, 26, 187, 142, 13, 30, 182, 63, 226, 143, 33, 127, 185, 150, 213], + [44, 54, 174, 138, 140, 123, 91, 111, 107, 83, 59, 104, 93, 187, 148, 82, 120, 76, 14, 110, 124, 190, 17, 7, 108, 203, 39, 221, 143, 49, 214, 151, 112, 203, 8], + [240, 66, 88, 86, 172, 28, 113, 115, 188, 80, 41, 196, 154, 174, 1, 129, 121, 191, 32, 182, 149, 88, 4, 225, 38, 26, 169, 6, 92, 145, 188, 148, 116, 133, 99], + [240, 136, 99, 198, 171, 117, 213, 215, 21, 104, 214, 37, 140, 157, 52, 138, 201, 124, 208, 197, 164, 187, 161, 127, 17, 254, 132, 174, 98, 126, 191, 71, 141, 102, 223], + [158, 51, 15, 31, 40, 133, 106, 4, 94, 38, 115, 122, 192, 123, 109, 4, 16, 0, 143, 183, 197, 10, 111, 55, 209, 73, 12, 52, 13, 114, 216, 221, 222, 191, 113], + [251, 12, 0, 6, 125, 174, 86, 92, 137, 24, 50, 166, 117, 212, 54, 195, 102, 44, 81, 253, 184, 190, 211, 227, 38, 0, 172, 6, 188, 154, 64, 26, 20, 255, 129] + ], + "segmentSize": 7 + }, + { + "encrypted": [ + [222, 135, 232, 208, 210] + ], + "iv": [123, 32, 32, 30, 62, 144, 226, 88, 63, 216, 253, 103, 54, 103, 27, 98], + "key": [113, 86, 136, 7, 119, 64, 171, 103, 138, 57, 158, 199, 11, 111, 206, 102, 144, 181, 142, 174, 46, 183, 177, 44], + "modeOfOperation": "cfb", + "plaintext": [ + [126, 3, 225, 41, 235] + ], + "segmentSize": 1 + }, + { + "encrypted": [ + [249, 124, 111, 195, 101, 212, 190, 0, 255, 9], + [198, 234, 250, 103, 28, 38, 112, 112, 234, 114] + ], + "iv": [24, 177, 158, 35, 8, 225, 253, 210, 91, 218, 41, 184, 57, 120, 37, 151], + "key": [97, 144, 186, 130, 185, 176, 170, 164, 82, 78, 223, 110, 45, 176, 16, 20, 193, 240, 78, 25, 17, 136, 139, 176], + "modeOfOperation": "cfb", + "plaintext": [ + [79, 164, 202, 167, 3, 46, 88, 187, 121, 72], + [253, 95, 251, 227, 76, 47, 152, 176, 233, 38] + ], + "segmentSize": 2 + }, + { + "encrypted": [ + [176, 131, 35, 72, 21, 158, 11, 226, 100, 74, 167, 32, 184, 144, 114], + [34, 90, 46, 77, 32, 101, 21, 133, 81, 115, 60, 196, 100, 33, 70], + [67, 245, 63, 214, 63, 173, 62, 218, 213, 49, 226, 240, 165, 17, 17] + ], + "iv": [191, 48, 139, 102, 68, 115, 26, 156, 66, 192, 99, 4, 39, 130, 198, 50], + "key": [49, 148, 200, 33, 216, 194, 109, 7, 238, 71, 249, 200, 108, 214, 127, 144, 60, 110, 56, 205, 207, 78, 61, 61], + "modeOfOperation": "cfb", + "plaintext": [ + [112, 106, 208, 226, 60, 205, 166, 155, 190, 192, 247, 170, 124, 100, 32], + [58, 84, 104, 237, 239, 10, 145, 46, 135, 83, 50, 46, 226, 237, 50], + [192, 180, 158, 211, 136, 228, 4, 157, 68, 173, 11, 92, 117, 109, 76] + ], + "segmentSize": 3 + }, + { + "encrypted": [ + [232, 101, 165, 144, 208, 8, 122, 198, 138, 123, 4, 210, 149, 181, 131, 130, 40, 197, 55, 133], + [51, 237, 40, 191, 164, 198, 25, 184, 154, 193, 191, 233, 237, 217, 24, 179, 216, 128, 189, 253], + [29, 35, 37, 180, 204, 6, 221, 255, 55, 50, 45, 218, 127, 78, 249, 18, 72, 168, 87, 31], + [90, 170, 52, 211, 148, 238, 39, 18, 51, 4, 197, 53, 17, 110, 210, 13, 207, 99, 134, 30] + ], + "iv": [47, 188, 72, 211, 183, 139, 244, 143, 241, 186, 77, 40, 95, 4, 178, 102], + "key": [173, 192, 77, 67, 43, 135, 16, 30, 149, 195, 152, 119, 36, 153, 55, 223, 102, 223, 37, 245, 56, 206, 247, 104], + "modeOfOperation": "cfb", + "plaintext": [ + [228, 148, 77, 248, 170, 147, 181, 139, 31, 96, 74, 118, 5, 135, 20, 36, 100, 231, 196, 97], + [146, 77, 35, 67, 52, 29, 205, 118, 134, 246, 15, 250, 4, 6, 68, 211, 140, 218, 30, 39], + [78, 113, 120, 18, 88, 219, 5, 26, 18, 14, 219, 252, 123, 4, 220, 37, 89, 168, 207, 248], + [225, 91, 4, 238, 103, 200, 25, 217, 62, 27, 131, 193, 211, 222, 19, 132, 231, 221, 230, 234] + ], + "segmentSize": 4 + }, + { + "encrypted": [ + [210, 206, 98, 81, 4, 103, 76, 91, 107, 9, 110, 149, 13, 182, 124, 195, 100, 170, 78, 187, 175, 192, 64, 44, 48], + [173, 247, 172, 23, 98, 15, 167, 20, 150, 98, 183, 16, 58, 120, 210, 148, 93, 123, 201, 214, 117, 127, 115, 253, 209], + [78, 184, 19, 207, 104, 58, 158, 86, 147, 227, 23, 160, 215, 34, 22, 6, 120, 57, 142, 106, 78, 46, 43, 230, 233], + [71, 151, 253, 252, 75, 218, 56, 42, 70, 119, 161, 27, 86, 88, 70, 201, 197, 53, 113, 157, 165, 159, 121, 37, 112], + [101, 108, 250, 199, 127, 30, 235, 252, 223, 92, 134, 23, 39, 93, 152, 211, 143, 39, 204, 42, 229, 198, 129, 126, 88] + ], + "iv": [19, 11, 210, 195, 212, 203, 220, 65, 176, 0, 47, 215, 174, 21, 143, 185], + "key": [56, 100, 201, 8, 140, 63, 42, 128, 228, 158, 126, 113, 230, 147, 215, 43, 116, 246, 76, 223, 230, 174, 97, 118], + "modeOfOperation": "cfb", + "plaintext": [ + [248, 13, 149, 142, 122, 53, 22, 204, 53, 17, 35, 123, 192, 37, 93, 248, 224, 219, 110, 134, 155, 139, 33, 139, 248], + [115, 3, 235, 224, 152, 83, 195, 145, 203, 18, 66, 166, 166, 111, 172, 149, 102, 33, 159, 120, 227, 46, 15, 227, 69], + [214, 118, 230, 128, 39, 95, 52, 130, 102, 153, 121, 48, 52, 24, 137, 185, 12, 60, 248, 253, 113, 64, 197, 97, 145], + [13, 161, 197, 3, 182, 163, 222, 247, 170, 16, 29, 104, 233, 56, 94, 3, 117, 244, 212, 151, 40, 125, 58, 177, 237], + [117, 200, 89, 211, 158, 239, 122, 177, 220, 163, 63, 73, 248, 42, 165, 239, 227, 139, 108, 2, 46, 86, 39, 40, 50] + ], + "segmentSize": 5 + }, + { + "encrypted": [ + [163, 211, 141, 151, 113, 39, 125, 171, 38, 87, 34, 109, 46, 130, 161, 212, 9, 190, 117, 159, 219, 105, 54, 179, 250, 17, 57, 174, 214, 2], + [193, 85, 134, 11, 137, 218, 184, 233, 176, 253, 153, 129, 17, 50, 81, 148, 177, 13, 208, 193, 110, 34, 42, 114, 82, 33, 24, 128, 75, 175], + [52, 179, 78, 40, 215, 55, 76, 116, 218, 236, 200, 27, 104, 250, 16, 144, 38, 129, 78, 32, 239, 32, 135, 171, 246, 33, 19, 183, 144, 37], + [49, 121, 17, 27, 114, 201, 56, 50, 185, 1, 61, 94, 16, 11, 8, 199, 71, 213, 35, 215, 93, 39, 249, 225, 218, 33, 132, 183, 179, 251], + [60, 3, 231, 218, 223, 217, 128, 21, 63, 18, 21, 168, 250, 3, 246, 189, 157, 190, 66, 84, 124, 77, 176, 45, 232, 164, 252, 106, 185, 8], + [99, 198, 185, 72, 75, 161, 133, 15, 62, 162, 111, 202, 97, 126, 149, 245, 255, 14, 4, 27, 156, 91, 110, 143, 239, 24, 119, 87, 135, 224] + ], + "iv": [141, 209, 27, 18, 162, 125, 252, 61, 121, 208, 116, 122, 131, 66, 59, 62], + "key": [18, 74, 151, 193, 70, 210, 236, 147, 125, 79, 130, 87, 52, 4, 120, 245, 224, 111, 93, 240, 235, 156, 75, 44], + "modeOfOperation": "cfb", + "plaintext": [ + [12, 128, 174, 71, 51, 36, 0, 12, 160, 91, 143, 152, 11, 253, 221, 80, 68, 19, 162, 33, 186, 159, 212, 55, 93, 41, 18, 148, 61, 64], + [179, 12, 191, 35, 106, 215, 94, 87, 162, 122, 225, 74, 170, 141, 200, 61, 148, 5, 19, 145, 217, 119, 238, 51, 229, 35, 176, 135, 113, 32], + [169, 219, 169, 90, 197, 31, 252, 108, 207, 8, 114, 189, 102, 108, 197, 122, 186, 168, 177, 31, 246, 207, 86, 71, 232, 114, 6, 122, 222, 53], + [18, 36, 234, 169, 137, 29, 21, 72, 37, 236, 31, 23, 203, 11, 102, 194, 28, 66, 201, 125, 166, 179, 33, 77, 101, 143, 9, 216, 48, 83], + [172, 39, 178, 16, 12, 83, 239, 30, 2, 90, 133, 211, 76, 43, 13, 122, 236, 252, 103, 58, 0, 84, 122, 247, 46, 76, 75, 108, 161, 44], + [173, 80, 120, 22, 46, 211, 189, 247, 207, 246, 11, 138, 181, 37, 158, 245, 106, 82, 126, 191, 75, 253, 241, 173, 162, 116, 72, 155, 58, 127] + ], + "segmentSize": 6 + }, + { + "encrypted": [ + [83, 99, 61, 236, 98, 91, 72, 249, 164, 81, 64, 46, 107, 158, 28, 185, 193, 58, 212, 46, 191, 26, 121, 174, 135, 42, 113, 135, 209, 75, 182, 126, 173, 73, 112], + [170, 233, 246, 241, 88, 158, 238, 1, 221, 173, 91, 40, 57, 57, 54, 28, 111, 235, 20, 183, 254, 199, 40, 105, 98, 222, 170, 229, 170, 228, 159, 223, 0, 250, 239], + [97, 140, 244, 95, 134, 189, 153, 140, 111, 218, 3, 209, 144, 110, 59, 135, 78, 161, 20, 35, 180, 211, 240, 169, 88, 145, 87, 123, 68, 250, 12, 42, 87, 252, 31], + [181, 63, 30, 252, 13, 130, 231, 1, 210, 99, 66, 73, 43, 166, 91, 136, 104, 106, 121, 209, 182, 58, 172, 42, 254, 58, 229, 165, 96, 103, 9, 254, 225, 205, 2], + [183, 115, 1, 21, 4, 48, 1, 238, 134, 208, 169, 227, 137, 69, 105, 231, 236, 152, 211, 60, 7, 25, 19, 1, 45, 179, 117, 44, 24, 249, 146, 240, 54, 133, 74], + [1, 12, 175, 104, 86, 42, 44, 73, 119, 59, 160, 58, 230, 106, 155, 45, 18, 54, 141, 116, 2, 169, 30, 135, 133, 72, 115, 249, 23, 37, 107, 131, 253, 141, 181], + [127, 172, 124, 65, 187, 129, 178, 88, 90, 12, 211, 163, 78, 170, 239, 185, 74, 254, 196, 113, 36, 239, 110, 67, 87, 191, 188, 197, 177, 17, 143, 190, 239, 110, 205] + ], + "iv": [30, 96, 82, 5, 130, 17, 92, 115, 21, 58, 32, 121, 249, 135, 129, 136], + "key": [170, 207, 23, 43, 60, 195, 23, 233, 206, 200, 181, 248, 167, 237, 28, 163, 80, 187, 23, 183, 68, 120, 42, 5], + "modeOfOperation": "cfb", + "plaintext": [ + [75, 239, 222, 45, 117, 94, 147, 212, 73, 208, 39, 211, 127, 17, 130, 223, 57, 35, 27, 47, 77, 230, 70, 223, 19, 173, 85, 109, 135, 144, 246, 125, 151, 252, 182], + [79, 64, 189, 168, 208, 18, 195, 240, 26, 125, 166, 74, 53, 125, 218, 30, 152, 95, 118, 83, 132, 226, 83, 117, 46, 30, 216, 49, 5, 128, 248, 235, 247, 162, 118], + [152, 122, 82, 84, 190, 110, 44, 178, 160, 45, 244, 67, 190, 88, 119, 250, 197, 122, 106, 19, 245, 75, 170, 149, 195, 192, 32, 95, 49, 55, 20, 201, 37, 141, 133], + [229, 63, 223, 83, 32, 71, 234, 27, 33, 35, 217, 200, 245, 54, 3, 204, 102, 84, 45, 219, 218, 40, 138, 81, 86, 69, 245, 0, 226, 232, 142, 62, 204, 91, 49], + [244, 125, 0, 94, 81, 103, 94, 8, 41, 53, 11, 211, 139, 183, 76, 57, 153, 89, 13, 200, 245, 21, 225, 172, 55, 254, 140, 143, 29, 169, 247, 206, 58, 40, 170], + [130, 129, 33, 70, 113, 161, 243, 212, 139, 8, 56, 214, 105, 247, 192, 114, 73, 12, 93, 140, 185, 195, 192, 41, 63, 44, 78, 243, 52, 125, 48, 55, 50, 97, 241], + [65, 147, 35, 212, 226, 129, 137, 3, 2, 71, 132, 129, 61, 135, 102, 250, 251, 194, 133, 154, 61, 201, 164, 56, 239, 220, 35, 23, 106, 88, 189, 164, 22, 32, 22] + ], + "segmentSize": 7 + }, + { + "encrypted": [ + [218, 90, 143, 173, 46] + ], + "iv": [96, 236, 21, 126, 89, 172, 249, 225, 125, 199, 100, 195, 218, 158, 10, 120], + "key": [204, 203, 191, 165, 121, 29, 247, 180, 214, 29, 114, 50, 131, 98, 201, 61, 193, 109, 92, 41, 220, 37, 1, 82, 190, 102, 132, 5, 33, 199, 35, 123], + "modeOfOperation": "cfb", + "plaintext": [ + [144, 129, 145, 189, 120] + ], + "segmentSize": 1 + }, + { + "encrypted": [ + [151, 62, 228, 223, 244, 83, 229, 96, 105, 189], + [252, 123, 118, 109, 90, 49, 140, 145, 106, 141] + ], + "iv": [42, 138, 242, 229, 121, 197, 0, 178, 32, 157, 84, 72, 62, 63, 195, 198], + "key": [240, 8, 87, 167, 214, 62, 217, 13, 126, 29, 63, 29, 237, 120, 152, 197, 219, 94, 211, 7, 227, 73, 185, 99, 99, 126, 120, 158, 220, 42, 32, 26], + "modeOfOperation": "cfb", + "plaintext": [ + [146, 173, 12, 154, 126, 92, 246, 140, 224, 20], + [124, 146, 80, 179, 196, 128, 83, 3, 202, 19] + ], + "segmentSize": 2 + }, + { + "encrypted": [ + [232, 91, 215, 33, 3, 19, 13, 178, 163, 223, 117, 210, 226, 236, 37], + [224, 78, 191, 135, 219, 29, 36, 144, 147, 113, 220, 176, 204, 55, 232], + [39, 68, 32, 244, 204, 237, 39, 27, 150, 241, 71, 230, 5, 147, 191] + ], + "iv": [53, 190, 162, 131, 77, 9, 199, 9, 128, 223, 204, 238, 16, 228, 175, 210], + "key": [219, 84, 103, 126, 203, 32, 231, 156, 160, 126, 45, 227, 131, 253, 129, 135, 178, 110, 138, 46, 0, 131, 13, 66, 116, 21, 144, 93, 177, 44, 44, 207], + "modeOfOperation": "cfb", + "plaintext": [ + [169, 228, 231, 46, 231, 136, 74, 148, 167, 62, 39, 165, 55, 139, 225], + [210, 249, 62, 39, 223, 26, 234, 93, 111, 189, 71, 145, 37, 207, 244], + [15, 116, 89, 203, 81, 14, 22, 94, 60, 123, 243, 200, 19, 193, 153] + ], + "segmentSize": 3 + }, + { + "encrypted": [ + [240, 84, 252, 65, 172, 194, 207, 101, 149, 206, 111, 192, 76, 172, 119, 93, 194, 76, 22, 220], + [149, 247, 127, 118, 39, 24, 231, 158, 221, 175, 43, 124, 159, 253, 219, 196, 153, 211, 44, 143], + [109, 92, 140, 97, 86, 80, 31, 122, 236, 116, 137, 108, 159, 62, 255, 149, 172, 121, 137, 211], + [233, 60, 139, 137, 224, 18, 192, 190, 31, 197, 242, 129, 218, 219, 1, 77, 26, 250, 192, 147] + ], + "iv": [166, 245, 166, 15, 1, 59, 204, 194, 248, 45, 98, 76, 38, 101, 95, 195], + "key": [191, 145, 253, 19, 61, 227, 39, 136, 31, 26, 148, 145, 62, 236, 221, 25, 195, 192, 178, 3, 161, 19, 242, 164, 236, 215, 202, 188, 206, 77, 134, 61], + "modeOfOperation": "cfb", + "plaintext": [ + [73, 23, 167, 158, 130, 29, 205, 155, 235, 4, 237, 132, 201, 126, 213, 119, 225, 16, 249, 28], + [219, 239, 135, 50, 138, 77, 2, 123, 63, 6, 134, 181, 202, 174, 99, 246, 147, 66, 22, 153], + [237, 160, 28, 185, 66, 23, 48, 220, 248, 209, 54, 22, 83, 214, 137, 233, 95, 105, 90, 213], + [14, 155, 74, 143, 135, 224, 218, 35, 146, 100, 113, 178, 47, 150, 220, 14, 164, 251, 110, 155] + ], + "segmentSize": 4 + }, + { + "encrypted": [ + [154, 117, 178, 166, 176, 180, 111, 209, 14, 0, 176, 48, 170, 32, 83, 30, 57, 88, 35, 46, 68, 17, 144, 14, 239], + [72, 213, 215, 85, 230, 45, 145, 18, 41, 158, 100, 144, 254, 171, 86, 127, 185, 236, 154, 123, 161, 35, 229, 134, 121], + [154, 188, 162, 195, 14, 233, 82, 29, 79, 41, 154, 215, 225, 173, 85, 65, 222, 83, 200, 153, 21, 59, 29, 21, 103], + [22, 43, 45, 247, 126, 108, 51, 233, 17, 48, 150, 105, 181, 38, 94, 127, 176, 40, 238, 15, 33, 25, 164, 67, 150], + [112, 120, 189, 216, 119, 91, 230, 79, 66, 19, 115, 18, 108, 207, 8, 246, 3, 155, 174, 59, 170, 182, 81, 56, 232] + ], + "iv": [204, 88, 185, 6, 225, 94, 158, 148, 125, 52, 80, 240, 44, 39, 195, 46], + "key": [43, 185, 87, 1, 177, 116, 66, 175, 68, 134, 143, 108, 234, 45, 118, 33, 104, 26, 168, 81, 64, 146, 109, 16, 223, 41, 97, 167, 239, 47, 215, 72], + "modeOfOperation": "cfb", + "plaintext": [ + [89, 235, 69, 53, 128, 242, 157, 128, 142, 194, 91, 215, 230, 18, 62, 154, 48, 161, 138, 134, 226, 20, 214, 19, 52], + [29, 221, 244, 243, 215, 194, 16, 142, 198, 32, 255, 1, 254, 167, 142, 93, 246, 41, 231, 73, 88, 126, 48, 33, 242], + [208, 183, 186, 147, 234, 249, 34, 159, 10, 184, 72, 70, 177, 6, 233, 203, 251, 129, 104, 46, 95, 88, 84, 158, 130], + [86, 246, 239, 237, 103, 139, 15, 65, 142, 142, 179, 96, 36, 207, 204, 118, 209, 128, 36, 218, 30, 160, 3, 233, 143], + [71, 243, 150, 200, 210, 170, 205, 57, 22, 213, 228, 189, 215, 239, 53, 239, 162, 47, 12, 228, 94, 8, 124, 46, 120] + ], + "segmentSize": 5 + }, + { + "encrypted": [ + [21, 15, 108, 91, 107, 200, 9, 17, 236, 51, 128, 21, 205, 26, 148, 220, 123, 87, 147, 172, 253, 198, 226, 103, 247, 154, 44, 41, 10, 254], + [93, 190, 232, 67, 241, 238, 35, 249, 49, 144, 163, 38, 20, 71, 228, 14, 99, 191, 188, 159, 145, 63, 10, 87, 137, 42, 37, 111, 217, 51], + [135, 1, 71, 244, 44, 115, 39, 137, 22, 196, 14, 222, 69, 106, 41, 106, 118, 227, 223, 244, 241, 142, 35, 165, 16, 117, 6, 215, 149, 37], + [204, 171, 250, 177, 157, 252, 171, 186, 85, 93, 10, 236, 107, 175, 64, 106, 24, 18, 188, 235, 71, 118, 52, 178, 221, 206, 4, 134, 40, 0], + [226, 138, 101, 121, 97, 134, 86, 121, 189, 60, 140, 9, 53, 193, 141, 8, 65, 53, 252, 50, 26, 111, 253, 236, 75, 179, 80, 92, 121, 29], + [245, 127, 243, 48, 151, 124, 171, 83, 105, 222, 29, 211, 163, 148, 214, 147, 54, 110, 35, 60, 46, 97, 163, 29, 55, 205, 160, 81, 118, 106] + ], + "iv": [32, 108, 55, 136, 104, 201, 171, 129, 195, 116, 125, 9, 22, 49, 211, 56], + "key": [163, 205, 39, 217, 53, 164, 45, 242, 79, 82, 43, 7, 139, 119, 102, 20, 229, 62, 192, 138, 239, 5, 251, 83, 98, 137, 4, 188, 132, 232, 0, 39], + "modeOfOperation": "cfb", + "plaintext": [ + [63, 179, 172, 255, 224, 133, 204, 85, 169, 76, 200, 16, 128, 118, 197, 18, 101, 252, 248, 40, 240, 17, 199, 198, 63, 163, 136, 184, 178, 193], + [122, 112, 138, 173, 216, 125, 100, 237, 169, 90, 0, 141, 100, 64, 24, 7, 121, 38, 74, 165, 215, 115, 228, 177, 65, 221, 233, 4, 209, 36], + [111, 44, 224, 250, 14, 205, 245, 23, 137, 194, 220, 222, 58, 146, 72, 228, 33, 42, 146, 184, 205, 227, 186, 148, 159, 48, 107, 69, 60, 11], + [181, 44, 82, 144, 227, 67, 178, 81, 129, 97, 16, 89, 92, 69, 39, 8, 182, 187, 210, 204, 167, 70, 70, 95, 44, 233, 236, 53, 131, 182], + [46, 186, 39, 99, 219, 241, 26, 90, 69, 249, 32, 187, 142, 145, 228, 118, 79, 136, 34, 147, 219, 232, 29, 78, 67, 158, 247, 4, 122, 249], + [55, 180, 66, 68, 103, 234, 183, 76, 121, 12, 114, 225, 219, 8, 27, 171, 41, 40, 97, 94, 1, 73, 77, 202, 125, 129, 7, 153, 200, 83] + ], + "segmentSize": 6 + }, + { + "encrypted": [ + [88, 209, 94, 183, 47, 249, 211, 91, 228, 159, 87, 211, 180, 44, 6, 237, 49, 159, 178, 223, 66, 67, 73, 58, 247, 67, 61, 55, 250, 77, 143, 173, 18, 236, 9], + [15, 190, 239, 23, 2, 253, 215, 211, 97, 124, 20, 141, 65, 186, 36, 250, 140, 73, 185, 17, 142, 209, 129, 130, 25, 125, 108, 53, 94, 235, 219, 255, 122, 202, 140], + [73, 156, 198, 250, 115, 106, 247, 29, 128, 33, 250, 83, 174, 226, 35, 50, 231, 92, 67, 134, 186, 15, 85, 213, 74, 184, 176, 106, 201, 178, 44, 163, 2, 216, 74], + [70, 190, 188, 10, 245, 45, 246, 55, 134, 238, 172, 35, 181, 137, 239, 40, 30, 103, 97, 51, 72, 36, 193, 192, 59, 16, 108, 47, 102, 191, 85, 196, 76, 227, 1], + [208, 1, 127, 235, 197, 255, 61, 135, 225, 14, 179, 135, 154, 5, 252, 98, 36, 238, 126, 118, 98, 8, 193, 118, 253, 75, 64, 212, 21, 221, 61, 101, 244, 203, 215], + [6, 231, 90, 231, 75, 17, 253, 169, 103, 158, 189, 175, 130, 125, 154, 102, 197, 167, 103, 78, 242, 27, 40, 182, 66, 249, 34, 52, 104, 242, 91, 50, 176, 158, 25], + [25, 75, 156, 229, 167, 34, 51, 150, 63, 23, 135, 157, 198, 46, 215, 37, 246, 100, 78, 189, 16, 88, 82, 251, 160, 243, 50, 80, 135, 17, 35, 206, 214, 97, 77] + ], + "iv": [53, 34, 237, 194, 87, 193, 245, 36, 230, 180, 43, 221, 154, 164, 143, 116], + "key": [7, 31, 8, 166, 69, 134, 53, 255, 124, 96, 65, 96, 141, 29, 174, 252, 100, 138, 8, 176, 208, 198, 95, 83, 95, 233, 30, 96, 94, 77, 19, 155], + "modeOfOperation": "cfb", + "plaintext": [ + [196, 159, 224, 72, 250, 23, 59, 166, 66, 81, 4, 104, 254, 210, 55, 224, 250, 194, 63, 61, 4, 231, 71, 190, 2, 181, 32, 165, 1, 212, 92, 93, 238, 247, 206], + [160, 177, 60, 156, 133, 24, 253, 7, 53, 36, 196, 208, 75, 38, 185, 79, 215, 83, 102, 44, 16, 138, 69, 87, 38, 19, 96, 194, 173, 33, 23, 184, 59, 119, 244], + [225, 125, 111, 45, 103, 235, 145, 168, 115, 46, 36, 165, 177, 163, 221, 208, 75, 64, 179, 80, 21, 61, 124, 94, 230, 142, 98, 210, 206, 253, 180, 110, 0, 164, 127], + [10, 132, 102, 131, 110, 219, 104, 230, 209, 233, 14, 112, 243, 14, 120, 188, 231, 205, 146, 232, 172, 198, 114, 68, 141, 112, 223, 89, 56, 168, 162, 119, 236, 3, 82], + [20, 74, 71, 36, 45, 54, 194, 19, 238, 134, 57, 223, 176, 3, 87, 44, 101, 35, 26, 211, 99, 34, 216, 196, 190, 157, 51, 49, 207, 84, 97, 242, 103, 158, 111], + [5, 11, 103, 189, 65, 98, 144, 235, 196, 129, 149, 212, 252, 63, 104, 222, 35, 26, 31, 140, 155, 189, 13, 15, 55, 169, 120, 114, 170, 134, 231, 255, 46, 59, 253], + [63, 0, 66, 212, 90, 198, 218, 101, 92, 253, 246, 34, 218, 63, 81, 94, 121, 232, 82, 74, 241, 103, 136, 12, 100, 254, 100, 80, 40, 123, 44, 155, 47, 45, 222] + ], + "segmentSize": 7 + }, + { + "encrypted": [ + [] + ], + "iv": null, + "key": [99, 238, 11, 53, 19, 193, 106, 64, 219, 137, 89, 96, 80, 108, 125, 208], + "modeOfOperation": "ecb", + "plaintext": [ + [] + ], + "segmentSize": null + }, + { + "encrypted": [ + [2, 178, 244, 156, 126, 249, 132, 35, 217, 225, 120, 67, 132, 136, 22, 136], + [17, 32, 117, 87, 115, 89, 150, 240, 189, 187, 109, 136, 174, 236, 211, 150] + ], + "iv": null, + "key": [204, 125, 63, 199, 43, 225, 204, 175, 148, 246, 2, 202, 208, 194, 182, 121], + "modeOfOperation": "ecb", + "plaintext": [ + [201, 189, 83, 217, 121, 3, 223, 61, 181, 247, 211, 32, 134, 108, 248, 8], + [192, 193, 26, 171, 231, 182, 132, 63, 92, 252, 207, 112, 30, 46, 142, 189] + ], + "segmentSize": null + }, + { + "encrypted": [ + [193, 144, 251, 44, 29, 177, 117, 224, 176, 132, 141, 27, 218, 230, 168, 29], + [15, 207, 65, 73, 46, 162, 227, 181, 154, 139, 122, 105, 75, 196, 107, 231], + [3, 145, 39, 138, 112, 224, 96, 28, 182, 139, 182, 16, 138, 148, 95, 241] + ], + "iv": null, + "key": [171, 90, 174, 68, 15, 253, 93, 134, 159, 184, 122, 246, 250, 0, 197, 204], + "modeOfOperation": "ecb", + "plaintext": [ + [143, 122, 178, 65, 105, 148, 76, 209, 199, 17, 138, 70, 161, 92, 187, 247], + [154, 240, 213, 191, 63, 167, 249, 221, 17, 242, 194, 143, 43, 99, 205, 161], + [50, 95, 49, 141, 74, 92, 184, 194, 57, 1, 220, 73, 104, 168, 52, 123] + ], + "segmentSize": null + }, + { + "encrypted": [ + [147, 188, 134, 28, 222, 49, 82, 106, 130, 235, 25, 235, 157, 249, 66, 53, 73, 41, 56, 125, 107, 93, 145, 166, 111, 130, 24, 118, 166, 187, 84, 106], + [248, 175, 231, 5, 214, 189, 99, 117, 160, 133, 41, 53, 140, 52, 171, 103, 228, 201, 236, 156, 187, 25, 109, 15, 157, 77, 83, 70, 141, 90, 161, 144], + [138, 82, 154, 113, 251, 105, 12, 237, 68, 67, 11, 14, 80, 18, 114, 29, 188, 220, 130, 22, 169, 83, 129, 128, 119, 82, 4, 98, 167, 105, 171, 202], + [247, 65, 116, 151, 55, 66, 97, 203, 207, 131, 179, 83, 234, 27, 248, 86, 124, 220, 214, 208, 66, 253, 188, 244, 222, 75, 6, 20, 108, 208, 34, 42] + ], + "iv": null, + "key": [96, 50, 111, 132, 202, 113, 108, 148, 89, 109, 189, 26, 0, 229, 100, 222], + "modeOfOperation": "ecb", + "plaintext": [ + [103, 195, 37, 13, 12, 225, 26, 127, 248, 73, 13, 142, 255, 225, 37, 63, 214, 212, 153, 255, 238, 73, 41, 9, 169, 60, 222, 171, 223, 114, 205, 244], + [183, 75, 148, 197, 16, 139, 184, 193, 143, 11, 88, 128, 232, 153, 226, 136, 238, 208, 151, 54, 14, 202, 220, 44, 168, 194, 67, 127, 78, 43, 74, 152], + [38, 214, 55, 44, 94, 20, 209, 180, 245, 162, 71, 209, 85, 211, 239, 35, 117, 164, 182, 229, 223, 197, 98, 224, 200, 238, 194, 79, 16, 19, 73, 26], + [88, 95, 66, 100, 97, 11, 73, 49, 72, 182, 185, 134, 42, 114, 255, 144, 105, 147, 116, 41, 55, 102, 110, 180, 190, 192, 68, 171, 117, 62, 84, 129] + ], + "segmentSize": null + }, + { + "encrypted": [ + [2, 83, 159, 68, 33, 242, 205, 129, 226, 59, 184, 29, 62, 3, 5, 44, 1, 223, 12, 140, 66, 117, 162, 71, 126, 121, 233, 49, 10, 49, 16, 91, 214, 95, 217, 163, 202, 85, 171, 14, 248, 29, 137, 175, 219, 48, 214, 50], + [110, 187, 251, 193, 119, 210, 104, 128, 234, 178, 90, 63, 207, 60, 7, 108, 251, 108, 77, 140, 68, 162, 85, 19, 168, 227, 99, 251, 203, 49, 27, 17, 92, 22, 71, 201, 230, 111, 156, 23, 232, 192, 183, 241, 238, 26, 66, 222], + [145, 235, 141, 199, 134, 97, 142, 190, 154, 60, 44, 247, 224, 104, 37, 118, 80, 37, 28, 151, 91, 184, 76, 105, 30, 9, 47, 8, 11, 84, 162, 236, 138, 114, 182, 91, 24, 156, 70, 82, 56, 37, 190, 228, 14, 136, 209, 46], + [132, 157, 231, 244, 95, 172, 250, 111, 154, 163, 99, 10, 66, 136, 158, 101, 57, 108, 111, 105, 96, 235, 184, 115, 51, 225, 243, 136, 39, 224, 117, 162, 226, 143, 124, 64, 30, 46, 199, 159, 122, 218, 113, 91, 66, 126, 215, 94], + [48, 198, 186, 153, 224, 2, 199, 50, 117, 148, 35, 207, 15, 126, 238, 185, 100, 226, 131, 123, 172, 112, 80, 5, 247, 232, 32, 158, 39, 92, 238, 101, 178, 160, 38, 162, 6, 70, 71, 43, 221, 247, 248, 143, 27, 235, 225, 111] + ], + "iv": null, + "key": [7, 99, 249, 128, 242, 205, 72, 95, 63, 217, 110, 120, 40, 178, 190, 236], + "modeOfOperation": "ecb", + "plaintext": [ + [98, 8, 185, 171, 101, 138, 254, 80, 131, 166, 132, 125, 46, 177, 144, 137, 34, 46, 67, 212, 212, 231, 161, 87, 49, 66, 254, 41, 19, 26, 53, 213, 100, 249, 47, 239, 93, 205, 56, 255, 138, 230, 86, 35, 38, 218, 76, 203], + [18, 100, 243, 199, 151, 98, 254, 195, 7, 34, 156, 226, 225, 192, 204, 23, 90, 226, 71, 231, 144, 185, 184, 6, 219, 189, 175, 183, 203, 32, 94, 35, 247, 98, 161, 255, 250, 101, 230, 185, 239, 19, 73, 172, 58, 244, 184, 243], + [194, 221, 170, 27, 133, 146, 132, 89, 247, 231, 192, 5, 19, 231, 140, 230, 203, 5, 7, 6, 132, 136, 87, 217, 237, 229, 112, 218, 51, 162, 143, 207, 9, 205, 119, 164, 206, 155, 38, 164, 206, 242, 177, 37, 223, 95, 19, 175], + [142, 119, 6, 225, 207, 124, 247, 59, 124, 185, 60, 87, 167, 81, 145, 200, 190, 198, 233, 24, 75, 45, 215, 10, 82, 38, 34, 221, 139, 224, 10, 194, 225, 197, 6, 9, 1, 99, 82, 12, 60, 71, 250, 237, 70, 246, 76, 99], + [31, 154, 241, 10, 218, 5, 34, 24, 34, 89, 72, 171, 110, 247, 50, 66, 152, 159, 62, 17, 113, 190, 172, 16, 61, 213, 254, 211, 146, 202, 226, 62, 117, 140, 13, 122, 62, 100, 32, 64, 135, 223, 11, 172, 59, 54, 27, 173] + ], + "segmentSize": null + }, + { + "encrypted": [ + [204, 132, 11, 191, 222, 65, 25, 193, 224, 159, 198, 55, 53, 87, 64, 62, 255, 201, 40, 123, 215, 59, 16, 168, 173, 21, 12, 82, 243, 72, 131, 156, 62, 179, 85, 227, 252, 120, 165, 77, 23, 121, 172, 162, 185, 186, 46, 173, 68, 162, 125, 28, 110, 252, 118, 82, 141, 79, 134, 132, 54, 96, 157, 169], + [120, 12, 182, 217, 199, 138, 191, 237, 78, 26, 16, 253, 77, 187, 222, 61, 187, 22, 99, 7, 241, 105, 98, 134, 43, 137, 11, 177, 190, 225, 85, 247, 37, 210, 6, 248, 220, 48, 85, 222, 31, 162, 95, 234, 141, 221, 34, 2, 182, 35, 92, 158, 67, 149, 150, 137, 40, 223, 192, 9, 249, 114, 187, 0], + [212, 146, 241, 73, 154, 176, 202, 248, 169, 125, 48, 195, 195, 215, 150, 241, 14, 71, 245, 134, 216, 31, 92, 91, 77, 13, 184, 181, 237, 27, 234, 64, 83, 1, 195, 43, 171, 35, 107, 154, 9, 67, 177, 155, 202, 42, 237, 17, 172, 227, 183, 218, 252, 220, 89, 32, 49, 149, 44, 188, 167, 12, 215, 208], + [121, 28, 4, 12, 224, 12, 135, 108, 241, 210, 184, 124, 248, 213, 221, 169, 111, 207, 67, 50, 235, 239, 140, 102, 226, 163, 27, 216, 169, 73, 8, 236, 69, 227, 88, 232, 76, 34, 60, 92, 93, 169, 110, 18, 126, 19, 190, 198, 245, 28, 202, 215, 97, 134, 64, 27, 140, 16, 246, 88, 146, 203, 97, 118], + [218, 187, 112, 159, 103, 98, 135, 151, 127, 206, 179, 46, 49, 67, 95, 42, 16, 106, 192, 40, 150, 88, 17, 41, 189, 194, 156, 30, 159, 87, 131, 144, 225, 130, 37, 199, 7, 129, 101, 181, 243, 110, 111, 180, 132, 81, 227, 190, 4, 196, 67, 111, 19, 57, 126, 219, 204, 14, 81, 84, 237, 159, 217, 47], + [2, 140, 131, 253, 180, 254, 68, 186, 225, 197, 81, 254, 10, 72, 237, 173, 230, 54, 235, 198, 126, 117, 46, 63, 7, 210, 225, 92, 156, 87, 99, 232, 133, 147, 110, 225, 233, 44, 170, 144, 49, 106, 254, 130, 159, 240, 188, 127, 2, 195, 232, 93, 243, 190, 193, 35, 1, 33, 133, 183, 20, 8, 179, 140] + ], + "iv": null, + "key": [32, 189, 162, 103, 11, 100, 129, 181, 50, 26, 23, 42, 225, 165, 233, 94], + "modeOfOperation": "ecb", + "plaintext": [ + [76, 5, 230, 253, 131, 12, 143, 186, 119, 136, 105, 6, 11, 109, 122, 10, 89, 10, 117, 178, 174, 1, 22, 131, 173, 152, 39, 134, 123, 107, 60, 134, 162, 23, 2, 96, 38, 39, 95, 68, 89, 251, 32, 127, 110, 142, 247, 70, 40, 167, 69, 222, 245, 104, 230, 176, 36, 155, 145, 46, 80, 147, 55, 188], + [143, 78, 81, 45, 4, 190, 255, 30, 138, 67, 34, 178, 218, 136, 73, 215, 66, 249, 29, 59, 44, 215, 8, 34, 117, 2, 191, 164, 217, 140, 45, 6, 203, 231, 178, 220, 130, 4, 208, 135, 191, 184, 49, 59, 153, 7, 125, 85, 92, 90, 122, 64, 8, 22, 27, 168, 235, 171, 251, 96, 79, 119, 105, 124], + [104, 214, 37, 91, 130, 67, 248, 182, 127, 73, 251, 202, 133, 171, 96, 69, 89, 34, 100, 182, 178, 83, 229, 193, 153, 254, 225, 77, 5, 179, 193, 114, 147, 55, 223, 172, 101, 35, 252, 204, 254, 20, 83, 196, 15, 33, 86, 126, 195, 131, 206, 55, 189, 199, 167, 15, 28, 24, 94, 132, 103, 74, 50, 251], + [119, 162, 246, 124, 231, 163, 98, 219, 210, 154, 232, 25, 246, 218, 240, 197, 94, 132, 202, 54, 68, 234, 1, 211, 114, 145, 255, 166, 123, 190, 220, 78, 255, 178, 211, 68, 5, 121, 13, 19, 180, 251, 222, 105, 145, 145, 107, 144, 199, 124, 241, 220, 97, 183, 252, 22, 105, 87, 64, 214, 54, 46, 24, 179], + [198, 135, 253, 104, 62, 144, 220, 204, 204, 156, 212, 26, 80, 15, 173, 106, 145, 22, 220, 191, 83, 76, 99, 99, 72, 170, 154, 206, 207, 16, 125, 194, 235, 248, 31, 220, 88, 153, 251, 31, 219, 15, 201, 61, 196, 160, 189, 30, 98, 142, 117, 113, 149, 58, 50, 62, 22, 1, 17, 144, 248, 190, 220, 217], + [227, 117, 142, 9, 190, 51, 131, 156, 144, 100, 116, 241, 83, 215, 119, 32, 214, 59, 213, 115, 69, 166, 63, 189, 164, 169, 81, 47, 192, 69, 62, 11, 167, 130, 196, 146, 157, 87, 150, 210, 34, 144, 119, 87, 120, 118, 230, 141, 156, 1, 96, 24, 178, 29, 24, 1, 43, 15, 115, 205, 34, 172, 9, 169] + ], + "segmentSize": null + }, + { + "encrypted": [ + [226, 15, 50, 97, 227, 167, 89, 4, 182, 249, 174, 115, 105, 179, 223, 192, 107, 33, 241, 187, 98, 137, 126, 1, 65, 77, 231, 78, 1, 219, 39, 139, 62, 95, 77, 29, 132, 85, 191, 251, 88, 137, 117, 241, 45, 179, 172, 204, 2, 86, 48, 58, 127, 73, 87, 63, 245, 89, 72, 201, 121, 13, 4, 238], + [224, 89, 131, 146, 170, 106, 30, 50, 51, 240, 171, 236, 155, 192, 59, 135, 68, 110, 49, 27, 172, 227, 100, 72, 0, 31, 123, 234, 209, 219, 63, 26, 57, 239, 240, 118, 40, 251, 0, 109, 65, 232, 206, 120, 184, 141, 94, 132, 214, 99, 29, 66, 203, 212, 247, 128, 105, 2, 71, 166, 28, 246, 235, 102], + [184, 238, 155, 21, 98, 20, 65, 33, 73, 220, 119, 186, 176, 107, 163, 16, 6, 172, 235, 214, 119, 109, 82, 202, 25, 65, 210, 5, 215, 205, 179, 67, 157, 24, 128, 117, 197, 196, 94, 72, 220, 234, 228, 155, 57, 49, 114, 6, 17, 253, 136, 78, 254, 106, 44, 137, 0, 241, 218, 81, 175, 188, 83, 255], + [188, 31, 101, 0, 187, 116, 141, 246, 37, 150, 49, 83, 176, 51, 44, 215, 47, 95, 22, 25, 188, 52, 21, 244, 119, 172, 166, 97, 154, 83, 117, 144, 193, 148, 174, 200, 100, 63, 169, 203, 20, 42, 98, 106, 179, 170, 50, 73, 255, 50, 51, 110, 238, 226, 80, 18, 34, 84, 63, 167, 198, 201, 255, 125], + [71, 133, 55, 3, 195, 199, 42, 27, 216, 233, 201, 139, 33, 56, 68, 248, 200, 210, 196, 179, 169, 198, 114, 243, 70, 130, 254, 250, 41, 200, 234, 103, 34, 77, 134, 22, 110, 138, 105, 129, 72, 166, 118, 199, 239, 105, 176, 32, 165, 94, 5, 181, 102, 28, 15, 175, 26, 56, 99, 71, 178, 182, 248, 119], + [234, 248, 113, 187, 85, 143, 232, 0, 250, 255, 66, 53, 221, 72, 12, 57, 107, 200, 195, 99, 95, 160, 165, 21, 126, 67, 64, 137, 235, 167, 198, 181, 186, 39, 184, 9, 2, 172, 248, 8, 116, 178, 156, 30, 29, 107, 27, 164, 104, 19, 253, 131, 180, 62, 250, 186, 91, 251, 224, 179, 17, 235, 132, 98], + [55, 104, 53, 51, 119, 68, 141, 57, 95, 23, 178, 149, 91, 81, 120, 47, 22, 167, 72, 95, 182, 224, 34, 118, 9, 206, 116, 126, 125, 223, 152, 165, 89, 147, 78, 35, 105, 120, 22, 190, 175, 23, 172, 41, 249, 205, 100, 247, 192, 119, 58, 149, 9, 2, 48, 100, 185, 45, 135, 18, 46, 166, 224, 116] + ], + "iv": null, + "key": [39, 236, 86, 81, 95, 160, 210, 61, 143, 195, 70, 246, 176, 38, 124, 221], + "modeOfOperation": "ecb", + "plaintext": [ + [59, 26, 156, 163, 35, 14, 180, 14, 60, 159, 168, 225, 251, 84, 214, 17, 127, 34, 89, 21, 63, 106, 116, 118, 2, 240, 146, 241, 11, 104, 174, 145, 121, 159, 84, 155, 120, 178, 232, 241, 148, 75, 57, 88, 0, 242, 174, 161, 156, 59, 135, 43, 127, 182, 197, 88, 28, 255, 87, 55, 2, 90, 131, 150], + [223, 16, 250, 62, 139, 217, 199, 20, 162, 98, 150, 10, 23, 25, 104, 169, 33, 222, 126, 54, 81, 33, 239, 139, 136, 242, 39, 138, 105, 144, 174, 58, 125, 210, 21, 181, 0, 144, 253, 242, 203, 136, 121, 77, 29, 42, 35, 62, 17, 38, 38, 142, 115, 108, 209, 28, 125, 28, 112, 170, 255, 210, 27, 16], + [107, 169, 204, 254, 13, 219, 72, 108, 55, 112, 8, 132, 191, 192, 163, 194, 6, 1, 5, 20, 254, 189, 249, 97, 21, 89, 73, 22, 146, 173, 64, 186, 116, 170, 61, 142, 157, 59, 100, 147, 49, 158, 110, 115, 88, 250, 132, 125, 79, 50, 197, 173, 36, 22, 139, 109, 232, 74, 90, 229, 119, 43, 69, 243], + [81, 74, 67, 116, 36, 99, 199, 161, 113, 74, 31, 53, 172, 109, 140, 140, 218, 187, 62, 204, 191, 32, 90, 151, 165, 140, 3, 28, 115, 163, 84, 98, 12, 192, 90, 150, 39, 159, 42, 3, 240, 174, 213, 208, 163, 107, 37, 243, 38, 51, 232, 98, 213, 128, 100, 33, 25, 199, 80, 244, 78, 187, 237, 151], + [168, 230, 209, 13, 115, 210, 172, 8, 5, 12, 171, 209, 41, 160, 116, 29, 218, 127, 122, 223, 151, 38, 253, 125, 246, 67, 87, 220, 212, 138, 242, 25, 36, 148, 134, 186, 184, 34, 64, 187, 100, 121, 28, 223, 56, 135, 245, 122, 132, 56, 92, 138, 225, 8, 233, 185, 171, 196, 94, 151, 13, 112, 31, 28], + [134, 99, 249, 17, 179, 173, 193, 0, 29, 108, 117, 228, 251, 23, 214, 221, 105, 120, 187, 96, 144, 58, 65, 229, 98, 216, 245, 20, 76, 186, 105, 2, 26, 136, 26, 114, 57, 187, 188, 203, 164, 52, 85, 210, 152, 135, 40, 236, 237, 163, 15, 46, 120, 105, 64, 238, 46, 22, 31, 216, 74, 191, 47, 135], + [127, 194, 168, 140, 246, 151, 18, 4, 241, 246, 119, 119, 83, 202, 90, 61, 212, 253, 252, 221, 138, 74, 144, 2, 108, 61, 59, 234, 42, 70, 77, 53, 72, 171, 35, 165, 174, 253, 137, 0, 245, 130, 255, 140, 209, 196, 212, 1, 162, 71, 23, 64, 129, 250, 96, 9, 26, 20, 89, 185, 217, 126, 182, 214] + ], + "segmentSize": null + }, + { + "encrypted": [ + [] + ], + "iv": null, + "key": [132, 124, 48, 239, 33, 178, 80, 58, 102, 122, 222, 20, 127, 166, 42, 196, 82, 232, 115, 93, 52, 76, 161, 54], + "modeOfOperation": "ecb", + "plaintext": [ + [] + ], + "segmentSize": null + }, + { + "encrypted": [ + [119, 58, 54, 12, 55, 19, 29, 41, 242, 113, 172, 123, 43, 85, 148, 2], + [237, 96, 22, 69, 124, 131, 152, 62, 236, 48, 163, 11, 197, 130, 246, 147] + ], + "iv": null, + "key": [205, 201, 171, 222, 159, 202, 124, 31, 210, 25, 16, 155, 85, 28, 202, 232, 247, 131, 241, 225, 95, 89, 97, 143], + "modeOfOperation": "ecb", + "plaintext": [ + [231, 98, 158, 226, 151, 52, 17, 217, 23, 7, 40, 197, 10, 51, 51, 234], + [187, 238, 58, 27, 116, 133, 152, 109, 181, 95, 45, 85, 48, 139, 175, 254] + ], + "segmentSize": null + }, + { + "encrypted": [ + [208, 17, 45, 84, 28, 75, 73, 152, 8, 100, 33, 122, 10, 176, 55, 0], + [253, 185, 230, 145, 243, 104, 80, 165, 54, 219, 251, 178, 16, 228, 221, 59], + [218, 231, 110, 245, 67, 197, 225, 218, 16, 204, 114, 174, 171, 57, 224, 64] + ], + "iv": null, + "key": [101, 47, 95, 150, 243, 143, 233, 61, 30, 33, 55, 76, 227, 202, 250, 80, 227, 6, 140, 244, 68, 220, 2, 192], + "modeOfOperation": "ecb", + "plaintext": [ + [143, 76, 198, 79, 26, 67, 176, 105, 121, 64, 94, 90, 137, 32, 54, 154], + [137, 72, 32, 225, 243, 100, 61, 68, 1, 223, 216, 83, 217, 80, 135, 94], + [117, 54, 116, 22, 167, 203, 225, 104, 168, 238, 211, 147, 131, 147, 202, 83] + ], + "segmentSize": null + }, + { + "encrypted": [ + [239, 134, 112, 189, 126, 180, 98, 152, 186, 186, 92, 98, 62, 200, 72, 149, 183, 117, 62, 6, 47, 240, 211, 51, 146, 114, 226, 229, 7, 233, 221, 27], + [84, 155, 108, 220, 15, 177, 68, 183, 127, 142, 202, 75, 110, 106, 130, 153, 31, 103, 46, 159, 171, 60, 77, 103, 38, 66, 84, 114, 98, 218, 117, 232], + [121, 170, 210, 74, 168, 40, 3, 138, 69, 13, 46, 29, 71, 70, 32, 140, 229, 62, 80, 240, 166, 69, 189, 20, 94, 46, 184, 24, 175, 21, 235, 22], + [123, 237, 0, 54, 207, 150, 0, 198, 6, 12, 240, 252, 129, 237, 228, 101, 153, 236, 148, 47, 207, 58, 225, 78, 222, 53, 242, 151, 12, 254, 228, 217] + ], + "iv": null, + "key": [194, 244, 207, 2, 57, 224, 71, 13, 166, 59, 171, 9, 88, 18, 139, 152, 238, 77, 141, 56, 186, 246, 93, 183], + "modeOfOperation": "ecb", + "plaintext": [ + [11, 121, 217, 99, 105, 229, 33, 70, 14, 200, 209, 237, 179, 100, 207, 197, 219, 36, 138, 171, 210, 136, 107, 181, 12, 60, 191, 138, 179, 249, 147, 70], + [81, 35, 229, 239, 44, 3, 195, 92, 63, 198, 38, 70, 158, 211, 185, 10, 133, 34, 55, 173, 71, 81, 23, 152, 99, 65, 254, 30, 243, 126, 242, 173], + [62, 45, 42, 200, 25, 230, 168, 15, 59, 154, 31, 235, 170, 58, 109, 5, 242, 237, 97, 14, 0, 51, 59, 38, 219, 85, 124, 168, 200, 185, 128, 146], + [166, 183, 130, 8, 80, 33, 147, 137, 82, 201, 104, 71, 191, 34, 107, 81, 99, 38, 139, 254, 247, 126, 159, 244, 57, 2, 9, 48, 186, 161, 152, 226] + ], + "segmentSize": null + }, + { + "encrypted": [ + [52, 187, 93, 166, 46, 31, 184, 18, 249, 176, 32, 77, 233, 10, 127, 154, 173, 27, 240, 36, 250, 199, 69, 17, 116, 253, 242, 59, 239, 233, 120, 210, 99, 121, 54, 250, 49, 100, 102, 11, 79, 0, 53, 107, 93, 42, 45, 113], + [136, 172, 195, 232, 135, 113, 116, 195, 3, 253, 78, 168, 186, 109, 71, 6, 88, 126, 174, 247, 21, 252, 114, 73, 253, 123, 83, 9, 86, 113, 111, 161, 60, 163, 202, 84, 223, 166, 189, 193, 131, 173, 158, 110, 245, 199, 1, 214], + [150, 240, 154, 218, 137, 114, 56, 206, 5, 115, 99, 181, 17, 146, 147, 85, 141, 157, 184, 217, 254, 53, 150, 237, 127, 91, 134, 140, 106, 187, 5, 150, 175, 141, 144, 174, 22, 130, 97, 131, 217, 217, 173, 244, 12, 53, 70, 37], + [54, 244, 202, 41, 20, 25, 139, 48, 49, 12, 48, 144, 248, 93, 47, 129, 41, 243, 113, 232, 154, 55, 173, 73, 8, 47, 222, 191, 176, 10, 217, 238, 19, 77, 21, 228, 76, 211, 145, 1, 177, 83, 131, 55, 189, 130, 200, 64], + [65, 96, 52, 197, 59, 36, 149, 166, 28, 124, 28, 21, 208, 156, 10, 241, 99, 146, 94, 185, 172, 171, 208, 56, 204, 185, 43, 243, 57, 225, 127, 213, 239, 208, 43, 36, 18, 212, 93, 158, 186, 86, 34, 14, 201, 243, 215, 249] + ], + "iv": null, + "key": [79, 146, 60, 66, 194, 13, 131, 33, 224, 54, 80, 173, 100, 194, 106, 16, 184, 125, 156, 146, 17, 88, 171, 203], + "modeOfOperation": "ecb", + "plaintext": [ + [180, 0, 47, 126, 176, 25, 103, 37, 173, 186, 135, 228, 77, 179, 6, 121, 241, 139, 194, 176, 220, 14, 30, 193, 49, 223, 40, 145, 225, 137, 183, 78, 59, 105, 121, 17, 229, 61, 145, 112, 133, 194, 126, 54, 218, 42, 141, 118], + [250, 114, 89, 65, 82, 139, 41, 150, 79, 222, 65, 215, 233, 8, 210, 121, 252, 14, 11, 211, 127, 187, 77, 18, 142, 183, 78, 119, 231, 155, 174, 191, 41, 11, 67, 61, 254, 132, 73, 98, 220, 128, 161, 131, 203, 210, 173, 33], + [57, 142, 96, 213, 119, 234, 47, 124, 18, 184, 153, 211, 51, 254, 20, 90, 177, 213, 183, 188, 242, 103, 251, 28, 104, 12, 163, 149, 27, 114, 82, 87, 133, 101, 70, 170, 12, 25, 57, 175, 168, 122, 104, 13, 207, 70, 107, 131], + [211, 197, 223, 81, 165, 95, 127, 228, 211, 218, 108, 252, 29, 62, 54, 39, 222, 51, 211, 195, 0, 158, 202, 157, 123, 80, 87, 148, 223, 34, 106, 179, 180, 252, 142, 82, 81, 180, 145, 216, 166, 9, 123, 228, 127, 199, 7, 28], + [123, 65, 180, 237, 113, 28, 157, 174, 198, 225, 112, 217, 68, 110, 132, 184, 8, 127, 3, 185, 248, 86, 37, 191, 249, 149, 7, 49, 76, 46, 114, 91, 114, 161, 133, 47, 68, 109, 223, 214, 127, 252, 80, 141, 124, 143, 240, 236] + ], + "segmentSize": null + }, + { + "encrypted": [ + [224, 40, 71, 96, 18, 30, 156, 187, 177, 99, 223, 132, 197, 228, 0, 3, 78, 207, 47, 180, 94, 57, 255, 66, 37, 136, 79, 7, 193, 27, 62, 253, 169, 174, 238, 8, 196, 152, 62, 251, 234, 131, 24, 183, 14, 149, 64, 206, 22, 247, 1, 51, 40, 108, 66, 38, 219, 127, 19, 96, 122, 36, 163, 149], + [8, 191, 234, 130, 162, 65, 216, 254, 28, 173, 254, 103, 121, 38, 202, 224, 170, 188, 103, 213, 173, 126, 110, 58, 100, 210, 54, 168, 22, 228, 26, 33, 239, 34, 249, 245, 58, 126, 158, 150, 254, 52, 57, 231, 187, 130, 14, 22, 154, 56, 4, 41, 1, 32, 85, 253, 126, 125, 109, 115, 232, 228, 153, 223], + [244, 71, 131, 71, 159, 62, 136, 189, 130, 61, 104, 172, 48, 130, 177, 59, 93, 107, 168, 225, 54, 154, 63, 31, 110, 59, 4, 212, 79, 21, 133, 121, 115, 177, 184, 152, 82, 247, 96, 1, 55, 99, 1, 58, 40, 242, 248, 10, 154, 127, 38, 33, 30, 162, 228, 70, 180, 229, 111, 210, 71, 238, 58, 66], + [52, 39, 10, 147, 36, 16, 79, 6, 131, 112, 34, 29, 137, 211, 21, 102, 222, 203, 47, 97, 249, 38, 53, 27, 213, 172, 160, 36, 244, 45, 132, 162, 201, 40, 121, 33, 185, 135, 68, 152, 241, 44, 138, 255, 35, 193, 17, 218, 39, 172, 104, 90, 205, 22, 80, 210, 17, 12, 226, 183, 72, 24, 18, 34], + [234, 206, 178, 223, 162, 34, 117, 9, 106, 37, 45, 85, 102, 64, 175, 123, 177, 170, 239, 160, 11, 11, 235, 153, 171, 82, 63, 250, 176, 187, 221, 142, 59, 109, 126, 242, 88, 198, 200, 99, 98, 7, 154, 40, 42, 31, 158, 177, 146, 21, 203, 150, 138, 61, 156, 29, 208, 76, 216, 30, 103, 232, 155, 91], + [23, 176, 241, 164, 59, 116, 153, 75, 217, 123, 6, 223, 251, 166, 239, 98, 15, 57, 127, 145, 152, 137, 69, 194, 16, 138, 249, 37, 59, 178, 197, 151, 199, 215, 212, 237, 186, 236, 93, 253, 162, 131, 242, 29, 95, 219, 49, 78, 5, 160, 128, 117, 162, 233, 166, 101, 151, 200, 222, 230, 184, 13, 221, 86] + ], + "iv": null, + "key": [75, 85, 249, 140, 3, 27, 9, 74, 255, 13, 42, 120, 203, 166, 147, 198, 197, 54, 158, 53, 15, 244, 79, 6], + "modeOfOperation": "ecb", + "plaintext": [ + [57, 126, 239, 10, 108, 57, 221, 36, 67, 32, 75, 126, 51, 47, 173, 240, 98, 88, 99, 152, 3, 49, 98, 101, 164, 59, 150, 150, 87, 4, 77, 39, 1, 216, 129, 90, 252, 13, 214, 186, 154, 15, 253, 128, 7, 92, 127, 92, 181, 31, 137, 72, 145, 81, 135, 130, 18, 193, 25, 130, 233, 204, 208, 63], + [123, 192, 239, 95, 224, 207, 204, 87, 94, 56, 161, 172, 74, 199, 247, 164, 11, 187, 202, 254, 24, 117, 28, 1, 126, 125, 112, 219, 161, 34, 64, 32, 5, 169, 248, 163, 200, 38, 10, 238, 189, 78, 134, 250, 231, 236, 103, 173, 35, 96, 138, 143, 86, 196, 13, 82, 214, 202, 188, 206, 202, 84, 14, 244], + [191, 0, 58, 164, 1, 158, 246, 217, 18, 180, 47, 27, 87, 175, 169, 227, 239, 121, 163, 183, 144, 36, 120, 117, 185, 220, 83, 149, 123, 253, 40, 233, 12, 127, 147, 100, 14, 25, 1, 156, 18, 43, 177, 170, 228, 64, 79, 49, 254, 61, 230, 185, 226, 139, 241, 248, 218, 208, 128, 3, 155, 237, 54, 142], + [38, 194, 201, 41, 101, 168, 40, 24, 214, 233, 240, 29, 7, 56, 243, 223, 31, 194, 125, 183, 26, 124, 18, 234, 235, 201, 145, 49, 106, 133, 204, 37, 184, 48, 43, 4, 166, 159, 120, 3, 159, 141, 80, 87, 156, 241, 52, 250, 156, 7, 216, 17, 91, 185, 247, 150, 68, 231, 114, 135, 87, 182, 228, 236], + [102, 158, 110, 114, 220, 52, 242, 182, 132, 192, 18, 2, 34, 13, 66, 11, 13, 139, 2, 57, 141, 12, 77, 241, 226, 94, 133, 137, 152, 30, 106, 105, 65, 140, 46, 90, 176, 79, 208, 100, 240, 16, 213, 122, 89, 78, 141, 27, 37, 243, 67, 45, 191, 81, 56, 94, 217, 125, 25, 38, 146, 104, 144, 144], + [15, 246, 20, 235, 179, 92, 176, 115, 71, 40, 76, 119, 65, 6, 155, 239, 166, 122, 157, 87, 121, 212, 243, 99, 180, 239, 52, 51, 195, 243, 16, 225, 147, 127, 137, 195, 211, 84, 104, 182, 67, 185, 197, 28, 253, 17, 12, 251, 13, 130, 97, 75, 51, 137, 116, 131, 240, 47, 121, 1, 252, 212, 107, 146] + ], + "segmentSize": null + }, + { + "encrypted": [ + [162, 170, 167, 117, 49, 42, 71, 96, 198, 70, 116, 163, 205, 215, 33, 87, 56, 131, 177, 180, 118, 113, 151, 6, 140, 99, 216, 20, 218, 179, 246, 42, 8, 118, 222, 131, 132, 61, 245, 119, 69, 199, 37, 144, 103, 121, 200, 18, 221, 79, 14, 20, 168, 247, 141, 148, 24, 31, 74, 224, 247, 2, 104, 173], + [166, 177, 166, 101, 142, 141, 170, 175, 78, 212, 241, 125, 162, 74, 249, 228, 182, 11, 251, 110, 113, 192, 60, 217, 48, 75, 55, 51, 252, 207, 102, 34, 234, 171, 34, 255, 136, 237, 9, 181, 210, 223, 29, 41, 196, 72, 206, 129, 183, 189, 126, 130, 94, 107, 178, 237, 85, 167, 12, 59, 221, 61, 95, 43], + [204, 46, 152, 60, 185, 129, 18, 75, 124, 149, 122, 108, 183, 220, 88, 132, 255, 109, 148, 222, 98, 141, 14, 55, 88, 165, 176, 19, 152, 180, 71, 214, 81, 44, 23, 237, 196, 81, 80, 240, 42, 58, 159, 42, 31, 195, 109, 227, 93, 249, 227, 86, 134, 79, 106, 136, 145, 162, 89, 33, 179, 125, 7, 26], + [202, 118, 237, 148, 168, 8, 49, 182, 69, 62, 157, 203, 109, 112, 191, 172, 19, 11, 188, 148, 72, 133, 128, 193, 119, 124, 16, 137, 166, 5, 206, 19, 117, 52, 209, 33, 14, 122, 242, 243, 55, 49, 67, 76, 107, 53, 248, 76, 21, 1, 192, 212, 33, 25, 167, 181, 75, 166, 155, 35, 116, 198, 27, 3], + [103, 110, 148, 148, 148, 80, 29, 126, 201, 76, 125, 181, 116, 49, 224, 177, 176, 62, 10, 106, 225, 63, 90, 56, 93, 251, 61, 52, 161, 8, 178, 7, 55, 44, 120, 52, 108, 69, 91, 200, 115, 170, 17, 72, 159, 233, 84, 107, 161, 21, 226, 170, 43, 53, 109, 185, 103, 159, 242, 253, 191, 65, 61, 89], + [72, 98, 230, 176, 34, 118, 210, 202, 242, 237, 216, 227, 127, 14, 86, 131, 19, 164, 225, 76, 28, 5, 210, 205, 31, 155, 143, 27, 0, 190, 201, 245, 167, 137, 59, 62, 48, 2, 94, 236, 171, 118, 169, 8, 186, 135, 103, 25, 83, 9, 28, 235, 161, 161, 136, 142, 202, 225, 103, 149, 52, 8, 14, 149], + [143, 163, 116, 225, 42, 163, 118, 52, 195, 198, 27, 226, 55, 225, 168, 232, 225, 2, 139, 185, 97, 18, 230, 90, 0, 47, 89, 179, 37, 74, 239, 67, 132, 123, 131, 85, 139, 85, 107, 142, 228, 26, 8, 109, 77, 110, 206, 234, 226, 9, 235, 155, 203, 21, 56, 148, 130, 97, 245, 41, 65, 9, 123, 116] + ], + "iv": null, + "key": [140, 16, 205, 108, 202, 146, 39, 216, 97, 59, 5, 230, 8, 122, 4, 205, 66, 150, 109, 10, 185, 102, 3, 108], + "modeOfOperation": "ecb", + "plaintext": [ + [30, 173, 225, 117, 37, 91, 52, 115, 185, 168, 190, 80, 105, 201, 50, 227, 79, 147, 64, 46, 174, 217, 236, 102, 193, 119, 15, 194, 238, 42, 100, 239, 212, 86, 127, 178, 179, 41, 82, 96, 55, 143, 175, 199, 216, 231, 224, 107, 199, 34, 142, 96, 45, 74, 196, 242, 21, 216, 204, 202, 44, 33, 139, 181], + [190, 59, 145, 114, 35, 249, 48, 227, 97, 189, 50, 232, 179, 81, 213, 197, 132, 37, 155, 96, 108, 156, 114, 122, 172, 35, 143, 8, 176, 187, 103, 30, 11, 187, 184, 130, 126, 210, 250, 77, 221, 19, 184, 70, 207, 133, 9, 217, 249, 171, 239, 89, 117, 149, 252, 20, 107, 173, 218, 213, 41, 247, 138, 187], + [177, 232, 132, 204, 148, 196, 170, 88, 119, 248, 91, 40, 185, 3, 217, 6, 214, 125, 96, 50, 228, 208, 188, 71, 251, 41, 3, 168, 91, 233, 117, 175, 75, 16, 157, 145, 126, 64, 83, 85, 55, 102, 150, 196, 229, 116, 79, 125, 157, 151, 143, 183, 104, 43, 99, 205, 215, 250, 36, 205, 203, 68, 243, 225], + [102, 22, 133, 67, 147, 129, 19, 163, 5, 238, 102, 244, 249, 131, 136, 233, 34, 240, 175, 230, 19, 41, 236, 179, 57, 253, 191, 208, 93, 139, 150, 74, 213, 172, 14, 42, 240, 104, 241, 78, 226, 233, 184, 85, 208, 88, 118, 80, 90, 209, 225, 201, 104, 99, 185, 141, 197, 164, 2, 248, 26, 22, 54, 76], + [78, 180, 168, 42, 231, 49, 94, 221, 136, 176, 103, 209, 89, 167, 122, 140, 51, 31, 188, 209, 59, 109, 244, 174, 158, 94, 224, 38, 244, 81, 242, 142, 136, 218, 197, 192, 105, 39, 163, 10, 5, 234, 149, 19, 251, 173, 247, 45, 20, 198, 81, 186, 128, 62, 1, 212, 113, 200, 219, 136, 116, 76, 90, 120], + [177, 142, 236, 198, 212, 128, 92, 3, 224, 183, 54, 166, 112, 191, 4, 15, 200, 4, 247, 29, 35, 234, 3, 55, 20, 130, 235, 106, 85, 33, 11, 160, 3, 104, 142, 248, 73, 44, 162, 179, 36, 84, 120, 175, 48, 249, 163, 132, 247, 0, 232, 174, 48, 14, 118, 116, 199, 90, 63, 135, 205, 159, 140, 124], + [245, 189, 240, 76, 82, 62, 134, 155, 55, 132, 129, 221, 105, 6, 203, 32, 87, 219, 94, 80, 195, 201, 204, 175, 148, 118, 53, 172, 75, 163, 80, 136, 34, 51, 89, 11, 194, 4, 7, 0, 178, 97, 245, 157, 65, 12, 126, 206, 200, 115, 83, 143, 131, 63, 80, 75, 238, 158, 25, 235, 211, 184, 158, 139] + ], + "segmentSize": null + }, + { + "encrypted": [ + [] + ], + "iv": null, + "key": [74, 196, 109, 220, 93, 150, 110, 192, 33, 196, 18, 135, 56, 50, 134, 131, 184, 165, 59, 235, 167, 81, 105, 85, 221, 0, 249, 116, 197, 195, 86, 216], + "modeOfOperation": "ecb", + "plaintext": [ + [] + ], + "segmentSize": null + }, + { + "encrypted": [ + [245, 21, 127, 108, 26, 199, 50, 152, 114, 254, 58, 46, 117, 22, 110, 186], + [20, 202, 218, 104, 85, 251, 2, 80, 75, 250, 184, 164, 67, 61, 161, 140] + ], + "iv": null, + "key": [245, 19, 7, 110, 132, 129, 245, 55, 79, 204, 42, 198, 209, 250, 36, 198, 158, 211, 77, 217, 52, 77, 57, 146, 169, 29, 44, 227, 62, 218, 177, 240], + "modeOfOperation": "ecb", + "plaintext": [ + [113, 74, 40, 4, 35, 176, 33, 140, 204, 151, 78, 121, 144, 40, 208, 217], + [127, 92, 246, 104, 67, 37, 99, 170, 14, 166, 61, 29, 220, 73, 177, 131] + ], + "segmentSize": null + }, + { + "encrypted": [ + [192, 66, 50, 71, 183, 27, 4, 101, 98, 230, 195, 45, 92, 225, 99, 67], + [15, 82, 51, 228, 241, 188, 130, 192, 254, 240, 150, 230, 35, 207, 208, 156], + [214, 59, 44, 155, 245, 63, 240, 115, 187, 36, 209, 59, 243, 226, 12, 86] + ], + "iv": null, + "key": [52, 187, 98, 11, 101, 224, 1, 72, 39, 90, 164, 38, 28, 142, 188, 231, 95, 78, 41, 214, 56, 41, 209, 205, 175, 63, 19, 100, 49, 223, 27, 87], + "modeOfOperation": "ecb", + "plaintext": [ + [99, 46, 64, 119, 152, 77, 38, 200, 178, 220, 132, 154, 119, 163, 248, 0], + [206, 138, 243, 176, 177, 162, 187, 89, 40, 104, 34, 110, 196, 193, 131, 252], + [61, 54, 226, 220, 199, 128, 66, 35, 62, 45, 242, 142, 177, 27, 152, 151] + ], + "segmentSize": null + }, + { + "encrypted": [ + [207, 220, 194, 77, 177, 158, 163, 49, 79, 160, 224, 80, 85, 201, 57, 240, 158, 173, 214, 62, 22, 7, 55, 59, 191, 89, 74, 242, 250, 217, 28, 154], + [100, 42, 87, 210, 86, 140, 133, 230, 9, 112, 187, 215, 77, 230, 250, 172, 245, 81, 128, 240, 88, 19, 185, 227, 123, 10, 159, 2, 82, 93, 5, 85], + [215, 186, 134, 191, 234, 136, 66, 111, 132, 221, 250, 122, 103, 52, 75, 187, 161, 26, 134, 187, 165, 236, 19, 159, 106, 231, 227, 90, 18, 3, 118, 142], + [210, 162, 165, 17, 233, 77, 4, 137, 45, 20, 248, 115, 215, 23, 16, 29, 165, 185, 94, 49, 74, 216, 140, 242, 207, 69, 8, 57, 233, 241, 131, 173] + ], + "iv": null, + "key": [227, 70, 168, 116, 25, 190, 28, 80, 122, 185, 106, 30, 32, 206, 255, 221, 81, 168, 6, 93, 181, 248, 42, 213, 18, 155, 223, 201, 119, 160, 213, 125], + "modeOfOperation": "ecb", + "plaintext": [ + [70, 8, 193, 155, 216, 105, 3, 252, 255, 30, 8, 185, 148, 192, 111, 239, 198, 209, 249, 212, 167, 179, 12, 128, 250, 4, 11, 237, 35, 121, 231, 109], + [98, 214, 47, 195, 98, 58, 52, 236, 27, 4, 140, 58, 211, 44, 136, 211, 73, 1, 114, 174, 196, 103, 80, 73, 9, 81, 71, 164, 88, 115, 143, 171], + [111, 144, 112, 130, 15, 210, 101, 72, 216, 235, 107, 97, 239, 160, 97, 235, 138, 149, 1, 247, 252, 126, 32, 192, 146, 109, 33, 153, 241, 227, 190, 212], + [27, 3, 64, 137, 8, 143, 32, 227, 246, 238, 223, 20, 91, 22, 177, 151, 187, 153, 120, 21, 57, 149, 69, 244, 160, 216, 10, 170, 250, 185, 40, 99] + ], + "segmentSize": null + }, + { + "encrypted": [ + [38, 135, 18, 180, 185, 4, 96, 217, 183, 158, 234, 199, 234, 8, 137, 219, 154, 7, 29, 255, 118, 20, 23, 219, 153, 55, 29, 248, 165, 153, 179, 146, 216, 194, 60, 144, 215, 195, 135, 181, 16, 71, 238, 158, 17, 82, 237, 206], + [102, 110, 228, 164, 238, 160, 49, 106, 187, 231, 90, 0, 217, 252, 213, 10, 248, 93, 233, 202, 117, 85, 32, 113, 234, 132, 127, 147, 102, 53, 68, 61, 133, 39, 183, 5, 227, 12, 72, 114, 88, 3, 230, 60, 82, 228, 112, 51], + [147, 225, 201, 22, 112, 129, 41, 227, 122, 56, 229, 204, 101, 161, 91, 170, 215, 72, 240, 228, 49, 166, 146, 74, 191, 2, 228, 205, 115, 110, 182, 197, 201, 218, 162, 242, 144, 93, 35, 230, 85, 105, 51, 15, 203, 126, 216, 154], + [117, 1, 120, 118, 168, 243, 196, 70, 44, 203, 54, 14, 184, 144, 89, 25, 152, 106, 130, 102, 163, 35, 225, 211, 125, 93, 158, 242, 227, 4, 166, 102, 152, 215, 33, 82, 74, 182, 9, 196, 255, 9, 100, 65, 43, 137, 150, 237], + [74, 12, 23, 81, 112, 73, 225, 20, 80, 16, 66, 230, 175, 176, 25, 205, 211, 128, 166, 189, 56, 134, 45, 76, 237, 99, 50, 141, 37, 180, 113, 2, 203, 179, 215, 96, 55, 120, 243, 106, 106, 155, 32, 142, 23, 204, 31, 248] + ], + "iv": null, + "key": [214, 10, 129, 34, 247, 33, 45, 119, 220, 9, 161, 117, 80, 146, 227, 50, 204, 71, 252, 129, 54, 110, 121, 190, 0, 201, 48, 195, 18, 109, 140, 6], + "modeOfOperation": "ecb", + "plaintext": [ + [253, 17, 63, 61, 58, 80, 127, 165, 159, 228, 219, 245, 240, 174, 93, 73, 85, 43, 81, 234, 122, 237, 70, 155, 212, 41, 68, 37, 108, 34, 150, 239, 216, 62, 134, 56, 145, 231, 164, 200, 239, 187, 105, 233, 80, 131, 73, 56], + [141, 164, 166, 76, 180, 207, 230, 178, 133, 10, 78, 1, 89, 112, 88, 232, 0, 123, 124, 118, 127, 64, 113, 21, 129, 74, 162, 168, 168, 39, 96, 243, 206, 186, 206, 60, 13, 220, 18, 120, 73, 236, 232, 117, 172, 145, 244, 80], + [21, 191, 184, 29, 172, 45, 134, 153, 41, 58, 119, 237, 238, 115, 111, 145, 3, 61, 167, 73, 51, 41, 40, 25, 205, 35, 158, 172, 192, 227, 63, 52, 226, 181, 174, 169, 61, 83, 241, 186, 158, 57, 90, 160, 202, 19, 216, 45], + [13, 108, 49, 69, 13, 99, 64, 104, 151, 125, 236, 185, 199, 118, 19, 11, 103, 53, 129, 22, 20, 168, 226, 119, 36, 88, 69, 112, 103, 53, 77, 152, 127, 3, 22, 224, 213, 228, 108, 115, 151, 22, 226, 45, 104, 110, 126, 16], + [157, 135, 140, 42, 211, 121, 229, 249, 109, 149, 133, 206, 39, 88, 167, 156, 126, 226, 135, 172, 221, 14, 54, 98, 227, 98, 19, 212, 91, 201, 78, 112, 87, 197, 202, 108, 216, 136, 126, 38, 231, 96, 61, 70, 70, 237, 247, 112] + ], + "segmentSize": null + }, + { + "encrypted": [ + [125, 171, 208, 112, 29, 175, 14, 186, 183, 15, 61, 20, 175, 75, 59, 128, 57, 93, 165, 102, 30, 141, 52, 238, 208, 191, 201, 144, 168, 250, 165, 205, 235, 46, 133, 78, 40, 183, 98, 67, 219, 13, 133, 159, 110, 123, 248, 28, 91, 35, 165, 65, 135, 0, 111, 197, 137, 173, 169, 87, 153, 68, 28, 233], + [98, 160, 217, 70, 181, 37, 249, 120, 220, 172, 56, 181, 72, 144, 199, 243, 6, 164, 159, 202, 182, 65, 133, 220, 104, 35, 65, 76, 150, 233, 163, 150, 165, 27, 253, 194, 135, 173, 128, 95, 172, 230, 85, 143, 10, 168, 85, 19, 39, 96, 95, 240, 166, 90, 90, 181, 205, 137, 155, 37, 126, 113, 135, 213], + [166, 119, 62, 244, 7, 201, 106, 79, 120, 119, 112, 87, 67, 97, 26, 205, 63, 242, 44, 210, 217, 177, 221, 108, 156, 202, 12, 183, 206, 134, 254, 140, 244, 108, 86, 153, 203, 201, 175, 171, 146, 241, 210, 193, 178, 18, 4, 247, 211, 241, 25, 225, 83, 25, 165, 167, 143, 125, 229, 255, 84, 174, 212, 227], + [46, 140, 61, 131, 92, 213, 7, 237, 108, 226, 254, 125, 238, 187, 194, 107, 155, 190, 84, 10, 238, 106, 162, 164, 81, 167, 187, 162, 147, 215, 10, 31, 238, 34, 118, 129, 78, 42, 46, 15, 30, 5, 98, 168, 186, 184, 247, 150, 145, 226, 143, 154, 178, 42, 151, 53, 97, 47, 36, 144, 158, 123, 245, 220], + [223, 204, 30, 104, 66, 254, 173, 163, 116, 17, 72, 38, 112, 188, 69, 167, 186, 86, 238, 198, 124, 134, 108, 59, 7, 154, 226, 247, 192, 1, 130, 124, 86, 253, 15, 42, 213, 41, 102, 220, 5, 211, 139, 168, 212, 94, 243, 160, 253, 47, 12, 118, 20, 71, 35, 71, 164, 42, 115, 219, 219, 127, 194, 78], + [148, 171, 210, 246, 181, 132, 248, 211, 150, 221, 2, 65, 98, 246, 169, 86, 178, 162, 171, 209, 157, 229, 178, 149, 112, 57, 156, 62, 243, 152, 120, 24, 193, 221, 47, 210, 132, 151, 195, 253, 91, 118, 44, 62, 188, 103, 32, 211, 190, 159, 94, 35, 141, 115, 215, 88, 0, 121, 7, 113, 18, 130, 104, 248] + ], + "iv": null, + "key": [38, 151, 212, 135, 176, 26, 63, 111, 55, 29, 232, 237, 180, 108, 83, 119, 145, 45, 13, 66, 124, 33, 225, 49, 34, 132, 248, 136, 213, 131, 14, 17], + "modeOfOperation": "ecb", + "plaintext": [ + [29, 230, 22, 93, 165, 254, 88, 237, 64, 109, 246, 22, 53, 218, 19, 57, 110, 120, 196, 185, 204, 122, 76, 36, 251, 27, 199, 231, 115, 122, 161, 103, 92, 238, 109, 73, 187, 126, 27, 41, 64, 136, 39, 162, 223, 145, 101, 208, 177, 158, 37, 64, 51, 35, 222, 142, 15, 22, 21, 83, 168, 93, 17, 105], + [251, 198, 232, 27, 135, 95, 94, 16, 179, 87, 165, 114, 200, 1, 159, 181, 64, 17, 239, 84, 251, 224, 152, 238, 103, 161, 184, 49, 62, 195, 201, 182, 30, 69, 3, 230, 65, 176, 25, 120, 212, 130, 14, 82, 198, 89, 124, 252, 83, 65, 194, 50, 102, 38, 151, 104, 197, 160, 217, 227, 22, 184, 181, 50], + [161, 110, 154, 16, 80, 206, 149, 25, 41, 34, 219, 139, 51, 45, 86, 201, 22, 226, 124, 0, 26, 37, 254, 48, 62, 140, 212, 216, 91, 141, 229, 221, 142, 116, 5, 204, 129, 177, 33, 84, 134, 238, 11, 101, 183, 131, 108, 89, 218, 128, 15, 88, 114, 115, 134, 78, 195, 150, 16, 161, 23, 101, 25, 8], + [105, 53, 28, 53, 63, 41, 109, 107, 139, 116, 163, 203, 95, 198, 98, 116, 11, 174, 182, 168, 98, 98, 59, 92, 121, 57, 58, 18, 251, 44, 234, 119, 253, 186, 247, 36, 138, 28, 252, 226, 146, 107, 74, 232, 249, 4, 241, 64, 107, 156, 214, 96, 42, 127, 101, 221, 2, 70, 19, 216, 2, 70, 120, 92], + [110, 186, 184, 173, 17, 92, 219, 168, 22, 206, 227, 126, 30, 181, 11, 89, 130, 122, 248, 18, 132, 34, 140, 102, 8, 209, 76, 85, 117, 141, 220, 48, 32, 137, 4, 185, 133, 118, 12, 34, 63, 42, 47, 221, 26, 126, 58, 205, 169, 112, 17, 137, 191, 30, 194, 96, 180, 89, 58, 52, 182, 112, 105, 142], + [5, 104, 215, 13, 119, 85, 44, 195, 162, 255, 82, 113, 6, 168, 12, 252, 4, 255, 124, 4, 4, 8, 111, 203, 63, 145, 51, 91, 245, 105, 194, 193, 44, 230, 96, 164, 237, 154, 254, 183, 187, 50, 125, 156, 19, 124, 102, 92, 143, 9, 199, 103, 112, 109, 198, 79, 140, 1, 220, 37, 89, 164, 61, 102] + ], + "segmentSize": null + }, + { + "encrypted": [ + [150, 81, 143, 14, 30, 75, 182, 253, 249, 147, 14, 26, 245, 189, 222, 208, 187, 27, 189, 90, 194, 131, 222, 24, 55, 198, 77, 158, 98, 63, 219, 85, 3, 188, 167, 158, 212, 71, 227, 89, 43, 77, 239, 95, 203, 138, 0, 128, 242, 90, 121, 25, 118, 255, 8, 85, 21, 215, 222, 216, 220, 117, 199, 240], + [73, 219, 203, 4, 87, 251, 232, 161, 220, 1, 157, 232, 1, 38, 1, 229, 242, 82, 0, 190, 255, 169, 7, 196, 208, 73, 227, 24, 33, 253, 55, 83, 141, 100, 190, 70, 156, 41, 195, 24, 135, 244, 48, 72, 224, 88, 168, 106, 12, 234, 77, 133, 33, 181, 41, 162, 31, 62, 83, 128, 7, 102, 126, 163], + [56, 167, 70, 85, 215, 23, 222, 20, 176, 253, 99, 108, 50, 9, 199, 199, 209, 147, 108, 90, 243, 37, 86, 59, 225, 4, 100, 249, 5, 36, 169, 139, 161, 232, 233, 27, 36, 42, 44, 97, 253, 143, 99, 194, 111, 38, 157, 105, 175, 252, 164, 158, 217, 57, 167, 239, 99, 236, 221, 149, 99, 194, 200, 208], + [74, 145, 171, 150, 199, 75, 165, 162, 103, 190, 89, 255, 175, 70, 18, 16, 230, 244, 80, 165, 109, 84, 16, 37, 194, 11, 120, 35, 121, 148, 177, 161, 56, 142, 139, 38, 183, 10, 195, 181, 61, 161, 75, 254, 63, 195, 152, 94, 247, 75, 81, 102, 186, 3, 131, 144, 213, 69, 123, 140, 98, 189, 126, 90], + [55, 117, 166, 209, 92, 0, 191, 65, 100, 18, 241, 108, 124, 167, 195, 102, 69, 145, 220, 30, 11, 101, 39, 57, 251, 0, 107, 176, 39, 242, 164, 28, 165, 190, 175, 195, 46, 223, 237, 162, 133, 243, 246, 241, 116, 161, 131, 224, 130, 113, 23, 9, 201, 246, 9, 11, 190, 24, 119, 207, 142, 2, 103, 39], + [98, 118, 11, 255, 152, 110, 130, 18, 1, 66, 50, 161, 89, 219, 251, 202, 229, 49, 255, 194, 120, 177, 74, 77, 46, 218, 129, 16, 6, 17, 155, 221, 153, 61, 227, 119, 25, 83, 226, 231, 213, 158, 49, 216, 133, 106, 186, 12, 183, 193, 130, 252, 168, 249, 84, 26, 176, 224, 170, 140, 203, 110, 236, 236], + [207, 133, 119, 141, 160, 209, 214, 127, 146, 56, 167, 6, 248, 181, 25, 174, 124, 210, 106, 91, 146, 120, 122, 161, 148, 197, 243, 181, 201, 255, 172, 134, 178, 39, 135, 33, 213, 162, 251, 88, 157, 76, 221, 86, 251, 160, 105, 10, 207, 166, 40, 8, 77, 133, 252, 0, 64, 147, 67, 232, 199, 57, 66, 228] + ], + "iv": null, + "key": [48, 66, 117, 237, 40, 21, 255, 74, 113, 101, 103, 83, 224, 29, 198, 6, 105, 217, 157, 116, 66, 24, 75, 26, 102, 155, 123, 160, 87, 197, 219, 116], + "modeOfOperation": "ecb", + "plaintext": [ + [106, 51, 105, 190, 46, 17, 137, 167, 64, 60, 156, 31, 78, 243, 159, 222, 171, 83, 163, 242, 12, 16, 215, 9, 10, 158, 42, 124, 72, 64, 70, 13, 170, 247, 188, 193, 117, 96, 33, 223, 184, 234, 20, 108, 116, 98, 76, 18, 211, 137, 42, 76, 73, 4, 136, 76, 205, 161, 35, 214, 144, 195, 145, 49], + [140, 49, 38, 234, 5, 254, 36, 10, 201, 177, 69, 189, 74, 209, 22, 132, 205, 91, 67, 105, 12, 104, 235, 6, 53, 236, 214, 219, 47, 82, 20, 72, 106, 191, 155, 72, 107, 32, 231, 180, 160, 209, 29, 99, 199, 204, 195, 235, 233, 208, 72, 122, 6, 173, 86, 99, 36, 89, 115, 138, 174, 161, 43, 156], + [253, 235, 134, 71, 190, 36, 203, 178, 6, 145, 239, 41, 58, 150, 155, 241, 70, 149, 240, 226, 217, 102, 72, 24, 211, 52, 58, 132, 106, 150, 15, 154, 49, 53, 75, 99, 212, 20, 225, 139, 60, 179, 24, 24, 132, 190, 65, 175, 179, 135, 131, 30, 248, 202, 188, 181, 135, 93, 98, 252, 83, 122, 243, 101], + [9, 11, 223, 225, 212, 90, 128, 239, 161, 179, 69, 193, 177, 199, 185, 187, 160, 2, 189, 78, 220, 179, 26, 28, 128, 192, 214, 144, 79, 206, 10, 143, 179, 110, 46, 59, 64, 159, 85, 175, 3, 71, 129, 50, 69, 246, 103, 142, 55, 108, 175, 49, 39, 20, 2, 65, 36, 47, 41, 216, 241, 115, 78, 207], + [35, 60, 150, 236, 194, 209, 253, 141, 98, 194, 25, 216, 214, 216, 83, 83, 162, 205, 140, 213, 91, 209, 109, 246, 205, 197, 58, 41, 16, 68, 161, 58, 252, 129, 189, 166, 155, 37, 85, 201, 166, 125, 249, 79, 246, 216, 99, 49, 198, 166, 83, 127, 98, 20, 193, 128, 140, 119, 254, 12, 163, 20, 208, 84], + [117, 72, 173, 107, 78, 59, 150, 251, 142, 159, 98, 193, 113, 105, 32, 2, 252, 138, 38, 202, 116, 149, 178, 12, 235, 87, 217, 116, 115, 197, 6, 143, 141, 213, 130, 91, 68, 27, 35, 54, 109, 54, 196, 156, 19, 158, 64, 129, 164, 235, 172, 50, 151, 163, 157, 218, 78, 85, 101, 14, 217, 121, 205, 250], + [118, 255, 103, 128, 166, 122, 235, 99, 82, 221, 95, 6, 222, 24, 130, 100, 53, 85, 148, 46, 188, 39, 161, 169, 31, 198, 35, 137, 192, 138, 172, 175, 48, 67, 167, 25, 214, 137, 224, 225, 109, 251, 238, 149, 5, 61, 117, 142, 134, 79, 220, 207, 237, 198, 195, 89, 92, 19, 180, 112, 252, 204, 199, 35] + ], + "segmentSize": null + }, + { + "encrypted": [ + [204, 121, 46, 192, 112, 201, 9, 214, 29, 79, 35, 174, 232, 182, 89, 52] + ], + "iv": [78, 53, 6, 24, 69, 84, 245, 182, 150, 78, 127, 149, 208, 166, 241, 224], + "key": [156, 254, 114, 135, 172, 211, 219, 127, 96, 44, 230, 196, 215, 195, 197, 35], + "modeOfOperation": "ofb", + "plaintext": [ + [108, 237, 216, 229, 31, 202, 124, 25, 76, 95, 52, 191, 161, 96, 240, 184] + ], + "segmentSize": null + }, + { + "encrypted": [ + [13, 94, 64, 58, 60, 18, 161, 119, 230, 122, 16, 4, 239, 112, 82, 183], + [157, 2, 249, 113, 18, 14, 183, 20, 237, 16, 216, 106, 195, 40, 190, 0] + ], + "iv": [99, 64, 75, 154, 237, 86, 190, 171, 26, 130, 163, 162, 42, 100, 244, 17], + "key": [25, 13, 142, 21, 114, 43, 23, 68, 33, 217, 193, 250, 203, 250, 123, 247], + "modeOfOperation": "ofb", + "plaintext": [ + [143, 0, 113, 217, 121, 214, 249, 76, 181, 139, 252, 175, 244, 129, 108, 236], + [111, 185, 26, 48, 30, 205, 217, 223, 87, 249, 206, 10, 79, 66, 211, 47] + ], + "segmentSize": null + }, + { + "encrypted": [ + [208, 233, 254, 133, 79, 204, 254, 78, 19, 155, 107, 146, 82, 86, 151, 88], + [81, 221, 52, 117, 161, 130, 119, 215, 131, 161, 71, 74, 227, 83, 147, 210], + [94, 122, 220, 93, 173, 166, 1, 80, 65, 19, 155, 177, 50, 126, 239, 40] + ], + "iv": [72, 109, 173, 26, 155, 70, 171, 61, 11, 17, 194, 115, 140, 248, 225, 235], + "key": [187, 243, 155, 131, 0, 90, 23, 183, 99, 188, 20, 252, 107, 251, 46, 3], + "modeOfOperation": "ofb", + "plaintext": [ + [97, 2, 113, 25, 128, 160, 187, 148, 110, 135, 189, 92, 156, 170, 132, 132], + [126, 229, 126, 7, 84, 5, 8, 202, 229, 23, 199, 222, 16, 86, 204, 210], + [81, 145, 64, 168, 28, 247, 213, 117, 6, 106, 185, 115, 44, 78, 202, 81] + ], + "segmentSize": null + }, + { + "encrypted": [ + [212, 244, 187, 80, 185, 139, 27, 129, 31, 237, 10, 187, 179, 115, 36, 176], + [178, 177, 23, 247, 67, 241, 75, 109, 123, 169, 0, 117, 82, 160, 222, 207], + [213, 147, 238, 223, 62, 244, 155, 8, 115, 199, 114, 169, 28, 104, 173, 100], + [124, 205, 15, 9, 64, 167, 71, 193, 84, 55, 217, 188, 193, 69, 69, 73] + ], + "iv": [226, 70, 185, 65, 96, 19, 168, 194, 238, 110, 87, 118, 31, 103, 163, 60], + "key": [2, 204, 240, 249, 135, 182, 101, 79, 235, 6, 242, 207, 192, 33, 198, 157], + "modeOfOperation": "ofb", + "plaintext": [ + [232, 185, 128, 76, 254, 222, 242, 187, 195, 28, 215, 84, 51, 84, 33, 34], + [103, 36, 42, 154, 27, 168, 245, 134, 133, 108, 39, 78, 176, 142, 153, 211], + [225, 141, 117, 111, 41, 93, 102, 38, 132, 186, 181, 200, 207, 181, 168, 102], + [120, 169, 74, 82, 111, 135, 177, 221, 99, 90, 191, 114, 38, 37, 108, 83] + ], + "segmentSize": null + }, + { + "encrypted": [ + [68, 250, 140, 229, 174, 85, 198, 13, 98, 215, 167, 127, 71, 62, 150, 165], + [172, 224, 28, 90, 241, 130, 127, 36, 96, 110, 254, 206, 221, 77, 114, 65], + [94, 50, 181, 95, 177, 147, 143, 173, 208, 244, 186, 10, 255, 49, 31, 57], + [4, 208, 128, 18, 100, 135, 68, 79, 109, 194, 135, 111, 94, 58, 200, 3], + [173, 182, 204, 116, 110, 71, 98, 241, 93, 197, 95, 238, 79, 97, 242, 80] + ], + "iv": [209, 161, 116, 63, 79, 113, 75, 138, 188, 75, 4, 188, 158, 243, 15, 167], + "key": [17, 229, 209, 157, 199, 190, 150, 65, 111, 249, 212, 235, 152, 154, 129, 61], + "modeOfOperation": "ofb", + "plaintext": [ + [47, 95, 27, 118, 118, 243, 147, 187, 228, 14, 47, 225, 136, 31, 220, 203], + [114, 60, 233, 209, 15, 83, 100, 240, 28, 57, 168, 137, 133, 188, 129, 170], + [82, 20, 58, 95, 216, 106, 165, 127, 174, 14, 227, 254, 82, 131, 168, 67], + [165, 135, 178, 168, 106, 182, 235, 215, 147, 166, 195, 238, 206, 28, 165, 229], + [159, 24, 251, 84, 31, 210, 100, 48, 140, 251, 246, 116, 204, 77, 190, 163] + ], + "segmentSize": null + }, + { + "encrypted": [ + [23, 201, 172, 146, 25, 186, 36, 103, 118, 175, 25, 210, 60, 153, 212, 168], + [182, 173, 195, 34, 109, 179, 28, 159, 68, 77, 187, 195, 215, 143, 43, 144], + [223, 91, 166, 124, 65, 104, 196, 254, 19, 172, 27, 154, 93, 35, 196, 0], + [120, 146, 77, 76, 98, 212, 100, 103, 71, 120, 253, 109, 201, 193, 151, 101], + [77, 103, 75, 243, 221, 125, 134, 123, 153, 135, 205, 219, 43, 96, 195, 207], + [232, 135, 49, 27, 189, 95, 240, 54, 146, 181, 158, 16, 119, 213, 43, 156] + ], + "iv": [191, 214, 93, 243, 122, 249, 39, 97, 103, 86, 31, 254, 45, 49, 80, 47], + "key": [122, 83, 153, 20, 130, 242, 84, 157, 93, 64, 37, 194, 107, 166, 137, 3], + "modeOfOperation": "ofb", + "plaintext": [ + [215, 238, 252, 77, 182, 164, 204, 76, 238, 120, 255, 145, 5, 97, 183, 219], + [247, 203, 178, 211, 229, 171, 24, 16, 1, 15, 123, 203, 39, 177, 168, 102], + [91, 166, 82, 216, 42, 203, 201, 153, 106, 103, 66, 6, 15, 196, 4, 53], + [47, 169, 241, 190, 183, 2, 235, 192, 143, 235, 72, 213, 33, 36, 74, 202], + [229, 135, 180, 235, 139, 1, 31, 122, 208, 221, 197, 34, 219, 179, 31, 122], + [24, 165, 36, 100, 134, 138, 253, 103, 144, 81, 204, 210, 83, 154, 113, 67] + ], + "segmentSize": null + }, + { + "encrypted": [ + [133, 207, 211, 112, 126, 24, 42, 104, 73, 19, 246, 31, 208, 37, 52, 147], + [57, 174, 186, 122, 207, 113, 39, 161, 95, 127, 85, 144, 102, 148, 123, 60], + [197, 68, 11, 238, 238, 68, 63, 212, 127, 10, 35, 204, 252, 104, 137, 68], + [49, 183, 96, 109, 204, 204, 126, 163, 72, 132, 187, 139, 235, 196, 164, 55], + [221, 223, 79, 15, 177, 30, 133, 2, 255, 183, 93, 74, 18, 206, 68, 245], + [128, 62, 13, 202, 156, 2, 45, 232, 160, 17, 233, 160, 134, 161, 169, 128], + [71, 106, 190, 64, 88, 57, 155, 102, 214, 124, 183, 116, 192, 64, 80, 56] + ], + "iv": [204, 113, 46, 109, 128, 164, 123, 14, 27, 246, 48, 24, 39, 153, 43, 43], + "key": [217, 52, 151, 82, 57, 1, 117, 159, 57, 71, 222, 102, 43, 31, 226, 195], + "modeOfOperation": "ofb", + "plaintext": [ + [216, 198, 120, 34, 46, 28, 145, 52, 25, 186, 19, 94, 14, 202, 127, 197], + [205, 17, 15, 13, 24, 181, 59, 50, 192, 74, 228, 237, 162, 190, 235, 18], + [112, 78, 98, 23, 218, 105, 130, 123, 47, 202, 151, 126, 118, 152, 109, 24], + [157, 237, 201, 155, 126, 109, 188, 1, 171, 210, 44, 86, 216, 101, 241, 220], + [8, 134, 116, 195, 175, 98, 59, 200, 9, 247, 90, 127, 112, 170, 167, 245], + [236, 68, 129, 155, 15, 25, 30, 225, 1, 111, 213, 191, 91, 191, 135, 133], + [174, 126, 143, 91, 9, 87, 40, 223, 109, 185, 208, 231, 184, 66, 228, 158] + ], + "segmentSize": null + }, + { + "encrypted": [ + [17, 137, 114, 51, 85, 173, 91, 105, 195, 212, 1, 83, 98, 205, 251, 82] + ], + "iv": [196, 16, 169, 120, 185, 106, 157, 90, 232, 185, 215, 38, 180, 101, 222, 15], + "key": [11, 181, 18, 39, 79, 73, 228, 22, 128, 25, 233, 68, 232, 11, 15, 51, 10, 163, 134, 181, 48, 173, 136, 110], + "modeOfOperation": "ofb", + "plaintext": [ + [80, 78, 85, 91, 161, 11, 228, 214, 51, 255, 77, 138, 47, 105, 128, 123] + ], + "segmentSize": null + }, + { + "encrypted": [ + [27, 198, 101, 58, 75, 201, 17, 27, 167, 66, 87, 121, 78, 25, 190, 148], + [124, 165, 124, 7, 137, 154, 237, 51, 229, 213, 3, 227, 116, 7, 155, 35] + ], + "iv": [74, 247, 237, 201, 29, 180, 18, 204, 39, 24, 242, 58, 95, 129, 97, 173], + "key": [56, 33, 245, 166, 220, 254, 140, 0, 101, 247, 130, 214, 203, 188, 72, 32, 78, 181, 60, 151, 146, 241, 67, 90], + "modeOfOperation": "ofb", + "plaintext": [ + [116, 48, 250, 246, 90, 124, 178, 204, 238, 105, 136, 98, 141, 236, 164, 8], + [238, 145, 186, 37, 10, 231, 34, 108, 58, 83, 43, 175, 40, 167, 49, 118] + ], + "segmentSize": null + }, + { + "encrypted": [ + [193, 85, 41, 149, 64, 98, 214, 54, 96, 40, 93, 212, 57, 110, 129, 238], + [156, 238, 219, 133, 33, 236, 60, 46, 246, 24, 53, 163, 103, 165, 128, 123], + [200, 211, 244, 65, 194, 214, 216, 133, 139, 110, 23, 21, 159, 251, 93, 8] + ], + "iv": [89, 54, 137, 112, 64, 131, 180, 207, 209, 73, 206, 169, 131, 175, 243, 96], + "key": [57, 78, 135, 158, 231, 18, 178, 249, 162, 218, 103, 195, 78, 45, 57, 196, 149, 117, 155, 143, 152, 25, 199, 127], + "modeOfOperation": "ofb", + "plaintext": [ + [30, 182, 56, 81, 94, 83, 102, 211, 50, 120, 236, 15, 226, 172, 191, 222], + [2, 190, 147, 223, 63, 245, 183, 20, 232, 184, 144, 72, 27, 184, 76, 180], + [105, 150, 74, 139, 116, 153, 132, 164, 95, 196, 167, 184, 183, 1, 34, 81] + ], + "segmentSize": null + }, + { + "encrypted": [ + [5, 101, 59, 241, 113, 128, 67, 228, 106, 80, 225, 249, 127, 236, 114, 58], + [191, 178, 82, 187, 253, 11, 57, 99, 49, 164, 113, 252, 8, 183, 193, 22], + [137, 62, 123, 227, 156, 108, 26, 158, 134, 246, 134, 18, 227, 41, 11, 163], + [222, 164, 48, 44, 202, 173, 133, 120, 233, 105, 62, 1, 194, 176, 63, 86] + ], + "iv": [71, 73, 118, 2, 165, 214, 199, 97, 161, 127, 215, 55, 203, 152, 47, 132], + "key": [25, 1, 231, 253, 227, 160, 198, 194, 43, 146, 168, 72, 148, 112, 242, 246, 214, 156, 7, 22, 245, 39, 246, 196], + "modeOfOperation": "ofb", + "plaintext": [ + [23, 29, 134, 10, 228, 18, 66, 53, 191, 89, 168, 248, 29, 109, 183, 47], + [10, 230, 28, 64, 103, 217, 65, 155, 2, 219, 250, 104, 55, 205, 224, 99], + [220, 4, 49, 168, 212, 160, 41, 102, 6, 138, 9, 145, 150, 6, 111, 253], + [165, 213, 195, 31, 210, 88, 225, 71, 251, 190, 241, 20, 16, 195, 35, 193] + ], + "segmentSize": null + }, + { + "encrypted": [ + [9, 101, 79, 161, 153, 178, 93, 67, 230, 5, 125, 240, 25, 173, 202, 182], + [78, 19, 229, 112, 247, 242, 49, 175, 65, 233, 246, 243, 231, 238, 231, 5], + [8, 168, 167, 229, 47, 109, 203, 139, 241, 160, 195, 240, 106, 104, 114, 17], + [194, 53, 98, 183, 114, 195, 21, 149, 228, 87, 7, 158, 148, 22, 180, 42], + [6, 118, 139, 147, 181, 242, 129, 6, 210, 39, 90, 117, 234, 59, 25, 178] + ], + "iv": [121, 156, 116, 139, 166, 249, 225, 236, 70, 25, 18, 102, 163, 33, 146, 100], + "key": [33, 246, 70, 192, 38, 79, 246, 72, 189, 143, 110, 12, 47, 180, 145, 26, 80, 108, 100, 194, 75, 164, 158, 178], + "modeOfOperation": "ofb", + "plaintext": [ + [237, 73, 235, 31, 183, 181, 183, 254, 178, 109, 65, 7, 66, 137, 162, 31], + [186, 74, 0, 58, 249, 82, 5, 211, 14, 130, 157, 50, 215, 202, 63, 94], + [216, 88, 67, 212, 25, 98, 201, 58, 216, 140, 163, 123, 250, 11, 184, 105], + [205, 77, 158, 168, 82, 36, 0, 184, 248, 135, 99, 143, 242, 250, 151, 197], + [159, 139, 148, 156, 251, 233, 173, 33, 244, 227, 77, 238, 116, 145, 51, 126] + ], + "segmentSize": null + }, + { + "encrypted": [ + [249, 235, 87, 109, 54, 84, 39, 33, 2, 41, 180, 30, 188, 120, 230, 66], + [193, 0, 210, 231, 120, 245, 214, 80, 230, 215, 56, 130, 95, 208, 187, 52], + [134, 181, 107, 78, 96, 76, 213, 210, 0, 255, 43, 121, 129, 236, 187, 181], + [242, 171, 231, 130, 26, 27, 226, 229, 249, 222, 90, 205, 108, 96, 194, 50], + [160, 177, 235, 185, 197, 192, 14, 41, 225, 13, 87, 23, 237, 172, 217, 47], + [98, 2, 81, 230, 51, 69, 240, 61, 39, 57, 111, 129, 9, 68, 124, 146] + ], + "iv": [221, 237, 160, 251, 32, 180, 239, 199, 253, 29, 186, 66, 48, 52, 141, 79], + "key": [211, 3, 82, 203, 123, 27, 84, 89, 47, 231, 27, 129, 217, 135, 93, 139, 215, 242, 241, 80, 42, 167, 224, 155], + "modeOfOperation": "ofb", + "plaintext": [ + [146, 128, 36, 184, 51, 203, 188, 44, 31, 56, 74, 193, 240, 56, 197, 17], + [130, 3, 255, 37, 157, 153, 10, 16, 238, 112, 205, 72, 187, 130, 115, 130], + [27, 149, 254, 240, 126, 251, 246, 74, 29, 95, 98, 193, 50, 199, 49, 179], + [31, 191, 162, 145, 78, 0, 64, 211, 151, 182, 252, 63, 111, 26, 167, 36], + [225, 29, 206, 38, 62, 153, 199, 154, 222, 215, 217, 166, 10, 99, 241, 246], + [8, 2, 171, 168, 230, 100, 133, 80, 235, 0, 248, 142, 205, 170, 45, 184] + ], + "segmentSize": null + }, + { + "encrypted": [ + [143, 9, 106, 136, 234, 97, 46, 244, 227, 194, 41, 20, 106, 179, 190, 160], + [122, 122, 25, 124, 124, 79, 102, 226, 63, 203, 199, 58, 85, 203, 30, 5], + [12, 171, 185, 195, 136, 15, 46, 10, 89, 235, 138, 191, 188, 14, 237, 58], + [46, 173, 216, 33, 145, 73, 82, 221, 196, 199, 53, 247, 241, 61, 242, 33], + [66, 50, 243, 108, 136, 160, 189, 30, 145, 53, 156, 182, 21, 1, 244, 119], + [46, 103, 70, 184, 175, 196, 29, 83, 79, 224, 227, 68, 21, 26, 62, 57], + [172, 253, 244, 92, 58, 3, 223, 116, 210, 204, 121, 172, 84, 162, 89, 25] + ], + "iv": [198, 101, 70, 144, 188, 67, 190, 252, 78, 228, 3, 31, 84, 12, 77, 133], + "key": [156, 174, 177, 117, 44, 214, 202, 33, 109, 20, 130, 239, 229, 232, 201, 3, 216, 73, 126, 236, 181, 29, 69, 111], + "modeOfOperation": "ofb", + "plaintext": [ + [118, 133, 21, 72, 222, 75, 224, 173, 172, 93, 147, 96, 177, 205, 229, 22], + [8, 94, 34, 31, 70, 68, 0, 36, 8, 243, 175, 98, 76, 224, 28, 21], + [204, 62, 164, 104, 177, 121, 248, 222, 180, 31, 241, 195, 169, 187, 19, 61], + [101, 72, 93, 49, 193, 16, 234, 5, 24, 40, 114, 210, 98, 218, 9, 29], + [212, 130, 117, 211, 88, 255, 15, 49, 143, 83, 41, 225, 169, 123, 191, 111], + [243, 84, 101, 97, 70, 178, 44, 83, 165, 87, 56, 170, 134, 240, 232, 76], + [212, 205, 30, 123, 78, 119, 211, 175, 155, 253, 9, 228, 80, 139, 162, 107] + ], + "segmentSize": null + }, + { + "encrypted": [ + [82, 185, 59, 95, 68, 20, 40, 130, 152, 206, 83, 158, 205, 59, 52, 255] + ], + "iv": [89, 188, 27, 4, 184, 54, 179, 151, 251, 178, 61, 194, 223, 115, 243, 69], + "key": [45, 71, 20, 138, 184, 231, 203, 239, 130, 68, 226, 18, 47, 157, 179, 147, 20, 116, 208, 162, 217, 193, 142, 31, 51, 53, 118, 115, 112, 226, 89, 198], + "modeOfOperation": "ofb", + "plaintext": [ + [159, 152, 242, 133, 124, 71, 119, 218, 143, 202, 186, 45, 109, 35, 251, 191] + ], + "segmentSize": null + }, + { + "encrypted": [ + [246, 237, 107, 238, 121, 169, 138, 84, 76, 127, 63, 245, 155, 201, 83, 48], + [213, 133, 226, 54, 77, 105, 247, 36, 139, 117, 126, 157, 87, 124, 126, 85] + ], + "iv": [220, 210, 109, 142, 60, 61, 182, 237, 218, 163, 67, 161, 243, 119, 208, 59], + "key": [6, 48, 124, 220, 14, 147, 162, 29, 33, 235, 103, 14, 118, 238, 5, 210, 134, 98, 247, 71, 89, 111, 66, 179, 164, 76, 13, 170, 19, 252, 95, 62], + "modeOfOperation": "ofb", + "plaintext": [ + [252, 193, 188, 83, 108, 120, 54, 200, 36, 66, 192, 172, 74, 228, 141, 96], + [96, 28, 37, 160, 137, 234, 21, 93, 127, 50, 229, 254, 111, 231, 135, 204] + ], + "segmentSize": null + }, + { + "encrypted": [ + [115, 24, 205, 236, 211, 142, 62, 179, 120, 193, 24, 36, 204, 95, 121, 112], + [33, 220, 28, 64, 83, 83, 125, 147, 209, 102, 176, 89, 31, 184, 203, 19], + [34, 167, 240, 230, 186, 181, 171, 67, 69, 41, 27, 136, 210, 54, 63, 33] + ], + "iv": [20, 222, 239, 204, 184, 18, 142, 180, 95, 102, 22, 228, 112, 219, 193, 212], + "key": [14, 148, 222, 64, 135, 248, 172, 169, 47, 137, 106, 241, 86, 78, 34, 19, 188, 120, 128, 106, 231, 184, 66, 239, 68, 78, 171, 189, 57, 44, 159, 164], + "modeOfOperation": "ofb", + "plaintext": [ + [192, 26, 24, 109, 7, 73, 4, 200, 2, 159, 168, 43, 218, 85, 186, 87], + [100, 190, 39, 56, 15, 119, 192, 238, 36, 137, 252, 231, 32, 88, 69, 208], + [188, 154, 58, 232, 48, 98, 16, 18, 207, 44, 37, 85, 118, 143, 242, 245] + ], + "segmentSize": null + }, + { + "encrypted": [ + [254, 40, 198, 13, 39, 89, 84, 241, 84, 36, 110, 105, 74, 148, 210, 218], + [216, 93, 41, 121, 84, 195, 1, 20, 204, 208, 69, 21, 39, 16, 190, 80], + [195, 156, 51, 209, 10, 71, 3, 205, 196, 30, 210, 215, 186, 109, 113, 233], + [245, 64, 154, 0, 224, 188, 159, 248, 131, 136, 149, 69, 69, 36, 215, 178] + ], + "iv": [215, 202, 147, 4, 63, 3, 65, 199, 109, 173, 199, 24, 183, 60, 194, 203], + "key": [218, 211, 14, 117, 100, 43, 164, 159, 58, 147, 191, 86, 248, 98, 57, 247, 83, 172, 67, 22, 188, 93, 45, 122, 151, 153, 9, 213, 196, 217, 189, 164], + "modeOfOperation": "ofb", + "plaintext": [ + [82, 253, 125, 2, 153, 187, 175, 218, 98, 126, 155, 204, 42, 28, 180, 59], + [204, 228, 214, 27, 225, 149, 181, 12, 72, 75, 191, 235, 251, 248, 228, 4], + [15, 211, 129, 167, 118, 163, 154, 92, 212, 180, 215, 222, 83, 97, 37, 125], + [115, 6, 215, 45, 145, 243, 166, 195, 102, 16, 160, 140, 98, 184, 160, 54] + ], + "segmentSize": null + }, + { + "encrypted": [ + [142, 14, 164, 188, 249, 94, 42, 94, 45, 116, 81, 30, 142, 84, 158, 99], + [193, 181, 67, 178, 204, 190, 78, 138, 56, 133, 24, 203, 241, 106, 135, 114], + [161, 170, 33, 240, 205, 59, 83, 78, 133, 144, 60, 225, 109, 207, 29, 183], + [32, 183, 187, 89, 255, 160, 92, 96, 72, 199, 135, 98, 95, 197, 29, 250], + [123, 241, 63, 63, 242, 140, 119, 116, 135, 168, 78, 136, 23, 24, 22, 210] + ], + "iv": [53, 11, 54, 37, 84, 24, 117, 88, 241, 124, 94, 124, 152, 71, 26, 210], + "key": [44, 84, 68, 46, 250, 199, 41, 3, 201, 192, 206, 89, 215, 224, 50, 150, 112, 169, 179, 240, 44, 205, 230, 107, 140, 137, 202, 74, 186, 125, 193, 96], + "modeOfOperation": "ofb", + "plaintext": [ + [172, 198, 64, 152, 14, 149, 112, 185, 146, 3, 51, 108, 91, 70, 57, 37], + [248, 79, 228, 134, 246, 209, 134, 72, 8, 210, 109, 240, 185, 152, 144, 22], + [175, 103, 146, 251, 37, 157, 47, 112, 3, 34, 27, 237, 30, 187, 241, 219], + [200, 209, 215, 255, 80, 223, 200, 67, 100, 248, 180, 167, 92, 75, 64, 63], + [101, 121, 3, 144, 29, 106, 93, 230, 150, 217, 49, 139, 46, 176, 191, 119] + ], + "segmentSize": null + }, + { + "encrypted": [ + [195, 109, 238, 0, 15, 121, 99, 33, 1, 169, 36, 247, 219, 37, 42, 210], + [44, 20, 120, 152, 28, 254, 247, 36, 49, 187, 143, 20, 60, 94, 105, 84], + [240, 28, 18, 194, 189, 251, 196, 150, 41, 195, 222, 145, 185, 190, 42, 186], + [236, 88, 73, 136, 63, 78, 38, 147, 182, 60, 127, 33, 206, 216, 231, 149], + [78, 1, 121, 113, 197, 47, 92, 232, 149, 159, 113, 113, 71, 159, 93, 82], + [113, 162, 84, 157, 239, 126, 198, 172, 36, 120, 104, 21, 112, 103, 201, 25] + ], + "iv": [253, 52, 31, 220, 137, 223, 56, 101, 106, 246, 35, 101, 254, 136, 234, 249], + "key": [67, 232, 210, 136, 88, 118, 165, 124, 225, 25, 185, 61, 150, 127, 216, 204, 42, 246, 97, 166, 190, 234, 103, 244, 31, 249, 15, 219, 191, 153, 218, 181], + "modeOfOperation": "ofb", + "plaintext": [ + [251, 33, 228, 163, 129, 194, 107, 152, 6, 129, 45, 102, 187, 36, 115, 10], + [39, 91, 179, 20, 67, 245, 0, 67, 80, 171, 14, 77, 225, 181, 202, 44], + [25, 28, 69, 244, 76, 125, 196, 165, 38, 125, 217, 118, 129, 68, 24, 167], + [220, 28, 162, 228, 251, 144, 207, 58, 82, 220, 146, 142, 246, 101, 153, 105], + [209, 143, 103, 28, 71, 210, 123, 252, 144, 213, 26, 209, 15, 116, 236, 30], + [183, 105, 160, 43, 2, 86, 125, 41, 178, 100, 140, 226, 206, 5, 91, 34] + ], + "segmentSize": null + }, + { + "encrypted": [ + [102, 120, 144, 111, 163, 142, 232, 181, 54, 78, 254, 80, 28, 32, 114, 95], + [56, 110, 83, 76, 223, 54, 181, 42, 109, 188, 86, 183, 62, 142, 65, 28], + [184, 222, 9, 157, 232, 189, 205, 243, 128, 133, 64, 193, 74, 150, 66, 167], + [9, 232, 142, 196, 12, 188, 149, 54, 20, 225, 255, 139, 59, 47, 247, 129], + [138, 169, 136, 252, 109, 150, 171, 138, 130, 59, 247, 106, 47, 180, 54, 169], + [115, 233, 116, 89, 85, 136, 77, 64, 142, 71, 217, 167, 247, 245, 92, 17], + [214, 84, 51, 150, 41, 156, 120, 124, 107, 149, 237, 236, 3, 39, 149, 237] + ], + "iv": [96, 57, 241, 100, 243, 255, 2, 12, 30, 56, 55, 170, 124, 237, 90, 140], + "key": [47, 14, 147, 27, 148, 236, 77, 194, 211, 238, 107, 222, 110, 216, 41, 66, 180, 213, 55, 1, 248, 17, 194, 183, 68, 151, 113, 132, 42, 35, 76, 149], + "modeOfOperation": "ofb", + "plaintext": [ + [74, 223, 46, 118, 107, 31, 82, 89, 126, 187, 175, 214, 132, 245, 53, 41], + [23, 197, 37, 188, 106, 229, 14, 246, 252, 28, 199, 170, 174, 94, 132, 65], + [205, 166, 65, 70, 112, 52, 208, 201, 181, 104, 132, 70, 106, 43, 153, 125], + [164, 202, 118, 62, 72, 28, 255, 228, 228, 160, 145, 141, 246, 64, 138, 46], + [232, 58, 5, 35, 218, 242, 65, 118, 230, 25, 3, 50, 244, 111, 252, 142], + [249, 113, 129, 84, 252, 47, 76, 51, 105, 183, 250, 95, 243, 19, 240, 118], + [105, 242, 77, 244, 109, 226, 65, 187, 63, 11, 226, 214, 178, 210, 206, 201] + ], + "segmentSize": null + } +] diff --git a/node_modules/aes-js/test/test.html b/node_modules/aes-js/test/test.html new file mode 100644 index 0000000..348d45a --- /dev/null +++ b/node_modules/aes-js/test/test.html @@ -0,0 +1,104 @@ + + +
+ + + + diff --git a/node_modules/bech32/LICENSE b/node_modules/bech32/LICENSE new file mode 100644 index 0000000..8ae7d39 --- /dev/null +++ b/node_modules/bech32/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2017 Pieter Wuille +Copyright (c) 2018 bitcoinjs contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/bech32/README.md b/node_modules/bech32/README.md new file mode 100644 index 0000000..dce2696 --- /dev/null +++ b/node_modules/bech32/README.md @@ -0,0 +1,34 @@ +# bech32 +[![build status](https://secure.travis-ci.org/bitcoinjs/bech32.png)](http://travis-ci.org/bitcoinjs/bech32) +[![Version](http://img.shields.io/npm/v/bech32.svg)](https://www.npmjs.org/package/bech32) + +A [BIP173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) compatible Bech32 encoding/decoding library. + + +## Example +``` javascript +let bech32 = require('bech32') + +bech32.decode('abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw') +// => { +// prefix: 'abcdef', +// words: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31] +// } + +let words = bech32.toWords(Buffer.from('foobar', 'utf8')) +bech32.encode('foo', words) +// => 'foo1vehk7cnpwgry9h96' +``` + + +### Advanced +BIP173 enforces a limitation of 90 characters, if extend the `LIMIT` parameter beyond this, be aware that the [effectiveness of checksum decreases as the length increases](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#checksum-design). + +It is highly recommended **NOT** exceed 1023 characters, as the module could only guarantee detecting 1 error. + + +## Credits +- [Peter Wuille](https://github.com/sipa/bech32) for the reference JavaScript implementation, and for authoring the Bech32 [BIP173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki). + + +## License [MIT](LICENSE) diff --git a/node_modules/bech32/index.d.ts b/node_modules/bech32/index.d.ts new file mode 100644 index 0000000..df604d9 --- /dev/null +++ b/node_modules/bech32/index.d.ts @@ -0,0 +1,79 @@ +/** + * Takes a bech32 encoded string and returns the human readable part ("prefix") and + * a list of character positions in the bech32 alphabet ("words"). + * + * @throws Throws on error + */ +export function decode(str: string, limit?: number): { prefix: string, words: number[] }; + +/** + * Takes a bech32 encoded string and returns the human readable part ("prefix") and + * a list of character positions in the bech32 alphabet ("words"). + * + * @returns undefined when there was an error + */ +export function decodeUnsafe(str: string, limit?: number): ({ prefix: string, words: number[] }) | undefined; + +/** + * Takes a human readable part ("prefix") and a list of character positions in the + * bech32 alphabet ("words") and returns a bech32 encoded string. + */ +export function encode(prefix: string, words: number[], limit?: number): string; + +/** + * Converts a list of character positions in the bech32 alphabet ("words") + * to binary data. + * + * The returned data can be used to construct an Uint8Array or Buffer like this: + * + * ```ts + * const a = new Uint8Array(fromWords(words)); + * const b = Buffer.from(fromWords(words)); + * ``` + * + * @throws Throws on error + */ +export function fromWords(words: number[]): number[]; + +/** + * Converts a list of character positions in the bech32 alphabet ("words") + * to binary data. + * + * The returned data can be used to construct an Uint8Array or Buffer like this: + * + * ```ts + * const a = new Uint8Array(fromWordsUnsafe(words)); + * const b = Buffer.from(fromWordsUnsafe(words)); + * ``` + * + * @returns undefined when there was an error + */ +export function fromWordsUnsafe(words: number[]): number[] | undefined; + +/** + * Converts binary data to a list of character positions in the bech32 alphabet ("words"). + * + * Uint8Arrays and Buffers can be passed as an argument directly: + * + * ```ts + * const a = toWords(new Uint8Array([0x00, 0x11, 0x22])); + * const b = toWords(Buffer.from("001122", "hex")); + * ``` + * + * @throws Throws on error + */ +export function toWords(bytes: ArrayLike): number[]; + +/** + * Converts binary data to a list of character positions in the bech32 alphabet ("words"). + * + * Uint8Arrays and Buffers can be passed as an argument directly: + * + * ```ts + * const a = toWordsUnsafe(new Uint8Array([0x00, 0x11, 0x22])); + * const b = toWordsUnsafe(Buffer.from("001122", "hex")); + * ``` + * + * @returns undefined when there was an error + */ +export function toWordsUnsafe(bytes: ArrayLike): number[] | undefined; diff --git a/node_modules/bech32/index.js b/node_modules/bech32/index.js new file mode 100644 index 0000000..9b28fec --- /dev/null +++ b/node_modules/bech32/index.js @@ -0,0 +1,182 @@ +'use strict' +var ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l' + +// pre-compute lookup table +var ALPHABET_MAP = {} +for (var z = 0; z < ALPHABET.length; z++) { + var x = ALPHABET.charAt(z) + + if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous') + ALPHABET_MAP[x] = z +} + +function polymodStep (pre) { + var b = pre >> 25 + return ((pre & 0x1FFFFFF) << 5) ^ + (-((b >> 0) & 1) & 0x3b6a57b2) ^ + (-((b >> 1) & 1) & 0x26508e6d) ^ + (-((b >> 2) & 1) & 0x1ea119fa) ^ + (-((b >> 3) & 1) & 0x3d4233dd) ^ + (-((b >> 4) & 1) & 0x2a1462b3) +} + +function prefixChk (prefix) { + var chk = 1 + for (var i = 0; i < prefix.length; ++i) { + var c = prefix.charCodeAt(i) + if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')' + + chk = polymodStep(chk) ^ (c >> 5) + } + chk = polymodStep(chk) + + for (i = 0; i < prefix.length; ++i) { + var v = prefix.charCodeAt(i) + chk = polymodStep(chk) ^ (v & 0x1f) + } + return chk +} + +function encode (prefix, words, LIMIT) { + LIMIT = LIMIT || 90 + if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit') + + prefix = prefix.toLowerCase() + + // determine chk mod + var chk = prefixChk(prefix) + if (typeof chk === 'string') throw new Error(chk) + + var result = prefix + '1' + for (var i = 0; i < words.length; ++i) { + var x = words[i] + if ((x >> 5) !== 0) throw new Error('Non 5-bit word') + + chk = polymodStep(chk) ^ x + result += ALPHABET.charAt(x) + } + + for (i = 0; i < 6; ++i) { + chk = polymodStep(chk) + } + chk ^= 1 + + for (i = 0; i < 6; ++i) { + var v = (chk >> ((5 - i) * 5)) & 0x1f + result += ALPHABET.charAt(v) + } + + return result +} + +function __decode (str, LIMIT) { + LIMIT = LIMIT || 90 + if (str.length < 8) return str + ' too short' + if (str.length > LIMIT) return 'Exceeds length limit' + + // don't allow mixed case + var lowered = str.toLowerCase() + var uppered = str.toUpperCase() + if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str + str = lowered + + var split = str.lastIndexOf('1') + if (split === -1) return 'No separator character for ' + str + if (split === 0) return 'Missing prefix for ' + str + + var prefix = str.slice(0, split) + var wordChars = str.slice(split + 1) + if (wordChars.length < 6) return 'Data too short' + + var chk = prefixChk(prefix) + if (typeof chk === 'string') return chk + + var words = [] + for (var i = 0; i < wordChars.length; ++i) { + var c = wordChars.charAt(i) + var v = ALPHABET_MAP[c] + if (v === undefined) return 'Unknown character ' + c + chk = polymodStep(chk) ^ v + + // not in the checksum? + if (i + 6 >= wordChars.length) continue + words.push(v) + } + + if (chk !== 1) return 'Invalid checksum for ' + str + return { prefix: prefix, words: words } +} + +function decodeUnsafe () { + var res = __decode.apply(null, arguments) + if (typeof res === 'object') return res +} + +function decode (str) { + var res = __decode.apply(null, arguments) + if (typeof res === 'object') return res + + throw new Error(res) +} + +function convert (data, inBits, outBits, pad) { + var value = 0 + var bits = 0 + var maxV = (1 << outBits) - 1 + + var result = [] + for (var i = 0; i < data.length; ++i) { + value = (value << inBits) | data[i] + bits += inBits + + while (bits >= outBits) { + bits -= outBits + result.push((value >> bits) & maxV) + } + } + + if (pad) { + if (bits > 0) { + result.push((value << (outBits - bits)) & maxV) + } + } else { + if (bits >= inBits) return 'Excess padding' + if ((value << (outBits - bits)) & maxV) return 'Non-zero padding' + } + + return result +} + +function toWordsUnsafe (bytes) { + var res = convert(bytes, 8, 5, true) + if (Array.isArray(res)) return res +} + +function toWords (bytes) { + var res = convert(bytes, 8, 5, true) + if (Array.isArray(res)) return res + + throw new Error(res) +} + +function fromWordsUnsafe (words) { + var res = convert(words, 5, 8, false) + if (Array.isArray(res)) return res +} + +function fromWords (words) { + var res = convert(words, 5, 8, false) + if (Array.isArray(res)) return res + + throw new Error(res) +} + +module.exports = { + decodeUnsafe: decodeUnsafe, + decode: decode, + encode: encode, + toWordsUnsafe: toWordsUnsafe, + toWords: toWords, + fromWordsUnsafe: fromWordsUnsafe, + fromWords: fromWords +} diff --git a/node_modules/bech32/package.json b/node_modules/bech32/package.json new file mode 100644 index 0000000..61cb681 --- /dev/null +++ b/node_modules/bech32/package.json @@ -0,0 +1,39 @@ +{ + "name": "bech32", + "version": "1.1.4", + "description": "Bech32 encoding / decoding", + "keywords": [ + "base32", + "bech32", + "bitcoin", + "crypto", + "crytography", + "decode", + "decoding", + "encode", + "encoding" + ], + "main": "index.js", + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts" + ], + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "nyc": "^15.0.0", + "standard": "^14.3.3", + "tap-dot": "*", + "tape": "^4.13.2" + }, + "repository": { + "url": "http://github.com/bitcoinjs/bech32", + "type": "git" + }, + "scripts": { + "coverage": "nyc --check-coverage --branches 90 --functions 90 tape test/*.js", + "standard": "standard", + "test": "tape test/*.js | tap-dot" + } +} diff --git a/node_modules/bn.js/LICENSE b/node_modules/bn.js/LICENSE new file mode 100644 index 0000000..c328f04 --- /dev/null +++ b/node_modules/bn.js/LICENSE @@ -0,0 +1,19 @@ +Copyright Fedor Indutny, 2015. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/bn.js/README.md b/node_modules/bn.js/README.md new file mode 100644 index 0000000..aecc3ba --- /dev/null +++ b/node_modules/bn.js/README.md @@ -0,0 +1,200 @@ +# bn.js + +> BigNum in pure javascript + +[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) + +## Install +`npm install --save bn.js` + +## Usage + +```js +const BN = require('bn.js'); + +var a = new BN('dead', 16); +var b = new BN('101010', 2); + +var res = a.add(b); +console.log(res.toString(10)); // 57047 +``` + +**Note**: decimals are not supported in this library. + +## Notation + +### Prefixes + +There are several prefixes to instructions that affect the way the work. Here +is the list of them in the order of appearance in the function name: + +* `i` - perform operation in-place, storing the result in the host object (on + which the method was invoked). Might be used to avoid number allocation costs +* `u` - unsigned, ignore the sign of operands when performing operation, or + always return positive value. Second case applies to reduction operations + like `mod()`. In such cases if the result will be negative - modulo will be + added to the result to make it positive + +### Postfixes + +The only available postfix at the moment is: + +* `n` - which means that the argument of the function must be a plain JavaScript + Number. Decimals are not supported. + +### Examples + +* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` +* `a.umod(b)` - reduce `a` modulo `b`, returning positive value +* `a.iushln(13)` - shift bits of `a` left by 13 + +## Instructions + +Prefixes/postfixes are put in parens at the of the line. `endian` - could be +either `le` (little-endian) or `be` (big-endian). + +### Utilities + +* `a.clone()` - clone number +* `a.toString(base, length)` - convert to base-string and pad with zeroes +* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) +* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) +* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero + pad to length, throwing if already exceeding +* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, + which must behave like an `Array` +* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available). For + compatibility with browserify and similar tools, use this instead: + `a.toArrayLike(Buffer, endian, length)` +* `a.bitLength()` - get number of bits occupied +* `a.zeroBits()` - return number of less-significant consequent zero bits + (example: `1010000` has 4 zero bits) +* `a.byteLength()` - return number of bytes occupied +* `a.isNeg()` - true if the number is negative +* `a.isEven()` - no comments +* `a.isOdd()` - no comments +* `a.isZero()` - no comments +* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) + depending on the comparison result (`ucmp`, `cmpn`) +* `a.lt(b)` - `a` less than `b` (`n`) +* `a.lte(b)` - `a` less than or equals `b` (`n`) +* `a.gt(b)` - `a` greater than `b` (`n`) +* `a.gte(b)` - `a` greater than or equals `b` (`n`) +* `a.eq(b)` - `a` equals `b` (`n`) +* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width +* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width +* `BN.isBN(object)` - returns true if the supplied `object` is a BN.js instance + +### Arithmetics + +* `a.neg()` - negate sign (`i`) +* `a.abs()` - absolute value (`i`) +* `a.add(b)` - addition (`i`, `n`, `in`) +* `a.sub(b)` - subtraction (`i`, `n`, `in`) +* `a.mul(b)` - multiply (`i`, `n`, `in`) +* `a.sqr()` - square (`i`) +* `a.pow(b)` - raise `a` to the power of `b` +* `a.div(b)` - divide (`divn`, `idivn`) +* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) +* `a.divRound(b)` - rounded division + +### Bit operations + +* `a.or(b)` - or (`i`, `u`, `iu`) +* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced + with `andn` in future) +* `a.xor(b)` - xor (`i`, `u`, `iu`) +* `a.setn(b)` - set specified bit to `1` +* `a.shln(b)` - shift left (`i`, `u`, `iu`) +* `a.shrn(b)` - shift right (`i`, `u`, `iu`) +* `a.testn(b)` - test if specified bit is set +* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) +* `a.bincn(b)` - add `1 << b` to the number +* `a.notn(w)` - not (for the width specified by `w`) (`i`) + +### Reduction + +* `a.gcd(b)` - GCD +* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) +* `a.invm(b)` - inverse `a` modulo `b` + +## Fast reduction + +When doing lots of reductions using the same modulo, it might be beneficial to +use some tricks: like [Montgomery multiplication][0], or using special algorithm +for [Mersenne Prime][1]. + +### Reduction context + +To enable this tricks one should create a reduction context: + +```js +var red = BN.red(num); +``` +where `num` is just a BN instance. + +Or: + +```js +var red = BN.red(primeName); +``` + +Where `primeName` is either of these [Mersenne Primes][1]: + +* `'k256'` +* `'p224'` +* `'p192'` +* `'p25519'` + +Or: + +```js +var red = BN.mont(num); +``` + +To reduce numbers with [Montgomery trick][0]. `.mont()` is generally faster than +`.red(num)`, but slower than `BN.red(primeName)`. + +### Converting numbers + +Before performing anything in reduction context - numbers should be converted +to it. Usually, this means that one should: + +* Convert inputs to reducted ones +* Operate on them in reduction context +* Convert outputs back from the reduction context + +Here is how one may convert numbers to `red`: + +```js +var redA = a.toRed(red); +``` +Where `red` is a reduction context created using instructions above + +Here is how to convert them back: + +```js +var a = redA.fromRed(); +``` + +### Red instructions + +Most of the instructions from the very start of this readme have their +counterparts in red context: + +* `a.redAdd(b)`, `a.redIAdd(b)` +* `a.redSub(b)`, `a.redISub(b)` +* `a.redShl(num)` +* `a.redMul(b)`, `a.redIMul(b)` +* `a.redSqr()`, `a.redISqr()` +* `a.redSqrt()` - square root modulo reduction context's prime +* `a.redInvm()` - modular inverse of the number +* `a.redNeg()` +* `a.redPow(b)` - modular exponentiation + +## LICENSE + +This software is licensed under the MIT License. + +[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication +[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/node_modules/bn.js/lib/bn.js b/node_modules/bn.js/lib/bn.js new file mode 100644 index 0000000..3a4371e --- /dev/null +++ b/node_modules/bn.js/lib/bn.js @@ -0,0 +1,3446 @@ +(function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') { + Buffer = window.Buffer; + } else { + Buffer = require('buffer').Buffer; + } + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + this.negative = 1; + } + + if (start < number.length) { + if (base === 16) { + this._parseHex(number, start, endian); + } else { + this._parseBase(number, base, start); + if (endian === 'le') { + this._initArray(this.toArray(), base, endian); + } + } + } + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; + + function parseHex4Bits (string, index) { + var c = string.charCodeAt(index); + // 'A' - 'F' + if (c >= 65 && c <= 70) { + return c - 55; + // 'a' - 'f' + } else if (c >= 97 && c <= 102) { + return c - 87; + // '0' - '9' + } else { + return (c - 48) & 0xf; + } + } + + function parseHexByte (string, lowerBound, index) { + var r = parseHex4Bits(string, index); + if (index - 1 >= lowerBound) { + r |= parseHex4Bits(string, index - 1) << 4; + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start, endian) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + // 24-bits chunks + var off = 0; + var j = 0; + + var w; + if (endian === 'be') { + for (i = number.length - 1; i >= start; i -= 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } else { + var parseLength = number.length - start; + for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } + + this.strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; + + // '0' - '9' + } else { + r += c; + } + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + this.strip(); + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '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' + ]; + + var groupSizes = [ + 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 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); + + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } + + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[i] = b; + } + + for (; i < reqLength; i++) { + res[i] = 0; + } + } + + return res; + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this.strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this.strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this.strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this.strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this.strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this.strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out.strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out.strip(); + } + + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this.strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this.strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this.strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this.strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this.strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this.strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return acc; + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + return this.strip(); + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this.strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + if (r.strip !== undefined) { + // r is BN v4 instance + r.strip(); + } else { + // r is BN v5 instance + r._strip(); + } + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1).toRed(this); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(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); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; +})(typeof module === 'undefined' || module, this); diff --git a/node_modules/bn.js/package.json b/node_modules/bn.js/package.json new file mode 100644 index 0000000..098b805 --- /dev/null +++ b/node_modules/bn.js/package.json @@ -0,0 +1,36 @@ +{ + "name": "bn.js", + "version": "4.12.0", + "description": "Big number implementation in pure javascript", + "main": "lib/bn.js", + "scripts": { + "lint": "semistandard", + "unit": "mocha --reporter=spec test/*-test.js", + "test": "npm run lint && npm run unit" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/bn.js" + }, + "keywords": [ + "BN", + "BigNum", + "Big number", + "Modulo", + "Montgomery" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/bn.js/issues" + }, + "homepage": "https://github.com/indutny/bn.js", + "browser": { + "buffer": false + }, + "devDependencies": { + "istanbul": "^0.3.5", + "mocha": "^2.1.0", + "semistandard": "^7.0.4" + } +} diff --git a/node_modules/brorand/.npmignore b/node_modules/brorand/.npmignore new file mode 100644 index 0000000..1ca9571 --- /dev/null +++ b/node_modules/brorand/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/node_modules/brorand/README.md b/node_modules/brorand/README.md new file mode 100644 index 0000000..f80437d --- /dev/null +++ b/node_modules/brorand/README.md @@ -0,0 +1,26 @@ +# Brorand + +#### LICENSE + +This software is licensed under the MIT License. + +Copyright Fedor Indutny, 2014. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/brorand/index.js b/node_modules/brorand/index.js new file mode 100644 index 0000000..9a0fff4 --- /dev/null +++ b/node_modules/brorand/index.js @@ -0,0 +1,65 @@ +var r; + +module.exports = function rand(len) { + if (!r) + r = new Rand(null); + + return r.generate(len); +}; + +function Rand(rand) { + this.rand = rand; +} +module.exports.Rand = Rand; + +Rand.prototype.generate = function generate(len) { + return this._rand(len); +}; + +// Emulate crypto API using randy +Rand.prototype._rand = function _rand(n) { + if (this.rand.getBytes) + return this.rand.getBytes(n); + + var res = new Uint8Array(n); + for (var i = 0; i < res.length; i++) + res[i] = this.rand.getByte(); + return res; +}; + +if (typeof self === 'object') { + if (self.crypto && self.crypto.getRandomValues) { + // Modern browsers + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.crypto.getRandomValues(arr); + return arr; + }; + } else if (self.msCrypto && self.msCrypto.getRandomValues) { + // IE + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.msCrypto.getRandomValues(arr); + return arr; + }; + + // Safari's WebWorkers do not have `crypto` + } else if (typeof window === 'object') { + // Old junk + Rand.prototype._rand = function() { + throw new Error('Not implemented yet'); + }; + } +} else { + // Node.js or Web worker with no crypto support + try { + var crypto = require('crypto'); + if (typeof crypto.randomBytes !== 'function') + throw new Error('Not supported'); + + Rand.prototype._rand = function _rand(n) { + return crypto.randomBytes(n); + }; + } catch (e) { + } +} diff --git a/node_modules/brorand/package.json b/node_modules/brorand/package.json new file mode 100644 index 0000000..f213c9d --- /dev/null +++ b/node_modules/brorand/package.json @@ -0,0 +1,31 @@ +{ + "name": "brorand", + "version": "1.1.0", + "description": "Random number generator for browsers and node.js", + "main": "index.js", + "scripts": { + "test": "mocha --reporter=spec test/**/*-test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/brorand" + }, + "keywords": [ + "Random", + "RNG", + "browser", + "crypto" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/brorand/issues" + }, + "homepage": "https://github.com/indutny/brorand", + "devDependencies": { + "mocha": "^2.0.1" + }, + "browser": { + "crypto": false + } +} diff --git a/node_modules/brorand/test/api-test.js b/node_modules/brorand/test/api-test.js new file mode 100644 index 0000000..b6c876d --- /dev/null +++ b/node_modules/brorand/test/api-test.js @@ -0,0 +1,8 @@ +var brorand = require('../'); +var assert = require('assert'); + +describe('Brorand', function() { + it('should generate random numbers', function() { + assert.equal(brorand(100).length, 100); + }); +}); diff --git a/node_modules/buffer-alloc-unsafe/index.js b/node_modules/buffer-alloc-unsafe/index.js new file mode 100644 index 0000000..0bd335f --- /dev/null +++ b/node_modules/buffer-alloc-unsafe/index.js @@ -0,0 +1,17 @@ +function allocUnsafe (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } + + if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } + + if (Buffer.allocUnsafe) { + return Buffer.allocUnsafe(size) + } else { + return new Buffer(size) + } +} + +module.exports = allocUnsafe diff --git a/node_modules/buffer-alloc-unsafe/package.json b/node_modules/buffer-alloc-unsafe/package.json new file mode 100644 index 0000000..c2ab904 --- /dev/null +++ b/node_modules/buffer-alloc-unsafe/package.json @@ -0,0 +1,24 @@ +{ + "name": "buffer-alloc-unsafe", + "version": "1.1.0", + "license": "MIT", + "repository": "LinusU/buffer-alloc-unsafe", + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && node test" + }, + "devDependencies": { + "standard": "^7.1.2" + }, + "keywords": [ + "allocUnsafe", + "allocate", + "buffer allocUnsafe", + "buffer unsafe allocate", + "buffer", + "ponyfill", + "unsafe allocate" + ] +} diff --git a/node_modules/buffer-alloc-unsafe/readme.md b/node_modules/buffer-alloc-unsafe/readme.md new file mode 100644 index 0000000..8725ecf --- /dev/null +++ b/node_modules/buffer-alloc-unsafe/readme.md @@ -0,0 +1,46 @@ +# Buffer Alloc Unsafe + +A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`. + +Works as Node.js: `v7.0.0`
+Works on Node.js: `v0.10.0` + +## Installation + +```sh +npm install --save buffer-alloc-unsafe +``` + +## Usage + +```js +const allocUnsafe = require('buffer-alloc-unsafe') + +console.log(allocUnsafe(10)) +//=> + +console.log(allocUnsafe(10)) +//=> + +console.log(allocUnsafe(10)) +//=> + +allocUnsafe(-10) +//=> RangeError: "size" argument must not be negative +``` + +## API + +### allocUnsafe(size) + +- `size` <Integer> The desired length of the new `Buffer` + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must be +less than or equal to the value of `buffer.kMaxLength` and greater than or equal +to zero. Otherwise, a `RangeError` is thrown. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill` +- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from` diff --git a/node_modules/buffer-alloc/index.js b/node_modules/buffer-alloc/index.js new file mode 100644 index 0000000..fe65860 --- /dev/null +++ b/node_modules/buffer-alloc/index.js @@ -0,0 +1,32 @@ +var bufferFill = require('buffer-fill') +var allocUnsafe = require('buffer-alloc-unsafe') + +module.exports = function alloc (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } + + if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } + + if (Buffer.alloc) { + return Buffer.alloc(size, fill, encoding) + } + + var buffer = allocUnsafe(size) + + if (size === 0) { + return buffer + } + + if (fill === undefined) { + return bufferFill(buffer, 0) + } + + if (typeof encoding !== 'string') { + encoding = undefined + } + + return bufferFill(buffer, fill, encoding) +} diff --git a/node_modules/buffer-alloc/package.json b/node_modules/buffer-alloc/package.json new file mode 100644 index 0000000..a8a3c3a --- /dev/null +++ b/node_modules/buffer-alloc/package.json @@ -0,0 +1,26 @@ +{ + "name": "buffer-alloc", + "version": "1.2.0", + "license": "MIT", + "repository": "LinusU/buffer-alloc", + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && node test" + }, + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + }, + "devDependencies": { + "standard": "^7.1.2" + }, + "keywords": [ + "alloc", + "allocate", + "buffer alloc", + "buffer allocate", + "buffer" + ] +} diff --git a/node_modules/buffer-alloc/readme.md b/node_modules/buffer-alloc/readme.md new file mode 100644 index 0000000..80c7d7b --- /dev/null +++ b/node_modules/buffer-alloc/readme.md @@ -0,0 +1,43 @@ +# Buffer Alloc + +A [ponyfill](https://ponyfill.com) for `Buffer.alloc`. + +Works as Node.js: `v7.0.0`
+Works on Node.js: `v0.10.0` + +## Installation + +```sh +npm install --save buffer-alloc +``` + +## Usage + +```js +const alloc = require('buffer-alloc') + +console.log(alloc(4)) +//=> + +console.log(alloc(6, 0x41)) +//=> + +console.log(alloc(10, 'linus', 'utf8')) +//=> +``` + +## API + +### alloc(size[, fill[, encoding]]) + +- `size` <Integer> The desired length of the new `Buffer` +- `fill` <String> | <Buffer> | <Integer> A value to pre-fill the new `Buffer` with. **Default:** `0` +- `encoding` <String> If `fill` is a string, this is its encoding. **Default:** `'utf8'` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled. + +## See also + +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` +- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill` +- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from` diff --git a/node_modules/buffer-fill/index.js b/node_modules/buffer-fill/index.js new file mode 100644 index 0000000..428a9e1 --- /dev/null +++ b/node_modules/buffer-fill/index.js @@ -0,0 +1,113 @@ +/* Node.js 6.4.0 and up has full support */ +var hasFullSupport = (function () { + try { + if (!Buffer.isEncoding('latin1')) { + return false + } + + var buf = Buffer.alloc ? Buffer.alloc(4) : new Buffer(4) + + buf.fill('ab', 'ucs2') + + return (buf.toString('hex') === '61006200') + } catch (_) { + return false + } +}()) + +function isSingleByte (val) { + return (val.length === 1 && val.charCodeAt(0) < 256) +} + +function fillWithNumber (buffer, val, start, end) { + if (start < 0 || end > buffer.length) { + throw new RangeError('Out of range index') + } + + start = start >>> 0 + end = end === undefined ? buffer.length : end >>> 0 + + if (end > start) { + buffer.fill(val, start, end) + } + + return buffer +} + +function fillWithBuffer (buffer, val, start, end) { + if (start < 0 || end > buffer.length) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return buffer + } + + start = start >>> 0 + end = end === undefined ? buffer.length : end >>> 0 + + var pos = start + var len = val.length + while (pos <= (end - len)) { + val.copy(buffer, pos) + pos += len + } + + if (pos !== end) { + val.copy(buffer, pos, 0, end - pos) + } + + return buffer +} + +function fill (buffer, val, start, end, encoding) { + if (hasFullSupport) { + return buffer.fill(val, start, end, encoding) + } + + if (typeof val === 'number') { + return fillWithNumber(buffer, val, start, end) + } + + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = buffer.length + } else if (typeof end === 'string') { + encoding = end + end = buffer.length + } + + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + + if (encoding === 'latin1') { + encoding = 'binary' + } + + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + if (val === '') { + return fillWithNumber(buffer, 0, start, end) + } + + if (isSingleByte(val)) { + return fillWithNumber(buffer, val.charCodeAt(0), start, end) + } + + val = new Buffer(val, encoding) + } + + if (Buffer.isBuffer(val)) { + return fillWithBuffer(buffer, val, start, end) + } + + // Other values (e.g. undefined, boolean, object) results in zero-fill + return fillWithNumber(buffer, 0, start, end) +} + +module.exports = fill diff --git a/node_modules/buffer-fill/package.json b/node_modules/buffer-fill/package.json new file mode 100644 index 0000000..b8f67c5 --- /dev/null +++ b/node_modules/buffer-fill/package.json @@ -0,0 +1,16 @@ +{ + "name": "buffer-fill", + "version": "1.0.0", + "license": "MIT", + "repository": "LinusU/buffer-fill", + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && node test" + }, + "devDependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "standard": "^7.1.2" + } +} diff --git a/node_modules/buffer-fill/readme.md b/node_modules/buffer-fill/readme.md new file mode 100644 index 0000000..ac30738 --- /dev/null +++ b/node_modules/buffer-fill/readme.md @@ -0,0 +1,54 @@ +# Buffer Fill + +A [ponyfill](https://ponyfill.com) for `Buffer.fill`. + +Works as Node.js: `v6.4.0`
+Works on Node.js: `v0.10.0` + +## Installation + +```sh +npm install --save buffer-fill +``` + +## Usage + +```js +const fill = require('buffer-fill') +const buf = Buffer.allocUnsafe(5) + +console.log(buf.fill(8)) +//=> + +console.log(buf.fill(9, 2, 4)) +//=> + +console.log(buf.fill('linus', 'latin1')) +//=> + +console.log(buf.fill('\u0222')) +//=> +``` + +## API + +### fill(buf, value[, offset[, end]][, encoding]) + +- `value` <String> | <Buffer> | <Integer> The value to fill `buf` with +- `offset` <Integer> Where to start filling `buf`. **Default:** `0` +- `end` <Integer> Where to stop filling `buf` (not inclusive). **Default:** `buf.length` +- `encoding` <String> If `value` is a string, this is its encoding. **Default:** `'utf8'` +- Return: <Buffer> A reference to `buf` + +Fills `buf` with the specified `value`. If the `offset` and `end` are not given, +the entire `buf` will be filled. This is meant to be a small simplification to +allow the creation and filling of a `Buffer` to be done on a single line. + +If the final write of a `fill()` operation falls on a multi-byte character, then +only the first bytes of that character that fit into `buf` are written. + +## See also + +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from` diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE new file mode 100644 index 0000000..1a9820e --- /dev/null +++ b/node_modules/debug/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md new file mode 100644 index 0000000..5ea4cd2 --- /dev/null +++ b/node_modules/debug/README.md @@ -0,0 +1,478 @@ +# debug +[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + - Josh Junon + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json new file mode 100644 index 0000000..cb7efa8 --- /dev/null +++ b/node_modules/debug/package.json @@ -0,0 +1,59 @@ +{ + "name": "debug", + "version": "4.3.3", + "repository": { + "type": "git", + "url": "git://github.com/debug-js/debug.git" + }, + "description": "Lightweight debugging utility for Node.js and the browser", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "Josh Junon ", + "contributors": [ + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "istanbul cover _mocha -- test.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "ms": "2.1.2" + }, + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "istanbul": "^0.4.5", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "xo": "^0.23.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + } +} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js new file mode 100644 index 0000000..cd0fc35 --- /dev/null +++ b/node_modules/debug/src/browser.js @@ -0,0 +1,269 @@ +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js new file mode 100644 index 0000000..6d571d2 --- /dev/null +++ b/node_modules/debug/src/common.js @@ -0,0 +1,274 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js new file mode 100644 index 0000000..bf4c57f --- /dev/null +++ b/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js new file mode 100644 index 0000000..79bc085 --- /dev/null +++ b/node_modules/debug/src/node.js @@ -0,0 +1,263 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/node_modules/elliptic/README.md b/node_modules/elliptic/README.md new file mode 100644 index 0000000..96219e5 --- /dev/null +++ b/node_modules/elliptic/README.md @@ -0,0 +1,238 @@ +# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master) [![Code Climate](https://codeclimate.com/github/indutny/elliptic/badges/gpa.svg)](https://codeclimate.com/github/indutny/elliptic) + +[![Saucelabs Test Status](https://saucelabs.com/browser-matrix/gh-indutny-elliptic.svg)](https://saucelabs.com/u/gh-indutny-elliptic) + +Fast elliptic-curve cryptography in a plain javascript implementation. + +NOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve +for your cryptography operations. + +## Incentive + +ECC is much slower than regular RSA cryptography, the JS implementations are +even more slower. + +## Benchmarks + +```bash +$ node benchmarks/index.js +Benchmarking: sign +elliptic#sign x 262 ops/sec ±0.51% (177 runs sampled) +eccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled) +------------------------ +Fastest is elliptic#sign +======================== +Benchmarking: verify +elliptic#verify x 113 ops/sec ±0.50% (166 runs sampled) +eccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled) +------------------------ +Fastest is elliptic#verify +======================== +Benchmarking: gen +elliptic#gen x 294 ops/sec ±0.43% (176 runs sampled) +eccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled) +------------------------ +Fastest is elliptic#gen +======================== +Benchmarking: ecdh +elliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled) +------------------------ +Fastest is elliptic#ecdh +======================== +``` + +## API + +### ECDSA + +```javascript +var EC = require('elliptic').ec; + +// Create and initialize EC context +// (better do it once and reuse it) +var ec = new EC('secp256k1'); + +// Generate keys +var key = ec.genKeyPair(); + +// Sign the message's hash (input must be an array, or a hex-string) +var msgHash = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; +var signature = key.sign(msgHash); + +// Export DER encoded signature in Array +var derSign = signature.toDER(); + +// Verify signature +console.log(key.verify(msgHash, derSign)); + +// CHECK WITH NO PRIVATE KEY + +var pubPoint = key.getPublic(); +var x = pubPoint.getX(); +var y = pubPoint.getY(); + +// Public Key MUST be either: +// 1) '04' + hex string of x + hex string of y; or +// 2) object with two hex string properties (x and y); or +// 3) object with two buffer properties (x and y) +var pub = pubPoint.encode('hex'); // case 1 +var pub = { x: x.toString('hex'), y: y.toString('hex') }; // case 2 +var pub = { x: x.toBuffer(), y: y.toBuffer() }; // case 3 +var pub = { x: x.toArrayLike(Buffer), y: y.toArrayLike(Buffer) }; // case 3 + +// Import public key +var key = ec.keyFromPublic(pub, 'hex'); + +// Signature MUST be either: +// 1) DER-encoded signature as hex-string; or +// 2) DER-encoded signature as buffer; or +// 3) object with two hex-string properties (r and s); or +// 4) object with two buffer properties (r and s) + +var signature = '3046022100...'; // case 1 +var signature = new Buffer('...'); // case 2 +var signature = { r: 'b1fc...', s: '9c42...' }; // case 3 + +// Verify signature +console.log(key.verify(msgHash, signature)); +``` + +### EdDSA + +```javascript +var EdDSA = require('elliptic').eddsa; + +// Create and initialize EdDSA context +// (better do it once and reuse it) +var ec = new EdDSA('ed25519'); + +// Create key pair from secret +var key = ec.keyFromSecret('693e3c...'); // hex string, array or Buffer + +// Sign the message's hash (input must be an array, or a hex-string) +var msgHash = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; +var signature = key.sign(msgHash).toHex(); + +// Verify signature +console.log(key.verify(msgHash, signature)); + +// CHECK WITH NO PRIVATE KEY + +// Import public key +var pub = '0a1af638...'; +var key = ec.keyFromPublic(pub, 'hex'); + +// Verify signature +var signature = '70bed1...'; +console.log(key.verify(msgHash, signature)); +``` + +### ECDH + +```javascript +var EC = require('elliptic').ec; +var ec = new EC('curve25519'); + +// Generate keys +var key1 = ec.genKeyPair(); +var key2 = ec.genKeyPair(); + +var shared1 = key1.derive(key2.getPublic()); +var shared2 = key2.derive(key1.getPublic()); + +console.log('Both shared secrets are BN instances'); +console.log(shared1.toString(16)); +console.log(shared2.toString(16)); +``` + +three and more members: +```javascript +var EC = require('elliptic').ec; +var ec = new EC('curve25519'); + +var A = ec.genKeyPair(); +var B = ec.genKeyPair(); +var C = ec.genKeyPair(); + +var AB = A.getPublic().mul(B.getPrivate()) +var BC = B.getPublic().mul(C.getPrivate()) +var CA = C.getPublic().mul(A.getPrivate()) + +var ABC = AB.mul(C.getPrivate()) +var BCA = BC.mul(A.getPrivate()) +var CAB = CA.mul(B.getPrivate()) + +console.log(ABC.getX().toString(16)) +console.log(BCA.getX().toString(16)) +console.log(CAB.getX().toString(16)) +``` + +NOTE: `.derive()` returns a [BN][1] instance. + +## Supported curves + +Elliptic.js support following curve types: + +* Short Weierstrass +* Montgomery +* Edwards +* Twisted Edwards + +Following curve 'presets' are embedded into the library: + +* `secp256k1` +* `p192` +* `p224` +* `p256` +* `p384` +* `p521` +* `curve25519` +* `ed25519` + +NOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead. + +### Implementation details + +ECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of +the curve operations are performed on non-affine coordinates (either projective +or extended), various windowing techniques are used for different cases. + +All operations are performed in reduction context using [bn.js][1], hashing is +provided by [hash.js][2] + +### Related projects + +* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both + browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for + node) + +#### LICENSE + +This software is licensed under the MIT License. + +Copyright Fedor Indutny, 2014. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +[0]: http://tools.ietf.org/html/rfc6979 +[1]: https://github.com/indutny/bn.js +[2]: https://github.com/indutny/hash.js +[3]: https://github.com/bitchan/eccrypto +[4]: https://github.com/wanderer/secp256k1-node diff --git a/node_modules/elliptic/lib/elliptic.js b/node_modules/elliptic/lib/elliptic.js new file mode 100644 index 0000000..dfe2fe7 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic.js @@ -0,0 +1,13 @@ +'use strict'; + +var elliptic = exports; + +elliptic.version = require('../package.json').version; +elliptic.utils = require('./elliptic/utils'); +elliptic.rand = require('brorand'); +elliptic.curve = require('./elliptic/curve'); +elliptic.curves = require('./elliptic/curves'); + +// Protocols +elliptic.ec = require('./elliptic/ec'); +elliptic.eddsa = require('./elliptic/eddsa'); diff --git a/node_modules/elliptic/lib/elliptic/curve/base.js b/node_modules/elliptic/lib/elliptic/curve/base.js new file mode 100644 index 0000000..8543fa8 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/curve/base.js @@ -0,0 +1,381 @@ +'use strict'; + +var BN = require('bn.js'); +var utils = require('../utils'); +var getNAF = utils.getNAF; +var getJSF = utils.getJSF; +var assert = utils.assert; + +function BaseCurve(type, conf) { + this.type = type; + this.p = new BN(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); + + // Useful for many curves + this.zero = new BN(0).toRed(this.red); + this.one = new BN(1).toRed(this.red); + this.two = new BN(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new BN(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + this._bitLength = this.n ? this.n.bitLength() : 0; + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } +} +module.exports = BaseCurve; + +BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1, this._bitLength); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + var j; + var nafW; + for (j = 0; j < naf.length; j += doubles.step) { + nafW = 0; + for (var l = j + doubles.step - 1; l >= j; l--) + nafW = (nafW << 1) + naf[l]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (j = 0; j < repr.length; j++) { + nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); +}; + +BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w, this._bitLength); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var l = 0; i >= 0 && naf[i] === 0; i--) + l++; + if (i >= 0) + l++; + acc = acc.dblp(l); + + if (i < 0) + break; + var z = naf[i]; + assert(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; +}; + +BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + var i; + var j; + var p; + for (i = 0; i < len; i++) { + p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength); + naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b], /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3, /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (j = 0; j < len; j++) { + var z = tmp[j]; + p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); +}; + +function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; +} +BaseCurve.BasePoint = BasePoint; + +BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); +}; + +BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); +}; + +BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); +}; + +BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); +}; + +BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)); +}; + +BasePoint.prototype.encode = function encode(enc, compact) { + return utils.encode(this._encode(compact), enc); +}; + +BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null, + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; +}; + +BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); +}; + +BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles, + }; +}; + +BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res, + }; +}; + +BasePoint.prototype._getBeta = function _getBeta() { + return null; +}; + +BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; +}; diff --git a/node_modules/elliptic/lib/elliptic/curve/edwards.js b/node_modules/elliptic/lib/elliptic/curve/edwards.js new file mode 100644 index 0000000..6e757c6 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/curve/edwards.js @@ -0,0 +1,435 @@ +'use strict'; + +var utils = require('../utils'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = require('./base'); + +var assert = utils.assert; + +function EdwardsCurve(conf) { + // NOTE: Important as we are creating point in Base.call() + this.twisted = (conf.a | 0) !== 1; + this.mOneA = this.twisted && (conf.a | 0) === -1; + this.extended = this.mOneA; + + Base.call(this, 'edwards', conf); + + this.a = new BN(conf.a, 16).umod(this.red.m); + this.a = this.a.toRed(this.red); + this.c = new BN(conf.c, 16).toRed(this.red); + this.c2 = this.c.redSqr(); + this.d = new BN(conf.d, 16).toRed(this.red); + this.dd = this.d.redAdd(this.d); + + assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); + this.oneC = (conf.c | 0) === 1; +} +inherits(EdwardsCurve, Base); +module.exports = EdwardsCurve; + +EdwardsCurve.prototype._mulA = function _mulA(num) { + if (this.mOneA) + return num.redNeg(); + else + return this.a.redMul(num); +}; + +EdwardsCurve.prototype._mulC = function _mulC(num) { + if (this.oneC) + return num; + else + return this.c.redMul(num); +}; + +// Just for compatibility with Short curve +EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { + return this.point(x, y, z, t); +}; + +EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var x2 = x.redSqr(); + var rhs = this.c2.redSub(this.a.redMul(x2)); + var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); + + var y2 = rhs.redMul(lhs.redInvm()); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { + y = new BN(y, 16); + if (!y.red) + y = y.toRed(this.red); + + // x^2 = (y^2 - c^2) / (c^2 d y^2 - a) + var y2 = y.redSqr(); + var lhs = y2.redSub(this.c2); + var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a); + var x2 = lhs.redMul(rhs.redInvm()); + + if (x2.cmp(this.zero) === 0) { + if (odd) + throw new Error('invalid point'); + else + return this.point(this.zero, y); + } + + var x = x2.redSqrt(); + if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + if (x.fromRed().isOdd() !== odd) + x = x.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.validate = function validate(point) { + if (point.isInfinity()) + return true; + + // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) + point.normalize(); + + var x2 = point.x.redSqr(); + var y2 = point.y.redSqr(); + var lhs = x2.redMul(this.a).redAdd(y2); + var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); + + return lhs.cmp(rhs) === 0; +}; + +function Point(curve, x, y, z, t) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && y === null && z === null) { + this.x = this.curve.zero; + this.y = this.curve.one; + this.z = this.curve.one; + this.t = this.curve.zero; + this.zOne = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = z ? new BN(z, 16) : this.curve.one; + this.t = t && new BN(t, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + if (this.t && !this.t.red) + this.t = this.t.toRed(this.curve.red); + this.zOne = this.z === this.curve.one; + + // Use extended coordinates + if (this.curve.extended && !this.t) { + this.t = this.x.redMul(this.y); + if (!this.zOne) + this.t = this.t.redMul(this.z.redInvm()); + } + } +} +inherits(Point, Base.BasePoint); + +EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +EdwardsCurve.prototype.point = function point(x, y, z, t) { + return new Point(this, x, y, z, t); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1], obj[2]); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.x.cmpn(0) === 0 && + (this.y.cmp(this.z) === 0 || + (this.zOne && this.y.cmp(this.curve.c) === 0)); +}; + +Point.prototype._extDbl = function _extDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #doubling-dbl-2008-hwcd + // 4M + 4S + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = 2 * Z1^2 + var c = this.z.redSqr(); + c = c.redIAdd(c); + // D = a * A + var d = this.curve._mulA(a); + // E = (X1 + Y1)^2 - A - B + var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); + // G = D + B + var g = d.redAdd(b); + // F = G - C + var f = g.redSub(c); + // H = D - B + var h = d.redSub(b); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projDbl = function _projDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #doubling-dbl-2008-bbjlp + // #doubling-dbl-2007-bl + // and others + // Generally 3M + 4S or 2M + 4S + + // B = (X1 + Y1)^2 + var b = this.x.redAdd(this.y).redSqr(); + // C = X1^2 + var c = this.x.redSqr(); + // D = Y1^2 + var d = this.y.redSqr(); + + var nx; + var ny; + var nz; + var e; + var h; + var j; + if (this.curve.twisted) { + // E = a * C + e = this.curve._mulA(c); + // F = E + D + var f = e.redAdd(d); + if (this.zOne) { + // X3 = (B - C - D) * (F - 2) + nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F^2 - 2 * F + nz = f.redSqr().redSub(f).redSub(f); + } else { + // H = Z1^2 + h = this.z.redSqr(); + // J = F - 2 * H + j = f.redSub(h).redISub(h); + // X3 = (B-C-D)*J + nx = b.redSub(c).redISub(d).redMul(j); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F * J + nz = f.redMul(j); + } + } else { + // E = C + D + e = c.redAdd(d); + // H = (c * Z1)^2 + h = this.curve._mulC(this.z).redSqr(); + // J = E - 2 * H + j = e.redSub(h).redSub(h); + // X3 = c * (B - E) * J + nx = this.curve._mulC(b.redISub(e)).redMul(j); + // Y3 = c * E * (C - D) + ny = this.curve._mulC(e).redMul(c.redISub(d)); + // Z3 = E * J + nz = e.redMul(j); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + // Double in extended coordinates + if (this.curve.extended) + return this._extDbl(); + else + return this._projDbl(); +}; + +Point.prototype._extAdd = function _extAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #addition-add-2008-hwcd-3 + // 8M + + // A = (Y1 - X1) * (Y2 - X2) + var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); + // B = (Y1 + X1) * (Y2 + X2) + var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); + // C = T1 * k * T2 + var c = this.t.redMul(this.curve.dd).redMul(p.t); + // D = Z1 * 2 * Z2 + var d = this.z.redMul(p.z.redAdd(p.z)); + // E = B - A + var e = b.redSub(a); + // F = D - C + var f = d.redSub(c); + // G = D + C + var g = d.redAdd(c); + // H = B + A + var h = b.redAdd(a); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projAdd = function _projAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #addition-add-2008-bbjlp + // #addition-add-2007-bl + // 10M + 1S + + // A = Z1 * Z2 + var a = this.z.redMul(p.z); + // B = A^2 + var b = a.redSqr(); + // C = X1 * X2 + var c = this.x.redMul(p.x); + // D = Y1 * Y2 + var d = this.y.redMul(p.y); + // E = d * C * D + var e = this.curve.d.redMul(c).redMul(d); + // F = B - E + var f = b.redSub(e); + // G = B + E + var g = b.redAdd(e); + // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) + var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); + var nx = a.redMul(f).redMul(tmp); + var ny; + var nz; + if (this.curve.twisted) { + // Y3 = A * G * (D - a * C) + ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); + // Z3 = F * G + nz = f.redMul(g); + } else { + // Y3 = A * G * (D - C) + ny = a.redMul(g).redMul(d.redSub(c)); + // Z3 = c * F * G + nz = this.curve._mulC(f).redMul(g); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.add = function add(p) { + if (this.isInfinity()) + return p; + if (p.isInfinity()) + return this; + + if (this.curve.extended) + return this._extAdd(p); + else + return this._projAdd(p); +}; + +Point.prototype.mul = function mul(k) { + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); +}; + +Point.prototype.normalize = function normalize() { + if (this.zOne) + return this; + + // Normalize coordinates + var zi = this.z.redInvm(); + this.x = this.x.redMul(zi); + this.y = this.y.redMul(zi); + if (this.t) + this.t = this.t.redMul(zi); + this.z = this.curve.one; + this.zOne = true; + return this; +}; + +Point.prototype.neg = function neg() { + return this.curve.point(this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg()); +}; + +Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + this.normalize(); + return this.y.fromRed(); +}; + +Point.prototype.eq = function eq(other) { + return this === other || + this.getX().cmp(other.getX()) === 0 && + this.getY().cmp(other.getY()) === 0; +}; + +Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } +}; + +// Compatibility with BaseCurve +Point.prototype.toP = Point.prototype.normalize; +Point.prototype.mixedAdd = Point.prototype.add; diff --git a/node_modules/elliptic/lib/elliptic/curve/index.js b/node_modules/elliptic/lib/elliptic/curve/index.js new file mode 100644 index 0000000..c589281 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/curve/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var curve = exports; + +curve.base = require('./base'); +curve.short = require('./short'); +curve.mont = require('./mont'); +curve.edwards = require('./edwards'); diff --git a/node_modules/elliptic/lib/elliptic/curve/mont.js b/node_modules/elliptic/lib/elliptic/curve/mont.js new file mode 100644 index 0000000..4b9f80f --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/curve/mont.js @@ -0,0 +1,178 @@ +'use strict'; + +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = require('./base'); + +var utils = require('../utils'); + +function MontCurve(conf) { + Base.call(this, 'mont', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.i4 = new BN(4).toRed(this.red).redInvm(); + this.two = new BN(2).toRed(this.red); + this.a24 = this.i4.redMul(this.a.redAdd(this.two)); +} +inherits(MontCurve, Base); +module.exports = MontCurve; + +MontCurve.prototype.validate = function validate(point) { + var x = point.normalize().x; + var x2 = x.redSqr(); + var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); + var y = rhs.redSqrt(); + + return y.redSqr().cmp(rhs) === 0; +}; + +function Point(curve, x, z) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && z === null) { + this.x = this.curve.one; + this.z = this.curve.zero; + } else { + this.x = new BN(x, 16); + this.z = new BN(z, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + } +} +inherits(Point, Base.BasePoint); + +MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + return this.point(utils.toArray(bytes, enc), 1); +}; + +MontCurve.prototype.point = function point(x, z) { + return new Point(this, x, z); +}; + +MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +Point.prototype.precompute = function precompute() { + // No-op +}; + +Point.prototype._encode = function _encode() { + return this.getX().toArray('be', this.curve.p.byteLength()); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1] || curve.one); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +Point.prototype.dbl = function dbl() { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 + // 2M + 2S + 4A + + // A = X1 + Z1 + var a = this.x.redAdd(this.z); + // AA = A^2 + var aa = a.redSqr(); + // B = X1 - Z1 + var b = this.x.redSub(this.z); + // BB = B^2 + var bb = b.redSqr(); + // C = AA - BB + var c = aa.redSub(bb); + // X3 = AA * BB + var nx = aa.redMul(bb); + // Z3 = C * (BB + A24 * C) + var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); + return this.curve.point(nx, nz); +}; + +Point.prototype.add = function add() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.diffAdd = function diffAdd(p, diff) { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 + // 4M + 2S + 6A + + // A = X2 + Z2 + var a = this.x.redAdd(this.z); + // B = X2 - Z2 + var b = this.x.redSub(this.z); + // C = X3 + Z3 + var c = p.x.redAdd(p.z); + // D = X3 - Z3 + var d = p.x.redSub(p.z); + // DA = D * A + var da = d.redMul(a); + // CB = C * B + var cb = c.redMul(b); + // X5 = Z1 * (DA + CB)^2 + var nx = diff.z.redMul(da.redAdd(cb).redSqr()); + // Z5 = X1 * (DA - CB)^2 + var nz = diff.x.redMul(da.redISub(cb).redSqr()); + return this.curve.point(nx, nz); +}; + +Point.prototype.mul = function mul(k) { + var t = k.clone(); + var a = this; // (N / 2) * Q + Q + var b = this.curve.point(null, null); // (N / 2) * Q + var c = this; // Q + + for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) + bits.push(t.andln(1)); + + for (var i = bits.length - 1; i >= 0; i--) { + if (bits[i] === 0) { + // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q + a = a.diffAdd(b, c); + // N * Q = 2 * ((N / 2) * Q + Q)) + b = b.dbl(); + } else { + // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) + b = a.diffAdd(b, c); + // N * Q + Q = 2 * ((N / 2) * Q + Q) + a = a.dbl(); + } + } + return b; +}; + +Point.prototype.mulAdd = function mulAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.jumlAdd = function jumlAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.eq = function eq(other) { + return this.getX().cmp(other.getX()) === 0; +}; + +Point.prototype.normalize = function normalize() { + this.x = this.x.redMul(this.z.redInvm()); + this.z = this.curve.one; + return this; +}; + +Point.prototype.getX = function getX() { + // Normalize coordinates + this.normalize(); + + return this.x.fromRed(); +}; diff --git a/node_modules/elliptic/lib/elliptic/curve/short.js b/node_modules/elliptic/lib/elliptic/curve/short.js new file mode 100644 index 0000000..eec36ec --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/curve/short.js @@ -0,0 +1,938 @@ +'use strict'; + +var utils = require('../utils'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = require('./base'); + +var assert = utils.assert; + +function ShortCurve(conf) { + Base.call(this, 'short', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits(ShortCurve, Base); +module.exports = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new BN(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new BN(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new BN(vec.a, 16), + b: new BN(vec.b, 16), + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis, + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : BN.mont(num); + var tinv = new BN(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new BN(1); + var y1 = new BN(0); + var x2 = new BN(0); + var y2 = new BN(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 }, + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; + }; + +function Point(curve, x, y, isRed) { + Base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits(Point, Base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul), + }, + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1), + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1), + }, + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)), + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)), + }, + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new BN(k, 16); + if (this.isInfinity()) + return this; + else if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate), + }, + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + Base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new BN(0); + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = new BN(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits(JPoint, Base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + var i; + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new BN(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; diff --git a/node_modules/elliptic/lib/elliptic/curves.js b/node_modules/elliptic/lib/elliptic/curves.js new file mode 100644 index 0000000..6c36e03 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/curves.js @@ -0,0 +1,206 @@ +'use strict'; + +var curves = exports; + +var hash = require('hash.js'); +var curve = require('./curve'); +var utils = require('./utils'); + +var assert = utils.assert; + +function PresetCurve(options) { + if (options.type === 'short') + this.curve = new curve.short(options); + else if (options.type === 'edwards') + this.curve = new curve.edwards(options); + else + this.curve = new curve.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); +} +curves.PresetCurve = PresetCurve; + +function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve, + }); + return curve; + }, + }); +} + +defineCurve('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: hash.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811', + ], +}); + +defineCurve('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: hash.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', + ], +}); + +defineCurve('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: hash.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', + ], +}); + +defineCurve('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: hash.sha384, + gRed: false, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + + '5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', + ], +}); + +defineCurve('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: hash.sha512, + gRed: false, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + + '3fad0761 353c7086 a272c240 88be9476 9fd16650', + ], +}); + +defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '9', + ], +}); + +defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658', + ], +}); + +var pre; +try { + pre = require('./precomputed/secp256k1'); +} catch (e) { + pre = undefined; +} + +defineCurve('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: hash.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3', + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15', + }, + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre, + ], +}); diff --git a/node_modules/elliptic/lib/elliptic/ec/index.js b/node_modules/elliptic/lib/elliptic/ec/index.js new file mode 100644 index 0000000..8b58781 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/ec/index.js @@ -0,0 +1,243 @@ +'use strict'; + +var BN = require('bn.js'); +var HmacDRBG = require('hmac-drbg'); +var utils = require('../utils'); +var curves = require('../curves'); +var rand = require('brorand'); +var assert = utils.assert; + +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert(Object.prototype.hasOwnProperty.call(curves, options), + 'Unknown curve ' + options); + + options = curves[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof curves.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +module.exports = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new KeyPair(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return KeyPair.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return KeyPair.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new HmacDRBG({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + entropy: options.entropy || rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || 'utf8', + nonce: this.n.toArray(), + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + for (;;) { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } +}; + +EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new HmacDRBG({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new BN(1)); + + for (var iter = 0; ; iter++) { + var k = options.k ? + options.k(iter) : + new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature = new Signature(signature, 'hex'); + + // Perform primitive values validation + var r = signature.r; + var s = signature.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + var p; + + if (!this.curve._maxwellTrick) { + p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature, j, enc) { + assert((3 & j) === j, 'The recovery param is more than two bits'); + signature = new Signature(signature, enc); + + var n = this.n; + var e = new BN(msg); + var r = signature.r; + var s = signature.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { + signature = new Signature(signature, enc); + if (signature.recoveryParam !== null) + return signature.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; diff --git a/node_modules/elliptic/lib/elliptic/ec/key.js b/node_modules/elliptic/lib/elliptic/ec/key.js new file mode 100644 index 0000000..55bf299 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/ec/key.js @@ -0,0 +1,121 @@ +'use strict'; + +var BN = require('bn.js'); +var utils = require('../utils'); +var assert = utils.assert; + +function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); +} +module.exports = KeyPair; + +KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc, + }); +}; + +KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc, + }); +}; + +KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; +}; + +KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); +}; + +KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; +}; + +KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new BN(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); +}; + +KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + // Montgomery points only have an `x` coordinate. + // Weierstrass/Edwards points on the other hand have both `x` and + // `y` coordinates. + if (this.ec.curve.type === 'mont') { + assert(key.x, 'Need x coordinate'); + } else if (this.ec.curve.type === 'short' || + this.ec.curve.type === 'edwards') { + assert(key.x && key.y, 'Need both x and y coordinate'); + } + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); +}; + +// ECDH +KeyPair.prototype.derive = function derive(pub) { + if(!pub.validate()) { + assert(pub.validate(), 'public point not validated'); + } + return pub.mul(this.priv).getX(); +}; + +// ECDSA +KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); +}; + +KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); +}; + +KeyPair.prototype.inspect = function inspect() { + return ''; +}; diff --git a/node_modules/elliptic/lib/elliptic/ec/signature.js b/node_modules/elliptic/lib/elliptic/ec/signature.js new file mode 100644 index 0000000..539df6a --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/ec/signature.js @@ -0,0 +1,166 @@ +'use strict'; + +var BN = require('bn.js'); + +var utils = require('../utils'); +var assert = utils.assert; + +function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert(options.r && options.s, 'Signature without r or s'); + this.r = new BN(options.r, 16); + this.s = new BN(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; +} +module.exports = Signature; + +function Position() { + this.place = 0; +} + +function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + + // Indefinite length or overflow + if (octetLen === 0 || octetLen > 4) { + return false; + } + + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + val >>>= 0; + } + + // Leading zeroes + if (val <= 0x7f) { + return false; + } + + p.place = off; + return val; +} + +function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); +} + +Signature.prototype._importDER = function _importDER(data, enc) { + data = utils.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if (len === false) { + return false; + } + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + if (rlen === false) { + return false; + } + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (slen === false) { + return false; + } + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0) { + if (r[1] & 0x80) { + r = r.slice(1); + } else { + // Leading zeroes + return false; + } + } + if (s[0] === 0) { + if (s[1] & 0x80) { + s = s.slice(1); + } else { + // Leading zeroes + return false; + } + } + + this.r = new BN(r); + this.s = new BN(s); + this.recoveryParam = null; + + return true; +}; + +function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); +} + +Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils.encode(res, enc); +}; diff --git a/node_modules/elliptic/lib/elliptic/eddsa/index.js b/node_modules/elliptic/lib/elliptic/eddsa/index.js new file mode 100644 index 0000000..d777983 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/eddsa/index.js @@ -0,0 +1,118 @@ +'use strict'; + +var hash = require('hash.js'); +var curves = require('../curves'); +var utils = require('../utils'); +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EDDSA(curve) { + assert(curve === 'ed25519', 'only tested with ed25519 so far'); + + if (!(this instanceof EDDSA)) + return new EDDSA(curve); + + curve = curves[curve].curve; + this.curve = curve; + this.g = curve.g; + this.g.precompute(curve.n.bitLength() + 1); + + this.pointClass = curve.point().constructor; + this.encodingLength = Math.ceil(curve.n.bitLength() / 8); + this.hash = hash.sha512; +} + +module.exports = EDDSA; + +/** +* @param {Array|String} message - message bytes +* @param {Array|String|KeyPair} secret - secret bytes or a keypair +* @returns {Signature} - signature +*/ +EDDSA.prototype.sign = function sign(message, secret) { + message = parseBytes(message); + var key = this.keyFromSecret(secret); + var r = this.hashInt(key.messagePrefix(), message); + var R = this.g.mul(r); + var Rencoded = this.encodePoint(R); + var s_ = this.hashInt(Rencoded, key.pubBytes(), message) + .mul(key.priv()); + var S = r.add(s_).umod(this.curve.n); + return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); +}; + +/** +* @param {Array} message - message bytes +* @param {Array|String|Signature} sig - sig bytes +* @param {Array|String|Point|KeyPair} pub - public key +* @returns {Boolean} - true if public key matches sig of message +*/ +EDDSA.prototype.verify = function verify(message, sig, pub) { + message = parseBytes(message); + sig = this.makeSignature(sig); + var key = this.keyFromPublic(pub); + var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); + var SG = this.g.mul(sig.S()); + var RplusAh = sig.R().add(key.pub().mul(h)); + return RplusAh.eq(SG); +}; + +EDDSA.prototype.hashInt = function hashInt() { + var hash = this.hash(); + for (var i = 0; i < arguments.length; i++) + hash.update(arguments[i]); + return utils.intFromLE(hash.digest()).umod(this.curve.n); +}; + +EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { + return KeyPair.fromPublic(this, pub); +}; + +EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { + return KeyPair.fromSecret(this, secret); +}; + +EDDSA.prototype.makeSignature = function makeSignature(sig) { + if (sig instanceof Signature) + return sig; + return new Signature(this, sig); +}; + +/** +* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 +* +* EDDSA defines methods for encoding and decoding points and integers. These are +* helper convenience methods, that pass along to utility functions implied +* parameters. +* +*/ +EDDSA.prototype.encodePoint = function encodePoint(point) { + var enc = point.getY().toArray('le', this.encodingLength); + enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; + return enc; +}; + +EDDSA.prototype.decodePoint = function decodePoint(bytes) { + bytes = utils.parseBytes(bytes); + + var lastIx = bytes.length - 1; + var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); + var xIsOdd = (bytes[lastIx] & 0x80) !== 0; + + var y = utils.intFromLE(normed); + return this.curve.pointFromY(y, xIsOdd); +}; + +EDDSA.prototype.encodeInt = function encodeInt(num) { + return num.toArray('le', this.encodingLength); +}; + +EDDSA.prototype.decodeInt = function decodeInt(bytes) { + return utils.intFromLE(bytes); +}; + +EDDSA.prototype.isPoint = function isPoint(val) { + return val instanceof this.pointClass; +}; diff --git a/node_modules/elliptic/lib/elliptic/eddsa/key.js b/node_modules/elliptic/lib/elliptic/eddsa/key.js new file mode 100644 index 0000000..a00028f --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/eddsa/key.js @@ -0,0 +1,95 @@ +'use strict'; + +var utils = require('../utils'); +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var cachedProperty = utils.cachedProperty; + +/** +* @param {EDDSA} eddsa - instance +* @param {Object} params - public/private key parameters +* +* @param {Array} [params.secret] - secret seed bytes +* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) +* @param {Array} [params.pub] - public key point encoded as bytes +* +*/ +function KeyPair(eddsa, params) { + this.eddsa = eddsa; + this._secret = parseBytes(params.secret); + if (eddsa.isPoint(params.pub)) + this._pub = params.pub; + else + this._pubBytes = parseBytes(params.pub); +} + +KeyPair.fromPublic = function fromPublic(eddsa, pub) { + if (pub instanceof KeyPair) + return pub; + return new KeyPair(eddsa, { pub: pub }); +}; + +KeyPair.fromSecret = function fromSecret(eddsa, secret) { + if (secret instanceof KeyPair) + return secret; + return new KeyPair(eddsa, { secret: secret }); +}; + +KeyPair.prototype.secret = function secret() { + return this._secret; +}; + +cachedProperty(KeyPair, 'pubBytes', function pubBytes() { + return this.eddsa.encodePoint(this.pub()); +}); + +cachedProperty(KeyPair, 'pub', function pub() { + if (this._pubBytes) + return this.eddsa.decodePoint(this._pubBytes); + return this.eddsa.g.mul(this.priv()); +}); + +cachedProperty(KeyPair, 'privBytes', function privBytes() { + var eddsa = this.eddsa; + var hash = this.hash(); + var lastIx = eddsa.encodingLength - 1; + + var a = hash.slice(0, eddsa.encodingLength); + a[0] &= 248; + a[lastIx] &= 127; + a[lastIx] |= 64; + + return a; +}); + +cachedProperty(KeyPair, 'priv', function priv() { + return this.eddsa.decodeInt(this.privBytes()); +}); + +cachedProperty(KeyPair, 'hash', function hash() { + return this.eddsa.hash().update(this.secret()).digest(); +}); + +cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { + return this.hash().slice(this.eddsa.encodingLength); +}); + +KeyPair.prototype.sign = function sign(message) { + assert(this._secret, 'KeyPair can only verify'); + return this.eddsa.sign(message, this); +}; + +KeyPair.prototype.verify = function verify(message, sig) { + return this.eddsa.verify(message, sig, this); +}; + +KeyPair.prototype.getSecret = function getSecret(enc) { + assert(this._secret, 'KeyPair is public only'); + return utils.encode(this.secret(), enc); +}; + +KeyPair.prototype.getPublic = function getPublic(enc) { + return utils.encode(this.pubBytes(), enc); +}; + +module.exports = KeyPair; diff --git a/node_modules/elliptic/lib/elliptic/eddsa/signature.js b/node_modules/elliptic/lib/elliptic/eddsa/signature.js new file mode 100644 index 0000000..30ebc92 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/eddsa/signature.js @@ -0,0 +1,65 @@ +'use strict'; + +var BN = require('bn.js'); +var utils = require('../utils'); +var assert = utils.assert; +var cachedProperty = utils.cachedProperty; +var parseBytes = utils.parseBytes; + +/** +* @param {EDDSA} eddsa - eddsa instance +* @param {Array|Object} sig - +* @param {Array|Point} [sig.R] - R point as Point or bytes +* @param {Array|bn} [sig.S] - S scalar as bn or bytes +* @param {Array} [sig.Rencoded] - R point encoded +* @param {Array} [sig.Sencoded] - S scalar encoded +*/ +function Signature(eddsa, sig) { + this.eddsa = eddsa; + + if (typeof sig !== 'object') + sig = parseBytes(sig); + + if (Array.isArray(sig)) { + sig = { + R: sig.slice(0, eddsa.encodingLength), + S: sig.slice(eddsa.encodingLength), + }; + } + + assert(sig.R && sig.S, 'Signature without R or S'); + + if (eddsa.isPoint(sig.R)) + this._R = sig.R; + if (sig.S instanceof BN) + this._S = sig.S; + + this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; + this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; +} + +cachedProperty(Signature, 'S', function S() { + return this.eddsa.decodeInt(this.Sencoded()); +}); + +cachedProperty(Signature, 'R', function R() { + return this.eddsa.decodePoint(this.Rencoded()); +}); + +cachedProperty(Signature, 'Rencoded', function Rencoded() { + return this.eddsa.encodePoint(this.R()); +}); + +cachedProperty(Signature, 'Sencoded', function Sencoded() { + return this.eddsa.encodeInt(this.S()); +}); + +Signature.prototype.toBytes = function toBytes() { + return this.Rencoded().concat(this.Sencoded()); +}; + +Signature.prototype.toHex = function toHex() { + return utils.encode(this.toBytes(), 'hex').toUpperCase(); +}; + +module.exports = Signature; diff --git a/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js b/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js new file mode 100644 index 0000000..01a7c4d --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js @@ -0,0 +1,780 @@ +module.exports = { + doubles: { + step: 4, + points: [ + [ + 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', + 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821', + ], + [ + '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', + '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf', + ], + [ + '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', + 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695', + ], + [ + '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', + '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9', + ], + [ + '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', + '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36', + ], + [ + '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', + '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f', + ], + [ + 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', + '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999', + ], + [ + '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', + 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09', + ], + [ + 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', + '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d', + ], + [ + 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', + 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088', + ], + [ + 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', + '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d', + ], + [ + '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', + '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8', + ], + [ + '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', + '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a', + ], + [ + '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', + '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453', + ], + [ + '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', + '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160', + ], + [ + '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', + '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0', + ], + [ + '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', + '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6', + ], + [ + '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', + '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589', + ], + [ + '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', + 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17', + ], + [ + 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', + '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda', + ], + [ + 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', + '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd', + ], + [ + '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', + '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2', + ], + [ + '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', + '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6', + ], + [ + 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', + '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f', + ], + [ + '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', + 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01', + ], + [ + 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', + '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3', + ], + [ + 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', + 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f', + ], + [ + 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', + '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7', + ], + [ + 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', + 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78', + ], + [ + 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', + '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1', + ], + [ + '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', + 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150', + ], + [ + '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', + '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82', + ], + [ + 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', + '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc', + ], + [ + '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', + 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b', + ], + [ + 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', + '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51', + ], + [ + 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', + '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45', + ], + [ + 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', + 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120', + ], + [ + '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', + '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84', + ], + [ + '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', + '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d', + ], + [ + '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', + 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d', + ], + [ + '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', + '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8', + ], + [ + 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', + '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8', + ], + [ + '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', + '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac', + ], + [ + '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', + 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f', + ], + [ + '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', + '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962', + ], + [ + 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', + '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907', + ], + [ + '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', + 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec', + ], + [ + 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', + 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d', + ], + [ + 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', + '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414', + ], + [ + '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', + 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd', + ], + [ + '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', + 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0', + ], + [ + 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', + '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811', + ], + [ + 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', + '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1', + ], + [ + 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', + '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c', + ], + [ + '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', + 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73', + ], + [ + '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', + '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd', + ], + [ + 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', + 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405', + ], + [ + '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', + 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589', + ], + [ + '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', + '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e', + ], + [ + '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', + '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27', + ], + [ + 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', + 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1', + ], + [ + '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', + '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482', + ], + [ + '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', + '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945', + ], + [ + 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', + '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573', + ], + [ + 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', + 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82', + ], + ], + }, + naf: { + wnd: 7, + points: [ + [ + 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', + '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672', + ], + [ + '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', + 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6', + ], + [ + '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', + '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da', + ], + [ + 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', + 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37', + ], + [ + '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', + 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b', + ], + [ + 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', + 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81', + ], + [ + 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', + '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58', + ], + [ + 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', + '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77', + ], + [ + '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', + '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a', + ], + [ + '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', + '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c', + ], + [ + '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', + '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67', + ], + [ + '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', + '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402', + ], + [ + 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', + 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55', + ], + [ + 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', + '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482', + ], + [ + '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', + 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82', + ], + [ + '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', + 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396', + ], + [ + '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', + '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49', + ], + [ + '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', + '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf', + ], + [ + '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', + '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a', + ], + [ + '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', + 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7', + ], + [ + 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', + 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933', + ], + [ + '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', + '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a', + ], + [ + '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', + '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6', + ], + [ + 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', + 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37', + ], + [ + '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', + '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e', + ], + [ + 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', + 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6', + ], + [ + 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', + 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476', + ], + [ + '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', + '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40', + ], + [ + '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', + '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61', + ], + [ + '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', + '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683', + ], + [ + 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', + '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5', + ], + [ + '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', + '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b', + ], + [ + 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', + '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417', + ], + [ + '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', + 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868', + ], + [ + '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', + 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a', + ], + [ + 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', + 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6', + ], + [ + '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', + '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996', + ], + [ + '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', + 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e', + ], + [ + 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', + 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d', + ], + [ + '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', + '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2', + ], + [ + '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', + 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e', + ], + [ + '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', + '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437', + ], + [ + '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', + 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311', + ], + [ + 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', + '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4', + ], + [ + '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', + '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575', + ], + [ + '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', + 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d', + ], + [ + '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', + 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d', + ], + [ + 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', + 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629', + ], + [ + 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', + 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06', + ], + [ + '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', + '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374', + ], + [ + '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', + '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee', + ], + [ + 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', + '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1', + ], + [ + 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', + 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b', + ], + [ + '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', + '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661', + ], + [ + '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', + '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6', + ], + [ + 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', + '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e', + ], + [ + '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', + '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d', + ], + [ + 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', + 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc', + ], + [ + '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', + 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4', + ], + [ + '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', + '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c', + ], + [ + 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', + '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b', + ], + [ + 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', + '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913', + ], + [ + '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', + '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154', + ], + [ + '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', + '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865', + ], + [ + '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', + 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc', + ], + [ + '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', + 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224', + ], + [ + '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', + '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e', + ], + [ + '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', + '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6', + ], + [ + '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', + '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511', + ], + [ + '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', + 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b', + ], + [ + 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', + 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2', + ], + [ + '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', + 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c', + ], + [ + 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', + '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3', + ], + [ + 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', + '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d', + ], + [ + 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', + '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700', + ], + [ + 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', + '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4', + ], + [ + '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', + 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196', + ], + [ + '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', + '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4', + ], + [ + '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', + 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257', + ], + [ + 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', + 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13', + ], + [ + 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', + '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096', + ], + [ + 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', + 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38', + ], + [ + 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', + '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f', + ], + [ + '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', + '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448', + ], + [ + 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', + '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a', + ], + [ + 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', + '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4', + ], + [ + '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', + '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437', + ], + [ + '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', + 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7', + ], + [ + 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', + '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d', + ], + [ + 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', + '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a', + ], + [ + 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', + '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54', + ], + [ + '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', + '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77', + ], + [ + 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', + 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517', + ], + [ + '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', + 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10', + ], + [ + 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', + 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125', + ], + [ + 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', + '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e', + ], + [ + '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', + 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1', + ], + [ + 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', + '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2', + ], + [ + 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', + '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423', + ], + [ + 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', + '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8', + ], + [ + '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', + 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758', + ], + [ + '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', + 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375', + ], + [ + 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', + '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d', + ], + [ + '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', + 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec', + ], + [ + '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', + '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0', + ], + [ + '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', + 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c', + ], + [ + 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', + 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4', + ], + [ + '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', + 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f', + ], + [ + '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', + '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649', + ], + [ + '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', + 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826', + ], + [ + '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', + '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5', + ], + [ + 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', + 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87', + ], + [ + '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', + '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b', + ], + [ + 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', + '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc', + ], + [ + '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', + '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c', + ], + [ + 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', + 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f', + ], + [ + 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', + '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a', + ], + [ + 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', + 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46', + ], + [ + '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', + 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f', + ], + [ + '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', + '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03', + ], + [ + '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', + 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08', + ], + [ + '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', + '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8', + ], + [ + '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', + '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373', + ], + [ + '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', + 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3', + ], + [ + '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', + '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8', + ], + [ + '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', + '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1', + ], + [ + '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', + '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9', + ], + ], + }, +}; diff --git a/node_modules/elliptic/lib/elliptic/utils.js b/node_modules/elliptic/lib/elliptic/utils.js new file mode 100644 index 0000000..627a9f1 --- /dev/null +++ b/node_modules/elliptic/lib/elliptic/utils.js @@ -0,0 +1,119 @@ +'use strict'; + +var utils = exports; +var BN = require('bn.js'); +var minAssert = require('minimalistic-assert'); +var minUtils = require('minimalistic-crypto-utils'); + +utils.assert = minAssert; +utils.toArray = minUtils.toArray; +utils.zero2 = minUtils.zero2; +utils.toHex = minUtils.toHex; +utils.encode = minUtils.encode; + +// Represent num in a w-NAF form +function getNAF(num, w, bits) { + var naf = new Array(Math.max(num.bitLength(), bits) + 1); + naf.fill(0); + + var ws = 1 << (w + 1); + var k = num.clone(); + + for (var i = 0; i < naf.length; i++) { + var z; + var mod = k.andln(ws - 1); + if (k.isOdd()) { + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + + naf[i] = z; + k.iushrn(1); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [], + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + var m8; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new BN(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; + diff --git a/node_modules/elliptic/package.json b/node_modules/elliptic/package.json new file mode 100644 index 0000000..7719d33 --- /dev/null +++ b/node_modules/elliptic/package.json @@ -0,0 +1,56 @@ +{ + "name": "elliptic", + "version": "6.5.4", + "description": "EC cryptography", + "main": "lib/elliptic.js", + "files": [ + "lib" + ], + "scripts": { + "lint": "eslint lib test", + "lint:fix": "npm run lint -- --fix", + "unit": "istanbul test _mocha --reporter=spec test/index.js", + "test": "npm run lint && npm run unit", + "version": "grunt dist && git add dist/" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/elliptic" + }, + "keywords": [ + "EC", + "Elliptic", + "curve", + "Cryptography" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/elliptic/issues" + }, + "homepage": "https://github.com/indutny/elliptic", + "devDependencies": { + "brfs": "^2.0.2", + "coveralls": "^3.1.0", + "eslint": "^7.6.0", + "grunt": "^1.2.1", + "grunt-browserify": "^5.3.0", + "grunt-cli": "^1.3.2", + "grunt-contrib-connect": "^3.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^5.0.0", + "grunt-mocha-istanbul": "^5.0.2", + "grunt-saucelabs": "^9.0.1", + "istanbul": "^0.4.5", + "mocha": "^8.0.1" + }, + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } +} diff --git a/node_modules/ethers/LICENSE.md b/node_modules/ethers/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/node_modules/ethers/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ethers/README.md b/node_modules/ethers/README.md new file mode 100644 index 0000000..cd4ddb2 --- /dev/null +++ b/node_modules/ethers/README.md @@ -0,0 +1,92 @@ +The Ethers Project +================== + +[![npm (tag)](https://img.shields.io/npm/v/ethers)](https://www.npmjs.com/package/ethers) +[![Node.js CI](https://github.com/ethers-io/ethers.js/workflows/Node.js%20CI/badge.svg?branch=ethers-v5-beta)](https://github.com/ethers-io/ethers.js/actions?query=workflow%3A%22Node.js+CI%22) + +A complete Ethereum wallet implementation and utilities in JavaScript (and TypeScript). + +**Features:** + +- Keep your private keys in your client, **safe** and sound +- Import and export **JSON wallets** (Geth, Parity and crowdsale) +- Import and export BIP 39 **mnemonic phrases** (12 word backup phrases) and **HD Wallets** (English as well as Czech, French, Italian, Japanese, Korean, Simplified Chinese, Spanish, Traditional Chinese) +- Meta-classes create JavaScript objects from any contract ABI, including **ABIv2** and **Human-Readable ABI** +- Connect to Ethereum nodes over [JSON-RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC), [INFURA](https://infura.io), [Etherscan](https://etherscan.io), [Alchemy](https://alchemyapi.io) or [MetaMask](https://metamask.io) +- **ENS names** are first-class citizens; they can be used anywhere an Ethereum addresses can be used +- **Tiny** (~104kb compressed; 322kb uncompressed) +- **Modular** packages; include only what you need +- **Complete** functionality for all your Ethereum desires +- Extensive [documentation](https://docs.ethers.io/v5/) +- Large collection of **test cases** which are maintained and added to +- Fully **TypeScript** ready, with definition files and full TypeScript source +- **MIT License** (including ALL dependencies); completely open source to do with as you please + + +Keep Updated +------------ + +For the latest news and advisories, please follow the [@ethersproject](https://twitter.com/ethersproject) +on Twitter (low-traffic, non-marketing, important information only) as well as watch this GitHub project. + +For the latest changes, see the [CHANGELOG](https://github.com/ethers-io/ethers.js/blob/master/CHANGELOG.md). + + +Installing +---------- + +**node.js** + +``` +/home/ricmoo/some_project> npm install --save ethers +``` + +**browser (UMD)** + +``` + +``` + +**browser (ESM)** + +``` + +``` + + +Documentation +------------- + +Browse the [documentation](https://docs.ethers.io/v5/) online: + +- [Getting Started](https://docs.ethers.io/v5/getting-started/) +- [Full API Documentation](https://docs.ethers.io/v5/api/) +- [Various Ethereum Articles](https://blog.ricmoo.com/) + +Or browse the entire documentation as a [single page](https://docs.ethers.io/v5/single-page/) to make searching easier. + + +Ancillary Packages +------------------ + +These are a number of packages not included in the umbrella `ethers` npm package, and +additional packages are always being added. Often these packages are for specific +use-cases, so rather than adding them to the umbrella package, they are added as +ancillary packages, which can be included by those who need them, while not bloating +everyone else with packages they do not need. + +We will keep a list of useful packages here. + +- `@ethersproject/experimental` ([documentation](https://docs.ethers.io)) +- `@ethersproject/cli` ([documentation](https://docs.ethers.io)) +- `@ethersproject/hardware-wallets` ([documentation](https://docs.ethers.io)) + + +License +------- + +MIT License (including **all** dependencies). + diff --git a/node_modules/ethers/dist/ethers.esm.js b/node_modules/ethers/dist/ethers.esm.js new file mode 100644 index 0000000..e45fe0b --- /dev/null +++ b/node_modules/ethers/dist/ethers.esm.js @@ -0,0 +1,23201 @@ +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; +} + +function getDefaultExportFromNamespaceIfPresent (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; +} + +function getDefaultExportFromNamespaceIfNotNamed (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; +} + +function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var a = Object.defineProperty({}, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; +} + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} + +var bn = createCommonjsModule(function (module) { +(function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') { + Buffer = window.Buffer; + } else { + Buffer = /*RicMoo:ethers:require(buffer)*/(null).Buffer; + } + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + this.negative = 1; + } + + if (start < number.length) { + if (base === 16) { + this._parseHex(number, start, endian); + } else { + this._parseBase(number, base, start); + if (endian === 'le') { + this._initArray(this.toArray(), base, endian); + } + } + } + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; + + function parseHex4Bits (string, index) { + var c = string.charCodeAt(index); + // 'A' - 'F' + if (c >= 65 && c <= 70) { + return c - 55; + // 'a' - 'f' + } else if (c >= 97 && c <= 102) { + return c - 87; + // '0' - '9' + } else { + return (c - 48) & 0xf; + } + } + + function parseHexByte (string, lowerBound, index) { + var r = parseHex4Bits(string, index); + if (index - 1 >= lowerBound) { + r |= parseHex4Bits(string, index - 1) << 4; + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start, endian) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + // 24-bits chunks + var off = 0; + var j = 0; + + var w; + if (endian === 'be') { + for (i = number.length - 1; i >= start; i -= 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } else { + var parseLength = number.length - start; + for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } + + this.strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; + + // '0' - '9' + } else { + r += c; + } + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + this.strip(); + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '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' + ]; + + var groupSizes = [ + 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 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); + + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } + + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[i] = b; + } + + for (; i < reqLength; i++) { + res[i] = 0; + } + } + + return res; + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this.strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this.strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this.strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this.strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this.strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this.strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out.strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out.strip(); + } + + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this.strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this.strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this.strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this.strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this.strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this.strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return acc; + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + return this.strip(); + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this.strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + if (r.strip !== undefined) { + // r is BN v4 instance + r.strip(); + } else { + // r is BN v5 instance + r._strip(); + } + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1).toRed(this); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(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); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; +})('object' === 'undefined' || module, commonjsGlobal); +}); + +const version = "logger/5.5.0"; + +"use strict"; +let _permanentCensorErrors = false; +let _censorErrors = false; +const LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 }; +let _logLevel = LogLevels["default"]; +let _globalLogger = null; +function _checkNormalize() { + try { + const missing = []; + // Make sure all forms of normalization are supported + ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => { + try { + if ("test".normalize(form) !== "test") { + throw new Error("bad normalize"); + } + ; + } + catch (error) { + missing.push(form); + } + }); + if (missing.length) { + throw new Error("missing " + missing.join(", ")); + } + if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) { + throw new Error("broken implementation"); + } + } + catch (error) { + return error.message; + } + return null; +} +const _normalizeError = _checkNormalize(); +var LogLevel; +(function (LogLevel) { + LogLevel["DEBUG"] = "DEBUG"; + LogLevel["INFO"] = "INFO"; + LogLevel["WARNING"] = "WARNING"; + LogLevel["ERROR"] = "ERROR"; + LogLevel["OFF"] = "OFF"; +})(LogLevel || (LogLevel = {})); +var ErrorCode; +(function (ErrorCode) { + /////////////////// + // Generic Errors + // Unknown Error + ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; + // Not Implemented + ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED"; + // Unsupported Operation + // - operation + ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION"; + // Network Error (i.e. Ethereum Network, such as an invalid chain ID) + // - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown) + ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR"; + // Some sort of bad response from the server + ErrorCode["SERVER_ERROR"] = "SERVER_ERROR"; + // Timeout + ErrorCode["TIMEOUT"] = "TIMEOUT"; + /////////////////// + // Operational Errors + // Buffer Overrun + ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN"; + // Numeric Fault + // - operation: the operation being executed + // - fault: the reason this faulted + ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT"; + /////////////////// + // Argument Errors + // Missing new operator to an object + // - name: The name of the class + ErrorCode["MISSING_NEW"] = "MISSING_NEW"; + // Invalid argument (e.g. value is incompatible with type) to a function: + // - argument: The argument name that was invalid + // - value: The value of the argument + ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT"; + // Missing argument to a function: + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT"; + // Too many arguments + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT"; + /////////////////// + // Blockchain Errors + // Call exception + // - transaction: the transaction + // - address?: the contract address + // - args?: The arguments passed into the function + // - method?: The Solidity method signature + // - errorSignature?: The EIP848 error signature + // - errorArgs?: The EIP848 error parameters + // - reason: The reason (only for EIP848 "Error(string)") + ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION"; + // Insufficient funds (< value + gasLimit * gasPrice) + // - transaction: the transaction attempted + ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS"; + // Nonce has already been used + // - transaction: the transaction attempted + ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED"; + // The replacement fee for the transaction is too low + // - transaction: the transaction attempted + ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED"; + // The gas limit could not be estimated + // - transaction: the transaction passed to estimateGas + ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT"; + // The transaction was replaced by one with a higher gas price + // - reason: "cancelled", "replaced" or "repriced" + // - cancelled: true if reason == "cancelled" or reason == "replaced") + // - hash: original transaction hash + // - replacement: the full TransactionsResponse for the replacement + // - receipt: the receipt of the replacement + ErrorCode["TRANSACTION_REPLACED"] = "TRANSACTION_REPLACED"; +})(ErrorCode || (ErrorCode = {})); +; +const HEX = "0123456789abcdef"; +class Logger { + constructor(version) { + Object.defineProperty(this, "version", { + enumerable: true, + value: version, + writable: false + }); + } + _log(logLevel, args) { + const level = logLevel.toLowerCase(); + if (LogLevels[level] == null) { + this.throwArgumentError("invalid log level name", "logLevel", logLevel); + } + if (_logLevel > LogLevels[level]) { + return; + } + console.log.apply(console, args); + } + debug(...args) { + this._log(Logger.levels.DEBUG, args); + } + info(...args) { + this._log(Logger.levels.INFO, args); + } + warn(...args) { + this._log(Logger.levels.WARNING, args); + } + makeError(message, code, params) { + // Errors are being censored + if (_censorErrors) { + return this.makeError("censored error", code, {}); + } + if (!code) { + code = Logger.errors.UNKNOWN_ERROR; + } + if (!params) { + params = {}; + } + const messageDetails = []; + Object.keys(params).forEach((key) => { + const value = params[key]; + try { + if (value instanceof Uint8Array) { + let hex = ""; + for (let i = 0; i < value.length; i++) { + hex += HEX[value[i] >> 4]; + hex += HEX[value[i] & 0x0f]; + } + messageDetails.push(key + "=Uint8Array(0x" + hex + ")"); + } + else { + messageDetails.push(key + "=" + JSON.stringify(value)); + } + } + catch (error) { + messageDetails.push(key + "=" + JSON.stringify(params[key].toString())); + } + }); + messageDetails.push(`code=${code}`); + messageDetails.push(`version=${this.version}`); + const reason = message; + if (messageDetails.length) { + message += " (" + messageDetails.join(", ") + ")"; + } + // @TODO: Any?? + const error = new Error(message); + error.reason = reason; + error.code = code; + Object.keys(params).forEach(function (key) { + error[key] = params[key]; + }); + return error; + } + throwError(message, code, params) { + throw this.makeError(message, code, params); + } + throwArgumentError(message, name, value) { + return this.throwError(message, Logger.errors.INVALID_ARGUMENT, { + argument: name, + value: value + }); + } + assert(condition, message, code, params) { + if (!!condition) { + return; + } + this.throwError(message, code, params); + } + assertArgument(condition, message, name, value) { + if (!!condition) { + return; + } + this.throwArgumentError(message, name, value); + } + checkNormalize(message) { + if (message == null) { + message = "platform missing String.prototype.normalize"; + } + if (_normalizeError) { + this.throwError("platform missing String.prototype.normalize", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "String.prototype.normalize", form: _normalizeError + }); + } + } + checkSafeUint53(value, message) { + if (typeof (value) !== "number") { + return; + } + if (message == null) { + message = "value not safe"; + } + if (value < 0 || value >= 0x1fffffffffffff) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "out-of-safe-range", + value: value + }); + } + if (value % 1) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "non-integer", + value: value + }); + } + } + checkArgumentCount(count, expectedCount, message) { + if (message) { + message = ": " + message; + } + else { + message = ""; + } + if (count < expectedCount) { + this.throwError("missing argument" + message, Logger.errors.MISSING_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + if (count > expectedCount) { + this.throwError("too many arguments" + message, Logger.errors.UNEXPECTED_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + } + checkNew(target, kind) { + if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + } + checkAbstract(target, kind) { + if (target === kind) { + this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); + } + else if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + } + static globalLogger() { + if (!_globalLogger) { + _globalLogger = new Logger(version); + } + return _globalLogger; + } + static setCensorship(censorship, permanent) { + if (!censorship && permanent) { + this.globalLogger().throwError("cannot permanently disable censorship", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + if (_permanentCensorErrors) { + if (!censorship) { + return; + } + this.globalLogger().throwError("error censorship permanent", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + _censorErrors = !!censorship; + _permanentCensorErrors = !!permanent; + } + static setLogLevel(logLevel) { + const level = LogLevels[logLevel.toLowerCase()]; + if (level == null) { + Logger.globalLogger().warn("invalid log level - " + logLevel); + return; + } + _logLevel = level; + } + static from(version) { + return new Logger(version); + } +} +Logger.errors = ErrorCode; +Logger.levels = LogLevel; + +const version$1 = "bytes/5.5.0"; + +"use strict"; +const logger = new Logger(version$1); +/////////////////////////////// +function isHexable(value) { + return !!(value.toHexString); +} +function addSlice(array) { + if (array.slice) { + return array; + } + array.slice = function () { + const args = Array.prototype.slice.call(arguments); + return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args))); + }; + return array; +} +function isBytesLike(value) { + return ((isHexString(value) && !(value.length % 2)) || isBytes(value)); +} +function isInteger(value) { + return (typeof (value) === "number" && value == value && (value % 1) === 0); +} +function isBytes(value) { + if (value == null) { + return false; + } + if (value.constructor === Uint8Array) { + return true; + } + if (typeof (value) === "string") { + return false; + } + if (!isInteger(value.length) || value.length < 0) { + return false; + } + for (let i = 0; i < value.length; i++) { + const v = value[i]; + if (!isInteger(v) || v < 0 || v >= 256) { + return false; + } + } + return true; +} +function arrayify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid arrayify value"); + const result = []; + while (value) { + result.unshift(value & 0xff); + value = parseInt(String(value / 256)); + } + if (result.length === 0) { + result.push(0); + } + return addSlice(new Uint8Array(result)); + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + value = value.toHexString(); + } + if (isHexString(value)) { + let hex = value.substring(2); + if (hex.length % 2) { + if (options.hexPad === "left") { + hex = "0x0" + hex.substring(2); + } + else if (options.hexPad === "right") { + hex += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + const result = []; + for (let i = 0; i < hex.length; i += 2) { + result.push(parseInt(hex.substring(i, i + 2), 16)); + } + return addSlice(new Uint8Array(result)); + } + if (isBytes(value)) { + return addSlice(new Uint8Array(value)); + } + return logger.throwArgumentError("invalid arrayify value", "value", value); +} +function concat(items) { + const objects = items.map(item => arrayify(item)); + const length = objects.reduce((accum, item) => (accum + item.length), 0); + const result = new Uint8Array(length); + objects.reduce((offset, object) => { + result.set(object, offset); + return offset + object.length; + }, 0); + return addSlice(result); +} +function stripZeros(value) { + let result = arrayify(value); + if (result.length === 0) { + return result; + } + // Find the first non-zero entry + let start = 0; + while (start < result.length && result[start] === 0) { + start++; + } + // If we started with zeros, strip them + if (start) { + result = result.slice(start); + } + return result; +} +function zeroPad(value, length) { + value = arrayify(value); + if (value.length > length) { + logger.throwArgumentError("value out of range", "value", arguments[0]); + } + const result = new Uint8Array(length); + result.set(value, length - value.length); + return addSlice(result); +} +function isHexString(value, length) { + if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + if (length && value.length !== 2 + 2 * length) { + return false; + } + return true; +} +const HexCharacters = "0123456789abcdef"; +function hexlify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid hexlify value"); + let hex = ""; + while (value) { + hex = HexCharacters[value & 0xf] + hex; + value = Math.floor(value / 16); + } + if (hex.length) { + if (hex.length % 2) { + hex = "0" + hex; + } + return "0x" + hex; + } + return "0x00"; + } + if (typeof (value) === "bigint") { + value = value.toString(16); + if (value.length % 2) { + return ("0x0" + value); + } + return "0x" + value; + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + return value.toHexString(); + } + if (isHexString(value)) { + if (value.length % 2) { + if (options.hexPad === "left") { + value = "0x0" + value.substring(2); + } + else if (options.hexPad === "right") { + value += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + return value.toLowerCase(); + } + if (isBytes(value)) { + let result = "0x"; + for (let i = 0; i < value.length; i++) { + let v = value[i]; + result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; + } + return result; + } + return logger.throwArgumentError("invalid hexlify value", "value", value); +} +/* +function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number { + if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") { + return "0x0" + value.substring(2); + } + return value; +} +*/ +function hexDataLength(data) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + return null; + } + return (data.length - 2) / 2; +} +function hexDataSlice(data, offset, endOffset) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + logger.throwArgumentError("invalid hexData", "value", data); + } + offset = 2 + 2 * offset; + if (endOffset != null) { + return "0x" + data.substring(offset, 2 + 2 * endOffset); + } + return "0x" + data.substring(offset); +} +function hexConcat(items) { + let result = "0x"; + items.forEach((item) => { + result += hexlify(item).substring(2); + }); + return result; +} +function hexValue(value) { + const trimmed = hexStripZeros(hexlify(value, { hexPad: "left" })); + if (trimmed === "0x") { + return "0x0"; + } + return trimmed; +} +function hexStripZeros(value) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + value = value.substring(2); + let offset = 0; + while (offset < value.length && value[offset] === "0") { + offset++; + } + return "0x" + value.substring(offset); +} +function hexZeroPad(value, length) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + else if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + if (value.length > 2 * length + 2) { + logger.throwArgumentError("value out of range", "value", arguments[1]); + } + while (value.length < 2 * length + 2) { + value = "0x0" + value.substring(2); + } + return value; +} +function splitSignature(signature) { + const result = { + r: "0x", + s: "0x", + _vs: "0x", + recoveryParam: 0, + v: 0 + }; + if (isBytesLike(signature)) { + const bytes = arrayify(signature); + if (bytes.length !== 65) { + logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature); + } + // Get the r, s and v + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + // Allow a recid to be used as the v + if (result.v < 27) { + if (result.v === 0 || result.v === 1) { + result.v += 27; + } + else { + logger.throwArgumentError("signature invalid v byte", "signature", signature); + } + } + // Compute recoveryParam from v + result.recoveryParam = 1 - (result.v % 2); + // Compute _vs from recoveryParam and s + if (result.recoveryParam) { + bytes[32] |= 0x80; + } + result._vs = hexlify(bytes.slice(32, 64)); + } + else { + result.r = signature.r; + result.s = signature.s; + result.v = signature.v; + result.recoveryParam = signature.recoveryParam; + result._vs = signature._vs; + // If the _vs is available, use it to populate missing s, v and recoveryParam + // and verify non-missing s, v and recoveryParam + if (result._vs != null) { + const vs = zeroPad(arrayify(result._vs), 32); + result._vs = hexlify(vs); + // Set or check the recid + const recoveryParam = ((vs[0] >= 128) ? 1 : 0); + if (result.recoveryParam == null) { + result.recoveryParam = recoveryParam; + } + else if (result.recoveryParam !== recoveryParam) { + logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature); + } + // Set or check the s + vs[0] &= 0x7f; + const s = hexlify(vs); + if (result.s == null) { + result.s = s; + } + else if (result.s !== s) { + logger.throwArgumentError("signature v mismatch _vs", "signature", signature); + } + } + // Use recid and v to populate each other + if (result.recoveryParam == null) { + if (result.v == null) { + logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature); + } + else if (result.v === 0 || result.v === 1) { + result.recoveryParam = result.v; + } + else { + result.recoveryParam = 1 - (result.v % 2); + } + } + else { + if (result.v == null) { + result.v = 27 + result.recoveryParam; + } + else { + const recId = (result.v === 0 || result.v === 1) ? result.v : (1 - (result.v % 2)); + if (result.recoveryParam !== recId) { + logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature); + } + } + } + if (result.r == null || !isHexString(result.r)) { + logger.throwArgumentError("signature missing or invalid r", "signature", signature); + } + else { + result.r = hexZeroPad(result.r, 32); + } + if (result.s == null || !isHexString(result.s)) { + logger.throwArgumentError("signature missing or invalid s", "signature", signature); + } + else { + result.s = hexZeroPad(result.s, 32); + } + const vs = arrayify(result.s); + if (vs[0] >= 128) { + logger.throwArgumentError("signature s out of range", "signature", signature); + } + if (result.recoveryParam) { + vs[0] |= 0x80; + } + const _vs = hexlify(vs); + if (result._vs) { + if (!isHexString(result._vs)) { + logger.throwArgumentError("signature invalid _vs", "signature", signature); + } + result._vs = hexZeroPad(result._vs, 32); + } + // Set or check the _vs + if (result._vs == null) { + result._vs = _vs; + } + else if (result._vs !== _vs) { + logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature); + } + } + return result; +} +function joinSignature(signature) { + signature = splitSignature(signature); + return hexlify(concat([ + signature.r, + signature.s, + (signature.recoveryParam ? "0x1c" : "0x1b") + ])); +} + +const version$2 = "bignumber/5.5.0"; + +"use strict"; +var BN = bn.BN; +const logger$1 = new Logger(version$2); +const _constructorGuard = {}; +const MAX_SAFE = 0x1fffffffffffff; +function isBigNumberish(value) { + return (value != null) && (BigNumber.isBigNumber(value) || + (typeof (value) === "number" && (value % 1) === 0) || + (typeof (value) === "string" && !!value.match(/^-?[0-9]+$/)) || + isHexString(value) || + (typeof (value) === "bigint") || + isBytes(value)); +} +// Only warn about passing 10 into radix once +let _warnedToStringRadix = false; +class BigNumber { + constructor(constructorGuard, hex) { + logger$1.checkNew(new.target, BigNumber); + if (constructorGuard !== _constructorGuard) { + logger$1.throwError("cannot call constructor directly; use BigNumber.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new (BigNumber)" + }); + } + this._hex = hex; + this._isBigNumber = true; + Object.freeze(this); + } + fromTwos(value) { + return toBigNumber(toBN(this).fromTwos(value)); + } + toTwos(value) { + return toBigNumber(toBN(this).toTwos(value)); + } + abs() { + if (this._hex[0] === "-") { + return BigNumber.from(this._hex.substring(1)); + } + return this; + } + add(other) { + return toBigNumber(toBN(this).add(toBN(other))); + } + sub(other) { + return toBigNumber(toBN(this).sub(toBN(other))); + } + div(other) { + const o = BigNumber.from(other); + if (o.isZero()) { + throwFault("division by zero", "div"); + } + return toBigNumber(toBN(this).div(toBN(other))); + } + mul(other) { + return toBigNumber(toBN(this).mul(toBN(other))); + } + mod(other) { + const value = toBN(other); + if (value.isNeg()) { + throwFault("cannot modulo negative values", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + } + pow(other) { + const value = toBN(other); + if (value.isNeg()) { + throwFault("cannot raise to negative values", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + } + and(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'and' negative values", "and"); + } + return toBigNumber(toBN(this).and(value)); + } + or(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'or' negative values", "or"); + } + return toBigNumber(toBN(this).or(value)); + } + xor(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'xor' negative values", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + } + mask(value) { + if (this.isNegative() || value < 0) { + throwFault("cannot mask negative values", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + } + shl(value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + } + shr(value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shr"); + } + return toBigNumber(toBN(this).shrn(value)); + } + eq(other) { + return toBN(this).eq(toBN(other)); + } + lt(other) { + return toBN(this).lt(toBN(other)); + } + lte(other) { + return toBN(this).lte(toBN(other)); + } + gt(other) { + return toBN(this).gt(toBN(other)); + } + gte(other) { + return toBN(this).gte(toBN(other)); + } + isNegative() { + return (this._hex[0] === "-"); + } + isZero() { + return toBN(this).isZero(); + } + toNumber() { + try { + return toBN(this).toNumber(); + } + catch (error) { + throwFault("overflow", "toNumber", this.toString()); + } + return null; + } + toBigInt() { + try { + return BigInt(this.toString()); + } + catch (e) { } + return logger$1.throwError("this platform does not support BigInt", Logger.errors.UNSUPPORTED_OPERATION, { + value: this.toString() + }); + } + toString() { + // Lots of people expect this, which we do not support, so check (See: #889) + if (arguments.length > 0) { + if (arguments[0] === 10) { + if (!_warnedToStringRadix) { + _warnedToStringRadix = true; + logger$1.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); + } + } + else if (arguments[0] === 16) { + logger$1.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + else { + logger$1.throwError("BigNumber.toString does not accept parameters", Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + } + return toBN(this).toString(10); + } + toHexString() { + return this._hex; + } + toJSON(key) { + return { type: "BigNumber", hex: this.toHexString() }; + } + static from(value) { + if (value instanceof BigNumber) { + return value; + } + if (typeof (value) === "string") { + if (value.match(/^-?0x[0-9a-f]+$/i)) { + return new BigNumber(_constructorGuard, toHex(value)); + } + if (value.match(/^-?[0-9]+$/)) { + return new BigNumber(_constructorGuard, toHex(new BN(value))); + } + return logger$1.throwArgumentError("invalid BigNumber string", "value", value); + } + if (typeof (value) === "number") { + if (value % 1) { + throwFault("underflow", "BigNumber.from", value); + } + if (value >= MAX_SAFE || value <= -MAX_SAFE) { + throwFault("overflow", "BigNumber.from", value); + } + return BigNumber.from(String(value)); + } + const anyValue = value; + if (typeof (anyValue) === "bigint") { + return BigNumber.from(anyValue.toString()); + } + if (isBytes(anyValue)) { + return BigNumber.from(hexlify(anyValue)); + } + if (anyValue) { + // Hexable interface (takes priority) + if (anyValue.toHexString) { + const hex = anyValue.toHexString(); + if (typeof (hex) === "string") { + return BigNumber.from(hex); + } + } + else { + // For now, handle legacy JSON-ified values (goes away in v6) + let hex = anyValue._hex; + // New-form JSON + if (hex == null && anyValue.type === "BigNumber") { + hex = anyValue.hex; + } + if (typeof (hex) === "string") { + if (isHexString(hex) || (hex[0] === "-" && isHexString(hex.substring(1)))) { + return BigNumber.from(hex); + } + } + } + } + return logger$1.throwArgumentError("invalid BigNumber value", "value", value); + } + static isBigNumber(value) { + return !!(value && value._isBigNumber); + } +} +// Normalize the hex string +function toHex(value) { + // For BN, call on the hex string + if (typeof (value) !== "string") { + return toHex(value.toString(16)); + } + // If negative, prepend the negative sign to the normalized positive value + if (value[0] === "-") { + // Strip off the negative sign + value = value.substring(1); + // Cannot have multiple negative signs (e.g. "--0x04") + if (value[0] === "-") { + logger$1.throwArgumentError("invalid hex", "value", value); + } + // Call toHex on the positive component + value = toHex(value); + // Do not allow "-0x00" + if (value === "0x00") { + return value; + } + // Negate the value + return "-" + value; + } + // Add a "0x" prefix if missing + if (value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + // Normalize zero + if (value === "0x") { + return "0x00"; + } + // Make the string even length + if (value.length % 2) { + value = "0x0" + value.substring(2); + } + // Trim to smallest even-length string + while (value.length > 4 && value.substring(0, 4) === "0x00") { + value = "0x" + value.substring(4); + } + return value; +} +function toBigNumber(value) { + return BigNumber.from(toHex(value)); +} +function toBN(value) { + const hex = BigNumber.from(value).toHexString(); + if (hex[0] === "-") { + return (new BN("-" + hex.substring(3), 16)); + } + return new BN(hex.substring(2), 16); +} +function throwFault(fault, operation, value) { + const params = { fault: fault, operation: operation }; + if (value != null) { + params.value = value; + } + return logger$1.throwError(fault, Logger.errors.NUMERIC_FAULT, params); +} +// value should have no prefix +function _base36To16(value) { + return (new BN(value, 36)).toString(16); +} +// value should have no prefix +function _base16To36(value) { + return (new BN(value, 16)).toString(36); +} + +"use strict"; +const logger$2 = new Logger(version$2); +const _constructorGuard$1 = {}; +const Zero = BigNumber.from(0); +const NegativeOne = BigNumber.from(-1); +function throwFault$1(message, fault, operation, value) { + const params = { fault: fault, operation: operation }; + if (value !== undefined) { + params.value = value; + } + return logger$2.throwError(message, Logger.errors.NUMERIC_FAULT, params); +} +// Constant to pull zeros from for multipliers +let zeros = "0"; +while (zeros.length < 256) { + zeros += zeros; +} +// Returns a string "1" followed by decimal "0"s +function getMultiplier(decimals) { + if (typeof (decimals) !== "number") { + try { + decimals = BigNumber.from(decimals).toNumber(); + } + catch (e) { } + } + if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) { + return ("1" + zeros.substring(0, decimals)); + } + return logger$2.throwArgumentError("invalid decimal size", "decimals", decimals); +} +function formatFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + const multiplier = getMultiplier(decimals); + // Make sure wei is a big number (convert as necessary) + value = BigNumber.from(value); + const negative = value.lt(Zero); + if (negative) { + value = value.mul(NegativeOne); + } + let fraction = value.mod(multiplier).toString(); + while (fraction.length < multiplier.length - 1) { + fraction = "0" + fraction; + } + // Strip training 0 + fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1]; + const whole = value.div(multiplier).toString(); + if (multiplier.length === 1) { + value = whole; + } + else { + value = whole + "." + fraction; + } + if (negative) { + value = "-" + value; + } + return value; +} +function parseFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + const multiplier = getMultiplier(decimals); + if (typeof (value) !== "string" || !value.match(/^-?[0-9.]+$/)) { + logger$2.throwArgumentError("invalid decimal value", "value", value); + } + // Is it negative? + const negative = (value.substring(0, 1) === "-"); + if (negative) { + value = value.substring(1); + } + if (value === ".") { + logger$2.throwArgumentError("missing value", "value", value); + } + // Split it into a whole and fractional part + const comps = value.split("."); + if (comps.length > 2) { + logger$2.throwArgumentError("too many decimal points", "value", value); + } + let whole = comps[0], fraction = comps[1]; + if (!whole) { + whole = "0"; + } + if (!fraction) { + fraction = "0"; + } + // Trim trailing zeros + while (fraction[fraction.length - 1] === "0") { + fraction = fraction.substring(0, fraction.length - 1); + } + // Check the fraction doesn't exceed our decimals size + if (fraction.length > multiplier.length - 1) { + throwFault$1("fractional component exceeds decimals", "underflow", "parseFixed"); + } + // If decimals is 0, we have an empty string for fraction + if (fraction === "") { + fraction = "0"; + } + // Fully pad the string with zeros to get to wei + while (fraction.length < multiplier.length - 1) { + fraction += "0"; + } + const wholeValue = BigNumber.from(whole); + const fractionValue = BigNumber.from(fraction); + let wei = (wholeValue.mul(multiplier)).add(fractionValue); + if (negative) { + wei = wei.mul(NegativeOne); + } + return wei; +} +class FixedFormat { + constructor(constructorGuard, signed, width, decimals) { + if (constructorGuard !== _constructorGuard$1) { + logger$2.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.signed = signed; + this.width = width; + this.decimals = decimals; + this.name = (signed ? "" : "u") + "fixed" + String(width) + "x" + String(decimals); + this._multiplier = getMultiplier(decimals); + Object.freeze(this); + } + static from(value) { + if (value instanceof FixedFormat) { + return value; + } + if (typeof (value) === "number") { + value = `fixed128x${value}`; + } + let signed = true; + let width = 128; + let decimals = 18; + if (typeof (value) === "string") { + if (value === "fixed") { + // defaults... + } + else if (value === "ufixed") { + signed = false; + } + else { + const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/); + if (!match) { + logger$2.throwArgumentError("invalid fixed format", "format", value); + } + signed = (match[1] !== "u"); + width = parseInt(match[2]); + decimals = parseInt(match[3]); + } + } + else if (value) { + const check = (key, type, defaultValue) => { + if (value[key] == null) { + return defaultValue; + } + if (typeof (value[key]) !== type) { + logger$2.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]); + } + return value[key]; + }; + signed = check("signed", "boolean", signed); + width = check("width", "number", width); + decimals = check("decimals", "number", decimals); + } + if (width % 8) { + logger$2.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); + } + if (decimals > 80) { + logger$2.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); + } + return new FixedFormat(_constructorGuard$1, signed, width, decimals); + } +} +class FixedNumber { + constructor(constructorGuard, hex, value, format) { + logger$2.checkNew(new.target, FixedNumber); + if (constructorGuard !== _constructorGuard$1) { + logger$2.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.format = format; + this._hex = hex; + this._value = value; + this._isFixedNumber = true; + Object.freeze(this); + } + _checkFormat(other) { + if (this.format.name !== other.format.name) { + logger$2.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); + } + } + addUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format); + } + subUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format); + } + mulUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format); + } + divUnsafe(other) { + this._checkFormat(other); + const a = parseFixed(this._value, this.format.decimals); + const b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format); + } + floor() { + const comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + let result = FixedNumber.from(comps[0], this.format); + const hasFraction = !comps[1].match(/^(0*)$/); + if (this.isNegative() && hasFraction) { + result = result.subUnsafe(ONE.toFormat(result.format)); + } + return result; + } + ceiling() { + const comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + let result = FixedNumber.from(comps[0], this.format); + const hasFraction = !comps[1].match(/^(0*)$/); + if (!this.isNegative() && hasFraction) { + result = result.addUnsafe(ONE.toFormat(result.format)); + } + return result; + } + // @TODO: Support other rounding algorithms + round(decimals) { + if (decimals == null) { + decimals = 0; + } + // If we are already in range, we're done + const comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + if (decimals < 0 || decimals > 80 || (decimals % 1)) { + logger$2.throwArgumentError("invalid decimal count", "decimals", decimals); + } + if (comps[1].length <= decimals) { + return this; + } + const factor = FixedNumber.from("1" + zeros.substring(0, decimals), this.format); + const bump = BUMP.toFormat(this.format); + return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor); + } + isZero() { + return (this._value === "0.0" || this._value === "0"); + } + isNegative() { + return (this._value[0] === "-"); + } + toString() { return this._value; } + toHexString(width) { + if (width == null) { + return this._hex; + } + if (width % 8) { + logger$2.throwArgumentError("invalid byte width", "width", width); + } + const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(); + return hexZeroPad(hex, width / 8); + } + toUnsafeFloat() { return parseFloat(this.toString()); } + toFormat(format) { + return FixedNumber.fromString(this._value, format); + } + static fromValue(value, decimals, format) { + // If decimals looks more like a format, and there is no format, shift the parameters + if (format == null && decimals != null && !isBigNumberish(decimals)) { + format = decimals; + decimals = null; + } + if (decimals == null) { + decimals = 0; + } + if (format == null) { + format = "fixed"; + } + return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format)); + } + static fromString(value, format) { + if (format == null) { + format = "fixed"; + } + const fixedFormat = FixedFormat.from(format); + const numeric = parseFixed(value, fixedFormat.decimals); + if (!fixedFormat.signed && numeric.lt(Zero)) { + throwFault$1("unsigned value cannot be negative", "overflow", "value", value); + } + let hex = null; + if (fixedFormat.signed) { + hex = numeric.toTwos(fixedFormat.width).toHexString(); + } + else { + hex = numeric.toHexString(); + hex = hexZeroPad(hex, fixedFormat.width / 8); + } + const decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard$1, hex, decimal, fixedFormat); + } + static fromBytes(value, format) { + if (format == null) { + format = "fixed"; + } + const fixedFormat = FixedFormat.from(format); + if (arrayify(value).length > fixedFormat.width / 8) { + throw new Error("overflow"); + } + let numeric = BigNumber.from(value); + if (fixedFormat.signed) { + numeric = numeric.fromTwos(fixedFormat.width); + } + const hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString(); + const decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard$1, hex, decimal, fixedFormat); + } + static from(value, format) { + if (typeof (value) === "string") { + return FixedNumber.fromString(value, format); + } + if (isBytes(value)) { + return FixedNumber.fromBytes(value, format); + } + try { + return FixedNumber.fromValue(value, 0, format); + } + catch (error) { + // Allow NUMERIC_FAULT to bubble up + if (error.code !== Logger.errors.INVALID_ARGUMENT) { + throw error; + } + } + return logger$2.throwArgumentError("invalid FixedNumber value", "value", value); + } + static isFixedNumber(value) { + return !!(value && value._isFixedNumber); + } +} +const ONE = FixedNumber.from(1); +const BUMP = FixedNumber.from("0.5"); + +const version$3 = "properties/5.5.0"; + +"use strict"; +var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$3 = new Logger(version$3); +function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +// Crawl up the constructor chain to find a static method +function getStatic(ctor, key) { + for (let i = 0; i < 32; i++) { + if (ctor[key]) { + return ctor[key]; + } + if (!ctor.prototype || typeof (ctor.prototype) !== "object") { + break; + } + ctor = Object.getPrototypeOf(ctor.prototype).constructor; + } + return null; +} +function resolveProperties(object) { + return __awaiter(this, void 0, void 0, function* () { + const promises = Object.keys(object).map((key) => { + const value = object[key]; + return Promise.resolve(value).then((v) => ({ key: key, value: v })); + }); + const results = yield Promise.all(promises); + return results.reduce((accum, result) => { + accum[(result.key)] = result.value; + return accum; + }, {}); + }); +} +function checkProperties(object, properties) { + if (!object || typeof (object) !== "object") { + logger$3.throwArgumentError("invalid object", "object", object); + } + Object.keys(object).forEach((key) => { + if (!properties[key]) { + logger$3.throwArgumentError("invalid object key - " + key, "transaction:" + key, object); + } + }); +} +function shallowCopy(object) { + const result = {}; + for (const key in object) { + result[key] = object[key]; + } + return result; +} +const opaque = { bigint: true, boolean: true, "function": true, number: true, string: true }; +function _isFrozen(object) { + // Opaque objects are not mutable, so safe to copy by assignment + if (object === undefined || object === null || opaque[typeof (object)]) { + return true; + } + if (Array.isArray(object) || typeof (object) === "object") { + if (!Object.isFrozen(object)) { + return false; + } + const keys = Object.keys(object); + for (let i = 0; i < keys.length; i++) { + let value = null; + try { + value = object[keys[i]]; + } + catch (error) { + // If accessing a value triggers an error, it is a getter + // designed to do so (e.g. Result) and is therefore "frozen" + continue; + } + if (!_isFrozen(value)) { + return false; + } + } + return true; + } + return logger$3.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, "object", object); +} +// Returns a new copy of object, such that no properties may be replaced. +// New properties may be added only to objects. +function _deepCopy(object) { + if (_isFrozen(object)) { + return object; + } + // Arrays are mutable, so we need to create a copy + if (Array.isArray(object)) { + return Object.freeze(object.map((item) => deepCopy(item))); + } + if (typeof (object) === "object") { + const result = {}; + for (const key in object) { + const value = object[key]; + if (value === undefined) { + continue; + } + defineReadOnly(result, key, deepCopy(value)); + } + return result; + } + return logger$3.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, "object", object); +} +function deepCopy(object) { + return _deepCopy(object); +} +class Description { + constructor(info) { + for (const key in info) { + this[key] = deepCopy(info[key]); + } + } +} + +const version$4 = "abi/5.5.0"; + +"use strict"; +const logger$4 = new Logger(version$4); +; +const _constructorGuard$2 = {}; +let ModifiersBytes = { calldata: true, memory: true, storage: true }; +let ModifiersNest = { calldata: true, memory: true }; +function checkModifier(type, name) { + if (type === "bytes" || type === "string") { + if (ModifiersBytes[name]) { + return true; + } + } + else if (type === "address") { + if (name === "payable") { + return true; + } + } + else if (type.indexOf("[") >= 0 || type === "tuple") { + if (ModifiersNest[name]) { + return true; + } + } + if (ModifiersBytes[name] || name === "payable") { + logger$4.throwArgumentError("invalid modifier", "name", name); + } + return false; +} +// @TODO: Make sure that children of an indexed tuple are marked with a null indexed +function parseParamType(param, allowIndexed) { + let originalParam = param; + function throwError(i) { + logger$4.throwArgumentError(`unexpected character at position ${i}`, "param", param); + } + param = param.replace(/\s/g, " "); + function newNode(parent) { + let node = { type: "", name: "", parent: parent, state: { allowType: true } }; + if (allowIndexed) { + node.indexed = false; + } + return node; + } + let parent = { type: "", name: "", state: { allowType: true } }; + let node = parent; + for (let i = 0; i < param.length; i++) { + let c = param[i]; + switch (c) { + case "(": + if (node.state.allowType && node.type === "") { + node.type = "tuple"; + } + else if (!node.state.allowParams) { + throwError(i); + } + node.state.allowType = false; + node.type = verifyType(node.type); + node.components = [newNode(node)]; + node = node.components[0]; + break; + case ")": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + let child = node; + node = node.parent; + if (!node) { + throwError(i); + } + delete child.parent; + node.state.allowParams = false; + node.state.allowName = true; + node.state.allowArray = true; + break; + case ",": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + let sibling = newNode(node.parent); + //{ type: "", name: "", parent: node.parent, state: { allowType: true } }; + node.parent.components.push(sibling); + delete node.parent; + node = sibling; + break; + // Hit a space... + case " ": + // If reading type, the type is done and may read a param or name + if (node.state.allowType) { + if (node.type !== "") { + node.type = verifyType(node.type); + delete node.state.allowType; + node.state.allowName = true; + node.state.allowParams = true; + } + } + // If reading name, the name is done + if (node.state.allowName) { + if (node.name !== "") { + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + if (node.indexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + else { + node.state.allowName = false; + } + } + } + break; + case "[": + if (!node.state.allowArray) { + throwError(i); + } + node.type += c; + node.state.allowArray = false; + node.state.allowName = false; + node.state.readArray = true; + break; + case "]": + if (!node.state.readArray) { + throwError(i); + } + node.type += c; + node.state.readArray = false; + node.state.allowArray = true; + node.state.allowName = true; + break; + default: + if (node.state.allowType) { + node.type += c; + node.state.allowParams = true; + node.state.allowArray = true; + } + else if (node.state.allowName) { + node.name += c; + delete node.state.allowArray; + } + else if (node.state.readArray) { + node.type += c; + } + else { + throwError(i); + } + } + } + if (node.parent) { + logger$4.throwArgumentError("unexpected eof", "param", param); + } + delete parent.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(originalParam.length - 7); + } + if (node.indexed) { + throwError(originalParam.length - 7); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + parent.type = verifyType(parent.type); + return parent; +} +function populate(object, params) { + for (let key in params) { + defineReadOnly(object, key, params[key]); + } +} +const FormatTypes = Object.freeze({ + // Bare formatting, as is needed for computing a sighash of an event or function + sighash: "sighash", + // Human-Readable with Minimal spacing and without names (compact human-readable) + minimal: "minimal", + // Human-Readable with nice spacing, including all names + full: "full", + // JSON-format a la Solidity + json: "json" +}); +const paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/); +class ParamType { + constructor(constructorGuard, params) { + if (constructorGuard !== _constructorGuard$2) { + logger$4.throwError("use fromString", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new ParamType()" + }); + } + populate(this, params); + let match = this.type.match(paramTypeArray); + if (match) { + populate(this, { + arrayLength: parseInt(match[2] || "-1"), + arrayChildren: ParamType.fromObject({ + type: match[1], + components: this.components + }), + baseType: "array" + }); + } + else { + populate(this, { + arrayLength: null, + arrayChildren: null, + baseType: ((this.components != null) ? "tuple" : this.type) + }); + } + this._isParamType = true; + Object.freeze(this); + } + // Format the parameter fragment + // - sighash: "(uint256,address)" + // - minimal: "tuple(uint256,address) indexed" + // - full: "tuple(uint256 foo, address bar) indexed baz" + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger$4.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + let result = { + type: ((this.baseType === "tuple") ? "tuple" : this.type), + name: (this.name || undefined) + }; + if (typeof (this.indexed) === "boolean") { + result.indexed = this.indexed; + } + if (this.components) { + result.components = this.components.map((comp) => JSON.parse(comp.format(format))); + } + return JSON.stringify(result); + } + let result = ""; + // Array + if (this.baseType === "array") { + result += this.arrayChildren.format(format); + result += "[" + (this.arrayLength < 0 ? "" : String(this.arrayLength)) + "]"; + } + else { + if (this.baseType === "tuple") { + if (format !== FormatTypes.sighash) { + result += this.type; + } + result += "(" + this.components.map((comp) => comp.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ")"; + } + else { + result += this.type; + } + } + if (format !== FormatTypes.sighash) { + if (this.indexed === true) { + result += " indexed"; + } + if (format === FormatTypes.full && this.name) { + result += " " + this.name; + } + } + return result; + } + static from(value, allowIndexed) { + if (typeof (value) === "string") { + return ParamType.fromString(value, allowIndexed); + } + return ParamType.fromObject(value); + } + static fromObject(value) { + if (ParamType.isParamType(value)) { + return value; + } + return new ParamType(_constructorGuard$2, { + name: (value.name || null), + type: verifyType(value.type), + indexed: ((value.indexed == null) ? null : !!value.indexed), + components: (value.components ? value.components.map(ParamType.fromObject) : null) + }); + } + static fromString(value, allowIndexed) { + function ParamTypify(node) { + return ParamType.fromObject({ + name: node.name, + type: node.type, + indexed: node.indexed, + components: node.components + }); + } + return ParamTypify(parseParamType(value, !!allowIndexed)); + } + static isParamType(value) { + return !!(value != null && value._isParamType); + } +} +; +function parseParams(value, allowIndex) { + return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex)); +} +class Fragment { + constructor(constructorGuard, params) { + if (constructorGuard !== _constructorGuard$2) { + logger$4.throwError("use a static from method", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Fragment()" + }); + } + populate(this, params); + this._isFragment = true; + Object.freeze(this); + } + static from(value) { + if (Fragment.isFragment(value)) { + return value; + } + if (typeof (value) === "string") { + return Fragment.fromString(value); + } + return Fragment.fromObject(value); + } + static fromObject(value) { + if (Fragment.isFragment(value)) { + return value; + } + switch (value.type) { + case "function": + return FunctionFragment.fromObject(value); + case "event": + return EventFragment.fromObject(value); + case "constructor": + return ConstructorFragment.fromObject(value); + case "error": + return ErrorFragment.fromObject(value); + case "fallback": + case "receive": + // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment? + return null; + } + return logger$4.throwArgumentError("invalid fragment object", "value", value); + } + static fromString(value) { + // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space + value = value.replace(/\s/g, " "); + value = value.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " "); + value = value.trim(); + if (value.split(" ")[0] === "event") { + return EventFragment.fromString(value.substring(5).trim()); + } + else if (value.split(" ")[0] === "function") { + return FunctionFragment.fromString(value.substring(8).trim()); + } + else if (value.split("(")[0].trim() === "constructor") { + return ConstructorFragment.fromString(value.trim()); + } + else if (value.split(" ")[0] === "error") { + return ErrorFragment.fromString(value.substring(5).trim()); + } + return logger$4.throwArgumentError("unsupported fragment", "value", value); + } + static isFragment(value) { + return !!(value && value._isFragment); + } +} +class EventFragment extends Fragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger$4.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "event", + anonymous: this.anonymous, + name: this.name, + inputs: this.inputs.map((input) => JSON.parse(input.format(format))) + }); + } + let result = ""; + if (format !== FormatTypes.sighash) { + result += "event "; + } + result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + if (format !== FormatTypes.sighash) { + if (this.anonymous) { + result += "anonymous "; + } + } + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return EventFragment.fromString(value); + } + return EventFragment.fromObject(value); + } + static fromObject(value) { + if (EventFragment.isEventFragment(value)) { + return value; + } + if (value.type !== "event") { + logger$4.throwArgumentError("invalid event object", "value", value); + } + const params = { + name: verifyIdentifier(value.name), + anonymous: value.anonymous, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + type: "event" + }; + return new EventFragment(_constructorGuard$2, params); + } + static fromString(value) { + let match = value.match(regexParen); + if (!match) { + logger$4.throwArgumentError("invalid event string", "value", value); + } + let anonymous = false; + match[3].split(" ").forEach((modifier) => { + switch (modifier.trim()) { + case "anonymous": + anonymous = true; + break; + case "": + break; + default: + logger$4.warn("unknown modifier: " + modifier); + } + }); + return EventFragment.fromObject({ + name: match[1].trim(), + anonymous: anonymous, + inputs: parseParams(match[2], true), + type: "event" + }); + } + static isEventFragment(value) { + return (value && value._isFragment && value.type === "event"); + } +} +function parseGas(value, params) { + params.gas = null; + let comps = value.split("@"); + if (comps.length !== 1) { + if (comps.length > 2) { + logger$4.throwArgumentError("invalid human-readable ABI signature", "value", value); + } + if (!comps[1].match(/^[0-9]+$/)) { + logger$4.throwArgumentError("invalid human-readable ABI signature gas", "value", value); + } + params.gas = BigNumber.from(comps[1]); + return comps[0]; + } + return value; +} +function parseModifiers(value, params) { + params.constant = false; + params.payable = false; + params.stateMutability = "nonpayable"; + value.split(" ").forEach((modifier) => { + switch (modifier.trim()) { + case "constant": + params.constant = true; + break; + case "payable": + params.payable = true; + params.stateMutability = "payable"; + break; + case "nonpayable": + params.payable = false; + params.stateMutability = "nonpayable"; + break; + case "pure": + params.constant = true; + params.stateMutability = "pure"; + break; + case "view": + params.constant = true; + params.stateMutability = "view"; + break; + case "external": + case "public": + case "": + break; + default: + console.log("unknown modifier: " + modifier); + } + }); +} +function verifyState(value) { + let result = { + constant: false, + payable: true, + stateMutability: "payable" + }; + if (value.stateMutability != null) { + result.stateMutability = value.stateMutability; + // Set (and check things are consistent) the constant property + result.constant = (result.stateMutability === "view" || result.stateMutability === "pure"); + if (value.constant != null) { + if ((!!value.constant) !== result.constant) { + logger$4.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); + } + } + // Set (and check things are consistent) the payable property + result.payable = (result.stateMutability === "payable"); + if (value.payable != null) { + if ((!!value.payable) !== result.payable) { + logger$4.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); + } + } + } + else if (value.payable != null) { + result.payable = !!value.payable; + // If payable we can assume non-constant; otherwise we can't assume + if (value.constant == null && !result.payable && value.type !== "constructor") { + logger$4.throwArgumentError("unable to determine stateMutability", "value", value); + } + result.constant = !!value.constant; + if (result.constant) { + result.stateMutability = "view"; + } + else { + result.stateMutability = (result.payable ? "payable" : "nonpayable"); + } + if (result.payable && result.constant) { + logger$4.throwArgumentError("cannot have constant payable function", "value", value); + } + } + else if (value.constant != null) { + result.constant = !!value.constant; + result.payable = !result.constant; + result.stateMutability = (result.constant ? "view" : "payable"); + } + else if (value.type !== "constructor") { + logger$4.throwArgumentError("unable to determine stateMutability", "value", value); + } + return result; +} +class ConstructorFragment extends Fragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger$4.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "constructor", + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map((input) => JSON.parse(input.format(format))) + }); + } + if (format === FormatTypes.sighash) { + logger$4.throwError("cannot format a constructor for sighash", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "format(sighash)" + }); + } + let result = "constructor(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + if (this.stateMutability && this.stateMutability !== "nonpayable") { + result += this.stateMutability + " "; + } + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return ConstructorFragment.fromString(value); + } + return ConstructorFragment.fromObject(value); + } + static fromObject(value) { + if (ConstructorFragment.isConstructorFragment(value)) { + return value; + } + if (value.type !== "constructor") { + logger$4.throwArgumentError("invalid constructor object", "value", value); + } + let state = verifyState(value); + if (state.constant) { + logger$4.throwArgumentError("constructor cannot be constant", "value", value); + } + const params = { + name: null, + type: value.type, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? BigNumber.from(value.gas) : null) + }; + return new ConstructorFragment(_constructorGuard$2, params); + } + static fromString(value) { + let params = { type: "constructor" }; + value = parseGas(value, params); + let parens = value.match(regexParen); + if (!parens || parens[1].trim() !== "constructor") { + logger$4.throwArgumentError("invalid constructor string", "value", value); + } + params.inputs = parseParams(parens[2].trim(), false); + parseModifiers(parens[3].trim(), params); + return ConstructorFragment.fromObject(params); + } + static isConstructorFragment(value) { + return (value && value._isFragment && value.type === "constructor"); + } +} +class FunctionFragment extends ConstructorFragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger$4.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "function", + name: this.name, + constant: this.constant, + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map((input) => JSON.parse(input.format(format))), + outputs: this.outputs.map((output) => JSON.parse(output.format(format))), + }); + } + let result = ""; + if (format !== FormatTypes.sighash) { + result += "function "; + } + result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + if (format !== FormatTypes.sighash) { + if (this.stateMutability) { + if (this.stateMutability !== "nonpayable") { + result += (this.stateMutability + " "); + } + } + else if (this.constant) { + result += "view "; + } + if (this.outputs && this.outputs.length) { + result += "returns (" + this.outputs.map((output) => output.format(format)).join(", ") + ") "; + } + if (this.gas != null) { + result += "@" + this.gas.toString() + " "; + } + } + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return FunctionFragment.fromString(value); + } + return FunctionFragment.fromObject(value); + } + static fromObject(value) { + if (FunctionFragment.isFunctionFragment(value)) { + return value; + } + if (value.type !== "function") { + logger$4.throwArgumentError("invalid function object", "value", value); + } + let state = verifyState(value); + const params = { + type: value.type, + name: verifyIdentifier(value.name), + constant: state.constant, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + outputs: (value.outputs ? value.outputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? BigNumber.from(value.gas) : null) + }; + return new FunctionFragment(_constructorGuard$2, params); + } + static fromString(value) { + let params = { type: "function" }; + value = parseGas(value, params); + let comps = value.split(" returns "); + if (comps.length > 2) { + logger$4.throwArgumentError("invalid function string", "value", value); + } + let parens = comps[0].match(regexParen); + if (!parens) { + logger$4.throwArgumentError("invalid function signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + parseModifiers(parens[3].trim(), params); + // We have outputs + if (comps.length > 1) { + let returns = comps[1].match(regexParen); + if (returns[1].trim() != "" || returns[3].trim() != "") { + logger$4.throwArgumentError("unexpected tokens", "value", value); + } + params.outputs = parseParams(returns[2], false); + } + else { + params.outputs = []; + } + return FunctionFragment.fromObject(params); + } + static isFunctionFragment(value) { + return (value && value._isFragment && value.type === "function"); + } +} +//export class StructFragment extends Fragment { +//} +function checkForbidden(fragment) { + const sig = fragment.format(); + if (sig === "Error(string)" || sig === "Panic(uint256)") { + logger$4.throwArgumentError(`cannot specify user defined ${sig} error`, "fragment", fragment); + } + return fragment; +} +class ErrorFragment extends Fragment { + format(format) { + if (!format) { + format = FormatTypes.sighash; + } + if (!FormatTypes[format]) { + logger$4.throwArgumentError("invalid format type", "format", format); + } + if (format === FormatTypes.json) { + return JSON.stringify({ + type: "error", + name: this.name, + inputs: this.inputs.map((input) => JSON.parse(input.format(format))), + }); + } + let result = ""; + if (format !== FormatTypes.sighash) { + result += "error "; + } + result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? ", " : ",") + ") "; + return result.trim(); + } + static from(value) { + if (typeof (value) === "string") { + return ErrorFragment.fromString(value); + } + return ErrorFragment.fromObject(value); + } + static fromObject(value) { + if (ErrorFragment.isErrorFragment(value)) { + return value; + } + if (value.type !== "error") { + logger$4.throwArgumentError("invalid error object", "value", value); + } + const params = { + type: value.type, + name: verifyIdentifier(value.name), + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []) + }; + return checkForbidden(new ErrorFragment(_constructorGuard$2, params)); + } + static fromString(value) { + let params = { type: "error" }; + let parens = value.match(regexParen); + if (!parens) { + logger$4.throwArgumentError("invalid error signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + return checkForbidden(ErrorFragment.fromObject(params)); + } + static isErrorFragment(value) { + return (value && value._isFragment && value.type === "error"); + } +} +function verifyType(type) { + // These need to be transformed to their full description + if (type.match(/^uint($|[^1-9])/)) { + type = "uint256" + type.substring(4); + } + else if (type.match(/^int($|[^1-9])/)) { + type = "int256" + type.substring(3); + } + // @TODO: more verification + return type; +} +// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234 +const regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$"); +function verifyIdentifier(value) { + if (!value || !value.match(regexIdentifier)) { + logger$4.throwArgumentError(`invalid identifier "${value}"`, "value", value); + } + return value; +} +const regexParen = new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"); +function splitNesting(value) { + value = value.trim(); + let result = []; + let accum = ""; + let depth = 0; + for (let offset = 0; offset < value.length; offset++) { + let c = value[offset]; + if (c === "," && depth === 0) { + result.push(accum); + accum = ""; + } + else { + accum += c; + if (c === "(") { + depth++; + } + else if (c === ")") { + depth--; + if (depth === -1) { + logger$4.throwArgumentError("unbalanced parenthesis", "value", value); + } + } + } + } + if (accum) { + result.push(accum); + } + return result; +} + +"use strict"; +const logger$5 = new Logger(version$4); +function checkResultErrors(result) { + // Find the first error (if any) + const errors = []; + const checkErrors = function (path, object) { + if (!Array.isArray(object)) { + return; + } + for (let key in object) { + const childPath = path.slice(); + childPath.push(key); + try { + checkErrors(childPath, object[key]); + } + catch (error) { + errors.push({ path: childPath, error: error }); + } + } + }; + checkErrors([], result); + return errors; +} +class Coder { + constructor(name, type, localName, dynamic) { + // @TODO: defineReadOnly these + this.name = name; + this.type = type; + this.localName = localName; + this.dynamic = dynamic; + } + _throwError(message, value) { + logger$5.throwArgumentError(message, this.localName, value); + } +} +class Writer { + constructor(wordSize) { + defineReadOnly(this, "wordSize", wordSize || 32); + this._data = []; + this._dataLength = 0; + this._padding = new Uint8Array(wordSize); + } + get data() { + return hexConcat(this._data); + } + get length() { return this._dataLength; } + _writeData(data) { + this._data.push(data); + this._dataLength += data.length; + return data.length; + } + appendWriter(writer) { + return this._writeData(concat(writer._data)); + } + // Arrayish items; padded on the right to wordSize + writeBytes(value) { + let bytes = arrayify(value); + const paddingOffset = bytes.length % this.wordSize; + if (paddingOffset) { + bytes = concat([bytes, this._padding.slice(paddingOffset)]); + } + return this._writeData(bytes); + } + _getValue(value) { + let bytes = arrayify(BigNumber.from(value)); + if (bytes.length > this.wordSize) { + logger$5.throwError("value out-of-bounds", Logger.errors.BUFFER_OVERRUN, { + length: this.wordSize, + offset: bytes.length + }); + } + if (bytes.length % this.wordSize) { + bytes = concat([this._padding.slice(bytes.length % this.wordSize), bytes]); + } + return bytes; + } + // BigNumberish items; padded on the left to wordSize + writeValue(value) { + return this._writeData(this._getValue(value)); + } + writeUpdatableValue() { + const offset = this._data.length; + this._data.push(this._padding); + this._dataLength += this.wordSize; + return (value) => { + this._data[offset] = this._getValue(value); + }; + } +} +class Reader { + constructor(data, wordSize, coerceFunc, allowLoose) { + defineReadOnly(this, "_data", arrayify(data)); + defineReadOnly(this, "wordSize", wordSize || 32); + defineReadOnly(this, "_coerceFunc", coerceFunc); + defineReadOnly(this, "allowLoose", allowLoose); + this._offset = 0; + } + get data() { return hexlify(this._data); } + get consumed() { return this._offset; } + // The default Coerce function + static coerce(name, value) { + let match = name.match("^u?int([0-9]+)$"); + if (match && parseInt(match[1]) <= 48) { + value = value.toNumber(); + } + return value; + } + coerce(name, value) { + if (this._coerceFunc) { + return this._coerceFunc(name, value); + } + return Reader.coerce(name, value); + } + _peekBytes(offset, length, loose) { + let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize; + if (this._offset + alignedLength > this._data.length) { + if (this.allowLoose && loose && this._offset + length <= this._data.length) { + alignedLength = length; + } + else { + logger$5.throwError("data out-of-bounds", Logger.errors.BUFFER_OVERRUN, { + length: this._data.length, + offset: this._offset + alignedLength + }); + } + } + return this._data.slice(this._offset, this._offset + alignedLength); + } + subReader(offset) { + return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose); + } + readBytes(length, loose) { + let bytes = this._peekBytes(0, length, !!loose); + this._offset += bytes.length; + // @TODO: Make sure the length..end bytes are all 0? + return bytes.slice(0, length); + } + readValue() { + return BigNumber.from(this.readBytes(this.wordSize)); + } +} + +var sha3 = createCommonjsModule(function (module) { +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +/*jslint bitwise: true */ +(function () { + 'use strict'; + + var INPUT_ERROR = 'input is invalid type'; + var FINALIZE_ERROR = 'finalize already called'; + var WINDOW = typeof window === 'object'; + var root = WINDOW ? window : {}; + if (root.JS_SHA3_NO_WINDOW) { + WINDOW = false; + } + var WEB_WORKER = !WINDOW && typeof self === 'object'; + var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; + if (NODE_JS) { + root = commonjsGlobal; + } else if (WEB_WORKER) { + root = self; + } + var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && 'object' === 'object' && module.exports; + var AMD = typeof undefined === 'function' && undefined.amd; + var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; + var HEX_CHARS = '0123456789abcdef'.split(''); + var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; + var CSHAKE_PADDING = [4, 1024, 262144, 67108864]; + var KECCAK_PADDING = [1, 256, 65536, 16777216]; + var PADDING = [6, 1536, 393216, 100663296]; + var SHIFT = [0, 8, 16, 24]; + var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, + 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, + 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, + 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, + 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; + var BITS = [224, 256, 384, 512]; + var SHAKE_BITS = [128, 256]; + var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest']; + var CSHAKE_BYTEPAD = { + '128': 168, + '256': 136 + }; + + if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) { + Array.isArray = function (obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; + }; + } + + if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { + ArrayBuffer.isView = function (obj) { + return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; + }; + } + + var createOutputMethod = function (bits, padding, outputType) { + return function (message) { + return new Keccak(bits, padding, bits).update(message)[outputType](); + }; + }; + + var createShakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits) { + return new Keccak(bits, padding, outputBits).update(message)[outputType](); + }; + }; + + var createCshakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits, n, s) { + return methods['cshake' + bits].update(message, outputBits, n, s)[outputType](); + }; + }; + + var createKmacOutputMethod = function (bits, padding, outputType) { + return function (key, message, outputBits, s) { + return methods['kmac' + bits].update(key, message, outputBits, s)[outputType](); + }; + }; + + var createOutputMethods = function (method, createMethod, bits, padding) { + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createMethod(bits, padding, type); + } + return method; + }; + + var createMethod = function (bits, padding) { + var method = createOutputMethod(bits, padding, 'hex'); + method.create = function () { + return new Keccak(bits, padding, bits); + }; + method.update = function (message) { + return method.create().update(message); + }; + return createOutputMethods(method, createOutputMethod, bits, padding); + }; + + var createShakeMethod = function (bits, padding) { + var method = createShakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits) { + return new Keccak(bits, padding, outputBits); + }; + method.update = function (message, outputBits) { + return method.create(outputBits).update(message); + }; + return createOutputMethods(method, createShakeOutputMethod, bits, padding); + }; + + var createCshakeMethod = function (bits, padding) { + var w = CSHAKE_BYTEPAD[bits]; + var method = createCshakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits, n, s) { + if (!n && !s) { + return methods['shake' + bits].create(outputBits); + } else { + return new Keccak(bits, padding, outputBits).bytepad([n, s], w); + } + }; + method.update = function (message, outputBits, n, s) { + return method.create(outputBits, n, s).update(message); + }; + return createOutputMethods(method, createCshakeOutputMethod, bits, padding); + }; + + var createKmacMethod = function (bits, padding) { + var w = CSHAKE_BYTEPAD[bits]; + var method = createKmacOutputMethod(bits, padding, 'hex'); + method.create = function (key, outputBits, s) { + return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w); + }; + method.update = function (key, message, outputBits, s) { + return method.create(key, outputBits, s).update(message); + }; + return createOutputMethods(method, createKmacOutputMethod, bits, padding); + }; + + var algorithms = [ + { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod }, + { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod }, + { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod }, + { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod }, + { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod } + ]; + + var methods = {}, methodNames = []; + + for (var i = 0; i < algorithms.length; ++i) { + var algorithm = algorithms[i]; + var bits = algorithm.bits; + for (var j = 0; j < bits.length; ++j) { + var methodName = algorithm.name + '_' + bits[j]; + methodNames.push(methodName); + methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding); + if (algorithm.name !== 'sha3') { + var newMethodName = algorithm.name + bits[j]; + methodNames.push(newMethodName); + methods[newMethodName] = methods[methodName]; + } + } + } + + function Keccak(bits, padding, outputBits) { + this.blocks = []; + this.s = []; + this.padding = padding; + this.outputBits = outputBits; + this.reset = true; + this.finalized = false; + this.block = 0; + this.start = 0; + this.blockCount = (1600 - (bits << 1)) >> 5; + this.byteCount = this.blockCount << 2; + this.outputBlocks = outputBits >> 5; + this.extraBytes = (outputBits & 31) >> 3; + + for (var i = 0; i < 50; ++i) { + this.s[i] = 0; + } + } + + Keccak.prototype.update = function (message) { + if (this.finalized) { + throw new Error(FINALIZE_ERROR); + } + var notString, type = typeof message; + if (type !== 'string') { + if (type === 'object') { + if (message === null) { + throw new Error(INPUT_ERROR); + } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } else if (!Array.isArray(message)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { + throw new Error(INPUT_ERROR); + } + } + } else { + throw new Error(INPUT_ERROR); + } + notString = true; + } + var blocks = this.blocks, byteCount = this.byteCount, length = message.length, + blockCount = this.blockCount, index = 0, s = this.s, i, code; + + while (index < length) { + if (this.reset) { + this.reset = false; + blocks[0] = this.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (notString) { + for (i = this.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + if (i >= byteCount) { + this.start = i - byteCount; + this.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + this.reset = true; + } else { + this.start = i; + } + } + return this; + }; + + Keccak.prototype.encode = function (x, right) { + var o = x & 255, n = 1; + var bytes = [o]; + x = x >> 8; + o = x & 255; + while (o > 0) { + bytes.unshift(o); + x = x >> 8; + o = x & 255; + ++n; + } + if (right) { + bytes.push(n); + } else { + bytes.unshift(n); + } + this.update(bytes); + return bytes.length; + }; + + Keccak.prototype.encodeString = function (str) { + var notString, type = typeof str; + if (type !== 'string') { + if (type === 'object') { + if (str === null) { + throw new Error(INPUT_ERROR); + } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) { + str = new Uint8Array(str); + } else if (!Array.isArray(str)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) { + throw new Error(INPUT_ERROR); + } + } + } else { + throw new Error(INPUT_ERROR); + } + notString = true; + } + var bytes = 0, length = str.length; + if (notString) { + bytes = length; + } else { + for (var i = 0; i < str.length; ++i) { + var code = str.charCodeAt(i); + if (code < 0x80) { + bytes += 1; + } else if (code < 0x800) { + bytes += 2; + } else if (code < 0xd800 || code >= 0xe000) { + bytes += 3; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff)); + bytes += 4; + } + } + } + bytes += this.encode(bytes * 8); + this.update(str); + return bytes; + }; + + Keccak.prototype.bytepad = function (strs, w) { + var bytes = this.encode(w); + for (var i = 0; i < strs.length; ++i) { + bytes += this.encodeString(strs[i]); + } + var paddingBytes = w - bytes % w; + var zeros = []; + zeros.length = paddingBytes; + this.update(zeros); + return this; + }; + + Keccak.prototype.finalize = function () { + if (this.finalized) { + return; + } + this.finalized = true; + var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; + blocks[i >> 2] |= this.padding[i & 3]; + if (this.lastByteIndex === this.byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + }; + + Keccak.prototype.toString = Keccak.prototype.hex = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var hex = '', block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + + HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + + HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + + HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + if (extraBytes) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; + if (extraBytes > 1) { + hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; + } + if (extraBytes > 2) { + hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; + } + } + return hex; + }; + + Keccak.prototype.arrayBuffer = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var bytes = this.outputBits >> 3; + var buffer; + if (extraBytes) { + buffer = new ArrayBuffer((outputBlocks + 1) << 2); + } else { + buffer = new ArrayBuffer(bytes); + } + var array = new Uint32Array(buffer); + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + array[j] = s[i]; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + array[i] = s[i]; + buffer = buffer.slice(0, bytes); + } + return buffer; + }; + + Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; + + Keccak.prototype.digest = Keccak.prototype.array = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var array = [], offset, block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + array[offset + 1] = (block >> 8) & 0xFF; + array[offset + 2] = (block >> 16) & 0xFF; + array[offset + 3] = (block >> 24) & 0xFF; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + if (extraBytes > 1) { + array[offset + 1] = (block >> 8) & 0xFF; + } + if (extraBytes > 2) { + array[offset + 2] = (block >> 16) & 0xFF; + } + } + return array; + }; + + function Kmac(bits, padding, outputBits) { + Keccak.call(this, bits, padding, outputBits); + } + + Kmac.prototype = new Keccak(); + + Kmac.prototype.finalize = function () { + this.encode(this.outputBits, true); + return Keccak.prototype.finalize.call(this); + }; + + var f = function (s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, + b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, + b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, + b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ ((c2 << 1) | (c3 >>> 31)); + l = c9 ^ ((c3 << 1) | (c2 >>> 31)); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ ((c4 << 1) | (c5 >>> 31)); + l = c1 ^ ((c5 << 1) | (c4 >>> 31)); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ ((c6 << 1) | (c7 >>> 31)); + l = c3 ^ ((c7 << 1) | (c6 >>> 31)); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ ((c8 << 1) | (c9 >>> 31)); + l = c5 ^ ((c9 << 1) | (c8 >>> 31)); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ ((c0 << 1) | (c1 >>> 31)); + l = c7 ^ ((c1 << 1) | (c0 >>> 31)); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = (s[11] << 4) | (s[10] >>> 28); + b33 = (s[10] << 4) | (s[11] >>> 28); + b14 = (s[20] << 3) | (s[21] >>> 29); + b15 = (s[21] << 3) | (s[20] >>> 29); + b46 = (s[31] << 9) | (s[30] >>> 23); + b47 = (s[30] << 9) | (s[31] >>> 23); + b28 = (s[40] << 18) | (s[41] >>> 14); + b29 = (s[41] << 18) | (s[40] >>> 14); + b20 = (s[2] << 1) | (s[3] >>> 31); + b21 = (s[3] << 1) | (s[2] >>> 31); + b2 = (s[13] << 12) | (s[12] >>> 20); + b3 = (s[12] << 12) | (s[13] >>> 20); + b34 = (s[22] << 10) | (s[23] >>> 22); + b35 = (s[23] << 10) | (s[22] >>> 22); + b16 = (s[33] << 13) | (s[32] >>> 19); + b17 = (s[32] << 13) | (s[33] >>> 19); + b48 = (s[42] << 2) | (s[43] >>> 30); + b49 = (s[43] << 2) | (s[42] >>> 30); + b40 = (s[5] << 30) | (s[4] >>> 2); + b41 = (s[4] << 30) | (s[5] >>> 2); + b22 = (s[14] << 6) | (s[15] >>> 26); + b23 = (s[15] << 6) | (s[14] >>> 26); + b4 = (s[25] << 11) | (s[24] >>> 21); + b5 = (s[24] << 11) | (s[25] >>> 21); + b36 = (s[34] << 15) | (s[35] >>> 17); + b37 = (s[35] << 15) | (s[34] >>> 17); + b18 = (s[45] << 29) | (s[44] >>> 3); + b19 = (s[44] << 29) | (s[45] >>> 3); + b10 = (s[6] << 28) | (s[7] >>> 4); + b11 = (s[7] << 28) | (s[6] >>> 4); + b42 = (s[17] << 23) | (s[16] >>> 9); + b43 = (s[16] << 23) | (s[17] >>> 9); + b24 = (s[26] << 25) | (s[27] >>> 7); + b25 = (s[27] << 25) | (s[26] >>> 7); + b6 = (s[36] << 21) | (s[37] >>> 11); + b7 = (s[37] << 21) | (s[36] >>> 11); + b38 = (s[47] << 24) | (s[46] >>> 8); + b39 = (s[46] << 24) | (s[47] >>> 8); + b30 = (s[8] << 27) | (s[9] >>> 5); + b31 = (s[9] << 27) | (s[8] >>> 5); + b12 = (s[18] << 20) | (s[19] >>> 12); + b13 = (s[19] << 20) | (s[18] >>> 12); + b44 = (s[29] << 7) | (s[28] >>> 25); + b45 = (s[28] << 7) | (s[29] >>> 25); + b26 = (s[38] << 8) | (s[39] >>> 24); + b27 = (s[39] << 8) | (s[38] >>> 24); + b8 = (s[48] << 14) | (s[49] >>> 18); + b9 = (s[49] << 14) | (s[48] >>> 18); + + s[0] = b0 ^ (~b2 & b4); + s[1] = b1 ^ (~b3 & b5); + s[10] = b10 ^ (~b12 & b14); + s[11] = b11 ^ (~b13 & b15); + s[20] = b20 ^ (~b22 & b24); + s[21] = b21 ^ (~b23 & b25); + s[30] = b30 ^ (~b32 & b34); + s[31] = b31 ^ (~b33 & b35); + s[40] = b40 ^ (~b42 & b44); + s[41] = b41 ^ (~b43 & b45); + s[2] = b2 ^ (~b4 & b6); + s[3] = b3 ^ (~b5 & b7); + s[12] = b12 ^ (~b14 & b16); + s[13] = b13 ^ (~b15 & b17); + s[22] = b22 ^ (~b24 & b26); + s[23] = b23 ^ (~b25 & b27); + s[32] = b32 ^ (~b34 & b36); + s[33] = b33 ^ (~b35 & b37); + s[42] = b42 ^ (~b44 & b46); + s[43] = b43 ^ (~b45 & b47); + s[4] = b4 ^ (~b6 & b8); + s[5] = b5 ^ (~b7 & b9); + s[14] = b14 ^ (~b16 & b18); + s[15] = b15 ^ (~b17 & b19); + s[24] = b24 ^ (~b26 & b28); + s[25] = b25 ^ (~b27 & b29); + s[34] = b34 ^ (~b36 & b38); + s[35] = b35 ^ (~b37 & b39); + s[44] = b44 ^ (~b46 & b48); + s[45] = b45 ^ (~b47 & b49); + s[6] = b6 ^ (~b8 & b0); + s[7] = b7 ^ (~b9 & b1); + s[16] = b16 ^ (~b18 & b10); + s[17] = b17 ^ (~b19 & b11); + s[26] = b26 ^ (~b28 & b20); + s[27] = b27 ^ (~b29 & b21); + s[36] = b36 ^ (~b38 & b30); + s[37] = b37 ^ (~b39 & b31); + s[46] = b46 ^ (~b48 & b40); + s[47] = b47 ^ (~b49 & b41); + s[8] = b8 ^ (~b0 & b2); + s[9] = b9 ^ (~b1 & b3); + s[18] = b18 ^ (~b10 & b12); + s[19] = b19 ^ (~b11 & b13); + s[28] = b28 ^ (~b20 & b22); + s[29] = b29 ^ (~b21 & b23); + s[38] = b38 ^ (~b30 & b32); + s[39] = b39 ^ (~b31 & b33); + s[48] = b48 ^ (~b40 & b42); + s[49] = b49 ^ (~b41 & b43); + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } + }; + + if (COMMON_JS) { + module.exports = methods; + } else { + for (i = 0; i < methodNames.length; ++i) { + root[methodNames[i]] = methods[methodNames[i]]; + } + if (AMD) { + undefined(function () { + return methods; + }); + } + } +})(); +}); + +"use strict"; +function keccak256(data) { + return '0x' + sha3.keccak_256(arrayify(data)); +} + +const version$5 = "rlp/5.5.0"; + +"use strict"; +const logger$6 = new Logger(version$5); +function arrayifyInteger(value) { + const result = []; + while (value) { + result.unshift(value & 0xff); + value >>= 8; + } + return result; +} +function unarrayifyInteger(data, offset, length) { + let result = 0; + for (let i = 0; i < length; i++) { + result = (result * 256) + data[offset + i]; + } + return result; +} +function _encode(object) { + if (Array.isArray(object)) { + let payload = []; + object.forEach(function (child) { + payload = payload.concat(_encode(child)); + }); + if (payload.length <= 55) { + payload.unshift(0xc0 + payload.length); + return payload; + } + const length = arrayifyInteger(payload.length); + length.unshift(0xf7 + length.length); + return length.concat(payload); + } + if (!isBytesLike(object)) { + logger$6.throwArgumentError("RLP object must be BytesLike", "object", object); + } + const data = Array.prototype.slice.call(arrayify(object)); + if (data.length === 1 && data[0] <= 0x7f) { + return data; + } + else if (data.length <= 55) { + data.unshift(0x80 + data.length); + return data; + } + const length = arrayifyInteger(data.length); + length.unshift(0xb7 + length.length); + return length.concat(data); +} +function encode(object) { + return hexlify(_encode(object)); +} +function _decodeChildren(data, offset, childOffset, length) { + const result = []; + while (childOffset < offset + 1 + length) { + const decoded = _decode(data, childOffset); + result.push(decoded.result); + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + logger$6.throwError("child data too short", Logger.errors.BUFFER_OVERRUN, {}); + } + } + return { consumed: (1 + length), result: result }; +} +// returns { consumed: number, result: Object } +function _decode(data, offset) { + if (data.length === 0) { + logger$6.throwError("data too short", Logger.errors.BUFFER_OVERRUN, {}); + } + // Array with extra length prefix + if (data[offset] >= 0xf8) { + const lengthLength = data[offset] - 0xf7; + if (offset + 1 + lengthLength > data.length) { + logger$6.throwError("data short segment too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + logger$6.throwError("data long segment too short", Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length); + } + else if (data[offset] >= 0xc0) { + const length = data[offset] - 0xc0; + if (offset + 1 + length > data.length) { + logger$6.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1, length); + } + else if (data[offset] >= 0xb8) { + const lengthLength = data[offset] - 0xb7; + if (offset + 1 + lengthLength > data.length) { + logger$6.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + logger$6.throwError("data array too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length)); + return { consumed: (1 + lengthLength + length), result: result }; + } + else if (data[offset] >= 0x80) { + const length = data[offset] - 0x80; + if (offset + 1 + length > data.length) { + logger$6.throwError("data too short", Logger.errors.BUFFER_OVERRUN, {}); + } + const result = hexlify(data.slice(offset + 1, offset + 1 + length)); + return { consumed: (1 + length), result: result }; + } + return { consumed: 1, result: hexlify(data[offset]) }; +} +function decode(data) { + const bytes = arrayify(data); + const decoded = _decode(bytes, 0); + if (decoded.consumed !== bytes.length) { + logger$6.throwArgumentError("invalid rlp data", "data", data); + } + return decoded.result; +} + +var index = /*#__PURE__*/Object.freeze({ + __proto__: null, + encode: encode, + decode: decode +}); + +const version$6 = "address/5.5.0"; + +"use strict"; +const logger$7 = new Logger(version$6); +function getChecksumAddress(address) { + if (!isHexString(address, 20)) { + logger$7.throwArgumentError("invalid address", "address", address); + } + address = address.toLowerCase(); + const chars = address.substring(2).split(""); + const expanded = new Uint8Array(40); + for (let i = 0; i < 40; i++) { + expanded[i] = chars[i].charCodeAt(0); + } + const hashed = arrayify(keccak256(expanded)); + for (let i = 0; i < 40; i += 2) { + if ((hashed[i >> 1] >> 4) >= 8) { + chars[i] = chars[i].toUpperCase(); + } + if ((hashed[i >> 1] & 0x0f) >= 8) { + chars[i + 1] = chars[i + 1].toUpperCase(); + } + } + return "0x" + chars.join(""); +} +// Shims for environments that are missing some required constants and functions +const MAX_SAFE_INTEGER = 0x1fffffffffffff; +function log10(x) { + if (Math.log10) { + return Math.log10(x); + } + return Math.log(x) / Math.LN10; +} +// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number +// Create lookup table +const ibanLookup = {}; +for (let i = 0; i < 10; i++) { + ibanLookup[String(i)] = String(i); +} +for (let i = 0; i < 26; i++) { + ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); +} +// How many decimal digits can we process? (for 64-bit float, this is 15) +const safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); +function ibanChecksum(address) { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + "00"; + let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join(""); + // Javascript can handle integers safely up to 15 (decimal) digits + while (expanded.length >= safeDigits) { + let block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + let checksum = String(98 - (parseInt(expanded, 10) % 97)); + while (checksum.length < 2) { + checksum = "0" + checksum; + } + return checksum; +} +; +function getAddress(address) { + let result = null; + if (typeof (address) !== "string") { + logger$7.throwArgumentError("invalid address", "address", address); + } + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + // Missing the 0x prefix + if (address.substring(0, 2) !== "0x") { + address = "0x" + address; + } + result = getChecksumAddress(address); + // It is a checksummed address with a bad checksum + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + logger$7.throwArgumentError("bad address checksum", "address", address); + } + // Maybe ICAP? (we only support direct mode) + } + else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + // It is an ICAP address with a bad checksum + if (address.substring(2, 4) !== ibanChecksum(address)) { + logger$7.throwArgumentError("bad icap checksum", "address", address); + } + result = _base36To16(address.substring(4)); + while (result.length < 40) { + result = "0" + result; + } + result = getChecksumAddress("0x" + result); + } + else { + logger$7.throwArgumentError("invalid address", "address", address); + } + return result; +} +function isAddress(address) { + try { + getAddress(address); + return true; + } + catch (error) { } + return false; +} +function getIcapAddress(address) { + let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase(); + while (base36.length < 30) { + base36 = "0" + base36; + } + return "XE" + ibanChecksum("XE00" + base36) + base36; +} +// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed +function getContractAddress(transaction) { + let from = null; + try { + from = getAddress(transaction.from); + } + catch (error) { + logger$7.throwArgumentError("missing from address", "transaction", transaction); + } + const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString())); + return getAddress(hexDataSlice(keccak256(encode([from, nonce])), 12)); +} +function getCreate2Address(from, salt, initCodeHash) { + if (hexDataLength(salt) !== 32) { + logger$7.throwArgumentError("salt must be 32 bytes", "salt", salt); + } + if (hexDataLength(initCodeHash) !== 32) { + logger$7.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); + } + return getAddress(hexDataSlice(keccak256(concat(["0xff", getAddress(from), salt, initCodeHash])), 12)); +} + +"use strict"; +class AddressCoder extends Coder { + constructor(localName) { + super("address", "address", localName, false); + } + defaultValue() { + return "0x0000000000000000000000000000000000000000"; + } + encode(writer, value) { + try { + value = getAddress(value); + } + catch (error) { + this._throwError(error.message, value); + } + return writer.writeValue(value); + } + decode(reader) { + return getAddress(hexZeroPad(reader.readValue().toHexString(), 20)); + } +} + +"use strict"; +// Clones the functionality of an existing Coder, but without a localName +class AnonymousCoder extends Coder { + constructor(coder) { + super(coder.name, coder.type, undefined, coder.dynamic); + this.coder = coder; + } + defaultValue() { + return this.coder.defaultValue(); + } + encode(writer, value) { + return this.coder.encode(writer, value); + } + decode(reader) { + return this.coder.decode(reader); + } +} + +"use strict"; +const logger$8 = new Logger(version$4); +function pack(writer, coders, values) { + let arrayValues = null; + if (Array.isArray(values)) { + arrayValues = values; + } + else if (values && typeof (values) === "object") { + let unique = {}; + arrayValues = coders.map((coder) => { + const name = coder.localName; + if (!name) { + logger$8.throwError("cannot encode object for signature with missing names", Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + if (unique[name]) { + logger$8.throwError("cannot encode object for signature with duplicate names", Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + unique[name] = true; + return values[name]; + }); + } + else { + logger$8.throwArgumentError("invalid tuple value", "tuple", values); + } + if (coders.length !== arrayValues.length) { + logger$8.throwArgumentError("types/value length mismatch", "tuple", values); + } + let staticWriter = new Writer(writer.wordSize); + let dynamicWriter = new Writer(writer.wordSize); + let updateFuncs = []; + coders.forEach((coder, index) => { + let value = arrayValues[index]; + if (coder.dynamic) { + // Get current dynamic offset (for the future pointer) + let dynamicOffset = dynamicWriter.length; + // Encode the dynamic value into the dynamicWriter + coder.encode(dynamicWriter, value); + // Prepare to populate the correct offset once we are done + let updateFunc = staticWriter.writeUpdatableValue(); + updateFuncs.push((baseOffset) => { + updateFunc(baseOffset + dynamicOffset); + }); + } + else { + coder.encode(staticWriter, value); + } + }); + // Backfill all the dynamic offsets, now that we know the static length + updateFuncs.forEach((func) => { func(staticWriter.length); }); + let length = writer.appendWriter(staticWriter); + length += writer.appendWriter(dynamicWriter); + return length; +} +function unpack(reader, coders) { + let values = []; + // A reader anchored to this base + let baseReader = reader.subReader(0); + coders.forEach((coder) => { + let value = null; + if (coder.dynamic) { + let offset = reader.readValue(); + let offsetReader = baseReader.subReader(offset.toNumber()); + try { + value = coder.decode(offsetReader); + } + catch (error) { + // Cannot recover from this + if (error.code === Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + else { + try { + value = coder.decode(reader); + } + catch (error) { + // Cannot recover from this + if (error.code === Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + if (value != undefined) { + values.push(value); + } + }); + // We only output named properties for uniquely named coders + const uniqueNames = coders.reduce((accum, coder) => { + const name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add any named parameters (i.e. tuples) + coders.forEach((coder, index) => { + let name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + const value = values[index]; + if (value instanceof Error) { + Object.defineProperty(values, name, { + enumerable: true, + get: () => { throw value; } + }); + } + else { + values[name] = value; + } + }); + for (let i = 0; i < values.length; i++) { + const value = values[i]; + if (value instanceof Error) { + Object.defineProperty(values, i, { + enumerable: true, + get: () => { throw value; } + }); + } + } + return Object.freeze(values); +} +class ArrayCoder extends Coder { + constructor(coder, length, localName) { + const type = (coder.type + "[" + (length >= 0 ? length : "") + "]"); + const dynamic = (length === -1 || coder.dynamic); + super("array", type, localName, dynamic); + this.coder = coder; + this.length = length; + } + defaultValue() { + // Verifies the child coder is valid (even if the array is dynamic or 0-length) + const defaultChild = this.coder.defaultValue(); + const result = []; + for (let i = 0; i < this.length; i++) { + result.push(defaultChild); + } + return result; + } + encode(writer, value) { + if (!Array.isArray(value)) { + this._throwError("expected array value", value); + } + let count = this.length; + if (count === -1) { + count = value.length; + writer.writeValue(value.length); + } + logger$8.checkArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : "")); + let coders = []; + for (let i = 0; i < value.length; i++) { + coders.push(this.coder); + } + return pack(writer, coders, value); + } + decode(reader) { + let count = this.length; + if (count === -1) { + count = reader.readValue().toNumber(); + // Check that there is *roughly* enough data to ensure + // stray random data is not being read as a length. Each + // slot requires at least 32 bytes for their value (or 32 + // bytes as a link to the data). This could use a much + // tighter bound, but we are erroring on the side of safety. + if (count * 32 > reader._data.length) { + logger$8.throwError("insufficient data length", Logger.errors.BUFFER_OVERRUN, { + length: reader._data.length, + count: count + }); + } + } + let coders = []; + for (let i = 0; i < count; i++) { + coders.push(new AnonymousCoder(this.coder)); + } + return reader.coerce(this.name, unpack(reader, coders)); + } +} + +"use strict"; +class BooleanCoder extends Coder { + constructor(localName) { + super("bool", "bool", localName, false); + } + defaultValue() { + return false; + } + encode(writer, value) { + return writer.writeValue(value ? 1 : 0); + } + decode(reader) { + return reader.coerce(this.type, !reader.readValue().isZero()); + } +} + +"use strict"; +class DynamicBytesCoder extends Coder { + constructor(type, localName) { + super(type, type, localName, true); + } + defaultValue() { + return "0x"; + } + encode(writer, value) { + value = arrayify(value); + let length = writer.writeValue(value.length); + length += writer.writeBytes(value); + return length; + } + decode(reader) { + return reader.readBytes(reader.readValue().toNumber(), true); + } +} +class BytesCoder extends DynamicBytesCoder { + constructor(localName) { + super("bytes", localName); + } + decode(reader) { + return reader.coerce(this.name, hexlify(super.decode(reader))); + } +} + +"use strict"; +// @TODO: Merge this with bytes +class FixedBytesCoder extends Coder { + constructor(size, localName) { + let name = "bytes" + String(size); + super(name, name, localName, false); + this.size = size; + } + defaultValue() { + return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2); + } + encode(writer, value) { + let data = arrayify(value); + if (data.length !== this.size) { + this._throwError("incorrect data length", value); + } + return writer.writeBytes(data); + } + decode(reader) { + return reader.coerce(this.name, hexlify(reader.readBytes(this.size))); + } +} + +"use strict"; +class NullCoder extends Coder { + constructor(localName) { + super("null", "", localName, false); + } + defaultValue() { + return null; + } + encode(writer, value) { + if (value != null) { + this._throwError("not null", value); + } + return writer.writeBytes([]); + } + decode(reader) { + reader.readBytes(0); + return reader.coerce(this.name, null); + } +} + +const AddressZero = "0x0000000000000000000000000000000000000000"; + +const NegativeOne$1 = ( /*#__PURE__*/BigNumber.from(-1)); +const Zero$1 = ( /*#__PURE__*/BigNumber.from(0)); +const One = ( /*#__PURE__*/BigNumber.from(1)); +const Two = ( /*#__PURE__*/BigNumber.from(2)); +const WeiPerEther = ( /*#__PURE__*/BigNumber.from("1000000000000000000")); +const MaxUint256 = ( /*#__PURE__*/BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); +const MinInt256 = ( /*#__PURE__*/BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000")); +const MaxInt256 = ( /*#__PURE__*/BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); + +const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; + +// NFKC (composed) // (decomposed) +const EtherSymbol = "\u039e"; // "\uD835\uDF63"; + +"use strict"; + +var index$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + AddressZero: AddressZero, + NegativeOne: NegativeOne$1, + Zero: Zero$1, + One: One, + Two: Two, + WeiPerEther: WeiPerEther, + MaxUint256: MaxUint256, + MinInt256: MinInt256, + MaxInt256: MaxInt256, + HashZero: HashZero, + EtherSymbol: EtherSymbol +}); + +"use strict"; +class NumberCoder extends Coder { + constructor(size, signed, localName) { + const name = ((signed ? "int" : "uint") + (size * 8)); + super(name, name, localName, false); + this.size = size; + this.signed = signed; + } + defaultValue() { + return 0; + } + encode(writer, value) { + let v = BigNumber.from(value); + // Check bounds are safe for encoding + let maxUintValue = MaxUint256.mask(writer.wordSize * 8); + if (this.signed) { + let bounds = maxUintValue.mask(this.size * 8 - 1); + if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne$1))) { + this._throwError("value out-of-bounds", value); + } + } + else if (v.lt(Zero$1) || v.gt(maxUintValue.mask(this.size * 8))) { + this._throwError("value out-of-bounds", value); + } + v = v.toTwos(this.size * 8).mask(this.size * 8); + if (this.signed) { + v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize); + } + return writer.writeValue(v); + } + decode(reader) { + let value = reader.readValue().mask(this.size * 8); + if (this.signed) { + value = value.fromTwos(this.size * 8); + } + return reader.coerce(this.name, value); + } +} + +const version$7 = "strings/5.5.0"; + +"use strict"; +const logger$9 = new Logger(version$7); +/////////////////////////////// +var UnicodeNormalizationForm; +(function (UnicodeNormalizationForm) { + UnicodeNormalizationForm["current"] = ""; + UnicodeNormalizationForm["NFC"] = "NFC"; + UnicodeNormalizationForm["NFD"] = "NFD"; + UnicodeNormalizationForm["NFKC"] = "NFKC"; + UnicodeNormalizationForm["NFKD"] = "NFKD"; +})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {})); +; +var Utf8ErrorReason; +(function (Utf8ErrorReason) { + // A continuation byte was present where there was nothing to continue + // - offset = the index the codepoint began in + Utf8ErrorReason["UNEXPECTED_CONTINUE"] = "unexpected continuation byte"; + // An invalid (non-continuation) byte to start a UTF-8 codepoint was found + // - offset = the index the codepoint began in + Utf8ErrorReason["BAD_PREFIX"] = "bad codepoint prefix"; + // The string is too short to process the expected codepoint + // - offset = the index the codepoint began in + Utf8ErrorReason["OVERRUN"] = "string overrun"; + // A missing continuation byte was expected but not found + // - offset = the index the continuation byte was expected at + Utf8ErrorReason["MISSING_CONTINUE"] = "missing continuation byte"; + // The computed code point is outside the range for UTF-8 + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; outside the UTF-8 range + Utf8ErrorReason["OUT_OF_RANGE"] = "out of UTF-8 range"; + // UTF-8 strings may not contain UTF-16 surrogate pairs + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range + Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate"; + // The string is an overlong representation + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; already bounds checked + Utf8ErrorReason["OVERLONG"] = "overlong representation"; +})(Utf8ErrorReason || (Utf8ErrorReason = {})); +; +function errorFunc(reason, offset, bytes, output, badCodepoint) { + return logger$9.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes); +} +function ignoreFunc(reason, offset, bytes, output, badCodepoint) { + // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes + if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { + let i = 0; + for (let o = offset + 1; o < bytes.length; o++) { + if (bytes[o] >> 6 !== 0x02) { + break; + } + i++; + } + return i; + } + // This byte runs us past the end of the string, so just jump to the end + // (but the first byte was read already read and therefore skipped) + if (reason === Utf8ErrorReason.OVERRUN) { + return bytes.length - offset - 1; + } + // Nothing to skip + return 0; +} +function replaceFunc(reason, offset, bytes, output, badCodepoint) { + // Overlong representations are otherwise "valid" code points; just non-deistingtished + if (reason === Utf8ErrorReason.OVERLONG) { + output.push(badCodepoint); + return 0; + } + // Put the replacement character into the output + output.push(0xfffd); + // Otherwise, process as if ignoring errors + return ignoreFunc(reason, offset, bytes, output, badCodepoint); +} +// Common error handing strategies +const Utf8ErrorFuncs = Object.freeze({ + error: errorFunc, + ignore: ignoreFunc, + replace: replaceFunc +}); +// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 +function getUtf8CodePoints(bytes, onError) { + if (onError == null) { + onError = Utf8ErrorFuncs.error; + } + bytes = arrayify(bytes); + const result = []; + let i = 0; + // Invalid bytes are ignored + while (i < bytes.length) { + const c = bytes[i++]; + // 0xxx xxxx + if (c >> 7 === 0) { + result.push(c); + continue; + } + // Multibyte; how many bytes left for this character? + let extraLength = null; + let overlongMask = null; + // 110x xxxx 10xx xxxx + if ((c & 0xe0) === 0xc0) { + extraLength = 1; + overlongMask = 0x7f; + // 1110 xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf0) === 0xe0) { + extraLength = 2; + overlongMask = 0x7ff; + // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf8) === 0xf0) { + extraLength = 3; + overlongMask = 0xffff; + } + else { + if ((c & 0xc0) === 0x80) { + i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result); + } + else { + i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result); + } + continue; + } + // Do we have enough bytes in our data? + if (i - 1 + extraLength >= bytes.length) { + i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result); + continue; + } + // Remove the length prefix from the char + let res = c & ((1 << (8 - extraLength - 1)) - 1); + for (let j = 0; j < extraLength; j++) { + let nextChar = bytes[i]; + // Invalid continuation byte + if ((nextChar & 0xc0) != 0x80) { + i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result); + res = null; + break; + } + ; + res = (res << 6) | (nextChar & 0x3f); + i++; + } + // See above loop for invalid continuation byte + if (res === null) { + continue; + } + // Maximum code point + if (res > 0x10ffff) { + i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Reserved for UTF-16 surrogate halves + if (res >= 0xd800 && res <= 0xdfff) { + i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Check for overlong sequences (more bytes than needed) + if (res <= overlongMask) { + i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res); + continue; + } + result.push(res); + } + return result; +} +// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array +function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) { + if (form != UnicodeNormalizationForm.current) { + logger$9.checkNormalize(); + str = str.normalize(form); + } + let result = []; + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c < 0x80) { + result.push(c); + } + else if (c < 0x800) { + result.push((c >> 6) | 0xc0); + result.push((c & 0x3f) | 0x80); + } + else if ((c & 0xfc00) == 0xd800) { + i++; + const c2 = str.charCodeAt(i); + if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) { + throw new Error("invalid utf-8 string"); + } + // Surrogate Pair + const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + result.push((pair >> 18) | 0xf0); + result.push(((pair >> 12) & 0x3f) | 0x80); + result.push(((pair >> 6) & 0x3f) | 0x80); + result.push((pair & 0x3f) | 0x80); + } + else { + result.push((c >> 12) | 0xe0); + result.push(((c >> 6) & 0x3f) | 0x80); + result.push((c & 0x3f) | 0x80); + } + } + return arrayify(result); +} +; +function escapeChar(value) { + const hex = ("0000" + value.toString(16)); + return "\\u" + hex.substring(hex.length - 4); +} +function _toEscapedUtf8String(bytes, onError) { + return '"' + getUtf8CodePoints(bytes, onError).map((codePoint) => { + if (codePoint < 256) { + switch (codePoint) { + case 8: return "\\b"; + case 9: return "\\t"; + case 10: return "\\n"; + case 13: return "\\r"; + case 34: return "\\\""; + case 92: return "\\\\"; + } + if (codePoint >= 32 && codePoint < 127) { + return String.fromCharCode(codePoint); + } + } + if (codePoint <= 0xffff) { + return escapeChar(codePoint); + } + codePoint -= 0x10000; + return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00); + }).join("") + '"'; +} +function _toUtf8String(codePoints) { + return codePoints.map((codePoint) => { + if (codePoint <= 0xffff) { + return String.fromCharCode(codePoint); + } + codePoint -= 0x10000; + return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00)); + }).join(""); +} +function toUtf8String(bytes, onError) { + return _toUtf8String(getUtf8CodePoints(bytes, onError)); +} +function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) { + return getUtf8CodePoints(toUtf8Bytes(str, form)); +} + +"use strict"; +function formatBytes32String(text) { + // Get the bytes + const bytes = toUtf8Bytes(text); + // Check we have room for null-termination + if (bytes.length > 31) { + throw new Error("bytes32 string must be less than 32 bytes"); + } + // Zero-pad (implicitly null-terminates) + return hexlify(concat([bytes, HashZero]).slice(0, 32)); +} +function parseBytes32String(bytes) { + const data = arrayify(bytes); + // Must be 32 bytes with a null-termination + if (data.length !== 32) { + throw new Error("invalid bytes32 - not 32 bytes long"); + } + if (data[31] !== 0) { + throw new Error("invalid bytes32 string - no null terminator"); + } + // Find the null termination + let length = 31; + while (data[length - 1] === 0) { + length--; + } + // Determine the string value + return toUtf8String(data.slice(0, length)); +} + +"use strict"; +function bytes2(data) { + if ((data.length % 4) !== 0) { + throw new Error("bad data"); + } + let result = []; + for (let i = 0; i < data.length; i += 4) { + result.push(parseInt(data.substring(i, i + 4), 16)); + } + return result; +} +function createTable(data, func) { + if (!func) { + func = function (value) { return [parseInt(value, 16)]; }; + } + let lo = 0; + let result = {}; + data.split(",").forEach((pair) => { + let comps = pair.split(":"); + lo += parseInt(comps[0], 16); + result[lo] = func(comps[1]); + }); + return result; +} +function createRangeTable(data) { + let hi = 0; + return data.split(",").map((v) => { + let comps = v.split("-"); + if (comps.length === 1) { + comps[1] = "0"; + } + else if (comps[1] === "") { + comps[1] = "1"; + } + let lo = hi + parseInt(comps[0], 16); + hi = parseInt(comps[1], 16); + return { l: lo, h: hi }; + }); +} +function matchMap(value, ranges) { + let lo = 0; + for (let i = 0; i < ranges.length; i++) { + let range = ranges[i]; + lo += range.l; + if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) { + if (range.e && range.e.indexOf(value - lo) !== -1) { + continue; + } + return range; + } + } + return null; +} +const Table_A_1_ranges = createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"); +// @TODO: Make this relative... +const Table_B_1_flags = "ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); +const Table_B_2_ranges = [ + { h: 25, s: 32, l: 65 }, + { h: 30, s: 32, e: [23], l: 127 }, + { h: 54, s: 1, e: [48], l: 64, d: 2 }, + { h: 14, s: 1, l: 57, d: 2 }, + { h: 44, s: 1, l: 17, d: 2 }, + { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 }, + { h: 16, s: 1, l: 68, d: 2 }, + { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 }, + { h: 26, s: 32, e: [17], l: 435 }, + { h: 22, s: 1, l: 71, d: 2 }, + { h: 15, s: 80, l: 40 }, + { h: 31, s: 32, l: 16 }, + { h: 32, s: 1, l: 80, d: 2 }, + { h: 52, s: 1, l: 42, d: 2 }, + { h: 12, s: 1, l: 55, d: 2 }, + { h: 40, s: 1, e: [38], l: 15, d: 2 }, + { h: 14, s: 1, l: 48, d: 2 }, + { h: 37, s: 48, l: 49 }, + { h: 148, s: 1, l: 6351, d: 2 }, + { h: 88, s: 1, l: 160, d: 2 }, + { h: 15, s: 16, l: 704 }, + { h: 25, s: 26, l: 854 }, + { h: 25, s: 32, l: 55915 }, + { h: 37, s: 40, l: 1247 }, + { h: 25, s: -119711, l: 53248 }, + { h: 25, s: -119763, l: 52 }, + { h: 25, s: -119815, l: 52 }, + { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 }, + { h: 25, s: -119919, l: 52 }, + { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 }, + { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 }, + { h: 25, s: -120075, l: 52 }, + { h: 25, s: -120127, l: 52 }, + { h: 25, s: -120179, l: 52 }, + { h: 25, s: -120231, l: 52 }, + { h: 25, s: -120283, l: 52 }, + { h: 25, s: -120335, l: 52 }, + { h: 24, s: -119543, e: [17], l: 56 }, + { h: 24, s: -119601, e: [17], l: 58 }, + { h: 24, s: -119659, e: [17], l: 58 }, + { h: 24, s: -119717, e: [17], l: 58 }, + { h: 24, s: -119775, e: [17], l: 58 } +]; +const Table_B_2_lut_abs = createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"); +const Table_B_2_lut_rel = createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"); +const Table_B_2_complex = createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D", bytes2); +const Table_C_ranges = createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001"); +function flatten(values) { + return values.reduce((accum, value) => { + value.forEach((value) => { accum.push(value); }); + return accum; + }, []); +} +function _nameprepTableA1(codepoint) { + return !!matchMap(codepoint, Table_A_1_ranges); +} +function _nameprepTableB2(codepoint) { + let range = matchMap(codepoint, Table_B_2_ranges); + if (range) { + return [codepoint + range.s]; + } + let codes = Table_B_2_lut_abs[codepoint]; + if (codes) { + return codes; + } + let shift = Table_B_2_lut_rel[codepoint]; + if (shift) { + return [codepoint + shift[0]]; + } + let complex = Table_B_2_complex[codepoint]; + if (complex) { + return complex; + } + return null; +} +function _nameprepTableC(codepoint) { + return !!matchMap(codepoint, Table_C_ranges); +} +function nameprep(value) { + // This allows platforms with incomplete normalize to bypass + // it for very basic names which the built-in toLowerCase + // will certainly handle correctly + if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { + return value.toLowerCase(); + } + // Get the code points (keeping the current normalization) + let codes = toUtf8CodePoints(value); + codes = flatten(codes.map((code) => { + // Substitute Table B.1 (Maps to Nothing) + if (Table_B_1_flags.indexOf(code) >= 0) { + return []; + } + if (code >= 0xfe00 && code <= 0xfe0f) { + return []; + } + // Substitute Table B.2 (Case Folding) + let codesTableB2 = _nameprepTableB2(code); + if (codesTableB2) { + return codesTableB2; + } + // No Substitution + return [code]; + })); + // Normalize using form KC + codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC); + // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9 + codes.forEach((code) => { + if (_nameprepTableC(code)) { + throw new Error("STRINGPREP_CONTAINS_PROHIBITED"); + } + }); + // Prohibit Unassigned Code Points (Table A.1) + codes.forEach((code) => { + if (_nameprepTableA1(code)) { + throw new Error("STRINGPREP_CONTAINS_UNASSIGNED"); + } + }); + // IDNA extras + let name = _toUtf8String(codes); + // IDNA: 4.2.3.1 + if (name.substring(0, 1) === "-" || name.substring(2, 4) === "--" || name.substring(name.length - 1) === "-") { + throw new Error("invalid hyphen"); + } + // IDNA: 4.2.4 + if (name.length > 63) { + throw new Error("too long"); + } + return name; +} + +"use strict"; + +"use strict"; +class StringCoder extends DynamicBytesCoder { + constructor(localName) { + super("string", localName); + } + defaultValue() { + return ""; + } + encode(writer, value) { + return super.encode(writer, toUtf8Bytes(value)); + } + decode(reader) { + return toUtf8String(super.decode(reader)); + } +} + +"use strict"; +class TupleCoder extends Coder { + constructor(coders, localName) { + let dynamic = false; + const types = []; + coders.forEach((coder) => { + if (coder.dynamic) { + dynamic = true; + } + types.push(coder.type); + }); + const type = ("tuple(" + types.join(",") + ")"); + super("tuple", type, localName, dynamic); + this.coders = coders; + } + defaultValue() { + const values = []; + this.coders.forEach((coder) => { + values.push(coder.defaultValue()); + }); + // We only output named properties for uniquely named coders + const uniqueNames = this.coders.reduce((accum, coder) => { + const name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add named values + this.coders.forEach((coder, index) => { + let name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + values[name] = values[index]; + }); + return Object.freeze(values); + } + encode(writer, value) { + return pack(writer, this.coders, value); + } + decode(reader) { + return reader.coerce(this.name, unpack(reader, this.coders)); + } +} + +"use strict"; +const logger$a = new Logger(version$4); +const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); +const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); +class AbiCoder { + constructor(coerceFunc) { + logger$a.checkNew(new.target, AbiCoder); + defineReadOnly(this, "coerceFunc", coerceFunc || null); + } + _getCoder(param) { + switch (param.baseType) { + case "address": + return new AddressCoder(param.name); + case "bool": + return new BooleanCoder(param.name); + case "string": + return new StringCoder(param.name); + case "bytes": + return new BytesCoder(param.name); + case "array": + return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name); + case "tuple": + return new TupleCoder((param.components || []).map((component) => { + return this._getCoder(component); + }), param.name); + case "": + return new NullCoder(param.name); + } + // u?int[0-9]* + let match = param.type.match(paramTypeNumber); + if (match) { + let size = parseInt(match[2] || "256"); + if (size === 0 || size > 256 || (size % 8) !== 0) { + logger$a.throwArgumentError("invalid " + match[1] + " bit length", "param", param); + } + return new NumberCoder(size / 8, (match[1] === "int"), param.name); + } + // bytes[0-9]+ + match = param.type.match(paramTypeBytes); + if (match) { + let size = parseInt(match[1]); + if (size === 0 || size > 32) { + logger$a.throwArgumentError("invalid bytes length", "param", param); + } + return new FixedBytesCoder(size, param.name); + } + return logger$a.throwArgumentError("invalid type", "type", param.type); + } + _getWordSize() { return 32; } + _getReader(data, allowLoose) { + return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose); + } + _getWriter() { + return new Writer(this._getWordSize()); + } + getDefaultValue(types) { + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = new TupleCoder(coders, "_"); + return coder.defaultValue(); + } + encode(types, values) { + if (types.length !== values.length) { + logger$a.throwError("types/values length mismatch", Logger.errors.INVALID_ARGUMENT, { + count: { types: types.length, values: values.length }, + value: { types: types, values: values } + }); + } + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = (new TupleCoder(coders, "_")); + const writer = this._getWriter(); + coder.encode(writer, values); + return writer.data; + } + decode(types, data, loose) { + const coders = types.map((type) => this._getCoder(ParamType.from(type))); + const coder = new TupleCoder(coders, "_"); + return coder.decode(this._getReader(arrayify(data), loose)); + } +} +const defaultAbiCoder = new AbiCoder(); + +function id(text) { + return keccak256(toUtf8Bytes(text)); +} + +const version$8 = "hash/5.5.0"; + +const logger$b = new Logger(version$8); +const Zeros = new Uint8Array(32); +Zeros.fill(0); +const Partition = new RegExp("^((.*)\\.)?([^.]+)$"); +function isValidName(name) { + try { + const comps = name.split("."); + for (let i = 0; i < comps.length; i++) { + if (nameprep(comps[i]).length === 0) { + throw new Error("empty"); + } + } + return true; + } + catch (error) { } + return false; +} +function namehash(name) { + /* istanbul ignore if */ + if (typeof (name) !== "string") { + logger$b.throwArgumentError("invalid ENS name; not a string", "name", name); + } + let current = name; + let result = Zeros; + while (current.length) { + const partition = current.match(Partition); + if (partition == null || partition[2] === "") { + logger$b.throwArgumentError("invalid ENS address; missing component", "name", name); + } + const label = toUtf8Bytes(nameprep(partition[3])); + result = keccak256(concat([result, keccak256(label)])); + current = partition[2] || ""; + } + return hexlify(result); +} + +const messagePrefix = "\x19Ethereum Signed Message:\n"; +function hashMessage(message) { + if (typeof (message) === "string") { + message = toUtf8Bytes(message); + } + return keccak256(concat([ + toUtf8Bytes(messagePrefix), + toUtf8Bytes(String(message.length)), + message + ])); +} + +var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$c = new Logger(version$8); +const padding = new Uint8Array(32); +padding.fill(0); +const NegativeOne$2 = BigNumber.from(-1); +const Zero$2 = BigNumber.from(0); +const One$1 = BigNumber.from(1); +const MaxUint256$1 = BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); +function hexPadRight(value) { + const bytes = arrayify(value); + const padOffset = bytes.length % 32; + if (padOffset) { + return hexConcat([bytes, padding.slice(padOffset)]); + } + return hexlify(bytes); +} +const hexTrue = hexZeroPad(One$1.toHexString(), 32); +const hexFalse = hexZeroPad(Zero$2.toHexString(), 32); +const domainFieldTypes = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" +}; +const domainFieldNames = [ + "name", "version", "chainId", "verifyingContract", "salt" +]; +function checkString(key) { + return function (value) { + if (typeof (value) !== "string") { + logger$c.throwArgumentError(`invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value); + } + return value; + }; +} +const domainChecks = { + name: checkString("name"), + version: checkString("version"), + chainId: function (value) { + try { + return BigNumber.from(value).toString(); + } + catch (error) { } + return logger$c.throwArgumentError(`invalid domain value for "chainId"`, "domain.chainId", value); + }, + verifyingContract: function (value) { + try { + return getAddress(value).toLowerCase(); + } + catch (error) { } + return logger$c.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value); + }, + salt: function (value) { + try { + const bytes = arrayify(value); + if (bytes.length !== 32) { + throw new Error("bad length"); + } + return hexlify(bytes); + } + catch (error) { } + return logger$c.throwArgumentError(`invalid domain value "salt"`, "domain.salt", value); + } +}; +function getBaseEncoder(type) { + // intXX and uintXX + { + const match = type.match(/^(u?)int(\d*)$/); + if (match) { + const signed = (match[1] === ""); + const width = parseInt(match[2] || "256"); + if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) { + logger$c.throwArgumentError("invalid numeric width", "type", type); + } + const boundsUpper = MaxUint256$1.mask(signed ? (width - 1) : width); + const boundsLower = signed ? boundsUpper.add(One$1).mul(NegativeOne$2) : Zero$2; + return function (value) { + const v = BigNumber.from(value); + if (v.lt(boundsLower) || v.gt(boundsUpper)) { + logger$c.throwArgumentError(`value out-of-bounds for ${type}`, "value", value); + } + return hexZeroPad(v.toTwos(256).toHexString(), 32); + }; + } + } + // bytesXX + { + const match = type.match(/^bytes(\d+)$/); + if (match) { + const width = parseInt(match[1]); + if (width === 0 || width > 32 || match[1] !== String(width)) { + logger$c.throwArgumentError("invalid bytes width", "type", type); + } + return function (value) { + const bytes = arrayify(value); + if (bytes.length !== width) { + logger$c.throwArgumentError(`invalid length for ${type}`, "value", value); + } + return hexPadRight(value); + }; + } + } + switch (type) { + case "address": return function (value) { + return hexZeroPad(getAddress(value), 32); + }; + case "bool": return function (value) { + return ((!value) ? hexFalse : hexTrue); + }; + case "bytes": return function (value) { + return keccak256(value); + }; + case "string": return function (value) { + return id(value); + }; + } + return null; +} +function encodeType(name, fields) { + return `${name}(${fields.map(({ name, type }) => (type + " " + name)).join(",")})`; +} +class TypedDataEncoder { + constructor(types) { + defineReadOnly(this, "types", Object.freeze(deepCopy(types))); + defineReadOnly(this, "_encoderCache", {}); + defineReadOnly(this, "_types", {}); + // Link struct types to their direct child structs + const links = {}; + // Link structs to structs which contain them as a child + const parents = {}; + // Link all subtypes within a given struct + const subtypes = {}; + Object.keys(types).forEach((type) => { + links[type] = {}; + parents[type] = []; + subtypes[type] = {}; + }); + for (const name in types) { + const uniqueNames = {}; + types[name].forEach((field) => { + // Check each field has a unique name + if (uniqueNames[field.name]) { + logger$c.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, "types", types); + } + uniqueNames[field.name] = true; + // Get the base type (drop any array specifiers) + const baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1]; + if (baseType === name) { + logger$c.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`, "types", types); + } + // Is this a base encoding type? + const encoder = getBaseEncoder(baseType); + if (encoder) { + return; + } + if (!parents[baseType]) { + logger$c.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`, "types", types); + } + // Add linkage + parents[baseType].push(name); + links[name][baseType] = true; + }); + } + // Deduce the primary type + const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0)); + if (primaryTypes.length === 0) { + logger$c.throwArgumentError("missing primary type", "types", types); + } + else if (primaryTypes.length > 1) { + logger$c.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(", ")}`, "types", types); + } + defineReadOnly(this, "primaryType", primaryTypes[0]); + // Check for circular type references + function checkCircular(type, found) { + if (found[type]) { + logger$c.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`, "types", types); + } + found[type] = true; + Object.keys(links[type]).forEach((child) => { + if (!parents[child]) { + return; + } + // Recursively check children + checkCircular(child, found); + // Mark all ancestors as having this decendant + Object.keys(found).forEach((subtype) => { + subtypes[subtype][child] = true; + }); + }); + delete found[type]; + } + checkCircular(this.primaryType, {}); + // Compute each fully describe type + for (const name in subtypes) { + const st = Object.keys(subtypes[name]); + st.sort(); + this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(""); + } + } + getEncoder(type) { + let encoder = this._encoderCache[type]; + if (!encoder) { + encoder = this._encoderCache[type] = this._getEncoder(type); + } + return encoder; + } + _getEncoder(type) { + // Basic encoder type (address, bool, uint256, etc) + { + const encoder = getBaseEncoder(type); + if (encoder) { + return encoder; + } + } + // Array + const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + const subtype = match[1]; + const subEncoder = this.getEncoder(subtype); + const length = parseInt(match[3]); + return (value) => { + if (length >= 0 && value.length !== length) { + logger$c.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + let result = value.map(subEncoder); + if (this._types[subtype]) { + result = result.map(keccak256); + } + return keccak256(hexConcat(result)); + }; + } + // Struct + const fields = this.types[type]; + if (fields) { + const encodedType = id(this._types[type]); + return (value) => { + const values = fields.map(({ name, type }) => { + const result = this.getEncoder(type)(value[name]); + if (this._types[type]) { + return keccak256(result); + } + return result; + }); + values.unshift(encodedType); + return hexConcat(values); + }; + } + return logger$c.throwArgumentError(`unknown type: ${type}`, "type", type); + } + encodeType(name) { + const result = this._types[name]; + if (!result) { + logger$c.throwArgumentError(`unknown type: ${JSON.stringify(name)}`, "name", name); + } + return result; + } + encodeData(type, value) { + return this.getEncoder(type)(value); + } + hashStruct(name, value) { + return keccak256(this.encodeData(name, value)); + } + encode(value) { + return this.encodeData(this.primaryType, value); + } + hash(value) { + return this.hashStruct(this.primaryType, value); + } + _visit(type, value, callback) { + // Basic encoder type (address, bool, uint256, etc) + { + const encoder = getBaseEncoder(type); + if (encoder) { + return callback(type, value); + } + } + // Array + const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + const subtype = match[1]; + const length = parseInt(match[3]); + if (length >= 0 && value.length !== length) { + logger$c.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + return value.map((v) => this._visit(subtype, v, callback)); + } + // Struct + const fields = this.types[type]; + if (fields) { + return fields.reduce((accum, { name, type }) => { + accum[name] = this._visit(type, value[name], callback); + return accum; + }, {}); + } + return logger$c.throwArgumentError(`unknown type: ${type}`, "type", type); + } + visit(value, callback) { + return this._visit(this.primaryType, value, callback); + } + static from(types) { + return new TypedDataEncoder(types); + } + static getPrimaryType(types) { + return TypedDataEncoder.from(types).primaryType; + } + static hashStruct(name, types, value) { + return TypedDataEncoder.from(types).hashStruct(name, value); + } + static hashDomain(domain) { + const domainFields = []; + for (const name in domain) { + const type = domainFieldTypes[name]; + if (!type) { + logger$c.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name)}`, "domain", domain); + } + domainFields.push({ name, type }); + } + domainFields.sort((a, b) => { + return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name); + }); + return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); + } + static encode(domain, types, value) { + return hexConcat([ + "0x1901", + TypedDataEncoder.hashDomain(domain), + TypedDataEncoder.from(types).hash(value) + ]); + } + static hash(domain, types, value) { + return keccak256(TypedDataEncoder.encode(domain, types, value)); + } + // Replaces all address types with ENS names with their looked up address + static resolveNames(domain, types, value, resolveName) { + return __awaiter$1(this, void 0, void 0, function* () { + // Make a copy to isolate it from the object passed in + domain = shallowCopy(domain); + // Look up all ENS names + const ensCache = {}; + // Do we need to look up the domain's verifyingContract? + if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) { + ensCache[domain.verifyingContract] = "0x"; + } + // We are going to use the encoder to visit all the base values + const encoder = TypedDataEncoder.from(types); + // Get a list of all the addresses + encoder.visit(value, (type, value) => { + if (type === "address" && !isHexString(value, 20)) { + ensCache[value] = "0x"; + } + return value; + }); + // Lookup each name + for (const name in ensCache) { + ensCache[name] = yield resolveName(name); + } + // Replace the domain verifyingContract if needed + if (domain.verifyingContract && ensCache[domain.verifyingContract]) { + domain.verifyingContract = ensCache[domain.verifyingContract]; + } + // Replace all ENS names with their address + value = encoder.visit(value, (type, value) => { + if (type === "address" && ensCache[value]) { + return ensCache[value]; + } + return value; + }); + return { domain, value }; + }); + } + static getPayload(domain, types, value) { + // Validate the domain fields + TypedDataEncoder.hashDomain(domain); + // Derive the EIP712Domain Struct reference type + const domainValues = {}; + const domainTypes = []; + domainFieldNames.forEach((name) => { + const value = domain[name]; + if (value == null) { + return; + } + domainValues[name] = domainChecks[name](value); + domainTypes.push({ name, type: domainFieldTypes[name] }); + }); + const encoder = TypedDataEncoder.from(types); + const typesWithDomain = shallowCopy(types); + if (typesWithDomain.EIP712Domain) { + logger$c.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types); + } + else { + typesWithDomain.EIP712Domain = domainTypes; + } + // Validate the data structures and types + encoder.encode(value); + return { + types: typesWithDomain, + domain: domainValues, + primaryType: encoder.primaryType, + message: encoder.visit(value, (type, value) => { + // bytes + if (type.match(/^bytes(\d*)/)) { + return hexlify(arrayify(value)); + } + // uint or int + if (type.match(/^u?int/)) { + return BigNumber.from(value).toString(); + } + switch (type) { + case "address": + return value.toLowerCase(); + case "bool": + return !!value; + case "string": + if (typeof (value) !== "string") { + logger$c.throwArgumentError(`invalid string`, "value", value); + } + return value; + } + return logger$c.throwArgumentError("unsupported type", "type", type); + }) + }; + } +} + +"use strict"; + +"use strict"; +const logger$d = new Logger(version$4); +class LogDescription extends Description { +} +class TransactionDescription extends Description { +} +class ErrorDescription extends Description { +} +class Indexed extends Description { + static isIndexed(value) { + return !!(value && value._isIndexed); + } +} +const BuiltinErrors = { + "0x08c379a0": { signature: "Error(string)", name: "Error", inputs: ["string"], reason: true }, + "0x4e487b71": { signature: "Panic(uint256)", name: "Panic", inputs: ["uint256"] } +}; +function wrapAccessError(property, error) { + const wrap = new Error(`deferred error during ABI decoding triggered accessing ${property}`); + wrap.error = error; + return wrap; +} +/* +function checkNames(fragment: Fragment, type: "input" | "output", params: Array): void { + params.reduce((accum, param) => { + if (param.name) { + if (accum[param.name]) { + logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format("full") }`, "fragment", fragment); + } + accum[param.name] = true; + } + return accum; + }, <{ [ name: string ]: boolean }>{ }); +} +*/ +class Interface { + constructor(fragments) { + logger$d.checkNew(new.target, Interface); + let abi = []; + if (typeof (fragments) === "string") { + abi = JSON.parse(fragments); + } + else { + abi = fragments; + } + defineReadOnly(this, "fragments", abi.map((fragment) => { + return Fragment.from(fragment); + }).filter((fragment) => (fragment != null))); + defineReadOnly(this, "_abiCoder", getStatic(new.target, "getAbiCoder")()); + defineReadOnly(this, "functions", {}); + defineReadOnly(this, "errors", {}); + defineReadOnly(this, "events", {}); + defineReadOnly(this, "structs", {}); + // Add all fragments by their signature + this.fragments.forEach((fragment) => { + let bucket = null; + switch (fragment.type) { + case "constructor": + if (this.deploy) { + logger$d.warn("duplicate definition - constructor"); + return; + } + //checkNames(fragment, "input", fragment.inputs); + defineReadOnly(this, "deploy", fragment); + return; + case "function": + //checkNames(fragment, "input", fragment.inputs); + //checkNames(fragment, "output", (fragment).outputs); + bucket = this.functions; + break; + case "event": + //checkNames(fragment, "input", fragment.inputs); + bucket = this.events; + break; + case "error": + bucket = this.errors; + break; + default: + return; + } + let signature = fragment.format(); + if (bucket[signature]) { + logger$d.warn("duplicate definition - " + signature); + return; + } + bucket[signature] = fragment; + }); + // If we do not have a constructor add a default + if (!this.deploy) { + defineReadOnly(this, "deploy", ConstructorFragment.from({ + payable: false, + type: "constructor" + })); + } + defineReadOnly(this, "_isInterface", true); + } + format(format) { + if (!format) { + format = FormatTypes.full; + } + if (format === FormatTypes.sighash) { + logger$d.throwArgumentError("interface does not support formatting sighash", "format", format); + } + const abi = this.fragments.map((fragment) => fragment.format(format)); + // We need to re-bundle the JSON fragments a bit + if (format === FormatTypes.json) { + return JSON.stringify(abi.map((j) => JSON.parse(j))); + } + return abi; + } + // Sub-classes can override these to handle other blockchains + static getAbiCoder() { + return defaultAbiCoder; + } + static getAddress(address) { + return getAddress(address); + } + static getSighash(fragment) { + return hexDataSlice(id(fragment.format()), 0, 4); + } + static getEventTopic(eventFragment) { + return id(eventFragment.format()); + } + // Find a function definition by any means necessary (unless it is ambiguous) + getFunction(nameOrSignatureOrSighash) { + if (isHexString(nameOrSignatureOrSighash)) { + for (const name in this.functions) { + if (nameOrSignatureOrSighash === this.getSighash(name)) { + return this.functions[name]; + } + } + logger$d.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + const name = nameOrSignatureOrSighash.trim(); + const matching = Object.keys(this.functions).filter((f) => (f.split("(" /* fix:) */)[0] === name)); + if (matching.length === 0) { + logger$d.throwArgumentError("no matching function", "name", name); + } + else if (matching.length > 1) { + logger$d.throwArgumentError("multiple matching functions", "name", name); + } + return this.functions[matching[0]]; + } + // Normalize the signature and lookup the function + const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger$d.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); + } + return result; + } + // Find an event definition by any means necessary (unless it is ambiguous) + getEvent(nameOrSignatureOrTopic) { + if (isHexString(nameOrSignatureOrTopic)) { + const topichash = nameOrSignatureOrTopic.toLowerCase(); + for (const name in this.events) { + if (topichash === this.getEventTopic(name)) { + return this.events[name]; + } + } + logger$d.throwArgumentError("no matching event", "topichash", topichash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrTopic.indexOf("(") === -1) { + const name = nameOrSignatureOrTopic.trim(); + const matching = Object.keys(this.events).filter((f) => (f.split("(" /* fix:) */)[0] === name)); + if (matching.length === 0) { + logger$d.throwArgumentError("no matching event", "name", name); + } + else if (matching.length > 1) { + logger$d.throwArgumentError("multiple matching events", "name", name); + } + return this.events[matching[0]]; + } + // Normalize the signature and lookup the function + const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()]; + if (!result) { + logger$d.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); + } + return result; + } + // Find a function definition by any means necessary (unless it is ambiguous) + getError(nameOrSignatureOrSighash) { + if (isHexString(nameOrSignatureOrSighash)) { + const getSighash = getStatic(this.constructor, "getSighash"); + for (const name in this.errors) { + const error = this.errors[name]; + if (nameOrSignatureOrSighash === getSighash(error)) { + return this.errors[name]; + } + } + logger$d.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + const name = nameOrSignatureOrSighash.trim(); + const matching = Object.keys(this.errors).filter((f) => (f.split("(" /* fix:) */)[0] === name)); + if (matching.length === 0) { + logger$d.throwArgumentError("no matching error", "name", name); + } + else if (matching.length > 1) { + logger$d.throwArgumentError("multiple matching errors", "name", name); + } + return this.errors[matching[0]]; + } + // Normalize the signature and lookup the function + const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger$d.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); + } + return result; + } + // Get the sighash (the bytes4 selector) used by Solidity to identify a function + getSighash(fragment) { + if (typeof (fragment) === "string") { + try { + fragment = this.getFunction(fragment); + } + catch (error) { + try { + fragment = this.getError(fragment); + } + catch (_) { + throw error; + } + } + } + return getStatic(this.constructor, "getSighash")(fragment); + } + // Get the topic (the bytes32 hash) used by Solidity to identify an event + getEventTopic(eventFragment) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + return getStatic(this.constructor, "getEventTopic")(eventFragment); + } + _decodeParams(params, data) { + return this._abiCoder.decode(params, data); + } + _encodeParams(params, values) { + return this._abiCoder.encode(params, values); + } + encodeDeploy(values) { + return this._encodeParams(this.deploy.inputs, values || []); + } + decodeErrorResult(fragment, data) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + const bytes = arrayify(data); + if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) { + logger$d.throwArgumentError(`data signature does not match error ${fragment.name}.`, "data", hexlify(bytes)); + } + return this._decodeParams(fragment.inputs, bytes.slice(4)); + } + encodeErrorResult(fragment, values) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + return hexlify(concat([ + this.getSighash(fragment), + this._encodeParams(fragment.inputs, values || []) + ])); + } + // Decode the data for a function call (e.g. tx.data) + decodeFunctionData(functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + const bytes = arrayify(data); + if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) { + logger$d.throwArgumentError(`data signature does not match function ${functionFragment.name}.`, "data", hexlify(bytes)); + } + return this._decodeParams(functionFragment.inputs, bytes.slice(4)); + } + // Encode the data for a function call (e.g. tx.data) + encodeFunctionData(functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return hexlify(concat([ + this.getSighash(functionFragment), + this._encodeParams(functionFragment.inputs, values || []) + ])); + } + // Decode the result from a function call (e.g. from eth_call) + decodeFunctionResult(functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + let bytes = arrayify(data); + let reason = null; + let errorArgs = null; + let errorName = null; + let errorSignature = null; + switch (bytes.length % this._abiCoder._getWordSize()) { + case 0: + try { + return this._abiCoder.decode(functionFragment.outputs, bytes); + } + catch (error) { } + break; + case 4: { + const selector = hexlify(bytes.slice(0, 4)); + const builtin = BuiltinErrors[selector]; + if (builtin) { + errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4)); + errorName = builtin.name; + errorSignature = builtin.signature; + if (builtin.reason) { + reason = errorArgs[0]; + } + } + else { + try { + const error = this.getError(selector); + errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4)); + errorName = error.name; + errorSignature = error.format(); + } + catch (error) { + console.log(error); + } + } + break; + } + } + return logger$d.throwError("call revert exception", Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + errorArgs, errorName, errorSignature, reason + }); + } + // Encode the result for a function call (e.g. for eth_call) + encodeFunctionResult(functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [])); + } + // Create the filter for the event with search criteria (e.g. for eth_filterLog) + encodeFilterTopics(eventFragment, values) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (values.length > eventFragment.inputs.length) { + logger$d.throwError("too many arguments for " + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, { + argument: "values", + value: values + }); + } + let topics = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + const encodeTopic = (param, value) => { + if (param.type === "string") { + return id(value); + } + else if (param.type === "bytes") { + return keccak256(hexlify(value)); + } + // Check addresses are valid + if (param.type === "address") { + this._abiCoder.encode(["address"], [value]); + } + return hexZeroPad(hexlify(value), 32); + }; + values.forEach((value, index) => { + let param = eventFragment.inputs[index]; + if (!param.indexed) { + if (value != null) { + logger$d.throwArgumentError("cannot filter non-indexed parameters; must be null", ("contract." + param.name), value); + } + return; + } + if (value == null) { + topics.push(null); + } + else if (param.baseType === "array" || param.baseType === "tuple") { + logger$d.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); + } + else if (Array.isArray(value)) { + topics.push(value.map((value) => encodeTopic(param, value))); + } + else { + topics.push(encodeTopic(param, value)); + } + }); + // Trim off trailing nulls + while (topics.length && topics[topics.length - 1] === null) { + topics.pop(); + } + return topics; + } + encodeEventLog(eventFragment, values) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + const topics = []; + const dataTypes = []; + const dataValues = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + if (values.length !== eventFragment.inputs.length) { + logger$d.throwArgumentError("event arguments/values mismatch", "values", values); + } + eventFragment.inputs.forEach((param, index) => { + const value = values[index]; + if (param.indexed) { + if (param.type === "string") { + topics.push(id(value)); + } + else if (param.type === "bytes") { + topics.push(keccak256(value)); + } + else if (param.baseType === "tuple" || param.baseType === "array") { + // @TODO + throw new Error("not implemented"); + } + else { + topics.push(this._abiCoder.encode([param.type], [value])); + } + } + else { + dataTypes.push(param); + dataValues.push(value); + } + }); + return { + data: this._abiCoder.encode(dataTypes, dataValues), + topics: topics + }; + } + // Decode a filter for the event and the search criteria + decodeEventLog(eventFragment, data, topics) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (topics != null && !eventFragment.anonymous) { + let topicHash = this.getEventTopic(eventFragment); + if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { + logger$d.throwError("fragment/topic mismatch", Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); + } + topics = topics.slice(1); + } + let indexed = []; + let nonIndexed = []; + let dynamic = []; + eventFragment.inputs.forEach((param, index) => { + if (param.indexed) { + if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") { + indexed.push(ParamType.fromObject({ type: "bytes32", name: param.name })); + dynamic.push(true); + } + else { + indexed.push(param); + dynamic.push(false); + } + } + else { + nonIndexed.push(param); + dynamic.push(false); + } + }); + let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)) : null; + let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true); + let result = []; + let nonIndexedIndex = 0, indexedIndex = 0; + eventFragment.inputs.forEach((param, index) => { + if (param.indexed) { + if (resultIndexed == null) { + result[index] = new Indexed({ _isIndexed: true, hash: null }); + } + else if (dynamic[index]) { + result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] }); + } + else { + try { + result[index] = resultIndexed[indexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + } + else { + try { + result[index] = resultNonIndexed[nonIndexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + // Add the keyword argument if named and safe + if (param.name && result[param.name] == null) { + const value = result[index]; + // Make error named values throw on access + if (value instanceof Error) { + Object.defineProperty(result, param.name, { + enumerable: true, + get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); } + }); + } + else { + result[param.name] = value; + } + } + }); + // Make all error indexed values throw on access + for (let i = 0; i < result.length; i++) { + const value = result[i]; + if (value instanceof Error) { + Object.defineProperty(result, i, { + enumerable: true, + get: () => { throw wrapAccessError(`index ${i}`, value); } + }); + } + } + return Object.freeze(result); + } + // Given a transaction, find the matching function fragment (if any) and + // determine all its properties and call parameters + parseTransaction(tx) { + let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new TransactionDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)), + functionFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + value: BigNumber.from(tx.value || "0"), + }); + } + // @TODO + //parseCallResult(data: BytesLike): ?? + // Given an event log, find the matching event fragment (if any) and + // determine all its properties and values + parseLog(log) { + let fragment = this.getEvent(log.topics[0]); + if (!fragment || fragment.anonymous) { + return null; + } + // @TODO: If anonymous, and the only method, and the input count matches, should we parse? + // Probably not, because just because it is the only event in the ABI does + // not mean we have the full ABI; maybe just a fragment? + return new LogDescription({ + eventFragment: fragment, + name: fragment.name, + signature: fragment.format(), + topic: this.getEventTopic(fragment), + args: this.decodeEventLog(fragment, log.data, log.topics) + }); + } + parseError(data) { + const hexData = hexlify(data); + let fragment = this.getError(hexData.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new ErrorDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + hexData.substring(10)), + errorFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + }); + } + /* + static from(value: Array | string | Interface) { + if (Interface.isInterface(value)) { + return value; + } + if (typeof(value) === "string") { + return new Interface(JSON.parse(value)); + } + return new Interface(value); + } + */ + static isInterface(value) { + return !!(value && value._isInterface); + } +} + +"use strict"; + +const version$9 = "abstract-provider/5.5.1"; + +"use strict"; +var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$e = new Logger(version$9); +; +; +//export type CallTransactionable = { +// call(transaction: TransactionRequest): Promise; +//}; +class ForkEvent extends Description { + static isForkEvent(value) { + return !!(value && value._isForkEvent); + } +} +class BlockForkEvent extends ForkEvent { + constructor(blockHash, expiry) { + if (!isHexString(blockHash, 32)) { + logger$e.throwArgumentError("invalid blockHash", "blockHash", blockHash); + } + super({ + _isForkEvent: true, + _isBlockForkEvent: true, + expiry: (expiry || 0), + blockHash: blockHash + }); + } +} +class TransactionForkEvent extends ForkEvent { + constructor(hash, expiry) { + if (!isHexString(hash, 32)) { + logger$e.throwArgumentError("invalid transaction hash", "hash", hash); + } + super({ + _isForkEvent: true, + _isTransactionForkEvent: true, + expiry: (expiry || 0), + hash: hash + }); + } +} +class TransactionOrderForkEvent extends ForkEvent { + constructor(beforeHash, afterHash, expiry) { + if (!isHexString(beforeHash, 32)) { + logger$e.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash); + } + if (!isHexString(afterHash, 32)) { + logger$e.throwArgumentError("invalid transaction hash", "afterHash", afterHash); + } + super({ + _isForkEvent: true, + _isTransactionOrderForkEvent: true, + expiry: (expiry || 0), + beforeHash: beforeHash, + afterHash: afterHash + }); + } +} +/////////////////////////////// +// Exported Abstracts +class Provider { + constructor() { + logger$e.checkAbstract(new.target, Provider); + defineReadOnly(this, "_isProvider", true); + } + getFeeData() { + return __awaiter$2(this, void 0, void 0, function* () { + const { block, gasPrice } = yield resolveProperties({ + block: this.getBlock("latest"), + gasPrice: this.getGasPrice().catch((error) => { + // @TODO: Why is this now failing on Calaveras? + //console.log(error); + return null; + }) + }); + let maxFeePerGas = null, maxPriorityFeePerGas = null; + if (block && block.baseFeePerGas) { + // We may want to compute this more accurately in the future, + // using the formula "check if the base fee is correct". + // See: https://eips.ethereum.org/EIPS/eip-1559 + maxPriorityFeePerGas = BigNumber.from("2500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + return { maxFeePerGas, maxPriorityFeePerGas, gasPrice }; + }); + } + // Alias for "on" + addListener(eventName, listener) { + return this.on(eventName, listener); + } + // Alias for "off" + removeListener(eventName, listener) { + return this.off(eventName, listener); + } + static isProvider(value) { + return !!(value && value._isProvider); + } +} + +const version$a = "abstract-signer/5.5.0"; + +"use strict"; +var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$f = new Logger(version$a); +const allowedTransactionKeys = [ + "accessList", "chainId", "customData", "data", "from", "gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "to", "type", "value" +]; +const forwardErrors = [ + Logger.errors.INSUFFICIENT_FUNDS, + Logger.errors.NONCE_EXPIRED, + Logger.errors.REPLACEMENT_UNDERPRICED, +]; +; +; +class Signer { + /////////////////// + // Sub-classes MUST call super + constructor() { + logger$f.checkAbstract(new.target, Signer); + defineReadOnly(this, "_isSigner", true); + } + /////////////////// + // Sub-classes MAY override these + getBalance(blockTag) { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("getBalance"); + return yield this.provider.getBalance(this.getAddress(), blockTag); + }); + } + getTransactionCount(blockTag) { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("getTransactionCount"); + return yield this.provider.getTransactionCount(this.getAddress(), blockTag); + }); + } + // Populates "from" if unspecified, and estimates the gas for the transaction + estimateGas(transaction) { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("estimateGas"); + const tx = yield resolveProperties(this.checkTransaction(transaction)); + return yield this.provider.estimateGas(tx); + }); + } + // Populates "from" if unspecified, and calls with the transaction + call(transaction, blockTag) { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("call"); + const tx = yield resolveProperties(this.checkTransaction(transaction)); + return yield this.provider.call(tx, blockTag); + }); + } + // Populates all fields in a transaction, signs it and sends it to the network + sendTransaction(transaction) { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("sendTransaction"); + const tx = yield this.populateTransaction(transaction); + const signedTx = yield this.signTransaction(tx); + return yield this.provider.sendTransaction(signedTx); + }); + } + getChainId() { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("getChainId"); + const network = yield this.provider.getNetwork(); + return network.chainId; + }); + } + getGasPrice() { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("getGasPrice"); + return yield this.provider.getGasPrice(); + }); + } + getFeeData() { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("getFeeData"); + return yield this.provider.getFeeData(); + }); + } + resolveName(name) { + return __awaiter$3(this, void 0, void 0, function* () { + this._checkProvider("resolveName"); + return yield this.provider.resolveName(name); + }); + } + // Checks a transaction does not contain invalid keys and if + // no "from" is provided, populates it. + // - does NOT require a provider + // - adds "from" is not present + // - returns a COPY (safe to mutate the result) + // By default called from: (overriding these prevents it) + // - call + // - estimateGas + // - populateTransaction (and therefor sendTransaction) + checkTransaction(transaction) { + for (const key in transaction) { + if (allowedTransactionKeys.indexOf(key) === -1) { + logger$f.throwArgumentError("invalid transaction key: " + key, "transaction", transaction); + } + } + const tx = shallowCopy(transaction); + if (tx.from == null) { + tx.from = this.getAddress(); + } + else { + // Make sure any provided address matches this signer + tx.from = Promise.all([ + Promise.resolve(tx.from), + this.getAddress() + ]).then((result) => { + if (result[0].toLowerCase() !== result[1].toLowerCase()) { + logger$f.throwArgumentError("from address mismatch", "transaction", transaction); + } + return result[0]; + }); + } + return tx; + } + // Populates ALL keys for a transaction and checks that "from" matches + // this Signer. Should be used by sendTransaction but NOT by signTransaction. + // By default called from: (overriding these prevents it) + // - sendTransaction + // + // Notes: + // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas + populateTransaction(transaction) { + return __awaiter$3(this, void 0, void 0, function* () { + const tx = yield resolveProperties(this.checkTransaction(transaction)); + if (tx.to != null) { + tx.to = Promise.resolve(tx.to).then((to) => __awaiter$3(this, void 0, void 0, function* () { + if (to == null) { + return null; + } + const address = yield this.resolveName(to); + if (address == null) { + logger$f.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return address; + })); + // Prevent this error from causing an UnhandledPromiseException + tx.to.catch((error) => { }); + } + // Do not allow mixing pre-eip-1559 and eip-1559 properties + const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null); + if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) { + logger$f.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); + } + else if ((tx.type === 0 || tx.type === 1) && hasEip1559) { + logger$f.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); + } + if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) { + // Fully-formed EIP-1559 transaction (skip getFeeData) + tx.type = 2; + } + else if (tx.type === 0 || tx.type === 1) { + // Explicit Legacy or EIP-2930 transaction + // Populate missing gasPrice + if (tx.gasPrice == null) { + tx.gasPrice = this.getGasPrice(); + } + } + else { + // We need to get fee data to determine things + const feeData = yield this.getFeeData(); + if (tx.type == null) { + // We need to auto-detect the intended type of this transaction... + if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { + // The network supports EIP-1559! + // Upgrade transaction from null to eip-1559 + tx.type = 2; + if (tx.gasPrice != null) { + // Using legacy gasPrice property on an eip-1559 network, + // so use gasPrice as both fee properties + const gasPrice = tx.gasPrice; + delete tx.gasPrice; + tx.maxFeePerGas = gasPrice; + tx.maxPriorityFeePerGas = gasPrice; + } + else { + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } + else if (feeData.gasPrice != null) { + // Network doesn't support EIP-1559... + // ...but they are trying to use EIP-1559 properties + if (hasEip1559) { + logger$f.throwError("network does not support EIP-1559", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "populateTransaction" + }); + } + // Populate missing fee data + if (tx.gasPrice == null) { + tx.gasPrice = feeData.gasPrice; + } + // Explicitly set untyped transaction to legacy + tx.type = 0; + } + else { + // getFeeData has failed us. + logger$f.throwError("failed to get consistent fee data", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signer.getFeeData" + }); + } + } + else if (tx.type === 2) { + // Explicitly using EIP-1559 + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } + if (tx.nonce == null) { + tx.nonce = this.getTransactionCount("pending"); + } + if (tx.gasLimit == null) { + tx.gasLimit = this.estimateGas(tx).catch((error) => { + if (forwardErrors.indexOf(error.code) >= 0) { + throw error; + } + return logger$f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + tx: tx + }); + }); + } + if (tx.chainId == null) { + tx.chainId = this.getChainId(); + } + else { + tx.chainId = Promise.all([ + Promise.resolve(tx.chainId), + this.getChainId() + ]).then((results) => { + if (results[1] !== 0 && results[0] !== results[1]) { + logger$f.throwArgumentError("chainId address mismatch", "transaction", transaction); + } + return results[0]; + }); + } + return yield resolveProperties(tx); + }); + } + /////////////////// + // Sub-classes SHOULD leave these alone + _checkProvider(operation) { + if (!this.provider) { + logger$f.throwError("missing provider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: (operation || "_checkProvider") + }); + } + } + static isSigner(value) { + return !!(value && value._isSigner); + } +} +class VoidSigner extends Signer { + constructor(address, provider) { + logger$f.checkNew(new.target, VoidSigner); + super(); + defineReadOnly(this, "address", address); + defineReadOnly(this, "provider", provider || null); + } + getAddress() { + return Promise.resolve(this.address); + } + _fail(message, operation) { + return Promise.resolve().then(() => { + logger$f.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation }); + }); + } + signMessage(message) { + return this._fail("VoidSigner cannot sign messages", "signMessage"); + } + signTransaction(transaction) { + return this._fail("VoidSigner cannot sign transactions", "signTransaction"); + } + _signTypedData(domain, types, value) { + return this._fail("VoidSigner cannot sign typed data", "signTypedData"); + } + connect(provider) { + return new VoidSigner(this.address, provider); + } +} + +var minimalisticAssert = assert; + +function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; + +var inherits_browser = createCommonjsModule(function (module) { +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; +} +}); + +var inherits = createCommonjsModule(function (module) { +try { + var util = /*RicMoo:ethers:require(util)*/(null); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = inherits_browser; +} +}); + +'use strict'; + + + + +var inherits_1 = inherits; + +function isSurrogatePair(msg, i) { + if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) { + return false; + } + if (i < 0 || i + 1 >= msg.length) { + return false; + } + return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00; +} + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === 'string') { + if (!enc) { + // Inspired by stringToUtf8ByteArray() in closure-library by Google + // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 + // Apache License 2.0 + // https://github.com/google/closure-library/blob/master/LICENSE + var p = 0; + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + if (c < 128) { + res[p++] = c; + } else if (c < 2048) { + res[p++] = (c >> 6) | 192; + res[p++] = (c & 63) | 128; + } else if (isSurrogatePair(msg, i)) { + c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF); + res[p++] = (c >> 18) | 240; + res[p++] = ((c >> 12) & 63) | 128; + res[p++] = ((c >> 6) & 63) | 128; + res[p++] = (c & 63) | 128; + } else { + res[p++] = (c >> 12) | 224; + res[p++] = ((c >> 6) & 63) | 128; + res[p++] = (c & 63) | 128; + } + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; +} +var toArray_1 = toArray; + +function toHex$1(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +var toHex_1 = toHex$1; + +function htonl(w) { + var res = (w >>> 24) | + ((w >>> 8) & 0xff00) | + ((w << 8) & 0xff0000) | + ((w & 0xff) << 24); + return res >>> 0; +} +var htonl_1 = htonl; + +function toHex32(msg, endian) { + var res = ''; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === 'little') + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; +} +var toHex32_1 = toHex32; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +var zero2_1 = zero2; + +function zero8(word) { + if (word.length === 7) + return '0' + word; + else if (word.length === 6) + return '00' + word; + else if (word.length === 5) + return '000' + word; + else if (word.length === 4) + return '0000' + word; + else if (word.length === 3) + return '00000' + word; + else if (word.length === 2) + return '000000' + word; + else if (word.length === 1) + return '0000000' + word; + else + return word; +} +var zero8_1 = zero8; + +function join32(msg, start, end, endian) { + var len = end - start; + minimalisticAssert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === 'big') + w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; + else + w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; + res[i] = w >>> 0; + } + return res; +} +var join32_1 = join32; + +function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === 'big') { + res[k] = m >>> 24; + res[k + 1] = (m >>> 16) & 0xff; + res[k + 2] = (m >>> 8) & 0xff; + res[k + 3] = m & 0xff; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = (m >>> 16) & 0xff; + res[k + 1] = (m >>> 8) & 0xff; + res[k] = m & 0xff; + } + } + return res; +} +var split32_1 = split32; + +function rotr32(w, b) { + return (w >>> b) | (w << (32 - b)); +} +var rotr32_1 = rotr32; + +function rotl32(w, b) { + return (w << b) | (w >>> (32 - b)); +} +var rotl32_1 = rotl32; + +function sum32(a, b) { + return (a + b) >>> 0; +} +var sum32_1 = sum32; + +function sum32_3(a, b, c) { + return (a + b + c) >>> 0; +} +var sum32_3_1 = sum32_3; + +function sum32_4(a, b, c, d) { + return (a + b + c + d) >>> 0; +} +var sum32_4_1 = sum32_4; + +function sum32_5(a, b, c, d, e) { + return (a + b + c + d + e) >>> 0; +} +var sum32_5_1 = sum32_5; + +function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; +} +var sum64_1 = sum64; + +function sum64_hi(ah, al, bh, bl) { + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; +} +var sum64_hi_1 = sum64_hi; + +function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; +} +var sum64_lo_1 = sum64_lo; + +function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; +} +var sum64_4_hi_1 = sum64_4_hi; + +function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; +} +var sum64_4_lo_1 = sum64_4_lo; + +function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + lo = (lo + el) >>> 0; + carry += lo < el ? 1 : 0; + + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; +} +var sum64_5_hi_1 = sum64_5_hi; + +function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + + return lo >>> 0; +} +var sum64_5_lo_1 = sum64_5_lo; + +function rotr64_hi(ah, al, num) { + var r = (al << (32 - num)) | (ah >>> num); + return r >>> 0; +} +var rotr64_hi_1 = rotr64_hi; + +function rotr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +} +var rotr64_lo_1 = rotr64_lo; + +function shr64_hi(ah, al, num) { + return ah >>> num; +} +var shr64_hi_1 = shr64_hi; + +function shr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +} +var shr64_lo_1 = shr64_lo; + +var utils = { + inherits: inherits_1, + toArray: toArray_1, + toHex: toHex_1, + htonl: htonl_1, + toHex32: toHex32_1, + zero2: zero2_1, + zero8: zero8_1, + join32: join32_1, + split32: split32_1, + rotr32: rotr32_1, + rotl32: rotl32_1, + sum32: sum32_1, + sum32_3: sum32_3_1, + sum32_4: sum32_4_1, + sum32_5: sum32_5_1, + sum64: sum64_1, + sum64_hi: sum64_hi_1, + sum64_lo: sum64_lo_1, + sum64_4_hi: sum64_4_hi_1, + sum64_4_lo: sum64_4_lo_1, + sum64_5_hi: sum64_5_hi_1, + sum64_5_lo: sum64_5_lo_1, + rotr64_hi: rotr64_hi_1, + rotr64_lo: rotr64_lo_1, + shr64_hi: shr64_hi_1, + shr64_lo: shr64_lo_1 +}; + +'use strict'; + + + + +function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = 'big'; + + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; +} +var BlockHash_1 = BlockHash; + +BlockHash.prototype.update = function update(msg, enc) { + // Convert message to array, pad it, and join into 32bit blocks + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + + // Enough data, try updating + if (this.pending.length >= this._delta8) { + msg = this.pending; + + // Process pending data in blocks + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + + return this; +}; + +BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + minimalisticAssert(this.pending === null); + + return this._digest(enc); +}; + +BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - ((len + this.padLength) % bytes); + var res = new Array(k + this.padLength); + res[0] = 0x80; + for (var i = 1; i < k; i++) + res[i] = 0; + + // Append length + len <<= 3; + if (this.endian === 'big') { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = (len >>> 24) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = len & 0xff; + } else { + res[i++] = len & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 24) & 0xff; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + + return res; +}; + +var common = { + BlockHash: BlockHash_1 +}; + +'use strict'; + + +var rotr32$1 = utils.rotr32; + +function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); +} +var ft_1_1 = ft_1; + +function ch32(x, y, z) { + return (x & y) ^ ((~x) & z); +} +var ch32_1 = ch32; + +function maj32(x, y, z) { + return (x & y) ^ (x & z) ^ (y & z); +} +var maj32_1 = maj32; + +function p32(x, y, z) { + return x ^ y ^ z; +} +var p32_1 = p32; + +function s0_256(x) { + return rotr32$1(x, 2) ^ rotr32$1(x, 13) ^ rotr32$1(x, 22); +} +var s0_256_1 = s0_256; + +function s1_256(x) { + return rotr32$1(x, 6) ^ rotr32$1(x, 11) ^ rotr32$1(x, 25); +} +var s1_256_1 = s1_256; + +function g0_256(x) { + return rotr32$1(x, 7) ^ rotr32$1(x, 18) ^ (x >>> 3); +} +var g0_256_1 = g0_256; + +function g1_256(x) { + return rotr32$1(x, 17) ^ rotr32$1(x, 19) ^ (x >>> 10); +} +var g1_256_1 = g1_256; + +var common$1 = { + ft_1: ft_1_1, + ch32: ch32_1, + maj32: maj32_1, + p32: p32_1, + s0_256: s0_256_1, + s1_256: s1_256_1, + g0_256: g0_256_1, + g1_256: g1_256_1 +}; + +'use strict'; + + + + + +var rotl32$1 = utils.rotl32; +var sum32$1 = utils.sum32; +var sum32_5$1 = utils.sum32_5; +var ft_1$1 = common$1.ft_1; +var BlockHash$1 = common.BlockHash; + +var sha1_K = [ + 0x5A827999, 0x6ED9EBA1, + 0x8F1BBCDC, 0xCA62C1D6 +]; + +function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + + BlockHash$1.call(this); + this.h = [ + 0x67452301, 0xefcdab89, 0x98badcfe, + 0x10325476, 0xc3d2e1f0 ]; + this.W = new Array(80); +} + +utils.inherits(SHA1, BlockHash$1); +var _1 = SHA1; + +SHA1.blockSize = 512; +SHA1.outSize = 160; +SHA1.hmacStrength = 80; +SHA1.padLength = 64; + +SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + + for(; i < W.length; i++) + W[i] = rotl32$1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5$1(rotl32$1(a, 5), ft_1$1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32$1(b, 30); + b = a; + a = t; + } + + this.h[0] = sum32$1(this.h[0], a); + this.h[1] = sum32$1(this.h[1], b); + this.h[2] = sum32$1(this.h[2], c); + this.h[3] = sum32$1(this.h[3], d); + this.h[4] = sum32$1(this.h[4], e); +}; + +SHA1.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +'use strict'; + + + + + + +var sum32$2 = utils.sum32; +var sum32_4$1 = utils.sum32_4; +var sum32_5$2 = utils.sum32_5; +var ch32$1 = common$1.ch32; +var maj32$1 = common$1.maj32; +var s0_256$1 = common$1.s0_256; +var s1_256$1 = common$1.s1_256; +var g0_256$1 = common$1.g0_256; +var g1_256$1 = common$1.g1_256; + +var BlockHash$2 = common.BlockHash; + +var sha256_K = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +]; + +function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + + BlockHash$2.call(this); + this.h = [ + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 + ]; + this.k = sha256_K; + this.W = new Array(64); +} +utils.inherits(SHA256, BlockHash$2); +var _256 = SHA256; + +SHA256.blockSize = 512; +SHA256.outSize = 256; +SHA256.hmacStrength = 192; +SHA256.padLength = 64; + +SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4$1(g1_256$1(W[i - 2]), W[i - 7], g0_256$1(W[i - 15]), W[i - 16]); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + + minimalisticAssert(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5$2(h, s1_256$1(e), ch32$1(e, f, g), this.k[i], W[i]); + var T2 = sum32$2(s0_256$1(a), maj32$1(a, b, c)); + h = g; + g = f; + f = e; + e = sum32$2(d, T1); + d = c; + c = b; + b = a; + a = sum32$2(T1, T2); + } + + this.h[0] = sum32$2(this.h[0], a); + this.h[1] = sum32$2(this.h[1], b); + this.h[2] = sum32$2(this.h[2], c); + this.h[3] = sum32$2(this.h[3], d); + this.h[4] = sum32$2(this.h[4], e); + this.h[5] = sum32$2(this.h[5], f); + this.h[6] = sum32$2(this.h[6], g); + this.h[7] = sum32$2(this.h[7], h); +}; + +SHA256.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +'use strict'; + + + + +function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + + _256.call(this); + this.h = [ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; +} +utils.inherits(SHA224, _256); +var _224 = SHA224; + +SHA224.blockSize = 512; +SHA224.outSize = 224; +SHA224.hmacStrength = 192; +SHA224.padLength = 64; + +SHA224.prototype._digest = function digest(enc) { + // Just truncate output + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 7), 'big'); + else + return utils.split32(this.h.slice(0, 7), 'big'); +}; + +'use strict'; + + + + + +var rotr64_hi$1 = utils.rotr64_hi; +var rotr64_lo$1 = utils.rotr64_lo; +var shr64_hi$1 = utils.shr64_hi; +var shr64_lo$1 = utils.shr64_lo; +var sum64$1 = utils.sum64; +var sum64_hi$1 = utils.sum64_hi; +var sum64_lo$1 = utils.sum64_lo; +var sum64_4_hi$1 = utils.sum64_4_hi; +var sum64_4_lo$1 = utils.sum64_4_lo; +var sum64_5_hi$1 = utils.sum64_5_hi; +var sum64_5_lo$1 = utils.sum64_5_lo; + +var BlockHash$3 = common.BlockHash; + +var sha512_K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + + BlockHash$3.call(this); + this.h = [ + 0x6a09e667, 0xf3bcc908, + 0xbb67ae85, 0x84caa73b, + 0x3c6ef372, 0xfe94f82b, + 0xa54ff53a, 0x5f1d36f1, + 0x510e527f, 0xade682d1, + 0x9b05688c, 0x2b3e6c1f, + 0x1f83d9ab, 0xfb41bd6b, + 0x5be0cd19, 0x137e2179 ]; + this.k = sha512_K; + this.W = new Array(160); +} +utils.inherits(SHA512, BlockHash$3); +var _512 = SHA512; + +SHA512.blockSize = 1024; +SHA512.outSize = 512; +SHA512.hmacStrength = 192; +SHA512.padLength = 128; + +SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + + // 32 x 32bit words + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; // i - 7 + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; // i - 16 + var c3_lo = W[i - 31]; + + W[i] = sum64_4_hi$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + W[i + 1] = sum64_4_lo$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + } +}; + +SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + + var W = this.W; + + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + + minimalisticAssert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + + var T1_hi = sum64_5_hi$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + var T1_lo = sum64_5_lo$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + + var T2_hi = sum64_hi$1(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo$1(c0_hi, c0_lo, c1_hi, c1_lo); + + hh = gh; + hl = gl; + + gh = fh; + gl = fl; + + fh = eh; + fl = el; + + eh = sum64_hi$1(dh, dl, T1_hi, T1_lo); + el = sum64_lo$1(dl, dl, T1_hi, T1_lo); + + dh = ch; + dl = cl; + + ch = bh; + cl = bl; + + bh = ah; + bl = al; + + ah = sum64_hi$1(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo$1(T1_hi, T1_lo, T2_hi, T2_lo); + } + + sum64$1(this.h, 0, ah, al); + sum64$1(this.h, 2, bh, bl); + sum64$1(this.h, 4, ch, cl); + sum64$1(this.h, 6, dh, dl); + sum64$1(this.h, 8, eh, el); + sum64$1(this.h, 10, fh, fl); + sum64$1(this.h, 12, gh, gl); + sum64$1(this.h, 14, hh, hl); +}; + +SHA512.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +function ch64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ ((~xh) & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ ((~xl) & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 28); + var c1_hi = rotr64_hi$1(xl, xh, 2); // 34 + var c2_hi = rotr64_hi$1(xl, xh, 7); // 39 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 28); + var c1_lo = rotr64_lo$1(xl, xh, 2); // 34 + var c2_lo = rotr64_lo$1(xl, xh, 7); // 39 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 14); + var c1_hi = rotr64_hi$1(xh, xl, 18); + var c2_hi = rotr64_hi$1(xl, xh, 9); // 41 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 14); + var c1_lo = rotr64_lo$1(xh, xl, 18); + var c2_lo = rotr64_lo$1(xl, xh, 9); // 41 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 1); + var c1_hi = rotr64_hi$1(xh, xl, 8); + var c2_hi = shr64_hi$1(xh, xl, 7); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 1); + var c1_lo = rotr64_lo$1(xh, xl, 8); + var c2_lo = shr64_lo$1(xh, xl, 7); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 19); + var c1_hi = rotr64_hi$1(xl, xh, 29); // 61 + var c2_hi = shr64_hi$1(xh, xl, 6); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 19); + var c1_lo = rotr64_lo$1(xl, xh, 29); // 61 + var c2_lo = shr64_lo$1(xh, xl, 6); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +'use strict'; + + + + + +function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + + _512.call(this); + this.h = [ + 0xcbbb9d5d, 0xc1059ed8, + 0x629a292a, 0x367cd507, + 0x9159015a, 0x3070dd17, + 0x152fecd8, 0xf70e5939, + 0x67332667, 0xffc00b31, + 0x8eb44a87, 0x68581511, + 0xdb0c2e0d, 0x64f98fa7, + 0x47b5481d, 0xbefa4fa4 ]; +} +utils.inherits(SHA384, _512); +var _384 = SHA384; + +SHA384.blockSize = 1024; +SHA384.outSize = 384; +SHA384.hmacStrength = 192; +SHA384.padLength = 128; + +SHA384.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 12), 'big'); + else + return utils.split32(this.h.slice(0, 12), 'big'); +}; + +'use strict'; + +var sha1 = _1; +var sha224 = _224; +var sha256 = _256; +var sha384 = _384; +var sha512 = _512; + +var sha = { + sha1: sha1, + sha224: sha224, + sha256: sha256, + sha384: sha384, + sha512: sha512 +}; + +'use strict'; + + + + +var rotl32$2 = utils.rotl32; +var sum32$3 = utils.sum32; +var sum32_3$1 = utils.sum32_3; +var sum32_4$2 = utils.sum32_4; +var BlockHash$4 = common.BlockHash; + +function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + + BlockHash$4.call(this); + + this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; + this.endian = 'little'; +} +utils.inherits(RIPEMD160, BlockHash$4); +var ripemd160 = RIPEMD160; + +RIPEMD160.blockSize = 512; +RIPEMD160.outSize = 160; +RIPEMD160.hmacStrength = 192; +RIPEMD160.padLength = 64; + +RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32$3( + rotl32$2( + sum32_4$2(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j]), + E); + A = E; + E = D; + D = rotl32$2(C, 10); + C = B; + B = T; + T = sum32$3( + rotl32$2( + sum32_4$2(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j]), + Eh); + Ah = Eh; + Eh = Dh; + Dh = rotl32$2(Ch, 10); + Ch = Bh; + Bh = T; + } + T = sum32_3$1(this.h[1], C, Dh); + this.h[1] = sum32_3$1(this.h[2], D, Eh); + this.h[2] = sum32_3$1(this.h[3], E, Ah); + this.h[3] = sum32_3$1(this.h[4], A, Bh); + this.h[4] = sum32_3$1(this.h[0], B, Ch); + this.h[0] = T; +}; + +RIPEMD160.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'little'); + else + return utils.split32(this.h, 'little'); +}; + +function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return (x & y) | ((~x) & z); + else if (j <= 47) + return (x | (~y)) ^ z; + else if (j <= 63) + return (x & z) | (y & (~z)); + else + return x ^ (y | (~z)); +} + +function K(j) { + if (j <= 15) + return 0x00000000; + else if (j <= 31) + return 0x5a827999; + else if (j <= 47) + return 0x6ed9eba1; + else if (j <= 63) + return 0x8f1bbcdc; + else + return 0xa953fd4e; +} + +function Kh(j) { + if (j <= 15) + return 0x50a28be6; + else if (j <= 31) + return 0x5c4dd124; + else if (j <= 47) + return 0x6d703ef3; + else if (j <= 63) + return 0x7a6d76e9; + else + return 0x00000000; +} + +var r = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 +]; + +var rh = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 +]; + +var s = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 +]; + +var sh = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 +]; + +var ripemd = { + ripemd160: ripemd160 +}; + +'use strict'; + + + + +function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + + this._init(utils.toArray(key, enc)); +} +var hmac = Hmac; + +Hmac.prototype._init = function init(key) { + // Shorten key, if needed + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + minimalisticAssert(key.length <= this.blockSize); + + // Add padding to key + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + + for (i = 0; i < key.length; i++) + key[i] ^= 0x36; + this.inner = new this.Hash().update(key); + + // 0x36 ^ 0x5c = 0x6a + for (i = 0; i < key.length; i++) + key[i] ^= 0x6a; + this.outer = new this.Hash().update(key); +}; + +Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; +}; + +Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); +}; + +var hash_1 = createCommonjsModule(function (module, exports) { +var hash = exports; + +hash.utils = utils; +hash.common = common; +hash.sha = sha; +hash.ripemd = ripemd; +hash.hmac = hmac; + +// Proxy hash functions to the main object +hash.sha1 = hash.sha.sha1; +hash.sha256 = hash.sha.sha256; +hash.sha224 = hash.sha.sha224; +hash.sha384 = hash.sha.sha384; +hash.sha512 = hash.sha.sha512; +hash.ripemd160 = hash.ripemd.ripemd160; +}); + +var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function getDefaultExportFromCjs$1 (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule$1(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire$1(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; +} + +function getDefaultExportFromNamespaceIfPresent$1 (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; +} + +function getDefaultExportFromNamespaceIfNotNamed$1 (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; +} + +function getAugmentedNamespace$1(n) { + if (n.__esModule) return n; + var a = Object.defineProperty({}, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; +} + +function commonjsRequire$1 () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} + +var minimalisticAssert$1 = assert$1; + +function assert$1(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert$1.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; + +var utils_1 = createCommonjsModule$1(function (module, exports) { +'use strict'; + +var utils = exports; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } else { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } + return res; +} +utils.toArray = toArray; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; +}; +}); + +var utils_1$1 = createCommonjsModule$1(function (module, exports) { +'use strict'; + +var utils = exports; + + + + +utils.assert = minimalisticAssert$1; +utils.toArray = utils_1.toArray; +utils.zero2 = utils_1.zero2; +utils.toHex = utils_1.toHex; +utils.encode = utils_1.encode; + +// Represent num in a w-NAF form +function getNAF(num, w, bits) { + var naf = new Array(Math.max(num.bitLength(), bits) + 1); + naf.fill(0); + + var ws = 1 << (w + 1); + var k = num.clone(); + + for (var i = 0; i < naf.length; i++) { + var z; + var mod = k.andln(ws - 1); + if (k.isOdd()) { + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + + naf[i] = z; + k.iushrn(1); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [], + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + var m8; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new bn(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; +}); + +'use strict'; + + + +var getNAF = utils_1$1.getNAF; +var getJSF = utils_1$1.getJSF; +var assert$1$1 = utils_1$1.assert; + +function BaseCurve(type, conf) { + this.type = type; + this.p = new bn(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? bn.red(conf.prime) : bn.mont(this.p); + + // Useful for many curves + this.zero = new bn(0).toRed(this.red); + this.one = new bn(1).toRed(this.red); + this.two = new bn(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new bn(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + this._bitLength = this.n ? this.n.bitLength() : 0; + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } +} +var base = BaseCurve; + +BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert$1$1(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1, this._bitLength); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + var j; + var nafW; + for (j = 0; j < naf.length; j += doubles.step) { + nafW = 0; + for (var l = j + doubles.step - 1; l >= j; l--) + nafW = (nafW << 1) + naf[l]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (j = 0; j < repr.length; j++) { + nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); +}; + +BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w, this._bitLength); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var l = 0; i >= 0 && naf[i] === 0; i--) + l++; + if (i >= 0) + l++; + acc = acc.dblp(l); + + if (i < 0) + break; + var z = naf[i]; + assert$1$1(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; +}; + +BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + var i; + var j; + var p; + for (i = 0; i < len; i++) { + p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength); + naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b], /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3, /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (j = 0; j < len; j++) { + var z = tmp[j]; + p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); +}; + +function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; +} +BaseCurve.BasePoint = BasePoint; + +BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); +}; + +BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); +}; + +BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils_1$1.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert$1$1(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert$1$1(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); +}; + +BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); +}; + +BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)); +}; + +BasePoint.prototype.encode = function encode(enc, compact) { + return utils_1$1.encode(this._encode(compact), enc); +}; + +BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null, + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; +}; + +BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); +}; + +BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles, + }; +}; + +BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res, + }; +}; + +BasePoint.prototype._getBeta = function _getBeta() { + return null; +}; + +BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; +}; + +var inherits_browser$1 = createCommonjsModule$1(function (module) { +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; +} +}); + +'use strict'; + + + + + + +var assert$2 = utils_1$1.assert; + +function ShortCurve(conf) { + base.call(this, 'short', conf); + + this.a = new bn(conf.a, 16).toRed(this.red); + this.b = new bn(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits_browser$1(ShortCurve, base); +var short_1 = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new bn(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new bn(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert$2(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new bn(vec.a, 16), + b: new bn(vec.b, 16), + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis, + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : bn.mont(num); + var tinv = new bn(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new bn(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new bn(1); + var y1 = new bn(0); + var x2 = new bn(0); + var y2 = new bn(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 }, + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new bn(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; + }; + +function Point(curve, x, y, isRed) { + base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new bn(x, 16); + this.y = new bn(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits_browser$1(Point, base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul), + }, + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1), + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1), + }, + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)), + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)), + }, + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new bn(k, 16); + if (this.isInfinity()) + return this; + else if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate), + }, + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new bn(0); + } else { + this.x = new bn(x, 16); + this.y = new bn(y, 16); + this.z = new bn(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits_browser$1(JPoint, base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + var i; + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new bn(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +var curve_1 = createCommonjsModule$1(function (module, exports) { +'use strict'; + +var curve = exports; + +curve.base = base; +curve.short = short_1; +curve.mont = /*RicMoo:ethers:require(./mont)*/(null); +curve.edwards = /*RicMoo:ethers:require(./edwards)*/(null); +}); + +var curves_1 = createCommonjsModule$1(function (module, exports) { +'use strict'; + +var curves = exports; + + + + + +var assert = utils_1$1.assert; + +function PresetCurve(options) { + if (options.type === 'short') + this.curve = new curve_1.short(options); + else if (options.type === 'edwards') + this.curve = new curve_1.edwards(options); + else + this.curve = new curve_1.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); +} +curves.PresetCurve = PresetCurve; + +function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve, + }); + return curve; + }, + }); +} + +defineCurve('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: hash_1.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811', + ], +}); + +defineCurve('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: hash_1.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', + ], +}); + +defineCurve('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: hash_1.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', + ], +}); + +defineCurve('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: hash_1.sha384, + gRed: false, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + + '5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', + ], +}); + +defineCurve('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: hash_1.sha512, + gRed: false, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + + '3fad0761 353c7086 a272c240 88be9476 9fd16650', + ], +}); + +defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash_1.sha256, + gRed: false, + g: [ + '9', + ], +}); + +defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash_1.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658', + ], +}); + +var pre; +try { + pre = /*RicMoo:ethers:require(./precomputed/secp256k1)*/(null).crash(); +} catch (e) { + pre = undefined; +} + +defineCurve('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: hash_1.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3', + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15', + }, + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre, + ], +}); +}); + +'use strict'; + + + + + +function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + + this._reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + + var entropy = utils_1.toArray(options.entropy, options.entropyEnc || 'hex'); + var nonce = utils_1.toArray(options.nonce, options.nonceEnc || 'hex'); + var pers = utils_1.toArray(options.pers, options.persEnc || 'hex'); + minimalisticAssert$1(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); +} +var hmacDrbg = HmacDRBG; + +HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this._reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 +}; + +HmacDRBG.prototype._hmac = function hmac() { + return new hash_1.hmac(this.hash, this.K); +}; + +HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); +}; + +HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils_1.toArray(entropy, entropyEnc); + add = utils_1.toArray(add, addEnc); + + minimalisticAssert$1(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this._reseed = 1; +}; + +HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this._reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils_1.toArray(add, addEnc || 'hex'); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this._reseed++; + return utils_1.encode(res, enc); +}; + +'use strict'; + + + +var assert$3 = utils_1$1.assert; + +function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); +} +var key = KeyPair; + +KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc, + }); +}; + +KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc, + }); +}; + +KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; +}; + +KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); +}; + +KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; +}; + +KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new bn(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); +}; + +KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + // Montgomery points only have an `x` coordinate. + // Weierstrass/Edwards points on the other hand have both `x` and + // `y` coordinates. + if (this.ec.curve.type === 'mont') { + assert$3(key.x, 'Need x coordinate'); + } else if (this.ec.curve.type === 'short' || + this.ec.curve.type === 'edwards') { + assert$3(key.x && key.y, 'Need both x and y coordinate'); + } + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); +}; + +// ECDH +KeyPair.prototype.derive = function derive(pub) { + if(!pub.validate()) { + assert$3(pub.validate(), 'public point not validated'); + } + return pub.mul(this.priv).getX(); +}; + +// ECDSA +KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); +}; + +KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); +}; + +KeyPair.prototype.inspect = function inspect() { + return ''; +}; + +'use strict'; + + + + +var assert$4 = utils_1$1.assert; + +function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert$4(options.r && options.s, 'Signature without r or s'); + this.r = new bn(options.r, 16); + this.s = new bn(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; +} +var signature = Signature; + +function Position() { + this.place = 0; +} + +function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + + // Indefinite length or overflow + if (octetLen === 0 || octetLen > 4) { + return false; + } + + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + val >>>= 0; + } + + // Leading zeroes + if (val <= 0x7f) { + return false; + } + + p.place = off; + return val; +} + +function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); +} + +Signature.prototype._importDER = function _importDER(data, enc) { + data = utils_1$1.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if (len === false) { + return false; + } + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + if (rlen === false) { + return false; + } + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (slen === false) { + return false; + } + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0) { + if (r[1] & 0x80) { + r = r.slice(1); + } else { + // Leading zeroes + return false; + } + } + if (s[0] === 0) { + if (s[1] & 0x80) { + s = s.slice(1); + } else { + // Leading zeroes + return false; + } + } + + this.r = new bn(r); + this.s = new bn(s); + this.recoveryParam = null; + + return true; +}; + +function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); +} + +Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils_1$1.encode(res, enc); +}; + +'use strict'; + + + + + +var rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); }); +var assert$5 = utils_1$1.assert; + + + + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert$5(Object.prototype.hasOwnProperty.call(curves_1, options), + 'Unknown curve ' + options); + + options = curves_1[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof curves_1.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +var ec = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new key(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return key.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return key.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new hmacDrbg({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + entropy: options.entropy || rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || 'utf8', + nonce: this.n.toArray(), + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new bn(2)); + for (;;) { + var priv = new bn(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } +}; + +EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new bn(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new hmacDrbg({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new bn(1)); + + for (var iter = 0; ; iter++) { + var k = options.k ? + options.k(iter) : + new bn(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature$1, key, enc) { + msg = this._truncateToN(new bn(msg, 16)); + key = this.keyFromPublic(key, enc); + signature$1 = new signature(signature$1, 'hex'); + + // Perform primitive values validation + var r = signature$1.r; + var s = signature$1.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + var p; + + if (!this.curve._maxwellTrick) { + p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature$1, j, enc) { + assert$5((3 & j) === j, 'The recovery param is more than two bits'); + signature$1 = new signature(signature$1, enc); + + var n = this.n; + var e = new bn(msg); + var r = signature$1.r; + var s = signature$1.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature$1.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature$1, Q, enc) { + signature$1 = new signature(signature$1, enc); + if (signature$1.recoveryParam !== null) + return signature$1.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature$1, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; + +var elliptic_1 = createCommonjsModule$1(function (module, exports) { +'use strict'; + +var elliptic = exports; + +elliptic.version = /*RicMoo:ethers*/{ version: "6.5.4" }.version; +elliptic.utils = utils_1$1; +elliptic.rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); }); +elliptic.curve = curve_1; +elliptic.curves = curves_1; + +// Protocols +elliptic.ec = ec; +elliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null); +}); + +var EC$1 = elliptic_1.ec; + +const version$b = "signing-key/5.5.0"; + +"use strict"; +const logger$g = new Logger(version$b); +let _curve = null; +function getCurve() { + if (!_curve) { + _curve = new EC$1("secp256k1"); + } + return _curve; +} +class SigningKey { + constructor(privateKey) { + defineReadOnly(this, "curve", "secp256k1"); + defineReadOnly(this, "privateKey", hexlify(privateKey)); + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + defineReadOnly(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); + defineReadOnly(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); + defineReadOnly(this, "_isSigningKey", true); + } + _addPoint(other) { + const p0 = getCurve().keyFromPublic(arrayify(this.publicKey)); + const p1 = getCurve().keyFromPublic(arrayify(other)); + return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); + } + signDigest(digest) { + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + const digestBytes = arrayify(digest); + if (digestBytes.length !== 32) { + logger$g.throwArgumentError("bad digest length", "digest", digest); + } + const signature = keyPair.sign(digestBytes, { canonical: true }); + return splitSignature({ + recoveryParam: signature.recoveryParam, + r: hexZeroPad("0x" + signature.r.toString(16), 32), + s: hexZeroPad("0x" + signature.s.toString(16), 32), + }); + } + computeSharedSecret(otherKey) { + const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey)); + const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey))); + return hexZeroPad("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); + } + static isSigningKey(value) { + return !!(value && value._isSigningKey); + } +} +function recoverPublicKey(digest, signature) { + const sig = splitSignature(signature); + const rs = { r: arrayify(sig.r), s: arrayify(sig.s) }; + return "0x" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode("hex", false); +} +function computePublicKey(key, compressed) { + const bytes = arrayify(key); + if (bytes.length === 32) { + const signingKey = new SigningKey(bytes); + if (compressed) { + return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); + } + return signingKey.publicKey; + } + else if (bytes.length === 33) { + if (compressed) { + return hexlify(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); + } + else if (bytes.length === 65) { + if (!compressed) { + return hexlify(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); + } + return logger$g.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); +} + +const version$c = "transactions/5.5.0"; + +"use strict"; +const logger$h = new Logger(version$c); +var TransactionTypes; +(function (TransactionTypes) { + TransactionTypes[TransactionTypes["legacy"] = 0] = "legacy"; + TransactionTypes[TransactionTypes["eip2930"] = 1] = "eip2930"; + TransactionTypes[TransactionTypes["eip1559"] = 2] = "eip1559"; +})(TransactionTypes || (TransactionTypes = {})); +; +/////////////////////////////// +function handleAddress(value) { + if (value === "0x") { + return null; + } + return getAddress(value); +} +function handleNumber(value) { + if (value === "0x") { + return Zero$1; + } + return BigNumber.from(value); +} +// Legacy Transaction Fields +const transactionFields = [ + { name: "nonce", maxLength: 32, numeric: true }, + { name: "gasPrice", maxLength: 32, numeric: true }, + { name: "gasLimit", maxLength: 32, numeric: true }, + { name: "to", length: 20 }, + { name: "value", maxLength: 32, numeric: true }, + { name: "data" }, +]; +const allowedTransactionKeys$1 = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, type: true, value: true +}; +function computeAddress(key) { + const publicKey = computePublicKey(key); + return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12)); +} +function recoverAddress(digest, signature) { + return computeAddress(recoverPublicKey(arrayify(digest), signature)); +} +function formatNumber(value, name) { + const result = stripZeros(BigNumber.from(value).toHexString()); + if (result.length > 32) { + logger$h.throwArgumentError("invalid length for " + name, ("transaction:" + name), value); + } + return result; +} +function accessSetify(addr, storageKeys) { + return { + address: getAddress(addr), + storageKeys: (storageKeys || []).map((storageKey, index) => { + if (hexDataLength(storageKey) !== 32) { + logger$h.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey); + } + return storageKey.toLowerCase(); + }) + }; +} +function accessListify(value) { + if (Array.isArray(value)) { + return value.map((set, index) => { + if (Array.isArray(set)) { + if (set.length > 2) { + logger$h.throwArgumentError("access list expected to be [ address, storageKeys[] ]", `value[${index}]`, set); + } + return accessSetify(set[0], set[1]); + } + return accessSetify(set.address, set.storageKeys); + }); + } + const result = Object.keys(value).map((addr) => { + const storageKeys = value[addr].reduce((accum, storageKey) => { + accum[storageKey] = true; + return accum; + }, {}); + return accessSetify(addr, Object.keys(storageKeys).sort()); + }); + result.sort((a, b) => (a.address.localeCompare(b.address))); + return result; +} +function formatAccessList(value) { + return accessListify(value).map((set) => [set.address, set.storageKeys]); +} +function _serializeEip1559(transaction, signature) { + // If there is an explicit gasPrice, make sure it matches the + // EIP-1559 fees; otherwise they may not understand what they + // think they are setting in terms of fee. + if (transaction.gasPrice != null) { + const gasPrice = BigNumber.from(transaction.gasPrice); + const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0); + if (!gasPrice.eq(maxFeePerGas)) { + logger$h.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + gasPrice, maxFeePerGas + }); + } + } + const fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), + formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? getAddress(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + const sig = splitSignature(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push(stripZeros(sig.r)); + fields.push(stripZeros(sig.s)); + } + return hexConcat(["0x02", encode(fields)]); +} +function _serializeEip2930(transaction, signature) { + const fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.gasPrice || 0, "gasPrice"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? getAddress(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + const sig = splitSignature(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push(stripZeros(sig.r)); + fields.push(stripZeros(sig.s)); + } + return hexConcat(["0x01", encode(fields)]); +} +// Legacy Transactions and EIP-155 +function _serialize(transaction, signature) { + checkProperties(transaction, allowedTransactionKeys$1); + const raw = []; + transactionFields.forEach(function (fieldInfo) { + let value = transaction[fieldInfo.name] || ([]); + const options = {}; + if (fieldInfo.numeric) { + options.hexPad = "left"; + } + value = arrayify(hexlify(value, options)); + // Fixed-width field + if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { + logger$h.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + // Variable-width (with a maximum) + if (fieldInfo.maxLength) { + value = stripZeros(value); + if (value.length > fieldInfo.maxLength) { + logger$h.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + } + raw.push(hexlify(value)); + }); + let chainId = 0; + if (transaction.chainId != null) { + // A chainId was provided; if non-zero we'll use EIP-155 + chainId = transaction.chainId; + if (typeof (chainId) !== "number") { + logger$h.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + } + } + else if (signature && !isBytesLike(signature) && signature.v > 28) { + // No chainId provided, but the signature is signing with EIP-155; derive chainId + chainId = Math.floor((signature.v - 35) / 2); + } + // We have an EIP-155 transaction (chainId was specified and non-zero) + if (chainId !== 0) { + raw.push(hexlify(chainId)); // @TODO: hexValue? + raw.push("0x"); + raw.push("0x"); + } + // Requesting an unsigned transaction + if (!signature) { + return encode(raw); + } + // The splitSignature will ensure the transaction has a recoveryParam in the + // case that the signTransaction function only adds a v. + const sig = splitSignature(signature); + // We pushed a chainId and null r, s on for hashing only; remove those + let v = 27 + sig.recoveryParam; + if (chainId !== 0) { + raw.pop(); + raw.pop(); + raw.pop(); + v += chainId * 2 + 8; + // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it! + if (sig.v > 28 && sig.v !== v) { + logger$h.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + } + else if (sig.v !== v) { + logger$h.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + raw.push(hexlify(v)); + raw.push(stripZeros(arrayify(sig.r))); + raw.push(stripZeros(arrayify(sig.s))); + return encode(raw); +} +function serialize(transaction, signature) { + // Legacy and EIP-155 Transactions + if (transaction.type == null || transaction.type === 0) { + if (transaction.accessList != null) { + logger$h.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + } + return _serialize(transaction, signature); + } + // Typed Transactions (EIP-2718) + switch (transaction.type) { + case 1: + return _serializeEip2930(transaction, signature); + case 2: + return _serializeEip1559(transaction, signature); + default: + break; + } + return logger$h.throwError(`unsupported transaction type: ${transaction.type}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "serializeTransaction", + transactionType: transaction.type + }); +} +function _parseEipSignature(tx, fields, serialize) { + try { + const recid = handleNumber(fields[0]).toNumber(); + if (recid !== 0 && recid !== 1) { + throw new Error("bad recid"); + } + tx.v = recid; + } + catch (error) { + logger$h.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + } + tx.r = hexZeroPad(fields[1], 32); + tx.s = hexZeroPad(fields[2], 32); + try { + const digest = keccak256(serialize(tx)); + tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); + } + catch (error) { + console.log(error); + } +} +function _parseEip1559(payload) { + const transaction = decode(payload.slice(1)); + if (transaction.length !== 9 && transaction.length !== 12) { + logger$h.throwArgumentError("invalid component count for transaction type: 2", "payload", hexlify(payload)); + } + const maxPriorityFeePerGas = handleNumber(transaction[2]); + const maxFeePerGas = handleNumber(transaction[3]); + const tx = { + type: 2, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + maxPriorityFeePerGas: maxPriorityFeePerGas, + maxFeePerGas: maxFeePerGas, + gasPrice: null, + gasLimit: handleNumber(transaction[4]), + to: handleAddress(transaction[5]), + value: handleNumber(transaction[6]), + data: transaction[7], + accessList: accessListify(transaction[8]), + }; + // Unsigned EIP-1559 Transaction + if (transaction.length === 9) { + return tx; + } + tx.hash = keccak256(payload); + _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); + return tx; +} +function _parseEip2930(payload) { + const transaction = decode(payload.slice(1)); + if (transaction.length !== 8 && transaction.length !== 11) { + logger$h.throwArgumentError("invalid component count for transaction type: 1", "payload", hexlify(payload)); + } + const tx = { + type: 1, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + gasPrice: handleNumber(transaction[2]), + gasLimit: handleNumber(transaction[3]), + to: handleAddress(transaction[4]), + value: handleNumber(transaction[5]), + data: transaction[6], + accessList: accessListify(transaction[7]) + }; + // Unsigned EIP-2930 Transaction + if (transaction.length === 8) { + return tx; + } + tx.hash = keccak256(payload); + _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); + return tx; +} +// Legacy Transactions and EIP-155 +function _parse(rawTransaction) { + const transaction = decode(rawTransaction); + if (transaction.length !== 9 && transaction.length !== 6) { + logger$h.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + } + const tx = { + nonce: handleNumber(transaction[0]).toNumber(), + gasPrice: handleNumber(transaction[1]), + gasLimit: handleNumber(transaction[2]), + to: handleAddress(transaction[3]), + value: handleNumber(transaction[4]), + data: transaction[5], + chainId: 0 + }; + // Legacy unsigned transaction + if (transaction.length === 6) { + return tx; + } + try { + tx.v = BigNumber.from(transaction[6]).toNumber(); + } + catch (error) { + console.log(error); + return tx; + } + tx.r = hexZeroPad(transaction[7], 32); + tx.s = hexZeroPad(transaction[8], 32); + if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) { + // EIP-155 unsigned transaction + tx.chainId = tx.v; + tx.v = 0; + } + else { + // Signed Transaction + tx.chainId = Math.floor((tx.v - 35) / 2); + if (tx.chainId < 0) { + tx.chainId = 0; + } + let recoveryParam = tx.v - 27; + const raw = transaction.slice(0, 6); + if (tx.chainId !== 0) { + raw.push(hexlify(tx.chainId)); + raw.push("0x"); + raw.push("0x"); + recoveryParam -= tx.chainId * 2 + 8; + } + const digest = keccak256(encode(raw)); + try { + tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam }); + } + catch (error) { + console.log(error); + } + tx.hash = keccak256(rawTransaction); + } + tx.type = null; + return tx; +} +function parse(rawTransaction) { + const payload = arrayify(rawTransaction); + // Legacy and EIP-155 Transactions + if (payload[0] > 0x7f) { + return _parse(payload); + } + // Typed Transaction (EIP-2718) + switch (payload[0]) { + case 1: + return _parseEip2930(payload); + case 2: + return _parseEip1559(payload); + default: + break; + } + return logger$h.throwError(`unsupported transaction type: ${payload[0]}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "parseTransaction", + transactionType: payload[0] + }); +} + +const version$d = "contracts/5.5.0"; + +"use strict"; +var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$i = new Logger(version$d); +; +; +/////////////////////////////// +const allowedTransactionKeys$2 = { + chainId: true, data: true, from: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true, + customData: true +}; +function resolveName(resolver, nameOrPromise) { + return __awaiter$4(this, void 0, void 0, function* () { + const name = yield nameOrPromise; + if (typeof (name) !== "string") { + logger$i.throwArgumentError("invalid address or ENS name", "name", name); + } + // If it is already an address, just use it (after adding checksum) + try { + return getAddress(name); + } + catch (error) { } + if (!resolver) { + logger$i.throwError("a provider or signer is needed to resolve ENS names", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName" + }); + } + const address = yield resolver.resolveName(name); + if (address == null) { + logger$i.throwArgumentError("resolver or addr is not configured for ENS name", "name", name); + } + return address; + }); +} +// Recursively replaces ENS names with promises to resolve the name and resolves all properties +function resolveAddresses(resolver, value, paramType) { + return __awaiter$4(this, void 0, void 0, function* () { + if (Array.isArray(paramType)) { + return yield Promise.all(paramType.map((paramType, index) => { + return resolveAddresses(resolver, ((Array.isArray(value)) ? value[index] : value[paramType.name]), paramType); + })); + } + if (paramType.type === "address") { + return yield resolveName(resolver, value); + } + if (paramType.type === "tuple") { + return yield resolveAddresses(resolver, value, paramType.components); + } + if (paramType.baseType === "array") { + if (!Array.isArray(value)) { + return Promise.reject(logger$i.makeError("invalid value for array", Logger.errors.INVALID_ARGUMENT, { + argument: "value", + value + })); + } + return yield Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren))); + } + return value; + }); +} +function populateTransaction(contract, fragment, args) { + return __awaiter$4(this, void 0, void 0, function* () { + // If an extra argument is given, it is overrides + let overrides = {}; + if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + overrides = shallowCopy(args.pop()); + } + // Make sure the parameter count matches + logger$i.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); + // Populate "from" override (allow promises) + if (contract.signer) { + if (overrides.from) { + // Contracts with a Signer are from the Signer's frame-of-reference; + // but we allow overriding "from" if it matches the signer + overrides.from = resolveProperties({ + override: resolveName(contract.signer, overrides.from), + signer: contract.signer.getAddress() + }).then((check) => __awaiter$4(this, void 0, void 0, function* () { + if (getAddress(check.signer) !== check.override) { + logger$i.throwError("Contract with a Signer cannot override from", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.from" + }); + } + return check.override; + })); + } + else { + overrides.from = contract.signer.getAddress(); + } + } + else if (overrides.from) { + overrides.from = resolveName(contract.provider, overrides.from); + //} else { + // Contracts without a signer can override "from", and if + // unspecified the zero address is used + //overrides.from = AddressZero; + } + // Wait for all dependencies to be resolved (prefer the signer over the provider) + const resolved = yield resolveProperties({ + args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs), + address: contract.resolvedAddress, + overrides: (resolveProperties(overrides) || {}) + }); + // The ABI coded transaction + const data = contract.interface.encodeFunctionData(fragment, resolved.args); + const tx = { + data: data, + to: resolved.address + }; + // Resolved Overrides + const ro = resolved.overrides; + // Populate simple overrides + if (ro.nonce != null) { + tx.nonce = BigNumber.from(ro.nonce).toNumber(); + } + if (ro.gasLimit != null) { + tx.gasLimit = BigNumber.from(ro.gasLimit); + } + if (ro.gasPrice != null) { + tx.gasPrice = BigNumber.from(ro.gasPrice); + } + if (ro.maxFeePerGas != null) { + tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); + } + if (ro.maxPriorityFeePerGas != null) { + tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); + } + if (ro.from != null) { + tx.from = ro.from; + } + if (ro.type != null) { + tx.type = ro.type; + } + if (ro.accessList != null) { + tx.accessList = accessListify(ro.accessList); + } + // If there was no "gasLimit" override, but the ABI specifies a default, use it + if (tx.gasLimit == null && fragment.gas != null) { + // Compute the intrinsic gas cost for this transaction + // @TODO: This is based on the yellow paper as of Petersburg; this is something + // we may wish to parameterize in v6 as part of the Network object. Since this + // is always a non-nil to address, we can ignore G_create, but may wish to add + // similar logic to the ContractFactory. + let intrinsic = 21000; + const bytes = arrayify(data); + for (let i = 0; i < bytes.length; i++) { + intrinsic += 4; + if (bytes[i]) { + intrinsic += 64; + } + } + tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic); + } + // Populate "value" override + if (ro.value) { + const roValue = BigNumber.from(ro.value); + if (!roValue.isZero() && !fragment.payable) { + logger$i.throwError("non-payable method cannot override value", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: overrides.value + }); + } + tx.value = roValue; + } + if (ro.customData) { + tx.customData = shallowCopy(ro.customData); + } + // Remove the overrides + delete overrides.nonce; + delete overrides.gasLimit; + delete overrides.gasPrice; + delete overrides.from; + delete overrides.value; + delete overrides.type; + delete overrides.accessList; + delete overrides.maxFeePerGas; + delete overrides.maxPriorityFeePerGas; + delete overrides.customData; + // Make sure there are no stray overrides, which may indicate a + // typo or using an unsupported key. + const leftovers = Object.keys(overrides).filter((key) => (overrides[key] != null)); + if (leftovers.length) { + logger$i.throwError(`cannot override ${leftovers.map((l) => JSON.stringify(l)).join(",")}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides", + overrides: leftovers + }); + } + return tx; + }); +} +function buildPopulate(contract, fragment) { + return function (...args) { + return populateTransaction(contract, fragment, args); + }; +} +function buildEstimate(contract, fragment) { + const signerOrProvider = (contract.signer || contract.provider); + return function (...args) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!signerOrProvider) { + logger$i.throwError("estimate require a provider or signer", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "estimateGas" + }); + } + const tx = yield populateTransaction(contract, fragment, args); + return yield signerOrProvider.estimateGas(tx); + }); + }; +} +function addContractWait(contract, tx) { + const wait = tx.wait.bind(tx); + tx.wait = (confirmations) => { + return wait(confirmations).then((receipt) => { + receipt.events = receipt.logs.map((log) => { + let event = deepCopy(log); + let parsed = null; + try { + parsed = contract.interface.parseLog(log); + } + catch (e) { } + // Successfully parsed the event log; include it + if (parsed) { + event.args = parsed.args; + event.decode = (data, topics) => { + return contract.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.event = parsed.name; + event.eventSignature = parsed.signature; + } + // Useful operations + event.removeListener = () => { return contract.provider; }; + event.getBlock = () => { + return contract.provider.getBlock(receipt.blockHash); + }; + event.getTransaction = () => { + return contract.provider.getTransaction(receipt.transactionHash); + }; + event.getTransactionReceipt = () => { + return Promise.resolve(receipt); + }; + return event; + }); + return receipt; + }); + }; +} +function buildCall(contract, fragment, collapseSimple) { + const signerOrProvider = (contract.signer || contract.provider); + return function (...args) { + return __awaiter$4(this, void 0, void 0, function* () { + // Extract the "blockTag" override if present + let blockTag = undefined; + if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + const overrides = shallowCopy(args.pop()); + if (overrides.blockTag != null) { + blockTag = yield overrides.blockTag; + } + delete overrides.blockTag; + args.push(overrides); + } + // If the contract was just deployed, wait until it is mined + if (contract.deployTransaction != null) { + yield contract._deployed(blockTag); + } + // Call a node and get the result + const tx = yield populateTransaction(contract, fragment, args); + const result = yield signerOrProvider.call(tx, blockTag); + try { + let value = contract.interface.decodeFunctionResult(fragment, result); + if (collapseSimple && fragment.outputs.length === 1) { + value = value[0]; + } + return value; + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + error.address = contract.address; + error.args = args; + error.transaction = tx; + } + throw error; + } + }); + }; +} +function buildSend(contract, fragment) { + return function (...args) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!contract.signer) { + logger$i.throwError("sending a transaction requires a signer", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "sendTransaction" + }); + } + // If the contract was just deployed, wait until it is mined + if (contract.deployTransaction != null) { + yield contract._deployed(); + } + const txRequest = yield populateTransaction(contract, fragment, args); + const tx = yield contract.signer.sendTransaction(txRequest); + // Tweak the tx.wait so the receipt has extra properties + addContractWait(contract, tx); + return tx; + }); + }; +} +function buildDefault(contract, fragment, collapseSimple) { + if (fragment.constant) { + return buildCall(contract, fragment, collapseSimple); + } + return buildSend(contract, fragment); +} +function getEventTag(filter) { + if (filter.address && (filter.topics == null || filter.topics.length === 0)) { + return "*"; + } + return (filter.address || "*") + "@" + (filter.topics ? filter.topics.map((topic) => { + if (Array.isArray(topic)) { + return topic.join("|"); + } + return topic; + }).join(":") : ""); +} +class RunningEvent { + constructor(tag, filter) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "filter", filter); + this._listeners = []; + } + addListener(listener, once) { + this._listeners.push({ listener: listener, once: once }); + } + removeListener(listener) { + let done = false; + this._listeners = this._listeners.filter((item) => { + if (done || item.listener !== listener) { + return true; + } + done = true; + return false; + }); + } + removeAllListeners() { + this._listeners = []; + } + listeners() { + return this._listeners.map((i) => i.listener); + } + listenerCount() { + return this._listeners.length; + } + run(args) { + const listenerCount = this.listenerCount(); + this._listeners = this._listeners.filter((item) => { + const argsCopy = args.slice(); + // Call the callback in the next event loop + setTimeout(() => { + item.listener.apply(this, argsCopy); + }, 0); + // Reschedule it if it not "once" + return !(item.once); + }); + return listenerCount; + } + prepareEvent(event) { + } + // Returns the array that will be applied to an emit + getEmit(event) { + return [event]; + } +} +class ErrorRunningEvent extends RunningEvent { + constructor() { + super("error", null); + } +} +// @TODO Fragment should inherit Wildcard? and just override getEmit? +// or have a common abstract super class, with enough constructor +// options to configure both. +// A Fragment Event will populate all the properties that Wildcard +// will, and additionally dereference the arguments when emitting +class FragmentRunningEvent extends RunningEvent { + constructor(address, contractInterface, fragment, topics) { + const filter = { + address: address + }; + let topic = contractInterface.getEventTopic(fragment); + if (topics) { + if (topic !== topics[0]) { + logger$i.throwArgumentError("topic mismatch", "topics", topics); + } + filter.topics = topics.slice(); + } + else { + filter.topics = [topic]; + } + super(getEventTag(filter), filter); + defineReadOnly(this, "address", address); + defineReadOnly(this, "interface", contractInterface); + defineReadOnly(this, "fragment", fragment); + } + prepareEvent(event) { + super.prepareEvent(event); + event.event = this.fragment.name; + event.eventSignature = this.fragment.format(); + event.decode = (data, topics) => { + return this.interface.decodeEventLog(this.fragment, data, topics); + }; + try { + event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics); + } + catch (error) { + event.args = null; + event.decodeError = error; + } + } + getEmit(event) { + const errors = checkResultErrors(event.args); + if (errors.length) { + throw errors[0].error; + } + const args = (event.args || []).slice(); + args.push(event); + return args; + } +} +// A Wildcard Event will attempt to populate: +// - event The name of the event name +// - eventSignature The full signature of the event +// - decode A function to decode data and topics +// - args The decoded data and topics +class WildcardRunningEvent extends RunningEvent { + constructor(address, contractInterface) { + super("*", { address: address }); + defineReadOnly(this, "address", address); + defineReadOnly(this, "interface", contractInterface); + } + prepareEvent(event) { + super.prepareEvent(event); + try { + const parsed = this.interface.parseLog(event); + event.event = parsed.name; + event.eventSignature = parsed.signature; + event.decode = (data, topics) => { + return this.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.args = parsed.args; + } + catch (error) { + // No matching event + } + } +} +class BaseContract { + constructor(addressOrName, contractInterface, signerOrProvider) { + logger$i.checkNew(new.target, Contract); + // @TODO: Maybe still check the addressOrName looks like a valid address or name? + //address = getAddress(address); + defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + if (signerOrProvider == null) { + defineReadOnly(this, "provider", null); + defineReadOnly(this, "signer", null); + } + else if (Signer.isSigner(signerOrProvider)) { + defineReadOnly(this, "provider", signerOrProvider.provider || null); + defineReadOnly(this, "signer", signerOrProvider); + } + else if (Provider.isProvider(signerOrProvider)) { + defineReadOnly(this, "provider", signerOrProvider); + defineReadOnly(this, "signer", null); + } + else { + logger$i.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); + } + defineReadOnly(this, "callStatic", {}); + defineReadOnly(this, "estimateGas", {}); + defineReadOnly(this, "functions", {}); + defineReadOnly(this, "populateTransaction", {}); + defineReadOnly(this, "filters", {}); + { + const uniqueFilters = {}; + Object.keys(this.interface.events).forEach((eventSignature) => { + const event = this.interface.events[eventSignature]; + defineReadOnly(this.filters, eventSignature, (...args) => { + return { + address: this.address, + topics: this.interface.encodeFilterTopics(event, args) + }; + }); + if (!uniqueFilters[event.name]) { + uniqueFilters[event.name] = []; + } + uniqueFilters[event.name].push(eventSignature); + }); + Object.keys(uniqueFilters).forEach((name) => { + const filters = uniqueFilters[name]; + if (filters.length === 1) { + defineReadOnly(this.filters, name, this.filters[filters[0]]); + } + else { + logger$i.warn(`Duplicate definition of ${name} (${filters.join(", ")})`); + } + }); + } + defineReadOnly(this, "_runningEvents", {}); + defineReadOnly(this, "_wrappedEmits", {}); + if (addressOrName == null) { + logger$i.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); + } + defineReadOnly(this, "address", addressOrName); + if (this.provider) { + defineReadOnly(this, "resolvedAddress", resolveName(this.provider, addressOrName)); + } + else { + try { + defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName))); + } + catch (error) { + // Without a provider, we cannot use ENS names + logger$i.throwError("provider is required to use ENS name as contract address", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Contract" + }); + } + } + const uniqueNames = {}; + const uniqueSignatures = {}; + Object.keys(this.interface.functions).forEach((signature) => { + const fragment = this.interface.functions[signature]; + // Check that the signature is unique; if not the ABI generation has + // not been cleaned or may be incorrectly generated + if (uniqueSignatures[signature]) { + logger$i.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`); + return; + } + uniqueSignatures[signature] = true; + // Track unique names; we only expose bare named functions if they + // are ambiguous + { + const name = fragment.name; + if (!uniqueNames[`%${name}`]) { + uniqueNames[`%${name}`] = []; + } + uniqueNames[`%${name}`].push(signature); + } + if (this[signature] == null) { + defineReadOnly(this, signature, buildDefault(this, fragment, true)); + } + // We do not collapse simple calls on this bucket, which allows + // frameworks to safely use this without introspection as well as + // allows decoding error recovery. + if (this.functions[signature] == null) { + defineReadOnly(this.functions, signature, buildDefault(this, fragment, false)); + } + if (this.callStatic[signature] == null) { + defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true)); + } + if (this.populateTransaction[signature] == null) { + defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment)); + } + if (this.estimateGas[signature] == null) { + defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment)); + } + }); + Object.keys(uniqueNames).forEach((name) => { + // Ambiguous names to not get attached as bare names + const signatures = uniqueNames[name]; + if (signatures.length > 1) { + return; + } + // Strip off the leading "%" used for prototype protection + name = name.substring(1); + const signature = signatures[0]; + // If overwriting a member property that is null, swallow the error + try { + if (this[name] == null) { + defineReadOnly(this, name, this[signature]); + } + } + catch (e) { } + if (this.functions[name] == null) { + defineReadOnly(this.functions, name, this.functions[signature]); + } + if (this.callStatic[name] == null) { + defineReadOnly(this.callStatic, name, this.callStatic[signature]); + } + if (this.populateTransaction[name] == null) { + defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]); + } + if (this.estimateGas[name] == null) { + defineReadOnly(this.estimateGas, name, this.estimateGas[signature]); + } + }); + } + static getContractAddress(transaction) { + return getContractAddress(transaction); + } + static getInterface(contractInterface) { + if (Interface.isInterface(contractInterface)) { + return contractInterface; + } + return new Interface(contractInterface); + } + // @TODO: Allow timeout? + deployed() { + return this._deployed(); + } + _deployed(blockTag) { + if (!this._deployedPromise) { + // If we were just deployed, we know the transaction we should occur in + if (this.deployTransaction) { + this._deployedPromise = this.deployTransaction.wait().then(() => { + return this; + }); + } + else { + // @TODO: Once we allow a timeout to be passed in, we will wait + // up to that many blocks for getCode + // Otherwise, poll for our code to be deployed + this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => { + if (code === "0x") { + logger$i.throwError("contract not deployed", Logger.errors.UNSUPPORTED_OPERATION, { + contractAddress: this.address, + operation: "getDeployed" + }); + } + return this; + }); + } + } + return this._deployedPromise; + } + // @TODO: + // estimateFallback(overrides?: TransactionRequest): Promise + // @TODO: + // estimateDeploy(bytecode: string, ...args): Promise + fallback(overrides) { + if (!this.signer) { + logger$i.throwError("sending a transactions require a signer", Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }); + } + const tx = shallowCopy(overrides || {}); + ["from", "to"].forEach(function (key) { + if (tx[key] == null) { + return; + } + logger$i.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + tx.to = this.resolvedAddress; + return this.deployed().then(() => { + return this.signer.sendTransaction(tx); + }); + } + // Reconnect to a different signer or provider + connect(signerOrProvider) { + if (typeof (signerOrProvider) === "string") { + signerOrProvider = new VoidSigner(signerOrProvider, this.provider); + } + const contract = new (this.constructor)(this.address, this.interface, signerOrProvider); + if (this.deployTransaction) { + defineReadOnly(contract, "deployTransaction", this.deployTransaction); + } + return contract; + } + // Re-attach to a different on-chain instance of this contract + attach(addressOrName) { + return new (this.constructor)(addressOrName, this.interface, this.signer || this.provider); + } + static isIndexed(value) { + return Indexed.isIndexed(value); + } + _normalizeRunningEvent(runningEvent) { + // Already have an instance of this event running; we can re-use it + if (this._runningEvents[runningEvent.tag]) { + return this._runningEvents[runningEvent.tag]; + } + return runningEvent; + } + _getRunningEvent(eventName) { + if (typeof (eventName) === "string") { + // Listen for "error" events (if your contract has an error event, include + // the full signature to bypass this special event keyword) + if (eventName === "error") { + return this._normalizeRunningEvent(new ErrorRunningEvent()); + } + // Listen for any event that is registered + if (eventName === "event") { + return this._normalizeRunningEvent(new RunningEvent("event", null)); + } + // Listen for any event + if (eventName === "*") { + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + // Get the event Fragment (throws if ambiguous/unknown event) + const fragment = this.interface.getEvent(eventName); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment)); + } + // We have topics to filter by... + if (eventName.topics && eventName.topics.length > 0) { + // Is it a known topichash? (throws if no matching topichash) + try { + const topic = eventName.topics[0]; + if (typeof (topic) !== "string") { + throw new Error("invalid topic"); // @TODO: May happen for anonymous events + } + const fragment = this.interface.getEvent(topic); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics)); + } + catch (error) { } + // Filter by the unknown topichash + const filter = { + address: this.address, + topics: eventName.topics + }; + return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter)); + } + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + _checkRunningEvents(runningEvent) { + if (runningEvent.listenerCount() === 0) { + delete this._runningEvents[runningEvent.tag]; + // If we have a poller for this, remove it + const emit = this._wrappedEmits[runningEvent.tag]; + if (emit && runningEvent.filter) { + this.provider.off(runningEvent.filter, emit); + delete this._wrappedEmits[runningEvent.tag]; + } + } + } + // Subclasses can override this to gracefully recover + // from parse errors if they wish + _wrapEvent(runningEvent, log, listener) { + const event = deepCopy(log); + event.removeListener = () => { + if (!listener) { + return; + } + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + }; + event.getBlock = () => { return this.provider.getBlock(log.blockHash); }; + event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); }; + event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); }; + // This may throw if the topics and data mismatch the signature + runningEvent.prepareEvent(event); + return event; + } + _addEventListener(runningEvent, listener, once) { + if (!this.provider) { + logger$i.throwError("events require a provider or a signer with a provider", Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }); + } + runningEvent.addListener(listener, once); + // Track this running event and its listeners (may already be there; but no hard in updating) + this._runningEvents[runningEvent.tag] = runningEvent; + // If we are not polling the provider, start polling + if (!this._wrappedEmits[runningEvent.tag]) { + const wrappedEmit = (log) => { + let event = this._wrapEvent(runningEvent, log, listener); + // Try to emit the result for the parameterized event... + if (event.decodeError == null) { + try { + const args = runningEvent.getEmit(event); + this.emit(runningEvent.filter, ...args); + } + catch (error) { + event.decodeError = error.error; + } + } + // Always emit "event" for fragment-base events + if (runningEvent.filter != null) { + this.emit("event", event); + } + // Emit "error" if there was an error + if (event.decodeError != null) { + this.emit("error", event.decodeError, event); + } + }; + this._wrappedEmits[runningEvent.tag] = wrappedEmit; + // Special events, like "error" do not have a filter + if (runningEvent.filter != null) { + this.provider.on(runningEvent.filter, wrappedEmit); + } + } + } + queryFilter(event, fromBlockOrBlockhash, toBlock) { + const runningEvent = this._getRunningEvent(event); + const filter = shallowCopy(runningEvent.filter); + if (typeof (fromBlockOrBlockhash) === "string" && isHexString(fromBlockOrBlockhash, 32)) { + if (toBlock != null) { + logger$i.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); + } + filter.blockHash = fromBlockOrBlockhash; + } + else { + filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0); + filter.toBlock = ((toBlock != null) ? toBlock : "latest"); + } + return this.provider.getLogs(filter).then((logs) => { + return logs.map((log) => this._wrapEvent(runningEvent, log, null)); + }); + } + on(event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, false); + return this; + } + once(event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, true); + return this; + } + emit(eventName, ...args) { + if (!this.provider) { + return false; + } + const runningEvent = this._getRunningEvent(eventName); + const result = (runningEvent.run(args) > 0); + // May have drained all the "once" events; check for living events + this._checkRunningEvents(runningEvent); + return result; + } + listenerCount(eventName) { + if (!this.provider) { + return 0; + } + if (eventName == null) { + return Object.keys(this._runningEvents).reduce((accum, key) => { + return accum + this._runningEvents[key].listenerCount(); + }, 0); + } + return this._getRunningEvent(eventName).listenerCount(); + } + listeners(eventName) { + if (!this.provider) { + return []; + } + if (eventName == null) { + const result = []; + for (let tag in this._runningEvents) { + this._runningEvents[tag].listeners().forEach((listener) => { + result.push(listener); + }); + } + return result; + } + return this._getRunningEvent(eventName).listeners(); + } + removeAllListeners(eventName) { + if (!this.provider) { + return this; + } + if (eventName == null) { + for (const tag in this._runningEvents) { + const runningEvent = this._runningEvents[tag]; + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + } + return this; + } + // Delete any listeners + const runningEvent = this._getRunningEvent(eventName); + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + return this; + } + off(eventName, listener) { + if (!this.provider) { + return this; + } + const runningEvent = this._getRunningEvent(eventName); + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + return this; + } + removeListener(eventName, listener) { + return this.off(eventName, listener); + } +} +class Contract extends BaseContract { +} +class ContractFactory { + constructor(contractInterface, bytecode, signer) { + let bytecodeHex = null; + if (typeof (bytecode) === "string") { + bytecodeHex = bytecode; + } + else if (isBytes(bytecode)) { + bytecodeHex = hexlify(bytecode); + } + else if (bytecode && typeof (bytecode.object) === "string") { + // Allow the bytecode object from the Solidity compiler + bytecodeHex = bytecode.object; + } + else { + // Crash in the next verification step + bytecodeHex = "!"; + } + // Make sure it is 0x prefixed + if (bytecodeHex.substring(0, 2) !== "0x") { + bytecodeHex = "0x" + bytecodeHex; + } + // Make sure the final result is valid bytecode + if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) { + logger$i.throwArgumentError("invalid bytecode", "bytecode", bytecode); + } + // If we have a signer, make sure it is valid + if (signer && !Signer.isSigner(signer)) { + logger$i.throwArgumentError("invalid signer", "signer", signer); + } + defineReadOnly(this, "bytecode", bytecodeHex); + defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + defineReadOnly(this, "signer", signer || null); + } + // @TODO: Future; rename to populateTransaction? + getDeployTransaction(...args) { + let tx = {}; + // If we have 1 additional argument, we allow transaction overrides + if (args.length === this.interface.deploy.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + tx = shallowCopy(args.pop()); + for (const key in tx) { + if (!allowedTransactionKeys$2[key]) { + throw new Error("unknown transaction override " + key); + } + } + } + // Do not allow these to be overridden in a deployment transaction + ["data", "from", "to"].forEach((key) => { + if (tx[key] == null) { + return; + } + logger$i.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + if (tx.value) { + const value = BigNumber.from(tx.value); + if (!value.isZero() && !this.interface.deploy.payable) { + logger$i.throwError("non-payable constructor cannot override value", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: tx.value + }); + } + } + // Make sure the call matches the constructor signature + logger$i.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + // Set the data to the bytecode + the encoded constructor arguments + tx.data = hexlify(concat([ + this.bytecode, + this.interface.encodeDeploy(args) + ])); + return tx; + } + deploy(...args) { + return __awaiter$4(this, void 0, void 0, function* () { + let overrides = {}; + // If 1 extra parameter was passed in, it contains overrides + if (args.length === this.interface.deploy.inputs.length + 1) { + overrides = args.pop(); + } + // Make sure the call matches the constructor signature + logger$i.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + // Resolve ENS names and promises in the arguments + const params = yield resolveAddresses(this.signer, args, this.interface.deploy.inputs); + params.push(overrides); + // Get the deployment transaction (with optional overrides) + const unsignedTx = this.getDeployTransaction(...params); + // Send the deployment transaction + const tx = yield this.signer.sendTransaction(unsignedTx); + const address = getStatic(this.constructor, "getContractAddress")(tx); + const contract = getStatic(this.constructor, "getContract")(address, this.interface, this.signer); + // Add the modified wait that wraps events + addContractWait(contract, tx); + defineReadOnly(contract, "deployTransaction", tx); + return contract; + }); + } + attach(address) { + return (this.constructor).getContract(address, this.interface, this.signer); + } + connect(signer) { + return new (this.constructor)(this.interface, this.bytecode, signer); + } + static fromSolidity(compilerOutput, signer) { + if (compilerOutput == null) { + logger$i.throwError("missing compiler output", Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); + } + if (typeof (compilerOutput) === "string") { + compilerOutput = JSON.parse(compilerOutput); + } + const abi = compilerOutput.abi; + let bytecode = null; + if (compilerOutput.bytecode) { + bytecode = compilerOutput.bytecode; + } + else if (compilerOutput.evm && compilerOutput.evm.bytecode) { + bytecode = compilerOutput.evm.bytecode; + } + return new this(abi, bytecode, signer); + } + static getInterface(contractInterface) { + return Contract.getInterface(contractInterface); + } + static getContractAddress(tx) { + return getContractAddress(tx); + } + static getContract(address, contractInterface, signer) { + return new Contract(address, contractInterface, signer); + } +} + +/** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ +class BaseX { + constructor(alphabet) { + defineReadOnly(this, "alphabet", alphabet); + defineReadOnly(this, "base", alphabet.length); + defineReadOnly(this, "_alphabetMap", {}); + defineReadOnly(this, "_leader", alphabet.charAt(0)); + // pre-compute lookup table + for (let i = 0; i < alphabet.length; i++) { + this._alphabetMap[alphabet.charAt(i)] = i; + } + } + encode(value) { + let source = arrayify(value); + if (source.length === 0) { + return ""; + } + let digits = [0]; + for (let i = 0; i < source.length; ++i) { + let carry = source[i]; + for (let j = 0; j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % this.base; + carry = (carry / this.base) | 0; + } + while (carry > 0) { + digits.push(carry % this.base); + carry = (carry / this.base) | 0; + } + } + let string = ""; + // deal with leading zeros + for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) { + string += this._leader; + } + // convert digits to a string + for (let q = digits.length - 1; q >= 0; --q) { + string += this.alphabet[digits[q]]; + } + return string; + } + decode(value) { + if (typeof (value) !== "string") { + throw new TypeError("Expected String"); + } + let bytes = []; + if (value.length === 0) { + return new Uint8Array(bytes); + } + bytes.push(0); + for (let i = 0; i < value.length; i++) { + let byte = this._alphabetMap[value[i]]; + if (byte === undefined) { + throw new Error("Non-base" + this.base + " character"); + } + let carry = byte; + for (let j = 0; j < bytes.length; ++j) { + carry += bytes[j] * this.base; + bytes[j] = carry & 0xff; + carry >>= 8; + } + while (carry > 0) { + bytes.push(carry & 0xff); + carry >>= 8; + } + } + // deal with leading zeros + for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) { + bytes.push(0); + } + return arrayify(new Uint8Array(bytes.reverse())); + } +} +const Base32 = new BaseX("abcdefghijklmnopqrstuvwxyz234567"); +const Base58 = new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); +//console.log(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj")) +//console.log(Base58.encode(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj"))) + +var SupportedAlgorithm; +(function (SupportedAlgorithm) { + SupportedAlgorithm["sha256"] = "sha256"; + SupportedAlgorithm["sha512"] = "sha512"; +})(SupportedAlgorithm || (SupportedAlgorithm = {})); +; + +const version$e = "sha2/5.5.0"; + +"use strict"; +const logger$j = new Logger(version$e); +function ripemd160$1(data) { + return "0x" + (hash_1.ripemd160().update(arrayify(data)).digest("hex")); +} +function sha256$1(data) { + return "0x" + (hash_1.sha256().update(arrayify(data)).digest("hex")); +} +function sha512$1(data) { + return "0x" + (hash_1.sha512().update(arrayify(data)).digest("hex")); +} +function computeHmac(algorithm, key, data) { + if (!SupportedAlgorithm[algorithm]) { + logger$j.throwError("unsupported algorithm " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "hmac", + algorithm: algorithm + }); + } + return "0x" + hash_1.hmac(hash_1[algorithm], arrayify(key)).update(arrayify(data)).digest("hex"); +} + +"use strict"; +function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) { + password = arrayify(password); + salt = arrayify(salt); + let hLen; + let l = 1; + const DK = new Uint8Array(keylen); + const block1 = new Uint8Array(salt.length + 4); + block1.set(salt); + //salt.copy(block1, 0, 0, salt.length) + let r; + let T; + for (let i = 1; i <= l; i++) { + //block1.writeUInt32BE(i, salt.length) + block1[salt.length] = (i >> 24) & 0xff; + block1[salt.length + 1] = (i >> 16) & 0xff; + block1[salt.length + 2] = (i >> 8) & 0xff; + block1[salt.length + 3] = i & 0xff; + //let U = createHmac(password).update(block1).digest(); + let U = arrayify(computeHmac(hashAlgorithm, password, block1)); + if (!hLen) { + hLen = U.length; + T = new Uint8Array(hLen); + l = Math.ceil(keylen / hLen); + r = keylen - (l - 1) * hLen; + } + //U.copy(T, 0, 0, hLen) + T.set(U); + for (let j = 1; j < iterations; j++) { + //U = createHmac(password).update(U).digest(); + U = arrayify(computeHmac(hashAlgorithm, password, U)); + for (let k = 0; k < hLen; k++) + T[k] ^= U[k]; + } + const destPos = (i - 1) * hLen; + const len = (i === l ? r : hLen); + //T.copy(DK, destPos, 0, len) + DK.set(arrayify(T).slice(0, len), destPos); + } + return hexlify(DK); +} + +const version$f = "wordlists/5.5.0"; + +"use strict"; +// This gets overridden by rollup +const exportWordlist = false; +const logger$k = new Logger(version$f); +class Wordlist { + constructor(locale) { + logger$k.checkAbstract(new.target, Wordlist); + defineReadOnly(this, "locale", locale); + } + // Subclasses may override this + split(mnemonic) { + return mnemonic.toLowerCase().split(/ +/g); + } + // Subclasses may override this + join(words) { + return words.join(" "); + } + static check(wordlist) { + const words = []; + for (let i = 0; i < 2048; i++) { + const word = wordlist.getWord(i); + /* istanbul ignore if */ + if (i !== wordlist.getWordIndex(word)) { + return "0x"; + } + words.push(word); + } + return id(words.join("\n") + "\n"); + } + static register(lang, name) { + if (!name) { + name = lang.locale; + } + /* istanbul ignore if */ + if (exportWordlist) { + try { + const anyGlobal = window; + if (anyGlobal._ethers && anyGlobal._ethers.wordlists) { + if (!anyGlobal._ethers.wordlists[name]) { + defineReadOnly(anyGlobal._ethers.wordlists, name, lang); + } + } + } + catch (error) { } + } + } +} + +"use strict"; +const words = "AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo"; +let wordlist = null; +function loadWords(lang) { + if (wordlist != null) { + return; + } + wordlist = words.replace(/([A-Z])/g, " $1").toLowerCase().substring(1).split(" "); + // Verify the computed list matches the official list + /* istanbul ignore if */ + if (Wordlist.check(lang) !== "0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60") { + wordlist = null; + throw new Error("BIP39 Wordlist for en (English) FAILED"); + } +} +class LangEn extends Wordlist { + constructor() { + super("en"); + } + getWord(index) { + loadWords(this); + return wordlist[index]; + } + getWordIndex(word) { + loadWords(this); + return wordlist.indexOf(word); + } +} +const langEn = new LangEn(); +Wordlist.register(langEn); + +"use strict"; +const wordlists = { + en: langEn +}; + +"use strict"; + +const version$g = "hdnode/5.5.0"; + +"use strict"; +const logger$l = new Logger(version$g); +const N = BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); +// "Bitcoin seed" +const MasterSecret = toUtf8Bytes("Bitcoin seed"); +const HardenedBit = 0x80000000; +// Returns a byte with the MSB bits set +function getUpperMask(bits) { + return ((1 << bits) - 1) << (8 - bits); +} +// Returns a byte with the LSB bits set +function getLowerMask(bits) { + return (1 << bits) - 1; +} +function bytes32(value) { + return hexZeroPad(hexlify(value), 32); +} +function base58check(data) { + return Base58.encode(concat([data, hexDataSlice(sha256$1(sha256$1(data)), 0, 4)])); +} +function getWordlist(wordlist) { + if (wordlist == null) { + return wordlists["en"]; + } + if (typeof (wordlist) === "string") { + const words = wordlists[wordlist]; + if (words == null) { + logger$l.throwArgumentError("unknown locale", "wordlist", wordlist); + } + return words; + } + return wordlist; +} +const _constructorGuard$3 = {}; +const defaultPath = "m/44'/60'/0'/0/0"; +; +class HDNode { + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + constructor(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonicOrPath) { + logger$l.checkNew(new.target, HDNode); + /* istanbul ignore if */ + if (constructorGuard !== _constructorGuard$3) { + throw new Error("HDNode constructor cannot be called directly"); + } + if (privateKey) { + const signingKey = new SigningKey(privateKey); + defineReadOnly(this, "privateKey", signingKey.privateKey); + defineReadOnly(this, "publicKey", signingKey.compressedPublicKey); + } + else { + defineReadOnly(this, "privateKey", null); + defineReadOnly(this, "publicKey", hexlify(publicKey)); + } + defineReadOnly(this, "parentFingerprint", parentFingerprint); + defineReadOnly(this, "fingerprint", hexDataSlice(ripemd160$1(sha256$1(this.publicKey)), 0, 4)); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + defineReadOnly(this, "chainCode", chainCode); + defineReadOnly(this, "index", index); + defineReadOnly(this, "depth", depth); + if (mnemonicOrPath == null) { + // From a source that does not preserve the path (e.g. extended keys) + defineReadOnly(this, "mnemonic", null); + defineReadOnly(this, "path", null); + } + else if (typeof (mnemonicOrPath) === "string") { + // From a source that does not preserve the mnemonic (e.g. neutered) + defineReadOnly(this, "mnemonic", null); + defineReadOnly(this, "path", mnemonicOrPath); + } + else { + // From a fully qualified source + defineReadOnly(this, "mnemonic", mnemonicOrPath); + defineReadOnly(this, "path", mnemonicOrPath.path); + } + } + get extendedKey() { + // We only support the mainnet values for now, but if anyone needs + // testnet values, let me know. I believe current sentiment is that + // we should always use mainnet, and use BIP-44 to derive the network + // - Mainnet: public=0x0488B21E, private=0x0488ADE4 + // - Testnet: public=0x043587CF, private=0x04358394 + if (this.depth >= 256) { + throw new Error("Depth too large!"); + } + return base58check(concat([ + ((this.privateKey != null) ? "0x0488ADE4" : "0x0488B21E"), + hexlify(this.depth), + this.parentFingerprint, + hexZeroPad(hexlify(this.index), 4), + this.chainCode, + ((this.privateKey != null) ? concat(["0x00", this.privateKey]) : this.publicKey), + ])); + } + neuter() { + return new HDNode(_constructorGuard$3, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path); + } + _derive(index) { + if (index > 0xffffffff) { + throw new Error("invalid index - " + String(index)); + } + // Base path + let path = this.path; + if (path) { + path += "/" + (index & ~HardenedBit); + } + const data = new Uint8Array(37); + if (index & HardenedBit) { + if (!this.privateKey) { + throw new Error("cannot derive child of neutered node"); + } + // Data = 0x00 || ser_256(k_par) + data.set(arrayify(this.privateKey), 1); + // Hardened path + if (path) { + path += "'"; + } + } + else { + // Data = ser_p(point(k_par)) + data.set(arrayify(this.publicKey)); + } + // Data += ser_32(i) + for (let i = 24; i >= 0; i -= 8) { + data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); + } + const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data)); + const IL = I.slice(0, 32); + const IR = I.slice(32); + // The private key + let ki = null; + // The public key + let Ki = null; + if (this.privateKey) { + ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N)); + } + else { + const ek = new SigningKey(hexlify(IL)); + Ki = ek._addPoint(this.publicKey); + } + let mnemonicOrPath = path; + const srcMnemonic = this.mnemonic; + if (srcMnemonic) { + mnemonicOrPath = Object.freeze({ + phrase: srcMnemonic.phrase, + path: path, + locale: (srcMnemonic.locale || "en") + }); + } + return new HDNode(_constructorGuard$3, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath); + } + derivePath(path) { + const components = path.split("/"); + if (components.length === 0 || (components[0] === "m" && this.depth !== 0)) { + throw new Error("invalid path - " + path); + } + if (components[0] === "m") { + components.shift(); + } + let result = this; + for (let i = 0; i < components.length; i++) { + const component = components[i]; + if (component.match(/^[0-9]+'$/)) { + const index = parseInt(component.substring(0, component.length - 1)); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(HardenedBit + index); + } + else if (component.match(/^[0-9]+$/)) { + const index = parseInt(component); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(index); + } + else { + throw new Error("invalid path component - " + component); + } + } + return result; + } + static _fromSeed(seed, mnemonic) { + const seedArray = arrayify(seed); + if (seedArray.length < 16 || seedArray.length > 64) { + throw new Error("invalid seed"); + } + const I = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray)); + return new HDNode(_constructorGuard$3, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); + } + static fromMnemonic(mnemonic, password, wordlist) { + // If a locale name was passed in, find the associated wordlist + wordlist = getWordlist(wordlist); + // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid) + mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist); + return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), { + phrase: mnemonic, + path: "m", + locale: wordlist.locale + }); + } + static fromSeed(seed) { + return HDNode._fromSeed(seed, null); + } + static fromExtendedKey(extendedKey) { + const bytes = Base58.decode(extendedKey); + if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) { + logger$l.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } + const depth = bytes[4]; + const parentFingerprint = hexlify(bytes.slice(5, 9)); + const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16); + const chainCode = hexlify(bytes.slice(13, 45)); + const key = bytes.slice(45, 78); + switch (hexlify(bytes.slice(0, 4))) { + // Public Key + case "0x0488b21e": + case "0x043587cf": + return new HDNode(_constructorGuard$3, null, hexlify(key), parentFingerprint, chainCode, index, depth, null); + // Private Key + case "0x0488ade4": + case "0x04358394 ": + if (key[0] !== 0) { + break; + } + return new HDNode(_constructorGuard$3, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null); + } + return logger$l.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } +} +function mnemonicToSeed(mnemonic, password) { + if (!password) { + password = ""; + } + const salt = toUtf8Bytes("mnemonic" + password, UnicodeNormalizationForm.NFKD); + return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512"); +} +function mnemonicToEntropy(mnemonic, wordlist) { + wordlist = getWordlist(wordlist); + logger$l.checkNormalize(); + const words = wordlist.split(mnemonic); + if ((words.length % 3) !== 0) { + throw new Error("invalid mnemonic"); + } + const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8))); + let offset = 0; + for (let i = 0; i < words.length; i++) { + let index = wordlist.getWordIndex(words[i].normalize("NFKD")); + if (index === -1) { + throw new Error("invalid mnemonic"); + } + for (let bit = 0; bit < 11; bit++) { + if (index & (1 << (10 - bit))) { + entropy[offset >> 3] |= (1 << (7 - (offset % 8))); + } + offset++; + } + } + const entropyBits = 32 * words.length / 3; + const checksumBits = words.length / 3; + const checksumMask = getUpperMask(checksumBits); + const checksum = arrayify(sha256$1(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; + if (checksum !== (entropy[entropy.length - 1] & checksumMask)) { + throw new Error("invalid checksum"); + } + return hexlify(entropy.slice(0, entropyBits / 8)); +} +function entropyToMnemonic(entropy, wordlist) { + wordlist = getWordlist(wordlist); + entropy = arrayify(entropy); + if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) { + throw new Error("invalid entropy"); + } + const indices = [0]; + let remainingBits = 11; + for (let i = 0; i < entropy.length; i++) { + // Consume the whole byte (with still more to go) + if (remainingBits > 8) { + indices[indices.length - 1] <<= 8; + indices[indices.length - 1] |= entropy[i]; + remainingBits -= 8; + // This byte will complete an 11-bit index + } + else { + indices[indices.length - 1] <<= remainingBits; + indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits); + // Start the next word + indices.push(entropy[i] & getLowerMask(8 - remainingBits)); + remainingBits += 3; + } + } + // Compute the checksum bits + const checksumBits = entropy.length / 4; + const checksum = arrayify(sha256$1(entropy))[0] & getUpperMask(checksumBits); + // Shift the checksum into the word indices + indices[indices.length - 1] <<= checksumBits; + indices[indices.length - 1] |= (checksum >> (8 - checksumBits)); + return wordlist.join(indices.map((index) => wordlist.getWord(index))); +} +function isValidMnemonic(mnemonic, wordlist) { + try { + mnemonicToEntropy(mnemonic, wordlist); + return true; + } + catch (error) { } + return false; +} +function getAccountPath(index) { + if (typeof (index) !== "number" || index < 0 || index >= HardenedBit || index % 1) { + logger$l.throwArgumentError("invalid account index", "index", index); + } + return `m/44'/60'/${index}'/0/0`; +} + +const version$h = "random/5.5.0"; + +"use strict"; +const logger$m = new Logger(version$h); +// Debugging line for testing browser lib in node +//const window = { crypto: { getRandomValues: () => { } } }; +let anyGlobal = null; +try { + anyGlobal = window; + if (anyGlobal == null) { + throw new Error("try next"); + } +} +catch (error) { + try { + anyGlobal = global; + if (anyGlobal == null) { + throw new Error("try next"); + } + } + catch (error) { + anyGlobal = {}; + } +} +let crypto = anyGlobal.crypto || anyGlobal.msCrypto; +if (!crypto || !crypto.getRandomValues) { + logger$m.warn("WARNING: Missing strong random number source"); + crypto = { + getRandomValues: function (buffer) { + return logger$m.throwError("no secure random source avaialble", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "crypto.getRandomValues" + }); + } + }; +} +function randomBytes(length) { + if (length <= 0 || length > 1024 || (length % 1) || length != length) { + logger$m.throwArgumentError("invalid length", "length", length); + } + const result = new Uint8Array(length); + crypto.getRandomValues(result); + return arrayify(result); +} +; + +"use strict"; +function shuffled(array) { + array = array.slice(); + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + const tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + return array; +} + +"use strict"; + +var aesJs = createCommonjsModule(function (module, exports) { +"use strict"; + +(function(root) { + + function checkInt(value) { + return (parseInt(value) === value); + } + + function checkInts(arrayish) { + if (!checkInt(arrayish.length)) { return false; } + + for (var i = 0; i < arrayish.length; i++) { + if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) { + return false; + } + } + + return true; + } + + function coerceArray(arg, copy) { + + // ArrayBuffer view + if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') { + + if (copy) { + if (arg.slice) { + arg = arg.slice(); + } else { + arg = Array.prototype.slice.call(arg); + } + } + + return arg; + } + + // It's an array; check it is a valid representation of a byte + if (Array.isArray(arg)) { + if (!checkInts(arg)) { + throw new Error('Array contains invalid value: ' + arg); + } + + return new Uint8Array(arg); + } + + // Something else, but behaves like an array (maybe a Buffer? Arguments?) + if (checkInt(arg.length) && checkInts(arg)) { + return new Uint8Array(arg); + } + + throw new Error('unsupported array-like object'); + } + + function createArray(length) { + return new Uint8Array(length); + } + + function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) { + if (sourceStart != null || sourceEnd != null) { + if (sourceArray.slice) { + sourceArray = sourceArray.slice(sourceStart, sourceEnd); + } else { + sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd); + } + } + targetArray.set(sourceArray, targetStart); + } + + + + var convertUtf8 = (function() { + function toBytes(text) { + var result = [], i = 0; + text = encodeURI(text); + while (i < text.length) { + var c = text.charCodeAt(i++); + + // if it is a % sign, encode the following 2 bytes as a hex value + if (c === 37) { + result.push(parseInt(text.substr(i, 2), 16)); + i += 2; + + // otherwise, just the actual byte + } else { + result.push(c); + } + } + + return coerceArray(result); + } + + function fromBytes(bytes) { + var result = [], i = 0; + + while (i < bytes.length) { + var c = bytes[i]; + + if (c < 128) { + result.push(String.fromCharCode(c)); + i++; + } else if (c > 191 && c < 224) { + result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f))); + i += 2; + } else { + result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f))); + i += 3; + } + } + + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + var convertHex = (function() { + function toBytes(text) { + var result = []; + for (var i = 0; i < text.length; i += 2) { + result.push(parseInt(text.substr(i, 2), 16)); + } + + return result; + } + + // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html + var Hex = '0123456789abcdef'; + + function fromBytes(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i++) { + var v = bytes[i]; + result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]); + } + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + + // Number of rounds by keysize + var numberOfRounds = {16: 10, 24: 12, 32: 14}; + + // Round constant words + var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91]; + + // S-box and Inverse S-box (S is for Substitution) + var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x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bd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]; + + // Transformations for encryption + var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a]; + var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616]; + var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16]; + var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c]; + + // Transformations for decryption + var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742]; + var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857]; + var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8]; + var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0]; + + // Transformations for decryption key expansion + var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]; + var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697]; + var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46]; + var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d]; + + function convertToInt32(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i += 4) { + result.push( + (bytes[i ] << 24) | + (bytes[i + 1] << 16) | + (bytes[i + 2] << 8) | + bytes[i + 3] + ); + } + return result; + } + + var AES = function(key) { + if (!(this instanceof AES)) { + throw Error('AES must be instanitated with `new`'); + } + + Object.defineProperty(this, 'key', { + value: coerceArray(key, true) + }); + + this._prepare(); + }; + + + AES.prototype._prepare = function() { + + var rounds = numberOfRounds[this.key.length]; + if (rounds == null) { + throw new Error('invalid key size (must be 16, 24 or 32 bytes)'); + } + + // encryption round keys + this._Ke = []; + + // decryption round keys + this._Kd = []; + + for (var i = 0; i <= rounds; i++) { + this._Ke.push([0, 0, 0, 0]); + this._Kd.push([0, 0, 0, 0]); + } + + var roundKeyCount = (rounds + 1) * 4; + var KC = this.key.length / 4; + + // convert the key into ints + var tk = convertToInt32(this.key); + + // copy values into round key arrays + var index; + for (var i = 0; i < KC; i++) { + index = i >> 2; + this._Ke[index][i % 4] = tk[i]; + this._Kd[rounds - index][i % 4] = tk[i]; + } + + // key expansion (fips-197 section 5.2) + var rconpointer = 0; + var t = KC, tt; + while (t < roundKeyCount) { + tt = tk[KC - 1]; + tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^ + (S[(tt >> 8) & 0xFF] << 16) ^ + (S[ tt & 0xFF] << 8) ^ + S[(tt >> 24) & 0xFF] ^ + (rcon[rconpointer] << 24)); + rconpointer += 1; + + // key expansion (for non-256 bit) + if (KC != 8) { + for (var i = 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + + // key expansion for 256-bit keys is "slightly different" (fips-197) + } else { + for (var i = 1; i < (KC / 2); i++) { + tk[i] ^= tk[i - 1]; + } + tt = tk[(KC / 2) - 1]; + + tk[KC / 2] ^= (S[ tt & 0xFF] ^ + (S[(tt >> 8) & 0xFF] << 8) ^ + (S[(tt >> 16) & 0xFF] << 16) ^ + (S[(tt >> 24) & 0xFF] << 24)); + + for (var i = (KC / 2) + 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + } + + // copy values into round key arrays + var i = 0, r, c; + while (i < KC && t < roundKeyCount) { + r = t >> 2; + c = t % 4; + this._Ke[r][c] = tk[i]; + this._Kd[rounds - r][c] = tk[i++]; + t++; + } + } + + // inverse-cipher-ify the decryption round key (fips-197 section 5.3) + for (var r = 1; r < rounds; r++) { + for (var c = 0; c < 4; c++) { + tt = this._Kd[r][c]; + this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^ + U2[(tt >> 16) & 0xFF] ^ + U3[(tt >> 8) & 0xFF] ^ + U4[ tt & 0xFF]); + } + } + }; + + AES.prototype.encrypt = function(plaintext) { + if (plaintext.length != 16) { + throw new Error('invalid plaintext size (must be 16 bytes)'); + } + + var rounds = this._Ke.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(plaintext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Ke[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T1[(t[ i ] >> 24) & 0xff] ^ + T2[(t[(i + 1) % 4] >> 16) & 0xff] ^ + T3[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T4[ t[(i + 3) % 4] & 0xff] ^ + this._Ke[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Ke[rounds][i]; + result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + }; + + AES.prototype.decrypt = function(ciphertext) { + if (ciphertext.length != 16) { + throw new Error('invalid ciphertext size (must be 16 bytes)'); + } + + var rounds = this._Kd.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(ciphertext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Kd[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T5[(t[ i ] >> 24) & 0xff] ^ + T6[(t[(i + 3) % 4] >> 16) & 0xff] ^ + T7[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T8[ t[(i + 1) % 4] & 0xff] ^ + this._Kd[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Kd[rounds][i]; + result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + }; + + + /** + * Mode Of Operation - Electonic Codebook (ECB) + */ + var ModeOfOperationECB = function(key) { + if (!(this instanceof ModeOfOperationECB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Electronic Code Block"; + this.name = "ecb"; + + this._aes = new AES(key); + }; + + ModeOfOperationECB.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + block = this._aes.encrypt(block); + copyArray(block, ciphertext, i); + } + + return ciphertext; + }; + + ModeOfOperationECB.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + copyArray(block, plaintext, i); + } + + return plaintext; + }; + + + /** + * Mode Of Operation - Cipher Block Chaining (CBC) + */ + var ModeOfOperationCBC = function(key, iv) { + if (!(this instanceof ModeOfOperationCBC)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Block Chaining"; + this.name = "cbc"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastCipherblock = coerceArray(iv, true); + + this._aes = new AES(key); + }; + + ModeOfOperationCBC.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + + for (var j = 0; j < 16; j++) { + block[j] ^= this._lastCipherblock[j]; + } + + this._lastCipherblock = this._aes.encrypt(block); + copyArray(this._lastCipherblock, ciphertext, i); + } + + return ciphertext; + }; + + ModeOfOperationCBC.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + + for (var j = 0; j < 16; j++) { + plaintext[i + j] = block[j] ^ this._lastCipherblock[j]; + } + + copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16); + } + + return plaintext; + }; + + + /** + * Mode Of Operation - Cipher Feedback (CFB) + */ + var ModeOfOperationCFB = function(key, iv, segmentSize) { + if (!(this instanceof ModeOfOperationCFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Feedback"; + this.name = "cfb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 size)'); + } + + if (!segmentSize) { segmentSize = 1; } + + this.segmentSize = segmentSize; + + this._shiftRegister = coerceArray(iv, true); + + this._aes = new AES(key); + }; + + ModeOfOperationCFB.prototype.encrypt = function(plaintext) { + if ((plaintext.length % this.segmentSize) != 0) { + throw new Error('invalid plaintext size (must be segmentSize bytes)'); + } + + var encrypted = coerceArray(plaintext, true); + + var xorSegment; + for (var i = 0; i < encrypted.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + for (var j = 0; j < this.segmentSize; j++) { + encrypted[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return encrypted; + }; + + ModeOfOperationCFB.prototype.decrypt = function(ciphertext) { + if ((ciphertext.length % this.segmentSize) != 0) { + throw new Error('invalid ciphertext size (must be segmentSize bytes)'); + } + + var plaintext = coerceArray(ciphertext, true); + + var xorSegment; + for (var i = 0; i < plaintext.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + + for (var j = 0; j < this.segmentSize; j++) { + plaintext[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return plaintext; + }; + + /** + * Mode Of Operation - Output Feedback (OFB) + */ + var ModeOfOperationOFB = function(key, iv) { + if (!(this instanceof ModeOfOperationOFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Output Feedback"; + this.name = "ofb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastPrecipher = coerceArray(iv, true); + this._lastPrecipherIndex = 16; + + this._aes = new AES(key); + }; + + ModeOfOperationOFB.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._lastPrecipherIndex === 16) { + this._lastPrecipher = this._aes.encrypt(this._lastPrecipher); + this._lastPrecipherIndex = 0; + } + encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++]; + } + + return encrypted; + }; + + // Decryption is symetric + ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt; + + + /** + * Counter object for CTR common mode of operation + */ + var Counter = function(initialValue) { + if (!(this instanceof Counter)) { + throw Error('Counter must be instanitated with `new`'); + } + + // We allow 0, but anything false-ish uses the default 1 + if (initialValue !== 0 && !initialValue) { initialValue = 1; } + + if (typeof(initialValue) === 'number') { + this._counter = createArray(16); + this.setValue(initialValue); + + } else { + this.setBytes(initialValue); + } + }; + + Counter.prototype.setValue = function(value) { + if (typeof(value) !== 'number' || parseInt(value) != value) { + throw new Error('invalid counter value (must be an integer)'); + } + + for (var index = 15; index >= 0; --index) { + this._counter[index] = value % 256; + value = value >> 8; + } + }; + + Counter.prototype.setBytes = function(bytes) { + bytes = coerceArray(bytes, true); + + if (bytes.length != 16) { + throw new Error('invalid counter bytes size (must be 16 bytes)'); + } + + this._counter = bytes; + }; + + Counter.prototype.increment = function() { + for (var i = 15; i >= 0; i--) { + if (this._counter[i] === 255) { + this._counter[i] = 0; + } else { + this._counter[i]++; + break; + } + } + }; + + + /** + * Mode Of Operation - Counter (CTR) + */ + var ModeOfOperationCTR = function(key, counter) { + if (!(this instanceof ModeOfOperationCTR)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Counter"; + this.name = "ctr"; + + if (!(counter instanceof Counter)) { + counter = new Counter(counter); + } + + this._counter = counter; + + this._remainingCounter = null; + this._remainingCounterIndex = 16; + + this._aes = new AES(key); + }; + + ModeOfOperationCTR.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._remainingCounterIndex === 16) { + this._remainingCounter = this._aes.encrypt(this._counter._counter); + this._remainingCounterIndex = 0; + this._counter.increment(); + } + encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++]; + } + + return encrypted; + }; + + // Decryption is symetric + ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt; + + + /////////////////////// + // Padding + + // See:https://tools.ietf.org/html/rfc2315 + function pkcs7pad(data) { + data = coerceArray(data, true); + var padder = 16 - (data.length % 16); + var result = createArray(data.length + padder); + copyArray(data, result); + for (var i = data.length; i < result.length; i++) { + result[i] = padder; + } + return result; + } + + function pkcs7strip(data) { + data = coerceArray(data, true); + if (data.length < 16) { throw new Error('PKCS#7 invalid length'); } + + var padder = data[data.length - 1]; + if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); } + + var length = data.length - padder; + for (var i = 0; i < padder; i++) { + if (data[length + i] !== padder) { + throw new Error('PKCS#7 invalid padding byte'); + } + } + + var result = createArray(length); + copyArray(data, result, 0, 0, length); + return result; + } + + /////////////////////// + // Exporting + + + // The block cipher + var aesjs = { + AES: AES, + Counter: Counter, + + ModeOfOperation: { + ecb: ModeOfOperationECB, + cbc: ModeOfOperationCBC, + cfb: ModeOfOperationCFB, + ofb: ModeOfOperationOFB, + ctr: ModeOfOperationCTR + }, + + utils: { + hex: convertHex, + utf8: convertUtf8 + }, + + padding: { + pkcs7: { + pad: pkcs7pad, + strip: pkcs7strip + } + }, + + _arrayTest: { + coerceArray: coerceArray, + createArray: createArray, + copyArray: copyArray, + } + }; + + + // node.js + if ('object' !== 'undefined') { + module.exports = aesjs; + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(undefined) === 'function' && undefined.amd) { + undefined(aesjs); + + // Web Browsers + } else { + + // If there was an existing library at "aesjs" make sure it's still available + if (root.aesjs) { + aesjs._aesjs = root.aesjs; + } + + root.aesjs = aesjs; + } + + +})(commonjsGlobal); +}); + +const version$i = "json-wallets/5.5.0"; + +"use strict"; +function looseArrayify(hexString) { + if (typeof (hexString) === 'string' && hexString.substring(0, 2) !== '0x') { + hexString = '0x' + hexString; + } + return arrayify(hexString); +} +function zpad(value, length) { + value = String(value); + while (value.length < length) { + value = '0' + value; + } + return value; +} +function getPassword(password) { + if (typeof (password) === 'string') { + return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC); + } + return arrayify(password); +} +function searchPath(object, path) { + let currentChild = object; + const comps = path.toLowerCase().split('/'); + for (let i = 0; i < comps.length; i++) { + // Search for a child object with a case-insensitive matching key + let matchingChild = null; + for (const key in currentChild) { + if (key.toLowerCase() === comps[i]) { + matchingChild = currentChild[key]; + break; + } + } + // Didn't find one. :'( + if (matchingChild === null) { + return null; + } + // Now check this child... + currentChild = matchingChild; + } + return currentChild; +} +// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4) +function uuidV4(randomBytes) { + const bytes = arrayify(randomBytes); + // Section: 4.1.3: + // - time_hi_and_version[12:16] = 0b0100 + bytes[6] = (bytes[6] & 0x0f) | 0x40; + // Section 4.4 + // - clock_seq_hi_and_reserved[6] = 0b0 + // - clock_seq_hi_and_reserved[7] = 0b1 + bytes[8] = (bytes[8] & 0x3f) | 0x80; + const value = hexlify(bytes); + return [ + value.substring(2, 10), + value.substring(10, 14), + value.substring(14, 18), + value.substring(18, 22), + value.substring(22, 34), + ].join("-"); +} + +"use strict"; +const logger$n = new Logger(version$i); +class CrowdsaleAccount extends Description { + isCrowdsaleAccount(value) { + return !!(value && value._isCrowdsaleAccount); + } +} +// See: https://github.com/ethereum/pyethsaletool +function decrypt(json, password) { + const data = JSON.parse(json); + password = getPassword(password); + // Ethereum Address + const ethaddr = getAddress(searchPath(data, "ethaddr")); + // Encrypted Seed + const encseed = looseArrayify(searchPath(data, "encseed")); + if (!encseed || (encseed.length % 16) !== 0) { + logger$n.throwArgumentError("invalid encseed", "json", json); + } + const key = arrayify(pbkdf2(password, password, 2000, 32, "sha256")).slice(0, 16); + const iv = encseed.slice(0, 16); + const encryptedSeed = encseed.slice(16); + // Decrypt the seed + const aesCbc = new aesJs.ModeOfOperation.cbc(key, iv); + const seed = aesJs.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed))); + // This wallet format is weird... Convert the binary encoded hex to a string. + let seedHex = ""; + for (let i = 0; i < seed.length; i++) { + seedHex += String.fromCharCode(seed[i]); + } + const seedHexBytes = toUtf8Bytes(seedHex); + const privateKey = keccak256(seedHexBytes); + return new CrowdsaleAccount({ + _isCrowdsaleAccount: true, + address: ethaddr, + privateKey: privateKey + }); +} + +"use strict"; +function isCrowdsaleWallet(json) { + let data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + return (data.encseed && data.ethaddr); +} +function isKeystoreWallet(json) { + let data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) { + return false; + } + // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff + return true; +} +//export function isJsonWallet(json: string): boolean { +// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json)); +//} +function getJsonWalletAddress(json) { + if (isCrowdsaleWallet(json)) { + try { + return getAddress(JSON.parse(json).ethaddr); + } + catch (error) { + return null; + } + } + if (isKeystoreWallet(json)) { + try { + return getAddress(JSON.parse(json).address); + } + catch (error) { + return null; + } + } + return null; +} + +var scrypt = createCommonjsModule(function (module, exports) { +"use strict"; + +(function(root) { + const MAX_VALUE = 0x7fffffff; + + // The SHA256 and PBKDF2 implementation are from scrypt-async-js: + // See: https://github.com/dchest/scrypt-async-js + function SHA256(m) { + const K = new Uint32Array([ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, + 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, + 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, + 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, + 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, + 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, + 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, + 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, + 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, + 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 + ]); + + let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a; + let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19; + const w = new Uint32Array(64); + + function blocks(p) { + let off = 0, len = p.length; + while (len >= 64) { + let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2; + + for (i = 0; i < 16; i++) { + j = off + i*4; + w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) | + ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff); + } + + for (i = 16; i < 64; i++) { + u = w[i-2]; + t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10); + + u = w[i-15]; + t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3); + + w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0; + } + + for (i = 0; i < 64; i++) { + t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^ + ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) + + ((h + ((K[i] + w[i]) | 0)) | 0)) | 0; + + t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^ + ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + h0 = (h0 + a) | 0; + h1 = (h1 + b) | 0; + h2 = (h2 + c) | 0; + h3 = (h3 + d) | 0; + h4 = (h4 + e) | 0; + h5 = (h5 + f) | 0; + h6 = (h6 + g) | 0; + h7 = (h7 + h) | 0; + + off += 64; + len -= 64; + } + } + + blocks(m); + + let i, bytesLeft = m.length % 64, + bitLenHi = (m.length / 0x20000000) | 0, + bitLenLo = m.length << 3, + numZeros = (bytesLeft < 56) ? 56 : 120, + p = m.slice(m.length - bytesLeft, m.length); + + p.push(0x80); + for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); } + p.push((bitLenHi >>> 24) & 0xff); + p.push((bitLenHi >>> 16) & 0xff); + p.push((bitLenHi >>> 8) & 0xff); + p.push((bitLenHi >>> 0) & 0xff); + p.push((bitLenLo >>> 24) & 0xff); + p.push((bitLenLo >>> 16) & 0xff); + p.push((bitLenLo >>> 8) & 0xff); + p.push((bitLenLo >>> 0) & 0xff); + + blocks(p); + + return [ + (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff, + (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff, + (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff, + (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff, + (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff, + (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff, + (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff, + (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff + ]; + } + + function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) { + // compress password if it's longer than hash block length + password = (password.length <= 64) ? password : SHA256(password); + + const innerLen = 64 + salt.length + 4; + const inner = new Array(innerLen); + const outerKey = new Array(64); + + let i; + let dk = []; + + // inner = (password ^ ipad) || salt || counter + for (i = 0; i < 64; i++) { inner[i] = 0x36; } + for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; } + for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; } + for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; } + + // outerKey = password ^ opad + for (i = 0; i < 64; i++) outerKey[i] = 0x5c; + for (i = 0; i < password.length; i++) outerKey[i] ^= password[i]; + + // increments counter inside inner + function incrementCounter() { + for (let i = innerLen - 1; i >= innerLen - 4; i--) { + inner[i]++; + if (inner[i] <= 0xff) return; + inner[i] = 0; + } + } + + // output blocks = SHA256(outerKey || SHA256(inner)) ... + while (dkLen >= 32) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner)))); + dkLen -= 32; + } + if (dkLen > 0) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen)); + } + + return dk; + } + + // The following is an adaptation of scryptsy + // See: https://www.npmjs.com/package/scryptsy + function blockmix_salsa8(BY, Yi, r, x, _X) { + let i; + + arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16); + for (i = 0; i < 2 * r; i++) { + blockxor(BY, i * 16, _X, 16); + salsa20_8(_X, x); + arraycopy(_X, 0, BY, Yi + (i * 16), 16); + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16); + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16); + } + } + + function R(a, b) { + return (a << b) | (a >>> (32 - b)); + } + + function salsa20_8(B, x) { + arraycopy(B, 0, x, 0, 16); + + for (let i = 8; i > 0; i -= 2) { + x[ 4] ^= R(x[ 0] + x[12], 7); + x[ 8] ^= R(x[ 4] + x[ 0], 9); + x[12] ^= R(x[ 8] + x[ 4], 13); + x[ 0] ^= R(x[12] + x[ 8], 18); + x[ 9] ^= R(x[ 5] + x[ 1], 7); + x[13] ^= R(x[ 9] + x[ 5], 9); + x[ 1] ^= R(x[13] + x[ 9], 13); + x[ 5] ^= R(x[ 1] + x[13], 18); + x[14] ^= R(x[10] + x[ 6], 7); + x[ 2] ^= R(x[14] + x[10], 9); + x[ 6] ^= R(x[ 2] + x[14], 13); + x[10] ^= R(x[ 6] + x[ 2], 18); + x[ 3] ^= R(x[15] + x[11], 7); + x[ 7] ^= R(x[ 3] + x[15], 9); + x[11] ^= R(x[ 7] + x[ 3], 13); + x[15] ^= R(x[11] + x[ 7], 18); + x[ 1] ^= R(x[ 0] + x[ 3], 7); + x[ 2] ^= R(x[ 1] + x[ 0], 9); + x[ 3] ^= R(x[ 2] + x[ 1], 13); + x[ 0] ^= R(x[ 3] + x[ 2], 18); + x[ 6] ^= R(x[ 5] + x[ 4], 7); + x[ 7] ^= R(x[ 6] + x[ 5], 9); + x[ 4] ^= R(x[ 7] + x[ 6], 13); + x[ 5] ^= R(x[ 4] + x[ 7], 18); + x[11] ^= R(x[10] + x[ 9], 7); + x[ 8] ^= R(x[11] + x[10], 9); + x[ 9] ^= R(x[ 8] + x[11], 13); + x[10] ^= R(x[ 9] + x[ 8], 18); + x[12] ^= R(x[15] + x[14], 7); + x[13] ^= R(x[12] + x[15], 9); + x[14] ^= R(x[13] + x[12], 13); + x[15] ^= R(x[14] + x[13], 18); + } + + for (let i = 0; i < 16; ++i) { + B[i] += x[i]; + } + } + + // naive approach... going back to loop unrolling may yield additional performance + function blockxor(S, Si, D, len) { + for (let i = 0; i < len; i++) { + D[i] ^= S[Si + i]; + } + } + + function arraycopy(src, srcPos, dest, destPos, length) { + while (length--) { + dest[destPos++] = src[srcPos++]; + } + } + + function checkBufferish(o) { + if (!o || typeof(o.length) !== 'number') { return false; } + + for (let i = 0; i < o.length; i++) { + const v = o[i]; + if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) { + return false; + } + } + + return true; + } + + function ensureInteger(value, name) { + if (typeof(value) !== "number" || (value % 1)) { throw new Error('invalid ' + name); } + return value; + } + + // N = Cpu cost, r = Memory cost, p = parallelization cost + // callback(error, progress, key) + function _scrypt(password, salt, N, r, p, dkLen, callback) { + + N = ensureInteger(N, 'N'); + r = ensureInteger(r, 'r'); + p = ensureInteger(p, 'p'); + + dkLen = ensureInteger(dkLen, 'dkLen'); + + if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); } + + if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); } + if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); } + + if (!checkBufferish(password)) { + throw new Error('password must be an array or buffer'); + } + password = Array.prototype.slice.call(password); + + if (!checkBufferish(salt)) { + throw new Error('salt must be an array or buffer'); + } + salt = Array.prototype.slice.call(salt); + + let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r); + const B = new Uint32Array(p * 32 * r); + for (let i = 0; i < B.length; i++) { + const j = i * 4; + B[i] = ((b[j + 3] & 0xff) << 24) | + ((b[j + 2] & 0xff) << 16) | + ((b[j + 1] & 0xff) << 8) | + ((b[j + 0] & 0xff) << 0); + } + + const XY = new Uint32Array(64 * r); + const V = new Uint32Array(32 * r * N); + + const Yi = 32 * r; + + // scratch space + const x = new Uint32Array(16); // salsa20_8 + const _X = new Uint32Array(16); // blockmix_salsa8 + + const totalOps = p * N * 2; + let currentOp = 0; + let lastPercent10 = null; + + // Set this to true to abandon the scrypt on the next step + let stop = false; + + // State information + let state = 0; + let i0 = 0, i1; + let Bi; + + // How many blockmix_salsa8 can we do per step? + const limit = callback ? parseInt(1000 / r): 0xffffffff; + + // Trick from scrypt-async; if there is a setImmediate shim in place, use it + const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout; + + // This is really all I changed; making scryptsy a state machine so we occasionally + // stop and give other evnts on the evnt loop a chance to run. ~RicMoo + const incrementalSMix = function() { + if (stop) { + return callback(new Error('cancelled'), currentOp / totalOps); + } + + let steps; + + switch (state) { + case 0: + // for (var i = 0; i < p; i++)... + Bi = i0 * 32 * r; + + arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1 + + state = 1; // Move to ROMix 2 + i1 = 0; + + // Fall through + + case 1: + + // Run up to 1000 steps of the first inner smix loop + steps = N - i1; + if (steps > limit) { steps = limit; } + for (let i = 0; i < steps; i++) { // ROMix - 2 + arraycopy(XY, 0, V, (i1 + i) * Yi, Yi); // ROMix - 3 + blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4 + } + + // for (var i = 0; i < N; i++) + i1 += steps; + currentOp += steps; + + if (callback) { + // Call the callback with the progress (optionally stopping us) + const percent10 = parseInt(1000 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { break; } + lastPercent10 = percent10; + } + } + + if (i1 < N) { break; } + + i1 = 0; // Move to ROMix 6 + state = 2; + + // Fall through + + case 2: + + // Run up to 1000 steps of the second inner smix loop + steps = N - i1; + if (steps > limit) { steps = limit; } + for (let i = 0; i < steps; i++) { // ROMix - 6 + const offset = (2 * r - 1) * 16; // ROMix - 7 + const j = XY[offset] & (N - 1); + blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner) + blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer) + } + + // for (var i = 0; i < N; i++)... + i1 += steps; + currentOp += steps; + + // Call the callback with the progress (optionally stopping us) + if (callback) { + const percent10 = parseInt(1000 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { break; } + lastPercent10 = percent10; + } + } + + if (i1 < N) { break; } + + arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10 + + // for (var i = 0; i < p; i++)... + i0++; + if (i0 < p) { + state = 0; + break; + } + + b = []; + for (let i = 0; i < B.length; i++) { + b.push((B[i] >> 0) & 0xff); + b.push((B[i] >> 8) & 0xff); + b.push((B[i] >> 16) & 0xff); + b.push((B[i] >> 24) & 0xff); + } + + const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen); + + // Send the result to the callback + if (callback) { callback(null, 1.0, derivedKey); } + + // Done; don't break (which would reschedule) + return derivedKey; + } + + // Schedule the next steps + if (callback) { nextTick(incrementalSMix); } + }; + + // Run the smix state machine until completion + if (!callback) { + while (true) { + const derivedKey = incrementalSMix(); + if (derivedKey != undefined) { return derivedKey; } + } + } + + // Bootstrap the async incremental smix + incrementalSMix(); + } + + const lib = { + scrypt: function(password, salt, N, r, p, dkLen, progressCallback) { + return new Promise(function(resolve, reject) { + let lastProgress = 0; + if (progressCallback) { progressCallback(0); } + _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) { + if (error) { + reject(error); + } else if (key) { + if (progressCallback && lastProgress !== 1) { + progressCallback(1); + } + resolve(new Uint8Array(key)); + } else if (progressCallback && progress !== lastProgress) { + lastProgress = progress; + return progressCallback(progress); + } + }); + }); + }, + syncScrypt: function(password, salt, N, r, p, dkLen) { + return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen)); + } + }; + + // node.js + if ('object' !== 'undefined') { + module.exports = lib; + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(undefined) === 'function' && undefined.amd) { + undefined(lib); + + // Web Browsers + } else if (root) { + + // If there was an existing library "scrypt", make sure it is still available + if (root.scrypt) { + root._scrypt = root.scrypt; + } + + root.scrypt = lib; + } + +})(commonjsGlobal); +}); + +"use strict"; +var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$o = new Logger(version$i); +// Exported Types +function hasMnemonic(value) { + return (value != null && value.mnemonic && value.mnemonic.phrase); +} +class KeystoreAccount extends Description { + isKeystoreAccount(value) { + return !!(value && value._isKeystoreAccount); + } +} +function _decrypt(data, key, ciphertext) { + const cipher = searchPath(data, "crypto/cipher"); + if (cipher === "aes-128-ctr") { + const iv = looseArrayify(searchPath(data, "crypto/cipherparams/iv")); + const counter = new aesJs.Counter(iv); + const aesCtr = new aesJs.ModeOfOperation.ctr(key, counter); + return arrayify(aesCtr.decrypt(ciphertext)); + } + return null; +} +function _getAccount(data, key) { + const ciphertext = looseArrayify(searchPath(data, "crypto/ciphertext")); + const computedMAC = hexlify(keccak256(concat([key.slice(16, 32), ciphertext]))).substring(2); + if (computedMAC !== searchPath(data, "crypto/mac").toLowerCase()) { + throw new Error("invalid password"); + } + const privateKey = _decrypt(data, key.slice(0, 16), ciphertext); + if (!privateKey) { + logger$o.throwError("unsupported cipher", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "decrypt" + }); + } + const mnemonicKey = key.slice(32, 64); + const address = computeAddress(privateKey); + if (data.address) { + let check = data.address.toLowerCase(); + if (check.substring(0, 2) !== "0x") { + check = "0x" + check; + } + if (getAddress(check) !== address) { + throw new Error("address mismatch"); + } + } + const account = { + _isKeystoreAccount: true, + address: address, + privateKey: hexlify(privateKey) + }; + // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase + if (searchPath(data, "x-ethers/version") === "0.1") { + const mnemonicCiphertext = looseArrayify(searchPath(data, "x-ethers/mnemonicCiphertext")); + const mnemonicIv = looseArrayify(searchPath(data, "x-ethers/mnemonicCounter")); + const mnemonicCounter = new aesJs.Counter(mnemonicIv); + const mnemonicAesCtr = new aesJs.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + const path = searchPath(data, "x-ethers/path") || defaultPath; + const locale = searchPath(data, "x-ethers/locale") || "en"; + const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext)); + try { + const mnemonic = entropyToMnemonic(entropy, locale); + const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + account.mnemonic = node.mnemonic; + } + catch (error) { + // If we don't have the locale wordlist installed to + // read this mnemonic, just bail and don't set the + // mnemonic + if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { + throw error; + } + } + } + return new KeystoreAccount(account); +} +function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) { + return arrayify(pbkdf2(passwordBytes, salt, count, dkLen, prfFunc)); +} +function pbkdf2$1(passwordBytes, salt, count, dkLen, prfFunc) { + return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc)); +} +function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) { + const passwordBytes = getPassword(password); + const kdf = searchPath(data, "crypto/kdf"); + if (kdf && typeof (kdf) === "string") { + const throwError = function (name, value) { + return logger$o.throwArgumentError("invalid key-derivation function parameters", name, value); + }; + if (kdf.toLowerCase() === "scrypt") { + const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); + const N = parseInt(searchPath(data, "crypto/kdfparams/n")); + const r = parseInt(searchPath(data, "crypto/kdfparams/r")); + const p = parseInt(searchPath(data, "crypto/kdfparams/p")); + // Check for all required parameters + if (!N || !r || !p) { + throwError("kdf", kdf); + } + // Make sure N is a power of 2 + if ((N & (N - 1)) !== 0) { + throwError("N", N); + } + const dkLen = parseInt(searchPath(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback); + } + else if (kdf.toLowerCase() === "pbkdf2") { + const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); + let prfFunc = null; + const prf = searchPath(data, "crypto/kdfparams/prf"); + if (prf === "hmac-sha256") { + prfFunc = "sha256"; + } + else if (prf === "hmac-sha512") { + prfFunc = "sha512"; + } + else { + throwError("prf", prf); + } + const count = parseInt(searchPath(data, "crypto/kdfparams/c")); + const dkLen = parseInt(searchPath(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc); + } + } + return logger$o.throwArgumentError("unsupported key-derivation function", "kdf", kdf); +} +function decryptSync(json, password) { + const data = JSON.parse(json); + const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt); + return _getAccount(data, key); +} +function decrypt$1(json, password, progressCallback) { + return __awaiter$5(this, void 0, void 0, function* () { + const data = JSON.parse(json); + const key = yield _computeKdfKey(data, password, pbkdf2$1, scrypt.scrypt, progressCallback); + return _getAccount(data, key); + }); +} +function encrypt(account, password, options, progressCallback) { + try { + // Check the address matches the private key + if (getAddress(account.address) !== computeAddress(account.privateKey)) { + throw new Error("address/privateKey mismatch"); + } + // Check the mnemonic (if any) matches the private key + if (hasMnemonic(account)) { + const mnemonic = account.mnemonic; + const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + } + } + catch (e) { + return Promise.reject(e); + } + // The options are optional, so adjust the call as needed + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (!options) { + options = {}; + } + const privateKey = arrayify(account.privateKey); + const passwordBytes = getPassword(password); + let entropy = null; + let path = null; + let locale = null; + if (hasMnemonic(account)) { + const srcMnemonic = account.mnemonic; + entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || "en")); + path = srcMnemonic.path || defaultPath; + locale = srcMnemonic.locale || "en"; + } + let client = options.client; + if (!client) { + client = "ethers.js"; + } + // Check/generate the salt + let salt = null; + if (options.salt) { + salt = arrayify(options.salt); + } + else { + salt = randomBytes(32); + ; + } + // Override initialization vector + let iv = null; + if (options.iv) { + iv = arrayify(options.iv); + if (iv.length !== 16) { + throw new Error("invalid iv"); + } + } + else { + iv = randomBytes(16); + } + // Override the uuid + let uuidRandom = null; + if (options.uuid) { + uuidRandom = arrayify(options.uuid); + if (uuidRandom.length !== 16) { + throw new Error("invalid uuid"); + } + } + else { + uuidRandom = randomBytes(16); + } + // Override the scrypt password-based key derivation function parameters + let N = (1 << 17), r = 8, p = 1; + if (options.scrypt) { + if (options.scrypt.N) { + N = options.scrypt.N; + } + if (options.scrypt.r) { + r = options.scrypt.r; + } + if (options.scrypt.p) { + p = options.scrypt.p; + } + } + // We take 64 bytes: + // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix) + // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet) + return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => { + key = arrayify(key); + // This will be used to encrypt the wallet (as per Web3 secret storage) + const derivedKey = key.slice(0, 16); + const macPrefix = key.slice(16, 32); + // This will be used to encrypt the mnemonic phrase (if any) + const mnemonicKey = key.slice(32, 64); + // Encrypt the private key + const counter = new aesJs.Counter(iv); + const aesCtr = new aesJs.ModeOfOperation.ctr(derivedKey, counter); + const ciphertext = arrayify(aesCtr.encrypt(privateKey)); + // Compute the message authentication code, used to check the password + const mac = keccak256(concat([macPrefix, ciphertext])); + // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition + const data = { + address: account.address.substring(2).toLowerCase(), + id: uuidV4(uuidRandom), + version: 3, + Crypto: { + cipher: "aes-128-ctr", + cipherparams: { + iv: hexlify(iv).substring(2), + }, + ciphertext: hexlify(ciphertext).substring(2), + kdf: "scrypt", + kdfparams: { + salt: hexlify(salt).substring(2), + n: N, + dklen: 32, + p: p, + r: r + }, + mac: mac.substring(2) + } + }; + // If we have a mnemonic, encrypt it into the JSON wallet + if (entropy) { + const mnemonicIv = randomBytes(16); + const mnemonicCounter = new aesJs.Counter(mnemonicIv); + const mnemonicAesCtr = new aesJs.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy)); + const now = new Date(); + const timestamp = (now.getUTCFullYear() + "-" + + zpad(now.getUTCMonth() + 1, 2) + "-" + + zpad(now.getUTCDate(), 2) + "T" + + zpad(now.getUTCHours(), 2) + "-" + + zpad(now.getUTCMinutes(), 2) + "-" + + zpad(now.getUTCSeconds(), 2) + ".0Z"); + data["x-ethers"] = { + client: client, + gethFilename: ("UTC--" + timestamp + "--" + data.address), + mnemonicCounter: hexlify(mnemonicIv).substring(2), + mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2), + path: path, + locale: locale, + version: "0.1" + }; + } + return JSON.stringify(data); + }); +} + +"use strict"; +function decryptJsonWallet(json, password, progressCallback) { + if (isCrowdsaleWallet(json)) { + if (progressCallback) { + progressCallback(0); + } + const account = decrypt(json, password); + if (progressCallback) { + progressCallback(1); + } + return Promise.resolve(account); + } + if (isKeystoreWallet(json)) { + return decrypt$1(json, password, progressCallback); + } + return Promise.reject(new Error("invalid JSON wallet")); +} +function decryptJsonWalletSync(json, password) { + if (isCrowdsaleWallet(json)) { + return decrypt(json, password); + } + if (isKeystoreWallet(json)) { + return decryptSync(json, password); + } + throw new Error("invalid JSON wallet"); +} + +const version$j = "wallet/5.5.0"; + +"use strict"; +var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$p = new Logger(version$j); +function isAccount(value) { + return (value != null && isHexString(value.privateKey, 32) && value.address != null); +} +function hasMnemonic$1(value) { + const mnemonic = value.mnemonic; + return (mnemonic && mnemonic.phrase); +} +class Wallet extends Signer { + constructor(privateKey, provider) { + logger$p.checkNew(new.target, Wallet); + super(); + if (isAccount(privateKey)) { + const signingKey = new SigningKey(privateKey.privateKey); + defineReadOnly(this, "_signingKey", () => signingKey); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + if (this.address !== getAddress(privateKey.address)) { + logger$p.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); + } + if (hasMnemonic$1(privateKey)) { + const srcMnemonic = privateKey.mnemonic; + defineReadOnly(this, "_mnemonic", () => ({ + phrase: srcMnemonic.phrase, + path: srcMnemonic.path || defaultPath, + locale: srcMnemonic.locale || "en" + })); + const mnemonic = this.mnemonic; + const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path); + if (computeAddress(node.privateKey) !== this.address) { + logger$p.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); + } + } + else { + defineReadOnly(this, "_mnemonic", () => null); + } + } + else { + if (SigningKey.isSigningKey(privateKey)) { + /* istanbul ignore if */ + if (privateKey.curve !== "secp256k1") { + logger$p.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); + } + defineReadOnly(this, "_signingKey", () => privateKey); + } + else { + // A lot of common tools do not prefix private keys with a 0x (see: #1166) + if (typeof (privateKey) === "string") { + if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { + privateKey = "0x" + privateKey; + } + } + const signingKey = new SigningKey(privateKey); + defineReadOnly(this, "_signingKey", () => signingKey); + } + defineReadOnly(this, "_mnemonic", () => null); + defineReadOnly(this, "address", computeAddress(this.publicKey)); + } + /* istanbul ignore if */ + if (provider && !Provider.isProvider(provider)) { + logger$p.throwArgumentError("invalid provider", "provider", provider); + } + defineReadOnly(this, "provider", provider || null); + } + get mnemonic() { return this._mnemonic(); } + get privateKey() { return this._signingKey().privateKey; } + get publicKey() { return this._signingKey().publicKey; } + getAddress() { + return Promise.resolve(this.address); + } + connect(provider) { + return new Wallet(this, provider); + } + signTransaction(transaction) { + return resolveProperties(transaction).then((tx) => { + if (tx.from != null) { + if (getAddress(tx.from) !== this.address) { + logger$p.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); + } + delete tx.from; + } + const signature = this._signingKey().signDigest(keccak256(serialize(tx))); + return serialize(tx, signature); + }); + } + signMessage(message) { + return __awaiter$6(this, void 0, void 0, function* () { + return joinSignature(this._signingKey().signDigest(hashMessage(message))); + }); + } + _signTypedData(domain, types, value) { + return __awaiter$6(this, void 0, void 0, function* () { + // Populate any ENS names + const populated = yield TypedDataEncoder.resolveNames(domain, types, value, (name) => { + if (this.provider == null) { + logger$p.throwError("cannot resolve ENS names without a provider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName", + value: name + }); + } + return this.provider.resolveName(name); + }); + return joinSignature(this._signingKey().signDigest(TypedDataEncoder.hash(populated.domain, types, populated.value))); + }); + } + encrypt(password, options, progressCallback) { + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (progressCallback && typeof (progressCallback) !== "function") { + throw new Error("invalid callback"); + } + if (!options) { + options = {}; + } + return encrypt(this, password, options, progressCallback); + } + /** + * Static methods to create Wallet instances. + */ + static createRandom(options) { + let entropy = randomBytes(16); + if (!options) { + options = {}; + } + if (options.extraEntropy) { + entropy = arrayify(hexDataSlice(keccak256(concat([entropy, options.extraEntropy])), 0, 16)); + } + const mnemonic = entropyToMnemonic(entropy, options.locale); + return Wallet.fromMnemonic(mnemonic, options.path, options.locale); + } + static fromEncryptedJson(json, password, progressCallback) { + return decryptJsonWallet(json, password, progressCallback).then((account) => { + return new Wallet(account); + }); + } + static fromEncryptedJsonSync(json, password) { + return new Wallet(decryptJsonWalletSync(json, password)); + } + static fromMnemonic(mnemonic, path, wordlist) { + if (!path) { + path = defaultPath; + } + return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path)); + } +} +function verifyMessage(message, signature) { + return recoverAddress(hashMessage(message), signature); +} +function verifyTypedData(domain, types, value, signature) { + return recoverAddress(TypedDataEncoder.hash(domain, types, value), signature); +} + +const version$k = "networks/5.5.1"; + +"use strict"; +const logger$q = new Logger(version$k); +; +function isRenetworkable(value) { + return (value && typeof (value.renetwork) === "function"); +} +function ethDefaultProvider(network) { + const func = function (providers, options) { + if (options == null) { + options = {}; + } + const providerList = []; + if (providers.InfuraProvider) { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } + catch (error) { } + } + if (providers.EtherscanProvider) { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } + catch (error) { } + } + if (providers.AlchemyProvider) { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } + catch (error) { } + } + if (providers.PocketProvider) { + // These networks are currently faulty on Pocket as their + // network does not handle the Berlin hardfork, which is + // live on these ones. + // @TODO: This goes away once Pocket has upgraded their nodes + const skip = ["goerli", "ropsten", "rinkeby"]; + try { + const provider = new providers.PocketProvider(network); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + catch (error) { } + } + if (providers.CloudflareProvider) { + try { + providerList.push(new providers.CloudflareProvider(network)); + } + catch (error) { } + } + if (providerList.length === 0) { + return null; + } + if (providers.FallbackProvider) { + let quorum = 1; + if (options.quorum != null) { + quorum = options.quorum; + } + else if (network === "homestead") { + quorum = 2; + } + return new providers.FallbackProvider(providerList, quorum); + } + return providerList[0]; + }; + func.renetwork = function (network) { + return ethDefaultProvider(network); + }; + return func; +} +function etcDefaultProvider(url, network) { + const func = function (providers, options) { + if (providers.JsonRpcProvider) { + return new providers.JsonRpcProvider(url, network); + } + return null; + }; + func.renetwork = function (network) { + return etcDefaultProvider(url, network); + }; + return func; +} +const homestead = { + chainId: 1, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "homestead", + _defaultProvider: ethDefaultProvider("homestead") +}; +const ropsten = { + chainId: 3, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "ropsten", + _defaultProvider: ethDefaultProvider("ropsten") +}; +const classicMordor = { + chainId: 63, + name: "classicMordor", + _defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor") +}; +// See: https://chainlist.org +const networks = { + unspecified: { chainId: 0, name: "unspecified" }, + homestead: homestead, + mainnet: homestead, + morden: { chainId: 2, name: "morden" }, + ropsten: ropsten, + testnet: ropsten, + rinkeby: { + chainId: 4, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "rinkeby", + _defaultProvider: ethDefaultProvider("rinkeby") + }, + kovan: { + chainId: 42, + name: "kovan", + _defaultProvider: ethDefaultProvider("kovan") + }, + goerli: { + chainId: 5, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "goerli", + _defaultProvider: ethDefaultProvider("goerli") + }, + // ETC (See: #351) + classic: { + chainId: 61, + name: "classic", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/etc", "classic") + }, + classicMorden: { chainId: 62, name: "classicMorden" }, + classicMordor: classicMordor, + classicTestnet: classicMordor, + classicKotti: { + chainId: 6, + name: "classicKotti", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/kotti", "classicKotti") + }, + xdai: { chainId: 100, name: "xdai" }, + matic: { chainId: 137, name: "matic" }, + maticmum: { chainId: 80001, name: "maticmum" }, + optimism: { chainId: 10, name: "optimism" }, + "optimism-kovan": { chainId: 69, name: "optimism-kovan" }, + "optimism-goerli": { chainId: 420, name: "optimism-goerli" }, + arbitrum: { chainId: 42161, name: "arbitrum" }, + "arbitrum-rinkeby": { chainId: 421611, name: "arbitrum-rinkeby" }, + bnb: { chainId: 56, name: "bnb" }, + bnbt: { chainId: 97, name: "bnbt" }, +}; +/** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ +function getNetwork(network) { + // No network (null) + if (network == null) { + return null; + } + if (typeof (network) === "number") { + for (const name in networks) { + const standard = networks[name]; + if (standard.chainId === network) { + return { + name: standard.name, + chainId: standard.chainId, + ensAddress: (standard.ensAddress || null), + _defaultProvider: (standard._defaultProvider || null) + }; + } + } + return { + chainId: network, + name: "unknown" + }; + } + if (typeof (network) === "string") { + const standard = networks[network]; + if (standard == null) { + return null; + } + return { + name: standard.name, + chainId: standard.chainId, + ensAddress: standard.ensAddress, + _defaultProvider: (standard._defaultProvider || null) + }; + } + const standard = networks[network.name]; + // Not a standard network; check that it is a valid network in general + if (!standard) { + if (typeof (network.chainId) !== "number") { + logger$q.throwArgumentError("invalid network chainId", "network", network); + } + return network; + } + // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155) + if (network.chainId !== 0 && network.chainId !== standard.chainId) { + logger$q.throwArgumentError("network chainId mismatch", "network", network); + } + // @TODO: In the next major version add an attach function to a defaultProvider + // class and move the _defaultProvider internal to this file (extend Network) + let defaultProvider = network._defaultProvider || null; + if (defaultProvider == null && standard._defaultProvider) { + if (isRenetworkable(standard._defaultProvider)) { + defaultProvider = standard._defaultProvider.renetwork(network); + } + else { + defaultProvider = standard._defaultProvider; + } + } + // Standard Network (allow overriding the ENS address) + return { + name: network.name, + chainId: standard.chainId, + ensAddress: (network.ensAddress || standard.ensAddress || null), + _defaultProvider: defaultProvider + }; +} + +"use strict"; +function decode$1(textData) { + textData = atob(textData); + const data = []; + for (let i = 0; i < textData.length; i++) { + data.push(textData.charCodeAt(i)); + } + return arrayify(data); +} +function encode$1(data) { + data = arrayify(data); + let textData = ""; + for (let i = 0; i < data.length; i++) { + textData += String.fromCharCode(data[i]); + } + return btoa(textData); +} + +"use strict"; + +var index$2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + decode: decode$1, + encode: encode$1 +}); + +const version$l = "web/5.5.1"; + +"use strict"; +var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +function getUrl(href, options) { + return __awaiter$7(this, void 0, void 0, function* () { + if (options == null) { + options = {}; + } + const request = { + method: (options.method || "GET"), + headers: (options.headers || {}), + body: (options.body || undefined), + }; + if (options.skipFetchSetup !== true) { + request.mode = "cors"; // no-cors, cors, *same-origin + request.cache = "no-cache"; // *default, no-cache, reload, force-cache, only-if-cached + request.credentials = "same-origin"; // include, *same-origin, omit + request.redirect = "follow"; // manual, *follow, error + request.referrer = "client"; // no-referrer, *client + } + ; + const response = yield fetch(href, request); + const body = yield response.arrayBuffer(); + const headers = {}; + if (response.headers.forEach) { + response.headers.forEach((value, key) => { + headers[key.toLowerCase()] = value; + }); + } + else { + ((response.headers).keys)().forEach((key) => { + headers[key.toLowerCase()] = response.headers.get(key); + }); + } + return { + headers: headers, + statusCode: response.status, + statusMessage: response.statusText, + body: arrayify(new Uint8Array(body)), + }; + }); +} + +"use strict"; +var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$r = new Logger(version$l); +function staller(duration) { + return new Promise((resolve) => { + setTimeout(resolve, duration); + }); +} +function bodyify(value, type) { + if (value == null) { + return null; + } + if (typeof (value) === "string") { + return value; + } + if (isBytesLike(value)) { + if (type && (type.split("/")[0] === "text" || type.split(";")[0].trim() === "application/json")) { + try { + return toUtf8String(value); + } + catch (error) { } + ; + } + return hexlify(value); + } + return value; +} +// This API is still a work in progress; the future changes will likely be: +// - ConnectionInfo => FetchDataRequest +// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array } +// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified) +// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T +// For this reason, it should be considered internal until the API is finalized +function _fetchData(connection, body, processFunc) { + // How many times to retry in the event of a throttle + const attemptLimit = (typeof (connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit : 12; + logger$r.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); + const throttleCallback = ((typeof (connection) === "object") ? connection.throttleCallback : null); + const throttleSlotInterval = ((typeof (connection) === "object" && typeof (connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval : 100); + logger$r.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); + const headers = {}; + let url = null; + // @TODO: Allow ConnectionInfo to override some of these values + const options = { + method: "GET", + }; + let allow304 = false; + let timeout = 2 * 60 * 1000; + if (typeof (connection) === "string") { + url = connection; + } + else if (typeof (connection) === "object") { + if (connection == null || connection.url == null) { + logger$r.throwArgumentError("missing URL", "connection.url", connection); + } + url = connection.url; + if (typeof (connection.timeout) === "number" && connection.timeout > 0) { + timeout = connection.timeout; + } + if (connection.headers) { + for (const key in connection.headers) { + headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) }; + if (["if-none-match", "if-modified-since"].indexOf(key.toLowerCase()) >= 0) { + allow304 = true; + } + } + } + options.allowGzip = !!connection.allowGzip; + if (connection.user != null && connection.password != null) { + if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) { + logger$r.throwError("basic authentication requires a secure https url", Logger.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" }); + } + const authorization = connection.user + ":" + connection.password; + headers["authorization"] = { + key: "Authorization", + value: "Basic " + encode$1(toUtf8Bytes(authorization)) + }; + } + } + const reData = new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$", "i"); + const dataMatch = ((url) ? url.match(reData) : null); + if (dataMatch) { + try { + const response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": dataMatch[1] }, + body: decode$1(dataMatch[2]) + }; + let result = response.body; + if (processFunc) { + result = processFunc(response.body, response); + } + return Promise.resolve(result); + } + catch (error) { + logger$r.throwError("processing response error", Logger.errors.SERVER_ERROR, { + body: bodyify(dataMatch[1], dataMatch[2]), + error: error, + requestBody: null, + requestMethod: "GET", + url: url + }); + } + } + if (body) { + options.method = "POST"; + options.body = body; + if (headers["content-type"] == null) { + headers["content-type"] = { key: "Content-Type", value: "application/octet-stream" }; + } + if (headers["content-length"] == null) { + headers["content-length"] = { key: "Content-Length", value: String(body.length) }; + } + } + const flatHeaders = {}; + Object.keys(headers).forEach((key) => { + const header = headers[key]; + flatHeaders[header.key] = header.value; + }); + options.headers = flatHeaders; + const runningTimeout = (function () { + let timer = null; + const promise = new Promise(function (resolve, reject) { + if (timeout) { + timer = setTimeout(() => { + if (timer == null) { + return; + } + timer = null; + reject(logger$r.makeError("timeout", Logger.errors.TIMEOUT, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + timeout: timeout, + url: url + })); + }, timeout); + } + }); + const cancel = function () { + if (timer == null) { + return; + } + clearTimeout(timer); + timer = null; + }; + return { promise, cancel }; + })(); + const runningFetch = (function () { + return __awaiter$8(this, void 0, void 0, function* () { + for (let attempt = 0; attempt < attemptLimit; attempt++) { + let response = null; + try { + response = yield getUrl(url, options); + if (attempt < attemptLimit) { + if (response.statusCode === 301 || response.statusCode === 302) { + // Redirection; for now we only support absolute locataions + const location = response.headers.location || ""; + if (options.method === "GET" && location.match(/^https:/)) { + url = response.headers.location; + continue; + } + } + else if (response.statusCode === 429) { + // Exponential back-off throttling + let tryAgain = true; + if (throttleCallback) { + tryAgain = yield throttleCallback(attempt, url); + } + if (tryAgain) { + let stall = 0; + const retryAfter = response.headers["retry-after"]; + if (typeof (retryAfter) === "string" && retryAfter.match(/^[1-9][0-9]*$/)) { + stall = parseInt(retryAfter) * 1000; + } + else { + stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + } + //console.log("Stalling 429"); + yield staller(stall); + continue; + } + } + } + } + catch (error) { + response = error.response; + if (response == null) { + runningTimeout.cancel(); + logger$r.throwError("missing response", Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + serverError: error, + url: url + }); + } + } + let body = response.body; + if (allow304 && response.statusCode === 304) { + body = null; + } + else if (response.statusCode < 200 || response.statusCode >= 300) { + runningTimeout.cancel(); + logger$r.throwError("bad response", Logger.errors.SERVER_ERROR, { + status: response.statusCode, + headers: response.headers, + body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)), + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + if (processFunc) { + try { + const result = yield processFunc(body, response); + runningTimeout.cancel(); + return result; + } + catch (error) { + // Allow the processFunc to trigger a throttle + if (error.throttleRetry && attempt < attemptLimit) { + let tryAgain = true; + if (throttleCallback) { + tryAgain = yield throttleCallback(attempt, url); + } + if (tryAgain) { + const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + //console.log("Stalling callback"); + yield staller(timeout); + continue; + } + } + runningTimeout.cancel(); + logger$r.throwError("processing response error", Logger.errors.SERVER_ERROR, { + body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)), + error: error, + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + } + runningTimeout.cancel(); + // If we had a processFunc, it either returned a T or threw above. + // The "body" is now a Uint8Array. + return body; + } + return logger$r.throwError("failed response", Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + }); + })(); + return Promise.race([runningTimeout.promise, runningFetch]); +} +function fetchJson(connection, json, processFunc) { + let processJsonFunc = (value, response) => { + let result = null; + if (value != null) { + try { + result = JSON.parse(toUtf8String(value)); + } + catch (error) { + logger$r.throwError("invalid JSON", Logger.errors.SERVER_ERROR, { + body: value, + error: error + }); + } + } + if (processFunc) { + result = processFunc(result, response); + } + return result; + }; + // If we have json to send, we must + // - add content-type of application/json (unless already overridden) + // - convert the json to bytes + let body = null; + if (json != null) { + body = toUtf8Bytes(json); + // Create a connection with the content-type set for JSON + const updated = (typeof (connection) === "string") ? ({ url: connection }) : shallowCopy(connection); + if (updated.headers) { + const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === "content-type")).length) !== 0; + if (!hasContentType) { + updated.headers = shallowCopy(updated.headers); + updated.headers["content-type"] = "application/json"; + } + } + else { + updated.headers = { "content-type": "application/json" }; + } + connection = updated; + } + return _fetchData(connection, body, processJsonFunc); +} +function poll(func, options) { + if (!options) { + options = {}; + } + options = shallowCopy(options); + if (options.floor == null) { + options.floor = 0; + } + if (options.ceiling == null) { + options.ceiling = 10000; + } + if (options.interval == null) { + options.interval = 250; + } + return new Promise(function (resolve, reject) { + let timer = null; + let done = false; + // Returns true if cancel was successful. Unsuccessful cancel means we're already done. + const cancel = () => { + if (done) { + return false; + } + done = true; + if (timer) { + clearTimeout(timer); + } + return true; + }; + if (options.timeout) { + timer = setTimeout(() => { + if (cancel()) { + reject(new Error("timeout")); + } + }, options.timeout); + } + const retryLimit = options.retryLimit; + let attempt = 0; + function check() { + return func().then(function (result) { + // If we have a result, or are allowed null then we're done + if (result !== undefined) { + if (cancel()) { + resolve(result); + } + } + else if (options.oncePoll) { + options.oncePoll.once("poll", check); + } + else if (options.onceBlock) { + options.onceBlock.once("block", check); + // Otherwise, exponential back-off (up to 10s) our next request + } + else if (!done) { + attempt++; + if (attempt > retryLimit) { + if (cancel()) { + reject(new Error("retry limit reached")); + } + return; + } + let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt))); + if (timeout < options.floor) { + timeout = options.floor; + } + if (timeout > options.ceiling) { + timeout = options.ceiling; + } + setTimeout(check, timeout); + } + return null; + }, function (error) { + if (cancel()) { + reject(error); + } + }); + } + check(); + }); +} + +'use strict'; +var ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'; + +// pre-compute lookup table +var ALPHABET_MAP = {}; +for (var z = 0; z < ALPHABET.length; z++) { + var x = ALPHABET.charAt(z); + + if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous') + ALPHABET_MAP[x] = z; +} + +function polymodStep (pre) { + var b = pre >> 25; + return ((pre & 0x1FFFFFF) << 5) ^ + (-((b >> 0) & 1) & 0x3b6a57b2) ^ + (-((b >> 1) & 1) & 0x26508e6d) ^ + (-((b >> 2) & 1) & 0x1ea119fa) ^ + (-((b >> 3) & 1) & 0x3d4233dd) ^ + (-((b >> 4) & 1) & 0x2a1462b3) +} + +function prefixChk (prefix) { + var chk = 1; + for (var i = 0; i < prefix.length; ++i) { + var c = prefix.charCodeAt(i); + if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')' + + chk = polymodStep(chk) ^ (c >> 5); + } + chk = polymodStep(chk); + + for (i = 0; i < prefix.length; ++i) { + var v = prefix.charCodeAt(i); + chk = polymodStep(chk) ^ (v & 0x1f); + } + return chk +} + +function encode$2 (prefix, words, LIMIT) { + LIMIT = LIMIT || 90; + if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit') + + prefix = prefix.toLowerCase(); + + // determine chk mod + var chk = prefixChk(prefix); + if (typeof chk === 'string') throw new Error(chk) + + var result = prefix + '1'; + for (var i = 0; i < words.length; ++i) { + var x = words[i]; + if ((x >> 5) !== 0) throw new Error('Non 5-bit word') + + chk = polymodStep(chk) ^ x; + result += ALPHABET.charAt(x); + } + + for (i = 0; i < 6; ++i) { + chk = polymodStep(chk); + } + chk ^= 1; + + for (i = 0; i < 6; ++i) { + var v = (chk >> ((5 - i) * 5)) & 0x1f; + result += ALPHABET.charAt(v); + } + + return result +} + +function __decode (str, LIMIT) { + LIMIT = LIMIT || 90; + if (str.length < 8) return str + ' too short' + if (str.length > LIMIT) return 'Exceeds length limit' + + // don't allow mixed case + var lowered = str.toLowerCase(); + var uppered = str.toUpperCase(); + if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str + str = lowered; + + var split = str.lastIndexOf('1'); + if (split === -1) return 'No separator character for ' + str + if (split === 0) return 'Missing prefix for ' + str + + var prefix = str.slice(0, split); + var wordChars = str.slice(split + 1); + if (wordChars.length < 6) return 'Data too short' + + var chk = prefixChk(prefix); + if (typeof chk === 'string') return chk + + var words = []; + for (var i = 0; i < wordChars.length; ++i) { + var c = wordChars.charAt(i); + var v = ALPHABET_MAP[c]; + if (v === undefined) return 'Unknown character ' + c + chk = polymodStep(chk) ^ v; + + // not in the checksum? + if (i + 6 >= wordChars.length) continue + words.push(v); + } + + if (chk !== 1) return 'Invalid checksum for ' + str + return { prefix: prefix, words: words } +} + +function decodeUnsafe () { + var res = __decode.apply(null, arguments); + if (typeof res === 'object') return res +} + +function decode$2 (str) { + var res = __decode.apply(null, arguments); + if (typeof res === 'object') return res + + throw new Error(res) +} + +function convert (data, inBits, outBits, pad) { + var value = 0; + var bits = 0; + var maxV = (1 << outBits) - 1; + + var result = []; + for (var i = 0; i < data.length; ++i) { + value = (value << inBits) | data[i]; + bits += inBits; + + while (bits >= outBits) { + bits -= outBits; + result.push((value >> bits) & maxV); + } + } + + if (pad) { + if (bits > 0) { + result.push((value << (outBits - bits)) & maxV); + } + } else { + if (bits >= inBits) return 'Excess padding' + if ((value << (outBits - bits)) & maxV) return 'Non-zero padding' + } + + return result +} + +function toWordsUnsafe (bytes) { + var res = convert(bytes, 8, 5, true); + if (Array.isArray(res)) return res +} + +function toWords (bytes) { + var res = convert(bytes, 8, 5, true); + if (Array.isArray(res)) return res + + throw new Error(res) +} + +function fromWordsUnsafe (words) { + var res = convert(words, 5, 8, false); + if (Array.isArray(res)) return res +} + +function fromWords (words) { + var res = convert(words, 5, 8, false); + if (Array.isArray(res)) return res + + throw new Error(res) +} + +var bech32 = { + decodeUnsafe: decodeUnsafe, + decode: decode$2, + encode: encode$2, + toWordsUnsafe: toWordsUnsafe, + toWords: toWords, + fromWordsUnsafe: fromWordsUnsafe, + fromWords: fromWords +}; + +const version$m = "providers/5.5.1"; + +"use strict"; +const logger$s = new Logger(version$m); +class Formatter { + constructor() { + logger$s.checkNew(new.target, Formatter); + this.formats = this.getDefaultFormats(); + } + getDefaultFormats() { + const formats = ({}); + const address = this.address.bind(this); + const bigNumber = this.bigNumber.bind(this); + const blockTag = this.blockTag.bind(this); + const data = this.data.bind(this); + const hash = this.hash.bind(this); + const hex = this.hex.bind(this); + const number = this.number.bind(this); + const type = this.type.bind(this); + const strictData = (v) => { return this.data(v, true); }; + formats.transaction = { + hash: hash, + type: type, + accessList: Formatter.allowNull(this.accessList.bind(this), null), + blockHash: Formatter.allowNull(hash, null), + blockNumber: Formatter.allowNull(number, null), + transactionIndex: Formatter.allowNull(number, null), + confirmations: Formatter.allowNull(number, null), + from: address, + // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) + // must be set + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + gasLimit: bigNumber, + to: Formatter.allowNull(address, null), + value: bigNumber, + nonce: number, + data: data, + r: Formatter.allowNull(this.uint256), + s: Formatter.allowNull(this.uint256), + v: Formatter.allowNull(number), + creates: Formatter.allowNull(address, null), + raw: Formatter.allowNull(data), + }; + formats.transactionRequest = { + from: Formatter.allowNull(address), + nonce: Formatter.allowNull(number), + gasLimit: Formatter.allowNull(bigNumber), + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + to: Formatter.allowNull(address), + value: Formatter.allowNull(bigNumber), + data: Formatter.allowNull(strictData), + type: Formatter.allowNull(number), + accessList: Formatter.allowNull(this.accessList.bind(this), null), + }; + formats.receiptLog = { + transactionIndex: number, + blockNumber: number, + transactionHash: hash, + address: address, + topics: Formatter.arrayOf(hash), + data: data, + logIndex: number, + blockHash: hash, + }; + formats.receipt = { + to: Formatter.allowNull(this.address, null), + from: Formatter.allowNull(this.address, null), + contractAddress: Formatter.allowNull(address, null), + transactionIndex: number, + // should be allowNull(hash), but broken-EIP-658 support is handled in receipt + root: Formatter.allowNull(hex), + gasUsed: bigNumber, + logsBloom: Formatter.allowNull(data), + blockHash: hash, + transactionHash: hash, + logs: Formatter.arrayOf(this.receiptLog.bind(this)), + blockNumber: number, + confirmations: Formatter.allowNull(number, null), + cumulativeGasUsed: bigNumber, + effectiveGasPrice: Formatter.allowNull(bigNumber), + status: Formatter.allowNull(number), + type: type + }; + formats.block = { + hash: hash, + parentHash: hash, + number: number, + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + gasLimit: bigNumber, + gasUsed: bigNumber, + miner: address, + extraData: data, + transactions: Formatter.allowNull(Formatter.arrayOf(hash)), + baseFeePerGas: Formatter.allowNull(bigNumber) + }; + formats.blockWithTransactions = shallowCopy(formats.block); + formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))); + formats.filter = { + fromBlock: Formatter.allowNull(blockTag, undefined), + toBlock: Formatter.allowNull(blockTag, undefined), + blockHash: Formatter.allowNull(hash, undefined), + address: Formatter.allowNull(address, undefined), + topics: Formatter.allowNull(this.topics.bind(this), undefined), + }; + formats.filterLog = { + blockNumber: Formatter.allowNull(number), + blockHash: Formatter.allowNull(hash), + transactionIndex: number, + removed: Formatter.allowNull(this.boolean.bind(this)), + address: address, + data: Formatter.allowFalsish(data, "0x"), + topics: Formatter.arrayOf(hash), + transactionHash: hash, + logIndex: number, + }; + return formats; + } + accessList(accessList) { + return accessListify(accessList || []); + } + // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number + // Strict! Used on input. + number(number) { + if (number === "0x") { + return 0; + } + return BigNumber.from(number).toNumber(); + } + type(number) { + if (number === "0x" || number == null) { + return 0; + } + return BigNumber.from(number).toNumber(); + } + // Strict! Used on input. + bigNumber(value) { + return BigNumber.from(value); + } + // Requires a boolean, "true" or "false"; returns a boolean + boolean(value) { + if (typeof (value) === "boolean") { + return value; + } + if (typeof (value) === "string") { + value = value.toLowerCase(); + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + } + throw new Error("invalid boolean - " + value); + } + hex(value, strict) { + if (typeof (value) === "string") { + if (!strict && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexString(value)) { + return value.toLowerCase(); + } + } + return logger$s.throwArgumentError("invalid hash", "value", value); + } + data(value, strict) { + const result = this.hex(value, strict); + if ((result.length % 2) !== 0) { + throw new Error("invalid data; odd-length - " + value); + } + return result; + } + // Requires an address + // Strict! Used on input. + address(value) { + return getAddress(value); + } + callAddress(value) { + if (!isHexString(value, 32)) { + return null; + } + const address = getAddress(hexDataSlice(value, 12)); + return (address === AddressZero) ? null : address; + } + contractAddress(value) { + return getContractAddress(value); + } + // Strict! Used on input. + blockTag(blockTag) { + if (blockTag == null) { + return "latest"; + } + if (blockTag === "earliest") { + return "0x0"; + } + if (blockTag === "latest" || blockTag === "pending") { + return blockTag; + } + if (typeof (blockTag) === "number" || isHexString(blockTag)) { + return hexValue(blockTag); + } + throw new Error("invalid blockTag"); + } + // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash. + hash(value, strict) { + const result = this.hex(value, strict); + if (hexDataLength(result) !== 32) { + return logger$s.throwArgumentError("invalid hash", "value", value); + } + return result; + } + // Returns the difficulty as a number, or if too large (i.e. PoA network) null + difficulty(value) { + if (value == null) { + return null; + } + const v = BigNumber.from(value); + try { + return v.toNumber(); + } + catch (error) { } + return null; + } + uint256(value) { + if (!isHexString(value)) { + throw new Error("invalid uint256"); + } + return hexZeroPad(value, 32); + } + _block(value, format) { + if (value.author != null && value.miner == null) { + value.miner = value.author; + } + // The difficulty may need to come from _difficulty in recursed blocks + const difficulty = (value._difficulty != null) ? value._difficulty : value.difficulty; + const result = Formatter.check(format, value); + result._difficulty = ((difficulty == null) ? null : BigNumber.from(difficulty)); + return result; + } + block(value) { + return this._block(value, this.formats.block); + } + blockWithTransactions(value) { + return this._block(value, this.formats.blockWithTransactions); + } + // Strict! Used on input. + transactionRequest(value) { + return Formatter.check(this.formats.transactionRequest, value); + } + transactionResponse(transaction) { + // Rename gas to gasLimit + if (transaction.gas != null && transaction.gasLimit == null) { + transaction.gasLimit = transaction.gas; + } + // Some clients (TestRPC) do strange things like return 0x0 for the + // 0 address; correct this to be a real address + if (transaction.to && BigNumber.from(transaction.to).isZero()) { + transaction.to = "0x0000000000000000000000000000000000000000"; + } + // Rename input to data + if (transaction.input != null && transaction.data == null) { + transaction.data = transaction.input; + } + // If to and creates are empty, populate the creates from the transaction + if (transaction.to == null && transaction.creates == null) { + transaction.creates = this.contractAddress(transaction); + } + if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) { + transaction.accessList = []; + } + const result = Formatter.check(this.formats.transaction, transaction); + if (transaction.chainId != null) { + let chainId = transaction.chainId; + if (isHexString(chainId)) { + chainId = BigNumber.from(chainId).toNumber(); + } + result.chainId = chainId; + } + else { + let chainId = transaction.networkId; + // geth-etc returns chainId + if (chainId == null && result.v == null) { + chainId = transaction.chainId; + } + if (isHexString(chainId)) { + chainId = BigNumber.from(chainId).toNumber(); + } + if (typeof (chainId) !== "number" && result.v != null) { + chainId = (result.v - 35) / 2; + if (chainId < 0) { + chainId = 0; + } + chainId = parseInt(chainId); + } + if (typeof (chainId) !== "number") { + chainId = 0; + } + result.chainId = chainId; + } + // 0x0000... should actually be null + if (result.blockHash && result.blockHash.replace(/0/g, "") === "x") { + result.blockHash = null; + } + return result; + } + transaction(value) { + return parse(value); + } + receiptLog(value) { + return Formatter.check(this.formats.receiptLog, value); + } + receipt(value) { + const result = Formatter.check(this.formats.receipt, value); + // RSK incorrectly implemented EIP-658, so we munge things a bit here for it + if (result.root != null) { + if (result.root.length <= 4) { + // Could be 0x00, 0x0, 0x01 or 0x1 + const value = BigNumber.from(result.root).toNumber(); + if (value === 0 || value === 1) { + // Make sure if both are specified, they match + if (result.status != null && (result.status !== value)) { + logger$s.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); + } + result.status = value; + delete result.root; + } + else { + logger$s.throwArgumentError("invalid alt-root-status", "value.root", result.root); + } + } + else if (result.root.length !== 66) { + // Must be a valid bytes32 + logger$s.throwArgumentError("invalid root hash", "value.root", result.root); + } + } + if (result.status != null) { + result.byzantium = true; + } + return result; + } + topics(value) { + if (Array.isArray(value)) { + return value.map((v) => this.topics(v)); + } + else if (value != null) { + return this.hash(value, true); + } + return null; + } + filter(value) { + return Formatter.check(this.formats.filter, value); + } + filterLog(value) { + return Formatter.check(this.formats.filterLog, value); + } + static check(format, object) { + const result = {}; + for (const key in format) { + try { + const value = format[key](object[key]); + if (value !== undefined) { + result[key] = value; + } + } + catch (error) { + error.checkKey = key; + error.checkValue = object[key]; + throw error; + } + } + return result; + } + // if value is null-ish, nullValue is returned + static allowNull(format, nullValue) { + return (function (value) { + if (value == null) { + return nullValue; + } + return format(value); + }); + } + // If value is false-ish, replaceValue is returned + static allowFalsish(format, replaceValue) { + return (function (value) { + if (!value) { + return replaceValue; + } + return format(value); + }); + } + // Requires an Array satisfying check + static arrayOf(format) { + return (function (array) { + if (!Array.isArray(array)) { + throw new Error("not an array"); + } + const result = []; + array.forEach(function (value) { + result.push(format(value)); + }); + return result; + }); + } +} +function isCommunityResourcable(value) { + return (value && typeof (value.isCommunityResource) === "function"); +} +function isCommunityResource(value) { + return (isCommunityResourcable(value) && value.isCommunityResource()); +} +// Show the throttle message only once +let throttleMessage = false; +function showThrottleMessage() { + if (throttleMessage) { + return; + } + throttleMessage = true; + console.log("========= NOTICE ========="); + console.log("Request-Rate Exceeded (this message will not be repeated)"); + console.log(""); + console.log("The default API keys for each service are provided as a highly-throttled,"); + console.log("community resource for low-traffic projects and early prototyping."); + console.log(""); + console.log("While your application will continue to function, we highly recommended"); + console.log("signing up for your own API keys to improve performance, increase your"); + console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."); + console.log(""); + console.log("For more details: https:/\/docs.ethers.io/api-keys/"); + console.log("=========================="); +} + +"use strict"; +var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$t = new Logger(version$m); +////////////////////////////// +// Event Serializeing +function checkTopic(topic) { + if (topic == null) { + return "null"; + } + if (hexDataLength(topic) !== 32) { + logger$t.throwArgumentError("invalid topic", "topic", topic); + } + return topic.toLowerCase(); +} +function serializeTopics(topics) { + // Remove trailing null AND-topics; they are redundant + topics = topics.slice(); + while (topics.length > 0 && topics[topics.length - 1] == null) { + topics.pop(); + } + return topics.map((topic) => { + if (Array.isArray(topic)) { + // Only track unique OR-topics + const unique = {}; + topic.forEach((topic) => { + unique[checkTopic(topic)] = true; + }); + // The order of OR-topics does not matter + const sorted = Object.keys(unique); + sorted.sort(); + return sorted.join("|"); + } + else { + return checkTopic(topic); + } + }).join("&"); +} +function deserializeTopics(data) { + if (data === "") { + return []; + } + return data.split(/&/g).map((topic) => { + if (topic === "") { + return []; + } + const comps = topic.split("|").map((topic) => { + return ((topic === "null") ? null : topic); + }); + return ((comps.length === 1) ? comps[0] : comps); + }); +} +function getEventTag$1(eventName) { + if (typeof (eventName) === "string") { + eventName = eventName.toLowerCase(); + if (hexDataLength(eventName) === 32) { + return "tx:" + eventName; + } + if (eventName.indexOf(":") === -1) { + return eventName; + } + } + else if (Array.isArray(eventName)) { + return "filter:*:" + serializeTopics(eventName); + } + else if (ForkEvent.isForkEvent(eventName)) { + logger$t.warn("not implemented"); + throw new Error("not implemented"); + } + else if (eventName && typeof (eventName) === "object") { + return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []); + } + throw new Error("invalid event - " + eventName); +} +////////////////////////////// +// Helper Object +function getTime() { + return (new Date()).getTime(); +} +function stall(duration) { + return new Promise((resolve) => { + setTimeout(resolve, duration); + }); +} +////////////////////////////// +// Provider Object +/** + * EventType + * - "block" + * - "poll" + * - "didPoll" + * - "pending" + * - "error" + * - "network" + * - filter + * - topics array + * - transaction hash + */ +const PollableEvents = ["block", "network", "pending", "poll"]; +class Event { + constructor(tag, listener, once) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "listener", listener); + defineReadOnly(this, "once", once); + } + get event() { + switch (this.type) { + case "tx": + return this.hash; + case "filter": + return this.filter; + } + return this.tag; + } + get type() { + return this.tag.split(":")[0]; + } + get hash() { + const comps = this.tag.split(":"); + if (comps[0] !== "tx") { + return null; + } + return comps[1]; + } + get filter() { + const comps = this.tag.split(":"); + if (comps[0] !== "filter") { + return null; + } + const address = comps[1]; + const topics = deserializeTopics(comps[2]); + const filter = {}; + if (topics.length > 0) { + filter.topics = topics; + } + if (address && address !== "*") { + filter.address = address; + } + return filter; + } + pollable() { + return (this.tag.indexOf(":") >= 0 || PollableEvents.indexOf(this.tag) >= 0); + } +} +; +// https://github.com/satoshilabs/slips/blob/master/slip-0044.md +const coinInfos = { + "0": { symbol: "btc", p2pkh: 0x00, p2sh: 0x05, prefix: "bc" }, + "2": { symbol: "ltc", p2pkh: 0x30, p2sh: 0x32, prefix: "ltc" }, + "3": { symbol: "doge", p2pkh: 0x1e, p2sh: 0x16 }, + "60": { symbol: "eth", ilk: "eth" }, + "61": { symbol: "etc", ilk: "eth" }, + "700": { symbol: "xdai", ilk: "eth" }, +}; +function bytes32ify(value) { + return hexZeroPad(BigNumber.from(value).toHexString(), 32); +} +// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d) +function base58Encode(data) { + return Base58.encode(concat([data, hexDataSlice(sha256$1(sha256$1(data)), 0, 4)])); +} +const matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + new RegExp("^(ipfs):/\/(.*)$", "i"), + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; +function _parseString(result) { + try { + return toUtf8String(_parseBytes(result)); + } + catch (error) { } + return null; +} +function _parseBytes(result) { + if (result === "0x") { + return null; + } + const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber(); + const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber(); + return hexDataSlice(result, offset + 32, offset + 32 + length); +} +class Resolver { + // The resolvedAddress is only for creating a ReverseLookup resolver + constructor(provider, address, name, resolvedAddress) { + defineReadOnly(this, "provider", provider); + defineReadOnly(this, "name", name); + defineReadOnly(this, "address", provider.formatter.address(address)); + defineReadOnly(this, "_resolvedAddress", resolvedAddress); + } + _fetchBytes(selector, parameters) { + return __awaiter$9(this, void 0, void 0, function* () { + // e.g. keccak256("addr(bytes32,uint256)") + const tx = { + to: this.address, + data: hexConcat([selector, namehash(this.name), (parameters || "0x")]) + }; + try { + return _parseBytes(yield this.provider.call(tx)); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + return null; + } + }); + } + _getAddress(coinType, hexBytes) { + const coinInfo = coinInfos[String(coinType)]; + if (coinInfo == null) { + logger$t.throwError(`unsupported coin type: ${coinType}`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: `getAddress(${coinType})` + }); + } + if (coinInfo.ilk === "eth") { + return this.provider.formatter.address(hexBytes); + } + const bytes = arrayify(hexBytes); + // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + if (coinInfo.p2pkh != null) { + const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/); + if (p2pkh) { + const length = parseInt(p2pkh[1], 16); + if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) { + return base58Encode(concat([[coinInfo.p2pkh], ("0x" + p2pkh[2])])); + } + } + } + // P2SH: OP_HASH160 OP_EQUAL + if (coinInfo.p2sh != null) { + const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/); + if (p2sh) { + const length = parseInt(p2sh[1], 16); + if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) { + return base58Encode(concat([[coinInfo.p2sh], ("0x" + p2sh[2])])); + } + } + } + // Bech32 + if (coinInfo.prefix != null) { + const length = bytes[1]; + // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program + let version = bytes[0]; + if (version === 0x00) { + if (length !== 20 && length !== 32) { + version = -1; + } + } + else { + version = -1; + } + if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) { + const words = bech32.toWords(bytes.slice(2)); + words.unshift(version); + return bech32.encode(coinInfo.prefix, words); + } + } + return null; + } + getAddress(coinType) { + return __awaiter$9(this, void 0, void 0, function* () { + if (coinType == null) { + coinType = 60; + } + // If Ethereum, use the standard `addr(bytes32)` + if (coinType === 60) { + try { + // keccak256("addr(bytes32)") + const transaction = { + to: this.address, + data: ("0x3b3b57de" + namehash(this.name).substring(2)) + }; + const hexBytes = yield this.provider.call(transaction); + // No address + if (hexBytes === "0x" || hexBytes === HashZero) { + return null; + } + return this.provider.formatter.callAddress(hexBytes); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + throw error; + } + } + // keccak256("addr(bytes32,uint256") + const hexBytes = yield this._fetchBytes("0xf1cb7e06", bytes32ify(coinType)); + // No address + if (hexBytes == null || hexBytes === "0x") { + return null; + } + // Compute the address + const address = this._getAddress(coinType, hexBytes); + if (address == null) { + logger$t.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: `getAddress(${coinType})`, + coinType: coinType, + data: hexBytes + }); + } + return address; + }); + } + getAvatar() { + return __awaiter$9(this, void 0, void 0, function* () { + const linkage = []; + try { + // test data for ricmoo.eth + //const avatar = "eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233"; + const avatar = yield this.getText("avatar"); + if (avatar == null) { + return null; + } + for (let i = 0; i < matchers.length; i++) { + const match = avatar.match(matchers[i]); + if (match == null) { + continue; + } + switch (match[1]) { + case "https": + linkage.push({ type: "url", content: avatar }); + return { linkage, url: avatar }; + case "data": + linkage.push({ type: "data", content: avatar }); + return { linkage, url: avatar }; + case "ipfs": + linkage.push({ type: "ipfs", content: avatar }); + return { linkage, url: `https:/\/gateway.ipfs.io/ipfs/${avatar.substring(7)}` }; + case "erc721": + case "erc1155": { + // Depending on the ERC type, use tokenURI(uint256) or url(uint256) + const selector = (match[1] === "erc721") ? "0xc87b56dd" : "0x0e89341c"; + linkage.push({ type: match[1], content: avatar }); + // The owner of this name + const owner = (this._resolvedAddress || (yield this.getAddress())); + const comps = (match[2] || "").split("/"); + if (comps.length !== 2) { + return null; + } + const addr = yield this.provider.formatter.address(comps[0]); + const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32); + // Check that this account owns the token + if (match[1] === "erc721") { + // ownerOf(uint256 tokenId) + const tokenOwner = this.provider.formatter.callAddress(yield this.provider.call({ + to: addr, data: hexConcat(["0x6352211e", tokenId]) + })); + if (owner !== tokenOwner) { + return null; + } + linkage.push({ type: "owner", content: tokenOwner }); + } + else if (match[1] === "erc1155") { + // balanceOf(address owner, uint256 tokenId) + const balance = BigNumber.from(yield this.provider.call({ + to: addr, data: hexConcat(["0x00fdd58e", hexZeroPad(owner, 32), tokenId]) + })); + if (balance.isZero()) { + return null; + } + linkage.push({ type: "balance", content: balance.toString() }); + } + // Call the token contract for the metadata URL + const tx = { + to: this.provider.formatter.address(comps[0]), + data: hexConcat([selector, tokenId]) + }; + let metadataUrl = _parseString(yield this.provider.call(tx)); + if (metadataUrl == null) { + return null; + } + linkage.push({ type: "metadata-url", content: metadataUrl }); + // ERC-1155 allows a generic {id} in the URL + if (match[1] === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + } + // Get the token metadata + const metadata = yield fetchJson(metadataUrl); + // Pull the image URL out + if (!metadata || typeof (metadata.image) !== "string" || !metadata.image.match(/^(https:\/\/|data:)/i)) { + return null; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + linkage.push({ type: "url", content: metadata.image }); + return { linkage, url: metadata.image }; + } + } + } + } + catch (error) { } + return null; + }); + } + getContentHash() { + return __awaiter$9(this, void 0, void 0, function* () { + // keccak256("contenthash()") + const hexBytes = yield this._fetchBytes("0xbc1c58d1"); + // No contenthash + if (hexBytes == null || hexBytes === "0x") { + return null; + } + // IPFS (CID: 1, Type: DAG-PB) + const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipfs) { + const length = parseInt(ipfs[3], 16); + if (ipfs[4].length === length * 2) { + return "ipfs:/\/" + Base58.encode("0x" + ipfs[1]); + } + } + // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32) + const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/); + if (swarm) { + if (swarm[1].length === (32 * 2)) { + return "bzz:/\/" + swarm[1]; + } + } + return logger$t.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getContentHash()", + data: hexBytes + }); + }); + } + getText(key) { + return __awaiter$9(this, void 0, void 0, function* () { + // The key encoded as parameter to fetchBytes + let keyBytes = toUtf8Bytes(key); + // The nodehash consumes the first slot, so the string pointer targets + // offset 64, with the length at offset 64 and data starting at offset 96 + keyBytes = concat([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]); + // Pad to word-size (32 bytes) + if ((keyBytes.length % 32) !== 0) { + keyBytes = concat([keyBytes, hexZeroPad("0x", 32 - (key.length % 32))]); + } + const hexBytes = yield this._fetchBytes("0x59d1d43c", hexlify(keyBytes)); + if (hexBytes == null || hexBytes === "0x") { + return null; + } + return toUtf8String(hexBytes); + }); + } +} +let defaultFormatter = null; +let nextPollId = 1; +class BaseProvider extends Provider { + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + constructor(network) { + logger$t.checkNew(new.target, Provider); + super(); + // Events being listened to + this._events = []; + this._emitted = { block: -2 }; + this.formatter = new.target.getFormatter(); + // If network is any, this Provider allows the underlying + // network to change dynamically, and we auto-detect the + // current network + defineReadOnly(this, "anyNetwork", (network === "any")); + if (this.anyNetwork) { + network = this.detectNetwork(); + } + if (network instanceof Promise) { + this._networkPromise = network; + // Squash any "unhandled promise" errors; that do not need to be handled + network.catch((error) => { }); + // Trigger initial network setting (async) + this._ready().catch((error) => { }); + } + else { + const knownNetwork = getStatic(new.target, "getNetwork")(network); + if (knownNetwork) { + defineReadOnly(this, "_network", knownNetwork); + this.emit("network", knownNetwork, null); + } + else { + logger$t.throwArgumentError("invalid network", "network", network); + } + } + this._maxInternalBlockNumber = -1024; + this._lastBlockNumber = -2; + this._pollingInterval = 4000; + this._fastQueryDate = 0; + } + _ready() { + return __awaiter$9(this, void 0, void 0, function* () { + if (this._network == null) { + let network = null; + if (this._networkPromise) { + try { + network = yield this._networkPromise; + } + catch (error) { } + } + // Try the Provider's network detection (this MUST throw if it cannot) + if (network == null) { + network = yield this.detectNetwork(); + } + // This should never happen; every Provider sub-class should have + // suggested a network by here (or have thrown). + if (!network) { + logger$t.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {}); + } + // Possible this call stacked so do not call defineReadOnly again + if (this._network == null) { + if (this.anyNetwork) { + this._network = network; + } + else { + defineReadOnly(this, "_network", network); + } + this.emit("network", network, null); + } + } + return this._network; + }); + } + // This will always return the most recently established network. + // For "any", this can change (a "network" event is emitted before + // any change is reflected); otherwise this cannot change + get ready() { + return poll(() => { + return this._ready().then((network) => { + return network; + }, (error) => { + // If the network isn't running yet, we will wait + if (error.code === Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { + return undefined; + } + throw error; + }); + }); + } + // @TODO: Remove this and just create a singleton formatter + static getFormatter() { + if (defaultFormatter == null) { + defaultFormatter = new Formatter(); + } + return defaultFormatter; + } + // @TODO: Remove this and just use getNetwork + static getNetwork(network) { + return getNetwork((network == null) ? "homestead" : network); + } + // Fetches the blockNumber, but will reuse any result that is less + // than maxAge old or has been requested since the last request + _getInternalBlockNumber(maxAge) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this._ready(); + // Allowing stale data up to maxAge old + if (maxAge > 0) { + // While there are pending internal block requests... + while (this._internalBlockNumber) { + // ..."remember" which fetch we started with + const internalBlockNumber = this._internalBlockNumber; + try { + // Check the result is not too stale + const result = yield internalBlockNumber; + if ((getTime() - result.respTime) <= maxAge) { + return result.blockNumber; + } + // Too old; fetch a new value + break; + } + catch (error) { + // The fetch rejected; if we are the first to get the + // rejection, drop through so we replace it with a new + // fetch; all others blocked will then get that fetch + // which won't match the one they "remembered" and loop + if (this._internalBlockNumber === internalBlockNumber) { + break; + } + } + } + } + const reqTime = getTime(); + const checkInternalBlockNumber = resolveProperties({ + blockNumber: this.perform("getBlockNumber", {}), + networkError: this.getNetwork().then((network) => (null), (error) => (error)) + }).then(({ blockNumber, networkError }) => { + if (networkError) { + // Unremember this bad internal block number + if (this._internalBlockNumber === checkInternalBlockNumber) { + this._internalBlockNumber = null; + } + throw networkError; + } + const respTime = getTime(); + blockNumber = BigNumber.from(blockNumber).toNumber(); + if (blockNumber < this._maxInternalBlockNumber) { + blockNumber = this._maxInternalBlockNumber; + } + this._maxInternalBlockNumber = blockNumber; + this._setFastBlockNumber(blockNumber); // @TODO: Still need this? + return { blockNumber, reqTime, respTime }; + }); + this._internalBlockNumber = checkInternalBlockNumber; + // Swallow unhandled exceptions; if needed they are handled else where + checkInternalBlockNumber.catch((error) => { + // Don't null the dead (rejected) fetch, if it has already been updated + if (this._internalBlockNumber === checkInternalBlockNumber) { + this._internalBlockNumber = null; + } + }); + return (yield checkInternalBlockNumber).blockNumber; + }); + } + poll() { + return __awaiter$9(this, void 0, void 0, function* () { + const pollId = nextPollId++; + // Track all running promises, so we can trigger a post-poll once they are complete + const runners = []; + let blockNumber = null; + try { + blockNumber = yield this._getInternalBlockNumber(100 + this.pollingInterval / 2); + } + catch (error) { + this.emit("error", error); + return; + } + this._setFastBlockNumber(blockNumber); + // Emit a poll event after we have the latest (fast) block number + this.emit("poll", pollId, blockNumber); + // If the block has not changed, meh. + if (blockNumber === this._lastBlockNumber) { + this.emit("didPoll", pollId); + return; + } + // First polling cycle, trigger a "block" events + if (this._emitted.block === -2) { + this._emitted.block = blockNumber - 1; + } + if (Math.abs((this._emitted.block) - blockNumber) > 1000) { + logger$t.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`); + this.emit("error", logger$t.makeError("network block skew detected", Logger.errors.NETWORK_ERROR, { + blockNumber: blockNumber, + event: "blockSkew", + previousBlockNumber: this._emitted.block + })); + this.emit("block", blockNumber); + } + else { + // Notify all listener for each block that has passed + for (let i = this._emitted.block + 1; i <= blockNumber; i++) { + this.emit("block", i); + } + } + // The emitted block was updated, check for obsolete events + if (this._emitted.block !== blockNumber) { + this._emitted.block = blockNumber; + Object.keys(this._emitted).forEach((key) => { + // The block event does not expire + if (key === "block") { + return; + } + // The block we were at when we emitted this event + const eventBlockNumber = this._emitted[key]; + // We cannot garbage collect pending transactions or blocks here + // They should be garbage collected by the Provider when setting + // "pending" events + if (eventBlockNumber === "pending") { + return; + } + // Evict any transaction hashes or block hashes over 12 blocks + // old, since they should not return null anyways + if (blockNumber - eventBlockNumber > 12) { + delete this._emitted[key]; + } + }); + } + // First polling cycle + if (this._lastBlockNumber === -2) { + this._lastBlockNumber = blockNumber - 1; + } + // Find all transaction hashes we are waiting on + this._events.forEach((event) => { + switch (event.type) { + case "tx": { + const hash = event.hash; + let runner = this.getTransactionReceipt(hash).then((receipt) => { + if (!receipt || receipt.blockNumber == null) { + return null; + } + this._emitted["t:" + hash] = receipt.blockNumber; + this.emit(hash, receipt); + return null; + }).catch((error) => { this.emit("error", error); }); + runners.push(runner); + break; + } + case "filter": { + const filter = event.filter; + filter.fromBlock = this._lastBlockNumber + 1; + filter.toBlock = blockNumber; + const runner = this.getLogs(filter).then((logs) => { + if (logs.length === 0) { + return; + } + logs.forEach((log) => { + this._emitted["b:" + log.blockHash] = log.blockNumber; + this._emitted["t:" + log.transactionHash] = log.blockNumber; + this.emit(filter, log); + }); + }).catch((error) => { this.emit("error", error); }); + runners.push(runner); + break; + } + } + }); + this._lastBlockNumber = blockNumber; + // Once all events for this loop have been processed, emit "didPoll" + Promise.all(runners).then(() => { + this.emit("didPoll", pollId); + }).catch((error) => { this.emit("error", error); }); + return; + }); + } + // Deprecated; do not use this + resetEventsBlock(blockNumber) { + this._lastBlockNumber = blockNumber - 1; + if (this.polling) { + this.poll(); + } + } + get network() { + return this._network; + } + // This method should query the network if the underlying network + // can change, such as when connected to a JSON-RPC backend + detectNetwork() { + return __awaiter$9(this, void 0, void 0, function* () { + return logger$t.throwError("provider does not support network detection", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "provider.detectNetwork" + }); + }); + } + getNetwork() { + return __awaiter$9(this, void 0, void 0, function* () { + const network = yield this._ready(); + // Make sure we are still connected to the same network; this is + // only an external call for backends which can have the underlying + // network change spontaneously + const currentNetwork = yield this.detectNetwork(); + if (network.chainId !== currentNetwork.chainId) { + // We are allowing network changes, things can get complex fast; + // make sure you know what you are doing if you use "any" + if (this.anyNetwork) { + this._network = currentNetwork; + // Reset all internal block number guards and caches + this._lastBlockNumber = -2; + this._fastBlockNumber = null; + this._fastBlockNumberPromise = null; + this._fastQueryDate = 0; + this._emitted.block = -2; + this._maxInternalBlockNumber = -1024; + this._internalBlockNumber = null; + // The "network" event MUST happen before this method resolves + // so any events have a chance to unregister, so we stall an + // additional event loop before returning from /this/ call + this.emit("network", currentNetwork, network); + yield stall(0); + return this._network; + } + const error = logger$t.makeError("underlying network changed", Logger.errors.NETWORK_ERROR, { + event: "changed", + network: network, + detectedNetwork: currentNetwork + }); + this.emit("error", error); + throw error; + } + return network; + }); + } + get blockNumber() { + this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => { + this._setFastBlockNumber(blockNumber); + }, (error) => { }); + return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1; + } + get polling() { + return (this._poller != null); + } + set polling(value) { + if (value && !this._poller) { + this._poller = setInterval(() => { this.poll(); }, this.pollingInterval); + if (!this._bootstrapPoll) { + this._bootstrapPoll = setTimeout(() => { + this.poll(); + // We block additional polls until the polling interval + // is done, to prevent overwhelming the poll function + this._bootstrapPoll = setTimeout(() => { + // If polling was disabled, something may require a poke + // since starting the bootstrap poll and it was disabled + if (!this._poller) { + this.poll(); + } + // Clear out the bootstrap so we can do another + this._bootstrapPoll = null; + }, this.pollingInterval); + }, 0); + } + } + else if (!value && this._poller) { + clearInterval(this._poller); + this._poller = null; + } + } + get pollingInterval() { + return this._pollingInterval; + } + set pollingInterval(value) { + if (typeof (value) !== "number" || value <= 0 || parseInt(String(value)) != value) { + throw new Error("invalid polling interval"); + } + this._pollingInterval = value; + if (this._poller) { + clearInterval(this._poller); + this._poller = setInterval(() => { this.poll(); }, this._pollingInterval); + } + } + _getFastBlockNumber() { + const now = getTime(); + // Stale block number, request a newer value + if ((now - this._fastQueryDate) > 2 * this._pollingInterval) { + this._fastQueryDate = now; + this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => { + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + } + return this._fastBlockNumber; + }); + } + return this._fastBlockNumberPromise; + } + _setFastBlockNumber(blockNumber) { + // Older block, maybe a stale request + if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { + return; + } + // Update the time we updated the blocknumber + this._fastQueryDate = getTime(); + // Newer block number, use it + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + this._fastBlockNumberPromise = Promise.resolve(blockNumber); + } + } + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter$9(this, void 0, void 0, function* () { + return this._waitForTransaction(transactionHash, (confirmations == null) ? 1 : confirmations, timeout || 0, null); + }); + } + _waitForTransaction(transactionHash, confirmations, timeout, replaceable) { + return __awaiter$9(this, void 0, void 0, function* () { + const receipt = yield this.getTransactionReceipt(transactionHash); + // Receipt is already good + if ((receipt ? receipt.confirmations : 0) >= confirmations) { + return receipt; + } + // Poll until the receipt is good... + return new Promise((resolve, reject) => { + const cancelFuncs = []; + let done = false; + const alreadyDone = function () { + if (done) { + return true; + } + done = true; + cancelFuncs.forEach((func) => { func(); }); + return false; + }; + const minedHandler = (receipt) => { + if (receipt.confirmations < confirmations) { + return; + } + if (alreadyDone()) { + return; + } + resolve(receipt); + }; + this.on(transactionHash, minedHandler); + cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); }); + if (replaceable) { + let lastBlockNumber = replaceable.startBlock; + let scannedBlock = null; + const replaceHandler = (blockNumber) => __awaiter$9(this, void 0, void 0, function* () { + if (done) { + return; + } + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + yield stall(1000); + this.getTransactionCount(replaceable.from).then((nonce) => __awaiter$9(this, void 0, void 0, function* () { + if (done) { + return; + } + if (nonce <= replaceable.nonce) { + lastBlockNumber = blockNumber; + } + else { + // First check if the transaction was mined + { + const mined = yield this.getTransaction(transactionHash); + if (mined && mined.blockNumber != null) { + return; + } + } + // First time scanning. We start a little earlier for some + // wiggle room here to handle the eventually consistent nature + // of blockchain (e.g. the getTransactionCount was for a + // different block) + if (scannedBlock == null) { + scannedBlock = lastBlockNumber - 3; + if (scannedBlock < replaceable.startBlock) { + scannedBlock = replaceable.startBlock; + } + } + while (scannedBlock <= blockNumber) { + if (done) { + return; + } + const block = yield this.getBlockWithTransactions(scannedBlock); + for (let ti = 0; ti < block.transactions.length; ti++) { + const tx = block.transactions[ti]; + // Successfully mined! + if (tx.hash === transactionHash) { + return; + } + // Matches our transaction from and nonce; its a replacement + if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) { + if (done) { + return; + } + // Get the receipt of the replacement + const receipt = yield this.waitForTransaction(tx.hash, confirmations); + // Already resolved or rejected (prolly a timeout) + if (alreadyDone()) { + return; + } + // The reason we were replaced + let reason = "replaced"; + if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) { + reason = "repriced"; + } + else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) { + reason = "cancelled"; + } + // Explain why we were replaced + reject(logger$t.makeError("transaction was replaced", Logger.errors.TRANSACTION_REPLACED, { + cancelled: (reason === "replaced" || reason === "cancelled"), + reason, + replacement: this._wrapTransaction(tx), + hash: transactionHash, + receipt + })); + return; + } + } + scannedBlock++; + } + } + if (done) { + return; + } + this.once("block", replaceHandler); + }), (error) => { + if (done) { + return; + } + this.once("block", replaceHandler); + }); + }); + if (done) { + return; + } + this.once("block", replaceHandler); + cancelFuncs.push(() => { + this.removeListener("block", replaceHandler); + }); + } + if (typeof (timeout) === "number" && timeout > 0) { + const timer = setTimeout(() => { + if (alreadyDone()) { + return; + } + reject(logger$t.makeError("timeout exceeded", Logger.errors.TIMEOUT, { timeout: timeout })); + }, timeout); + if (timer.unref) { + timer.unref(); + } + cancelFuncs.push(() => { clearTimeout(timer); }); + } + }); + }); + } + getBlockNumber() { + return __awaiter$9(this, void 0, void 0, function* () { + return this._getInternalBlockNumber(0); + }); + } + getGasPrice() { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const result = yield this.perform("getGasPrice", {}); + try { + return BigNumber.from(result); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getGasPrice", + result, error + }); + } + }); + } + getBalance(addressOrName, blockTag) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("getBalance", params); + try { + return BigNumber.from(result); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getBalance", + params, result, error + }); + } + }); + } + getTransactionCount(addressOrName, blockTag) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("getTransactionCount", params); + try { + return BigNumber.from(result).toNumber(); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getTransactionCount", + params, result, error + }); + } + }); + } + getCode(addressOrName, blockTag) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("getCode", params); + try { + return hexlify(result); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getCode", + params, result, error + }); + } + }); + } + getStorageAt(addressOrName, position, blockTag) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag), + position: Promise.resolve(position).then((p) => hexValue(p)) + }); + const result = yield this.perform("getStorageAt", params); + try { + return hexlify(result); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "getStorageAt", + params, result, error + }); + } + }); + } + // This should be called by any subclass wrapping a TransactionResponse + _wrapTransaction(tx, hash, startBlock) { + if (hash != null && hexDataLength(hash) !== 32) { + throw new Error("invalid response - sendTransaction"); + } + const result = tx; + // Check the hash we expect is the same as the hash the server reported + if (hash != null && tx.hash !== hash) { + logger$t.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash }); + } + result.wait = (confirms, timeout) => __awaiter$9(this, void 0, void 0, function* () { + if (confirms == null) { + confirms = 1; + } + if (timeout == null) { + timeout = 0; + } + // Get the details to detect replacement + let replacement = undefined; + if (confirms !== 0 && startBlock != null) { + replacement = { + data: tx.data, + from: tx.from, + nonce: tx.nonce, + to: tx.to, + value: tx.value, + startBlock + }; + } + const receipt = yield this._waitForTransaction(tx.hash, confirms, timeout, replacement); + if (receipt == null && confirms === 0) { + return null; + } + // No longer pending, allow the polling loop to garbage collect this + this._emitted["t:" + tx.hash] = receipt.blockNumber; + if (receipt.status === 0) { + logger$t.throwError("transaction failed", Logger.errors.CALL_EXCEPTION, { + transactionHash: tx.hash, + transaction: tx, + receipt: receipt + }); + } + return receipt; + }); + return result; + } + sendTransaction(signedTransaction) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const hexTx = yield Promise.resolve(signedTransaction).then(t => hexlify(t)); + const tx = this.formatter.transaction(signedTransaction); + if (tx.confirmations == null) { + tx.confirmations = 0; + } + const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + try { + const hash = yield this.perform("sendTransaction", { signedTransaction: hexTx }); + return this._wrapTransaction(tx, hash, blockNumber); + } + catch (error) { + error.transaction = tx; + error.transactionHash = tx.hash; + throw error; + } + }); + } + _getTransactionRequest(transaction) { + return __awaiter$9(this, void 0, void 0, function* () { + const values = yield transaction; + const tx = {}; + ["from", "to"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v) : null)); + }); + ["gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "value"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v) : null)); + }); + ["type"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v : null)); + }); + if (values.accessList) { + tx.accessList = this.formatter.accessList(values.accessList); + } + ["data"].forEach((key) => { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v) : null)); + }); + return this.formatter.transactionRequest(yield resolveProperties(tx)); + }); + } + _getFilter(filter) { + return __awaiter$9(this, void 0, void 0, function* () { + filter = yield filter; + const result = {}; + if (filter.address != null) { + result.address = this._getAddress(filter.address); + } + ["blockHash", "topics"].forEach((key) => { + if (filter[key] == null) { + return; + } + result[key] = filter[key]; + }); + ["fromBlock", "toBlock"].forEach((key) => { + if (filter[key] == null) { + return; + } + result[key] = this._getBlockTag(filter[key]); + }); + return this.formatter.filter(yield resolveProperties(result)); + }); + } + call(transaction, blockTag) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag) + }); + const result = yield this.perform("call", params); + try { + return hexlify(result); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "call", + params, result, error + }); + } + }); + } + estimateGas(transaction) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ + transaction: this._getTransactionRequest(transaction) + }); + const result = yield this.perform("estimateGas", params); + try { + return BigNumber.from(result); + } + catch (error) { + return logger$t.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "estimateGas", + params, result, error + }); + } + }); + } + _getAddress(addressOrName) { + return __awaiter$9(this, void 0, void 0, function* () { + addressOrName = yield addressOrName; + if (typeof (addressOrName) !== "string") { + logger$t.throwArgumentError("invalid address or ENS name", "name", addressOrName); + } + const address = yield this.resolveName(addressOrName); + if (address == null) { + logger$t.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, { + operation: `resolveName(${JSON.stringify(addressOrName)})` + }); + } + return address; + }); + } + _getBlock(blockHashOrBlockTag, includeTransactions) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + blockHashOrBlockTag = yield blockHashOrBlockTag; + // If blockTag is a number (not "latest", etc), this is the block number + let blockNumber = -128; + const params = { + includeTransactions: !!includeTransactions + }; + if (isHexString(blockHashOrBlockTag, 32)) { + params.blockHash = blockHashOrBlockTag; + } + else { + try { + params.blockTag = yield this._getBlockTag(blockHashOrBlockTag); + if (isHexString(params.blockTag)) { + blockNumber = parseInt(params.blockTag.substring(2), 16); + } + } + catch (error) { + logger$t.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); + } + } + return poll(() => __awaiter$9(this, void 0, void 0, function* () { + const block = yield this.perform("getBlock", params); + // Block was not found + if (block == null) { + // For blockhashes, if we didn't say it existed, that blockhash may + // not exist. If we did see it though, perhaps from a log, we know + // it exists, and this node is just not caught up yet. + if (params.blockHash != null) { + if (this._emitted["b:" + params.blockHash] == null) { + return null; + } + } + // For block tags, if we are asking for a future block, we return null + if (params.blockTag != null) { + if (blockNumber > this._emitted.block) { + return null; + } + } + // Retry on the next block + return undefined; + } + // Add transactions + if (includeTransactions) { + let blockNumber = null; + for (let i = 0; i < block.transactions.length; i++) { + const tx = block.transactions[i]; + if (tx.blockNumber == null) { + tx.confirmations = 0; + } + else if (tx.confirmations == null) { + if (blockNumber == null) { + blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + } + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + } + } + const blockWithTxs = this.formatter.blockWithTransactions(block); + blockWithTxs.transactions = blockWithTxs.transactions.map((tx) => this._wrapTransaction(tx)); + return blockWithTxs; + } + return this.formatter.block(block); + }), { oncePoll: this }); + }); + } + getBlock(blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, false)); + } + getBlockWithTransactions(blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, true)); + } + getTransaction(transactionHash) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + transactionHash = yield transactionHash; + const params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return poll(() => __awaiter$9(this, void 0, void 0, function* () { + const result = yield this.perform("getTransaction", params); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return null; + } + return undefined; + } + const tx = this.formatter.transactionResponse(result); + if (tx.blockNumber == null) { + tx.confirmations = 0; + } + else if (tx.confirmations == null) { + const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + } + return this._wrapTransaction(tx); + }), { oncePoll: this }); + }); + } + getTransactionReceipt(transactionHash) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + transactionHash = yield transactionHash; + const params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return poll(() => __awaiter$9(this, void 0, void 0, function* () { + const result = yield this.perform("getTransactionReceipt", params); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return null; + } + return undefined; + } + // "geth-etc" returns receipts before they are ready + if (result.blockHash == null) { + return undefined; + } + const receipt = this.formatter.receipt(result); + if (receipt.blockNumber == null) { + receipt.confirmations = 0; + } + else if (receipt.confirmations == null) { + const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + // Add the confirmations using the fast block number (pessimistic) + let confirmations = (blockNumber - receipt.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + receipt.confirmations = confirmations; + } + return receipt; + }), { oncePoll: this }); + }); + } + getLogs(filter) { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + const params = yield resolveProperties({ filter: this._getFilter(filter) }); + const logs = yield this.perform("getLogs", params); + logs.forEach((log) => { + if (log.removed == null) { + log.removed = false; + } + }); + return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs); + }); + } + getEtherPrice() { + return __awaiter$9(this, void 0, void 0, function* () { + yield this.getNetwork(); + return this.perform("getEtherPrice", {}); + }); + } + _getBlockTag(blockTag) { + return __awaiter$9(this, void 0, void 0, function* () { + blockTag = yield blockTag; + if (typeof (blockTag) === "number" && blockTag < 0) { + if (blockTag % 1) { + logger$t.throwArgumentError("invalid BlockTag", "blockTag", blockTag); + } + let blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); + blockNumber += blockTag; + if (blockNumber < 0) { + blockNumber = 0; + } + return this.formatter.blockTag(blockNumber); + } + return this.formatter.blockTag(blockTag); + }); + } + getResolver(name) { + return __awaiter$9(this, void 0, void 0, function* () { + try { + const address = yield this._getResolver(name); + if (address == null) { + return null; + } + return new Resolver(this, address, name); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + return null; + } + }); + } + _getResolver(name) { + return __awaiter$9(this, void 0, void 0, function* () { + // Get the resolver from the blockchain + const network = yield this.getNetwork(); + // No ENS... + if (!network.ensAddress) { + logger$t.throwError("network does not support ENS", Logger.errors.UNSUPPORTED_OPERATION, { operation: "ENS", network: network.name }); + } + // keccak256("resolver(bytes32)") + const transaction = { + to: network.ensAddress, + data: ("0x0178b8bf" + namehash(name).substring(2)) + }; + try { + return this.formatter.callAddress(yield this.call(transaction)); + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + throw error; + } + }); + } + resolveName(name) { + return __awaiter$9(this, void 0, void 0, function* () { + name = yield name; + // If it is already an address, nothing to resolve + try { + return Promise.resolve(this.formatter.address(name)); + } + catch (error) { + // If is is a hexstring, the address is bad (See #694) + if (isHexString(name)) { + throw error; + } + } + if (typeof (name) !== "string") { + logger$t.throwArgumentError("invalid ENS name", "name", name); + } + // Get the addr from the resovler + const resolver = yield this.getResolver(name); + if (!resolver) { + return null; + } + return yield resolver.getAddress(); + }); + } + lookupAddress(address) { + return __awaiter$9(this, void 0, void 0, function* () { + address = yield address; + address = this.formatter.address(address); + const reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + const resolverAddress = yield this._getResolver(reverseName); + if (!resolverAddress) { + return null; + } + // keccak("name(bytes32)") + let bytes = arrayify(yield this.call({ + to: resolverAddress, + data: ("0x691f3431" + namehash(reverseName).substring(2)) + })); + // Strip off the dynamic string pointer (0x20) + if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { + return null; + } + bytes = bytes.slice(32); + // Not a length-prefixed string + if (bytes.length < 32) { + return null; + } + // Get the length of the string (from the length-prefix) + const length = BigNumber.from(bytes.slice(0, 32)).toNumber(); + bytes = bytes.slice(32); + // Length longer than available data + if (length > bytes.length) { + return null; + } + const name = toUtf8String(bytes.slice(0, length)); + // Make sure the reverse record matches the foward record + const addr = yield this.resolveName(name); + if (addr != address) { + return null; + } + return name; + }); + } + getAvatar(nameOrAddress) { + return __awaiter$9(this, void 0, void 0, function* () { + let resolver = null; + if (isHexString(nameOrAddress)) { + // Address; reverse lookup + const address = this.formatter.address(nameOrAddress); + const reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + const resolverAddress = yield this._getResolver(reverseName); + if (!resolverAddress) { + return null; + } + resolver = new Resolver(this, resolverAddress, "_", address); + } + else { + // ENS name; forward lookup + resolver = yield this.getResolver(nameOrAddress); + if (!resolver) { + return null; + } + } + const avatar = yield resolver.getAvatar(); + if (avatar == null) { + return null; + } + return avatar.url; + }); + } + perform(method, params) { + return logger$t.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + _startEvent(event) { + this.polling = (this._events.filter((e) => e.pollable()).length > 0); + } + _stopEvent(event) { + this.polling = (this._events.filter((e) => e.pollable()).length > 0); + } + _addEventListener(eventName, listener, once) { + const event = new Event(getEventTag$1(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + } + on(eventName, listener) { + return this._addEventListener(eventName, listener, false); + } + once(eventName, listener) { + return this._addEventListener(eventName, listener, true); + } + emit(eventName, ...args) { + let result = false; + let stopped = []; + let eventTag = getEventTag$1(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag) { + return true; + } + setTimeout(() => { + event.listener.apply(this, args); + }, 0); + result = true; + if (event.once) { + stopped.push(event); + return false; + } + return true; + }); + stopped.forEach((event) => { this._stopEvent(event); }); + return result; + } + listenerCount(eventName) { + if (!eventName) { + return this._events.length; + } + let eventTag = getEventTag$1(eventName); + return this._events.filter((event) => { + return (event.tag === eventTag); + }).length; + } + listeners(eventName) { + if (eventName == null) { + return this._events.map((event) => event.listener); + } + let eventTag = getEventTag$1(eventName); + return this._events + .filter((event) => (event.tag === eventTag)) + .map((event) => event.listener); + } + off(eventName, listener) { + if (listener == null) { + return this.removeAllListeners(eventName); + } + const stopped = []; + let found = false; + let eventTag = getEventTag$1(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag || event.listener != listener) { + return true; + } + if (found) { + return true; + } + found = true; + stopped.push(event); + return false; + }); + stopped.forEach((event) => { this._stopEvent(event); }); + return this; + } + removeAllListeners(eventName) { + let stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + const eventTag = getEventTag$1(eventName); + this._events = this._events.filter((event) => { + if (event.tag !== eventTag) { + return true; + } + stopped.push(event); + return false; + }); + } + stopped.forEach((event) => { this._stopEvent(event); }); + return this; + } +} + +"use strict"; +var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$u = new Logger(version$m); +const errorGas = ["call", "estimateGas"]; +function checkError(method, error, params) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === Logger.errors.SERVER_ERROR) { + const e = error.error; + if (e && e.message.match("reverted") && isHexString(e.data)) { + return e.data; + } + logger$u.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, { + error, data: "0x" + }); + } + let message = error.message; + if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + message = (message || "").toLowerCase(); + const transaction = params.transaction || params.signedTransaction; + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit/)) { + logger$u.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + // "nonce too low" + if (message.match(/nonce too low/)) { + logger$u.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced/)) { + logger$u.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/only replay-protected/)) { + logger$u.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, { + error, method, transaction + }); + } + if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) { + logger$u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, method, transaction + }); + } + throw error; +} +function timer(timeout) { + return new Promise(function (resolve) { + setTimeout(resolve, timeout); + }); +} +function getResult(payload) { + if (payload.error) { + // @TODO: not any + const error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + throw error; + } + return payload.result; +} +function getLowerCase(value) { + if (value) { + return value.toLowerCase(); + } + return value; +} +const _constructorGuard$4 = {}; +class JsonRpcSigner extends Signer { + constructor(constructorGuard, provider, addressOrIndex) { + logger$u.checkNew(new.target, JsonRpcSigner); + super(); + if (constructorGuard !== _constructorGuard$4) { + throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner"); + } + defineReadOnly(this, "provider", provider); + if (addressOrIndex == null) { + addressOrIndex = 0; + } + if (typeof (addressOrIndex) === "string") { + defineReadOnly(this, "_address", this.provider.formatter.address(addressOrIndex)); + defineReadOnly(this, "_index", null); + } + else if (typeof (addressOrIndex) === "number") { + defineReadOnly(this, "_index", addressOrIndex); + defineReadOnly(this, "_address", null); + } + else { + logger$u.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); + } + } + connect(provider) { + return logger$u.throwError("cannot alter JSON-RPC Signer connection", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "connect" + }); + } + connectUnchecked() { + return new UncheckedJsonRpcSigner(_constructorGuard$4, this.provider, this._address || this._index); + } + getAddress() { + if (this._address) { + return Promise.resolve(this._address); + } + return this.provider.send("eth_accounts", []).then((accounts) => { + if (accounts.length <= this._index) { + logger$u.throwError("unknown account #" + this._index, Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress" + }); + } + return this.provider.formatter.address(accounts[this._index]); + }); + } + sendUncheckedTransaction(transaction) { + transaction = shallowCopy(transaction); + const fromAddress = this.getAddress().then((address) => { + if (address) { + address = address.toLowerCase(); + } + return address; + }); + // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user + // wishes to use this, it is easy to specify explicitly, otherwise + // we look it up for them. + if (transaction.gasLimit == null) { + const estimate = shallowCopy(transaction); + estimate.from = fromAddress; + transaction.gasLimit = this.provider.estimateGas(estimate); + } + if (transaction.to != null) { + transaction.to = Promise.resolve(transaction.to).then((to) => __awaiter$a(this, void 0, void 0, function* () { + if (to == null) { + return null; + } + const address = yield this.provider.resolveName(to); + if (address == null) { + logger$u.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return address; + })); + } + return resolveProperties({ + tx: resolveProperties(transaction), + sender: fromAddress + }).then(({ tx, sender }) => { + if (tx.from != null) { + if (tx.from.toLowerCase() !== sender) { + logger$u.throwArgumentError("from address mismatch", "transaction", transaction); + } + } + else { + tx.from = sender; + } + const hexTx = this.provider.constructor.hexlifyTransaction(tx, { from: true }); + return this.provider.send("eth_sendTransaction", [hexTx]).then((hash) => { + return hash; + }, (error) => { + return checkError("sendTransaction", error, hexTx); + }); + }); + } + signTransaction(transaction) { + return logger$u.throwError("signing transactions is unsupported", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signTransaction" + }); + } + sendTransaction(transaction) { + return __awaiter$a(this, void 0, void 0, function* () { + // This cannot be mined any earlier than any recent block + const blockNumber = yield this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval); + // Send the transaction + const hash = yield this.sendUncheckedTransaction(transaction); + try { + // Unfortunately, JSON-RPC only provides and opaque transaction hash + // for a response, and we need the actual transaction, so we poll + // for it; it should show up very quickly + return yield poll(() => __awaiter$a(this, void 0, void 0, function* () { + const tx = yield this.provider.getTransaction(hash); + if (tx === null) { + return undefined; + } + return this.provider._wrapTransaction(tx, hash, blockNumber); + }), { oncePoll: this.provider }); + } + catch (error) { + error.transactionHash = hash; + throw error; + } + }); + } + signMessage(message) { + return __awaiter$a(this, void 0, void 0, function* () { + const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message); + const address = yield this.getAddress(); + return yield this.provider.send("personal_sign", [hexlify(data), address.toLowerCase()]); + }); + } + _legacySignMessage(message) { + return __awaiter$a(this, void 0, void 0, function* () { + const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message); + const address = yield this.getAddress(); + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return yield this.provider.send("eth_sign", [address.toLowerCase(), hexlify(data)]); + }); + } + _signTypedData(domain, types, value) { + return __awaiter$a(this, void 0, void 0, function* () { + // Populate any ENS names (in-place) + const populated = yield TypedDataEncoder.resolveNames(domain, types, value, (name) => { + return this.provider.resolveName(name); + }); + const address = yield this.getAddress(); + return yield this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ]); + }); + } + unlock(password) { + return __awaiter$a(this, void 0, void 0, function* () { + const provider = this.provider; + const address = yield this.getAddress(); + return provider.send("personal_unlockAccount", [address.toLowerCase(), password, null]); + }); + } +} +class UncheckedJsonRpcSigner extends JsonRpcSigner { + sendTransaction(transaction) { + return this.sendUncheckedTransaction(transaction).then((hash) => { + return { + hash: hash, + nonce: null, + gasLimit: null, + gasPrice: null, + data: null, + value: null, + chainId: null, + confirmations: 0, + from: null, + wait: (confirmations) => { return this.provider.waitForTransaction(hash, confirmations); } + }; + }); + } +} +const allowedTransactionKeys$3 = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true +}; +class JsonRpcProvider extends BaseProvider { + constructor(url, network) { + logger$u.checkNew(new.target, JsonRpcProvider); + let networkOrReady = network; + // The network is unknown, query the JSON-RPC for it + if (networkOrReady == null) { + networkOrReady = new Promise((resolve, reject) => { + setTimeout(() => { + this.detectNetwork().then((network) => { + resolve(network); + }, (error) => { + reject(error); + }); + }, 0); + }); + } + super(networkOrReady); + // Default URL + if (!url) { + url = getStatic(this.constructor, "defaultUrl")(); + } + if (typeof (url) === "string") { + defineReadOnly(this, "connection", Object.freeze({ + url: url + })); + } + else { + defineReadOnly(this, "connection", Object.freeze(shallowCopy(url))); + } + this._nextId = 42; + } + get _cache() { + if (this._eventLoopCache == null) { + this._eventLoopCache = {}; + } + return this._eventLoopCache; + } + static defaultUrl() { + return "http:/\/localhost:8545"; + } + detectNetwork() { + if (!this._cache["detectNetwork"]) { + this._cache["detectNetwork"] = this._uncachedDetectNetwork(); + // Clear this cache at the beginning of the next event loop + setTimeout(() => { + this._cache["detectNetwork"] = null; + }, 0); + } + return this._cache["detectNetwork"]; + } + _uncachedDetectNetwork() { + return __awaiter$a(this, void 0, void 0, function* () { + yield timer(0); + let chainId = null; + try { + chainId = yield this.send("eth_chainId", []); + } + catch (error) { + try { + chainId = yield this.send("net_version", []); + } + catch (error) { } + } + if (chainId != null) { + const getNetwork = getStatic(this.constructor, "getNetwork"); + try { + return getNetwork(BigNumber.from(chainId).toNumber()); + } + catch (error) { + return logger$u.throwError("could not detect network", Logger.errors.NETWORK_ERROR, { + chainId: chainId, + event: "invalidNetwork", + serverError: error + }); + } + } + return logger$u.throwError("could not detect network", Logger.errors.NETWORK_ERROR, { + event: "noNetwork" + }); + }); + } + getSigner(addressOrIndex) { + return new JsonRpcSigner(_constructorGuard$4, this, addressOrIndex); + } + getUncheckedSigner(addressOrIndex) { + return this.getSigner(addressOrIndex).connectUnchecked(); + } + listAccounts() { + return this.send("eth_accounts", []).then((accounts) => { + return accounts.map((a) => this.formatter.address(a)); + }); + } + send(method, params) { + const request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + this.emit("debug", { + action: "request", + request: deepCopy(request), + provider: this + }); + // We can expand this in the future to any call, but for now these + // are the biggest wins and do not require any serializing parameters. + const cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0); + if (cache && this._cache[method]) { + return this._cache[method]; + } + const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => { + this.emit("debug", { + action: "response", + request: request, + response: result, + provider: this + }); + return result; + }, (error) => { + this.emit("debug", { + action: "response", + error: error, + request: request, + provider: this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(() => { + this._cache[method] = null; + }, 0); + } + return result; + } + prepareRequest(method, params) { + switch (method) { + case "getBlockNumber": + return ["eth_blockNumber", []]; + case "getGasPrice": + return ["eth_gasPrice", []]; + case "getBalance": + return ["eth_getBalance", [getLowerCase(params.address), params.blockTag]]; + case "getTransactionCount": + return ["eth_getTransactionCount", [getLowerCase(params.address), params.blockTag]]; + case "getCode": + return ["eth_getCode", [getLowerCase(params.address), params.blockTag]]; + case "getStorageAt": + return ["eth_getStorageAt", [getLowerCase(params.address), params.position, params.blockTag]]; + case "sendTransaction": + return ["eth_sendRawTransaction", [params.signedTransaction]]; + case "getBlock": + if (params.blockTag) { + return ["eth_getBlockByNumber", [params.blockTag, !!params.includeTransactions]]; + } + else if (params.blockHash) { + return ["eth_getBlockByHash", [params.blockHash, !!params.includeTransactions]]; + } + return null; + case "getTransaction": + return ["eth_getTransactionByHash", [params.transactionHash]]; + case "getTransactionReceipt": + return ["eth_getTransactionReceipt", [params.transactionHash]]; + case "call": { + const hexlifyTransaction = getStatic(this.constructor, "hexlifyTransaction"); + return ["eth_call", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]]; + } + case "estimateGas": { + const hexlifyTransaction = getStatic(this.constructor, "hexlifyTransaction"); + return ["eth_estimateGas", [hexlifyTransaction(params.transaction, { from: true })]]; + } + case "getLogs": + if (params.filter && params.filter.address != null) { + params.filter.address = getLowerCase(params.filter.address); + } + return ["eth_getLogs", [params.filter]]; + default: + break; + } + return null; + } + perform(method, params) { + return __awaiter$a(this, void 0, void 0, function* () { + // Legacy networks do not like the type field being passed along (which + // is fair), so we delete type if it is 0 and a non-EIP-1559 network + if (method === "call" || method === "estimateGas") { + const tx = params.transaction; + if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) { + // If there are no EIP-1559 properties, it might be non-EIP-a559 + if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) { + const feeData = yield this.getFeeData(); + if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) { + // Network doesn't know about EIP-1559 (and hence type) + params = shallowCopy(params); + params.transaction = shallowCopy(tx); + delete params.transaction.type; + } + } + } + } + const args = this.prepareRequest(method, params); + if (args == null) { + logger$u.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + try { + return yield this.send(args[0], args[1]); + } + catch (error) { + return checkError(method, error, params); + } + }); + } + _startEvent(event) { + if (event.tag === "pending") { + this._startPending(); + } + super._startEvent(event); + } + _startPending() { + if (this._pendingFilter != null) { + return; + } + const self = this; + const pendingFilter = this.send("eth_newPendingTransactionFilter", []); + this._pendingFilter = pendingFilter; + pendingFilter.then(function (filterId) { + function poll() { + self.send("eth_getFilterChanges", [filterId]).then(function (hashes) { + if (self._pendingFilter != pendingFilter) { + return null; + } + let seq = Promise.resolve(); + hashes.forEach(function (hash) { + // @TODO: This should be garbage collected at some point... How? When? + self._emitted["t:" + hash.toLowerCase()] = "pending"; + seq = seq.then(function () { + return self.getTransaction(hash).then(function (tx) { + self.emit("pending", tx); + return null; + }); + }); + }); + return seq.then(function () { + return timer(1000); + }); + }).then(function () { + if (self._pendingFilter != pendingFilter) { + self.send("eth_uninstallFilter", [filterId]); + return; + } + setTimeout(function () { poll(); }, 0); + return null; + }).catch((error) => { }); + } + poll(); + return filterId; + }).catch((error) => { }); + } + _stopEvent(event) { + if (event.tag === "pending" && this.listenerCount("pending") === 0) { + this._pendingFilter = null; + } + super._stopEvent(event); + } + // Convert an ethers.js transaction into a JSON-RPC transaction + // - gasLimit => gas + // - All values hexlified + // - All numeric values zero-striped + // - All addresses are lowercased + // NOTE: This allows a TransactionRequest, but all values should be resolved + // before this is called + // @TODO: This will likely be removed in future versions and prepareRequest + // will be the preferred method for this. + static hexlifyTransaction(transaction, allowExtra) { + // Check only allowed properties are given + const allowed = shallowCopy(allowedTransactionKeys$3); + if (allowExtra) { + for (const key in allowExtra) { + if (allowExtra[key]) { + allowed[key] = true; + } + } + } + checkProperties(transaction, allowed); + const result = {}; + // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros. + ["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + const value = hexValue(transaction[key]); + if (key === "gasLimit") { + key = "gas"; + } + result[key] = value; + }); + ["from", "to", "data"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + result[key] = hexlify(transaction[key]); + }); + if (transaction.accessList) { + result["accessList"] = accessListify(transaction.accessList); + } + return result; + } +} + +"use strict"; +let WS = null; +try { + WS = WebSocket; + if (WS == null) { + throw new Error("inject please"); + } +} +catch (error) { + const logger = new Logger(version$m); + WS = function () { + logger.throwError("WebSockets not supported in this environment", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new WebSocket()" + }); + }; +} + +"use strict"; +var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$v = new Logger(version$m); +/** + * Notes: + * + * This provider differs a bit from the polling providers. One main + * difference is how it handles consistency. The polling providers + * will stall responses to ensure a consistent state, while this + * WebSocket provider assumes the connected backend will manage this. + * + * For example, if a polling provider emits an event which indicates + * the event occurred in blockhash XXX, a call to fetch that block by + * its hash XXX, if not present will retry until it is present. This + * can occur when querying a pool of nodes that are mildly out of sync + * with each other. + */ +let NextId = 1; +// For more info about the Real-time Event API see: +// https://geth.ethereum.org/docs/rpc/pubsub +class WebSocketProvider extends JsonRpcProvider { + constructor(url, network) { + // This will be added in the future; please open an issue to expedite + if (network === "any") { + logger$v.throwError("WebSocketProvider does not support 'any' network yet", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "network:any" + }); + } + super(url, network); + this._pollingInterval = -1; + this._wsReady = false; + defineReadOnly(this, "_websocket", new WS(this.connection.url)); + defineReadOnly(this, "_requests", {}); + defineReadOnly(this, "_subs", {}); + defineReadOnly(this, "_subIds", {}); + defineReadOnly(this, "_detectNetwork", super.detectNetwork()); + // Stall sending requests until the socket is open... + this._websocket.onopen = () => { + this._wsReady = true; + Object.keys(this._requests).forEach((id) => { + this._websocket.send(this._requests[id].payload); + }); + }; + this._websocket.onmessage = (messageEvent) => { + const data = messageEvent.data; + const result = JSON.parse(data); + if (result.id != null) { + const id = String(result.id); + const request = this._requests[id]; + delete this._requests[id]; + if (result.result !== undefined) { + request.callback(null, result.result); + this.emit("debug", { + action: "response", + request: JSON.parse(request.payload), + response: result.result, + provider: this + }); + } + else { + let error = null; + if (result.error) { + error = new Error(result.error.message || "unknown error"); + defineReadOnly(error, "code", result.error.code || null); + defineReadOnly(error, "response", data); + } + else { + error = new Error("unknown error"); + } + request.callback(error, undefined); + this.emit("debug", { + action: "response", + error: error, + request: JSON.parse(request.payload), + provider: this + }); + } + } + else if (result.method === "eth_subscription") { + // Subscription... + const sub = this._subs[result.params.subscription]; + if (sub) { + //this.emit.apply(this, ); + sub.processFunc(result.params.result); + } + } + else { + console.warn("this should not happen"); + } + }; + // This Provider does not actually poll, but we want to trigger + // poll events for things that depend on them (like stalling for + // block and transaction lookups) + const fauxPoll = setInterval(() => { + this.emit("poll"); + }, 1000); + if (fauxPoll.unref) { + fauxPoll.unref(); + } + } + detectNetwork() { + return this._detectNetwork; + } + get pollingInterval() { + return 0; + } + resetEventsBlock(blockNumber) { + logger$v.throwError("cannot reset events block on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resetEventBlock" + }); + } + set pollingInterval(value) { + logger$v.throwError("cannot set polling interval on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPollingInterval" + }); + } + poll() { + return __awaiter$b(this, void 0, void 0, function* () { + return null; + }); + } + set polling(value) { + if (!value) { + return; + } + logger$v.throwError("cannot set polling on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPolling" + }); + } + send(method, params) { + const rid = NextId++; + return new Promise((resolve, reject) => { + function callback(error, result) { + if (error) { + return reject(error); + } + return resolve(result); + } + const payload = JSON.stringify({ + method: method, + params: params, + id: rid, + jsonrpc: "2.0" + }); + this.emit("debug", { + action: "request", + request: JSON.parse(payload), + provider: this + }); + this._requests[String(rid)] = { callback, payload }; + if (this._wsReady) { + this._websocket.send(payload); + } + }); + } + static defaultUrl() { + return "ws:/\/localhost:8546"; + } + _subscribe(tag, param, processFunc) { + return __awaiter$b(this, void 0, void 0, function* () { + let subIdPromise = this._subIds[tag]; + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then((param) => { + return this.send("eth_subscribe", param); + }); + this._subIds[tag] = subIdPromise; + } + const subId = yield subIdPromise; + this._subs[subId] = { tag, processFunc }; + }); + } + _startEvent(event) { + switch (event.type) { + case "block": + this._subscribe("block", ["newHeads"], (result) => { + const blockNumber = BigNumber.from(result.number).toNumber(); + this._emitted.block = blockNumber; + this.emit("block", blockNumber); + }); + break; + case "pending": + this._subscribe("pending", ["newPendingTransactions"], (result) => { + this.emit("pending", result); + }); + break; + case "filter": + this._subscribe(event.tag, ["logs", this._getFilter(event.filter)], (result) => { + if (result.removed == null) { + result.removed = false; + } + this.emit(event.filter, this.formatter.filterLog(result)); + }); + break; + case "tx": { + const emitReceipt = (event) => { + const hash = event.hash; + this.getTransactionReceipt(hash).then((receipt) => { + if (!receipt) { + return; + } + this.emit(hash, receipt); + }); + }; + // In case it is already mined + emitReceipt(event); + // To keep things simple, we start up a single newHeads subscription + // to keep an eye out for transactions we are watching for. + // Starting a subscription for an event (i.e. "tx") that is already + // running is (basically) a nop. + this._subscribe("tx", ["newHeads"], (result) => { + this._events.filter((e) => (e.type === "tx")).forEach(emitReceipt); + }); + break; + } + // Nothing is needed + case "debug": + case "poll": + case "willPoll": + case "didPoll": + case "error": + break; + default: + console.log("unhandled:", event); + break; + } + } + _stopEvent(event) { + let tag = event.tag; + if (event.type === "tx") { + // There are remaining transaction event listeners + if (this._events.filter((e) => (e.type === "tx")).length) { + return; + } + tag = "tx"; + } + else if (this.listenerCount(event.event)) { + // There are remaining event listeners + return; + } + const subId = this._subIds[tag]; + if (!subId) { + return; + } + delete this._subIds[tag]; + subId.then((subId) => { + if (!this._subs[subId]) { + return; + } + delete this._subs[subId]; + this.send("eth_unsubscribe", [subId]); + }); + } + destroy() { + return __awaiter$b(this, void 0, void 0, function* () { + // Wait until we have connected before trying to disconnect + if (this._websocket.readyState === WS.CONNECTING) { + yield (new Promise((resolve) => { + this._websocket.onopen = function () { + resolve(true); + }; + this._websocket.onerror = function () { + resolve(false); + }; + })); + } + // Hangup + // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes + this._websocket.close(1000); + }); + } +} + +"use strict"; +var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$w = new Logger(version$m); +// A StaticJsonRpcProvider is useful when you *know* for certain that +// the backend will never change, as it never calls eth_chainId to +// verify its backend. However, if the backend does change, the effects +// are undefined and may include: +// - inconsistent results +// - locking up the UI +// - block skew warnings +// - wrong results +// If the network is not explicit (i.e. auto-detection is expected), the +// node MUST be running and available to respond to requests BEFORE this +// is instantiated. +class StaticJsonRpcProvider extends JsonRpcProvider { + detectNetwork() { + const _super = Object.create(null, { + detectNetwork: { get: () => super.detectNetwork } + }); + return __awaiter$c(this, void 0, void 0, function* () { + let network = this.network; + if (network == null) { + network = yield _super.detectNetwork.call(this); + if (!network) { + logger$w.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {}); + } + // If still not set, set it + if (this._network == null) { + // A static network does not support "any" + defineReadOnly(this, "_network", network); + this.emit("network", network, null); + } + } + return network; + }); + } +} +class UrlJsonRpcProvider extends StaticJsonRpcProvider { + constructor(network, apiKey) { + logger$w.checkAbstract(new.target, UrlJsonRpcProvider); + // Normalize the Network and API Key + network = getStatic(new.target, "getNetwork")(network); + apiKey = getStatic(new.target, "getApiKey")(apiKey); + const connection = getStatic(new.target, "getUrl")(network, apiKey); + super(connection, network); + if (typeof (apiKey) === "string") { + defineReadOnly(this, "apiKey", apiKey); + } + else if (apiKey != null) { + Object.keys(apiKey).forEach((key) => { + defineReadOnly(this, key, apiKey[key]); + }); + } + } + _startPending() { + logger$w.warn("WARNING: API provider does not support pending filters"); + } + isCommunityResource() { + return false; + } + getSigner(address) { + return logger$w.throwError("API provider does not support signing", Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" }); + } + listAccounts() { + return Promise.resolve([]); + } + // Return a defaultApiKey if null, otherwise validate the API key + static getApiKey(apiKey) { + return apiKey; + } + // Returns the url or connection for the given network and API key. The + // API key will have been sanitized by the getApiKey first, so any validation + // or transformations can be done there. + static getUrl(network, apiKey) { + return logger$w.throwError("not implemented; sub-classes must override getUrl", Logger.errors.NOT_IMPLEMENTED, { + operation: "getUrl" + }); + } +} + +"use strict"; +const logger$x = new Logger(version$m); +// This key was provided to ethers.js by Alchemy to be used by the +// default provider, but it is recommended that for your own +// production environments, that you acquire your own API key at: +// https://dashboard.alchemyapi.io +const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC"; +class AlchemyWebSocketProvider extends WebSocketProvider { + constructor(network, apiKey) { + const provider = new AlchemyProvider(network, apiKey); + const url = provider.connection.url.replace(/^http/i, "ws") + .replace(".alchemyapi.", ".ws.alchemyapi."); + super(url, provider.network); + defineReadOnly(this, "apiKey", provider.apiKey); + } + isCommunityResource() { + return (this.apiKey === defaultApiKey); + } +} +class AlchemyProvider extends UrlJsonRpcProvider { + static getWebSocketProvider(network, apiKey) { + return new AlchemyWebSocketProvider(network, apiKey); + } + static getApiKey(apiKey) { + if (apiKey == null) { + return defaultApiKey; + } + if (apiKey && typeof (apiKey) !== "string") { + logger$x.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey; + } + static getUrl(network, apiKey) { + let host = null; + switch (network.name) { + case "homestead": + host = "eth-mainnet.alchemyapi.io/v2/"; + break; + case "ropsten": + host = "eth-ropsten.alchemyapi.io/v2/"; + break; + case "rinkeby": + host = "eth-rinkeby.alchemyapi.io/v2/"; + break; + case "goerli": + host = "eth-goerli.alchemyapi.io/v2/"; + break; + case "kovan": + host = "eth-kovan.alchemyapi.io/v2/"; + break; + case "matic": + host = "polygon-mainnet.g.alchemy.com/v2/"; + break; + case "maticmum": + host = "polygon-mumbai.g.alchemy.com/v2/"; + break; + case "arbitrum": + host = "arb-mainnet.g.alchemy.com/v2/"; + break; + case "arbitrum-rinkeby": + host = "arb-rinkeby.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-kovan": + host = "opt-kovan.g.alchemy.com/v2/"; + break; + default: + logger$x.throwArgumentError("unsupported network", "network", arguments[0]); + } + return { + allowGzip: true, + url: ("https:/" + "/" + host + apiKey), + throttleCallback: (attempt, url) => { + if (apiKey === defaultApiKey) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + } + isCommunityResource() { + return (this.apiKey === defaultApiKey); + } +} + +"use strict"; +var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$y = new Logger(version$m); +class CloudflareProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey) { + if (apiKey != null) { + logger$y.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); + } + return null; + } + static getUrl(network, apiKey) { + let host = null; + switch (network.name) { + case "homestead": + host = "https://cloudflare-eth.com/"; + break; + default: + logger$y.throwArgumentError("unsupported network", "network", arguments[0]); + } + return host; + } + perform(method, params) { + const _super = Object.create(null, { + perform: { get: () => super.perform } + }); + return __awaiter$d(this, void 0, void 0, function* () { + // The Cloudflare provider does not support eth_blockNumber, + // so we get the latest block and pull it from that + if (method === "getBlockNumber") { + const block = yield _super.perform.call(this, "getBlock", { blockTag: "latest" }); + return block.number; + } + return _super.perform.call(this, method, params); + }); + } +} + +"use strict"; +var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$z = new Logger(version$m); +// The transaction has already been sanitized by the calls in Provider +function getTransactionPostData(transaction) { + const result = {}; + for (let key in transaction) { + if (transaction[key] == null) { + continue; + } + let value = transaction[key]; + if (key === "type" && value === 0) { + continue; + } + // Quantity-types require no leading zero, unless 0 + if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) { + value = hexValue(hexlify(value)); + } + else if (key === "accessList") { + value = "[" + accessListify(value).map((set) => { + return `{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`; + }).join(",") + "]"; + } + else { + value = hexlify(value); + } + result[key] = value; + } + return result; +} +function getResult$1(result) { + // getLogs, getHistory have weird success responses + if (result.status == 0 && (result.message === "No records found" || result.message === "No transactions found")) { + return result.result; + } + if (result.status != 1 || result.message != "OK") { + const error = new Error("invalid response"); + error.result = JSON.stringify(result); + if ((result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + error.throttleRetry = true; + } + throw error; + } + return result.result; +} +function getJsonResult(result) { + // This response indicates we are being throttled + if (result && result.status == 0 && result.message == "NOTOK" && (result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + const error = new Error("throttled response"); + error.result = JSON.stringify(result); + error.throttleRetry = true; + throw error; + } + if (result.jsonrpc != "2.0") { + // @TODO: not any + const error = new Error("invalid response"); + error.result = JSON.stringify(result); + throw error; + } + if (result.error) { + // @TODO: not any + const error = new Error(result.error.message || "unknown error"); + if (result.error.code) { + error.code = result.error.code; + } + if (result.error.data) { + error.data = result.error.data; + } + throw error; + } + return result.result; +} +// The blockTag was normalized as a string by the Provider pre-perform operations +function checkLogTag(blockTag) { + if (blockTag === "pending") { + throw new Error("pending not supported"); + } + if (blockTag === "latest") { + return blockTag; + } + return parseInt(blockTag.substring(2), 16); +} +const defaultApiKey$1 = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"; +function checkError$1(method, error, transaction) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === Logger.errors.SERVER_ERROR) { + const e = error.error; + // Etherscan keeps changing their string + if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) { + // Etherscan prefixes the data like "Reverted 0x1234" + let data = e.data; + if (data) { + data = "0x" + data.replace(/^.*0x/i, ""); + } + if (isHexString(data)) { + return data; + } + logger$z.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, { + error, data: "0x" + }); + } + } + // Get the message from any nested error structure + let message = error.message; + if (error.code === Logger.errors.SERVER_ERROR) { + if (error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + } + message = (message || "").toLowerCase(); + // "Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0" + if (message.match(/insufficient funds/)) { + logger$z.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + // "Transaction with the same hash was already imported." + if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) { + logger$z.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + // "Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce." + if (message.match(/another transaction with same nonce/)) { + logger$z.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + if (message.match(/execution failed due to an exception|execution reverted/)) { + logger$z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, method, transaction + }); + } + throw error; +} +class EtherscanProvider extends BaseProvider { + constructor(network, apiKey) { + logger$z.checkNew(new.target, EtherscanProvider); + super(network); + defineReadOnly(this, "baseUrl", this.getBaseUrl()); + defineReadOnly(this, "apiKey", apiKey || defaultApiKey$1); + } + getBaseUrl() { + switch (this.network ? this.network.name : "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "ropsten": + return "https:/\/api-ropsten.etherscan.io"; + case "rinkeby": + return "https:/\/api-rinkeby.etherscan.io"; + case "kovan": + return "https:/\/api-kovan.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + default: + } + return logger$z.throwArgumentError("unsupported network", "network", name); + } + getUrl(module, params) { + const query = Object.keys(params).reduce((accum, key) => { + const value = params[key]; + if (value != null) { + accum += `&${key}=${value}`; + } + return accum; + }, ""); + const apiKey = ((this.apiKey) ? `&apikey=${this.apiKey}` : ""); + return `${this.baseUrl}/api?module=${module}${query}${apiKey}`; + } + getPostUrl() { + return `${this.baseUrl}/api`; + } + getPostData(module, params) { + params.module = module; + params.apikey = this.apiKey; + return params; + } + fetch(module, params, post) { + return __awaiter$e(this, void 0, void 0, function* () { + const url = (post ? this.getPostUrl() : this.getUrl(module, params)); + const payload = (post ? this.getPostData(module, params) : null); + const procFunc = (module === "proxy") ? getJsonResult : getResult$1; + this.emit("debug", { + action: "request", + request: url, + provider: this + }); + const connection = { + url: url, + throttleSlotInterval: 1000, + throttleCallback: (attempt, url) => { + if (this.isCommunityResource()) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + let payloadStr = null; + if (payload) { + connection.headers = { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" }; + payloadStr = Object.keys(payload).map((key) => { + return `${key}=${payload[key]}`; + }).join("&"); + } + const result = yield fetchJson(connection, payloadStr, procFunc || getJsonResult); + this.emit("debug", { + action: "response", + request: url, + response: deepCopy(result), + provider: this + }); + return result; + }); + } + detectNetwork() { + return __awaiter$e(this, void 0, void 0, function* () { + return this.network; + }); + } + perform(method, params) { + const _super = Object.create(null, { + perform: { get: () => super.perform } + }); + return __awaiter$e(this, void 0, void 0, function* () { + switch (method) { + case "getBlockNumber": + return this.fetch("proxy", { action: "eth_blockNumber" }); + case "getGasPrice": + return this.fetch("proxy", { action: "eth_gasPrice" }); + case "getBalance": + // Returns base-10 result + return this.fetch("account", { + action: "balance", + address: params.address, + tag: params.blockTag + }); + case "getTransactionCount": + return this.fetch("proxy", { + action: "eth_getTransactionCount", + address: params.address, + tag: params.blockTag + }); + case "getCode": + return this.fetch("proxy", { + action: "eth_getCode", + address: params.address, + tag: params.blockTag + }); + case "getStorageAt": + return this.fetch("proxy", { + action: "eth_getStorageAt", + address: params.address, + position: params.position, + tag: params.blockTag + }); + case "sendTransaction": + return this.fetch("proxy", { + action: "eth_sendRawTransaction", + hex: params.signedTransaction + }, true).catch((error) => { + return checkError$1("sendTransaction", error, params.signedTransaction); + }); + case "getBlock": + if (params.blockTag) { + return this.fetch("proxy", { + action: "eth_getBlockByNumber", + tag: params.blockTag, + boolean: (params.includeTransactions ? "true" : "false") + }); + } + throw new Error("getBlock by blockHash not implemented"); + case "getTransaction": + return this.fetch("proxy", { + action: "eth_getTransactionByHash", + txhash: params.transactionHash + }); + case "getTransactionReceipt": + return this.fetch("proxy", { + action: "eth_getTransactionReceipt", + txhash: params.transactionHash + }); + case "call": { + if (params.blockTag !== "latest") { + throw new Error("EtherscanProvider does not support blockTag for call"); + } + const postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_call"; + try { + return yield this.fetch("proxy", postData, true); + } + catch (error) { + return checkError$1("call", error, params.transaction); + } + } + case "estimateGas": { + const postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_estimateGas"; + try { + return yield this.fetch("proxy", postData, true); + } + catch (error) { + return checkError$1("estimateGas", error, params.transaction); + } + } + case "getLogs": { + const args = { action: "getLogs" }; + if (params.filter.fromBlock) { + args.fromBlock = checkLogTag(params.filter.fromBlock); + } + if (params.filter.toBlock) { + args.toBlock = checkLogTag(params.filter.toBlock); + } + if (params.filter.address) { + args.address = params.filter.address; + } + // @TODO: We can handle slightly more complicated logs using the logs API + if (params.filter.topics && params.filter.topics.length > 0) { + if (params.filter.topics.length > 1) { + logger$z.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); + } + if (params.filter.topics.length === 1) { + const topic0 = params.filter.topics[0]; + if (typeof (topic0) !== "string" || topic0.length !== 66) { + logger$z.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 }); + } + args.topic0 = topic0; + } + } + const logs = yield this.fetch("logs", args); + // Cache txHash => blockHash + let blocks = {}; + // Add any missing blockHash to the logs + for (let i = 0; i < logs.length; i++) { + const log = logs[i]; + if (log.blockHash != null) { + continue; + } + if (blocks[log.blockNumber] == null) { + const block = yield this.getBlock(log.blockNumber); + if (block) { + blocks[log.blockNumber] = block.hash; + } + } + log.blockHash = blocks[log.blockNumber]; + } + return logs; + } + case "getEtherPrice": + if (this.network.name !== "homestead") { + return 0.0; + } + return parseFloat((yield this.fetch("stats", { action: "ethprice" })).ethusd); + default: + break; + } + return _super.perform.call(this, method, params); + }); + } + // Note: The `page` page parameter only allows pagination within the + // 10,000 window available without a page and offset parameter + // Error: Result window is too large, PageNo x Offset size must + // be less than or equal to 10000 + getHistory(addressOrName, startBlock, endBlock) { + return __awaiter$e(this, void 0, void 0, function* () { + const params = { + action: "txlist", + address: (yield this.resolveName(addressOrName)), + startblock: ((startBlock == null) ? 0 : startBlock), + endblock: ((endBlock == null) ? 99999999 : endBlock), + sort: "asc" + }; + const result = yield this.fetch("account", params); + return result.map((tx) => { + ["contractAddress", "to"].forEach(function (key) { + if (tx[key] == "") { + delete tx[key]; + } + }); + if (tx.creates == null && tx.contractAddress != null) { + tx.creates = tx.contractAddress; + } + const item = this.formatter.transactionResponse(tx); + if (tx.timeStamp) { + item.timestamp = parseInt(tx.timeStamp); + } + return item; + }); + }); + } + isCommunityResource() { + return (this.apiKey === defaultApiKey$1); + } +} + +"use strict"; +var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const logger$A = new Logger(version$m); +function now() { return (new Date()).getTime(); } +// Returns to network as long as all agree, or null if any is null. +// Throws an error if any two networks do not match. +function checkNetworks(networks) { + let result = null; + for (let i = 0; i < networks.length; i++) { + const network = networks[i]; + // Null! We do not know our network; bail. + if (network == null) { + return null; + } + if (result) { + // Make sure the network matches the previous networks + if (!(result.name === network.name && result.chainId === network.chainId && + ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) { + logger$A.throwArgumentError("provider mismatch", "networks", networks); + } + } + else { + result = network; + } + } + return result; +} +function median(values, maxDelta) { + values = values.slice().sort(); + const middle = Math.floor(values.length / 2); + // Odd length; take the middle + if (values.length % 2) { + return values[middle]; + } + // Even length; take the average of the two middle + const a = values[middle - 1], b = values[middle]; + if (maxDelta != null && Math.abs(a - b) > maxDelta) { + return null; + } + return (a + b) / 2; +} +function serialize$1(value) { + if (value === null) { + return "null"; + } + else if (typeof (value) === "number" || typeof (value) === "boolean") { + return JSON.stringify(value); + } + else if (typeof (value) === "string") { + return value; + } + else if (BigNumber.isBigNumber(value)) { + return value.toString(); + } + else if (Array.isArray(value)) { + return JSON.stringify(value.map((i) => serialize$1(i))); + } + else if (typeof (value) === "object") { + const keys = Object.keys(value); + keys.sort(); + return "{" + keys.map((key) => { + let v = value[key]; + if (typeof (v) === "function") { + v = "[function]"; + } + else { + v = serialize$1(v); + } + return JSON.stringify(key) + ":" + v; + }).join(",") + "}"; + } + throw new Error("unknown value type: " + typeof (value)); +} +// Next request ID to use for emitting debug info +let nextRid = 1; +; +function stall$1(duration) { + let cancel = null; + let timer = null; + let promise = (new Promise((resolve) => { + cancel = function () { + if (timer) { + clearTimeout(timer); + timer = null; + } + resolve(); + }; + timer = setTimeout(cancel, duration); + })); + const wait = (func) => { + promise = promise.then(func); + return promise; + }; + function getPromise() { + return promise; + } + return { cancel, getPromise, wait }; +} +const ForwardErrors = [ + Logger.errors.CALL_EXCEPTION, + Logger.errors.INSUFFICIENT_FUNDS, + Logger.errors.NONCE_EXPIRED, + Logger.errors.REPLACEMENT_UNDERPRICED, + Logger.errors.UNPREDICTABLE_GAS_LIMIT +]; +const ForwardProperties = [ + "address", + "args", + "errorArgs", + "errorSignature", + "method", + "transaction", +]; +; +function exposeDebugConfig(config, now) { + const result = { + weight: config.weight + }; + Object.defineProperty(result, "provider", { get: () => config.provider }); + if (config.start) { + result.start = config.start; + } + if (now) { + result.duration = (now - config.start); + } + if (config.done) { + if (config.error) { + result.error = config.error; + } + else { + result.result = config.result || null; + } + } + return result; +} +function normalizedTally(normalize, quorum) { + return function (configs) { + // Count the votes for each result + const tally = {}; + configs.forEach((c) => { + const value = normalize(c.result); + if (!tally[value]) { + tally[value] = { count: 0, result: c.result }; + } + tally[value].count++; + }); + // Check for a quorum on any given result + const keys = Object.keys(tally); + for (let i = 0; i < keys.length; i++) { + const check = tally[keys[i]]; + if (check.count >= quorum) { + return check.result; + } + } + // No quroum + return undefined; + }; +} +function getProcessFunc(provider, method, params) { + let normalize = serialize$1; + switch (method) { + case "getBlockNumber": + // Return the median value, unless there is (median + 1) is also + // present, in which case that is probably true and the median + // is going to be stale soon. In the event of a malicious node, + // the lie will be true soon enough. + return function (configs) { + const values = configs.map((c) => c.result); + // Get the median block number + let blockNumber = median(configs.map((c) => c.result), 2); + if (blockNumber == null) { + return undefined; + } + blockNumber = Math.ceil(blockNumber); + // If the next block height is present, its prolly safe to use + if (values.indexOf(blockNumber + 1) >= 0) { + blockNumber++; + } + // Don't ever roll back the blockNumber + if (blockNumber >= provider._highestBlockNumber) { + provider._highestBlockNumber = blockNumber; + } + return provider._highestBlockNumber; + }; + case "getGasPrice": + // Return the middle (round index up) value, similar to median + // but do not average even entries and choose the higher. + // Malicious actors must compromise 50% of the nodes to lie. + return function (configs) { + const values = configs.map((c) => c.result); + values.sort(); + return values[Math.floor(values.length / 2)]; + }; + case "getEtherPrice": + // Returns the median price. Malicious actors must compromise at + // least 50% of the nodes to lie (in a meaningful way). + return function (configs) { + return median(configs.map((c) => c.result)); + }; + // No additional normalizing required; serialize is enough + case "getBalance": + case "getTransactionCount": + case "getCode": + case "getStorageAt": + case "call": + case "estimateGas": + case "getLogs": + break; + // We drop the confirmations from transactions as it is approximate + case "getTransaction": + case "getTransactionReceipt": + normalize = function (tx) { + if (tx == null) { + return null; + } + tx = shallowCopy(tx); + tx.confirmations = -1; + return serialize$1(tx); + }; + break; + // We drop the confirmations from transactions as it is approximate + case "getBlock": + // We drop the confirmations from transactions as it is approximate + if (params.includeTransactions) { + normalize = function (block) { + if (block == null) { + return null; + } + block = shallowCopy(block); + block.transactions = block.transactions.map((tx) => { + tx = shallowCopy(tx); + tx.confirmations = -1; + return tx; + }); + return serialize$1(block); + }; + } + else { + normalize = function (block) { + if (block == null) { + return null; + } + return serialize$1(block); + }; + } + break; + default: + throw new Error("unknown method: " + method); + } + // Return the result if and only if the expected quorum is + // satisfied and agreed upon for the final result. + return normalizedTally(normalize, provider.quorum); +} +// If we are doing a blockTag query, we need to make sure the backend is +// caught up to the FallbackProvider, before sending a request to it. +function waitForSync(config, blockNumber) { + return __awaiter$f(this, void 0, void 0, function* () { + const provider = (config.provider); + if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) { + return provider; + } + return poll(() => { + return new Promise((resolve, reject) => { + setTimeout(function () { + // We are synced + if (provider.blockNumber >= blockNumber) { + return resolve(provider); + } + // We're done; just quit + if (config.cancelled) { + return resolve(null); + } + // Try again, next block + return resolve(undefined); + }, 0); + }); + }, { oncePoll: provider }); + }); +} +function getRunner(config, currentBlockNumber, method, params) { + return __awaiter$f(this, void 0, void 0, function* () { + let provider = config.provider; + switch (method) { + case "getBlockNumber": + case "getGasPrice": + return provider[method](); + case "getEtherPrice": + if (provider.getEtherPrice) { + return provider.getEtherPrice(); + } + break; + case "getBalance": + case "getTransactionCount": + case "getCode": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider[method](params.address, params.blockTag || "latest"); + case "getStorageAt": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider.getStorageAt(params.address, params.position, params.blockTag || "latest"); + case "getBlock": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider[(params.includeTransactions ? "getBlockWithTransactions" : "getBlock")](params.blockTag || params.blockHash); + case "call": + case "estimateGas": + if (params.blockTag && isHexString(params.blockTag)) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider[method](params.transaction); + case "getTransaction": + case "getTransactionReceipt": + return provider[method](params.transactionHash); + case "getLogs": { + let filter = params.filter; + if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) { + provider = yield waitForSync(config, currentBlockNumber); + } + return provider.getLogs(filter); + } + } + return logger$A.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, { + method: method, + params: params + }); + }); +} +class FallbackProvider extends BaseProvider { + constructor(providers, quorum) { + logger$A.checkNew(new.target, FallbackProvider); + if (providers.length === 0) { + logger$A.throwArgumentError("missing providers", "providers", providers); + } + const providerConfigs = providers.map((configOrProvider, index) => { + if (Provider.isProvider(configOrProvider)) { + const stallTimeout = isCommunityResource(configOrProvider) ? 2000 : 750; + const priority = 1; + return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority }); + } + const config = shallowCopy(configOrProvider); + if (config.priority == null) { + config.priority = 1; + } + if (config.stallTimeout == null) { + config.stallTimeout = isCommunityResource(configOrProvider) ? 2000 : 750; + } + if (config.weight == null) { + config.weight = 1; + } + const weight = config.weight; + if (weight % 1 || weight > 512 || weight < 1) { + logger$A.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight); + } + return Object.freeze(config); + }); + const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0); + if (quorum == null) { + quorum = total / 2; + } + else if (quorum > total) { + logger$A.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); + } + // Are all providers' networks are known + let networkOrReady = checkNetworks(providerConfigs.map((c) => (c.provider).network)); + // Not all networks are known; we must stall + if (networkOrReady == null) { + networkOrReady = new Promise((resolve, reject) => { + setTimeout(() => { + this.detectNetwork().then(resolve, reject); + }, 0); + }); + } + super(networkOrReady); + // Preserve a copy, so we do not get mutated + defineReadOnly(this, "providerConfigs", Object.freeze(providerConfigs)); + defineReadOnly(this, "quorum", quorum); + this._highestBlockNumber = -1; + } + detectNetwork() { + return __awaiter$f(this, void 0, void 0, function* () { + const networks = yield Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork())); + return checkNetworks(networks); + }); + } + perform(method, params) { + return __awaiter$f(this, void 0, void 0, function* () { + // Sending transactions is special; always broadcast it to all backends + if (method === "sendTransaction") { + const results = yield Promise.all(this.providerConfigs.map((c) => { + return c.provider.sendTransaction(params.signedTransaction).then((result) => { + return result.hash; + }, (error) => { + return error; + }); + })); + // Any success is good enough (other errors are likely "already seen" errors + for (let i = 0; i < results.length; i++) { + const result = results[i]; + if (typeof (result) === "string") { + return result; + } + } + // They were all an error; pick the first error + throw results[0]; + } + // We need to make sure we are in sync with our backends, so we need + // to know this before we can make a lot of calls + if (this._highestBlockNumber === -1 && method !== "getBlockNumber") { + yield this.getBlockNumber(); + } + const processFunc = getProcessFunc(this, method, params); + // Shuffle the providers and then sort them by their priority; we + // shallowCopy them since we will store the result in them too + const configs = shuffled(this.providerConfigs.map(shallowCopy)); + configs.sort((a, b) => (a.priority - b.priority)); + const currentBlockNumber = this._highestBlockNumber; + let i = 0; + let first = true; + while (true) { + const t0 = now(); + // Compute the inflight weight (exclude anything past) + let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout))) + .reduce((accum, c) => (accum + c.weight), 0); + // Start running enough to meet quorum + while (inflightWeight < this.quorum && i < configs.length) { + const config = configs[i++]; + const rid = nextRid++; + config.start = now(); + config.staller = stall$1(config.stallTimeout); + config.staller.wait(() => { config.staller = null; }); + config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => { + config.done = true; + config.result = result; + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + }, (error) => { + config.done = true; + config.error = error; + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + }); + if (this.listenerCount("debug")) { + this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, null), + request: { method: method, params: deepCopy(params) }, + provider: this + }); + } + inflightWeight += config.weight; + } + // Wait for anything meaningful to finish or stall out + const waiting = []; + configs.forEach((c) => { + if (c.done || !c.runner) { + return; + } + waiting.push(c.runner); + if (c.staller) { + waiting.push(c.staller.getPromise()); + } + }); + if (waiting.length) { + yield Promise.race(waiting); + } + // Check the quorum and process the results; the process function + // may additionally decide the quorum is not met + const results = configs.filter((c) => (c.done && c.error == null)); + if (results.length >= this.quorum) { + const result = processFunc(results); + if (result !== undefined) { + // Shut down any stallers + configs.forEach(c => { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return result; + } + if (!first) { + yield stall$1(100).getPromise(); + } + first = false; + } + // No result, check for errors that should be forwarded + const errors = configs.reduce((accum, c) => { + if (!c.done || c.error == null) { + return accum; + } + const code = (c.error).code; + if (ForwardErrors.indexOf(code) >= 0) { + if (!accum[code]) { + accum[code] = { error: c.error, weight: 0 }; + } + accum[code].weight += c.weight; + } + return accum; + }, ({})); + Object.keys(errors).forEach((errorCode) => { + const tally = errors[errorCode]; + if (tally.weight < this.quorum) { + return; + } + // Shut down any stallers + configs.forEach(c => { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + const e = (tally.error); + const props = {}; + ForwardProperties.forEach((name) => { + if (e[name] == null) { + return; + } + props[name] = e[name]; + }); + logger$A.throwError(e.reason || e.message, errorCode, props); + }); + // All configs have run to completion; we will never get more data + if (configs.filter((c) => !c.done).length === 0) { + break; + } + } + // Shut down any stallers; shouldn't be any + configs.forEach(c => { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return logger$A.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, { + method: method, + params: params, + //results: configs.map((c) => c.result), + //errors: configs.map((c) => c.error), + results: configs.map((c) => exposeDebugConfig(c)), + provider: this + }); + }); + } +} + +"use strict"; +const IpcProvider = null; + +"use strict"; +const logger$B = new Logger(version$m); +const defaultProjectId = "84842078b09946638c03157f83405213"; +class InfuraWebSocketProvider extends WebSocketProvider { + constructor(network, apiKey) { + const provider = new InfuraProvider(network, apiKey); + const connection = provider.connection; + if (connection.password) { + logger$B.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "InfuraProvider.getWebSocketProvider()" + }); + } + const url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/"); + super(url, network); + defineReadOnly(this, "apiKey", provider.projectId); + defineReadOnly(this, "projectId", provider.projectId); + defineReadOnly(this, "projectSecret", provider.projectSecret); + } + isCommunityResource() { + return (this.projectId === defaultProjectId); + } +} +class InfuraProvider extends UrlJsonRpcProvider { + static getWebSocketProvider(network, apiKey) { + return new InfuraWebSocketProvider(network, apiKey); + } + static getApiKey(apiKey) { + const apiKeyObj = { + apiKey: defaultProjectId, + projectId: defaultProjectId, + projectSecret: null + }; + if (apiKey == null) { + return apiKeyObj; + } + if (typeof (apiKey) === "string") { + apiKeyObj.projectId = apiKey; + } + else if (apiKey.projectSecret != null) { + logger$B.assertArgument((typeof (apiKey.projectId) === "string"), "projectSecret requires a projectId", "projectId", apiKey.projectId); + logger$B.assertArgument((typeof (apiKey.projectSecret) === "string"), "invalid projectSecret", "projectSecret", "[REDACTED]"); + apiKeyObj.projectId = apiKey.projectId; + apiKeyObj.projectSecret = apiKey.projectSecret; + } + else if (apiKey.projectId) { + apiKeyObj.projectId = apiKey.projectId; + } + apiKeyObj.apiKey = apiKeyObj.projectId; + return apiKeyObj; + } + static getUrl(network, apiKey) { + let host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "mainnet.infura.io"; + break; + case "ropsten": + host = "ropsten.infura.io"; + break; + case "rinkeby": + host = "rinkeby.infura.io"; + break; + case "kovan": + host = "kovan.infura.io"; + break; + case "goerli": + host = "goerli.infura.io"; + break; + case "matic": + host = "polygon-mainnet.infura.io"; + break; + case "maticmum": + host = "polygon-mumbai.infura.io"; + break; + case "optimism": + host = "optimism-mainnet.infura.io"; + break; + case "optimism-kovan": + host = "optimism-kovan.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-rinkeby": + host = "arbitrum-rinkeby.infura.io"; + break; + default: + logger$B.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + const connection = { + allowGzip: true, + url: ("https:/" + "/" + host + "/v3/" + apiKey.projectId), + throttleCallback: (attempt, url) => { + if (apiKey.projectId === defaultProjectId) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret; + } + return connection; + } + isCommunityResource() { + return (this.projectId === defaultProjectId); + } +} + +// Experimental +class JsonRpcBatchProvider extends JsonRpcProvider { + send(method, params) { + const request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + if (this._pendingBatch == null) { + this._pendingBatch = []; + } + const inflightRequest = { request, resolve: null, reject: null }; + const promise = new Promise((resolve, reject) => { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this._pendingBatch.push(inflightRequest); + if (!this._pendingBatchAggregator) { + // Schedule batch for next event loop + short duration + this._pendingBatchAggregator = setTimeout(() => { + // Get teh current batch and clear it, so new requests + // go into the next batch + const batch = this._pendingBatch; + this._pendingBatch = null; + this._pendingBatchAggregator = null; + // Get the request as an array of requests + const request = batch.map((inflight) => inflight.request); + this.emit("debug", { + action: "requestBatch", + request: deepCopy(request), + provider: this + }); + return fetchJson(this.connection, JSON.stringify(request)).then((result) => { + this.emit("debug", { + action: "response", + request: request, + response: result, + provider: this + }); + // For each result, feed it to the correct Promise, depending + // on whether it was a success or error + batch.forEach((inflightRequest, index) => { + const payload = result[index]; + if (payload.error) { + const error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + inflightRequest.reject(error); + } + else { + inflightRequest.resolve(payload.result); + } + }); + }, (error) => { + this.emit("debug", { + action: "response", + error: error, + request: request, + provider: this + }); + batch.forEach((inflightRequest) => { + inflightRequest.reject(error); + }); + }); + }, 10); + } + return promise; + } +} + +/* istanbul ignore file */ +"use strict"; +const logger$C = new Logger(version$m); +// Special API key provided by Nodesmith for ethers.js +const defaultApiKey$2 = "ETHERS_JS_SHARED"; +class NodesmithProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey) { + if (apiKey && typeof (apiKey) !== "string") { + logger$C.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey || defaultApiKey$2; + } + static getUrl(network, apiKey) { + logger$C.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); + let host = null; + switch (network.name) { + case "homestead": + host = "https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc"; + break; + case "ropsten": + host = "https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc"; + break; + case "rinkeby": + host = "https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc"; + break; + case "goerli": + host = "https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc"; + break; + case "kovan": + host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc"; + break; + default: + logger$C.throwArgumentError("unsupported network", "network", arguments[0]); + } + return (host + "?apiKey=" + apiKey); + } +} + +"use strict"; +const logger$D = new Logger(version$m); +// These are load-balancer-based application IDs +const defaultApplicationIds = { + homestead: "6004bcd10040261633ade990", + ropsten: "6004bd4d0040261633ade991", + rinkeby: "6004bda20040261633ade994", + goerli: "6004bd860040261633ade992", +}; +class PocketProvider extends UrlJsonRpcProvider { + constructor(network, apiKey) { + // We need a bit of creativity in the constructor because + // Pocket uses different default API keys based on the network + if (apiKey == null) { + const n = getStatic(new.target, "getNetwork")(network); + if (n) { + const applicationId = defaultApplicationIds[n.name]; + if (applicationId) { + apiKey = { + applicationId: applicationId, + loadBalancer: true + }; + } + } + // If there was any issue above, we don't know this network + if (apiKey == null) { + logger$D.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + } + super(network, apiKey); + } + static getApiKey(apiKey) { + // Most API Providers allow null to get the default configuration, but + // Pocket requires the network to decide the default provider, so we + // rely on hijacking the constructor to add a sensible default for us + if (apiKey == null) { + logger$D.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey); + } + const apiKeyObj = { + applicationId: null, + loadBalancer: false, + applicationSecretKey: null + }; + // Parse applicationId and applicationSecretKey + if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + } + else if (apiKey.applicationSecretKey != null) { + logger$D.assertArgument((typeof (apiKey.applicationId) === "string"), "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId); + logger$D.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]"); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else if (apiKey.applicationId) { + logger$D.assertArgument((typeof (apiKey.applicationId) === "string"), "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else { + logger$D.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + return apiKeyObj; + } + static getUrl(network, apiKey) { + let host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + default: + logger$D.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + let url = null; + if (apiKey.loadBalancer) { + url = `https:/\/${host}/v1/lb/${apiKey.applicationId}`; + } + else { + url = `https:/\/${host}/v1/${apiKey.applicationId}`; + } + const connection = { url }; + // Initialize empty headers + connection.headers = {}; + // Apply application secret key + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey; + } + return connection; + } + isCommunityResource() { + return (this.applicationId === defaultApplicationIds[this.network.name]); + } +} + +"use strict"; +const logger$E = new Logger(version$m); +let _nextId = 1; +function buildWeb3LegacyFetcher(provider, sendFunc) { + const fetcher = "Web3LegacyFetcher"; + return function (method, params) { + const request = { + method: method, + params: params, + id: (_nextId++), + jsonrpc: "2.0" + }; + return new Promise((resolve, reject) => { + this.emit("debug", { + action: "request", + fetcher, + request: deepCopy(request), + provider: this + }); + sendFunc(request, (error, response) => { + if (error) { + this.emit("debug", { + action: "response", + fetcher, + error, + request, + provider: this + }); + return reject(error); + } + this.emit("debug", { + action: "response", + fetcher, + request, + response, + provider: this + }); + if (response.error) { + const error = new Error(response.error.message); + error.code = response.error.code; + error.data = response.error.data; + return reject(error); + } + resolve(response.result); + }); + }); + }; +} +function buildEip1193Fetcher(provider) { + return function (method, params) { + if (params == null) { + params = []; + } + const request = { method, params }; + this.emit("debug", { + action: "request", + fetcher: "Eip1193Fetcher", + request: deepCopy(request), + provider: this + }); + return provider.request(request).then((response) => { + this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request, + response, + provider: this + }); + return response; + }, (error) => { + this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request, + error, + provider: this + }); + throw error; + }); + }; +} +class Web3Provider extends JsonRpcProvider { + constructor(provider, network) { + logger$E.checkNew(new.target, Web3Provider); + if (provider == null) { + logger$E.throwArgumentError("missing provider", "provider", provider); + } + let path = null; + let jsonRpcFetchFunc = null; + let subprovider = null; + if (typeof (provider) === "function") { + path = "unknown:"; + jsonRpcFetchFunc = provider; + } + else { + path = provider.host || provider.path || ""; + if (!path && provider.isMetaMask) { + path = "metamask"; + } + subprovider = provider; + if (provider.request) { + if (path === "") { + path = "eip-1193:"; + } + jsonRpcFetchFunc = buildEip1193Fetcher(provider); + } + else if (provider.sendAsync) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider)); + } + else if (provider.send) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider)); + } + else { + logger$E.throwArgumentError("unsupported provider", "provider", provider); + } + if (!path) { + path = "unknown:"; + } + } + super(path, network); + defineReadOnly(this, "jsonRpcFetchFunc", jsonRpcFetchFunc); + defineReadOnly(this, "provider", subprovider); + } + send(method, params) { + return this.jsonRpcFetchFunc(method, params); + } +} + +"use strict"; +const logger$F = new Logger(version$m); +//////////////////////// +// Helper Functions +function getDefaultProvider(network, options) { + if (network == null) { + network = "homestead"; + } + // If passed a URL, figure out the right type of provider based on the scheme + if (typeof (network) === "string") { + // @TODO: Add support for IpcProvider; maybe if it ends in ".ipc"? + // Handle http and ws (and their secure variants) + const match = network.match(/^(ws|http)s?:/i); + if (match) { + switch (match[1]) { + case "http": + return new JsonRpcProvider(network); + case "ws": + return new WebSocketProvider(network); + default: + logger$F.throwArgumentError("unsupported URL scheme", "network", network); + } + } + } + const n = getNetwork(network); + if (!n || !n._defaultProvider) { + logger$F.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, { + operation: "getDefaultProvider", + network: network + }); + } + return n._defaultProvider({ + FallbackProvider, + AlchemyProvider, + CloudflareProvider, + EtherscanProvider, + InfuraProvider, + JsonRpcProvider, + NodesmithProvider, + PocketProvider, + Web3Provider, + IpcProvider, + }, options); +} + +var index$3 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Provider: Provider, + BaseProvider: BaseProvider, + Resolver: Resolver, + UrlJsonRpcProvider: UrlJsonRpcProvider, + FallbackProvider: FallbackProvider, + AlchemyProvider: AlchemyProvider, + AlchemyWebSocketProvider: AlchemyWebSocketProvider, + CloudflareProvider: CloudflareProvider, + EtherscanProvider: EtherscanProvider, + InfuraProvider: InfuraProvider, + InfuraWebSocketProvider: InfuraWebSocketProvider, + JsonRpcProvider: JsonRpcProvider, + JsonRpcBatchProvider: JsonRpcBatchProvider, + NodesmithProvider: NodesmithProvider, + PocketProvider: PocketProvider, + StaticJsonRpcProvider: StaticJsonRpcProvider, + Web3Provider: Web3Provider, + WebSocketProvider: WebSocketProvider, + IpcProvider: IpcProvider, + JsonRpcSigner: JsonRpcSigner, + getDefaultProvider: getDefaultProvider, + getNetwork: getNetwork, + isCommunityResource: isCommunityResource, + isCommunityResourcable: isCommunityResourcable, + showThrottleMessage: showThrottleMessage, + Formatter: Formatter +}); + +const version$n = "solidity/5.5.0"; + +"use strict"; +const regexBytes = new RegExp("^bytes([0-9]+)$"); +const regexNumber = new RegExp("^(u?int)([0-9]*)$"); +const regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$"); +const Zeros$1 = "0000000000000000000000000000000000000000000000000000000000000000"; +const logger$G = new Logger(version$n); +function _pack(type, value, isArray) { + switch (type) { + case "address": + if (isArray) { + return zeroPad(value, 32); + } + return arrayify(value); + case "string": + return toUtf8Bytes(value); + case "bytes": + return arrayify(value); + case "bool": + value = (value ? "0x01" : "0x00"); + if (isArray) { + return zeroPad(value, 32); + } + return arrayify(value); + } + let match = type.match(regexNumber); + if (match) { + //let signed = (match[1] === "int") + let size = parseInt(match[2] || "256"); + if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) { + logger$G.throwArgumentError("invalid number type", "type", type); + } + if (isArray) { + size = 256; + } + value = BigNumber.from(value).toTwos(size); + return zeroPad(value, size / 8); + } + match = type.match(regexBytes); + if (match) { + const size = parseInt(match[1]); + if (String(size) !== match[1] || size === 0 || size > 32) { + logger$G.throwArgumentError("invalid bytes type", "type", type); + } + if (arrayify(value).byteLength !== size) { + logger$G.throwArgumentError(`invalid value for ${type}`, "value", value); + } + if (isArray) { + return arrayify((value + Zeros$1).substring(0, 66)); + } + return value; + } + match = type.match(regexArray); + if (match && Array.isArray(value)) { + const baseType = match[1]; + const count = parseInt(match[2] || String(value.length)); + if (count != value.length) { + logger$G.throwArgumentError(`invalid array length for ${type}`, "value", value); + } + const result = []; + value.forEach(function (value) { + result.push(_pack(baseType, value, true)); + }); + return concat(result); + } + return logger$G.throwArgumentError("invalid type", "type", type); +} +// @TODO: Array Enum +function pack$1(types, values) { + if (types.length != values.length) { + logger$G.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values); + } + const tight = []; + types.forEach(function (type, index) { + tight.push(_pack(type, values[index])); + }); + return hexlify(concat(tight)); +} +function keccak256$1(types, values) { + return keccak256(pack$1(types, values)); +} +function sha256$2(types, values) { + return sha256$1(pack$1(types, values)); +} + +const version$o = "units/5.5.0"; + +"use strict"; +const logger$H = new Logger(version$o); +const names = [ + "wei", + "kwei", + "mwei", + "gwei", + "szabo", + "finney", + "ether", +]; +// Some environments have issues with RegEx that contain back-tracking, so we cannot +// use them. +function commify(value) { + const comps = String(value).split("."); + if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") { + logger$H.throwArgumentError("invalid value", "value", value); + } + // Make sure we have at least one whole digit (0 if none) + let whole = comps[0]; + let negative = ""; + if (whole.substring(0, 1) === "-") { + negative = "-"; + whole = whole.substring(1); + } + // Make sure we have at least 1 whole digit with no leading zeros + while (whole.substring(0, 1) === "0") { + whole = whole.substring(1); + } + if (whole === "") { + whole = "0"; + } + let suffix = ""; + if (comps.length === 2) { + suffix = "." + (comps[1] || "0"); + } + while (suffix.length > 2 && suffix[suffix.length - 1] === "0") { + suffix = suffix.substring(0, suffix.length - 1); + } + const formatted = []; + while (whole.length) { + if (whole.length <= 3) { + formatted.unshift(whole); + break; + } + else { + const index = whole.length - 3; + formatted.unshift(whole.substring(index)); + whole = whole.substring(0, index); + } + } + return negative + formatted.join(",") + suffix; +} +function formatUnits(value, unitName) { + if (typeof (unitName) === "string") { + const index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return formatFixed(value, (unitName != null) ? unitName : 18); +} +function parseUnits(value, unitName) { + if (typeof (value) !== "string") { + logger$H.throwArgumentError("value must be a string", "value", value); + } + if (typeof (unitName) === "string") { + const index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return parseFixed(value, (unitName != null) ? unitName : 18); +} +function formatEther(wei) { + return formatUnits(wei, 18); +} +function parseEther(ether) { + return parseUnits(ether, 18); +} + +"use strict"; + +var utils$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + AbiCoder: AbiCoder, + defaultAbiCoder: defaultAbiCoder, + Fragment: Fragment, + ConstructorFragment: ConstructorFragment, + ErrorFragment: ErrorFragment, + EventFragment: EventFragment, + FunctionFragment: FunctionFragment, + ParamType: ParamType, + FormatTypes: FormatTypes, + checkResultErrors: checkResultErrors, + Logger: Logger, + RLP: index, + _fetchData: _fetchData, + fetchJson: fetchJson, + poll: poll, + checkProperties: checkProperties, + deepCopy: deepCopy, + defineReadOnly: defineReadOnly, + getStatic: getStatic, + resolveProperties: resolveProperties, + shallowCopy: shallowCopy, + arrayify: arrayify, + concat: concat, + stripZeros: stripZeros, + zeroPad: zeroPad, + isBytes: isBytes, + isBytesLike: isBytesLike, + defaultPath: defaultPath, + HDNode: HDNode, + SigningKey: SigningKey, + Interface: Interface, + LogDescription: LogDescription, + TransactionDescription: TransactionDescription, + base58: Base58, + base64: index$2, + hexlify: hexlify, + isHexString: isHexString, + hexConcat: hexConcat, + hexStripZeros: hexStripZeros, + hexValue: hexValue, + hexZeroPad: hexZeroPad, + hexDataLength: hexDataLength, + hexDataSlice: hexDataSlice, + nameprep: nameprep, + _toEscapedUtf8String: _toEscapedUtf8String, + toUtf8Bytes: toUtf8Bytes, + toUtf8CodePoints: toUtf8CodePoints, + toUtf8String: toUtf8String, + Utf8ErrorFuncs: Utf8ErrorFuncs, + formatBytes32String: formatBytes32String, + parseBytes32String: parseBytes32String, + hashMessage: hashMessage, + namehash: namehash, + isValidName: isValidName, + id: id, + _TypedDataEncoder: TypedDataEncoder, + getAddress: getAddress, + getIcapAddress: getIcapAddress, + getContractAddress: getContractAddress, + getCreate2Address: getCreate2Address, + isAddress: isAddress, + formatEther: formatEther, + parseEther: parseEther, + formatUnits: formatUnits, + parseUnits: parseUnits, + commify: commify, + computeHmac: computeHmac, + keccak256: keccak256, + ripemd160: ripemd160$1, + sha256: sha256$1, + sha512: sha512$1, + randomBytes: randomBytes, + shuffled: shuffled, + solidityPack: pack$1, + solidityKeccak256: keccak256$1, + soliditySha256: sha256$2, + splitSignature: splitSignature, + joinSignature: joinSignature, + accessListify: accessListify, + parseTransaction: parse, + serializeTransaction: serialize, + get TransactionTypes () { return TransactionTypes; }, + getJsonWalletAddress: getJsonWalletAddress, + computeAddress: computeAddress, + recoverAddress: recoverAddress, + computePublicKey: computePublicKey, + recoverPublicKey: recoverPublicKey, + verifyMessage: verifyMessage, + verifyTypedData: verifyTypedData, + getAccountPath: getAccountPath, + mnemonicToEntropy: mnemonicToEntropy, + entropyToMnemonic: entropyToMnemonic, + isValidMnemonic: isValidMnemonic, + mnemonicToSeed: mnemonicToSeed, + get SupportedAlgorithm () { return SupportedAlgorithm; }, + get UnicodeNormalizationForm () { return UnicodeNormalizationForm; }, + get Utf8ErrorReason () { return Utf8ErrorReason; }, + Indexed: Indexed +}); + +const version$p = "ethers/5.5.2"; + +"use strict"; +const logger$I = new Logger(version$p); + +var ethers = /*#__PURE__*/Object.freeze({ + __proto__: null, + Signer: Signer, + Wallet: Wallet, + VoidSigner: VoidSigner, + getDefaultProvider: getDefaultProvider, + providers: index$3, + BaseContract: BaseContract, + Contract: Contract, + ContractFactory: ContractFactory, + BigNumber: BigNumber, + FixedNumber: FixedNumber, + constants: index$1, + get errors () { return ErrorCode; }, + logger: logger$I, + utils: utils$1, + wordlists: wordlists, + version: version$p, + Wordlist: Wordlist +}); + +"use strict"; +try { + const anyGlobal = window; + if (anyGlobal._ethers == null) { + anyGlobal._ethers = ethers; + } +} +catch (error) { } + +export { BaseContract, BigNumber, Contract, ContractFactory, FixedNumber, Signer, VoidSigner, Wallet, Wordlist, index$1 as constants, ErrorCode as errors, ethers, getDefaultProvider, logger$I as logger, index$3 as providers, utils$1 as utils, version$p as version, wordlists }; +//# sourceMappingURL=ethers.esm.js.map diff --git a/node_modules/ethers/dist/ethers.esm.js.map b/node_modules/ethers/dist/ethers.esm.js.map new file mode 100644 index 0000000..5b1c873 --- /dev/null +++ b/node_modules/ethers/dist/ethers.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ethers.esm.js","sources":["../../../node_modules/bn.js/lib/bn.js","../../logger/src.ts/_version.ts","../../logger/src.ts/index.ts","../../bytes/src.ts/_version.ts","../../bytes/src.ts/index.ts","../../bignumber/src.ts/_version.ts","../../bignumber/src.ts/bignumber.ts","../../bignumber/src.ts/fixednumber.ts","../../properties/src.ts/_version.ts","../../properties/src.ts/index.ts","../../abi/src.ts/_version.ts","../../abi/src.ts/fragments.ts","../../abi/src.ts/coders/abstract-coder.ts","../../../node_modules/js-sha3/src/sha3.js","../../keccak256/src.ts/index.ts","../../rlp/src.ts/_version.ts","../../rlp/src.ts/index.ts","../../address/src.ts/_version.ts","../../address/src.ts/index.ts","../../abi/src.ts/coders/address.ts","../../abi/src.ts/coders/anonymous.ts","../../abi/src.ts/coders/array.ts","../../abi/src.ts/coders/boolean.ts","../../abi/src.ts/coders/bytes.ts","../../abi/src.ts/coders/fixed-bytes.ts","../../abi/src.ts/coders/null.ts","../../constants/src.ts/addresses.ts","../../constants/src.ts/bignumbers.ts","../../constants/src.ts/hashes.ts","../../constants/src.ts/strings.ts","../../constants/src.ts/index.ts","../../abi/src.ts/coders/number.ts","../../strings/src.ts/_version.ts","../../strings/src.ts/utf8.ts","../../strings/src.ts/bytes32.ts","../../strings/src.ts/idna.ts","../../strings/src.ts/index.ts","../../abi/src.ts/coders/string.ts","../../abi/src.ts/coders/tuple.ts","../../abi/src.ts/abi-coder.ts","../../hash/src.ts/id.ts","../../hash/src.ts/_version.ts","../../hash/src.ts/namehash.ts","../../hash/src.ts/message.ts","../../hash/src.ts/typed-data.ts","../../hash/src.ts/index.ts","../../abi/src.ts/interface.ts","../../abi/src.ts/index.ts","../../abstract-provider/src.ts/_version.ts","../../abstract-provider/src.ts/index.ts","../../abstract-signer/src.ts/_version.ts","../../abstract-signer/src.ts/index.ts","../../../node_modules/minimalistic-assert/index.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/inherits.js","../../../node_modules/hash.js/lib/hash/utils.js","../../../node_modules/hash.js/lib/hash/common.js","../../../node_modules/hash.js/lib/hash/sha/common.js","../../../node_modules/hash.js/lib/hash/sha/1.js","../../../node_modules/hash.js/lib/hash/sha/256.js","../../../node_modules/hash.js/lib/hash/sha/224.js","../../../node_modules/hash.js/lib/hash/sha/512.js","../../../node_modules/hash.js/lib/hash/sha/384.js","../../../node_modules/hash.js/lib/hash/sha.js","../../../node_modules/hash.js/lib/hash/ripemd.js","../../../node_modules/hash.js/lib/hash/hmac.js","../../../node_modules/hash.js/lib/hash.js","../../../node_modules/minimalistic-crypto-utils/lib/utils.js","../../../node_modules/elliptic/lib/elliptic/utils.js","../../../node_modules/elliptic/lib/elliptic/curve/base.js","../../../node_modules/elliptic/lib/elliptic/curve/short.js","../../../node_modules/elliptic/lib/elliptic/curve/index.js","../../../node_modules/elliptic/lib/elliptic/curves.js","../../../node_modules/hmac-drbg/lib/hmac-drbg.js","../../../node_modules/elliptic/lib/elliptic/ec/key.js","../../../node_modules/elliptic/lib/elliptic/ec/signature.js","../../../node_modules/elliptic/lib/elliptic/ec/index.js","../../../node_modules/elliptic/lib/elliptic.js","../../signing-key/lib.esm/elliptic.js","../../signing-key/src.ts/_version.ts","../../signing-key/src.ts/index.ts","../../transactions/src.ts/_version.ts","../../transactions/src.ts/index.ts","../../contracts/src.ts/_version.ts","../../contracts/src.ts/index.ts","../../basex/src.ts/index.ts","../../sha2/src.ts/types.ts","../../sha2/src.ts/_version.ts","../../sha2/src.ts/browser-sha2.ts","../../pbkdf2/src.ts/browser-pbkdf2.ts","../../wordlists/src.ts/_version.ts","../../wordlists/src.ts/wordlist.ts","../../wordlists/src.ts/lang-en.ts","../../wordlists/src.ts/browser-wordlists.ts","../../wordlists/src.ts/index.ts","../../hdnode/src.ts/_version.ts","../../hdnode/src.ts/index.ts","../../random/src.ts/_version.ts","../../random/src.ts/browser-random.ts","../../random/src.ts/shuffle.ts","../../random/src.ts/index.ts","../../../node_modules/aes-js/index.js","../../json-wallets/src.ts/_version.ts","../../json-wallets/src.ts/utils.ts","../../json-wallets/src.ts/crowdsale.ts","../../json-wallets/src.ts/inspect.ts","../../../node_modules/scrypt-js/scrypt.js","../../json-wallets/src.ts/keystore.ts","../../json-wallets/src.ts/index.ts","../../wallet/src.ts/_version.ts","../../wallet/src.ts/index.ts","../../networks/src.ts/_version.ts","../../networks/src.ts/index.ts","../../base64/src.ts/browser-base64.ts","../../base64/src.ts/index.ts","../../web/src.ts/_version.ts","../../web/src.ts/browser-geturl.ts","../../web/src.ts/index.ts","../../../node_modules/bech32/index.js","../../providers/src.ts/_version.ts","../../providers/src.ts/formatter.ts","../../providers/src.ts/base-provider.ts","../../providers/src.ts/json-rpc-provider.ts","../../providers/src.ts/browser-ws.ts","../../providers/src.ts/websocket-provider.ts","../../providers/src.ts/url-json-rpc-provider.ts","../../providers/src.ts/alchemy-provider.ts","../../providers/src.ts/cloudflare-provider.ts","../../providers/src.ts/etherscan-provider.ts","../../providers/src.ts/fallback-provider.ts","../../providers/src.ts/browser-ipc-provider.ts","../../providers/src.ts/infura-provider.ts","../../providers/src.ts/json-rpc-batch-provider.ts","../../providers/src.ts/nodesmith-provider.ts","../../providers/src.ts/pocket-provider.ts","../../providers/src.ts/web3-provider.ts","../../providers/src.ts/index.ts","../../solidity/src.ts/_version.ts","../../solidity/src.ts/index.ts","../../units/src.ts/_version.ts","../../units/src.ts/index.ts","../src.ts/utils.ts","../src.ts/_version.ts","../src.ts/ethers.ts","../src.ts/index.ts"],"sourcesContent":["(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","export const version = \"logger/5.5.0\";\n","\"use strict\";\n\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\n\nconst LogLevels: { [ name: string ]: number } = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\n\nimport { version } from \"./_version\";\n\nlet _globalLogger: Logger = null;\n\nfunction _checkNormalize(): string {\n try {\n const missing: Array = [ ];\n\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n };\n } catch(error) {\n missing.push(form);\n }\n });\n\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\")\n }\n } catch (error) {\n return error.message;\n }\n\n return null;\n}\n\nconst _normalizeError = _checkNormalize();\n\nexport enum LogLevel {\n DEBUG = \"DEBUG\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n OFF = \"OFF\"\n}\n\n\nexport enum ErrorCode {\n\n ///////////////////\n // Generic Errors\n\n // Unknown Error\n UNKNOWN_ERROR = \"UNKNOWN_ERROR\",\n\n // Not Implemented\n NOT_IMPLEMENTED = \"NOT_IMPLEMENTED\",\n\n // Unsupported Operation\n // - operation\n UNSUPPORTED_OPERATION = \"UNSUPPORTED_OPERATION\",\n\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n NETWORK_ERROR = \"NETWORK_ERROR\",\n\n // Some sort of bad response from the server\n SERVER_ERROR = \"SERVER_ERROR\",\n\n // Timeout\n TIMEOUT = \"TIMEOUT\",\n\n ///////////////////\n // Operational Errors\n\n // Buffer Overrun\n BUFFER_OVERRUN = \"BUFFER_OVERRUN\",\n\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n NUMERIC_FAULT = \"NUMERIC_FAULT\",\n\n\n ///////////////////\n // Argument Errors\n\n // Missing new operator to an object\n // - name: The name of the class\n MISSING_NEW = \"MISSING_NEW\",\n\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n INVALID_ARGUMENT = \"INVALID_ARGUMENT\",\n\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n MISSING_ARGUMENT = \"MISSING_ARGUMENT\",\n\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n UNEXPECTED_ARGUMENT = \"UNEXPECTED_ARGUMENT\",\n\n\n ///////////////////\n // Blockchain Errors\n\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n CALL_EXCEPTION = \"CALL_EXCEPTION\",\n\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n INSUFFICIENT_FUNDS = \"INSUFFICIENT_FUNDS\",\n\n // Nonce has already been used\n // - transaction: the transaction attempted\n NONCE_EXPIRED = \"NONCE_EXPIRED\",\n\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n REPLACEMENT_UNDERPRICED = \"REPLACEMENT_UNDERPRICED\",\n\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n UNPREDICTABLE_GAS_LIMIT = \"UNPREDICTABLE_GAS_LIMIT\",\n\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n TRANSACTION_REPLACED = \"TRANSACTION_REPLACED\",\n};\n\nconst HEX = \"0123456789abcdef\";\n\nexport class Logger {\n readonly version: string;\n\n static errors = ErrorCode;\n\n static levels = LogLevel;\n\n constructor(version: string) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n\n _log(logLevel: LogLevel, args: Array): void {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) { return; }\n console.log.apply(console, args);\n }\n\n debug(...args: Array): void {\n this._log(Logger.levels.DEBUG, args);\n }\n\n info(...args: Array): void {\n this._log(Logger.levels.INFO, args);\n }\n\n warn(...args: Array): void {\n this._log(Logger.levels.WARNING, args);\n }\n\n makeError(message: string, code?: ErrorCode, params?: any): Error {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, { });\n }\n\n if (!code) { code = Logger.errors.UNKNOWN_ERROR; }\n if (!params) { params = {}; }\n\n const messageDetails: Array = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${ code }`);\n messageDetails.push(`version=${ this.version }`);\n\n const reason = message;\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n\n // @TODO: Any??\n const error: any = new Error(message);\n error.reason = reason;\n error.code = code\n\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n\n return error;\n }\n\n throwError(message: string, code?: ErrorCode, params?: any): never {\n throw this.makeError(message, code, params);\n }\n\n throwArgumentError(message: string, name: string, value: any): never {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n\n assert(condition: any, message: string, code?: ErrorCode, params?: any): void {\n if (!!condition) { return; }\n this.throwError(message, code, params);\n }\n\n assertArgument(condition: any, message: string, name: string, value: any): void {\n if (!!condition) { return; }\n this.throwArgumentError(message, name, value);\n }\n\n checkNormalize(message?: string): void {\n if (message == null) { message = \"platform missing String.prototype.normalize\"; }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n\n checkSafeUint53(value: number, message?: string): void {\n if (typeof(value) !== \"number\") { return; }\n\n if (message == null) { message = \"value not safe\"; }\n\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n\n checkArgumentCount(count: number, expectedCount: number, message?: string): void {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n\n checkNew(target: any, kind: any): void {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n checkAbstract(target: any, kind: any): void {\n if (target === kind) {\n this.throwError(\n \"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { name: target.name, operation: \"new\" }\n );\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n static globalLogger(): Logger {\n if (!_globalLogger) { _globalLogger = new Logger(version); }\n return _globalLogger;\n }\n\n static setCensorship(censorship: boolean, permanent?: boolean): void {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n if (_permanentCensorErrors) {\n if (!censorship) { return; }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n\n static setLogLevel(logLevel: LogLevel): void {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n\n static from(version: string): Logger {\n return new Logger(version);\n }\n}\n","export const version = \"bytes/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type Bytes = ArrayLike;\n\nexport type BytesLike = Bytes | string;\n\nexport type DataOptions = {\n allowMissingPrefix?: boolean;\n hexPad?: \"left\" | \"right\" | null;\n};\n\nexport interface Hexable {\n toHexString(): string;\n}\n\n\n/*\nexport interface HexString {\n length: number;\n substring: (start: number, end?: number) => string;\n\n [index: number]: string;\n}\n*/\n\nexport type SignatureLike = {\n r: string;\n s?: string;\n _vs?: string,\n recoveryParam?: number;\n v?: number;\n} | BytesLike;\n\nexport interface Signature {\n r: string;\n\n s: string;\n _vs: string,\n\n recoveryParam: number;\n v: number;\n}\n\n///////////////////////////////\n\n\nfunction isHexable(value: any): value is Hexable {\n return !!(value.toHexString);\n}\n\nfunction addSlice(array: Uint8Array): Uint8Array {\n if (array.slice) { return array; }\n\n array.slice = function() {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n }\n\n return array;\n}\n\nexport function isBytesLike(value: any): value is BytesLike {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\n\nfunction isInteger(value: number) {\n return (typeof(value) === \"number\" && value == value && (value % 1) === 0);\n}\n\nexport function isBytes(value: any): value is Bytes {\n if (value == null) { return false; }\n\n if (value.constructor === Uint8Array) { return true; }\n if (typeof(value) === \"string\") { return false; }\n if (!isInteger(value.length) || value.length < 0) { return false; }\n\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) { return false; }\n }\n return true;\n}\n\n\nexport function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) { result.push(0); }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { value = value.toHexString(); }\n\n if (isHexString(value)) {\n let hex = (value).substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0x0\" + hex.substring(2);\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n\n const result = [];\n for (let i = 0; i < hex.length; i += 2) {\n result.push(parseInt(hex.substring(i, i + 2), 16));\n }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (isBytes(value)) {\n return addSlice(new Uint8Array(value));\n }\n\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n}\n\nexport function concat(items: ReadonlyArray): Uint8Array {\n const objects = items.map(item => arrayify(item));\n const length = objects.reduce((accum, item) => (accum + item.length), 0);\n\n const result = new Uint8Array(length);\n\n objects.reduce((offset, object) => {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n\n return addSlice(result);\n}\n\nexport function stripZeros(value: BytesLike): Uint8Array {\n let result: Uint8Array = arrayify(value);\n\n if (result.length === 0) { return result; }\n\n // Find the first non-zero entry\n let start = 0;\n while (start < result.length && result[start] === 0) { start++ }\n\n // If we started with zeros, strip them\n if (start) {\n result = result.slice(start);\n }\n\n return result;\n}\n\nexport function zeroPad(value: BytesLike, length: number): Uint8Array {\n value = arrayify(value);\n\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n\n const result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n}\n\n\nexport function isHexString(value: any, length?: number): boolean {\n if (typeof(value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false\n }\n if (length && value.length !== 2 + 2 * length) { return false; }\n return true;\n}\n\nconst HexCharacters: string = \"0123456789abcdef\";\n\nexport function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n\n let hex = \"\";\n while (value) {\n hex = HexCharacters[value & 0xf] + hex;\n value = Math.floor(value / 16);\n }\n\n if (hex.length) {\n if (hex.length % 2) { hex = \"0\" + hex; }\n return \"0x\" + hex;\n }\n\n return \"0x00\";\n }\n\n if (typeof(value) === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) { return (\"0x0\" + value); }\n return \"0x\" + value;\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { return value.toHexString(); }\n\n if (isHexString(value)) {\n if ((value).length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + (value).substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return (value).toLowerCase();\n }\n\n if (isBytes(value)) {\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n let v = value[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n }\n\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n}\n\n/*\nfunction unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {\n if (typeof(value) === \"string\" && value.length % 2 && value.substring(0, 2) === \"0x\") {\n return \"0x0\" + value.substring(2);\n }\n return value;\n}\n*/\nexport function hexDataLength(data: BytesLike) {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n return null;\n }\n\n return (data.length - 2) / 2;\n}\n\nexport function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data );\n }\n\n offset = 2 + 2 * offset;\n\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n\n return \"0x\" + data.substring(offset);\n}\n\nexport function hexConcat(items: ReadonlyArray): string {\n let result = \"0x\";\n items.forEach((item) => {\n result += hexlify(item).substring(2);\n });\n return result;\n}\n\nexport function hexValue(value: BytesLike | Hexable | number | bigint): string {\n const trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") { return \"0x0\"; }\n return trimmed;\n}\n\nexport function hexStripZeros(value: BytesLike): string {\n if (typeof(value) !== \"string\") { value = hexlify(value); }\n\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n let offset = 0;\n while (offset < value.length && value[offset] === \"0\") { offset++; }\n return \"0x\" + value.substring(offset);\n}\n\nexport function hexZeroPad(value: BytesLike, length: number): string {\n if (typeof(value) !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n\n return value;\n}\n\nexport function splitSignature(signature: SignatureLike): Signature {\n const result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0\n };\n\n if (isBytesLike(signature)) {\n const bytes: Uint8Array = arrayify(signature);\n if (bytes.length !== 65) {\n logger.throwArgumentError(\"invalid signature string; must be 65 bytes\", \"signature\", signature);\n }\n\n // Get the r, s and v\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n\n // Allow a recid to be used as the v\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n\n // Compute recoveryParam from v\n result.recoveryParam = 1 - (result.v % 2);\n\n // Compute _vs from recoveryParam and s\n if (result.recoveryParam) { bytes[32] |= 0x80; }\n result._vs = hexlify(bytes.slice(32, 64))\n\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n\n // If the _vs is available, use it to populate missing s, v and recoveryParam\n // and verify non-missing s, v and recoveryParam\n if (result._vs != null) {\n const vs = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs);\n\n // Set or check the recid\n const recoveryParam = ((vs[0] >= 128) ? 1: 0);\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n\n // Set or check the s\n vs[0] &= 0x7f;\n const s = hexlify(vs);\n if (result.s == null) {\n result.s = s;\n } else if (result.s !== s) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n\n // Use recid and v to populate each other\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - (result.v % 2);\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n const recId = (result.v === 0 || result.v === 1) ? result.v :(1 - (result.v % 2));\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n\n const vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) { vs[0] |= 0x80; }\n const _vs = hexlify(vs);\n\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n\n // Set or check the _vs\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n\n return result;\n}\n\nexport function joinSignature(signature: SignatureLike): string {\n signature = splitSignature(signature);\n\n return hexlify(concat([\n signature.r,\n signature.s,\n (signature.recoveryParam ? \"0x1c\": \"0x1b\")\n ]));\n}\n\n","export const version = \"bignumber/5.5.0\";\n","\"use strict\";\n\n/**\n * BigNumber\n *\n * A wrapper around the BN.js object. We use the BN.js library\n * because it is used by elliptic, so it is required regardless.\n *\n */\n\nimport _BN from \"bn.js\";\nimport BN = _BN.BN;\n\nimport { Bytes, Hexable, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst _constructorGuard = { };\n\nconst MAX_SAFE = 0x1fffffffffffff;\n\n\nexport type BigNumberish = BigNumber | Bytes | bigint | string | number;\n\nexport function isBigNumberish(value: any): value is BigNumberish {\n return (value != null) && (\n BigNumber.isBigNumber(value) ||\n (typeof(value) === \"number\" && (value % 1) === 0) ||\n (typeof(value) === \"string\" && !!value.match(/^-?[0-9]+$/)) ||\n isHexString(value) ||\n (typeof(value) === \"bigint\") ||\n isBytes(value)\n );\n}\n\n// Only warn about passing 10 into radix once\nlet _warnedToStringRadix = false;\n\nexport class BigNumber implements Hexable {\n readonly _hex: string;\n readonly _isBigNumber: boolean;\n\n constructor(constructorGuard: any, hex: string) {\n logger.checkNew(new.target, BigNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n\n this._hex = hex;\n this._isBigNumber = true;\n\n Object.freeze(this);\n }\n\n fromTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).fromTwos(value));\n }\n\n toTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).toTwos(value));\n }\n\n abs(): BigNumber {\n if (this._hex[0] === \"-\") {\n return BigNumber.from(this._hex.substring(1));\n }\n return this;\n }\n\n add(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).add(toBN(other)));\n }\n\n sub(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).sub(toBN(other)));\n }\n\n div(other: BigNumberish): BigNumber {\n const o = BigNumber.from(other);\n if (o.isZero()) {\n throwFault(\"division by zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n }\n\n mul(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).mul(toBN(other)));\n }\n\n mod(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot modulo negative values\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n }\n\n pow(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot raise to negative values\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n }\n\n and(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'and' negative values\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n }\n\n or(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'or' negative values\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n }\n\n xor(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'xor' negative values\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n }\n\n mask(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot mask negative values\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n }\n\n shl(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n }\n\n shr(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n }\n\n eq(other: BigNumberish): boolean {\n return toBN(this).eq(toBN(other));\n }\n\n lt(other: BigNumberish): boolean {\n return toBN(this).lt(toBN(other));\n }\n\n lte(other: BigNumberish): boolean {\n return toBN(this).lte(toBN(other));\n }\n\n gt(other: BigNumberish): boolean {\n return toBN(this).gt(toBN(other));\n }\n\n gte(other: BigNumberish): boolean {\n return toBN(this).gte(toBN(other));\n }\n\n isNegative(): boolean {\n return (this._hex[0] === \"-\");\n }\n\n isZero(): boolean {\n return toBN(this).isZero();\n }\n\n toNumber(): number {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n }\n\n toBigInt(): bigint {\n try {\n return BigInt(this.toString());\n } catch (e) { }\n\n return logger.throwError(\"this platform does not support BigInt\", Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n }\n\n toString(): string {\n // Lots of people expect this, which we do not support, so check (See: #889)\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n }\n }\n return toBN(this).toString(10);\n }\n\n toHexString(): string {\n return this._hex;\n }\n\n toJSON(key?: string): any {\n return { type: \"BigNumber\", hex: this.toHexString() };\n }\n\n static from(value: any): BigNumber {\n if (value instanceof BigNumber) { return value; }\n\n if (typeof(value) === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber(_constructorGuard, toHex(value));\n }\n\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber(_constructorGuard, toHex(new BN(value)));\n }\n\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n\n if (typeof(value) === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n\n return BigNumber.from(String(value));\n }\n\n const anyValue = value;\n\n if (typeof(anyValue) === \"bigint\") {\n return BigNumber.from(anyValue.toString());\n }\n\n if (isBytes(anyValue)) {\n return BigNumber.from(hexlify(anyValue));\n }\n\n if (anyValue) {\n\n // Hexable interface (takes priority)\n if (anyValue.toHexString) {\n const hex = anyValue.toHexString();\n if (typeof(hex) === \"string\") {\n return BigNumber.from(hex);\n }\n\n } else {\n // For now, handle legacy JSON-ified values (goes away in v6)\n let hex = anyValue._hex;\n\n // New-form JSON\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n\n if (typeof(hex) === \"string\") {\n if (isHexString(hex) || (hex[0] === \"-\" && isHexString(hex.substring(1)))) {\n return BigNumber.from(hex);\n }\n }\n }\n }\n\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n }\n\n static isBigNumber(value: any): value is BigNumber {\n return !!(value && value._isBigNumber);\n }\n}\n\n// Normalize the hex string\nfunction toHex(value: string | BN): string {\n\n // For BN, call on the hex string\n if (typeof(value) !== \"string\") {\n return toHex(value.toString(16));\n }\n\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n\n // Cannot have multiple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") { logger.throwArgumentError(\"invalid hex\", \"value\", value); }\n\n // Call toHex on the positive component\n value = toHex(value);\n\n // Do not allow \"-0x00\"\n if (value === \"0x00\") { return value; }\n\n // Negate the value\n return \"-\" + value;\n }\n\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n\n // Normalize zero\n if (value === \"0x\") { return \"0x00\"; }\n\n // Make the string even length\n if (value.length % 2) { value = \"0x0\" + value.substring(2); }\n\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n\n return value;\n}\n\nfunction toBigNumber(value: BN): BigNumber {\n return BigNumber.from(toHex(value));\n}\n\nfunction toBN(value: BigNumberish): BN {\n const hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return (new BN(\"-\" + hex.substring(3), 16));\n }\n return new BN(hex.substring(2), 16);\n}\n\nfunction throwFault(fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value != null) { params.value = value; }\n\n return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// value should have no prefix\nexport function _base36To16(value: string): string {\n return (new BN(value, 36)).toString(16);\n}\n\n// value should have no prefix\nexport function _base16To36(value: string): string {\n return (new BN(value, 16)).toString(36);\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexZeroPad, isBytes } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BigNumber, BigNumberish, isBigNumberish } from \"./bignumber\";\n\nconst _constructorGuard = { };\n\nconst Zero = BigNumber.from(0);\nconst NegativeOne = BigNumber.from(-1);\n\nfunction throwFault(message: string, fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value !== undefined) { params.value = value; }\n return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// Constant to pull zeros from for multipliers\nlet zeros = \"0\";\nwhile (zeros.length < 256) { zeros += zeros; }\n\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getMultiplier(decimals: BigNumberish): string {\n\n if (typeof(decimals) !== \"number\") {\n try {\n decimals = BigNumber.from(decimals).toNumber();\n } catch (e) { }\n }\n\n if (typeof(decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}\n\nexport function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string {\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n // Make sure wei is a big number (convert as necessary)\n value = BigNumber.from(value);\n\n const negative = value.lt(Zero);\n if (negative) { value = value.mul(NegativeOne); }\n\n let fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) { fraction = \"0\" + fraction; }\n\n // Strip training 0\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n\n const whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n\n if (negative) { value = \"-\" + value; }\n\n return value;\n}\n\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n if (typeof(value) !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n\n // Is it negative?\n const negative = (value.substring(0, 1) === \"-\");\n if (negative) { value = value.substring(1); }\n\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n\n // Split it into a whole and fractional part\n const comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n\n let whole = comps[0], fraction = comps[1];\n if (!whole) { whole = \"0\"; }\n if (!fraction) { fraction = \"0\"; }\n\n // Trim trailing zeros\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n\n // Check the fraction doesn't exceed our decimals size\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n\n // If decimals is 0, we have an empty string for fraction\n if (fraction === \"\") { fraction = \"0\"; }\n\n // Fully pad the string with zeros to get to wei\n while (fraction.length < multiplier.length - 1) { fraction += \"0\"; }\n\n const wholeValue = BigNumber.from(whole);\n const fractionValue = BigNumber.from(fraction);\n\n let wei = (wholeValue.mul(multiplier)).add(fractionValue);\n\n if (negative) { wei = wei.mul(NegativeOne); }\n\n return wei;\n}\n\n\nexport class FixedFormat {\n readonly signed: boolean;\n readonly width: number;\n readonly decimals: number;\n readonly name: string;\n readonly _multiplier: string;\n\n constructor(constructorGuard: any, signed: boolean, width: number, decimals: number) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n\n this.name = (signed ? \"\": \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n\n this._multiplier = getMultiplier(decimals);\n\n Object.freeze(this);\n }\n\n static from(value: any): FixedFormat {\n if (value instanceof FixedFormat) { return value; }\n\n if (typeof(value) === \"number\") {\n value = `fixed128x${value}`\n }\n\n let signed = true;\n let width = 128;\n let decimals = 18;\n\n if (typeof(value) === \"string\") {\n if (value === \"fixed\") {\n // defaults...\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) { logger.throwArgumentError(\"invalid fixed format\", \"format\", value); }\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const check = (key: string, type: string, defaultValue: any): any => {\n if (value[key] == null) { return defaultValue; }\n if (typeof(value[key]) !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type +\")\", \"format.\" + key, value[key]);\n }\n return value[key];\n }\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n\n return new FixedFormat(_constructorGuard, signed, width, decimals);\n }\n}\n\nexport class FixedNumber {\n readonly format: FixedFormat;\n readonly _hex: string;\n readonly _value: string;\n\n readonly _isFixedNumber: boolean;\n\n constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat) {\n logger.checkNew(new.target, FixedNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.format = format;\n this._hex = hex;\n this._value = value;\n\n this._isFixedNumber = true;\n\n Object.freeze(this);\n }\n\n _checkFormat(other: FixedNumber): void {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n }\n\n addUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format);\n }\n\n subUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format);\n }\n\n mulUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format);\n }\n\n divUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format);\n }\n\n floor(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n ceiling(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n // @TODO: Support other rounding algorithms\n round(decimals?: number): FixedNumber {\n if (decimals == null) { decimals = 0; }\n\n // If we are already in range, we're done\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n if (decimals < 0 || decimals > 80 || (decimals % 1)) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n\n if (comps[1].length <= decimals) { return this; }\n\n const factor = FixedNumber.from(\"1\" + zeros.substring(0, decimals), this.format);\n const bump = BUMP.toFormat(this.format);\n\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n }\n\n isZero(): boolean {\n return (this._value === \"0.0\" || this._value === \"0\");\n }\n\n isNegative(): boolean {\n return (this._value[0] === \"-\");\n }\n\n toString(): string { return this._value; }\n\n toHexString(width?: number): string {\n if (width == null) { return this._hex; }\n if (width % 8) { logger.throwArgumentError(\"invalid byte width\", \"width\", width); }\n const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return hexZeroPad(hex, width / 8);\n }\n\n toUnsafeFloat(): number { return parseFloat(this.toString()); }\n\n toFormat(format: FixedFormat | string): FixedNumber {\n return FixedNumber.fromString(this._value, format);\n }\n\n\n static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber {\n // If decimals looks more like a format, and there is no format, shift the parameters\n if (format == null && decimals != null && !isBigNumberish(decimals)) {\n format = decimals;\n decimals = null;\n }\n\n if (decimals == null) { decimals = 0; }\n if (format == null) { format = \"fixed\"; }\n\n return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n }\n\n\n static fromString(value: string, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n const numeric = parseFixed(value, fixedFormat.decimals);\n\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n\n let hex: string = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = hexZeroPad(hex, fixedFormat.width / 8);\n }\n\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n if (arrayify(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n\n let numeric = BigNumber.from(value);\n if (fixedFormat.signed) { numeric = numeric.fromTwos(fixedFormat.width); }\n\n const hex = numeric.toTwos((fixedFormat.signed ? 0: 1) + fixedFormat.width).toHexString();\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static from(value: any, format?: FixedFormat | string | number) {\n if (typeof(value) === \"string\") {\n return FixedNumber.fromString(value, format);\n }\n\n if (isBytes(value)) {\n return FixedNumber.fromBytes(value, format);\n }\n\n try {\n return FixedNumber.fromValue(value, 0, format);\n } catch (error) {\n // Allow NUMERIC_FAULT to bubble up\n if (error.code !== Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n }\n\n static isFixedNumber(value: any): value is FixedNumber {\n return !!(value && value._isFixedNumber);\n }\n}\n\nconst ONE = FixedNumber.from(1);\nconst BUMP = FixedNumber.from(\"0.5\");\n","export const version = \"properties/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function defineReadOnly(object: T, name: K, value: T[K]): void {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor: any, key: string): T {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) { return ctor[key]; }\n if (!ctor.prototype || typeof(ctor.prototype) !== \"object\") { break; }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\n\nexport type Deferrable = {\n [ K in keyof T ]: T[K] | Promise;\n}\n\n\ntype Result = { key: string, value: any};\n\nexport async function resolveProperties(object: Readonly>): Promise {\n const promises: Array> = Object.keys(object).map((key) => {\n const value = object[>key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, { });\n}\n\nexport function checkProperties(object: any, properties: { [ name: string ]: boolean }): void {\n if (!object || typeof(object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\n\nexport function shallowCopy(object: T): T {\n const result: any = {};\n for (const key in object) { result[key] = object[key]; }\n return result;\n}\n\nconst opaque: { [key: string]: boolean } = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n\nfunction _isFrozen(object: any): boolean {\n\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof(object)]) { return true; }\n\n if (Array.isArray(object) || typeof(object) === \"object\") {\n if (!Object.isFrozen(object)) { return false; }\n\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value: any = null;\n try {\n value = object[keys[i]];\n } catch (error) {\n // If accessing a value triggers an error, it is a getter\n // designed to do so (e.g. Result) and is therefore \"frozen\"\n continue;\n }\n\n if (!_isFrozen(value)) { return false; }\n }\n\n return true;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\n// Returns a new copy of object, such that no properties may be replaced.\n// New properties may be added only to objects.\nfunction _deepCopy(object: any): any {\n\n if (_isFrozen(object)) { return object; }\n\n // Arrays are mutable, so we need to create a copy\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n\n if (typeof(object) === \"object\") {\n const result: { [ key: string ]: any } = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) { continue; }\n defineReadOnly(result, key, deepCopy(value));\n }\n\n return result;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\nexport function deepCopy(object: T): T {\n return _deepCopy(object);\n}\n\nexport class Description {\n constructor(info: { [ K in keyof T ]: T[K] }) {\n for (const key in info) {\n (this)[key] = deepCopy(info[key]);\n }\n }\n}\n","export const version = \"abi/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport interface JsonFragmentType {\n readonly name?: string;\n readonly indexed?: boolean;\n readonly type?: string;\n readonly internalType?: any; // @TODO: in v6 reduce type\n readonly components?: ReadonlyArray;\n}\n\nexport interface JsonFragment {\n readonly name?: string;\n readonly type?: string;\n\n readonly anonymous?: boolean;\n\n readonly payable?: boolean;\n readonly constant?: boolean;\n readonly stateMutability?: string;\n\n readonly inputs?: ReadonlyArray;\n readonly outputs?: ReadonlyArray;\n\n readonly gas?: string;\n};\n\nconst _constructorGuard = { };\n\n// AST Node parser state\ntype ParseState = {\n allowArray?: boolean,\n allowName?: boolean,\n allowParams?: boolean,\n allowType?: boolean,\n readArray?: boolean,\n};\n\n// AST Node\ntype ParseNode = {\n parent?: any,\n type?: string,\n name?: string,\n state?: ParseState,\n indexed?: boolean,\n components?: Array\n};\n\nlet ModifiersBytes: { [ name: string ]: boolean } = { calldata: true, memory: true, storage: true };\nlet ModifiersNest: { [ name: string ]: boolean } = { calldata: true, memory: true };\nfunction checkModifier(type: string, name: string): boolean {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) { return true; }\n } else if (type === \"address\") {\n if (name === \"payable\") { return true; }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) { return true; }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n}\n\n// @TODO: Make sure that children of an indexed tuple are marked with a null indexed\nfunction parseParamType(param: string, allowIndexed: boolean): ParseNode {\n\n let originalParam = param;\n function throwError(i: number) {\n logger.throwArgumentError(`unexpected character at position ${ i }`, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n\n function newNode(parent: ParseNode): ParseNode {\n let node: ParseNode = { type: \"\", name: \"\", parent: parent, state: { allowType: true } };\n if (allowIndexed) { node.indexed = false; }\n return node\n }\n\n let parent: ParseNode = { type: \"\", name: \"\", state: { allowType: true } };\n let node = parent;\n\n for (let i = 0; i < param.length; i++) {\n let c = param[i];\n switch (c) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [ newNode(node) ];\n node = node.components[0];\n break;\n\n case \")\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let child = node;\n node = node.parent;\n if (!node) { throwError(i); }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n\n case \",\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let sibling: ParseNode = newNode(node.parent);\n //{ type: \"\", name: \"\", parent: node.parent, state: { allowType: true } };\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n\n // Hit a space...\n case \" \":\n\n // If reading type, the type is done and may read a param or name\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n\n // If reading name, the name is done\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n if (node.indexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n\n break;\n\n case \"[\":\n if (!node.state.allowArray) { throwError(i); }\n\n node.type += c;\n\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n\n case \"]\":\n if (!node.state.readArray) { throwError(i); }\n\n node.type += c;\n\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n\n default:\n if (node.state.allowType) {\n node.type += c;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c;\n } else {\n throwError(i);\n }\n }\n }\n\n if (node.parent) { logger.throwArgumentError(\"unexpected eof\", \"param\", param); }\n\n delete parent.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(originalParam.length - 7); }\n if (node.indexed) { throwError(originalParam.length - 7); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n\n parent.type = verifyType(parent.type);\n\n return parent;\n}\n\nfunction populate(object: any, params: any) {\n for (let key in params) { defineReadOnly(object, key, params[key]); }\n}\n\nexport const FormatTypes: { [ name: string ]: string } = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n\n // JSON-format a la Solidity\n json: \"json\"\n});\n\nconst paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n\nexport class ParamType {\n\n // The local name of the parameter (of null if unbound)\n readonly name: string;\n\n // The fully qualified type (e.g. \"address\", \"tuple(address)\", \"uint256[3][]\"\n readonly type: string;\n\n // The base type (e.g. \"address\", \"tuple\", \"array\")\n readonly baseType: string;\n\n // Indexable Paramters ONLY (otherwise null)\n readonly indexed: boolean;\n\n // Tuples ONLY: (otherwise null)\n // - sub-components\n readonly components: Array;\n\n // Arrays ONLY: (otherwise null)\n // - length of the array (-1 for dynamic length)\n // - child type\n readonly arrayLength: number;\n readonly arrayChildren: ParamType;\n\n readonly _isParamType: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) { logger.throwError(\"use fromString\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n }); }\n populate(this, params);\n\n let match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: ((this.components != null) ? \"tuple\": this.type)\n });\n }\n\n this._isParamType = true;\n\n Object.freeze(this);\n }\n\n // Format the parameter fragment\n // - sighash: \"(uint256,address)\"\n // - minimal: \"tuple(uint256,address) indexed\"\n // - full: \"tuple(uint256 foo, address bar) indexed baz\"\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n let result: any = {\n type: ((this.baseType === \"tuple\") ? \"tuple\": this.type),\n name: (this.name || undefined)\n };\n if (typeof(this.indexed) === \"boolean\") { result.indexed = this.indexed; }\n if (this.components) {\n result.components = this.components.map((comp) => JSON.parse(comp.format(format)));\n }\n return JSON.stringify(result);\n }\n\n let result = \"\";\n\n // Array\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\": String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(\n (comp) => comp.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n\n if (format !== FormatTypes.sighash) {\n if (this.indexed === true) { result += \" indexed\"; }\n if (format === FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n\n return result;\n }\n\n static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType {\n if (typeof(value) === \"string\") {\n return ParamType.fromString(value, allowIndexed);\n }\n return ParamType.fromObject(value);\n }\n\n static fromObject(value: JsonFragmentType | ParamType): ParamType {\n if (ParamType.isParamType(value)) { return value; }\n\n return new ParamType(_constructorGuard, {\n name: (value.name || null),\n type: verifyType(value.type),\n indexed: ((value.indexed == null) ? null: !!value.indexed),\n components: (value.components ? value.components.map(ParamType.fromObject): null)\n });\n }\n\n static fromString(value: string, allowIndexed?: boolean): ParamType {\n function ParamTypify(node: ParseNode): ParamType {\n return ParamType.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n\n return ParamTypify(parseParamType(value, !!allowIndexed));\n }\n\n static isParamType(value: any): value is ParamType {\n return !!(value != null && value._isParamType);\n }\n};\n\nfunction parseParams(value: string, allowIndex: boolean): Array {\n return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex));\n}\n\ntype TypeCheck = { -readonly [ K in keyof T ]: T[K] };\n\ninterface _Fragment {\n readonly type: string;\n readonly name: string;\n readonly inputs: ReadonlyArray;\n}\n\nexport abstract class Fragment {\n\n readonly type: string;\n readonly name: string;\n readonly inputs: Array;\n\n readonly _isFragment: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n\n this._isFragment = true;\n\n Object.freeze(this);\n }\n\n abstract format(format?: string): string;\n\n static from(value: Fragment | JsonFragment | string): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n if (typeof(value) === \"string\") {\n return Fragment.fromString(value);\n }\n\n return Fragment.fromObject(value);\n }\n\n static fromObject(value: Fragment | JsonFragment): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment?\n return null;\n }\n\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n }\n\n static fromString(value: string): Fragment {\n // Make sure the \"returns\" is surrounded by a space and all whitespace is exactly one space\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n }\n\n static isFragment(value: any): value is Fragment {\n return !!(value && value._isFragment);\n }\n}\n\ninterface _EventFragment extends _Fragment {\n readonly anonymous: boolean;\n}\n\nexport class EventFragment extends Fragment {\n readonly anonymous: boolean;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"event \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: EventFragment | JsonFragment | string): EventFragment {\n if (typeof(value) === \"string\") {\n return EventFragment.fromString(value);\n }\n return EventFragment.fromObject(value);\n }\n\n static fromObject(value: JsonFragment | EventFragment): EventFragment {\n if (EventFragment.isEventFragment(value)) { return value; }\n\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n\n const params: TypeCheck<_EventFragment> = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n type: \"event\"\n };\n\n return new EventFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): EventFragment {\n\n let match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n\n let anonymous = false;\n match[3].split(\" \").forEach((modifier) => {\n switch(modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n\n return EventFragment.fromObject({\n name: match[1].trim(),\n anonymous: anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n }\n\n static isEventFragment(value: any): value is EventFragment {\n return (value && value._isFragment && value.type === \"event\");\n }\n}\n\nfunction parseGas(value: string, params: any): string {\n params.gas = null;\n\n let comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = BigNumber.from(comps[1]);\n return comps[0];\n }\n\n return value;\n}\n\nfunction parseModifiers(value: string, params: any): void {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n\n value.split(\" \").forEach((modifier) => {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n}\n\ntype StateInputValue = {\n constant?: boolean;\n payable?: boolean;\n stateMutability?: string;\n type?: string;\n};\n\ntype StateOutputValue = {\n constant: boolean;\n payable: boolean;\n stateMutability: string;\n};\n\nfunction verifyState(value: StateInputValue): StateOutputValue {\n let result: any = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n\n // Set (and check things are consistent) the constant property\n result.constant = (result.stateMutability === \"view\" || result.stateMutability === \"pure\");\n if (value.constant != null) {\n if ((!!value.constant) !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n // Set (and check things are consistent) the payable property\n result.payable = (result.stateMutability === \"payable\");\n if (value.payable != null) {\n if ((!!value.payable) !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n\n // If payable we can assume non-constant; otherwise we can't assume\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n result.constant = !!value.constant;\n\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = (result.payable ? \"payable\": \"nonpayable\");\n }\n\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = (result.constant ? \"view\": \"payable\");\n\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n return result;\n}\n\ninterface _ConstructorFragment extends _Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n}\n\nexport class ConstructorFragment extends Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n if (format === FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n\n let result = \"constructor(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n\n return result.trim();\n }\n\n static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment {\n if (typeof(value) === \"string\") {\n return ConstructorFragment.fromString(value);\n }\n return ConstructorFragment.fromObject(value);\n }\n\n static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment {\n if (ConstructorFragment.isConstructorFragment(value)) { return value; }\n\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n\n let state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n\n const params: TypeCheck<_ConstructorFragment> = {\n name: null,\n type: value.type,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new ConstructorFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): ConstructorFragment {\n let params: any = { type: \"constructor\" };\n\n value = parseGas(value, params);\n\n let parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n\n params.inputs = parseParams(parens[2].trim(), false);\n\n parseModifiers(parens[3].trim(), params);\n\n return ConstructorFragment.fromObject(params);\n }\n\n static isConstructorFragment(value: any): value is ConstructorFragment {\n return (value && value._isFragment && value.type === \"constructor\");\n }\n}\n\ninterface _FunctionFragment extends _ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n}\n\nexport class FunctionFragment extends ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n outputs: this.outputs.map((output) => JSON.parse(output.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"function \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += (this.stateMutability + \" \");\n }\n } else if (this.constant) {\n result += \"view \";\n }\n\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(\n (output) => output.format(format)\n ).join(\", \") + \") \";\n }\n\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: FunctionFragment | JsonFragment | string): FunctionFragment {\n if (typeof(value) === \"string\") {\n return FunctionFragment.fromString(value);\n }\n return FunctionFragment.fromObject(value);\n }\n\n static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment {\n if (FunctionFragment.isFunctionFragment(value)) { return value; }\n\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n\n let state = verifyState(value);\n\n const params: TypeCheck<_FunctionFragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n outputs: (value.outputs ? value.outputs.map(ParamType.fromObject): [ ]),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new FunctionFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): FunctionFragment {\n let params: any = { type: \"function\" };\n value = parseGas(value, params);\n\n let comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n\n let parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n parseModifiers(parens[3].trim(), params);\n\n // We have outputs\n if (comps.length > 1) {\n let returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [ ];\n }\n\n return FunctionFragment.fromObject(params);\n }\n\n static isFunctionFragment(value: any): value is FunctionFragment {\n return (value && value._isFragment && value.type === \"function\");\n }\n}\n\n//export class StructFragment extends Fragment {\n//}\n\nfunction checkForbidden(fragment: ErrorFragment): ErrorFragment {\n const sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(`cannot specify user defined ${ sig } error`, \"fragment\", fragment);\n }\n return fragment;\n}\n\nexport class ErrorFragment extends Fragment {\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"error \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n return result.trim();\n }\n\n static from(value: ErrorFragment | JsonFragment | string): ErrorFragment {\n if (typeof(value) === \"string\") {\n return ErrorFragment.fromString(value);\n }\n return ErrorFragment.fromObject(value);\n }\n\n static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment {\n if (ErrorFragment.isErrorFragment(value)) { return value; }\n\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n\n const params: TypeCheck<_Fragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): [])\n };\n\n return checkForbidden(new ErrorFragment(_constructorGuard, params));\n }\n\n static fromString(value: string): ErrorFragment {\n let params: any = { type: \"error\" };\n\n let parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n return checkForbidden(ErrorFragment.fromObject(params));\n }\n\n static isErrorFragment(value: any): value is ErrorFragment {\n return (value && value._isFragment && value.type === \"error\");\n }\n}\n\nfunction verifyType(type: string): string {\n\n // These need to be transformed to their full description\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n\n // @TODO: more verification\n\n return type;\n}\n\n// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234\nconst regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\nfunction verifyIdentifier(value: string): string {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError(`invalid identifier \"${ value }\"`, \"value\", value);\n }\n return value;\n}\n\nconst regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n\nfunction splitNesting(value: string): Array {\n value = value.trim();\n\n let result = [];\n let accum = \"\";\n let depth = 0;\n for (let offset = 0; offset < value.length; offset++) {\n let c = value[offset];\n if (c === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c;\n if (c === \"(\") {\n depth++;\n } else if (c === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) { result.push(accum); }\n\n return result;\n}\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexConcat, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nexport interface Result extends ReadonlyArray {\n readonly [key: string]: any;\n}\n\nexport function checkResultErrors(result: Result): Array<{ path: Array, error: Error }> {\n // Find the first error (if any)\n const errors: Array<{ path: Array, error: Error }> = [ ];\n\n const checkErrors = function(path: Array, object: any): void {\n if (!Array.isArray(object)) { return; }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n }\n checkErrors([ ], result);\n\n return errors;\n\n}\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport abstract class Coder {\n\n // The coder name:\n // - address, uint256, tuple, array, etc.\n readonly name: string;\n\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n readonly type: string;\n\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n readonly localName: string;\n\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n readonly dynamic: boolean;\n\n constructor(name: string, type: string, localName: string, dynamic: boolean) {\n // @TODO: defineReadOnly these\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n\n _throwError(message: string, value: any): void {\n logger.throwArgumentError(message, this.localName, value);\n }\n\n abstract encode(writer: Writer, value: any): number;\n abstract decode(reader: Reader): any;\n\n abstract defaultValue(): any;\n}\n\nexport class Writer {\n readonly wordSize: number;\n\n _data: Array;\n _dataLength: number;\n _padding: Uint8Array;\n\n constructor(wordSize?: number) {\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n this._data = [ ];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n\n get data(): string {\n return hexConcat(this._data);\n }\n get length(): number { return this._dataLength; }\n\n _writeData(data: Uint8Array): number {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n }\n\n appendWriter(writer: Writer): number {\n return this._writeData(concat(writer._data));\n }\n\n // Arrayish items; padded on the right to wordSize\n writeBytes(value: BytesLike): number {\n let bytes = arrayify(value);\n const paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = concat([ bytes, this._padding.slice(paddingOffset) ])\n }\n return this._writeData(bytes);\n }\n\n _getValue(value: BigNumberish): Uint8Array {\n let bytes = arrayify(BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = concat([ this._padding.slice(bytes.length % this.wordSize), bytes ]);\n }\n return bytes;\n }\n\n // BigNumberish items; padded on the left to wordSize\n writeValue(value: BigNumberish): number {\n return this._writeData(this._getValue(value));\n }\n\n writeUpdatableValue(): (value: BigNumberish) => void {\n const offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return (value: BigNumberish) => {\n this._data[offset] = this._getValue(value);\n };\n }\n}\n\nexport class Reader {\n readonly wordSize: number;\n readonly allowLoose: boolean;\n\n readonly _data: Uint8Array;\n readonly _coerceFunc: CoerceFunc;\n\n _offset: number;\n\n constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean) {\n defineReadOnly(this, \"_data\", arrayify(data));\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n defineReadOnly(this, \"_coerceFunc\", coerceFunc);\n defineReadOnly(this, \"allowLoose\", allowLoose);\n\n this._offset = 0;\n }\n\n get data(): string { return hexlify(this._data); }\n get consumed(): number { return this._offset; }\n\n // The default Coerce function\n static coerce(name: string, value: any): any {\n let match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) { value = value.toNumber(); }\n return value;\n }\n\n coerce(name: string, value: any): any {\n if (this._coerceFunc) { return this._coerceFunc(name, value); }\n return Reader.coerce(name, value);\n }\n\n _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array {\n let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger.throwError(\"data out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength)\n }\n\n subReader(offset: number): Reader {\n return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n }\n\n readBytes(length: number, loose?: boolean): Uint8Array {\n let bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n\n readValue(): BigNumber {\n return BigNumber.from(this.readBytes(this.wordSize));\n }\n}\n","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","\"use strict\";\n\nimport sha3 from \"js-sha3\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function keccak256(data: BytesLike): string {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n","export const version = \"rlp/5.5.0\";\n","\"use strict\";\n\n//See: https://github.com/ethereum/wiki/wiki/RLP\n\nimport { arrayify, BytesLike, hexlify, isBytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction arrayifyInteger(value: number): Array {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\n\nfunction unarrayifyInteger(data: Uint8Array, offset: number, length: number): number {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\n\nfunction _encode(object: Array | string): Array {\n if (Array.isArray(object)) {\n let payload: Array = [];\n object.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length)\n return payload;\n }\n\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n\n return length.concat(payload);\n\n }\n\n if (!isBytesLike(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n\n const data: Array = Array.prototype.slice.call(arrayify(object));\n\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n\n } else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n\n return length.concat(data);\n}\n\nexport function encode(object: any): string {\n return hexlify(_encode(object));\n}\n\ntype Decoded = {\n result: any;\n consumed: number;\n};\n\nfunction _decodeChildren(data: Uint8Array, offset: number, childOffset: number, length: number): Decoded {\n const result = [];\n\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n\n result.push(decoded.result);\n\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n }\n\n return {consumed: (1 + length), result: result};\n}\n\n// returns { consumed: number, result: Object }\nfunction _decode(data: Uint8Array, offset: number): { consumed: number, result: any } {\n if (data.length === 0) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data long segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n\n } else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1, length);\n\n } else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result }\n\n } else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result }\n }\n return { consumed: 1, result: hexlify(data[offset]) };\n}\n\nexport function decode(data: BytesLike): any {\n const bytes = arrayify(data);\n const decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n}\n\n","export const version = \"address/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish, _base16To36, _base36To16 } from \"@ethersproject/bignumber\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { encode } from \"@ethersproject/rlp\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction getChecksumAddress(address: string): string {\n if (!isHexString(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n address = address.toLowerCase();\n\n const chars = address.substring(2).split(\"\");\n\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n\n const hashed = arrayify(keccak256(expanded));\n\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n\n return \"0x\" + chars.join(\"\");\n}\n\n// Shims for environments that are missing some required constants and functions\nconst MAX_SAFE_INTEGER: number = 0x1fffffffffffff;\n\nfunction log10(x: number): number {\n if (Math.log10) { return Math.log10(x); }\n return Math.log(x) / Math.LN10;\n}\n\n\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n\n// Create lookup table\nconst ibanLookup: { [character: string]: string } = { };\nfor (let i = 0; i < 10; i++) { ibanLookup[String(i)] = String(i); }\nfor (let i = 0; i < 26; i++) { ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); }\n\n// How many decimal digits can we process? (for 64-bit float, this is 15)\nconst safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n\nfunction ibanChecksum(address: string): string {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits){\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) { checksum = \"0\" + checksum; }\n\n return checksum;\n};\n\nexport function getAddress(address: string): string {\n let result = null;\n\n if (typeof(address) !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n\n // Missing the 0x prefix\n if (address.substring(0, 2) !== \"0x\") { address = \"0x\" + address; }\n\n result = getChecksumAddress(address);\n\n // It is a checksummed address with a bad checksum\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n\n // Maybe ICAP? (we only support direct mode)\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n\n // It is an ICAP address with a bad checksum\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n\n result = _base36To16(address.substring(4));\n while (result.length < 40) { result = \"0\" + result; }\n result = getChecksumAddress(\"0x\" + result);\n\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n return result;\n}\n\nexport function isAddress(address: string): boolean {\n try {\n getAddress(address);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getIcapAddress(address: string): string {\n let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n while (base36.length < 30) { base36 = \"0\" + base36; }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\nexport function getContractAddress(transaction: { from: string, nonce: BigNumberish }) {\n let from: string = null;\n try {\n from = getAddress(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n\n const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));\n\n return getAddress(hexDataSlice(keccak256(encode([ from, nonce ])), 12));\n}\n\nexport function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string {\n if (hexDataLength(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if (hexDataLength(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress(hexDataSlice(keccak256(concat([ \"0xff\", getAddress(from), salt, initCodeHash ])), 12))\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { hexZeroPad } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class AddressCoder extends Coder {\n\n constructor(localName: string) {\n super(\"address\", \"address\", localName, false);\n }\n\n defaultValue(): string {\n return \"0x0000000000000000000000000000000000000000\";\n }\n\n encode(writer: Writer, value: string): number {\n try {\n value = getAddress(value)\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n }\n\n decode(reader: Reader): any {\n return getAddress(hexZeroPad(reader.readValue().toHexString(), 20));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// Clones the functionality of an existing Coder, but without a localName\nexport class AnonymousCoder extends Coder {\n private coder: Coder;\n\n constructor(coder: Coder) {\n super(coder.name, coder.type, undefined, coder.dynamic);\n this.coder = coder;\n }\n\n defaultValue(): any {\n return this.coder.defaultValue();\n }\n\n encode(writer: Writer, value: any): number {\n return this.coder.encode(writer, value);\n }\n\n decode(reader: Reader): any {\n return this.coder.decode(reader);\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./abstract-coder\";\nimport { AnonymousCoder } from \"./anonymous\";\n\nexport function pack(writer: Writer, coders: ReadonlyArray, values: Array | { [ name: string ]: any }): number {\n let arrayValues: Array = null;\n\n if (Array.isArray(values)) {\n arrayValues = values;\n\n } else if (values && typeof(values) === \"object\") {\n let unique: { [ name: string ]: boolean } = { };\n\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n if (unique[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n unique[name] = true;\n\n return values[name];\n });\n\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n\n let staticWriter = new Writer(writer.wordSize);\n let dynamicWriter = new Writer(writer.wordSize);\n\n let updateFuncs: Array<(baseOffset: number) => void> = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset: number) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n\n } else {\n coder.encode(staticWriter, value);\n }\n });\n\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\n\nexport function unpack(reader: Reader, coders: Array): Result {\n let values: any = [];\n\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n\n coders.forEach((coder) => {\n let value: any = null;\n\n if (coder.dynamic) {\n let offset = reader.readValue();\n let offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n\n if (value != undefined) {\n values.push(value);\n }\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add any named parameters (i.e. tuples)\n coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n const value = values[index];\n\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: () => { throw value; }\n });\n } else {\n values[name] = value;\n }\n });\n\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if (value instanceof Error) {\n Object.defineProperty(values, i, {\n enumerable: true,\n get: () => { throw value; }\n });\n }\n }\n\n return Object.freeze(values);\n}\n\n\nexport class ArrayCoder extends Coder {\n readonly coder: Coder;\n readonly length: number;\n\n constructor(coder: Coder, length: number, localName: string) {\n const type = (coder.type + \"[\" + (length >= 0 ? length: \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n\n this.coder = coder;\n this.length = length;\n }\n\n defaultValue(): Array {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n\n const result: Array = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n\n encode(writer: Writer, value: Array): number {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n\n let count = this.length;\n\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName? (\" \"+ this.localName): \"\"));\n\n let coders = [];\n for (let i = 0; i < value.length; i++) { coders.push(this.coder); }\n\n return pack(writer, coders, value);\n }\n\n decode(reader: Reader): any {\n let count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count: count\n });\n }\n }\n let coders = [];\n for (let i = 0; i < count; i++) { coders.push(new AnonymousCoder(this.coder)); }\n\n return reader.coerce(this.name, unpack(reader, coders));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class BooleanCoder extends Coder {\n\n constructor(localName: string) {\n super(\"bool\", \"bool\", localName, false);\n }\n\n defaultValue(): boolean {\n return false;\n }\n\n encode(writer: Writer, value: boolean): number {\n return writer.writeValue(value ? 1: 0);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.type, !reader.readValue().isZero());\n }\n}\n\n","\"use strict\";\n\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class DynamicBytesCoder extends Coder {\n constructor(type: string, localName: string) {\n super(type, type, localName, true);\n }\n\n defaultValue(): string {\n return \"0x\";\n }\n\n encode(writer: Writer, value: any): number {\n value = arrayify(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n\n decode(reader: Reader): any {\n return reader.readBytes(reader.readValue().toNumber(), true);\n }\n}\n\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName: string) {\n super(\"bytes\", localName);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(super.decode(reader)));\n }\n}\n\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// @TODO: Merge this with bytes\nexport class FixedBytesCoder extends Coder {\n readonly size: number;\n\n constructor(size: number, localName: string) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n this.size = size;\n }\n\n defaultValue(): string {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n\n encode(writer: Writer, value: BytesLike): number {\n let data = arrayify(value);\n if (data.length !== this.size) { this._throwError(\"incorrect data length\", value); }\n return writer.writeBytes(data);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(reader.readBytes(this.size)));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NullCoder extends Coder {\n\n constructor(localName: string) {\n super(\"null\", \"\", localName, false);\n }\n\n defaultValue(): null {\n return null;\n }\n\n encode(writer: Writer, value: any): number {\n if (value != null) { this._throwError(\"not null\", value); }\n return writer.writeBytes([ ]);\n }\n\n decode(reader: Reader): any {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n }\n}\n","export const AddressZero = \"0x0000000000000000000000000000000000000000\";\n\n","import { BigNumber } from \"@ethersproject/bignumber\";\n\nconst NegativeOne: BigNumber = (/*#__PURE__*/BigNumber.from(-1));\nconst Zero: BigNumber = (/*#__PURE__*/BigNumber.from(0));\nconst One: BigNumber = (/*#__PURE__*/BigNumber.from(1));\nconst Two: BigNumber = (/*#__PURE__*/BigNumber.from(2));\nconst WeiPerEther: BigNumber = (/*#__PURE__*/BigNumber.from(\"1000000000000000000\"));\nconst MaxUint256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nconst MinInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\"));\nconst MaxInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256,\n};\n","export const HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n\n","// NFKC (composed) // (decomposed)\nexport const EtherSymbol = \"\\u039e\"; // \"\\uD835\\uDF63\";\n","\"use strict\";\n\nexport { AddressZero } from \"./addresses\";\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256\n} from \"./bignumbers\";\nexport { HashZero } from \"./hashes\";\nexport { EtherSymbol } from \"./strings\";\n\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { MaxUint256, NegativeOne, One, Zero } from \"@ethersproject/constants\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NumberCoder extends Coder {\n readonly size: number;\n readonly signed: boolean;\n\n constructor(size: number, signed: boolean, localName: string) {\n const name = ((signed ? \"int\": \"uint\") + (size * 8));\n super(name, name, localName, false);\n\n this.size = size;\n this.signed = signed;\n }\n\n defaultValue(): number {\n return 0;\n }\n\n encode(writer: Writer, value: BigNumberish): number {\n let v = BigNumber.from(value);\n\n // Check bounds are safe for encoding\n let maxUintValue = MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n let bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n\n v = v.toTwos(this.size * 8).mask(this.size * 8);\n\n if (this.signed) {\n v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n\n return writer.writeValue(v);\n }\n\n decode(reader: Reader): any {\n let value = reader.readValue().mask(this.size * 8);\n\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n\n return reader.coerce(this.name, value);\n }\n}\n\n","export const version = \"strings/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n\nexport enum UnicodeNormalizationForm {\n current = \"\",\n NFC = \"NFC\",\n NFD = \"NFD\",\n NFKC = \"NFKC\",\n NFKD = \"NFKD\"\n};\n\nexport enum Utf8ErrorReason {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n UNEXPECTED_CONTINUE = \"unexpected continuation byte\",\n\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n BAD_PREFIX = \"bad codepoint prefix\",\n\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n OVERRUN = \"string overrun\",\n\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n MISSING_CONTINUE = \"missing continuation byte\",\n\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n OUT_OF_RANGE = \"out of UTF-8 range\",\n\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n UTF16_SURROGATE = \"UTF-16 surrogate\",\n\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n OVERLONG = \"overlong representation\",\n};\n\n\nexport type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number;\n\nfunction errorFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n return logger.throwArgumentError(`invalid codepoint at offset ${ offset }; ${ reason }`, \"bytes\", bytes);\n}\n\nfunction ignoreFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) { break; }\n i++;\n }\n return i;\n }\n\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n\n // Nothing to skip\n return 0;\n}\n\nfunction replaceFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n\n // Put the replacement character into the output\n output.push(0xfffd);\n\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n\n// Common error handing strategies\nexport const Utf8ErrorFuncs: { [ name: string ]: Utf8ErrorFunc } = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes: BytesLike, onError?: Utf8ErrorFunc): Array {\n if (onError == null) { onError = Utf8ErrorFuncs.error; }\n\n bytes = arrayify(bytes);\n\n const result: Array = [];\n let i = 0;\n\n // Invalid bytes are ignored\n while(i < bytes.length) {\n\n const c = bytes[i++];\n\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n\n // 1110 xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n\n } else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n } else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n };\n\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n\n // See above loop for invalid continuation byte\n if (res === null) { continue; }\n\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n result.push(res);\n }\n\n return result;\n}\n\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Uint8Array {\n\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n\n if (c < 0x80) {\n result.push(c);\n\n } else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n\n } else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n\n } else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n\n return arrayify(result);\n};\n\nfunction escapeChar(value: number) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\n\nexport function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\"\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\n\nexport function _toUtf8String(codePoints: Array): string {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode(\n (((codePoint >> 10) & 0x3ff) + 0xd800),\n ((codePoint & 0x3ff) + 0xdc00)\n );\n }).join(\"\");\n}\n\nexport function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n\nexport function toUtf8CodePoints(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Array {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n","\"use strict\";\n\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\n\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\n\n\nexport function formatBytes32String(text: string): string {\n\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n\n // Check we have room for null-termination\n if (bytes.length > 31) { throw new Error(\"bytes32 string must be less than 32 bytes\"); }\n\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([ bytes, HashZero ]).slice(0, 32));\n}\n\nexport function parseBytes32String(bytes: BytesLike): string {\n const data = arrayify(bytes);\n\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) { throw new Error(\"invalid bytes32 - not 32 bytes long\"); }\n if (data[31] !== 0) { throw new Error(\"invalid bytes32 string - no null terminator\"); }\n\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) { length--; }\n\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n\n","\"use strict\";\n\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\n\ntype Ranged = {\n l: number, // Lo value\n h: number, // High value (less the lo)\n d?: number, // Delta/stride (default: 1)\n s?: number, // Shift (default: 1)\n e?: Array // Exceptions to skip\n};\n\ntype Table = { [ src: number ]: Array };\n\nfunction bytes2(data: string): Array {\n if ((data.length % 4) !== 0) { throw new Error(\"bad data\"); }\n let result = [];\n for (let i = 0; i < data.length; i += 4) {\n result.push(parseInt(data.substring(i, i + 4), 16));\n }\n return result;\n}\n\nfunction createTable(data: string, func?: (value: string) => Array): Table {\n if (!func) {\n func = function(value: string) { return [ parseInt(value, 16) ]; }\n }\n\n let lo = 0;\n\n let result: Table = { };\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n\n return result;\n}\n\nfunction createRangeTable(data: string): Array {\n let hi = 0;\n return data.split(\",\").map((v) => {\n let comps = v.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\n\nfunction matchMap(value: number, ranges: Array): Ranged {\n let lo = 0;\n for (let i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) { continue; }\n return range;\n }\n }\n return null;\n}\n\nconst Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n\n// @TODO: Make this relative...\nconst Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v) => parseInt(v, 16));\n\nconst Table_B_2_ranges: Array = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [ 23 ], l: 127 },\n { h: 54, s: 1, e: [ 48 ], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [ 2, 6, 8 ], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [ 18, 24, 66 ], l: 19, d: 2 },\n { h: 26, s: 32, e: [ 17 ], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [ 38 ], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [ 1, 4, 5, 7, 8, 11, 12, 17 ], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [ 2, 7, 8, 17 ], l: 52 },\n { h: 24, s: -120023, e: [ 2, 7, 13, 15, 16, 17 ], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [ 17 ], l: 56 },\n { h: 24, s: -119601, e: [ 17 ], l: 58 },\n { h: 24, s: -119659, e: [ 17 ], l: 58 },\n { h: 24, s: -119717, e: [ 17 ], l: 58 },\n { h: 24, s: -119775, e: [ 17 ], l: 58 }\n];\nconst Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\nconst Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\nconst Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n\nconst Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n\n\nfunction flatten(values: Array>): Array {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, [ ]);\n}\n\nexport function _nameprepTableA1(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\n\nexport function _nameprepTableB2(codepoint: number): Array {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) { return [ codepoint + range.s ]; }\n\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) { return codes; }\n\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) { return [ codepoint + shift[0] ]; }\n\n let complex = Table_B_2_complex[codepoint];\n if (complex) { return complex; }\n\n return null;\n}\n\nexport function _nameprepTableC(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_C_ranges);\n}\n\nexport function nameprep(value: string): string {\n\n // This allows platforms with incomplete normalize to bypass\n // it for very basic names which the built-in toLowerCase\n // will certainly handle correctly\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { return value.toLowerCase(); }\n\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) { return [ ]; }\n if (code >= 0xfe00 && code <= 0xfe0f) { return [ ]; }\n\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) { return codesTableB2; }\n\n // No Substitution\n return [ code ];\n }));\n\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\n\n // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9\n codes.forEach((code) => {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n\n // Prohibit Unassigned Code Points (Table A.1)\n codes.forEach((code) => {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n\n // IDNA extras\n let name = _toUtf8String(codes);\n\n // IDNA: 4.2.3.1\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n\n // IDNA: 4.2.4\n if (name.length > 63) { throw new Error(\"too long\"); }\n\n\n\n return name;\n}\n\n","\"use strict\";\n\nimport { formatBytes32String, parseBytes32String } from \"./bytes32\";\nimport { nameprep } from \"./idna\";\nimport { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from \"./utf8\";\n\nexport {\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n\n Utf8ErrorFunc,\n Utf8ErrorFuncs,\n Utf8ErrorReason,\n\n UnicodeNormalizationForm,\n\n formatBytes32String,\n parseBytes32String,\n\n nameprep\n}\n","\"use strict\";\n\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Reader, Writer } from \"./abstract-coder\";\nimport { DynamicBytesCoder } from \"./bytes\";\n\nexport class StringCoder extends DynamicBytesCoder {\n\n constructor(localName: string) {\n super(\"string\", localName);\n }\n\n defaultValue(): string {\n return \"\";\n }\n\n encode(writer: Writer, value: any): number {\n return super.encode(writer, toUtf8Bytes(value));\n }\n\n decode(reader: Reader): any {\n return toUtf8String(super.decode(reader));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\nimport { pack, unpack } from \"./array\";\n\nexport class TupleCoder extends Coder {\n readonly coders: Array;\n\n constructor(coders: Array, localName: string) {\n let dynamic = false;\n const types: Array = [];\n coders.forEach((coder) => {\n if (coder.dynamic) { dynamic = true; }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n\n super(\"tuple\", type, localName, dynamic);\n this.coders = coders;\n }\n\n defaultValue(): any {\n const values: any = [ ];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add named values\n this.coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n values[name] = values[index];\n });\n\n return Object.freeze(values);\n }\n\n encode(writer: Writer, value: Array | { [ name: string ]: any }): number {\n return pack(writer, this.coders, value);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, unpack(reader, this.coders));\n }\n}\n\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./coders/abstract-coder\";\nimport { AddressCoder } from \"./coders/address\";\nimport { ArrayCoder } from \"./coders/array\";\nimport { BooleanCoder } from \"./coders/boolean\";\nimport { BytesCoder } from \"./coders/bytes\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes\";\nimport { NullCoder } from \"./coders/null\";\nimport { NumberCoder } from \"./coders/number\";\nimport { StringCoder } from \"./coders/string\";\nimport { TupleCoder } from \"./coders/tuple\";\n\nimport { ParamType } from \"./fragments\";\n\n\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport class AbiCoder {\n readonly coerceFunc: CoerceFunc;\n\n constructor(coerceFunc?: CoerceFunc) {\n logger.checkNew(new.target, AbiCoder);\n defineReadOnly(this, \"coerceFunc\", coerceFunc || null);\n }\n\n _getCoder(param: ParamType): Coder {\n\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"array\":\n return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new TupleCoder((param.components || []).map((component) => {\n return this._getCoder(component);\n }), param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n if (size === 0 || size > 256 || (size % 8) !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n if (size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new FixedBytesCoder(size, param.name);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n }\n\n _getWordSize(): number { return 32; }\n\n _getReader(data: Uint8Array, allowLoose?: boolean): Reader {\n return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n }\n\n _getWriter(): Writer {\n return new Writer(this._getWordSize());\n }\n\n getDefaultValue(types: ReadonlyArray): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n\n encode(types: ReadonlyArray, values: ReadonlyArray): string {\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types: types, values: values }\n });\n }\n\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n\n const writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n }\n\n decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(this._getReader(arrayify(data), loose));\n }\n}\n\nexport const defaultAbiCoder: AbiCoder = new AbiCoder();\n\n","import { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport function id(text: string): string {\n return keccak256(toUtf8Bytes(text));\n}\n","export const version = \"hash/5.5.0\";\n","import { concat, hexlify } from \"@ethersproject/bytes\";\nimport { nameprep, toUtf8Bytes } from \"@ethersproject/strings\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\n\nconst Partition = new RegExp(\"^((.*)\\\\.)?([^.]+)$\");\n\nexport function isValidName(name: string): boolean {\n try {\n const comps = name.split(\".\");\n for (let i = 0; i < comps.length; i++) {\n if (nameprep(comps[i]).length === 0) {\n throw new Error(\"empty\")\n }\n }\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function namehash(name: string): string {\n /* istanbul ignore if */\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n\n let current = name;\n let result: string | Uint8Array = Zeros;\n while (current.length) {\n const partition = current.match(Partition);\n if (partition == null || partition[2] === \"\") {\n logger.throwArgumentError(\"invalid ENS address; missing component\", \"name\", name);\n }\n const label = toUtf8Bytes(nameprep(partition[3]));\n result = keccak256(concat([result, keccak256(label)]));\n\n current = partition[2] || \"\";\n }\n\n return hexlify(result);\n}\n\n","import { Bytes, concat } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport const messagePrefix = \"\\x19Ethereum Signed Message:\\n\";\n\nexport function hashMessage(message: Bytes | string): string {\n if (typeof(message) === \"string\") { message = toUtf8Bytes(message); }\n return keccak256(concat([\n toUtf8Bytes(messagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n\n","import { TypedDataDomain, TypedDataField } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, hexConcat, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { id } from \"./id\";\n\nconst padding = new Uint8Array(32);\npadding.fill(0);\n\nconst NegativeOne: BigNumber = BigNumber.from(-1);\nconst Zero: BigNumber = BigNumber.from(0);\nconst One: BigNumber = BigNumber.from(1);\nconst MaxUint256: BigNumber = BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n\nfunction hexPadRight(value: BytesLike) {\n const bytes = arrayify(value);\n const padOffset = bytes.length % 32\n if (padOffset) {\n return hexConcat([ bytes, padding.slice(padOffset) ]);\n }\n return hexlify(bytes);\n}\n\nconst hexTrue = hexZeroPad(One.toHexString(), 32);\nconst hexFalse = hexZeroPad(Zero.toHexString(), 32);\n\nconst domainFieldTypes: Record = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\n\nconst domainFieldNames: Array = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\n\nfunction checkString(key: string): (value: any) => string {\n return function (value: any){\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid domain value for ${ JSON.stringify(key) }`, `domain.${ key }`, value);\n }\n return value;\n }\n}\n\nconst domainChecks: Record any> = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value: any) {\n try {\n return BigNumber.from(value).toString()\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value for \"chainId\"`, \"domain.chainId\", value);\n },\n verifyingContract: function(value: any) {\n try {\n return getAddress(value).toLowerCase();\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value: any) {\n try {\n const bytes = arrayify(value);\n if (bytes.length !== 32) { throw new Error(\"bad length\"); }\n return hexlify(bytes);\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"salt\"`, \"domain.salt\", value);\n }\n}\n\nfunction getBaseEncoder(type: string): (value: any) => string {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n const signed = (match[1] === \"\");\n\n const width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n\n const boundsUpper = MaxUint256.mask(signed ? (width - 1): width);\n const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne): Zero;\n\n return function(value: BigNumberish) {\n const v = BigNumber.from(value);\n\n if (v.lt(boundsLower) || v.gt(boundsUpper)) {\n logger.throwArgumentError(`value out-of-bounds for ${ type }`, \"value\", value);\n }\n\n return hexZeroPad(v.toTwos(256).toHexString(), 32);\n };\n }\n }\n\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n if (width === 0 || width > 32 || match[1] !== String(width)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n\n return function(value: BytesLike) {\n const bytes = arrayify(value);\n if (bytes.length !== width) {\n logger.throwArgumentError(`invalid length for ${ type }`, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n\n switch (type) {\n case \"address\": return function(value: string) {\n return hexZeroPad(getAddress(value), 32);\n };\n case \"bool\": return function(value: boolean) {\n return ((!value) ? hexFalse: hexTrue);\n };\n case \"bytes\": return function(value: BytesLike) {\n return keccak256(value);\n };\n case \"string\": return function(value: string) {\n return id(value);\n };\n }\n\n return null;\n}\n\nfunction encodeType(name: string, fields: Array): string {\n return `${ name }(${ fields.map(({ name, type }) => (type + \" \" + name)).join(\",\") })`;\n}\n\nexport class TypedDataEncoder {\n readonly primaryType: string;\n readonly types: Record>;\n\n readonly _encoderCache: Record string>;\n readonly _types: Record;\n\n constructor(types: Record>) {\n defineReadOnly(this, \"types\", Object.freeze(deepCopy(types)));\n\n defineReadOnly(this, \"_encoderCache\", { });\n defineReadOnly(this, \"_types\", { });\n\n // Link struct types to their direct child structs\n const links: Record> = { };\n\n // Link structs to structs which contain them as a child\n const parents: Record> = { };\n\n // Link all subtypes within a given struct\n const subtypes: Record> = { };\n\n Object.keys(types).forEach((type) => {\n links[type] = { };\n parents[type] = [ ];\n subtypes[type] = { }\n });\n\n for (const name in types) {\n\n const uniqueNames: Record = { };\n\n types[name].forEach((field) => {\n\n // Check each field has a unique name\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(`duplicate variable name ${ JSON.stringify(field.name) } in ${ JSON.stringify(name) }`, \"types\", types);\n }\n uniqueNames[field.name] = true;\n\n // Get the base type (drop any array specifiers)\n const baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) { return ;}\n\n if (!parents[baseType]) {\n logger.throwArgumentError(`unknown type ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Add linkage\n parents[baseType].push(name);\n links[name][baseType] = true;\n });\n }\n\n // Deduce the primary type\n const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0));\n\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(`ambiguous primary types or unused types: ${ primaryTypes.map((t) => (JSON.stringify(t))).join(\", \") }`, \"types\", types);\n }\n\n defineReadOnly(this, \"primaryType\", primaryTypes[0]);\n\n // Check for circular type references\n function checkCircular(type: string, found: Record) {\n if (found[type]) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(type) }`, \"types\", types);\n }\n\n found[type] = true;\n\n Object.keys(links[type]).forEach((child) => {\n if (!parents[child]) { return; }\n\n // Recursively check children\n checkCircular(child, found);\n\n // Mark all ancestors as having this decendant\n Object.keys(found).forEach((subtype) => {\n subtypes[subtype][child] = true;\n });\n });\n\n delete found[type];\n }\n checkCircular(this.primaryType, { });\n\n // Compute each fully describe type\n for (const name in subtypes) {\n const st = Object.keys(subtypes[name]);\n st.sort();\n this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\");\n }\n }\n\n getEncoder(type: string): (value: any) => string {\n let encoder = this._encoderCache[type];\n if (!encoder) {\n encoder = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder;\n }\n\n _getEncoder(type: string): (value: any) => string {\n\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return encoder; }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const subEncoder = this.getEncoder(subtype);\n const length = parseInt(match[3]);\n return (value: Array) => {\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n\n let result = value.map(subEncoder);\n if (this._types[subtype]) {\n result = result.map(keccak256);\n }\n\n return keccak256(hexConcat(result));\n };\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this._types[type]);\n return (value: Record) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this._types[type]) { return keccak256(result); }\n return result;\n });\n values.unshift(encodedType);\n return hexConcat(values);\n }\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n encodeType(name: string): string {\n const result = this._types[name];\n if (!result) {\n logger.throwArgumentError(`unknown type: ${ JSON.stringify(name) }`, \"name\", name);\n }\n return result;\n }\n\n encodeData(type: string, value: any): string {\n return this.getEncoder(type)(value);\n }\n\n hashStruct(name: string, value: Record): string {\n return keccak256(this.encodeData(name, value));\n }\n\n encode(value: Record): string {\n return this.encodeData(this.primaryType, value);\n }\n\n hash(value: Record): string {\n return this.hashStruct(this.primaryType, value);\n }\n\n _visit(type: string, value: any, callback: (type: string, data: any) => any): any {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return callback(type, value); }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const length = parseInt(match[3]);\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map((v: any) => this._visit(subtype, v, callback));\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, >{});\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n visit(value: Record, callback: (type: string, data: any) => any): any {\n return this._visit(this.primaryType, value, callback);\n }\n\n static from(types: Record>): TypedDataEncoder {\n return new TypedDataEncoder(types);\n }\n\n static getPrimaryType(types: Record>): string {\n return TypedDataEncoder.from(types).primaryType;\n }\n\n static hashStruct(name: string, types: Record>, value: Record): string {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n\n static hashDomain(domain: TypedDataDomain): string {\n const domainFields: Array = [ ];\n for (const name in domain) {\n const type = domainFieldTypes[name];\n if (!type) {\n logger.throwArgumentError(`invalid typed-data domain key: ${ JSON.stringify(name) }`, \"domain\", domain);\n }\n domainFields.push({ name, type });\n }\n\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n\n static encode(domain: TypedDataDomain, types: Record>, value: Record): string {\n return hexConcat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n\n static hash(domain: TypedDataDomain, types: Record>, value: Record): string {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n\n // Replaces all address types with ENS names with their looked up address\n static async resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ domain: TypedDataDomain, value: any }> {\n // Make a copy to isolate it from the object passed in\n domain = shallowCopy(domain);\n\n // Look up all ENS names\n const ensCache: Record = { };\n\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n\n // Get a list of all the addresses\n encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n\n // Replace all ENS names with their address\n value = encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && ensCache[value]) { return ensCache[value]; }\n return value;\n });\n\n return { domain, value };\n }\n\n static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n\n // Derive the EIP712Domain Struct reference type\n const domainValues: Record = { };\n const domainTypes: Array<{ name: string, type:string }> = [ ];\n\n domainFieldNames.forEach((name) => {\n const value = (domain)[name];\n if (value == null) { return; }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n\n const encoder = TypedDataEncoder.from(types);\n\n const typesWithDomain = shallowCopy(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n\n // Validate the data structures and types\n encoder.encode(value);\n\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type: string, value: any) => {\n\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(arrayify(value));\n }\n\n // uint or int\n if (type.match(/^u?int/)) {\n return BigNumber.from(value).toString();\n }\n\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid string`, \"value\", value);\n }\n return value;\n }\n\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n }\n}\n\n","\"use strict\";\n\nimport { id } from \"./id\";\nimport { isValidName, namehash } from \"./namehash\";\nimport { hashMessage, messagePrefix } from \"./message\";\n\nimport { TypedDataEncoder as _TypedDataEncoder } from \"./typed-data\";\n\nexport {\n id,\n\n namehash,\n isValidName,\n\n messagePrefix,\n hashMessage,\n\n _TypedDataEncoder,\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { id } from \"@ethersproject/hash\";\nimport { keccak256 } from \"@ethersproject/keccak256\"\nimport { defineReadOnly, Description, getStatic } from \"@ethersproject/properties\";\n\nimport { AbiCoder, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Result } from \"./coders/abstract-coder\";\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, ParamType } from \"./fragments\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport { checkResultErrors, Result };\n\nexport class LogDescription extends Description {\n readonly eventFragment: EventFragment;\n readonly name: string;\n readonly signature: string;\n readonly topic: string;\n readonly args: Result\n}\n\nexport class TransactionDescription extends Description {\n readonly functionFragment: FunctionFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n readonly value: BigNumber;\n}\n\nexport class ErrorDescription extends Description {\n readonly errorFragment: ErrorFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n}\n\nexport class Indexed extends Description {\n readonly hash: string;\n readonly _isIndexed: boolean;\n\n static isIndexed(value: any): value is Indexed {\n return !!(value && value._isIndexed);\n }\n}\n\nconst BuiltinErrors: Record, name: string, reason?: boolean }> = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [ \"string\" ], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [ \"uint256\" ] }\n}\n\nfunction wrapAccessError(property: string, error: Error): Error {\n const wrap = new Error(`deferred error during ABI decoding triggered accessing ${ property }`);\n (wrap).error = error;\n return wrap;\n}\n\n/*\nfunction checkNames(fragment: Fragment, type: \"input\" | \"output\", params: Array): void {\n params.reduce((accum, param) => {\n if (param.name) {\n if (accum[param.name]) {\n logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format(\"full\") }`, \"fragment\", fragment);\n }\n accum[param.name] = true;\n }\n return accum;\n }, <{ [ name: string ]: boolean }>{ });\n}\n*/\nexport class Interface {\n readonly fragments: ReadonlyArray;\n\n readonly errors: { [ name: string ]: ErrorFragment };\n readonly events: { [ name: string ]: EventFragment };\n readonly functions: { [ name: string ]: FunctionFragment };\n readonly structs: { [ name: string ]: any };\n\n readonly deploy: ConstructorFragment;\n\n readonly _abiCoder: AbiCoder;\n\n readonly _isInterface: boolean;\n\n constructor(fragments: string | ReadonlyArray) {\n logger.checkNew(new.target, Interface);\n\n let abi: ReadonlyArray = [ ];\n if (typeof(fragments) === \"string\") {\n abi = JSON.parse(fragments);\n } else {\n abi = fragments;\n }\n\n defineReadOnly(this, \"fragments\", abi.map((fragment) => {\n return Fragment.from(fragment);\n }).filter((fragment) => (fragment != null)));\n\n defineReadOnly(this, \"_abiCoder\", getStatic<() => AbiCoder>(new.target, \"getAbiCoder\")());\n\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"errors\", { });\n defineReadOnly(this, \"events\", { });\n defineReadOnly(this, \"structs\", { });\n\n // Add all fragments by their signature\n this.fragments.forEach((fragment) => {\n let bucket: { [ name: string ]: Fragment } = null;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineReadOnly(this, \"deploy\", fragment);\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.events;\n break;\n case \"error\":\n bucket = this.errors;\n break;\n default:\n return;\n }\n\n let signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n\n bucket[signature] = fragment;\n });\n\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineReadOnly(this, \"deploy\", ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n\n defineReadOnly(this, \"_isInterface\", true);\n }\n\n format(format?: string): string | Array {\n if (!format) { format = FormatTypes.full; }\n if (format === FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n\n const abi = this.fragments.map((fragment) => fragment.format(format));\n\n // We need to re-bundle the JSON fragments a bit\n if (format === FormatTypes.json) {\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n\n return abi;\n }\n\n // Sub-classes can override these to handle other blockchains\n static getAbiCoder(): AbiCoder {\n return defaultAbiCoder;\n }\n\n static getAddress(address: string): string {\n return getAddress(address);\n }\n\n static getSighash(fragment: ErrorFragment | FunctionFragment): string {\n return hexDataSlice(id(fragment.format()), 0, 4);\n }\n\n static getEventTopic(eventFragment: EventFragment): string {\n return id(eventFragment.format());\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getFunction(nameOrSignatureOrSighash: string): FunctionFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n for (const name in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name)) {\n return this.functions[name];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.functions).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name);\n }\n\n return this.functions[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Find an event definition by any means necessary (unless it is ambiguous)\n getEvent(nameOrSignatureOrTopic: string): EventFragment {\n if (isHexString(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n\n return this.events[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getError(nameOrSignatureOrSighash: string): ErrorFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n const getSighash = getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\");\n for (const name in this.errors) {\n const error = this.errors[name];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.errors).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name);\n }\n\n return this.errors[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Get the sighash (the bytes4 selector) used by Solidity to identify a function\n getSighash(fragment: ErrorFragment | FunctionFragment | string): string {\n if (typeof(fragment) === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_) {\n throw error;\n }\n }\n }\n\n return getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\")(fragment);\n }\n\n // Get the topic (the bytes32 hash) used by Solidity to identify an event\n getEventTopic(eventFragment: EventFragment | string): string {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n return getStatic<(e: EventFragment) => string>(this.constructor, \"getEventTopic\")(eventFragment);\n }\n\n\n _decodeParams(params: ReadonlyArray, data: BytesLike): Result {\n return this._abiCoder.decode(params, data)\n }\n\n _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string {\n return this._abiCoder.encode(params, values)\n }\n\n encodeDeploy(values?: ReadonlyArray): string {\n return this._encodeParams(this.deploy.inputs, values || [ ]);\n }\n\n decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(`data signature does not match error ${ fragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n }\n\n encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n return hexlify(concat([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the data for a function call (e.g. tx.data)\n decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(`data signature does not match function ${ functionFragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n }\n\n // Encode the data for a function call (e.g. tx.data)\n encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(concat([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the result from a function call (e.g. from eth_call)\n decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n let bytes = arrayify(data);\n\n let reason: string = null;\n let errorArgs: Result = null;\n let errorName: string = null;\n let errorSignature: string = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error) { }\n break;\n\n case 4: {\n const selector = hexlify(bytes.slice(0, 4));\n const builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) { reason = errorArgs[0]; }\n } else {\n try {\n const error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error) {\n console.log(error);\n }\n }\n break;\n }\n }\n\n return logger.throwError(\"call revert exception\", Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n errorArgs, errorName, errorSignature, reason\n });\n }\n\n // Encode the result for a function call (e.g. for eth_call)\n encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [ ]));\n }\n\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array> {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n })\n }\n\n let topics: Array> = [];\n if (!eventFragment.anonymous) { topics.push(this.getEventTopic(eventFragment)); }\n\n const encodeTopic = (param: ParamType, value: any): string => {\n if (param.type === \"string\") {\n return id(value);\n } else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n\n // Check addresses are valid\n if (param.type === \"address\") { this._abiCoder.encode( [ \"address\" ], [ value ]); }\n return hexZeroPad(hexlify(value), 32);\n };\n\n values.forEach((value, index) => {\n\n let param = eventFragment.inputs[index];\n\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n }\n return;\n }\n\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n\n return topics;\n }\n\n encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { data: string, topics: Array } {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n const topics: Array = [ ];\n\n const dataTypes: Array = [ ];\n const dataValues: Array = [ ];\n\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n\n eventFragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value))\n } else if (param.type === \"bytes\") {\n topics.push(keccak256(value))\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n } else {\n topics.push(this._abiCoder.encode([ param.type] , [ value ]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n\n return {\n data: this._abiCoder.encode(dataTypes , dataValues),\n topics: topics\n };\n }\n\n // Decode a filter for the event and the search criteria\n decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n\n let indexed: Array = [];\n let nonIndexed: Array = [];\n let dynamic: Array = [];\n\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)): null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n\n let result: (Array & { [ key: string ]: any }) = [ ];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n\n } else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n\n } else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n } else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: () => { throw wrapAccessError(`property ${ JSON.stringify(param.name) }`, value); }\n });\n } else {\n result[param.name] = value;\n }\n }\n });\n\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n enumerable: true,\n get: () => { throw wrapAccessError(`index ${ i }`, value); }\n });\n }\n }\n\n return Object.freeze(result);\n }\n\n // Given a transaction, find the matching function fragment (if any) and\n // determine all its properties and call parameters\n parseTransaction(tx: { data: string, value?: BigNumberish }): TransactionDescription {\n let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: BigNumber.from(tx.value || \"0\"),\n });\n }\n\n // @TODO\n //parseCallResult(data: BytesLike): ??\n\n // Given an event log, find the matching event fragment (if any) and\n // determine all its properties and values\n parseLog(log: { topics: Array, data: string}): LogDescription {\n let fragment = this.getEvent(log.topics[0]);\n\n if (!fragment || fragment.anonymous) { return null; }\n\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n\n\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }\n\n parseError(data: BytesLike): ErrorDescription {\n const hexData = hexlify(data);\n let fragment = this.getError(hexData.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n });\n }\n\n\n /*\n static from(value: Array | string | Interface) {\n if (Interface.isInterface(value)) {\n return value;\n }\n if (typeof(value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n return new Interface(value);\n }\n */\n\n static isInterface(value: any): value is Interface {\n return !!(value && value._isInterface);\n }\n}\n\n","\"use strict\";\n\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from \"./fragments\";\nimport { AbiCoder, CoerceFunc, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from \"./interface\";\n\nexport {\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n Fragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n AbiCoder,\n defaultAbiCoder,\n\n Interface,\n Indexed,\n\n /////////////////////////\n // Types\n\n CoerceFunc,\n JsonFragment,\n JsonFragmentType,\n\n Result,\n checkResultErrors,\n\n LogDescription,\n TransactionDescription\n};\n","export const version = \"abstract-provider/5.5.1\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { BytesLike, isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { Deferrable, Description, defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { AccessListish, Transaction } from \"@ethersproject/transactions\";\nimport { OnceBlockable } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\n\nexport type TransactionRequest = {\n to?: string,\n from?: string,\n nonce?: BigNumberish,\n\n gasLimit?: BigNumberish,\n gasPrice?: BigNumberish,\n\n data?: BytesLike,\n value?: BigNumberish,\n chainId?: number\n\n type?: number;\n accessList?: AccessListish;\n\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n\n customData?: Record;\n}\n\nexport interface TransactionResponse extends Transaction {\n hash: string;\n\n // Only if a transaction has been mined\n blockNumber?: number,\n blockHash?: string,\n timestamp?: number,\n\n confirmations: number,\n\n // Not optional (as it is in Transaction)\n from: string;\n\n // The raw transaction\n raw?: string,\n\n // This function waits until the transaction has been mined\n wait: (confirmations?: number) => Promise\n};\n\nexport type BlockTag = string | number;\n\nexport interface _Block {\n hash: string;\n parentHash: string;\n number: number;\n\n timestamp: number;\n nonce: string;\n difficulty: number;\n _difficulty: BigNumber;\n\n gasLimit: BigNumber;\n gasUsed: BigNumber;\n\n miner: string;\n extraData: string;\n\n baseFeePerGas?: null | BigNumber;\n}\n\nexport interface Block extends _Block {\n transactions: Array;\n}\n\nexport interface BlockWithTransactions extends _Block {\n transactions: Array;\n}\n\n\nexport interface Log {\n blockNumber: number;\n blockHash: string;\n transactionIndex: number;\n\n removed: boolean;\n\n address: string;\n data: string;\n\n topics: Array;\n\n transactionHash: string;\n logIndex: number;\n}\n\nexport interface TransactionReceipt {\n to: string;\n from: string;\n contractAddress: string,\n transactionIndex: number,\n root?: string,\n gasUsed: BigNumber,\n logsBloom: string,\n blockHash: string,\n transactionHash: string,\n logs: Array,\n blockNumber: number,\n confirmations: number,\n cumulativeGasUsed: BigNumber,\n effectiveGasPrice: BigNumber,\n byzantium: boolean,\n type: number;\n status?: number\n};\n\nexport interface FeeData {\n maxFeePerGas: null | BigNumber;\n maxPriorityFeePerGas: null | BigNumber;\n gasPrice: null | BigNumber;\n}\n\nexport interface EventFilter {\n address?: string;\n topics?: Array | null>;\n}\n\nexport interface Filter extends EventFilter {\n fromBlock?: BlockTag,\n toBlock?: BlockTag,\n}\n\nexport interface FilterByBlockHash extends EventFilter {\n blockHash?: string;\n}\n\n//export type CallTransactionable = {\n// call(transaction: TransactionRequest): Promise;\n//};\n\nexport abstract class ForkEvent extends Description {\n readonly expiry: number;\n\n readonly _isForkEvent?: boolean;\n\n static isForkEvent(value: any): value is ForkEvent {\n return !!(value && value._isForkEvent);\n }\n}\n\nexport class BlockForkEvent extends ForkEvent {\n readonly blockHash: string;\n\n readonly _isBlockForkEvent?: boolean;\n\n constructor(blockHash: string, expiry?: number) {\n if (!isHexString(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n\n super({\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: (expiry || 0),\n blockHash: blockHash\n });\n }\n}\n\nexport class TransactionForkEvent extends ForkEvent {\n readonly hash: string;\n\n readonly _isTransactionOrderForkEvent?: boolean;\n\n constructor(hash: string, expiry?: number) {\n if (!isHexString(hash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: (expiry || 0),\n hash: hash\n });\n }\n}\n\nexport class TransactionOrderForkEvent extends ForkEvent {\n readonly beforeHash: string;\n readonly afterHash: string;\n\n constructor(beforeHash: string, afterHash: string, expiry?: number) {\n if (!isHexString(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!isHexString(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: (expiry || 0),\n beforeHash: beforeHash,\n afterHash: afterHash\n });\n }\n}\n\nexport type EventType = string | Array> | EventFilter | ForkEvent;\n\nexport type Listener = (...args: Array) => void;\n\n///////////////////////////////\n// Exported Abstracts\nexport abstract class Provider implements OnceBlockable {\n\n // Network\n abstract getNetwork(): Promise;\n\n // Latest State\n abstract getBlockNumber(): Promise;\n abstract getGasPrice(): Promise;\n async getFeeData(): Promise {\n const { block, gasPrice } = await resolveProperties({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch((error) => {\n // @TODO: Why is this now failing on Calaveras?\n //console.log(error);\n return null;\n })\n });\n\n let maxFeePerGas = null, maxPriorityFeePerGas = null;\n\n if (block && block.baseFeePerGas) {\n // We may want to compute this more accurately in the future,\n // using the formula \"check if the base fee is correct\".\n // See: https://eips.ethereum.org/EIPS/eip-1559\n maxPriorityFeePerGas = BigNumber.from(\"2500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n\n return { maxFeePerGas, maxPriorityFeePerGas, gasPrice };\n }\n\n // Account\n abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise ;\n abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise;\n\n // Execution\n abstract sendTransaction(signedTransaction: string | Promise): Promise;\n abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise;\n abstract estimateGas(transaction: Deferrable): Promise;\n\n // Queries\n abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getTransaction(transactionHash: string): Promise;\n abstract getTransactionReceipt(transactionHash: string): Promise;\n\n // Bloom-filter Queries\n abstract getLogs(filter: Filter): Promise>;\n\n // ENS\n abstract resolveName(name: string | Promise): Promise;\n abstract lookupAddress(address: string | Promise): Promise;\n\n // Event Emitter (ish)\n abstract on(eventName: EventType, listener: Listener): Provider;\n abstract once(eventName: EventType, listener: Listener): Provider;\n abstract emit(eventName: EventType, ...args: Array): boolean\n abstract listenerCount(eventName?: EventType): number;\n abstract listeners(eventName?: EventType): Array;\n abstract off(eventName: EventType, listener?: Listener): Provider;\n abstract removeAllListeners(eventName?: EventType): Provider;\n\n // Alias for \"on\"\n addListener(eventName: EventType, listener: Listener): Provider {\n return this.on(eventName, listener);\n }\n\n // Alias for \"off\"\n removeListener(eventName: EventType, listener: Listener): Provider {\n return this.off(eventName, listener);\n }\n\n // @TODO: This *could* be implemented here, but would pull in events...\n abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise;\n\n readonly _isProvider: boolean;\n\n constructor() {\n logger.checkAbstract(new.target, Provider);\n defineReadOnly(this, \"_isProvider\", true);\n }\n\n static isProvider(value: any): value is Provider {\n return !!(value && value._isProvider);\n }\n\n/*\n static getResolver(network: Network, callable: CallTransactionable, namehash: string): string {\n // No ENS...\n if (!network.ensAddress) {\n errors.throwError(\n \"network does support ENS\",\n errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // Not a namehash\n if (!isHexString(namehash, 32)) {\n errors.throwArgumentError(\"invalid name hash\", \"namehash\", namehash);\n }\n\n // keccak256(\"resolver(bytes32)\")\n let data = \"0x0178b8bf\" + namehash.substring(2);\n let transaction = { to: network.ensAddress, data: data };\n\n return provider.call(transaction).then((data) => {\n return provider.formatter.callAddress(data);\n });\n }\n\n static resolveNamehash(network: Network, callable: CallTransactionable, namehash: string): string {\n return this.getResolver(network, callable, namehash).then((resolverAddress) => {\n if (!resolverAddress) { return null; }\n\n // keccak256(\"addr(bytes32)\")\n let data = \"0x3b3b57de\" + namehash(name).substring(2);\n let transaction = { to: resolverAddress, data: data };\n return callable.call(transaction).then((data) => {\n return this.formatter.callAddress(data);\n });\n\n })\n }\n*/\n}\n","export const version = \"abstract-signer/5.5.0\";\n","\"use strict\";\n\nimport { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst allowedTransactionKeys: Array = [\n \"accessList\", \"chainId\", \"customData\", \"data\", \"from\", \"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"to\", \"type\", \"value\"\n];\n\nconst forwardErrors = [\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n];\n\n// EIP-712 Typed Data\n// See: https://eips.ethereum.org/EIPS/eip-712\n\nexport interface TypedDataDomain {\n name?: string;\n version?: string;\n chainId?: BigNumberish;\n verifyingContract?: string;\n salt?: BytesLike;\n};\n\nexport interface TypedDataField {\n name: string;\n type: string;\n};\n\n// Sub-classes of Signer may optionally extend this interface to indicate\n// they have a private key available synchronously\nexport interface ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n}\n\n// Sub-Class Notes:\n// - A Signer MUST always make sure, that if present, the \"from\" field\n// matches the Signer, before sending or signing a transaction\n// - A Signer SHOULD always wrap private information (such as a private\n// key or mnemonic) in a function, so that console.log does not leak\n// the data\n\n// @TODO: This is a temporary measure to preserve backwards compatibility\n// In v6, the method on TypedDataSigner will be added to Signer\nexport interface TypedDataSigner {\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise;\n}\n\nexport abstract class Signer {\n readonly provider?: Provider;\n\n ///////////////////\n // Sub-classes MUST implement these\n\n // Returns the checksum address\n abstract getAddress(): Promise\n\n // Returns the signed prefixed-message. This MUST treat:\n // - Bytes as a binary message\n // - string as a UTF8-message\n // i.e. \"0x1234\" is a SIX (6) byte string, NOT 2 bytes of data\n abstract signMessage(message: Bytes | string): Promise;\n\n // Signs a transaction and returns the fully serialized, signed transaction.\n // The EXACT transaction MUST be signed, and NO additional properties to be added.\n // - This MAY throw if signing transactions is not supports, but if\n // it does, sentTransaction MUST be overridden.\n abstract signTransaction(transaction: Deferrable): Promise;\n\n // Returns a new instance of the Signer, connected to provider.\n // This MAY throw if changing providers is not supported.\n abstract connect(provider: Provider): Signer;\n\n readonly _isSigner: boolean;\n\n\n ///////////////////\n // Sub-classes MUST call super\n constructor() {\n logger.checkAbstract(new.target, Signer);\n defineReadOnly(this, \"_isSigner\", true);\n }\n\n\n ///////////////////\n // Sub-classes MAY override these\n\n async getBalance(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getBalance\");\n return await this.provider.getBalance(this.getAddress(), blockTag);\n }\n\n async getTransactionCount(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getTransactionCount\");\n return await this.provider.getTransactionCount(this.getAddress(), blockTag);\n }\n\n // Populates \"from\" if unspecified, and estimates the gas for the transaction\n async estimateGas(transaction: Deferrable): Promise {\n this._checkProvider(\"estimateGas\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.estimateGas(tx);\n }\n\n // Populates \"from\" if unspecified, and calls with the transaction\n async call(transaction: Deferrable, blockTag?: BlockTag): Promise {\n this._checkProvider(\"call\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.call(tx, blockTag);\n }\n\n // Populates all fields in a transaction, signs it and sends it to the network\n async sendTransaction(transaction: Deferrable): Promise {\n this._checkProvider(\"sendTransaction\");\n const tx = await this.populateTransaction(transaction);\n const signedTx = await this.signTransaction(tx);\n return await this.provider.sendTransaction(signedTx);\n }\n\n async getChainId(): Promise {\n this._checkProvider(\"getChainId\");\n const network = await this.provider.getNetwork();\n return network.chainId;\n }\n\n async getGasPrice(): Promise {\n this._checkProvider(\"getGasPrice\");\n return await this.provider.getGasPrice();\n }\n\n async getFeeData(): Promise {\n this._checkProvider(\"getFeeData\");\n return await this.provider.getFeeData();\n }\n\n\n async resolveName(name: string): Promise {\n this._checkProvider(\"resolveName\");\n return await this.provider.resolveName(name);\n }\n\n\n\n // Checks a transaction does not contain invalid keys and if\n // no \"from\" is provided, populates it.\n // - does NOT require a provider\n // - adds \"from\" is not present\n // - returns a COPY (safe to mutate the result)\n // By default called from: (overriding these prevents it)\n // - call\n // - estimateGas\n // - populateTransaction (and therefor sendTransaction)\n checkTransaction(transaction: Deferrable): Deferrable {\n for (const key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n\n const tx = shallowCopy(transaction);\n\n if (tx.from == null) {\n tx.from = this.getAddress();\n\n } else {\n // Make sure any provided address matches this signer\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then((result) => {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n\n return tx;\n }\n\n // Populates ALL keys for a transaction and checks that \"from\" matches\n // this Signer. Should be used by sendTransaction but NOT by signTransaction.\n // By default called from: (overriding these prevents it)\n // - sendTransaction\n //\n // Notes:\n // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas\n async populateTransaction(transaction: Deferrable): Promise {\n\n const tx: Deferrable = await resolveProperties(this.checkTransaction(transaction))\n\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n\n // Prevent this error from causing an UnhandledPromiseException\n tx.to.catch((error) => { });\n }\n\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null);\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n\n if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n tx.type = 2;\n\n } else if (tx.type === 0 || tx.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n\n // Populate missing gasPrice\n if (tx.gasPrice == null) { tx.gasPrice = this.getGasPrice(); }\n\n } else {\n\n // We need to get fee data to determine things\n const feeData = await this.getFeeData();\n\n if (tx.type == null) {\n // We need to auto-detect the intended type of this transaction...\n\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n\n // Upgrade transaction from null to eip-1559\n tx.type = 2;\n\n if (tx.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n\n } else {\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n\n } else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n\n // ...but they are trying to use EIP-1559 properties\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n\n // Populate missing fee data\n if (tx.gasPrice == null) { tx.gasPrice = feeData.gasPrice; }\n\n // Explicitly set untyped transaction to legacy\n tx.type = 0;\n\n } else {\n // getFeeData has failed us.\n logger.throwError(\"failed to get consistent fee data\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n\n } else if (tx.type === 2) {\n // Explicitly using EIP-1559\n\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n }\n\n if (tx.nonce == null) { tx.nonce = this.getTransactionCount(\"pending\"); }\n\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch((error) => {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error: error,\n tx: tx\n });\n });\n }\n\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then((results) => {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n\n return await resolveProperties(tx);\n }\n\n\n ///////////////////\n // Sub-classes SHOULD leave these alone\n\n _checkProvider(operation?: string): void {\n if (!this.provider) { logger.throwError(\"missing provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: (operation || \"_checkProvider\") });\n }\n }\n\n static isSigner(value: any): value is Signer {\n return !!(value && value._isSigner);\n }\n}\n\nexport class VoidSigner extends Signer implements TypedDataSigner {\n readonly address: string;\n\n constructor(address: string, provider?: Provider) {\n logger.checkNew(new.target, VoidSigner);\n super();\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n _fail(message: string, operation: string): Promise {\n return Promise.resolve().then(() => {\n logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation });\n });\n }\n\n signMessage(message: Bytes | string): Promise {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n }\n\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n }\n\n connect(provider: Provider): VoidSigner {\n return new VoidSigner(this.address, provider);\n }\n}\n\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","import _ec from \"elliptic\";\nvar EC = _ec.ec;\nexport { EC };\n//# sourceMappingURL=elliptic.js.map","export const version = \"signing-key/5.5.0\";\n","\"use strict\";\n\nimport { EC } from \"./elliptic\";\n\nimport { arrayify, BytesLike, hexlify, hexZeroPad, Signature, SignatureLike, splitSignature } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nlet _curve: EC = null\nfunction getCurve() {\n if (!_curve) {\n _curve = new EC(\"secp256k1\");\n }\n return _curve;\n}\n\nexport class SigningKey {\n\n readonly curve: string;\n\n readonly privateKey: string;\n readonly publicKey: string;\n readonly compressedPublicKey: string;\n\n //readonly address: string;\n\n readonly _isSigningKey: boolean;\n\n constructor(privateKey: BytesLike) {\n defineReadOnly(this, \"curve\", \"secp256k1\");\n\n defineReadOnly(this, \"privateKey\", hexlify(privateKey));\n\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n\n defineReadOnly(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n defineReadOnly(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n\n defineReadOnly(this, \"_isSigningKey\", true);\n }\n\n _addPoint(other: BytesLike): string {\n const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));\n const p1 = getCurve().keyFromPublic(arrayify(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n }\n\n signDigest(digest: BytesLike): Signature {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const digestBytes = arrayify(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n const signature = keyPair.sign(digestBytes, { canonical: true });\n return splitSignature({\n recoveryParam: signature.recoveryParam,\n r: hexZeroPad(\"0x\" + signature.r.toString(16), 32),\n s: hexZeroPad(\"0x\" + signature.s.toString(16), 32),\n })\n }\n\n computeSharedSecret(otherKey: BytesLike): string {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));\n return hexZeroPad(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n }\n\n static isSigningKey(value: any): value is SigningKey {\n return !!(value && value._isSigningKey);\n }\n}\n\nexport function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string {\n const sig = splitSignature(signature);\n const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };\n return \"0x\" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n}\n\nexport function computePublicKey(key: BytesLike, compressed?: boolean): string {\n const bytes = arrayify(key);\n\n if (bytes.length === 32) {\n const signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n\n } else if (bytes.length === 33) {\n if (compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n\n } else if (bytes.length === 65) {\n if (!compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n}\n\n","export const version = \"transactions/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, DataOptions, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, SignatureLike, splitSignature, stripZeros, } from \"@ethersproject/bytes\";\nimport { Zero } from \"@ethersproject/constants\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { checkProperties } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey } from \"@ethersproject/signing-key\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type AccessList = Array<{ address: string, storageKeys: Array }>;\n\n// Input allows flexibility in describing an access list\nexport type AccessListish = AccessList |\n Array<[ string, Array ]> |\n Record>;\n\nexport enum TransactionTypes {\n legacy = 0,\n eip2930 = 1,\n eip1559 = 2,\n};\n\nexport type UnsignedTransaction = {\n to?: string;\n nonce?: number;\n\n gasLimit?: BigNumberish;\n gasPrice?: BigNumberish;\n\n data?: BytesLike;\n value?: BigNumberish;\n chainId?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessListish;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n}\n\nexport interface Transaction {\n hash?: string;\n\n to?: string;\n from?: string;\n nonce: number;\n\n gasLimit: BigNumber;\n gasPrice?: BigNumber;\n\n data: string;\n value: BigNumber;\n chainId: number;\n\n r?: string;\n s?: string;\n v?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessList;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumber;\n maxFeePerGas?: BigNumber;\n}\n\n///////////////////////////////\n\nfunction handleAddress(value: string): string {\n if (value === \"0x\") { return null; }\n return getAddress(value);\n}\n\nfunction handleNumber(value: string): BigNumber {\n if (value === \"0x\") { return Zero; }\n return BigNumber.from(value);\n}\n\n// Legacy Transaction Fields\nconst transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" },\n];\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, type: true, value: true\n}\n\nexport function computeAddress(key: BytesLike | string): string {\n const publicKey = computePublicKey(key);\n return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));\n}\n\nexport function recoverAddress(digest: BytesLike, signature: SignatureLike): string {\n return computeAddress(recoverPublicKey(arrayify(digest), signature));\n}\n\nfunction formatNumber(value: BigNumberish, name: string): Uint8Array {\n const result = stripZeros(BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, (\"transaction:\" + name), value);\n }\n return result;\n}\n\nfunction accessSetify(addr: string, storageKeys: Array): { address: string,storageKeys: Array } {\n return {\n address: getAddress(addr),\n storageKeys: (storageKeys || []).map((storageKey, index) => {\n if (hexDataLength(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", `accessList[${ addr }:${ index }]`, storageKey)\n }\n return storageKey.toLowerCase();\n })\n };\n}\n\nexport function accessListify(value: AccessListish): AccessList {\n if (Array.isArray(value)) {\n return (] | { address: string, storageKeys: Array}>>value).map((set, index) => {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", `value[${ index }]`, set);\n }\n return accessSetify(set[0], set[1])\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n\n const result: Array<{ address: string, storageKeys: Array }> = Object.keys(value).map((addr) => {\n const storageKeys: Record = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, >{ });\n return accessSetify(addr, Object.keys(storageKeys).sort())\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\n\nfunction formatAccessList(value: AccessListish): Array<[ string, Array ]> {\n return accessListify(value).map((set) => [ set.address, set.storageKeys ]);\n}\n\nfunction _serializeEip1559(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // If there is an explicit gasPrice, make sure it matches the\n // EIP-1559 fees; otherwise they may not understand what they\n // think they are setting in terms of fee.\n if (transaction.gasPrice != null) {\n const gasPrice = BigNumber.from(transaction.gasPrice);\n const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice, maxFeePerGas\n });\n }\n }\n\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x02\", RLP.encode(fields)]);\n}\n\nfunction _serializeEip2930(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x01\", RLP.encode(fields)]);\n}\n\n// Legacy Transactions and EIP-155\nfunction _serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n checkProperties(transaction, allowedTransactionKeys);\n\n const raw: Array = [];\n\n transactionFields.forEach(function(fieldInfo) {\n let value = (transaction)[fieldInfo.name] || ([]);\n const options: DataOptions = { };\n if (fieldInfo.numeric) { options.hexPad = \"left\"; }\n value = arrayify(hexlify(value, options));\n\n // Fixed-width field\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n\n // Variable-width (with a maximum)\n if (fieldInfo.maxLength) {\n value = stripZeros(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value );\n }\n }\n\n raw.push(hexlify(value));\n });\n\n let chainId = 0;\n if (transaction.chainId != null) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = transaction.chainId;\n\n if (typeof(chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n\n } else if (signature && !isBytesLike(signature) && signature.v > 28) {\n // No chainId provided, but the signature is signing with EIP-155; derive chainId\n chainId = Math.floor((signature.v - 35) / 2);\n }\n\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== 0) {\n raw.push(hexlify(chainId)); // @TODO: hexValue?\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n\n // Requesting an unsigned transaction\n if (!signature) {\n return RLP.encode(raw);\n }\n\n // The splitSignature will ensure the transaction has a recoveryParam in the\n // case that the signTransaction function only adds a v.\n const sig = splitSignature(signature);\n\n // We pushed a chainId and null r, s on for hashing only; remove those\n let v = 27 + sig.recoveryParam\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v += chainId * 2 + 8;\n\n // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it!\n if (sig.v > 28 && sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n\n raw.push(hexlify(v));\n raw.push(stripZeros(arrayify(sig.r)));\n raw.push(stripZeros(arrayify(sig.s)));\n\n return RLP.encode(raw);\n}\n\nexport function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // Legacy and EIP-155 Transactions\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n\n // Typed Transactions (EIP-2718)\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ transaction.type }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n}\n\nfunction _parseEipSignature(tx: Transaction, fields: Array, serialize: (tx: UnsignedTransaction) => string): void {\n try {\n const recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) { throw new Error(\"bad recid\"); }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n\n tx.r = hexZeroPad(fields[1], 32);\n tx.s = hexZeroPad(fields[2], 32);\n\n try {\n const digest = keccak256(serialize(tx));\n tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n console.log(error);\n }\n}\n\nfunction _parseEip1559(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", hexlify(payload));\n }\n\n const maxPriorityFeePerGas = handleNumber(transaction[2]);\n const maxFeePerGas = handleNumber(transaction[3]);\n const tx: Transaction = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas: maxPriorityFeePerGas,\n maxFeePerGas: maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8]),\n };\n\n // Unsigned EIP-1559 Transaction\n if (transaction.length === 9) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n\n return tx;\n}\n\nfunction _parseEip2930(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", hexlify(payload));\n }\n\n const tx: Transaction = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n\n // Unsigned EIP-2930 Transaction\n if (transaction.length === 8) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n\n return tx;\n}\n\n// Legacy Transactions and EIP-155\nfunction _parse(rawTransaction: Uint8Array): Transaction {\n const transaction = RLP.decode(rawTransaction);\n\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n\n const tx: Transaction = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n\n // Legacy unsigned transaction\n if (transaction.length === 6) { return tx; }\n\n try {\n tx.v = BigNumber.from(transaction[6]).toNumber();\n\n } catch (error) {\n console.log(error);\n return tx;\n }\n\n tx.r = hexZeroPad(transaction[7], 32);\n tx.s = hexZeroPad(transaction[8], 32);\n\n if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) {\n // EIP-155 unsigned transaction\n tx.chainId = tx.v;\n tx.v = 0;\n\n } else {\n // Signed Transaction\n\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) { tx.chainId = 0; }\n\n let recoveryParam = tx.v - 27;\n\n const raw = transaction.slice(0, 6);\n\n if (tx.chainId !== 0) {\n raw.push(hexlify(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n\n const digest = keccak256(RLP.encode(raw));\n try {\n tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam });\n } catch (error) {\n console.log(error);\n }\n\n tx.hash = keccak256(rawTransaction);\n }\n\n tx.type = null;\n\n return tx;\n}\n\n\nexport function parse(rawTransaction: BytesLike): Transaction {\n const payload = arrayify(rawTransaction);\n\n // Legacy and EIP-155 Transactions\n if (payload[0] > 0x7f) { return _parse(payload); }\n\n // Typed Transaction (EIP-2718)\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ payload[0] }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n}\n\n","export const version = \"contracts/5.5.0\";\n","\"use strict\";\n\nimport { checkResultErrors, EventFragment, Fragment, FunctionFragment, Indexed, Interface, JsonFragment, LogDescription, ParamType, Result } from \"@ethersproject/abi\";\nimport { Block, BlockTag, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, AccessListish } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\nexport interface Overrides {\n gasLimit?: BigNumberish | Promise;\n gasPrice?: BigNumberish | Promise;\n maxFeePerGas?: BigNumberish | Promise;\n maxPriorityFeePerGas?: BigNumberish | Promise;\n nonce?: BigNumberish | Promise;\n type?: number;\n accessList?: AccessListish;\n customData?: Record;\n};\n\nexport interface PayableOverrides extends Overrides {\n value?: BigNumberish | Promise;\n}\n\nexport interface CallOverrides extends PayableOverrides {\n blockTag?: BlockTag | Promise;\n from?: string | Promise;\n}\n\n// @TODO: Better hierarchy with: (in v6)\n// - abstract-provider:TransactionRequest\n// - transactions:Transaction\n// - transaction:UnsignedTransaction\n\nexport interface PopulatedTransaction {\n to?: string;\n from?: string;\n nonce?: number;\n\n gasLimit?: BigNumber;\n gasPrice?: BigNumber;\n\n data?: string;\n value?: BigNumber;\n chainId?: number;\n\n type?: number;\n accessList?: AccessList;\n\n maxFeePerGas?: BigNumber;\n maxPriorityFeePerGas?: BigNumber;\n\n customData?: Record;\n};\n\nexport type EventFilter = {\n address?: string;\n topics?: Array>;\n};\n\n\nexport type ContractFunction = (...args: Array) => Promise;\n\n\n// The (n + 1)th parameter passed to contract event callbacks\nexport interface Event extends Log {\n\n // The event name\n event?: string;\n\n // The event signature\n eventSignature?: string;\n\n // The parsed arguments to the event\n args?: Result;\n\n // If parsing the arguments failed, this is the error\n decodeError?: Error;\n\n // A function that can be used to decode event data and topics\n decode?: (data: string, topics?: Array) => any;\n\n // A function that will remove the listener responsible for this event (if any)\n removeListener: () => void;\n\n // Get blockchain details about this event's block and transaction\n getBlock: () => Promise;\n getTransaction: () => Promise;\n getTransactionReceipt: () => Promise;\n}\n\nexport interface ContractReceipt extends TransactionReceipt {\n events?: Array;\n}\n\nexport interface ContractTransaction extends TransactionResponse {\n wait(confirmations?: number): Promise;\n}\n\n///////////////////////////////\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, from: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true,\n customData: true\n}\n\nasync function resolveName(resolver: Signer | Provider, nameOrPromise: string | Promise): Promise {\n const name = await nameOrPromise;\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n\n // If it is already an address, just use it (after adding checksum)\n try {\n return getAddress(name);\n } catch (error) { }\n\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n\n const address = await resolver.resolveName(name);\n\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n\n return address;\n}\n\n// Recursively replaces ENS names with promises to resolve the name and resolves all properties\nasync function resolveAddresses(resolver: Signer | Provider, value: any, paramType: ParamType | Array): Promise {\n if (Array.isArray(paramType)) {\n return await Promise.all(paramType.map((paramType, index) => {\n return resolveAddresses(\n resolver,\n ((Array.isArray(value)) ? value[index]: value[paramType.name]),\n paramType\n );\n }));\n }\n\n if (paramType.type === \"address\") {\n return await resolveName(resolver, value);\n }\n\n if (paramType.type === \"tuple\") {\n return await resolveAddresses(resolver, value, paramType.components);\n }\n\n if (paramType.baseType === \"array\") {\n if (!Array.isArray(value)) {\n return Promise.reject(logger.makeError(\"invalid value for array\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }));\n }\n return await Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren)));\n }\n\n return value;\n}\n\nasync function populateTransaction(contract: Contract, fragment: FunctionFragment, args: Array): Promise {\n // If an extra argument is given, it is overrides\n let overrides: CallOverrides = { };\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n overrides = shallowCopy(args.pop());\n }\n\n // Make sure the parameter count matches\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n\n // Populate \"from\" override (allow promises)\n if (contract.signer) {\n if (overrides.from) {\n // Contracts with a Signer are from the Signer's frame-of-reference;\n // but we allow overriding \"from\" if it matches the signer\n overrides.from = resolveProperties({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(async (check) => {\n if (getAddress(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n\n return check.override;\n });\n\n } else {\n overrides.from = contract.signer.getAddress();\n }\n\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n\n //} else {\n // Contracts without a signer can override \"from\", and if\n // unspecified the zero address is used\n //overrides.from = AddressZero;\n }\n\n // Wait for all dependencies to be resolved (prefer the signer over the provider)\n const resolved = await resolveProperties({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (resolveProperties(overrides) || { })\n });\n\n // The ABI coded transaction\n const data = contract.interface.encodeFunctionData(fragment, resolved.args);\n const tx: PopulatedTransaction = {\n data: data,\n to: resolved.address\n };\n\n // Resolved Overrides\n const ro = resolved.overrides;\n\n // Populate simple overrides\n if (ro.nonce != null) { tx.nonce = BigNumber.from(ro.nonce).toNumber(); }\n if (ro.gasLimit != null) { tx.gasLimit = BigNumber.from(ro.gasLimit); }\n if (ro.gasPrice != null) { tx.gasPrice = BigNumber.from(ro.gasPrice); }\n if (ro.maxFeePerGas != null) { tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); }\n if (ro.maxPriorityFeePerGas != null) { tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); }\n if (ro.from != null) { tx.from = ro.from; }\n\n if (ro.type != null) { tx.type = ro.type; }\n if (ro.accessList != null) { tx.accessList = accessListify(ro.accessList); }\n\n // If there was no \"gasLimit\" override, but the ABI specifies a default, use it\n if (tx.gasLimit == null && fragment.gas != null) {\n // Compute the intrinsic gas cost for this transaction\n // @TODO: This is based on the yellow paper as of Petersburg; this is something\n // we may wish to parameterize in v6 as part of the Network object. Since this\n // is always a non-nil to address, we can ignore G_create, but may wish to add\n // similar logic to the ContractFactory.\n let intrinsic = 21000;\n const bytes = arrayify(data);\n for (let i = 0; i < bytes.length; i++) {\n intrinsic += 4;\n if (bytes[i]) { intrinsic += 64; }\n }\n tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic);\n }\n\n // Populate \"value\" override\n if (ro.value) {\n const roValue = BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n\n if (ro.customData) {\n tx.customData = shallowCopy(ro.customData);\n }\n\n // Remove the overrides\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n\n delete overrides.type;\n delete overrides.accessList;\n\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n\n delete overrides.customData;\n\n // Make sure there are no stray overrides, which may indicate a\n // typo or using an unsupported key.\n const leftovers = Object.keys(overrides).filter((key) => ((overrides)[key] != null));\n if (leftovers.length) {\n logger.throwError(`cannot override ${ leftovers.map((l) => JSON.stringify(l)).join(\",\") }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n\n return tx;\n}\n\n\nfunction buildPopulate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return function(...args: Array): Promise {\n return populateTransaction(contract, fragment, args);\n };\n}\n\nfunction buildEstimate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n return async function(...args: Array): Promise {\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n })\n }\n\n const tx = await populateTransaction(contract, fragment, args);\n return await signerOrProvider.estimateGas(tx);\n };\n}\n\nfunction addContractWait(contract: Contract, tx: TransactionResponse) {\n const wait = tx.wait.bind(tx);\n tx.wait = (confirmations?: number) => {\n return wait(confirmations).then((receipt: ContractReceipt) => {\n receipt.events = receipt.logs.map((log) => {\n let event: Event = (deepCopy(log));\n let parsed: LogDescription = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e){ }\n\n // Successfully parsed the event log; include it\n if (parsed) {\n event.args = parsed.args;\n event.decode = (data: BytesLike, topics?: Array) => {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n\n // Useful operations\n event.removeListener = () => { return contract.provider; }\n event.getBlock = () => {\n return contract.provider.getBlock(receipt.blockHash);\n }\n event.getTransaction = () => {\n return contract.provider.getTransaction(receipt.transactionHash);\n }\n event.getTransactionReceipt = () => {\n return Promise.resolve(receipt);\n }\n\n return event;\n });\n\n return receipt;\n });\n };\n}\n\nfunction buildCall(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n\n return async function(...args: Array): Promise {\n // Extract the \"blockTag\" override if present\n let blockTag = undefined;\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n const overrides = shallowCopy(args.pop());\n if (overrides.blockTag != null) {\n blockTag = await overrides.blockTag;\n }\n delete overrides.blockTag;\n args.push(overrides);\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed(blockTag);\n }\n\n // Call a node and get the result\n const tx = await populateTransaction(contract, fragment, args);\n const result = await signerOrProvider.call(tx, blockTag);\n\n try {\n let value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return value;\n\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n };\n}\n\nfunction buildSend(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return async function(...args: Array): Promise {\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n })\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed();\n }\n\n const txRequest = await populateTransaction(contract, fragment, args);\n\n const tx = await contract.signer.sendTransaction(txRequest);\n\n // Tweak the tx.wait so the receipt has extra properties\n addContractWait(contract, tx);\n\n return tx;\n };\n}\n\nfunction buildDefault(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n}\n\nfunction getEventTag(filter: EventFilter): string {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map((topic) => {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\"): \"\");\n}\n\nclass RunningEvent {\n readonly tag: string;\n readonly filter: EventFilter;\n private _listeners: Array<{ listener: Listener, once: boolean }>;\n\n constructor(tag: string, filter: EventFilter) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"filter\", filter);\n this._listeners = [ ];\n }\n\n addListener(listener: Listener, once: boolean): void {\n this._listeners.push({ listener: listener, once: once });\n }\n\n removeListener(listener: Listener): void {\n let done = false;\n this._listeners = this._listeners.filter((item) => {\n if (done || item.listener !== listener) { return true; }\n done = true;\n return false;\n });\n }\n\n removeAllListeners(): void {\n this._listeners = [];\n }\n\n listeners(): Array {\n return this._listeners.map((i) => i.listener);\n }\n\n listenerCount(): number {\n return this._listeners.length;\n }\n\n run(args: Array): number {\n const listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter((item) => {\n\n const argsCopy = args.slice();\n\n // Call the callback in the next event loop\n setTimeout(() => {\n item.listener.apply(this, argsCopy);\n }, 0);\n\n // Reschedule it if it not \"once\"\n return !(item.once);\n });\n\n return listenerCount;\n }\n\n prepareEvent(event: Event): void {\n }\n\n // Returns the array that will be applied to an emit\n getEmit(event: Event): Array {\n return [ event ];\n }\n}\n\nclass ErrorRunningEvent extends RunningEvent {\n constructor() {\n super(\"error\", null);\n }\n}\n\n\n// @TODO Fragment should inherit Wildcard? and just override getEmit?\n// or have a common abstract super class, with enough constructor\n// options to configure both.\n\n// A Fragment Event will populate all the properties that Wildcard\n// will, and additionally dereference the arguments when emitting\nclass FragmentRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n readonly fragment: EventFragment;\n\n constructor(address: string, contractInterface: Interface, fragment: EventFragment, topics?: Array>) {\n const filter: EventFilter = {\n address: address\n }\n\n let topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) { logger.throwArgumentError(\"topic mismatch\", \"topics\", topics); }\n filter.topics = topics.slice();\n } else {\n filter.topics = [ topic ];\n }\n\n super(getEventTag(filter), filter);\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n defineReadOnly(this, \"fragment\", fragment);\n }\n\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(this.fragment, data, topics);\n };\n\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n }\n\n getEmit(event: Event): Array {\n const errors = checkResultErrors(event.args);\n if (errors.length) { throw errors[0].error; }\n\n const args = (event.args || []).slice();\n args.push(event);\n return args;\n }\n}\n\n// A Wildcard Event will attempt to populate:\n// - event The name of the event name\n// - eventSignature The full signature of the event\n// - decode A function to decode data and topics\n// - args The decoded data and topics\nclass WildcardRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n\n constructor(address: string, contractInterface: Interface) {\n super(\"*\", { address: address });\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n }\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n try {\n const parsed = this.interface.parseLog(event);\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n\n event.args = parsed.args;\n } catch (error) {\n // No matching event\n }\n }\n}\n\nexport type ContractInterface = string | ReadonlyArray | Interface;\n\ntype InterfaceFunc = (contractInterface: ContractInterface) => Interface;\n\n\nexport class BaseContract {\n readonly address: string;\n readonly interface: Interface;\n\n readonly signer: Signer;\n readonly provider: Provider;\n\n readonly functions: { [ name: string ]: ContractFunction };\n\n readonly callStatic: { [ name: string ]: ContractFunction };\n readonly estimateGas: { [ name: string ]: ContractFunction };\n readonly populateTransaction: { [ name: string ]: ContractFunction };\n\n readonly filters: { [ name: string ]: (...args: Array) => EventFilter };\n\n // This will always be an address. This will only differ from\n // address if an ENS name was used in the constructor\n readonly resolvedAddress: Promise;\n\n // This is only set if the contract was created with a call to deploy\n readonly deployTransaction: TransactionResponse;\n\n _deployedPromise: Promise;\n\n // A list of RunningEvents to track listeners for each event tag\n _runningEvents: { [ eventTag: string ]: RunningEvent };\n\n // Wrapped functions to call emit and allow deregistration from the provider\n _wrappedEmits: { [ eventTag: string ]: (...args: Array) => void };\n\n constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider) {\n logger.checkNew(new.target, Contract);\n\n // @TODO: Maybe still check the addressOrName looks like a valid address or name?\n //address = getAddress(address);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n\n if (signerOrProvider == null) {\n defineReadOnly(this, \"provider\", null);\n defineReadOnly(this, \"signer\", null);\n } else if (Signer.isSigner(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider.provider || null);\n defineReadOnly(this, \"signer\", signerOrProvider);\n } else if (Provider.isProvider(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider);\n defineReadOnly(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n\n defineReadOnly(this, \"callStatic\", { });\n defineReadOnly(this, \"estimateGas\", { });\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"populateTransaction\", { });\n\n defineReadOnly(this, \"filters\", { });\n\n {\n const uniqueFilters: { [ name: string ]: Array } = { };\n Object.keys(this.interface.events).forEach((eventSignature) => {\n const event = this.interface.events[eventSignature];\n defineReadOnly(this.filters, eventSignature, (...args: Array) => {\n return {\n address: this.address,\n topics: this.interface.encodeFilterTopics(event, args)\n }\n });\n if (!uniqueFilters[event.name]) { uniqueFilters[event.name] = [ ]; }\n uniqueFilters[event.name].push(eventSignature);\n });\n\n Object.keys(uniqueFilters).forEach((name) => {\n const filters = uniqueFilters[name];\n if (filters.length === 1) {\n defineReadOnly(this.filters, name, this.filters[filters[0]]);\n } else {\n logger.warn(`Duplicate definition of ${ name } (${ filters.join(\", \")})`);\n }\n });\n }\n\n defineReadOnly(this, \"_runningEvents\", { });\n defineReadOnly(this, \"_wrappedEmits\", { });\n\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n\n defineReadOnly(this, \"address\", addressOrName);\n if (this.provider) {\n defineReadOnly(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n defineReadOnly(this, \"resolvedAddress\", Promise.resolve(getAddress(addressOrName)));\n } catch (error) {\n // Without a provider, we cannot use ENS names\n logger.throwError(\"provider is required to use ENS name as contract address\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n\n const uniqueNames: { [ name: string ]: Array } = { };\n const uniqueSignatures: { [ signature: string ]: boolean } = { };\n Object.keys(this.interface.functions).forEach((signature) => {\n const fragment = this.interface.functions[signature];\n\n // Check that the signature is unique; if not the ABI generation has\n // not been cleaned or may be incorrectly generated\n if (uniqueSignatures[signature]) {\n logger.warn(`Duplicate ABI entry for ${ JSON.stringify(signature) }`);\n return;\n }\n uniqueSignatures[signature] = true;\n\n // Track unique names; we only expose bare named functions if they\n // are ambiguous\n {\n const name = fragment.name;\n if (!uniqueNames[`%${ name }`]) { uniqueNames[`%${ name }`] = [ ]; }\n uniqueNames[`%${ name }`].push(signature);\n }\n\n if ((this)[signature] == null) {\n defineReadOnly(this, signature, buildDefault(this, fragment, true));\n }\n\n // We do not collapse simple calls on this bucket, which allows\n // frameworks to safely use this without introspection as well as\n // allows decoding error recovery.\n if (this.functions[signature] == null) {\n defineReadOnly(this.functions, signature, buildDefault(this, fragment, false));\n }\n\n if (this.callStatic[signature] == null) {\n defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true));\n }\n\n if (this.populateTransaction[signature] == null) {\n defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment));\n }\n\n if (this.estimateGas[signature] == null) {\n defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment));\n }\n });\n\n Object.keys(uniqueNames).forEach((name) => {\n // Ambiguous names to not get attached as bare names\n const signatures = uniqueNames[name];\n if (signatures.length > 1) { return; }\n\n // Strip off the leading \"%\" used for prototype protection\n name = name.substring(1);\n\n const signature = signatures[0];\n\n // If overwriting a member property that is null, swallow the error\n try {\n if ((this)[name] == null) {\n defineReadOnly(this, name, (this)[signature]);\n }\n } catch (e) { }\n\n if (this.functions[name] == null) {\n defineReadOnly(this.functions, name, this.functions[signature]);\n }\n\n if (this.callStatic[name] == null) {\n defineReadOnly(this.callStatic, name, this.callStatic[signature]);\n }\n\n if (this.populateTransaction[name] == null) {\n defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]);\n }\n\n if (this.estimateGas[name] == null) {\n defineReadOnly(this.estimateGas, name, this.estimateGas[signature]);\n }\n });\n }\n\n static getContractAddress(transaction: { from: string, nonce: BigNumberish }): string {\n return getContractAddress(transaction);\n }\n\n static getInterface(contractInterface: ContractInterface): Interface {\n if (Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new Interface(contractInterface);\n }\n\n // @TODO: Allow timeout?\n deployed(): Promise {\n return this._deployed();\n }\n\n _deployed(blockTag?: BlockTag): Promise {\n if (!this._deployedPromise) {\n\n // If we were just deployed, we know the transaction we should occur in\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(() => {\n return this;\n });\n\n } else {\n // @TODO: Once we allow a timeout to be passed in, we will wait\n // up to that many blocks for getCode\n\n // Otherwise, poll for our code to be deployed\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: this.address,\n operation: \"getDeployed\"\n });\n }\n return this;\n });\n }\n }\n\n return this._deployedPromise;\n }\n\n // @TODO:\n // estimateFallback(overrides?: TransactionRequest): Promise\n\n // @TODO:\n // estimateDeploy(bytecode: string, ...args): Promise\n\n fallback(overrides?: TransactionRequest): Promise {\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" })\n }\n\n const tx: Deferrable = shallowCopy(overrides || {});\n\n [\"from\", \"to\"].forEach(function(key) {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n tx.to = this.resolvedAddress;\n return this.deployed().then(() => {\n return this.signer.sendTransaction(tx);\n });\n }\n\n // Reconnect to a different signer or provider\n connect(signerOrProvider: Signer | Provider | string): Contract {\n if (typeof(signerOrProvider) === \"string\") {\n signerOrProvider = new VoidSigner(signerOrProvider, this.provider);\n }\n\n const contract = new (<{ new(...args: any[]): Contract }>(this.constructor))(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n defineReadOnly(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n }\n\n // Re-attach to a different on-chain instance of this contract\n attach(addressOrName: string): Contract {\n return new (<{ new(...args: any[]): Contract }>(this.constructor))(addressOrName, this.interface, this.signer || this.provider);\n }\n\n static isIndexed(value: any): value is Indexed {\n return Indexed.isIndexed(value);\n }\n\n private _normalizeRunningEvent(runningEvent: RunningEvent): RunningEvent {\n // Already have an instance of this event running; we can re-use it\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent\n }\n\n private _getRunningEvent(eventName: EventFilter | string): RunningEvent {\n if (typeof(eventName) === \"string\") {\n\n // Listen for \"error\" events (if your contract has an error event, include\n // the full signature to bypass this special event keyword)\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n\n // Listen for any event that is registered\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n\n // Listen for any event\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n // Get the event Fragment (throws if ambiguous/unknown event)\n const fragment = this.interface.getEvent(eventName)\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n\n // We have topics to filter by...\n if (eventName.topics && eventName.topics.length > 0) {\n\n // Is it a known topichash? (throws if no matching topichash)\n try {\n const topic = eventName.topics[0];\n if (typeof(topic) !== \"string\") {\n throw new Error(\"invalid topic\"); // @TODO: May happen for anonymous events\n }\n const fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) { }\n\n // Filter by the unknown topichash\n const filter: EventFilter = {\n address: this.address,\n topics: eventName.topics\n }\n\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n _checkRunningEvents(runningEvent: RunningEvent): void {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n\n // If we have a poller for this, remove it\n const emit = this._wrappedEmits[runningEvent.tag];\n if (emit && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n }\n\n // Subclasses can override this to gracefully recover\n // from parse errors if they wish\n _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event {\n const event = deepCopy(log);\n\n event.removeListener = () => {\n if (!listener) { return; }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); }\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); }\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); }\n\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n\n return event;\n }\n\n private _addEventListener(runningEvent: RunningEvent, listener: Listener, once: boolean): void {\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" })\n }\n\n runningEvent.addListener(listener, once);\n\n // Track this running event and its listeners (may already be there; but no hard in updating)\n this._runningEvents[runningEvent.tag] = runningEvent;\n\n // If we are not polling the provider, start polling\n if (!this._wrappedEmits[runningEvent.tag]) {\n const wrappedEmit = (log: Log) => {\n let event = this._wrapEvent(runningEvent, log, listener);\n\n // Try to emit the result for the parameterized event...\n if (event.decodeError == null) {\n try {\n const args = runningEvent.getEmit(event);\n this.emit(runningEvent.filter, ...args);\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n\n // Always emit \"event\" for fragment-base events\n if (runningEvent.filter != null) {\n this.emit(\"event\", event);\n }\n\n // Emit \"error\" if there was an error\n if (event.decodeError != null) {\n this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n\n // Special events, like \"error\" do not have a filter\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n }\n\n queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise> {\n const runningEvent = this._getRunningEvent(event);\n const filter = shallowCopy(runningEvent.filter);\n\n if (typeof(fromBlockOrBlockhash) === \"string\" && isHexString(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n (filter).blockHash = fromBlockOrBlockhash;\n } else {\n (filter).fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash: 0);\n (filter).toBlock = ((toBlock != null) ? toBlock: \"latest\");\n }\n\n return this.provider.getLogs(filter).then((logs) => {\n return logs.map((log) => this._wrapEvent(runningEvent, log, null));\n });\n }\n\n on(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n }\n\n once(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n }\n\n emit(eventName: EventFilter | string, ...args: Array): boolean {\n if (!this.provider) { return false; }\n\n const runningEvent = this._getRunningEvent(eventName);\n const result = (runningEvent.run(args) > 0);\n\n // May have drained all the \"once\" events; check for living events\n this._checkRunningEvents(runningEvent);\n\n return result;\n }\n\n listenerCount(eventName?: EventFilter | string): number {\n if (!this.provider) { return 0; }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce((accum, key) => {\n return accum + this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n }\n\n listeners(eventName?: EventFilter | string): Array {\n if (!this.provider) { return []; }\n\n if (eventName == null) {\n const result: Array = [ ];\n for (let tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach((listener) => {\n result.push(listener)\n });\n }\n return result;\n }\n\n return this._getRunningEvent(eventName).listeners();\n }\n\n removeAllListeners(eventName?: EventFilter | string): this {\n if (!this.provider) { return this; }\n\n if (eventName == null) {\n for (const tag in this._runningEvents) {\n const runningEvent = this._runningEvents[tag];\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n }\n return this;\n }\n\n // Delete any listeners\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n\n return this;\n }\n\n off(eventName: EventFilter | string, listener: Listener): this {\n if (!this.provider) { return this; }\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n }\n\n removeListener(eventName: EventFilter | string, listener: Listener): this {\n return this.off(eventName, listener);\n }\n\n}\n\nexport class Contract extends BaseContract {\n // The meta-class properties\n readonly [ key: string ]: ContractFunction | any;\n}\n\nexport class ContractFactory {\n\n readonly interface: Interface;\n readonly bytecode: string;\n readonly signer: Signer;\n\n constructor(contractInterface: ContractInterface, bytecode: BytesLike | { object: string }, signer?: Signer) {\n\n let bytecodeHex: string = null;\n\n if (typeof(bytecode) === \"string\") {\n bytecodeHex = bytecode;\n } else if (isBytes(bytecode)) {\n bytecodeHex = hexlify(bytecode);\n } else if (bytecode && typeof(bytecode.object) === \"string\") {\n // Allow the bytecode object from the Solidity compiler\n bytecodeHex = (bytecode).object;\n } else {\n // Crash in the next verification step\n bytecodeHex = \"!\";\n }\n\n // Make sure it is 0x prefixed\n if (bytecodeHex.substring(0, 2) !== \"0x\") { bytecodeHex = \"0x\" + bytecodeHex; }\n\n // Make sure the final result is valid bytecode\n if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n\n // If we have a signer, make sure it is valid\n if (signer && !Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n\n defineReadOnly(this, \"bytecode\", bytecodeHex);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n defineReadOnly(this, \"signer\", signer || null);\n }\n\n // @TODO: Future; rename to populateTransaction?\n getDeployTransaction(...args: Array): TransactionRequest {\n let tx: TransactionRequest = { };\n\n // If we have 1 additional argument, we allow transaction overrides\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n tx = shallowCopy(args.pop());\n for (const key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n\n // Do not allow these to be overridden in a deployment transaction\n [\"data\", \"from\", \"to\"].forEach((key) => {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n if (tx.value) {\n const value = BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Set the data to the bytecode + the encoded constructor arguments\n tx.data = hexlify(concat([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n\n return tx\n }\n\n async deploy(...args: Array): Promise {\n\n let overrides: any = { };\n\n // If 1 extra parameter was passed in, it contains overrides\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Resolve ENS names and promises in the arguments\n const params = await resolveAddresses(this.signer, args, this.interface.deploy.inputs);\n params.push(overrides);\n\n // Get the deployment transaction (with optional overrides)\n const unsignedTx = this.getDeployTransaction(...params);\n\n // Send the deployment transaction\n const tx = await this.signer.sendTransaction(unsignedTx);\n\n const address = getStatic<(tx: TransactionResponse) => string>(this.constructor, \"getContractAddress\")(tx);\n const contract = getStatic<(address: string, contractInterface: ContractInterface, signer?: Signer) => Contract>(this.constructor, \"getContract\")(address, this.interface, this.signer);\n\n // Add the modified wait that wraps events\n addContractWait(contract, tx);\n\n defineReadOnly(contract, \"deployTransaction\", tx);\n return contract;\n }\n\n attach(address: string): Contract {\n return ((this.constructor)).getContract(address, this.interface, this.signer);\n }\n\n connect(signer: Signer) {\n return new (<{ new(...args: any[]): ContractFactory }>(this.constructor))(this.interface, this.bytecode, signer);\n }\n\n static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n\n if (typeof(compilerOutput) === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n\n const abi = compilerOutput.abi;\n\n let bytecode: any = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n\n return new this(abi, bytecode, signer);\n }\n\n static getInterface(contractInterface: ContractInterface) {\n return Contract.getInterface(contractInterface);\n }\n\n static getContractAddress(tx: { from: string, nonce: BytesLike | BigNumber | number }): string {\n return getContractAddress(tx);\n }\n\n static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract {\n return new Contract(address, contractInterface, signer);\n }\n}\n","/**\n * var basex = require(\"base-x\");\n *\n * This implementation is heavily based on base-x. The main reason to\n * deviate was to prevent the dependency of Buffer.\n *\n * Contributors:\n *\n * base-x encoding\n * Forked from https://github.com/cryptocoinjs/bs58\n * Originally written by Mike Hearn for BitcoinJ\n * Copyright (c) 2011 Google Inc\n * Ported to JavaScript by Stefan Thomas\n * Merged Buffer refactorings from base58-native by Stephen Pair\n * Copyright (c) 2013 BitPay Inc\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n */\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nexport class BaseX {\n readonly alphabet: string;\n readonly base: number;\n\n _alphabetMap: { [ character: string ]: number };\n _leader: string;\n\n constructor(alphabet: string) {\n defineReadOnly(this, \"alphabet\", alphabet);\n defineReadOnly(this, \"base\", alphabet.length);\n\n defineReadOnly(this, \"_alphabetMap\", { });\n defineReadOnly(this, \"_leader\", alphabet.charAt(0));\n\n // pre-compute lookup table\n for (let i = 0; i < alphabet.length; i++) {\n this._alphabetMap[alphabet.charAt(i)] = i;\n }\n }\n\n encode(value: BytesLike): string {\n let source = arrayify(value);\n\n if (source.length === 0) { return \"\"; }\n\n let digits = [ 0 ]\n for (let i = 0; i < source.length; ++i) {\n let carry = source[i];\n for (let j = 0; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % this.base;\n carry = (carry / this.base) | 0;\n }\n\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = (carry / this.base) | 0;\n }\n }\n\n let string = \"\"\n\n // deal with leading zeros\n for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) {\n string += this._leader;\n }\n\n // convert digits to a string\n for (let q = digits.length - 1; q >= 0; --q) {\n string += this.alphabet[digits[q]];\n }\n\n return string;\n }\n\n decode(value: string): Uint8Array {\n if (typeof(value) !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n\n let bytes: Array = [];\n if (value.length === 0) { return new Uint8Array(bytes); }\n\n bytes.push(0);\n for (let i = 0; i < value.length; i++) {\n let byte = this._alphabetMap[value[i]];\n\n if (byte === undefined) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n\n let carry = byte;\n for (let j = 0; j < bytes.length; ++j) {\n carry += bytes[j] * this.base;\n bytes[j] = carry & 0xff;\n carry >>= 8;\n }\n\n while (carry > 0) {\n bytes.push(carry & 0xff);\n carry >>= 8;\n }\n }\n\n // deal with leading zeros\n for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) {\n bytes.push(0)\n }\n\n return arrayify(new Uint8Array(bytes.reverse()))\n }\n}\n\nconst Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\nconst Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n\nexport { Base32, Base58 };\n\n//console.log(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\"))\n//console.log(Base58.encode(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\")))\n","export enum SupportedAlgorithm { sha256 = \"sha256\", sha512 = \"sha512\" };\n\n","export const version = \"sha2/5.5.0\";\n","\"use strict\";\n\nimport hash from \"hash.js\";\n//const _ripemd160 = _hash.ripemd160;\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { SupportedAlgorithm } from \"./types\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function ripemd160(data: BytesLike): string {\n return \"0x\" + (hash.ripemd160().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha256(data: BytesLike): string {\n return \"0x\" + (hash.sha256().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha512(data: BytesLike): string {\n return \"0x\" + (hash.sha512().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string {\n if (!SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm: algorithm\n });\n }\n\n return \"0x\" + hash.hmac((hash)[algorithm], arrayify(key)).update(arrayify(data)).digest(\"hex\");\n}\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { computeHmac, SupportedAlgorithm } from \"@ethersproject/sha2\";\n\nexport function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string {\n password = arrayify(password);\n salt = arrayify(salt);\n let hLen;\n let l = 1;\n const DK = new Uint8Array(keylen)\n const block1 = new Uint8Array(salt.length + 4)\n block1.set(salt);\n //salt.copy(block1, 0, 0, salt.length)\n\n let r: number;\n let T: Uint8Array;\n\n for (let i = 1; i <= l; i++) {\n //block1.writeUInt32BE(i, salt.length)\n block1[salt.length] = (i >> 24) & 0xff;\n block1[salt.length + 1] = (i >> 16) & 0xff;\n block1[salt.length + 2] = (i >> 8) & 0xff;\n block1[salt.length + 3] = i & 0xff;\n\n //let U = createHmac(password).update(block1).digest();\n let U = arrayify(computeHmac(hashAlgorithm, password, block1));\n\n if (!hLen) {\n hLen = U.length\n T = new Uint8Array(hLen)\n l = Math.ceil(keylen / hLen)\n r = keylen - (l - 1) * hLen\n }\n\n //U.copy(T, 0, 0, hLen)\n T.set(U);\n\n\n for (let j = 1; j < iterations; j++) {\n //U = createHmac(password).update(U).digest();\n U = arrayify(computeHmac(hashAlgorithm, password, U));\n for (let k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n\n const destPos = (i - 1) * hLen\n const len = (i === l ? r : hLen)\n //T.copy(DK, destPos, 0, len)\n DK.set(arrayify(T).slice(0, len), destPos);\n }\n\n return hexlify(DK)\n}\n\n","export const version = \"wordlists/5.5.0\";\n","\"use strict\";\n\n// This gets overridden by rollup\nconst exportWordlist = false;\n\nimport { id } from \"@ethersproject/hash\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nexport const logger = new Logger(version);\n\nexport abstract class Wordlist {\n readonly locale: string;\n\n constructor(locale: string) {\n logger.checkAbstract(new.target, Wordlist);\n defineReadOnly(this, \"locale\", locale);\n }\n\n abstract getWord(index: number): string;\n abstract getWordIndex(word: string): number;\n\n // Subclasses may override this\n split(mnemonic: string): Array {\n return mnemonic.toLowerCase().split(/ +/g)\n }\n\n // Subclasses may override this\n join(words: Array): string {\n return words.join(\" \");\n }\n\n static check(wordlist: Wordlist): string {\n const words = [];\n for (let i = 0; i < 2048; i++) {\n const word = wordlist.getWord(i);\n /* istanbul ignore if */\n if (i !== wordlist.getWordIndex(word)) { return \"0x\"; }\n words.push(word);\n }\n return id(words.join(\"\\n\") + \"\\n\");\n }\n\n static register(lang: Wordlist, name?: string): void {\n if (!name) { name = lang.locale; }\n\n /* istanbul ignore if */\n if (exportWordlist) {\n try {\n const anyGlobal = (window as any)\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n defineReadOnly(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) { }\n }\n }\n\n}\n\n","\"use strict\";\n\nimport { Wordlist } from \"./wordlist\";\n\n\nconst words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n\nlet wordlist: Array = null;\n\n\nfunction loadWords(lang: Wordlist): void {\n if (wordlist != null) { return; }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n\n // Verify the computed list matches the official list\n /* istanbul ignore if */\n if (Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n}\n\nclass LangEn extends Wordlist {\n constructor() {\n super(\"en\");\n }\n\n getWord(index: number): string {\n loadWords(this);\n return wordlist[index];\n }\n\n getWordIndex(word: string): number {\n loadWords(this);\n return wordlist.indexOf(word);\n }\n}\n\nconst langEn = new LangEn();\nWordlist.register(langEn);\n\nexport { langEn };\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\n// Browser; only include English by default\n\nimport { Wordlist } from \"./wordlist\";\n\nimport { langEn as en } from \"./lang-en\";\n\nexport const wordlists: { [ locale: string ]: Wordlist } = {\n en: en\n}\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\nimport { logger, Wordlist } from \"./wordlist\";\n\nimport { wordlists } from \"./wordlists\";\n\nexport {\n logger,\n Wordlist,\n wordlists\n}\n","export const version = \"hdnode/5.5.0\";\n","\"use strict\";\n\n// See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\n\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexZeroPad, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from \"@ethersproject/strings\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { computeHmac, ripemd160, sha256, SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { computeAddress } from \"@ethersproject/transactions\";\nimport { Wordlist, wordlists } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst N = BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n\n\n// \"Bitcoin seed\"\nconst MasterSecret = toUtf8Bytes(\"Bitcoin seed\");\n\nconst HardenedBit = 0x80000000;\n\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits: number): number {\n return ((1 << bits) - 1) << (8 - bits);\n}\n\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits: number): number {\n return (1 << bits) - 1;\n}\n\nfunction bytes32(value: BigNumber | Uint8Array): string {\n return hexZeroPad(hexlify(value), 32);\n}\n\nfunction base58check(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nfunction getWordlist(wordlist: string | Wordlist): Wordlist {\n if (wordlist == null) {\n return wordlists[\"en\"];\n }\n\n if (typeof(wordlist) === \"string\") {\n const words = wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n\n return wordlist;\n}\n\nconst _constructorGuard: any = {};\n\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n\nexport interface Mnemonic {\n readonly phrase: string;\n readonly path: string;\n readonly locale: string;\n};\n\nexport class HDNode implements ExternallyOwnedAccount {\n readonly privateKey: string;\n readonly publicKey: string;\n\n readonly fingerprint: string;\n readonly parentFingerprint: string;\n\n readonly address: string;\n\n readonly mnemonic?: Mnemonic;\n readonly path: string;\n\n readonly chainCode: string;\n\n readonly index: number;\n readonly depth: number;\n\n /**\n * This constructor should not be called directly.\n *\n * Please use:\n * - fromMnemonic\n * - fromSeed\n */\n constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string) {\n logger.checkNew(new.target, HDNode);\n\n /* istanbul ignore if */\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n\n if (privateKey) {\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"privateKey\", signingKey.privateKey);\n defineReadOnly(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n defineReadOnly(this, \"privateKey\", null);\n defineReadOnly(this, \"publicKey\", hexlify(publicKey));\n }\n\n defineReadOnly(this, \"parentFingerprint\", parentFingerprint);\n defineReadOnly(this, \"fingerprint\", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4));\n\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n defineReadOnly(this, \"chainCode\", chainCode);\n\n defineReadOnly(this, \"index\", index);\n defineReadOnly(this, \"depth\", depth);\n\n if (mnemonicOrPath == null) {\n // From a source that does not preserve the path (e.g. extended keys)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", null);\n\n } else if (typeof(mnemonicOrPath) === \"string\") {\n // From a source that does not preserve the mnemonic (e.g. neutered)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", mnemonicOrPath);\n\n } else {\n // From a fully qualified source\n defineReadOnly(this, \"mnemonic\", mnemonicOrPath);\n defineReadOnly(this, \"path\", mnemonicOrPath.path);\n }\n }\n\n get extendedKey(): string {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n\n if (this.depth >= 256) { throw new Error(\"Depth too large!\"); }\n\n return base58check(concat([\n ((this.privateKey != null) ? \"0x0488ADE4\": \"0x0488B21E\"),\n hexlify(this.depth),\n this.parentFingerprint,\n hexZeroPad(hexlify(this.index), 4),\n this.chainCode,\n ((this.privateKey != null) ? concat([ \"0x00\", this.privateKey ]): this.publicKey),\n ]));\n }\n\n neuter(): HDNode {\n return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n }\n\n private _derive(index: number): HDNode {\n if (index > 0xffffffff) { throw new Error(\"invalid index - \" + String(index)); }\n\n // Base path\n let path = this.path;\n if (path) { path += \"/\" + (index & ~HardenedBit); }\n\n const data = new Uint8Array(37);\n\n if (index & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n\n // Data = 0x00 || ser_256(k_par)\n data.set(arrayify(this.privateKey), 1);\n\n // Hardened path\n if (path) { path += \"'\"; }\n\n } else {\n // Data = ser_p(point(k_par))\n data.set(arrayify(this.publicKey));\n }\n\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); }\n\n const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data));\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n\n // The private key\n let ki: string = null\n\n // The public key\n let Ki: string = null;\n\n if (this.privateKey) {\n ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N));\n } else {\n const ek = new SigningKey(hexlify(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n\n let mnemonicOrPath: Mnemonic | string = path;\n\n const srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path: path,\n locale: (srcMnemonic.locale || \"en\")\n });\n }\n\n return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);\n }\n\n derivePath(path: string): HDNode {\n const components = path.split(\"/\");\n\n if (components.length === 0 || (components[0] === \"m\" && this.depth !== 0)) {\n throw new Error(\"invalid path - \" + path);\n }\n\n if (components[0] === \"m\") { components.shift(); }\n\n let result: HDNode = this;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(HardenedBit + index);\n } else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(index);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n\n return result;\n }\n\n\n static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode {\n const seedArray: Uint8Array = arrayify(seed);\n if (seedArray.length < 16 || seedArray.length > 64) { throw new Error(\"invalid seed\"); }\n\n const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray));\n\n return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, \"0x00000000\", bytes32(I.slice(32)), 0, 0, mnemonic);\n }\n\n static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode {\n\n // If a locale name was passed in, find the associated wordlist\n wordlist = getWordlist(wordlist);\n\n // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid)\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n\n return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n }\n\n static fromSeed(seed: BytesLike): HDNode {\n return HDNode._fromSeed(seed, null);\n }\n\n static fromExtendedKey(extendedKey: string): HDNode {\n const bytes = Base58.decode(extendedKey);\n\n if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\": case \"0x043587cf\":\n return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null);\n\n // Private Key\n case \"0x0488ade4\": case \"0x04358394 \":\n if (key[0] !== 0) { break; }\n return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null);\n }\n\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n}\n\nexport function mnemonicToSeed(mnemonic: string, password?: string): string {\n if (!password) { password = \"\"; }\n\n const salt = toUtf8Bytes(\"mnemonic\" + password, UnicodeNormalizationForm.NFKD);\n\n return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n}\n\nexport function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n logger.checkNormalize();\n\n const words = wordlist.split(mnemonic);\n if ((words.length % 3) !== 0) { throw new Error(\"invalid mnemonic\"); }\n\n const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8)));\n\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n if (index === -1) { throw new Error(\"invalid mnemonic\"); }\n\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n\n const entropyBits = 32 * words.length / 3;\n\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n\n const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n\n if (checksum !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\n\nexport function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n entropy = arrayify(entropy);\n\n if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n\n const indices: Array = [ 0 ];\n\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n\n remainingBits -= 8;\n\n // This byte will complete an 11-bit index\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n\n remainingBits += 3;\n }\n }\n\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits);\n\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n\n return wordlist.join(indices.map((index) => (wordlist).getWord(index)));\n}\n\nexport function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getAccountPath(index: number): string {\n if (typeof(index) !== \"number\" || index < 0 || index >= HardenedBit || index % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index);\n }\n return `m/44'/60'/${ index }'/0/0`;\n}\n","export const version = \"random/5.5.0\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Debugging line for testing browser lib in node\n//const window = { crypto: { getRandomValues: () => { } } };\n\nlet anyGlobal: any = null;\ntry {\n anyGlobal = (window as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n} catch (error) {\n try {\n anyGlobal = (global as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n } catch (error) {\n anyGlobal = { };\n }\n}\n\nlet crypto: any = anyGlobal.crypto || anyGlobal.msCrypto;\nif (!crypto || !crypto.getRandomValues) {\n\n logger.warn(\"WARNING: Missing strong random number source\");\n\n crypto = {\n getRandomValues: function(buffer: Uint8Array): Uint8Array {\n return logger.throwError(\"no secure random source avaialble\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n}\n\nexport function randomBytes(length: number): Uint8Array {\n if (length <= 0 || length > 1024 || (length % 1) || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return arrayify(result);\n};\n","\"use strict\";\n\nexport function shuffled(array: Array): Array {\n array = array.slice();\n\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n\n return array;\n}\n","\"use strict\";\n\nexport { randomBytes } from \"./random\";\nexport { shuffled } from \"./shuffle\";\n","\"use strict\";\n\n(function(root) {\n\n function checkInt(value) {\n return (parseInt(value) === value);\n }\n\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) { return false; }\n\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n\n return true;\n }\n\n function coerceArray(arg, copy) {\n\n // ArrayBuffer view\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') {\n\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n\n throw new Error('unsupported array-like object');\n }\n\n function createArray(length) {\n return new Uint8Array(length);\n }\n\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n\n\n\n var convertUtf8 = (function() {\n function toBytes(text) {\n var result = [], i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16))\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c)\n }\n }\n\n return coerceArray(result);\n }\n\n function fromBytes(bytes) {\n var result = [], i = 0;\n\n while (i < bytes.length) {\n var c = bytes[i];\n\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));\n i += 2;\n } else {\n result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));\n i += 3;\n }\n }\n\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n var convertHex = (function() {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n\n // Number of rounds by keysize\n var numberOfRounds = {16: 10, 24: 12, 32: 14}\n\n // Round constant words\n var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n // S-box and Inverse S-box (S is for Substitution)\n var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d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 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n // Transformations for encryption\n var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\n var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\n var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\n var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n // Transformations for decryption\n var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\n var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\n var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\n var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n // Transformations for decryption key expansion\n var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\n var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\n var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\n var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\n\n function convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(\n (bytes[i ] << 24) |\n (bytes[i + 1] << 16) |\n (bytes[i + 2] << 8) |\n bytes[i + 3]\n );\n }\n return result;\n }\n\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n\n this._prepare();\n }\n\n\n AES.prototype._prepare = function() {\n\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[ tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n\n tk[KC / 2] ^= (S[ tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n\n for (var i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[ tt & 0xFF]);\n }\n }\n }\n\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T1[(t[ i ] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[ t[(i + 3) % 4] & 0xff] ^\n this._Ke[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T5[(t[ i ] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[ t[(i + 1) % 4] & 0xff] ^\n this._Kd[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n\n /**\n * Mode Of Operation - Electonic Codebook (ECB)\n */\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastCipherblock = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Feedback (CFB)\n */\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 size)');\n }\n\n if (!segmentSize) { segmentSize = 1; }\n\n this.segmentSize = segmentSize;\n\n this._shiftRegister = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if ((plaintext.length % this.segmentSize) != 0) {\n throw new Error('invalid plaintext size (must be segmentSize bytes)');\n }\n\n var encrypted = coerceArray(plaintext, true);\n\n var xorSegment;\n for (var i = 0; i < encrypted.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j = 0; j < this.segmentSize; j++) {\n encrypted[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return encrypted;\n }\n\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if ((ciphertext.length % this.segmentSize) != 0) {\n throw new Error('invalid ciphertext size (must be segmentSize bytes)');\n }\n\n var plaintext = coerceArray(ciphertext, true);\n\n var xorSegment;\n for (var i = 0; i < plaintext.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n\n for (var j = 0; j < this.segmentSize; j++) {\n plaintext[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return plaintext;\n }\n\n /**\n * Mode Of Operation - Output Feedback (OFB)\n */\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n\n\n /**\n * Counter object for CTR common mode of operation\n */\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) { initialValue = 1; }\n\n if (typeof(initialValue) === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n\n } else {\n this.setBytes(initialValue);\n }\n }\n\n Counter.prototype.setValue = function(value) {\n if (typeof(value) !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = value >> 8;\n }\n }\n\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n\n this._counter = bytes;\n };\n\n Counter.prototype.increment = function() {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n }\n\n\n /**\n * Mode Of Operation - Counter (CTR)\n */\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Counter\";\n this.name = \"ctr\";\n\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter)\n }\n\n this._counter = counter;\n\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n\n\n ///////////////////////\n // Padding\n\n // See:https://tools.ietf.org/html/rfc2315\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - (data.length % 16);\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n }\n\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }\n\n var padder = data[data.length - 1];\n if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }\n\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n\n ///////////////////////\n // Exporting\n\n\n // The block cipher\n var aesjs = {\n AES: AES,\n Counter: Counter,\n\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray,\n }\n };\n\n\n // node.js\n if (typeof exports !== 'undefined') {\n module.exports = aesjs\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(aesjs);\n\n // Web Browsers\n } else {\n\n // If there was an existing library at \"aesjs\" make sure it's still available\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n\n root.aesjs = aesjs;\n }\n\n\n})(this);\n","export const version = \"json-wallets/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, Bytes, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings';\n\nexport function looseArrayify(hexString: string): Uint8Array {\n if (typeof(hexString) === 'string' && hexString.substring(0, 2) !== '0x') {\n hexString = '0x' + hexString;\n }\n return arrayify(hexString);\n}\n\nexport function zpad(value: String | number, length: number): String {\n value = String(value);\n while (value.length < length) { value = '0' + value; }\n return value;\n}\n\nexport function getPassword(password: Bytes | string): Uint8Array {\n if (typeof(password) === 'string') {\n return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC);\n }\n return arrayify(password);\n}\n\nexport function searchPath(object: any, path: string): string {\n let currentChild = object;\n\n const comps = path.toLowerCase().split('/');\n for (let i = 0; i < comps.length; i++) {\n\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comps[i]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n\n // Didn't find one. :'(\n if (matchingChild === null) {\n return null;\n }\n\n // Now check this child...\n currentChild = matchingChild;\n }\n\n return currentChild;\n}\n\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\nexport function uuidV4(randomBytes: BytesLike): string {\n const bytes = arrayify(randomBytes);\n\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n const value = hexlify(bytes);\n\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n\n","\"use strict\";\n\nimport aes from \"aes-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { Description } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getPassword, looseArrayify, searchPath } from \"./utils\";\n\nexport interface _CrowdsaleAccount {\n address: string;\n privateKey: string;\n\n _isCrowdsaleAccount: boolean;\n}\n\nexport class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: string;\n readonly path?: string;\n\n readonly _isCrowdsaleAccount: boolean;\n\n isCrowdsaleAccount(value: any): value is CrowdsaleAccount {\n return !!(value && value._isCrowdsaleAccount);\n }\n}\n\n// See: https://github.com/ethereum/pyethsaletool\nexport function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount {\n const data = JSON.parse(json);\n\n password = getPassword(password);\n\n // Ethereum Address\n const ethaddr = getAddress(searchPath(data, \"ethaddr\"));\n\n // Encrypted Seed\n const encseed = looseArrayify(searchPath(data, \"encseed\"));\n if (!encseed || (encseed.length % 16) !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n\n const key = arrayify(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n\n // Decrypt the seed\n const aesCbc = new aes.ModeOfOperation.cbc(key, iv);\n const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed)));\n\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n\n const seedHexBytes = toUtf8Bytes(seedHex);\n\n const privateKey = keccak256(seedHexBytes);\n\n return new CrowdsaleAccount ({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey: privateKey\n });\n}\n\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\n\n\nexport function isCrowdsaleWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n return (data.encseed && data.ethaddr);\n}\n\nexport function isKeystoreWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n\n // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff\n return true;\n}\n\n//export function isJsonWallet(json: string): boolean {\n// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json));\n//}\n\nexport function getJsonWalletAddress(json: string): string {\n if (isCrowdsaleWallet(json)) {\n try {\n return getAddress(JSON.parse(json).ethaddr);\n } catch (error) { return null; }\n }\n\n if (isKeystoreWallet(json)) {\n try {\n return getAddress(JSON.parse(json).address);\n } catch (error) { return null; }\n }\n\n return null;\n}\n\n","\"use strict\";\n\n(function(root) {\n const MAX_VALUE = 0x7fffffff;\n\n // The SHA256 and PBKDF2 implementation are from scrypt-async-js:\n // See: https://github.com/dchest/scrypt-async-js\n function SHA256(m) {\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ]);\n\n let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;\n let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;\n const w = new Uint32Array(64);\n\n function blocks(p) {\n let off = 0, len = p.length;\n while (len >= 64) {\n let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;\n\n for (i = 0; i < 16; i++) {\n j = off + i*4;\n w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |\n ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);\n }\n\n for (i = 16; i < 64; i++) {\n u = w[i-2];\n t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);\n\n u = w[i-15];\n t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);\n\n w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;\n }\n\n for (i = 0; i < 64; i++) {\n t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^\n ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n\n t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^\n ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n\n h0 = (h0 + a) | 0;\n h1 = (h1 + b) | 0;\n h2 = (h2 + c) | 0;\n h3 = (h3 + d) | 0;\n h4 = (h4 + e) | 0;\n h5 = (h5 + f) | 0;\n h6 = (h6 + g) | 0;\n h7 = (h7 + h) | 0;\n\n off += 64;\n len -= 64;\n }\n }\n\n blocks(m);\n\n let i, bytesLeft = m.length % 64,\n bitLenHi = (m.length / 0x20000000) | 0,\n bitLenLo = m.length << 3,\n numZeros = (bytesLeft < 56) ? 56 : 120,\n p = m.slice(m.length - bytesLeft, m.length);\n\n p.push(0x80);\n for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }\n p.push((bitLenHi >>> 24) & 0xff);\n p.push((bitLenHi >>> 16) & 0xff);\n p.push((bitLenHi >>> 8) & 0xff);\n p.push((bitLenHi >>> 0) & 0xff);\n p.push((bitLenLo >>> 24) & 0xff);\n p.push((bitLenLo >>> 16) & 0xff);\n p.push((bitLenLo >>> 8) & 0xff);\n p.push((bitLenLo >>> 0) & 0xff);\n\n blocks(p);\n\n return [\n (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff,\n (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff,\n (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff,\n (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff,\n (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff,\n (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff,\n (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff,\n (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff\n ];\n }\n\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n // compress password if it's longer than hash block length\n password = (password.length <= 64) ? password : SHA256(password);\n\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n\n let i;\n let dk = [];\n\n // inner = (password ^ ipad) || salt || counter\n for (i = 0; i < 64; i++) { inner[i] = 0x36; }\n for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; }\n for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; }\n for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; }\n\n // outerKey = password ^ opad\n for (i = 0; i < 64; i++) outerKey[i] = 0x5c;\n for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];\n\n // increments counter inside inner\n function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }\n\n // output blocks = SHA256(outerKey || SHA256(inner)) ...\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));\n }\n\n return dk;\n }\n\n // The following is an adaptation of scryptsy\n // See: https://www.npmjs.com/package/scryptsy\n function blockmix_salsa8(BY, Yi, r, x, _X) {\n let i;\n\n arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);\n for (i = 0; i < 2 * r; i++) {\n blockxor(BY, i * 16, _X, 16);\n salsa20_8(_X, x);\n arraycopy(_X, 0, BY, Yi + (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);\n }\n }\n\n function R(a, b) {\n return (a << b) | (a >>> (32 - b));\n }\n\n function salsa20_8(B, x) {\n arraycopy(B, 0, x, 0, 16);\n\n for (let i = 8; i > 0; i -= 2) {\n x[ 4] ^= R(x[ 0] + x[12], 7);\n x[ 8] ^= R(x[ 4] + x[ 0], 9);\n x[12] ^= R(x[ 8] + x[ 4], 13);\n x[ 0] ^= R(x[12] + x[ 8], 18);\n x[ 9] ^= R(x[ 5] + x[ 1], 7);\n x[13] ^= R(x[ 9] + x[ 5], 9);\n x[ 1] ^= R(x[13] + x[ 9], 13);\n x[ 5] ^= R(x[ 1] + x[13], 18);\n x[14] ^= R(x[10] + x[ 6], 7);\n x[ 2] ^= R(x[14] + x[10], 9);\n x[ 6] ^= R(x[ 2] + x[14], 13);\n x[10] ^= R(x[ 6] + x[ 2], 18);\n x[ 3] ^= R(x[15] + x[11], 7);\n x[ 7] ^= R(x[ 3] + x[15], 9);\n x[11] ^= R(x[ 7] + x[ 3], 13);\n x[15] ^= R(x[11] + x[ 7], 18);\n x[ 1] ^= R(x[ 0] + x[ 3], 7);\n x[ 2] ^= R(x[ 1] + x[ 0], 9);\n x[ 3] ^= R(x[ 2] + x[ 1], 13);\n x[ 0] ^= R(x[ 3] + x[ 2], 18);\n x[ 6] ^= R(x[ 5] + x[ 4], 7);\n x[ 7] ^= R(x[ 6] + x[ 5], 9);\n x[ 4] ^= R(x[ 7] + x[ 6], 13);\n x[ 5] ^= R(x[ 4] + x[ 7], 18);\n x[11] ^= R(x[10] + x[ 9], 7);\n x[ 8] ^= R(x[11] + x[10], 9);\n x[ 9] ^= R(x[ 8] + x[11], 13);\n x[10] ^= R(x[ 9] + x[ 8], 18);\n x[12] ^= R(x[15] + x[14], 7);\n x[13] ^= R(x[12] + x[15], 9);\n x[14] ^= R(x[13] + x[12], 13);\n x[15] ^= R(x[14] + x[13], 18);\n }\n\n for (let i = 0; i < 16; ++i) {\n B[i] += x[i];\n }\n }\n\n // naive approach... going back to loop unrolling may yield additional performance\n function blockxor(S, Si, D, len) {\n for (let i = 0; i < len; i++) {\n D[i] ^= S[Si + i]\n }\n }\n\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n\n function checkBufferish(o) {\n if (!o || typeof(o.length) !== 'number') { return false; }\n\n for (let i = 0; i < o.length; i++) {\n const v = o[i];\n if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) {\n return false;\n }\n }\n\n return true;\n }\n\n function ensureInteger(value, name) {\n if (typeof(value) !== \"number\" || (value % 1)) { throw new Error('invalid ' + name); }\n return value;\n }\n\n // N = Cpu cost, r = Memory cost, p = parallelization cost\n // callback(error, progress, key)\n function _scrypt(password, salt, N, r, p, dkLen, callback) {\n\n N = ensureInteger(N, 'N');\n r = ensureInteger(r, 'r');\n p = ensureInteger(p, 'p');\n\n dkLen = ensureInteger(dkLen, 'dkLen');\n\n if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }\n\n if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }\n if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }\n\n if (!checkBufferish(password)) {\n throw new Error('password must be an array or buffer');\n }\n password = Array.prototype.slice.call(password);\n\n if (!checkBufferish(salt)) {\n throw new Error('salt must be an array or buffer');\n }\n salt = Array.prototype.slice.call(salt);\n\n let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);\n const B = new Uint32Array(p * 32 * r)\n for (let i = 0; i < B.length; i++) {\n const j = i * 4;\n B[i] = ((b[j + 3] & 0xff) << 24) |\n ((b[j + 2] & 0xff) << 16) |\n ((b[j + 1] & 0xff) << 8) |\n ((b[j + 0] & 0xff) << 0);\n }\n\n const XY = new Uint32Array(64 * r);\n const V = new Uint32Array(32 * r * N);\n\n const Yi = 32 * r;\n\n // scratch space\n const x = new Uint32Array(16); // salsa20_8\n const _X = new Uint32Array(16); // blockmix_salsa8\n\n const totalOps = p * N * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n\n // Set this to true to abandon the scrypt on the next step\n let stop = false;\n\n // State information\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n\n // How many blockmix_salsa8 can we do per step?\n const limit = callback ? parseInt(1000 / r): 0xffffffff;\n\n // Trick from scrypt-async; if there is a setImmediate shim in place, use it\n const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;\n\n // This is really all I changed; making scryptsy a state machine so we occasionally\n // stop and give other evnts on the evnt loop a chance to run. ~RicMoo\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error('cancelled'), currentOp / totalOps);\n }\n\n let steps;\n\n switch (state) {\n case 0:\n // for (var i = 0; i < p; i++)...\n Bi = i0 * 32 * r;\n\n arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1\n\n state = 1; // Move to ROMix 2\n i1 = 0;\n\n // Fall through\n\n case 1:\n\n // Run up to 1000 steps of the first inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 2\n arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4\n }\n\n // for (var i = 0; i < N; i++)\n i1 += steps;\n currentOp += steps;\n\n if (callback) {\n // Call the callback with the progress (optionally stopping us)\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n i1 = 0; // Move to ROMix 6\n state = 2;\n\n // Fall through\n\n case 2:\n\n // Run up to 1000 steps of the second inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 6\n const offset = (2 * r - 1) * 16; // ROMix - 7\n const j = XY[offset] & (N - 1);\n blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner)\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer)\n }\n\n // for (var i = 0; i < N; i++)...\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n if (callback) {\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10\n\n // for (var i = 0; i < p; i++)...\n i0++;\n if (i0 < p) {\n state = 0;\n break;\n }\n\n b = [];\n for (let i = 0; i < B.length; i++) {\n b.push((B[i] >> 0) & 0xff);\n b.push((B[i] >> 8) & 0xff);\n b.push((B[i] >> 16) & 0xff);\n b.push((B[i] >> 24) & 0xff);\n }\n\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);\n\n // Send the result to the callback\n if (callback) { callback(null, 1.0, derivedKey); }\n\n // Done; don't break (which would reschedule)\n return derivedKey;\n }\n\n // Schedule the next steps\n if (callback) { nextTick(incrementalSMix); }\n }\n\n // Run the smix state machine until completion\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != undefined) { return derivedKey; }\n }\n }\n\n // Bootstrap the async incremental smix\n incrementalSMix();\n }\n\n const lib = {\n scrypt: function(password, salt, N, r, p, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) { progressCallback(0); }\n _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N, r, p, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen));\n }\n };\n\n // node.js\n if (typeof(exports) !== 'undefined') {\n module.exports = lib;\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(lib);\n\n // Web Browsers\n } else if (root) {\n\n // If there was an existing library \"scrypt\", make sure it is still available\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n\n root.scrypt = lib;\n }\n\n})(this);\n","\"use strict\";\n\nimport aes from \"aes-js\";\nimport scrypt from \"scrypt-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\nimport { defaultPath, entropyToMnemonic, HDNode, Mnemonic, mnemonicToEntropy } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 as _pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { Description } from \"@ethersproject/properties\";\nimport { computeAddress } from \"@ethersproject/transactions\";\n\nimport { getPassword, looseArrayify, searchPath, uuidV4, zpad } from \"./utils\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Exported Types\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n return (value != null && value.mnemonic && value.mnemonic.phrase);\n}\n\nexport interface _KeystoreAccount {\n address: string;\n privateKey: string;\n mnemonic?: Mnemonic;\n\n _isKeystoreAccount: boolean;\n}\n\nexport class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: Mnemonic;\n\n readonly _isKeystoreAccount: boolean;\n\n isKeystoreAccount(value: any): value is KeystoreAccount {\n return !!(value && value._isKeystoreAccount);\n }\n}\n\nexport type ProgressCallback = (percent: number) => void;\n\nexport type EncryptOptions = {\n iv?: BytesLike;\n entropy?: BytesLike;\n client?: string;\n salt?: BytesLike;\n uuid?: string;\n scrypt?: {\n N?: number;\n r?: number;\n p?: number;\n }\n}\n\nfunction _decrypt(data: any, key: Uint8Array, ciphertext: Uint8Array): Uint8Array {\n const cipher = searchPath(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n const iv = looseArrayify(searchPath(data, \"crypto/cipherparams/iv\"))\n const counter = new aes.Counter(iv);\n\n const aesCtr = new aes.ModeOfOperation.ctr(key, counter);\n\n return arrayify(aesCtr.decrypt(ciphertext));\n }\n\n return null;\n}\n\nfunction _getAccount(data: any, key: Uint8Array): KeystoreAccount {\n const ciphertext = looseArrayify(searchPath(data, \"crypto/ciphertext\"));\n\n const computedMAC = hexlify(keccak256(concat([ key.slice(16, 32), ciphertext ]))).substring(2);\n if (computedMAC !== searchPath(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n\n const privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n\n const mnemonicKey = key.slice(32, 64);\n\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") { check = \"0x\" + check; }\n\n if (getAddress(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n\n const account: _KeystoreAccount = {\n _isKeystoreAccount: true,\n address: address,\n privateKey: hexlify(privateKey)\n };\n\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n if (searchPath(data, \"x-ethers/version\") === \"0.1\") {\n const mnemonicCiphertext = looseArrayify(searchPath(data, \"x-ethers/mnemonicCiphertext\"));\n const mnemonicIv = looseArrayify(searchPath(data, \"x-ethers/mnemonicCounter\"));\n\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n\n const path = searchPath(data, \"x-ethers/path\") || defaultPath;\n const locale = searchPath(data, \"x-ethers/locale\") || \"en\";\n\n const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n\n try {\n const mnemonic = entropyToMnemonic(entropy, locale);\n const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n\n account.mnemonic = node.mnemonic;\n\n } catch (error) {\n // If we don't have the locale wordlist installed to\n // read this mnemonic, just bail and don't set the\n // mnemonic\n if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n\n return new KeystoreAccount(account);\n}\n\ntype ScryptFunc = (pw: Uint8Array, salt: Uint8Array, n: number, r: number, p: number, dkLen: number, callback?: ProgressCallback) => T;\ntype Pbkdf2Func = (pw: Uint8Array, salt: Uint8Array, c: number, dkLen: number, prfFunc: string) => T;\n\nfunction pbkdf2Sync(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Uint8Array {\n return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction pbkdf2(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Promise {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction _computeKdfKey(data: any, password: Bytes | string, pbkdf2Func: Pbkdf2Func, scryptFunc: ScryptFunc, progressCallback?: ProgressCallback): T {\n const passwordBytes = getPassword(password);\n\n const kdf = searchPath(data, \"crypto/kdf\");\n\n if (kdf && typeof(kdf) === \"string\") {\n const throwError = function(name: string, value: any): never {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n }\n\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n const N = parseInt(searchPath(data, \"crypto/kdfparams/n\"));\n const r = parseInt(searchPath(data, \"crypto/kdfparams/r\"));\n const p = parseInt(searchPath(data, \"crypto/kdfparams/p\"));\n\n // Check for all required parameters\n if (!N || !r || !p) { throwError(\"kdf\", kdf); }\n\n // Make sure N is a power of 2\n if ((N & (N - 1)) !== 0) { throwError(\"N\", N); }\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback);\n\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n\n let prfFunc: string = null;\n const prf = searchPath(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n\n const count = parseInt(searchPath(data, \"crypto/kdfparams/c\"));\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n}\n\n\nexport function decryptSync(json: string, password: Bytes | string): KeystoreAccount {\n const data = JSON.parse(json);\n\n const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt);\n return _getAccount(data, key);\n}\n\nexport async function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n const data = JSON.parse(json);\n\n const key = await _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback);\n return _getAccount(data, key);\n}\n\n\nexport function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise {\n\n try {\n // Check the address matches the private key\n if (getAddress(account.address) !== computeAddress(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n\n // Check the mnemonic (if any) matches the private key\n if (hasMnemonic(account)) {\n const mnemonic = account.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n\n } catch (e) {\n return Promise.reject(e);\n }\n\n // The options are optional, so adjust the call as needed\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) { options = {}; }\n\n const privateKey: Uint8Array = arrayify(account.privateKey);\n const passwordBytes = getPassword(password);\n\n let entropy: Uint8Array = null\n let path: string = null;\n let locale: string = null;\n if (hasMnemonic(account)) {\n const srcMnemonic = account.mnemonic;\n entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n\n let client = options.client;\n if (!client) { client = \"ethers.js\"; }\n\n // Check/generate the salt\n let salt: Uint8Array = null;\n if (options.salt) {\n salt = arrayify(options.salt);\n } else {\n salt = randomBytes(32);;\n }\n\n // Override initialization vector\n let iv: Uint8Array = null;\n if (options.iv) {\n iv = arrayify(options.iv);\n if (iv.length !== 16) { throw new Error(\"invalid iv\"); }\n } else {\n iv = randomBytes(16);\n }\n\n // Override the uuid\n let uuidRandom: Uint8Array = null;\n if (options.uuid) {\n uuidRandom = arrayify(options.uuid);\n if (uuidRandom.length !== 16) { throw new Error(\"invalid uuid\"); }\n } else {\n uuidRandom = randomBytes(16);\n }\n\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) { N = options.scrypt.N; }\n if (options.scrypt.r) { r = options.scrypt.r; }\n if (options.scrypt.p) { p = options.scrypt.p; }\n }\n\n // We take 64 bytes:\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => {\n key = arrayify(key);\n\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n\n // This will be used to encrypt the mnemonic phrase (if any)\n const mnemonicKey = key.slice(32, 64);\n\n // Encrypt the private key\n const counter = new aes.Counter(iv);\n const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter);\n const ciphertext = arrayify(aesCtr.encrypt(privateKey));\n\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]))\n\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data: { [key: string]: any } = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(salt).substring(2),\n n: N,\n dklen: 32,\n p: p,\n r: r\n },\n mac: mac.substring(2)\n }\n };\n\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (entropy) {\n const mnemonicIv = randomBytes(16);\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\"\n );\n data[\"x-ethers\"] = {\n client: client,\n gethFilename: (\"UTC--\" + timestamp + \"--\" + data.address),\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n path: path,\n locale: locale,\n version: \"0.1\"\n };\n }\n\n return JSON.stringify(data);\n });\n}\n","\"use strict\";\n\nimport { Bytes } from \"@ethersproject/bytes\";\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\n\nimport { decrypt as decryptCrowdsale } from \"./crowdsale\";\nimport { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from \"./inspect\";\nimport { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from \"./keystore\";\n\nfunction decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n if (isCrowdsaleWallet(json)) {\n if (progressCallback) { progressCallback(0); }\n const account = decryptCrowdsale(json, password)\n if (progressCallback) { progressCallback(1); }\n return Promise.resolve(account);\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystore(json, password, progressCallback);\n }\n\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n}\n\nfunction decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount {\n if (isCrowdsaleWallet(json)) {\n return decryptCrowdsale(json, password)\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystoreSync(json, password);\n }\n\n throw new Error(\"invalid JSON wallet\");\n}\n\nexport {\n decryptCrowdsale,\n\n decryptKeystore,\n decryptKeystoreSync,\n encryptKeystore,\n\n isCrowdsaleWallet,\n isKeystoreWallet,\n getJsonWalletAddress,\n\n decryptJsonWallet,\n decryptJsonWalletSync,\n\n ProgressCallback,\n EncryptOptions,\n};\n","export const version = \"wallet/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { Provider, TransactionRequest } from \"@ethersproject/abstract-provider\";\nimport { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { arrayify, Bytes, BytesLike, concat, hexDataSlice, isHexString, joinSignature, SignatureLike } from \"@ethersproject/bytes\";\nimport { hashMessage, _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { defaultPath, HDNode, entropyToMnemonic, Mnemonic } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { computeAddress, recoverAddress, serialize, UnsignedTransaction } from \"@ethersproject/transactions\";\nimport { Wordlist } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction isAccount(value: any): value is ExternallyOwnedAccount {\n return (value != null && isHexString(value.privateKey, 32) && value.address != null);\n}\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n const mnemonic = value.mnemonic;\n return (mnemonic && mnemonic.phrase);\n}\n\nexport class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner {\n\n readonly address: string;\n readonly provider: Provider;\n\n // Wrapping the _signingKey and _mnemonic in a getter function prevents\n // leaking the private key in console.log; still, be careful! :)\n readonly _signingKey: () => SigningKey;\n readonly _mnemonic: () => Mnemonic;\n\n constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider) {\n logger.checkNew(new.target, Wallet);\n\n super();\n\n if (isAccount(privateKey)) {\n const signingKey = new SigningKey(privateKey.privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n if (this.address !== getAddress(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n\n if (hasMnemonic(privateKey)) {\n const srcMnemonic = privateKey.mnemonic;\n defineReadOnly(this, \"_mnemonic\", () => (\n {\n phrase: srcMnemonic.phrase,\n path: srcMnemonic.path || defaultPath,\n locale: srcMnemonic.locale || \"en\"\n }\n ));\n const mnemonic = this.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if (computeAddress(node.privateKey) !== this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n }\n\n\n } else {\n if (SigningKey.isSigningKey(privateKey)) {\n /* istanbul ignore if */\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n defineReadOnly(this, \"_signingKey\", () => (privateKey));\n\n } else {\n // A lot of common tools do not prefix private keys with a 0x (see: #1166)\n if (typeof(privateKey) === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n }\n\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n }\n\n /* istanbul ignore if */\n if (provider && !Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n get mnemonic(): Mnemonic { return this._mnemonic(); }\n get privateKey(): string { return this._signingKey().privateKey; }\n get publicKey(): string { return this._signingKey().publicKey; }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n connect(provider: Provider): Wallet {\n return new Wallet(this, provider);\n }\n\n signTransaction(transaction: TransactionRequest): Promise {\n return resolveProperties(transaction).then((tx) => {\n if (tx.from != null) {\n if (getAddress(tx.from) !== this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n\n const signature = this._signingKey().signDigest(keccak256(serialize(tx)));\n return serialize(tx, signature);\n });\n }\n\n async signMessage(message: Bytes | string): Promise {\n return joinSignature(this._signingKey().signDigest(hashMessage(message)));\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n if (this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return this.provider.resolveName(name);\n });\n\n return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value)));\n }\n\n encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise {\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n\n if (progressCallback && typeof(progressCallback) !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n\n if (!options) { options = {}; }\n\n return encryptKeystore(this, password, options, progressCallback);\n }\n\n\n /**\n * Static methods to create Wallet instances.\n */\n static createRandom(options?: any): Wallet {\n let entropy: Uint8Array = randomBytes(16);\n\n if (!options) { options = { }; }\n\n if (options.extraEntropy) {\n entropy = arrayify(hexDataSlice(keccak256(concat([ entropy, options.extraEntropy ])), 0, 16));\n }\n\n const mnemonic = entropyToMnemonic(entropy, options.locale);\n return Wallet.fromMnemonic(mnemonic, options.path, options.locale);\n }\n\n static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n return decryptJsonWallet(json, password, progressCallback).then((account) => {\n return new Wallet(account);\n });\n }\n\n static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet {\n return new Wallet(decryptJsonWalletSync(json, password));\n }\n\n static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet {\n if (!path) { path = defaultPath; }\n return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n }\n}\n\nexport function verifyMessage(message: Bytes | string, signature: SignatureLike): string {\n return recoverAddress(hashMessage(message), signature);\n}\n\nexport function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string {\n return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature);\n}\n","export const version = \"networks/5.5.1\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Network, Networkish } from \"./types\";\n\nexport {\n Network,\n Networkish\n};\n\ntype DefaultProviderFunc = (providers: any, options?: any) => any;\n\ninterface Renetworkable extends DefaultProviderFunc {\n renetwork: (network: Network) => DefaultProviderFunc;\n};\n\nfunction isRenetworkable(value: any): value is Renetworkable {\n return (value && typeof(value.renetwork) === \"function\");\n}\n\nfunction ethDefaultProvider(network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (options == null) { options = { }; }\n const providerList: Array = [];\n\n if (providers.InfuraProvider) {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch(error) { }\n }\n\n if (providers.EtherscanProvider) {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch(error) { }\n }\n\n if (providers.AlchemyProvider) {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch(error) { }\n }\n\n if (providers.PocketProvider) {\n // These networks are currently faulty on Pocket as their\n // network does not handle the Berlin hardfork, which is\n // live on these ones.\n // @TODO: This goes away once Pocket has upgraded their nodes\n const skip = [ \"goerli\", \"ropsten\", \"rinkeby\" ];\n try {\n const provider = new providers.PocketProvider(network);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch(error) { }\n }\n\n if (providers.CloudflareProvider) {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch(error) { }\n }\n\n if (providerList.length === 0) { return null; }\n\n if (providers.FallbackProvider) {\n let quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n\n return providerList[0];\n };\n\n func.renetwork = function(network: Network) {\n return ethDefaultProvider(network);\n };\n\n return func;\n}\n\nfunction etcDefaultProvider(url: string, network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n\n return null;\n };\n\n func.renetwork = function(network: Network) {\n return etcDefaultProvider(url, network);\n };\n\n return func;\n}\n\nconst homestead: Network = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n};\n\nconst ropsten: Network = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n};\n\nconst classicMordor: Network = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n};\n\n// See: https://chainlist.org\nconst networks: { [name: string]: Network } = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n\n homestead: homestead,\n mainnet: homestead,\n\n morden: { chainId: 2, name: \"morden\" },\n\n ropsten: ropsten,\n testnet: ropsten,\n\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n\n\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/etc\", \"classic\")\n },\n\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n\n classicMordor: classicMordor,\n classicTestnet: classicMordor,\n\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/kotti\", \"classicKotti\")\n },\n\n xdai: { chainId: 100, name: \"xdai\" },\n\n matic: { chainId: 137, name: \"matic\" },\n maticmum: { chainId: 80001, name: \"maticmum\" },\n\n optimism: { chainId: 10, name: \"optimism\" },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" },\n}\n\n/**\n * getNetwork\n *\n * Converts a named common networks or chain ID (network ID) to a Network\n * and verifies a network is a valid Network..\n */\nexport function getNetwork(network: Networkish): Network {\n // No network (null)\n if (network == null) { return null; }\n\n if (typeof(network) === \"number\") {\n for (const name in networks) {\n const standard = networks[name];\n if (standard.chainId === network) {\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: (standard.ensAddress || null),\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n }\n\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n\n if (typeof(network) === \"string\") {\n const standard = networks[network];\n if (standard == null) { return null; }\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: standard.ensAddress,\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n\n const standard = networks[network.name];\n\n // Not a standard network; check that it is a valid network in general\n if (!standard) {\n if (typeof(network.chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n\n // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155)\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n\n // @TODO: In the next major version add an attach function to a defaultProvider\n // class and move the _defaultProvider internal to this file (extend Network)\n let defaultProvider: DefaultProviderFunc = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n\n // Standard Network (allow overriding the ENS address)\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: (network.ensAddress || standard.ensAddress || null),\n _defaultProvider: defaultProvider\n };\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function decode(textData: string): Uint8Array {\n textData = atob(textData);\n const data = [];\n for (let i = 0; i < textData.length; i++) {\n data.push(textData.charCodeAt(i));\n }\n return arrayify(data);\n}\n\nexport function encode(data: BytesLike): string {\n data = arrayify(data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n\n\n","\"use strict\";\n\nexport { decode, encode } from \"./base64\";\n","export const version = \"web/5.5.1\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport type { GetUrlResponse, Options } from \"./types\";\n\nexport { GetUrlResponse, Options };\n\nexport async function getUrl(href: string, options?: Options): Promise {\n if (options == null) { options = { }; }\n\n const request: RequestInit = {\n method: (options.method || \"GET\"),\n headers: (options.headers || { }),\n body: (options.body || undefined),\n };\n\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\"; // no-cors, cors, *same-origin\n request.cache = \"no-cache\"; // *default, no-cache, reload, force-cache, only-if-cached\n request.credentials = \"same-origin\"; // include, *same-origin, omit\n request.redirect = \"follow\"; // manual, *follow, error\n request.referrer = \"client\"; // no-referrer, *client\n };\n\n const response = await fetch(href, request);\n const body = await response.arrayBuffer();\n\n const headers: { [ name: string ]: string } = { };\n if (response.headers.forEach) {\n response.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n } else {\n (<() => Array>(((response.headers)).keys))().forEach((key) => {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n\n return {\n headers: headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: arrayify(new Uint8Array(body)),\n }\n}\n","\"use strict\";\n\nimport { decode as base64Decode, encode as base64Encode } from \"@ethersproject/base64\";\nimport { hexlify, isBytesLike } from \"@ethersproject/bytes\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getUrl, GetUrlResponse, Options } from \"./geturl\";\n\nfunction staller(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\nfunction bodyify(value: any, type: string): string {\n if (value == null) { return null; }\n\n if (typeof(value) === \"string\") { return value; }\n\n if (isBytesLike(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return toUtf8String(value);\n } catch (error) { };\n }\n return hexlify(value);\n }\n\n return value;\n}\n\n// Exported Types\nexport type ConnectionInfo = {\n url: string,\n headers?: { [key: string]: string | number }\n\n user?: string,\n password?: string,\n\n allowInsecureAuthentication?: boolean,\n allowGzip?: boolean,\n\n throttleLimit?: number,\n throttleSlotInterval?: number;\n throttleCallback?: (attempt: number, url: string) => Promise,\n\n timeout?: number,\n};\n\nexport interface OnceBlockable {\n once(eventName: \"block\", handler: () => void): void;\n}\n\nexport interface OncePollable {\n once(eventName: \"poll\", handler: () => void): void;\n}\n\nexport type PollOptions = {\n timeout?: number,\n floor?: number,\n ceiling?: number,\n interval?: number,\n retryLimit?: number,\n onceBlock?: OnceBlockable\n oncePoll?: OncePollable\n};\n\nexport type FetchJsonResponse = {\n statusCode: number;\n headers: { [ header: string ]: string };\n};\n\n\ntype Header = { key: string, value: string };\n\n// This API is still a work in progress; the future changes will likely be:\n// - ConnectionInfo => FetchDataRequest\n// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }\n// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified)\n// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T\n// For this reason, it should be considered internal until the API is finalized\nexport function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise {\n\n // How many times to retry in the event of a throttle\n const attemptLimit = (typeof(connection) === \"object\" && connection.throttleLimit != null) ? connection.throttleLimit: 12;\n logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0),\n \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n\n const throttleCallback = ((typeof(connection) === \"object\") ? connection.throttleCallback: null);\n const throttleSlotInterval = ((typeof(connection) === \"object\" && typeof(connection.throttleSlotInterval) === \"number\") ? connection.throttleSlotInterval: 100);\n logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0),\n \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n\n const headers: { [key: string]: Header } = { };\n\n let url: string = null;\n\n // @TODO: Allow ConnectionInfo to override some of these values\n const options: Options = {\n method: \"GET\",\n };\n\n let allow304 = false;\n\n let timeout = 2 * 60 * 1000;\n\n if (typeof(connection) === \"string\") {\n url = connection;\n\n } else if (typeof(connection) === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n\n url = connection.url;\n\n if (typeof(connection.timeout) === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n\n if (connection.headers) {\n for (const key in connection.headers) {\n headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n\n options.allowGzip = !!connection.allowGzip;\n\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\n \"basic authentication requires a secure https url\",\n Logger.errors.INVALID_ARGUMENT,\n { argument: \"url\", url: url, user: connection.user, password: \"[REDACTED]\" }\n );\n }\n\n const authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + base64Encode(toUtf8Bytes(authorization))\n };\n }\n }\n const reData = new RegExp(\"^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$\", \"i\");\n const dataMatch = ((url) ? url.match(reData): null);\n if (dataMatch) {\n try {\n const response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] },\n body: base64Decode(dataMatch[2])\n };\n\n let result: T = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n\n } catch (error) {\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error: error,\n requestBody: null,\n requestMethod: \"GET\",\n url: url\n });\n }\n }\n\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n\n const flatHeaders: { [ key: string ]: string } = { };\n Object.keys(headers).forEach((key) => {\n const header = headers[key];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n\n const runningTimeout = (function() {\n let timer: NodeJS.Timer = null;\n const promise: Promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(() => {\n if (timer == null) { return; }\n timer = null;\n\n reject(logger.makeError(\"timeout\", Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout: timeout,\n url: url\n }));\n }, timeout);\n }\n });\n\n const cancel = function() {\n if (timer == null) { return; }\n clearTimeout(timer);\n timer = null;\n }\n\n return { promise, cancel };\n })();\n\n const runningFetch = (async function() {\n\n for (let attempt = 0; attempt < attemptLimit; attempt++) {\n let response: GetUrlResponse = null;\n\n try {\n response = await getUrl(url, options);\n\n if (attempt < attemptLimit) {\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirection; for now we only support absolute locataions\n const location = response.headers.location || \"\";\n if (options.method === \"GET\" && location.match(/^https:/)) {\n url = response.headers.location;\n continue;\n }\n\n } else if (response.statusCode === 429) {\n // Exponential back-off throttling\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n let stall = 0;\n\n const retryAfter = response.headers[\"retry-after\"];\n if (typeof(retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1000;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n\n //console.log(\"Stalling 429\");\n await staller(stall);\n continue;\n }\n }\n }\n\n } catch (error) {\n response = (error).response;\n if (response == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error,\n url: url\n });\n }\n }\n\n\n let body = response.body;\n\n if (allow304 && response.statusCode === 304) {\n body = null;\n\n } else if (response.statusCode < 200 || response.statusCode >= 300) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", Logger.errors.SERVER_ERROR, {\n status: response.statusCode,\n headers: response.headers,\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n\n if (processFunc) {\n try {\n const result = await processFunc(body, response);\n runningTimeout.cancel();\n return result;\n\n } catch (error) {\n // Allow the processFunc to trigger a throttle\n if (error.throttleRetry && attempt < attemptLimit) {\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n //console.log(\"Stalling callback\");\n await staller(timeout);\n continue;\n }\n }\n\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n error: error,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n }\n\n runningTimeout.cancel();\n\n // If we had a processFunc, it either returned a T or threw above.\n // The \"body\" is now a Uint8Array.\n return (body);\n }\n\n return logger.throwError(\"failed response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n })();\n\n return Promise.race([ runningTimeout.promise, runningFetch ]);\n}\n\nexport function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise {\n let processJsonFunc = (value: Uint8Array, response: FetchJsonResponse) => {\n let result: any = null;\n if (value != null) {\n try {\n result = JSON.parse(toUtf8String(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", Logger.errors.SERVER_ERROR, {\n body: value,\n error: error\n });\n }\n }\n\n if (processFunc) {\n result = processFunc(result, response);\n }\n\n return result;\n }\n\n // If we have json to send, we must\n // - add content-type of application/json (unless already overridden)\n // - convert the json to bytes\n let body: Uint8Array = null;\n if (json != null) {\n body = toUtf8Bytes(json);\n\n // Create a connection with the content-type set for JSON\n const updated: ConnectionInfo = (typeof(connection) === \"string\") ? ({ url: connection }): shallowCopy(connection);\n if (updated.headers) {\n const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === \"content-type\")).length) !== 0;\n if (!hasContentType) {\n updated.headers = shallowCopy(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n\n return _fetchData(connection, body, processJsonFunc);\n}\n\nexport function poll(func: () => Promise, options?: PollOptions): Promise {\n if (!options) { options = {}; }\n options = shallowCopy(options);\n if (options.floor == null) { options.floor = 0; }\n if (options.ceiling == null) { options.ceiling = 10000; }\n if (options.interval == null) { options.interval = 250; }\n\n return new Promise(function(resolve, reject) {\n\n let timer: NodeJS.Timer = null;\n let done: boolean = false;\n\n // Returns true if cancel was successful. Unsuccessful cancel means we're already done.\n const cancel = (): boolean => {\n if (done) { return false; }\n done = true;\n if (timer) { clearTimeout(timer); }\n return true;\n };\n\n if (options.timeout) {\n timer = setTimeout(() => {\n if (cancel()) { reject(new Error(\"timeout\")); }\n }, options.timeout)\n }\n\n const retryLimit = options.retryLimit;\n\n let attempt = 0;\n function check() {\n return func().then(function(result) {\n\n // If we have a result, or are allowed null then we're done\n if (result !== undefined) {\n if (cancel()) { resolve(result); }\n\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n\n // Otherwise, exponential back-off (up to 10s) our next request\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) { reject(new Error(\"retry limit reached\")); }\n return;\n }\n\n let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) { timeout = options.floor; }\n if (timeout > options.ceiling) { timeout = options.ceiling; }\n\n setTimeout(check, timeout);\n }\n\n return null;\n }, function(error) {\n if (cancel()) { reject(error); }\n });\n }\n check();\n });\n}\n\n","'use strict'\nvar ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'\n\n// pre-compute lookup table\nvar ALPHABET_MAP = {}\nfor (var z = 0; z < ALPHABET.length; z++) {\n var x = ALPHABET.charAt(z)\n\n if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\n ALPHABET_MAP[x] = z\n}\n\nfunction polymodStep (pre) {\n var b = pre >> 25\n return ((pre & 0x1FFFFFF) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3)\n}\n\nfunction prefixChk (prefix) {\n var chk = 1\n for (var i = 0; i < prefix.length; ++i) {\n var c = prefix.charCodeAt(i)\n if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')'\n\n chk = polymodStep(chk) ^ (c >> 5)\n }\n chk = polymodStep(chk)\n\n for (i = 0; i < prefix.length; ++i) {\n var v = prefix.charCodeAt(i)\n chk = polymodStep(chk) ^ (v & 0x1f)\n }\n return chk\n}\n\nfunction encode (prefix, words, LIMIT) {\n LIMIT = LIMIT || 90\n if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit')\n\n prefix = prefix.toLowerCase()\n\n // determine chk mod\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') throw new Error(chk)\n\n var result = prefix + '1'\n for (var i = 0; i < words.length; ++i) {\n var x = words[i]\n if ((x >> 5) !== 0) throw new Error('Non 5-bit word')\n\n chk = polymodStep(chk) ^ x\n result += ALPHABET.charAt(x)\n }\n\n for (i = 0; i < 6; ++i) {\n chk = polymodStep(chk)\n }\n chk ^= 1\n\n for (i = 0; i < 6; ++i) {\n var v = (chk >> ((5 - i) * 5)) & 0x1f\n result += ALPHABET.charAt(v)\n }\n\n return result\n}\n\nfunction __decode (str, LIMIT) {\n LIMIT = LIMIT || 90\n if (str.length < 8) return str + ' too short'\n if (str.length > LIMIT) return 'Exceeds length limit'\n\n // don't allow mixed case\n var lowered = str.toLowerCase()\n var uppered = str.toUpperCase()\n if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str\n str = lowered\n\n var split = str.lastIndexOf('1')\n if (split === -1) return 'No separator character for ' + str\n if (split === 0) return 'Missing prefix for ' + str\n\n var prefix = str.slice(0, split)\n var wordChars = str.slice(split + 1)\n if (wordChars.length < 6) return 'Data too short'\n\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') return chk\n\n var words = []\n for (var i = 0; i < wordChars.length; ++i) {\n var c = wordChars.charAt(i)\n var v = ALPHABET_MAP[c]\n if (v === undefined) return 'Unknown character ' + c\n chk = polymodStep(chk) ^ v\n\n // not in the checksum?\n if (i + 6 >= wordChars.length) continue\n words.push(v)\n }\n\n if (chk !== 1) return 'Invalid checksum for ' + str\n return { prefix: prefix, words: words }\n}\n\nfunction decodeUnsafe () {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n}\n\nfunction decode (str) {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n\n throw new Error(res)\n}\n\nfunction convert (data, inBits, outBits, pad) {\n var value = 0\n var bits = 0\n var maxV = (1 << outBits) - 1\n\n var result = []\n for (var i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i]\n bits += inBits\n\n while (bits >= outBits) {\n bits -= outBits\n result.push((value >> bits) & maxV)\n }\n }\n\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV)\n }\n } else {\n if (bits >= inBits) return 'Excess padding'\n if ((value << (outBits - bits)) & maxV) return 'Non-zero padding'\n }\n\n return result\n}\n\nfunction toWordsUnsafe (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n}\n\nfunction toWords (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nfunction fromWordsUnsafe (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n}\n\nfunction fromWords (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nmodule.exports = {\n decodeUnsafe: decodeUnsafe,\n decode: decode,\n encode: encode,\n toWordsUnsafe: toWordsUnsafe,\n toWords: toWords,\n fromWordsUnsafe: fromWordsUnsafe,\n fromWords: fromWords\n}\n","export const version = \"providers/5.5.1\";\n","\"use strict\";\n\nimport { Block, TransactionReceipt, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { AddressZero } from \"@ethersproject/constants\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, parse as parseTransaction } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport type FormatFunc = (value: any) => any;\n\nexport type FormatFuncs = { [ key: string ]: FormatFunc };\n\nexport type Formats = {\n transaction: FormatFuncs,\n transactionRequest: FormatFuncs,\n receipt: FormatFuncs,\n receiptLog: FormatFuncs,\n block: FormatFuncs,\n blockWithTransactions: FormatFuncs,\n filter: FormatFuncs,\n filterLog: FormatFuncs,\n};\n\nexport class Formatter {\n readonly formats: Formats;\n\n constructor() {\n logger.checkNew(new.target, Formatter);\n this.formats = this.getDefaultFormats();\n }\n\n getDefaultFormats(): Formats {\n const formats: Formats = ({ });\n\n const address = this.address.bind(this);\n const bigNumber = this.bigNumber.bind(this);\n const blockTag = this.blockTag.bind(this);\n const data = this.data.bind(this);\n const hash = this.hash.bind(this);\n const hex = this.hex.bind(this);\n const number = this.number.bind(this);\n const type = this.type.bind(this);\n\n const strictData = (v: any) => { return this.data(v, true); };\n\n formats.transaction = {\n hash: hash,\n\n type: type,\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n\n blockHash: Formatter.allowNull(hash, null),\n blockNumber: Formatter.allowNull(number, null),\n transactionIndex: Formatter.allowNull(number, null),\n\n confirmations: Formatter.allowNull(number, null),\n\n from: address,\n\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n\n gasLimit: bigNumber,\n to: Formatter.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data: data,\n\n r: Formatter.allowNull(this.uint256),\n s: Formatter.allowNull(this.uint256),\n v: Formatter.allowNull(number),\n\n creates: Formatter.allowNull(address, null),\n\n raw: Formatter.allowNull(data),\n };\n\n formats.transactionRequest = {\n from: Formatter.allowNull(address),\n nonce: Formatter.allowNull(number),\n gasLimit: Formatter.allowNull(bigNumber),\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n to: Formatter.allowNull(address),\n value: Formatter.allowNull(bigNumber),\n data: Formatter.allowNull(strictData),\n type: Formatter.allowNull(number),\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n };\n\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash,\n address: address,\n topics: Formatter.arrayOf(hash),\n data: data,\n logIndex: number,\n blockHash: hash,\n };\n\n formats.receipt = {\n to: Formatter.allowNull(this.address, null),\n from: Formatter.allowNull(this.address, null),\n contractAddress: Formatter.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter.allowNull(data),// @TODO: should this be data?\n blockHash: hash,\n transactionHash: hash,\n logs: Formatter.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter.allowNull(bigNumber),\n status: Formatter.allowNull(number),\n type: type\n };\n\n formats.block = {\n hash: hash,\n parentHash: hash,\n number: number,\n\n timestamp: number,\n nonce: Formatter.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n\n miner: address,\n extraData: data,\n\n transactions: Formatter.allowNull(Formatter.arrayOf(hash)),\n\n baseFeePerGas: Formatter.allowNull(bigNumber)\n };\n\n formats.blockWithTransactions = shallowCopy(formats.block);\n formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));\n\n formats.filter = {\n fromBlock: Formatter.allowNull(blockTag, undefined),\n toBlock: Formatter.allowNull(blockTag, undefined),\n blockHash: Formatter.allowNull(hash, undefined),\n address: Formatter.allowNull(address, undefined),\n topics: Formatter.allowNull(this.topics.bind(this), undefined),\n };\n\n formats.filterLog = {\n blockNumber: Formatter.allowNull(number),\n blockHash: Formatter.allowNull(hash),\n transactionIndex: number,\n\n removed: Formatter.allowNull(this.boolean.bind(this)),\n\n address: address,\n data: Formatter.allowFalsish(data, \"0x\"),\n\n topics: Formatter.arrayOf(hash),\n\n transactionHash: hash,\n logIndex: number,\n };\n\n return formats;\n }\n\n accessList(accessList: Array): AccessList {\n return accessListify(accessList || []);\n }\n\n // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number\n // Strict! Used on input.\n number(number: any): number {\n if (number === \"0x\") { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n type(number: any): number {\n if (number === \"0x\" || number == null) { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n // Strict! Used on input.\n bigNumber(value: any): BigNumber {\n return BigNumber.from(value);\n }\n\n // Requires a boolean, \"true\" or \"false\"; returns a boolean\n boolean(value: any): boolean {\n if (typeof(value) === \"boolean\") { return value; }\n if (typeof(value) === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") { return true; }\n if (value === \"false\") { return false; }\n }\n throw new Error(\"invalid boolean - \" + value);\n }\n\n hex(value: any, strict?: boolean): string {\n if (typeof(value) === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n if (isHexString(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n\n data(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if ((result.length % 2) !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n }\n\n // Requires an address\n // Strict! Used on input.\n address(value: any): string {\n return getAddress(value);\n }\n\n callAddress(value: any): string {\n if (!isHexString(value, 32)) { return null; }\n const address = getAddress(hexDataSlice(value, 12));\n return (address === AddressZero) ? null: address;\n }\n\n contractAddress(value: any): string {\n return getContractAddress(value);\n }\n\n // Strict! Used on input.\n blockTag(blockTag: any): string {\n if (blockTag == null) { return \"latest\"; }\n\n if (blockTag === \"earliest\") { return \"0x0\"; }\n\n if (blockTag === \"latest\" || blockTag === \"pending\") {\n return blockTag;\n }\n\n if (typeof(blockTag) === \"number\" || isHexString(blockTag)) {\n return hexValue(blockTag);\n }\n\n throw new Error(\"invalid blockTag\");\n }\n\n // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash.\n hash(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if (hexDataLength(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n }\n\n // Returns the difficulty as a number, or if too large (i.e. PoA network) null\n difficulty(value: any): number {\n if (value == null) { return null; }\n\n const v = BigNumber.from(value);\n\n try {\n return v.toNumber();\n } catch (error) { }\n\n return null;\n }\n\n uint256(value: any): string {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return hexZeroPad(value, 32);\n }\n\n _block(value: any, format: any): Block {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n // The difficulty may need to come from _difficulty in recursed blocks\n const difficulty = (value._difficulty != null) ? value._difficulty: value.difficulty;\n const result = Formatter.check(format, value);\n result._difficulty = ((difficulty == null) ? null: BigNumber.from(difficulty));\n return result;\n }\n\n block(value: any): Block {\n return this._block(value, this.formats.block);\n }\n\n blockWithTransactions(value: any): Block {\n return this._block(value, this.formats.blockWithTransactions);\n }\n\n // Strict! Used on input.\n transactionRequest(value: any): any {\n return Formatter.check(this.formats.transactionRequest, value);\n }\n\n transactionResponse(transaction: any): TransactionResponse {\n\n // Rename gas to gasLimit\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (transaction.to && BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n\n // Rename input to data\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n\n // If to and creates are empty, populate the creates from the transaction\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n\n if ((transaction.type === 1 || transaction.type === 2)&& transaction.accessList == null) {\n transaction.accessList = [ ];\n }\n\n const result: TransactionResponse = Formatter.check(this.formats.transaction, transaction);\n\n if (transaction.chainId != null) {\n let chainId = transaction.chainId;\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n result.chainId = chainId;\n\n } else {\n let chainId = transaction.networkId;\n\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n if (typeof(chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) { chainId = 0; }\n chainId = parseInt(chainId);\n }\n\n if (typeof(chainId) !== \"number\") { chainId = 0; }\n\n result.chainId = chainId;\n }\n\n // 0x0000... should actually be null\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n\n return result;\n }\n\n transaction(value: any): any {\n return parseTransaction(value);\n }\n\n receiptLog(value: any): any {\n return Formatter.check(this.formats.receiptLog, value);\n }\n\n receipt(value: any): TransactionReceipt {\n const result: TransactionReceipt = Formatter.check(this.formats.receipt, value);\n\n // RSK incorrectly implemented EIP-658, so we munge things a bit here for it\n if (result.root != null) {\n if (result.root.length <= 4) {\n // Could be 0x00, 0x0, 0x01 or 0x1\n const value = BigNumber.from(result.root).toNumber();\n if (value === 0 || value === 1) {\n // Make sure if both are specified, they match\n if (result.status != null && (result.status !== value)) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n // Must be a valid bytes32\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n\n if (result.status != null) {\n result.byzantium = true;\n }\n\n return result;\n }\n\n topics(value: any): any {\n if (Array.isArray(value)) {\n return value.map((v) => this.topics(v));\n\n } else if (value != null) {\n return this.hash(value, true);\n }\n\n return null;\n }\n\n filter(value: any): any {\n return Formatter.check(this.formats.filter, value);\n }\n\n filterLog(value: any): any {\n return Formatter.check(this.formats.filterLog, value);\n }\n\n static check(format: { [ name: string ]: FormatFunc }, object: any): any {\n const result: any = {};\n for (const key in format) {\n try {\n const value = format[key](object[key]);\n if (value !== undefined) { result[key] = value; }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n }\n\n // if value is null-ish, nullValue is returned\n static allowNull(format: FormatFunc, nullValue?: any): FormatFunc {\n return (function(value: any) {\n if (value == null) { return nullValue; }\n return format(value);\n });\n }\n\n // If value is false-ish, replaceValue is returned\n static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc {\n return (function(value: any) {\n if (!value) { return replaceValue; }\n return format(value);\n });\n }\n\n // Requires an Array satisfying check\n static arrayOf(format: FormatFunc): FormatFunc {\n return (function(array: any): Array {\n if (!Array.isArray(array)) { throw new Error(\"not an array\"); }\n\n const result: any = [];\n\n array.forEach(function(value) {\n result.push(format(value));\n });\n\n return result;\n });\n }\n}\n\nexport interface CommunityResourcable {\n isCommunityResource(): boolean;\n}\n\nexport function isCommunityResourcable(value: any): value is CommunityResourcable {\n return (value && typeof(value.isCommunityResource) === \"function\");\n}\n\nexport function isCommunityResource(value: any): boolean {\n return (isCommunityResourcable(value) && value.isCommunityResource());\n}\n\n// Show the throttle message only once\nlet throttleMessage = false;\nexport function showThrottleMessage() {\n if (throttleMessage) { return; }\n throttleMessage = true;\n\n console.log(\"========= NOTICE =========\")\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n}\n\n","\"use strict\";\n\nimport {\n Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, ForkEvent,\n Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse\n} from \"@ethersproject/abstract-provider\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { namehash } from \"@ethersproject/hash\";\nimport { getNetwork, Network, Networkish } from \"@ethersproject/networks\";\nimport { Deferrable, defineReadOnly, getStatic, resolveProperties } from \"@ethersproject/properties\";\nimport { Transaction } from \"@ethersproject/transactions\";\nimport { sha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { fetchJson, poll } from \"@ethersproject/web\";\n\nimport bech32 from \"bech32\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Formatter } from \"./formatter\";\n\n//////////////////////////////\n// Event Serializeing\n\nfunction checkTopic(topic: string): string {\n if (topic == null) { return \"null\"; }\n if (hexDataLength(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n}\n\nfunction serializeTopics(topics: Array>): string {\n // Remove trailing null AND-topics; they are redundant\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) { topics.pop(); }\n\n return topics.map((topic) => {\n if (Array.isArray(topic)) {\n\n // Only track unique OR-topics\n const unique: { [ topic: string ]: boolean } = { }\n topic.forEach((topic) => {\n unique[checkTopic(topic)] = true;\n });\n\n // The order of OR-topics does not matter\n const sorted = Object.keys(unique);\n sorted.sort();\n\n return sorted.join(\"|\");\n\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n}\n\nfunction deserializeTopics(data: string): Array> {\n if (data === \"\") { return [ ]; }\n\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") { return [ ]; }\n\n const comps = topic.split(\"|\").map((topic) => {\n return ((topic === \"null\") ? null: topic);\n });\n\n return ((comps.length === 1) ? comps[0]: comps);\n });\n}\n\nfunction getEventTag(eventName: EventType): string {\n if (typeof(eventName) === \"string\") {\n eventName = eventName.toLowerCase();\n\n if (hexDataLength(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n\n } else if (ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n\n } else if (eventName && typeof(eventName) === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n\n throw new Error(\"invalid event - \" + eventName);\n}\n\n//////////////////////////////\n// Helper Object\n\nfunction getTime() {\n return (new Date()).getTime();\n}\n\nfunction stall(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\n//////////////////////////////\n// Provider Object\n\n\n/**\n * EventType\n * - \"block\"\n * - \"poll\"\n * - \"didPoll\"\n * - \"pending\"\n * - \"error\"\n * - \"network\"\n * - filter\n * - topics array\n * - transaction hash\n */\n\nconst PollableEvents = [ \"block\", \"network\", \"pending\", \"poll\" ];\n\nexport class Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"listener\", listener);\n defineReadOnly(this, \"once\", once);\n }\n\n get event(): EventType {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n }\n\n get type(): string {\n return this.tag.split(\":\")[0]\n }\n\n get hash(): string {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") { return null; }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") { return null; }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = { };\n\n if (topics.length > 0) { filter.topics = topics; }\n if (address && address !== \"*\") { filter.address = address; }\n\n return filter;\n }\n\n pollable(): boolean {\n return (this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0);\n }\n}\n\nexport interface EnsResolver {\n\n // Name this Resolver is associated with\n readonly name: string;\n\n // The address of the resolver\n readonly address: string;\n\n // Multichain address resolution (also normal address resolution)\n // See: https://eips.ethereum.org/EIPS/eip-2304\n getAddress(coinType?: 60): Promise\n\n // Contenthash field\n // See: https://eips.ethereum.org/EIPS/eip-1577\n getContentHash(): Promise;\n\n // Storage of text records\n // See: https://eips.ethereum.org/EIPS/eip-634\n getText(key: string): Promise;\n};\n\nexport interface EnsProvider {\n resolveName(name: string): Promise;\n lookupAddress(address: string): Promise;\n getResolver(name: string): Promise;\n}\n\ntype CoinInfo = {\n symbol: string,\n ilk?: string, // General family\n prefix?: string, // Bech32 prefix\n p2pkh?: number, // Pay-to-Public-Key-Hash Version\n p2sh?: number, // Pay-to-Script-Hash Version\n};\n\n// https://github.com/satoshilabs/slips/blob/master/slip-0044.md\nconst coinInfos: { [ coinType: string ]: CoinInfo } = {\n \"0\": { symbol: \"btc\", p2pkh: 0x00, p2sh: 0x05, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 0x30, p2sh: 0x32, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 0x1e, p2sh: 0x16 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" },\n};\n\nfunction bytes32ify(value: number): string {\n return hexZeroPad(BigNumber.from(value).toHexString(), 32);\n}\n\n// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d)\nfunction base58Encode(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nexport interface Avatar {\n url: string;\n linkage: Array<{ type: string, content: string }>;\n}\n\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\"),\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\n\nfunction _parseString(result: string): null | string {\n try {\n return toUtf8String(_parseBytes(result));\n } catch(error) { }\n return null;\n}\n\nfunction _parseBytes(result: string): null | string {\n if (result === \"0x\") { return null; }\n\n const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber();\n const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber();\n return hexDataSlice(result, offset + 32, offset + 32 + length);\n}\n\n\nexport class Resolver implements EnsResolver {\n readonly provider: BaseProvider;\n\n readonly name: string;\n readonly address: string;\n\n readonly _resolvedAddress: null | string;\n\n // The resolvedAddress is only for creating a ReverseLookup resolver\n constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string) {\n defineReadOnly(this, \"provider\", provider);\n defineReadOnly(this, \"name\", name);\n defineReadOnly(this, \"address\", provider.formatter.address(address));\n defineReadOnly(this, \"_resolvedAddress\", resolvedAddress);\n }\n\n async _fetchBytes(selector: string, parameters?: string): Promise {\n // e.g. keccak256(\"addr(bytes32,uint256)\")\n const tx = {\n to: this.address,\n data: hexConcat([ selector, namehash(this.name), (parameters || \"0x\") ])\n };\n\n try {\n return _parseBytes(await this.provider.call(tx));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n _getAddress(coinType: number, hexBytes: string): string {\n const coinInfo = coinInfos[String(coinType)];\n\n if (coinInfo == null) {\n logger.throwError(`unsupported coin type: ${ coinType }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`\n });\n }\n\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n\n const bytes = arrayify(hexBytes);\n\n // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG\n if (coinInfo.p2pkh != null) {\n const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n const length = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2pkh ], (\"0x\" + p2pkh[2]) ]));\n }\n }\n }\n\n // P2SH: OP_HASH160 OP_EQUAL\n if (coinInfo.p2sh != null) {\n const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n const length = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2sh ], (\"0x\" + p2sh[2]) ]));\n }\n }\n }\n\n // Bech32\n if (coinInfo.prefix != null) {\n const length = bytes[1];\n\n // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program\n let version = bytes[0];\n if (version === 0x00) {\n if (length !== 20 && length !== 32) {\n version = -1;\n }\n } else {\n version = -1;\n }\n\n if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {\n const words = bech32.toWords(bytes.slice(2));\n words.unshift(version);\n return bech32.encode(coinInfo.prefix, words);\n }\n }\n\n return null;\n }\n\n\n async getAddress(coinType?: number): Promise {\n if (coinType == null) { coinType = 60; }\n\n // If Ethereum, use the standard `addr(bytes32)`\n if (coinType === 60) {\n try {\n // keccak256(\"addr(bytes32)\")\n const transaction = {\n to: this.address,\n data: (\"0x3b3b57de\" + namehash(this.name).substring(2))\n };\n const hexBytes = await this.provider.call(transaction);\n\n // No address\n if (hexBytes === \"0x\" || hexBytes === HashZero) { return null; }\n\n return this.provider.formatter.callAddress(hexBytes);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n // keccak256(\"addr(bytes32,uint256\")\n const hexBytes = await this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType));\n\n // No address\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // Compute the address\n const address = this._getAddress(coinType, hexBytes);\n\n if (address == null) {\n logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`,\n coinType: coinType,\n data: hexBytes\n });\n }\n\n return address;\n }\n\n async getAvatar(): Promise {\n const linkage: Array<{ type: string, content: string }> = [ ];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) { return null; }\n\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n\n if (match == null) { continue; }\n switch (match[1]) {\n case \"https\":\n linkage.push({ type: \"url\", content: avatar });\n return { linkage, url: avatar };\n\n case \"data\":\n linkage.push({ type: \"data\", content: avatar });\n return { linkage, url: avatar };\n\n case \"ipfs\":\n linkage.push({ type: \"ipfs\", content: avatar });\n return { linkage, url: `https:/\\/gateway.ipfs.io/ipfs/${ avatar.substring(7) }` }\n\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (match[1] === \"erc721\") ? \"0xc87b56dd\": \"0x0e89341c\";\n linkage.push({ type: match[1], content: avatar });\n\n // The owner of this name\n const owner = (this._resolvedAddress || await this.getAddress());\n\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) { return null; }\n\n const addr = await this.provider.formatter.address(comps[0]);\n const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);\n\n // Check that this account owns the token\n if (match[1] === \"erc721\") {\n // ownerOf(uint256 tokenId)\n const tokenOwner = this.provider.formatter.callAddress(await this.provider.call({\n to: addr, data: hexConcat([ \"0x6352211e\", tokenId ])\n }));\n if (owner !== tokenOwner) { return null; }\n linkage.push({ type: \"owner\", content: tokenOwner });\n\n } else if (match[1] === \"erc1155\") {\n // balanceOf(address owner, uint256 tokenId)\n const balance = BigNumber.from(await this.provider.call({\n to: addr, data: hexConcat([ \"0x00fdd58e\", hexZeroPad(owner, 32), tokenId ])\n }));\n if (balance.isZero()) { return null; }\n linkage.push({ type: \"balance\", content: balance.toString() });\n }\n\n // Call the token contract for the metadata URL\n const tx = {\n to: this.provider.formatter.address(comps[0]),\n data: hexConcat([ selector, tokenId ])\n };\n let metadataUrl = _parseString(await this.provider.call(tx))\n if (metadataUrl == null) { return null; }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n\n // ERC-1155 allows a generic {id} in the URL\n if (match[1] === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n }\n\n // Get the token metadata\n const metadata = await fetchJson(metadataUrl);\n\n // Pull the image URL out\n if (!metadata || typeof(metadata.image) !== \"string\" || !metadata.image.match(/^(https:\\/\\/|data:)/i)) {\n return null;\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n linkage.push({ type: \"url\", content: metadata.image });\n\n return { linkage, url: metadata.image };\n }\n }\n }\n } catch (error) { }\n\n return null;\n }\n\n async getContentHash(): Promise {\n\n // keccak256(\"contenthash()\")\n const hexBytes = await this._fetchBytes(\"0xbc1c58d1\");\n\n // No contenthash\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // IPFS (CID: 1, Type: DAG-PB)\n const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const length = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length * 2) {\n return \"ipfs:/\\/\" + Base58.encode(\"0x\" + ipfs[1]);\n }\n }\n\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/)\n if (swarm) {\n if (swarm[1].length === (32 * 2)) {\n return \"bzz:/\\/\" + swarm[1]\n }\n }\n\n return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n });\n }\n\n async getText(key: string): Promise {\n\n // The key encoded as parameter to fetchBytes\n let keyBytes = toUtf8Bytes(key);\n\n // The nodehash consumes the first slot, so the string pointer targets\n // offset 64, with the length at offset 64 and data starting at offset 96\n keyBytes = concat([ bytes32ify(64), bytes32ify(keyBytes.length), keyBytes ]);\n\n // Pad to word-size (32 bytes)\n if ((keyBytes.length % 32) !== 0) {\n keyBytes = concat([ keyBytes, hexZeroPad(\"0x\", 32 - (key.length % 32)) ])\n }\n\n const hexBytes = await this._fetchBytes(\"0x59d1d43c\", hexlify(keyBytes));\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n return toUtf8String(hexBytes);\n }\n}\n\nlet defaultFormatter: Formatter = null;\n\nlet nextPollId = 1;\n\nexport class BaseProvider extends Provider implements EnsProvider {\n _networkPromise: Promise;\n _network: Network;\n\n _events: Array;\n\n formatter: Formatter;\n\n // To help mitigate the eventually consistent nature of the blockchain\n // we keep a mapping of events we emit. If we emit an event X, we expect\n // that a user should be able to query for that event in the callback,\n // if the node returns null, we stall the response until we get back a\n // meaningful value, since we may be hitting a re-org, or a node that\n // has not indexed the event yet.\n // Events:\n // - t:{hash} - Transaction hash\n // - b:{hash} - BlockHash\n // - block - The most recent emitted block\n _emitted: { [ eventName: string ]: number | \"pending\" };\n\n _pollingInterval: number;\n _poller: NodeJS.Timer;\n _bootstrapPoll: NodeJS.Timer;\n\n _lastBlockNumber: number;\n\n _fastBlockNumber: number;\n _fastBlockNumberPromise: Promise;\n _fastQueryDate: number;\n\n _maxInternalBlockNumber: number;\n _internalBlockNumber: Promise<{ blockNumber: number, reqTime: number, respTime: number }>;\n\n readonly anyNetwork: boolean;\n\n\n /**\n * ready\n *\n * A Promise that resolves only once the provider is ready.\n *\n * Sub-classes that call the super with a network without a chainId\n * MUST set this. Standard named networks have a known chainId.\n *\n */\n\n constructor(network: Networkish | Promise) {\n logger.checkNew(new.target, Provider);\n\n super();\n\n // Events being listened to\n this._events = [];\n\n this._emitted = { block: -2 };\n\n this.formatter = new.target.getFormatter();\n\n // If network is any, this Provider allows the underlying\n // network to change dynamically, and we auto-detect the\n // current network\n defineReadOnly(this, \"anyNetwork\", (network === \"any\"));\n if (this.anyNetwork) { network = this.detectNetwork(); }\n\n if (network instanceof Promise) {\n this._networkPromise = network;\n\n // Squash any \"unhandled promise\" errors; that do not need to be handled\n network.catch((error) => { });\n\n // Trigger initial network setting (async)\n this._ready().catch((error) => { });\n\n } else {\n const knownNetwork = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (knownNetwork) {\n defineReadOnly(this, \"_network\", knownNetwork);\n this.emit(\"network\", knownNetwork, null);\n\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n\n this._maxInternalBlockNumber = -1024;\n\n this._lastBlockNumber = -2;\n\n this._pollingInterval = 4000;\n\n this._fastQueryDate = 0;\n }\n\n async _ready(): Promise {\n if (this._network == null) {\n let network: Network = null;\n if (this._networkPromise) {\n try {\n network = await this._networkPromise;\n } catch (error) { }\n }\n\n // Try the Provider's network detection (this MUST throw if it cannot)\n if (network == null) {\n network = await this.detectNetwork();\n }\n\n // This should never happen; every Provider sub-class should have\n // suggested a network by here (or have thrown).\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // Possible this call stacked so do not call defineReadOnly again\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n defineReadOnly(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n }\n\n return this._network;\n }\n\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get ready(): Promise {\n return poll(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }\n\n // @TODO: Remove this and just create a singleton formatter\n static getFormatter(): Formatter {\n if (defaultFormatter == null) {\n defaultFormatter = new Formatter();\n }\n return defaultFormatter;\n }\n\n // @TODO: Remove this and just use getNetwork\n static getNetwork(network: Networkish): Network {\n return getNetwork((network == null) ? \"homestead\": network);\n }\n\n // Fetches the blockNumber, but will reuse any result that is less\n // than maxAge old or has been requested since the last request\n async _getInternalBlockNumber(maxAge: number): Promise {\n await this._ready();\n\n // Allowing stale data up to maxAge old\n if (maxAge > 0) {\n\n // While there are pending internal block requests...\n while (this._internalBlockNumber) {\n\n // ...\"remember\" which fetch we started with\n const internalBlockNumber = this._internalBlockNumber;\n\n try {\n // Check the result is not too stale\n const result = await internalBlockNumber;\n if ((getTime() - result.respTime) <= maxAge) {\n return result.blockNumber;\n }\n\n // Too old; fetch a new value\n break;\n\n } catch(error) {\n\n // The fetch rejected; if we are the first to get the\n // rejection, drop through so we replace it with a new\n // fetch; all others blocked will then get that fetch\n // which won't match the one they \"remembered\" and loop\n if (this._internalBlockNumber === internalBlockNumber) {\n break;\n }\n }\n }\n }\n\n const reqTime = getTime();\n\n const checkInternalBlockNumber = resolveProperties({\n blockNumber: this.perform(\"getBlockNumber\", { }),\n networkError: this.getNetwork().then((network) => (null), (error) => (error))\n }).then(({ blockNumber, networkError }) => {\n if (networkError) {\n // Unremember this bad internal block number\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n throw networkError;\n }\n\n const respTime = getTime();\n\n blockNumber = BigNumber.from(blockNumber).toNumber();\n if (blockNumber < this._maxInternalBlockNumber) { blockNumber = this._maxInternalBlockNumber; }\n\n this._maxInternalBlockNumber = blockNumber;\n this._setFastBlockNumber(blockNumber); // @TODO: Still need this?\n return { blockNumber, reqTime, respTime };\n });\n\n this._internalBlockNumber = checkInternalBlockNumber;\n\n // Swallow unhandled exceptions; if needed they are handled else where\n checkInternalBlockNumber.catch((error) => {\n // Don't null the dead (rejected) fetch, if it has already been updated\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n });\n\n return (await checkInternalBlockNumber).blockNumber;\n }\n\n async poll(): Promise {\n const pollId = nextPollId++;\n\n // Track all running promises, so we can trigger a post-poll once they are complete\n const runners: Array> = [];\n\n let blockNumber: number = null;\n try {\n blockNumber = await this._getInternalBlockNumber(100 + this.pollingInterval / 2);\n } catch (error) {\n this.emit(\"error\", error);\n return;\n }\n this._setFastBlockNumber(blockNumber);\n\n // Emit a poll event after we have the latest (fast) block number\n this.emit(\"poll\", pollId, blockNumber);\n\n // If the block has not changed, meh.\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return;\n }\n\n // First polling cycle, trigger a \"block\" events\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n\n if (Math.abs(((this._emitted.block)) - blockNumber) > 1000) {\n logger.warn(`network block skew detected; skipping block events (emitted=${ this._emitted.block } blockNumber${ blockNumber })`);\n this.emit(\"error\", logger.makeError(\"network block skew detected\", Logger.errors.NETWORK_ERROR, {\n blockNumber: blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n\n } else {\n // Notify all listener for each block that has passed\n for (let i = (this._emitted.block) + 1; i <= blockNumber; i++) {\n this.emit(\"block\", i);\n }\n }\n\n // The emitted block was updated, check for obsolete events\n if ((this._emitted.block) !== blockNumber) {\n this._emitted.block = blockNumber;\n\n Object.keys(this._emitted).forEach((key) => {\n // The block event does not expire\n if (key === \"block\") { return; }\n\n // The block we were at when we emitted this event\n const eventBlockNumber = this._emitted[key];\n\n // We cannot garbage collect pending transactions or blocks here\n // They should be garbage collected by the Provider when setting\n // \"pending\" events\n if (eventBlockNumber === \"pending\") { return; }\n\n // Evict any transaction hashes or block hashes over 12 blocks\n // old, since they should not return null anyways\n if (blockNumber - eventBlockNumber > 12) {\n delete this._emitted[key];\n }\n });\n }\n\n // First polling cycle\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n\n // Find all transaction hashes we are waiting on\n this._events.forEach((event) => {\n switch (event.type) {\n case \"tx\": {\n const hash = event.hash;\n let runner = this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt || receipt.blockNumber == null) { return null; }\n this._emitted[\"t:\" + hash] = receipt.blockNumber;\n this.emit(hash, receipt);\n return null;\n }).catch((error: Error) => { this.emit(\"error\", error); });\n\n runners.push(runner);\n\n break;\n }\n\n case \"filter\": {\n const filter = event.filter;\n filter.fromBlock = this._lastBlockNumber + 1;\n filter.toBlock = blockNumber;\n\n const runner = this.getLogs(filter).then((logs) => {\n if (logs.length === 0) { return; }\n logs.forEach((log: Log) => {\n this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n this.emit(filter, log);\n });\n }).catch((error: Error) => { this.emit(\"error\", error); });\n runners.push(runner);\n\n break;\n }\n }\n });\n\n this._lastBlockNumber = blockNumber;\n\n // Once all events for this loop have been processed, emit \"didPoll\"\n Promise.all(runners).then(() => {\n this.emit(\"didPoll\", pollId);\n }).catch((error) => { this.emit(\"error\", error); });\n\n return;\n }\n\n // Deprecated; do not use this\n resetEventsBlock(blockNumber: number): void {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) { this.poll(); }\n }\n\n get network(): Network {\n return this._network;\n }\n\n // This method should query the network if the underlying network\n // can change, such as when connected to a JSON-RPC backend\n async detectNetwork(): Promise {\n return logger.throwError(\"provider does not support network detection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n });\n }\n\n async getNetwork(): Promise {\n const network = await this._ready();\n\n // Make sure we are still connected to the same network; this is\n // only an external call for backends which can have the underlying\n // network change spontaneously\n const currentNetwork = await this.detectNetwork();\n if (network.chainId !== currentNetwork.chainId) {\n\n // We are allowing network changes, things can get complex fast;\n // make sure you know what you are doing if you use \"any\"\n if (this.anyNetwork) {\n this._network = currentNetwork;\n\n // Reset all internal block number guards and caches\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n\n // The \"network\" event MUST happen before this method resolves\n // so any events have a chance to unregister, so we stall an\n // additional event loop before returning from /this/ call\n this.emit(\"network\", currentNetwork, network);\n await stall(0);\n\n return this._network;\n }\n\n const error = logger.makeError(\"underlying network changed\", Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network: network,\n detectedNetwork: currentNetwork\n });\n\n this.emit(\"error\", error);\n throw error;\n }\n\n return network;\n }\n\n get blockNumber(): number {\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => {\n this._setFastBlockNumber(blockNumber);\n }, (error) => { });\n\n return (this._fastBlockNumber != null) ? this._fastBlockNumber: -1;\n }\n\n get polling(): boolean {\n return (this._poller != null);\n }\n\n set polling(value: boolean) {\n if (value && !this._poller) {\n this._poller = setInterval(() => { this.poll(); }, this.pollingInterval);\n\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(() => {\n this.poll();\n\n // We block additional polls until the polling interval\n // is done, to prevent overwhelming the poll function\n this._bootstrapPoll = setTimeout(() => {\n // If polling was disabled, something may require a poke\n // since starting the bootstrap poll and it was disabled\n if (!this._poller) { this.poll(); }\n\n // Clear out the bootstrap so we can do another\n this._bootstrapPoll = null;\n }, this.pollingInterval);\n }, 0);\n }\n\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n }\n\n get pollingInterval(): number {\n return this._pollingInterval;\n }\n\n set pollingInterval(value: number) {\n if (typeof(value) !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n\n this._pollingInterval = value;\n\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(() => { this.poll(); }, this._pollingInterval);\n }\n }\n\n _getFastBlockNumber(): Promise {\n const now = getTime();\n\n // Stale block number, request a newer value\n if ((now - this._fastQueryDate) > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => {\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n }\n return this._fastBlockNumber;\n });\n }\n\n return this._fastBlockNumberPromise;\n }\n\n _setFastBlockNumber(blockNumber: number): void {\n // Older block, maybe a stale request\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { return; }\n\n // Update the time we updated the blocknumber\n this._fastQueryDate = getTime();\n\n // Newer block number, use it\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n }\n\n async waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise {\n return this._waitForTransaction(transactionHash, (confirmations == null) ? 1: confirmations, timeout || 0, null);\n }\n\n async _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { data: string, from: string, nonce: number, to: string, value: BigNumber, startBlock: number }): Promise {\n const receipt = await this.getTransactionReceipt(transactionHash);\n\n // Receipt is already good\n if ((receipt ? receipt.confirmations: 0) >= confirmations) { return receipt; }\n\n // Poll until the receipt is good...\n return new Promise((resolve, reject) => {\n const cancelFuncs: Array<() => void> = [];\n\n let done = false;\n const alreadyDone = function() {\n if (done) { return true; }\n done = true;\n cancelFuncs.forEach((func) => { func(); });\n return false;\n };\n\n const minedHandler = (receipt: TransactionReceipt) => {\n if (receipt.confirmations < confirmations) { return; }\n if (alreadyDone()) { return; }\n resolve(receipt);\n }\n this.on(transactionHash, minedHandler);\n cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); });\n\n if (replaceable) {\n let lastBlockNumber = replaceable.startBlock;\n let scannedBlock: number = null;\n const replaceHandler = async (blockNumber: number) => {\n if (done) { return; }\n\n // Wait 1 second; this is only used in the case of a fault, so\n // we will trade off a little bit of latency for more consistent\n // results and fewer JSON-RPC calls\n await stall(1000);\n\n this.getTransactionCount(replaceable.from).then(async (nonce) => {\n if (done) { return; }\n\n if (nonce <= replaceable.nonce) {\n lastBlockNumber = blockNumber;\n\n } else {\n // First check if the transaction was mined\n {\n const mined = await this.getTransaction(transactionHash);\n if (mined && mined.blockNumber != null) { return; }\n }\n\n // First time scanning. We start a little earlier for some\n // wiggle room here to handle the eventually consistent nature\n // of blockchain (e.g. the getTransactionCount was for a\n // different block)\n if (scannedBlock == null) {\n scannedBlock = lastBlockNumber - 3;\n if (scannedBlock < replaceable.startBlock) {\n scannedBlock = replaceable.startBlock;\n }\n }\n\n while (scannedBlock <= blockNumber) {\n if (done) { return; }\n\n const block = await this.getBlockWithTransactions(scannedBlock);\n for (let ti = 0; ti < block.transactions.length; ti++) {\n const tx = block.transactions[ti];\n\n // Successfully mined!\n if (tx.hash === transactionHash) { return; }\n\n // Matches our transaction from and nonce; its a replacement\n if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) {\n if (done) { return; }\n\n // Get the receipt of the replacement\n const receipt = await this.waitForTransaction(tx.hash, confirmations);\n\n // Already resolved or rejected (prolly a timeout)\n if (alreadyDone()) { return; }\n\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\"\n }\n\n // Explain why we were replaced\n reject(logger.makeError(\"transaction was replaced\", Logger.errors.TRANSACTION_REPLACED, {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt\n }));\n\n return;\n }\n }\n scannedBlock++;\n }\n }\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n }, (error) => {\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n });\n };\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n cancelFuncs.push(() => {\n this.removeListener(\"block\", replaceHandler);\n });\n }\n\n if (typeof(timeout) === \"number\" && timeout > 0) {\n const timer = setTimeout(() => {\n if (alreadyDone()) { return; }\n reject(logger.makeError(\"timeout exceeded\", Logger.errors.TIMEOUT, { timeout: timeout }));\n }, timeout);\n if (timer.unref) { timer.unref(); }\n\n cancelFuncs.push(() => { clearTimeout(timer); });\n }\n });\n }\n\n async getBlockNumber(): Promise {\n return this._getInternalBlockNumber(0);\n }\n\n async getGasPrice(): Promise {\n await this.getNetwork();\n\n const result = await this.perform(\"getGasPrice\", { });\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result, error\n });\n }\n }\n\n async getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getBalance\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params, result, error\n });\n }\n }\n\n async getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getTransactionCount\", params);\n try {\n return BigNumber.from(result).toNumber();\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params, result, error\n });\n }\n }\n\n async getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getCode\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params, result, error\n });\n }\n }\n\n async getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then((p) => hexValue(p))\n });\n const result = await this.perform(\"getStorageAt\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params, result, error\n });\n }\n }\n\n // This should be called by any subclass wrapping a TransactionResponse\n _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse {\n if (hash != null && hexDataLength(hash) !== 32) { throw new Error(\"invalid response - sendTransaction\"); }\n\n const result = tx;\n\n // Check the hash we expect is the same as the hash the server reported\n if (hash != null && tx.hash !== hash) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });\n }\n\n result.wait = async (confirms?: number, timeout?: number) => {\n if (confirms == null) { confirms = 1; }\n if (timeout == null) { timeout = 0; }\n\n // Get the details to detect replacement\n let replacement = undefined;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n\n const receipt = await this._waitForTransaction(tx.hash, confirms, timeout, replacement);\n if (receipt == null && confirms === 0) { return null; }\n\n // No longer pending, allow the polling loop to garbage collect this\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt: receipt\n });\n }\n return receipt;\n };\n\n return result;\n }\n\n async sendTransaction(signedTransaction: string | Promise): Promise {\n await this.getNetwork();\n const hexTx = await Promise.resolve(signedTransaction).then(t => hexlify(t));\n const tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) { tx.confirmations = 0; }\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n try {\n const hash = await this.perform(\"sendTransaction\", { signedTransaction: hexTx });\n return this._wrapTransaction(tx, hash, blockNumber);\n } catch (error) {\n (error).transaction = tx;\n (error).transactionHash = tx.hash;\n throw error;\n }\n }\n\n async _getTransactionRequest(transaction: Deferrable): Promise {\n const values: any = await transaction;\n\n const tx: any = { };\n\n [\"from\", \"to\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v): null))\n });\n\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v): null));\n });\n\n [\"type\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v: null));\n });\n\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n\n [\"data\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v): null));\n });\n\n return this.formatter.transactionRequest(await resolveProperties(tx));\n }\n\n async _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise {\n filter = await filter;\n\n const result: any = { };\n\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n\n [\"blockHash\", \"topics\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = (filter)[key];\n });\n\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = this._getBlockTag((filter)[key]);\n });\n\n return this.formatter.filter(await resolveProperties(result));\n }\n\n async call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"call\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params, result, error\n });\n }\n }\n\n async estimateGas(transaction: Deferrable): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction)\n });\n\n const result = await this.perform(\"estimateGas\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params, result, error\n });\n }\n }\n\n async _getAddress(addressOrName: string | Promise): Promise {\n addressOrName = await addressOrName;\n if (typeof(addressOrName) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n\n const address = await this.resolveName(addressOrName);\n if (address == null) {\n logger.throwError(\"ENS name not configured\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `resolveName(${ JSON.stringify(addressOrName) })`\n });\n }\n return address;\n }\n\n async _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise {\n await this.getNetwork();\n\n blockHashOrBlockTag = await blockHashOrBlockTag;\n\n // If blockTag is a number (not \"latest\", etc), this is the block number\n let blockNumber = -128;\n\n const params: { [key: string]: any } = {\n includeTransactions: !!includeTransactions\n };\n\n if (isHexString(blockHashOrBlockTag, 32)) {\n params.blockHash = blockHashOrBlockTag;\n } else {\n try {\n params.blockTag = await this._getBlockTag(blockHashOrBlockTag);\n if (isHexString(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n } catch (error) {\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n }\n }\n\n return poll(async () => {\n const block = await this.perform(\"getBlock\", params);\n\n // Block was not found\n if (block == null) {\n\n // For blockhashes, if we didn't say it existed, that blockhash may\n // not exist. If we did see it though, perhaps from a log, we know\n // it exists, and this node is just not caught up yet.\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) { return null; }\n }\n\n // For block tags, if we are asking for a future block, we return null\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) { return null; }\n }\n\n // Retry on the next block\n return undefined;\n }\n\n // Add transactions\n if (includeTransactions) {\n let blockNumber: number = null;\n for (let i = 0; i < block.transactions.length; i++) {\n const tx = block.transactions[i];\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n if (blockNumber == null) {\n blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n }\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n }\n\n const blockWithTxs: any = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map((tx: TransactionResponse) => this._wrapTransaction(tx));\n return blockWithTxs;\n }\n\n return this.formatter.block(block);\n\n }, { oncePoll: this });\n }\n\n getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, false));\n }\n\n getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, true));\n }\n\n async getTransaction(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransaction\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n const tx = this.formatter.transactionResponse(result);\n\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n\n return this._wrapTransaction(tx);\n }, { oncePoll: this });\n }\n\n async getTransactionReceipt(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransactionReceipt\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n // \"geth-etc\" returns receipts before they are ready\n if (result.blockHash == null) { return undefined; }\n\n const receipt = this.formatter.receipt(result);\n\n if (receipt.blockNumber == null) {\n receipt.confirmations = 0;\n\n } else if (receipt.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - receipt.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n receipt.confirmations = confirmations;\n }\n\n return receipt;\n }, { oncePoll: this });\n }\n\n async getLogs(filter: Filter | FilterByBlockHash | Promise): Promise> {\n await this.getNetwork();\n const params = await resolveProperties({ filter: this._getFilter(filter) });\n const logs: Array = await this.perform(\"getLogs\", params);\n logs.forEach((log) => {\n if (log.removed == null) { log.removed = false; }\n });\n return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs);\n }\n\n async getEtherPrice(): Promise {\n await this.getNetwork();\n return this.perform(\"getEtherPrice\", { });\n }\n\n async _getBlockTag(blockTag: BlockTag | Promise): Promise {\n blockTag = await blockTag;\n\n if (typeof(blockTag) === \"number\" && blockTag < 0) {\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n\n let blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n blockNumber += blockTag;\n if (blockNumber < 0) { blockNumber = 0; }\n return this.formatter.blockTag(blockNumber)\n }\n\n return this.formatter.blockTag(blockTag);\n }\n\n\n async getResolver(name: string): Promise {\n try {\n const address = await this._getResolver(name);\n if (address == null) { return null; }\n return new Resolver(this, address, name);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n async _getResolver(name: string): Promise {\n // Get the resolver from the blockchain\n const network = await this.getNetwork();\n\n // No ENS...\n if (!network.ensAddress) {\n logger.throwError(\n \"network does not support ENS\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // keccak256(\"resolver(bytes32)\")\n const transaction = {\n to: network.ensAddress,\n data: (\"0x0178b8bf\" + namehash(name).substring(2))\n };\n\n try {\n return this.formatter.callAddress(await this.call(transaction));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n async resolveName(name: string | Promise): Promise {\n name = await name;\n\n // If it is already an address, nothing to resolve\n try {\n return Promise.resolve(this.formatter.address(name));\n } catch (error) {\n // If is is a hexstring, the address is bad (See #694)\n if (isHexString(name)) { throw error; }\n }\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n\n // Get the addr from the resovler\n const resolver = await this.getResolver(name);\n if (!resolver) { return null; }\n\n return await resolver.getAddress();\n }\n\n async lookupAddress(address: string | Promise): Promise {\n address = await address;\n address = this.formatter.address(address);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n // keccak(\"name(bytes32)\")\n let bytes = arrayify(await this.call({\n to: resolverAddress,\n data: (\"0x691f3431\" + namehash(reverseName).substring(2))\n }));\n\n // Strip off the dynamic string pointer (0x20)\n if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { return null; }\n bytes = bytes.slice(32);\n\n // Not a length-prefixed string\n if (bytes.length < 32) { return null; }\n\n // Get the length of the string (from the length-prefix)\n const length = BigNumber.from(bytes.slice(0, 32)).toNumber();\n bytes = bytes.slice(32);\n\n // Length longer than available data\n if (length > bytes.length) { return null; }\n\n const name = toUtf8String(bytes.slice(0, length));\n\n // Make sure the reverse record matches the foward record\n const addr = await this.resolveName(name);\n if (addr != address) { return null; }\n\n return name;\n }\n\n async getAvatar(nameOrAddress: string): Promise {\n let resolver: Resolver = null;\n if (isHexString(nameOrAddress)) {\n // Address; reverse lookup\n const address = this.formatter.address(nameOrAddress);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n resolver = new Resolver(this, resolverAddress, \"_\", address);\n\n } else {\n // ENS name; forward lookup\n resolver = await this.getResolver(nameOrAddress);\n if (!resolver) { return null; }\n }\n\n const avatar = await resolver.getAvatar();\n if (avatar == null) { return null; }\n\n return avatar.url;\n }\n\n perform(method: string, params: any): Promise {\n return logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n\n _startEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _stopEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _addEventListener(eventName: EventType, listener: Listener, once: boolean): this {\n const event = new Event(getEventTag(eventName), listener, once)\n this._events.push(event);\n this._startEvent(event);\n\n return this;\n }\n\n on(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n once(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n\n emit(eventName: EventType, ...args: Array): boolean {\n let result = false;\n\n let stopped: Array = [ ];\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n\n setTimeout(() => {\n event.listener.apply(this, args);\n }, 0);\n\n result = true;\n\n if (event.once) {\n stopped.push(event);\n return false;\n }\n\n return true;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return result;\n }\n\n listenerCount(eventName?: EventType): number {\n if (!eventName) { return this._events.length; }\n\n let eventTag = getEventTag(eventName);\n return this._events.filter((event) => {\n return (event.tag === eventTag);\n }).length;\n }\n\n listeners(eventName?: EventType): Array {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n\n let eventTag = getEventTag(eventName);\n return this._events\n .filter((event) => (event.tag === eventTag))\n .map((event) => event.listener);\n }\n\n off(eventName: EventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [ ];\n\n let found = false;\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag || event.listener != listener) { return true; }\n if (found) { return true; }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n\n removeAllListeners(eventName?: EventType): this {\n let stopped: Array = [ ];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [ ];\n } else {\n const eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n}\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/JSON-RPC\n\nimport { Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Bytes, hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { checkProperties, deepCopy, Deferrable, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { AccessList, accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson, poll } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider, Event } from \"./base-provider\";\n\n\nconst errorGas = [ \"call\", \"estimateGas\" ];\n\nfunction checkError(method: string, error: any, params: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n if (e && e.message.match(\"reverted\") && isHexString(e.data)) {\n return e.data;\n }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n\n const transaction = params.transaction || params.signedTransaction;\n\n // \"insufficient funds for gas * price + value + cost(data)\"\n if (message.match(/insufficient funds|base fee exceeds gas limit/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"nonce too low\"\n if (message.match(/nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction underpriced/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/only replay-protected/)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", Logger.errors.UNSUPPORTED_OPERATION, {\n error, method, transaction\n });\n }\n\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nfunction timer(timeout: number): Promise {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n}\n\nfunction getResult(payload: { error?: { code?: number, data?: any, message?: string }, result?: any }): any {\n if (payload.error) {\n // @TODO: not any\n const error: any = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n\n return payload.result;\n}\n\nfunction getLowerCase(value: string): string {\n if (value) { return value.toLowerCase(); }\n return value;\n}\n\nconst _constructorGuard = {};\n\nexport class JsonRpcSigner extends Signer implements TypedDataSigner {\n readonly provider: JsonRpcProvider;\n _index: number;\n _address: string;\n\n constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number) {\n logger.checkNew(new.target, JsonRpcSigner);\n\n super();\n\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n\n defineReadOnly(this, \"provider\", provider);\n\n if (addressOrIndex == null) { addressOrIndex = 0; }\n\n if (typeof(addressOrIndex) === \"string\") {\n defineReadOnly(this, \"_address\", this.provider.formatter.address(addressOrIndex));\n defineReadOnly(this, \"_index\", null);\n\n } else if (typeof(addressOrIndex) === \"number\") {\n defineReadOnly(this, \"_index\", addressOrIndex);\n defineReadOnly(this, \"_address\", null);\n\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n }\n\n connect(provider: Provider): JsonRpcSigner {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n }\n\n connectUnchecked(): JsonRpcSigner {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n }\n\n getAddress(): Promise {\n if (this._address) {\n return Promise.resolve(this._address);\n }\n\n return this.provider.send(\"eth_accounts\", []).then((accounts) => {\n if (accounts.length <= this._index) {\n logger.throwError(\"unknown account #\" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return this.provider.formatter.address(accounts[this._index])\n });\n }\n\n sendUncheckedTransaction(transaction: Deferrable): Promise {\n transaction = shallowCopy(transaction);\n\n const fromAddress = this.getAddress().then((address) => {\n if (address) { address = address.toLowerCase(); }\n return address;\n });\n\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (transaction.gasLimit == null) {\n const estimate = shallowCopy(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.provider.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n }\n\n return resolveProperties({\n tx: resolveProperties(transaction),\n sender: fromAddress\n }).then(({ tx, sender }) => {\n\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n\n const hexTx = (this.provider.constructor).hexlifyTransaction(tx, { from: true });\n\n return this.provider.send(\"eth_sendTransaction\", [ hexTx ]).then((hash) => {\n return hash;\n }, (error) => {\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return logger.throwError(\"signing transactions is unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n }\n\n async sendTransaction(transaction: Deferrable): Promise {\n // This cannot be mined any earlier than any recent block\n const blockNumber = await this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval);\n\n // Send the transaction\n const hash = await this.sendUncheckedTransaction(transaction);\n\n try {\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return await poll(async () => {\n const tx = await this.provider.getTransaction(hash);\n if (tx === null) { return undefined; }\n return this.provider._wrapTransaction(tx, hash, blockNumber);\n }, { oncePoll: this.provider });\n } catch (error) {\n (error).transactionHash = hash;\n throw error;\n }\n }\n\n async signMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n return await this.provider.send(\"personal_sign\", [ hexlify(data), address.toLowerCase() ]);\n }\n\n async _legacySignMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n return await this.provider.send(\"eth_sign\", [ address.toLowerCase(), hexlify(data) ]);\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names (in-place)\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n return this.provider.resolveName(name);\n });\n\n const address = await this.getAddress();\n\n return await this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n\n async unlock(password: string): Promise {\n const provider = this.provider;\n\n const address = await this.getAddress();\n\n return provider.send(\"personal_unlockAccount\", [ address.toLowerCase(), password, null ]);\n }\n}\n\nclass UncheckedJsonRpcSigner extends JsonRpcSigner {\n sendTransaction(transaction: Deferrable): Promise {\n return this.sendUncheckedTransaction(transaction).then((hash) => {\n return {\n hash: hash,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: (confirmations?: number) => { return this.provider.waitForTransaction(hash, confirmations); }\n };\n });\n }\n}\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true\n}\n\nexport class JsonRpcProvider extends BaseProvider {\n readonly connection: ConnectionInfo;\n\n _pendingFilter: Promise;\n _nextId: number;\n\n // During any given event loop, the results for a given call will\n // all be the same, so we can dedup the calls to save requests and\n // bandwidth. @TODO: Try out generalizing this against send?\n _eventLoopCache: Record>;\n get _cache(): Record> {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = { };\n }\n return this._eventLoopCache;\n }\n\n constructor(url?: ConnectionInfo | string, network?: Networkish) {\n logger.checkNew(new.target, JsonRpcProvider);\n\n let networkOrReady: Networkish | Promise = network;\n\n // The network is unknown, query the JSON-RPC for it\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then((network) => {\n resolve(network);\n }, (error) => {\n reject(error);\n });\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Default URL\n if (!url) { url = getStatic<() => string>(this.constructor, \"defaultUrl\")(); }\n\n if (typeof(url) === \"string\") {\n defineReadOnly(this, \"connection\",Object.freeze({\n url: url\n }));\n } else {\n defineReadOnly(this, \"connection\", Object.freeze(shallowCopy(url)));\n }\n\n this._nextId = 42;\n }\n\n static defaultUrl(): string {\n return \"http:/\\/localhost:8545\";\n }\n\n detectNetwork(): Promise {\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n\n // Clear this cache at the beginning of the next event loop\n setTimeout(() => {\n this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n }\n\n async _uncachedDetectNetwork(): Promise {\n await timer(0);\n\n let chainId = null;\n try {\n chainId = await this.send(\"eth_chainId\", [ ]);\n } catch (error) {\n try {\n chainId = await this.send(\"net_version\", [ ]);\n } catch (error) { }\n }\n\n if (chainId != null) {\n const getNetwork = getStatic<(network: Networkish) => Network>(this.constructor, \"getNetwork\");\n try {\n return getNetwork(BigNumber.from(chainId).toNumber());\n } catch (error) {\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n chainId: chainId,\n event: \"invalidNetwork\",\n serverError: error\n });\n }\n }\n\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n });\n }\n\n getSigner(addressOrIndex?: string | number): JsonRpcSigner {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n }\n\n getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner {\n return this.getSigner(addressOrIndex).connectUnchecked();\n }\n\n listAccounts(): Promise> {\n return this.send(\"eth_accounts\", []).then((accounts: Array) => {\n return accounts.map((a) => this.formatter.address(a));\n });\n }\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n\n // We can expand this in the future to any call, but for now these\n // are the biggest wins and do not require any serializing parameters.\n const cache = ([ \"eth_chainId\", \"eth_blockNumber\" ].indexOf(method) >= 0);\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n\n const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n return result;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n throw error;\n });\n\n // Cache the fetch, but clear it on the next event loop\n if (cache) {\n this._cache[method] = result;\n setTimeout(() => {\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n\n prepareRequest(method: string, params: any): [ string, Array ] {\n switch (method) {\n case \"getBlockNumber\":\n return [ \"eth_blockNumber\", [] ];\n\n case \"getGasPrice\":\n return [ \"eth_gasPrice\", [] ];\n\n case \"getBalance\":\n return [ \"eth_getBalance\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getTransactionCount\":\n return [ \"eth_getTransactionCount\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getCode\":\n return [ \"eth_getCode\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getStorageAt\":\n return [ \"eth_getStorageAt\", [ getLowerCase(params.address), params.position, params.blockTag ] ];\n\n case \"sendTransaction\":\n return [ \"eth_sendRawTransaction\", [ params.signedTransaction ] ]\n\n case \"getBlock\":\n if (params.blockTag) {\n return [ \"eth_getBlockByNumber\", [ params.blockTag, !!params.includeTransactions ] ];\n } else if (params.blockHash) {\n return [ \"eth_getBlockByHash\", [ params.blockHash, !!params.includeTransactions ] ];\n }\n return null;\n\n case \"getTransaction\":\n return [ \"eth_getTransactionByHash\", [ params.transactionHash ] ];\n\n case \"getTransactionReceipt\":\n return [ \"eth_getTransactionReceipt\", [ params.transactionHash ] ];\n\n case \"call\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_call\", [ hexlifyTransaction(params.transaction, { from: true }), params.blockTag ] ];\n }\n\n case \"estimateGas\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_estimateGas\", [ hexlifyTransaction(params.transaction, { from: true }) ] ];\n }\n\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [ \"eth_getLogs\", [ params.filter ] ];\n\n default:\n break;\n }\n\n return null;\n }\n\n async perform(method: string, params: any): Promise {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (method === \"call\" || method === \"estimateGas\") {\n const tx = params.transaction;\n if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {\n // If there are no EIP-1559 properties, it might be non-EIP-a559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n params = shallowCopy(params);\n params.transaction = shallowCopy(tx);\n delete params.transaction.type;\n }\n }\n }\n }\n\n const args = this.prepareRequest(method, params);\n\n if (args == null) {\n logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n try {\n return await this.send(args[0], args[1])\n } catch (error) {\n return checkError(method, error, params);\n }\n }\n\n _startEvent(event: Event): void {\n if (event.tag === \"pending\") { this._startPending(); }\n super._startEvent(event);\n }\n\n _startPending(): void {\n if (this._pendingFilter != null) { return; }\n const self = this;\n\n const pendingFilter: Promise = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n\n pendingFilter.then(function(filterId) {\n function poll() {\n self.send(\"eth_getFilterChanges\", [ filterId ]).then(function(hashes: Array) {\n if (self._pendingFilter != pendingFilter) { return null; }\n\n let seq = Promise.resolve();\n hashes.forEach(function(hash) {\n // @TODO: This should be garbage collected at some point... How? When?\n self._emitted[\"t:\" + hash.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self.getTransaction(hash).then(function(tx) {\n self.emit(\"pending\", tx);\n return null;\n });\n });\n });\n\n return seq.then(function() {\n return timer(1000);\n });\n }).then(function() {\n if (self._pendingFilter != pendingFilter) {\n self.send(\"eth_uninstallFilter\", [ filterId ]);\n return;\n }\n setTimeout(function() { poll(); }, 0);\n\n return null;\n }).catch((error: Error) => { });\n }\n poll();\n\n return filterId;\n }).catch((error: Error) => { });\n }\n\n _stopEvent(event: Event): void {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n super._stopEvent(event);\n }\n\n // Convert an ethers.js transaction into a JSON-RPC transaction\n // - gasLimit => gas\n // - All values hexlified\n // - All numeric values zero-striped\n // - All addresses are lowercased\n // NOTE: This allows a TransactionRequest, but all values should be resolved\n // before this is called\n // @TODO: This will likely be removed in future versions and prepareRequest\n // will be the preferred method for this.\n static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { [key: string]: boolean }): { [key: string]: string | AccessList } {\n // Check only allowed properties are given\n const allowed = shallowCopy(allowedTransactionKeys);\n if (allowExtra) {\n for (const key in allowExtra) {\n if (allowExtra[key]) { allowed[key] = true; }\n }\n }\n\n checkProperties(transaction, allowed);\n\n const result: { [key: string]: string | AccessList } = {};\n\n // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros.\n [\"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n const value = hexValue((transaction)[key]);\n if (key === \"gasLimit\") { key = \"gas\"; }\n result[key] = value;\n });\n\n [\"from\", \"to\", \"data\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n result[key] = hexlify((transaction)[key]);\n });\n\n if ((transaction).accessList) {\n result[\"accessList\"] = accessListify((transaction).accessList);\n }\n\n return result;\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nlet WS: any = null;\n\ntry {\n WS = (WebSocket as any);\n if (WS == null) { throw new Error(\"inject please\"); }\n} catch (error) {\n const logger = new Logger(version);\n WS = function() {\n logger.throwError(\"WebSockets not supported in this environment\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n }\n}\n//export default WS;\n//module.exports = WS;\nexport { WS as WebSocket };\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Event } from \"./base-provider\";\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\nimport { WebSocket } from \"./ws\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n/**\n * Notes:\n *\n * This provider differs a bit from the polling providers. One main\n * difference is how it handles consistency. The polling providers\n * will stall responses to ensure a consistent state, while this\n * WebSocket provider assumes the connected backend will manage this.\n *\n * For example, if a polling provider emits an event which indicates\n * the event occurred in blockhash XXX, a call to fetch that block by\n * its hash XXX, if not present will retry until it is present. This\n * can occur when querying a pool of nodes that are mildly out of sync\n * with each other.\n */\n\nlet NextId = 1;\n\nexport type InflightRequest = {\n callback: (error: Error, result: any) => void;\n payload: string;\n};\n\nexport type Subscription = {\n tag: string;\n processFunc: (payload: any) => void;\n};\n\n\n// For more info about the Real-time Event API see:\n// https://geth.ethereum.org/docs/rpc/pubsub\n\nexport class WebSocketProvider extends JsonRpcProvider {\n readonly _websocket: any;\n readonly _requests: { [ name: string ]: InflightRequest };\n readonly _detectNetwork: Promise;\n\n // Maps event tag to subscription ID (we dedupe identical events)\n readonly _subIds: { [ tag: string ]: Promise };\n\n // Maps Subscription ID to Subscription\n readonly _subs: { [ name: string ]: Subscription };\n\n _wsReady: boolean;\n\n constructor(url: string, network?: Networkish) {\n // This will be added in the future; please open an issue to expedite\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n\n super(url, network);\n this._pollingInterval = -1;\n\n this._wsReady = false;\n\n defineReadOnly(this, \"_websocket\", new WebSocket(this.connection.url));\n defineReadOnly(this, \"_requests\", { });\n defineReadOnly(this, \"_subs\", { });\n defineReadOnly(this, \"_subIds\", { });\n defineReadOnly(this, \"_detectNetwork\", super.detectNetwork());\n\n // Stall sending requests until the socket is open...\n this._websocket.onopen = () => {\n this._wsReady = true;\n Object.keys(this._requests).forEach((id) => {\n this._websocket.send(this._requests[id].payload);\n });\n };\n\n this._websocket.onmessage = (messageEvent: { data: string }) => {\n const data = messageEvent.data;\n const result = JSON.parse(data);\n if (result.id != null) {\n const id = String(result.id);\n const request = this._requests[id];\n delete this._requests[id];\n\n if (result.result !== undefined) {\n request.callback(null, result.result);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: this\n });\n\n } else {\n let error: Error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n defineReadOnly(error, \"code\", result.error.code || null);\n defineReadOnly(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n\n request.callback(error, undefined);\n\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: JSON.parse(request.payload),\n provider: this\n });\n\n }\n\n } else if (result.method === \"eth_subscription\") {\n // Subscription...\n const sub = this._subs[result.params.subscription];\n if (sub) {\n //this.emit.apply(this, );\n sub.processFunc(result.params.result)\n }\n\n } else {\n console.warn(\"this should not happen\");\n }\n };\n\n // This Provider does not actually poll, but we want to trigger\n // poll events for things that depend on them (like stalling for\n // block and transaction lookups)\n const fauxPoll = setInterval(() => {\n this.emit(\"poll\");\n }, 1000);\n if (fauxPoll.unref) { fauxPoll.unref(); }\n }\n\n detectNetwork(): Promise {\n return this._detectNetwork;\n }\n\n get pollingInterval(): number {\n return 0;\n }\n\n resetEventsBlock(blockNumber: number): void {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n }\n\n set pollingInterval(value: number) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n }\n\n async poll(): Promise {\n return null;\n }\n\n set polling(value: boolean) {\n if (!value) { return; }\n\n logger.throwError(\"cannot set polling on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n }\n\n send(method: string, params?: Array): Promise {\n const rid = NextId++;\n\n return new Promise((resolve, reject) => {\n function callback(error: Error, result: any) {\n if (error) { return reject(error); }\n return resolve(result);\n }\n\n const payload = JSON.stringify({\n method: method,\n params: params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n\n this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: this\n });\n\n this._requests[String(rid)] = { callback, payload };\n\n if (this._wsReady) { this._websocket.send(payload); }\n });\n }\n\n static defaultUrl(): string {\n return \"ws:/\\/localhost:8546\";\n }\n\n async _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise {\n let subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then((param) => {\n return this.send(\"eth_subscribe\", param);\n });\n this._subIds[tag] = subIdPromise;\n }\n const subId = await subIdPromise;\n this._subs[subId] = { tag, processFunc };\n }\n\n _startEvent(event: Event): void {\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [ \"newHeads\" ], (result: any) => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit(\"block\", blockNumber);\n });\n break;\n\n case \"pending\":\n this._subscribe(\"pending\", [ \"newPendingTransactions\" ], (result: any) => {\n this.emit(\"pending\", result);\n });\n break;\n\n case \"filter\":\n this._subscribe(event.tag, [ \"logs\", this._getFilter(event.filter) ], (result: any) => {\n if (result.removed == null) { result.removed = false; }\n this.emit(event.filter, this.formatter.filterLog(result));\n });\n break;\n\n case \"tx\": {\n const emitReceipt = (event: Event) => {\n const hash = event.hash;\n this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt) { return; }\n this.emit(hash, receipt);\n });\n };\n\n // In case it is already mined\n emitReceipt(event);\n\n // To keep things simple, we start up a single newHeads subscription\n // to keep an eye out for transactions we are watching for.\n // Starting a subscription for an event (i.e. \"tx\") that is already\n // running is (basically) a nop.\n this._subscribe(\"tx\", [ \"newHeads\" ], (result: any) => {\n this._events.filter((e) => (e.type === \"tx\")).forEach(emitReceipt);\n });\n break;\n }\n\n // Nothing is needed\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n }\n\n _stopEvent(event: Event): void {\n let tag = event.tag;\n\n if (event.type === \"tx\") {\n // There are remaining transaction event listeners\n if (this._events.filter((e) => (e.type === \"tx\")).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n // There are remaining event listeners\n return;\n }\n\n const subId = this._subIds[tag];\n if (!subId) { return; }\n\n delete this._subIds[tag];\n subId.then((subId) => {\n if (!this._subs[subId]) { return; }\n delete this._subs[subId];\n this.send(\"eth_unsubscribe\", [ subId ]);\n });\n }\n\n async destroy(): Promise {\n // Wait until we have connected before trying to disconnect\n if (this._websocket.readyState === WebSocket.CONNECTING) {\n await (new Promise((resolve) => {\n this._websocket.onopen = function() {\n resolve(true);\n };\n\n this._websocket.onerror = function() {\n resolve(false);\n };\n }));\n }\n\n // Hangup\n // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes\n this._websocket.close(1000);\n }\n}\n","\n\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly, getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { CommunityResourcable } from \"./formatter\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\n\ntype getUrlFunc = (network: Network, apiKey: string) => string | ConnectionInfo;\n\n// A StaticJsonRpcProvider is useful when you *know* for certain that\n// the backend will never change, as it never calls eth_chainId to\n// verify its backend. However, if the backend does change, the effects\n// are undefined and may include:\n// - inconsistent results\n// - locking up the UI\n// - block skew warnings\n// - wrong results\n// If the network is not explicit (i.e. auto-detection is expected), the\n// node MUST be running and available to respond to requests BEFORE this\n// is instantiated.\nexport class StaticJsonRpcProvider extends JsonRpcProvider {\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // If still not set, set it\n if (this._network == null) {\n // A static network does not support \"any\"\n defineReadOnly(this, \"_network\", network);\n\n this.emit(\"network\", network, null);\n }\n }\n return network;\n }\n}\n\nexport abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable {\n readonly apiKey: any;\n\n constructor(network?: Networkish, apiKey?: any) {\n logger.checkAbstract(new.target, UrlJsonRpcProvider);\n\n // Normalize the Network and API Key\n network = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n apiKey = getStatic<(apiKey: string) => string>(new.target, \"getApiKey\")(apiKey);\n\n const connection = getStatic(new.target, \"getUrl\")(network, apiKey);\n\n super(connection, network);\n\n if (typeof(apiKey) === \"string\") {\n defineReadOnly(this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach((key) => {\n defineReadOnly(this, key, apiKey[key]);\n });\n }\n }\n\n _startPending(): void {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n }\n\n isCommunityResource(): boolean {\n return false;\n }\n\n getSigner(address?: string): JsonRpcSigner {\n return logger.throwError(\n \"API provider does not support signing\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"getSigner\" }\n );\n }\n\n listAccounts(): Promise> {\n return Promise.resolve([]);\n }\n\n // Return a defaultApiKey if null, otherwise validate the API key\n static getApiKey(apiKey: any): any {\n return apiKey;\n }\n\n // Returns the url or connection for the given network and API key. The\n // API key will have been sanitized by the getApiKey first, so any validation\n // or transformations can be done there.\n static getUrl(network: Network, apiKey: any): string | ConnectionInfo {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\nimport { WebSocketProvider } from \"./websocket-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// This key was provided to ethers.js by Alchemy to be used by the\n// default provider, but it is recommended that for your own\n// production environments, that you acquire your own API key at:\n// https://dashboard.alchemyapi.io\n\nconst defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\"\n\nexport class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new AlchemyProvider(network, apiKey);\n\n const url = provider.connection.url.replace(/^http/i, \"ws\")\n .replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n\n super(url, provider.network);\n defineReadOnly(this, \"apiKey\", provider.apiKey);\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n\nexport class AlchemyProvider extends UrlJsonRpcProvider {\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider {\n return new AlchemyWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n if (apiKey == null) { return defaultApiKey; }\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n }\n\n static getUrl(network: Network, apiKey: string): ConnectionInfo {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.alchemyapi.io/v2/\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.alchemyapi.io/v2/\";\n break;\n case \"kovan\":\n host = \"eth-kovan.alchemyapi.io/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arb-rinkeby.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-kovan\":\n host = \"opt-kovan.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + apiKey),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey === defaultApiKey) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport class CloudflareProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return host;\n }\n\n async perform(method: string, params: any): Promise {\n // The Cloudflare provider does not support eth_blockNumber,\n // so we get the latest block and pull it from that\n if (method === \"getBlockNumber\") {\n const block = await super.perform(\"getBlock\", { blockTag: \"latest\" });\n return block.number;\n }\n\n return super.perform(method, params);\n }\n}\n","\"use strict\";\n\nimport { BlockTag, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\nimport { accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson } from \"@ethersproject/web\";\n\nimport { showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider } from \"./base-provider\";\n\n\n// The transaction has already been sanitized by the calls in Provider\nfunction getTransactionPostData(transaction: TransactionRequest): Record {\n const result: Record = { };\n for (let key in transaction) {\n if ((transaction)[key] == null) { continue; }\n let value = (transaction)[key];\n if (key === \"type\" && value === 0) { continue; }\n\n // Quantity-types require no leading zero, unless 0\n if (({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true })[key]) {\n value = hexValue(hexlify(value));\n } else if (key === \"accessList\") {\n value = \"[\" + accessListify(value).map((set) => {\n return `{address:\"${ set.address }\",storageKeys:[\"${ set.storageKeys.join('\",\"') }\"]}`;\n }).join(\",\") + \"]\";\n } else {\n value = hexlify(value);\n }\n result[key] = value;\n }\n return result;\n}\n\nfunction getResult(result: { status?: number, message?: string, result?: any }): any {\n // getLogs, getHistory have weird success responses\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n\n if (result.status != 1 || result.message != \"OK\") {\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n\n return result.result;\n}\n\nfunction getJsonResult(result: { jsonrpc: string, result?: any, error?: { code?: number, data?: any, message?: string} } ): any {\n // This response indicates we are being throttled\n if (result && (result).status == 0 && (result).message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n const error: any = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n\n if (result.jsonrpc != \"2.0\") {\n // @TODO: not any\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n\n if (result.error) {\n // @TODO: not any\n const error: any = new Error(result.error.message || \"unknown error\");\n if (result.error.code) { error.code = result.error.code; }\n if (result.error.data) { error.data = result.error.data; }\n throw error;\n }\n\n return result.result;\n}\n\n// The blockTag was normalized as a string by the Provider pre-perform operations\nfunction checkLogTag(blockTag: string): number | \"latest\" {\n if (blockTag === \"pending\") { throw new Error(\"pending not supported\"); }\n if (blockTag === \"latest\") { return blockTag; }\n\n return parseInt(blockTag.substring(2), 16);\n}\n\n\nconst defaultApiKey = \"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB\";\n\nfunction checkError(method: string, error: any, transaction: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n\n // Etherscan keeps changing their string\n if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) {\n // Etherscan prefixes the data like \"Reverted 0x1234\"\n let data = e.data;\n if (data) { data = \"0x\" + data.replace(/^.*0x/i, \"\"); }\n\n if (isHexString(data)) { return data; }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n }\n\n // Get the message from any nested error structure\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR) {\n if (error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n\n // \"Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0\"\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"Transaction with the same hash was already imported.\"\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.\"\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nexport class EtherscanProvider extends BaseProvider{\n readonly baseUrl: string;\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: string) {\n logger.checkNew(new.target, EtherscanProvider);\n\n super(network);\n\n defineReadOnly(this, \"baseUrl\", this.getBaseUrl());\n defineReadOnly(this, \"apiKey\", apiKey || defaultApiKey);\n }\n\n getBaseUrl(): string {\n switch(this.network ? this.network.name: \"invalid\") {\n case \"homestead\":\n return \"https:/\\/api.etherscan.io\";\n case \"ropsten\":\n return \"https:/\\/api-ropsten.etherscan.io\";\n case \"rinkeby\":\n return \"https:/\\/api-rinkeby.etherscan.io\";\n case \"kovan\":\n return \"https:/\\/api-kovan.etherscan.io\";\n case \"goerli\":\n return \"https:/\\/api-goerli.etherscan.io\";\n default:\n }\n\n return logger.throwArgumentError(\"unsupported network\", \"network\", name);\n }\n\n getUrl(module: string, params: Record): string {\n const query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${ key }=${ value }`\n }\n return accum\n }, \"\");\n const apiKey = ((this.apiKey) ? `&apikey=${ this.apiKey }`: \"\");\n return `${ this.baseUrl }/api?module=${ module }${ query }${ apiKey }`;\n }\n\n getPostUrl(): string {\n return `${ this.baseUrl }/api`;\n }\n\n getPostData(module: string, params: Record): Record {\n params.module = module;\n params.apikey = this.apiKey;\n return params;\n }\n\n async fetch(module: string, params: Record, post?: boolean): Promise {\n const url = (post ? this.getPostUrl(): this.getUrl(module, params));\n const payload = (post ? this.getPostData(module, params): null);\n const procFunc = (module === \"proxy\") ? getJsonResult: getResult;\n\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n\n const connection: ConnectionInfo = {\n url: url,\n throttleSlotInterval: 1000,\n throttleCallback: (attempt: number, url: string) => {\n if (this.isCommunityResource()) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n let payloadStr: string = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map((key) => {\n return `${ key }=${ payload[key] }`\n }).join(\"&\");\n }\n\n const result = await fetchJson(connection, payloadStr, procFunc || getJsonResult);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: deepCopy(result),\n provider: this\n });\n\n return result;\n }\n\n async detectNetwork(): Promise {\n return this.network;\n }\n\n async perform(method: string, params: any): Promise {\n\n switch (method) {\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n\n case \"getBalance\":\n // Returns base-10 result\n return this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getStorageAt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n });\n\n case \"sendTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch((error) => {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n });\n\n case \"getBlock\":\n if (params.blockTag) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: (params.includeTransactions ? \"true\": \"false\")\n });\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n });\n\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n });\n\n case \"call\": {\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"call\", error, params.transaction);\n }\n }\n\n case \"estimateGas\": {\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"estimateGas\", error, params.transaction);\n }\n }\n\n case \"getLogs\": {\n const args: Record = { action: \"getLogs\" }\n\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n\n // @TODO: We can handle slightly more complicated logs using the logs API\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n\n if (params.filter.topics.length === 1) {\n const topic0 = params.filter.topics[0];\n if (typeof(topic0) !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 });\n }\n args.topic0 = topic0;\n }\n }\n\n const logs: Array = await this.fetch(\"logs\", args);\n\n // Cache txHash => blockHash\n let blocks: { [tag: string]: string } = {};\n\n // Add any missing blockHash to the logs\n for (let i = 0; i < logs.length; i++) {\n const log = logs[i];\n if (log.blockHash != null) { continue; }\n if (blocks[log.blockNumber] == null) {\n const block = await this.getBlock(log.blockNumber);\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n }\n log.blockHash = blocks[log.blockNumber];\n }\n\n return logs;\n }\n\n case \"getEtherPrice\":\n if (this.network.name !== \"homestead\") { return 0.0; }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n\n default:\n break;\n }\n\n return super.perform(method, params);\n }\n\n // Note: The `page` page parameter only allows pagination within the\n // 10,000 window available without a page and offset parameter\n // Error: Result window is too large, PageNo x Offset size must\n // be less than or equal to 10000\n async getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise> {\n const params = {\n action: \"txlist\",\n address: (await this.resolveName(addressOrName)),\n startblock: ((startBlock == null) ? 0: startBlock),\n endblock: ((endBlock == null) ? 99999999: endBlock),\n sort: \"asc\"\n };\n\n const result = await this.fetch(\"account\", params);\n\n return result.map((tx: any) => {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") { delete tx[key]; }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n const item = this.formatter.transactionResponse(tx);\n if (tx.timeStamp) { item.timestamp = parseInt(tx.timeStamp); }\n return item;\n });\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Block, BlockWithTransactions, Provider } from \"@ethersproject/abstract-provider\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\nimport { shuffled } from \"@ethersproject/random\";\nimport { poll } from \"@ethersproject/web\";\n\nimport { BaseProvider } from \"./base-provider\";\nimport { isCommunityResource } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction now() { return (new Date()).getTime(); }\n\n// Returns to network as long as all agree, or null if any is null.\n// Throws an error if any two networks do not match.\nfunction checkNetworks(networks: Array): Network {\n let result = null;\n\n for (let i = 0; i < networks.length; i++) {\n const network = networks[i];\n\n // Null! We do not know our network; bail.\n if (network == null) { return null; }\n\n if (result) {\n // Make sure the network matches the previous networks\n if (!(result.name === network.name && result.chainId === network.chainId &&\n ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) {\n\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n\n return result;\n}\n\nfunction median(values: Array, maxDelta?: number): number {\n values = values.slice().sort();\n const middle = Math.floor(values.length / 2);\n\n // Odd length; take the middle\n if (values.length % 2) {\n return values[middle];\n }\n\n // Even length; take the average of the two middle\n const a = values[middle - 1], b = values[middle];\n\n if (maxDelta != null && Math.abs(a - b) > maxDelta) {\n return null;\n }\n\n return (a + b) / 2;\n}\n\nfunction serialize(value: any): string {\n if (value === null) {\n return \"null\";\n } else if (typeof(value) === \"number\" || typeof(value) === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof(value) === \"string\") {\n return value;\n } else if (BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map((i) => serialize(i)));\n } else if (typeof(value) === \"object\") {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((key) => {\n let v = value[key];\n if (typeof(v) === \"function\") {\n v = \"[function]\";\n } else {\n v = serialize(v);\n }\n return JSON.stringify(key) + \":\" + v;\n }).join(\",\") + \"}\";\n }\n\n throw new Error(\"unknown value type: \" + typeof(value));\n}\n\n// Next request ID to use for emitting debug info\nlet nextRid = 1;\n\n\nexport interface FallbackProviderConfig {\n // The Provider\n provider: Provider;\n\n // The priority to favour this Provider; lower values are used first (higher priority)\n priority?: number;\n\n // Timeout before also triggering the next provider; this does not stop\n // this provider and if its result comes back before a quorum is reached\n // it will be incorporated into the vote\n // - lower values will cause more network traffic but may result in a\n // faster result.\n stallTimeout?: number;\n\n // How much this provider contributes to the quorum; sometimes a specific\n // provider may be more reliable or trustworthy than others, but usually\n // this should be left as the default\n weight?: number;\n};\n\n// A Staller is used to provide a delay to give a Provider a chance to response\n// before asking the next Provider to try.\ntype Staller = {\n wait: (func: () => void) => Promise\n getPromise: () => Promise,\n cancel: () => void\n};\n\nfunction stall(duration: number): Staller {\n let cancel: () => void = null;\n\n let timer: NodeJS.Timer = null;\n let promise = >(new Promise((resolve) => {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n }\n timer = setTimeout(cancel, duration);\n }));\n\n const wait = (func: () => void) => {\n promise = promise.then(func);\n return promise;\n }\n\n function getPromise(): Promise {\n return promise;\n }\n\n return { cancel, getPromise, wait };\n}\n\nconst ForwardErrors = [\n Logger.errors.CALL_EXCEPTION,\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n Logger.errors.UNPREDICTABLE_GAS_LIMIT\n];\n\nconst ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\",\n];\n\n\n// @TODO: Make this an object with staller and cancel built-in\ninterface RunningConfig extends FallbackProviderConfig {\n start?: number;\n done?: boolean;\n cancelled?: boolean;\n runner?: Promise;\n staller?: Staller;\n result?: any;\n error?: Error;\n};\n\nfunction exposeDebugConfig(config: RunningConfig, now?: number): any {\n const result: any = {\n weight: config.weight\n };\n Object.defineProperty(result, \"provider\", { get: () => config.provider });\n if (config.start) { result.start = config.start; }\n if (now) { result.duration = (now - config.start); }\n if (config.done) {\n if (config.error) {\n result.error = config.error;\n } else {\n result.result = config.result || null;\n }\n }\n return result;\n}\n\nfunction normalizedTally(normalize: (value: any) => string, quorum: number): (configs: Array) => any {\n return function(configs: Array): any {\n\n // Count the votes for each result\n const tally: { [ key: string]: { count: number, result: any } } = { };\n configs.forEach((c) => {\n const value = normalize(c.result);\n if (!tally[value]) { tally[value] = { count: 0, result: c.result }; }\n tally[value].count++;\n });\n\n // Check for a quorum on any given result\n const keys = Object.keys(tally);\n for (let i = 0; i < keys.length; i++) {\n const check = tally[keys[i]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n\n // No quroum\n return undefined;\n }\n}\nfunction getProcessFunc(provider: FallbackProvider, method: string, params: { [ key: string ]: any }): (configs: Array) => any {\n\n let normalize = serialize;\n\n switch (method) {\n case \"getBlockNumber\":\n // Return the median value, unless there is (median + 1) is also\n // present, in which case that is probably true and the median\n // is going to be stale soon. In the event of a malicious node,\n // the lie will be true soon enough.\n return function(configs: Array): number {\n const values = configs.map((c) => c.result);\n\n // Get the median block number\n let blockNumber = median(configs.map((c) => c.result), 2);\n if (blockNumber == null) { return undefined; }\n\n blockNumber = Math.ceil(blockNumber);\n\n // If the next block height is present, its prolly safe to use\n if (values.indexOf(blockNumber + 1) >= 0) { blockNumber++; }\n\n // Don't ever roll back the blockNumber\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n\n return provider._highestBlockNumber;\n };\n\n case \"getGasPrice\":\n // Return the middle (round index up) value, similar to median\n // but do not average even entries and choose the higher.\n // Malicious actors must compromise 50% of the nodes to lie.\n return function(configs: Array): BigNumber {\n const values = configs.map((c) => c.result);\n values.sort();\n return values[Math.floor(values.length / 2)];\n }\n\n case \"getEtherPrice\":\n // Returns the median price. Malicious actors must compromise at\n // least 50% of the nodes to lie (in a meaningful way).\n return function(configs: Array): number {\n return median(configs.map((c) => c.result));\n }\n\n // No additional normalizing required; serialize is enough\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize = function(tx: any): string {\n if (tx == null) { return null; }\n\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return serialize(tx);\n }\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getBlock\":\n // We drop the confirmations from transactions as it is approximate\n if (params.includeTransactions) {\n normalize = function(block: BlockWithTransactions): string {\n if (block == null) { return null; }\n\n block = shallowCopy(block);\n block.transactions = block.transactions.map((tx) => {\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize = function(block: Block): string {\n if (block == null) { return null; }\n return serialize(block);\n }\n }\n break;\n\n default:\n throw new Error(\"unknown method: \" + method);\n }\n\n // Return the result if and only if the expected quorum is\n // satisfied and agreed upon for the final result.\n return normalizedTally(normalize, provider.quorum);\n\n}\n\n// If we are doing a blockTag query, we need to make sure the backend is\n// caught up to the FallbackProvider, before sending a request to it.\nasync function waitForSync(config: RunningConfig, blockNumber: number): Promise {\n const provider = (config.provider);\n\n if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) {\n return provider;\n }\n\n return poll(() => {\n return new Promise((resolve, reject) => {\n setTimeout(function() {\n\n // We are synced\n if (provider.blockNumber >= blockNumber) { return resolve(provider); }\n\n // We're done; just quit\n if (config.cancelled) { return resolve(null); }\n\n // Try again, next block\n return resolve(undefined);\n }, 0);\n });\n }, { oncePoll: provider });\n}\n\nasync function getRunner(config: RunningConfig, currentBlockNumber: number, method: string, params: { [ key: string]: any }): Promise {\n let provider = config.provider;\n\n switch (method) {\n case \"getBlockNumber\":\n case \"getGasPrice\":\n return provider[method]();\n case \"getEtherPrice\":\n if ((provider).getEtherPrice) {\n return (provider).getEtherPrice();\n }\n break;\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.address, params.blockTag || \"latest\");\n case \"getStorageAt\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\");\n case \"getBlock\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[(params.includeTransactions ? \"getBlockWithTransactions\": \"getBlock\")](params.blockTag || params.blockHash);\n case \"call\":\n case \"estimateGas\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.transaction);\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n return provider[method](params.transactionHash);\n case \"getLogs\": {\n let filter = params.filter;\n if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getLogs(filter);\n }\n }\n\n return logger.throwError(\"unknown method error\", Logger.errors.UNKNOWN_ERROR, {\n method: method,\n params: params\n });\n}\n\nexport class FallbackProvider extends BaseProvider {\n readonly providerConfigs: ReadonlyArray;\n readonly quorum: number;\n\n // Due to the highly asyncronous nature of the blockchain, we need\n // to make sure we never unroll the blockNumber due to our random\n // sample of backends\n _highestBlockNumber: number;\n\n constructor(providers: Array, quorum?: number) {\n logger.checkNew(new.target, FallbackProvider);\n\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n\n const providerConfigs: Array = providers.map((configOrProvider, index) => {\n if (Provider.isProvider(configOrProvider)) {\n const stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n const priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n\n const config: FallbackProviderConfig = shallowCopy(configOrProvider);\n\n if (config.priority == null) { config.priority = 1; }\n if (config.stallTimeout == null) {\n config.stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n }\n if (config.weight == null) { config.weight = 1; }\n\n const weight = config.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", `providers[${ index }].weight`, weight);\n }\n\n return Object.freeze(config);\n });\n\n const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0);\n\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n\n // Are all providers' networks are known\n let networkOrReady: Network | Promise = checkNetworks(providerConfigs.map((c) => ((c.provider)).network));\n\n // Not all networks are known; we must stall\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Preserve a copy, so we do not get mutated\n defineReadOnly(this, \"providerConfigs\", Object.freeze(providerConfigs));\n defineReadOnly(this, \"quorum\", quorum);\n\n this._highestBlockNumber = -1;\n }\n\n async detectNetwork(): Promise {\n const networks = await Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork()));\n return checkNetworks(networks);\n }\n\n async perform(method: string, params: { [name: string]: any }): Promise {\n // Sending transactions is special; always broadcast it to all backends\n if (method === \"sendTransaction\") {\n const results: Array = await Promise.all(this.providerConfigs.map((c) => {\n return c.provider.sendTransaction(params.signedTransaction).then((result) => {\n return result.hash;\n }, (error) => {\n return error;\n });\n }));\n\n // Any success is good enough (other errors are likely \"already seen\" errors\n for (let i = 0; i < results.length; i++) {\n const result = results[i];\n if (typeof(result) === \"string\") { return result; }\n }\n\n // They were all an error; pick the first error\n throw results[0];\n }\n\n // We need to make sure we are in sync with our backends, so we need\n // to know this before we can make a lot of calls\n if (this._highestBlockNumber === -1 && method !== \"getBlockNumber\") {\n await this.getBlockNumber();\n }\n\n const processFunc = getProcessFunc(this, method, params);\n\n // Shuffle the providers and then sort them by their priority; we\n // shallowCopy them since we will store the result in them too\n const configs: Array = shuffled(this.providerConfigs.map(shallowCopy));\n configs.sort((a, b) => (a.priority - b.priority));\n\n const currentBlockNumber = this._highestBlockNumber;\n\n let i = 0;\n let first = true;\n while (true) {\n const t0 = now();\n\n // Compute the inflight weight (exclude anything past)\n let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout)))\n .reduce((accum, c) => (accum + c.weight), 0);\n\n // Start running enough to meet quorum\n while (inflightWeight < this.quorum && i < configs.length) {\n const config = configs[i++];\n\n const rid = nextRid++;\n\n config.start = now();\n config.staller = stall(config.stallTimeout);\n config.staller.wait(() => { config.staller = null; });\n\n config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => {\n config.done = true;\n config.result = result;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n }, (error) => {\n config.done = true;\n config.error = error;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n });\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, null),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n inflightWeight += config.weight;\n }\n\n // Wait for anything meaningful to finish or stall out\n const waiting: Array> = [ ];\n configs.forEach((c) => {\n if (c.done || !c.runner) { return; }\n waiting.push(c.runner);\n if (c.staller) { waiting.push(c.staller.getPromise()); }\n });\n\n if (waiting.length) { await Promise.race(waiting); }\n\n // Check the quorum and process the results; the process function\n // may additionally decide the quorum is not met\n const results = configs.filter((c) => (c.done && c.error == null));\n if (results.length >= this.quorum) {\n const result = processFunc(results);\n if (result !== undefined) {\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n return result;\n }\n if (!first) { await stall(100).getPromise(); }\n first = false;\n }\n\n // No result, check for errors that should be forwarded\n const errors = configs.reduce((accum, c) => {\n if (!c.done || c.error == null) { return accum; }\n\n const code = ((c.error)).code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) { accum[code] = { error: c.error, weight: 0 }; }\n accum[code].weight += c.weight;\n }\n\n return accum;\n }, <{ [ code: string ]: { error: Error, weight: number } }>({ }));\n\n Object.keys(errors).forEach((errorCode: string) => {\n const tally = errors[errorCode];\n if (tally.weight < this.quorum) { return; }\n\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n const e = (tally.error);\n\n const props: { [ name: string ]: any } = { };\n ForwardProperties.forEach((name) => {\n if (e[name] == null) { return; }\n props[name] = e[name];\n });\n\n logger.throwError(e.reason || e.message, errorCode, props);\n });\n\n // All configs have run to completion; we will never get more data\n if (configs.filter((c) => !c.done).length === 0) { break; }\n }\n\n // Shut down any stallers; shouldn't be any\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n return logger.throwError(\"failed to meet quorum\", Logger.errors.SERVER_ERROR, {\n method: method,\n params: params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map((c) => exposeDebugConfig(c)),\n provider: this\n });\n }\n}\n","\"use strict\";\n\nconst IpcProvider: any = null;\n\nexport {\n IpcProvider\n};\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n\nconst defaultProjectId = \"84842078b09946638c03157f83405213\"\n\nexport class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n readonly projectId: string;\n readonly projectSecret: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new InfuraProvider(network, apiKey);\n const connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n\n const url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, network);\n\n defineReadOnly(this, \"apiKey\", provider.projectId);\n defineReadOnly(this, \"projectId\", provider.projectId);\n defineReadOnly(this, \"projectSecret\", provider.projectSecret);\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n\nexport class InfuraProvider extends UrlJsonRpcProvider {\n readonly projectId: string;\n readonly projectSecret: string;\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider {\n return new InfuraWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n const apiKeyObj: { apiKey: string, projectId: string, projectSecret: string } = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n\n if (apiKey == null) { return apiKeyObj; }\n\n if (typeof(apiKey) === \"string\") {\n apiKeyObj.projectId = apiKey;\n\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument((typeof(apiKey.projectId) === \"string\"),\n \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument((typeof(apiKey.projectSecret) === \"string\"),\n \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n\n apiKeyObj.apiKey = apiKeyObj.projectId;\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch(network ? network.name: \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"ropsten\":\n host = \"ropsten.infura.io\";\n break;\n case \"rinkeby\":\n host = \"rinkeby.infura.io\";\n break;\n case \"kovan\":\n host = \"kovan.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-kovan\":\n host = \"optimism-kovan.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arbitrum-rinkeby.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n const connection: ConnectionInfo = {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + \"/v3/\" + apiKey.projectId),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey.projectId === defaultProjectId) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n","\nimport { deepCopy } from \"@ethersproject/properties\";\nimport { fetchJson } from \"@ethersproject/web\";\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Experimental\n\nexport class JsonRpcBatchProvider extends JsonRpcProvider {\n _pendingBatchAggregator: NodeJS.Timer;\n _pendingBatch: Array<{\n request: { method: string, params: Array, id: number, jsonrpc: \"2.0\" },\n resolve: (result: any) => void,\n reject: (error: Error) => void\n }>;\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n if (this._pendingBatch == null) {\n this._pendingBatch = [ ];\n }\n\n const inflightRequest: any = { request, resolve: null, reject: null };\n\n const promise = new Promise((resolve, reject) => {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n\n this._pendingBatch.push(inflightRequest);\n\n if (!this._pendingBatchAggregator) {\n // Schedule batch for next event loop + short duration\n this._pendingBatchAggregator = setTimeout(() => {\n\n // Get teh current batch and clear it, so new requests\n // go into the next batch\n const batch = this._pendingBatch;\n this._pendingBatch = null;\n this._pendingBatchAggregator = null;\n\n // Get the request as an array of requests\n const request = batch.map((inflight) => inflight.request);\n\n this.emit(\"debug\", {\n action: \"requestBatch\",\n request: deepCopy(request),\n provider: this\n });\n\n return fetchJson(this.connection, JSON.stringify(request)).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n // For each result, feed it to the correct Promise, depending\n // on whether it was a success or error\n batch.forEach((inflightRequest, index) => {\n const payload = result[index];\n if (payload.error) {\n const error = new Error(payload.error.message);\n (error).code = payload.error.code;\n (error).data = payload.error.data;\n inflightRequest.reject(error);\n } else {\n inflightRequest.resolve(payload.result);\n }\n });\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n batch.forEach((inflightRequest) => {\n inflightRequest.reject(error);\n });\n });\n\n }, 10);\n }\n\n return promise;\n }\n}\n","/* istanbul ignore file */\n\n\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Special API key provided by Nodesmith for ethers.js\nconst defaultApiKey = \"ETHERS_JS_SHARED\";\n\nexport class NodesmithProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return (host + \"?apiKey=\" + apiKey);\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// These are load-balancer-based application IDs\nconst defaultApplicationIds: Record = {\n homestead: \"6004bcd10040261633ade990\",\n ropsten: \"6004bd4d0040261633ade991\",\n rinkeby: \"6004bda20040261633ade994\",\n goerli: \"6004bd860040261633ade992\",\n};\n\nexport class PocketProvider extends UrlJsonRpcProvider {\n readonly applicationId: string;\n readonly applicationSecretKey: string;\n readonly loadBalancer: boolean;\n\n constructor(network?: Networkish, apiKey?: any) {\n // We need a bit of creativity in the constructor because\n // Pocket uses different default API keys based on the network\n\n if (apiKey == null) {\n const n = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (n) {\n const applicationId = defaultApplicationIds[n.name];\n if (applicationId) {\n apiKey = {\n applicationId: applicationId,\n loadBalancer: true\n };\n }\n }\n\n // If there was any issue above, we don't know this network\n if (apiKey == null) {\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n }\n\n super(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n // Most API Providers allow null to get the default configuration, but\n // Pocket requires the network to decide the default provider, so we\n // rely on hijacking the constructor to add a sensible default for us\n\n if (apiKey == null) {\n logger.throwArgumentError(\"PocketProvider.getApiKey does not support null apiKey\", \"apiKey\", apiKey);\n }\n\n const apiKeyObj: { applicationId: string, applicationSecretKey: string, loadBalancer: boolean } = {\n applicationId: null,\n loadBalancer: false,\n applicationSecretKey: null\n };\n\n // Parse applicationId and applicationSecretKey\n if (typeof (apiKey) === \"string\") {\n apiKeyObj.applicationId = apiKey;\n\n } else if (apiKey.applicationSecretKey != null) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"applicationSecretKey requires an applicationId\", \"applicationId\", apiKey.applicationId);\n logger.assertArgument((typeof (apiKey.applicationSecretKey) === \"string\"),\n \"invalid applicationSecretKey\", \"applicationSecretKey\", \"[REDACTED]\");\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else if (apiKey.applicationId) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"apiKey.applicationId must be a string\", \"apiKey.applicationId\", apiKey.applicationId);\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n let url = null;\n if (apiKey.loadBalancer) {\n url = `https:/\\/${ host }/v1/lb/${ apiKey.applicationId }`\n } else {\n url = `https:/\\/${ host }/v1/${ apiKey.applicationId }`\n }\n\n const connection: ConnectionInfo = { url };\n\n // Initialize empty headers\n connection.headers = {}\n\n // Apply application secret key\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.applicationId === defaultApplicationIds[this.network.name]);\n }\n}\n","\"use strict\";\n\nimport { Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Exported Types\nexport type ExternalProvider = {\n isMetaMask?: boolean;\n isStatus?: boolean;\n host?: string;\n path?: string;\n sendAsync?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n send?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n request?: (request: { method: string, params?: Array }) => Promise\n}\n\nlet _nextId = 1;\n\nexport type JsonRpcFetchFunc = (method: string, params?: Array) => Promise;\n\ntype Web3LegacySend = (request: any, callback: (error: Error, response: any) => void) => void;\n\nfunction buildWeb3LegacyFetcher(provider: ExternalProvider, sendFunc: Web3LegacySend) : JsonRpcFetchFunc {\n const fetcher = \"Web3LegacyFetcher\";\n\n return function(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (_nextId++),\n jsonrpc: \"2.0\"\n };\n\n return new Promise((resolve, reject) => {\n this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: deepCopy(request),\n provider: this\n });\n\n sendFunc(request, (error, response) => {\n\n if (error) {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: this\n });\n\n return reject(error);\n }\n\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: this\n });\n\n if (response.error) {\n const error = new Error(response.error.message);\n (error).code = response.error.code;\n (error).data = response.error.data;\n return reject(error);\n }\n\n resolve(response.result);\n });\n });\n }\n}\n\nfunction buildEip1193Fetcher(provider: ExternalProvider): JsonRpcFetchFunc {\n return function(method: string, params: Array): Promise {\n if (params == null) { params = [ ]; }\n\n const request = { method, params };\n\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: deepCopy(request),\n provider: this\n });\n\n return provider.request(request).then((response) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: this\n });\n\n return response;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: this\n });\n\n throw error;\n });\n }\n}\n\nexport class Web3Provider extends JsonRpcProvider {\n readonly provider: ExternalProvider;\n readonly jsonRpcFetchFunc: JsonRpcFetchFunc;\n\n constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish) {\n logger.checkNew(new.target, Web3Provider);\n\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n\n let path: string = null;\n let jsonRpcFetchFunc: JsonRpcFetchFunc = null;\n let subprovider: ExternalProvider = null;\n\n if (typeof(provider) === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n\n subprovider = provider;\n\n if (provider.request) {\n if (path === \"\") { path = \"eip-1193:\"; }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n\n if (!path) { path = \"unknown:\"; }\n }\n\n super(path, network);\n\n defineReadOnly(this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n defineReadOnly(this, \"provider\", subprovider);\n }\n\n send(method: string, params: Array): Promise {\n return this.jsonRpcFetchFunc(method, params);\n }\n}\n","\"use strict\";\n\nimport {\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n Provider,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from \"@ethersproject/abstract-provider\";\n\nimport { getNetwork } from \"@ethersproject/networks\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\n\nimport { BaseProvider, EnsProvider, EnsResolver, Resolver } from \"./base-provider\";\n\nimport { AlchemyProvider, AlchemyWebSocketProvider } from \"./alchemy-provider\";\nimport { CloudflareProvider } from \"./cloudflare-provider\";\nimport { EtherscanProvider } from \"./etherscan-provider\";\nimport { FallbackProvider, FallbackProviderConfig } from \"./fallback-provider\";\nimport { IpcProvider } from \"./ipc-provider\";\nimport { InfuraProvider, InfuraWebSocketProvider } from \"./infura-provider\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\nimport { JsonRpcBatchProvider } from \"./json-rpc-batch-provider\";\nimport { NodesmithProvider } from \"./nodesmith-provider\";\nimport { PocketProvider } from \"./pocket-provider\";\nimport { StaticJsonRpcProvider, UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\nimport { Web3Provider } from \"./web3-provider\";\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { ExternalProvider, JsonRpcFetchFunc } from \"./web3-provider\";\n\nimport { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n////////////////////////\n// Helper Functions\n\nfunction getDefaultProvider(network?: Networkish, options?: any): BaseProvider {\n if (network == null) { network = \"homestead\"; }\n\n // If passed a URL, figure out the right type of provider based on the scheme\n if (typeof(network) === \"string\") {\n // @TODO: Add support for IpcProvider; maybe if it ends in \".ipc\"?\n\n // Handle http and ws (and their secure variants)\n const match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1]) {\n case \"http\":\n return new JsonRpcProvider(network);\n case \"ws\":\n return new WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n\n const n = getNetwork(network);\n if (!n || !n._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network: network\n });\n }\n\n return n._defaultProvider({\n FallbackProvider,\n\n AlchemyProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n JsonRpcProvider,\n NodesmithProvider,\n PocketProvider,\n Web3Provider,\n\n IpcProvider,\n }, options);\n}\n\n////////////////////////\n// Exports\n\nexport {\n\n // Abstract Providers (or Abstract-ish)\n Provider,\n BaseProvider,\n\n Resolver,\n\n UrlJsonRpcProvider,\n\n ///////////////////////\n // Concrete Providers\n\n FallbackProvider,\n\n AlchemyProvider,\n AlchemyWebSocketProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n InfuraWebSocketProvider,\n JsonRpcProvider,\n JsonRpcBatchProvider,\n NodesmithProvider,\n PocketProvider,\n StaticJsonRpcProvider,\n Web3Provider,\n WebSocketProvider,\n\n IpcProvider,\n\n\n ///////////////////////\n // Signer\n\n JsonRpcSigner,\n\n\n ///////////////////////\n // Functions\n\n getDefaultProvider,\n getNetwork,\n isCommunityResource,\n isCommunityResourcable,\n showThrottleMessage,\n\n\n ///////////////////////\n // Objects\n\n Formatter,\n\n\n ///////////////////////\n // Types\n\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse,\n\n ExternalProvider,\n JsonRpcFetchFunc,\n\n FallbackProviderConfig,\n\n Network,\n Networkish,\n\n EnsProvider,\n EnsResolver,\n\n CommunityResourcable\n};\n\n","export const version = \"solidity/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n\nfunction _pack(type: string, value: any, isArray?: boolean): Uint8Array {\n switch(type) {\n case \"address\":\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\": \"0x00\");\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n }\n\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\")\n\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type)\n }\n\n if (isArray) { size = 256; }\n\n value = BigNumber.from(value).toTwos(size);\n\n return zeroPad(value, size / 8);\n }\n\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type)\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${ type }`, \"value\", value)\n }\n if (isArray) { return arrayify((value + Zeros).substring(0, 66)); }\n return value;\n }\n\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${ type }`, \"value\", value)\n }\n const result: Array = [];\n value.forEach(function(value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", type)\n}\n\n// @TODO: Array Enum\n\nexport function pack(types: ReadonlyArray, values: ReadonlyArray) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values)\n }\n const tight: Array = [];\n types.forEach(function(type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\n\nexport function keccak256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashKeccak256(pack(types, values));\n}\n\nexport function sha256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashSha256(pack(types, values));\n}\n","export const version = \"units/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n\n\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value: string | number): string {\n const comps = String(value).split(\".\");\n\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") { whole = whole.substring(1); }\n if (whole === \"\") { whole = \"0\"; }\n\n let suffix = \"\";\n if (comps.length === 2) { suffix = \".\" + (comps[1] || \"0\"); }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n\n return negative + formatted.join(\",\") + suffix;\n}\n\nexport function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string {\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return formatFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function parseUnits(value: string, unitName?: BigNumberish): BigNumber {\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return parseFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function formatEther(wei: BigNumberish): string {\n return formatUnits(wei, 18);\n}\n\nexport function parseEther(ether: string): BigNumber {\n return parseUnits(ether, 18);\n}\n\n","\"use strict\";\n\nimport { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription }from \"@ethersproject/abi\";\nimport { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from \"@ethersproject/address\";\nimport * as base64 from \"@ethersproject/base64\";\nimport { Base58 as base58 } from \"@ethersproject/basex\";\nimport { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from \"@ethersproject/hash\";\nimport { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from \"@ethersproject/hdnode\";\nimport { getJsonWalletAddress } from \"@ethersproject/json-wallets\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { computeHmac, ripemd160, sha256, sha512 } from \"@ethersproject/sha2\";\nimport { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from \"@ethersproject/solidity\";\nimport { randomBytes, shuffled } from \"@ethersproject/random\";\nimport { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey, SigningKey } from \"@ethersproject/signing-key\";\nimport { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from \"@ethersproject/strings\";\nimport { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from \"@ethersproject/transactions\";\nimport { commify, formatEther, parseEther, formatUnits, parseUnits } from \"@ethersproject/units\";\nimport { verifyMessage, verifyTypedData } from \"@ethersproject/wallet\";\nimport { _fetchData, fetchJson, poll } from \"@ethersproject/web\";\n\n////////////////////////\n// Enums\n\nimport { SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { UnicodeNormalizationForm, Utf8ErrorReason } from \"@ethersproject/strings\";\nimport { UnsignedTransaction } from \"@ethersproject/transactions\";\n\n////////////////////////\n// Types and Interfaces\n\nimport { CoerceFunc } from \"@ethersproject/abi\";\nimport { Bytes, BytesLike, Hexable } from \"@ethersproject/bytes\"\nimport { Mnemonic } from \"@ethersproject/hdnode\";\nimport { EncryptOptions, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { Deferrable } from \"@ethersproject/properties\";\nimport { Utf8ErrorFunc } from \"@ethersproject/strings\";\nimport { AccessList, AccessListish } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from \"@ethersproject/web\";\n\n////////////////////////\n// Exports\n\nexport {\n AbiCoder,\n defaultAbiCoder,\n\n Fragment,\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n checkResultErrors,\n Result,\n\n Logger,\n\n RLP,\n\n _fetchData,\n fetchJson,\n poll,\n\n checkProperties,\n deepCopy,\n defineReadOnly,\n getStatic,\n resolveProperties,\n shallowCopy,\n\n arrayify,\n\n concat,\n stripZeros,\n zeroPad,\n\n isBytes,\n isBytesLike,\n\n defaultPath,\n HDNode,\n SigningKey,\n\n Interface,\n\n LogDescription,\n TransactionDescription,\n\n base58,\n base64,\n\n hexlify,\n isHexString,\n hexConcat,\n hexStripZeros,\n hexValue,\n hexZeroPad,\n hexDataLength,\n hexDataSlice,\n\n nameprep,\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n Utf8ErrorFuncs,\n\n formatBytes32String,\n parseBytes32String,\n\n hashMessage,\n namehash,\n isValidName,\n id,\n\n _TypedDataEncoder,\n\n getAddress,\n getIcapAddress,\n getContractAddress,\n getCreate2Address,\n isAddress,\n\n formatEther,\n parseEther,\n\n formatUnits,\n parseUnits,\n\n commify,\n\n computeHmac,\n keccak256,\n ripemd160,\n sha256,\n sha512,\n\n randomBytes,\n shuffled,\n\n solidityPack,\n solidityKeccak256,\n soliditySha256,\n\n splitSignature,\n joinSignature,\n\n accessListify,\n parseTransaction,\n serializeTransaction,\n TransactionTypes,\n\n getJsonWalletAddress,\n\n computeAddress,\n recoverAddress,\n\n computePublicKey,\n recoverPublicKey,\n\n verifyMessage,\n verifyTypedData,\n\n getAccountPath,\n mnemonicToEntropy,\n entropyToMnemonic,\n isValidMnemonic,\n mnemonicToSeed,\n\n\n ////////////////////////\n // Enums\n\n SupportedAlgorithm,\n\n UnicodeNormalizationForm,\n Utf8ErrorReason,\n\n ////////////////////////\n // Types\n\n Bytes,\n BytesLike,\n Hexable,\n\n AccessList,\n AccessListish,\n UnsignedTransaction,\n\n CoerceFunc,\n\n Indexed,\n\n Mnemonic,\n\n Deferrable,\n\n Utf8ErrorFunc,\n\n ConnectionInfo,\n OnceBlockable,\n OncePollable,\n PollOptions,\n FetchJsonResponse,\n\n EncryptOptions,\n ProgressCallback\n}\n\n","export const version = \"ethers/5.5.2\";\n","\"use strict\";\n\nimport { BaseContract, Contract, ContractFactory } from \"@ethersproject/contracts\";\n\nimport { BigNumber, FixedNumber } from \"@ethersproject/bignumber\";\n\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { Wallet } from \"@ethersproject/wallet\";\n\nimport * as constants from \"@ethersproject/constants\";\n\nimport * as providers from \"@ethersproject/providers\";\nimport { getDefaultProvider } from \"@ethersproject/providers\";\n\nimport { Wordlist, wordlists} from \"@ethersproject/wordlists\";\n\nimport * as utils from \"./utils\";\n\nimport { ErrorCode as errors, Logger } from \"@ethersproject/logger\";\n\n////////////////////////\n// Types\n\nimport { BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike, Signature } from \"@ethersproject/bytes\";\nimport { Transaction, UnsignedTransaction } from \"@ethersproject/transactions\";\n\n\n////////////////////////\n// Compile-Time Constants\n\n// This is generated by \"npm run dist\"\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\n////////////////////////\n// Types\n\nimport {\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface\n} from \"@ethersproject/contracts\";\n\n\n////////////////////////\n// Exports\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n};\n\n","\"use strict\";\n\n// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js\n\nimport * as ethers from \"./ethers\";\n\ntry {\n const anyGlobal = (window as any);\n\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers;\n }\n} catch (error) { }\n\nexport { ethers };\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n} from \"./ethers\";\n"],"names":["this","version","_BN","logger","_constructorGuard","throwFault","global","define","NegativeOne","Zero","One","MaxUint256","require$$0","toHex","assert","rotr32","rotl32","sum32","sum32_5","ft_1","shaCommon","BlockHash","sum32_4","ch32","maj32","s0_256","s1_256","g0_256","g1_256","SHA256","rotr64_hi","rotr64_lo","shr64_hi","shr64_lo","sum64","sum64_hi","sum64_lo","sum64_4_hi","sum64_4_lo","sum64_5_hi","sum64_5_lo","SHA512","require$$1","require$$2","require$$3","require$$4","sum32_3","minAssert","minUtils","BN","utils","Base","inherits","curve","hash","curves","KeyPair","HmacDRBG","Signature","signature","EC","_ec","allowedTransactionKeys","RLP.encode","RLP.decode","ripemd160","sha256","sha512","en","aes","_pbkdf2","pbkdf2","decrypt","decryptCrowdsale","decryptKeystore","decryptKeystoreSync","hasMnemonic","_TypedDataEncoder","encryptKeystore","decode","encode","base64Encode","base64Decode","parseTransaction","getEventTag","WebSocket","getResult","defaultApiKey","checkError","serialize","stall","Zeros","pack","keccak256","hashKeccak256","hashSha256"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAC,UAAU,MAAM,EAAE,OAAO,EAAE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AM,CAAC,kBAAkB,CAAC,wBAAwB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KACvE;IACD,IAAI,QAAO,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAAE,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC;SAAE;KAC9C;IACD,OAAO,UAAU,CAAC,KAAK,EAAE,CAAC,QAAQ,IAAI,IAAI,IAAI,QAAQ,GAAE,EAAE,CAAC,CAAC;AAChE,CAAC;SAEe,WAAW,CAAC,GAAiB;IACzC,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;SAEe,UAAU,CAAC,KAAa;IACpC,OAAO,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC;;ACxFA,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MCACF,SAAO,GAAG;;ACAvB,YAAY,CAAC;MAkCPE,QAAM,GAAG,IAAI,MAAM,CAACF,SAAO;;;;;;;;;;;;;;;;;;;;;;;AClCjC,YAAY,CAAC;AAMb,IAAI;IACA,MAAM,SAAS,GAAI,MAAc,CAAC;IAElC,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,EAAE;QAC3B,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;KAC9B;CACJ;AAAC,OAAO,KAAK,EAAE;;;;"} \ No newline at end of file diff --git a/node_modules/ethers/dist/ethers.esm.min.js b/node_modules/ethers/dist/ethers.esm.min.js new file mode 100644 index 0000000..669c0d8 --- /dev/null +++ b/node_modules/ethers/dist/ethers.esm.min.js @@ -0,0 +1 @@ +var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function createCommonjsModule(fn,basedir,module){return module={path:basedir,exports:{},require:function(path,base){return commonjsRequire(path,base===undefined||base===null?module.path:base)}},fn(module,module.exports),module.exports}function getDefaultExportFromNamespaceIfPresent(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")?n["default"]:n}function getDefaultExportFromNamespaceIfNotNamed(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")&&Object.keys(n).length===1?n["default"]:n}function getAugmentedNamespace(n){if(n.__esModule)return n;var a=Object.defineProperty({},"__esModule",{value:true});Object.keys(n).forEach(function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})});return a}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var bn=createCommonjsModule(function(module){(function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number)){return number}this.negative=0;this.words=null;this.length=0;this.red=null;if(number!==null){if(base==="le"||base==="be"){endian=base;base=10}this._init(number||0,base||10,endian||"be")}}if(typeof module==="object"){module.exports=BN}else{exports.BN=BN}BN.BN=BN;BN.wordSize=26;var Buffer;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined"){Buffer=window.Buffer}else{Buffer=null.Buffer}}catch(e){}BN.isBN=function isBN(num){if(num instanceof BN){return true}return num!==null&&typeof num==="object"&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)};BN.max=function max(left,right){if(left.cmp(right)>0)return left;return right};BN.min=function min(left,right){if(left.cmp(right)<0)return left;return right};BN.prototype._init=function init(number,base,endian){if(typeof number==="number"){return this._initNumber(number,base,endian)}if(typeof number==="object"){return this._initArray(number,base,endian)}if(base==="hex"){base=16}assert(base===(base|0)&&base>=2&&base<=36);number=number.toString().replace(/\s+/g,"");var start=0;if(number[0]==="-"){start++;this.negative=1}if(start=0;i-=3){w=number[i]|number[i-1]<<8|number[i-2]<<16;this.words[j]|=w<>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}else if(endian==="le"){for(i=0,j=0;i>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}return this.strip()};function parseHex4Bits(string,index){var c=string.charCodeAt(index);if(c>=65&&c<=70){return c-55}else if(c>=97&&c<=102){return c-87}else{return c-48&15}}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);if(index-1>=lowerBound){r|=parseHex4Bits(string,index-1)<<4}return r}BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6);this.words=new Array(this.length);for(var i=0;i=start;i-=2){w=parseHexByte(number,start,i)<=18){off-=18;j+=1;this.words[j]|=w>>>26}else{off+=8}}}else{var parseLength=number.length-start;for(i=parseLength%2===0?start+1:start;i=18){off-=18;j+=1;this.words[j]|=w>>>26}else{off+=8}}}this.strip()};function parseBase(str,start,end,mul){var r=0;var len=Math.min(str.length,end);for(var i=start;i=49){r+=c-49+10}else if(c>=17){r+=c-17+10}else{r+=c}}return r}BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0];this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base){limbLen++}limbLen--;limbPow=limbPow/base|0;var total=number.length-start;var mod=total%limbLen;var end=Math.min(total,total-mod)+start;var word=0;for(var i=start;i1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?""};var zeros=["","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"];var groupSizes=[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];var groupBases=[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];BN.prototype.toString=function toString(base,padding){base=base||10;padding=padding|0||1;var out;if(base===16||base==="hex"){out="";var off=0;var carry=0;for(var i=0;i>>24-off&16777215;if(carry!==0||i!==this.length-1){out=zeros[6-word.length]+word+out}else{out=word+out}off+=2;if(off>=26){off-=26;i--}}if(carry!==0){out=carry.toString(16)+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}if(base===(base|0)&&base>=2&&base<=36){var groupSize=groupSizes[base];var groupBase=groupBases[base];out="";var c=this.clone();c.negative=0;while(!c.isZero()){var r=c.modn(groupBase).toString(base);c=c.idivn(groupBase);if(!c.isZero()){out=zeros[groupSize-r.length]+r+out}else{out=r+out}}if(this.isZero()){out="0"+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ret=this.words[0];if(this.length===2){ret+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ret+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ret:ret};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(endian,length){assert(typeof Buffer!=="undefined");return this.toArrayLike(Buffer,endian,length)};BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength();var reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length");assert(reqLength>0,"Requested array length <= 0");this.strip();var littleEndian=endian==="le";var res=new ArrayType(reqLength);var b,i;var q=this.clone();if(!littleEndian){for(i=0;i=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(w){if(w===0)return 26;var t=w;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1];var hi=this._countBits(w);return(this.length-1)*26+hi};function toBitArray(num){var w=new Array(num.bitLength());for(var bit=0;bit>>wbit}return w}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var r=0;for(var i=0;inum.length)return this.clone().ior(num);return num.clone().ior(this)};BN.prototype.uor=function uor(num){if(this.length>num.length)return this.clone().iuor(num);return num.clone().iuor(this)};BN.prototype.iuand=function iuand(num){var b;if(this.length>num.length){b=num}else{b=this}for(var i=0;inum.length)return this.clone().iand(num);return num.clone().iand(this)};BN.prototype.uand=function uand(num){if(this.length>num.length)return this.clone().iuand(num);return num.clone().iuand(this)};BN.prototype.iuxor=function iuxor(num){var a;var b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}for(var i=0;inum.length)return this.clone().ixor(num);return num.clone().ixor(this)};BN.prototype.uxor=function uxor(num){if(this.length>num.length)return this.clone().iuxor(num);return num.clone().iuxor(this)};BN.prototype.inotn=function inotn(width){assert(typeof width==="number"&&width>=0);var bytesNeeded=Math.ceil(width/26)|0;var bitsLeft=width%26;this._expand(bytesNeeded);if(bitsLeft>0){bytesNeeded--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-bitsLeft}return this.strip()};BN.prototype.notn=function notn(width){return this.clone().inotn(width)};BN.prototype.setn=function setn(bit,val){assert(typeof bit==="number"&&bit>=0);var off=bit/26|0;var wbit=bit%26;this._expand(off+1);if(val){this.words[off]=this.words[off]|1<num.length){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>>26}for(;carry!==0&&i>>26}this.length=a.length;if(carry!==0){this.words[this.length]=carry;this.length++}else if(a!==this){for(;inum.length)return this.clone().iadd(num);return num.clone().iadd(this)};BN.prototype.isub=function isub(num){if(num.negative!==0){num.negative=0;var r=this.iadd(num);num.negative=1;return r._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(num);this.negative=1;return this._normSign()}var cmp=this.cmp(num);if(cmp===0){this.negative=0;this.length=1;this.words[0]=0;return this}var a,b;if(cmp>0){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>26;this.words[i]=r&67108863}for(;carry!==0&&i>26;this.words[i]=r&67108863}if(carry===0&&i>>26;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/67108864|0;rword=r&67108863}out.words[k]=rword|0;carry=ncarry|0}if(carry!==0){out.words[k]=carry|0}else{out.length--}return out.strip()}var comb10MulTo=function comb10MulTo(self,num,out){var a=self.words;var b=num.words;var o=out.words;var c=0;var lo;var mid;var hi;var a0=a[0]|0;var al0=a0&8191;var ah0=a0>>>13;var a1=a[1]|0;var al1=a1&8191;var ah1=a1>>>13;var a2=a[2]|0;var al2=a2&8191;var ah2=a2>>>13;var a3=a[3]|0;var al3=a3&8191;var ah3=a3>>>13;var a4=a[4]|0;var al4=a4&8191;var ah4=a4>>>13;var a5=a[5]|0;var al5=a5&8191;var ah5=a5>>>13;var a6=a[6]|0;var al6=a6&8191;var ah6=a6>>>13;var a7=a[7]|0;var al7=a7&8191;var ah7=a7>>>13;var a8=a[8]|0;var al8=a8&8191;var ah8=a8>>>13;var a9=a[9]|0;var al9=a9&8191;var ah9=a9>>>13;var b0=b[0]|0;var bl0=b0&8191;var bh0=b0>>>13;var b1=b[1]|0;var bl1=b1&8191;var bh1=b1>>>13;var b2=b[2]|0;var bl2=b2&8191;var bh2=b2>>>13;var b3=b[3]|0;var bl3=b3&8191;var bh3=b3>>>13;var b4=b[4]|0;var bl4=b4&8191;var bh4=b4>>>13;var b5=b[5]|0;var bl5=b5&8191;var bh5=b5>>>13;var b6=b[6]|0;var bl6=b6&8191;var bh6=b6>>>13;var b7=b[7]|0;var bl7=b7&8191;var bh7=b7>>>13;var b8=b[8]|0;var bl8=b8&8191;var bh8=b8>>>13;var b9=b[9]|0;var bl9=b9&8191;var bh9=b9>>>13;out.negative=self.negative^num.negative;out.length=19;lo=Math.imul(al0,bl0);mid=Math.imul(al0,bh0);mid=mid+Math.imul(ah0,bl0)|0;hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0;w0&=67108863;lo=Math.imul(al1,bl0);mid=Math.imul(al1,bh0);mid=mid+Math.imul(ah1,bl0)|0;hi=Math.imul(ah1,bh0);lo=lo+Math.imul(al0,bl1)|0;mid=mid+Math.imul(al0,bh1)|0;mid=mid+Math.imul(ah0,bl1)|0;hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0;w1&=67108863;lo=Math.imul(al2,bl0);mid=Math.imul(al2,bh0);mid=mid+Math.imul(ah2,bl0)|0;hi=Math.imul(ah2,bh0);lo=lo+Math.imul(al1,bl1)|0;mid=mid+Math.imul(al1,bh1)|0;mid=mid+Math.imul(ah1,bl1)|0;hi=hi+Math.imul(ah1,bh1)|0;lo=lo+Math.imul(al0,bl2)|0;mid=mid+Math.imul(al0,bh2)|0;mid=mid+Math.imul(ah0,bl2)|0;hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0;w2&=67108863;lo=Math.imul(al3,bl0);mid=Math.imul(al3,bh0);mid=mid+Math.imul(ah3,bl0)|0;hi=Math.imul(ah3,bh0);lo=lo+Math.imul(al2,bl1)|0;mid=mid+Math.imul(al2,bh1)|0;mid=mid+Math.imul(ah2,bl1)|0;hi=hi+Math.imul(ah2,bh1)|0;lo=lo+Math.imul(al1,bl2)|0;mid=mid+Math.imul(al1,bh2)|0;mid=mid+Math.imul(ah1,bl2)|0;hi=hi+Math.imul(ah1,bh2)|0;lo=lo+Math.imul(al0,bl3)|0;mid=mid+Math.imul(al0,bh3)|0;mid=mid+Math.imul(ah0,bl3)|0;hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0;w3&=67108863;lo=Math.imul(al4,bl0);mid=Math.imul(al4,bh0);mid=mid+Math.imul(ah4,bl0)|0;hi=Math.imul(ah4,bh0);lo=lo+Math.imul(al3,bl1)|0;mid=mid+Math.imul(al3,bh1)|0;mid=mid+Math.imul(ah3,bl1)|0;hi=hi+Math.imul(ah3,bh1)|0;lo=lo+Math.imul(al2,bl2)|0;mid=mid+Math.imul(al2,bh2)|0;mid=mid+Math.imul(ah2,bl2)|0;hi=hi+Math.imul(ah2,bh2)|0;lo=lo+Math.imul(al1,bl3)|0;mid=mid+Math.imul(al1,bh3)|0;mid=mid+Math.imul(ah1,bl3)|0;hi=hi+Math.imul(ah1,bh3)|0;lo=lo+Math.imul(al0,bl4)|0;mid=mid+Math.imul(al0,bh4)|0;mid=mid+Math.imul(ah0,bl4)|0;hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0;w4&=67108863;lo=Math.imul(al5,bl0);mid=Math.imul(al5,bh0);mid=mid+Math.imul(ah5,bl0)|0;hi=Math.imul(ah5,bh0);lo=lo+Math.imul(al4,bl1)|0;mid=mid+Math.imul(al4,bh1)|0;mid=mid+Math.imul(ah4,bl1)|0;hi=hi+Math.imul(ah4,bh1)|0;lo=lo+Math.imul(al3,bl2)|0;mid=mid+Math.imul(al3,bh2)|0;mid=mid+Math.imul(ah3,bl2)|0;hi=hi+Math.imul(ah3,bh2)|0;lo=lo+Math.imul(al2,bl3)|0;mid=mid+Math.imul(al2,bh3)|0;mid=mid+Math.imul(ah2,bl3)|0;hi=hi+Math.imul(ah2,bh3)|0;lo=lo+Math.imul(al1,bl4)|0;mid=mid+Math.imul(al1,bh4)|0;mid=mid+Math.imul(ah1,bl4)|0;hi=hi+Math.imul(ah1,bh4)|0;lo=lo+Math.imul(al0,bl5)|0;mid=mid+Math.imul(al0,bh5)|0;mid=mid+Math.imul(ah0,bl5)|0;hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0;w5&=67108863;lo=Math.imul(al6,bl0);mid=Math.imul(al6,bh0);mid=mid+Math.imul(ah6,bl0)|0;hi=Math.imul(ah6,bh0);lo=lo+Math.imul(al5,bl1)|0;mid=mid+Math.imul(al5,bh1)|0;mid=mid+Math.imul(ah5,bl1)|0;hi=hi+Math.imul(ah5,bh1)|0;lo=lo+Math.imul(al4,bl2)|0;mid=mid+Math.imul(al4,bh2)|0;mid=mid+Math.imul(ah4,bl2)|0;hi=hi+Math.imul(ah4,bh2)|0;lo=lo+Math.imul(al3,bl3)|0;mid=mid+Math.imul(al3,bh3)|0;mid=mid+Math.imul(ah3,bl3)|0;hi=hi+Math.imul(ah3,bh3)|0;lo=lo+Math.imul(al2,bl4)|0;mid=mid+Math.imul(al2,bh4)|0;mid=mid+Math.imul(ah2,bl4)|0;hi=hi+Math.imul(ah2,bh4)|0;lo=lo+Math.imul(al1,bl5)|0;mid=mid+Math.imul(al1,bh5)|0;mid=mid+Math.imul(ah1,bl5)|0;hi=hi+Math.imul(ah1,bh5)|0;lo=lo+Math.imul(al0,bl6)|0;mid=mid+Math.imul(al0,bh6)|0;mid=mid+Math.imul(ah0,bl6)|0;hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w6>>>26)|0;w6&=67108863;lo=Math.imul(al7,bl0);mid=Math.imul(al7,bh0);mid=mid+Math.imul(ah7,bl0)|0;hi=Math.imul(ah7,bh0);lo=lo+Math.imul(al6,bl1)|0;mid=mid+Math.imul(al6,bh1)|0;mid=mid+Math.imul(ah6,bl1)|0;hi=hi+Math.imul(ah6,bh1)|0;lo=lo+Math.imul(al5,bl2)|0;mid=mid+Math.imul(al5,bh2)|0;mid=mid+Math.imul(ah5,bl2)|0;hi=hi+Math.imul(ah5,bh2)|0;lo=lo+Math.imul(al4,bl3)|0;mid=mid+Math.imul(al4,bh3)|0;mid=mid+Math.imul(ah4,bl3)|0;hi=hi+Math.imul(ah4,bh3)|0;lo=lo+Math.imul(al3,bl4)|0;mid=mid+Math.imul(al3,bh4)|0;mid=mid+Math.imul(ah3,bl4)|0;hi=hi+Math.imul(ah3,bh4)|0;lo=lo+Math.imul(al2,bl5)|0;mid=mid+Math.imul(al2,bh5)|0;mid=mid+Math.imul(ah2,bl5)|0;hi=hi+Math.imul(ah2,bh5)|0;lo=lo+Math.imul(al1,bl6)|0;mid=mid+Math.imul(al1,bh6)|0;mid=mid+Math.imul(ah1,bl6)|0;hi=hi+Math.imul(ah1,bh6)|0;lo=lo+Math.imul(al0,bl7)|0;mid=mid+Math.imul(al0,bh7)|0;mid=mid+Math.imul(ah0,bl7)|0;hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0;w7&=67108863;lo=Math.imul(al8,bl0);mid=Math.imul(al8,bh0);mid=mid+Math.imul(ah8,bl0)|0;hi=Math.imul(ah8,bh0);lo=lo+Math.imul(al7,bl1)|0;mid=mid+Math.imul(al7,bh1)|0;mid=mid+Math.imul(ah7,bl1)|0;hi=hi+Math.imul(ah7,bh1)|0;lo=lo+Math.imul(al6,bl2)|0;mid=mid+Math.imul(al6,bh2)|0;mid=mid+Math.imul(ah6,bl2)|0;hi=hi+Math.imul(ah6,bh2)|0;lo=lo+Math.imul(al5,bl3)|0;mid=mid+Math.imul(al5,bh3)|0;mid=mid+Math.imul(ah5,bl3)|0;hi=hi+Math.imul(ah5,bh3)|0;lo=lo+Math.imul(al4,bl4)|0;mid=mid+Math.imul(al4,bh4)|0;mid=mid+Math.imul(ah4,bl4)|0;hi=hi+Math.imul(ah4,bh4)|0;lo=lo+Math.imul(al3,bl5)|0;mid=mid+Math.imul(al3,bh5)|0;mid=mid+Math.imul(ah3,bl5)|0;hi=hi+Math.imul(ah3,bh5)|0;lo=lo+Math.imul(al2,bl6)|0;mid=mid+Math.imul(al2,bh6)|0;mid=mid+Math.imul(ah2,bl6)|0;hi=hi+Math.imul(ah2,bh6)|0;lo=lo+Math.imul(al1,bl7)|0;mid=mid+Math.imul(al1,bh7)|0;mid=mid+Math.imul(ah1,bl7)|0;hi=hi+Math.imul(ah1,bh7)|0;lo=lo+Math.imul(al0,bl8)|0;mid=mid+Math.imul(al0,bh8)|0;mid=mid+Math.imul(ah0,bl8)|0;hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0;w8&=67108863;lo=Math.imul(al9,bl0);mid=Math.imul(al9,bh0);mid=mid+Math.imul(ah9,bl0)|0;hi=Math.imul(ah9,bh0);lo=lo+Math.imul(al8,bl1)|0;mid=mid+Math.imul(al8,bh1)|0;mid=mid+Math.imul(ah8,bl1)|0;hi=hi+Math.imul(ah8,bh1)|0;lo=lo+Math.imul(al7,bl2)|0;mid=mid+Math.imul(al7,bh2)|0;mid=mid+Math.imul(ah7,bl2)|0;hi=hi+Math.imul(ah7,bh2)|0;lo=lo+Math.imul(al6,bl3)|0;mid=mid+Math.imul(al6,bh3)|0;mid=mid+Math.imul(ah6,bl3)|0;hi=hi+Math.imul(ah6,bh3)|0;lo=lo+Math.imul(al5,bl4)|0;mid=mid+Math.imul(al5,bh4)|0;mid=mid+Math.imul(ah5,bl4)|0;hi=hi+Math.imul(ah5,bh4)|0;lo=lo+Math.imul(al4,bl5)|0;mid=mid+Math.imul(al4,bh5)|0;mid=mid+Math.imul(ah4,bl5)|0;hi=hi+Math.imul(ah4,bh5)|0;lo=lo+Math.imul(al3,bl6)|0;mid=mid+Math.imul(al3,bh6)|0;mid=mid+Math.imul(ah3,bl6)|0;hi=hi+Math.imul(ah3,bh6)|0;lo=lo+Math.imul(al2,bl7)|0;mid=mid+Math.imul(al2,bh7)|0;mid=mid+Math.imul(ah2,bl7)|0;hi=hi+Math.imul(ah2,bh7)|0;lo=lo+Math.imul(al1,bl8)|0;mid=mid+Math.imul(al1,bh8)|0;mid=mid+Math.imul(ah1,bl8)|0;hi=hi+Math.imul(ah1,bh8)|0;lo=lo+Math.imul(al0,bl9)|0;mid=mid+Math.imul(al0,bh9)|0;mid=mid+Math.imul(ah0,bl9)|0;hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0;w9&=67108863;lo=Math.imul(al9,bl1);mid=Math.imul(al9,bh1);mid=mid+Math.imul(ah9,bl1)|0;hi=Math.imul(ah9,bh1);lo=lo+Math.imul(al8,bl2)|0;mid=mid+Math.imul(al8,bh2)|0;mid=mid+Math.imul(ah8,bl2)|0;hi=hi+Math.imul(ah8,bh2)|0;lo=lo+Math.imul(al7,bl3)|0;mid=mid+Math.imul(al7,bh3)|0;mid=mid+Math.imul(ah7,bl3)|0;hi=hi+Math.imul(ah7,bh3)|0;lo=lo+Math.imul(al6,bl4)|0;mid=mid+Math.imul(al6,bh4)|0;mid=mid+Math.imul(ah6,bl4)|0;hi=hi+Math.imul(ah6,bh4)|0;lo=lo+Math.imul(al5,bl5)|0;mid=mid+Math.imul(al5,bh5)|0;mid=mid+Math.imul(ah5,bl5)|0;hi=hi+Math.imul(ah5,bh5)|0;lo=lo+Math.imul(al4,bl6)|0;mid=mid+Math.imul(al4,bh6)|0;mid=mid+Math.imul(ah4,bl6)|0;hi=hi+Math.imul(ah4,bh6)|0;lo=lo+Math.imul(al3,bl7)|0;mid=mid+Math.imul(al3,bh7)|0;mid=mid+Math.imul(ah3,bl7)|0;hi=hi+Math.imul(ah3,bh7)|0;lo=lo+Math.imul(al2,bl8)|0;mid=mid+Math.imul(al2,bh8)|0;mid=mid+Math.imul(ah2,bl8)|0;hi=hi+Math.imul(ah2,bh8)|0;lo=lo+Math.imul(al1,bl9)|0;mid=mid+Math.imul(al1,bh9)|0;mid=mid+Math.imul(ah1,bl9)|0;hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0;w10&=67108863;lo=Math.imul(al9,bl2);mid=Math.imul(al9,bh2);mid=mid+Math.imul(ah9,bl2)|0;hi=Math.imul(ah9,bh2);lo=lo+Math.imul(al8,bl3)|0;mid=mid+Math.imul(al8,bh3)|0;mid=mid+Math.imul(ah8,bl3)|0;hi=hi+Math.imul(ah8,bh3)|0;lo=lo+Math.imul(al7,bl4)|0;mid=mid+Math.imul(al7,bh4)|0;mid=mid+Math.imul(ah7,bl4)|0;hi=hi+Math.imul(ah7,bh4)|0;lo=lo+Math.imul(al6,bl5)|0;mid=mid+Math.imul(al6,bh5)|0;mid=mid+Math.imul(ah6,bl5)|0;hi=hi+Math.imul(ah6,bh5)|0;lo=lo+Math.imul(al5,bl6)|0;mid=mid+Math.imul(al5,bh6)|0;mid=mid+Math.imul(ah5,bl6)|0;hi=hi+Math.imul(ah5,bh6)|0;lo=lo+Math.imul(al4,bl7)|0;mid=mid+Math.imul(al4,bh7)|0;mid=mid+Math.imul(ah4,bl7)|0;hi=hi+Math.imul(ah4,bh7)|0;lo=lo+Math.imul(al3,bl8)|0;mid=mid+Math.imul(al3,bh8)|0;mid=mid+Math.imul(ah3,bl8)|0;hi=hi+Math.imul(ah3,bh8)|0;lo=lo+Math.imul(al2,bl9)|0;mid=mid+Math.imul(al2,bh9)|0;mid=mid+Math.imul(ah2,bl9)|0;hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0;w11&=67108863;lo=Math.imul(al9,bl3);mid=Math.imul(al9,bh3);mid=mid+Math.imul(ah9,bl3)|0;hi=Math.imul(ah9,bh3);lo=lo+Math.imul(al8,bl4)|0;mid=mid+Math.imul(al8,bh4)|0;mid=mid+Math.imul(ah8,bl4)|0;hi=hi+Math.imul(ah8,bh4)|0;lo=lo+Math.imul(al7,bl5)|0;mid=mid+Math.imul(al7,bh5)|0;mid=mid+Math.imul(ah7,bl5)|0;hi=hi+Math.imul(ah7,bh5)|0;lo=lo+Math.imul(al6,bl6)|0;mid=mid+Math.imul(al6,bh6)|0;mid=mid+Math.imul(ah6,bl6)|0;hi=hi+Math.imul(ah6,bh6)|0;lo=lo+Math.imul(al5,bl7)|0;mid=mid+Math.imul(al5,bh7)|0;mid=mid+Math.imul(ah5,bl7)|0;hi=hi+Math.imul(ah5,bh7)|0;lo=lo+Math.imul(al4,bl8)|0;mid=mid+Math.imul(al4,bh8)|0;mid=mid+Math.imul(ah4,bl8)|0;hi=hi+Math.imul(ah4,bh8)|0;lo=lo+Math.imul(al3,bl9)|0;mid=mid+Math.imul(al3,bh9)|0;mid=mid+Math.imul(ah3,bl9)|0;hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0;w12&=67108863;lo=Math.imul(al9,bl4);mid=Math.imul(al9,bh4);mid=mid+Math.imul(ah9,bl4)|0;hi=Math.imul(ah9,bh4);lo=lo+Math.imul(al8,bl5)|0;mid=mid+Math.imul(al8,bh5)|0;mid=mid+Math.imul(ah8,bl5)|0;hi=hi+Math.imul(ah8,bh5)|0;lo=lo+Math.imul(al7,bl6)|0;mid=mid+Math.imul(al7,bh6)|0;mid=mid+Math.imul(ah7,bl6)|0;hi=hi+Math.imul(ah7,bh6)|0;lo=lo+Math.imul(al6,bl7)|0;mid=mid+Math.imul(al6,bh7)|0;mid=mid+Math.imul(ah6,bl7)|0;hi=hi+Math.imul(ah6,bh7)|0;lo=lo+Math.imul(al5,bl8)|0;mid=mid+Math.imul(al5,bh8)|0;mid=mid+Math.imul(ah5,bl8)|0;hi=hi+Math.imul(ah5,bh8)|0;lo=lo+Math.imul(al4,bl9)|0;mid=mid+Math.imul(al4,bh9)|0;mid=mid+Math.imul(ah4,bl9)|0;hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0;w13&=67108863;lo=Math.imul(al9,bl5);mid=Math.imul(al9,bh5);mid=mid+Math.imul(ah9,bl5)|0;hi=Math.imul(ah9,bh5);lo=lo+Math.imul(al8,bl6)|0;mid=mid+Math.imul(al8,bh6)|0;mid=mid+Math.imul(ah8,bl6)|0;hi=hi+Math.imul(ah8,bh6)|0;lo=lo+Math.imul(al7,bl7)|0;mid=mid+Math.imul(al7,bh7)|0;mid=mid+Math.imul(ah7,bl7)|0;hi=hi+Math.imul(ah7,bh7)|0;lo=lo+Math.imul(al6,bl8)|0;mid=mid+Math.imul(al6,bh8)|0;mid=mid+Math.imul(ah6,bl8)|0;hi=hi+Math.imul(ah6,bh8)|0;lo=lo+Math.imul(al5,bl9)|0;mid=mid+Math.imul(al5,bh9)|0;mid=mid+Math.imul(ah5,bl9)|0;hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0;w14&=67108863;lo=Math.imul(al9,bl6);mid=Math.imul(al9,bh6);mid=mid+Math.imul(ah9,bl6)|0;hi=Math.imul(ah9,bh6);lo=lo+Math.imul(al8,bl7)|0;mid=mid+Math.imul(al8,bh7)|0;mid=mid+Math.imul(ah8,bl7)|0;hi=hi+Math.imul(ah8,bh7)|0;lo=lo+Math.imul(al7,bl8)|0;mid=mid+Math.imul(al7,bh8)|0;mid=mid+Math.imul(ah7,bl8)|0;hi=hi+Math.imul(ah7,bh8)|0;lo=lo+Math.imul(al6,bl9)|0;mid=mid+Math.imul(al6,bh9)|0;mid=mid+Math.imul(ah6,bl9)|0;hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0;w15&=67108863;lo=Math.imul(al9,bl7);mid=Math.imul(al9,bh7);mid=mid+Math.imul(ah9,bl7)|0;hi=Math.imul(ah9,bh7);lo=lo+Math.imul(al8,bl8)|0;mid=mid+Math.imul(al8,bh8)|0;mid=mid+Math.imul(ah8,bl8)|0;hi=hi+Math.imul(ah8,bh8)|0;lo=lo+Math.imul(al7,bl9)|0;mid=mid+Math.imul(al7,bh9)|0;mid=mid+Math.imul(ah7,bl9)|0;hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0;w16&=67108863;lo=Math.imul(al9,bl8);mid=Math.imul(al9,bh8);mid=mid+Math.imul(ah9,bl8)|0;hi=Math.imul(ah9,bh8);lo=lo+Math.imul(al8,bl9)|0;mid=mid+Math.imul(al8,bh9)|0;mid=mid+Math.imul(ah8,bl9)|0;hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0;w17&=67108863;lo=Math.imul(al9,bl9);mid=Math.imul(al9,bh9);mid=mid+Math.imul(ah9,bl9)|0;hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w18>>>26)|0;w18&=67108863;o[0]=w0;o[1]=w1;o[2]=w2;o[3]=w3;o[4]=w4;o[5]=w5;o[6]=w6;o[7]=w7;o[8]=w8;o[9]=w9;o[10]=w10;o[11]=w11;o[12]=w12;o[13]=w13;o[14]=w14;o[15]=w15;o[16]=w16;o[17]=w17;o[18]=w18;if(c!==0){o[19]=c;out.length++}return out};if(!Math.imul){comb10MulTo=smallMulTo}function bigMulTo(self,num,out){out.negative=num.negative^self.negative;out.length=self.length+num.length;var carry=0;var hncarry=0;for(var k=0;k>>26)|0;hncarry+=ncarry>>>26;ncarry&=67108863}out.words[k]=rword;carry=ncarry;ncarry=hncarry}if(carry!==0){out.words[k]=carry}else{out.length--}return out.strip()}function jumboMulTo(self,num,out){var fftm=new FFTM;return fftm.mulp(self,num,out)}BN.prototype.mulTo=function mulTo(num,out){var res;var len=this.length+num.length;if(this.length===10&&num.length===10){res=comb10MulTo(this,num,out)}else if(len<63){res=smallMulTo(this,num,out)}else if(len<1024){res=bigMulTo(this,num,out)}else{res=jumboMulTo(this,num,out)}return res};function FFTM(x,y){this.x=x;this.y=y}FFTM.prototype.makeRBT=function makeRBT(N){var t=new Array(N);var l=BN.prototype._countBits(N)-1;for(var i=0;i>=1}return rb};FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i>>1){i++}return 1<>>13;rws[2*i+1]=carry&8191;carry=carry>>>13}for(i=2*len;i>=26;carry+=w/67108864|0;carry+=lo>>>26;this.words[i]=lo&67108863}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.muln=function muln(num){return this.clone().imuln(num)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(num){var w=toBitArray(num);if(w.length===0)return new BN(1);var res=this;for(var i=0;i=0);var r=bits%26;var s=(bits-r)/26;var carryMask=67108863>>>26-r<<26-r;var i;if(r!==0){var carry=0;for(i=0;i>>26-r}if(carry){this.words[i]=carry;this.length++}}if(s!==0){for(i=this.length-1;i>=0;i--){this.words[i+s]=this.words[i]}for(i=0;i=0);var h;if(hint){h=(hint-hint%26)/26}else{h=0}var r=bits%26;var s=Math.min((bits-r)/26,this.length);var mask=67108863^67108863>>>r<s){this.length-=s;for(i=0;i=0&&(carry!==0||i>=h);i--){var word=this.words[i]|0;this.words[i]=carry<<26-r|word>>>r;carry=word&mask}if(maskedWords&&carry!==0){maskedWords.words[maskedWords.length++]=carry}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(bits,hint,extended){assert(this.negative===0);return this.iushrn(bits,hint,extended)};BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)};BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)};BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)};BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)};BN.prototype.testn=function testn(bit){assert(typeof bit==="number"&&bit>=0);var r=bit%26;var s=(bit-r)/26;var q=1<=0);var r=bits%26;var s=(bits-r)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=s){return this}if(r!==0){s++}this.length=Math.min(s,this.length);if(r!==0){var mask=67108863^67108863>>>r<=67108864;i++){this.words[i]-=67108864;if(i===this.length-1){this.words[i+1]=1}else{this.words[i+1]++}}this.length=Math.max(this.length,i+1);return this};BN.prototype.isubn=function isubn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.iaddn(-num);if(this.negative!==0){this.negative=0;this.iaddn(num);this.negative=1;return this}this.words[0]-=num;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var i=0;i>26)-(right/67108864|0);this.words[i+shift]=w&67108863}for(;i>26;this.words[i+shift]=w&67108863}if(carry===0)return this.strip();assert(carry===-1);carry=0;for(i=0;i>26;this.words[i]=w&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=this.length-num.length;var a=this.clone();var b=num;var bhi=b.words[b.length-1]|0;var bhiBits=this._countBits(bhi);shift=26-bhiBits;if(shift!==0){b=b.ushln(shift);a.iushln(shift);bhi=b.words[b.length-1]|0}var m=a.length-b.length;var q;if(mode!=="mod"){q=new BN(null);q.length=m+1;q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=(a.words[b.length+j]|0)*67108864+(a.words[b.length+j-1]|0);qj=Math.min(qj/bhi|0,67108863);a._ishlnsubmul(b,qj,j);while(a.negative!==0){qj--;a.negative=0;a._ishlnsubmul(b,1,j);if(!a.isZero()){a.negative^=1}}if(q){q.words[j]=qj}}if(q){q.strip()}a.strip();if(mode!=="div"&&shift!==0){a.iushrn(shift)}return{div:q||null,mod:a}};BN.prototype.divmod=function divmod(num,mode,positive){assert(!num.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var div,mod,res;if(this.negative!==0&&num.negative===0){res=this.neg().divmod(num,mode);if(mode!=="mod"){div=res.div.neg()}if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.iadd(num)}}return{div:div,mod:mod}}if(this.negative===0&&num.negative!==0){res=this.divmod(num.neg(),mode);if(mode!=="mod"){div=res.div.neg()}return{div:div,mod:res.mod}}if((this.negative&num.negative)!==0){res=this.neg().divmod(num.neg(),mode);if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.isub(num)}}return{div:res.div,mod:mod}}if(num.length>this.length||this.cmp(num)<0){return{div:new BN(0),mod:this}}if(num.length===1){if(mode==="div"){return{div:this.divn(num.words[0]),mod:null}}if(mode==="mod"){return{div:null,mod:new BN(this.modn(num.words[0]))}}return{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}}return this._wordDiv(num,mode)};BN.prototype.div=function div(num){return this.divmod(num,"div",false).div};BN.prototype.mod=function mod(num){return this.divmod(num,"mod",false).mod};BN.prototype.umod=function umod(num){return this.divmod(num,"mod",true).mod};BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=dm.div.negative!==0?dm.mod.isub(num):dm.mod;var half=num.ushrn(1);var r2=num.andln(1);var cmp=mod.cmp(half);if(cmp<0||r2===1&&cmp===0)return dm.div;return dm.div.negative!==0?dm.div.isubn(1):dm.div.iaddn(1)};BN.prototype.modn=function modn(num){assert(num<=67108863);var p=(1<<26)%num;var acc=0;for(var i=this.length-1;i>=0;i--){acc=(p*acc+(this.words[i]|0))%num}return acc};BN.prototype.idivn=function idivn(num){assert(num<=67108863);var carry=0;for(var i=this.length-1;i>=0;i--){var w=(this.words[i]|0)+carry*67108864;this.words[i]=w/num|0;carry=w%num}return this.strip()};BN.prototype.divn=function divn(num){return this.clone().idivn(num)};BN.prototype.egcd=function egcd(p){assert(p.negative===0);assert(!p.isZero());var x=this;var y=p.clone();if(x.negative!==0){x=x.umod(p)}else{x=x.clone()}var A=new BN(1);var B=new BN(0);var C=new BN(0);var D=new BN(1);var g=0;while(x.isEven()&&y.isEven()){x.iushrn(1);y.iushrn(1);++g}var yp=y.clone();var xp=x.clone();while(!x.isZero()){for(var i=0,im=1;(x.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){x.iushrn(i);while(i-- >0){if(A.isOdd()||B.isOdd()){A.iadd(yp);B.isub(xp)}A.iushrn(1);B.iushrn(1)}}for(var j=0,jm=1;(y.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){y.iushrn(j);while(j-- >0){if(C.isOdd()||D.isOdd()){C.iadd(yp);D.isub(xp)}C.iushrn(1);D.iushrn(1)}}if(x.cmp(y)>=0){x.isub(y);A.isub(C);B.isub(D)}else{y.isub(x);C.isub(A);D.isub(B)}}return{a:C,b:D,gcd:y.iushln(g)}};BN.prototype._invmp=function _invmp(p){assert(p.negative===0);assert(!p.isZero());var a=this;var b=p.clone();if(a.negative!==0){a=a.umod(p)}else{a=a.clone()}var x1=new BN(1);var x2=new BN(0);var delta=b.clone();while(a.cmpn(1)>0&&b.cmpn(1)>0){for(var i=0,im=1;(a.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){a.iushrn(i);while(i-- >0){if(x1.isOdd()){x1.iadd(delta)}x1.iushrn(1)}}for(var j=0,jm=1;(b.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){b.iushrn(j);while(j-- >0){if(x2.isOdd()){x2.iadd(delta)}x2.iushrn(1)}}if(a.cmp(b)>=0){a.isub(b);x1.isub(x2)}else{b.isub(a);x2.isub(x1)}}var res;if(a.cmpn(1)===0){res=x1}else{res=x2}if(res.cmpn(0)<0){res.iadd(p)}return res};BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone();var b=num.clone();a.negative=0;b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++){a.iushrn(1);b.iushrn(1)}do{while(a.isEven()){a.iushrn(1)}while(b.isEven()){b.iushrn(1)}var r=a.cmp(b);if(r<0){var t=a;a=b;b=t}else if(r===0||b.cmpn(1)===0){break}a.isub(b)}while(true);return b.iushln(shift)};BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(num){return this.words[0]&num};BN.prototype.bincn=function bincn(bit){assert(typeof bit==="number");var r=bit%26;var s=(bit-r)/26;var q=1<>>26;w&=67108863;this.words[i]=w}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(num){var negative=num<0;if(this.negative!==0&&!negative)return-1;if(this.negative===0&&negative)return 1;this.strip();var res;if(this.length>1){res=1}else{if(negative){num=-num}assert(num<=67108863,"Number is too big");var w=this.words[0]|0;res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=this.words[i]|0;var b=num.words[i]|0;if(a===b)continue;if(ab){res=1}break}return res};BN.prototype.gtn=function gtn(num){return this.cmpn(num)===1};BN.prototype.gt=function gt(num){return this.cmp(num)===1};BN.prototype.gten=function gten(num){return this.cmpn(num)>=0};BN.prototype.gte=function gte(num){return this.cmp(num)>=0};BN.prototype.ltn=function ltn(num){return this.cmpn(num)===-1};BN.prototype.lt=function lt(num){return this.cmp(num)===-1};BN.prototype.lten=function lten(num){return this.cmpn(num)<=0};BN.prototype.lte=function lte(num){return this.cmp(num)<=0};BN.prototype.eqn=function eqn(num){return this.cmpn(num)===0};BN.prototype.eq=function eq(num){return this.cmp(num)===0};BN.red=function red(num){return new Red(num)};BN.prototype.toRed=function toRed(ctx){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ctx.convertTo(this)._forceRed(ctx)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ctx){this.red=ctx;return this};BN.prototype.forceRed=function forceRed(ctx){assert(!this.red,"Already a number in reduction context");return this._forceRed(ctx)};BN.prototype.redAdd=function redAdd(num){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,num)};BN.prototype.redIAdd=function redIAdd(num){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,num)};BN.prototype.redSub=function redSub(num){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,num)};BN.prototype.redISub=function redISub(num){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,num)};BN.prototype.redShl=function redShl(num){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,num)};BN.prototype.redMul=function redMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.mul(this,num)};BN.prototype.redIMul=function redIMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.imul(this,num)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(num){assert(this.red&&!num.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name;this.p=new BN(p,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);tmp.words=new Array(Math.ceil(this.n/13));return tmp};MPrime.prototype.ireduce=function ireduce(num){var r=num;var rlen;do{this.split(r,this.tmp);r=this.imulK(r);r=r.iadd(this.tmp);rlen=r.bitLength()}while(rlen>this.n);var cmp=rlen0){r.isub(this.p)}else{if(r.strip!==undefined){r.strip()}else{r._strip()}}return r};MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)};MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(input,output){var mask=4194303;var outLen=Math.min(input.length,9);for(var i=0;i>>22;prev=next}prev>>>=22;input.words[i-10]=prev;if(prev===0&&input.length>10){input.length-=10}else{input.length-=9}};K256.prototype.imulK=function imulK(num){num.words[num.length]=0;num.words[num.length+1]=0;num.length+=2;var lo=0;for(var i=0;i>>=26;num.words[i]=lo;carry=hi}if(carry!==0){num.words[num.length++]=carry}return num};BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if(name==="k256"){prime=new K256}else if(name==="p224"){prime=new P224}else if(name==="p192"){prime=new P192}else if(name==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+name)}primes[name]=prime;return prime};function Red(m){if(typeof m==="string"){var prime=BN._prime(m);this.m=prime.p;this.prime=prime}else{assert(m.gtn(1),"modulus must be greater than 1");this.m=m;this.prime=null}}Red.prototype._verify1=function _verify1(a){assert(a.negative===0,"red works only with positives");assert(a.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(a,b){assert((a.negative|b.negative)===0,"red works only with positives");assert(a.red&&a.red===b.red,"red works only with red numbers")};Red.prototype.imod=function imod(a){if(this.prime)return this.prime.ireduce(a)._forceRed(this);return a.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(a){if(a.isZero()){return a.clone()}return this.m.sub(a)._forceRed(this)};Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res._forceRed(this)};Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res};Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res._forceRed(this)};Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res};Red.prototype.shl=function shl(a,num){this._verify1(a);return this.imod(a.ushln(num))};Red.prototype.imul=function imul(a,b){this._verify2(a,b);return this.imod(a.imul(b))};Red.prototype.mul=function mul(a,b){this._verify2(a,b);return this.imod(a.mul(b))};Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())};Red.prototype.sqr=function sqr(a){return this.mul(a,a)};Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);assert(mod3%2===1);if(mod3===3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}var q=this.m.subn(1);var s=0;while(!q.isZero()&&q.andln(1)===0){s++;q.iushrn(1)}assert(!q.isZero());var one=new BN(1).toRed(this);var nOne=one.redNeg();var lpow=this.m.subn(1).iushrn(1);var z=this.m.bitLength();z=new BN(2*z*z).toRed(this);while(this.pow(z,lpow).cmp(nOne)!==0){z.redIAdd(nOne)}var c=this.pow(z,q);var r=this.pow(a,q.addn(1).iushrn(1));var t=this.pow(a,q);var m=s;while(t.cmp(one)!==0){var tmp=t;for(var i=0;tmp.cmp(one)!==0;i++){tmp=tmp.redSqr()}assert(i=0;i--){var word=num.words[i];for(var j=start-1;j>=0;j--){var bit=word>>j&1;if(res!==wnd[0]){res=this.sqr(res)}if(bit===0&¤t===0){currentLen=0;continue}current<<=1;current|=bit;currentLen++;if(currentLen!==windowSize&&(i!==0||j!==0))continue;res=this.mul(res,wnd[current]);currentLen=0;current=0}start=26}return res};Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r};Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();res.red=null;return res};BN.mont=function mont(num){return new Mont(num)};function Mont(m){Red.call(this,m);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));r.red=null;return r};Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero()){a.words[0]=0;a.length=1;return a}var t=a.imul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.invm=function invm(a){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}})("object"==="undefined"||module,commonjsGlobal)});const version="logger/5.5.0";"use strict";let _permanentCensorErrors=false;let _censorErrors=false;const LogLevels={debug:1,default:2,info:2,warning:3,error:4,off:5};let _logLevel=LogLevels["default"];let _globalLogger=null;function _checkNormalize(){try{const missing=[];["NFD","NFC","NFKD","NFKC"].forEach(form=>{try{if("test".normalize(form)!=="test"){throw new Error("bad normalize")}}catch(error){missing.push(form)}});if(missing.length){throw new Error("missing "+missing.join(", "))}if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769)){throw new Error("broken implementation")}}catch(error){return error.message}return null}const _normalizeError=_checkNormalize();var LogLevel;(function(LogLevel){LogLevel["DEBUG"]="DEBUG";LogLevel["INFO"]="INFO";LogLevel["WARNING"]="WARNING";LogLevel["ERROR"]="ERROR";LogLevel["OFF"]="OFF"})(LogLevel||(LogLevel={}));var ErrorCode;(function(ErrorCode){ErrorCode["UNKNOWN_ERROR"]="UNKNOWN_ERROR";ErrorCode["NOT_IMPLEMENTED"]="NOT_IMPLEMENTED";ErrorCode["UNSUPPORTED_OPERATION"]="UNSUPPORTED_OPERATION";ErrorCode["NETWORK_ERROR"]="NETWORK_ERROR";ErrorCode["SERVER_ERROR"]="SERVER_ERROR";ErrorCode["TIMEOUT"]="TIMEOUT";ErrorCode["BUFFER_OVERRUN"]="BUFFER_OVERRUN";ErrorCode["NUMERIC_FAULT"]="NUMERIC_FAULT";ErrorCode["MISSING_NEW"]="MISSING_NEW";ErrorCode["INVALID_ARGUMENT"]="INVALID_ARGUMENT";ErrorCode["MISSING_ARGUMENT"]="MISSING_ARGUMENT";ErrorCode["UNEXPECTED_ARGUMENT"]="UNEXPECTED_ARGUMENT";ErrorCode["CALL_EXCEPTION"]="CALL_EXCEPTION";ErrorCode["INSUFFICIENT_FUNDS"]="INSUFFICIENT_FUNDS";ErrorCode["NONCE_EXPIRED"]="NONCE_EXPIRED";ErrorCode["REPLACEMENT_UNDERPRICED"]="REPLACEMENT_UNDERPRICED";ErrorCode["UNPREDICTABLE_GAS_LIMIT"]="UNPREDICTABLE_GAS_LIMIT";ErrorCode["TRANSACTION_REPLACED"]="TRANSACTION_REPLACED"})(ErrorCode||(ErrorCode={}));const HEX="0123456789abcdef";class Logger{constructor(version){Object.defineProperty(this,"version",{enumerable:true,value:version,writable:false})}_log(logLevel,args){const level=logLevel.toLowerCase();if(LogLevels[level]==null){this.throwArgumentError("invalid log level name","logLevel",logLevel)}if(_logLevel>LogLevels[level]){return}console.log.apply(console,args)}debug(...args){this._log(Logger.levels.DEBUG,args)}info(...args){this._log(Logger.levels.INFO,args)}warn(...args){this._log(Logger.levels.WARNING,args)}makeError(message,code,params){if(_censorErrors){return this.makeError("censored error",code,{})}if(!code){code=Logger.errors.UNKNOWN_ERROR}if(!params){params={}}const messageDetails=[];Object.keys(params).forEach(key=>{const value=params[key];try{if(value instanceof Uint8Array){let hex="";for(let i=0;i>4];hex+=HEX[value[i]&15]}messageDetails.push(key+"=Uint8Array(0x"+hex+")")}else{messageDetails.push(key+"="+JSON.stringify(value))}}catch(error){messageDetails.push(key+"="+JSON.stringify(params[key].toString()))}});messageDetails.push(`code=${code}`);messageDetails.push(`version=${this.version}`);const reason=message;if(messageDetails.length){message+=" ("+messageDetails.join(", ")+")"}const error=new Error(message);error.reason=reason;error.code=code;Object.keys(params).forEach(function(key){error[key]=params[key]});return error}throwError(message,code,params){throw this.makeError(message,code,params)}throwArgumentError(message,name,value){return this.throwError(message,Logger.errors.INVALID_ARGUMENT,{argument:name,value:value})}assert(condition,message,code,params){if(!!condition){return}this.throwError(message,code,params)}assertArgument(condition,message,name,value){if(!!condition){return}this.throwArgumentError(message,name,value)}checkNormalize(message){if(message==null){message="platform missing String.prototype.normalize"}if(_normalizeError){this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:_normalizeError})}}checkSafeUint53(value,message){if(typeof value!=="number"){return}if(message==null){message="value not safe"}if(value<0||value>=9007199254740991){this.throwError(message,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:value})}if(value%1){this.throwError(message,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:value})}}checkArgumentCount(count,expectedCount,message){if(message){message=": "+message}else{message=""}if(countexpectedCount){this.throwError("too many arguments"+message,Logger.errors.UNEXPECTED_ARGUMENT,{count:count,expectedCount:expectedCount})}}checkNew(target,kind){if(target===Object||target==null){this.throwError("missing new",Logger.errors.MISSING_NEW,{name:kind.name})}}checkAbstract(target,kind){if(target===kind){this.throwError("cannot instantiate abstract class "+JSON.stringify(kind.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:target.name,operation:"new"})}else if(target===Object||target==null){this.throwError("missing new",Logger.errors.MISSING_NEW,{name:kind.name})}}static globalLogger(){if(!_globalLogger){_globalLogger=new Logger(version)}return _globalLogger}static setCensorship(censorship,permanent){if(!censorship&&permanent){this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}if(_permanentCensorErrors){if(!censorship){return}this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}_censorErrors=!!censorship;_permanentCensorErrors=!!permanent}static setLogLevel(logLevel){const level=LogLevels[logLevel.toLowerCase()];if(level==null){Logger.globalLogger().warn("invalid log level - "+logLevel);return}_logLevel=level}static from(version){return new Logger(version)}}Logger.errors=ErrorCode;Logger.levels=LogLevel;const version$1="bytes/5.5.0";"use strict";const logger=new Logger(version$1);function isHexable(value){return!!value.toHexString}function addSlice(array){if(array.slice){return array}array.slice=function(){const args=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(array,args)))};return array}function isBytesLike(value){return isHexString(value)&&!(value.length%2)||isBytes(value)}function isInteger(value){return typeof value==="number"&&value==value&&value%1===0}function isBytes(value){if(value==null){return false}if(value.constructor===Uint8Array){return true}if(typeof value==="string"){return false}if(!isInteger(value.length)||value.length<0){return false}for(let i=0;i=256){return false}}return true}function arrayify(value,options){if(!options){options={}}if(typeof value==="number"){logger.checkSafeUint53(value,"invalid arrayify value");const result=[];while(value){result.unshift(value&255);value=parseInt(String(value/256))}if(result.length===0){result.push(0)}return addSlice(new Uint8Array(result))}if(options.allowMissingPrefix&&typeof value==="string"&&value.substring(0,2)!=="0x"){value="0x"+value}if(isHexable(value)){value=value.toHexString()}if(isHexString(value)){let hex=value.substring(2);if(hex.length%2){if(options.hexPad==="left"){hex="0x0"+hex.substring(2)}else if(options.hexPad==="right"){hex+="0"}else{logger.throwArgumentError("hex data is odd-length","value",value)}}const result=[];for(let i=0;iarrayify(item));const length=objects.reduce((accum,item)=>accum+item.length,0);const result=new Uint8Array(length);objects.reduce((offset,object)=>{result.set(object,offset);return offset+object.length},0);return addSlice(result)}function stripZeros(value){let result=arrayify(value);if(result.length===0){return result}let start=0;while(startlength){logger.throwArgumentError("value out of range","value",arguments[0])}const result=new Uint8Array(length);result.set(value,length-value.length);return addSlice(result)}function isHexString(value,length){if(typeof value!=="string"||!value.match(/^0x[0-9A-Fa-f]*$/)){return false}if(length&&value.length!==2+2*length){return false}return true}const HexCharacters="0123456789abcdef";function hexlify(value,options){if(!options){options={}}if(typeof value==="number"){logger.checkSafeUint53(value,"invalid hexlify value");let hex="";while(value){hex=HexCharacters[value&15]+hex;value=Math.floor(value/16)}if(hex.length){if(hex.length%2){hex="0"+hex}return"0x"+hex}return"0x00"}if(typeof value==="bigint"){value=value.toString(16);if(value.length%2){return"0x0"+value}return"0x"+value}if(options.allowMissingPrefix&&typeof value==="string"&&value.substring(0,2)!=="0x"){value="0x"+value}if(isHexable(value)){return value.toHexString()}if(isHexString(value)){if(value.length%2){if(options.hexPad==="left"){value="0x0"+value.substring(2)}else if(options.hexPad==="right"){value+="0"}else{logger.throwArgumentError("hex data is odd-length","value",value)}}return value.toLowerCase()}if(isBytes(value)){let result="0x";for(let i=0;i>4]+HexCharacters[v&15]}return result}return logger.throwArgumentError("invalid hexlify value","value",value)}function hexDataLength(data){if(typeof data!=="string"){data=hexlify(data)}else if(!isHexString(data)||data.length%2){return null}return(data.length-2)/2}function hexDataSlice(data,offset,endOffset){if(typeof data!=="string"){data=hexlify(data)}else if(!isHexString(data)||data.length%2){logger.throwArgumentError("invalid hexData","value",data)}offset=2+2*offset;if(endOffset!=null){return"0x"+data.substring(offset,2+2*endOffset)}return"0x"+data.substring(offset)}function hexConcat(items){let result="0x";items.forEach(item=>{result+=hexlify(item).substring(2)});return result}function hexValue(value){const trimmed=hexStripZeros(hexlify(value,{hexPad:"left"}));if(trimmed==="0x"){return"0x0"}return trimmed}function hexStripZeros(value){if(typeof value!=="string"){value=hexlify(value)}if(!isHexString(value)){logger.throwArgumentError("invalid hex string","value",value)}value=value.substring(2);let offset=0;while(offset2*length+2){logger.throwArgumentError("value out of range","value",arguments[1])}while(value.length<2*length+2){value="0x0"+value.substring(2)}return value}function splitSignature(signature){const result={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(isBytesLike(signature)){const bytes=arrayify(signature);if(bytes.length!==65){logger.throwArgumentError("invalid signature string; must be 65 bytes","signature",signature)}result.r=hexlify(bytes.slice(0,32));result.s=hexlify(bytes.slice(32,64));result.v=bytes[64];if(result.v<27){if(result.v===0||result.v===1){result.v+=27}else{logger.throwArgumentError("signature invalid v byte","signature",signature)}}result.recoveryParam=1-result.v%2;if(result.recoveryParam){bytes[32]|=128}result._vs=hexlify(bytes.slice(32,64))}else{result.r=signature.r;result.s=signature.s;result.v=signature.v;result.recoveryParam=signature.recoveryParam;result._vs=signature._vs;if(result._vs!=null){const vs=zeroPad(arrayify(result._vs),32);result._vs=hexlify(vs);const recoveryParam=vs[0]>=128?1:0;if(result.recoveryParam==null){result.recoveryParam=recoveryParam}else if(result.recoveryParam!==recoveryParam){logger.throwArgumentError("signature recoveryParam mismatch _vs","signature",signature)}vs[0]&=127;const s=hexlify(vs);if(result.s==null){result.s=s}else if(result.s!==s){logger.throwArgumentError("signature v mismatch _vs","signature",signature)}}if(result.recoveryParam==null){if(result.v==null){logger.throwArgumentError("signature missing v and recoveryParam","signature",signature)}else if(result.v===0||result.v===1){result.recoveryParam=result.v}else{result.recoveryParam=1-result.v%2}}else{if(result.v==null){result.v=27+result.recoveryParam}else{const recId=result.v===0||result.v===1?result.v:1-result.v%2;if(result.recoveryParam!==recId){logger.throwArgumentError("signature recoveryParam mismatch v","signature",signature)}}}if(result.r==null||!isHexString(result.r)){logger.throwArgumentError("signature missing or invalid r","signature",signature)}else{result.r=hexZeroPad(result.r,32)}if(result.s==null||!isHexString(result.s)){logger.throwArgumentError("signature missing or invalid s","signature",signature)}else{result.s=hexZeroPad(result.s,32)}const vs=arrayify(result.s);if(vs[0]>=128){logger.throwArgumentError("signature s out of range","signature",signature)}if(result.recoveryParam){vs[0]|=128}const _vs=hexlify(vs);if(result._vs){if(!isHexString(result._vs)){logger.throwArgumentError("signature invalid _vs","signature",signature)}result._vs=hexZeroPad(result._vs,32)}if(result._vs==null){result._vs=_vs}else if(result._vs!==_vs){logger.throwArgumentError("signature _vs mismatch v and s","signature",signature)}}return result}function joinSignature(signature){signature=splitSignature(signature);return hexlify(concat([signature.r,signature.s,signature.recoveryParam?"0x1c":"0x1b"]))}const version$2="bignumber/5.5.0";"use strict";var BN=bn.BN;const logger$1=new Logger(version$2);const _constructorGuard={};const MAX_SAFE=9007199254740991;function isBigNumberish(value){return value!=null&&(BigNumber.isBigNumber(value)||typeof value==="number"&&value%1===0||typeof value==="string"&&!!value.match(/^-?[0-9]+$/)||isHexString(value)||typeof value==="bigint"||isBytes(value))}let _warnedToStringRadix=false;class BigNumber{constructor(constructorGuard,hex){logger$1.checkNew(new.target,BigNumber);if(constructorGuard!==_constructorGuard){logger$1.throwError("cannot call constructor directly; use BigNumber.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"})}this._hex=hex;this._isBigNumber=true;Object.freeze(this)}fromTwos(value){return toBigNumber(toBN(this).fromTwos(value))}toTwos(value){return toBigNumber(toBN(this).toTwos(value))}abs(){if(this._hex[0]==="-"){return BigNumber.from(this._hex.substring(1))}return this}add(other){return toBigNumber(toBN(this).add(toBN(other)))}sub(other){return toBigNumber(toBN(this).sub(toBN(other)))}div(other){const o=BigNumber.from(other);if(o.isZero()){throwFault("division by zero","div")}return toBigNumber(toBN(this).div(toBN(other)))}mul(other){return toBigNumber(toBN(this).mul(toBN(other)))}mod(other){const value=toBN(other);if(value.isNeg()){throwFault("cannot modulo negative values","mod")}return toBigNumber(toBN(this).umod(value))}pow(other){const value=toBN(other);if(value.isNeg()){throwFault("cannot raise to negative values","pow")}return toBigNumber(toBN(this).pow(value))}and(other){const value=toBN(other);if(this.isNegative()||value.isNeg()){throwFault("cannot 'and' negative values","and")}return toBigNumber(toBN(this).and(value))}or(other){const value=toBN(other);if(this.isNegative()||value.isNeg()){throwFault("cannot 'or' negative values","or")}return toBigNumber(toBN(this).or(value))}xor(other){const value=toBN(other);if(this.isNegative()||value.isNeg()){throwFault("cannot 'xor' negative values","xor")}return toBigNumber(toBN(this).xor(value))}mask(value){if(this.isNegative()||value<0){throwFault("cannot mask negative values","mask")}return toBigNumber(toBN(this).maskn(value))}shl(value){if(this.isNegative()||value<0){throwFault("cannot shift negative values","shl")}return toBigNumber(toBN(this).shln(value))}shr(value){if(this.isNegative()||value<0){throwFault("cannot shift negative values","shr")}return toBigNumber(toBN(this).shrn(value))}eq(other){return toBN(this).eq(toBN(other))}lt(other){return toBN(this).lt(toBN(other))}lte(other){return toBN(this).lte(toBN(other))}gt(other){return toBN(this).gt(toBN(other))}gte(other){return toBN(this).gte(toBN(other))}isNegative(){return this._hex[0]==="-"}isZero(){return toBN(this).isZero()}toNumber(){try{return toBN(this).toNumber()}catch(error){throwFault("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return logger$1.throwError("this platform does not support BigInt",Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){if(arguments.length>0){if(arguments[0]===10){if(!_warnedToStringRadix){_warnedToStringRadix=true;logger$1.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")}}else if(arguments[0]===16){logger$1.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Logger.errors.UNEXPECTED_ARGUMENT,{})}else{logger$1.throwError("BigNumber.toString does not accept parameters",Logger.errors.UNEXPECTED_ARGUMENT,{})}}return toBN(this).toString(10)}toHexString(){return this._hex}toJSON(key){return{type:"BigNumber",hex:this.toHexString()}}static from(value){if(value instanceof BigNumber){return value}if(typeof value==="string"){if(value.match(/^-?0x[0-9a-f]+$/i)){return new BigNumber(_constructorGuard,toHex(value))}if(value.match(/^-?[0-9]+$/)){return new BigNumber(_constructorGuard,toHex(new BN(value)))}return logger$1.throwArgumentError("invalid BigNumber string","value",value)}if(typeof value==="number"){if(value%1){throwFault("underflow","BigNumber.from",value)}if(value>=MAX_SAFE||value<=-MAX_SAFE){throwFault("overflow","BigNumber.from",value)}return BigNumber.from(String(value))}const anyValue=value;if(typeof anyValue==="bigint"){return BigNumber.from(anyValue.toString())}if(isBytes(anyValue)){return BigNumber.from(hexlify(anyValue))}if(anyValue){if(anyValue.toHexString){const hex=anyValue.toHexString();if(typeof hex==="string"){return BigNumber.from(hex)}}else{let hex=anyValue._hex;if(hex==null&&anyValue.type==="BigNumber"){hex=anyValue.hex}if(typeof hex==="string"){if(isHexString(hex)||hex[0]==="-"&&isHexString(hex.substring(1))){return BigNumber.from(hex)}}}}return logger$1.throwArgumentError("invalid BigNumber value","value",value)}static isBigNumber(value){return!!(value&&value._isBigNumber)}}function toHex(value){if(typeof value!=="string"){return toHex(value.toString(16))}if(value[0]==="-"){value=value.substring(1);if(value[0]==="-"){logger$1.throwArgumentError("invalid hex","value",value)}value=toHex(value);if(value==="0x00"){return value}return"-"+value}if(value.substring(0,2)!=="0x"){value="0x"+value}if(value==="0x"){return"0x00"}if(value.length%2){value="0x0"+value.substring(2)}while(value.length>4&&value.substring(0,4)==="0x00"){value="0x"+value.substring(4)}return value}function toBigNumber(value){return BigNumber.from(toHex(value))}function toBN(value){const hex=BigNumber.from(value).toHexString();if(hex[0]==="-"){return new BN("-"+hex.substring(3),16)}return new BN(hex.substring(2),16)}function throwFault(fault,operation,value){const params={fault:fault,operation:operation};if(value!=null){params.value=value}return logger$1.throwError(fault,Logger.errors.NUMERIC_FAULT,params)}function _base36To16(value){return new BN(value,36).toString(16)}function _base16To36(value){return new BN(value,16).toString(36)}"use strict";const logger$2=new Logger(version$2);const _constructorGuard$1={};const Zero=BigNumber.from(0);const NegativeOne=BigNumber.from(-1);function throwFault$1(message,fault,operation,value){const params={fault:fault,operation:operation};if(value!==undefined){params.value=value}return logger$2.throwError(message,Logger.errors.NUMERIC_FAULT,params)}let zeros="0";while(zeros.length<256){zeros+=zeros}function getMultiplier(decimals){if(typeof decimals!=="number"){try{decimals=BigNumber.from(decimals).toNumber()}catch(e){}}if(typeof decimals==="number"&&decimals>=0&&decimals<=256&&!(decimals%1)){return"1"+zeros.substring(0,decimals)}return logger$2.throwArgumentError("invalid decimal size","decimals",decimals)}function formatFixed(value,decimals){if(decimals==null){decimals=0}const multiplier=getMultiplier(decimals);value=BigNumber.from(value);const negative=value.lt(Zero);if(negative){value=value.mul(NegativeOne)}let fraction=value.mod(multiplier).toString();while(fraction.length2){logger$2.throwArgumentError("too many decimal points","value",value)}let whole=comps[0],fraction=comps[1];if(!whole){whole="0"}if(!fraction){fraction="0"}while(fraction[fraction.length-1]==="0"){fraction=fraction.substring(0,fraction.length-1)}if(fraction.length>multiplier.length-1){throwFault$1("fractional component exceeds decimals","underflow","parseFixed")}if(fraction===""){fraction="0"}while(fraction.length{if(value[key]==null){return defaultValue}if(typeof value[key]!==type){logger$2.throwArgumentError("invalid fixed format ("+key+" not "+type+")","format."+key,value[key])}return value[key]};signed=check("signed","boolean",signed);width=check("width","number",width);decimals=check("decimals","number",decimals)}if(width%8){logger$2.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",width)}if(decimals>80){logger$2.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",decimals)}return new FixedFormat(_constructorGuard$1,signed,width,decimals)}}class FixedNumber{constructor(constructorGuard,hex,value,format){logger$2.checkNew(new.target,FixedNumber);if(constructorGuard!==_constructorGuard$1){logger$2.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"})}this.format=format;this._hex=hex;this._value=value;this._isFixedNumber=true;Object.freeze(this)}_checkFormat(other){if(this.format.name!==other.format.name){logger$2.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",other)}}addUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals);const b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.add(b),this.format.decimals,this.format)}subUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals);const b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.sub(b),this.format.decimals,this.format)}mulUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals);const b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals);const b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b),this.format.decimals,this.format)}floor(){const comps=this.toString().split(".");if(comps.length===1){comps.push("0")}let result=FixedNumber.from(comps[0],this.format);const hasFraction=!comps[1].match(/^(0*)$/);if(this.isNegative()&&hasFraction){result=result.subUnsafe(ONE.toFormat(result.format))}return result}ceiling(){const comps=this.toString().split(".");if(comps.length===1){comps.push("0")}let result=FixedNumber.from(comps[0],this.format);const hasFraction=!comps[1].match(/^(0*)$/);if(!this.isNegative()&&hasFraction){result=result.addUnsafe(ONE.toFormat(result.format))}return result}round(decimals){if(decimals==null){decimals=0}const comps=this.toString().split(".");if(comps.length===1){comps.push("0")}if(decimals<0||decimals>80||decimals%1){logger$2.throwArgumentError("invalid decimal count","decimals",decimals)}if(comps[1].length<=decimals){return this}const factor=FixedNumber.from("1"+zeros.substring(0,decimals),this.format);const bump=BUMP.toFormat(this.format);return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(width){if(width==null){return this._hex}if(width%8){logger$2.throwArgumentError("invalid byte width","width",width)}const hex=BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();return hexZeroPad(hex,width/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(format){return FixedNumber.fromString(this._value,format)}static fromValue(value,decimals,format){if(format==null&&decimals!=null&&!isBigNumberish(decimals)){format=decimals;decimals=null}if(decimals==null){decimals=0}if(format==null){format="fixed"}return FixedNumber.fromString(formatFixed(value,decimals),FixedFormat.from(format))}static fromString(value,format){if(format==null){format="fixed"}const fixedFormat=FixedFormat.from(format);const numeric=parseFixed(value,fixedFormat.decimals);if(!fixedFormat.signed&&numeric.lt(Zero)){throwFault$1("unsigned value cannot be negative","overflow","value",value)}let hex=null;if(fixedFormat.signed){hex=numeric.toTwos(fixedFormat.width).toHexString()}else{hex=numeric.toHexString();hex=hexZeroPad(hex,fixedFormat.width/8)}const decimal=formatFixed(numeric,fixedFormat.decimals);return new FixedNumber(_constructorGuard$1,hex,decimal,fixedFormat)}static fromBytes(value,format){if(format==null){format="fixed"}const fixedFormat=FixedFormat.from(format);if(arrayify(value).length>fixedFormat.width/8){throw new Error("overflow")}let numeric=BigNumber.from(value);if(fixedFormat.signed){numeric=numeric.fromTwos(fixedFormat.width)}const hex=numeric.toTwos((fixedFormat.signed?0:1)+fixedFormat.width).toHexString();const decimal=formatFixed(numeric,fixedFormat.decimals);return new FixedNumber(_constructorGuard$1,hex,decimal,fixedFormat)}static from(value,format){if(typeof value==="string"){return FixedNumber.fromString(value,format)}if(isBytes(value)){return FixedNumber.fromBytes(value,format)}try{return FixedNumber.fromValue(value,0,format)}catch(error){if(error.code!==Logger.errors.INVALID_ARGUMENT){throw error}}return logger$2.throwArgumentError("invalid FixedNumber value","value",value)}static isFixedNumber(value){return!!(value&&value._isFixedNumber)}}const ONE=FixedNumber.from(1);const BUMP=FixedNumber.from("0.5");const version$3="properties/5.5.0";"use strict";var __awaiter=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$3=new Logger(version$3);function defineReadOnly(object,name,value){Object.defineProperty(object,name,{enumerable:true,value:value,writable:false})}function getStatic(ctor,key){for(let i=0;i<32;i++){if(ctor[key]){return ctor[key]}if(!ctor.prototype||typeof ctor.prototype!=="object"){break}ctor=Object.getPrototypeOf(ctor.prototype).constructor}return null}function resolveProperties(object){return __awaiter(this,void 0,void 0,function*(){const promises=Object.keys(object).map(key=>{const value=object[key];return Promise.resolve(value).then(v=>({key:key,value:v}))});const results=yield Promise.all(promises);return results.reduce((accum,result)=>{accum[result.key]=result.value;return accum},{})})}function checkProperties(object,properties){if(!object||typeof object!=="object"){logger$3.throwArgumentError("invalid object","object",object)}Object.keys(object).forEach(key=>{if(!properties[key]){logger$3.throwArgumentError("invalid object key - "+key,"transaction:"+key,object)}})}function shallowCopy(object){const result={};for(const key in object){result[key]=object[key]}return result}const opaque={bigint:true,boolean:true,function:true,number:true,string:true};function _isFrozen(object){if(object===undefined||object===null||opaque[typeof object]){return true}if(Array.isArray(object)||typeof object==="object"){if(!Object.isFrozen(object)){return false}const keys=Object.keys(object);for(let i=0;ideepCopy(item)))}if(typeof object==="object"){const result={};for(const key in object){const value=object[key];if(value===undefined){continue}defineReadOnly(result,key,deepCopy(value))}return result}return logger$3.throwArgumentError(`Cannot deepCopy ${typeof object}`,"object",object)}function deepCopy(object){return _deepCopy(object)}class Description{constructor(info){for(const key in info){this[key]=deepCopy(info[key])}}}const version$4="abi/5.5.0";"use strict";const logger$4=new Logger(version$4);const _constructorGuard$2={};let ModifiersBytes={calldata:true,memory:true,storage:true};let ModifiersNest={calldata:true,memory:true};function checkModifier(type,name){if(type==="bytes"||type==="string"){if(ModifiersBytes[name]){return true}}else if(type==="address"){if(name==="payable"){return true}}else if(type.indexOf("[")>=0||type==="tuple"){if(ModifiersNest[name]){return true}}if(ModifiersBytes[name]||name==="payable"){logger$4.throwArgumentError("invalid modifier","name",name)}return false}function parseParamType(param,allowIndexed){let originalParam=param;function throwError(i){logger$4.throwArgumentError(`unexpected character at position ${i}`,"param",param)}param=param.replace(/\s/g," ");function newNode(parent){let node={type:"",name:"",parent:parent,state:{allowType:true}};if(allowIndexed){node.indexed=false}return node}let parent={type:"",name:"",state:{allowType:true}};let node=parent;for(let i=0;iJSON.parse(comp.format(format)))}return JSON.stringify(result)}let result="";if(this.baseType==="array"){result+=this.arrayChildren.format(format);result+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"}else{if(this.baseType==="tuple"){if(format!==FormatTypes.sighash){result+=this.type}result+="("+this.components.map(comp=>comp.format(format)).join(format===FormatTypes.full?", ":",")+")"}else{result+=this.type}}if(format!==FormatTypes.sighash){if(this.indexed===true){result+=" indexed"}if(format===FormatTypes.full&&this.name){result+=" "+this.name}}return result}static from(value,allowIndexed){if(typeof value==="string"){return ParamType.fromString(value,allowIndexed)}return ParamType.fromObject(value)}static fromObject(value){if(ParamType.isParamType(value)){return value}return new ParamType(_constructorGuard$2,{name:value.name||null,type:verifyType(value.type),indexed:value.indexed==null?null:!!value.indexed,components:value.components?value.components.map(ParamType.fromObject):null})}static fromString(value,allowIndexed){function ParamTypify(node){return ParamType.fromObject({name:node.name,type:node.type,indexed:node.indexed,components:node.components})}return ParamTypify(parseParamType(value,!!allowIndexed))}static isParamType(value){return!!(value!=null&&value._isParamType)}}function parseParams(value,allowIndex){return splitNesting(value).map(param=>ParamType.fromString(param,allowIndex))}class Fragment{constructor(constructorGuard,params){if(constructorGuard!==_constructorGuard$2){logger$4.throwError("use a static from method",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"})}populate(this,params);this._isFragment=true;Object.freeze(this)}static from(value){if(Fragment.isFragment(value)){return value}if(typeof value==="string"){return Fragment.fromString(value)}return Fragment.fromObject(value)}static fromObject(value){if(Fragment.isFragment(value)){return value}switch(value.type){case"function":return FunctionFragment.fromObject(value);case"event":return EventFragment.fromObject(value);case"constructor":return ConstructorFragment.fromObject(value);case"error":return ErrorFragment.fromObject(value);case"fallback":case"receive":return null}return logger$4.throwArgumentError("invalid fragment object","value",value)}static fromString(value){value=value.replace(/\s/g," ");value=value.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ");value=value.trim();if(value.split(" ")[0]==="event"){return EventFragment.fromString(value.substring(5).trim())}else if(value.split(" ")[0]==="function"){return FunctionFragment.fromString(value.substring(8).trim())}else if(value.split("(")[0].trim()==="constructor"){return ConstructorFragment.fromString(value.trim())}else if(value.split(" ")[0]==="error"){return ErrorFragment.fromString(value.substring(5).trim())}return logger$4.throwArgumentError("unsupported fragment","value",value)}static isFragment(value){return!!(value&&value._isFragment)}}class EventFragment extends Fragment{format(format){if(!format){format=FormatTypes.sighash}if(!FormatTypes[format]){logger$4.throwArgumentError("invalid format type","format",format)}if(format===FormatTypes.json){return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(format)))})}let result="";if(format!==FormatTypes.sighash){result+="event "}result+=this.name+"("+this.inputs.map(input=>input.format(format)).join(format===FormatTypes.full?", ":",")+") ";if(format!==FormatTypes.sighash){if(this.anonymous){result+="anonymous "}}return result.trim()}static from(value){if(typeof value==="string"){return EventFragment.fromString(value)}return EventFragment.fromObject(value)}static fromObject(value){if(EventFragment.isEventFragment(value)){return value}if(value.type!=="event"){logger$4.throwArgumentError("invalid event object","value",value)}const params={name:verifyIdentifier(value.name),anonymous:value.anonymous,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],type:"event"};return new EventFragment(_constructorGuard$2,params)}static fromString(value){let match=value.match(regexParen);if(!match){logger$4.throwArgumentError("invalid event string","value",value)}let anonymous=false;match[3].split(" ").forEach(modifier=>{switch(modifier.trim()){case"anonymous":anonymous=true;break;case"":break;default:logger$4.warn("unknown modifier: "+modifier)}});return EventFragment.fromObject({name:match[1].trim(),anonymous:anonymous,inputs:parseParams(match[2],true),type:"event"})}static isEventFragment(value){return value&&value._isFragment&&value.type==="event"}}function parseGas(value,params){params.gas=null;let comps=value.split("@");if(comps.length!==1){if(comps.length>2){logger$4.throwArgumentError("invalid human-readable ABI signature","value",value)}if(!comps[1].match(/^[0-9]+$/)){logger$4.throwArgumentError("invalid human-readable ABI signature gas","value",value)}params.gas=BigNumber.from(comps[1]);return comps[0]}return value}function parseModifiers(value,params){params.constant=false;params.payable=false;params.stateMutability="nonpayable";value.split(" ").forEach(modifier=>{switch(modifier.trim()){case"constant":params.constant=true;break;case"payable":params.payable=true;params.stateMutability="payable";break;case"nonpayable":params.payable=false;params.stateMutability="nonpayable";break;case"pure":params.constant=true;params.stateMutability="pure";break;case"view":params.constant=true;params.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+modifier)}})}function verifyState(value){let result={constant:false,payable:true,stateMutability:"payable"};if(value.stateMutability!=null){result.stateMutability=value.stateMutability;result.constant=result.stateMutability==="view"||result.stateMutability==="pure";if(value.constant!=null){if(!!value.constant!==result.constant){logger$4.throwArgumentError("cannot have constant function with mutability "+result.stateMutability,"value",value)}}result.payable=result.stateMutability==="payable";if(value.payable!=null){if(!!value.payable!==result.payable){logger$4.throwArgumentError("cannot have payable function with mutability "+result.stateMutability,"value",value)}}}else if(value.payable!=null){result.payable=!!value.payable;if(value.constant==null&&!result.payable&&value.type!=="constructor"){logger$4.throwArgumentError("unable to determine stateMutability","value",value)}result.constant=!!value.constant;if(result.constant){result.stateMutability="view"}else{result.stateMutability=result.payable?"payable":"nonpayable"}if(result.payable&&result.constant){logger$4.throwArgumentError("cannot have constant payable function","value",value)}}else if(value.constant!=null){result.constant=!!value.constant;result.payable=!result.constant;result.stateMutability=result.constant?"view":"payable"}else if(value.type!=="constructor"){logger$4.throwArgumentError("unable to determine stateMutability","value",value)}return result}class ConstructorFragment extends Fragment{format(format){if(!format){format=FormatTypes.sighash}if(!FormatTypes[format]){logger$4.throwArgumentError("invalid format type","format",format)}if(format===FormatTypes.json){return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map(input=>JSON.parse(input.format(format)))})}if(format===FormatTypes.sighash){logger$4.throwError("cannot format a constructor for sighash",Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"})}let result="constructor("+this.inputs.map(input=>input.format(format)).join(format===FormatTypes.full?", ":",")+") ";if(this.stateMutability&&this.stateMutability!=="nonpayable"){result+=this.stateMutability+" "}return result.trim()}static from(value){if(typeof value==="string"){return ConstructorFragment.fromString(value)}return ConstructorFragment.fromObject(value)}static fromObject(value){if(ConstructorFragment.isConstructorFragment(value)){return value}if(value.type!=="constructor"){logger$4.throwArgumentError("invalid constructor object","value",value)}let state=verifyState(value);if(state.constant){logger$4.throwArgumentError("constructor cannot be constant","value",value)}const params={name:null,type:value.type,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],payable:state.payable,stateMutability:state.stateMutability,gas:value.gas?BigNumber.from(value.gas):null};return new ConstructorFragment(_constructorGuard$2,params)}static fromString(value){let params={type:"constructor"};value=parseGas(value,params);let parens=value.match(regexParen);if(!parens||parens[1].trim()!=="constructor"){logger$4.throwArgumentError("invalid constructor string","value",value)}params.inputs=parseParams(parens[2].trim(),false);parseModifiers(parens[3].trim(),params);return ConstructorFragment.fromObject(params)}static isConstructorFragment(value){return value&&value._isFragment&&value.type==="constructor"}}class FunctionFragment extends ConstructorFragment{format(format){if(!format){format=FormatTypes.sighash}if(!FormatTypes[format]){logger$4.throwArgumentError("invalid format type","format",format)}if(format===FormatTypes.json){return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map(input=>JSON.parse(input.format(format))),outputs:this.outputs.map(output=>JSON.parse(output.format(format)))})}let result="";if(format!==FormatTypes.sighash){result+="function "}result+=this.name+"("+this.inputs.map(input=>input.format(format)).join(format===FormatTypes.full?", ":",")+") ";if(format!==FormatTypes.sighash){if(this.stateMutability){if(this.stateMutability!=="nonpayable"){result+=this.stateMutability+" "}}else if(this.constant){result+="view "}if(this.outputs&&this.outputs.length){result+="returns ("+this.outputs.map(output=>output.format(format)).join(", ")+") "}if(this.gas!=null){result+="@"+this.gas.toString()+" "}}return result.trim()}static from(value){if(typeof value==="string"){return FunctionFragment.fromString(value)}return FunctionFragment.fromObject(value)}static fromObject(value){if(FunctionFragment.isFunctionFragment(value)){return value}if(value.type!=="function"){logger$4.throwArgumentError("invalid function object","value",value)}let state=verifyState(value);const params={type:value.type,name:verifyIdentifier(value.name),constant:state.constant,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],outputs:value.outputs?value.outputs.map(ParamType.fromObject):[],payable:state.payable,stateMutability:state.stateMutability,gas:value.gas?BigNumber.from(value.gas):null};return new FunctionFragment(_constructorGuard$2,params)}static fromString(value){let params={type:"function"};value=parseGas(value,params);let comps=value.split(" returns ");if(comps.length>2){logger$4.throwArgumentError("invalid function string","value",value)}let parens=comps[0].match(regexParen);if(!parens){logger$4.throwArgumentError("invalid function signature","value",value)}params.name=parens[1].trim();if(params.name){verifyIdentifier(params.name)}params.inputs=parseParams(parens[2],false);parseModifiers(parens[3].trim(),params);if(comps.length>1){let returns=comps[1].match(regexParen);if(returns[1].trim()!=""||returns[3].trim()!=""){logger$4.throwArgumentError("unexpected tokens","value",value)}params.outputs=parseParams(returns[2],false)}else{params.outputs=[]}return FunctionFragment.fromObject(params)}static isFunctionFragment(value){return value&&value._isFragment&&value.type==="function"}}function checkForbidden(fragment){const sig=fragment.format();if(sig==="Error(string)"||sig==="Panic(uint256)"){logger$4.throwArgumentError(`cannot specify user defined ${sig} error`,"fragment",fragment)}return fragment}class ErrorFragment extends Fragment{format(format){if(!format){format=FormatTypes.sighash}if(!FormatTypes[format]){logger$4.throwArgumentError("invalid format type","format",format)}if(format===FormatTypes.json){return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(format)))})}let result="";if(format!==FormatTypes.sighash){result+="error "}result+=this.name+"("+this.inputs.map(input=>input.format(format)).join(format===FormatTypes.full?", ":",")+") ";return result.trim()}static from(value){if(typeof value==="string"){return ErrorFragment.fromString(value)}return ErrorFragment.fromObject(value)}static fromObject(value){if(ErrorFragment.isErrorFragment(value)){return value}if(value.type!=="error"){logger$4.throwArgumentError("invalid error object","value",value)}const params={type:value.type,name:verifyIdentifier(value.name),inputs:value.inputs?value.inputs.map(ParamType.fromObject):[]};return checkForbidden(new ErrorFragment(_constructorGuard$2,params))}static fromString(value){let params={type:"error"};let parens=value.match(regexParen);if(!parens){logger$4.throwArgumentError("invalid error signature","value",value)}params.name=parens[1].trim();if(params.name){verifyIdentifier(params.name)}params.inputs=parseParams(parens[2],false);return checkForbidden(ErrorFragment.fromObject(params))}static isErrorFragment(value){return value&&value._isFragment&&value.type==="error"}}function verifyType(type){if(type.match(/^uint($|[^1-9])/)){type="uint256"+type.substring(4)}else if(type.match(/^int($|[^1-9])/)){type="int256"+type.substring(3)}return type}const regexIdentifier=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(value){if(!value||!value.match(regexIdentifier)){logger$4.throwArgumentError(`invalid identifier "${value}"`,"value",value)}return value}const regexParen=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function splitNesting(value){value=value.trim();let result=[];let accum="";let depth=0;for(let offset=0;offsetthis.wordSize){logger$5.throwError("value out-of-bounds",Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:bytes.length})}if(bytes.length%this.wordSize){bytes=concat([this._padding.slice(bytes.length%this.wordSize),bytes])}return bytes}writeValue(value){return this._writeData(this._getValue(value))}writeUpdatableValue(){const offset=this._data.length;this._data.push(this._padding);this._dataLength+=this.wordSize;return value=>{this._data[offset]=this._getValue(value)}}}class Reader{constructor(data,wordSize,coerceFunc,allowLoose){defineReadOnly(this,"_data",arrayify(data));defineReadOnly(this,"wordSize",wordSize||32);defineReadOnly(this,"_coerceFunc",coerceFunc);defineReadOnly(this,"allowLoose",allowLoose);this._offset=0}get data(){return hexlify(this._data)}get consumed(){return this._offset}static coerce(name,value){let match=name.match("^u?int([0-9]+)$");if(match&&parseInt(match[1])<=48){value=value.toNumber()}return value}coerce(name,value){if(this._coerceFunc){return this._coerceFunc(name,value)}return Reader.coerce(name,value)}_peekBytes(offset,length,loose){let alignedLength=Math.ceil(length/this.wordSize)*this.wordSize;if(this._offset+alignedLength>this._data.length){if(this.allowLoose&&loose&&this._offset+length<=this._data.length){alignedLength=length}else{logger$5.throwError("data out-of-bounds",Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+alignedLength})}}return this._data.slice(this._offset,this._offset+alignedLength)}subReader(offset){return new Reader(this._data.slice(this._offset+offset),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(length,loose){let bytes=this._peekBytes(0,length,!!loose);this._offset+=bytes.length;return bytes.slice(0,length)}readValue(){return BigNumber.from(this.readBytes(this.wordSize))}}var sha3=createCommonjsModule(function(module){(function(){"use strict";var INPUT_ERROR="input is invalid type";var FINALIZE_ERROR="finalize already called";var WINDOW=typeof window==="object";var root=WINDOW?window:{};if(root.JS_SHA3_NO_WINDOW){WINDOW=false}var WEB_WORKER=!WINDOW&&typeof self==="object";var NODE_JS=!root.JS_SHA3_NO_NODE_JS&&typeof process==="object"&&process.versions&&process.versions.node;if(NODE_JS){root=commonjsGlobal}else if(WEB_WORKER){root=self}var COMMON_JS=!root.JS_SHA3_NO_COMMON_JS&&"object"==="object"&&module.exports;var AMD=typeof undefined==="function"&&undefined.amd;var ARRAY_BUFFER=!root.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=="undefined";var HEX_CHARS="0123456789abcdef".split("");var SHAKE_PADDING=[31,7936,2031616,520093696];var CSHAKE_PADDING=[4,1024,262144,67108864];var KECCAK_PADDING=[1,256,65536,16777216];var PADDING=[6,1536,393216,100663296];var SHIFT=[0,8,16,24];var RC=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];var BITS=[224,256,384,512];var SHAKE_BITS=[128,256];var OUTPUT_TYPES=["hex","buffer","arrayBuffer","array","digest"];var CSHAKE_BYTEPAD={128:168,256:136};if(root.JS_SHA3_NO_NODE_JS||!Array.isArray){Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"}}if(ARRAY_BUFFER&&(root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(obj){return typeof obj==="object"&&obj.buffer&&obj.buffer.constructor===ArrayBuffer}}var createOutputMethod=function(bits,padding,outputType){return function(message){return new Keccak(bits,padding,bits).update(message)[outputType]()}};var createShakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits){return new Keccak(bits,padding,outputBits).update(message)[outputType]()}};var createCshakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits,n,s){return methods["cshake"+bits].update(message,outputBits,n,s)[outputType]()}};var createKmacOutputMethod=function(bits,padding,outputType){return function(key,message,outputBits,s){return methods["kmac"+bits].update(key,message,outputBits,s)[outputType]()}};var createOutputMethods=function(method,createMethod,bits,padding){for(var i=0;i>5;this.byteCount=this.blockCount<<2;this.outputBlocks=outputBits>>5;this.extraBytes=(outputBits&31)>>3;for(var i=0;i<50;++i){this.s[i]=0}}Keccak.prototype.update=function(message){if(this.finalized){throw new Error(FINALIZE_ERROR)}var notString,type=typeof message;if(type!=="string"){if(type==="object"){if(message===null){throw new Error(INPUT_ERROR)}else if(ARRAY_BUFFER&&message.constructor===ArrayBuffer){message=new Uint8Array(message)}else if(!Array.isArray(message)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(message)){throw new Error(INPUT_ERROR)}}}else{throw new Error(INPUT_ERROR)}notString=true}var blocks=this.blocks,byteCount=this.byteCount,length=message.length,blockCount=this.blockCount,index=0,s=this.s,i,code;while(index>2]|=message[index]<>2]|=code<>2]|=(192|code>>6)<>2]|=(128|code&63)<=57344){blocks[i>>2]|=(224|code>>12)<>2]|=(128|code>>6&63)<>2]|=(128|code&63)<>2]|=(240|code>>18)<>2]|=(128|code>>12&63)<>2]|=(128|code>>6&63)<>2]|=(128|code&63)<=byteCount){this.start=i-byteCount;this.block=blocks[blockCount];for(i=0;i>8;o=x&255;while(o>0){bytes.unshift(o);x=x>>8;o=x&255;++n}if(right){bytes.push(n)}else{bytes.unshift(n)}this.update(bytes);return bytes.length};Keccak.prototype.encodeString=function(str){var notString,type=typeof str;if(type!=="string"){if(type==="object"){if(str===null){throw new Error(INPUT_ERROR)}else if(ARRAY_BUFFER&&str.constructor===ArrayBuffer){str=new Uint8Array(str)}else if(!Array.isArray(str)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(str)){throw new Error(INPUT_ERROR)}}}else{throw new Error(INPUT_ERROR)}notString=true}var bytes=0,length=str.length;if(notString){bytes=length}else{for(var i=0;i=57344){bytes+=3}else{code=65536+((code&1023)<<10|str.charCodeAt(++i)&1023);bytes+=4}}}bytes+=this.encode(bytes*8);this.update(str);return bytes};Keccak.prototype.bytepad=function(strs,w){var bytes=this.encode(w);for(var i=0;i>2]|=this.padding[i&3];if(this.lastByteIndex===this.byteCount){blocks[0]=blocks[blockCount];for(i=1;i>4&15]+HEX_CHARS[block&15]+HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]+HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]+HEX_CHARS[block>>28&15]+HEX_CHARS[block>>24&15]}if(j%blockCount===0){f(s);i=0}}if(extraBytes){block=s[i];hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[block&15];if(extraBytes>1){hex+=HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]}if(extraBytes>2){hex+=HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]}}return hex};Keccak.prototype.arrayBuffer=function(){this.finalize();var blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0;var bytes=this.outputBits>>3;var buffer;if(extraBytes){buffer=new ArrayBuffer(outputBlocks+1<<2)}else{buffer=new ArrayBuffer(bytes)}var array=new Uint32Array(buffer);while(j>8&255;array[offset+2]=block>>16&255;array[offset+3]=block>>24&255}if(j%blockCount===0){f(s)}}if(extraBytes){offset=j<<2;block=s[i];array[offset]=block&255;if(extraBytes>1){array[offset+1]=block>>8&255}if(extraBytes>2){array[offset+2]=block>>16&255}}return array};function Kmac(bits,padding,outputBits){Keccak.call(this,bits,padding,outputBits)}Kmac.prototype=new Keccak;Kmac.prototype.finalize=function(){this.encode(this.outputBits,true);return Keccak.prototype.finalize.call(this)};var f=function(s){var h,l,n,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b44,b45,b46,b47,b48,b49;for(n=0;n<48;n+=2){c0=s[0]^s[10]^s[20]^s[30]^s[40];c1=s[1]^s[11]^s[21]^s[31]^s[41];c2=s[2]^s[12]^s[22]^s[32]^s[42];c3=s[3]^s[13]^s[23]^s[33]^s[43];c4=s[4]^s[14]^s[24]^s[34]^s[44];c5=s[5]^s[15]^s[25]^s[35]^s[45];c6=s[6]^s[16]^s[26]^s[36]^s[46];c7=s[7]^s[17]^s[27]^s[37]^s[47];c8=s[8]^s[18]^s[28]^s[38]^s[48];c9=s[9]^s[19]^s[29]^s[39]^s[49];h=c8^(c2<<1|c3>>>31);l=c9^(c3<<1|c2>>>31);s[0]^=h;s[1]^=l;s[10]^=h;s[11]^=l;s[20]^=h;s[21]^=l;s[30]^=h;s[31]^=l;s[40]^=h;s[41]^=l;h=c0^(c4<<1|c5>>>31);l=c1^(c5<<1|c4>>>31);s[2]^=h;s[3]^=l;s[12]^=h;s[13]^=l;s[22]^=h;s[23]^=l;s[32]^=h;s[33]^=l;s[42]^=h;s[43]^=l;h=c2^(c6<<1|c7>>>31);l=c3^(c7<<1|c6>>>31);s[4]^=h;s[5]^=l;s[14]^=h;s[15]^=l;s[24]^=h;s[25]^=l;s[34]^=h;s[35]^=l;s[44]^=h;s[45]^=l;h=c4^(c8<<1|c9>>>31);l=c5^(c9<<1|c8>>>31);s[6]^=h;s[7]^=l;s[16]^=h;s[17]^=l;s[26]^=h;s[27]^=l;s[36]^=h;s[37]^=l;s[46]^=h;s[47]^=l;h=c6^(c0<<1|c1>>>31);l=c7^(c1<<1|c0>>>31);s[8]^=h;s[9]^=l;s[18]^=h;s[19]^=l;s[28]^=h;s[29]^=l;s[38]^=h;s[39]^=l;s[48]^=h;s[49]^=l;b0=s[0];b1=s[1];b32=s[11]<<4|s[10]>>>28;b33=s[10]<<4|s[11]>>>28;b14=s[20]<<3|s[21]>>>29;b15=s[21]<<3|s[20]>>>29;b46=s[31]<<9|s[30]>>>23;b47=s[30]<<9|s[31]>>>23;b28=s[40]<<18|s[41]>>>14;b29=s[41]<<18|s[40]>>>14;b20=s[2]<<1|s[3]>>>31;b21=s[3]<<1|s[2]>>>31;b2=s[13]<<12|s[12]>>>20;b3=s[12]<<12|s[13]>>>20;b34=s[22]<<10|s[23]>>>22;b35=s[23]<<10|s[22]>>>22;b16=s[33]<<13|s[32]>>>19;b17=s[32]<<13|s[33]>>>19;b48=s[42]<<2|s[43]>>>30;b49=s[43]<<2|s[42]>>>30;b40=s[5]<<30|s[4]>>>2;b41=s[4]<<30|s[5]>>>2;b22=s[14]<<6|s[15]>>>26;b23=s[15]<<6|s[14]>>>26;b4=s[25]<<11|s[24]>>>21;b5=s[24]<<11|s[25]>>>21;b36=s[34]<<15|s[35]>>>17;b37=s[35]<<15|s[34]>>>17;b18=s[45]<<29|s[44]>>>3;b19=s[44]<<29|s[45]>>>3;b10=s[6]<<28|s[7]>>>4;b11=s[7]<<28|s[6]>>>4;b42=s[17]<<23|s[16]>>>9;b43=s[16]<<23|s[17]>>>9;b24=s[26]<<25|s[27]>>>7;b25=s[27]<<25|s[26]>>>7;b6=s[36]<<21|s[37]>>>11;b7=s[37]<<21|s[36]>>>11;b38=s[47]<<24|s[46]>>>8;b39=s[46]<<24|s[47]>>>8;b30=s[8]<<27|s[9]>>>5;b31=s[9]<<27|s[8]>>>5;b12=s[18]<<20|s[19]>>>12;b13=s[19]<<20|s[18]>>>12;b44=s[29]<<7|s[28]>>>25;b45=s[28]<<7|s[29]>>>25;b26=s[38]<<8|s[39]>>>24;b27=s[39]<<8|s[38]>>>24;b8=s[48]<<14|s[49]>>>18;b9=s[49]<<14|s[48]>>>18;s[0]=b0^~b2&b4;s[1]=b1^~b3&b5;s[10]=b10^~b12&b14;s[11]=b11^~b13&b15;s[20]=b20^~b22&b24;s[21]=b21^~b23&b25;s[30]=b30^~b32&b34;s[31]=b31^~b33&b35;s[40]=b40^~b42&b44;s[41]=b41^~b43&b45;s[2]=b2^~b4&b6;s[3]=b3^~b5&b7;s[12]=b12^~b14&b16;s[13]=b13^~b15&b17;s[22]=b22^~b24&b26;s[23]=b23^~b25&b27;s[32]=b32^~b34&b36;s[33]=b33^~b35&b37;s[42]=b42^~b44&b46;s[43]=b43^~b45&b47;s[4]=b4^~b6&b8;s[5]=b5^~b7&b9;s[14]=b14^~b16&b18;s[15]=b15^~b17&b19;s[24]=b24^~b26&b28;s[25]=b25^~b27&b29;s[34]=b34^~b36&b38;s[35]=b35^~b37&b39;s[44]=b44^~b46&b48;s[45]=b45^~b47&b49;s[6]=b6^~b8&b0;s[7]=b7^~b9&b1;s[16]=b16^~b18&b10;s[17]=b17^~b19&b11;s[26]=b26^~b28&b20;s[27]=b27^~b29&b21;s[36]=b36^~b38&b30;s[37]=b37^~b39&b31;s[46]=b46^~b48&b40;s[47]=b47^~b49&b41;s[8]=b8^~b0&b2;s[9]=b9^~b1&b3;s[18]=b18^~b10&b12;s[19]=b19^~b11&b13;s[28]=b28^~b20&b22;s[29]=b29^~b21&b23;s[38]=b38^~b30&b32;s[39]=b39^~b31&b33;s[48]=b48^~b40&b42;s[49]=b49^~b41&b43;s[0]^=RC[n];s[1]^=RC[n+1]}};if(COMMON_JS){module.exports=methods}else{for(i=0;i>=8}return result}function unarrayifyInteger(data,offset,length){let result=0;for(let i=0;ioffset+1+length){logger$6.throwError("child data too short",Logger.errors.BUFFER_OVERRUN,{})}}return{consumed:1+length,result:result}}function _decode(data,offset){if(data.length===0){logger$6.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{})}if(data[offset]>=248){const lengthLength=data[offset]-247;if(offset+1+lengthLength>data.length){logger$6.throwError("data short segment too short",Logger.errors.BUFFER_OVERRUN,{})}const length=unarrayifyInteger(data,offset+1,lengthLength);if(offset+1+lengthLength+length>data.length){logger$6.throwError("data long segment too short",Logger.errors.BUFFER_OVERRUN,{})}return _decodeChildren(data,offset,offset+1+lengthLength,lengthLength+length)}else if(data[offset]>=192){const length=data[offset]-192;if(offset+1+length>data.length){logger$6.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{})}return _decodeChildren(data,offset,offset+1,length)}else if(data[offset]>=184){const lengthLength=data[offset]-183;if(offset+1+lengthLength>data.length){logger$6.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{})}const length=unarrayifyInteger(data,offset+1,lengthLength);if(offset+1+lengthLength+length>data.length){logger$6.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{})}const result=hexlify(data.slice(offset+1+lengthLength,offset+1+lengthLength+length));return{consumed:1+lengthLength+length,result:result}}else if(data[offset]>=128){const length=data[offset]-128;if(offset+1+length>data.length){logger$6.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{})}const result=hexlify(data.slice(offset+1,offset+1+length));return{consumed:1+length,result:result}}return{consumed:1,result:hexlify(data[offset])}}function decode(data){const bytes=arrayify(data);const decoded=_decode(bytes,0);if(decoded.consumed!==bytes.length){logger$6.throwArgumentError("invalid rlp data","data",data)}return decoded.result}var index=Object.freeze({__proto__:null,encode:encode,decode:decode});const version$6="address/5.5.0";"use strict";const logger$7=new Logger(version$6);function getChecksumAddress(address){if(!isHexString(address,20)){logger$7.throwArgumentError("invalid address","address",address)}address=address.toLowerCase();const chars=address.substring(2).split("");const expanded=new Uint8Array(40);for(let i=0;i<40;i++){expanded[i]=chars[i].charCodeAt(0)}const hashed=arrayify(keccak256(expanded));for(let i=0;i<40;i+=2){if(hashed[i>>1]>>4>=8){chars[i]=chars[i].toUpperCase()}if((hashed[i>>1]&15)>=8){chars[i+1]=chars[i+1].toUpperCase()}}return"0x"+chars.join("")}const MAX_SAFE_INTEGER=9007199254740991;function log10(x){if(Math.log10){return Math.log10(x)}return Math.log(x)/Math.LN10}const ibanLookup={};for(let i=0;i<10;i++){ibanLookup[String(i)]=String(i)}for(let i=0;i<26;i++){ibanLookup[String.fromCharCode(65+i)]=String(10+i)}const safeDigits=Math.floor(log10(MAX_SAFE_INTEGER));function ibanChecksum(address){address=address.toUpperCase();address=address.substring(4)+address.substring(0,2)+"00";let expanded=address.split("").map(c=>{return ibanLookup[c]}).join("");while(expanded.length>=safeDigits){let block=expanded.substring(0,safeDigits);expanded=parseInt(block,10)%97+expanded.substring(block.length)}let checksum=String(98-parseInt(expanded,10)%97);while(checksum.length<2){checksum="0"+checksum}return checksum}function getAddress(address){let result=null;if(typeof address!=="string"){logger$7.throwArgumentError("invalid address","address",address)}if(address.match(/^(0x)?[0-9a-fA-F]{40}$/)){if(address.substring(0,2)!=="0x"){address="0x"+address}result=getChecksumAddress(address);if(address.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&result!==address){logger$7.throwArgumentError("bad address checksum","address",address)}}else if(address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){if(address.substring(2,4)!==ibanChecksum(address)){logger$7.throwArgumentError("bad icap checksum","address",address)}result=_base36To16(address.substring(4));while(result.length<40){result="0"+result}result=getChecksumAddress("0x"+result)}else{logger$7.throwArgumentError("invalid address","address",address)}return result}function isAddress(address){try{getAddress(address);return true}catch(error){}return false}function getIcapAddress(address){let base36=_base16To36(getAddress(address).substring(2)).toUpperCase();while(base36.length<30){base36="0"+base36}return"XE"+ibanChecksum("XE00"+base36)+base36}function getContractAddress(transaction){let from=null;try{from=getAddress(transaction.from)}catch(error){logger$7.throwArgumentError("missing from address","transaction",transaction)}const nonce=stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));return getAddress(hexDataSlice(keccak256(encode([from,nonce])),12))}function getCreate2Address(from,salt,initCodeHash){if(hexDataLength(salt)!==32){logger$7.throwArgumentError("salt must be 32 bytes","salt",salt)}if(hexDataLength(initCodeHash)!==32){logger$7.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",initCodeHash)}return getAddress(hexDataSlice(keccak256(concat(["0xff",getAddress(from),salt,initCodeHash])),12))}"use strict";class AddressCoder extends Coder{constructor(localName){super("address","address",localName,false)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(writer,value){try{value=getAddress(value)}catch(error){this._throwError(error.message,value)}return writer.writeValue(value)}decode(reader){return getAddress(hexZeroPad(reader.readValue().toHexString(),20))}}"use strict";class AnonymousCoder extends Coder{constructor(coder){super(coder.name,coder.type,undefined,coder.dynamic);this.coder=coder}defaultValue(){return this.coder.defaultValue()}encode(writer,value){return this.coder.encode(writer,value)}decode(reader){return this.coder.decode(reader)}}"use strict";const logger$8=new Logger(version$4);function pack(writer,coders,values){let arrayValues=null;if(Array.isArray(values)){arrayValues=values}else if(values&&typeof values==="object"){let unique={};arrayValues=coders.map(coder=>{const name=coder.localName;if(!name){logger$8.throwError("cannot encode object for signature with missing names",Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:coder,value:values})}if(unique[name]){logger$8.throwError("cannot encode object for signature with duplicate names",Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:coder,value:values})}unique[name]=true;return values[name]})}else{logger$8.throwArgumentError("invalid tuple value","tuple",values)}if(coders.length!==arrayValues.length){logger$8.throwArgumentError("types/value length mismatch","tuple",values)}let staticWriter=new Writer(writer.wordSize);let dynamicWriter=new Writer(writer.wordSize);let updateFuncs=[];coders.forEach((coder,index)=>{let value=arrayValues[index];if(coder.dynamic){let dynamicOffset=dynamicWriter.length;coder.encode(dynamicWriter,value);let updateFunc=staticWriter.writeUpdatableValue();updateFuncs.push(baseOffset=>{updateFunc(baseOffset+dynamicOffset)})}else{coder.encode(staticWriter,value)}});updateFuncs.forEach(func=>{func(staticWriter.length)});let length=writer.appendWriter(staticWriter);length+=writer.appendWriter(dynamicWriter);return length}function unpack(reader,coders){let values=[];let baseReader=reader.subReader(0);coders.forEach(coder=>{let value=null;if(coder.dynamic){let offset=reader.readValue();let offsetReader=baseReader.subReader(offset.toNumber());try{value=coder.decode(offsetReader)}catch(error){if(error.code===Logger.errors.BUFFER_OVERRUN){throw error}value=error;value.baseType=coder.name;value.name=coder.localName;value.type=coder.type}}else{try{value=coder.decode(reader)}catch(error){if(error.code===Logger.errors.BUFFER_OVERRUN){throw error}value=error;value.baseType=coder.name;value.name=coder.localName;value.type=coder.type}}if(value!=undefined){values.push(value)}});const uniqueNames=coders.reduce((accum,coder)=>{const name=coder.localName;if(name){if(!accum[name]){accum[name]=0}accum[name]++}return accum},{});coders.forEach((coder,index)=>{let name=coder.localName;if(!name||uniqueNames[name]!==1){return}if(name==="length"){name="_length"}if(values[name]!=null){return}const value=values[index];if(value instanceof Error){Object.defineProperty(values,name,{enumerable:true,get:()=>{throw value}})}else{values[name]=value}});for(let i=0;i{throw value}})}}return Object.freeze(values)}class ArrayCoder extends Coder{constructor(coder,length,localName){const type=coder.type+"["+(length>=0?length:"")+"]";const dynamic=length===-1||coder.dynamic;super("array",type,localName,dynamic);this.coder=coder;this.length=length}defaultValue(){const defaultChild=this.coder.defaultValue();const result=[];for(let i=0;ireader._data.length){logger$8.throwError("insufficient data length",Logger.errors.BUFFER_OVERRUN,{length:reader._data.length,count:count})}}let coders=[];for(let i=0;i>6!==2){break}i++}return i}if(reason===Utf8ErrorReason.OVERRUN){return bytes.length-offset-1}return 0}function replaceFunc(reason,offset,bytes,output,badCodepoint){if(reason===Utf8ErrorReason.OVERLONG){output.push(badCodepoint);return 0}output.push(65533);return ignoreFunc(reason,offset,bytes,output,badCodepoint)}const Utf8ErrorFuncs=Object.freeze({error:errorFunc,ignore:ignoreFunc,replace:replaceFunc});function getUtf8CodePoints(bytes,onError){if(onError==null){onError=Utf8ErrorFuncs.error}bytes=arrayify(bytes);const result=[];let i=0;while(i>7===0){result.push(c);continue}let extraLength=null;let overlongMask=null;if((c&224)===192){extraLength=1;overlongMask=127}else if((c&240)===224){extraLength=2;overlongMask=2047}else if((c&248)===240){extraLength=3;overlongMask=65535}else{if((c&192)===128){i+=onError(Utf8ErrorReason.UNEXPECTED_CONTINUE,i-1,bytes,result)}else{i+=onError(Utf8ErrorReason.BAD_PREFIX,i-1,bytes,result)}continue}if(i-1+extraLength>=bytes.length){i+=onError(Utf8ErrorReason.OVERRUN,i-1,bytes,result);continue}let res=c&(1<<8-extraLength-1)-1;for(let j=0;j1114111){i+=onError(Utf8ErrorReason.OUT_OF_RANGE,i-1-extraLength,bytes,result,res);continue}if(res>=55296&&res<=57343){i+=onError(Utf8ErrorReason.UTF16_SURROGATE,i-1-extraLength,bytes,result,res);continue}if(res<=overlongMask){i+=onError(Utf8ErrorReason.OVERLONG,i-1-extraLength,bytes,result,res);continue}result.push(res)}return result}function toUtf8Bytes(str,form=UnicodeNormalizationForm.current){if(form!=UnicodeNormalizationForm.current){logger$9.checkNormalize();str=str.normalize(form)}let result=[];for(let i=0;i>6|192);result.push(c&63|128)}else if((c&64512)==55296){i++;const c2=str.charCodeAt(i);if(i>=str.length||(c2&64512)!==56320){throw new Error("invalid utf-8 string")}const pair=65536+((c&1023)<<10)+(c2&1023);result.push(pair>>18|240);result.push(pair>>12&63|128);result.push(pair>>6&63|128);result.push(pair&63|128)}else{result.push(c>>12|224);result.push(c>>6&63|128);result.push(c&63|128)}}return arrayify(result)}function escapeChar(value){const hex="0000"+value.toString(16);return"\\u"+hex.substring(hex.length-4)}function _toEscapedUtf8String(bytes,onError){return'"'+getUtf8CodePoints(bytes,onError).map(codePoint=>{if(codePoint<256){switch(codePoint){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(codePoint>=32&&codePoint<127){return String.fromCharCode(codePoint)}}if(codePoint<=65535){return escapeChar(codePoint)}codePoint-=65536;return escapeChar((codePoint>>10&1023)+55296)+escapeChar((codePoint&1023)+56320)}).join("")+'"'}function _toUtf8String(codePoints){return codePoints.map(codePoint=>{if(codePoint<=65535){return String.fromCharCode(codePoint)}codePoint-=65536;return String.fromCharCode((codePoint>>10&1023)+55296,(codePoint&1023)+56320)}).join("")}function toUtf8String(bytes,onError){return _toUtf8String(getUtf8CodePoints(bytes,onError))}function toUtf8CodePoints(str,form=UnicodeNormalizationForm.current){return getUtf8CodePoints(toUtf8Bytes(str,form))}"use strict";function formatBytes32String(text){const bytes=toUtf8Bytes(text);if(bytes.length>31){throw new Error("bytes32 string must be less than 32 bytes")}return hexlify(concat([bytes,HashZero]).slice(0,32))}function parseBytes32String(bytes){const data=arrayify(bytes);if(data.length!==32){throw new Error("invalid bytes32 - not 32 bytes long")}if(data[31]!==0){throw new Error("invalid bytes32 string - no null terminator")}let length=31;while(data[length-1]===0){length--}return toUtf8String(data.slice(0,length))}"use strict";function bytes2(data){if(data.length%4!==0){throw new Error("bad data")}let result=[];for(let i=0;i{let comps=pair.split(":");lo+=parseInt(comps[0],16);result[lo]=func(comps[1])});return result}function createRangeTable(data){let hi=0;return data.split(",").map(v=>{let comps=v.split("-");if(comps.length===1){comps[1]="0"}else if(comps[1]===""){comps[1]="1"}let lo=hi+parseInt(comps[0],16);hi=parseInt(comps[1],16);return{l:lo,h:hi}})}function matchMap(value,ranges){let lo=0;for(let i=0;i=lo&&value<=lo+range.h&&(value-lo)%(range.d||1)===0){if(range.e&&range.e.indexOf(value-lo)!==-1){continue}return range}}return null}const Table_A_1_ranges=createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d");const Table_B_1_flags="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(v=>parseInt(v,16));const Table_B_2_ranges=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}];const Table_B_2_lut_abs=createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3");const Table_B_2_lut_rel=createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7");const Table_B_2_complex=createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",bytes2);const Table_C_ranges=createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function flatten(values){return values.reduce((accum,value)=>{value.forEach(value=>{accum.push(value)});return accum},[])}function _nameprepTableA1(codepoint){return!!matchMap(codepoint,Table_A_1_ranges)}function _nameprepTableB2(codepoint){let range=matchMap(codepoint,Table_B_2_ranges);if(range){return[codepoint+range.s]}let codes=Table_B_2_lut_abs[codepoint];if(codes){return codes}let shift=Table_B_2_lut_rel[codepoint];if(shift){return[codepoint+shift[0]]}let complex=Table_B_2_complex[codepoint];if(complex){return complex}return null}function _nameprepTableC(codepoint){return!!matchMap(codepoint,Table_C_ranges)}function nameprep(value){if(value.match(/^[a-z0-9-]*$/i)&&value.length<=59){return value.toLowerCase()}let codes=toUtf8CodePoints(value);codes=flatten(codes.map(code=>{if(Table_B_1_flags.indexOf(code)>=0){return[]}if(code>=65024&&code<=65039){return[]}let codesTableB2=_nameprepTableB2(code);if(codesTableB2){return codesTableB2}return[code]}));codes=toUtf8CodePoints(_toUtf8String(codes),UnicodeNormalizationForm.NFKC);codes.forEach(code=>{if(_nameprepTableC(code)){throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}});codes.forEach(code=>{if(_nameprepTableA1(code)){throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}});let name=_toUtf8String(codes);if(name.substring(0,1)==="-"||name.substring(2,4)==="--"||name.substring(name.length-1)==="-"){throw new Error("invalid hyphen")}if(name.length>63){throw new Error("too long")}return name}"use strict";"use strict";class StringCoder extends DynamicBytesCoder{constructor(localName){super("string",localName)}defaultValue(){return""}encode(writer,value){return super.encode(writer,toUtf8Bytes(value))}decode(reader){return toUtf8String(super.decode(reader))}}"use strict";class TupleCoder extends Coder{constructor(coders,localName){let dynamic=false;const types=[];coders.forEach(coder=>{if(coder.dynamic){dynamic=true}types.push(coder.type)});const type="tuple("+types.join(",")+")";super("tuple",type,localName,dynamic);this.coders=coders}defaultValue(){const values=[];this.coders.forEach(coder=>{values.push(coder.defaultValue())});const uniqueNames=this.coders.reduce((accum,coder)=>{const name=coder.localName;if(name){if(!accum[name]){accum[name]=0}accum[name]++}return accum},{});this.coders.forEach((coder,index)=>{let name=coder.localName;if(!name||uniqueNames[name]!==1){return}if(name==="length"){name="_length"}if(values[name]!=null){return}values[name]=values[index]});return Object.freeze(values)}encode(writer,value){return pack(writer,this.coders,value)}decode(reader){return reader.coerce(this.name,unpack(reader,this.coders))}}"use strict";const logger$a=new Logger(version$4);const paramTypeBytes=new RegExp(/^bytes([0-9]*)$/);const paramTypeNumber=new RegExp(/^(u?int)([0-9]*)$/);class AbiCoder{constructor(coerceFunc){logger$a.checkNew(new.target,AbiCoder);defineReadOnly(this,"coerceFunc",coerceFunc||null)}_getCoder(param){switch(param.baseType){case"address":return new AddressCoder(param.name);case"bool":return new BooleanCoder(param.name);case"string":return new StringCoder(param.name);case"bytes":return new BytesCoder(param.name);case"array":return new ArrayCoder(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new TupleCoder((param.components||[]).map(component=>{return this._getCoder(component)}),param.name);case"":return new NullCoder(param.name)}let match=param.type.match(paramTypeNumber);if(match){let size=parseInt(match[2]||"256");if(size===0||size>256||size%8!==0){logger$a.throwArgumentError("invalid "+match[1]+" bit length","param",param)}return new NumberCoder(size/8,match[1]==="int",param.name)}match=param.type.match(paramTypeBytes);if(match){let size=parseInt(match[1]);if(size===0||size>32){logger$a.throwArgumentError("invalid bytes length","param",param)}return new FixedBytesCoder(size,param.name)}return logger$a.throwArgumentError("invalid type","type",param.type)}_getWordSize(){return 32}_getReader(data,allowLoose){return new Reader(data,this._getWordSize(),this.coerceFunc,allowLoose)}_getWriter(){return new Writer(this._getWordSize())}getDefaultValue(types){const coders=types.map(type=>this._getCoder(ParamType.from(type)));const coder=new TupleCoder(coders,"_");return coder.defaultValue()}encode(types,values){if(types.length!==values.length){logger$a.throwError("types/values length mismatch",Logger.errors.INVALID_ARGUMENT,{count:{types:types.length,values:values.length},value:{types:types,values:values}})}const coders=types.map(type=>this._getCoder(ParamType.from(type)));const coder=new TupleCoder(coders,"_");const writer=this._getWriter();coder.encode(writer,values);return writer.data}decode(types,data,loose){const coders=types.map(type=>this._getCoder(ParamType.from(type)));const coder=new TupleCoder(coders,"_");return coder.decode(this._getReader(arrayify(data),loose))}}const defaultAbiCoder=new AbiCoder;function id(text){return keccak256(toUtf8Bytes(text))}const version$8="hash/5.5.0";const logger$b=new Logger(version$8);const Zeros=new Uint8Array(32);Zeros.fill(0);const Partition=new RegExp("^((.*)\\.)?([^.]+)$");function isValidName(name){try{const comps=name.split(".");for(let i=0;i256||match[2]&&match[2]!==String(width)){logger$c.throwArgumentError("invalid numeric width","type",type)}const boundsUpper=MaxUint256$1.mask(signed?width-1:width);const boundsLower=signed?boundsUpper.add(One$1).mul(NegativeOne$2):Zero$2;return function(value){const v=BigNumber.from(value);if(v.lt(boundsLower)||v.gt(boundsUpper)){logger$c.throwArgumentError(`value out-of-bounds for ${type}`,"value",value)}return hexZeroPad(v.toTwos(256).toHexString(),32)}}}{const match=type.match(/^bytes(\d+)$/);if(match){const width=parseInt(match[1]);if(width===0||width>32||match[1]!==String(width)){logger$c.throwArgumentError("invalid bytes width","type",type)}return function(value){const bytes=arrayify(value);if(bytes.length!==width){logger$c.throwArgumentError(`invalid length for ${type}`,"value",value)}return hexPadRight(value)}}}switch(type){case"address":return function(value){return hexZeroPad(getAddress(value),32)};case"bool":return function(value){return!value?hexFalse:hexTrue};case"bytes":return function(value){return keccak256(value)};case"string":return function(value){return id(value)}}return null}function encodeType(name,fields){return`${name}(${fields.map(({name:name,type:type})=>type+" "+name).join(",")})`}class TypedDataEncoder{constructor(types){defineReadOnly(this,"types",Object.freeze(deepCopy(types)));defineReadOnly(this,"_encoderCache",{});defineReadOnly(this,"_types",{});const links={};const parents={};const subtypes={};Object.keys(types).forEach(type=>{links[type]={};parents[type]=[];subtypes[type]={}});for(const name in types){const uniqueNames={};types[name].forEach(field=>{if(uniqueNames[field.name]){logger$c.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`,"types",types)}uniqueNames[field.name]=true;const baseType=field.type.match(/^([^\x5b]*)(\x5b|$)/)[1];if(baseType===name){logger$c.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`,"types",types)}const encoder=getBaseEncoder(baseType);if(encoder){return}if(!parents[baseType]){logger$c.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`,"types",types)}parents[baseType].push(name);links[name][baseType]=true})}const primaryTypes=Object.keys(parents).filter(n=>parents[n].length===0);if(primaryTypes.length===0){logger$c.throwArgumentError("missing primary type","types",types)}else if(primaryTypes.length>1){logger$c.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map(t=>JSON.stringify(t)).join(", ")}`,"types",types)}defineReadOnly(this,"primaryType",primaryTypes[0]);function checkCircular(type,found){if(found[type]){logger$c.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`,"types",types)}found[type]=true;Object.keys(links[type]).forEach(child=>{if(!parents[child]){return}checkCircular(child,found);Object.keys(found).forEach(subtype=>{subtypes[subtype][child]=true})});delete found[type]}checkCircular(this.primaryType,{});for(const name in subtypes){const st=Object.keys(subtypes[name]);st.sort();this._types[name]=encodeType(name,types[name])+st.map(t=>encodeType(t,types[t])).join("")}}getEncoder(type){let encoder=this._encoderCache[type];if(!encoder){encoder=this._encoderCache[type]=this._getEncoder(type)}return encoder}_getEncoder(type){{const encoder=getBaseEncoder(type);if(encoder){return encoder}}const match=type.match(/^(.*)(\x5b(\d*)\x5d)$/);if(match){const subtype=match[1];const subEncoder=this.getEncoder(subtype);const length=parseInt(match[3]);return value=>{if(length>=0&&value.length!==length){logger$c.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",value)}let result=value.map(subEncoder);if(this._types[subtype]){result=result.map(keccak256)}return keccak256(hexConcat(result))}}const fields=this.types[type];if(fields){const encodedType=id(this._types[type]);return value=>{const values=fields.map(({name:name,type:type})=>{const result=this.getEncoder(type)(value[name]);if(this._types[type]){return keccak256(result)}return result});values.unshift(encodedType);return hexConcat(values)}}return logger$c.throwArgumentError(`unknown type: ${type}`,"type",type)}encodeType(name){const result=this._types[name];if(!result){logger$c.throwArgumentError(`unknown type: ${JSON.stringify(name)}`,"name",name)}return result}encodeData(type,value){return this.getEncoder(type)(value)}hashStruct(name,value){return keccak256(this.encodeData(name,value))}encode(value){return this.encodeData(this.primaryType,value)}hash(value){return this.hashStruct(this.primaryType,value)}_visit(type,value,callback){{const encoder=getBaseEncoder(type);if(encoder){return callback(type,value)}}const match=type.match(/^(.*)(\x5b(\d*)\x5d)$/);if(match){const subtype=match[1];const length=parseInt(match[3]);if(length>=0&&value.length!==length){logger$c.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",value)}return value.map(v=>this._visit(subtype,v,callback))}const fields=this.types[type];if(fields){return fields.reduce((accum,{name:name,type:type})=>{accum[name]=this._visit(type,value[name],callback);return accum},{})}return logger$c.throwArgumentError(`unknown type: ${type}`,"type",type)}visit(value,callback){return this._visit(this.primaryType,value,callback)}static from(types){return new TypedDataEncoder(types)}static getPrimaryType(types){return TypedDataEncoder.from(types).primaryType}static hashStruct(name,types,value){return TypedDataEncoder.from(types).hashStruct(name,value)}static hashDomain(domain){const domainFields=[];for(const name in domain){const type=domainFieldTypes[name];if(!type){logger$c.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name)}`,"domain",domain)}domainFields.push({name:name,type:type})}domainFields.sort((a,b)=>{return domainFieldNames.indexOf(a.name)-domainFieldNames.indexOf(b.name)});return TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:domainFields},domain)}static encode(domain,types,value){return hexConcat(["0x1901",TypedDataEncoder.hashDomain(domain),TypedDataEncoder.from(types).hash(value)])}static hash(domain,types,value){return keccak256(TypedDataEncoder.encode(domain,types,value))}static resolveNames(domain,types,value,resolveName){return __awaiter$1(this,void 0,void 0,function*(){domain=shallowCopy(domain);const ensCache={};if(domain.verifyingContract&&!isHexString(domain.verifyingContract,20)){ensCache[domain.verifyingContract]="0x"}const encoder=TypedDataEncoder.from(types);encoder.visit(value,(type,value)=>{if(type==="address"&&!isHexString(value,20)){ensCache[value]="0x"}return value});for(const name in ensCache){ensCache[name]=yield resolveName(name)}if(domain.verifyingContract&&ensCache[domain.verifyingContract]){domain.verifyingContract=ensCache[domain.verifyingContract]}value=encoder.visit(value,(type,value)=>{if(type==="address"&&ensCache[value]){return ensCache[value]}return value});return{domain:domain,value:value}})}static getPayload(domain,types,value){TypedDataEncoder.hashDomain(domain);const domainValues={};const domainTypes=[];domainFieldNames.forEach(name=>{const value=domain[name];if(value==null){return}domainValues[name]=domainChecks[name](value);domainTypes.push({name:name,type:domainFieldTypes[name]})});const encoder=TypedDataEncoder.from(types);const typesWithDomain=shallowCopy(types);if(typesWithDomain.EIP712Domain){logger$c.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",types)}else{typesWithDomain.EIP712Domain=domainTypes}encoder.encode(value);return{types:typesWithDomain,domain:domainValues,primaryType:encoder.primaryType,message:encoder.visit(value,(type,value)=>{if(type.match(/^bytes(\d*)/)){return hexlify(arrayify(value))}if(type.match(/^u?int/)){return BigNumber.from(value).toString()}switch(type){case"address":return value.toLowerCase();case"bool":return!!value;case"string":if(typeof value!=="string"){logger$c.throwArgumentError(`invalid string`,"value",value)}return value}return logger$c.throwArgumentError("unsupported type","type",type)})}}}"use strict";"use strict";const logger$d=new Logger(version$4);class LogDescription extends Description{}class TransactionDescription extends Description{}class ErrorDescription extends Description{}class Indexed extends Description{static isIndexed(value){return!!(value&&value._isIndexed)}}const BuiltinErrors={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:true},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(property,error){const wrap=new Error(`deferred error during ABI decoding triggered accessing ${property}`);wrap.error=error;return wrap}class Interface{constructor(fragments){logger$d.checkNew(new.target,Interface);let abi=[];if(typeof fragments==="string"){abi=JSON.parse(fragments)}else{abi=fragments}defineReadOnly(this,"fragments",abi.map(fragment=>{return Fragment.from(fragment)}).filter(fragment=>fragment!=null));defineReadOnly(this,"_abiCoder",getStatic(new.target,"getAbiCoder")());defineReadOnly(this,"functions",{});defineReadOnly(this,"errors",{});defineReadOnly(this,"events",{});defineReadOnly(this,"structs",{});this.fragments.forEach(fragment=>{let bucket=null;switch(fragment.type){case"constructor":if(this.deploy){logger$d.warn("duplicate definition - constructor");return}defineReadOnly(this,"deploy",fragment);return;case"function":bucket=this.functions;break;case"event":bucket=this.events;break;case"error":bucket=this.errors;break;default:return}let signature=fragment.format();if(bucket[signature]){logger$d.warn("duplicate definition - "+signature);return}bucket[signature]=fragment});if(!this.deploy){defineReadOnly(this,"deploy",ConstructorFragment.from({payable:false,type:"constructor"}))}defineReadOnly(this,"_isInterface",true)}format(format){if(!format){format=FormatTypes.full}if(format===FormatTypes.sighash){logger$d.throwArgumentError("interface does not support formatting sighash","format",format)}const abi=this.fragments.map(fragment=>fragment.format(format));if(format===FormatTypes.json){return JSON.stringify(abi.map(j=>JSON.parse(j)))}return abi}static getAbiCoder(){return defaultAbiCoder}static getAddress(address){return getAddress(address)}static getSighash(fragment){return hexDataSlice(id(fragment.format()),0,4)}static getEventTopic(eventFragment){return id(eventFragment.format())}getFunction(nameOrSignatureOrSighash){if(isHexString(nameOrSignatureOrSighash)){for(const name in this.functions){if(nameOrSignatureOrSighash===this.getSighash(name)){return this.functions[name]}}logger$d.throwArgumentError("no matching function","sighash",nameOrSignatureOrSighash)}if(nameOrSignatureOrSighash.indexOf("(")===-1){const name=nameOrSignatureOrSighash.trim();const matching=Object.keys(this.functions).filter(f=>f.split("(")[0]===name);if(matching.length===0){logger$d.throwArgumentError("no matching function","name",name)}else if(matching.length>1){logger$d.throwArgumentError("multiple matching functions","name",name)}return this.functions[matching[0]]}const result=this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];if(!result){logger$d.throwArgumentError("no matching function","signature",nameOrSignatureOrSighash)}return result}getEvent(nameOrSignatureOrTopic){if(isHexString(nameOrSignatureOrTopic)){const topichash=nameOrSignatureOrTopic.toLowerCase();for(const name in this.events){if(topichash===this.getEventTopic(name)){return this.events[name]}}logger$d.throwArgumentError("no matching event","topichash",topichash)}if(nameOrSignatureOrTopic.indexOf("(")===-1){const name=nameOrSignatureOrTopic.trim();const matching=Object.keys(this.events).filter(f=>f.split("(")[0]===name);if(matching.length===0){logger$d.throwArgumentError("no matching event","name",name)}else if(matching.length>1){logger$d.throwArgumentError("multiple matching events","name",name)}return this.events[matching[0]]}const result=this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];if(!result){logger$d.throwArgumentError("no matching event","signature",nameOrSignatureOrTopic)}return result}getError(nameOrSignatureOrSighash){if(isHexString(nameOrSignatureOrSighash)){const getSighash=getStatic(this.constructor,"getSighash");for(const name in this.errors){const error=this.errors[name];if(nameOrSignatureOrSighash===getSighash(error)){return this.errors[name]}}logger$d.throwArgumentError("no matching error","sighash",nameOrSignatureOrSighash)}if(nameOrSignatureOrSighash.indexOf("(")===-1){const name=nameOrSignatureOrSighash.trim();const matching=Object.keys(this.errors).filter(f=>f.split("(")[0]===name);if(matching.length===0){logger$d.throwArgumentError("no matching error","name",name)}else if(matching.length>1){logger$d.throwArgumentError("multiple matching errors","name",name)}return this.errors[matching[0]]}const result=this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];if(!result){logger$d.throwArgumentError("no matching error","signature",nameOrSignatureOrSighash)}return result}getSighash(fragment){if(typeof fragment==="string"){try{fragment=this.getFunction(fragment)}catch(error){try{fragment=this.getError(fragment)}catch(_){throw error}}}return getStatic(this.constructor,"getSighash")(fragment)}getEventTopic(eventFragment){if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}return getStatic(this.constructor,"getEventTopic")(eventFragment)}_decodeParams(params,data){return this._abiCoder.decode(params,data)}_encodeParams(params,values){return this._abiCoder.encode(params,values)}encodeDeploy(values){return this._encodeParams(this.deploy.inputs,values||[])}decodeErrorResult(fragment,data){if(typeof fragment==="string"){fragment=this.getError(fragment)}const bytes=arrayify(data);if(hexlify(bytes.slice(0,4))!==this.getSighash(fragment)){logger$d.throwArgumentError(`data signature does not match error ${fragment.name}.`,"data",hexlify(bytes))}return this._decodeParams(fragment.inputs,bytes.slice(4))}encodeErrorResult(fragment,values){if(typeof fragment==="string"){fragment=this.getError(fragment)}return hexlify(concat([this.getSighash(fragment),this._encodeParams(fragment.inputs,values||[])]))}decodeFunctionData(functionFragment,data){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}const bytes=arrayify(data);if(hexlify(bytes.slice(0,4))!==this.getSighash(functionFragment)){logger$d.throwArgumentError(`data signature does not match function ${functionFragment.name}.`,"data",hexlify(bytes))}return this._decodeParams(functionFragment.inputs,bytes.slice(4))}encodeFunctionData(functionFragment,values){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}return hexlify(concat([this.getSighash(functionFragment),this._encodeParams(functionFragment.inputs,values||[])]))}decodeFunctionResult(functionFragment,data){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}let bytes=arrayify(data);let reason=null;let errorArgs=null;let errorName=null;let errorSignature=null;switch(bytes.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(functionFragment.outputs,bytes)}catch(error){}break;case 4:{const selector=hexlify(bytes.slice(0,4));const builtin=BuiltinErrors[selector];if(builtin){errorArgs=this._abiCoder.decode(builtin.inputs,bytes.slice(4));errorName=builtin.name;errorSignature=builtin.signature;if(builtin.reason){reason=errorArgs[0]}}else{try{const error=this.getError(selector);errorArgs=this._abiCoder.decode(error.inputs,bytes.slice(4));errorName=error.name;errorSignature=error.format()}catch(error){console.log(error)}}break}}return logger$d.throwError("call revert exception",Logger.errors.CALL_EXCEPTION,{method:functionFragment.format(),errorArgs:errorArgs,errorName:errorName,errorSignature:errorSignature,reason:reason})}encodeFunctionResult(functionFragment,values){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}return hexlify(this._abiCoder.encode(functionFragment.outputs,values||[]))}encodeFilterTopics(eventFragment,values){if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}if(values.length>eventFragment.inputs.length){logger$d.throwError("too many arguments for "+eventFragment.format(),Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:values})}let topics=[];if(!eventFragment.anonymous){topics.push(this.getEventTopic(eventFragment))}const encodeTopic=(param,value)=>{if(param.type==="string"){return id(value)}else if(param.type==="bytes"){return keccak256(hexlify(value))}if(param.type==="address"){this._abiCoder.encode(["address"],[value])}return hexZeroPad(hexlify(value),32)};values.forEach((value,index)=>{let param=eventFragment.inputs[index];if(!param.indexed){if(value!=null){logger$d.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,value)}return}if(value==null){topics.push(null)}else if(param.baseType==="array"||param.baseType==="tuple"){logger$d.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,value)}else if(Array.isArray(value)){topics.push(value.map(value=>encodeTopic(param,value)))}else{topics.push(encodeTopic(param,value))}});while(topics.length&&topics[topics.length-1]===null){topics.pop()}return topics}encodeEventLog(eventFragment,values){if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}const topics=[];const dataTypes=[];const dataValues=[];if(!eventFragment.anonymous){topics.push(this.getEventTopic(eventFragment))}if(values.length!==eventFragment.inputs.length){logger$d.throwArgumentError("event arguments/values mismatch","values",values)}eventFragment.inputs.forEach((param,index)=>{const value=values[index];if(param.indexed){if(param.type==="string"){topics.push(id(value))}else if(param.type==="bytes"){topics.push(keccak256(value))}else if(param.baseType==="tuple"||param.baseType==="array"){throw new Error("not implemented")}else{topics.push(this._abiCoder.encode([param.type],[value]))}}else{dataTypes.push(param);dataValues.push(value)}});return{data:this._abiCoder.encode(dataTypes,dataValues),topics:topics}}decodeEventLog(eventFragment,data,topics){if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}if(topics!=null&&!eventFragment.anonymous){let topicHash=this.getEventTopic(eventFragment);if(!isHexString(topics[0],32)||topics[0].toLowerCase()!==topicHash){logger$d.throwError("fragment/topic mismatch",Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:topicHash,value:topics[0]})}topics=topics.slice(1)}let indexed=[];let nonIndexed=[];let dynamic=[];eventFragment.inputs.forEach((param,index)=>{if(param.indexed){if(param.type==="string"||param.type==="bytes"||param.baseType==="tuple"||param.baseType==="array"){indexed.push(ParamType.fromObject({type:"bytes32",name:param.name}));dynamic.push(true)}else{indexed.push(param);dynamic.push(false)}}else{nonIndexed.push(param);dynamic.push(false)}});let resultIndexed=topics!=null?this._abiCoder.decode(indexed,concat(topics)):null;let resultNonIndexed=this._abiCoder.decode(nonIndexed,data,true);let result=[];let nonIndexedIndex=0,indexedIndex=0;eventFragment.inputs.forEach((param,index)=>{if(param.indexed){if(resultIndexed==null){result[index]=new Indexed({_isIndexed:true,hash:null})}else if(dynamic[index]){result[index]=new Indexed({_isIndexed:true,hash:resultIndexed[indexedIndex++]})}else{try{result[index]=resultIndexed[indexedIndex++]}catch(error){result[index]=error}}}else{try{result[index]=resultNonIndexed[nonIndexedIndex++]}catch(error){result[index]=error}}if(param.name&&result[param.name]==null){const value=result[index];if(value instanceof Error){Object.defineProperty(result,param.name,{enumerable:true,get:()=>{throw wrapAccessError(`property ${JSON.stringify(param.name)}`,value)}})}else{result[param.name]=value}}});for(let i=0;i{throw wrapAccessError(`index ${i}`,value)}})}}return Object.freeze(result)}parseTransaction(tx){let fragment=this.getFunction(tx.data.substring(0,10).toLowerCase());if(!fragment){return null}return new TransactionDescription({args:this._abiCoder.decode(fragment.inputs,"0x"+tx.data.substring(10)),functionFragment:fragment,name:fragment.name,signature:fragment.format(),sighash:this.getSighash(fragment),value:BigNumber.from(tx.value||"0")})}parseLog(log){let fragment=this.getEvent(log.topics[0]);if(!fragment||fragment.anonymous){return null}return new LogDescription({eventFragment:fragment,name:fragment.name,signature:fragment.format(),topic:this.getEventTopic(fragment),args:this.decodeEventLog(fragment,log.data,log.topics)})}parseError(data){const hexData=hexlify(data);let fragment=this.getError(hexData.substring(0,10).toLowerCase());if(!fragment){return null}return new ErrorDescription({args:this._abiCoder.decode(fragment.inputs,"0x"+hexData.substring(10)),errorFragment:fragment,name:fragment.name,signature:fragment.format(),sighash:this.getSighash(fragment)})}static isInterface(value){return!!(value&&value._isInterface)}}"use strict";const version$9="abstract-provider/5.5.1";"use strict";var __awaiter$2=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$e=new Logger(version$9);class ForkEvent extends Description{static isForkEvent(value){return!!(value&&value._isForkEvent)}}class BlockForkEvent extends ForkEvent{constructor(blockHash,expiry){if(!isHexString(blockHash,32)){logger$e.throwArgumentError("invalid blockHash","blockHash",blockHash)}super({_isForkEvent:true,_isBlockForkEvent:true,expiry:expiry||0,blockHash:blockHash})}}class TransactionForkEvent extends ForkEvent{constructor(hash,expiry){if(!isHexString(hash,32)){logger$e.throwArgumentError("invalid transaction hash","hash",hash)}super({_isForkEvent:true,_isTransactionForkEvent:true,expiry:expiry||0,hash:hash})}}class TransactionOrderForkEvent extends ForkEvent{constructor(beforeHash,afterHash,expiry){if(!isHexString(beforeHash,32)){logger$e.throwArgumentError("invalid transaction hash","beforeHash",beforeHash)}if(!isHexString(afterHash,32)){logger$e.throwArgumentError("invalid transaction hash","afterHash",afterHash)}super({_isForkEvent:true,_isTransactionOrderForkEvent:true,expiry:expiry||0,beforeHash:beforeHash,afterHash:afterHash})}}class Provider{constructor(){logger$e.checkAbstract(new.target,Provider);defineReadOnly(this,"_isProvider",true)}getFeeData(){return __awaiter$2(this,void 0,void 0,function*(){const{block:block,gasPrice:gasPrice}=yield resolveProperties({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(error=>{return null})});let maxFeePerGas=null,maxPriorityFeePerGas=null;if(block&&block.baseFeePerGas){maxPriorityFeePerGas=BigNumber.from("2500000000");maxFeePerGas=block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas)}return{maxFeePerGas:maxFeePerGas,maxPriorityFeePerGas:maxPriorityFeePerGas,gasPrice:gasPrice}})}addListener(eventName,listener){return this.on(eventName,listener)}removeListener(eventName,listener){return this.off(eventName,listener)}static isProvider(value){return!!(value&&value._isProvider)}}const version$a="abstract-signer/5.5.0";"use strict";var __awaiter$3=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$f=new Logger(version$a);const allowedTransactionKeys=["accessList","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"];const forwardErrors=[Logger.errors.INSUFFICIENT_FUNDS,Logger.errors.NONCE_EXPIRED,Logger.errors.REPLACEMENT_UNDERPRICED];class Signer{constructor(){logger$f.checkAbstract(new.target,Signer);defineReadOnly(this,"_isSigner",true)}getBalance(blockTag){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("getBalance");return yield this.provider.getBalance(this.getAddress(),blockTag)})}getTransactionCount(blockTag){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("getTransactionCount");return yield this.provider.getTransactionCount(this.getAddress(),blockTag)})}estimateGas(transaction){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const tx=yield resolveProperties(this.checkTransaction(transaction));return yield this.provider.estimateGas(tx)})}call(transaction,blockTag){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("call");const tx=yield resolveProperties(this.checkTransaction(transaction));return yield this.provider.call(tx,blockTag)})}sendTransaction(transaction){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const tx=yield this.populateTransaction(transaction);const signedTx=yield this.signTransaction(tx);return yield this.provider.sendTransaction(signedTx)})}getChainId(){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("getChainId");const network=yield this.provider.getNetwork();return network.chainId})}getGasPrice(){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("getGasPrice");return yield this.provider.getGasPrice()})}getFeeData(){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("getFeeData");return yield this.provider.getFeeData()})}resolveName(name){return __awaiter$3(this,void 0,void 0,function*(){this._checkProvider("resolveName");return yield this.provider.resolveName(name)})}checkTransaction(transaction){for(const key in transaction){if(allowedTransactionKeys.indexOf(key)===-1){logger$f.throwArgumentError("invalid transaction key: "+key,"transaction",transaction)}}const tx=shallowCopy(transaction);if(tx.from==null){tx.from=this.getAddress()}else{tx.from=Promise.all([Promise.resolve(tx.from),this.getAddress()]).then(result=>{if(result[0].toLowerCase()!==result[1].toLowerCase()){logger$f.throwArgumentError("from address mismatch","transaction",transaction)}return result[0]})}return tx}populateTransaction(transaction){return __awaiter$3(this,void 0,void 0,function*(){const tx=yield resolveProperties(this.checkTransaction(transaction));if(tx.to!=null){tx.to=Promise.resolve(tx.to).then(to=>__awaiter$3(this,void 0,void 0,function*(){if(to==null){return null}const address=yield this.resolveName(to);if(address==null){logger$f.throwArgumentError("provided ENS name resolves to null","tx.to",to)}return address}));tx.to.catch(error=>{})}const hasEip1559=tx.maxFeePerGas!=null||tx.maxPriorityFeePerGas!=null;if(tx.gasPrice!=null&&(tx.type===2||hasEip1559)){logger$f.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",transaction)}else if((tx.type===0||tx.type===1)&&hasEip1559){logger$f.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",transaction)}if((tx.type===2||tx.type==null)&&(tx.maxFeePerGas!=null&&tx.maxPriorityFeePerGas!=null)){tx.type=2}else if(tx.type===0||tx.type===1){if(tx.gasPrice==null){tx.gasPrice=this.getGasPrice()}}else{const feeData=yield this.getFeeData();if(tx.type==null){if(feeData.maxFeePerGas!=null&&feeData.maxPriorityFeePerGas!=null){tx.type=2;if(tx.gasPrice!=null){const gasPrice=tx.gasPrice;delete tx.gasPrice;tx.maxFeePerGas=gasPrice;tx.maxPriorityFeePerGas=gasPrice}else{if(tx.maxFeePerGas==null){tx.maxFeePerGas=feeData.maxFeePerGas}if(tx.maxPriorityFeePerGas==null){tx.maxPriorityFeePerGas=feeData.maxPriorityFeePerGas}}}else if(feeData.gasPrice!=null){if(hasEip1559){logger$f.throwError("network does not support EIP-1559",Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"})}if(tx.gasPrice==null){tx.gasPrice=feeData.gasPrice}tx.type=0}else{logger$f.throwError("failed to get consistent fee data",Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}}else if(tx.type===2){if(tx.maxFeePerGas==null){tx.maxFeePerGas=feeData.maxFeePerGas}if(tx.maxPriorityFeePerGas==null){tx.maxPriorityFeePerGas=feeData.maxPriorityFeePerGas}}}if(tx.nonce==null){tx.nonce=this.getTransactionCount("pending")}if(tx.gasLimit==null){tx.gasLimit=this.estimateGas(tx).catch(error=>{if(forwardErrors.indexOf(error.code)>=0){throw error}return logger$f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:error,tx:tx})})}if(tx.chainId==null){tx.chainId=this.getChainId()}else{tx.chainId=Promise.all([Promise.resolve(tx.chainId),this.getChainId()]).then(results=>{if(results[1]!==0&&results[0]!==results[1]){logger$f.throwArgumentError("chainId address mismatch","transaction",transaction)}return results[0]})}return yield resolveProperties(tx)})}_checkProvider(operation){if(!this.provider){logger$f.throwError("missing provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:operation||"_checkProvider"})}}static isSigner(value){return!!(value&&value._isSigner)}}class VoidSigner extends Signer{constructor(address,provider){logger$f.checkNew(new.target,VoidSigner);super();defineReadOnly(this,"address",address);defineReadOnly(this,"provider",provider||null)}getAddress(){return Promise.resolve(this.address)}_fail(message,operation){return Promise.resolve().then(()=>{logger$f.throwError(message,Logger.errors.UNSUPPORTED_OPERATION,{operation:operation})})}signMessage(message){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(transaction){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(domain,types,value){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(provider){return new VoidSigner(this.address,provider)}}var minimalisticAssert=assert;function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)};var inherits_browser=createCommonjsModule(function(module){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}}else{module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}}});var inherits=createCommonjsModule(function(module){try{var util=null;if(typeof util.inherits!=="function")throw"";module.exports=util.inherits}catch(e){module.exports=inherits_browser}});"use strict";var inherits_1=inherits;function isSurrogatePair(msg,i){if((msg.charCodeAt(i)&64512)!==55296){return false}if(i<0||i+1>=msg.length){return false}return(msg.charCodeAt(i+1)&64512)===56320}function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg==="string"){if(!enc){var p=0;for(var i=0;i>6|192;res[p++]=c&63|128}else if(isSurrogatePair(msg,i)){c=65536+((c&1023)<<10)+(msg.charCodeAt(++i)&1023);res[p++]=c>>18|240;res[p++]=c>>12&63|128;res[p++]=c>>6&63|128;res[p++]=c&63|128}else{res[p++]=c>>12|224;res[p++]=c>>6&63|128;res[p++]=c&63|128}}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(i=0;i>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return res>>>0}var htonl_1=htonl;function toHex32(msg,endian){var res="";for(var i=0;i>>0}return res}var join32_1=join32;function split32(msg,endian){var res=new Array(msg.length*4);for(var i=0,k=0;i>>24;res[k+1]=m>>>16&255;res[k+2]=m>>>8&255;res[k+3]=m&255}else{res[k+3]=m>>>24;res[k+2]=m>>>16&255;res[k+1]=m>>>8&255;res[k]=m&255}}return res}var split32_1=split32;function rotr32(w,b){return w>>>b|w<<32-b}var rotr32_1=rotr32;function rotl32(w,b){return w<>>32-b}var rotl32_1=rotl32;function sum32(a,b){return a+b>>>0}var sum32_1=sum32;function sum32_3(a,b,c){return a+b+c>>>0}var sum32_3_1=sum32_3;function sum32_4(a,b,c,d){return a+b+c+d>>>0}var sum32_4_1=sum32_4;function sum32_5(a,b,c,d,e){return a+b+c+d+e>>>0}var sum32_5_1=sum32_5;function sum64(buf,pos,ah,al){var bh=buf[pos];var bl=buf[pos+1];var lo=al+bl>>>0;var hi=(lo>>0;buf[pos+1]=lo}var sum64_1=sum64;function sum64_hi(ah,al,bh,bl){var lo=al+bl>>>0;var hi=(lo>>0}var sum64_hi_1=sum64_hi;function sum64_lo(ah,al,bh,bl){var lo=al+bl;return lo>>>0}var sum64_lo_1=sum64_lo;function sum64_4_hi(ah,al,bh,bl,ch,cl,dh,dl){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}var sum64_4_hi_1=sum64_4_hi;function sum64_4_lo(ah,al,bh,bl,ch,cl,dh,dl){var lo=al+bl+cl+dl;return lo>>>0}var sum64_4_lo_1=sum64_4_lo;function sum64_5_hi(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}var sum64_5_hi_1=sum64_5_hi;function sum64_5_lo(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var lo=al+bl+cl+dl+el;return lo>>>0}var sum64_5_lo_1=sum64_5_lo;function rotr64_hi(ah,al,num){var r=al<<32-num|ah>>>num;return r>>>0}var rotr64_hi_1=rotr64_hi;function rotr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}var rotr64_lo_1=rotr64_lo;function shr64_hi(ah,al,num){return ah>>>num}var shr64_hi_1=shr64_hi;function shr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}var shr64_lo_1=shr64_lo;var utils={inherits:inherits_1,toArray:toArray_1,toHex:toHex_1,htonl:htonl_1,toHex32:toHex32_1,zero2:zero2_1,zero8:zero8_1,join32:join32_1,split32:split32_1,rotr32:rotr32_1,rotl32:rotl32_1,sum32:sum32_1,sum32_3:sum32_3_1,sum32_4:sum32_4_1,sum32_5:sum32_5_1,sum64:sum64_1,sum64_hi:sum64_hi_1,sum64_lo:sum64_lo_1,sum64_4_hi:sum64_4_hi_1,sum64_4_lo:sum64_4_lo_1,sum64_5_hi:sum64_5_hi_1,sum64_5_lo:sum64_5_lo_1,rotr64_hi:rotr64_hi_1,rotr64_lo:rotr64_lo_1,shr64_hi:shr64_hi_1,shr64_lo:shr64_lo_1};"use strict";function BlockHash(){this.pending=null;this.pendingTotal=0;this.blockSize=this.constructor.blockSize;this.outSize=this.constructor.outSize;this.hmacStrength=this.constructor.hmacStrength;this.padLength=this.constructor.padLength/8;this.endian="big";this._delta8=this.blockSize/8;this._delta32=this.blockSize/32}var BlockHash_1=BlockHash;BlockHash.prototype.update=function update(msg,enc){msg=utils.toArray(msg,enc);if(!this.pending)this.pending=msg;else this.pending=this.pending.concat(msg);this.pendingTotal+=msg.length;if(this.pending.length>=this._delta8){msg=this.pending;var r=msg.length%this._delta8;this.pending=msg.slice(msg.length-r,msg.length);if(this.pending.length===0)this.pending=null;msg=utils.join32(msg,0,msg.length-r,this.endian);for(var i=0;i>>24&255;res[i++]=len>>>16&255;res[i++]=len>>>8&255;res[i++]=len&255}else{res[i++]=len&255;res[i++]=len>>>8&255;res[i++]=len>>>16&255;res[i++]=len>>>24&255;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;for(t=8;t>>3}var g0_256_1=g0_256;function g1_256(x){return rotr32$1(x,17)^rotr32$1(x,19)^x>>>10}var g1_256_1=g1_256;var common$1={ft_1:ft_1_1,ch32:ch32_1,maj32:maj32_1,p32:p32_1,s0_256:s0_256_1,s1_256:s1_256_1,g0_256:g0_256_1,g1_256:g1_256_1};"use strict";var rotl32$1=utils.rotl32;var sum32$1=utils.sum32;var sum32_5$1=utils.sum32_5;var ft_1$1=common$1.ft_1;var BlockHash$1=common.BlockHash;var sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash$1.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}utils.inherits(SHA1,BlockHash$1);var _1=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function _update(msg,start){var W=this.W;for(var i=0;i<16;i++)W[i]=msg[start+i];for(;ithis.blockSize)key=(new this.Hash).update(key).digest();minimalisticAssert(key.length<=this.blockSize);for(var i=key.length;i>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}return res}utils.toArray=toArray;function zero2(word){if(word.length===1)return"0"+word;else return word}utils.zero2=zero2;function toHex(msg){var res="";for(var i=0;i(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z)}else{z=0}naf[i]=z;k.iushrn(1)}return naf}utils.getNAF=getNAF;function getJSF(k1,k2){var jsf=[[],[]];k1=k1.clone();k2=k2.clone();var d1=0;var d2=0;var m8;while(k1.cmpn(-d1)>0||k2.cmpn(-d2)>0){var m14=k1.andln(3)+d1&3;var m24=k2.andln(3)+d2&3;if(m14===3)m14=-1;if(m24===3)m24=-1;var u1;if((m14&1)===0){u1=0}else{m8=k1.andln(7)+d1&7;if((m8===3||m8===5)&&m24===2)u1=-m14;else u1=m14}jsf[0].push(u1);var u2;if((m24&1)===0){u2=0}else{m8=k2.andln(7)+d2&7;if((m8===3||m8===5)&&m14===2)u2=-m24;else u2=m24}jsf[1].push(u2);if(2*d1===u1+1)d1=1-d1;if(2*d2===u2+1)d2=1-d2;k1.iushrn(1);k2.iushrn(1)}return jsf}utils.getJSF=getJSF;function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return this[key]!==undefined?this[key]:this[key]=computer.call(this)}}utils.cachedProperty=cachedProperty;function parseBytes(bytes){return typeof bytes==="string"?utils.toArray(bytes,"hex"):bytes}utils.parseBytes=parseBytes;function intFromLE(bytes){return new bn(bytes,"hex","le")}utils.intFromLE=intFromLE});"use strict";var getNAF=utils_1$1.getNAF;var getJSF=utils_1$1.getJSF;var assert$1$1=utils_1$1.assert;function BaseCurve(type,conf){this.type=type;this.p=new bn(conf.p,16);this.red=conf.prime?bn.red(conf.prime):bn.mont(this.p);this.zero=new bn(0).toRed(this.red);this.one=new bn(1).toRed(this.red);this.two=new bn(2).toRed(this.red);this.n=conf.n&&new bn(conf.n,16);this.g=conf.g&&this.pointFromJSON(conf.g,conf.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);this._bitLength=this.n?this.n.bitLength():0;var adjustCount=this.n&&this.p.div(this.n);if(!adjustCount||adjustCount.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}var base=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert$1$1(p.precomputed);var doubles=p._getDoubles();var naf=getNAF(k,1,this._bitLength);var I=(1<=j;l--)nafW=(nafW<<1)+naf[l];repr.push(nafW)}var a=this.jpoint(null,null,null);var b=this.jpoint(null,null,null);for(var i=I;i>0;i--){for(j=0;j=0;i--){for(var l=0;i>=0&&naf[i]===0;i--)l++;if(i>=0)l++;acc=acc.dblp(l);if(i<0)break;var z=naf[i];assert$1$1(z!==0);if(p.type==="affine"){if(z>0)acc=acc.mixedAdd(wnd[z-1>>1]);else acc=acc.mixedAdd(wnd[-z-1>>1].neg())}else{if(z>0)acc=acc.add(wnd[z-1>>1]);else acc=acc.add(wnd[-z-1>>1].neg())}}return p.type==="affine"?acc.toP():acc};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var wndWidth=this._wnafT1;var wnd=this._wnafT2;var naf=this._wnafT3;var max=0;var i;var j;var p;for(i=0;i=1;i-=2){var a=i-1;var b=i;if(wndWidth[a]!==1||wndWidth[b]!==1){naf[a]=getNAF(coeffs[a],wndWidth[a],this._bitLength);naf[b]=getNAF(coeffs[b],wndWidth[b],this._bitLength);max=Math.max(naf[a].length,max);max=Math.max(naf[b].length,max);continue}var comb=[points[a],null,null,points[b]];if(points[a].y.cmp(points[b].y)===0){comb[1]=points[a].add(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}else if(points[a].y.cmp(points[b].y.redNeg())===0){comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].add(points[b].neg())}else{comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}var index=[-3,-1,-5,-7,0,7,5,1,3];var jsf=getJSF(coeffs[a],coeffs[b]);max=Math.max(jsf[0].length,max);naf[a]=new Array(max);naf[b]=new Array(max);for(j=0;j=0;i--){var k=0;while(i>=0){var zero=true;for(j=0;j=0)k++;acc=acc.dblp(k);if(i<0)break;for(j=0;j0)p=wnd[j][z-1>>1];else if(z<0)p=wnd[j][-z-1>>1].neg();if(p.type==="affine")acc=acc.mixedAdd(p);else acc=acc.add(p)}}for(i=0;i=Math.ceil((k.bitLength()+1)/doubles.step)};BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var doubles=[this];var acc=this;for(var i=0;i=0){a2=a0;b2=b0}if(a1.negative){a1=a1.neg();b1=b1.neg()}if(a2.negative){a2=a2.neg();b2=b2.neg()}return[{a:a1,b:b1},{a:a2,b:b2}]};ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis;var v1=basis[0];var v2=basis[1];var c1=v2.b.mul(k).divRound(this.n);var c2=v1.b.neg().mul(k).divRound(this.n);var p1=c1.mul(v1.a);var p2=c2.mul(v2.a);var q1=c1.mul(v1.b);var q2=c2.mul(v2.b);var k1=k.sub(p1).sub(p2);var k2=q1.add(q2).neg();return{k1:k1,k2:k2}};ShortCurve.prototype.pointFromX=function pointFromX(x,odd){x=new bn(x,16);if(!x.red)x=x.toRed(this.red);var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);var y=y2.redSqrt();if(y.redSqr().redSub(y2).cmp(this.zero)!==0)throw new Error("invalid point");var isOdd=y.fromRed().isOdd();if(odd&&!isOdd||!odd&&isOdd)y=y.redNeg();return this.point(x,y)};ShortCurve.prototype.validate=function validate(point){if(point.inf)return true;var x=point.x;var y=point.y;var ax=this.a.redMul(x);var rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return y.redSqr().redISub(rhs).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){var npoints=this._endoWnafT1;var ncoeffs=this._endoWnafT2;for(var i=0;i";return""};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(this.x.cmp(p.x)===0)return this.curve.point(null,null);var c=this.y.redSub(p.y);if(c.cmpn(0)!==0)c=c.redMul(this.x.redSub(p.x).redInvm());var nx=c.redSqr().redISub(this.x).redISub(p.x);var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(ys1.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a;var x2=this.x.redSqr();var dyinv=ys1.redInvm();var c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);var nx=c.redSqr().redISub(this.x.redAdd(this.x));var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(k){k=new bn(k,16);if(this.isInfinity())return this;else if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[k]);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs);else return this.curve._wnafMulAdd(1,points,coeffs,2)};Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs,true);else return this.curve._wnafMulAdd(1,points,coeffs,2,true)};Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||this.x.cmp(p.x)===0&&this.y.cmp(p.y)===0)};Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed;var negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var res=this.curve.jpoint(this.x,this.y,this.curve.one);return res};function JPoint(curve,x,y,z){base.BasePoint.call(this,curve,"jacobian");if(x===null&&y===null&&z===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new bn(0)}else{this.x=new bn(x,16);this.y=new bn(y,16);this.z=new bn(z,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}inherits_browser$1(JPoint,base.BasePoint);ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm();var zinv2=zinv.redSqr();var ax=this.x.redMul(zinv2);var ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr();var z2=this.z.redSqr();var u1=this.x.redMul(pz2);var u2=p.x.redMul(z2);var s1=this.y.redMul(pz2.redMul(p.z));var s2=p.y.redMul(z2.redMul(this.z));var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr();var u1=this.x;var u2=p.x.redMul(z2);var s1=this.y;var s2=p.y.redMul(z2).redMul(this.z);var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.dblp=function dblp(pow){if(pow===0)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var r=this;for(i=0;i=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};var curve_1=createCommonjsModule$1(function(module,exports){"use strict";var curve=exports;curve.base=base;curve.short=short_1;curve.mont=null;curve.edwards=null});var curves_1=createCommonjsModule$1(function(module,exports){"use strict";var curves=exports;var assert=utils_1$1.assert;function PresetCurve(options){if(options.type==="short")this.curve=new curve_1.short(options);else if(options.type==="edwards")this.curve=new curve_1.edwards(options);else this.curve=new curve_1.mont(options);this.g=this.curve.g;this.n=this.curve.n;this.hash=options.hash;assert(this.g.validate(),"Invalid curve");assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}curves.PresetCurve=PresetCurve;function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:true,enumerable:true,get:function(){var curve=new PresetCurve(options);Object.defineProperty(curves,name,{configurable:true,enumerable:true,value:curve});return curve}})}defineCurve("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hash_1.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});defineCurve("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hash_1.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});defineCurve("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hash_1.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});defineCurve("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f "+"5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 "+"f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hash_1.sha384,gRed:false,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 "+"5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 "+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});defineCurve("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b "+"99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd "+"3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 "+"f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hash_1.sha512,gRed:false,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 "+"053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 "+"a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 "+"579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 "+"3fad0761 353c7086 a272c240 88be9476 9fd16650"]});defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash_1.sha256,gRed:false,g:["9"]});defineCurve("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash_1.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var pre;try{pre=null.crash()}catch(e){pre=undefined}defineCurve("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hash_1.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})});"use strict";function HmacDRBG(options){if(!(this instanceof HmacDRBG))return new HmacDRBG(options);this.hash=options.hash;this.predResist=!!options.predResist;this.outLen=this.hash.outSize;this.minEntropy=options.minEntropy||this.hash.hmacStrength;this._reseed=null;this.reseedInterval=null;this.K=null;this.V=null;var entropy=utils_1.toArray(options.entropy,options.entropyEnc||"hex");var nonce=utils_1.toArray(options.nonce,options.nonceEnc||"hex");var pers=utils_1.toArray(options.pers,options.persEnc||"hex");minimalisticAssert$1(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(entropy,nonce,pers)}var hmacDrbg=HmacDRBG;HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(entropy.concat(add||[]));this._reseed=1};HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof enc!=="string"){addEnc=add;add=enc;enc=null}if(add){add=utils_1.toArray(add,addEnc||"hex");this._update(add)}var temp=[];while(temp.length"};"use strict";var assert$4=utils_1$1.assert;function Signature(options,enc){if(options instanceof Signature)return options;if(this._importDER(options,enc))return;assert$4(options.r&&options.s,"Signature without r or s");this.r=new bn(options.r,16);this.s=new bn(options.s,16);if(options.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=options.recoveryParam}var signature=Signature;function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(initial&128)){return initial}var octetLen=initial&15;if(octetLen===0||octetLen>4){return false}var val=0;for(var i=0,off=p.place;i>>=0}if(val<=127){return false}p.place=off;return val}function rmPadding(buf){var i=0;var len=buf.length-1;while(!buf[i]&&!(buf[i+1]&128)&&i>>3);arr.push(octets|128);while(--octets){arr.push(len>>>(octets<<3)&255)}arr.push(len)}Signature.prototype.toDER=function toDER(enc){var r=this.r.toArray();var s=this.s.toArray();if(r[0]&128)r=[0].concat(r);if(s[0]&128)s=[0].concat(s);r=rmPadding(r);s=rmPadding(s);while(!s[0]&&!(s[1]&128)){s=s.slice(1)}var arr=[2];constructLength(arr,r.length);arr=arr.concat(r);arr.push(2);constructLength(arr,s.length);var backHalf=arr.concat(s);var res=[48];constructLength(res,backHalf.length);res=res.concat(backHalf);return utils_1$1.encode(res,enc)};"use strict";var rand=function(){throw new Error("unsupported")};var assert$5=utils_1$1.assert;function EC(options){if(!(this instanceof EC))return new EC(options);if(typeof options==="string"){assert$5(Object.prototype.hasOwnProperty.call(curves_1,options),"Unknown curve "+options);options=curves_1[options]}if(options instanceof curves_1.PresetCurve)options={curve:options};this.curve=options.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=options.curve.g;this.g.precompute(options.curve.n.bitLength()+1);this.hash=options.hash||options.curve.hash}var ec=EC;EC.prototype.keyPair=function keyPair(options){return new key(this,options)};EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return key.fromPrivate(this,priv,enc)};EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return key.fromPublic(this,pub,enc)};EC.prototype.genKeyPair=function genKeyPair(options){if(!options)options={};var drbg=new hmacDrbg({hash:this.hash,pers:options.pers,persEnc:options.persEnc||"utf8",entropy:options.entropy||rand(this.hash.hmacStrength),entropyEnc:options.entropy&&options.entropyEnc||"utf8",nonce:this.n.toArray()});var bytes=this.n.byteLength();var ns2=this.n.sub(new bn(2));for(;;){var priv=new bn(drbg.generate(bytes));if(priv.cmp(ns2)>0)continue;priv.iaddn(1);return this.keyFromPrivate(priv)}};EC.prototype._truncateToN=function _truncateToN(msg,truncOnly){var delta=msg.byteLength()*8-this.n.bitLength();if(delta>0)msg=msg.ushrn(delta);if(!truncOnly&&msg.cmp(this.n)>=0)return msg.sub(this.n);else return msg};EC.prototype.sign=function sign(msg,key,enc,options){if(typeof enc==="object"){options=enc;enc=null}if(!options)options={};key=this.keyFromPrivate(key,enc);msg=this._truncateToN(new bn(msg,16));var bytes=this.n.byteLength();var bkey=key.getPrivate().toArray("be",bytes);var nonce=msg.toArray("be",bytes);var drbg=new hmacDrbg({hash:this.hash,entropy:bkey,nonce:nonce,pers:options.pers,persEnc:options.persEnc||"utf8"});var ns1=this.n.sub(new bn(1));for(var iter=0;;iter++){var k=options.k?options.k(iter):new bn(drbg.generate(this.n.byteLength()));k=this._truncateToN(k,true);if(k.cmpn(1)<=0||k.cmp(ns1)>=0)continue;var kp=this.g.mul(k);if(kp.isInfinity())continue;var kpX=kp.getX();var r=kpX.umod(this.n);if(r.cmpn(0)===0)continue;var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));s=s.umod(this.n);if(s.cmpn(0)===0)continue;var recoveryParam=(kp.getY().isOdd()?1:0)|(kpX.cmp(r)!==0?2:0);if(options.canonical&&s.cmp(this.nh)>0){s=this.n.sub(s);recoveryParam^=1}return new signature({r:r,s:s,recoveryParam:recoveryParam})}};EC.prototype.verify=function verify(msg,signature$1,key,enc){msg=this._truncateToN(new bn(msg,16));key=this.keyFromPublic(key,enc);signature$1=new signature(signature$1,"hex");var r=signature$1.r;var s=signature$1.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return false;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return false;var sinv=s.invm(this.n);var u1=sinv.mul(msg).umod(this.n);var u2=sinv.mul(r).umod(this.n);var p;if(!this.curve._maxwellTrick){p=this.g.mulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.getX().umod(this.n).cmp(r)===0}p=this.g.jmulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.eqXToP(r)};EC.prototype.recoverPubKey=function(msg,signature$1,j,enc){assert$5((3&j)===j,"The recovery param is more than two bits");signature$1=new signature(signature$1,enc);var n=this.n;var e=new bn(msg);var r=signature$1.r;var s=signature$1.s;var isYOdd=j&1;var isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");if(isSecondKey)r=this.curve.pointFromX(r.add(this.curve.n),isYOdd);else r=this.curve.pointFromX(r,isYOdd);var rInv=signature$1.r.invm(n);var s1=n.sub(e).mul(rInv).umod(n);var s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)};EC.prototype.getKeyRecoveryParam=function(e,signature$1,Q,enc){signature$1=new signature(signature$1,enc);if(signature$1.recoveryParam!==null)return signature$1.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature$1,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")};var elliptic_1=createCommonjsModule$1(function(module,exports){"use strict";var elliptic=exports;elliptic.version={version:"6.5.4"}.version;elliptic.utils=utils_1$1;elliptic.rand=function(){throw new Error("unsupported")};elliptic.curve=curve_1;elliptic.curves=curves_1;elliptic.ec=ec;elliptic.eddsa=null});var EC$1=elliptic_1.ec;const version$b="signing-key/5.5.0";"use strict";const logger$g=new Logger(version$b);let _curve=null;function getCurve(){if(!_curve){_curve=new EC$1("secp256k1")}return _curve}class SigningKey{constructor(privateKey){defineReadOnly(this,"curve","secp256k1");defineReadOnly(this,"privateKey",hexlify(privateKey));const keyPair=getCurve().keyFromPrivate(arrayify(this.privateKey));defineReadOnly(this,"publicKey","0x"+keyPair.getPublic(false,"hex"));defineReadOnly(this,"compressedPublicKey","0x"+keyPair.getPublic(true,"hex"));defineReadOnly(this,"_isSigningKey",true)}_addPoint(other){const p0=getCurve().keyFromPublic(arrayify(this.publicKey));const p1=getCurve().keyFromPublic(arrayify(other));return"0x"+p0.pub.add(p1.pub).encodeCompressed("hex")}signDigest(digest){const keyPair=getCurve().keyFromPrivate(arrayify(this.privateKey));const digestBytes=arrayify(digest);if(digestBytes.length!==32){logger$g.throwArgumentError("bad digest length","digest",digest)}const signature=keyPair.sign(digestBytes,{canonical:true});return splitSignature({recoveryParam:signature.recoveryParam,r:hexZeroPad("0x"+signature.r.toString(16),32),s:hexZeroPad("0x"+signature.s.toString(16),32)})}computeSharedSecret(otherKey){const keyPair=getCurve().keyFromPrivate(arrayify(this.privateKey));const otherKeyPair=getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));return hexZeroPad("0x"+keyPair.derive(otherKeyPair.getPublic()).toString(16),32)}static isSigningKey(value){return!!(value&&value._isSigningKey)}}function recoverPublicKey(digest,signature){const sig=splitSignature(signature);const rs={r:arrayify(sig.r),s:arrayify(sig.s)};return"0x"+getCurve().recoverPubKey(arrayify(digest),rs,sig.recoveryParam).encode("hex",false)}function computePublicKey(key,compressed){const bytes=arrayify(key);if(bytes.length===32){const signingKey=new SigningKey(bytes);if(compressed){return"0x"+getCurve().keyFromPrivate(bytes).getPublic(true,"hex")}return signingKey.publicKey}else if(bytes.length===33){if(compressed){return hexlify(bytes)}return"0x"+getCurve().keyFromPublic(bytes).getPublic(false,"hex")}else if(bytes.length===65){if(!compressed){return hexlify(bytes)}return"0x"+getCurve().keyFromPublic(bytes).getPublic(true,"hex")}return logger$g.throwArgumentError("invalid public or private key","key","[REDACTED]")}const version$c="transactions/5.5.0";"use strict";const logger$h=new Logger(version$c);var TransactionTypes;(function(TransactionTypes){TransactionTypes[TransactionTypes["legacy"]=0]="legacy";TransactionTypes[TransactionTypes["eip2930"]=1]="eip2930";TransactionTypes[TransactionTypes["eip1559"]=2]="eip1559"})(TransactionTypes||(TransactionTypes={}));function handleAddress(value){if(value==="0x"){return null}return getAddress(value)}function handleNumber(value){if(value==="0x"){return Zero$1}return BigNumber.from(value)}const transactionFields=[{name:"nonce",maxLength:32,numeric:true},{name:"gasPrice",maxLength:32,numeric:true},{name:"gasLimit",maxLength:32,numeric:true},{name:"to",length:20},{name:"value",maxLength:32,numeric:true},{name:"data"}];const allowedTransactionKeys$1={chainId:true,data:true,gasLimit:true,gasPrice:true,nonce:true,to:true,type:true,value:true};function computeAddress(key){const publicKey=computePublicKey(key);return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey,1)),12))}function recoverAddress(digest,signature){return computeAddress(recoverPublicKey(arrayify(digest),signature))}function formatNumber(value,name){const result=stripZeros(BigNumber.from(value).toHexString());if(result.length>32){logger$h.throwArgumentError("invalid length for "+name,"transaction:"+name,value)}return result}function accessSetify(addr,storageKeys){return{address:getAddress(addr),storageKeys:(storageKeys||[]).map((storageKey,index)=>{if(hexDataLength(storageKey)!==32){logger$h.throwArgumentError("invalid access list storageKey",`accessList[${addr}:${index}]`,storageKey)}return storageKey.toLowerCase()})}}function accessListify(value){if(Array.isArray(value)){return value.map((set,index)=>{if(Array.isArray(set)){if(set.length>2){logger$h.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${index}]`,set)}return accessSetify(set[0],set[1])}return accessSetify(set.address,set.storageKeys)})}const result=Object.keys(value).map(addr=>{const storageKeys=value[addr].reduce((accum,storageKey)=>{accum[storageKey]=true;return accum},{});return accessSetify(addr,Object.keys(storageKeys).sort())});result.sort((a,b)=>a.address.localeCompare(b.address));return result}function formatAccessList(value){return accessListify(value).map(set=>[set.address,set.storageKeys])}function _serializeEip1559(transaction,signature){if(transaction.gasPrice!=null){const gasPrice=BigNumber.from(transaction.gasPrice);const maxFeePerGas=BigNumber.from(transaction.maxFeePerGas||0);if(!gasPrice.eq(maxFeePerGas)){logger$h.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:gasPrice,maxFeePerGas:maxFeePerGas})}}const fields=[formatNumber(transaction.chainId||0,"chainId"),formatNumber(transaction.nonce||0,"nonce"),formatNumber(transaction.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber(transaction.maxFeePerGas||0,"maxFeePerGas"),formatNumber(transaction.gasLimit||0,"gasLimit"),transaction.to!=null?getAddress(transaction.to):"0x",formatNumber(transaction.value||0,"value"),transaction.data||"0x",formatAccessList(transaction.accessList||[])];if(signature){const sig=splitSignature(signature);fields.push(formatNumber(sig.recoveryParam,"recoveryParam"));fields.push(stripZeros(sig.r));fields.push(stripZeros(sig.s))}return hexConcat(["0x02",encode(fields)])}function _serializeEip2930(transaction,signature){const fields=[formatNumber(transaction.chainId||0,"chainId"),formatNumber(transaction.nonce||0,"nonce"),formatNumber(transaction.gasPrice||0,"gasPrice"),formatNumber(transaction.gasLimit||0,"gasLimit"),transaction.to!=null?getAddress(transaction.to):"0x",formatNumber(transaction.value||0,"value"),transaction.data||"0x",formatAccessList(transaction.accessList||[])];if(signature){const sig=splitSignature(signature);fields.push(formatNumber(sig.recoveryParam,"recoveryParam"));fields.push(stripZeros(sig.r));fields.push(stripZeros(sig.s))}return hexConcat(["0x01",encode(fields)])}function _serialize(transaction,signature){checkProperties(transaction,allowedTransactionKeys$1);const raw=[];transactionFields.forEach(function(fieldInfo){let value=transaction[fieldInfo.name]||[];const options={};if(fieldInfo.numeric){options.hexPad="left"}value=arrayify(hexlify(value,options));if(fieldInfo.length&&value.length!==fieldInfo.length&&value.length>0){logger$h.throwArgumentError("invalid length for "+fieldInfo.name,"transaction:"+fieldInfo.name,value)}if(fieldInfo.maxLength){value=stripZeros(value);if(value.length>fieldInfo.maxLength){logger$h.throwArgumentError("invalid length for "+fieldInfo.name,"transaction:"+fieldInfo.name,value)}}raw.push(hexlify(value))});let chainId=0;if(transaction.chainId!=null){chainId=transaction.chainId;if(typeof chainId!=="number"){logger$h.throwArgumentError("invalid transaction.chainId","transaction",transaction)}}else if(signature&&!isBytesLike(signature)&&signature.v>28){chainId=Math.floor((signature.v-35)/2)}if(chainId!==0){raw.push(hexlify(chainId));raw.push("0x");raw.push("0x")}if(!signature){return encode(raw)}const sig=splitSignature(signature);let v=27+sig.recoveryParam;if(chainId!==0){raw.pop();raw.pop();raw.pop();v+=chainId*2+8;if(sig.v>28&&sig.v!==v){logger$h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",signature)}}else if(sig.v!==v){logger$h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",signature)}raw.push(hexlify(v));raw.push(stripZeros(arrayify(sig.r)));raw.push(stripZeros(arrayify(sig.s)));return encode(raw)}function serialize(transaction,signature){if(transaction.type==null||transaction.type===0){if(transaction.accessList!=null){logger$h.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",transaction)}return _serialize(transaction,signature)}switch(transaction.type){case 1:return _serializeEip2930(transaction,signature);case 2:return _serializeEip1559(transaction,signature);default:break}return logger$h.throwError(`unsupported transaction type: ${transaction.type}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:transaction.type})}function _parseEipSignature(tx,fields,serialize){try{const recid=handleNumber(fields[0]).toNumber();if(recid!==0&&recid!==1){throw new Error("bad recid")}tx.v=recid}catch(error){logger$h.throwArgumentError("invalid v for transaction type: 1","v",fields[0])}tx.r=hexZeroPad(fields[1],32);tx.s=hexZeroPad(fields[2],32);try{const digest=keccak256(serialize(tx));tx.from=recoverAddress(digest,{r:tx.r,s:tx.s,recoveryParam:tx.v})}catch(error){console.log(error)}}function _parseEip1559(payload){const transaction=decode(payload.slice(1));if(transaction.length!==9&&transaction.length!==12){logger$h.throwArgumentError("invalid component count for transaction type: 2","payload",hexlify(payload))}const maxPriorityFeePerGas=handleNumber(transaction[2]);const maxFeePerGas=handleNumber(transaction[3]);const tx={type:2,chainId:handleNumber(transaction[0]).toNumber(),nonce:handleNumber(transaction[1]).toNumber(),maxPriorityFeePerGas:maxPriorityFeePerGas,maxFeePerGas:maxFeePerGas,gasPrice:null,gasLimit:handleNumber(transaction[4]),to:handleAddress(transaction[5]),value:handleNumber(transaction[6]),data:transaction[7],accessList:accessListify(transaction[8])};if(transaction.length===9){return tx}tx.hash=keccak256(payload);_parseEipSignature(tx,transaction.slice(9),_serializeEip1559);return tx}function _parseEip2930(payload){const transaction=decode(payload.slice(1));if(transaction.length!==8&&transaction.length!==11){logger$h.throwArgumentError("invalid component count for transaction type: 1","payload",hexlify(payload))}const tx={type:1,chainId:handleNumber(transaction[0]).toNumber(),nonce:handleNumber(transaction[1]).toNumber(),gasPrice:handleNumber(transaction[2]),gasLimit:handleNumber(transaction[3]),to:handleAddress(transaction[4]),value:handleNumber(transaction[5]),data:transaction[6],accessList:accessListify(transaction[7])};if(transaction.length===8){return tx}tx.hash=keccak256(payload);_parseEipSignature(tx,transaction.slice(8),_serializeEip2930);return tx}function _parse(rawTransaction){const transaction=decode(rawTransaction);if(transaction.length!==9&&transaction.length!==6){logger$h.throwArgumentError("invalid raw transaction","rawTransaction",rawTransaction)}const tx={nonce:handleNumber(transaction[0]).toNumber(),gasPrice:handleNumber(transaction[1]),gasLimit:handleNumber(transaction[2]),to:handleAddress(transaction[3]),value:handleNumber(transaction[4]),data:transaction[5],chainId:0};if(transaction.length===6){return tx}try{tx.v=BigNumber.from(transaction[6]).toNumber()}catch(error){console.log(error);return tx}tx.r=hexZeroPad(transaction[7],32);tx.s=hexZeroPad(transaction[8],32);if(BigNumber.from(tx.r).isZero()&&BigNumber.from(tx.s).isZero()){tx.chainId=tx.v;tx.v=0}else{tx.chainId=Math.floor((tx.v-35)/2);if(tx.chainId<0){tx.chainId=0}let recoveryParam=tx.v-27;const raw=transaction.slice(0,6);if(tx.chainId!==0){raw.push(hexlify(tx.chainId));raw.push("0x");raw.push("0x");recoveryParam-=tx.chainId*2+8}const digest=keccak256(encode(raw));try{tx.from=recoverAddress(digest,{r:hexlify(tx.r),s:hexlify(tx.s),recoveryParam:recoveryParam})}catch(error){console.log(error)}tx.hash=keccak256(rawTransaction)}tx.type=null;return tx}function parse(rawTransaction){const payload=arrayify(rawTransaction);if(payload[0]>127){return _parse(payload)}switch(payload[0]){case 1:return _parseEip2930(payload);case 2:return _parseEip1559(payload);default:break}return logger$h.throwError(`unsupported transaction type: ${payload[0]}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:payload[0]})}const version$d="contracts/5.5.0";"use strict";var __awaiter$4=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$i=new Logger(version$d);const allowedTransactionKeys$2={chainId:true,data:true,from:true,gasLimit:true,gasPrice:true,nonce:true,to:true,value:true,type:true,accessList:true,maxFeePerGas:true,maxPriorityFeePerGas:true,customData:true};function resolveName(resolver,nameOrPromise){return __awaiter$4(this,void 0,void 0,function*(){const name=yield nameOrPromise;if(typeof name!=="string"){logger$i.throwArgumentError("invalid address or ENS name","name",name)}try{return getAddress(name)}catch(error){}if(!resolver){logger$i.throwError("a provider or signer is needed to resolve ENS names",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"})}const address=yield resolver.resolveName(name);if(address==null){logger$i.throwArgumentError("resolver or addr is not configured for ENS name","name",name)}return address})}function resolveAddresses(resolver,value,paramType){return __awaiter$4(this,void 0,void 0,function*(){if(Array.isArray(paramType)){return yield Promise.all(paramType.map((paramType,index)=>{return resolveAddresses(resolver,Array.isArray(value)?value[index]:value[paramType.name],paramType)}))}if(paramType.type==="address"){return yield resolveName(resolver,value)}if(paramType.type==="tuple"){return yield resolveAddresses(resolver,value,paramType.components)}if(paramType.baseType==="array"){if(!Array.isArray(value)){return Promise.reject(logger$i.makeError("invalid value for array",Logger.errors.INVALID_ARGUMENT,{argument:"value",value:value}))}return yield Promise.all(value.map(v=>resolveAddresses(resolver,v,paramType.arrayChildren)))}return value})}function populateTransaction(contract,fragment,args){return __awaiter$4(this,void 0,void 0,function*(){let overrides={};if(args.length===fragment.inputs.length+1&&typeof args[args.length-1]==="object"){overrides=shallowCopy(args.pop())}logger$i.checkArgumentCount(args.length,fragment.inputs.length,"passed to contract");if(contract.signer){if(overrides.from){overrides.from=resolveProperties({override:resolveName(contract.signer,overrides.from),signer:contract.signer.getAddress()}).then(check=>__awaiter$4(this,void 0,void 0,function*(){if(getAddress(check.signer)!==check.override){logger$i.throwError("Contract with a Signer cannot override from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"})}return check.override}))}else{overrides.from=contract.signer.getAddress()}}else if(overrides.from){overrides.from=resolveName(contract.provider,overrides.from)}const resolved=yield resolveProperties({args:resolveAddresses(contract.signer||contract.provider,args,fragment.inputs),address:contract.resolvedAddress,overrides:resolveProperties(overrides)||{}});const data=contract.interface.encodeFunctionData(fragment,resolved.args);const tx={data:data,to:resolved.address};const ro=resolved.overrides;if(ro.nonce!=null){tx.nonce=BigNumber.from(ro.nonce).toNumber()}if(ro.gasLimit!=null){tx.gasLimit=BigNumber.from(ro.gasLimit)}if(ro.gasPrice!=null){tx.gasPrice=BigNumber.from(ro.gasPrice)}if(ro.maxFeePerGas!=null){tx.maxFeePerGas=BigNumber.from(ro.maxFeePerGas)}if(ro.maxPriorityFeePerGas!=null){tx.maxPriorityFeePerGas=BigNumber.from(ro.maxPriorityFeePerGas)}if(ro.from!=null){tx.from=ro.from}if(ro.type!=null){tx.type=ro.type}if(ro.accessList!=null){tx.accessList=accessListify(ro.accessList)}if(tx.gasLimit==null&&fragment.gas!=null){let intrinsic=21e3;const bytes=arrayify(data);for(let i=0;ioverrides[key]!=null);if(leftovers.length){logger$i.throwError(`cannot override ${leftovers.map(l=>JSON.stringify(l)).join(",")}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:leftovers})}return tx})}function buildPopulate(contract,fragment){return function(...args){return populateTransaction(contract,fragment,args)}}function buildEstimate(contract,fragment){const signerOrProvider=contract.signer||contract.provider;return function(...args){return __awaiter$4(this,void 0,void 0,function*(){if(!signerOrProvider){logger$i.throwError("estimate require a provider or signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"})}const tx=yield populateTransaction(contract,fragment,args);return yield signerOrProvider.estimateGas(tx)})}}function addContractWait(contract,tx){const wait=tx.wait.bind(tx);tx.wait=(confirmations=>{return wait(confirmations).then(receipt=>{receipt.events=receipt.logs.map(log=>{let event=deepCopy(log);let parsed=null;try{parsed=contract.interface.parseLog(log)}catch(e){}if(parsed){event.args=parsed.args;event.decode=((data,topics)=>{return contract.interface.decodeEventLog(parsed.eventFragment,data,topics)});event.event=parsed.name;event.eventSignature=parsed.signature}event.removeListener=(()=>{return contract.provider});event.getBlock=(()=>{return contract.provider.getBlock(receipt.blockHash)});event.getTransaction=(()=>{return contract.provider.getTransaction(receipt.transactionHash)});event.getTransactionReceipt=(()=>{return Promise.resolve(receipt)});return event});return receipt})})}function buildCall(contract,fragment,collapseSimple){const signerOrProvider=contract.signer||contract.provider;return function(...args){return __awaiter$4(this,void 0,void 0,function*(){let blockTag=undefined;if(args.length===fragment.inputs.length+1&&typeof args[args.length-1]==="object"){const overrides=shallowCopy(args.pop());if(overrides.blockTag!=null){blockTag=yield overrides.blockTag}delete overrides.blockTag;args.push(overrides)}if(contract.deployTransaction!=null){yield contract._deployed(blockTag)}const tx=yield populateTransaction(contract,fragment,args);const result=yield signerOrProvider.call(tx,blockTag);try{let value=contract.interface.decodeFunctionResult(fragment,result);if(collapseSimple&&fragment.outputs.length===1){value=value[0]}return value}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION){error.address=contract.address;error.args=args;error.transaction=tx}throw error}})}}function buildSend(contract,fragment){return function(...args){return __awaiter$4(this,void 0,void 0,function*(){if(!contract.signer){logger$i.throwError("sending a transaction requires a signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"})}if(contract.deployTransaction!=null){yield contract._deployed()}const txRequest=yield populateTransaction(contract,fragment,args);const tx=yield contract.signer.sendTransaction(txRequest);addContractWait(contract,tx);return tx})}}function buildDefault(contract,fragment,collapseSimple){if(fragment.constant){return buildCall(contract,fragment,collapseSimple)}return buildSend(contract,fragment)}function getEventTag(filter){if(filter.address&&(filter.topics==null||filter.topics.length===0)){return"*"}return(filter.address||"*")+"@"+(filter.topics?filter.topics.map(topic=>{if(Array.isArray(topic)){return topic.join("|")}return topic}).join(":"):"")}class RunningEvent{constructor(tag,filter){defineReadOnly(this,"tag",tag);defineReadOnly(this,"filter",filter);this._listeners=[]}addListener(listener,once){this._listeners.push({listener:listener,once:once})}removeListener(listener){let done=false;this._listeners=this._listeners.filter(item=>{if(done||item.listener!==listener){return true}done=true;return false})}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(i=>i.listener)}listenerCount(){return this._listeners.length}run(args){const listenerCount=this.listenerCount();this._listeners=this._listeners.filter(item=>{const argsCopy=args.slice();setTimeout(()=>{item.listener.apply(this,argsCopy)},0);return!item.once});return listenerCount}prepareEvent(event){}getEmit(event){return[event]}}class ErrorRunningEvent extends RunningEvent{constructor(){super("error",null)}}class FragmentRunningEvent extends RunningEvent{constructor(address,contractInterface,fragment,topics){const filter={address:address};let topic=contractInterface.getEventTopic(fragment);if(topics){if(topic!==topics[0]){logger$i.throwArgumentError("topic mismatch","topics",topics)}filter.topics=topics.slice()}else{filter.topics=[topic]}super(getEventTag(filter),filter);defineReadOnly(this,"address",address);defineReadOnly(this,"interface",contractInterface);defineReadOnly(this,"fragment",fragment)}prepareEvent(event){super.prepareEvent(event);event.event=this.fragment.name;event.eventSignature=this.fragment.format();event.decode=((data,topics)=>{return this.interface.decodeEventLog(this.fragment,data,topics)});try{event.args=this.interface.decodeEventLog(this.fragment,event.data,event.topics)}catch(error){event.args=null;event.decodeError=error}}getEmit(event){const errors=checkResultErrors(event.args);if(errors.length){throw errors[0].error}const args=(event.args||[]).slice();args.push(event);return args}}class WildcardRunningEvent extends RunningEvent{constructor(address,contractInterface){super("*",{address:address});defineReadOnly(this,"address",address);defineReadOnly(this,"interface",contractInterface)}prepareEvent(event){super.prepareEvent(event);try{const parsed=this.interface.parseLog(event);event.event=parsed.name;event.eventSignature=parsed.signature;event.decode=((data,topics)=>{return this.interface.decodeEventLog(parsed.eventFragment,data,topics)});event.args=parsed.args}catch(error){}}}class BaseContract{constructor(addressOrName,contractInterface,signerOrProvider){logger$i.checkNew(new.target,Contract);defineReadOnly(this,"interface",getStatic(new.target,"getInterface")(contractInterface));if(signerOrProvider==null){defineReadOnly(this,"provider",null);defineReadOnly(this,"signer",null)}else if(Signer.isSigner(signerOrProvider)){defineReadOnly(this,"provider",signerOrProvider.provider||null);defineReadOnly(this,"signer",signerOrProvider)}else if(Provider.isProvider(signerOrProvider)){defineReadOnly(this,"provider",signerOrProvider);defineReadOnly(this,"signer",null)}else{logger$i.throwArgumentError("invalid signer or provider","signerOrProvider",signerOrProvider)}defineReadOnly(this,"callStatic",{});defineReadOnly(this,"estimateGas",{});defineReadOnly(this,"functions",{});defineReadOnly(this,"populateTransaction",{});defineReadOnly(this,"filters",{});{const uniqueFilters={};Object.keys(this.interface.events).forEach(eventSignature=>{const event=this.interface.events[eventSignature];defineReadOnly(this.filters,eventSignature,(...args)=>{return{address:this.address,topics:this.interface.encodeFilterTopics(event,args)}});if(!uniqueFilters[event.name]){uniqueFilters[event.name]=[]}uniqueFilters[event.name].push(eventSignature)});Object.keys(uniqueFilters).forEach(name=>{const filters=uniqueFilters[name];if(filters.length===1){defineReadOnly(this.filters,name,this.filters[filters[0]])}else{logger$i.warn(`Duplicate definition of ${name} (${filters.join(", ")})`)}})}defineReadOnly(this,"_runningEvents",{});defineReadOnly(this,"_wrappedEmits",{});if(addressOrName==null){logger$i.throwArgumentError("invalid contract address or ENS name","addressOrName",addressOrName)}defineReadOnly(this,"address",addressOrName);if(this.provider){defineReadOnly(this,"resolvedAddress",resolveName(this.provider,addressOrName))}else{try{defineReadOnly(this,"resolvedAddress",Promise.resolve(getAddress(addressOrName)))}catch(error){logger$i.throwError("provider is required to use ENS name as contract address",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}}const uniqueNames={};const uniqueSignatures={};Object.keys(this.interface.functions).forEach(signature=>{const fragment=this.interface.functions[signature];if(uniqueSignatures[signature]){logger$i.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`);return}uniqueSignatures[signature]=true;{const name=fragment.name;if(!uniqueNames[`%${name}`]){uniqueNames[`%${name}`]=[]}uniqueNames[`%${name}`].push(signature)}if(this[signature]==null){defineReadOnly(this,signature,buildDefault(this,fragment,true))}if(this.functions[signature]==null){defineReadOnly(this.functions,signature,buildDefault(this,fragment,false))}if(this.callStatic[signature]==null){defineReadOnly(this.callStatic,signature,buildCall(this,fragment,true))}if(this.populateTransaction[signature]==null){defineReadOnly(this.populateTransaction,signature,buildPopulate(this,fragment))}if(this.estimateGas[signature]==null){defineReadOnly(this.estimateGas,signature,buildEstimate(this,fragment))}});Object.keys(uniqueNames).forEach(name=>{const signatures=uniqueNames[name];if(signatures.length>1){return}name=name.substring(1);const signature=signatures[0];try{if(this[name]==null){defineReadOnly(this,name,this[signature])}}catch(e){}if(this.functions[name]==null){defineReadOnly(this.functions,name,this.functions[signature])}if(this.callStatic[name]==null){defineReadOnly(this.callStatic,name,this.callStatic[signature])}if(this.populateTransaction[name]==null){defineReadOnly(this.populateTransaction,name,this.populateTransaction[signature])}if(this.estimateGas[name]==null){defineReadOnly(this.estimateGas,name,this.estimateGas[signature])}})}static getContractAddress(transaction){return getContractAddress(transaction)}static getInterface(contractInterface){if(Interface.isInterface(contractInterface)){return contractInterface}return new Interface(contractInterface)}deployed(){return this._deployed()}_deployed(blockTag){if(!this._deployedPromise){if(this.deployTransaction){this._deployedPromise=this.deployTransaction.wait().then(()=>{return this})}else{this._deployedPromise=this.provider.getCode(this.address,blockTag).then(code=>{if(code==="0x"){logger$i.throwError("contract not deployed",Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"})}return this})}}return this._deployedPromise}fallback(overrides){if(!this.signer){logger$i.throwError("sending a transactions require a signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"})}const tx=shallowCopy(overrides||{});["from","to"].forEach(function(key){if(tx[key]==null){return}logger$i.throwError("cannot override "+key,Logger.errors.UNSUPPORTED_OPERATION,{operation:key})});tx.to=this.resolvedAddress;return this.deployed().then(()=>{return this.signer.sendTransaction(tx)})}connect(signerOrProvider){if(typeof signerOrProvider==="string"){signerOrProvider=new VoidSigner(signerOrProvider,this.provider)}const contract=new this.constructor(this.address,this.interface,signerOrProvider);if(this.deployTransaction){defineReadOnly(contract,"deployTransaction",this.deployTransaction)}return contract}attach(addressOrName){return new this.constructor(addressOrName,this.interface,this.signer||this.provider)}static isIndexed(value){return Indexed.isIndexed(value)}_normalizeRunningEvent(runningEvent){if(this._runningEvents[runningEvent.tag]){return this._runningEvents[runningEvent.tag]}return runningEvent}_getRunningEvent(eventName){if(typeof eventName==="string"){if(eventName==="error"){return this._normalizeRunningEvent(new ErrorRunningEvent)}if(eventName==="event"){return this._normalizeRunningEvent(new RunningEvent("event",null))}if(eventName==="*"){return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}const fragment=this.interface.getEvent(eventName);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,fragment))}if(eventName.topics&&eventName.topics.length>0){try{const topic=eventName.topics[0];if(typeof topic!=="string"){throw new Error("invalid topic")}const fragment=this.interface.getEvent(topic);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,fragment,eventName.topics))}catch(error){}const filter={address:this.address,topics:eventName.topics};return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter),filter))}return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}_checkRunningEvents(runningEvent){if(runningEvent.listenerCount()===0){delete this._runningEvents[runningEvent.tag];const emit=this._wrappedEmits[runningEvent.tag];if(emit&&runningEvent.filter){this.provider.off(runningEvent.filter,emit);delete this._wrappedEmits[runningEvent.tag]}}}_wrapEvent(runningEvent,log,listener){const event=deepCopy(log);event.removeListener=(()=>{if(!listener){return}runningEvent.removeListener(listener);this._checkRunningEvents(runningEvent)});event.getBlock=(()=>{return this.provider.getBlock(log.blockHash)});event.getTransaction=(()=>{return this.provider.getTransaction(log.transactionHash)});event.getTransactionReceipt=(()=>{return this.provider.getTransactionReceipt(log.transactionHash)});runningEvent.prepareEvent(event);return event}_addEventListener(runningEvent,listener,once){if(!this.provider){logger$i.throwError("events require a provider or a signer with a provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"})}runningEvent.addListener(listener,once);this._runningEvents[runningEvent.tag]=runningEvent;if(!this._wrappedEmits[runningEvent.tag]){const wrappedEmit=log=>{let event=this._wrapEvent(runningEvent,log,listener);if(event.decodeError==null){try{const args=runningEvent.getEmit(event);this.emit(runningEvent.filter,...args)}catch(error){event.decodeError=error.error}}if(runningEvent.filter!=null){this.emit("event",event)}if(event.decodeError!=null){this.emit("error",event.decodeError,event)}};this._wrappedEmits[runningEvent.tag]=wrappedEmit;if(runningEvent.filter!=null){this.provider.on(runningEvent.filter,wrappedEmit)}}}queryFilter(event,fromBlockOrBlockhash,toBlock){const runningEvent=this._getRunningEvent(event);const filter=shallowCopy(runningEvent.filter);if(typeof fromBlockOrBlockhash==="string"&&isHexString(fromBlockOrBlockhash,32)){if(toBlock!=null){logger$i.throwArgumentError("cannot specify toBlock with blockhash","toBlock",toBlock)}filter.blockHash=fromBlockOrBlockhash}else{filter.fromBlock=fromBlockOrBlockhash!=null?fromBlockOrBlockhash:0;filter.toBlock=toBlock!=null?toBlock:"latest"}return this.provider.getLogs(filter).then(logs=>{return logs.map(log=>this._wrapEvent(runningEvent,log,null))})}on(event,listener){this._addEventListener(this._getRunningEvent(event),listener,false);return this}once(event,listener){this._addEventListener(this._getRunningEvent(event),listener,true);return this}emit(eventName,...args){if(!this.provider){return false}const runningEvent=this._getRunningEvent(eventName);const result=runningEvent.run(args)>0;this._checkRunningEvents(runningEvent);return result}listenerCount(eventName){if(!this.provider){return 0}if(eventName==null){return Object.keys(this._runningEvents).reduce((accum,key)=>{return accum+this._runningEvents[key].listenerCount()},0)}return this._getRunningEvent(eventName).listenerCount()}listeners(eventName){if(!this.provider){return[]}if(eventName==null){const result=[];for(let tag in this._runningEvents){this._runningEvents[tag].listeners().forEach(listener=>{result.push(listener)})}return result}return this._getRunningEvent(eventName).listeners()}removeAllListeners(eventName){if(!this.provider){return this}if(eventName==null){for(const tag in this._runningEvents){const runningEvent=this._runningEvents[tag];runningEvent.removeAllListeners();this._checkRunningEvents(runningEvent)}return this}const runningEvent=this._getRunningEvent(eventName);runningEvent.removeAllListeners();this._checkRunningEvents(runningEvent);return this}off(eventName,listener){if(!this.provider){return this}const runningEvent=this._getRunningEvent(eventName);runningEvent.removeListener(listener);this._checkRunningEvents(runningEvent);return this}removeListener(eventName,listener){return this.off(eventName,listener)}}class Contract extends BaseContract{}class ContractFactory{constructor(contractInterface,bytecode,signer){let bytecodeHex=null;if(typeof bytecode==="string"){bytecodeHex=bytecode}else if(isBytes(bytecode)){bytecodeHex=hexlify(bytecode)}else if(bytecode&&typeof bytecode.object==="string"){bytecodeHex=bytecode.object}else{bytecodeHex="!"}if(bytecodeHex.substring(0,2)!=="0x"){bytecodeHex="0x"+bytecodeHex}if(!isHexString(bytecodeHex)||bytecodeHex.length%2){logger$i.throwArgumentError("invalid bytecode","bytecode",bytecode)}if(signer&&!Signer.isSigner(signer)){logger$i.throwArgumentError("invalid signer","signer",signer)}defineReadOnly(this,"bytecode",bytecodeHex);defineReadOnly(this,"interface",getStatic(new.target,"getInterface")(contractInterface));defineReadOnly(this,"signer",signer||null)}getDeployTransaction(...args){let tx={};if(args.length===this.interface.deploy.inputs.length+1&&typeof args[args.length-1]==="object"){tx=shallowCopy(args.pop());for(const key in tx){if(!allowedTransactionKeys$2[key]){throw new Error("unknown transaction override "+key)}}}["data","from","to"].forEach(key=>{if(tx[key]==null){return}logger$i.throwError("cannot override "+key,Logger.errors.UNSUPPORTED_OPERATION,{operation:key})});if(tx.value){const value=BigNumber.from(tx.value);if(!value.isZero()&&!this.interface.deploy.payable){logger$i.throwError("non-payable constructor cannot override value",Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:tx.value})}}logger$i.checkArgumentCount(args.length,this.interface.deploy.inputs.length," in Contract constructor");tx.data=hexlify(concat([this.bytecode,this.interface.encodeDeploy(args)]));return tx}deploy(...args){return __awaiter$4(this,void 0,void 0,function*(){let overrides={};if(args.length===this.interface.deploy.inputs.length+1){overrides=args.pop()}logger$i.checkArgumentCount(args.length,this.interface.deploy.inputs.length," in Contract constructor");const params=yield resolveAddresses(this.signer,args,this.interface.deploy.inputs);params.push(overrides);const unsignedTx=this.getDeployTransaction(...params);const tx=yield this.signer.sendTransaction(unsignedTx);const address=getStatic(this.constructor,"getContractAddress")(tx);const contract=getStatic(this.constructor,"getContract")(address,this.interface,this.signer);addContractWait(contract,tx);defineReadOnly(contract,"deployTransaction",tx);return contract})}attach(address){return this.constructor.getContract(address,this.interface,this.signer)}connect(signer){return new this.constructor(this.interface,this.bytecode,signer)}static fromSolidity(compilerOutput,signer){if(compilerOutput==null){logger$i.throwError("missing compiler output",Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"})}if(typeof compilerOutput==="string"){compilerOutput=JSON.parse(compilerOutput)}const abi=compilerOutput.abi;let bytecode=null;if(compilerOutput.bytecode){bytecode=compilerOutput.bytecode}else if(compilerOutput.evm&&compilerOutput.evm.bytecode){bytecode=compilerOutput.evm.bytecode}return new this(abi,bytecode,signer)}static getInterface(contractInterface){return Contract.getInterface(contractInterface)}static getContractAddress(tx){return getContractAddress(tx)}static getContract(address,contractInterface,signer){return new Contract(address,contractInterface,signer)}}class BaseX{constructor(alphabet){defineReadOnly(this,"alphabet",alphabet);defineReadOnly(this,"base",alphabet.length);defineReadOnly(this,"_alphabetMap",{});defineReadOnly(this,"_leader",alphabet.charAt(0));for(let i=0;i0){digits.push(carry%this.base);carry=carry/this.base|0}}let string="";for(let k=0;source[k]===0&&k=0;--q){string+=this.alphabet[digits[q]]}return string}decode(value){if(typeof value!=="string"){throw new TypeError("Expected String")}let bytes=[];if(value.length===0){return new Uint8Array(bytes)}bytes.push(0);for(let i=0;i>=8}while(carry>0){bytes.push(carry&255);carry>>=8}}for(let k=0;value[k]===this._leader&&k>24&255;block1[salt.length+1]=i>>16&255;block1[salt.length+2]=i>>8&255;block1[salt.length+3]=i&255;let U=arrayify(computeHmac(hashAlgorithm,password,block1));if(!hLen){hLen=U.length;T=new Uint8Array(hLen);l=Math.ceil(keylen/hLen);r=keylen-(l-1)*hLen}T.set(U);for(let j=1;j=256){throw new Error("Depth too large!")}return base58check(concat([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",hexlify(this.depth),this.parentFingerprint,hexZeroPad(hexlify(this.index),4),this.chainCode,this.privateKey!=null?concat(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new HDNode(_constructorGuard$3,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(index){if(index>4294967295){throw new Error("invalid index - "+String(index))}let path=this.path;if(path){path+="/"+(index&~HardenedBit)}const data=new Uint8Array(37);if(index&HardenedBit){if(!this.privateKey){throw new Error("cannot derive child of neutered node")}data.set(arrayify(this.privateKey),1);if(path){path+="'"}}else{data.set(arrayify(this.publicKey))}for(let i=24;i>=0;i-=8){data[33+(i>>3)]=index>>24-i&255}const I=arrayify(computeHmac(SupportedAlgorithm.sha512,this.chainCode,data));const IL=I.slice(0,32);const IR=I.slice(32);let ki=null;let Ki=null;if(this.privateKey){ki=bytes32(BigNumber.from(IL).add(this.privateKey).mod(N))}else{const ek=new SigningKey(hexlify(IL));Ki=ek._addPoint(this.publicKey)}let mnemonicOrPath=path;const srcMnemonic=this.mnemonic;if(srcMnemonic){mnemonicOrPath=Object.freeze({phrase:srcMnemonic.phrase,path:path,locale:srcMnemonic.locale||"en"})}return new HDNode(_constructorGuard$3,ki,Ki,this.fingerprint,bytes32(IR),index,this.depth+1,mnemonicOrPath)}derivePath(path){const components=path.split("/");if(components.length===0||components[0]==="m"&&this.depth!==0){throw new Error("invalid path - "+path)}if(components[0]==="m"){components.shift()}let result=this;for(let i=0;i=HardenedBit){throw new Error("invalid path index - "+component)}result=result._derive(HardenedBit+index)}else if(component.match(/^[0-9]+$/)){const index=parseInt(component);if(index>=HardenedBit){throw new Error("invalid path index - "+component)}result=result._derive(index)}else{throw new Error("invalid path component - "+component)}}return result}static _fromSeed(seed,mnemonic){const seedArray=arrayify(seed);if(seedArray.length<16||seedArray.length>64){throw new Error("invalid seed")}const I=arrayify(computeHmac(SupportedAlgorithm.sha512,MasterSecret,seedArray));return new HDNode(_constructorGuard$3,bytes32(I.slice(0,32)),null,"0x00000000",bytes32(I.slice(32)),0,0,mnemonic)}static fromMnemonic(mnemonic,password,wordlist){wordlist=getWordlist(wordlist);mnemonic=entropyToMnemonic(mnemonicToEntropy(mnemonic,wordlist),wordlist);return HDNode._fromSeed(mnemonicToSeed(mnemonic,password),{phrase:mnemonic,path:"m",locale:wordlist.locale})}static fromSeed(seed){return HDNode._fromSeed(seed,null)}static fromExtendedKey(extendedKey){const bytes=Base58.decode(extendedKey);if(bytes.length!==82||base58check(bytes.slice(0,78))!==extendedKey){logger$l.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}const depth=bytes[4];const parentFingerprint=hexlify(bytes.slice(5,9));const index=parseInt(hexlify(bytes.slice(9,13)).substring(2),16);const chainCode=hexlify(bytes.slice(13,45));const key=bytes.slice(45,78);switch(hexlify(bytes.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new HDNode(_constructorGuard$3,null,hexlify(key),parentFingerprint,chainCode,index,depth,null);case"0x0488ade4":case"0x04358394 ":if(key[0]!==0){break}return new HDNode(_constructorGuard$3,hexlify(key.slice(1)),null,parentFingerprint,chainCode,index,depth,null)}return logger$l.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function mnemonicToSeed(mnemonic,password){if(!password){password=""}const salt=toUtf8Bytes("mnemonic"+password,UnicodeNormalizationForm.NFKD);return pbkdf2(toUtf8Bytes(mnemonic,UnicodeNormalizationForm.NFKD),salt,2048,64,"sha512")}function mnemonicToEntropy(mnemonic,wordlist){wordlist=getWordlist(wordlist);logger$l.checkNormalize();const words=wordlist.split(mnemonic);if(words.length%3!==0){throw new Error("invalid mnemonic")}const entropy=arrayify(new Uint8Array(Math.ceil(11*words.length/8)));let offset=0;for(let i=0;i>3]|=1<<7-offset%8}offset++}}const entropyBits=32*words.length/3;const checksumBits=words.length/3;const checksumMask=getUpperMask(checksumBits);const checksum=arrayify(sha256$1(entropy.slice(0,entropyBits/8)))[0]&checksumMask;if(checksum!==(entropy[entropy.length-1]&checksumMask)){throw new Error("invalid checksum")}return hexlify(entropy.slice(0,entropyBits/8))}function entropyToMnemonic(entropy,wordlist){wordlist=getWordlist(wordlist);entropy=arrayify(entropy);if(entropy.length%4!==0||entropy.length<16||entropy.length>32){throw new Error("invalid entropy")}const indices=[0];let remainingBits=11;for(let i=0;i8){indices[indices.length-1]<<=8;indices[indices.length-1]|=entropy[i];remainingBits-=8}else{indices[indices.length-1]<<=remainingBits;indices[indices.length-1]|=entropy[i]>>8-remainingBits;indices.push(entropy[i]&getLowerMask(8-remainingBits));remainingBits+=3}}const checksumBits=entropy.length/4;const checksum=arrayify(sha256$1(entropy))[0]&getUpperMask(checksumBits);indices[indices.length-1]<<=checksumBits;indices[indices.length-1]|=checksum>>8-checksumBits;return wordlist.join(indices.map(index=>wordlist.getWord(index)))}function isValidMnemonic(mnemonic,wordlist){try{mnemonicToEntropy(mnemonic,wordlist);return true}catch(error){}return false}function getAccountPath(index){if(typeof index!=="number"||index<0||index>=HardenedBit||index%1){logger$l.throwArgumentError("invalid account index","index",index)}return`m/44'/60'/${index}'/0/0`}const version$h="random/5.5.0";"use strict";const logger$m=new Logger(version$h);let anyGlobal=null;try{anyGlobal=window;if(anyGlobal==null){throw new Error("try next")}}catch(error){try{anyGlobal=global;if(anyGlobal==null){throw new Error("try next")}}catch(error){anyGlobal={}}}let crypto=anyGlobal.crypto||anyGlobal.msCrypto;if(!crypto||!crypto.getRandomValues){logger$m.warn("WARNING: Missing strong random number source");crypto={getRandomValues:function(buffer){return logger$m.throwError("no secure random source avaialble",Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}}}function randomBytes(length){if(length<=0||length>1024||length%1||length!=length){logger$m.throwArgumentError("invalid length","length",length)}const result=new Uint8Array(length);crypto.getRandomValues(result);return arrayify(result)}"use strict";function shuffled(array){array=array.slice();for(let i=array.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));const tmp=array[i];array[i]=array[j];array[j]=tmp}return array}"use strict";var aesJs=createCommonjsModule(function(module,exports){"use strict";(function(root){function checkInt(value){return parseInt(value)===value}function checkInts(arrayish){if(!checkInt(arrayish.length)){return false}for(var i=0;i255){return false}}return true}function coerceArray(arg,copy){if(arg.buffer&&ArrayBuffer.isView(arg)&&arg.name==="Uint8Array"){if(copy){if(arg.slice){arg=arg.slice()}else{arg=Array.prototype.slice.call(arg)}}return arg}if(Array.isArray(arg)){if(!checkInts(arg)){throw new Error("Array contains invalid value: "+arg)}return new Uint8Array(arg)}if(checkInt(arg.length)&&checkInts(arg)){return new Uint8Array(arg)}throw new Error("unsupported array-like object")}function createArray(length){return new Uint8Array(length)}function copyArray(sourceArray,targetArray,targetStart,sourceStart,sourceEnd){if(sourceStart!=null||sourceEnd!=null){if(sourceArray.slice){sourceArray=sourceArray.slice(sourceStart,sourceEnd)}else{sourceArray=Array.prototype.slice.call(sourceArray,sourceStart,sourceEnd)}}targetArray.set(sourceArray,targetStart)}var convertUtf8=function(){function toBytes(text){var result=[],i=0;text=encodeURI(text);while(i191&&c<224){result.push(String.fromCharCode((c&31)<<6|bytes[i+1]&63));i+=2}else{result.push(String.fromCharCode((c&15)<<12|(bytes[i+1]&63)<<6|bytes[i+2]&63));i+=3}}return result.join("")}return{toBytes:toBytes,fromBytes:fromBytes}}();var convertHex=function(){function toBytes(text){var result=[];for(var i=0;i>4]+Hex[v&15])}return result.join("")}return{toBytes:toBytes,fromBytes:fromBytes}}();var numberOfRounds={16:10,24:12,32:14};var rcon=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145];var S=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];var Si=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125];var T1=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986];var T2=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766];var T3=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126];var T4=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436];var T5=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890];var T6=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935];var T7=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600];var T8=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480];var U1=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795];var U2=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855];var U3=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150];var U4=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function convertToInt32(bytes){var result=[];for(var i=0;i>2;this._Ke[index][i%4]=tk[i];this._Kd[rounds-index][i%4]=tk[i]}var rconpointer=0;var t=KC,tt;while(t>16&255]<<24^S[tt>>8&255]<<16^S[tt&255]<<8^S[tt>>24&255]^rcon[rconpointer]<<24;rconpointer+=1;if(KC!=8){for(var i=1;i>8&255]<<8^S[tt>>16&255]<<16^S[tt>>24&255]<<24;for(var i=KC/2+1;i>2;c=t%4;this._Ke[r][c]=tk[i];this._Kd[rounds-r][c]=tk[i++];t++}}for(var r=1;r>24&255]^U2[tt>>16&255]^U3[tt>>8&255]^U4[tt&255]}}};AES.prototype.encrypt=function(plaintext){if(plaintext.length!=16){throw new Error("invalid plaintext size (must be 16 bytes)")}var rounds=this._Ke.length-1;var a=[0,0,0,0];var t=convertToInt32(plaintext);for(var i=0;i<4;i++){t[i]^=this._Ke[0][i]}for(var r=1;r>24&255]^T2[t[(i+1)%4]>>16&255]^T3[t[(i+2)%4]>>8&255]^T4[t[(i+3)%4]&255]^this._Ke[r][i]}t=a.slice()}var result=createArray(16),tt;for(var i=0;i<4;i++){tt=this._Ke[rounds][i];result[4*i]=(S[t[i]>>24&255]^tt>>24)&255;result[4*i+1]=(S[t[(i+1)%4]>>16&255]^tt>>16)&255;result[4*i+2]=(S[t[(i+2)%4]>>8&255]^tt>>8)&255;result[4*i+3]=(S[t[(i+3)%4]&255]^tt)&255}return result};AES.prototype.decrypt=function(ciphertext){if(ciphertext.length!=16){throw new Error("invalid ciphertext size (must be 16 bytes)")}var rounds=this._Kd.length-1;var a=[0,0,0,0];var t=convertToInt32(ciphertext);for(var i=0;i<4;i++){t[i]^=this._Kd[0][i]}for(var r=1;r>24&255]^T6[t[(i+3)%4]>>16&255]^T7[t[(i+2)%4]>>8&255]^T8[t[(i+1)%4]&255]^this._Kd[r][i]}t=a.slice()}var result=createArray(16),tt;for(var i=0;i<4;i++){tt=this._Kd[rounds][i];result[4*i]=(Si[t[i]>>24&255]^tt>>24)&255;result[4*i+1]=(Si[t[(i+3)%4]>>16&255]^tt>>16)&255;result[4*i+2]=(Si[t[(i+2)%4]>>8&255]^tt>>8)&255;result[4*i+3]=(Si[t[(i+1)%4]&255]^tt)&255}return result};var ModeOfOperationECB=function(key){if(!(this instanceof ModeOfOperationECB)){throw Error("AES must be instanitated with `new`")}this.description="Electronic Code Block";this.name="ecb";this._aes=new AES(key)};ModeOfOperationECB.prototype.encrypt=function(plaintext){plaintext=coerceArray(plaintext);if(plaintext.length%16!==0){throw new Error("invalid plaintext size (must be multiple of 16 bytes)")}var ciphertext=createArray(plaintext.length);var block=createArray(16);for(var i=0;i=0;--index){this._counter[index]=value%256;value=value>>8}};Counter.prototype.setBytes=function(bytes){bytes=coerceArray(bytes,true);if(bytes.length!=16){throw new Error("invalid counter bytes size (must be 16 bytes)")}this._counter=bytes};Counter.prototype.increment=function(){for(var i=15;i>=0;i--){if(this._counter[i]===255){this._counter[i]=0}else{this._counter[i]++;break}}};var ModeOfOperationCTR=function(key,counter){if(!(this instanceof ModeOfOperationCTR)){throw Error("AES must be instanitated with `new`")}this.description="Counter";this.name="ctr";if(!(counter instanceof Counter)){counter=new Counter(counter)}this._counter=counter;this._remainingCounter=null;this._remainingCounterIndex=16;this._aes=new AES(key)};ModeOfOperationCTR.prototype.encrypt=function(plaintext){var encrypted=coerceArray(plaintext,true);for(var i=0;i16){throw new Error("PKCS#7 padding byte out of range")}var length=data.length-padder;for(var i=0;i=64){let a=h0,b=h1,c=h2,d=h3,e=h4,f=h5,g=h6,h=h7,u,i,j,t1,t2;for(i=0;i<16;i++){j=off+i*4;w[i]=(p[j]&255)<<24|(p[j+1]&255)<<16|(p[j+2]&255)<<8|p[j+3]&255}for(i=16;i<64;i++){u=w[i-2];t1=(u>>>17|u<<32-17)^(u>>>19|u<<32-19)^u>>>10;u=w[i-15];t2=(u>>>7|u<<32-7)^(u>>>18|u<<32-18)^u>>>3;w[i]=(t1+w[i-7]|0)+(t2+w[i-16]|0)|0}for(i=0;i<64;i++){t1=(((e>>>6|e<<32-6)^(e>>>11|e<<32-11)^(e>>>25|e<<32-25))+(e&f^~e&g)|0)+(h+(K[i]+w[i]|0)|0)|0;t2=((a>>>2|a<<32-2)^(a>>>13|a<<32-13)^(a>>>22|a<<32-22))+(a&b^a&c^b&c)|0;h=g;g=f;f=e;e=d+t1|0;d=c;c=b;b=a;a=t1+t2|0}h0=h0+a|0;h1=h1+b|0;h2=h2+c|0;h3=h3+d|0;h4=h4+e|0;h5=h5+f|0;h6=h6+g|0;h7=h7+h|0;off+=64;len-=64}}blocks(m);let i,bytesLeft=m.length%64,bitLenHi=m.length/536870912|0,bitLenLo=m.length<<3,numZeros=bytesLeft<56?56:120,p=m.slice(m.length-bytesLeft,m.length);p.push(128);for(i=bytesLeft+1;i>>24&255);p.push(bitLenHi>>>16&255);p.push(bitLenHi>>>8&255);p.push(bitLenHi>>>0&255);p.push(bitLenLo>>>24&255);p.push(bitLenLo>>>16&255);p.push(bitLenLo>>>8&255);p.push(bitLenLo>>>0&255);blocks(p);return[h0>>>24&255,h0>>>16&255,h0>>>8&255,h0>>>0&255,h1>>>24&255,h1>>>16&255,h1>>>8&255,h1>>>0&255,h2>>>24&255,h2>>>16&255,h2>>>8&255,h2>>>0&255,h3>>>24&255,h3>>>16&255,h3>>>8&255,h3>>>0&255,h4>>>24&255,h4>>>16&255,h4>>>8&255,h4>>>0&255,h5>>>24&255,h5>>>16&255,h5>>>8&255,h5>>>0&255,h6>>>24&255,h6>>>16&255,h6>>>8&255,h6>>>0&255,h7>>>24&255,h7>>>16&255,h7>>>8&255,h7>>>0&255]}function PBKDF2_HMAC_SHA256_OneIter(password,salt,dkLen){password=password.length<=64?password:SHA256(password);const innerLen=64+salt.length+4;const inner=new Array(innerLen);const outerKey=new Array(64);let i;let dk=[];for(i=0;i<64;i++){inner[i]=54}for(i=0;i=innerLen-4;i--){inner[i]++;if(inner[i]<=255)return;inner[i]=0}}while(dkLen>=32){incrementCounter();dk=dk.concat(SHA256(outerKey.concat(SHA256(inner))));dkLen-=32}if(dkLen>0){incrementCounter();dk=dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0,dkLen))}return dk}function blockmix_salsa8(BY,Yi,r,x,_X){let i;arraycopy(BY,(2*r-1)*16,_X,0,16);for(i=0;i<2*r;i++){blockxor(BY,i*16,_X,16);salsa20_8(_X,x);arraycopy(_X,0,BY,Yi+i*16,16)}for(i=0;i>>32-b}function salsa20_8(B,x){arraycopy(B,0,x,0,16);for(let i=8;i>0;i-=2){x[4]^=R(x[0]+x[12],7);x[8]^=R(x[4]+x[0],9);x[12]^=R(x[8]+x[4],13);x[0]^=R(x[12]+x[8],18);x[9]^=R(x[5]+x[1],7);x[13]^=R(x[9]+x[5],9);x[1]^=R(x[13]+x[9],13);x[5]^=R(x[1]+x[13],18);x[14]^=R(x[10]+x[6],7);x[2]^=R(x[14]+x[10],9);x[6]^=R(x[2]+x[14],13);x[10]^=R(x[6]+x[2],18);x[3]^=R(x[15]+x[11],7);x[7]^=R(x[3]+x[15],9);x[11]^=R(x[7]+x[3],13);x[15]^=R(x[11]+x[7],18);x[1]^=R(x[0]+x[3],7);x[2]^=R(x[1]+x[0],9);x[3]^=R(x[2]+x[1],13);x[0]^=R(x[3]+x[2],18);x[6]^=R(x[5]+x[4],7);x[7]^=R(x[6]+x[5],9);x[4]^=R(x[7]+x[6],13);x[5]^=R(x[4]+x[7],18);x[11]^=R(x[10]+x[9],7);x[8]^=R(x[11]+x[10],9);x[9]^=R(x[8]+x[11],13);x[10]^=R(x[9]+x[8],18);x[12]^=R(x[15]+x[14],7);x[13]^=R(x[12]+x[15],9);x[14]^=R(x[13]+x[12],13);x[15]^=R(x[14]+x[13],18)}for(let i=0;i<16;++i){B[i]+=x[i]}}function blockxor(S,Si,D,len){for(let i=0;i=256){return false}}return true}function ensureInteger(value,name){if(typeof value!=="number"||value%1){throw new Error("invalid "+name)}return value}function _scrypt(password,salt,N,r,p,dkLen,callback){N=ensureInteger(N,"N");r=ensureInteger(r,"r");p=ensureInteger(p,"p");dkLen=ensureInteger(dkLen,"dkLen");if(N===0||(N&N-1)!==0){throw new Error("N must be power of 2")}if(N>MAX_VALUE/128/r){throw new Error("N too large")}if(r>MAX_VALUE/128/p){throw new Error("r too large")}if(!checkBufferish(password)){throw new Error("password must be an array or buffer")}password=Array.prototype.slice.call(password);if(!checkBufferish(salt)){throw new Error("salt must be an array or buffer")}salt=Array.prototype.slice.call(salt);let b=PBKDF2_HMAC_SHA256_OneIter(password,salt,p*128*r);const B=new Uint32Array(p*32*r);for(let i=0;ilimit){steps=limit}for(let i=0;ilimit){steps=limit}for(let i=0;i>0&255);b.push(B[i]>>8&255);b.push(B[i]>>16&255);b.push(B[i]>>24&255)}const derivedKey=PBKDF2_HMAC_SHA256_OneIter(password,b,dkLen);if(callback){callback(null,1,derivedKey)}return derivedKey}if(callback){nextTick(incrementalSMix)}};if(!callback){while(true){const derivedKey=incrementalSMix();if(derivedKey!=undefined){return derivedKey}}}incrementalSMix()}const lib={scrypt:function(password,salt,N,r,p,dkLen,progressCallback){return new Promise(function(resolve,reject){let lastProgress=0;if(progressCallback){progressCallback(0)}_scrypt(password,salt,N,r,p,dkLen,function(error,progress,key){if(error){reject(error)}else if(key){if(progressCallback&&lastProgress!==1){progressCallback(1)}resolve(new Uint8Array(key))}else if(progressCallback&&progress!==lastProgress){lastProgress=progress;return progressCallback(progress)}})})},syncScrypt:function(password,salt,N,r,p,dkLen){return new Uint8Array(_scrypt(password,salt,N,r,p,dkLen))}};if("object"!=="undefined"){module.exports=lib}else if(typeof undefined==="function"&&undefined.amd){undefined(lib)}else if(root){if(root.scrypt){root._scrypt=root.scrypt}root.scrypt=lib}})(commonjsGlobal)});"use strict";var __awaiter$5=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$o=new Logger(version$i);function hasMnemonic(value){return value!=null&&value.mnemonic&&value.mnemonic.phrase}class KeystoreAccount extends Description{isKeystoreAccount(value){return!!(value&&value._isKeystoreAccount)}}function _decrypt(data,key,ciphertext){const cipher=searchPath(data,"crypto/cipher");if(cipher==="aes-128-ctr"){const iv=looseArrayify(searchPath(data,"crypto/cipherparams/iv"));const counter=new aesJs.Counter(iv);const aesCtr=new aesJs.ModeOfOperation.ctr(key,counter);return arrayify(aesCtr.decrypt(ciphertext))}return null}function _getAccount(data,key){const ciphertext=looseArrayify(searchPath(data,"crypto/ciphertext"));const computedMAC=hexlify(keccak256(concat([key.slice(16,32),ciphertext]))).substring(2);if(computedMAC!==searchPath(data,"crypto/mac").toLowerCase()){throw new Error("invalid password")}const privateKey=_decrypt(data,key.slice(0,16),ciphertext);if(!privateKey){logger$o.throwError("unsupported cipher",Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"})}const mnemonicKey=key.slice(32,64);const address=computeAddress(privateKey);if(data.address){let check=data.address.toLowerCase();if(check.substring(0,2)!=="0x"){check="0x"+check}if(getAddress(check)!==address){throw new Error("address mismatch")}}const account={_isKeystoreAccount:true,address:address,privateKey:hexlify(privateKey)};if(searchPath(data,"x-ethers/version")==="0.1"){const mnemonicCiphertext=looseArrayify(searchPath(data,"x-ethers/mnemonicCiphertext"));const mnemonicIv=looseArrayify(searchPath(data,"x-ethers/mnemonicCounter"));const mnemonicCounter=new aesJs.Counter(mnemonicIv);const mnemonicAesCtr=new aesJs.ModeOfOperation.ctr(mnemonicKey,mnemonicCounter);const path=searchPath(data,"x-ethers/path")||defaultPath;const locale=searchPath(data,"x-ethers/locale")||"en";const entropy=arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));try{const mnemonic=entropyToMnemonic(entropy,locale);const node=HDNode.fromMnemonic(mnemonic,null,locale).derivePath(path);if(node.privateKey!=account.privateKey){throw new Error("mnemonic mismatch")}account.mnemonic=node.mnemonic}catch(error){if(error.code!==Logger.errors.INVALID_ARGUMENT||error.argument!=="wordlist"){throw error}}}return new KeystoreAccount(account)}function pbkdf2Sync(passwordBytes,salt,count,dkLen,prfFunc){return arrayify(pbkdf2(passwordBytes,salt,count,dkLen,prfFunc))}function pbkdf2$1(passwordBytes,salt,count,dkLen,prfFunc){return Promise.resolve(pbkdf2Sync(passwordBytes,salt,count,dkLen,prfFunc))}function _computeKdfKey(data,password,pbkdf2Func,scryptFunc,progressCallback){const passwordBytes=getPassword(password);const kdf=searchPath(data,"crypto/kdf");if(kdf&&typeof kdf==="string"){const throwError=function(name,value){return logger$o.throwArgumentError("invalid key-derivation function parameters",name,value)};if(kdf.toLowerCase()==="scrypt"){const salt=looseArrayify(searchPath(data,"crypto/kdfparams/salt"));const N=parseInt(searchPath(data,"crypto/kdfparams/n"));const r=parseInt(searchPath(data,"crypto/kdfparams/r"));const p=parseInt(searchPath(data,"crypto/kdfparams/p"));if(!N||!r||!p){throwError("kdf",kdf)}if((N&N-1)!==0){throwError("N",N)}const dkLen=parseInt(searchPath(data,"crypto/kdfparams/dklen"));if(dkLen!==32){throwError("dklen",dkLen)}return scryptFunc(passwordBytes,salt,N,r,p,64,progressCallback)}else if(kdf.toLowerCase()==="pbkdf2"){const salt=looseArrayify(searchPath(data,"crypto/kdfparams/salt"));let prfFunc=null;const prf=searchPath(data,"crypto/kdfparams/prf");if(prf==="hmac-sha256"){prfFunc="sha256"}else if(prf==="hmac-sha512"){prfFunc="sha512"}else{throwError("prf",prf)}const count=parseInt(searchPath(data,"crypto/kdfparams/c"));const dkLen=parseInt(searchPath(data,"crypto/kdfparams/dklen"));if(dkLen!==32){throwError("dklen",dkLen)}return pbkdf2Func(passwordBytes,salt,count,dkLen,prfFunc)}}return logger$o.throwArgumentError("unsupported key-derivation function","kdf",kdf)}function decryptSync(json,password){const data=JSON.parse(json);const key=_computeKdfKey(data,password,pbkdf2Sync,scrypt.syncScrypt);return _getAccount(data,key)}function decrypt$1(json,password,progressCallback){return __awaiter$5(this,void 0,void 0,function*(){const data=JSON.parse(json);const key=yield _computeKdfKey(data,password,pbkdf2$1,scrypt.scrypt,progressCallback);return _getAccount(data,key)})}function encrypt(account,password,options,progressCallback){try{if(getAddress(account.address)!==computeAddress(account.privateKey)){throw new Error("address/privateKey mismatch")}if(hasMnemonic(account)){const mnemonic=account.mnemonic;const node=HDNode.fromMnemonic(mnemonic.phrase,null,mnemonic.locale).derivePath(mnemonic.path||defaultPath);if(node.privateKey!=account.privateKey){throw new Error("mnemonic mismatch")}}}catch(e){return Promise.reject(e)}if(typeof options==="function"&&!progressCallback){progressCallback=options;options={}}if(!options){options={}}const privateKey=arrayify(account.privateKey);const passwordBytes=getPassword(password);let entropy=null;let path=null;let locale=null;if(hasMnemonic(account)){const srcMnemonic=account.mnemonic;entropy=arrayify(mnemonicToEntropy(srcMnemonic.phrase,srcMnemonic.locale||"en"));path=srcMnemonic.path||defaultPath;locale=srcMnemonic.locale||"en"}let client=options.client;if(!client){client="ethers.js"}let salt=null;if(options.salt){salt=arrayify(options.salt)}else{salt=randomBytes(32)}let iv=null;if(options.iv){iv=arrayify(options.iv);if(iv.length!==16){throw new Error("invalid iv")}}else{iv=randomBytes(16)}let uuidRandom=null;if(options.uuid){uuidRandom=arrayify(options.uuid);if(uuidRandom.length!==16){throw new Error("invalid uuid")}}else{uuidRandom=randomBytes(16)}let N=1<<17,r=8,p=1;if(options.scrypt){if(options.scrypt.N){N=options.scrypt.N}if(options.scrypt.r){r=options.scrypt.r}if(options.scrypt.p){p=options.scrypt.p}}return scrypt.scrypt(passwordBytes,salt,N,r,p,64,progressCallback).then(key=>{key=arrayify(key);const derivedKey=key.slice(0,16);const macPrefix=key.slice(16,32);const mnemonicKey=key.slice(32,64);const counter=new aesJs.Counter(iv);const aesCtr=new aesJs.ModeOfOperation.ctr(derivedKey,counter);const ciphertext=arrayify(aesCtr.encrypt(privateKey));const mac=keccak256(concat([macPrefix,ciphertext]));const data={address:account.address.substring(2).toLowerCase(),id:uuidV4(uuidRandom),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:hexlify(iv).substring(2)},ciphertext:hexlify(ciphertext).substring(2),kdf:"scrypt",kdfparams:{salt:hexlify(salt).substring(2),n:N,dklen:32,p:p,r:r},mac:mac.substring(2)}};if(entropy){const mnemonicIv=randomBytes(16);const mnemonicCounter=new aesJs.Counter(mnemonicIv);const mnemonicAesCtr=new aesJs.ModeOfOperation.ctr(mnemonicKey,mnemonicCounter);const mnemonicCiphertext=arrayify(mnemonicAesCtr.encrypt(entropy));const now=new Date;const timestamp=now.getUTCFullYear()+"-"+zpad(now.getUTCMonth()+1,2)+"-"+zpad(now.getUTCDate(),2)+"T"+zpad(now.getUTCHours(),2)+"-"+zpad(now.getUTCMinutes(),2)+"-"+zpad(now.getUTCSeconds(),2)+".0Z";data["x-ethers"]={client:client,gethFilename:"UTC--"+timestamp+"--"+data.address,mnemonicCounter:hexlify(mnemonicIv).substring(2),mnemonicCiphertext:hexlify(mnemonicCiphertext).substring(2),path:path,locale:locale,version:"0.1"}}return JSON.stringify(data)})}"use strict";function decryptJsonWallet(json,password,progressCallback){if(isCrowdsaleWallet(json)){if(progressCallback){progressCallback(0)}const account=decrypt(json,password);if(progressCallback){progressCallback(1)}return Promise.resolve(account)}if(isKeystoreWallet(json)){return decrypt$1(json,password,progressCallback)}return Promise.reject(new Error("invalid JSON wallet"))}function decryptJsonWalletSync(json,password){if(isCrowdsaleWallet(json)){return decrypt(json,password)}if(isKeystoreWallet(json)){return decryptSync(json,password)}throw new Error("invalid JSON wallet")}const version$j="wallet/5.5.0";"use strict";var __awaiter$6=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$p=new Logger(version$j);function isAccount(value){return value!=null&&isHexString(value.privateKey,32)&&value.address!=null}function hasMnemonic$1(value){const mnemonic=value.mnemonic;return mnemonic&&mnemonic.phrase}class Wallet extends Signer{constructor(privateKey,provider){logger$p.checkNew(new.target,Wallet);super();if(isAccount(privateKey)){const signingKey=new SigningKey(privateKey.privateKey);defineReadOnly(this,"_signingKey",()=>signingKey);defineReadOnly(this,"address",computeAddress(this.publicKey));if(this.address!==getAddress(privateKey.address)){logger$p.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]")}if(hasMnemonic$1(privateKey)){const srcMnemonic=privateKey.mnemonic;defineReadOnly(this,"_mnemonic",()=>({phrase:srcMnemonic.phrase,path:srcMnemonic.path||defaultPath,locale:srcMnemonic.locale||"en"}));const mnemonic=this.mnemonic;const node=HDNode.fromMnemonic(mnemonic.phrase,null,mnemonic.locale).derivePath(mnemonic.path);if(computeAddress(node.privateKey)!==this.address){logger$p.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}}else{defineReadOnly(this,"_mnemonic",()=>null)}}else{if(SigningKey.isSigningKey(privateKey)){if(privateKey.curve!=="secp256k1"){logger$p.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]")}defineReadOnly(this,"_signingKey",()=>privateKey)}else{if(typeof privateKey==="string"){if(privateKey.match(/^[0-9a-f]*$/i)&&privateKey.length===64){privateKey="0x"+privateKey}}const signingKey=new SigningKey(privateKey);defineReadOnly(this,"_signingKey",()=>signingKey)}defineReadOnly(this,"_mnemonic",()=>null);defineReadOnly(this,"address",computeAddress(this.publicKey))}if(provider&&!Provider.isProvider(provider)){logger$p.throwArgumentError("invalid provider","provider",provider)}defineReadOnly(this,"provider",provider||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(provider){return new Wallet(this,provider)}signTransaction(transaction){return resolveProperties(transaction).then(tx=>{if(tx.from!=null){if(getAddress(tx.from)!==this.address){logger$p.throwArgumentError("transaction from address mismatch","transaction.from",transaction.from)}delete tx.from}const signature=this._signingKey().signDigest(keccak256(serialize(tx)));return serialize(tx,signature)})}signMessage(message){return __awaiter$6(this,void 0,void 0,function*(){return joinSignature(this._signingKey().signDigest(hashMessage(message)))})}_signTypedData(domain,types,value){return __awaiter$6(this,void 0,void 0,function*(){const populated=yield TypedDataEncoder.resolveNames(domain,types,value,name=>{if(this.provider==null){logger$p.throwError("cannot resolve ENS names without a provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:name})}return this.provider.resolveName(name)});return joinSignature(this._signingKey().signDigest(TypedDataEncoder.hash(populated.domain,types,populated.value)))})}encrypt(password,options,progressCallback){if(typeof options==="function"&&!progressCallback){progressCallback=options;options={}}if(progressCallback&&typeof progressCallback!=="function"){throw new Error("invalid callback")}if(!options){options={}}return encrypt(this,password,options,progressCallback)}static createRandom(options){let entropy=randomBytes(16);if(!options){options={}}if(options.extraEntropy){entropy=arrayify(hexDataSlice(keccak256(concat([entropy,options.extraEntropy])),0,16))}const mnemonic=entropyToMnemonic(entropy,options.locale);return Wallet.fromMnemonic(mnemonic,options.path,options.locale)}static fromEncryptedJson(json,password,progressCallback){return decryptJsonWallet(json,password,progressCallback).then(account=>{return new Wallet(account)})}static fromEncryptedJsonSync(json,password){return new Wallet(decryptJsonWalletSync(json,password))}static fromMnemonic(mnemonic,path,wordlist){if(!path){path=defaultPath}return new Wallet(HDNode.fromMnemonic(mnemonic,null,wordlist).derivePath(path))}}function verifyMessage(message,signature){return recoverAddress(hashMessage(message),signature)}function verifyTypedData(domain,types,value,signature){return recoverAddress(TypedDataEncoder.hash(domain,types,value),signature)}const version$k="networks/5.5.1";"use strict";const logger$q=new Logger(version$k);function isRenetworkable(value){return value&&typeof value.renetwork==="function"}function ethDefaultProvider(network){const func=function(providers,options){if(options==null){options={}}const providerList=[];if(providers.InfuraProvider){try{providerList.push(new providers.InfuraProvider(network,options.infura))}catch(error){}}if(providers.EtherscanProvider){try{providerList.push(new providers.EtherscanProvider(network,options.etherscan))}catch(error){}}if(providers.AlchemyProvider){try{providerList.push(new providers.AlchemyProvider(network,options.alchemy))}catch(error){}}if(providers.PocketProvider){const skip=["goerli","ropsten","rinkeby"];try{const provider=new providers.PocketProvider(network);if(provider.network&&skip.indexOf(provider.network.name)===-1){providerList.push(provider)}}catch(error){}}if(providers.CloudflareProvider){try{providerList.push(new providers.CloudflareProvider(network))}catch(error){}}if(providerList.length===0){return null}if(providers.FallbackProvider){let quorum=1;if(options.quorum!=null){quorum=options.quorum}else if(network==="homestead"){quorum=2}return new providers.FallbackProvider(providerList,quorum)}return providerList[0]};func.renetwork=function(network){return ethDefaultProvider(network)};return func}function etcDefaultProvider(url,network){const func=function(providers,options){if(providers.JsonRpcProvider){return new providers.JsonRpcProvider(url,network)}return null};func.renetwork=function(network){return etcDefaultProvider(url,network)};return func}const homestead={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ethDefaultProvider("homestead")};const ropsten={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ethDefaultProvider("ropsten")};const classicMordor={chainId:63,name:"classicMordor",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/mordor","classicMordor")};const networks={unspecified:{chainId:0,name:"unspecified"},homestead:homestead,mainnet:homestead,morden:{chainId:2,name:"morden"},ropsten:ropsten,testnet:ropsten,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ethDefaultProvider("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ethDefaultProvider("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ethDefaultProvider("goerli")},classic:{chainId:61,name:"classic",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:classicMordor,classicTestnet:classicMordor,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic"},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism"},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function getNetwork(network){if(network==null){return null}if(typeof network==="number"){for(const name in networks){const standard=networks[name];if(standard.chainId===network){return{name:standard.name,chainId:standard.chainId,ensAddress:standard.ensAddress||null,_defaultProvider:standard._defaultProvider||null}}}return{chainId:network,name:"unknown"}}if(typeof network==="string"){const standard=networks[network];if(standard==null){return null}return{name:standard.name,chainId:standard.chainId,ensAddress:standard.ensAddress,_defaultProvider:standard._defaultProvider||null}}const standard=networks[network.name];if(!standard){if(typeof network.chainId!=="number"){logger$q.throwArgumentError("invalid network chainId","network",network)}return network}if(network.chainId!==0&&network.chainId!==standard.chainId){logger$q.throwArgumentError("network chainId mismatch","network",network)}let defaultProvider=network._defaultProvider||null;if(defaultProvider==null&&standard._defaultProvider){if(isRenetworkable(standard._defaultProvider)){defaultProvider=standard._defaultProvider.renetwork(network)}else{defaultProvider=standard._defaultProvider}}return{name:network.name,chainId:standard.chainId,ensAddress:network.ensAddress||standard.ensAddress||null,_defaultProvider:defaultProvider}}"use strict";function decode$1(textData){textData=atob(textData);const data=[];for(let i=0;i{headers[key.toLowerCase()]=value})}else{response.headers.keys().forEach(key=>{headers[key.toLowerCase()]=response.headers.get(key)})}return{headers:headers,statusCode:response.status,statusMessage:response.statusText,body:arrayify(new Uint8Array(body))}})}"use strict";var __awaiter$8=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$r=new Logger(version$l);function staller(duration){return new Promise(resolve=>{setTimeout(resolve,duration)})}function bodyify(value,type){if(value==null){return null}if(typeof value==="string"){return value}if(isBytesLike(value)){if(type&&(type.split("/")[0]==="text"||type.split(";")[0].trim()==="application/json")){try{return toUtf8String(value)}catch(error){}}return hexlify(value)}return value}function _fetchData(connection,body,processFunc){const attemptLimit=typeof connection==="object"&&connection.throttleLimit!=null?connection.throttleLimit:12;logger$r.assertArgument(attemptLimit>0&&attemptLimit%1===0,"invalid connection throttle limit","connection.throttleLimit",attemptLimit);const throttleCallback=typeof connection==="object"?connection.throttleCallback:null;const throttleSlotInterval=typeof connection==="object"&&typeof connection.throttleSlotInterval==="number"?connection.throttleSlotInterval:100;logger$r.assertArgument(throttleSlotInterval>0&&throttleSlotInterval%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",throttleSlotInterval);const headers={};let url=null;const options={method:"GET"};let allow304=false;let timeout=2*60*1e3;if(typeof connection==="string"){url=connection}else if(typeof connection==="object"){if(connection==null||connection.url==null){logger$r.throwArgumentError("missing URL","connection.url",connection)}url=connection.url;if(typeof connection.timeout==="number"&&connection.timeout>0){timeout=connection.timeout}if(connection.headers){for(const key in connection.headers){headers[key.toLowerCase()]={key:key,value:String(connection.headers[key])};if(["if-none-match","if-modified-since"].indexOf(key.toLowerCase())>=0){allow304=true}}}options.allowGzip=!!connection.allowGzip;if(connection.user!=null&&connection.password!=null){if(url.substring(0,6)!=="https:"&&connection.allowInsecureAuthentication!==true){logger$r.throwError("basic authentication requires a secure https url",Logger.errors.INVALID_ARGUMENT,{argument:"url",url:url,user:connection.user,password:"[REDACTED]"})}const authorization=connection.user+":"+connection.password;headers["authorization"]={key:"Authorization",value:"Basic "+encode$1(toUtf8Bytes(authorization))}}}const reData=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i");const dataMatch=url?url.match(reData):null;if(dataMatch){try{const response={statusCode:200,statusMessage:"OK",headers:{"content-type":dataMatch[1]},body:decode$1(dataMatch[2])};let result=response.body;if(processFunc){result=processFunc(response.body,response)}return Promise.resolve(result)}catch(error){logger$r.throwError("processing response error",Logger.errors.SERVER_ERROR,{body:bodyify(dataMatch[1],dataMatch[2]),error:error,requestBody:null,requestMethod:"GET",url:url})}}if(body){options.method="POST";options.body=body;if(headers["content-type"]==null){headers["content-type"]={key:"Content-Type",value:"application/octet-stream"}}if(headers["content-length"]==null){headers["content-length"]={key:"Content-Length",value:String(body.length)}}}const flatHeaders={};Object.keys(headers).forEach(key=>{const header=headers[key];flatHeaders[header.key]=header.value});options.headers=flatHeaders;const runningTimeout=function(){let timer=null;const promise=new Promise(function(resolve,reject){if(timeout){timer=setTimeout(()=>{if(timer==null){return}timer=null;reject(logger$r.makeError("timeout",Logger.errors.TIMEOUT,{requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,timeout:timeout,url:url}))},timeout)}});const cancel=function(){if(timer==null){return}clearTimeout(timer);timer=null};return{promise:promise,cancel:cancel}}();const runningFetch=function(){return __awaiter$8(this,void 0,void 0,function*(){for(let attempt=0;attempt=300){runningTimeout.cancel();logger$r.throwError("bad response",Logger.errors.SERVER_ERROR,{status:response.statusCode,headers:response.headers,body:bodyify(body,response.headers?response.headers["content-type"]:null),requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,url:url})}if(processFunc){try{const result=yield processFunc(body,response);runningTimeout.cancel();return result}catch(error){if(error.throttleRetry&&attempt{let result=null;if(value!=null){try{result=JSON.parse(toUtf8String(value))}catch(error){logger$r.throwError("invalid JSON",Logger.errors.SERVER_ERROR,{body:value,error:error})}}if(processFunc){result=processFunc(result,response)}return result};let body=null;if(json!=null){body=toUtf8Bytes(json);const updated=typeof connection==="string"?{url:connection}:shallowCopy(connection);if(updated.headers){const hasContentType=Object.keys(updated.headers).filter(k=>k.toLowerCase()==="content-type").length!==0;if(!hasContentType){updated.headers=shallowCopy(updated.headers);updated.headers["content-type"]="application/json"}}else{updated.headers={"content-type":"application/json"}}connection=updated}return _fetchData(connection,body,processJsonFunc)}function poll(func,options){if(!options){options={}}options=shallowCopy(options);if(options.floor==null){options.floor=0}if(options.ceiling==null){options.ceiling=1e4}if(options.interval==null){options.interval=250}return new Promise(function(resolve,reject){let timer=null;let done=false;const cancel=()=>{if(done){return false}done=true;if(timer){clearTimeout(timer)}return true};if(options.timeout){timer=setTimeout(()=>{if(cancel()){reject(new Error("timeout"))}},options.timeout)}const retryLimit=options.retryLimit;let attempt=0;function check(){return func().then(function(result){if(result!==undefined){if(cancel()){resolve(result)}}else if(options.oncePoll){options.oncePoll.once("poll",check)}else if(options.onceBlock){options.onceBlock.once("block",check)}else if(!done){attempt++;if(attempt>retryLimit){if(cancel()){reject(new Error("retry limit reached"))}return}let timeout=options.interval*parseInt(String(Math.random()*Math.pow(2,attempt)));if(timeoutoptions.ceiling){timeout=options.ceiling}setTimeout(check,timeout)}return null},function(error){if(cancel()){reject(error)}})}check()})}"use strict";var ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l";var ALPHABET_MAP={};for(var z=0;z>25;return(pre&33554431)<<5^-(b>>0&1)&996825010^-(b>>1&1)&642813549^-(b>>2&1)&513874426^-(b>>3&1)&1027748829^-(b>>4&1)&705979059}function prefixChk(prefix){var chk=1;for(var i=0;i126)return"Invalid prefix ("+prefix+")";chk=polymodStep(chk)^c>>5}chk=polymodStep(chk);for(i=0;iLIMIT)throw new TypeError("Exceeds length limit");prefix=prefix.toLowerCase();var chk=prefixChk(prefix);if(typeof chk==="string")throw new Error(chk);var result=prefix+"1";for(var i=0;i>5!==0)throw new Error("Non 5-bit word");chk=polymodStep(chk)^x;result+=ALPHABET.charAt(x)}for(i=0;i<6;++i){chk=polymodStep(chk)}chk^=1;for(i=0;i<6;++i){var v=chk>>(5-i)*5&31;result+=ALPHABET.charAt(v)}return result}function __decode(str,LIMIT){LIMIT=LIMIT||90;if(str.length<8)return str+" too short";if(str.length>LIMIT)return"Exceeds length limit";var lowered=str.toLowerCase();var uppered=str.toUpperCase();if(str!==lowered&&str!==uppered)return"Mixed-case string "+str;str=lowered;var split=str.lastIndexOf("1");if(split===-1)return"No separator character for "+str;if(split===0)return"Missing prefix for "+str;var prefix=str.slice(0,split);var wordChars=str.slice(split+1);if(wordChars.length<6)return"Data too short";var chk=prefixChk(prefix);if(typeof chk==="string")return chk;var words=[];for(var i=0;i=wordChars.length)continue;words.push(v)}if(chk!==1)return"Invalid checksum for "+str;return{prefix:prefix,words:words}}function decodeUnsafe(){var res=__decode.apply(null,arguments);if(typeof res==="object")return res}function decode$2(str){var res=__decode.apply(null,arguments);if(typeof res==="object")return res;throw new Error(res)}function convert(data,inBits,outBits,pad){var value=0;var bits=0;var maxV=(1<=outBits){bits-=outBits;result.push(value>>bits&maxV)}}if(pad){if(bits>0){result.push(value<=inBits)return"Excess padding";if(value<{return this.data(v,true)};formats.transaction={hash:hash,type:type,accessList:Formatter.allowNull(this.accessList.bind(this),null),blockHash:Formatter.allowNull(hash,null),blockNumber:Formatter.allowNull(number,null),transactionIndex:Formatter.allowNull(number,null),confirmations:Formatter.allowNull(number,null),from:address,gasPrice:Formatter.allowNull(bigNumber),maxPriorityFeePerGas:Formatter.allowNull(bigNumber),maxFeePerGas:Formatter.allowNull(bigNumber),gasLimit:bigNumber,to:Formatter.allowNull(address,null),value:bigNumber,nonce:number,data:data,r:Formatter.allowNull(this.uint256),s:Formatter.allowNull(this.uint256),v:Formatter.allowNull(number),creates:Formatter.allowNull(address,null),raw:Formatter.allowNull(data)};formats.transactionRequest={from:Formatter.allowNull(address),nonce:Formatter.allowNull(number),gasLimit:Formatter.allowNull(bigNumber),gasPrice:Formatter.allowNull(bigNumber),maxPriorityFeePerGas:Formatter.allowNull(bigNumber),maxFeePerGas:Formatter.allowNull(bigNumber),to:Formatter.allowNull(address),value:Formatter.allowNull(bigNumber),data:Formatter.allowNull(strictData),type:Formatter.allowNull(number),accessList:Formatter.allowNull(this.accessList.bind(this),null)};formats.receiptLog={transactionIndex:number,blockNumber:number,transactionHash:hash,address:address,topics:Formatter.arrayOf(hash),data:data,logIndex:number,blockHash:hash};formats.receipt={to:Formatter.allowNull(this.address,null),from:Formatter.allowNull(this.address,null),contractAddress:Formatter.allowNull(address,null),transactionIndex:number,root:Formatter.allowNull(hex),gasUsed:bigNumber,logsBloom:Formatter.allowNull(data),blockHash:hash,transactionHash:hash,logs:Formatter.arrayOf(this.receiptLog.bind(this)),blockNumber:number,confirmations:Formatter.allowNull(number,null),cumulativeGasUsed:bigNumber,effectiveGasPrice:Formatter.allowNull(bigNumber),status:Formatter.allowNull(number),type:type};formats.block={hash:hash,parentHash:hash,number:number,timestamp:number,nonce:Formatter.allowNull(hex),difficulty:this.difficulty.bind(this),gasLimit:bigNumber,gasUsed:bigNumber,miner:address,extraData:data,transactions:Formatter.allowNull(Formatter.arrayOf(hash)),baseFeePerGas:Formatter.allowNull(bigNumber)};formats.blockWithTransactions=shallowCopy(formats.block);formats.blockWithTransactions.transactions=Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));formats.filter={fromBlock:Formatter.allowNull(blockTag,undefined),toBlock:Formatter.allowNull(blockTag,undefined),blockHash:Formatter.allowNull(hash,undefined),address:Formatter.allowNull(address,undefined),topics:Formatter.allowNull(this.topics.bind(this),undefined)};formats.filterLog={blockNumber:Formatter.allowNull(number),blockHash:Formatter.allowNull(hash),transactionIndex:number,removed:Formatter.allowNull(this.boolean.bind(this)),address:address,data:Formatter.allowFalsish(data,"0x"),topics:Formatter.arrayOf(hash),transactionHash:hash,logIndex:number};return formats}accessList(accessList){return accessListify(accessList||[])}number(number){if(number==="0x"){return 0}return BigNumber.from(number).toNumber()}type(number){if(number==="0x"||number==null){return 0}return BigNumber.from(number).toNumber()}bigNumber(value){return BigNumber.from(value)}boolean(value){if(typeof value==="boolean"){return value}if(typeof value==="string"){value=value.toLowerCase();if(value==="true"){return true}if(value==="false"){return false}}throw new Error("invalid boolean - "+value)}hex(value,strict){if(typeof value==="string"){if(!strict&&value.substring(0,2)!=="0x"){value="0x"+value}if(isHexString(value)){return value.toLowerCase()}}return logger$s.throwArgumentError("invalid hash","value",value)}data(value,strict){const result=this.hex(value,strict);if(result.length%2!==0){throw new Error("invalid data; odd-length - "+value)}return result}address(value){return getAddress(value)}callAddress(value){if(!isHexString(value,32)){return null}const address=getAddress(hexDataSlice(value,12));return address===AddressZero?null:address}contractAddress(value){return getContractAddress(value)}blockTag(blockTag){if(blockTag==null){return"latest"}if(blockTag==="earliest"){return"0x0"}if(blockTag==="latest"||blockTag==="pending"){return blockTag}if(typeof blockTag==="number"||isHexString(blockTag)){return hexValue(blockTag)}throw new Error("invalid blockTag")}hash(value,strict){const result=this.hex(value,strict);if(hexDataLength(result)!==32){return logger$s.throwArgumentError("invalid hash","value",value)}return result}difficulty(value){if(value==null){return null}const v=BigNumber.from(value);try{return v.toNumber()}catch(error){}return null}uint256(value){if(!isHexString(value)){throw new Error("invalid uint256")}return hexZeroPad(value,32)}_block(value,format){if(value.author!=null&&value.miner==null){value.miner=value.author}const difficulty=value._difficulty!=null?value._difficulty:value.difficulty;const result=Formatter.check(format,value);result._difficulty=difficulty==null?null:BigNumber.from(difficulty);return result}block(value){return this._block(value,this.formats.block)}blockWithTransactions(value){return this._block(value,this.formats.blockWithTransactions)}transactionRequest(value){return Formatter.check(this.formats.transactionRequest,value)}transactionResponse(transaction){if(transaction.gas!=null&&transaction.gasLimit==null){transaction.gasLimit=transaction.gas}if(transaction.to&&BigNumber.from(transaction.to).isZero()){transaction.to="0x0000000000000000000000000000000000000000"}if(transaction.input!=null&&transaction.data==null){transaction.data=transaction.input}if(transaction.to==null&&transaction.creates==null){transaction.creates=this.contractAddress(transaction)}if((transaction.type===1||transaction.type===2)&&transaction.accessList==null){transaction.accessList=[]}const result=Formatter.check(this.formats.transaction,transaction);if(transaction.chainId!=null){let chainId=transaction.chainId;if(isHexString(chainId)){chainId=BigNumber.from(chainId).toNumber()}result.chainId=chainId}else{let chainId=transaction.networkId;if(chainId==null&&result.v==null){chainId=transaction.chainId}if(isHexString(chainId)){chainId=BigNumber.from(chainId).toNumber()}if(typeof chainId!=="number"&&result.v!=null){chainId=(result.v-35)/2;if(chainId<0){chainId=0}chainId=parseInt(chainId)}if(typeof chainId!=="number"){chainId=0}result.chainId=chainId}if(result.blockHash&&result.blockHash.replace(/0/g,"")==="x"){result.blockHash=null}return result}transaction(value){return parse(value)}receiptLog(value){return Formatter.check(this.formats.receiptLog,value)}receipt(value){const result=Formatter.check(this.formats.receipt,value);if(result.root!=null){if(result.root.length<=4){const value=BigNumber.from(result.root).toNumber();if(value===0||value===1){if(result.status!=null&&result.status!==value){logger$s.throwArgumentError("alt-root-status/status mismatch","value",{root:result.root,status:result.status})}result.status=value;delete result.root}else{logger$s.throwArgumentError("invalid alt-root-status","value.root",result.root)}}else if(result.root.length!==66){logger$s.throwArgumentError("invalid root hash","value.root",result.root)}}if(result.status!=null){result.byzantium=true}return result}topics(value){if(Array.isArray(value)){return value.map(v=>this.topics(v))}else if(value!=null){return this.hash(value,true)}return null}filter(value){return Formatter.check(this.formats.filter,value)}filterLog(value){return Formatter.check(this.formats.filterLog,value)}static check(format,object){const result={};for(const key in format){try{const value=format[key](object[key]);if(value!==undefined){result[key]=value}}catch(error){error.checkKey=key;error.checkValue=object[key];throw error}}return result}static allowNull(format,nullValue){return function(value){if(value==null){return nullValue}return format(value)}}static allowFalsish(format,replaceValue){return function(value){if(!value){return replaceValue}return format(value)}}static arrayOf(format){return function(array){if(!Array.isArray(array)){throw new Error("not an array")}const result=[];array.forEach(function(value){result.push(format(value))});return result}}}function isCommunityResourcable(value){return value&&typeof value.isCommunityResource==="function"}function isCommunityResource(value){return isCommunityResourcable(value)&&value.isCommunityResource()}let throttleMessage=false;function showThrottleMessage(){if(throttleMessage){return}throttleMessage=true;console.log("========= NOTICE =========");console.log("Request-Rate Exceeded (this message will not be repeated)");console.log("");console.log("The default API keys for each service are provided as a highly-throttled,");console.log("community resource for low-traffic projects and early prototyping.");console.log("");console.log("While your application will continue to function, we highly recommended");console.log("signing up for your own API keys to improve performance, increase your");console.log("request rate/limit and enable other perks, such as metrics and advanced APIs.");console.log("");console.log("For more details: https://docs.ethers.io/api-keys/");console.log("==========================")}"use strict";var __awaiter$9=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$t=new Logger(version$m);function checkTopic(topic){if(topic==null){return"null"}if(hexDataLength(topic)!==32){logger$t.throwArgumentError("invalid topic","topic",topic)}return topic.toLowerCase()}function serializeTopics(topics){topics=topics.slice();while(topics.length>0&&topics[topics.length-1]==null){topics.pop()}return topics.map(topic=>{if(Array.isArray(topic)){const unique={};topic.forEach(topic=>{unique[checkTopic(topic)]=true});const sorted=Object.keys(unique);sorted.sort();return sorted.join("|")}else{return checkTopic(topic)}}).join("&")}function deserializeTopics(data){if(data===""){return[]}return data.split(/&/g).map(topic=>{if(topic===""){return[]}const comps=topic.split("|").map(topic=>{return topic==="null"?null:topic});return comps.length===1?comps[0]:comps})}function getEventTag$1(eventName){if(typeof eventName==="string"){eventName=eventName.toLowerCase();if(hexDataLength(eventName)===32){return"tx:"+eventName}if(eventName.indexOf(":")===-1){return eventName}}else if(Array.isArray(eventName)){return"filter:*:"+serializeTopics(eventName)}else if(ForkEvent.isForkEvent(eventName)){logger$t.warn("not implemented");throw new Error("not implemented")}else if(eventName&&typeof eventName==="object"){return"filter:"+(eventName.address||"*")+":"+serializeTopics(eventName.topics||[])}throw new Error("invalid event - "+eventName)}function getTime(){return(new Date).getTime()}function stall(duration){return new Promise(resolve=>{setTimeout(resolve,duration)})}const PollableEvents=["block","network","pending","poll"];class Event{constructor(tag,listener,once){defineReadOnly(this,"tag",tag);defineReadOnly(this,"listener",listener);defineReadOnly(this,"once",once)}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const comps=this.tag.split(":");if(comps[0]!=="tx"){return null}return comps[1]}get filter(){const comps=this.tag.split(":");if(comps[0]!=="filter"){return null}const address=comps[1];const topics=deserializeTopics(comps[2]);const filter={};if(topics.length>0){filter.topics=topics}if(address&&address!=="*"){filter.address=address}return filter}pollable(){return this.tag.indexOf(":")>=0||PollableEvents.indexOf(this.tag)>=0}}const coinInfos={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bytes32ify(value){return hexZeroPad(BigNumber.from(value).toHexString(),32)}function base58Encode(data){return Base58.encode(concat([data,hexDataSlice(sha256$1(sha256$1(data)),0,4)]))}const matchers=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),new RegExp("^(ipfs)://(.*)$","i"),new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function _parseString(result){try{return toUtf8String(_parseBytes(result))}catch(error){}return null}function _parseBytes(result){if(result==="0x"){return null}const offset=BigNumber.from(hexDataSlice(result,0,32)).toNumber();const length=BigNumber.from(hexDataSlice(result,offset,offset+32)).toNumber();return hexDataSlice(result,offset+32,offset+32+length)}class Resolver{constructor(provider,address,name,resolvedAddress){defineReadOnly(this,"provider",provider);defineReadOnly(this,"name",name);defineReadOnly(this,"address",provider.formatter.address(address));defineReadOnly(this,"_resolvedAddress",resolvedAddress)}_fetchBytes(selector,parameters){return __awaiter$9(this,void 0,void 0,function*(){const tx={to:this.address,data:hexConcat([selector,namehash(this.name),parameters||"0x"])};try{return _parseBytes(yield this.provider.call(tx))}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION){return null}return null}})}_getAddress(coinType,hexBytes){const coinInfo=coinInfos[String(coinType)];if(coinInfo==null){logger$t.throwError(`unsupported coin type: ${coinType}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${coinType})`})}if(coinInfo.ilk==="eth"){return this.provider.formatter.address(hexBytes)}const bytes=arrayify(hexBytes);if(coinInfo.p2pkh!=null){const p2pkh=hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(p2pkh){const length=parseInt(p2pkh[1],16);if(p2pkh[2].length===length*2&&length>=1&&length<=75){return base58Encode(concat([[coinInfo.p2pkh],"0x"+p2pkh[2]]))}}}if(coinInfo.p2sh!=null){const p2sh=hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(p2sh){const length=parseInt(p2sh[1],16);if(p2sh[2].length===length*2&&length>=1&&length<=75){return base58Encode(concat([[coinInfo.p2sh],"0x"+p2sh[2]]))}}}if(coinInfo.prefix!=null){const length=bytes[1];let version=bytes[0];if(version===0){if(length!==20&&length!==32){version=-1}}else{version=-1}if(version>=0&&bytes.length===2+length&&length>=1&&length<=75){const words=bech32.toWords(bytes.slice(2));words.unshift(version);return bech32.encode(coinInfo.prefix,words)}}return null}getAddress(coinType){return __awaiter$9(this,void 0,void 0,function*(){if(coinType==null){coinType=60}if(coinType===60){try{const transaction={to:this.address,data:"0x3b3b57de"+namehash(this.name).substring(2)};const hexBytes=yield this.provider.call(transaction);if(hexBytes==="0x"||hexBytes===HashZero){return null}return this.provider.formatter.callAddress(hexBytes)}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION){return null}throw error}}const hexBytes=yield this._fetchBytes("0xf1cb7e06",bytes32ify(coinType));if(hexBytes==null||hexBytes==="0x"){return null}const address=this._getAddress(coinType,hexBytes);if(address==null){logger$t.throwError(`invalid or unsupported coin data`,Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${coinType})`,coinType:coinType,data:hexBytes})}return address})}getAvatar(){return __awaiter$9(this,void 0,void 0,function*(){const linkage=[];try{const avatar=yield this.getText("avatar");if(avatar==null){return null}for(let i=0;i{});this._ready().catch(error=>{})}else{const knownNetwork=getStatic(new.target,"getNetwork")(network);if(knownNetwork){defineReadOnly(this,"_network",knownNetwork);this.emit("network",knownNetwork,null)}else{logger$t.throwArgumentError("invalid network","network",network)}}this._maxInternalBlockNumber=-1024;this._lastBlockNumber=-2;this._pollingInterval=4e3;this._fastQueryDate=0}_ready(){return __awaiter$9(this,void 0,void 0,function*(){if(this._network==null){let network=null;if(this._networkPromise){try{network=yield this._networkPromise}catch(error){}}if(network==null){network=yield this.detectNetwork()}if(!network){logger$t.throwError("no network detected",Logger.errors.UNKNOWN_ERROR,{})}if(this._network==null){if(this.anyNetwork){this._network=network}else{defineReadOnly(this,"_network",network)}this.emit("network",network,null)}}return this._network})}get ready(){return poll(()=>{return this._ready().then(network=>{return network},error=>{if(error.code===Logger.errors.NETWORK_ERROR&&error.event==="noNetwork"){return undefined}throw error})})}static getFormatter(){if(defaultFormatter==null){defaultFormatter=new Formatter}return defaultFormatter}static getNetwork(network){return getNetwork(network==null?"homestead":network)}_getInternalBlockNumber(maxAge){return __awaiter$9(this,void 0,void 0,function*(){yield this._ready();if(maxAge>0){while(this._internalBlockNumber){const internalBlockNumber=this._internalBlockNumber;try{const result=yield internalBlockNumber;if(getTime()-result.respTime<=maxAge){return result.blockNumber}break}catch(error){if(this._internalBlockNumber===internalBlockNumber){break}}}}const reqTime=getTime();const checkInternalBlockNumber=resolveProperties({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(network=>null,error=>error)}).then(({blockNumber:blockNumber,networkError:networkError})=>{if(networkError){if(this._internalBlockNumber===checkInternalBlockNumber){this._internalBlockNumber=null}throw networkError}const respTime=getTime();blockNumber=BigNumber.from(blockNumber).toNumber();if(blockNumber{if(this._internalBlockNumber===checkInternalBlockNumber){this._internalBlockNumber=null}});return(yield checkInternalBlockNumber).blockNumber})}poll(){return __awaiter$9(this,void 0,void 0,function*(){const pollId=nextPollId++;const runners=[];let blockNumber=null;try{blockNumber=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(error){this.emit("error",error);return}this._setFastBlockNumber(blockNumber);this.emit("poll",pollId,blockNumber);if(blockNumber===this._lastBlockNumber){this.emit("didPoll",pollId);return}if(this._emitted.block===-2){this._emitted.block=blockNumber-1}if(Math.abs(this._emitted.block-blockNumber)>1e3){logger$t.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`);this.emit("error",logger$t.makeError("network block skew detected",Logger.errors.NETWORK_ERROR,{blockNumber:blockNumber,event:"blockSkew",previousBlockNumber:this._emitted.block}));this.emit("block",blockNumber)}else{for(let i=this._emitted.block+1;i<=blockNumber;i++){this.emit("block",i)}}if(this._emitted.block!==blockNumber){this._emitted.block=blockNumber;Object.keys(this._emitted).forEach(key=>{if(key==="block"){return}const eventBlockNumber=this._emitted[key];if(eventBlockNumber==="pending"){return}if(blockNumber-eventBlockNumber>12){delete this._emitted[key]}})}if(this._lastBlockNumber===-2){this._lastBlockNumber=blockNumber-1}this._events.forEach(event=>{switch(event.type){case"tx":{const hash=event.hash;let runner=this.getTransactionReceipt(hash).then(receipt=>{if(!receipt||receipt.blockNumber==null){return null}this._emitted["t:"+hash]=receipt.blockNumber;this.emit(hash,receipt);return null}).catch(error=>{this.emit("error",error)});runners.push(runner);break}case"filter":{const filter=event.filter;filter.fromBlock=this._lastBlockNumber+1;filter.toBlock=blockNumber;const runner=this.getLogs(filter).then(logs=>{if(logs.length===0){return}logs.forEach(log=>{this._emitted["b:"+log.blockHash]=log.blockNumber;this._emitted["t:"+log.transactionHash]=log.blockNumber;this.emit(filter,log)})}).catch(error=>{this.emit("error",error)});runners.push(runner);break}}});this._lastBlockNumber=blockNumber;Promise.all(runners).then(()=>{this.emit("didPoll",pollId)}).catch(error=>{this.emit("error",error)});return})}resetEventsBlock(blockNumber){this._lastBlockNumber=blockNumber-1;if(this.polling){this.poll()}}get network(){return this._network}detectNetwork(){return __awaiter$9(this,void 0,void 0,function*(){return logger$t.throwError("provider does not support network detection",Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return __awaiter$9(this,void 0,void 0,function*(){const network=yield this._ready();const currentNetwork=yield this.detectNetwork();if(network.chainId!==currentNetwork.chainId){if(this.anyNetwork){this._network=currentNetwork;this._lastBlockNumber=-2;this._fastBlockNumber=null;this._fastBlockNumberPromise=null;this._fastQueryDate=0;this._emitted.block=-2;this._maxInternalBlockNumber=-1024;this._internalBlockNumber=null;this.emit("network",currentNetwork,network);yield stall(0);return this._network}const error=logger$t.makeError("underlying network changed",Logger.errors.NETWORK_ERROR,{event:"changed",network:network,detectedNetwork:currentNetwork});this.emit("error",error);throw error}return network})}get blockNumber(){this._getInternalBlockNumber(100+this.pollingInterval/2).then(blockNumber=>{this._setFastBlockNumber(blockNumber)},error=>{});return this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(value){if(value&&!this._poller){this._poller=setInterval(()=>{this.poll()},this.pollingInterval);if(!this._bootstrapPoll){this._bootstrapPoll=setTimeout(()=>{this.poll();this._bootstrapPoll=setTimeout(()=>{if(!this._poller){this.poll()}this._bootstrapPoll=null},this.pollingInterval)},0)}}else if(!value&&this._poller){clearInterval(this._poller);this._poller=null}}get pollingInterval(){return this._pollingInterval}set pollingInterval(value){if(typeof value!=="number"||value<=0||parseInt(String(value))!=value){throw new Error("invalid polling interval")}this._pollingInterval=value;if(this._poller){clearInterval(this._poller);this._poller=setInterval(()=>{this.poll()},this._pollingInterval)}}_getFastBlockNumber(){const now=getTime();if(now-this._fastQueryDate>2*this._pollingInterval){this._fastQueryDate=now;this._fastBlockNumberPromise=this.getBlockNumber().then(blockNumber=>{if(this._fastBlockNumber==null||blockNumber>this._fastBlockNumber){this._fastBlockNumber=blockNumber}return this._fastBlockNumber})}return this._fastBlockNumberPromise}_setFastBlockNumber(blockNumber){if(this._fastBlockNumber!=null&&blockNumberthis._fastBlockNumber){this._fastBlockNumber=blockNumber;this._fastBlockNumberPromise=Promise.resolve(blockNumber)}}waitForTransaction(transactionHash,confirmations,timeout){return __awaiter$9(this,void 0,void 0,function*(){return this._waitForTransaction(transactionHash,confirmations==null?1:confirmations,timeout||0,null)})}_waitForTransaction(transactionHash,confirmations,timeout,replaceable){return __awaiter$9(this,void 0,void 0,function*(){const receipt=yield this.getTransactionReceipt(transactionHash);if((receipt?receipt.confirmations:0)>=confirmations){return receipt}return new Promise((resolve,reject)=>{const cancelFuncs=[];let done=false;const alreadyDone=function(){if(done){return true}done=true;cancelFuncs.forEach(func=>{func()});return false};const minedHandler=receipt=>{if(receipt.confirmations{this.removeListener(transactionHash,minedHandler)});if(replaceable){let lastBlockNumber=replaceable.startBlock;let scannedBlock=null;const replaceHandler=blockNumber=>__awaiter$9(this,void 0,void 0,function*(){if(done){return}yield stall(1e3);this.getTransactionCount(replaceable.from).then(nonce=>__awaiter$9(this,void 0,void 0,function*(){if(done){return}if(nonce<=replaceable.nonce){lastBlockNumber=blockNumber}else{{const mined=yield this.getTransaction(transactionHash);if(mined&&mined.blockNumber!=null){return}}if(scannedBlock==null){scannedBlock=lastBlockNumber-3;if(scannedBlock{if(done){return}this.once("block",replaceHandler)})});if(done){return}this.once("block",replaceHandler);cancelFuncs.push(()=>{this.removeListener("block",replaceHandler)})}if(typeof timeout==="number"&&timeout>0){const timer=setTimeout(()=>{if(alreadyDone()){return}reject(logger$t.makeError("timeout exceeded",Logger.errors.TIMEOUT,{timeout:timeout}))},timeout);if(timer.unref){timer.unref()}cancelFuncs.push(()=>{clearTimeout(timer)})}})})}getBlockNumber(){return __awaiter$9(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const result=yield this.perform("getGasPrice",{});try{return BigNumber.from(result)}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:result,error:error})}})}getBalance(addressOrName,blockTag){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)});const result=yield this.perform("getBalance",params);try{return BigNumber.from(result)}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getBalance",params:params,result:result,error:error})}})}getTransactionCount(addressOrName,blockTag){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)});const result=yield this.perform("getTransactionCount",params);try{return BigNumber.from(result).toNumber()}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:params,result:result,error:error})}})}getCode(addressOrName,blockTag){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)});const result=yield this.perform("getCode",params);try{return hexlify(result)}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getCode",params:params,result:result,error:error})}})}getStorageAt(addressOrName,position,blockTag){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag),position:Promise.resolve(position).then(p=>hexValue(p))});const result=yield this.perform("getStorageAt",params);try{return hexlify(result)}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:params,result:result,error:error})}})}_wrapTransaction(tx,hash,startBlock){if(hash!=null&&hexDataLength(hash)!==32){throw new Error("invalid response - sendTransaction")}const result=tx;if(hash!=null&&tx.hash!==hash){logger$t.throwError("Transaction hash mismatch from Provider.sendTransaction.",Logger.errors.UNKNOWN_ERROR,{expectedHash:tx.hash,returnedHash:hash})}result.wait=((confirms,timeout)=>__awaiter$9(this,void 0,void 0,function*(){if(confirms==null){confirms=1}if(timeout==null){timeout=0}let replacement=undefined;if(confirms!==0&&startBlock!=null){replacement={data:tx.data,from:tx.from,nonce:tx.nonce,to:tx.to,value:tx.value,startBlock:startBlock}}const receipt=yield this._waitForTransaction(tx.hash,confirms,timeout,replacement);if(receipt==null&&confirms===0){return null}this._emitted["t:"+tx.hash]=receipt.blockNumber;if(receipt.status===0){logger$t.throwError("transaction failed",Logger.errors.CALL_EXCEPTION,{transactionHash:tx.hash,transaction:tx,receipt:receipt})}return receipt}));return result}sendTransaction(signedTransaction){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const hexTx=yield Promise.resolve(signedTransaction).then(t=>hexlify(t));const tx=this.formatter.transaction(signedTransaction);if(tx.confirmations==null){tx.confirmations=0}const blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const hash=yield this.perform("sendTransaction",{signedTransaction:hexTx});return this._wrapTransaction(tx,hash,blockNumber)}catch(error){error.transaction=tx;error.transactionHash=tx.hash;throw error}})}_getTransactionRequest(transaction){return __awaiter$9(this,void 0,void 0,function*(){const values=yield transaction;const tx={};["from","to"].forEach(key=>{if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(v=>v?this._getAddress(v):null)});["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(key=>{if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(v=>v?BigNumber.from(v):null)});["type"].forEach(key=>{if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(v=>v!=null?v:null)});if(values.accessList){tx.accessList=this.formatter.accessList(values.accessList)}["data"].forEach(key=>{if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(v=>v?hexlify(v):null)});return this.formatter.transactionRequest(yield resolveProperties(tx))})}_getFilter(filter){return __awaiter$9(this,void 0,void 0,function*(){filter=yield filter;const result={};if(filter.address!=null){result.address=this._getAddress(filter.address)}["blockHash","topics"].forEach(key=>{if(filter[key]==null){return}result[key]=filter[key]});["fromBlock","toBlock"].forEach(key=>{if(filter[key]==null){return}result[key]=this._getBlockTag(filter[key])});return this.formatter.filter(yield resolveProperties(result))})}call(transaction,blockTag){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({transaction:this._getTransactionRequest(transaction),blockTag:this._getBlockTag(blockTag)});const result=yield this.perform("call",params);try{return hexlify(result)}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"call",params:params,result:result,error:error})}})}estimateGas(transaction){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({transaction:this._getTransactionRequest(transaction)});const result=yield this.perform("estimateGas",params);try{return BigNumber.from(result)}catch(error){return logger$t.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"estimateGas",params:params,result:result,error:error})}})}_getAddress(addressOrName){return __awaiter$9(this,void 0,void 0,function*(){addressOrName=yield addressOrName;if(typeof addressOrName!=="string"){logger$t.throwArgumentError("invalid address or ENS name","name",addressOrName)}const address=yield this.resolveName(addressOrName);if(address==null){logger$t.throwError("ENS name not configured",Logger.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(addressOrName)})`})}return address})}_getBlock(blockHashOrBlockTag,includeTransactions){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();blockHashOrBlockTag=yield blockHashOrBlockTag;let blockNumber=-128;const params={includeTransactions:!!includeTransactions};if(isHexString(blockHashOrBlockTag,32)){params.blockHash=blockHashOrBlockTag}else{try{params.blockTag=yield this._getBlockTag(blockHashOrBlockTag);if(isHexString(params.blockTag)){blockNumber=parseInt(params.blockTag.substring(2),16)}}catch(error){logger$t.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",blockHashOrBlockTag)}}return poll(()=>__awaiter$9(this,void 0,void 0,function*(){const block=yield this.perform("getBlock",params);if(block==null){if(params.blockHash!=null){if(this._emitted["b:"+params.blockHash]==null){return null}}if(params.blockTag!=null){if(blockNumber>this._emitted.block){return null}}return undefined}if(includeTransactions){let blockNumber=null;for(let i=0;ithis._wrapTransaction(tx));return blockWithTxs}return this.formatter.block(block)}),{oncePoll:this})})}getBlock(blockHashOrBlockTag){return this._getBlock(blockHashOrBlockTag,false)}getBlockWithTransactions(blockHashOrBlockTag){return this._getBlock(blockHashOrBlockTag,true)}getTransaction(transactionHash){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();transactionHash=yield transactionHash;const params={transactionHash:this.formatter.hash(transactionHash,true)};return poll(()=>__awaiter$9(this,void 0,void 0,function*(){const result=yield this.perform("getTransaction",params);if(result==null){if(this._emitted["t:"+transactionHash]==null){return null}return undefined}const tx=this.formatter.transactionResponse(result);if(tx.blockNumber==null){tx.confirmations=0}else if(tx.confirmations==null){const blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval);let confirmations=blockNumber-tx.blockNumber+1;if(confirmations<=0){confirmations=1}tx.confirmations=confirmations}return this._wrapTransaction(tx)}),{oncePoll:this})})}getTransactionReceipt(transactionHash){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();transactionHash=yield transactionHash;const params={transactionHash:this.formatter.hash(transactionHash,true)};return poll(()=>__awaiter$9(this,void 0,void 0,function*(){const result=yield this.perform("getTransactionReceipt",params);if(result==null){if(this._emitted["t:"+transactionHash]==null){return null}return undefined}if(result.blockHash==null){return undefined}const receipt=this.formatter.receipt(result);if(receipt.blockNumber==null){receipt.confirmations=0}else if(receipt.confirmations==null){const blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval);let confirmations=blockNumber-receipt.blockNumber+1;if(confirmations<=0){confirmations=1}receipt.confirmations=confirmations}return receipt}),{oncePoll:this})})}getLogs(filter){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();const params=yield resolveProperties({filter:this._getFilter(filter)});const logs=yield this.perform("getLogs",params);logs.forEach(log=>{if(log.removed==null){log.removed=false}});return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)})}getEtherPrice(){return __awaiter$9(this,void 0,void 0,function*(){yield this.getNetwork();return this.perform("getEtherPrice",{})})}_getBlockTag(blockTag){return __awaiter$9(this,void 0,void 0,function*(){blockTag=yield blockTag;if(typeof blockTag==="number"&&blockTag<0){if(blockTag%1){logger$t.throwArgumentError("invalid BlockTag","blockTag",blockTag)}let blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval);blockNumber+=blockTag;if(blockNumber<0){blockNumber=0}return this.formatter.blockTag(blockNumber)}return this.formatter.blockTag(blockTag)})}getResolver(name){return __awaiter$9(this,void 0,void 0,function*(){try{const address=yield this._getResolver(name);if(address==null){return null}return new Resolver(this,address,name)}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION){return null}return null}})}_getResolver(name){return __awaiter$9(this,void 0,void 0,function*(){const network=yield this.getNetwork();if(!network.ensAddress){logger$t.throwError("network does not support ENS",Logger.errors.UNSUPPORTED_OPERATION,{operation:"ENS",network:network.name})}const transaction={to:network.ensAddress,data:"0x0178b8bf"+namehash(name).substring(2)};try{return this.formatter.callAddress(yield this.call(transaction))}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION){return null}throw error}})}resolveName(name){return __awaiter$9(this,void 0,void 0,function*(){name=yield name;try{return Promise.resolve(this.formatter.address(name))}catch(error){if(isHexString(name)){throw error}}if(typeof name!=="string"){logger$t.throwArgumentError("invalid ENS name","name",name)}const resolver=yield this.getResolver(name);if(!resolver){return null}return yield resolver.getAddress()})}lookupAddress(address){return __awaiter$9(this,void 0,void 0,function*(){address=yield address;address=this.formatter.address(address);const reverseName=address.substring(2).toLowerCase()+".addr.reverse";const resolverAddress=yield this._getResolver(reverseName);if(!resolverAddress){return null}let bytes=arrayify(yield this.call({to:resolverAddress,data:"0x691f3431"+namehash(reverseName).substring(2)}));if(bytes.length<32||!BigNumber.from(bytes.slice(0,32)).eq(32)){return null}bytes=bytes.slice(32);if(bytes.length<32){return null}const length=BigNumber.from(bytes.slice(0,32)).toNumber();bytes=bytes.slice(32);if(length>bytes.length){return null}const name=toUtf8String(bytes.slice(0,length));const addr=yield this.resolveName(name);if(addr!=address){return null}return name})}getAvatar(nameOrAddress){return __awaiter$9(this,void 0,void 0,function*(){let resolver=null;if(isHexString(nameOrAddress)){const address=this.formatter.address(nameOrAddress);const reverseName=address.substring(2).toLowerCase()+".addr.reverse";const resolverAddress=yield this._getResolver(reverseName);if(!resolverAddress){return null}resolver=new Resolver(this,resolverAddress,"_",address)}else{resolver=yield this.getResolver(nameOrAddress);if(!resolver){return null}}const avatar=yield resolver.getAvatar();if(avatar==null){return null}return avatar.url})}perform(method,params){return logger$t.throwError(method+" not implemented",Logger.errors.NOT_IMPLEMENTED,{operation:method})}_startEvent(event){this.polling=this._events.filter(e=>e.pollable()).length>0}_stopEvent(event){this.polling=this._events.filter(e=>e.pollable()).length>0}_addEventListener(eventName,listener,once){const event=new Event(getEventTag$1(eventName),listener,once);this._events.push(event);this._startEvent(event);return this}on(eventName,listener){return this._addEventListener(eventName,listener,false)}once(eventName,listener){return this._addEventListener(eventName,listener,true)}emit(eventName,...args){let result=false;let stopped=[];let eventTag=getEventTag$1(eventName);this._events=this._events.filter(event=>{if(event.tag!==eventTag){return true}setTimeout(()=>{event.listener.apply(this,args)},0);result=true;if(event.once){stopped.push(event);return false}return true});stopped.forEach(event=>{this._stopEvent(event)});return result}listenerCount(eventName){if(!eventName){return this._events.length}let eventTag=getEventTag$1(eventName);return this._events.filter(event=>{return event.tag===eventTag}).length}listeners(eventName){if(eventName==null){return this._events.map(event=>event.listener)}let eventTag=getEventTag$1(eventName);return this._events.filter(event=>event.tag===eventTag).map(event=>event.listener)}off(eventName,listener){if(listener==null){return this.removeAllListeners(eventName)}const stopped=[];let found=false;let eventTag=getEventTag$1(eventName);this._events=this._events.filter(event=>{if(event.tag!==eventTag||event.listener!=listener){return true}if(found){return true}found=true;stopped.push(event);return false});stopped.forEach(event=>{this._stopEvent(event)});return this}removeAllListeners(eventName){let stopped=[];if(eventName==null){stopped=this._events;this._events=[]}else{const eventTag=getEventTag$1(eventName);this._events=this._events.filter(event=>{if(event.tag!==eventTag){return true}stopped.push(event);return false})}stopped.forEach(event=>{this._stopEvent(event)});return this}}"use strict";var __awaiter$a=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$u=new Logger(version$m);const errorGas=["call","estimateGas"];function checkError(method,error,params){if(method==="call"&&error.code===Logger.errors.SERVER_ERROR){const e=error.error;if(e&&e.message.match("reverted")&&isHexString(e.data)){return e.data}logger$u.throwError("missing revert data in call exception",Logger.errors.CALL_EXCEPTION,{error:error,data:"0x"})}let message=error.message;if(error.code===Logger.errors.SERVER_ERROR&&error.error&&typeof error.error.message==="string"){message=error.error.message}else if(typeof error.body==="string"){message=error.body}else if(typeof error.responseText==="string"){message=error.responseText}message=(message||"").toLowerCase();const transaction=params.transaction||params.signedTransaction;if(message.match(/insufficient funds|base fee exceeds gas limit/)){logger$u.throwError("insufficient funds for intrinsic transaction cost",Logger.errors.INSUFFICIENT_FUNDS,{error:error,method:method,transaction:transaction})}if(message.match(/nonce too low/)){logger$u.throwError("nonce has already been used",Logger.errors.NONCE_EXPIRED,{error:error,method:method,transaction:transaction})}if(message.match(/replacement transaction underpriced/)){logger$u.throwError("replacement fee too low",Logger.errors.REPLACEMENT_UNDERPRICED,{error:error,method:method,transaction:transaction})}if(message.match(/only replay-protected/)){logger$u.throwError("legacy pre-eip-155 transactions not supported",Logger.errors.UNSUPPORTED_OPERATION,{error:error,method:method,transaction:transaction})}if(errorGas.indexOf(method)>=0&&message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)){logger$u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:error,method:method,transaction:transaction})}throw error}function timer(timeout){return new Promise(function(resolve){setTimeout(resolve,timeout)})}function getResult(payload){if(payload.error){const error=new Error(payload.error.message);error.code=payload.error.code;error.data=payload.error.data;throw error}return payload.result}function getLowerCase(value){if(value){return value.toLowerCase()}return value}const _constructorGuard$4={};class JsonRpcSigner extends Signer{constructor(constructorGuard,provider,addressOrIndex){logger$u.checkNew(new.target,JsonRpcSigner);super();if(constructorGuard!==_constructorGuard$4){throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner")}defineReadOnly(this,"provider",provider);if(addressOrIndex==null){addressOrIndex=0}if(typeof addressOrIndex==="string"){defineReadOnly(this,"_address",this.provider.formatter.address(addressOrIndex));defineReadOnly(this,"_index",null)}else if(typeof addressOrIndex==="number"){defineReadOnly(this,"_index",addressOrIndex);defineReadOnly(this,"_address",null)}else{logger$u.throwArgumentError("invalid address or index","addressOrIndex",addressOrIndex)}}connect(provider){return logger$u.throwError("cannot alter JSON-RPC Signer connection",Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new UncheckedJsonRpcSigner(_constructorGuard$4,this.provider,this._address||this._index)}getAddress(){if(this._address){return Promise.resolve(this._address)}return this.provider.send("eth_accounts",[]).then(accounts=>{if(accounts.length<=this._index){logger$u.throwError("unknown account #"+this._index,Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"})}return this.provider.formatter.address(accounts[this._index])})}sendUncheckedTransaction(transaction){transaction=shallowCopy(transaction);const fromAddress=this.getAddress().then(address=>{if(address){address=address.toLowerCase()}return address});if(transaction.gasLimit==null){const estimate=shallowCopy(transaction);estimate.from=fromAddress;transaction.gasLimit=this.provider.estimateGas(estimate)}if(transaction.to!=null){transaction.to=Promise.resolve(transaction.to).then(to=>__awaiter$a(this,void 0,void 0,function*(){if(to==null){return null}const address=yield this.provider.resolveName(to);if(address==null){logger$u.throwArgumentError("provided ENS name resolves to null","tx.to",to)}return address}))}return resolveProperties({tx:resolveProperties(transaction),sender:fromAddress}).then(({tx:tx,sender:sender})=>{if(tx.from!=null){if(tx.from.toLowerCase()!==sender){logger$u.throwArgumentError("from address mismatch","transaction",transaction)}}else{tx.from=sender}const hexTx=this.provider.constructor.hexlifyTransaction(tx,{from:true});return this.provider.send("eth_sendTransaction",[hexTx]).then(hash=>{return hash},error=>{return checkError("sendTransaction",error,hexTx)})})}signTransaction(transaction){return logger$u.throwError("signing transactions is unsupported",Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(transaction){return __awaiter$a(this,void 0,void 0,function*(){const blockNumber=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);const hash=yield this.sendUncheckedTransaction(transaction);try{return yield poll(()=>__awaiter$a(this,void 0,void 0,function*(){const tx=yield this.provider.getTransaction(hash);if(tx===null){return undefined}return this.provider._wrapTransaction(tx,hash,blockNumber)}),{oncePoll:this.provider})}catch(error){error.transactionHash=hash;throw error}})}signMessage(message){return __awaiter$a(this,void 0,void 0,function*(){const data=typeof message==="string"?toUtf8Bytes(message):message;const address=yield this.getAddress();return yield this.provider.send("personal_sign",[hexlify(data),address.toLowerCase()])})}_legacySignMessage(message){return __awaiter$a(this,void 0,void 0,function*(){const data=typeof message==="string"?toUtf8Bytes(message):message;const address=yield this.getAddress();return yield this.provider.send("eth_sign",[address.toLowerCase(),hexlify(data)])})}_signTypedData(domain,types,value){return __awaiter$a(this,void 0,void 0,function*(){const populated=yield TypedDataEncoder.resolveNames(domain,types,value,name=>{return this.provider.resolveName(name)});const address=yield this.getAddress();return yield this.provider.send("eth_signTypedData_v4",[address.toLowerCase(),JSON.stringify(TypedDataEncoder.getPayload(populated.domain,types,populated.value))])})}unlock(password){return __awaiter$a(this,void 0,void 0,function*(){const provider=this.provider;const address=yield this.getAddress();return provider.send("personal_unlockAccount",[address.toLowerCase(),password,null])})}}class UncheckedJsonRpcSigner extends JsonRpcSigner{sendTransaction(transaction){return this.sendUncheckedTransaction(transaction).then(hash=>{return{hash:hash,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:confirmations=>{return this.provider.waitForTransaction(hash,confirmations)}}})}}const allowedTransactionKeys$3={chainId:true,data:true,gasLimit:true,gasPrice:true,nonce:true,to:true,value:true,type:true,accessList:true,maxFeePerGas:true,maxPriorityFeePerGas:true};class JsonRpcProvider extends BaseProvider{constructor(url,network){logger$u.checkNew(new.target,JsonRpcProvider);let networkOrReady=network;if(networkOrReady==null){networkOrReady=new Promise((resolve,reject)=>{setTimeout(()=>{this.detectNetwork().then(network=>{resolve(network)},error=>{reject(error)})},0)})}super(networkOrReady);if(!url){url=getStatic(this.constructor,"defaultUrl")()}if(typeof url==="string"){defineReadOnly(this,"connection",Object.freeze({url:url}))}else{defineReadOnly(this,"connection",Object.freeze(shallowCopy(url)))}this._nextId=42}get _cache(){if(this._eventLoopCache==null){this._eventLoopCache={}}return this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){if(!this._cache["detectNetwork"]){this._cache["detectNetwork"]=this._uncachedDetectNetwork();setTimeout(()=>{this._cache["detectNetwork"]=null},0)}return this._cache["detectNetwork"]}_uncachedDetectNetwork(){return __awaiter$a(this,void 0,void 0,function*(){yield timer(0);let chainId=null;try{chainId=yield this.send("eth_chainId",[])}catch(error){try{chainId=yield this.send("net_version",[])}catch(error){}}if(chainId!=null){const getNetwork=getStatic(this.constructor,"getNetwork");try{return getNetwork(BigNumber.from(chainId).toNumber())}catch(error){return logger$u.throwError("could not detect network",Logger.errors.NETWORK_ERROR,{chainId:chainId,event:"invalidNetwork",serverError:error})}}return logger$u.throwError("could not detect network",Logger.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(addressOrIndex){return new JsonRpcSigner(_constructorGuard$4,this,addressOrIndex)}getUncheckedSigner(addressOrIndex){return this.getSigner(addressOrIndex).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(accounts=>{return accounts.map(a=>this.formatter.address(a))})}send(method,params){const request={method:method,params:params,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:deepCopy(request),provider:this});const cache=["eth_chainId","eth_blockNumber"].indexOf(method)>=0;if(cache&&this._cache[method]){return this._cache[method]}const result=fetchJson(this.connection,JSON.stringify(request),getResult).then(result=>{this.emit("debug",{action:"response",request:request,response:result,provider:this});return result},error=>{this.emit("debug",{action:"response",error:error,request:request,provider:this});throw error});if(cache){this._cache[method]=result;setTimeout(()=>{this._cache[method]=null},0)}return result}prepareRequest(method,params){switch(method){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[getLowerCase(params.address),params.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[getLowerCase(params.address),params.blockTag]];case"getCode":return["eth_getCode",[getLowerCase(params.address),params.blockTag]];case"getStorageAt":return["eth_getStorageAt",[getLowerCase(params.address),params.position,params.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[params.signedTransaction]];case"getBlock":if(params.blockTag){return["eth_getBlockByNumber",[params.blockTag,!!params.includeTransactions]]}else if(params.blockHash){return["eth_getBlockByHash",[params.blockHash,!!params.includeTransactions]]}return null;case"getTransaction":return["eth_getTransactionByHash",[params.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[params.transactionHash]];case"call":{const hexlifyTransaction=getStatic(this.constructor,"hexlifyTransaction");return["eth_call",[hexlifyTransaction(params.transaction,{from:true}),params.blockTag]]}case"estimateGas":{const hexlifyTransaction=getStatic(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[hexlifyTransaction(params.transaction,{from:true})]]}case"getLogs":if(params.filter&¶ms.filter.address!=null){params.filter.address=getLowerCase(params.filter.address)}return["eth_getLogs",[params.filter]];default:break}return null}perform(method,params){return __awaiter$a(this,void 0,void 0,function*(){if(method==="call"||method==="estimateGas"){const tx=params.transaction;if(tx&&tx.type!=null&&BigNumber.from(tx.type).isZero()){if(tx.maxFeePerGas==null&&tx.maxPriorityFeePerGas==null){const feeData=yield this.getFeeData();if(feeData.maxFeePerGas==null&&feeData.maxPriorityFeePerGas==null){params=shallowCopy(params);params.transaction=shallowCopy(tx);delete params.transaction.type}}}}const args=this.prepareRequest(method,params);if(args==null){logger$u.throwError(method+" not implemented",Logger.errors.NOT_IMPLEMENTED,{operation:method})}try{return yield this.send(args[0],args[1])}catch(error){return checkError(method,error,params)}})}_startEvent(event){if(event.tag==="pending"){this._startPending()}super._startEvent(event)}_startPending(){if(this._pendingFilter!=null){return}const self=this;const pendingFilter=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=pendingFilter;pendingFilter.then(function(filterId){function poll(){self.send("eth_getFilterChanges",[filterId]).then(function(hashes){if(self._pendingFilter!=pendingFilter){return null}let seq=Promise.resolve();hashes.forEach(function(hash){self._emitted["t:"+hash.toLowerCase()]="pending";seq=seq.then(function(){return self.getTransaction(hash).then(function(tx){self.emit("pending",tx);return null})})});return seq.then(function(){return timer(1e3)})}).then(function(){if(self._pendingFilter!=pendingFilter){self.send("eth_uninstallFilter",[filterId]);return}setTimeout(function(){poll()},0);return null}).catch(error=>{})}poll();return filterId}).catch(error=>{})}_stopEvent(event){if(event.tag==="pending"&&this.listenerCount("pending")===0){this._pendingFilter=null}super._stopEvent(event)}static hexlifyTransaction(transaction,allowExtra){const allowed=shallowCopy(allowedTransactionKeys$3);if(allowExtra){for(const key in allowExtra){if(allowExtra[key]){allowed[key]=true}}}checkProperties(transaction,allowed);const result={};["gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(key){if(transaction[key]==null){return}const value=hexValue(transaction[key]);if(key==="gasLimit"){key="gas"}result[key]=value});["from","to","data"].forEach(function(key){if(transaction[key]==null){return}result[key]=hexlify(transaction[key])});if(transaction.accessList){result["accessList"]=accessListify(transaction.accessList)}return result}}"use strict";let WS=null;try{WS=WebSocket;if(WS==null){throw new Error("inject please")}}catch(error){const logger=new Logger(version$m);WS=function(){logger.throwError("WebSockets not supported in this environment",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}"use strict";var __awaiter$b=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$v=new Logger(version$m);let NextId=1;class WebSocketProvider extends JsonRpcProvider{constructor(url,network){if(network==="any"){logger$v.throwError("WebSocketProvider does not support 'any' network yet",Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"})}super(url,network);this._pollingInterval=-1;this._wsReady=false;defineReadOnly(this,"_websocket",new WS(this.connection.url));defineReadOnly(this,"_requests",{});defineReadOnly(this,"_subs",{});defineReadOnly(this,"_subIds",{});defineReadOnly(this,"_detectNetwork",super.detectNetwork());this._websocket.onopen=(()=>{this._wsReady=true;Object.keys(this._requests).forEach(id=>{this._websocket.send(this._requests[id].payload)})});this._websocket.onmessage=(messageEvent=>{const data=messageEvent.data;const result=JSON.parse(data);if(result.id!=null){const id=String(result.id);const request=this._requests[id];delete this._requests[id];if(result.result!==undefined){request.callback(null,result.result);this.emit("debug",{action:"response",request:JSON.parse(request.payload),response:result.result,provider:this})}else{let error=null;if(result.error){error=new Error(result.error.message||"unknown error");defineReadOnly(error,"code",result.error.code||null);defineReadOnly(error,"response",data)}else{error=new Error("unknown error")}request.callback(error,undefined);this.emit("debug",{action:"response",error:error,request:JSON.parse(request.payload),provider:this})}}else if(result.method==="eth_subscription"){const sub=this._subs[result.params.subscription];if(sub){sub.processFunc(result.params.result)}}else{console.warn("this should not happen")}});const fauxPoll=setInterval(()=>{this.emit("poll")},1e3);if(fauxPoll.unref){fauxPoll.unref()}}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(blockNumber){logger$v.throwError("cannot reset events block on WebSocketProvider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(value){logger$v.throwError("cannot set polling interval on WebSocketProvider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return __awaiter$b(this,void 0,void 0,function*(){return null})}set polling(value){if(!value){return}logger$v.throwError("cannot set polling on WebSocketProvider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(method,params){const rid=NextId++;return new Promise((resolve,reject)=>{function callback(error,result){if(error){return reject(error)}return resolve(result)}const payload=JSON.stringify({method:method,params:params,id:rid,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(payload),provider:this});this._requests[String(rid)]={callback:callback,payload:payload};if(this._wsReady){this._websocket.send(payload)}})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(tag,param,processFunc){return __awaiter$b(this,void 0,void 0,function*(){let subIdPromise=this._subIds[tag];if(subIdPromise==null){subIdPromise=Promise.all(param).then(param=>{return this.send("eth_subscribe",param)});this._subIds[tag]=subIdPromise}const subId=yield subIdPromise;this._subs[subId]={tag:tag,processFunc:processFunc}})}_startEvent(event){switch(event.type){case"block":this._subscribe("block",["newHeads"],result=>{const blockNumber=BigNumber.from(result.number).toNumber();this._emitted.block=blockNumber;this.emit("block",blockNumber)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],result=>{this.emit("pending",result)});break;case"filter":this._subscribe(event.tag,["logs",this._getFilter(event.filter)],result=>{if(result.removed==null){result.removed=false}this.emit(event.filter,this.formatter.filterLog(result))});break;case"tx":{const emitReceipt=event=>{const hash=event.hash;this.getTransactionReceipt(hash).then(receipt=>{if(!receipt){return}this.emit(hash,receipt)})};emitReceipt(event);this._subscribe("tx",["newHeads"],result=>{this._events.filter(e=>e.type==="tx").forEach(emitReceipt)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",event);break}}_stopEvent(event){let tag=event.tag;if(event.type==="tx"){if(this._events.filter(e=>e.type==="tx").length){return}tag="tx"}else if(this.listenerCount(event.event)){return}const subId=this._subIds[tag];if(!subId){return}delete this._subIds[tag];subId.then(subId=>{if(!this._subs[subId]){return}delete this._subs[subId];this.send("eth_unsubscribe",[subId])})}destroy(){return __awaiter$b(this,void 0,void 0,function*(){if(this._websocket.readyState===WS.CONNECTING){yield new Promise(resolve=>{this._websocket.onopen=function(){resolve(true)};this._websocket.onerror=function(){resolve(false)}})}this._websocket.close(1e3)})}}"use strict";var __awaiter$c=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$w=new Logger(version$m);class StaticJsonRpcProvider extends JsonRpcProvider{detectNetwork(){const _super=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return __awaiter$c(this,void 0,void 0,function*(){let network=this.network;if(network==null){network=yield _super.detectNetwork.call(this);if(!network){logger$w.throwError("no network detected",Logger.errors.UNKNOWN_ERROR,{})}if(this._network==null){defineReadOnly(this,"_network",network);this.emit("network",network,null)}}return network})}}class UrlJsonRpcProvider extends StaticJsonRpcProvider{constructor(network,apiKey){logger$w.checkAbstract(new.target,UrlJsonRpcProvider);network=getStatic(new.target,"getNetwork")(network);apiKey=getStatic(new.target,"getApiKey")(apiKey);const connection=getStatic(new.target,"getUrl")(network,apiKey);super(connection,network);if(typeof apiKey==="string"){defineReadOnly(this,"apiKey",apiKey)}else if(apiKey!=null){Object.keys(apiKey).forEach(key=>{defineReadOnly(this,key,apiKey[key])})}}_startPending(){logger$w.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return false}getSigner(address){return logger$w.throwError("API provider does not support signing",Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(apiKey){return apiKey}static getUrl(network,apiKey){return logger$w.throwError("not implemented; sub-classes must override getUrl",Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}"use strict";const logger$x=new Logger(version$m);const defaultApiKey="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class AlchemyWebSocketProvider extends WebSocketProvider{constructor(network,apiKey){const provider=new AlchemyProvider(network,apiKey);const url=provider.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(url,provider.network);defineReadOnly(this,"apiKey",provider.apiKey)}isCommunityResource(){return this.apiKey===defaultApiKey}}class AlchemyProvider extends UrlJsonRpcProvider{static getWebSocketProvider(network,apiKey){return new AlchemyWebSocketProvider(network,apiKey)}static getApiKey(apiKey){if(apiKey==null){return defaultApiKey}if(apiKey&&typeof apiKey!=="string"){logger$x.throwArgumentError("invalid apiKey","apiKey",apiKey)}return apiKey}static getUrl(network,apiKey){let host=null;switch(network.name){case"homestead":host="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":host="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":host="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":host="eth-goerli.alchemyapi.io/v2/";break;case"kovan":host="eth-kovan.alchemyapi.io/v2/";break;case"matic":host="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":host="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":host="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-rinkeby":host="arb-rinkeby.g.alchemy.com/v2/";break;case"optimism":host="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-kovan":host="opt-kovan.g.alchemy.com/v2/";break;default:logger$x.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:true,url:"https:/"+"/"+host+apiKey,throttleCallback:(attempt,url)=>{if(apiKey===defaultApiKey){showThrottleMessage()}return Promise.resolve(true)}}}isCommunityResource(){return this.apiKey===defaultApiKey}}"use strict";var __awaiter$d=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$y=new Logger(version$m);class CloudflareProvider extends UrlJsonRpcProvider{static getApiKey(apiKey){if(apiKey!=null){logger$y.throwArgumentError("apiKey not supported for cloudflare","apiKey",apiKey)}return null}static getUrl(network,apiKey){let host=null;switch(network.name){case"homestead":host="https://cloudflare-eth.com/";break;default:logger$y.throwArgumentError("unsupported network","network",arguments[0])}return host}perform(method,params){const _super=Object.create(null,{perform:{get:()=>super.perform}});return __awaiter$d(this,void 0,void 0,function*(){if(method==="getBlockNumber"){const block=yield _super.perform.call(this,"getBlock",{blockTag:"latest"});return block.number}return _super.perform.call(this,method,params)})}}"use strict";var __awaiter$e=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$z=new Logger(version$m);function getTransactionPostData(transaction){const result={};for(let key in transaction){if(transaction[key]==null){continue}let value=transaction[key];if(key==="type"&&value===0){continue}if({type:true,gasLimit:true,gasPrice:true,maxFeePerGs:true,maxPriorityFeePerGas:true,nonce:true,value:true}[key]){value=hexValue(hexlify(value))}else if(key==="accessList"){value="["+accessListify(value).map(set=>{return`{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`}).join(",")+"]"}else{value=hexlify(value)}result[key]=value}return result}function getResult$1(result){if(result.status==0&&(result.message==="No records found"||result.message==="No transactions found")){return result.result}if(result.status!=1||result.message!="OK"){const error=new Error("invalid response");error.result=JSON.stringify(result);if((result.result||"").toLowerCase().indexOf("rate limit")>=0){error.throttleRetry=true}throw error}return result.result}function getJsonResult(result){if(result&&result.status==0&&result.message=="NOTOK"&&(result.result||"").toLowerCase().indexOf("rate limit")>=0){const error=new Error("throttled response");error.result=JSON.stringify(result);error.throttleRetry=true;throw error}if(result.jsonrpc!="2.0"){const error=new Error("invalid response");error.result=JSON.stringify(result);throw error}if(result.error){const error=new Error(result.error.message||"unknown error");if(result.error.code){error.code=result.error.code}if(result.error.data){error.data=result.error.data}throw error}return result.result}function checkLogTag(blockTag){if(blockTag==="pending"){throw new Error("pending not supported")}if(blockTag==="latest"){return blockTag}return parseInt(blockTag.substring(2),16)}const defaultApiKey$1="9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";function checkError$1(method,error,transaction){if(method==="call"&&error.code===Logger.errors.SERVER_ERROR){const e=error.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let data=e.data;if(data){data="0x"+data.replace(/^.*0x/i,"")}if(isHexString(data)){return data}logger$z.throwError("missing revert data in call exception",Logger.errors.CALL_EXCEPTION,{error:error,data:"0x"})}}let message=error.message;if(error.code===Logger.errors.SERVER_ERROR){if(error.error&&typeof error.error.message==="string"){message=error.error.message}else if(typeof error.body==="string"){message=error.body}else if(typeof error.responseText==="string"){message=error.responseText}}message=(message||"").toLowerCase();if(message.match(/insufficient funds/)){logger$z.throwError("insufficient funds for intrinsic transaction cost",Logger.errors.INSUFFICIENT_FUNDS,{error:error,method:method,transaction:transaction})}if(message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)){logger$z.throwError("nonce has already been used",Logger.errors.NONCE_EXPIRED,{error:error,method:method,transaction:transaction})}if(message.match(/another transaction with same nonce/)){logger$z.throwError("replacement fee too low",Logger.errors.REPLACEMENT_UNDERPRICED,{error:error,method:method,transaction:transaction})}if(message.match(/execution failed due to an exception|execution reverted/)){logger$z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:error,method:method,transaction:transaction})}throw error}class EtherscanProvider extends BaseProvider{constructor(network,apiKey){logger$z.checkNew(new.target,EtherscanProvider);super(network);defineReadOnly(this,"baseUrl",this.getBaseUrl());defineReadOnly(this,"apiKey",apiKey||defaultApiKey$1)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";default:}return logger$z.throwArgumentError("unsupported network","network",name)}getUrl(module,params){const query=Object.keys(params).reduce((accum,key)=>{const value=params[key];if(value!=null){accum+=`&${key}=${value}`}return accum},"");const apiKey=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${module}${query}${apiKey}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(module,params){params.module=module;params.apikey=this.apiKey;return params}fetch(module,params,post){return __awaiter$e(this,void 0,void 0,function*(){const url=post?this.getPostUrl():this.getUrl(module,params);const payload=post?this.getPostData(module,params):null;const procFunc=module==="proxy"?getJsonResult:getResult$1;this.emit("debug",{action:"request",request:url,provider:this});const connection={url:url,throttleSlotInterval:1e3,throttleCallback:(attempt,url)=>{if(this.isCommunityResource()){showThrottleMessage()}return Promise.resolve(true)}};let payloadStr=null;if(payload){connection.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"};payloadStr=Object.keys(payload).map(key=>{return`${key}=${payload[key]}`}).join("&")}const result=yield fetchJson(connection,payloadStr,procFunc||getJsonResult);this.emit("debug",{action:"response",request:url,response:deepCopy(result),provider:this});return result})}detectNetwork(){return __awaiter$e(this,void 0,void 0,function*(){return this.network})}perform(method,params){const _super=Object.create(null,{perform:{get:()=>super.perform}});return __awaiter$e(this,void 0,void 0,function*(){switch(method){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:params.address,tag:params.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:params.address,tag:params.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:params.address,tag:params.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:params.address,position:params.position,tag:params.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:params.signedTransaction},true).catch(error=>{return checkError$1("sendTransaction",error,params.signedTransaction)});case"getBlock":if(params.blockTag){return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:params.blockTag,boolean:params.includeTransactions?"true":"false"})}throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:params.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:params.transactionHash});case"call":{if(params.blockTag!=="latest"){throw new Error("EtherscanProvider does not support blockTag for call")}const postData=getTransactionPostData(params.transaction);postData.module="proxy";postData.action="eth_call";try{return yield this.fetch("proxy",postData,true)}catch(error){return checkError$1("call",error,params.transaction)}}case"estimateGas":{const postData=getTransactionPostData(params.transaction);postData.module="proxy";postData.action="eth_estimateGas";try{return yield this.fetch("proxy",postData,true)}catch(error){return checkError$1("estimateGas",error,params.transaction)}}case"getLogs":{const args={action:"getLogs"};if(params.filter.fromBlock){args.fromBlock=checkLogTag(params.filter.fromBlock)}if(params.filter.toBlock){args.toBlock=checkLogTag(params.filter.toBlock)}if(params.filter.address){args.address=params.filter.address}if(params.filter.topics&¶ms.filter.topics.length>0){if(params.filter.topics.length>1){logger$z.throwError("unsupported topic count",Logger.errors.UNSUPPORTED_OPERATION,{topics:params.filter.topics})}if(params.filter.topics.length===1){const topic0=params.filter.topics[0];if(typeof topic0!=="string"||topic0.length!==66){logger$z.throwError("unsupported topic format",Logger.errors.UNSUPPORTED_OPERATION,{topic0:topic0})}args.topic0=topic0}}const logs=yield this.fetch("logs",args);let blocks={};for(let i=0;i{["contractAddress","to"].forEach(function(key){if(tx[key]==""){delete tx[key]}});if(tx.creates==null&&tx.contractAddress!=null){tx.creates=tx.contractAddress}const item=this.formatter.transactionResponse(tx);if(tx.timeStamp){item.timestamp=parseInt(tx.timeStamp)}return item})})}isCommunityResource(){return this.apiKey===defaultApiKey$1}}"use strict";var __awaiter$f=window&&window.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const logger$A=new Logger(version$m);function now(){return(new Date).getTime()}function checkNetworks(networks){let result=null;for(let i=0;imaxDelta){return null}return(a+b)/2}function serialize$1(value){if(value===null){return"null"}else if(typeof value==="number"||typeof value==="boolean"){return JSON.stringify(value)}else if(typeof value==="string"){return value}else if(BigNumber.isBigNumber(value)){return value.toString()}else if(Array.isArray(value)){return JSON.stringify(value.map(i=>serialize$1(i)))}else if(typeof value==="object"){const keys=Object.keys(value);keys.sort();return"{"+keys.map(key=>{let v=value[key];if(typeof v==="function"){v="[function]"}else{v=serialize$1(v)}return JSON.stringify(key)+":"+v}).join(",")+"}"}throw new Error("unknown value type: "+typeof value)}let nextRid=1;function stall$1(duration){let cancel=null;let timer=null;let promise=new Promise(resolve=>{cancel=function(){if(timer){clearTimeout(timer);timer=null}resolve()};timer=setTimeout(cancel,duration)});const wait=func=>{promise=promise.then(func);return promise};function getPromise(){return promise}return{cancel:cancel,getPromise:getPromise,wait:wait}}const ForwardErrors=[Logger.errors.CALL_EXCEPTION,Logger.errors.INSUFFICIENT_FUNDS,Logger.errors.NONCE_EXPIRED,Logger.errors.REPLACEMENT_UNDERPRICED,Logger.errors.UNPREDICTABLE_GAS_LIMIT];const ForwardProperties=["address","args","errorArgs","errorSignature","method","transaction"];function exposeDebugConfig(config,now){const result={weight:config.weight};Object.defineProperty(result,"provider",{get:()=>config.provider});if(config.start){result.start=config.start}if(now){result.duration=now-config.start}if(config.done){if(config.error){result.error=config.error}else{result.result=config.result||null}}return result}function normalizedTally(normalize,quorum){return function(configs){const tally={};configs.forEach(c=>{const value=normalize(c.result);if(!tally[value]){tally[value]={count:0,result:c.result}}tally[value].count++});const keys=Object.keys(tally);for(let i=0;i=quorum){return check.result}}return undefined}}function getProcessFunc(provider,method,params){let normalize=serialize$1;switch(method){case"getBlockNumber":return function(configs){const values=configs.map(c=>c.result);let blockNumber=median(configs.map(c=>c.result),2);if(blockNumber==null){return undefined}blockNumber=Math.ceil(blockNumber);if(values.indexOf(blockNumber+1)>=0){blockNumber++}if(blockNumber>=provider._highestBlockNumber){provider._highestBlockNumber=blockNumber}return provider._highestBlockNumber};case"getGasPrice":return function(configs){const values=configs.map(c=>c.result);values.sort();return values[Math.floor(values.length/2)]};case"getEtherPrice":return function(configs){return median(configs.map(c=>c.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":normalize=function(tx){if(tx==null){return null}tx=shallowCopy(tx);tx.confirmations=-1;return serialize$1(tx)};break;case"getBlock":if(params.includeTransactions){normalize=function(block){if(block==null){return null}block=shallowCopy(block);block.transactions=block.transactions.map(tx=>{tx=shallowCopy(tx);tx.confirmations=-1;return tx});return serialize$1(block)}}else{normalize=function(block){if(block==null){return null}return serialize$1(block)}}break;default:throw new Error("unknown method: "+method)}return normalizedTally(normalize,provider.quorum)}function waitForSync(config,blockNumber){return __awaiter$f(this,void 0,void 0,function*(){const provider=config.provider;if(provider.blockNumber!=null&&provider.blockNumber>=blockNumber||blockNumber===-1){return provider}return poll(()=>{return new Promise((resolve,reject)=>{setTimeout(function(){if(provider.blockNumber>=blockNumber){return resolve(provider)}if(config.cancelled){return resolve(null)}return resolve(undefined)},0)})},{oncePoll:provider})})}function getRunner(config,currentBlockNumber,method,params){return __awaiter$f(this,void 0,void 0,function*(){let provider=config.provider;switch(method){case"getBlockNumber":case"getGasPrice":return provider[method]();case"getEtherPrice":if(provider.getEtherPrice){return provider.getEtherPrice()}break;case"getBalance":case"getTransactionCount":case"getCode":if(params.blockTag&&isHexString(params.blockTag)){provider=yield waitForSync(config,currentBlockNumber)}return provider[method](params.address,params.blockTag||"latest");case"getStorageAt":if(params.blockTag&&isHexString(params.blockTag)){provider=yield waitForSync(config,currentBlockNumber)}return provider.getStorageAt(params.address,params.position,params.blockTag||"latest");case"getBlock":if(params.blockTag&&isHexString(params.blockTag)){provider=yield waitForSync(config,currentBlockNumber)}return provider[params.includeTransactions?"getBlockWithTransactions":"getBlock"](params.blockTag||params.blockHash);case"call":case"estimateGas":if(params.blockTag&&isHexString(params.blockTag)){provider=yield waitForSync(config,currentBlockNumber)}return provider[method](params.transaction);case"getTransaction":case"getTransactionReceipt":return provider[method](params.transactionHash);case"getLogs":{let filter=params.filter;if(filter.fromBlock&&isHexString(filter.fromBlock)||filter.toBlock&&isHexString(filter.toBlock)){provider=yield waitForSync(config,currentBlockNumber)}return provider.getLogs(filter)}}return logger$A.throwError("unknown method error",Logger.errors.UNKNOWN_ERROR,{method:method,params:params})})}class FallbackProvider extends BaseProvider{constructor(providers,quorum){logger$A.checkNew(new.target,FallbackProvider);if(providers.length===0){logger$A.throwArgumentError("missing providers","providers",providers)}const providerConfigs=providers.map((configOrProvider,index)=>{if(Provider.isProvider(configOrProvider)){const stallTimeout=isCommunityResource(configOrProvider)?2e3:750;const priority=1;return Object.freeze({provider:configOrProvider,weight:1,stallTimeout:stallTimeout,priority:priority})}const config=shallowCopy(configOrProvider);if(config.priority==null){config.priority=1}if(config.stallTimeout==null){config.stallTimeout=isCommunityResource(configOrProvider)?2e3:750}if(config.weight==null){config.weight=1}const weight=config.weight;if(weight%1||weight>512||weight<1){logger$A.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${index}].weight`,weight)}return Object.freeze(config)});const total=providerConfigs.reduce((accum,c)=>accum+c.weight,0);if(quorum==null){quorum=total/2}else if(quorum>total){logger$A.throwArgumentError("quorum will always fail; larger than total weight","quorum",quorum)}let networkOrReady=checkNetworks(providerConfigs.map(c=>c.provider.network));if(networkOrReady==null){networkOrReady=new Promise((resolve,reject)=>{setTimeout(()=>{this.detectNetwork().then(resolve,reject)},0)})}super(networkOrReady);defineReadOnly(this,"providerConfigs",Object.freeze(providerConfigs));defineReadOnly(this,"quorum",quorum);this._highestBlockNumber=-1}detectNetwork(){return __awaiter$f(this,void 0,void 0,function*(){const networks=yield Promise.all(this.providerConfigs.map(c=>c.provider.getNetwork()));return checkNetworks(networks)})}perform(method,params){return __awaiter$f(this,void 0,void 0,function*(){if(method==="sendTransaction"){const results=yield Promise.all(this.providerConfigs.map(c=>{return c.provider.sendTransaction(params.signedTransaction).then(result=>{return result.hash},error=>{return error})}));for(let i=0;ia.priority-b.priority);const currentBlockNumber=this._highestBlockNumber;let i=0;let first=true;while(true){const t0=now();let inflightWeight=configs.filter(c=>c.runner&&t0-c.startaccum+c.weight,0);while(inflightWeight{config.staller=null});config.runner=getRunner(config,currentBlockNumber,method,params).then(result=>{config.done=true;config.result=result;if(this.listenerCount("debug")){this.emit("debug",{action:"request",rid:rid,backend:exposeDebugConfig(config,now()),request:{method:method,params:deepCopy(params)},provider:this})}},error=>{config.done=true;config.error=error;if(this.listenerCount("debug")){this.emit("debug",{action:"request",rid:rid,backend:exposeDebugConfig(config,now()),request:{method:method,params:deepCopy(params)},provider:this})}});if(this.listenerCount("debug")){this.emit("debug",{action:"request",rid:rid,backend:exposeDebugConfig(config,null),request:{method:method,params:deepCopy(params)},provider:this})}inflightWeight+=config.weight}const waiting=[];configs.forEach(c=>{if(c.done||!c.runner){return}waiting.push(c.runner);if(c.staller){waiting.push(c.staller.getPromise())}});if(waiting.length){yield Promise.race(waiting)}const results=configs.filter(c=>c.done&&c.error==null);if(results.length>=this.quorum){const result=processFunc(results);if(result!==undefined){configs.forEach(c=>{if(c.staller){c.staller.cancel()}c.cancelled=true});return result}if(!first){yield stall$1(100).getPromise()}first=false}const errors=configs.reduce((accum,c)=>{if(!c.done||c.error==null){return accum}const code=c.error.code;if(ForwardErrors.indexOf(code)>=0){if(!accum[code]){accum[code]={error:c.error,weight:0}}accum[code].weight+=c.weight}return accum},{});Object.keys(errors).forEach(errorCode=>{const tally=errors[errorCode];if(tally.weight{if(c.staller){c.staller.cancel()}c.cancelled=true});const e=tally.error;const props={};ForwardProperties.forEach(name=>{if(e[name]==null){return}props[name]=e[name]});logger$A.throwError(e.reason||e.message,errorCode,props)});if(configs.filter(c=>!c.done).length===0){break}}configs.forEach(c=>{if(c.staller){c.staller.cancel()}c.cancelled=true});return logger$A.throwError("failed to meet quorum",Logger.errors.SERVER_ERROR,{method:method,params:params,results:configs.map(c=>exposeDebugConfig(c)),provider:this})})}}"use strict";const IpcProvider=null;"use strict";const logger$B=new Logger(version$m);const defaultProjectId="84842078b09946638c03157f83405213";class InfuraWebSocketProvider extends WebSocketProvider{constructor(network,apiKey){const provider=new InfuraProvider(network,apiKey);const connection=provider.connection;if(connection.password){logger$B.throwError("INFURA WebSocket project secrets unsupported",Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"})}const url=connection.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(url,network);defineReadOnly(this,"apiKey",provider.projectId);defineReadOnly(this,"projectId",provider.projectId);defineReadOnly(this,"projectSecret",provider.projectSecret)}isCommunityResource(){return this.projectId===defaultProjectId}}class InfuraProvider extends UrlJsonRpcProvider{static getWebSocketProvider(network,apiKey){return new InfuraWebSocketProvider(network,apiKey)}static getApiKey(apiKey){const apiKeyObj={apiKey:defaultProjectId,projectId:defaultProjectId,projectSecret:null};if(apiKey==null){return apiKeyObj}if(typeof apiKey==="string"){apiKeyObj.projectId=apiKey}else if(apiKey.projectSecret!=null){logger$B.assertArgument(typeof apiKey.projectId==="string","projectSecret requires a projectId","projectId",apiKey.projectId);logger$B.assertArgument(typeof apiKey.projectSecret==="string","invalid projectSecret","projectSecret","[REDACTED]");apiKeyObj.projectId=apiKey.projectId;apiKeyObj.projectSecret=apiKey.projectSecret}else if(apiKey.projectId){apiKeyObj.projectId=apiKey.projectId}apiKeyObj.apiKey=apiKeyObj.projectId;return apiKeyObj}static getUrl(network,apiKey){let host=null;switch(network?network.name:"unknown"){case"homestead":host="mainnet.infura.io";break;case"ropsten":host="ropsten.infura.io";break;case"rinkeby":host="rinkeby.infura.io";break;case"kovan":host="kovan.infura.io";break;case"goerli":host="goerli.infura.io";break;case"matic":host="polygon-mainnet.infura.io";break;case"maticmum":host="polygon-mumbai.infura.io";break;case"optimism":host="optimism-mainnet.infura.io";break;case"optimism-kovan":host="optimism-kovan.infura.io";break;case"arbitrum":host="arbitrum-mainnet.infura.io";break;case"arbitrum-rinkeby":host="arbitrum-rinkeby.infura.io";break;default:logger$B.throwError("unsupported network",Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}const connection={allowGzip:true,url:"https:/"+"/"+host+"/v3/"+apiKey.projectId,throttleCallback:(attempt,url)=>{if(apiKey.projectId===defaultProjectId){showThrottleMessage()}return Promise.resolve(true)}};if(apiKey.projectSecret!=null){connection.user="";connection.password=apiKey.projectSecret}return connection}isCommunityResource(){return this.projectId===defaultProjectId}}class JsonRpcBatchProvider extends JsonRpcProvider{send(method,params){const request={method:method,params:params,id:this._nextId++,jsonrpc:"2.0"};if(this._pendingBatch==null){this._pendingBatch=[]}const inflightRequest={request:request,resolve:null,reject:null};const promise=new Promise((resolve,reject)=>{inflightRequest.resolve=resolve;inflightRequest.reject=reject});this._pendingBatch.push(inflightRequest);if(!this._pendingBatchAggregator){this._pendingBatchAggregator=setTimeout(()=>{const batch=this._pendingBatch;this._pendingBatch=null;this._pendingBatchAggregator=null;const request=batch.map(inflight=>inflight.request);this.emit("debug",{action:"requestBatch",request:deepCopy(request),provider:this});return fetchJson(this.connection,JSON.stringify(request)).then(result=>{this.emit("debug",{action:"response",request:request,response:result,provider:this});batch.forEach((inflightRequest,index)=>{const payload=result[index];if(payload.error){const error=new Error(payload.error.message);error.code=payload.error.code;error.data=payload.error.data;inflightRequest.reject(error)}else{inflightRequest.resolve(payload.result)}})},error=>{this.emit("debug",{action:"response",error:error,request:request,provider:this});batch.forEach(inflightRequest=>{inflightRequest.reject(error)})})},10)}return promise}}"use strict";const logger$C=new Logger(version$m);const defaultApiKey$2="ETHERS_JS_SHARED";class NodesmithProvider extends UrlJsonRpcProvider{static getApiKey(apiKey){if(apiKey&&typeof apiKey!=="string"){logger$C.throwArgumentError("invalid apiKey","apiKey",apiKey)}return apiKey||defaultApiKey$2}static getUrl(network,apiKey){logger$C.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let host=null;switch(network.name){case"homestead":host="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":host="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":host="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":host="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":host="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:logger$C.throwArgumentError("unsupported network","network",arguments[0])}return host+"?apiKey="+apiKey}}"use strict";const logger$D=new Logger(version$m);const defaultApplicationIds={homestead:"6004bcd10040261633ade990",ropsten:"6004bd4d0040261633ade991",rinkeby:"6004bda20040261633ade994",goerli:"6004bd860040261633ade992"};class PocketProvider extends UrlJsonRpcProvider{constructor(network,apiKey){if(apiKey==null){const n=getStatic(new.target,"getNetwork")(network);if(n){const applicationId=defaultApplicationIds[n.name];if(applicationId){apiKey={applicationId:applicationId,loadBalancer:true}}}if(apiKey==null){logger$D.throwError("unsupported network",Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}}super(network,apiKey)}static getApiKey(apiKey){if(apiKey==null){logger$D.throwArgumentError("PocketProvider.getApiKey does not support null apiKey","apiKey",apiKey)}const apiKeyObj={applicationId:null,loadBalancer:false,applicationSecretKey:null};if(typeof apiKey==="string"){apiKeyObj.applicationId=apiKey}else if(apiKey.applicationSecretKey!=null){logger$D.assertArgument(typeof apiKey.applicationId==="string","applicationSecretKey requires an applicationId","applicationId",apiKey.applicationId);logger$D.assertArgument(typeof apiKey.applicationSecretKey==="string","invalid applicationSecretKey","applicationSecretKey","[REDACTED]");apiKeyObj.applicationId=apiKey.applicationId;apiKeyObj.applicationSecretKey=apiKey.applicationSecretKey;apiKeyObj.loadBalancer=!!apiKey.loadBalancer}else if(apiKey.applicationId){logger$D.assertArgument(typeof apiKey.applicationId==="string","apiKey.applicationId must be a string","apiKey.applicationId",apiKey.applicationId);apiKeyObj.applicationId=apiKey.applicationId;apiKeyObj.loadBalancer=!!apiKey.loadBalancer}else{logger$D.throwArgumentError("unsupported PocketProvider apiKey","apiKey",apiKey)}return apiKeyObj}static getUrl(network,apiKey){let host=null;switch(network?network.name:"unknown"){case"homestead":host="eth-mainnet.gateway.pokt.network";break;case"ropsten":host="eth-ropsten.gateway.pokt.network";break;case"rinkeby":host="eth-rinkeby.gateway.pokt.network";break;case"goerli":host="eth-goerli.gateway.pokt.network";break;default:logger$D.throwError("unsupported network",Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}let url=null;if(apiKey.loadBalancer){url=`https://${host}/v1/lb/${apiKey.applicationId}`}else{url=`https://${host}/v1/${apiKey.applicationId}`}const connection={url:url};connection.headers={};if(apiKey.applicationSecretKey!=null){connection.user="";connection.password=apiKey.applicationSecretKey}return connection}isCommunityResource(){return this.applicationId===defaultApplicationIds[this.network.name]}}"use strict";const logger$E=new Logger(version$m);let _nextId=1;function buildWeb3LegacyFetcher(provider,sendFunc){const fetcher="Web3LegacyFetcher";return function(method,params){const request={method:method,params:params,id:_nextId++,jsonrpc:"2.0"};return new Promise((resolve,reject)=>{this.emit("debug",{action:"request",fetcher:fetcher,request:deepCopy(request),provider:this});sendFunc(request,(error,response)=>{if(error){this.emit("debug",{action:"response",fetcher:fetcher,error:error,request:request,provider:this});return reject(error)}this.emit("debug",{action:"response",fetcher:fetcher,request:request,response:response,provider:this});if(response.error){const error=new Error(response.error.message);error.code=response.error.code;error.data=response.error.data;return reject(error)}resolve(response.result)})})}}function buildEip1193Fetcher(provider){return function(method,params){if(params==null){params=[]}const request={method:method,params:params};this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:deepCopy(request),provider:this});return provider.request(request).then(response=>{this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:request,response:response,provider:this});return response},error=>{this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:request,error:error,provider:this});throw error})}}class Web3Provider extends JsonRpcProvider{constructor(provider,network){logger$E.checkNew(new.target,Web3Provider);if(provider==null){logger$E.throwArgumentError("missing provider","provider",provider)}let path=null;let jsonRpcFetchFunc=null;let subprovider=null;if(typeof provider==="function"){path="unknown:";jsonRpcFetchFunc=provider}else{path=provider.host||provider.path||"";if(!path&&provider.isMetaMask){path="metamask"}subprovider=provider;if(provider.request){if(path===""){path="eip-1193:"}jsonRpcFetchFunc=buildEip1193Fetcher(provider)}else if(provider.sendAsync){jsonRpcFetchFunc=buildWeb3LegacyFetcher(provider,provider.sendAsync.bind(provider))}else if(provider.send){jsonRpcFetchFunc=buildWeb3LegacyFetcher(provider,provider.send.bind(provider))}else{logger$E.throwArgumentError("unsupported provider","provider",provider)}if(!path){path="unknown:"}}super(path,network);defineReadOnly(this,"jsonRpcFetchFunc",jsonRpcFetchFunc);defineReadOnly(this,"provider",subprovider)}send(method,params){return this.jsonRpcFetchFunc(method,params)}}"use strict";const logger$F=new Logger(version$m);function getDefaultProvider(network,options){if(network==null){network="homestead"}if(typeof network==="string"){const match=network.match(/^(ws|http)s?:/i);if(match){switch(match[1]){case"http":return new JsonRpcProvider(network);case"ws":return new WebSocketProvider(network);default:logger$F.throwArgumentError("unsupported URL scheme","network",network)}}}const n=getNetwork(network);if(!n||!n._defaultProvider){logger$F.throwError("unsupported getDefaultProvider network",Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:network})}return n._defaultProvider({FallbackProvider:FallbackProvider,AlchemyProvider:AlchemyProvider,CloudflareProvider:CloudflareProvider,EtherscanProvider:EtherscanProvider,InfuraProvider:InfuraProvider,JsonRpcProvider:JsonRpcProvider,NodesmithProvider:NodesmithProvider,PocketProvider:PocketProvider,Web3Provider:Web3Provider,IpcProvider:IpcProvider},options)}var index$3=Object.freeze({__proto__:null,Provider:Provider,BaseProvider:BaseProvider,Resolver:Resolver,UrlJsonRpcProvider:UrlJsonRpcProvider,FallbackProvider:FallbackProvider,AlchemyProvider:AlchemyProvider,AlchemyWebSocketProvider:AlchemyWebSocketProvider,CloudflareProvider:CloudflareProvider,EtherscanProvider:EtherscanProvider,InfuraProvider:InfuraProvider,InfuraWebSocketProvider:InfuraWebSocketProvider,JsonRpcProvider:JsonRpcProvider,JsonRpcBatchProvider:JsonRpcBatchProvider,NodesmithProvider:NodesmithProvider,PocketProvider:PocketProvider,StaticJsonRpcProvider:StaticJsonRpcProvider,Web3Provider:Web3Provider,WebSocketProvider:WebSocketProvider,IpcProvider:IpcProvider,JsonRpcSigner:JsonRpcSigner,getDefaultProvider:getDefaultProvider,getNetwork:getNetwork,isCommunityResource:isCommunityResource,isCommunityResourcable:isCommunityResourcable,showThrottleMessage:showThrottleMessage,Formatter:Formatter});const version$n="solidity/5.5.0";"use strict";const regexBytes=new RegExp("^bytes([0-9]+)$");const regexNumber=new RegExp("^(u?int)([0-9]*)$");const regexArray=new RegExp("^(.*)\\[([0-9]*)\\]$");const Zeros$1="0000000000000000000000000000000000000000000000000000000000000000";const logger$G=new Logger(version$n);function _pack(type,value,isArray){switch(type){case"address":if(isArray){return zeroPad(value,32)}return arrayify(value);case"string":return toUtf8Bytes(value);case"bytes":return arrayify(value);case"bool":value=value?"0x01":"0x00";if(isArray){return zeroPad(value,32)}return arrayify(value)}let match=type.match(regexNumber);if(match){let size=parseInt(match[2]||"256");if(match[2]&&String(size)!==match[2]||size%8!==0||size===0||size>256){logger$G.throwArgumentError("invalid number type","type",type)}if(isArray){size=256}value=BigNumber.from(value).toTwos(size);return zeroPad(value,size/8)}match=type.match(regexBytes);if(match){const size=parseInt(match[1]);if(String(size)!==match[1]||size===0||size>32){logger$G.throwArgumentError("invalid bytes type","type",type)}if(arrayify(value).byteLength!==size){logger$G.throwArgumentError(`invalid value for ${type}`,"value",value)}if(isArray){return arrayify((value+Zeros$1).substring(0,66))}return value}match=type.match(regexArray);if(match&&Array.isArray(value)){const baseType=match[1];const count=parseInt(match[2]||String(value.length));if(count!=value.length){logger$G.throwArgumentError(`invalid array length for ${type}`,"value",value)}const result=[];value.forEach(function(value){result.push(_pack(baseType,value,true))});return concat(result)}return logger$G.throwArgumentError("invalid type","type",type)}function pack$1(types,values){if(types.length!=values.length){logger$G.throwArgumentError("wrong number of values; expected ${ types.length }","values",values)}const tight=[];types.forEach(function(type,index){tight.push(_pack(type,values[index]))});return hexlify(concat(tight))}function keccak256$1(types,values){return keccak256(pack$1(types,values))}function sha256$2(types,values){return sha256$1(pack$1(types,values))}const version$o="units/5.5.0";"use strict";const logger$H=new Logger(version$o);const names=["wei","kwei","mwei","gwei","szabo","finney","ether"];function commify(value){const comps=String(value).split(".");if(comps.length>2||!comps[0].match(/^-?[0-9]*$/)||comps[1]&&!comps[1].match(/^[0-9]*$/)||value==="."||value==="-."){logger$H.throwArgumentError("invalid value","value",value)}let whole=comps[0];let negative="";if(whole.substring(0,1)==="-"){negative="-";whole=whole.substring(1)}while(whole.substring(0,1)==="0"){whole=whole.substring(1)}if(whole===""){whole="0"}let suffix="";if(comps.length===2){suffix="."+(comps[1]||"0")}while(suffix.length>2&&suffix[suffix.length-1]==="0"){suffix=suffix.substring(0,suffix.length-1)}const formatted=[];while(whole.length){if(whole.length<=3){formatted.unshift(whole);break}else{const index=whole.length-3;formatted.unshift(whole.substring(index));whole=whole.substring(0,index)}}return negative+formatted.join(",")+suffix}function formatUnits(value,unitName){if(typeof unitName==="string"){const index=names.indexOf(unitName);if(index!==-1){unitName=3*index}}return formatFixed(value,unitName!=null?unitName:18)}function parseUnits(value,unitName){if(typeof value!=="string"){logger$H.throwArgumentError("value must be a string","value",value)}if(typeof unitName==="string"){const index=names.indexOf(unitName);if(index!==-1){unitName=3*index}}return parseFixed(value,unitName!=null?unitName:18)}function formatEther(wei){return formatUnits(wei,18)}function parseEther(ether){return parseUnits(ether,18)}"use strict";var utils$1=Object.freeze({__proto__:null,AbiCoder:AbiCoder,defaultAbiCoder:defaultAbiCoder,Fragment:Fragment,ConstructorFragment:ConstructorFragment,ErrorFragment:ErrorFragment,EventFragment:EventFragment,FunctionFragment:FunctionFragment,ParamType:ParamType,FormatTypes:FormatTypes,checkResultErrors:checkResultErrors,Logger:Logger,RLP:index,_fetchData:_fetchData,fetchJson:fetchJson,poll:poll,checkProperties:checkProperties,deepCopy:deepCopy,defineReadOnly:defineReadOnly,getStatic:getStatic,resolveProperties:resolveProperties,shallowCopy:shallowCopy,arrayify:arrayify,concat:concat,stripZeros:stripZeros,zeroPad:zeroPad,isBytes:isBytes,isBytesLike:isBytesLike,defaultPath:defaultPath,HDNode:HDNode,SigningKey:SigningKey,Interface:Interface,LogDescription:LogDescription,TransactionDescription:TransactionDescription,base58:Base58,base64:index$2,hexlify:hexlify,isHexString:isHexString,hexConcat:hexConcat,hexStripZeros:hexStripZeros,hexValue:hexValue,hexZeroPad:hexZeroPad,hexDataLength:hexDataLength,hexDataSlice:hexDataSlice,nameprep:nameprep,_toEscapedUtf8String:_toEscapedUtf8String,toUtf8Bytes:toUtf8Bytes,toUtf8CodePoints:toUtf8CodePoints,toUtf8String:toUtf8String,Utf8ErrorFuncs:Utf8ErrorFuncs,formatBytes32String:formatBytes32String,parseBytes32String:parseBytes32String,hashMessage:hashMessage,namehash:namehash,isValidName:isValidName,id:id,_TypedDataEncoder:TypedDataEncoder,getAddress:getAddress,getIcapAddress:getIcapAddress,getContractAddress:getContractAddress,getCreate2Address:getCreate2Address,isAddress:isAddress,formatEther:formatEther,parseEther:parseEther,formatUnits:formatUnits,parseUnits:parseUnits,commify:commify,computeHmac:computeHmac,keccak256:keccak256,ripemd160:ripemd160$1,sha256:sha256$1,sha512:sha512$1,randomBytes:randomBytes,shuffled:shuffled,solidityPack:pack$1,solidityKeccak256:keccak256$1,soliditySha256:sha256$2,splitSignature:splitSignature,joinSignature:joinSignature,accessListify:accessListify,parseTransaction:parse,serializeTransaction:serialize,get TransactionTypes(){return TransactionTypes},getJsonWalletAddress:getJsonWalletAddress,computeAddress:computeAddress,recoverAddress:recoverAddress,computePublicKey:computePublicKey,recoverPublicKey:recoverPublicKey,verifyMessage:verifyMessage,verifyTypedData:verifyTypedData,getAccountPath:getAccountPath,mnemonicToEntropy:mnemonicToEntropy,entropyToMnemonic:entropyToMnemonic,isValidMnemonic:isValidMnemonic,mnemonicToSeed:mnemonicToSeed,get SupportedAlgorithm(){return SupportedAlgorithm},get UnicodeNormalizationForm(){return UnicodeNormalizationForm},get Utf8ErrorReason(){return Utf8ErrorReason},Indexed:Indexed});const version$p="ethers/5.5.2";"use strict";const logger$I=new Logger(version$p);var ethers=Object.freeze({__proto__:null,Signer:Signer,Wallet:Wallet,VoidSigner:VoidSigner,getDefaultProvider:getDefaultProvider,providers:index$3,BaseContract:BaseContract,Contract:Contract,ContractFactory:ContractFactory,BigNumber:BigNumber,FixedNumber:FixedNumber,constants:index$1,get errors(){return ErrorCode},logger:logger$I,utils:utils$1,wordlists:wordlists,version:version$p,Wordlist:Wordlist});"use strict";try{const anyGlobal=window;if(anyGlobal._ethers==null){anyGlobal._ethers=ethers}}catch(error){}export{BaseContract,BigNumber,Contract,ContractFactory,FixedNumber,Signer,VoidSigner,Wallet,Wordlist,index$1 as constants,ErrorCode as errors,ethers,getDefaultProvider,logger$I as logger,index$3 as providers,utils$1 as utils,version$p as version,wordlists}; \ No newline at end of file diff --git a/node_modules/ethers/dist/ethers.esm.min.js.map b/node_modules/ethers/dist/ethers.esm.min.js.map new file mode 100644 index 0000000..23b8b7b --- /dev/null +++ b/node_modules/ethers/dist/ethers.esm.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../node_modules/bn.js/lib/bn.js","../../logger/src.ts/_version.ts","../../logger/src.ts/index.ts","../../bytes/src.ts/_version.ts","../../bytes/src.ts/index.ts","../../bignumber/src.ts/_version.ts","../../bignumber/src.ts/bignumber.ts","../../bignumber/src.ts/fixednumber.ts","../../properties/src.ts/_version.ts","../../properties/src.ts/index.ts","../../abi/src.ts/_version.ts","../../abi/src.ts/fragments.ts","../../abi/src.ts/coders/abstract-coder.ts","../../../node_modules/js-sha3/src/sha3.js","../../keccak256/src.ts/index.ts","../../rlp/src.ts/_version.ts","../../rlp/src.ts/index.ts","../../address/src.ts/_version.ts","../../address/src.ts/index.ts","../../abi/src.ts/coders/address.ts","../../abi/src.ts/coders/anonymous.ts","../../abi/src.ts/coders/array.ts","../../abi/src.ts/coders/boolean.ts","../../abi/src.ts/coders/bytes.ts","../../abi/src.ts/coders/fixed-bytes.ts","../../abi/src.ts/coders/null.ts","../../constants/src.ts/addresses.ts","../../constants/src.ts/bignumbers.ts","../../constants/src.ts/hashes.ts","../../constants/src.ts/strings.ts","../../constants/src.ts/index.ts","../../abi/src.ts/coders/number.ts","../../strings/src.ts/_version.ts","../../strings/src.ts/utf8.ts","../../strings/src.ts/bytes32.ts","../../strings/src.ts/idna.ts","../../strings/src.ts/index.ts","../../abi/src.ts/coders/string.ts","../../abi/src.ts/coders/tuple.ts","../../abi/src.ts/abi-coder.ts","../../hash/src.ts/id.ts","../../hash/src.ts/_version.ts","../../hash/src.ts/namehash.ts","../../hash/src.ts/message.ts","../../hash/src.ts/typed-data.ts","../../hash/src.ts/index.ts","../../abi/src.ts/interface.ts","../../abi/src.ts/index.ts","../../abstract-provider/src.ts/_version.ts","../../abstract-provider/src.ts/index.ts","../../abstract-signer/src.ts/_version.ts","../../abstract-signer/src.ts/index.ts","../../../node_modules/minimalistic-assert/index.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/inherits.js","../../../node_modules/hash.js/lib/hash/utils.js","../../../node_modules/hash.js/lib/hash/common.js","../../../node_modules/hash.js/lib/hash/sha/common.js","../../../node_modules/hash.js/lib/hash/sha/1.js","../../../node_modules/hash.js/lib/hash/sha/256.js","../../../node_modules/hash.js/lib/hash/sha/224.js","../../../node_modules/hash.js/lib/hash/sha/512.js","../../../node_modules/hash.js/lib/hash/sha/384.js","../../../node_modules/hash.js/lib/hash/sha.js","../../../node_modules/hash.js/lib/hash/ripemd.js","../../../node_modules/hash.js/lib/hash/hmac.js","../../../node_modules/hash.js/lib/hash.js","../../../node_modules/minimalistic-crypto-utils/lib/utils.js","../../../node_modules/elliptic/lib/elliptic/utils.js","../../../node_modules/elliptic/lib/elliptic/curve/base.js","../../../node_modules/elliptic/lib/elliptic/curve/short.js","../../../node_modules/elliptic/lib/elliptic/curve/index.js","../../../node_modules/elliptic/lib/elliptic/curves.js","../../../node_modules/hmac-drbg/lib/hmac-drbg.js","../../../node_modules/elliptic/lib/elliptic/ec/key.js","../../../node_modules/elliptic/lib/elliptic/ec/signature.js","../../../node_modules/elliptic/lib/elliptic/ec/index.js","../../../node_modules/elliptic/lib/elliptic.js","../../signing-key/lib.esm/elliptic.js","../../signing-key/src.ts/_version.ts","../../signing-key/src.ts/index.ts","../../transactions/src.ts/_version.ts","../../transactions/src.ts/index.ts","../../contracts/src.ts/_version.ts","../../contracts/src.ts/index.ts","../../basex/src.ts/index.ts","../../sha2/src.ts/types.ts","../../sha2/src.ts/_version.ts","../../sha2/src.ts/browser-sha2.ts","../../pbkdf2/src.ts/browser-pbkdf2.ts","../../wordlists/src.ts/_version.ts","../../wordlists/src.ts/wordlist.ts","../../wordlists/src.ts/lang-en.ts","../../wordlists/src.ts/browser-wordlists.ts","../../wordlists/src.ts/index.ts","../../hdnode/src.ts/_version.ts","../../hdnode/src.ts/index.ts","../../random/src.ts/_version.ts","../../random/src.ts/browser-random.ts","../../random/src.ts/shuffle.ts","../../random/src.ts/index.ts","../../../node_modules/aes-js/index.js","../../json-wallets/src.ts/_version.ts","../../json-wallets/src.ts/utils.ts","../../json-wallets/src.ts/crowdsale.ts","../../json-wallets/src.ts/inspect.ts","../../../node_modules/scrypt-js/scrypt.js","../../json-wallets/src.ts/keystore.ts","../../json-wallets/src.ts/index.ts","../../wallet/src.ts/_version.ts","../../wallet/src.ts/index.ts","../../networks/src.ts/_version.ts","../../networks/src.ts/index.ts","../../base64/src.ts/browser-base64.ts","../../base64/src.ts/index.ts","../../web/src.ts/_version.ts","../../web/src.ts/browser-geturl.ts","../../web/src.ts/index.ts","../../../node_modules/bech32/index.js","../../providers/src.ts/_version.ts","../../providers/src.ts/formatter.ts","../../providers/src.ts/base-provider.ts","../../providers/src.ts/json-rpc-provider.ts","../../providers/src.ts/browser-ws.ts","../../providers/src.ts/websocket-provider.ts","../../providers/src.ts/url-json-rpc-provider.ts","../../providers/src.ts/alchemy-provider.ts","../../providers/src.ts/cloudflare-provider.ts","../../providers/src.ts/etherscan-provider.ts","../../providers/src.ts/fallback-provider.ts","../../providers/src.ts/browser-ipc-provider.ts","../../providers/src.ts/infura-provider.ts","../../providers/src.ts/json-rpc-batch-provider.ts","../../providers/src.ts/nodesmith-provider.ts","../../providers/src.ts/pocket-provider.ts","../../providers/src.ts/web3-provider.ts","../../providers/src.ts/index.ts","../../solidity/src.ts/_version.ts","../../solidity/src.ts/index.ts","../../units/src.ts/_version.ts","../../units/src.ts/index.ts","../src.ts/utils.ts","../src.ts/_version.ts","../src.ts/ethers.ts","../src.ts/index.ts"],"names":["module","exports","assert","val","msg","Error","inherits","ctor","superCtor","super_","TempCtor","prototype","constructor","BN","number","base","endian","isBN","this","negative","words","length","red","_init","wordSize","Buffer","window","e","num","Array","isArray","max","left","right","cmp","min","init","_initNumber","_initArray","toString","replace","start","_parseHex","_parseBase","toArray","Math","ceil","i","j","w","off","strip","parseHex4Bits","string","index","c","charCodeAt","parseHexByte","lowerBound","r","parseLength","parseBase","str","end","mul","len","limbLen","limbPow","total","mod","word","imuln","_iaddn","pow","copy","dest","clone","_expand","size","_normSign","inspect","zeros","groupSizes","groupBases","padding","out","carry","groupSize","groupBase","isZero","modn","idivn","toNumber","ret","toJSON","toBuffer","toArrayLike","ArrayType","byteLength","reqLength","littleEndian","res","b","q","andln","iushrn","clz32","_countBits","t","_zeroBits","bitLength","hi","toBitArray","bit","wbit","zeroBits","toTwos","width","abs","inotn","iaddn","fromTwos","testn","notn","ineg","isNeg","neg","iuor","ior","or","uor","iuand","iand","and","uand","iuxor","a","ixor","xor","uxor","bytesNeeded","bitsLeft","setn","iadd","isub","add","sub","smallMulTo","self","lo","k","ncarry","rword","maxJ","comb10MulTo","o","mid","a0","al0","ah0","a1","al1","ah1","a2","al2","ah2","a3","al3","ah3","a4","al4","ah4","a5","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","b1","bl1","bh1","b2","bl2","bh2","b3","bl3","bh3","b4","bl4","bh4","b5","bl5","bh5","b6","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","b9","bl9","bh9","imul","w0","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","fftm","FFTM","mulp","mulTo","x","y","makeRBT","N","l","revBin","rb","permute","rbt","rws","iws","rtws","itws","transform","s","rtwdf","cos","PI","itwdf","sin","p","rtwdf_","itwdf_","re","ie","ro","io","rx","guessLen13b","n","m","odd","conjugate","normalize13b","ws","round","convert13b","stub","ph","_","rwst","iwst","nrws","nrwst","niwst","rmws","mulf","muln","sqr","isqr","iushln","bits","carryMask","newCarry","ishln","hint","extended","h","mask","maskedWords","ishrn","shln","ushln","shrn","ushrn","imaskn","maskn","isubn","addn","subn","iabs","_ishlnsubmul","shift","_wordDiv","mode","bhi","bhiBits","diff","qj","div","divmod","positive","divn","umod","divRound","dm","half","r2","acc","egcd","A","B","C","D","g","isEven","yp","xp","im","isOdd","jm","gcd","_invmp","x1","x2","delta","cmpn","invm","bincn","ucmp","gtn","gt","gten","gte","ltn","lt","lten","lte","eqn","eq","Red","toRed","ctx","convertTo","_forceRed","fromRed","convertFrom","forceRed","redAdd","redIAdd","redSub","redISub","redShl","shl","redMul","_verify2","redIMul","redSqr","_verify1","redISqr","redSqrt","sqrt","redInvm","redNeg","redPow","primes","k256","p224","p192","p25519","MPrime","name","tmp","_tmp","ireduce","rlen","split","imulK","undefined","_strip","input","K256","call","output","outLen","prev","next","P224","P192","P25519","_prime","prime","imod","mod3","one","nOne","lpow","z","inv","windowSize","wnd","current","currentLen","mont","Mont","rinv","minv","u","version","_permanentCensorErrors","_censorErrors","LogLevels","debug","default","info","warning","error","_logLevel","_globalLogger","_checkNormalize","missing","forEach","form","normalize","push","join","String","fromCharCode","message","_normalizeError","LogLevel","ErrorCode","HEX","Logger","[object Object]","Object","defineProperty","enumerable","value","writable","logLevel","args","level","toLowerCase","throwArgumentError","console","log","apply","_log","levels","DEBUG","INFO","WARNING","code","params","makeError","errors","UNKNOWN_ERROR","messageDetails","keys","key","Uint8Array","hex","JSON","stringify","reason","throwError","INVALID_ARGUMENT","argument","condition","UNSUPPORTED_OPERATION","operation","NUMERIC_FAULT","fault","count","expectedCount","MISSING_ARGUMENT","UNEXPECTED_ARGUMENT","target","kind","MISSING_NEW","censorship","permanent","globalLogger","warn","logger","isHexable","addSlice","array","slice","arguments","isBytesLike","isHexString","isBytes","isInteger","v","arrayify","options","checkSafeUint53","result","unshift","parseInt","allowMissingPrefix","substring","toHexString","hexPad","concat","items","objects","map","item","reduce","accum","offset","object","set","stripZeros","zeroPad","match","HexCharacters","hexlify","floor","hexDataLength","data","hexDataSlice","endOffset","hexConcat","hexValue","trimmed","hexStripZeros","hexZeroPad","splitSignature","signature","_vs","recoveryParam","bytes","vs","recId","joinSignature","_BN","_constructorGuard","MAX_SAFE","isBigNumberish","BigNumber","isBigNumber","_warnedToStringRadix","constructorGuard","checkNew","_hex","_isBigNumber","freeze","toBigNumber","toBN","from","other","throwFault","isNegative","BigInt","type","toHex","anyValue","_base36To16","_base16To36","Zero","NegativeOne","getMultiplier","decimals","formatFixed","multiplier","fraction","whole","parseFixed","comps","wholeValue","fractionValue","wei","FixedFormat","signed","_multiplier","check","defaultValue","FixedNumber","format","_value","_isFixedNumber","_checkFormat","fromValue","hasFraction","subUnsafe","ONE","toFormat","addUnsafe","factor","bump","BUMP","mulUnsafe","divUnsafe","parseFloat","fromString","fixedFormat","numeric","decimal","fromBytes","defineReadOnly","getStatic","getPrototypeOf","resolveProperties","promises","Promise","resolve","then","results","all","checkProperties","properties","shallowCopy","opaque","bigint","boolean","function","_isFrozen","isFrozen","_deepCopy","deepCopy","Description","ModifiersBytes","calldata","memory","storage","ModifiersNest","checkModifier","indexOf","parseParamType","param","allowIndexed","originalParam","newNode","parent","node","state","allowType","indexed","allowParams","verifyType","components","child","allowName","allowArray","sibling","readArray","populate","FormatTypes","sighash","minimal","full","json","paramTypeArray","RegExp","ParamType","arrayLength","arrayChildren","fromObject","baseType","_isParamType","comp","parse","isParamType","ParamTypify","parseParams","allowIndex","splitNesting","Fragment","_isFragment","isFragment","FunctionFragment","EventFragment","ConstructorFragment","ErrorFragment","trim","anonymous","inputs","isEventFragment","verifyIdentifier","regexParen","modifier","parseGas","gas","parseModifiers","constant","payable","stateMutability","verifyState","isConstructorFragment","parens","outputs","isFunctionFragment","returns","checkForbidden","fragment","sig","isErrorFragment","regexIdentifier","depth","checkResultErrors","checkErrors","path","childPath","Coder","localName","dynamic","Writer","_data","_dataLength","_padding","writer","_writeData","paddingOffset","BUFFER_OVERRUN","_getValue","Reader","coerceFunc","allowLoose","_offset","consumed","_coerceFunc","coerce","loose","alignedLength","_peekBytes","readBytes","INPUT_ERROR","FINALIZE_ERROR","WINDOW","root","JS_SHA3_NO_WINDOW","WEB_WORKER","NODE_JS","JS_SHA3_NO_NODE_JS","process","versions","global","COMMON_JS","JS_SHA3_NO_COMMON_JS","AMD","define","amd","ARRAY_BUFFER","JS_SHA3_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","SHAKE_PADDING","CSHAKE_PADDING","KECCAK_PADDING","PADDING","SHIFT","RC","BITS","SHAKE_BITS","OUTPUT_TYPES","CSHAKE_BYTEPAD","128","256","obj","JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","outputType","Keccak","update","createShakeOutputMethod","outputBits","createCshakeOutputMethod","methods","createKmacOutputMethod","createOutputMethods","method","createMethod","create","createShakeMethod","createCshakeMethod","bytepad","createKmacMethod","Kmac","algorithms","methodNames","algorithm","methodName","newMethodName","blocks","reset","finalized","block","blockCount","byteCount","outputBlocks","extraBytes","notString","lastByteIndex","f","encode","encodeString","strs","paddingBytes","finalize","arrayBuffer","Uint32Array","digest","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","b10","b11","b12","b13","b14","b15","b16","b17","b18","b19","b20","b21","b22","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b40","b41","b42","b43","b44","b45","b46","b47","b48","b49","keccak256","sha3","keccak_256","arrayifyInteger","unarrayifyInteger","_encode","payload","_decodeChildren","childOffset","decoded","_decode","lengthLength","decode","getChecksumAddress","address","chars","expanded","hashed","toUpperCase","MAX_SAFE_INTEGER","log10","LN10","ibanLookup","safeDigits","ibanChecksum","checksum","getAddress","isAddress","getIcapAddress","base36","getContractAddress","transaction","nonce","getCreate2Address","salt","initCodeHash","AddressCoder","super","_throwError","writeValue","reader","readValue","AnonymousCoder","coder","pack","coders","values","arrayValues","unique","staticWriter","dynamicWriter","updateFuncs","dynamicOffset","updateFunc","writeUpdatableValue","baseOffset","func","appendWriter","unpack","baseReader","subReader","offsetReader","uniqueNames","get","ArrayCoder","defaultChild","checkArgumentCount","BooleanCoder","DynamicBytesCoder","writeBytes","BytesCoder","FixedBytesCoder","NullCoder","AddressZero","One","Two","WeiPerEther","MaxUint256","MinInt256","MaxInt256","HashZero","EtherSymbol","NumberCoder","maxUintValue","bounds","UnicodeNormalizationForm","Utf8ErrorReason","errorFunc","badCodepoint","ignoreFunc","BAD_PREFIX","UNEXPECTED_CONTINUE","OVERRUN","replaceFunc","OVERLONG","Utf8ErrorFuncs","ignore","getUtf8CodePoints","onError","extraLength","overlongMask","nextChar","MISSING_CONTINUE","OUT_OF_RANGE","UTF16_SURROGATE","toUtf8Bytes","checkNormalize","pair","escapeChar","_toEscapedUtf8String","codePoint","_toUtf8String","codePoints","toUtf8String","toUtf8CodePoints","formatBytes32String","text","parseBytes32String","bytes2","createTable","createRangeTable","matchMap","ranges","range","d","Table_A_1_ranges","Table_B_1_flags","Table_B_2_ranges","Table_B_2_lut_abs","Table_B_2_lut_rel","Table_B_2_complex","Table_C_ranges","flatten","_nameprepTableA1","codepoint","_nameprepTableB2","codes","complex","_nameprepTableC","nameprep","codesTableB2","NFKC","StringCoder","TupleCoder","types","paramTypeBytes","paramTypeNumber","AbiCoder","_getCoder","component","_getWordSize","_getWriter","_getReader","defaultAbiCoder","id","Zeros","fill","Partition","isValidName","namehash","partition","label","messagePrefix","hashMessage","hexPadRight","padOffset","hexTrue","hexFalse","domainFieldTypes","chainId","verifyingContract","domainFieldNames","checkString","domainChecks","getBaseEncoder","boundsUpper","boundsLower","encodeType","fields","TypedDataEncoder","links","parents","subtypes","field","encoder","primaryTypes","filter","checkCircular","found","subtype","primaryType","st","sort","_types","_encoderCache","_getEncoder","subEncoder","getEncoder","encodedType","encodeData","hashStruct","callback","_visit","domain","domainFields","EIP712Domain","hashDomain","hash","resolveName","ensCache","visit","domainValues","domainTypes","typesWithDomain","LogDescription","TransactionDescription","ErrorDescription","Indexed","_isIndexed","BuiltinErrors","0x08c379a0","0x4e487b71","wrapAccessError","property","wrap","Interface","fragments","abi","bucket","deploy","functions","events","eventFragment","nameOrSignatureOrSighash","getSighash","matching","nameOrSignatureOrTopic","topichash","getEventTopic","getFunction","getError","getEvent","_abiCoder","_encodeParams","_decodeParams","functionFragment","errorArgs","errorName","errorSignature","selector","builtin","CALL_EXCEPTION","topics","encodeTopic","pop","dataTypes","dataValues","topicHash","expected","nonIndexed","resultIndexed","resultNonIndexed","nonIndexedIndex","indexedIndex","tx","topic","decodeEventLog","hexData","errorFragment","_isInterface","ForkEvent","_isForkEvent","BlockForkEvent","blockHash","expiry","_isBlockForkEvent","TransactionForkEvent","_isTransactionForkEvent","TransactionOrderForkEvent","beforeHash","afterHash","_isTransactionOrderForkEvent","Provider","checkAbstract","gasPrice","getBlock","getGasPrice","catch","maxFeePerGas","maxPriorityFeePerGas","baseFeePerGas","eventName","listener","on","_isProvider","allowedTransactionKeys","forwardErrors","INSUFFICIENT_FUNDS","NONCE_EXPIRED","REPLACEMENT_UNDERPRICED","Signer","blockTag","_checkProvider","provider","getBalance","getTransactionCount","checkTransaction","estimateGas","populateTransaction","signedTx","signTransaction","sendTransaction","network","getNetwork","getFeeData","to","__awaiter$3","hasEip1559","feeData","gasLimit","UNPREDICTABLE_GAS_LIMIT","getChainId","_isSigner","VoidSigner","_fail","minimalisticAssert","equal","assertEqual","configurable","util","require$$0","inherits_1","isSurrogatePair","enc","toArray_1","zero2","toHex_1","htonl","htonl_1","toHex32","zero8","toHex32_1","zero2_1","zero8_1","join32","join32_1","split32","split32_1","rotr32","rotr32_1","rotl32","rotl32_1","sum32","sum32_1","sum32_3","sum32_3_1","sum32_4","sum32_4_1","sum32_5","sum32_5_1","sum64","buf","pos","ah","al","bh","bl","sum64_1","sum64_hi","sum64_hi_1","sum64_lo","sum64_lo_1","sum64_4_hi","ch","cl","dh","dl","sum64_4_hi_1","sum64_4_lo","sum64_4_lo_1","sum64_5_hi","eh","el","sum64_5_hi_1","sum64_5_lo","sum64_5_lo_1","rotr64_hi","rotr64_hi_1","rotr64_lo","rotr64_lo_1","shr64_hi","shr64_hi_1","shr64_lo","shr64_lo_1","BlockHash","pending","pendingTotal","blockSize","outSize","hmacStrength","padLength","_delta8","_delta32","BlockHash_1","utils","_update","_pad","_digest","pad","ft_1","ch32","p32","maj32","ft_1_1","ch32_1","maj32_1","p32_1","s0_256","s0_256_1","s1_256","s1_256_1","g0_256","g0_256_1","g1_256","g1_256_1","shaCommon","common","sha1_K","SHA1","W","_1","sha256_K","SHA256","_256","T1","T2","SHA224","_224","sha512_K","SHA512","_512","_prepareBlock","c0_hi","g1_512_hi","c0_lo","g1_512_lo","c1_hi","c1_lo","c2_hi","g0_512_hi","c2_lo","g0_512_lo","c3_hi","c3_lo","fh","fl","gh","gl","hh","hl","s1_512_hi","s1_512_lo","ch64_hi","ch64_lo","c4_hi","c4_lo","T1_hi","T1_lo","s0_512_hi","s0_512_lo","maj64_hi","maj64_lo","T2_hi","T2_lo","xh","xl","yh","yl","zh","zl","SHA384","_384","sha1","sha224","require$$1","sha256","require$$2","sha384","require$$3","sha512","require$$4","RIPEMD160","ripemd160","E","Ah","Bh","Ch","Dh","Eh","T","K","rh","Kh","sh","Hmac","Hash","inner","outer","hmac","sha","ripemd","minimalisticAssert$1","arr","minAssert","minUtils","getNAF","naf","getJSF","k1","k2","jsf","d1","d2","m8","m14","m24","u1","u2","cachedProperty","computer","parseBytes","intFromLE","BaseCurve","conf","zero","two","pointFromJSON","gRed","_wnafT1","_wnafT2","_wnafT3","_wnafT4","_bitLength","adjustCount","redN","_maxwellTrick","point","validate","_fixedNafMul","precomputed","doubles","_getDoubles","I","step","repr","nafW","jpoint","mixedAdd","points","toP","_wnafMul","nafPoints","_getNAFPoints","dblp","_wnafMulAdd","defW","coeffs","jacobianResult","wndWidth","comb","toJ","ja","jb","BasePoint","curve","decodePoint","pointFromX","encodeCompressed","compact","getX","getY","precompute","power","beta","_getBeta","_hasDoubles","dbl","ShortCurve","Base","tinv","zeroA","threeA","endo","_getEndomorphism","_endoWnafT1","_endoWnafT2","short_1","lambda","betas","_getEndoRoots","lambdas","basis","vec","_getEndoBasis","ntinv","l1","l2","aprxSqrt","y1","y2","prevR","len1","len2","_endoSplit","v1","v2","p1","p2","q1","q2","inf","ax","rhs","_endoWnafMulAdd","npoints","ncoeffs","Point","isRed","fromJSON","pre","endoMul","obj2point","isInfinity","nx","ny","ys1","dyinv","mulAdd","jmulAdd","_precompute","negate","JPoint","zOne","zinv","zinv2","ay","pz2","z2","s1","s2","h2","h3","nz","jx","jy","jz","jz4","jyd","jx2","jyd2","jyd4","t1","t2","dny","_zeroDbl","_threeDbl","_dbl","xx","yy","yyyy","yyyy8","gamma","alpha","beta4","beta8","ggamma8","jy2","jxd4","jyd8","trpl","zz","mm","ee","yyu4","kbase","z3","pz3","eqXToP","zs","xc","short","edwards","curves","PresetCurve","defineCurve","crash","HmacDRBG","predResist","minEntropy","_reseed","reseedInterval","V","entropy","entropyEnc","nonceEnc","pers","persEnc","hmacDrbg","seed","_hmac","kmac","reseed","addEnc","generate","temp","KeyPair","ec","priv","pub","_importPrivate","privEnc","_importPublic","pubEnc","fromPublic","fromPrivate","getPublic","getPrivate","derive","sign","verify","Signature","_importDER","Position","place","getLength","initial","octetLen","rmPadding","slen","constructLength","octets","LN2","toDER","backHalf","rand","EC","hasOwnProperty","nh","keyPair","keyFromPrivate","keyFromPublic","genKeyPair","drbg","ns2","_truncateToN","truncOnly","bkey","ns1","iter","kp","kpX","canonical","sinv","recoverPubKey","isYOdd","isSecondKey","rInv","getKeyRecoveryParam","Q","Qprime","elliptic","eddsa","_ec","_curve","getCurve","SigningKey","privateKey","p0","publicKey","digestBytes","otherKey","otherKeyPair","computePublicKey","_isSigningKey","recoverPublicKey","rs","compressed","signingKey","TransactionTypes","handleAddress","handleNumber","transactionFields","maxLength","computeAddress","recoverAddress","formatNumber","accessSetify","addr","storageKeys","storageKey","accessListify","localeCompare","formatAccessList","_serializeEip1559","accessList","RLP.encode","_serializeEip2930","_serialize","raw","fieldInfo","serialize","transactionType","_parseEipSignature","recid","_parseEip1559","RLP.decode","_parseEip2930","_parse","rawTransaction","customData","resolver","nameOrPromise","resolveAddresses","paramType","reject","contract","overrides","signer","override","__awaiter$4","resolved","resolvedAddress","interface","encodeFunctionData","intrinsic","roValue","leftovers","buildPopulate","buildEstimate","signerOrProvider","addContractWait","wait","bind","confirmations","receipt","logs","event","parsed","parseLog","eventSignature","removeListener","getTransaction","transactionHash","getTransactionReceipt","buildCall","collapseSimple","deployTransaction","_deployed","decodeFunctionResult","buildSend","txRequest","buildDefault","getEventTag","RunningEvent","tag","_listeners","once","done","listenerCount","argsCopy","setTimeout","ErrorRunningEvent","FragmentRunningEvent","contractInterface","prepareEvent","decodeError","WildcardRunningEvent","BaseContract","addressOrName","Contract","isSigner","isProvider","uniqueFilters","filters","encodeFilterTopics","uniqueSignatures","callStatic","signatures","isInterface","_deployedPromise","getCode","contractAddress","deployed","isIndexed","runningEvent","_runningEvents","_normalizeRunningEvent","emit","_wrappedEmits","_checkRunningEvents","addListener","wrappedEmit","_wrapEvent","getEmit","fromBlockOrBlockhash","toBlock","_getRunningEvent","fromBlock","getLogs","_addEventListener","run","listeners","removeAllListeners","ContractFactory","bytecode","bytecodeHex","encodeDeploy","unsignedTx","getDeployTransaction","getContract","compilerOutput","evm","getInterface","BaseX","alphabet","charAt","_alphabetMap","source","digits","_leader","TypeError","byte","reverse","Base32","Base58","SupportedAlgorithm","computeHmac","pbkdf2","password","iterations","keylen","hashAlgorithm","hLen","DK","block1","U","destPos","exportWordlist","Wordlist","locale","mnemonic","wordlist","getWord","getWordIndex","lang","anyGlobal","_ethers","wordlists","loadWords","LangEn","langEn","register","en","MasterSecret","HardenedBit","getUpperMask","getLowerMask","bytes32","base58check","getWordlist","defaultPath","HDNode","parentFingerprint","chainCode","mnemonicOrPath","compressedPublicKey","extendedKey","IL","IR","ki","Ki","ek","_addPoint","srcMnemonic","phrase","fingerprint","_derive","seedArray","entropyToMnemonic","mnemonicToEntropy","_fromSeed","mnemonicToSeed","NFKD","entropyBits","checksumBits","checksumMask","indices","remainingBits","isValidMnemonic","getAccountPath","crypto","msCrypto","getRandomValues","randomBytes","shuffled","random","checkInt","checkInts","arrayish","coerceArray","arg","createArray","copyArray","sourceArray","targetArray","targetStart","sourceStart","sourceEnd","convertUtf8","toBytes","encodeURI","substr","convertHex","Hex","numberOfRounds","16","24","32","rcon","S","Si","T3","T4","T5","T6","T7","T8","U1","U2","U3","U4","convertToInt32","AES","_prepare","rounds","_Ke","_Kd","roundKeyCount","KC","tk","rconpointer","tt","encrypt","plaintext","decrypt","ciphertext","ModeOfOperationECB","description","_aes","ModeOfOperationCBC","iv","_lastCipherblock","ModeOfOperationCFB","segmentSize","_shiftRegister","encrypted","xorSegment","ModeOfOperationOFB","_lastPrecipher","_lastPrecipherIndex","Counter","initialValue","_counter","setValue","setBytes","increment","ModeOfOperationCTR","counter","_remainingCounter","_remainingCounterIndex","pkcs7pad","padder","pkcs7strip","aesjs","ModeOfOperation","ecb","cbc","cfb","ofb","ctr","utf8","pkcs7","_arrayTest","_aesjs","looseArrayify","hexString","zpad","getPassword","searchPath","currentChild","matchingChild","uuidV4","CrowdsaleAccount","_isCrowdsaleAccount","ethaddr","encseed","encryptedSeed","aesCbc","aes","seedHex","seedHexBytes","isCrowdsaleWallet","isKeystoreWallet","getJsonWalletAddress","MAX_VALUE","h0","h1","h4","h5","h6","h7","bytesLeft","bitLenHi","bitLenLo","numZeros","PBKDF2_HMAC_SHA256_OneIter","dkLen","innerLen","outerKey","dk","incrementCounter","blockmix_salsa8","BY","Yi","_X","arraycopy","blockxor","salsa20_8","R","src","srcPos","checkBufferish","ensureInteger","_scrypt","XY","totalOps","currentOp","lastPercent10","stop","i0","i1","Bi","limit","nextTick","setImmediate","incrementalSMix","steps","percent10","derivedKey","lib","scrypt","progressCallback","lastProgress","progress","syncScrypt","hasMnemonic","KeystoreAccount","_isKeystoreAccount","_decrypt","cipher","aesCtr","_getAccount","computedMAC","mnemonicKey","account","mnemonicCiphertext","mnemonicIv","mnemonicCounter","mnemonicAesCtr","fromMnemonic","derivePath","pbkdf2Sync","passwordBytes","prfFunc","_pbkdf2","_computeKdfKey","pbkdf2Func","scryptFunc","kdf","prf","decryptSync","client","uuidRandom","uuid","macPrefix","mac","Crypto","cipherparams","kdfparams","dklen","now","Date","timestamp","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","gethFilename","decryptJsonWallet","decryptCrowdsale","decryptKeystore","decryptJsonWalletSync","decryptKeystoreSync","isAccount","Wallet","isSigningKey","_mnemonic","_signingKey","signDigest","populated","_TypedDataEncoder","resolveNames","encryptKeystore","extraEntropy","verifyMessage","verifyTypedData","isRenetworkable","ethDefaultProvider","providers","providerList","InfuraProvider","infura","EtherscanProvider","etherscan","AlchemyProvider","alchemy","PocketProvider","skip","CloudflareProvider","FallbackProvider","quorum","renetwork","etcDefaultProvider","url","JsonRpcProvider","homestead","ensAddress","_defaultProvider","ropsten","classicMordor","networks","unspecified","mainnet","morden","testnet","rinkeby","kovan","goerli","classic","classicMorden","classicTestnet","classicKotti","xdai","matic","maticmum","optimism","optimism-kovan","optimism-goerli","arbitrum","arbitrum-rinkeby","bnb","bnbt","standard","defaultProvider","textData","atob","btoa","getUrl","href","request","headers","body","skipFetchSetup","cache","credentials","redirect","referrer","response","fetch","statusCode","status","statusMessage","statusText","staller","duration","bodyify","_fetchData","connection","processFunc","attemptLimit","throttleLimit","assertArgument","throttleCallback","throttleSlotInterval","allow304","timeout","allowGzip","user","allowInsecureAuthentication","authorization","base64Encode","reData","dataMatch","content-type","base64Decode","SERVER_ERROR","requestBody","requestMethod","flatHeaders","header","runningTimeout","timer","promise","TIMEOUT","cancel","clearTimeout","runningFetch","attempt","location","tryAgain","stall","retryAfter","serverError","throttleRetry","race","fetchJson","processJsonFunc","updated","hasContentType","poll","ceiling","interval","retryLimit","oncePoll","onceBlock","ALPHABET","ALPHABET_MAP","polymodStep","prefixChk","prefix","chk","LIMIT","__decode","lowered","uppered","lastIndexOf","wordChars","decodeUnsafe","convert","inBits","outBits","maxV","toWordsUnsafe","toWords","fromWordsUnsafe","fromWords","bech32","Formatter","formats","getDefaultFormats","bigNumber","strictData","allowNull","blockNumber","transactionIndex","uint256","creates","transactionRequest","receiptLog","arrayOf","logIndex","gasUsed","logsBloom","cumulativeGasUsed","effectiveGasPrice","parentHash","difficulty","miner","extraData","transactions","blockWithTransactions","transactionResponse","filterLog","removed","allowFalsish","strict","author","_difficulty","_block","networkId","parseTransaction","byzantium","checkKey","checkValue","nullValue","replaceValue","isCommunityResourcable","isCommunityResource","throttleMessage","showThrottleMessage","checkTopic","serializeTopics","sorted","deserializeTopics","isForkEvent","getTime","PollableEvents","Event","coinInfos","0","symbol","p2pkh","p2sh","2","3","60","ilk","61","700","bytes32ify","base58Encode","matchers","_parseString","_parseBytes","Resolver","formatter","parameters","coinType","hexBytes","coinInfo","callAddress","_fetchBytes","_getAddress","linkage","avatar","getText","content","owner","_resolvedAddress","tokenId","tokenOwner","balance","metadataUrl","metadata","image","ipfs","swarm","keyBytes","defaultFormatter","nextPollId","BaseProvider","_events","_emitted","getFormatter","anyNetwork","detectNetwork","_networkPromise","_ready","knownNetwork","_maxInternalBlockNumber","_lastBlockNumber","_pollingInterval","_fastQueryDate","_network","ready","NETWORK_ERROR","maxAge","_internalBlockNumber","internalBlockNumber","respTime","reqTime","checkInternalBlockNumber","perform","networkError","_setFastBlockNumber","pollId","runners","_getInternalBlockNumber","pollingInterval","previousBlockNumber","eventBlockNumber","runner","polling","currentNetwork","_fastBlockNumber","_fastBlockNumberPromise","detectedNetwork","_poller","setInterval","_bootstrapPoll","clearInterval","getBlockNumber","_waitForTransaction","replaceable","cancelFuncs","alreadyDone","minedHandler","lastBlockNumber","startBlock","scannedBlock","replaceHandler","__awaiter$9","mined","getBlockWithTransactions","ti","waitForTransaction","TRANSACTION_REPLACED","cancelled","replacement","_wrapTransaction","unref","_getBlockTag","position","expectedHash","returnedHash","confirms","signedTransaction","hexTx","_getTransactionRequest","blockHashOrBlockTag","includeTransactions","blockWithTxs","_getBlock","_getFilter","_getResolver","getResolver","reverseName","resolverAddress","nameOrAddress","getAvatar","NOT_IMPLEMENTED","pollable","_startEvent","stopped","eventTag","_stopEvent","errorGas","checkError","responseText","getResult","getLowerCase","JsonRpcSigner","addressOrIndex","UncheckedJsonRpcSigner","_address","_index","send","accounts","fromAddress","estimate","__awaiter$a","sender","hexlifyTransaction","sendUncheckedTransaction","getPayload","networkOrReady","_nextId","_cache","_eventLoopCache","_uncachedDetectNetwork","getSigner","connectUnchecked","jsonrpc","action","prepareRequest","_startPending","_pendingFilter","pendingFilter","filterId","hashes","seq","allowExtra","allowed","WS","WebSocket","NextId","WebSocketProvider","_wsReady","_websocket","onopen","_requests","onmessage","messageEvent","_subs","subscription","fauxPoll","_detectNetwork","rid","subIdPromise","_subIds","subId","_subscribe","emitReceipt","readyState","CONNECTING","onerror","close","StaticJsonRpcProvider","_super","UrlJsonRpcProvider","apiKey","defaultApiKey","AlchemyWebSocketProvider","host","getTransactionPostData","maxFeePerGs","getJsonResult","checkLogTag","getBaseUrl","query","baseUrl","apikey","post","getPostUrl","getPostData","procFunc","payloadStr","txhash","postData","topic0","ethusd","endBlock","startblock","endblock","timeStamp","checkNetworks","median","maxDelta","middle","nextRid","getPromise","ForwardErrors","ForwardProperties","exposeDebugConfig","config","weight","normalizedTally","configs","tally","getProcessFunc","_highestBlockNumber","waitForSync","getRunner","currentBlockNumber","getEtherPrice","getStorageAt","providerConfigs","configOrProvider","stallTimeout","priority","first","t0","inflightWeight","backend","waiting","errorCode","props","IpcProvider","defaultProjectId","InfuraWebSocketProvider","projectId","projectSecret","apiKeyObj","JsonRpcBatchProvider","_pendingBatch","inflightRequest","_pendingBatchAggregator","batch","inflight","NodesmithProvider","defaultApplicationIds","applicationId","loadBalancer","applicationSecretKey","buildWeb3LegacyFetcher","sendFunc","fetcher","buildEip1193Fetcher","Web3Provider","jsonRpcFetchFunc","subprovider","isMetaMask","sendAsync","getDefaultProvider","regexBytes","regexNumber","regexArray","_pack","tight","hashKeccak256","hashSha256","names","commify","suffix","formatted","formatUnits","unitName","parseUnits","formatEther","parseEther","ether","ethers"],"mappings":"yuCAAA,SAAWA,OAAQC,SACjB,aAGA,SAASC,OAAQC,IAAKC,KACpB,IAAKD,IAAK,MAAM,IAAIE,MAAMD,KAAO,oBAKnC,SAASE,SAAUC,KAAMC,WACvBD,KAAKE,OAASD,UACd,IAAIE,SAAW,aACfA,SAASC,UAAYH,UAAUG,UAC/BJ,KAAKI,UAAY,IAAID,SACrBH,KAAKI,UAAUC,YAAcL,KAK/B,SAASM,GAAIC,OAAQC,KAAMC,QACzB,GAAIH,GAAGI,KAAKH,QAAS,CACnB,OAAOA,OAGTI,KAAKC,SAAW,EAChBD,KAAKE,MAAQ,KACbF,KAAKG,OAAS,EAGdH,KAAKI,IAAM,KAEX,GAAIR,SAAW,KAAM,CACnB,GAAIC,OAAS,MAAQA,OAAS,KAAM,CAClCC,OAASD,KACTA,KAAO,GAGTG,KAAKK,MAAMT,QAAU,EAAGC,MAAQ,GAAIC,QAAU,O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,OAClB,UACG,CACH,MAAM5hB,MAAQ4hB,MAAM7jB,OAAS,EAC7BugF,UAAUhhE,QAAQsE,MAAMnE,UAAUzd,QAClC4hB,MAAQA,MAAMnE,UAAU,EAAGzd,QAInC,OAAOnC,SAAWygF,UAAU3lE,KAAK,KAAO0lE,gBAG5BE,YAAY/kE,MAAqBglE,UAC7C,UAAI,WAAqB,SAAU,CAC/B,MAAMx+E,MAAQm+E,MAAM14D,QAAQ+4D,UAC5B,GAAIx+E,SAAW,EAAG,CAAEw+E,SAAW,EAAIx+E,OAEvC,OAAOyhB,YAAYjI,MAAQglE,UAAY,KAAQA,SAAU,aAG7CC,WAAWjlE,MAAeglE,UACtC,UAAI,QAAkB,SAAU,CAC5BjiE,SAAOzC,mBAAmB,yBAA0B,QAASN,OAEjE,UAAI,WAAqB,SAAU,CAC/B,MAAMxZ,MAAQm+E,MAAM14D,QAAQ+4D,UAC5B,GAAIx+E,SAAW,EAAG,CAAEw+E,SAAW,EAAIx+E,OAEvC,OAAO6hB,WAAWrI,MAAQglE,UAAY,KAAQA,SAAU,aAG5CE,YAAYz8D,KACxB,OAAOs8D,YAAYt8D,IAAK,aAGZ08D,WAAWC,OACvB,OAAOH,WAAWG,MAAO,ICvF7B,ilFCAalnE,UAAU,eCAvB,mBAkCM6E,SAAS,IAAIpD,OAAOzB,+ZClC1B,aAMA,IACI,MAAM63C,UAAanxD,OAEnB,GAAImxD,UAAUC,SAAW,KAAM,CAC3BD,UAAUC,QAAUqvB,QAE1B,MAAO3mE","sourcesContent":["(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","export const version = \"logger/5.5.0\";\n","\"use strict\";\n\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\n\nconst LogLevels: { [ name: string ]: number } = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\n\nimport { version } from \"./_version\";\n\nlet _globalLogger: Logger = null;\n\nfunction _checkNormalize(): string {\n try {\n const missing: Array = [ ];\n\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n };\n } catch(error) {\n missing.push(form);\n }\n });\n\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\")\n }\n } catch (error) {\n return error.message;\n }\n\n return null;\n}\n\nconst _normalizeError = _checkNormalize();\n\nexport enum LogLevel {\n DEBUG = \"DEBUG\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n OFF = \"OFF\"\n}\n\n\nexport enum ErrorCode {\n\n ///////////////////\n // Generic Errors\n\n // Unknown Error\n UNKNOWN_ERROR = \"UNKNOWN_ERROR\",\n\n // Not Implemented\n NOT_IMPLEMENTED = \"NOT_IMPLEMENTED\",\n\n // Unsupported Operation\n // - operation\n UNSUPPORTED_OPERATION = \"UNSUPPORTED_OPERATION\",\n\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n NETWORK_ERROR = \"NETWORK_ERROR\",\n\n // Some sort of bad response from the server\n SERVER_ERROR = \"SERVER_ERROR\",\n\n // Timeout\n TIMEOUT = \"TIMEOUT\",\n\n ///////////////////\n // Operational Errors\n\n // Buffer Overrun\n BUFFER_OVERRUN = \"BUFFER_OVERRUN\",\n\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n NUMERIC_FAULT = \"NUMERIC_FAULT\",\n\n\n ///////////////////\n // Argument Errors\n\n // Missing new operator to an object\n // - name: The name of the class\n MISSING_NEW = \"MISSING_NEW\",\n\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n INVALID_ARGUMENT = \"INVALID_ARGUMENT\",\n\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n MISSING_ARGUMENT = \"MISSING_ARGUMENT\",\n\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n UNEXPECTED_ARGUMENT = \"UNEXPECTED_ARGUMENT\",\n\n\n ///////////////////\n // Blockchain Errors\n\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n CALL_EXCEPTION = \"CALL_EXCEPTION\",\n\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n INSUFFICIENT_FUNDS = \"INSUFFICIENT_FUNDS\",\n\n // Nonce has already been used\n // - transaction: the transaction attempted\n NONCE_EXPIRED = \"NONCE_EXPIRED\",\n\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n REPLACEMENT_UNDERPRICED = \"REPLACEMENT_UNDERPRICED\",\n\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n UNPREDICTABLE_GAS_LIMIT = \"UNPREDICTABLE_GAS_LIMIT\",\n\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n TRANSACTION_REPLACED = \"TRANSACTION_REPLACED\",\n};\n\nconst HEX = \"0123456789abcdef\";\n\nexport class Logger {\n readonly version: string;\n\n static errors = ErrorCode;\n\n static levels = LogLevel;\n\n constructor(version: string) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n\n _log(logLevel: LogLevel, args: Array): void {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) { return; }\n console.log.apply(console, args);\n }\n\n debug(...args: Array): void {\n this._log(Logger.levels.DEBUG, args);\n }\n\n info(...args: Array): void {\n this._log(Logger.levels.INFO, args);\n }\n\n warn(...args: Array): void {\n this._log(Logger.levels.WARNING, args);\n }\n\n makeError(message: string, code?: ErrorCode, params?: any): Error {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, { });\n }\n\n if (!code) { code = Logger.errors.UNKNOWN_ERROR; }\n if (!params) { params = {}; }\n\n const messageDetails: Array = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${ code }`);\n messageDetails.push(`version=${ this.version }`);\n\n const reason = message;\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n\n // @TODO: Any??\n const error: any = new Error(message);\n error.reason = reason;\n error.code = code\n\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n\n return error;\n }\n\n throwError(message: string, code?: ErrorCode, params?: any): never {\n throw this.makeError(message, code, params);\n }\n\n throwArgumentError(message: string, name: string, value: any): never {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n\n assert(condition: any, message: string, code?: ErrorCode, params?: any): void {\n if (!!condition) { return; }\n this.throwError(message, code, params);\n }\n\n assertArgument(condition: any, message: string, name: string, value: any): void {\n if (!!condition) { return; }\n this.throwArgumentError(message, name, value);\n }\n\n checkNormalize(message?: string): void {\n if (message == null) { message = \"platform missing String.prototype.normalize\"; }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n\n checkSafeUint53(value: number, message?: string): void {\n if (typeof(value) !== \"number\") { return; }\n\n if (message == null) { message = \"value not safe\"; }\n\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n\n checkArgumentCount(count: number, expectedCount: number, message?: string): void {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n\n checkNew(target: any, kind: any): void {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n checkAbstract(target: any, kind: any): void {\n if (target === kind) {\n this.throwError(\n \"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { name: target.name, operation: \"new\" }\n );\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n static globalLogger(): Logger {\n if (!_globalLogger) { _globalLogger = new Logger(version); }\n return _globalLogger;\n }\n\n static setCensorship(censorship: boolean, permanent?: boolean): void {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n if (_permanentCensorErrors) {\n if (!censorship) { return; }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n\n static setLogLevel(logLevel: LogLevel): void {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n\n static from(version: string): Logger {\n return new Logger(version);\n }\n}\n","export const version = \"bytes/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type Bytes = ArrayLike;\n\nexport type BytesLike = Bytes | string;\n\nexport type DataOptions = {\n allowMissingPrefix?: boolean;\n hexPad?: \"left\" | \"right\" | null;\n};\n\nexport interface Hexable {\n toHexString(): string;\n}\n\n\n/*\nexport interface HexString {\n length: number;\n substring: (start: number, end?: number) => string;\n\n [index: number]: string;\n}\n*/\n\nexport type SignatureLike = {\n r: string;\n s?: string;\n _vs?: string,\n recoveryParam?: number;\n v?: number;\n} | BytesLike;\n\nexport interface Signature {\n r: string;\n\n s: string;\n _vs: string,\n\n recoveryParam: number;\n v: number;\n}\n\n///////////////////////////////\n\n\nfunction isHexable(value: any): value is Hexable {\n return !!(value.toHexString);\n}\n\nfunction addSlice(array: Uint8Array): Uint8Array {\n if (array.slice) { return array; }\n\n array.slice = function() {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n }\n\n return array;\n}\n\nexport function isBytesLike(value: any): value is BytesLike {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\n\nfunction isInteger(value: number) {\n return (typeof(value) === \"number\" && value == value && (value % 1) === 0);\n}\n\nexport function isBytes(value: any): value is Bytes {\n if (value == null) { return false; }\n\n if (value.constructor === Uint8Array) { return true; }\n if (typeof(value) === \"string\") { return false; }\n if (!isInteger(value.length) || value.length < 0) { return false; }\n\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) { return false; }\n }\n return true;\n}\n\n\nexport function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) { result.push(0); }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { value = value.toHexString(); }\n\n if (isHexString(value)) {\n let hex = (value).substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0x0\" + hex.substring(2);\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n\n const result = [];\n for (let i = 0; i < hex.length; i += 2) {\n result.push(parseInt(hex.substring(i, i + 2), 16));\n }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (isBytes(value)) {\n return addSlice(new Uint8Array(value));\n }\n\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n}\n\nexport function concat(items: ReadonlyArray): Uint8Array {\n const objects = items.map(item => arrayify(item));\n const length = objects.reduce((accum, item) => (accum + item.length), 0);\n\n const result = new Uint8Array(length);\n\n objects.reduce((offset, object) => {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n\n return addSlice(result);\n}\n\nexport function stripZeros(value: BytesLike): Uint8Array {\n let result: Uint8Array = arrayify(value);\n\n if (result.length === 0) { return result; }\n\n // Find the first non-zero entry\n let start = 0;\n while (start < result.length && result[start] === 0) { start++ }\n\n // If we started with zeros, strip them\n if (start) {\n result = result.slice(start);\n }\n\n return result;\n}\n\nexport function zeroPad(value: BytesLike, length: number): Uint8Array {\n value = arrayify(value);\n\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n\n const result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n}\n\n\nexport function isHexString(value: any, length?: number): boolean {\n if (typeof(value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false\n }\n if (length && value.length !== 2 + 2 * length) { return false; }\n return true;\n}\n\nconst HexCharacters: string = \"0123456789abcdef\";\n\nexport function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n\n let hex = \"\";\n while (value) {\n hex = HexCharacters[value & 0xf] + hex;\n value = Math.floor(value / 16);\n }\n\n if (hex.length) {\n if (hex.length % 2) { hex = \"0\" + hex; }\n return \"0x\" + hex;\n }\n\n return \"0x00\";\n }\n\n if (typeof(value) === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) { return (\"0x0\" + value); }\n return \"0x\" + value;\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { return value.toHexString(); }\n\n if (isHexString(value)) {\n if ((value).length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + (value).substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return (value).toLowerCase();\n }\n\n if (isBytes(value)) {\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n let v = value[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n }\n\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n}\n\n/*\nfunction unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {\n if (typeof(value) === \"string\" && value.length % 2 && value.substring(0, 2) === \"0x\") {\n return \"0x0\" + value.substring(2);\n }\n return value;\n}\n*/\nexport function hexDataLength(data: BytesLike) {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n return null;\n }\n\n return (data.length - 2) / 2;\n}\n\nexport function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data );\n }\n\n offset = 2 + 2 * offset;\n\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n\n return \"0x\" + data.substring(offset);\n}\n\nexport function hexConcat(items: ReadonlyArray): string {\n let result = \"0x\";\n items.forEach((item) => {\n result += hexlify(item).substring(2);\n });\n return result;\n}\n\nexport function hexValue(value: BytesLike | Hexable | number | bigint): string {\n const trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") { return \"0x0\"; }\n return trimmed;\n}\n\nexport function hexStripZeros(value: BytesLike): string {\n if (typeof(value) !== \"string\") { value = hexlify(value); }\n\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n let offset = 0;\n while (offset < value.length && value[offset] === \"0\") { offset++; }\n return \"0x\" + value.substring(offset);\n}\n\nexport function hexZeroPad(value: BytesLike, length: number): string {\n if (typeof(value) !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n\n return value;\n}\n\nexport function splitSignature(signature: SignatureLike): Signature {\n const result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0\n };\n\n if (isBytesLike(signature)) {\n const bytes: Uint8Array = arrayify(signature);\n if (bytes.length !== 65) {\n logger.throwArgumentError(\"invalid signature string; must be 65 bytes\", \"signature\", signature);\n }\n\n // Get the r, s and v\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n\n // Allow a recid to be used as the v\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n\n // Compute recoveryParam from v\n result.recoveryParam = 1 - (result.v % 2);\n\n // Compute _vs from recoveryParam and s\n if (result.recoveryParam) { bytes[32] |= 0x80; }\n result._vs = hexlify(bytes.slice(32, 64))\n\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n\n // If the _vs is available, use it to populate missing s, v and recoveryParam\n // and verify non-missing s, v and recoveryParam\n if (result._vs != null) {\n const vs = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs);\n\n // Set or check the recid\n const recoveryParam = ((vs[0] >= 128) ? 1: 0);\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n\n // Set or check the s\n vs[0] &= 0x7f;\n const s = hexlify(vs);\n if (result.s == null) {\n result.s = s;\n } else if (result.s !== s) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n\n // Use recid and v to populate each other\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - (result.v % 2);\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n const recId = (result.v === 0 || result.v === 1) ? result.v :(1 - (result.v % 2));\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n\n const vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) { vs[0] |= 0x80; }\n const _vs = hexlify(vs);\n\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n\n // Set or check the _vs\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n\n return result;\n}\n\nexport function joinSignature(signature: SignatureLike): string {\n signature = splitSignature(signature);\n\n return hexlify(concat([\n signature.r,\n signature.s,\n (signature.recoveryParam ? \"0x1c\": \"0x1b\")\n ]));\n}\n\n","export const version = \"bignumber/5.5.0\";\n","\"use strict\";\n\n/**\n * BigNumber\n *\n * A wrapper around the BN.js object. We use the BN.js library\n * because it is used by elliptic, so it is required regardless.\n *\n */\n\nimport _BN from \"bn.js\";\nimport BN = _BN.BN;\n\nimport { Bytes, Hexable, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst _constructorGuard = { };\n\nconst MAX_SAFE = 0x1fffffffffffff;\n\n\nexport type BigNumberish = BigNumber | Bytes | bigint | string | number;\n\nexport function isBigNumberish(value: any): value is BigNumberish {\n return (value != null) && (\n BigNumber.isBigNumber(value) ||\n (typeof(value) === \"number\" && (value % 1) === 0) ||\n (typeof(value) === \"string\" && !!value.match(/^-?[0-9]+$/)) ||\n isHexString(value) ||\n (typeof(value) === \"bigint\") ||\n isBytes(value)\n );\n}\n\n// Only warn about passing 10 into radix once\nlet _warnedToStringRadix = false;\n\nexport class BigNumber implements Hexable {\n readonly _hex: string;\n readonly _isBigNumber: boolean;\n\n constructor(constructorGuard: any, hex: string) {\n logger.checkNew(new.target, BigNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n\n this._hex = hex;\n this._isBigNumber = true;\n\n Object.freeze(this);\n }\n\n fromTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).fromTwos(value));\n }\n\n toTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).toTwos(value));\n }\n\n abs(): BigNumber {\n if (this._hex[0] === \"-\") {\n return BigNumber.from(this._hex.substring(1));\n }\n return this;\n }\n\n add(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).add(toBN(other)));\n }\n\n sub(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).sub(toBN(other)));\n }\n\n div(other: BigNumberish): BigNumber {\n const o = BigNumber.from(other);\n if (o.isZero()) {\n throwFault(\"division by zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n }\n\n mul(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).mul(toBN(other)));\n }\n\n mod(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot modulo negative values\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n }\n\n pow(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot raise to negative values\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n }\n\n and(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'and' negative values\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n }\n\n or(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'or' negative values\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n }\n\n xor(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'xor' negative values\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n }\n\n mask(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot mask negative values\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n }\n\n shl(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n }\n\n shr(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n }\n\n eq(other: BigNumberish): boolean {\n return toBN(this).eq(toBN(other));\n }\n\n lt(other: BigNumberish): boolean {\n return toBN(this).lt(toBN(other));\n }\n\n lte(other: BigNumberish): boolean {\n return toBN(this).lte(toBN(other));\n }\n\n gt(other: BigNumberish): boolean {\n return toBN(this).gt(toBN(other));\n }\n\n gte(other: BigNumberish): boolean {\n return toBN(this).gte(toBN(other));\n }\n\n isNegative(): boolean {\n return (this._hex[0] === \"-\");\n }\n\n isZero(): boolean {\n return toBN(this).isZero();\n }\n\n toNumber(): number {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n }\n\n toBigInt(): bigint {\n try {\n return BigInt(this.toString());\n } catch (e) { }\n\n return logger.throwError(\"this platform does not support BigInt\", Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n }\n\n toString(): string {\n // Lots of people expect this, which we do not support, so check (See: #889)\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n }\n }\n return toBN(this).toString(10);\n }\n\n toHexString(): string {\n return this._hex;\n }\n\n toJSON(key?: string): any {\n return { type: \"BigNumber\", hex: this.toHexString() };\n }\n\n static from(value: any): BigNumber {\n if (value instanceof BigNumber) { return value; }\n\n if (typeof(value) === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber(_constructorGuard, toHex(value));\n }\n\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber(_constructorGuard, toHex(new BN(value)));\n }\n\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n\n if (typeof(value) === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n\n return BigNumber.from(String(value));\n }\n\n const anyValue = value;\n\n if (typeof(anyValue) === \"bigint\") {\n return BigNumber.from(anyValue.toString());\n }\n\n if (isBytes(anyValue)) {\n return BigNumber.from(hexlify(anyValue));\n }\n\n if (anyValue) {\n\n // Hexable interface (takes priority)\n if (anyValue.toHexString) {\n const hex = anyValue.toHexString();\n if (typeof(hex) === \"string\") {\n return BigNumber.from(hex);\n }\n\n } else {\n // For now, handle legacy JSON-ified values (goes away in v6)\n let hex = anyValue._hex;\n\n // New-form JSON\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n\n if (typeof(hex) === \"string\") {\n if (isHexString(hex) || (hex[0] === \"-\" && isHexString(hex.substring(1)))) {\n return BigNumber.from(hex);\n }\n }\n }\n }\n\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n }\n\n static isBigNumber(value: any): value is BigNumber {\n return !!(value && value._isBigNumber);\n }\n}\n\n// Normalize the hex string\nfunction toHex(value: string | BN): string {\n\n // For BN, call on the hex string\n if (typeof(value) !== \"string\") {\n return toHex(value.toString(16));\n }\n\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n\n // Cannot have multiple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") { logger.throwArgumentError(\"invalid hex\", \"value\", value); }\n\n // Call toHex on the positive component\n value = toHex(value);\n\n // Do not allow \"-0x00\"\n if (value === \"0x00\") { return value; }\n\n // Negate the value\n return \"-\" + value;\n }\n\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n\n // Normalize zero\n if (value === \"0x\") { return \"0x00\"; }\n\n // Make the string even length\n if (value.length % 2) { value = \"0x0\" + value.substring(2); }\n\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n\n return value;\n}\n\nfunction toBigNumber(value: BN): BigNumber {\n return BigNumber.from(toHex(value));\n}\n\nfunction toBN(value: BigNumberish): BN {\n const hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return (new BN(\"-\" + hex.substring(3), 16));\n }\n return new BN(hex.substring(2), 16);\n}\n\nfunction throwFault(fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value != null) { params.value = value; }\n\n return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// value should have no prefix\nexport function _base36To16(value: string): string {\n return (new BN(value, 36)).toString(16);\n}\n\n// value should have no prefix\nexport function _base16To36(value: string): string {\n return (new BN(value, 16)).toString(36);\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexZeroPad, isBytes } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BigNumber, BigNumberish, isBigNumberish } from \"./bignumber\";\n\nconst _constructorGuard = { };\n\nconst Zero = BigNumber.from(0);\nconst NegativeOne = BigNumber.from(-1);\n\nfunction throwFault(message: string, fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value !== undefined) { params.value = value; }\n return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// Constant to pull zeros from for multipliers\nlet zeros = \"0\";\nwhile (zeros.length < 256) { zeros += zeros; }\n\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getMultiplier(decimals: BigNumberish): string {\n\n if (typeof(decimals) !== \"number\") {\n try {\n decimals = BigNumber.from(decimals).toNumber();\n } catch (e) { }\n }\n\n if (typeof(decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}\n\nexport function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string {\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n // Make sure wei is a big number (convert as necessary)\n value = BigNumber.from(value);\n\n const negative = value.lt(Zero);\n if (negative) { value = value.mul(NegativeOne); }\n\n let fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) { fraction = \"0\" + fraction; }\n\n // Strip training 0\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n\n const whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n\n if (negative) { value = \"-\" + value; }\n\n return value;\n}\n\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n if (typeof(value) !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n\n // Is it negative?\n const negative = (value.substring(0, 1) === \"-\");\n if (negative) { value = value.substring(1); }\n\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n\n // Split it into a whole and fractional part\n const comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n\n let whole = comps[0], fraction = comps[1];\n if (!whole) { whole = \"0\"; }\n if (!fraction) { fraction = \"0\"; }\n\n // Trim trailing zeros\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n\n // Check the fraction doesn't exceed our decimals size\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n\n // If decimals is 0, we have an empty string for fraction\n if (fraction === \"\") { fraction = \"0\"; }\n\n // Fully pad the string with zeros to get to wei\n while (fraction.length < multiplier.length - 1) { fraction += \"0\"; }\n\n const wholeValue = BigNumber.from(whole);\n const fractionValue = BigNumber.from(fraction);\n\n let wei = (wholeValue.mul(multiplier)).add(fractionValue);\n\n if (negative) { wei = wei.mul(NegativeOne); }\n\n return wei;\n}\n\n\nexport class FixedFormat {\n readonly signed: boolean;\n readonly width: number;\n readonly decimals: number;\n readonly name: string;\n readonly _multiplier: string;\n\n constructor(constructorGuard: any, signed: boolean, width: number, decimals: number) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n\n this.name = (signed ? \"\": \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n\n this._multiplier = getMultiplier(decimals);\n\n Object.freeze(this);\n }\n\n static from(value: any): FixedFormat {\n if (value instanceof FixedFormat) { return value; }\n\n if (typeof(value) === \"number\") {\n value = `fixed128x${value}`\n }\n\n let signed = true;\n let width = 128;\n let decimals = 18;\n\n if (typeof(value) === \"string\") {\n if (value === \"fixed\") {\n // defaults...\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) { logger.throwArgumentError(\"invalid fixed format\", \"format\", value); }\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const check = (key: string, type: string, defaultValue: any): any => {\n if (value[key] == null) { return defaultValue; }\n if (typeof(value[key]) !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type +\")\", \"format.\" + key, value[key]);\n }\n return value[key];\n }\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n\n return new FixedFormat(_constructorGuard, signed, width, decimals);\n }\n}\n\nexport class FixedNumber {\n readonly format: FixedFormat;\n readonly _hex: string;\n readonly _value: string;\n\n readonly _isFixedNumber: boolean;\n\n constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat) {\n logger.checkNew(new.target, FixedNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.format = format;\n this._hex = hex;\n this._value = value;\n\n this._isFixedNumber = true;\n\n Object.freeze(this);\n }\n\n _checkFormat(other: FixedNumber): void {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n }\n\n addUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format);\n }\n\n subUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format);\n }\n\n mulUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format);\n }\n\n divUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format);\n }\n\n floor(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n ceiling(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n // @TODO: Support other rounding algorithms\n round(decimals?: number): FixedNumber {\n if (decimals == null) { decimals = 0; }\n\n // If we are already in range, we're done\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n if (decimals < 0 || decimals > 80 || (decimals % 1)) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n\n if (comps[1].length <= decimals) { return this; }\n\n const factor = FixedNumber.from(\"1\" + zeros.substring(0, decimals), this.format);\n const bump = BUMP.toFormat(this.format);\n\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n }\n\n isZero(): boolean {\n return (this._value === \"0.0\" || this._value === \"0\");\n }\n\n isNegative(): boolean {\n return (this._value[0] === \"-\");\n }\n\n toString(): string { return this._value; }\n\n toHexString(width?: number): string {\n if (width == null) { return this._hex; }\n if (width % 8) { logger.throwArgumentError(\"invalid byte width\", \"width\", width); }\n const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return hexZeroPad(hex, width / 8);\n }\n\n toUnsafeFloat(): number { return parseFloat(this.toString()); }\n\n toFormat(format: FixedFormat | string): FixedNumber {\n return FixedNumber.fromString(this._value, format);\n }\n\n\n static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber {\n // If decimals looks more like a format, and there is no format, shift the parameters\n if (format == null && decimals != null && !isBigNumberish(decimals)) {\n format = decimals;\n decimals = null;\n }\n\n if (decimals == null) { decimals = 0; }\n if (format == null) { format = \"fixed\"; }\n\n return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n }\n\n\n static fromString(value: string, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n const numeric = parseFixed(value, fixedFormat.decimals);\n\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n\n let hex: string = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = hexZeroPad(hex, fixedFormat.width / 8);\n }\n\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n if (arrayify(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n\n let numeric = BigNumber.from(value);\n if (fixedFormat.signed) { numeric = numeric.fromTwos(fixedFormat.width); }\n\n const hex = numeric.toTwos((fixedFormat.signed ? 0: 1) + fixedFormat.width).toHexString();\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static from(value: any, format?: FixedFormat | string | number) {\n if (typeof(value) === \"string\") {\n return FixedNumber.fromString(value, format);\n }\n\n if (isBytes(value)) {\n return FixedNumber.fromBytes(value, format);\n }\n\n try {\n return FixedNumber.fromValue(value, 0, format);\n } catch (error) {\n // Allow NUMERIC_FAULT to bubble up\n if (error.code !== Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n }\n\n static isFixedNumber(value: any): value is FixedNumber {\n return !!(value && value._isFixedNumber);\n }\n}\n\nconst ONE = FixedNumber.from(1);\nconst BUMP = FixedNumber.from(\"0.5\");\n","export const version = \"properties/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function defineReadOnly(object: T, name: K, value: T[K]): void {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor: any, key: string): T {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) { return ctor[key]; }\n if (!ctor.prototype || typeof(ctor.prototype) !== \"object\") { break; }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\n\nexport type Deferrable = {\n [ K in keyof T ]: T[K] | Promise;\n}\n\n\ntype Result = { key: string, value: any};\n\nexport async function resolveProperties(object: Readonly>): Promise {\n const promises: Array> = Object.keys(object).map((key) => {\n const value = object[>key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, { });\n}\n\nexport function checkProperties(object: any, properties: { [ name: string ]: boolean }): void {\n if (!object || typeof(object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\n\nexport function shallowCopy(object: T): T {\n const result: any = {};\n for (const key in object) { result[key] = object[key]; }\n return result;\n}\n\nconst opaque: { [key: string]: boolean } = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n\nfunction _isFrozen(object: any): boolean {\n\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof(object)]) { return true; }\n\n if (Array.isArray(object) || typeof(object) === \"object\") {\n if (!Object.isFrozen(object)) { return false; }\n\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value: any = null;\n try {\n value = object[keys[i]];\n } catch (error) {\n // If accessing a value triggers an error, it is a getter\n // designed to do so (e.g. Result) and is therefore \"frozen\"\n continue;\n }\n\n if (!_isFrozen(value)) { return false; }\n }\n\n return true;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\n// Returns a new copy of object, such that no properties may be replaced.\n// New properties may be added only to objects.\nfunction _deepCopy(object: any): any {\n\n if (_isFrozen(object)) { return object; }\n\n // Arrays are mutable, so we need to create a copy\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n\n if (typeof(object) === \"object\") {\n const result: { [ key: string ]: any } = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) { continue; }\n defineReadOnly(result, key, deepCopy(value));\n }\n\n return result;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\nexport function deepCopy(object: T): T {\n return _deepCopy(object);\n}\n\nexport class Description {\n constructor(info: { [ K in keyof T ]: T[K] }) {\n for (const key in info) {\n (this)[key] = deepCopy(info[key]);\n }\n }\n}\n","export const version = \"abi/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport interface JsonFragmentType {\n readonly name?: string;\n readonly indexed?: boolean;\n readonly type?: string;\n readonly internalType?: any; // @TODO: in v6 reduce type\n readonly components?: ReadonlyArray;\n}\n\nexport interface JsonFragment {\n readonly name?: string;\n readonly type?: string;\n\n readonly anonymous?: boolean;\n\n readonly payable?: boolean;\n readonly constant?: boolean;\n readonly stateMutability?: string;\n\n readonly inputs?: ReadonlyArray;\n readonly outputs?: ReadonlyArray;\n\n readonly gas?: string;\n};\n\nconst _constructorGuard = { };\n\n// AST Node parser state\ntype ParseState = {\n allowArray?: boolean,\n allowName?: boolean,\n allowParams?: boolean,\n allowType?: boolean,\n readArray?: boolean,\n};\n\n// AST Node\ntype ParseNode = {\n parent?: any,\n type?: string,\n name?: string,\n state?: ParseState,\n indexed?: boolean,\n components?: Array\n};\n\nlet ModifiersBytes: { [ name: string ]: boolean } = { calldata: true, memory: true, storage: true };\nlet ModifiersNest: { [ name: string ]: boolean } = { calldata: true, memory: true };\nfunction checkModifier(type: string, name: string): boolean {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) { return true; }\n } else if (type === \"address\") {\n if (name === \"payable\") { return true; }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) { return true; }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n}\n\n// @TODO: Make sure that children of an indexed tuple are marked with a null indexed\nfunction parseParamType(param: string, allowIndexed: boolean): ParseNode {\n\n let originalParam = param;\n function throwError(i: number) {\n logger.throwArgumentError(`unexpected character at position ${ i }`, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n\n function newNode(parent: ParseNode): ParseNode {\n let node: ParseNode = { type: \"\", name: \"\", parent: parent, state: { allowType: true } };\n if (allowIndexed) { node.indexed = false; }\n return node\n }\n\n let parent: ParseNode = { type: \"\", name: \"\", state: { allowType: true } };\n let node = parent;\n\n for (let i = 0; i < param.length; i++) {\n let c = param[i];\n switch (c) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [ newNode(node) ];\n node = node.components[0];\n break;\n\n case \")\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let child = node;\n node = node.parent;\n if (!node) { throwError(i); }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n\n case \",\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let sibling: ParseNode = newNode(node.parent);\n //{ type: \"\", name: \"\", parent: node.parent, state: { allowType: true } };\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n\n // Hit a space...\n case \" \":\n\n // If reading type, the type is done and may read a param or name\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n\n // If reading name, the name is done\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n if (node.indexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n\n break;\n\n case \"[\":\n if (!node.state.allowArray) { throwError(i); }\n\n node.type += c;\n\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n\n case \"]\":\n if (!node.state.readArray) { throwError(i); }\n\n node.type += c;\n\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n\n default:\n if (node.state.allowType) {\n node.type += c;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c;\n } else {\n throwError(i);\n }\n }\n }\n\n if (node.parent) { logger.throwArgumentError(\"unexpected eof\", \"param\", param); }\n\n delete parent.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(originalParam.length - 7); }\n if (node.indexed) { throwError(originalParam.length - 7); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n\n parent.type = verifyType(parent.type);\n\n return parent;\n}\n\nfunction populate(object: any, params: any) {\n for (let key in params) { defineReadOnly(object, key, params[key]); }\n}\n\nexport const FormatTypes: { [ name: string ]: string } = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n\n // JSON-format a la Solidity\n json: \"json\"\n});\n\nconst paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n\nexport class ParamType {\n\n // The local name of the parameter (of null if unbound)\n readonly name: string;\n\n // The fully qualified type (e.g. \"address\", \"tuple(address)\", \"uint256[3][]\"\n readonly type: string;\n\n // The base type (e.g. \"address\", \"tuple\", \"array\")\n readonly baseType: string;\n\n // Indexable Paramters ONLY (otherwise null)\n readonly indexed: boolean;\n\n // Tuples ONLY: (otherwise null)\n // - sub-components\n readonly components: Array;\n\n // Arrays ONLY: (otherwise null)\n // - length of the array (-1 for dynamic length)\n // - child type\n readonly arrayLength: number;\n readonly arrayChildren: ParamType;\n\n readonly _isParamType: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) { logger.throwError(\"use fromString\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n }); }\n populate(this, params);\n\n let match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: ((this.components != null) ? \"tuple\": this.type)\n });\n }\n\n this._isParamType = true;\n\n Object.freeze(this);\n }\n\n // Format the parameter fragment\n // - sighash: \"(uint256,address)\"\n // - minimal: \"tuple(uint256,address) indexed\"\n // - full: \"tuple(uint256 foo, address bar) indexed baz\"\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n let result: any = {\n type: ((this.baseType === \"tuple\") ? \"tuple\": this.type),\n name: (this.name || undefined)\n };\n if (typeof(this.indexed) === \"boolean\") { result.indexed = this.indexed; }\n if (this.components) {\n result.components = this.components.map((comp) => JSON.parse(comp.format(format)));\n }\n return JSON.stringify(result);\n }\n\n let result = \"\";\n\n // Array\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\": String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(\n (comp) => comp.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n\n if (format !== FormatTypes.sighash) {\n if (this.indexed === true) { result += \" indexed\"; }\n if (format === FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n\n return result;\n }\n\n static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType {\n if (typeof(value) === \"string\") {\n return ParamType.fromString(value, allowIndexed);\n }\n return ParamType.fromObject(value);\n }\n\n static fromObject(value: JsonFragmentType | ParamType): ParamType {\n if (ParamType.isParamType(value)) { return value; }\n\n return new ParamType(_constructorGuard, {\n name: (value.name || null),\n type: verifyType(value.type),\n indexed: ((value.indexed == null) ? null: !!value.indexed),\n components: (value.components ? value.components.map(ParamType.fromObject): null)\n });\n }\n\n static fromString(value: string, allowIndexed?: boolean): ParamType {\n function ParamTypify(node: ParseNode): ParamType {\n return ParamType.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n\n return ParamTypify(parseParamType(value, !!allowIndexed));\n }\n\n static isParamType(value: any): value is ParamType {\n return !!(value != null && value._isParamType);\n }\n};\n\nfunction parseParams(value: string, allowIndex: boolean): Array {\n return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex));\n}\n\ntype TypeCheck = { -readonly [ K in keyof T ]: T[K] };\n\ninterface _Fragment {\n readonly type: string;\n readonly name: string;\n readonly inputs: ReadonlyArray;\n}\n\nexport abstract class Fragment {\n\n readonly type: string;\n readonly name: string;\n readonly inputs: Array;\n\n readonly _isFragment: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n\n this._isFragment = true;\n\n Object.freeze(this);\n }\n\n abstract format(format?: string): string;\n\n static from(value: Fragment | JsonFragment | string): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n if (typeof(value) === \"string\") {\n return Fragment.fromString(value);\n }\n\n return Fragment.fromObject(value);\n }\n\n static fromObject(value: Fragment | JsonFragment): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment?\n return null;\n }\n\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n }\n\n static fromString(value: string): Fragment {\n // Make sure the \"returns\" is surrounded by a space and all whitespace is exactly one space\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n }\n\n static isFragment(value: any): value is Fragment {\n return !!(value && value._isFragment);\n }\n}\n\ninterface _EventFragment extends _Fragment {\n readonly anonymous: boolean;\n}\n\nexport class EventFragment extends Fragment {\n readonly anonymous: boolean;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"event \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: EventFragment | JsonFragment | string): EventFragment {\n if (typeof(value) === \"string\") {\n return EventFragment.fromString(value);\n }\n return EventFragment.fromObject(value);\n }\n\n static fromObject(value: JsonFragment | EventFragment): EventFragment {\n if (EventFragment.isEventFragment(value)) { return value; }\n\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n\n const params: TypeCheck<_EventFragment> = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n type: \"event\"\n };\n\n return new EventFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): EventFragment {\n\n let match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n\n let anonymous = false;\n match[3].split(\" \").forEach((modifier) => {\n switch(modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n\n return EventFragment.fromObject({\n name: match[1].trim(),\n anonymous: anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n }\n\n static isEventFragment(value: any): value is EventFragment {\n return (value && value._isFragment && value.type === \"event\");\n }\n}\n\nfunction parseGas(value: string, params: any): string {\n params.gas = null;\n\n let comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = BigNumber.from(comps[1]);\n return comps[0];\n }\n\n return value;\n}\n\nfunction parseModifiers(value: string, params: any): void {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n\n value.split(\" \").forEach((modifier) => {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n}\n\ntype StateInputValue = {\n constant?: boolean;\n payable?: boolean;\n stateMutability?: string;\n type?: string;\n};\n\ntype StateOutputValue = {\n constant: boolean;\n payable: boolean;\n stateMutability: string;\n};\n\nfunction verifyState(value: StateInputValue): StateOutputValue {\n let result: any = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n\n // Set (and check things are consistent) the constant property\n result.constant = (result.stateMutability === \"view\" || result.stateMutability === \"pure\");\n if (value.constant != null) {\n if ((!!value.constant) !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n // Set (and check things are consistent) the payable property\n result.payable = (result.stateMutability === \"payable\");\n if (value.payable != null) {\n if ((!!value.payable) !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n\n // If payable we can assume non-constant; otherwise we can't assume\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n result.constant = !!value.constant;\n\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = (result.payable ? \"payable\": \"nonpayable\");\n }\n\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = (result.constant ? \"view\": \"payable\");\n\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n return result;\n}\n\ninterface _ConstructorFragment extends _Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n}\n\nexport class ConstructorFragment extends Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n if (format === FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n\n let result = \"constructor(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n\n return result.trim();\n }\n\n static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment {\n if (typeof(value) === \"string\") {\n return ConstructorFragment.fromString(value);\n }\n return ConstructorFragment.fromObject(value);\n }\n\n static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment {\n if (ConstructorFragment.isConstructorFragment(value)) { return value; }\n\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n\n let state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n\n const params: TypeCheck<_ConstructorFragment> = {\n name: null,\n type: value.type,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new ConstructorFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): ConstructorFragment {\n let params: any = { type: \"constructor\" };\n\n value = parseGas(value, params);\n\n let parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n\n params.inputs = parseParams(parens[2].trim(), false);\n\n parseModifiers(parens[3].trim(), params);\n\n return ConstructorFragment.fromObject(params);\n }\n\n static isConstructorFragment(value: any): value is ConstructorFragment {\n return (value && value._isFragment && value.type === \"constructor\");\n }\n}\n\ninterface _FunctionFragment extends _ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n}\n\nexport class FunctionFragment extends ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n outputs: this.outputs.map((output) => JSON.parse(output.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"function \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += (this.stateMutability + \" \");\n }\n } else if (this.constant) {\n result += \"view \";\n }\n\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(\n (output) => output.format(format)\n ).join(\", \") + \") \";\n }\n\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: FunctionFragment | JsonFragment | string): FunctionFragment {\n if (typeof(value) === \"string\") {\n return FunctionFragment.fromString(value);\n }\n return FunctionFragment.fromObject(value);\n }\n\n static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment {\n if (FunctionFragment.isFunctionFragment(value)) { return value; }\n\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n\n let state = verifyState(value);\n\n const params: TypeCheck<_FunctionFragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n outputs: (value.outputs ? value.outputs.map(ParamType.fromObject): [ ]),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new FunctionFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): FunctionFragment {\n let params: any = { type: \"function\" };\n value = parseGas(value, params);\n\n let comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n\n let parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n parseModifiers(parens[3].trim(), params);\n\n // We have outputs\n if (comps.length > 1) {\n let returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [ ];\n }\n\n return FunctionFragment.fromObject(params);\n }\n\n static isFunctionFragment(value: any): value is FunctionFragment {\n return (value && value._isFragment && value.type === \"function\");\n }\n}\n\n//export class StructFragment extends Fragment {\n//}\n\nfunction checkForbidden(fragment: ErrorFragment): ErrorFragment {\n const sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(`cannot specify user defined ${ sig } error`, \"fragment\", fragment);\n }\n return fragment;\n}\n\nexport class ErrorFragment extends Fragment {\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"error \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n return result.trim();\n }\n\n static from(value: ErrorFragment | JsonFragment | string): ErrorFragment {\n if (typeof(value) === \"string\") {\n return ErrorFragment.fromString(value);\n }\n return ErrorFragment.fromObject(value);\n }\n\n static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment {\n if (ErrorFragment.isErrorFragment(value)) { return value; }\n\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n\n const params: TypeCheck<_Fragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): [])\n };\n\n return checkForbidden(new ErrorFragment(_constructorGuard, params));\n }\n\n static fromString(value: string): ErrorFragment {\n let params: any = { type: \"error\" };\n\n let parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n return checkForbidden(ErrorFragment.fromObject(params));\n }\n\n static isErrorFragment(value: any): value is ErrorFragment {\n return (value && value._isFragment && value.type === \"error\");\n }\n}\n\nfunction verifyType(type: string): string {\n\n // These need to be transformed to their full description\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n\n // @TODO: more verification\n\n return type;\n}\n\n// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234\nconst regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\nfunction verifyIdentifier(value: string): string {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError(`invalid identifier \"${ value }\"`, \"value\", value);\n }\n return value;\n}\n\nconst regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n\nfunction splitNesting(value: string): Array {\n value = value.trim();\n\n let result = [];\n let accum = \"\";\n let depth = 0;\n for (let offset = 0; offset < value.length; offset++) {\n let c = value[offset];\n if (c === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c;\n if (c === \"(\") {\n depth++;\n } else if (c === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) { result.push(accum); }\n\n return result;\n}\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexConcat, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nexport interface Result extends ReadonlyArray {\n readonly [key: string]: any;\n}\n\nexport function checkResultErrors(result: Result): Array<{ path: Array, error: Error }> {\n // Find the first error (if any)\n const errors: Array<{ path: Array, error: Error }> = [ ];\n\n const checkErrors = function(path: Array, object: any): void {\n if (!Array.isArray(object)) { return; }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n }\n checkErrors([ ], result);\n\n return errors;\n\n}\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport abstract class Coder {\n\n // The coder name:\n // - address, uint256, tuple, array, etc.\n readonly name: string;\n\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n readonly type: string;\n\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n readonly localName: string;\n\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n readonly dynamic: boolean;\n\n constructor(name: string, type: string, localName: string, dynamic: boolean) {\n // @TODO: defineReadOnly these\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n\n _throwError(message: string, value: any): void {\n logger.throwArgumentError(message, this.localName, value);\n }\n\n abstract encode(writer: Writer, value: any): number;\n abstract decode(reader: Reader): any;\n\n abstract defaultValue(): any;\n}\n\nexport class Writer {\n readonly wordSize: number;\n\n _data: Array;\n _dataLength: number;\n _padding: Uint8Array;\n\n constructor(wordSize?: number) {\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n this._data = [ ];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n\n get data(): string {\n return hexConcat(this._data);\n }\n get length(): number { return this._dataLength; }\n\n _writeData(data: Uint8Array): number {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n }\n\n appendWriter(writer: Writer): number {\n return this._writeData(concat(writer._data));\n }\n\n // Arrayish items; padded on the right to wordSize\n writeBytes(value: BytesLike): number {\n let bytes = arrayify(value);\n const paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = concat([ bytes, this._padding.slice(paddingOffset) ])\n }\n return this._writeData(bytes);\n }\n\n _getValue(value: BigNumberish): Uint8Array {\n let bytes = arrayify(BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = concat([ this._padding.slice(bytes.length % this.wordSize), bytes ]);\n }\n return bytes;\n }\n\n // BigNumberish items; padded on the left to wordSize\n writeValue(value: BigNumberish): number {\n return this._writeData(this._getValue(value));\n }\n\n writeUpdatableValue(): (value: BigNumberish) => void {\n const offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return (value: BigNumberish) => {\n this._data[offset] = this._getValue(value);\n };\n }\n}\n\nexport class Reader {\n readonly wordSize: number;\n readonly allowLoose: boolean;\n\n readonly _data: Uint8Array;\n readonly _coerceFunc: CoerceFunc;\n\n _offset: number;\n\n constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean) {\n defineReadOnly(this, \"_data\", arrayify(data));\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n defineReadOnly(this, \"_coerceFunc\", coerceFunc);\n defineReadOnly(this, \"allowLoose\", allowLoose);\n\n this._offset = 0;\n }\n\n get data(): string { return hexlify(this._data); }\n get consumed(): number { return this._offset; }\n\n // The default Coerce function\n static coerce(name: string, value: any): any {\n let match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) { value = value.toNumber(); }\n return value;\n }\n\n coerce(name: string, value: any): any {\n if (this._coerceFunc) { return this._coerceFunc(name, value); }\n return Reader.coerce(name, value);\n }\n\n _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array {\n let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger.throwError(\"data out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength)\n }\n\n subReader(offset: number): Reader {\n return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n }\n\n readBytes(length: number, loose?: boolean): Uint8Array {\n let bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n\n readValue(): BigNumber {\n return BigNumber.from(this.readBytes(this.wordSize));\n }\n}\n","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","\"use strict\";\n\nimport sha3 from \"js-sha3\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function keccak256(data: BytesLike): string {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n","export const version = \"rlp/5.5.0\";\n","\"use strict\";\n\n//See: https://github.com/ethereum/wiki/wiki/RLP\n\nimport { arrayify, BytesLike, hexlify, isBytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction arrayifyInteger(value: number): Array {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\n\nfunction unarrayifyInteger(data: Uint8Array, offset: number, length: number): number {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\n\nfunction _encode(object: Array | string): Array {\n if (Array.isArray(object)) {\n let payload: Array = [];\n object.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length)\n return payload;\n }\n\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n\n return length.concat(payload);\n\n }\n\n if (!isBytesLike(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n\n const data: Array = Array.prototype.slice.call(arrayify(object));\n\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n\n } else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n\n return length.concat(data);\n}\n\nexport function encode(object: any): string {\n return hexlify(_encode(object));\n}\n\ntype Decoded = {\n result: any;\n consumed: number;\n};\n\nfunction _decodeChildren(data: Uint8Array, offset: number, childOffset: number, length: number): Decoded {\n const result = [];\n\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n\n result.push(decoded.result);\n\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n }\n\n return {consumed: (1 + length), result: result};\n}\n\n// returns { consumed: number, result: Object }\nfunction _decode(data: Uint8Array, offset: number): { consumed: number, result: any } {\n if (data.length === 0) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data long segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n\n } else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1, length);\n\n } else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result }\n\n } else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result }\n }\n return { consumed: 1, result: hexlify(data[offset]) };\n}\n\nexport function decode(data: BytesLike): any {\n const bytes = arrayify(data);\n const decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n}\n\n","export const version = \"address/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish, _base16To36, _base36To16 } from \"@ethersproject/bignumber\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { encode } from \"@ethersproject/rlp\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction getChecksumAddress(address: string): string {\n if (!isHexString(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n address = address.toLowerCase();\n\n const chars = address.substring(2).split(\"\");\n\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n\n const hashed = arrayify(keccak256(expanded));\n\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n\n return \"0x\" + chars.join(\"\");\n}\n\n// Shims for environments that are missing some required constants and functions\nconst MAX_SAFE_INTEGER: number = 0x1fffffffffffff;\n\nfunction log10(x: number): number {\n if (Math.log10) { return Math.log10(x); }\n return Math.log(x) / Math.LN10;\n}\n\n\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n\n// Create lookup table\nconst ibanLookup: { [character: string]: string } = { };\nfor (let i = 0; i < 10; i++) { ibanLookup[String(i)] = String(i); }\nfor (let i = 0; i < 26; i++) { ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); }\n\n// How many decimal digits can we process? (for 64-bit float, this is 15)\nconst safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n\nfunction ibanChecksum(address: string): string {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits){\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) { checksum = \"0\" + checksum; }\n\n return checksum;\n};\n\nexport function getAddress(address: string): string {\n let result = null;\n\n if (typeof(address) !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n\n // Missing the 0x prefix\n if (address.substring(0, 2) !== \"0x\") { address = \"0x\" + address; }\n\n result = getChecksumAddress(address);\n\n // It is a checksummed address with a bad checksum\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n\n // Maybe ICAP? (we only support direct mode)\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n\n // It is an ICAP address with a bad checksum\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n\n result = _base36To16(address.substring(4));\n while (result.length < 40) { result = \"0\" + result; }\n result = getChecksumAddress(\"0x\" + result);\n\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n return result;\n}\n\nexport function isAddress(address: string): boolean {\n try {\n getAddress(address);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getIcapAddress(address: string): string {\n let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n while (base36.length < 30) { base36 = \"0\" + base36; }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\nexport function getContractAddress(transaction: { from: string, nonce: BigNumberish }) {\n let from: string = null;\n try {\n from = getAddress(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n\n const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));\n\n return getAddress(hexDataSlice(keccak256(encode([ from, nonce ])), 12));\n}\n\nexport function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string {\n if (hexDataLength(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if (hexDataLength(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress(hexDataSlice(keccak256(concat([ \"0xff\", getAddress(from), salt, initCodeHash ])), 12))\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { hexZeroPad } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class AddressCoder extends Coder {\n\n constructor(localName: string) {\n super(\"address\", \"address\", localName, false);\n }\n\n defaultValue(): string {\n return \"0x0000000000000000000000000000000000000000\";\n }\n\n encode(writer: Writer, value: string): number {\n try {\n value = getAddress(value)\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n }\n\n decode(reader: Reader): any {\n return getAddress(hexZeroPad(reader.readValue().toHexString(), 20));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// Clones the functionality of an existing Coder, but without a localName\nexport class AnonymousCoder extends Coder {\n private coder: Coder;\n\n constructor(coder: Coder) {\n super(coder.name, coder.type, undefined, coder.dynamic);\n this.coder = coder;\n }\n\n defaultValue(): any {\n return this.coder.defaultValue();\n }\n\n encode(writer: Writer, value: any): number {\n return this.coder.encode(writer, value);\n }\n\n decode(reader: Reader): any {\n return this.coder.decode(reader);\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./abstract-coder\";\nimport { AnonymousCoder } from \"./anonymous\";\n\nexport function pack(writer: Writer, coders: ReadonlyArray, values: Array | { [ name: string ]: any }): number {\n let arrayValues: Array = null;\n\n if (Array.isArray(values)) {\n arrayValues = values;\n\n } else if (values && typeof(values) === \"object\") {\n let unique: { [ name: string ]: boolean } = { };\n\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n if (unique[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n unique[name] = true;\n\n return values[name];\n });\n\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n\n let staticWriter = new Writer(writer.wordSize);\n let dynamicWriter = new Writer(writer.wordSize);\n\n let updateFuncs: Array<(baseOffset: number) => void> = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset: number) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n\n } else {\n coder.encode(staticWriter, value);\n }\n });\n\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\n\nexport function unpack(reader: Reader, coders: Array): Result {\n let values: any = [];\n\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n\n coders.forEach((coder) => {\n let value: any = null;\n\n if (coder.dynamic) {\n let offset = reader.readValue();\n let offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n\n if (value != undefined) {\n values.push(value);\n }\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add any named parameters (i.e. tuples)\n coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n const value = values[index];\n\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: () => { throw value; }\n });\n } else {\n values[name] = value;\n }\n });\n\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if (value instanceof Error) {\n Object.defineProperty(values, i, {\n enumerable: true,\n get: () => { throw value; }\n });\n }\n }\n\n return Object.freeze(values);\n}\n\n\nexport class ArrayCoder extends Coder {\n readonly coder: Coder;\n readonly length: number;\n\n constructor(coder: Coder, length: number, localName: string) {\n const type = (coder.type + \"[\" + (length >= 0 ? length: \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n\n this.coder = coder;\n this.length = length;\n }\n\n defaultValue(): Array {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n\n const result: Array = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n\n encode(writer: Writer, value: Array): number {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n\n let count = this.length;\n\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName? (\" \"+ this.localName): \"\"));\n\n let coders = [];\n for (let i = 0; i < value.length; i++) { coders.push(this.coder); }\n\n return pack(writer, coders, value);\n }\n\n decode(reader: Reader): any {\n let count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count: count\n });\n }\n }\n let coders = [];\n for (let i = 0; i < count; i++) { coders.push(new AnonymousCoder(this.coder)); }\n\n return reader.coerce(this.name, unpack(reader, coders));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class BooleanCoder extends Coder {\n\n constructor(localName: string) {\n super(\"bool\", \"bool\", localName, false);\n }\n\n defaultValue(): boolean {\n return false;\n }\n\n encode(writer: Writer, value: boolean): number {\n return writer.writeValue(value ? 1: 0);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.type, !reader.readValue().isZero());\n }\n}\n\n","\"use strict\";\n\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class DynamicBytesCoder extends Coder {\n constructor(type: string, localName: string) {\n super(type, type, localName, true);\n }\n\n defaultValue(): string {\n return \"0x\";\n }\n\n encode(writer: Writer, value: any): number {\n value = arrayify(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n\n decode(reader: Reader): any {\n return reader.readBytes(reader.readValue().toNumber(), true);\n }\n}\n\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName: string) {\n super(\"bytes\", localName);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(super.decode(reader)));\n }\n}\n\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// @TODO: Merge this with bytes\nexport class FixedBytesCoder extends Coder {\n readonly size: number;\n\n constructor(size: number, localName: string) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n this.size = size;\n }\n\n defaultValue(): string {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n\n encode(writer: Writer, value: BytesLike): number {\n let data = arrayify(value);\n if (data.length !== this.size) { this._throwError(\"incorrect data length\", value); }\n return writer.writeBytes(data);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(reader.readBytes(this.size)));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NullCoder extends Coder {\n\n constructor(localName: string) {\n super(\"null\", \"\", localName, false);\n }\n\n defaultValue(): null {\n return null;\n }\n\n encode(writer: Writer, value: any): number {\n if (value != null) { this._throwError(\"not null\", value); }\n return writer.writeBytes([ ]);\n }\n\n decode(reader: Reader): any {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n }\n}\n","export const AddressZero = \"0x0000000000000000000000000000000000000000\";\n\n","import { BigNumber } from \"@ethersproject/bignumber\";\n\nconst NegativeOne: BigNumber = (/*#__PURE__*/BigNumber.from(-1));\nconst Zero: BigNumber = (/*#__PURE__*/BigNumber.from(0));\nconst One: BigNumber = (/*#__PURE__*/BigNumber.from(1));\nconst Two: BigNumber = (/*#__PURE__*/BigNumber.from(2));\nconst WeiPerEther: BigNumber = (/*#__PURE__*/BigNumber.from(\"1000000000000000000\"));\nconst MaxUint256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nconst MinInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\"));\nconst MaxInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256,\n};\n","export const HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n\n","// NFKC (composed) // (decomposed)\nexport const EtherSymbol = \"\\u039e\"; // \"\\uD835\\uDF63\";\n","\"use strict\";\n\nexport { AddressZero } from \"./addresses\";\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256\n} from \"./bignumbers\";\nexport { HashZero } from \"./hashes\";\nexport { EtherSymbol } from \"./strings\";\n\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { MaxUint256, NegativeOne, One, Zero } from \"@ethersproject/constants\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NumberCoder extends Coder {\n readonly size: number;\n readonly signed: boolean;\n\n constructor(size: number, signed: boolean, localName: string) {\n const name = ((signed ? \"int\": \"uint\") + (size * 8));\n super(name, name, localName, false);\n\n this.size = size;\n this.signed = signed;\n }\n\n defaultValue(): number {\n return 0;\n }\n\n encode(writer: Writer, value: BigNumberish): number {\n let v = BigNumber.from(value);\n\n // Check bounds are safe for encoding\n let maxUintValue = MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n let bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n\n v = v.toTwos(this.size * 8).mask(this.size * 8);\n\n if (this.signed) {\n v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n\n return writer.writeValue(v);\n }\n\n decode(reader: Reader): any {\n let value = reader.readValue().mask(this.size * 8);\n\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n\n return reader.coerce(this.name, value);\n }\n}\n\n","export const version = \"strings/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n\nexport enum UnicodeNormalizationForm {\n current = \"\",\n NFC = \"NFC\",\n NFD = \"NFD\",\n NFKC = \"NFKC\",\n NFKD = \"NFKD\"\n};\n\nexport enum Utf8ErrorReason {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n UNEXPECTED_CONTINUE = \"unexpected continuation byte\",\n\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n BAD_PREFIX = \"bad codepoint prefix\",\n\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n OVERRUN = \"string overrun\",\n\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n MISSING_CONTINUE = \"missing continuation byte\",\n\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n OUT_OF_RANGE = \"out of UTF-8 range\",\n\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n UTF16_SURROGATE = \"UTF-16 surrogate\",\n\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n OVERLONG = \"overlong representation\",\n};\n\n\nexport type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number;\n\nfunction errorFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n return logger.throwArgumentError(`invalid codepoint at offset ${ offset }; ${ reason }`, \"bytes\", bytes);\n}\n\nfunction ignoreFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) { break; }\n i++;\n }\n return i;\n }\n\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n\n // Nothing to skip\n return 0;\n}\n\nfunction replaceFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n\n // Put the replacement character into the output\n output.push(0xfffd);\n\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n\n// Common error handing strategies\nexport const Utf8ErrorFuncs: { [ name: string ]: Utf8ErrorFunc } = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes: BytesLike, onError?: Utf8ErrorFunc): Array {\n if (onError == null) { onError = Utf8ErrorFuncs.error; }\n\n bytes = arrayify(bytes);\n\n const result: Array = [];\n let i = 0;\n\n // Invalid bytes are ignored\n while(i < bytes.length) {\n\n const c = bytes[i++];\n\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n\n // 1110 xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n\n } else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n } else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n };\n\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n\n // See above loop for invalid continuation byte\n if (res === null) { continue; }\n\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n result.push(res);\n }\n\n return result;\n}\n\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Uint8Array {\n\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n\n if (c < 0x80) {\n result.push(c);\n\n } else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n\n } else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n\n } else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n\n return arrayify(result);\n};\n\nfunction escapeChar(value: number) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\n\nexport function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\"\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\n\nexport function _toUtf8String(codePoints: Array): string {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode(\n (((codePoint >> 10) & 0x3ff) + 0xd800),\n ((codePoint & 0x3ff) + 0xdc00)\n );\n }).join(\"\");\n}\n\nexport function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n\nexport function toUtf8CodePoints(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Array {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n","\"use strict\";\n\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\n\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\n\n\nexport function formatBytes32String(text: string): string {\n\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n\n // Check we have room for null-termination\n if (bytes.length > 31) { throw new Error(\"bytes32 string must be less than 32 bytes\"); }\n\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([ bytes, HashZero ]).slice(0, 32));\n}\n\nexport function parseBytes32String(bytes: BytesLike): string {\n const data = arrayify(bytes);\n\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) { throw new Error(\"invalid bytes32 - not 32 bytes long\"); }\n if (data[31] !== 0) { throw new Error(\"invalid bytes32 string - no null terminator\"); }\n\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) { length--; }\n\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n\n","\"use strict\";\n\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\n\ntype Ranged = {\n l: number, // Lo value\n h: number, // High value (less the lo)\n d?: number, // Delta/stride (default: 1)\n s?: number, // Shift (default: 1)\n e?: Array // Exceptions to skip\n};\n\ntype Table = { [ src: number ]: Array };\n\nfunction bytes2(data: string): Array {\n if ((data.length % 4) !== 0) { throw new Error(\"bad data\"); }\n let result = [];\n for (let i = 0; i < data.length; i += 4) {\n result.push(parseInt(data.substring(i, i + 4), 16));\n }\n return result;\n}\n\nfunction createTable(data: string, func?: (value: string) => Array): Table {\n if (!func) {\n func = function(value: string) { return [ parseInt(value, 16) ]; }\n }\n\n let lo = 0;\n\n let result: Table = { };\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n\n return result;\n}\n\nfunction createRangeTable(data: string): Array {\n let hi = 0;\n return data.split(\",\").map((v) => {\n let comps = v.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\n\nfunction matchMap(value: number, ranges: Array): Ranged {\n let lo = 0;\n for (let i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) { continue; }\n return range;\n }\n }\n return null;\n}\n\nconst Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n\n// @TODO: Make this relative...\nconst Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v) => parseInt(v, 16));\n\nconst Table_B_2_ranges: Array = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [ 23 ], l: 127 },\n { h: 54, s: 1, e: [ 48 ], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [ 2, 6, 8 ], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [ 18, 24, 66 ], l: 19, d: 2 },\n { h: 26, s: 32, e: [ 17 ], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [ 38 ], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [ 1, 4, 5, 7, 8, 11, 12, 17 ], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [ 2, 7, 8, 17 ], l: 52 },\n { h: 24, s: -120023, e: [ 2, 7, 13, 15, 16, 17 ], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [ 17 ], l: 56 },\n { h: 24, s: -119601, e: [ 17 ], l: 58 },\n { h: 24, s: -119659, e: [ 17 ], l: 58 },\n { h: 24, s: -119717, e: [ 17 ], l: 58 },\n { h: 24, s: -119775, e: [ 17 ], l: 58 }\n];\nconst Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\nconst Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\nconst Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n\nconst Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n\n\nfunction flatten(values: Array>): Array {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, [ ]);\n}\n\nexport function _nameprepTableA1(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\n\nexport function _nameprepTableB2(codepoint: number): Array {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) { return [ codepoint + range.s ]; }\n\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) { return codes; }\n\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) { return [ codepoint + shift[0] ]; }\n\n let complex = Table_B_2_complex[codepoint];\n if (complex) { return complex; }\n\n return null;\n}\n\nexport function _nameprepTableC(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_C_ranges);\n}\n\nexport function nameprep(value: string): string {\n\n // This allows platforms with incomplete normalize to bypass\n // it for very basic names which the built-in toLowerCase\n // will certainly handle correctly\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { return value.toLowerCase(); }\n\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) { return [ ]; }\n if (code >= 0xfe00 && code <= 0xfe0f) { return [ ]; }\n\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) { return codesTableB2; }\n\n // No Substitution\n return [ code ];\n }));\n\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\n\n // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9\n codes.forEach((code) => {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n\n // Prohibit Unassigned Code Points (Table A.1)\n codes.forEach((code) => {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n\n // IDNA extras\n let name = _toUtf8String(codes);\n\n // IDNA: 4.2.3.1\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n\n // IDNA: 4.2.4\n if (name.length > 63) { throw new Error(\"too long\"); }\n\n\n\n return name;\n}\n\n","\"use strict\";\n\nimport { formatBytes32String, parseBytes32String } from \"./bytes32\";\nimport { nameprep } from \"./idna\";\nimport { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from \"./utf8\";\n\nexport {\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n\n Utf8ErrorFunc,\n Utf8ErrorFuncs,\n Utf8ErrorReason,\n\n UnicodeNormalizationForm,\n\n formatBytes32String,\n parseBytes32String,\n\n nameprep\n}\n","\"use strict\";\n\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Reader, Writer } from \"./abstract-coder\";\nimport { DynamicBytesCoder } from \"./bytes\";\n\nexport class StringCoder extends DynamicBytesCoder {\n\n constructor(localName: string) {\n super(\"string\", localName);\n }\n\n defaultValue(): string {\n return \"\";\n }\n\n encode(writer: Writer, value: any): number {\n return super.encode(writer, toUtf8Bytes(value));\n }\n\n decode(reader: Reader): any {\n return toUtf8String(super.decode(reader));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\nimport { pack, unpack } from \"./array\";\n\nexport class TupleCoder extends Coder {\n readonly coders: Array;\n\n constructor(coders: Array, localName: string) {\n let dynamic = false;\n const types: Array = [];\n coders.forEach((coder) => {\n if (coder.dynamic) { dynamic = true; }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n\n super(\"tuple\", type, localName, dynamic);\n this.coders = coders;\n }\n\n defaultValue(): any {\n const values: any = [ ];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add named values\n this.coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n values[name] = values[index];\n });\n\n return Object.freeze(values);\n }\n\n encode(writer: Writer, value: Array | { [ name: string ]: any }): number {\n return pack(writer, this.coders, value);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, unpack(reader, this.coders));\n }\n}\n\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./coders/abstract-coder\";\nimport { AddressCoder } from \"./coders/address\";\nimport { ArrayCoder } from \"./coders/array\";\nimport { BooleanCoder } from \"./coders/boolean\";\nimport { BytesCoder } from \"./coders/bytes\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes\";\nimport { NullCoder } from \"./coders/null\";\nimport { NumberCoder } from \"./coders/number\";\nimport { StringCoder } from \"./coders/string\";\nimport { TupleCoder } from \"./coders/tuple\";\n\nimport { ParamType } from \"./fragments\";\n\n\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport class AbiCoder {\n readonly coerceFunc: CoerceFunc;\n\n constructor(coerceFunc?: CoerceFunc) {\n logger.checkNew(new.target, AbiCoder);\n defineReadOnly(this, \"coerceFunc\", coerceFunc || null);\n }\n\n _getCoder(param: ParamType): Coder {\n\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"array\":\n return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new TupleCoder((param.components || []).map((component) => {\n return this._getCoder(component);\n }), param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n if (size === 0 || size > 256 || (size % 8) !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n if (size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new FixedBytesCoder(size, param.name);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n }\n\n _getWordSize(): number { return 32; }\n\n _getReader(data: Uint8Array, allowLoose?: boolean): Reader {\n return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n }\n\n _getWriter(): Writer {\n return new Writer(this._getWordSize());\n }\n\n getDefaultValue(types: ReadonlyArray): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n\n encode(types: ReadonlyArray, values: ReadonlyArray): string {\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types: types, values: values }\n });\n }\n\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n\n const writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n }\n\n decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(this._getReader(arrayify(data), loose));\n }\n}\n\nexport const defaultAbiCoder: AbiCoder = new AbiCoder();\n\n","import { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport function id(text: string): string {\n return keccak256(toUtf8Bytes(text));\n}\n","export const version = \"hash/5.5.0\";\n","import { concat, hexlify } from \"@ethersproject/bytes\";\nimport { nameprep, toUtf8Bytes } from \"@ethersproject/strings\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\n\nconst Partition = new RegExp(\"^((.*)\\\\.)?([^.]+)$\");\n\nexport function isValidName(name: string): boolean {\n try {\n const comps = name.split(\".\");\n for (let i = 0; i < comps.length; i++) {\n if (nameprep(comps[i]).length === 0) {\n throw new Error(\"empty\")\n }\n }\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function namehash(name: string): string {\n /* istanbul ignore if */\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n\n let current = name;\n let result: string | Uint8Array = Zeros;\n while (current.length) {\n const partition = current.match(Partition);\n if (partition == null || partition[2] === \"\") {\n logger.throwArgumentError(\"invalid ENS address; missing component\", \"name\", name);\n }\n const label = toUtf8Bytes(nameprep(partition[3]));\n result = keccak256(concat([result, keccak256(label)]));\n\n current = partition[2] || \"\";\n }\n\n return hexlify(result);\n}\n\n","import { Bytes, concat } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport const messagePrefix = \"\\x19Ethereum Signed Message:\\n\";\n\nexport function hashMessage(message: Bytes | string): string {\n if (typeof(message) === \"string\") { message = toUtf8Bytes(message); }\n return keccak256(concat([\n toUtf8Bytes(messagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n\n","import { TypedDataDomain, TypedDataField } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, hexConcat, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { id } from \"./id\";\n\nconst padding = new Uint8Array(32);\npadding.fill(0);\n\nconst NegativeOne: BigNumber = BigNumber.from(-1);\nconst Zero: BigNumber = BigNumber.from(0);\nconst One: BigNumber = BigNumber.from(1);\nconst MaxUint256: BigNumber = BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n\nfunction hexPadRight(value: BytesLike) {\n const bytes = arrayify(value);\n const padOffset = bytes.length % 32\n if (padOffset) {\n return hexConcat([ bytes, padding.slice(padOffset) ]);\n }\n return hexlify(bytes);\n}\n\nconst hexTrue = hexZeroPad(One.toHexString(), 32);\nconst hexFalse = hexZeroPad(Zero.toHexString(), 32);\n\nconst domainFieldTypes: Record = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\n\nconst domainFieldNames: Array = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\n\nfunction checkString(key: string): (value: any) => string {\n return function (value: any){\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid domain value for ${ JSON.stringify(key) }`, `domain.${ key }`, value);\n }\n return value;\n }\n}\n\nconst domainChecks: Record any> = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value: any) {\n try {\n return BigNumber.from(value).toString()\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value for \"chainId\"`, \"domain.chainId\", value);\n },\n verifyingContract: function(value: any) {\n try {\n return getAddress(value).toLowerCase();\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value: any) {\n try {\n const bytes = arrayify(value);\n if (bytes.length !== 32) { throw new Error(\"bad length\"); }\n return hexlify(bytes);\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"salt\"`, \"domain.salt\", value);\n }\n}\n\nfunction getBaseEncoder(type: string): (value: any) => string {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n const signed = (match[1] === \"\");\n\n const width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n\n const boundsUpper = MaxUint256.mask(signed ? (width - 1): width);\n const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne): Zero;\n\n return function(value: BigNumberish) {\n const v = BigNumber.from(value);\n\n if (v.lt(boundsLower) || v.gt(boundsUpper)) {\n logger.throwArgumentError(`value out-of-bounds for ${ type }`, \"value\", value);\n }\n\n return hexZeroPad(v.toTwos(256).toHexString(), 32);\n };\n }\n }\n\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n if (width === 0 || width > 32 || match[1] !== String(width)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n\n return function(value: BytesLike) {\n const bytes = arrayify(value);\n if (bytes.length !== width) {\n logger.throwArgumentError(`invalid length for ${ type }`, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n\n switch (type) {\n case \"address\": return function(value: string) {\n return hexZeroPad(getAddress(value), 32);\n };\n case \"bool\": return function(value: boolean) {\n return ((!value) ? hexFalse: hexTrue);\n };\n case \"bytes\": return function(value: BytesLike) {\n return keccak256(value);\n };\n case \"string\": return function(value: string) {\n return id(value);\n };\n }\n\n return null;\n}\n\nfunction encodeType(name: string, fields: Array): string {\n return `${ name }(${ fields.map(({ name, type }) => (type + \" \" + name)).join(\",\") })`;\n}\n\nexport class TypedDataEncoder {\n readonly primaryType: string;\n readonly types: Record>;\n\n readonly _encoderCache: Record string>;\n readonly _types: Record;\n\n constructor(types: Record>) {\n defineReadOnly(this, \"types\", Object.freeze(deepCopy(types)));\n\n defineReadOnly(this, \"_encoderCache\", { });\n defineReadOnly(this, \"_types\", { });\n\n // Link struct types to their direct child structs\n const links: Record> = { };\n\n // Link structs to structs which contain them as a child\n const parents: Record> = { };\n\n // Link all subtypes within a given struct\n const subtypes: Record> = { };\n\n Object.keys(types).forEach((type) => {\n links[type] = { };\n parents[type] = [ ];\n subtypes[type] = { }\n });\n\n for (const name in types) {\n\n const uniqueNames: Record = { };\n\n types[name].forEach((field) => {\n\n // Check each field has a unique name\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(`duplicate variable name ${ JSON.stringify(field.name) } in ${ JSON.stringify(name) }`, \"types\", types);\n }\n uniqueNames[field.name] = true;\n\n // Get the base type (drop any array specifiers)\n const baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) { return ;}\n\n if (!parents[baseType]) {\n logger.throwArgumentError(`unknown type ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Add linkage\n parents[baseType].push(name);\n links[name][baseType] = true;\n });\n }\n\n // Deduce the primary type\n const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0));\n\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(`ambiguous primary types or unused types: ${ primaryTypes.map((t) => (JSON.stringify(t))).join(\", \") }`, \"types\", types);\n }\n\n defineReadOnly(this, \"primaryType\", primaryTypes[0]);\n\n // Check for circular type references\n function checkCircular(type: string, found: Record) {\n if (found[type]) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(type) }`, \"types\", types);\n }\n\n found[type] = true;\n\n Object.keys(links[type]).forEach((child) => {\n if (!parents[child]) { return; }\n\n // Recursively check children\n checkCircular(child, found);\n\n // Mark all ancestors as having this decendant\n Object.keys(found).forEach((subtype) => {\n subtypes[subtype][child] = true;\n });\n });\n\n delete found[type];\n }\n checkCircular(this.primaryType, { });\n\n // Compute each fully describe type\n for (const name in subtypes) {\n const st = Object.keys(subtypes[name]);\n st.sort();\n this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\");\n }\n }\n\n getEncoder(type: string): (value: any) => string {\n let encoder = this._encoderCache[type];\n if (!encoder) {\n encoder = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder;\n }\n\n _getEncoder(type: string): (value: any) => string {\n\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return encoder; }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const subEncoder = this.getEncoder(subtype);\n const length = parseInt(match[3]);\n return (value: Array) => {\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n\n let result = value.map(subEncoder);\n if (this._types[subtype]) {\n result = result.map(keccak256);\n }\n\n return keccak256(hexConcat(result));\n };\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this._types[type]);\n return (value: Record) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this._types[type]) { return keccak256(result); }\n return result;\n });\n values.unshift(encodedType);\n return hexConcat(values);\n }\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n encodeType(name: string): string {\n const result = this._types[name];\n if (!result) {\n logger.throwArgumentError(`unknown type: ${ JSON.stringify(name) }`, \"name\", name);\n }\n return result;\n }\n\n encodeData(type: string, value: any): string {\n return this.getEncoder(type)(value);\n }\n\n hashStruct(name: string, value: Record): string {\n return keccak256(this.encodeData(name, value));\n }\n\n encode(value: Record): string {\n return this.encodeData(this.primaryType, value);\n }\n\n hash(value: Record): string {\n return this.hashStruct(this.primaryType, value);\n }\n\n _visit(type: string, value: any, callback: (type: string, data: any) => any): any {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return callback(type, value); }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const length = parseInt(match[3]);\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map((v: any) => this._visit(subtype, v, callback));\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, >{});\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n visit(value: Record, callback: (type: string, data: any) => any): any {\n return this._visit(this.primaryType, value, callback);\n }\n\n static from(types: Record>): TypedDataEncoder {\n return new TypedDataEncoder(types);\n }\n\n static getPrimaryType(types: Record>): string {\n return TypedDataEncoder.from(types).primaryType;\n }\n\n static hashStruct(name: string, types: Record>, value: Record): string {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n\n static hashDomain(domain: TypedDataDomain): string {\n const domainFields: Array = [ ];\n for (const name in domain) {\n const type = domainFieldTypes[name];\n if (!type) {\n logger.throwArgumentError(`invalid typed-data domain key: ${ JSON.stringify(name) }`, \"domain\", domain);\n }\n domainFields.push({ name, type });\n }\n\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n\n static encode(domain: TypedDataDomain, types: Record>, value: Record): string {\n return hexConcat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n\n static hash(domain: TypedDataDomain, types: Record>, value: Record): string {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n\n // Replaces all address types with ENS names with their looked up address\n static async resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ domain: TypedDataDomain, value: any }> {\n // Make a copy to isolate it from the object passed in\n domain = shallowCopy(domain);\n\n // Look up all ENS names\n const ensCache: Record = { };\n\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n\n // Get a list of all the addresses\n encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n\n // Replace all ENS names with their address\n value = encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && ensCache[value]) { return ensCache[value]; }\n return value;\n });\n\n return { domain, value };\n }\n\n static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n\n // Derive the EIP712Domain Struct reference type\n const domainValues: Record = { };\n const domainTypes: Array<{ name: string, type:string }> = [ ];\n\n domainFieldNames.forEach((name) => {\n const value = (domain)[name];\n if (value == null) { return; }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n\n const encoder = TypedDataEncoder.from(types);\n\n const typesWithDomain = shallowCopy(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n\n // Validate the data structures and types\n encoder.encode(value);\n\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type: string, value: any) => {\n\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(arrayify(value));\n }\n\n // uint or int\n if (type.match(/^u?int/)) {\n return BigNumber.from(value).toString();\n }\n\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid string`, \"value\", value);\n }\n return value;\n }\n\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n }\n}\n\n","\"use strict\";\n\nimport { id } from \"./id\";\nimport { isValidName, namehash } from \"./namehash\";\nimport { hashMessage, messagePrefix } from \"./message\";\n\nimport { TypedDataEncoder as _TypedDataEncoder } from \"./typed-data\";\n\nexport {\n id,\n\n namehash,\n isValidName,\n\n messagePrefix,\n hashMessage,\n\n _TypedDataEncoder,\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { id } from \"@ethersproject/hash\";\nimport { keccak256 } from \"@ethersproject/keccak256\"\nimport { defineReadOnly, Description, getStatic } from \"@ethersproject/properties\";\n\nimport { AbiCoder, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Result } from \"./coders/abstract-coder\";\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, ParamType } from \"./fragments\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport { checkResultErrors, Result };\n\nexport class LogDescription extends Description {\n readonly eventFragment: EventFragment;\n readonly name: string;\n readonly signature: string;\n readonly topic: string;\n readonly args: Result\n}\n\nexport class TransactionDescription extends Description {\n readonly functionFragment: FunctionFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n readonly value: BigNumber;\n}\n\nexport class ErrorDescription extends Description {\n readonly errorFragment: ErrorFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n}\n\nexport class Indexed extends Description {\n readonly hash: string;\n readonly _isIndexed: boolean;\n\n static isIndexed(value: any): value is Indexed {\n return !!(value && value._isIndexed);\n }\n}\n\nconst BuiltinErrors: Record, name: string, reason?: boolean }> = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [ \"string\" ], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [ \"uint256\" ] }\n}\n\nfunction wrapAccessError(property: string, error: Error): Error {\n const wrap = new Error(`deferred error during ABI decoding triggered accessing ${ property }`);\n (wrap).error = error;\n return wrap;\n}\n\n/*\nfunction checkNames(fragment: Fragment, type: \"input\" | \"output\", params: Array): void {\n params.reduce((accum, param) => {\n if (param.name) {\n if (accum[param.name]) {\n logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format(\"full\") }`, \"fragment\", fragment);\n }\n accum[param.name] = true;\n }\n return accum;\n }, <{ [ name: string ]: boolean }>{ });\n}\n*/\nexport class Interface {\n readonly fragments: ReadonlyArray;\n\n readonly errors: { [ name: string ]: ErrorFragment };\n readonly events: { [ name: string ]: EventFragment };\n readonly functions: { [ name: string ]: FunctionFragment };\n readonly structs: { [ name: string ]: any };\n\n readonly deploy: ConstructorFragment;\n\n readonly _abiCoder: AbiCoder;\n\n readonly _isInterface: boolean;\n\n constructor(fragments: string | ReadonlyArray) {\n logger.checkNew(new.target, Interface);\n\n let abi: ReadonlyArray = [ ];\n if (typeof(fragments) === \"string\") {\n abi = JSON.parse(fragments);\n } else {\n abi = fragments;\n }\n\n defineReadOnly(this, \"fragments\", abi.map((fragment) => {\n return Fragment.from(fragment);\n }).filter((fragment) => (fragment != null)));\n\n defineReadOnly(this, \"_abiCoder\", getStatic<() => AbiCoder>(new.target, \"getAbiCoder\")());\n\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"errors\", { });\n defineReadOnly(this, \"events\", { });\n defineReadOnly(this, \"structs\", { });\n\n // Add all fragments by their signature\n this.fragments.forEach((fragment) => {\n let bucket: { [ name: string ]: Fragment } = null;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineReadOnly(this, \"deploy\", fragment);\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.events;\n break;\n case \"error\":\n bucket = this.errors;\n break;\n default:\n return;\n }\n\n let signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n\n bucket[signature] = fragment;\n });\n\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineReadOnly(this, \"deploy\", ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n\n defineReadOnly(this, \"_isInterface\", true);\n }\n\n format(format?: string): string | Array {\n if (!format) { format = FormatTypes.full; }\n if (format === FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n\n const abi = this.fragments.map((fragment) => fragment.format(format));\n\n // We need to re-bundle the JSON fragments a bit\n if (format === FormatTypes.json) {\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n\n return abi;\n }\n\n // Sub-classes can override these to handle other blockchains\n static getAbiCoder(): AbiCoder {\n return defaultAbiCoder;\n }\n\n static getAddress(address: string): string {\n return getAddress(address);\n }\n\n static getSighash(fragment: ErrorFragment | FunctionFragment): string {\n return hexDataSlice(id(fragment.format()), 0, 4);\n }\n\n static getEventTopic(eventFragment: EventFragment): string {\n return id(eventFragment.format());\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getFunction(nameOrSignatureOrSighash: string): FunctionFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n for (const name in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name)) {\n return this.functions[name];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.functions).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name);\n }\n\n return this.functions[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Find an event definition by any means necessary (unless it is ambiguous)\n getEvent(nameOrSignatureOrTopic: string): EventFragment {\n if (isHexString(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n\n return this.events[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getError(nameOrSignatureOrSighash: string): ErrorFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n const getSighash = getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\");\n for (const name in this.errors) {\n const error = this.errors[name];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.errors).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name);\n }\n\n return this.errors[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Get the sighash (the bytes4 selector) used by Solidity to identify a function\n getSighash(fragment: ErrorFragment | FunctionFragment | string): string {\n if (typeof(fragment) === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_) {\n throw error;\n }\n }\n }\n\n return getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\")(fragment);\n }\n\n // Get the topic (the bytes32 hash) used by Solidity to identify an event\n getEventTopic(eventFragment: EventFragment | string): string {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n return getStatic<(e: EventFragment) => string>(this.constructor, \"getEventTopic\")(eventFragment);\n }\n\n\n _decodeParams(params: ReadonlyArray, data: BytesLike): Result {\n return this._abiCoder.decode(params, data)\n }\n\n _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string {\n return this._abiCoder.encode(params, values)\n }\n\n encodeDeploy(values?: ReadonlyArray): string {\n return this._encodeParams(this.deploy.inputs, values || [ ]);\n }\n\n decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(`data signature does not match error ${ fragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n }\n\n encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n return hexlify(concat([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the data for a function call (e.g. tx.data)\n decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(`data signature does not match function ${ functionFragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n }\n\n // Encode the data for a function call (e.g. tx.data)\n encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(concat([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the result from a function call (e.g. from eth_call)\n decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n let bytes = arrayify(data);\n\n let reason: string = null;\n let errorArgs: Result = null;\n let errorName: string = null;\n let errorSignature: string = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error) { }\n break;\n\n case 4: {\n const selector = hexlify(bytes.slice(0, 4));\n const builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) { reason = errorArgs[0]; }\n } else {\n try {\n const error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error) {\n console.log(error);\n }\n }\n break;\n }\n }\n\n return logger.throwError(\"call revert exception\", Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n errorArgs, errorName, errorSignature, reason\n });\n }\n\n // Encode the result for a function call (e.g. for eth_call)\n encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [ ]));\n }\n\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array> {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n })\n }\n\n let topics: Array> = [];\n if (!eventFragment.anonymous) { topics.push(this.getEventTopic(eventFragment)); }\n\n const encodeTopic = (param: ParamType, value: any): string => {\n if (param.type === \"string\") {\n return id(value);\n } else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n\n // Check addresses are valid\n if (param.type === \"address\") { this._abiCoder.encode( [ \"address\" ], [ value ]); }\n return hexZeroPad(hexlify(value), 32);\n };\n\n values.forEach((value, index) => {\n\n let param = eventFragment.inputs[index];\n\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n }\n return;\n }\n\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n\n return topics;\n }\n\n encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { data: string, topics: Array } {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n const topics: Array = [ ];\n\n const dataTypes: Array = [ ];\n const dataValues: Array = [ ];\n\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n\n eventFragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value))\n } else if (param.type === \"bytes\") {\n topics.push(keccak256(value))\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n } else {\n topics.push(this._abiCoder.encode([ param.type] , [ value ]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n\n return {\n data: this._abiCoder.encode(dataTypes , dataValues),\n topics: topics\n };\n }\n\n // Decode a filter for the event and the search criteria\n decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n\n let indexed: Array = [];\n let nonIndexed: Array = [];\n let dynamic: Array = [];\n\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)): null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n\n let result: (Array & { [ key: string ]: any }) = [ ];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n\n } else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n\n } else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n } else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: () => { throw wrapAccessError(`property ${ JSON.stringify(param.name) }`, value); }\n });\n } else {\n result[param.name] = value;\n }\n }\n });\n\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n enumerable: true,\n get: () => { throw wrapAccessError(`index ${ i }`, value); }\n });\n }\n }\n\n return Object.freeze(result);\n }\n\n // Given a transaction, find the matching function fragment (if any) and\n // determine all its properties and call parameters\n parseTransaction(tx: { data: string, value?: BigNumberish }): TransactionDescription {\n let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: BigNumber.from(tx.value || \"0\"),\n });\n }\n\n // @TODO\n //parseCallResult(data: BytesLike): ??\n\n // Given an event log, find the matching event fragment (if any) and\n // determine all its properties and values\n parseLog(log: { topics: Array, data: string}): LogDescription {\n let fragment = this.getEvent(log.topics[0]);\n\n if (!fragment || fragment.anonymous) { return null; }\n\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n\n\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }\n\n parseError(data: BytesLike): ErrorDescription {\n const hexData = hexlify(data);\n let fragment = this.getError(hexData.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n });\n }\n\n\n /*\n static from(value: Array | string | Interface) {\n if (Interface.isInterface(value)) {\n return value;\n }\n if (typeof(value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n return new Interface(value);\n }\n */\n\n static isInterface(value: any): value is Interface {\n return !!(value && value._isInterface);\n }\n}\n\n","\"use strict\";\n\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from \"./fragments\";\nimport { AbiCoder, CoerceFunc, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from \"./interface\";\n\nexport {\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n Fragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n AbiCoder,\n defaultAbiCoder,\n\n Interface,\n Indexed,\n\n /////////////////////////\n // Types\n\n CoerceFunc,\n JsonFragment,\n JsonFragmentType,\n\n Result,\n checkResultErrors,\n\n LogDescription,\n TransactionDescription\n};\n","export const version = \"abstract-provider/5.5.1\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { BytesLike, isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { Deferrable, Description, defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { AccessListish, Transaction } from \"@ethersproject/transactions\";\nimport { OnceBlockable } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\n\nexport type TransactionRequest = {\n to?: string,\n from?: string,\n nonce?: BigNumberish,\n\n gasLimit?: BigNumberish,\n gasPrice?: BigNumberish,\n\n data?: BytesLike,\n value?: BigNumberish,\n chainId?: number\n\n type?: number;\n accessList?: AccessListish;\n\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n\n customData?: Record;\n}\n\nexport interface TransactionResponse extends Transaction {\n hash: string;\n\n // Only if a transaction has been mined\n blockNumber?: number,\n blockHash?: string,\n timestamp?: number,\n\n confirmations: number,\n\n // Not optional (as it is in Transaction)\n from: string;\n\n // The raw transaction\n raw?: string,\n\n // This function waits until the transaction has been mined\n wait: (confirmations?: number) => Promise\n};\n\nexport type BlockTag = string | number;\n\nexport interface _Block {\n hash: string;\n parentHash: string;\n number: number;\n\n timestamp: number;\n nonce: string;\n difficulty: number;\n _difficulty: BigNumber;\n\n gasLimit: BigNumber;\n gasUsed: BigNumber;\n\n miner: string;\n extraData: string;\n\n baseFeePerGas?: null | BigNumber;\n}\n\nexport interface Block extends _Block {\n transactions: Array;\n}\n\nexport interface BlockWithTransactions extends _Block {\n transactions: Array;\n}\n\n\nexport interface Log {\n blockNumber: number;\n blockHash: string;\n transactionIndex: number;\n\n removed: boolean;\n\n address: string;\n data: string;\n\n topics: Array;\n\n transactionHash: string;\n logIndex: number;\n}\n\nexport interface TransactionReceipt {\n to: string;\n from: string;\n contractAddress: string,\n transactionIndex: number,\n root?: string,\n gasUsed: BigNumber,\n logsBloom: string,\n blockHash: string,\n transactionHash: string,\n logs: Array,\n blockNumber: number,\n confirmations: number,\n cumulativeGasUsed: BigNumber,\n effectiveGasPrice: BigNumber,\n byzantium: boolean,\n type: number;\n status?: number\n};\n\nexport interface FeeData {\n maxFeePerGas: null | BigNumber;\n maxPriorityFeePerGas: null | BigNumber;\n gasPrice: null | BigNumber;\n}\n\nexport interface EventFilter {\n address?: string;\n topics?: Array | null>;\n}\n\nexport interface Filter extends EventFilter {\n fromBlock?: BlockTag,\n toBlock?: BlockTag,\n}\n\nexport interface FilterByBlockHash extends EventFilter {\n blockHash?: string;\n}\n\n//export type CallTransactionable = {\n// call(transaction: TransactionRequest): Promise;\n//};\n\nexport abstract class ForkEvent extends Description {\n readonly expiry: number;\n\n readonly _isForkEvent?: boolean;\n\n static isForkEvent(value: any): value is ForkEvent {\n return !!(value && value._isForkEvent);\n }\n}\n\nexport class BlockForkEvent extends ForkEvent {\n readonly blockHash: string;\n\n readonly _isBlockForkEvent?: boolean;\n\n constructor(blockHash: string, expiry?: number) {\n if (!isHexString(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n\n super({\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: (expiry || 0),\n blockHash: blockHash\n });\n }\n}\n\nexport class TransactionForkEvent extends ForkEvent {\n readonly hash: string;\n\n readonly _isTransactionOrderForkEvent?: boolean;\n\n constructor(hash: string, expiry?: number) {\n if (!isHexString(hash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: (expiry || 0),\n hash: hash\n });\n }\n}\n\nexport class TransactionOrderForkEvent extends ForkEvent {\n readonly beforeHash: string;\n readonly afterHash: string;\n\n constructor(beforeHash: string, afterHash: string, expiry?: number) {\n if (!isHexString(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!isHexString(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: (expiry || 0),\n beforeHash: beforeHash,\n afterHash: afterHash\n });\n }\n}\n\nexport type EventType = string | Array> | EventFilter | ForkEvent;\n\nexport type Listener = (...args: Array) => void;\n\n///////////////////////////////\n// Exported Abstracts\nexport abstract class Provider implements OnceBlockable {\n\n // Network\n abstract getNetwork(): Promise;\n\n // Latest State\n abstract getBlockNumber(): Promise;\n abstract getGasPrice(): Promise;\n async getFeeData(): Promise {\n const { block, gasPrice } = await resolveProperties({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch((error) => {\n // @TODO: Why is this now failing on Calaveras?\n //console.log(error);\n return null;\n })\n });\n\n let maxFeePerGas = null, maxPriorityFeePerGas = null;\n\n if (block && block.baseFeePerGas) {\n // We may want to compute this more accurately in the future,\n // using the formula \"check if the base fee is correct\".\n // See: https://eips.ethereum.org/EIPS/eip-1559\n maxPriorityFeePerGas = BigNumber.from(\"2500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n\n return { maxFeePerGas, maxPriorityFeePerGas, gasPrice };\n }\n\n // Account\n abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise ;\n abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise;\n\n // Execution\n abstract sendTransaction(signedTransaction: string | Promise): Promise;\n abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise;\n abstract estimateGas(transaction: Deferrable): Promise;\n\n // Queries\n abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getTransaction(transactionHash: string): Promise;\n abstract getTransactionReceipt(transactionHash: string): Promise;\n\n // Bloom-filter Queries\n abstract getLogs(filter: Filter): Promise>;\n\n // ENS\n abstract resolveName(name: string | Promise): Promise;\n abstract lookupAddress(address: string | Promise): Promise;\n\n // Event Emitter (ish)\n abstract on(eventName: EventType, listener: Listener): Provider;\n abstract once(eventName: EventType, listener: Listener): Provider;\n abstract emit(eventName: EventType, ...args: Array): boolean\n abstract listenerCount(eventName?: EventType): number;\n abstract listeners(eventName?: EventType): Array;\n abstract off(eventName: EventType, listener?: Listener): Provider;\n abstract removeAllListeners(eventName?: EventType): Provider;\n\n // Alias for \"on\"\n addListener(eventName: EventType, listener: Listener): Provider {\n return this.on(eventName, listener);\n }\n\n // Alias for \"off\"\n removeListener(eventName: EventType, listener: Listener): Provider {\n return this.off(eventName, listener);\n }\n\n // @TODO: This *could* be implemented here, but would pull in events...\n abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise;\n\n readonly _isProvider: boolean;\n\n constructor() {\n logger.checkAbstract(new.target, Provider);\n defineReadOnly(this, \"_isProvider\", true);\n }\n\n static isProvider(value: any): value is Provider {\n return !!(value && value._isProvider);\n }\n\n/*\n static getResolver(network: Network, callable: CallTransactionable, namehash: string): string {\n // No ENS...\n if (!network.ensAddress) {\n errors.throwError(\n \"network does support ENS\",\n errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // Not a namehash\n if (!isHexString(namehash, 32)) {\n errors.throwArgumentError(\"invalid name hash\", \"namehash\", namehash);\n }\n\n // keccak256(\"resolver(bytes32)\")\n let data = \"0x0178b8bf\" + namehash.substring(2);\n let transaction = { to: network.ensAddress, data: data };\n\n return provider.call(transaction).then((data) => {\n return provider.formatter.callAddress(data);\n });\n }\n\n static resolveNamehash(network: Network, callable: CallTransactionable, namehash: string): string {\n return this.getResolver(network, callable, namehash).then((resolverAddress) => {\n if (!resolverAddress) { return null; }\n\n // keccak256(\"addr(bytes32)\")\n let data = \"0x3b3b57de\" + namehash(name).substring(2);\n let transaction = { to: resolverAddress, data: data };\n return callable.call(transaction).then((data) => {\n return this.formatter.callAddress(data);\n });\n\n })\n }\n*/\n}\n","export const version = \"abstract-signer/5.5.0\";\n","\"use strict\";\n\nimport { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst allowedTransactionKeys: Array = [\n \"accessList\", \"chainId\", \"customData\", \"data\", \"from\", \"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"to\", \"type\", \"value\"\n];\n\nconst forwardErrors = [\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n];\n\n// EIP-712 Typed Data\n// See: https://eips.ethereum.org/EIPS/eip-712\n\nexport interface TypedDataDomain {\n name?: string;\n version?: string;\n chainId?: BigNumberish;\n verifyingContract?: string;\n salt?: BytesLike;\n};\n\nexport interface TypedDataField {\n name: string;\n type: string;\n};\n\n// Sub-classes of Signer may optionally extend this interface to indicate\n// they have a private key available synchronously\nexport interface ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n}\n\n// Sub-Class Notes:\n// - A Signer MUST always make sure, that if present, the \"from\" field\n// matches the Signer, before sending or signing a transaction\n// - A Signer SHOULD always wrap private information (such as a private\n// key or mnemonic) in a function, so that console.log does not leak\n// the data\n\n// @TODO: This is a temporary measure to preserve backwards compatibility\n// In v6, the method on TypedDataSigner will be added to Signer\nexport interface TypedDataSigner {\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise;\n}\n\nexport abstract class Signer {\n readonly provider?: Provider;\n\n ///////////////////\n // Sub-classes MUST implement these\n\n // Returns the checksum address\n abstract getAddress(): Promise\n\n // Returns the signed prefixed-message. This MUST treat:\n // - Bytes as a binary message\n // - string as a UTF8-message\n // i.e. \"0x1234\" is a SIX (6) byte string, NOT 2 bytes of data\n abstract signMessage(message: Bytes | string): Promise;\n\n // Signs a transaction and returns the fully serialized, signed transaction.\n // The EXACT transaction MUST be signed, and NO additional properties to be added.\n // - This MAY throw if signing transactions is not supports, but if\n // it does, sentTransaction MUST be overridden.\n abstract signTransaction(transaction: Deferrable): Promise;\n\n // Returns a new instance of the Signer, connected to provider.\n // This MAY throw if changing providers is not supported.\n abstract connect(provider: Provider): Signer;\n\n readonly _isSigner: boolean;\n\n\n ///////////////////\n // Sub-classes MUST call super\n constructor() {\n logger.checkAbstract(new.target, Signer);\n defineReadOnly(this, \"_isSigner\", true);\n }\n\n\n ///////////////////\n // Sub-classes MAY override these\n\n async getBalance(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getBalance\");\n return await this.provider.getBalance(this.getAddress(), blockTag);\n }\n\n async getTransactionCount(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getTransactionCount\");\n return await this.provider.getTransactionCount(this.getAddress(), blockTag);\n }\n\n // Populates \"from\" if unspecified, and estimates the gas for the transaction\n async estimateGas(transaction: Deferrable): Promise {\n this._checkProvider(\"estimateGas\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.estimateGas(tx);\n }\n\n // Populates \"from\" if unspecified, and calls with the transaction\n async call(transaction: Deferrable, blockTag?: BlockTag): Promise {\n this._checkProvider(\"call\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.call(tx, blockTag);\n }\n\n // Populates all fields in a transaction, signs it and sends it to the network\n async sendTransaction(transaction: Deferrable): Promise {\n this._checkProvider(\"sendTransaction\");\n const tx = await this.populateTransaction(transaction);\n const signedTx = await this.signTransaction(tx);\n return await this.provider.sendTransaction(signedTx);\n }\n\n async getChainId(): Promise {\n this._checkProvider(\"getChainId\");\n const network = await this.provider.getNetwork();\n return network.chainId;\n }\n\n async getGasPrice(): Promise {\n this._checkProvider(\"getGasPrice\");\n return await this.provider.getGasPrice();\n }\n\n async getFeeData(): Promise {\n this._checkProvider(\"getFeeData\");\n return await this.provider.getFeeData();\n }\n\n\n async resolveName(name: string): Promise {\n this._checkProvider(\"resolveName\");\n return await this.provider.resolveName(name);\n }\n\n\n\n // Checks a transaction does not contain invalid keys and if\n // no \"from\" is provided, populates it.\n // - does NOT require a provider\n // - adds \"from\" is not present\n // - returns a COPY (safe to mutate the result)\n // By default called from: (overriding these prevents it)\n // - call\n // - estimateGas\n // - populateTransaction (and therefor sendTransaction)\n checkTransaction(transaction: Deferrable): Deferrable {\n for (const key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n\n const tx = shallowCopy(transaction);\n\n if (tx.from == null) {\n tx.from = this.getAddress();\n\n } else {\n // Make sure any provided address matches this signer\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then((result) => {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n\n return tx;\n }\n\n // Populates ALL keys for a transaction and checks that \"from\" matches\n // this Signer. Should be used by sendTransaction but NOT by signTransaction.\n // By default called from: (overriding these prevents it)\n // - sendTransaction\n //\n // Notes:\n // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas\n async populateTransaction(transaction: Deferrable): Promise {\n\n const tx: Deferrable = await resolveProperties(this.checkTransaction(transaction))\n\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n\n // Prevent this error from causing an UnhandledPromiseException\n tx.to.catch((error) => { });\n }\n\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null);\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n\n if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n tx.type = 2;\n\n } else if (tx.type === 0 || tx.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n\n // Populate missing gasPrice\n if (tx.gasPrice == null) { tx.gasPrice = this.getGasPrice(); }\n\n } else {\n\n // We need to get fee data to determine things\n const feeData = await this.getFeeData();\n\n if (tx.type == null) {\n // We need to auto-detect the intended type of this transaction...\n\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n\n // Upgrade transaction from null to eip-1559\n tx.type = 2;\n\n if (tx.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n\n } else {\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n\n } else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n\n // ...but they are trying to use EIP-1559 properties\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n\n // Populate missing fee data\n if (tx.gasPrice == null) { tx.gasPrice = feeData.gasPrice; }\n\n // Explicitly set untyped transaction to legacy\n tx.type = 0;\n\n } else {\n // getFeeData has failed us.\n logger.throwError(\"failed to get consistent fee data\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n\n } else if (tx.type === 2) {\n // Explicitly using EIP-1559\n\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n }\n\n if (tx.nonce == null) { tx.nonce = this.getTransactionCount(\"pending\"); }\n\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch((error) => {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error: error,\n tx: tx\n });\n });\n }\n\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then((results) => {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n\n return await resolveProperties(tx);\n }\n\n\n ///////////////////\n // Sub-classes SHOULD leave these alone\n\n _checkProvider(operation?: string): void {\n if (!this.provider) { logger.throwError(\"missing provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: (operation || \"_checkProvider\") });\n }\n }\n\n static isSigner(value: any): value is Signer {\n return !!(value && value._isSigner);\n }\n}\n\nexport class VoidSigner extends Signer implements TypedDataSigner {\n readonly address: string;\n\n constructor(address: string, provider?: Provider) {\n logger.checkNew(new.target, VoidSigner);\n super();\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n _fail(message: string, operation: string): Promise {\n return Promise.resolve().then(() => {\n logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation });\n });\n }\n\n signMessage(message: Bytes | string): Promise {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n }\n\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n }\n\n connect(provider: Provider): VoidSigner {\n return new VoidSigner(this.address, provider);\n }\n}\n\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","import _ec from \"elliptic\";\nvar EC = _ec.ec;\nexport { EC };\n//# sourceMappingURL=elliptic.js.map","export const version = \"signing-key/5.5.0\";\n","\"use strict\";\n\nimport { EC } from \"./elliptic\";\n\nimport { arrayify, BytesLike, hexlify, hexZeroPad, Signature, SignatureLike, splitSignature } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nlet _curve: EC = null\nfunction getCurve() {\n if (!_curve) {\n _curve = new EC(\"secp256k1\");\n }\n return _curve;\n}\n\nexport class SigningKey {\n\n readonly curve: string;\n\n readonly privateKey: string;\n readonly publicKey: string;\n readonly compressedPublicKey: string;\n\n //readonly address: string;\n\n readonly _isSigningKey: boolean;\n\n constructor(privateKey: BytesLike) {\n defineReadOnly(this, \"curve\", \"secp256k1\");\n\n defineReadOnly(this, \"privateKey\", hexlify(privateKey));\n\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n\n defineReadOnly(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n defineReadOnly(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n\n defineReadOnly(this, \"_isSigningKey\", true);\n }\n\n _addPoint(other: BytesLike): string {\n const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));\n const p1 = getCurve().keyFromPublic(arrayify(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n }\n\n signDigest(digest: BytesLike): Signature {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const digestBytes = arrayify(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n const signature = keyPair.sign(digestBytes, { canonical: true });\n return splitSignature({\n recoveryParam: signature.recoveryParam,\n r: hexZeroPad(\"0x\" + signature.r.toString(16), 32),\n s: hexZeroPad(\"0x\" + signature.s.toString(16), 32),\n })\n }\n\n computeSharedSecret(otherKey: BytesLike): string {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));\n return hexZeroPad(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n }\n\n static isSigningKey(value: any): value is SigningKey {\n return !!(value && value._isSigningKey);\n }\n}\n\nexport function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string {\n const sig = splitSignature(signature);\n const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };\n return \"0x\" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n}\n\nexport function computePublicKey(key: BytesLike, compressed?: boolean): string {\n const bytes = arrayify(key);\n\n if (bytes.length === 32) {\n const signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n\n } else if (bytes.length === 33) {\n if (compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n\n } else if (bytes.length === 65) {\n if (!compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n}\n\n","export const version = \"transactions/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, DataOptions, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, SignatureLike, splitSignature, stripZeros, } from \"@ethersproject/bytes\";\nimport { Zero } from \"@ethersproject/constants\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { checkProperties } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey } from \"@ethersproject/signing-key\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type AccessList = Array<{ address: string, storageKeys: Array }>;\n\n// Input allows flexibility in describing an access list\nexport type AccessListish = AccessList |\n Array<[ string, Array ]> |\n Record>;\n\nexport enum TransactionTypes {\n legacy = 0,\n eip2930 = 1,\n eip1559 = 2,\n};\n\nexport type UnsignedTransaction = {\n to?: string;\n nonce?: number;\n\n gasLimit?: BigNumberish;\n gasPrice?: BigNumberish;\n\n data?: BytesLike;\n value?: BigNumberish;\n chainId?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessListish;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n}\n\nexport interface Transaction {\n hash?: string;\n\n to?: string;\n from?: string;\n nonce: number;\n\n gasLimit: BigNumber;\n gasPrice?: BigNumber;\n\n data: string;\n value: BigNumber;\n chainId: number;\n\n r?: string;\n s?: string;\n v?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessList;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumber;\n maxFeePerGas?: BigNumber;\n}\n\n///////////////////////////////\n\nfunction handleAddress(value: string): string {\n if (value === \"0x\") { return null; }\n return getAddress(value);\n}\n\nfunction handleNumber(value: string): BigNumber {\n if (value === \"0x\") { return Zero; }\n return BigNumber.from(value);\n}\n\n// Legacy Transaction Fields\nconst transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" },\n];\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, type: true, value: true\n}\n\nexport function computeAddress(key: BytesLike | string): string {\n const publicKey = computePublicKey(key);\n return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));\n}\n\nexport function recoverAddress(digest: BytesLike, signature: SignatureLike): string {\n return computeAddress(recoverPublicKey(arrayify(digest), signature));\n}\n\nfunction formatNumber(value: BigNumberish, name: string): Uint8Array {\n const result = stripZeros(BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, (\"transaction:\" + name), value);\n }\n return result;\n}\n\nfunction accessSetify(addr: string, storageKeys: Array): { address: string,storageKeys: Array } {\n return {\n address: getAddress(addr),\n storageKeys: (storageKeys || []).map((storageKey, index) => {\n if (hexDataLength(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", `accessList[${ addr }:${ index }]`, storageKey)\n }\n return storageKey.toLowerCase();\n })\n };\n}\n\nexport function accessListify(value: AccessListish): AccessList {\n if (Array.isArray(value)) {\n return (] | { address: string, storageKeys: Array}>>value).map((set, index) => {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", `value[${ index }]`, set);\n }\n return accessSetify(set[0], set[1])\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n\n const result: Array<{ address: string, storageKeys: Array }> = Object.keys(value).map((addr) => {\n const storageKeys: Record = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, >{ });\n return accessSetify(addr, Object.keys(storageKeys).sort())\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\n\nfunction formatAccessList(value: AccessListish): Array<[ string, Array ]> {\n return accessListify(value).map((set) => [ set.address, set.storageKeys ]);\n}\n\nfunction _serializeEip1559(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // If there is an explicit gasPrice, make sure it matches the\n // EIP-1559 fees; otherwise they may not understand what they\n // think they are setting in terms of fee.\n if (transaction.gasPrice != null) {\n const gasPrice = BigNumber.from(transaction.gasPrice);\n const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice, maxFeePerGas\n });\n }\n }\n\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x02\", RLP.encode(fields)]);\n}\n\nfunction _serializeEip2930(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x01\", RLP.encode(fields)]);\n}\n\n// Legacy Transactions and EIP-155\nfunction _serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n checkProperties(transaction, allowedTransactionKeys);\n\n const raw: Array = [];\n\n transactionFields.forEach(function(fieldInfo) {\n let value = (transaction)[fieldInfo.name] || ([]);\n const options: DataOptions = { };\n if (fieldInfo.numeric) { options.hexPad = \"left\"; }\n value = arrayify(hexlify(value, options));\n\n // Fixed-width field\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n\n // Variable-width (with a maximum)\n if (fieldInfo.maxLength) {\n value = stripZeros(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value );\n }\n }\n\n raw.push(hexlify(value));\n });\n\n let chainId = 0;\n if (transaction.chainId != null) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = transaction.chainId;\n\n if (typeof(chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n\n } else if (signature && !isBytesLike(signature) && signature.v > 28) {\n // No chainId provided, but the signature is signing with EIP-155; derive chainId\n chainId = Math.floor((signature.v - 35) / 2);\n }\n\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== 0) {\n raw.push(hexlify(chainId)); // @TODO: hexValue?\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n\n // Requesting an unsigned transaction\n if (!signature) {\n return RLP.encode(raw);\n }\n\n // The splitSignature will ensure the transaction has a recoveryParam in the\n // case that the signTransaction function only adds a v.\n const sig = splitSignature(signature);\n\n // We pushed a chainId and null r, s on for hashing only; remove those\n let v = 27 + sig.recoveryParam\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v += chainId * 2 + 8;\n\n // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it!\n if (sig.v > 28 && sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n\n raw.push(hexlify(v));\n raw.push(stripZeros(arrayify(sig.r)));\n raw.push(stripZeros(arrayify(sig.s)));\n\n return RLP.encode(raw);\n}\n\nexport function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // Legacy and EIP-155 Transactions\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n\n // Typed Transactions (EIP-2718)\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ transaction.type }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n}\n\nfunction _parseEipSignature(tx: Transaction, fields: Array, serialize: (tx: UnsignedTransaction) => string): void {\n try {\n const recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) { throw new Error(\"bad recid\"); }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n\n tx.r = hexZeroPad(fields[1], 32);\n tx.s = hexZeroPad(fields[2], 32);\n\n try {\n const digest = keccak256(serialize(tx));\n tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n console.log(error);\n }\n}\n\nfunction _parseEip1559(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", hexlify(payload));\n }\n\n const maxPriorityFeePerGas = handleNumber(transaction[2]);\n const maxFeePerGas = handleNumber(transaction[3]);\n const tx: Transaction = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas: maxPriorityFeePerGas,\n maxFeePerGas: maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8]),\n };\n\n // Unsigned EIP-1559 Transaction\n if (transaction.length === 9) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n\n return tx;\n}\n\nfunction _parseEip2930(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", hexlify(payload));\n }\n\n const tx: Transaction = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n\n // Unsigned EIP-2930 Transaction\n if (transaction.length === 8) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n\n return tx;\n}\n\n// Legacy Transactions and EIP-155\nfunction _parse(rawTransaction: Uint8Array): Transaction {\n const transaction = RLP.decode(rawTransaction);\n\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n\n const tx: Transaction = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n\n // Legacy unsigned transaction\n if (transaction.length === 6) { return tx; }\n\n try {\n tx.v = BigNumber.from(transaction[6]).toNumber();\n\n } catch (error) {\n console.log(error);\n return tx;\n }\n\n tx.r = hexZeroPad(transaction[7], 32);\n tx.s = hexZeroPad(transaction[8], 32);\n\n if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) {\n // EIP-155 unsigned transaction\n tx.chainId = tx.v;\n tx.v = 0;\n\n } else {\n // Signed Transaction\n\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) { tx.chainId = 0; }\n\n let recoveryParam = tx.v - 27;\n\n const raw = transaction.slice(0, 6);\n\n if (tx.chainId !== 0) {\n raw.push(hexlify(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n\n const digest = keccak256(RLP.encode(raw));\n try {\n tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam });\n } catch (error) {\n console.log(error);\n }\n\n tx.hash = keccak256(rawTransaction);\n }\n\n tx.type = null;\n\n return tx;\n}\n\n\nexport function parse(rawTransaction: BytesLike): Transaction {\n const payload = arrayify(rawTransaction);\n\n // Legacy and EIP-155 Transactions\n if (payload[0] > 0x7f) { return _parse(payload); }\n\n // Typed Transaction (EIP-2718)\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ payload[0] }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n}\n\n","export const version = \"contracts/5.5.0\";\n","\"use strict\";\n\nimport { checkResultErrors, EventFragment, Fragment, FunctionFragment, Indexed, Interface, JsonFragment, LogDescription, ParamType, Result } from \"@ethersproject/abi\";\nimport { Block, BlockTag, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, AccessListish } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\nexport interface Overrides {\n gasLimit?: BigNumberish | Promise;\n gasPrice?: BigNumberish | Promise;\n maxFeePerGas?: BigNumberish | Promise;\n maxPriorityFeePerGas?: BigNumberish | Promise;\n nonce?: BigNumberish | Promise;\n type?: number;\n accessList?: AccessListish;\n customData?: Record;\n};\n\nexport interface PayableOverrides extends Overrides {\n value?: BigNumberish | Promise;\n}\n\nexport interface CallOverrides extends PayableOverrides {\n blockTag?: BlockTag | Promise;\n from?: string | Promise;\n}\n\n// @TODO: Better hierarchy with: (in v6)\n// - abstract-provider:TransactionRequest\n// - transactions:Transaction\n// - transaction:UnsignedTransaction\n\nexport interface PopulatedTransaction {\n to?: string;\n from?: string;\n nonce?: number;\n\n gasLimit?: BigNumber;\n gasPrice?: BigNumber;\n\n data?: string;\n value?: BigNumber;\n chainId?: number;\n\n type?: number;\n accessList?: AccessList;\n\n maxFeePerGas?: BigNumber;\n maxPriorityFeePerGas?: BigNumber;\n\n customData?: Record;\n};\n\nexport type EventFilter = {\n address?: string;\n topics?: Array>;\n};\n\n\nexport type ContractFunction = (...args: Array) => Promise;\n\n\n// The (n + 1)th parameter passed to contract event callbacks\nexport interface Event extends Log {\n\n // The event name\n event?: string;\n\n // The event signature\n eventSignature?: string;\n\n // The parsed arguments to the event\n args?: Result;\n\n // If parsing the arguments failed, this is the error\n decodeError?: Error;\n\n // A function that can be used to decode event data and topics\n decode?: (data: string, topics?: Array) => any;\n\n // A function that will remove the listener responsible for this event (if any)\n removeListener: () => void;\n\n // Get blockchain details about this event's block and transaction\n getBlock: () => Promise;\n getTransaction: () => Promise;\n getTransactionReceipt: () => Promise;\n}\n\nexport interface ContractReceipt extends TransactionReceipt {\n events?: Array;\n}\n\nexport interface ContractTransaction extends TransactionResponse {\n wait(confirmations?: number): Promise;\n}\n\n///////////////////////////////\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, from: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true,\n customData: true\n}\n\nasync function resolveName(resolver: Signer | Provider, nameOrPromise: string | Promise): Promise {\n const name = await nameOrPromise;\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n\n // If it is already an address, just use it (after adding checksum)\n try {\n return getAddress(name);\n } catch (error) { }\n\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n\n const address = await resolver.resolveName(name);\n\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n\n return address;\n}\n\n// Recursively replaces ENS names with promises to resolve the name and resolves all properties\nasync function resolveAddresses(resolver: Signer | Provider, value: any, paramType: ParamType | Array): Promise {\n if (Array.isArray(paramType)) {\n return await Promise.all(paramType.map((paramType, index) => {\n return resolveAddresses(\n resolver,\n ((Array.isArray(value)) ? value[index]: value[paramType.name]),\n paramType\n );\n }));\n }\n\n if (paramType.type === \"address\") {\n return await resolveName(resolver, value);\n }\n\n if (paramType.type === \"tuple\") {\n return await resolveAddresses(resolver, value, paramType.components);\n }\n\n if (paramType.baseType === \"array\") {\n if (!Array.isArray(value)) {\n return Promise.reject(logger.makeError(\"invalid value for array\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }));\n }\n return await Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren)));\n }\n\n return value;\n}\n\nasync function populateTransaction(contract: Contract, fragment: FunctionFragment, args: Array): Promise {\n // If an extra argument is given, it is overrides\n let overrides: CallOverrides = { };\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n overrides = shallowCopy(args.pop());\n }\n\n // Make sure the parameter count matches\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n\n // Populate \"from\" override (allow promises)\n if (contract.signer) {\n if (overrides.from) {\n // Contracts with a Signer are from the Signer's frame-of-reference;\n // but we allow overriding \"from\" if it matches the signer\n overrides.from = resolveProperties({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(async (check) => {\n if (getAddress(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n\n return check.override;\n });\n\n } else {\n overrides.from = contract.signer.getAddress();\n }\n\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n\n //} else {\n // Contracts without a signer can override \"from\", and if\n // unspecified the zero address is used\n //overrides.from = AddressZero;\n }\n\n // Wait for all dependencies to be resolved (prefer the signer over the provider)\n const resolved = await resolveProperties({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (resolveProperties(overrides) || { })\n });\n\n // The ABI coded transaction\n const data = contract.interface.encodeFunctionData(fragment, resolved.args);\n const tx: PopulatedTransaction = {\n data: data,\n to: resolved.address\n };\n\n // Resolved Overrides\n const ro = resolved.overrides;\n\n // Populate simple overrides\n if (ro.nonce != null) { tx.nonce = BigNumber.from(ro.nonce).toNumber(); }\n if (ro.gasLimit != null) { tx.gasLimit = BigNumber.from(ro.gasLimit); }\n if (ro.gasPrice != null) { tx.gasPrice = BigNumber.from(ro.gasPrice); }\n if (ro.maxFeePerGas != null) { tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); }\n if (ro.maxPriorityFeePerGas != null) { tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); }\n if (ro.from != null) { tx.from = ro.from; }\n\n if (ro.type != null) { tx.type = ro.type; }\n if (ro.accessList != null) { tx.accessList = accessListify(ro.accessList); }\n\n // If there was no \"gasLimit\" override, but the ABI specifies a default, use it\n if (tx.gasLimit == null && fragment.gas != null) {\n // Compute the intrinsic gas cost for this transaction\n // @TODO: This is based on the yellow paper as of Petersburg; this is something\n // we may wish to parameterize in v6 as part of the Network object. Since this\n // is always a non-nil to address, we can ignore G_create, but may wish to add\n // similar logic to the ContractFactory.\n let intrinsic = 21000;\n const bytes = arrayify(data);\n for (let i = 0; i < bytes.length; i++) {\n intrinsic += 4;\n if (bytes[i]) { intrinsic += 64; }\n }\n tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic);\n }\n\n // Populate \"value\" override\n if (ro.value) {\n const roValue = BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n\n if (ro.customData) {\n tx.customData = shallowCopy(ro.customData);\n }\n\n // Remove the overrides\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n\n delete overrides.type;\n delete overrides.accessList;\n\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n\n delete overrides.customData;\n\n // Make sure there are no stray overrides, which may indicate a\n // typo or using an unsupported key.\n const leftovers = Object.keys(overrides).filter((key) => ((overrides)[key] != null));\n if (leftovers.length) {\n logger.throwError(`cannot override ${ leftovers.map((l) => JSON.stringify(l)).join(\",\") }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n\n return tx;\n}\n\n\nfunction buildPopulate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return function(...args: Array): Promise {\n return populateTransaction(contract, fragment, args);\n };\n}\n\nfunction buildEstimate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n return async function(...args: Array): Promise {\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n })\n }\n\n const tx = await populateTransaction(contract, fragment, args);\n return await signerOrProvider.estimateGas(tx);\n };\n}\n\nfunction addContractWait(contract: Contract, tx: TransactionResponse) {\n const wait = tx.wait.bind(tx);\n tx.wait = (confirmations?: number) => {\n return wait(confirmations).then((receipt: ContractReceipt) => {\n receipt.events = receipt.logs.map((log) => {\n let event: Event = (deepCopy(log));\n let parsed: LogDescription = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e){ }\n\n // Successfully parsed the event log; include it\n if (parsed) {\n event.args = parsed.args;\n event.decode = (data: BytesLike, topics?: Array) => {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n\n // Useful operations\n event.removeListener = () => { return contract.provider; }\n event.getBlock = () => {\n return contract.provider.getBlock(receipt.blockHash);\n }\n event.getTransaction = () => {\n return contract.provider.getTransaction(receipt.transactionHash);\n }\n event.getTransactionReceipt = () => {\n return Promise.resolve(receipt);\n }\n\n return event;\n });\n\n return receipt;\n });\n };\n}\n\nfunction buildCall(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n\n return async function(...args: Array): Promise {\n // Extract the \"blockTag\" override if present\n let blockTag = undefined;\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n const overrides = shallowCopy(args.pop());\n if (overrides.blockTag != null) {\n blockTag = await overrides.blockTag;\n }\n delete overrides.blockTag;\n args.push(overrides);\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed(blockTag);\n }\n\n // Call a node and get the result\n const tx = await populateTransaction(contract, fragment, args);\n const result = await signerOrProvider.call(tx, blockTag);\n\n try {\n let value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return value;\n\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n };\n}\n\nfunction buildSend(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return async function(...args: Array): Promise {\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n })\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed();\n }\n\n const txRequest = await populateTransaction(contract, fragment, args);\n\n const tx = await contract.signer.sendTransaction(txRequest);\n\n // Tweak the tx.wait so the receipt has extra properties\n addContractWait(contract, tx);\n\n return tx;\n };\n}\n\nfunction buildDefault(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n}\n\nfunction getEventTag(filter: EventFilter): string {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map((topic) => {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\"): \"\");\n}\n\nclass RunningEvent {\n readonly tag: string;\n readonly filter: EventFilter;\n private _listeners: Array<{ listener: Listener, once: boolean }>;\n\n constructor(tag: string, filter: EventFilter) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"filter\", filter);\n this._listeners = [ ];\n }\n\n addListener(listener: Listener, once: boolean): void {\n this._listeners.push({ listener: listener, once: once });\n }\n\n removeListener(listener: Listener): void {\n let done = false;\n this._listeners = this._listeners.filter((item) => {\n if (done || item.listener !== listener) { return true; }\n done = true;\n return false;\n });\n }\n\n removeAllListeners(): void {\n this._listeners = [];\n }\n\n listeners(): Array {\n return this._listeners.map((i) => i.listener);\n }\n\n listenerCount(): number {\n return this._listeners.length;\n }\n\n run(args: Array): number {\n const listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter((item) => {\n\n const argsCopy = args.slice();\n\n // Call the callback in the next event loop\n setTimeout(() => {\n item.listener.apply(this, argsCopy);\n }, 0);\n\n // Reschedule it if it not \"once\"\n return !(item.once);\n });\n\n return listenerCount;\n }\n\n prepareEvent(event: Event): void {\n }\n\n // Returns the array that will be applied to an emit\n getEmit(event: Event): Array {\n return [ event ];\n }\n}\n\nclass ErrorRunningEvent extends RunningEvent {\n constructor() {\n super(\"error\", null);\n }\n}\n\n\n// @TODO Fragment should inherit Wildcard? and just override getEmit?\n// or have a common abstract super class, with enough constructor\n// options to configure both.\n\n// A Fragment Event will populate all the properties that Wildcard\n// will, and additionally dereference the arguments when emitting\nclass FragmentRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n readonly fragment: EventFragment;\n\n constructor(address: string, contractInterface: Interface, fragment: EventFragment, topics?: Array>) {\n const filter: EventFilter = {\n address: address\n }\n\n let topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) { logger.throwArgumentError(\"topic mismatch\", \"topics\", topics); }\n filter.topics = topics.slice();\n } else {\n filter.topics = [ topic ];\n }\n\n super(getEventTag(filter), filter);\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n defineReadOnly(this, \"fragment\", fragment);\n }\n\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(this.fragment, data, topics);\n };\n\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n }\n\n getEmit(event: Event): Array {\n const errors = checkResultErrors(event.args);\n if (errors.length) { throw errors[0].error; }\n\n const args = (event.args || []).slice();\n args.push(event);\n return args;\n }\n}\n\n// A Wildcard Event will attempt to populate:\n// - event The name of the event name\n// - eventSignature The full signature of the event\n// - decode A function to decode data and topics\n// - args The decoded data and topics\nclass WildcardRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n\n constructor(address: string, contractInterface: Interface) {\n super(\"*\", { address: address });\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n }\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n try {\n const parsed = this.interface.parseLog(event);\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n\n event.args = parsed.args;\n } catch (error) {\n // No matching event\n }\n }\n}\n\nexport type ContractInterface = string | ReadonlyArray | Interface;\n\ntype InterfaceFunc = (contractInterface: ContractInterface) => Interface;\n\n\nexport class BaseContract {\n readonly address: string;\n readonly interface: Interface;\n\n readonly signer: Signer;\n readonly provider: Provider;\n\n readonly functions: { [ name: string ]: ContractFunction };\n\n readonly callStatic: { [ name: string ]: ContractFunction };\n readonly estimateGas: { [ name: string ]: ContractFunction };\n readonly populateTransaction: { [ name: string ]: ContractFunction };\n\n readonly filters: { [ name: string ]: (...args: Array) => EventFilter };\n\n // This will always be an address. This will only differ from\n // address if an ENS name was used in the constructor\n readonly resolvedAddress: Promise;\n\n // This is only set if the contract was created with a call to deploy\n readonly deployTransaction: TransactionResponse;\n\n _deployedPromise: Promise;\n\n // A list of RunningEvents to track listeners for each event tag\n _runningEvents: { [ eventTag: string ]: RunningEvent };\n\n // Wrapped functions to call emit and allow deregistration from the provider\n _wrappedEmits: { [ eventTag: string ]: (...args: Array) => void };\n\n constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider) {\n logger.checkNew(new.target, Contract);\n\n // @TODO: Maybe still check the addressOrName looks like a valid address or name?\n //address = getAddress(address);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n\n if (signerOrProvider == null) {\n defineReadOnly(this, \"provider\", null);\n defineReadOnly(this, \"signer\", null);\n } else if (Signer.isSigner(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider.provider || null);\n defineReadOnly(this, \"signer\", signerOrProvider);\n } else if (Provider.isProvider(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider);\n defineReadOnly(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n\n defineReadOnly(this, \"callStatic\", { });\n defineReadOnly(this, \"estimateGas\", { });\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"populateTransaction\", { });\n\n defineReadOnly(this, \"filters\", { });\n\n {\n const uniqueFilters: { [ name: string ]: Array } = { };\n Object.keys(this.interface.events).forEach((eventSignature) => {\n const event = this.interface.events[eventSignature];\n defineReadOnly(this.filters, eventSignature, (...args: Array) => {\n return {\n address: this.address,\n topics: this.interface.encodeFilterTopics(event, args)\n }\n });\n if (!uniqueFilters[event.name]) { uniqueFilters[event.name] = [ ]; }\n uniqueFilters[event.name].push(eventSignature);\n });\n\n Object.keys(uniqueFilters).forEach((name) => {\n const filters = uniqueFilters[name];\n if (filters.length === 1) {\n defineReadOnly(this.filters, name, this.filters[filters[0]]);\n } else {\n logger.warn(`Duplicate definition of ${ name } (${ filters.join(\", \")})`);\n }\n });\n }\n\n defineReadOnly(this, \"_runningEvents\", { });\n defineReadOnly(this, \"_wrappedEmits\", { });\n\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n\n defineReadOnly(this, \"address\", addressOrName);\n if (this.provider) {\n defineReadOnly(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n defineReadOnly(this, \"resolvedAddress\", Promise.resolve(getAddress(addressOrName)));\n } catch (error) {\n // Without a provider, we cannot use ENS names\n logger.throwError(\"provider is required to use ENS name as contract address\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n\n const uniqueNames: { [ name: string ]: Array } = { };\n const uniqueSignatures: { [ signature: string ]: boolean } = { };\n Object.keys(this.interface.functions).forEach((signature) => {\n const fragment = this.interface.functions[signature];\n\n // Check that the signature is unique; if not the ABI generation has\n // not been cleaned or may be incorrectly generated\n if (uniqueSignatures[signature]) {\n logger.warn(`Duplicate ABI entry for ${ JSON.stringify(signature) }`);\n return;\n }\n uniqueSignatures[signature] = true;\n\n // Track unique names; we only expose bare named functions if they\n // are ambiguous\n {\n const name = fragment.name;\n if (!uniqueNames[`%${ name }`]) { uniqueNames[`%${ name }`] = [ ]; }\n uniqueNames[`%${ name }`].push(signature);\n }\n\n if ((this)[signature] == null) {\n defineReadOnly(this, signature, buildDefault(this, fragment, true));\n }\n\n // We do not collapse simple calls on this bucket, which allows\n // frameworks to safely use this without introspection as well as\n // allows decoding error recovery.\n if (this.functions[signature] == null) {\n defineReadOnly(this.functions, signature, buildDefault(this, fragment, false));\n }\n\n if (this.callStatic[signature] == null) {\n defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true));\n }\n\n if (this.populateTransaction[signature] == null) {\n defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment));\n }\n\n if (this.estimateGas[signature] == null) {\n defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment));\n }\n });\n\n Object.keys(uniqueNames).forEach((name) => {\n // Ambiguous names to not get attached as bare names\n const signatures = uniqueNames[name];\n if (signatures.length > 1) { return; }\n\n // Strip off the leading \"%\" used for prototype protection\n name = name.substring(1);\n\n const signature = signatures[0];\n\n // If overwriting a member property that is null, swallow the error\n try {\n if ((this)[name] == null) {\n defineReadOnly(this, name, (this)[signature]);\n }\n } catch (e) { }\n\n if (this.functions[name] == null) {\n defineReadOnly(this.functions, name, this.functions[signature]);\n }\n\n if (this.callStatic[name] == null) {\n defineReadOnly(this.callStatic, name, this.callStatic[signature]);\n }\n\n if (this.populateTransaction[name] == null) {\n defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]);\n }\n\n if (this.estimateGas[name] == null) {\n defineReadOnly(this.estimateGas, name, this.estimateGas[signature]);\n }\n });\n }\n\n static getContractAddress(transaction: { from: string, nonce: BigNumberish }): string {\n return getContractAddress(transaction);\n }\n\n static getInterface(contractInterface: ContractInterface): Interface {\n if (Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new Interface(contractInterface);\n }\n\n // @TODO: Allow timeout?\n deployed(): Promise {\n return this._deployed();\n }\n\n _deployed(blockTag?: BlockTag): Promise {\n if (!this._deployedPromise) {\n\n // If we were just deployed, we know the transaction we should occur in\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(() => {\n return this;\n });\n\n } else {\n // @TODO: Once we allow a timeout to be passed in, we will wait\n // up to that many blocks for getCode\n\n // Otherwise, poll for our code to be deployed\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: this.address,\n operation: \"getDeployed\"\n });\n }\n return this;\n });\n }\n }\n\n return this._deployedPromise;\n }\n\n // @TODO:\n // estimateFallback(overrides?: TransactionRequest): Promise\n\n // @TODO:\n // estimateDeploy(bytecode: string, ...args): Promise\n\n fallback(overrides?: TransactionRequest): Promise {\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" })\n }\n\n const tx: Deferrable = shallowCopy(overrides || {});\n\n [\"from\", \"to\"].forEach(function(key) {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n tx.to = this.resolvedAddress;\n return this.deployed().then(() => {\n return this.signer.sendTransaction(tx);\n });\n }\n\n // Reconnect to a different signer or provider\n connect(signerOrProvider: Signer | Provider | string): Contract {\n if (typeof(signerOrProvider) === \"string\") {\n signerOrProvider = new VoidSigner(signerOrProvider, this.provider);\n }\n\n const contract = new (<{ new(...args: any[]): Contract }>(this.constructor))(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n defineReadOnly(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n }\n\n // Re-attach to a different on-chain instance of this contract\n attach(addressOrName: string): Contract {\n return new (<{ new(...args: any[]): Contract }>(this.constructor))(addressOrName, this.interface, this.signer || this.provider);\n }\n\n static isIndexed(value: any): value is Indexed {\n return Indexed.isIndexed(value);\n }\n\n private _normalizeRunningEvent(runningEvent: RunningEvent): RunningEvent {\n // Already have an instance of this event running; we can re-use it\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent\n }\n\n private _getRunningEvent(eventName: EventFilter | string): RunningEvent {\n if (typeof(eventName) === \"string\") {\n\n // Listen for \"error\" events (if your contract has an error event, include\n // the full signature to bypass this special event keyword)\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n\n // Listen for any event that is registered\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n\n // Listen for any event\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n // Get the event Fragment (throws if ambiguous/unknown event)\n const fragment = this.interface.getEvent(eventName)\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n\n // We have topics to filter by...\n if (eventName.topics && eventName.topics.length > 0) {\n\n // Is it a known topichash? (throws if no matching topichash)\n try {\n const topic = eventName.topics[0];\n if (typeof(topic) !== \"string\") {\n throw new Error(\"invalid topic\"); // @TODO: May happen for anonymous events\n }\n const fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) { }\n\n // Filter by the unknown topichash\n const filter: EventFilter = {\n address: this.address,\n topics: eventName.topics\n }\n\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n _checkRunningEvents(runningEvent: RunningEvent): void {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n\n // If we have a poller for this, remove it\n const emit = this._wrappedEmits[runningEvent.tag];\n if (emit && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n }\n\n // Subclasses can override this to gracefully recover\n // from parse errors if they wish\n _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event {\n const event = deepCopy(log);\n\n event.removeListener = () => {\n if (!listener) { return; }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); }\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); }\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); }\n\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n\n return event;\n }\n\n private _addEventListener(runningEvent: RunningEvent, listener: Listener, once: boolean): void {\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" })\n }\n\n runningEvent.addListener(listener, once);\n\n // Track this running event and its listeners (may already be there; but no hard in updating)\n this._runningEvents[runningEvent.tag] = runningEvent;\n\n // If we are not polling the provider, start polling\n if (!this._wrappedEmits[runningEvent.tag]) {\n const wrappedEmit = (log: Log) => {\n let event = this._wrapEvent(runningEvent, log, listener);\n\n // Try to emit the result for the parameterized event...\n if (event.decodeError == null) {\n try {\n const args = runningEvent.getEmit(event);\n this.emit(runningEvent.filter, ...args);\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n\n // Always emit \"event\" for fragment-base events\n if (runningEvent.filter != null) {\n this.emit(\"event\", event);\n }\n\n // Emit \"error\" if there was an error\n if (event.decodeError != null) {\n this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n\n // Special events, like \"error\" do not have a filter\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n }\n\n queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise> {\n const runningEvent = this._getRunningEvent(event);\n const filter = shallowCopy(runningEvent.filter);\n\n if (typeof(fromBlockOrBlockhash) === \"string\" && isHexString(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n (filter).blockHash = fromBlockOrBlockhash;\n } else {\n (filter).fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash: 0);\n (filter).toBlock = ((toBlock != null) ? toBlock: \"latest\");\n }\n\n return this.provider.getLogs(filter).then((logs) => {\n return logs.map((log) => this._wrapEvent(runningEvent, log, null));\n });\n }\n\n on(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n }\n\n once(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n }\n\n emit(eventName: EventFilter | string, ...args: Array): boolean {\n if (!this.provider) { return false; }\n\n const runningEvent = this._getRunningEvent(eventName);\n const result = (runningEvent.run(args) > 0);\n\n // May have drained all the \"once\" events; check for living events\n this._checkRunningEvents(runningEvent);\n\n return result;\n }\n\n listenerCount(eventName?: EventFilter | string): number {\n if (!this.provider) { return 0; }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce((accum, key) => {\n return accum + this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n }\n\n listeners(eventName?: EventFilter | string): Array {\n if (!this.provider) { return []; }\n\n if (eventName == null) {\n const result: Array = [ ];\n for (let tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach((listener) => {\n result.push(listener)\n });\n }\n return result;\n }\n\n return this._getRunningEvent(eventName).listeners();\n }\n\n removeAllListeners(eventName?: EventFilter | string): this {\n if (!this.provider) { return this; }\n\n if (eventName == null) {\n for (const tag in this._runningEvents) {\n const runningEvent = this._runningEvents[tag];\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n }\n return this;\n }\n\n // Delete any listeners\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n\n return this;\n }\n\n off(eventName: EventFilter | string, listener: Listener): this {\n if (!this.provider) { return this; }\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n }\n\n removeListener(eventName: EventFilter | string, listener: Listener): this {\n return this.off(eventName, listener);\n }\n\n}\n\nexport class Contract extends BaseContract {\n // The meta-class properties\n readonly [ key: string ]: ContractFunction | any;\n}\n\nexport class ContractFactory {\n\n readonly interface: Interface;\n readonly bytecode: string;\n readonly signer: Signer;\n\n constructor(contractInterface: ContractInterface, bytecode: BytesLike | { object: string }, signer?: Signer) {\n\n let bytecodeHex: string = null;\n\n if (typeof(bytecode) === \"string\") {\n bytecodeHex = bytecode;\n } else if (isBytes(bytecode)) {\n bytecodeHex = hexlify(bytecode);\n } else if (bytecode && typeof(bytecode.object) === \"string\") {\n // Allow the bytecode object from the Solidity compiler\n bytecodeHex = (bytecode).object;\n } else {\n // Crash in the next verification step\n bytecodeHex = \"!\";\n }\n\n // Make sure it is 0x prefixed\n if (bytecodeHex.substring(0, 2) !== \"0x\") { bytecodeHex = \"0x\" + bytecodeHex; }\n\n // Make sure the final result is valid bytecode\n if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n\n // If we have a signer, make sure it is valid\n if (signer && !Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n\n defineReadOnly(this, \"bytecode\", bytecodeHex);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n defineReadOnly(this, \"signer\", signer || null);\n }\n\n // @TODO: Future; rename to populateTransaction?\n getDeployTransaction(...args: Array): TransactionRequest {\n let tx: TransactionRequest = { };\n\n // If we have 1 additional argument, we allow transaction overrides\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n tx = shallowCopy(args.pop());\n for (const key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n\n // Do not allow these to be overridden in a deployment transaction\n [\"data\", \"from\", \"to\"].forEach((key) => {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n if (tx.value) {\n const value = BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Set the data to the bytecode + the encoded constructor arguments\n tx.data = hexlify(concat([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n\n return tx\n }\n\n async deploy(...args: Array): Promise {\n\n let overrides: any = { };\n\n // If 1 extra parameter was passed in, it contains overrides\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Resolve ENS names and promises in the arguments\n const params = await resolveAddresses(this.signer, args, this.interface.deploy.inputs);\n params.push(overrides);\n\n // Get the deployment transaction (with optional overrides)\n const unsignedTx = this.getDeployTransaction(...params);\n\n // Send the deployment transaction\n const tx = await this.signer.sendTransaction(unsignedTx);\n\n const address = getStatic<(tx: TransactionResponse) => string>(this.constructor, \"getContractAddress\")(tx);\n const contract = getStatic<(address: string, contractInterface: ContractInterface, signer?: Signer) => Contract>(this.constructor, \"getContract\")(address, this.interface, this.signer);\n\n // Add the modified wait that wraps events\n addContractWait(contract, tx);\n\n defineReadOnly(contract, \"deployTransaction\", tx);\n return contract;\n }\n\n attach(address: string): Contract {\n return ((this.constructor)).getContract(address, this.interface, this.signer);\n }\n\n connect(signer: Signer) {\n return new (<{ new(...args: any[]): ContractFactory }>(this.constructor))(this.interface, this.bytecode, signer);\n }\n\n static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n\n if (typeof(compilerOutput) === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n\n const abi = compilerOutput.abi;\n\n let bytecode: any = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n\n return new this(abi, bytecode, signer);\n }\n\n static getInterface(contractInterface: ContractInterface) {\n return Contract.getInterface(contractInterface);\n }\n\n static getContractAddress(tx: { from: string, nonce: BytesLike | BigNumber | number }): string {\n return getContractAddress(tx);\n }\n\n static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract {\n return new Contract(address, contractInterface, signer);\n }\n}\n","/**\n * var basex = require(\"base-x\");\n *\n * This implementation is heavily based on base-x. The main reason to\n * deviate was to prevent the dependency of Buffer.\n *\n * Contributors:\n *\n * base-x encoding\n * Forked from https://github.com/cryptocoinjs/bs58\n * Originally written by Mike Hearn for BitcoinJ\n * Copyright (c) 2011 Google Inc\n * Ported to JavaScript by Stefan Thomas\n * Merged Buffer refactorings from base58-native by Stephen Pair\n * Copyright (c) 2013 BitPay Inc\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n */\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nexport class BaseX {\n readonly alphabet: string;\n readonly base: number;\n\n _alphabetMap: { [ character: string ]: number };\n _leader: string;\n\n constructor(alphabet: string) {\n defineReadOnly(this, \"alphabet\", alphabet);\n defineReadOnly(this, \"base\", alphabet.length);\n\n defineReadOnly(this, \"_alphabetMap\", { });\n defineReadOnly(this, \"_leader\", alphabet.charAt(0));\n\n // pre-compute lookup table\n for (let i = 0; i < alphabet.length; i++) {\n this._alphabetMap[alphabet.charAt(i)] = i;\n }\n }\n\n encode(value: BytesLike): string {\n let source = arrayify(value);\n\n if (source.length === 0) { return \"\"; }\n\n let digits = [ 0 ]\n for (let i = 0; i < source.length; ++i) {\n let carry = source[i];\n for (let j = 0; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % this.base;\n carry = (carry / this.base) | 0;\n }\n\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = (carry / this.base) | 0;\n }\n }\n\n let string = \"\"\n\n // deal with leading zeros\n for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) {\n string += this._leader;\n }\n\n // convert digits to a string\n for (let q = digits.length - 1; q >= 0; --q) {\n string += this.alphabet[digits[q]];\n }\n\n return string;\n }\n\n decode(value: string): Uint8Array {\n if (typeof(value) !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n\n let bytes: Array = [];\n if (value.length === 0) { return new Uint8Array(bytes); }\n\n bytes.push(0);\n for (let i = 0; i < value.length; i++) {\n let byte = this._alphabetMap[value[i]];\n\n if (byte === undefined) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n\n let carry = byte;\n for (let j = 0; j < bytes.length; ++j) {\n carry += bytes[j] * this.base;\n bytes[j] = carry & 0xff;\n carry >>= 8;\n }\n\n while (carry > 0) {\n bytes.push(carry & 0xff);\n carry >>= 8;\n }\n }\n\n // deal with leading zeros\n for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) {\n bytes.push(0)\n }\n\n return arrayify(new Uint8Array(bytes.reverse()))\n }\n}\n\nconst Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\nconst Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n\nexport { Base32, Base58 };\n\n//console.log(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\"))\n//console.log(Base58.encode(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\")))\n","export enum SupportedAlgorithm { sha256 = \"sha256\", sha512 = \"sha512\" };\n\n","export const version = \"sha2/5.5.0\";\n","\"use strict\";\n\nimport hash from \"hash.js\";\n//const _ripemd160 = _hash.ripemd160;\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { SupportedAlgorithm } from \"./types\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function ripemd160(data: BytesLike): string {\n return \"0x\" + (hash.ripemd160().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha256(data: BytesLike): string {\n return \"0x\" + (hash.sha256().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha512(data: BytesLike): string {\n return \"0x\" + (hash.sha512().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string {\n if (!SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm: algorithm\n });\n }\n\n return \"0x\" + hash.hmac((hash)[algorithm], arrayify(key)).update(arrayify(data)).digest(\"hex\");\n}\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { computeHmac, SupportedAlgorithm } from \"@ethersproject/sha2\";\n\nexport function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string {\n password = arrayify(password);\n salt = arrayify(salt);\n let hLen;\n let l = 1;\n const DK = new Uint8Array(keylen)\n const block1 = new Uint8Array(salt.length + 4)\n block1.set(salt);\n //salt.copy(block1, 0, 0, salt.length)\n\n let r: number;\n let T: Uint8Array;\n\n for (let i = 1; i <= l; i++) {\n //block1.writeUInt32BE(i, salt.length)\n block1[salt.length] = (i >> 24) & 0xff;\n block1[salt.length + 1] = (i >> 16) & 0xff;\n block1[salt.length + 2] = (i >> 8) & 0xff;\n block1[salt.length + 3] = i & 0xff;\n\n //let U = createHmac(password).update(block1).digest();\n let U = arrayify(computeHmac(hashAlgorithm, password, block1));\n\n if (!hLen) {\n hLen = U.length\n T = new Uint8Array(hLen)\n l = Math.ceil(keylen / hLen)\n r = keylen - (l - 1) * hLen\n }\n\n //U.copy(T, 0, 0, hLen)\n T.set(U);\n\n\n for (let j = 1; j < iterations; j++) {\n //U = createHmac(password).update(U).digest();\n U = arrayify(computeHmac(hashAlgorithm, password, U));\n for (let k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n\n const destPos = (i - 1) * hLen\n const len = (i === l ? r : hLen)\n //T.copy(DK, destPos, 0, len)\n DK.set(arrayify(T).slice(0, len), destPos);\n }\n\n return hexlify(DK)\n}\n\n","export const version = \"wordlists/5.5.0\";\n","\"use strict\";\n\n// This gets overridden by rollup\nconst exportWordlist = false;\n\nimport { id } from \"@ethersproject/hash\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nexport const logger = new Logger(version);\n\nexport abstract class Wordlist {\n readonly locale: string;\n\n constructor(locale: string) {\n logger.checkAbstract(new.target, Wordlist);\n defineReadOnly(this, \"locale\", locale);\n }\n\n abstract getWord(index: number): string;\n abstract getWordIndex(word: string): number;\n\n // Subclasses may override this\n split(mnemonic: string): Array {\n return mnemonic.toLowerCase().split(/ +/g)\n }\n\n // Subclasses may override this\n join(words: Array): string {\n return words.join(\" \");\n }\n\n static check(wordlist: Wordlist): string {\n const words = [];\n for (let i = 0; i < 2048; i++) {\n const word = wordlist.getWord(i);\n /* istanbul ignore if */\n if (i !== wordlist.getWordIndex(word)) { return \"0x\"; }\n words.push(word);\n }\n return id(words.join(\"\\n\") + \"\\n\");\n }\n\n static register(lang: Wordlist, name?: string): void {\n if (!name) { name = lang.locale; }\n\n /* istanbul ignore if */\n if (exportWordlist) {\n try {\n const anyGlobal = (window as any)\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n defineReadOnly(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) { }\n }\n }\n\n}\n\n","\"use strict\";\n\nimport { Wordlist } from \"./wordlist\";\n\n\nconst words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n\nlet wordlist: Array = null;\n\n\nfunction loadWords(lang: Wordlist): void {\n if (wordlist != null) { return; }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n\n // Verify the computed list matches the official list\n /* istanbul ignore if */\n if (Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n}\n\nclass LangEn extends Wordlist {\n constructor() {\n super(\"en\");\n }\n\n getWord(index: number): string {\n loadWords(this);\n return wordlist[index];\n }\n\n getWordIndex(word: string): number {\n loadWords(this);\n return wordlist.indexOf(word);\n }\n}\n\nconst langEn = new LangEn();\nWordlist.register(langEn);\n\nexport { langEn };\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\n// Browser; only include English by default\n\nimport { Wordlist } from \"./wordlist\";\n\nimport { langEn as en } from \"./lang-en\";\n\nexport const wordlists: { [ locale: string ]: Wordlist } = {\n en: en\n}\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\nimport { logger, Wordlist } from \"./wordlist\";\n\nimport { wordlists } from \"./wordlists\";\n\nexport {\n logger,\n Wordlist,\n wordlists\n}\n","export const version = \"hdnode/5.5.0\";\n","\"use strict\";\n\n// See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\n\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexZeroPad, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from \"@ethersproject/strings\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { computeHmac, ripemd160, sha256, SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { computeAddress } from \"@ethersproject/transactions\";\nimport { Wordlist, wordlists } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst N = BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n\n\n// \"Bitcoin seed\"\nconst MasterSecret = toUtf8Bytes(\"Bitcoin seed\");\n\nconst HardenedBit = 0x80000000;\n\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits: number): number {\n return ((1 << bits) - 1) << (8 - bits);\n}\n\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits: number): number {\n return (1 << bits) - 1;\n}\n\nfunction bytes32(value: BigNumber | Uint8Array): string {\n return hexZeroPad(hexlify(value), 32);\n}\n\nfunction base58check(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nfunction getWordlist(wordlist: string | Wordlist): Wordlist {\n if (wordlist == null) {\n return wordlists[\"en\"];\n }\n\n if (typeof(wordlist) === \"string\") {\n const words = wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n\n return wordlist;\n}\n\nconst _constructorGuard: any = {};\n\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n\nexport interface Mnemonic {\n readonly phrase: string;\n readonly path: string;\n readonly locale: string;\n};\n\nexport class HDNode implements ExternallyOwnedAccount {\n readonly privateKey: string;\n readonly publicKey: string;\n\n readonly fingerprint: string;\n readonly parentFingerprint: string;\n\n readonly address: string;\n\n readonly mnemonic?: Mnemonic;\n readonly path: string;\n\n readonly chainCode: string;\n\n readonly index: number;\n readonly depth: number;\n\n /**\n * This constructor should not be called directly.\n *\n * Please use:\n * - fromMnemonic\n * - fromSeed\n */\n constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string) {\n logger.checkNew(new.target, HDNode);\n\n /* istanbul ignore if */\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n\n if (privateKey) {\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"privateKey\", signingKey.privateKey);\n defineReadOnly(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n defineReadOnly(this, \"privateKey\", null);\n defineReadOnly(this, \"publicKey\", hexlify(publicKey));\n }\n\n defineReadOnly(this, \"parentFingerprint\", parentFingerprint);\n defineReadOnly(this, \"fingerprint\", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4));\n\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n defineReadOnly(this, \"chainCode\", chainCode);\n\n defineReadOnly(this, \"index\", index);\n defineReadOnly(this, \"depth\", depth);\n\n if (mnemonicOrPath == null) {\n // From a source that does not preserve the path (e.g. extended keys)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", null);\n\n } else if (typeof(mnemonicOrPath) === \"string\") {\n // From a source that does not preserve the mnemonic (e.g. neutered)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", mnemonicOrPath);\n\n } else {\n // From a fully qualified source\n defineReadOnly(this, \"mnemonic\", mnemonicOrPath);\n defineReadOnly(this, \"path\", mnemonicOrPath.path);\n }\n }\n\n get extendedKey(): string {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n\n if (this.depth >= 256) { throw new Error(\"Depth too large!\"); }\n\n return base58check(concat([\n ((this.privateKey != null) ? \"0x0488ADE4\": \"0x0488B21E\"),\n hexlify(this.depth),\n this.parentFingerprint,\n hexZeroPad(hexlify(this.index), 4),\n this.chainCode,\n ((this.privateKey != null) ? concat([ \"0x00\", this.privateKey ]): this.publicKey),\n ]));\n }\n\n neuter(): HDNode {\n return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n }\n\n private _derive(index: number): HDNode {\n if (index > 0xffffffff) { throw new Error(\"invalid index - \" + String(index)); }\n\n // Base path\n let path = this.path;\n if (path) { path += \"/\" + (index & ~HardenedBit); }\n\n const data = new Uint8Array(37);\n\n if (index & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n\n // Data = 0x00 || ser_256(k_par)\n data.set(arrayify(this.privateKey), 1);\n\n // Hardened path\n if (path) { path += \"'\"; }\n\n } else {\n // Data = ser_p(point(k_par))\n data.set(arrayify(this.publicKey));\n }\n\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); }\n\n const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data));\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n\n // The private key\n let ki: string = null\n\n // The public key\n let Ki: string = null;\n\n if (this.privateKey) {\n ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N));\n } else {\n const ek = new SigningKey(hexlify(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n\n let mnemonicOrPath: Mnemonic | string = path;\n\n const srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path: path,\n locale: (srcMnemonic.locale || \"en\")\n });\n }\n\n return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);\n }\n\n derivePath(path: string): HDNode {\n const components = path.split(\"/\");\n\n if (components.length === 0 || (components[0] === \"m\" && this.depth !== 0)) {\n throw new Error(\"invalid path - \" + path);\n }\n\n if (components[0] === \"m\") { components.shift(); }\n\n let result: HDNode = this;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(HardenedBit + index);\n } else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(index);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n\n return result;\n }\n\n\n static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode {\n const seedArray: Uint8Array = arrayify(seed);\n if (seedArray.length < 16 || seedArray.length > 64) { throw new Error(\"invalid seed\"); }\n\n const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray));\n\n return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, \"0x00000000\", bytes32(I.slice(32)), 0, 0, mnemonic);\n }\n\n static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode {\n\n // If a locale name was passed in, find the associated wordlist\n wordlist = getWordlist(wordlist);\n\n // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid)\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n\n return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n }\n\n static fromSeed(seed: BytesLike): HDNode {\n return HDNode._fromSeed(seed, null);\n }\n\n static fromExtendedKey(extendedKey: string): HDNode {\n const bytes = Base58.decode(extendedKey);\n\n if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\": case \"0x043587cf\":\n return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null);\n\n // Private Key\n case \"0x0488ade4\": case \"0x04358394 \":\n if (key[0] !== 0) { break; }\n return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null);\n }\n\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n}\n\nexport function mnemonicToSeed(mnemonic: string, password?: string): string {\n if (!password) { password = \"\"; }\n\n const salt = toUtf8Bytes(\"mnemonic\" + password, UnicodeNormalizationForm.NFKD);\n\n return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n}\n\nexport function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n logger.checkNormalize();\n\n const words = wordlist.split(mnemonic);\n if ((words.length % 3) !== 0) { throw new Error(\"invalid mnemonic\"); }\n\n const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8)));\n\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n if (index === -1) { throw new Error(\"invalid mnemonic\"); }\n\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n\n const entropyBits = 32 * words.length / 3;\n\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n\n const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n\n if (checksum !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\n\nexport function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n entropy = arrayify(entropy);\n\n if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n\n const indices: Array = [ 0 ];\n\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n\n remainingBits -= 8;\n\n // This byte will complete an 11-bit index\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n\n remainingBits += 3;\n }\n }\n\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits);\n\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n\n return wordlist.join(indices.map((index) => (wordlist).getWord(index)));\n}\n\nexport function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getAccountPath(index: number): string {\n if (typeof(index) !== \"number\" || index < 0 || index >= HardenedBit || index % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index);\n }\n return `m/44'/60'/${ index }'/0/0`;\n}\n","export const version = \"random/5.5.0\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Debugging line for testing browser lib in node\n//const window = { crypto: { getRandomValues: () => { } } };\n\nlet anyGlobal: any = null;\ntry {\n anyGlobal = (window as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n} catch (error) {\n try {\n anyGlobal = (global as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n } catch (error) {\n anyGlobal = { };\n }\n}\n\nlet crypto: any = anyGlobal.crypto || anyGlobal.msCrypto;\nif (!crypto || !crypto.getRandomValues) {\n\n logger.warn(\"WARNING: Missing strong random number source\");\n\n crypto = {\n getRandomValues: function(buffer: Uint8Array): Uint8Array {\n return logger.throwError(\"no secure random source avaialble\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n}\n\nexport function randomBytes(length: number): Uint8Array {\n if (length <= 0 || length > 1024 || (length % 1) || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return arrayify(result);\n};\n","\"use strict\";\n\nexport function shuffled(array: Array): Array {\n array = array.slice();\n\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n\n return array;\n}\n","\"use strict\";\n\nexport { randomBytes } from \"./random\";\nexport { shuffled } from \"./shuffle\";\n","\"use strict\";\n\n(function(root) {\n\n function checkInt(value) {\n return (parseInt(value) === value);\n }\n\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) { return false; }\n\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n\n return true;\n }\n\n function coerceArray(arg, copy) {\n\n // ArrayBuffer view\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') {\n\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n\n throw new Error('unsupported array-like object');\n }\n\n function createArray(length) {\n return new Uint8Array(length);\n }\n\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n\n\n\n var convertUtf8 = (function() {\n function toBytes(text) {\n var result = [], i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16))\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c)\n }\n }\n\n return coerceArray(result);\n }\n\n function fromBytes(bytes) {\n var result = [], i = 0;\n\n while (i < bytes.length) {\n var c = bytes[i];\n\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));\n i += 2;\n } else {\n result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));\n i += 3;\n }\n }\n\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n var convertHex = (function() {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n\n // Number of rounds by keysize\n var numberOfRounds = {16: 10, 24: 12, 32: 14}\n\n // Round constant words\n var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n // S-box and Inverse S-box (S is for Substitution)\n var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5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 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n // Transformations for encryption\n var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\n var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\n var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\n var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n // Transformations for decryption\n var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\n var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\n var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\n var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n // Transformations for decryption key expansion\n var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\n var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\n var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\n var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\n\n function convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(\n (bytes[i ] << 24) |\n (bytes[i + 1] << 16) |\n (bytes[i + 2] << 8) |\n bytes[i + 3]\n );\n }\n return result;\n }\n\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n\n this._prepare();\n }\n\n\n AES.prototype._prepare = function() {\n\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[ tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n\n tk[KC / 2] ^= (S[ tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n\n for (var i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[ tt & 0xFF]);\n }\n }\n }\n\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T1[(t[ i ] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[ t[(i + 3) % 4] & 0xff] ^\n this._Ke[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T5[(t[ i ] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[ t[(i + 1) % 4] & 0xff] ^\n this._Kd[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n\n /**\n * Mode Of Operation - Electonic Codebook (ECB)\n */\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastCipherblock = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Feedback (CFB)\n */\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 size)');\n }\n\n if (!segmentSize) { segmentSize = 1; }\n\n this.segmentSize = segmentSize;\n\n this._shiftRegister = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if ((plaintext.length % this.segmentSize) != 0) {\n throw new Error('invalid plaintext size (must be segmentSize bytes)');\n }\n\n var encrypted = coerceArray(plaintext, true);\n\n var xorSegment;\n for (var i = 0; i < encrypted.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j = 0; j < this.segmentSize; j++) {\n encrypted[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return encrypted;\n }\n\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if ((ciphertext.length % this.segmentSize) != 0) {\n throw new Error('invalid ciphertext size (must be segmentSize bytes)');\n }\n\n var plaintext = coerceArray(ciphertext, true);\n\n var xorSegment;\n for (var i = 0; i < plaintext.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n\n for (var j = 0; j < this.segmentSize; j++) {\n plaintext[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return plaintext;\n }\n\n /**\n * Mode Of Operation - Output Feedback (OFB)\n */\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n\n\n /**\n * Counter object for CTR common mode of operation\n */\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) { initialValue = 1; }\n\n if (typeof(initialValue) === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n\n } else {\n this.setBytes(initialValue);\n }\n }\n\n Counter.prototype.setValue = function(value) {\n if (typeof(value) !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = value >> 8;\n }\n }\n\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n\n this._counter = bytes;\n };\n\n Counter.prototype.increment = function() {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n }\n\n\n /**\n * Mode Of Operation - Counter (CTR)\n */\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Counter\";\n this.name = \"ctr\";\n\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter)\n }\n\n this._counter = counter;\n\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n\n\n ///////////////////////\n // Padding\n\n // See:https://tools.ietf.org/html/rfc2315\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - (data.length % 16);\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n }\n\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }\n\n var padder = data[data.length - 1];\n if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }\n\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n\n ///////////////////////\n // Exporting\n\n\n // The block cipher\n var aesjs = {\n AES: AES,\n Counter: Counter,\n\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray,\n }\n };\n\n\n // node.js\n if (typeof exports !== 'undefined') {\n module.exports = aesjs\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(aesjs);\n\n // Web Browsers\n } else {\n\n // If there was an existing library at \"aesjs\" make sure it's still available\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n\n root.aesjs = aesjs;\n }\n\n\n})(this);\n","export const version = \"json-wallets/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, Bytes, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings';\n\nexport function looseArrayify(hexString: string): Uint8Array {\n if (typeof(hexString) === 'string' && hexString.substring(0, 2) !== '0x') {\n hexString = '0x' + hexString;\n }\n return arrayify(hexString);\n}\n\nexport function zpad(value: String | number, length: number): String {\n value = String(value);\n while (value.length < length) { value = '0' + value; }\n return value;\n}\n\nexport function getPassword(password: Bytes | string): Uint8Array {\n if (typeof(password) === 'string') {\n return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC);\n }\n return arrayify(password);\n}\n\nexport function searchPath(object: any, path: string): string {\n let currentChild = object;\n\n const comps = path.toLowerCase().split('/');\n for (let i = 0; i < comps.length; i++) {\n\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comps[i]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n\n // Didn't find one. :'(\n if (matchingChild === null) {\n return null;\n }\n\n // Now check this child...\n currentChild = matchingChild;\n }\n\n return currentChild;\n}\n\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\nexport function uuidV4(randomBytes: BytesLike): string {\n const bytes = arrayify(randomBytes);\n\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n const value = hexlify(bytes);\n\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n\n","\"use strict\";\n\nimport aes from \"aes-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { Description } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getPassword, looseArrayify, searchPath } from \"./utils\";\n\nexport interface _CrowdsaleAccount {\n address: string;\n privateKey: string;\n\n _isCrowdsaleAccount: boolean;\n}\n\nexport class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: string;\n readonly path?: string;\n\n readonly _isCrowdsaleAccount: boolean;\n\n isCrowdsaleAccount(value: any): value is CrowdsaleAccount {\n return !!(value && value._isCrowdsaleAccount);\n }\n}\n\n// See: https://github.com/ethereum/pyethsaletool\nexport function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount {\n const data = JSON.parse(json);\n\n password = getPassword(password);\n\n // Ethereum Address\n const ethaddr = getAddress(searchPath(data, \"ethaddr\"));\n\n // Encrypted Seed\n const encseed = looseArrayify(searchPath(data, \"encseed\"));\n if (!encseed || (encseed.length % 16) !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n\n const key = arrayify(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n\n // Decrypt the seed\n const aesCbc = new aes.ModeOfOperation.cbc(key, iv);\n const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed)));\n\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n\n const seedHexBytes = toUtf8Bytes(seedHex);\n\n const privateKey = keccak256(seedHexBytes);\n\n return new CrowdsaleAccount ({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey: privateKey\n });\n}\n\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\n\n\nexport function isCrowdsaleWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n return (data.encseed && data.ethaddr);\n}\n\nexport function isKeystoreWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n\n // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff\n return true;\n}\n\n//export function isJsonWallet(json: string): boolean {\n// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json));\n//}\n\nexport function getJsonWalletAddress(json: string): string {\n if (isCrowdsaleWallet(json)) {\n try {\n return getAddress(JSON.parse(json).ethaddr);\n } catch (error) { return null; }\n }\n\n if (isKeystoreWallet(json)) {\n try {\n return getAddress(JSON.parse(json).address);\n } catch (error) { return null; }\n }\n\n return null;\n}\n\n","\"use strict\";\n\n(function(root) {\n const MAX_VALUE = 0x7fffffff;\n\n // The SHA256 and PBKDF2 implementation are from scrypt-async-js:\n // See: https://github.com/dchest/scrypt-async-js\n function SHA256(m) {\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ]);\n\n let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;\n let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;\n const w = new Uint32Array(64);\n\n function blocks(p) {\n let off = 0, len = p.length;\n while (len >= 64) {\n let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;\n\n for (i = 0; i < 16; i++) {\n j = off + i*4;\n w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |\n ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);\n }\n\n for (i = 16; i < 64; i++) {\n u = w[i-2];\n t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);\n\n u = w[i-15];\n t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);\n\n w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;\n }\n\n for (i = 0; i < 64; i++) {\n t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^\n ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n\n t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^\n ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n\n h0 = (h0 + a) | 0;\n h1 = (h1 + b) | 0;\n h2 = (h2 + c) | 0;\n h3 = (h3 + d) | 0;\n h4 = (h4 + e) | 0;\n h5 = (h5 + f) | 0;\n h6 = (h6 + g) | 0;\n h7 = (h7 + h) | 0;\n\n off += 64;\n len -= 64;\n }\n }\n\n blocks(m);\n\n let i, bytesLeft = m.length % 64,\n bitLenHi = (m.length / 0x20000000) | 0,\n bitLenLo = m.length << 3,\n numZeros = (bytesLeft < 56) ? 56 : 120,\n p = m.slice(m.length - bytesLeft, m.length);\n\n p.push(0x80);\n for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }\n p.push((bitLenHi >>> 24) & 0xff);\n p.push((bitLenHi >>> 16) & 0xff);\n p.push((bitLenHi >>> 8) & 0xff);\n p.push((bitLenHi >>> 0) & 0xff);\n p.push((bitLenLo >>> 24) & 0xff);\n p.push((bitLenLo >>> 16) & 0xff);\n p.push((bitLenLo >>> 8) & 0xff);\n p.push((bitLenLo >>> 0) & 0xff);\n\n blocks(p);\n\n return [\n (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff,\n (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff,\n (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff,\n (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff,\n (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff,\n (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff,\n (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff,\n (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff\n ];\n }\n\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n // compress password if it's longer than hash block length\n password = (password.length <= 64) ? password : SHA256(password);\n\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n\n let i;\n let dk = [];\n\n // inner = (password ^ ipad) || salt || counter\n for (i = 0; i < 64; i++) { inner[i] = 0x36; }\n for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; }\n for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; }\n for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; }\n\n // outerKey = password ^ opad\n for (i = 0; i < 64; i++) outerKey[i] = 0x5c;\n for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];\n\n // increments counter inside inner\n function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }\n\n // output blocks = SHA256(outerKey || SHA256(inner)) ...\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));\n }\n\n return dk;\n }\n\n // The following is an adaptation of scryptsy\n // See: https://www.npmjs.com/package/scryptsy\n function blockmix_salsa8(BY, Yi, r, x, _X) {\n let i;\n\n arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);\n for (i = 0; i < 2 * r; i++) {\n blockxor(BY, i * 16, _X, 16);\n salsa20_8(_X, x);\n arraycopy(_X, 0, BY, Yi + (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);\n }\n }\n\n function R(a, b) {\n return (a << b) | (a >>> (32 - b));\n }\n\n function salsa20_8(B, x) {\n arraycopy(B, 0, x, 0, 16);\n\n for (let i = 8; i > 0; i -= 2) {\n x[ 4] ^= R(x[ 0] + x[12], 7);\n x[ 8] ^= R(x[ 4] + x[ 0], 9);\n x[12] ^= R(x[ 8] + x[ 4], 13);\n x[ 0] ^= R(x[12] + x[ 8], 18);\n x[ 9] ^= R(x[ 5] + x[ 1], 7);\n x[13] ^= R(x[ 9] + x[ 5], 9);\n x[ 1] ^= R(x[13] + x[ 9], 13);\n x[ 5] ^= R(x[ 1] + x[13], 18);\n x[14] ^= R(x[10] + x[ 6], 7);\n x[ 2] ^= R(x[14] + x[10], 9);\n x[ 6] ^= R(x[ 2] + x[14], 13);\n x[10] ^= R(x[ 6] + x[ 2], 18);\n x[ 3] ^= R(x[15] + x[11], 7);\n x[ 7] ^= R(x[ 3] + x[15], 9);\n x[11] ^= R(x[ 7] + x[ 3], 13);\n x[15] ^= R(x[11] + x[ 7], 18);\n x[ 1] ^= R(x[ 0] + x[ 3], 7);\n x[ 2] ^= R(x[ 1] + x[ 0], 9);\n x[ 3] ^= R(x[ 2] + x[ 1], 13);\n x[ 0] ^= R(x[ 3] + x[ 2], 18);\n x[ 6] ^= R(x[ 5] + x[ 4], 7);\n x[ 7] ^= R(x[ 6] + x[ 5], 9);\n x[ 4] ^= R(x[ 7] + x[ 6], 13);\n x[ 5] ^= R(x[ 4] + x[ 7], 18);\n x[11] ^= R(x[10] + x[ 9], 7);\n x[ 8] ^= R(x[11] + x[10], 9);\n x[ 9] ^= R(x[ 8] + x[11], 13);\n x[10] ^= R(x[ 9] + x[ 8], 18);\n x[12] ^= R(x[15] + x[14], 7);\n x[13] ^= R(x[12] + x[15], 9);\n x[14] ^= R(x[13] + x[12], 13);\n x[15] ^= R(x[14] + x[13], 18);\n }\n\n for (let i = 0; i < 16; ++i) {\n B[i] += x[i];\n }\n }\n\n // naive approach... going back to loop unrolling may yield additional performance\n function blockxor(S, Si, D, len) {\n for (let i = 0; i < len; i++) {\n D[i] ^= S[Si + i]\n }\n }\n\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n\n function checkBufferish(o) {\n if (!o || typeof(o.length) !== 'number') { return false; }\n\n for (let i = 0; i < o.length; i++) {\n const v = o[i];\n if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) {\n return false;\n }\n }\n\n return true;\n }\n\n function ensureInteger(value, name) {\n if (typeof(value) !== \"number\" || (value % 1)) { throw new Error('invalid ' + name); }\n return value;\n }\n\n // N = Cpu cost, r = Memory cost, p = parallelization cost\n // callback(error, progress, key)\n function _scrypt(password, salt, N, r, p, dkLen, callback) {\n\n N = ensureInteger(N, 'N');\n r = ensureInteger(r, 'r');\n p = ensureInteger(p, 'p');\n\n dkLen = ensureInteger(dkLen, 'dkLen');\n\n if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }\n\n if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }\n if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }\n\n if (!checkBufferish(password)) {\n throw new Error('password must be an array or buffer');\n }\n password = Array.prototype.slice.call(password);\n\n if (!checkBufferish(salt)) {\n throw new Error('salt must be an array or buffer');\n }\n salt = Array.prototype.slice.call(salt);\n\n let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);\n const B = new Uint32Array(p * 32 * r)\n for (let i = 0; i < B.length; i++) {\n const j = i * 4;\n B[i] = ((b[j + 3] & 0xff) << 24) |\n ((b[j + 2] & 0xff) << 16) |\n ((b[j + 1] & 0xff) << 8) |\n ((b[j + 0] & 0xff) << 0);\n }\n\n const XY = new Uint32Array(64 * r);\n const V = new Uint32Array(32 * r * N);\n\n const Yi = 32 * r;\n\n // scratch space\n const x = new Uint32Array(16); // salsa20_8\n const _X = new Uint32Array(16); // blockmix_salsa8\n\n const totalOps = p * N * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n\n // Set this to true to abandon the scrypt on the next step\n let stop = false;\n\n // State information\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n\n // How many blockmix_salsa8 can we do per step?\n const limit = callback ? parseInt(1000 / r): 0xffffffff;\n\n // Trick from scrypt-async; if there is a setImmediate shim in place, use it\n const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;\n\n // This is really all I changed; making scryptsy a state machine so we occasionally\n // stop and give other evnts on the evnt loop a chance to run. ~RicMoo\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error('cancelled'), currentOp / totalOps);\n }\n\n let steps;\n\n switch (state) {\n case 0:\n // for (var i = 0; i < p; i++)...\n Bi = i0 * 32 * r;\n\n arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1\n\n state = 1; // Move to ROMix 2\n i1 = 0;\n\n // Fall through\n\n case 1:\n\n // Run up to 1000 steps of the first inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 2\n arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4\n }\n\n // for (var i = 0; i < N; i++)\n i1 += steps;\n currentOp += steps;\n\n if (callback) {\n // Call the callback with the progress (optionally stopping us)\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n i1 = 0; // Move to ROMix 6\n state = 2;\n\n // Fall through\n\n case 2:\n\n // Run up to 1000 steps of the second inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 6\n const offset = (2 * r - 1) * 16; // ROMix - 7\n const j = XY[offset] & (N - 1);\n blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner)\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer)\n }\n\n // for (var i = 0; i < N; i++)...\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n if (callback) {\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10\n\n // for (var i = 0; i < p; i++)...\n i0++;\n if (i0 < p) {\n state = 0;\n break;\n }\n\n b = [];\n for (let i = 0; i < B.length; i++) {\n b.push((B[i] >> 0) & 0xff);\n b.push((B[i] >> 8) & 0xff);\n b.push((B[i] >> 16) & 0xff);\n b.push((B[i] >> 24) & 0xff);\n }\n\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);\n\n // Send the result to the callback\n if (callback) { callback(null, 1.0, derivedKey); }\n\n // Done; don't break (which would reschedule)\n return derivedKey;\n }\n\n // Schedule the next steps\n if (callback) { nextTick(incrementalSMix); }\n }\n\n // Run the smix state machine until completion\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != undefined) { return derivedKey; }\n }\n }\n\n // Bootstrap the async incremental smix\n incrementalSMix();\n }\n\n const lib = {\n scrypt: function(password, salt, N, r, p, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) { progressCallback(0); }\n _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N, r, p, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen));\n }\n };\n\n // node.js\n if (typeof(exports) !== 'undefined') {\n module.exports = lib;\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(lib);\n\n // Web Browsers\n } else if (root) {\n\n // If there was an existing library \"scrypt\", make sure it is still available\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n\n root.scrypt = lib;\n }\n\n})(this);\n","\"use strict\";\n\nimport aes from \"aes-js\";\nimport scrypt from \"scrypt-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\nimport { defaultPath, entropyToMnemonic, HDNode, Mnemonic, mnemonicToEntropy } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 as _pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { Description } from \"@ethersproject/properties\";\nimport { computeAddress } from \"@ethersproject/transactions\";\n\nimport { getPassword, looseArrayify, searchPath, uuidV4, zpad } from \"./utils\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Exported Types\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n return (value != null && value.mnemonic && value.mnemonic.phrase);\n}\n\nexport interface _KeystoreAccount {\n address: string;\n privateKey: string;\n mnemonic?: Mnemonic;\n\n _isKeystoreAccount: boolean;\n}\n\nexport class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: Mnemonic;\n\n readonly _isKeystoreAccount: boolean;\n\n isKeystoreAccount(value: any): value is KeystoreAccount {\n return !!(value && value._isKeystoreAccount);\n }\n}\n\nexport type ProgressCallback = (percent: number) => void;\n\nexport type EncryptOptions = {\n iv?: BytesLike;\n entropy?: BytesLike;\n client?: string;\n salt?: BytesLike;\n uuid?: string;\n scrypt?: {\n N?: number;\n r?: number;\n p?: number;\n }\n}\n\nfunction _decrypt(data: any, key: Uint8Array, ciphertext: Uint8Array): Uint8Array {\n const cipher = searchPath(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n const iv = looseArrayify(searchPath(data, \"crypto/cipherparams/iv\"))\n const counter = new aes.Counter(iv);\n\n const aesCtr = new aes.ModeOfOperation.ctr(key, counter);\n\n return arrayify(aesCtr.decrypt(ciphertext));\n }\n\n return null;\n}\n\nfunction _getAccount(data: any, key: Uint8Array): KeystoreAccount {\n const ciphertext = looseArrayify(searchPath(data, \"crypto/ciphertext\"));\n\n const computedMAC = hexlify(keccak256(concat([ key.slice(16, 32), ciphertext ]))).substring(2);\n if (computedMAC !== searchPath(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n\n const privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n\n const mnemonicKey = key.slice(32, 64);\n\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") { check = \"0x\" + check; }\n\n if (getAddress(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n\n const account: _KeystoreAccount = {\n _isKeystoreAccount: true,\n address: address,\n privateKey: hexlify(privateKey)\n };\n\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n if (searchPath(data, \"x-ethers/version\") === \"0.1\") {\n const mnemonicCiphertext = looseArrayify(searchPath(data, \"x-ethers/mnemonicCiphertext\"));\n const mnemonicIv = looseArrayify(searchPath(data, \"x-ethers/mnemonicCounter\"));\n\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n\n const path = searchPath(data, \"x-ethers/path\") || defaultPath;\n const locale = searchPath(data, \"x-ethers/locale\") || \"en\";\n\n const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n\n try {\n const mnemonic = entropyToMnemonic(entropy, locale);\n const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n\n account.mnemonic = node.mnemonic;\n\n } catch (error) {\n // If we don't have the locale wordlist installed to\n // read this mnemonic, just bail and don't set the\n // mnemonic\n if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n\n return new KeystoreAccount(account);\n}\n\ntype ScryptFunc = (pw: Uint8Array, salt: Uint8Array, n: number, r: number, p: number, dkLen: number, callback?: ProgressCallback) => T;\ntype Pbkdf2Func = (pw: Uint8Array, salt: Uint8Array, c: number, dkLen: number, prfFunc: string) => T;\n\nfunction pbkdf2Sync(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Uint8Array {\n return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction pbkdf2(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Promise {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction _computeKdfKey(data: any, password: Bytes | string, pbkdf2Func: Pbkdf2Func, scryptFunc: ScryptFunc, progressCallback?: ProgressCallback): T {\n const passwordBytes = getPassword(password);\n\n const kdf = searchPath(data, \"crypto/kdf\");\n\n if (kdf && typeof(kdf) === \"string\") {\n const throwError = function(name: string, value: any): never {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n }\n\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n const N = parseInt(searchPath(data, \"crypto/kdfparams/n\"));\n const r = parseInt(searchPath(data, \"crypto/kdfparams/r\"));\n const p = parseInt(searchPath(data, \"crypto/kdfparams/p\"));\n\n // Check for all required parameters\n if (!N || !r || !p) { throwError(\"kdf\", kdf); }\n\n // Make sure N is a power of 2\n if ((N & (N - 1)) !== 0) { throwError(\"N\", N); }\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback);\n\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n\n let prfFunc: string = null;\n const prf = searchPath(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n\n const count = parseInt(searchPath(data, \"crypto/kdfparams/c\"));\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n}\n\n\nexport function decryptSync(json: string, password: Bytes | string): KeystoreAccount {\n const data = JSON.parse(json);\n\n const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt);\n return _getAccount(data, key);\n}\n\nexport async function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n const data = JSON.parse(json);\n\n const key = await _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback);\n return _getAccount(data, key);\n}\n\n\nexport function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise {\n\n try {\n // Check the address matches the private key\n if (getAddress(account.address) !== computeAddress(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n\n // Check the mnemonic (if any) matches the private key\n if (hasMnemonic(account)) {\n const mnemonic = account.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n\n } catch (e) {\n return Promise.reject(e);\n }\n\n // The options are optional, so adjust the call as needed\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) { options = {}; }\n\n const privateKey: Uint8Array = arrayify(account.privateKey);\n const passwordBytes = getPassword(password);\n\n let entropy: Uint8Array = null\n let path: string = null;\n let locale: string = null;\n if (hasMnemonic(account)) {\n const srcMnemonic = account.mnemonic;\n entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n\n let client = options.client;\n if (!client) { client = \"ethers.js\"; }\n\n // Check/generate the salt\n let salt: Uint8Array = null;\n if (options.salt) {\n salt = arrayify(options.salt);\n } else {\n salt = randomBytes(32);;\n }\n\n // Override initialization vector\n let iv: Uint8Array = null;\n if (options.iv) {\n iv = arrayify(options.iv);\n if (iv.length !== 16) { throw new Error(\"invalid iv\"); }\n } else {\n iv = randomBytes(16);\n }\n\n // Override the uuid\n let uuidRandom: Uint8Array = null;\n if (options.uuid) {\n uuidRandom = arrayify(options.uuid);\n if (uuidRandom.length !== 16) { throw new Error(\"invalid uuid\"); }\n } else {\n uuidRandom = randomBytes(16);\n }\n\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) { N = options.scrypt.N; }\n if (options.scrypt.r) { r = options.scrypt.r; }\n if (options.scrypt.p) { p = options.scrypt.p; }\n }\n\n // We take 64 bytes:\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => {\n key = arrayify(key);\n\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n\n // This will be used to encrypt the mnemonic phrase (if any)\n const mnemonicKey = key.slice(32, 64);\n\n // Encrypt the private key\n const counter = new aes.Counter(iv);\n const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter);\n const ciphertext = arrayify(aesCtr.encrypt(privateKey));\n\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]))\n\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data: { [key: string]: any } = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(salt).substring(2),\n n: N,\n dklen: 32,\n p: p,\n r: r\n },\n mac: mac.substring(2)\n }\n };\n\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (entropy) {\n const mnemonicIv = randomBytes(16);\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\"\n );\n data[\"x-ethers\"] = {\n client: client,\n gethFilename: (\"UTC--\" + timestamp + \"--\" + data.address),\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n path: path,\n locale: locale,\n version: \"0.1\"\n };\n }\n\n return JSON.stringify(data);\n });\n}\n","\"use strict\";\n\nimport { Bytes } from \"@ethersproject/bytes\";\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\n\nimport { decrypt as decryptCrowdsale } from \"./crowdsale\";\nimport { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from \"./inspect\";\nimport { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from \"./keystore\";\n\nfunction decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n if (isCrowdsaleWallet(json)) {\n if (progressCallback) { progressCallback(0); }\n const account = decryptCrowdsale(json, password)\n if (progressCallback) { progressCallback(1); }\n return Promise.resolve(account);\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystore(json, password, progressCallback);\n }\n\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n}\n\nfunction decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount {\n if (isCrowdsaleWallet(json)) {\n return decryptCrowdsale(json, password)\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystoreSync(json, password);\n }\n\n throw new Error(\"invalid JSON wallet\");\n}\n\nexport {\n decryptCrowdsale,\n\n decryptKeystore,\n decryptKeystoreSync,\n encryptKeystore,\n\n isCrowdsaleWallet,\n isKeystoreWallet,\n getJsonWalletAddress,\n\n decryptJsonWallet,\n decryptJsonWalletSync,\n\n ProgressCallback,\n EncryptOptions,\n};\n","export const version = \"wallet/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { Provider, TransactionRequest } from \"@ethersproject/abstract-provider\";\nimport { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { arrayify, Bytes, BytesLike, concat, hexDataSlice, isHexString, joinSignature, SignatureLike } from \"@ethersproject/bytes\";\nimport { hashMessage, _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { defaultPath, HDNode, entropyToMnemonic, Mnemonic } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { computeAddress, recoverAddress, serialize, UnsignedTransaction } from \"@ethersproject/transactions\";\nimport { Wordlist } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction isAccount(value: any): value is ExternallyOwnedAccount {\n return (value != null && isHexString(value.privateKey, 32) && value.address != null);\n}\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n const mnemonic = value.mnemonic;\n return (mnemonic && mnemonic.phrase);\n}\n\nexport class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner {\n\n readonly address: string;\n readonly provider: Provider;\n\n // Wrapping the _signingKey and _mnemonic in a getter function prevents\n // leaking the private key in console.log; still, be careful! :)\n readonly _signingKey: () => SigningKey;\n readonly _mnemonic: () => Mnemonic;\n\n constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider) {\n logger.checkNew(new.target, Wallet);\n\n super();\n\n if (isAccount(privateKey)) {\n const signingKey = new SigningKey(privateKey.privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n if (this.address !== getAddress(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n\n if (hasMnemonic(privateKey)) {\n const srcMnemonic = privateKey.mnemonic;\n defineReadOnly(this, \"_mnemonic\", () => (\n {\n phrase: srcMnemonic.phrase,\n path: srcMnemonic.path || defaultPath,\n locale: srcMnemonic.locale || \"en\"\n }\n ));\n const mnemonic = this.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if (computeAddress(node.privateKey) !== this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n }\n\n\n } else {\n if (SigningKey.isSigningKey(privateKey)) {\n /* istanbul ignore if */\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n defineReadOnly(this, \"_signingKey\", () => (privateKey));\n\n } else {\n // A lot of common tools do not prefix private keys with a 0x (see: #1166)\n if (typeof(privateKey) === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n }\n\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n }\n\n /* istanbul ignore if */\n if (provider && !Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n get mnemonic(): Mnemonic { return this._mnemonic(); }\n get privateKey(): string { return this._signingKey().privateKey; }\n get publicKey(): string { return this._signingKey().publicKey; }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n connect(provider: Provider): Wallet {\n return new Wallet(this, provider);\n }\n\n signTransaction(transaction: TransactionRequest): Promise {\n return resolveProperties(transaction).then((tx) => {\n if (tx.from != null) {\n if (getAddress(tx.from) !== this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n\n const signature = this._signingKey().signDigest(keccak256(serialize(tx)));\n return serialize(tx, signature);\n });\n }\n\n async signMessage(message: Bytes | string): Promise {\n return joinSignature(this._signingKey().signDigest(hashMessage(message)));\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n if (this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return this.provider.resolveName(name);\n });\n\n return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value)));\n }\n\n encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise {\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n\n if (progressCallback && typeof(progressCallback) !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n\n if (!options) { options = {}; }\n\n return encryptKeystore(this, password, options, progressCallback);\n }\n\n\n /**\n * Static methods to create Wallet instances.\n */\n static createRandom(options?: any): Wallet {\n let entropy: Uint8Array = randomBytes(16);\n\n if (!options) { options = { }; }\n\n if (options.extraEntropy) {\n entropy = arrayify(hexDataSlice(keccak256(concat([ entropy, options.extraEntropy ])), 0, 16));\n }\n\n const mnemonic = entropyToMnemonic(entropy, options.locale);\n return Wallet.fromMnemonic(mnemonic, options.path, options.locale);\n }\n\n static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n return decryptJsonWallet(json, password, progressCallback).then((account) => {\n return new Wallet(account);\n });\n }\n\n static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet {\n return new Wallet(decryptJsonWalletSync(json, password));\n }\n\n static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet {\n if (!path) { path = defaultPath; }\n return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n }\n}\n\nexport function verifyMessage(message: Bytes | string, signature: SignatureLike): string {\n return recoverAddress(hashMessage(message), signature);\n}\n\nexport function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string {\n return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature);\n}\n","export const version = \"networks/5.5.1\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Network, Networkish } from \"./types\";\n\nexport {\n Network,\n Networkish\n};\n\ntype DefaultProviderFunc = (providers: any, options?: any) => any;\n\ninterface Renetworkable extends DefaultProviderFunc {\n renetwork: (network: Network) => DefaultProviderFunc;\n};\n\nfunction isRenetworkable(value: any): value is Renetworkable {\n return (value && typeof(value.renetwork) === \"function\");\n}\n\nfunction ethDefaultProvider(network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (options == null) { options = { }; }\n const providerList: Array = [];\n\n if (providers.InfuraProvider) {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch(error) { }\n }\n\n if (providers.EtherscanProvider) {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch(error) { }\n }\n\n if (providers.AlchemyProvider) {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch(error) { }\n }\n\n if (providers.PocketProvider) {\n // These networks are currently faulty on Pocket as their\n // network does not handle the Berlin hardfork, which is\n // live on these ones.\n // @TODO: This goes away once Pocket has upgraded their nodes\n const skip = [ \"goerli\", \"ropsten\", \"rinkeby\" ];\n try {\n const provider = new providers.PocketProvider(network);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch(error) { }\n }\n\n if (providers.CloudflareProvider) {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch(error) { }\n }\n\n if (providerList.length === 0) { return null; }\n\n if (providers.FallbackProvider) {\n let quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n\n return providerList[0];\n };\n\n func.renetwork = function(network: Network) {\n return ethDefaultProvider(network);\n };\n\n return func;\n}\n\nfunction etcDefaultProvider(url: string, network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n\n return null;\n };\n\n func.renetwork = function(network: Network) {\n return etcDefaultProvider(url, network);\n };\n\n return func;\n}\n\nconst homestead: Network = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n};\n\nconst ropsten: Network = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n};\n\nconst classicMordor: Network = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n};\n\n// See: https://chainlist.org\nconst networks: { [name: string]: Network } = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n\n homestead: homestead,\n mainnet: homestead,\n\n morden: { chainId: 2, name: \"morden\" },\n\n ropsten: ropsten,\n testnet: ropsten,\n\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n\n\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/etc\", \"classic\")\n },\n\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n\n classicMordor: classicMordor,\n classicTestnet: classicMordor,\n\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/kotti\", \"classicKotti\")\n },\n\n xdai: { chainId: 100, name: \"xdai\" },\n\n matic: { chainId: 137, name: \"matic\" },\n maticmum: { chainId: 80001, name: \"maticmum\" },\n\n optimism: { chainId: 10, name: \"optimism\" },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" },\n}\n\n/**\n * getNetwork\n *\n * Converts a named common networks or chain ID (network ID) to a Network\n * and verifies a network is a valid Network..\n */\nexport function getNetwork(network: Networkish): Network {\n // No network (null)\n if (network == null) { return null; }\n\n if (typeof(network) === \"number\") {\n for (const name in networks) {\n const standard = networks[name];\n if (standard.chainId === network) {\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: (standard.ensAddress || null),\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n }\n\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n\n if (typeof(network) === \"string\") {\n const standard = networks[network];\n if (standard == null) { return null; }\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: standard.ensAddress,\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n\n const standard = networks[network.name];\n\n // Not a standard network; check that it is a valid network in general\n if (!standard) {\n if (typeof(network.chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n\n // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155)\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n\n // @TODO: In the next major version add an attach function to a defaultProvider\n // class and move the _defaultProvider internal to this file (extend Network)\n let defaultProvider: DefaultProviderFunc = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n\n // Standard Network (allow overriding the ENS address)\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: (network.ensAddress || standard.ensAddress || null),\n _defaultProvider: defaultProvider\n };\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function decode(textData: string): Uint8Array {\n textData = atob(textData);\n const data = [];\n for (let i = 0; i < textData.length; i++) {\n data.push(textData.charCodeAt(i));\n }\n return arrayify(data);\n}\n\nexport function encode(data: BytesLike): string {\n data = arrayify(data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n\n\n","\"use strict\";\n\nexport { decode, encode } from \"./base64\";\n","export const version = \"web/5.5.1\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport type { GetUrlResponse, Options } from \"./types\";\n\nexport { GetUrlResponse, Options };\n\nexport async function getUrl(href: string, options?: Options): Promise {\n if (options == null) { options = { }; }\n\n const request: RequestInit = {\n method: (options.method || \"GET\"),\n headers: (options.headers || { }),\n body: (options.body || undefined),\n };\n\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\"; // no-cors, cors, *same-origin\n request.cache = \"no-cache\"; // *default, no-cache, reload, force-cache, only-if-cached\n request.credentials = \"same-origin\"; // include, *same-origin, omit\n request.redirect = \"follow\"; // manual, *follow, error\n request.referrer = \"client\"; // no-referrer, *client\n };\n\n const response = await fetch(href, request);\n const body = await response.arrayBuffer();\n\n const headers: { [ name: string ]: string } = { };\n if (response.headers.forEach) {\n response.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n } else {\n (<() => Array>(((response.headers)).keys))().forEach((key) => {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n\n return {\n headers: headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: arrayify(new Uint8Array(body)),\n }\n}\n","\"use strict\";\n\nimport { decode as base64Decode, encode as base64Encode } from \"@ethersproject/base64\";\nimport { hexlify, isBytesLike } from \"@ethersproject/bytes\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getUrl, GetUrlResponse, Options } from \"./geturl\";\n\nfunction staller(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\nfunction bodyify(value: any, type: string): string {\n if (value == null) { return null; }\n\n if (typeof(value) === \"string\") { return value; }\n\n if (isBytesLike(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return toUtf8String(value);\n } catch (error) { };\n }\n return hexlify(value);\n }\n\n return value;\n}\n\n// Exported Types\nexport type ConnectionInfo = {\n url: string,\n headers?: { [key: string]: string | number }\n\n user?: string,\n password?: string,\n\n allowInsecureAuthentication?: boolean,\n allowGzip?: boolean,\n\n throttleLimit?: number,\n throttleSlotInterval?: number;\n throttleCallback?: (attempt: number, url: string) => Promise,\n\n timeout?: number,\n};\n\nexport interface OnceBlockable {\n once(eventName: \"block\", handler: () => void): void;\n}\n\nexport interface OncePollable {\n once(eventName: \"poll\", handler: () => void): void;\n}\n\nexport type PollOptions = {\n timeout?: number,\n floor?: number,\n ceiling?: number,\n interval?: number,\n retryLimit?: number,\n onceBlock?: OnceBlockable\n oncePoll?: OncePollable\n};\n\nexport type FetchJsonResponse = {\n statusCode: number;\n headers: { [ header: string ]: string };\n};\n\n\ntype Header = { key: string, value: string };\n\n// This API is still a work in progress; the future changes will likely be:\n// - ConnectionInfo => FetchDataRequest\n// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }\n// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified)\n// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T\n// For this reason, it should be considered internal until the API is finalized\nexport function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise {\n\n // How many times to retry in the event of a throttle\n const attemptLimit = (typeof(connection) === \"object\" && connection.throttleLimit != null) ? connection.throttleLimit: 12;\n logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0),\n \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n\n const throttleCallback = ((typeof(connection) === \"object\") ? connection.throttleCallback: null);\n const throttleSlotInterval = ((typeof(connection) === \"object\" && typeof(connection.throttleSlotInterval) === \"number\") ? connection.throttleSlotInterval: 100);\n logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0),\n \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n\n const headers: { [key: string]: Header } = { };\n\n let url: string = null;\n\n // @TODO: Allow ConnectionInfo to override some of these values\n const options: Options = {\n method: \"GET\",\n };\n\n let allow304 = false;\n\n let timeout = 2 * 60 * 1000;\n\n if (typeof(connection) === \"string\") {\n url = connection;\n\n } else if (typeof(connection) === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n\n url = connection.url;\n\n if (typeof(connection.timeout) === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n\n if (connection.headers) {\n for (const key in connection.headers) {\n headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n\n options.allowGzip = !!connection.allowGzip;\n\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\n \"basic authentication requires a secure https url\",\n Logger.errors.INVALID_ARGUMENT,\n { argument: \"url\", url: url, user: connection.user, password: \"[REDACTED]\" }\n );\n }\n\n const authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + base64Encode(toUtf8Bytes(authorization))\n };\n }\n }\n const reData = new RegExp(\"^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$\", \"i\");\n const dataMatch = ((url) ? url.match(reData): null);\n if (dataMatch) {\n try {\n const response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] },\n body: base64Decode(dataMatch[2])\n };\n\n let result: T = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n\n } catch (error) {\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error: error,\n requestBody: null,\n requestMethod: \"GET\",\n url: url\n });\n }\n }\n\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n\n const flatHeaders: { [ key: string ]: string } = { };\n Object.keys(headers).forEach((key) => {\n const header = headers[key];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n\n const runningTimeout = (function() {\n let timer: NodeJS.Timer = null;\n const promise: Promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(() => {\n if (timer == null) { return; }\n timer = null;\n\n reject(logger.makeError(\"timeout\", Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout: timeout,\n url: url\n }));\n }, timeout);\n }\n });\n\n const cancel = function() {\n if (timer == null) { return; }\n clearTimeout(timer);\n timer = null;\n }\n\n return { promise, cancel };\n })();\n\n const runningFetch = (async function() {\n\n for (let attempt = 0; attempt < attemptLimit; attempt++) {\n let response: GetUrlResponse = null;\n\n try {\n response = await getUrl(url, options);\n\n if (attempt < attemptLimit) {\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirection; for now we only support absolute locataions\n const location = response.headers.location || \"\";\n if (options.method === \"GET\" && location.match(/^https:/)) {\n url = response.headers.location;\n continue;\n }\n\n } else if (response.statusCode === 429) {\n // Exponential back-off throttling\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n let stall = 0;\n\n const retryAfter = response.headers[\"retry-after\"];\n if (typeof(retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1000;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n\n //console.log(\"Stalling 429\");\n await staller(stall);\n continue;\n }\n }\n }\n\n } catch (error) {\n response = (error).response;\n if (response == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error,\n url: url\n });\n }\n }\n\n\n let body = response.body;\n\n if (allow304 && response.statusCode === 304) {\n body = null;\n\n } else if (response.statusCode < 200 || response.statusCode >= 300) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", Logger.errors.SERVER_ERROR, {\n status: response.statusCode,\n headers: response.headers,\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n\n if (processFunc) {\n try {\n const result = await processFunc(body, response);\n runningTimeout.cancel();\n return result;\n\n } catch (error) {\n // Allow the processFunc to trigger a throttle\n if (error.throttleRetry && attempt < attemptLimit) {\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n //console.log(\"Stalling callback\");\n await staller(timeout);\n continue;\n }\n }\n\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n error: error,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n }\n\n runningTimeout.cancel();\n\n // If we had a processFunc, it either returned a T or threw above.\n // The \"body\" is now a Uint8Array.\n return (body);\n }\n\n return logger.throwError(\"failed response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n })();\n\n return Promise.race([ runningTimeout.promise, runningFetch ]);\n}\n\nexport function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise {\n let processJsonFunc = (value: Uint8Array, response: FetchJsonResponse) => {\n let result: any = null;\n if (value != null) {\n try {\n result = JSON.parse(toUtf8String(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", Logger.errors.SERVER_ERROR, {\n body: value,\n error: error\n });\n }\n }\n\n if (processFunc) {\n result = processFunc(result, response);\n }\n\n return result;\n }\n\n // If we have json to send, we must\n // - add content-type of application/json (unless already overridden)\n // - convert the json to bytes\n let body: Uint8Array = null;\n if (json != null) {\n body = toUtf8Bytes(json);\n\n // Create a connection with the content-type set for JSON\n const updated: ConnectionInfo = (typeof(connection) === \"string\") ? ({ url: connection }): shallowCopy(connection);\n if (updated.headers) {\n const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === \"content-type\")).length) !== 0;\n if (!hasContentType) {\n updated.headers = shallowCopy(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n\n return _fetchData(connection, body, processJsonFunc);\n}\n\nexport function poll(func: () => Promise, options?: PollOptions): Promise {\n if (!options) { options = {}; }\n options = shallowCopy(options);\n if (options.floor == null) { options.floor = 0; }\n if (options.ceiling == null) { options.ceiling = 10000; }\n if (options.interval == null) { options.interval = 250; }\n\n return new Promise(function(resolve, reject) {\n\n let timer: NodeJS.Timer = null;\n let done: boolean = false;\n\n // Returns true if cancel was successful. Unsuccessful cancel means we're already done.\n const cancel = (): boolean => {\n if (done) { return false; }\n done = true;\n if (timer) { clearTimeout(timer); }\n return true;\n };\n\n if (options.timeout) {\n timer = setTimeout(() => {\n if (cancel()) { reject(new Error(\"timeout\")); }\n }, options.timeout)\n }\n\n const retryLimit = options.retryLimit;\n\n let attempt = 0;\n function check() {\n return func().then(function(result) {\n\n // If we have a result, or are allowed null then we're done\n if (result !== undefined) {\n if (cancel()) { resolve(result); }\n\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n\n // Otherwise, exponential back-off (up to 10s) our next request\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) { reject(new Error(\"retry limit reached\")); }\n return;\n }\n\n let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) { timeout = options.floor; }\n if (timeout > options.ceiling) { timeout = options.ceiling; }\n\n setTimeout(check, timeout);\n }\n\n return null;\n }, function(error) {\n if (cancel()) { reject(error); }\n });\n }\n check();\n });\n}\n\n","'use strict'\nvar ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'\n\n// pre-compute lookup table\nvar ALPHABET_MAP = {}\nfor (var z = 0; z < ALPHABET.length; z++) {\n var x = ALPHABET.charAt(z)\n\n if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\n ALPHABET_MAP[x] = z\n}\n\nfunction polymodStep (pre) {\n var b = pre >> 25\n return ((pre & 0x1FFFFFF) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3)\n}\n\nfunction prefixChk (prefix) {\n var chk = 1\n for (var i = 0; i < prefix.length; ++i) {\n var c = prefix.charCodeAt(i)\n if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')'\n\n chk = polymodStep(chk) ^ (c >> 5)\n }\n chk = polymodStep(chk)\n\n for (i = 0; i < prefix.length; ++i) {\n var v = prefix.charCodeAt(i)\n chk = polymodStep(chk) ^ (v & 0x1f)\n }\n return chk\n}\n\nfunction encode (prefix, words, LIMIT) {\n LIMIT = LIMIT || 90\n if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit')\n\n prefix = prefix.toLowerCase()\n\n // determine chk mod\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') throw new Error(chk)\n\n var result = prefix + '1'\n for (var i = 0; i < words.length; ++i) {\n var x = words[i]\n if ((x >> 5) !== 0) throw new Error('Non 5-bit word')\n\n chk = polymodStep(chk) ^ x\n result += ALPHABET.charAt(x)\n }\n\n for (i = 0; i < 6; ++i) {\n chk = polymodStep(chk)\n }\n chk ^= 1\n\n for (i = 0; i < 6; ++i) {\n var v = (chk >> ((5 - i) * 5)) & 0x1f\n result += ALPHABET.charAt(v)\n }\n\n return result\n}\n\nfunction __decode (str, LIMIT) {\n LIMIT = LIMIT || 90\n if (str.length < 8) return str + ' too short'\n if (str.length > LIMIT) return 'Exceeds length limit'\n\n // don't allow mixed case\n var lowered = str.toLowerCase()\n var uppered = str.toUpperCase()\n if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str\n str = lowered\n\n var split = str.lastIndexOf('1')\n if (split === -1) return 'No separator character for ' + str\n if (split === 0) return 'Missing prefix for ' + str\n\n var prefix = str.slice(0, split)\n var wordChars = str.slice(split + 1)\n if (wordChars.length < 6) return 'Data too short'\n\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') return chk\n\n var words = []\n for (var i = 0; i < wordChars.length; ++i) {\n var c = wordChars.charAt(i)\n var v = ALPHABET_MAP[c]\n if (v === undefined) return 'Unknown character ' + c\n chk = polymodStep(chk) ^ v\n\n // not in the checksum?\n if (i + 6 >= wordChars.length) continue\n words.push(v)\n }\n\n if (chk !== 1) return 'Invalid checksum for ' + str\n return { prefix: prefix, words: words }\n}\n\nfunction decodeUnsafe () {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n}\n\nfunction decode (str) {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n\n throw new Error(res)\n}\n\nfunction convert (data, inBits, outBits, pad) {\n var value = 0\n var bits = 0\n var maxV = (1 << outBits) - 1\n\n var result = []\n for (var i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i]\n bits += inBits\n\n while (bits >= outBits) {\n bits -= outBits\n result.push((value >> bits) & maxV)\n }\n }\n\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV)\n }\n } else {\n if (bits >= inBits) return 'Excess padding'\n if ((value << (outBits - bits)) & maxV) return 'Non-zero padding'\n }\n\n return result\n}\n\nfunction toWordsUnsafe (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n}\n\nfunction toWords (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nfunction fromWordsUnsafe (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n}\n\nfunction fromWords (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nmodule.exports = {\n decodeUnsafe: decodeUnsafe,\n decode: decode,\n encode: encode,\n toWordsUnsafe: toWordsUnsafe,\n toWords: toWords,\n fromWordsUnsafe: fromWordsUnsafe,\n fromWords: fromWords\n}\n","export const version = \"providers/5.5.1\";\n","\"use strict\";\n\nimport { Block, TransactionReceipt, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { AddressZero } from \"@ethersproject/constants\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, parse as parseTransaction } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport type FormatFunc = (value: any) => any;\n\nexport type FormatFuncs = { [ key: string ]: FormatFunc };\n\nexport type Formats = {\n transaction: FormatFuncs,\n transactionRequest: FormatFuncs,\n receipt: FormatFuncs,\n receiptLog: FormatFuncs,\n block: FormatFuncs,\n blockWithTransactions: FormatFuncs,\n filter: FormatFuncs,\n filterLog: FormatFuncs,\n};\n\nexport class Formatter {\n readonly formats: Formats;\n\n constructor() {\n logger.checkNew(new.target, Formatter);\n this.formats = this.getDefaultFormats();\n }\n\n getDefaultFormats(): Formats {\n const formats: Formats = ({ });\n\n const address = this.address.bind(this);\n const bigNumber = this.bigNumber.bind(this);\n const blockTag = this.blockTag.bind(this);\n const data = this.data.bind(this);\n const hash = this.hash.bind(this);\n const hex = this.hex.bind(this);\n const number = this.number.bind(this);\n const type = this.type.bind(this);\n\n const strictData = (v: any) => { return this.data(v, true); };\n\n formats.transaction = {\n hash: hash,\n\n type: type,\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n\n blockHash: Formatter.allowNull(hash, null),\n blockNumber: Formatter.allowNull(number, null),\n transactionIndex: Formatter.allowNull(number, null),\n\n confirmations: Formatter.allowNull(number, null),\n\n from: address,\n\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n\n gasLimit: bigNumber,\n to: Formatter.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data: data,\n\n r: Formatter.allowNull(this.uint256),\n s: Formatter.allowNull(this.uint256),\n v: Formatter.allowNull(number),\n\n creates: Formatter.allowNull(address, null),\n\n raw: Formatter.allowNull(data),\n };\n\n formats.transactionRequest = {\n from: Formatter.allowNull(address),\n nonce: Formatter.allowNull(number),\n gasLimit: Formatter.allowNull(bigNumber),\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n to: Formatter.allowNull(address),\n value: Formatter.allowNull(bigNumber),\n data: Formatter.allowNull(strictData),\n type: Formatter.allowNull(number),\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n };\n\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash,\n address: address,\n topics: Formatter.arrayOf(hash),\n data: data,\n logIndex: number,\n blockHash: hash,\n };\n\n formats.receipt = {\n to: Formatter.allowNull(this.address, null),\n from: Formatter.allowNull(this.address, null),\n contractAddress: Formatter.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter.allowNull(data),// @TODO: should this be data?\n blockHash: hash,\n transactionHash: hash,\n logs: Formatter.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter.allowNull(bigNumber),\n status: Formatter.allowNull(number),\n type: type\n };\n\n formats.block = {\n hash: hash,\n parentHash: hash,\n number: number,\n\n timestamp: number,\n nonce: Formatter.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n\n miner: address,\n extraData: data,\n\n transactions: Formatter.allowNull(Formatter.arrayOf(hash)),\n\n baseFeePerGas: Formatter.allowNull(bigNumber)\n };\n\n formats.blockWithTransactions = shallowCopy(formats.block);\n formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));\n\n formats.filter = {\n fromBlock: Formatter.allowNull(blockTag, undefined),\n toBlock: Formatter.allowNull(blockTag, undefined),\n blockHash: Formatter.allowNull(hash, undefined),\n address: Formatter.allowNull(address, undefined),\n topics: Formatter.allowNull(this.topics.bind(this), undefined),\n };\n\n formats.filterLog = {\n blockNumber: Formatter.allowNull(number),\n blockHash: Formatter.allowNull(hash),\n transactionIndex: number,\n\n removed: Formatter.allowNull(this.boolean.bind(this)),\n\n address: address,\n data: Formatter.allowFalsish(data, \"0x\"),\n\n topics: Formatter.arrayOf(hash),\n\n transactionHash: hash,\n logIndex: number,\n };\n\n return formats;\n }\n\n accessList(accessList: Array): AccessList {\n return accessListify(accessList || []);\n }\n\n // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number\n // Strict! Used on input.\n number(number: any): number {\n if (number === \"0x\") { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n type(number: any): number {\n if (number === \"0x\" || number == null) { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n // Strict! Used on input.\n bigNumber(value: any): BigNumber {\n return BigNumber.from(value);\n }\n\n // Requires a boolean, \"true\" or \"false\"; returns a boolean\n boolean(value: any): boolean {\n if (typeof(value) === \"boolean\") { return value; }\n if (typeof(value) === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") { return true; }\n if (value === \"false\") { return false; }\n }\n throw new Error(\"invalid boolean - \" + value);\n }\n\n hex(value: any, strict?: boolean): string {\n if (typeof(value) === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n if (isHexString(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n\n data(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if ((result.length % 2) !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n }\n\n // Requires an address\n // Strict! Used on input.\n address(value: any): string {\n return getAddress(value);\n }\n\n callAddress(value: any): string {\n if (!isHexString(value, 32)) { return null; }\n const address = getAddress(hexDataSlice(value, 12));\n return (address === AddressZero) ? null: address;\n }\n\n contractAddress(value: any): string {\n return getContractAddress(value);\n }\n\n // Strict! Used on input.\n blockTag(blockTag: any): string {\n if (blockTag == null) { return \"latest\"; }\n\n if (blockTag === \"earliest\") { return \"0x0\"; }\n\n if (blockTag === \"latest\" || blockTag === \"pending\") {\n return blockTag;\n }\n\n if (typeof(blockTag) === \"number\" || isHexString(blockTag)) {\n return hexValue(blockTag);\n }\n\n throw new Error(\"invalid blockTag\");\n }\n\n // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash.\n hash(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if (hexDataLength(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n }\n\n // Returns the difficulty as a number, or if too large (i.e. PoA network) null\n difficulty(value: any): number {\n if (value == null) { return null; }\n\n const v = BigNumber.from(value);\n\n try {\n return v.toNumber();\n } catch (error) { }\n\n return null;\n }\n\n uint256(value: any): string {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return hexZeroPad(value, 32);\n }\n\n _block(value: any, format: any): Block {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n // The difficulty may need to come from _difficulty in recursed blocks\n const difficulty = (value._difficulty != null) ? value._difficulty: value.difficulty;\n const result = Formatter.check(format, value);\n result._difficulty = ((difficulty == null) ? null: BigNumber.from(difficulty));\n return result;\n }\n\n block(value: any): Block {\n return this._block(value, this.formats.block);\n }\n\n blockWithTransactions(value: any): Block {\n return this._block(value, this.formats.blockWithTransactions);\n }\n\n // Strict! Used on input.\n transactionRequest(value: any): any {\n return Formatter.check(this.formats.transactionRequest, value);\n }\n\n transactionResponse(transaction: any): TransactionResponse {\n\n // Rename gas to gasLimit\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (transaction.to && BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n\n // Rename input to data\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n\n // If to and creates are empty, populate the creates from the transaction\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n\n if ((transaction.type === 1 || transaction.type === 2)&& transaction.accessList == null) {\n transaction.accessList = [ ];\n }\n\n const result: TransactionResponse = Formatter.check(this.formats.transaction, transaction);\n\n if (transaction.chainId != null) {\n let chainId = transaction.chainId;\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n result.chainId = chainId;\n\n } else {\n let chainId = transaction.networkId;\n\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n if (typeof(chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) { chainId = 0; }\n chainId = parseInt(chainId);\n }\n\n if (typeof(chainId) !== \"number\") { chainId = 0; }\n\n result.chainId = chainId;\n }\n\n // 0x0000... should actually be null\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n\n return result;\n }\n\n transaction(value: any): any {\n return parseTransaction(value);\n }\n\n receiptLog(value: any): any {\n return Formatter.check(this.formats.receiptLog, value);\n }\n\n receipt(value: any): TransactionReceipt {\n const result: TransactionReceipt = Formatter.check(this.formats.receipt, value);\n\n // RSK incorrectly implemented EIP-658, so we munge things a bit here for it\n if (result.root != null) {\n if (result.root.length <= 4) {\n // Could be 0x00, 0x0, 0x01 or 0x1\n const value = BigNumber.from(result.root).toNumber();\n if (value === 0 || value === 1) {\n // Make sure if both are specified, they match\n if (result.status != null && (result.status !== value)) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n // Must be a valid bytes32\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n\n if (result.status != null) {\n result.byzantium = true;\n }\n\n return result;\n }\n\n topics(value: any): any {\n if (Array.isArray(value)) {\n return value.map((v) => this.topics(v));\n\n } else if (value != null) {\n return this.hash(value, true);\n }\n\n return null;\n }\n\n filter(value: any): any {\n return Formatter.check(this.formats.filter, value);\n }\n\n filterLog(value: any): any {\n return Formatter.check(this.formats.filterLog, value);\n }\n\n static check(format: { [ name: string ]: FormatFunc }, object: any): any {\n const result: any = {};\n for (const key in format) {\n try {\n const value = format[key](object[key]);\n if (value !== undefined) { result[key] = value; }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n }\n\n // if value is null-ish, nullValue is returned\n static allowNull(format: FormatFunc, nullValue?: any): FormatFunc {\n return (function(value: any) {\n if (value == null) { return nullValue; }\n return format(value);\n });\n }\n\n // If value is false-ish, replaceValue is returned\n static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc {\n return (function(value: any) {\n if (!value) { return replaceValue; }\n return format(value);\n });\n }\n\n // Requires an Array satisfying check\n static arrayOf(format: FormatFunc): FormatFunc {\n return (function(array: any): Array {\n if (!Array.isArray(array)) { throw new Error(\"not an array\"); }\n\n const result: any = [];\n\n array.forEach(function(value) {\n result.push(format(value));\n });\n\n return result;\n });\n }\n}\n\nexport interface CommunityResourcable {\n isCommunityResource(): boolean;\n}\n\nexport function isCommunityResourcable(value: any): value is CommunityResourcable {\n return (value && typeof(value.isCommunityResource) === \"function\");\n}\n\nexport function isCommunityResource(value: any): boolean {\n return (isCommunityResourcable(value) && value.isCommunityResource());\n}\n\n// Show the throttle message only once\nlet throttleMessage = false;\nexport function showThrottleMessage() {\n if (throttleMessage) { return; }\n throttleMessage = true;\n\n console.log(\"========= NOTICE =========\")\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n}\n\n","\"use strict\";\n\nimport {\n Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, ForkEvent,\n Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse\n} from \"@ethersproject/abstract-provider\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { namehash } from \"@ethersproject/hash\";\nimport { getNetwork, Network, Networkish } from \"@ethersproject/networks\";\nimport { Deferrable, defineReadOnly, getStatic, resolveProperties } from \"@ethersproject/properties\";\nimport { Transaction } from \"@ethersproject/transactions\";\nimport { sha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { fetchJson, poll } from \"@ethersproject/web\";\n\nimport bech32 from \"bech32\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Formatter } from \"./formatter\";\n\n//////////////////////////////\n// Event Serializeing\n\nfunction checkTopic(topic: string): string {\n if (topic == null) { return \"null\"; }\n if (hexDataLength(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n}\n\nfunction serializeTopics(topics: Array>): string {\n // Remove trailing null AND-topics; they are redundant\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) { topics.pop(); }\n\n return topics.map((topic) => {\n if (Array.isArray(topic)) {\n\n // Only track unique OR-topics\n const unique: { [ topic: string ]: boolean } = { }\n topic.forEach((topic) => {\n unique[checkTopic(topic)] = true;\n });\n\n // The order of OR-topics does not matter\n const sorted = Object.keys(unique);\n sorted.sort();\n\n return sorted.join(\"|\");\n\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n}\n\nfunction deserializeTopics(data: string): Array> {\n if (data === \"\") { return [ ]; }\n\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") { return [ ]; }\n\n const comps = topic.split(\"|\").map((topic) => {\n return ((topic === \"null\") ? null: topic);\n });\n\n return ((comps.length === 1) ? comps[0]: comps);\n });\n}\n\nfunction getEventTag(eventName: EventType): string {\n if (typeof(eventName) === \"string\") {\n eventName = eventName.toLowerCase();\n\n if (hexDataLength(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n\n } else if (ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n\n } else if (eventName && typeof(eventName) === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n\n throw new Error(\"invalid event - \" + eventName);\n}\n\n//////////////////////////////\n// Helper Object\n\nfunction getTime() {\n return (new Date()).getTime();\n}\n\nfunction stall(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\n//////////////////////////////\n// Provider Object\n\n\n/**\n * EventType\n * - \"block\"\n * - \"poll\"\n * - \"didPoll\"\n * - \"pending\"\n * - \"error\"\n * - \"network\"\n * - filter\n * - topics array\n * - transaction hash\n */\n\nconst PollableEvents = [ \"block\", \"network\", \"pending\", \"poll\" ];\n\nexport class Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"listener\", listener);\n defineReadOnly(this, \"once\", once);\n }\n\n get event(): EventType {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n }\n\n get type(): string {\n return this.tag.split(\":\")[0]\n }\n\n get hash(): string {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") { return null; }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") { return null; }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = { };\n\n if (topics.length > 0) { filter.topics = topics; }\n if (address && address !== \"*\") { filter.address = address; }\n\n return filter;\n }\n\n pollable(): boolean {\n return (this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0);\n }\n}\n\nexport interface EnsResolver {\n\n // Name this Resolver is associated with\n readonly name: string;\n\n // The address of the resolver\n readonly address: string;\n\n // Multichain address resolution (also normal address resolution)\n // See: https://eips.ethereum.org/EIPS/eip-2304\n getAddress(coinType?: 60): Promise\n\n // Contenthash field\n // See: https://eips.ethereum.org/EIPS/eip-1577\n getContentHash(): Promise;\n\n // Storage of text records\n // See: https://eips.ethereum.org/EIPS/eip-634\n getText(key: string): Promise;\n};\n\nexport interface EnsProvider {\n resolveName(name: string): Promise;\n lookupAddress(address: string): Promise;\n getResolver(name: string): Promise;\n}\n\ntype CoinInfo = {\n symbol: string,\n ilk?: string, // General family\n prefix?: string, // Bech32 prefix\n p2pkh?: number, // Pay-to-Public-Key-Hash Version\n p2sh?: number, // Pay-to-Script-Hash Version\n};\n\n// https://github.com/satoshilabs/slips/blob/master/slip-0044.md\nconst coinInfos: { [ coinType: string ]: CoinInfo } = {\n \"0\": { symbol: \"btc\", p2pkh: 0x00, p2sh: 0x05, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 0x30, p2sh: 0x32, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 0x1e, p2sh: 0x16 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" },\n};\n\nfunction bytes32ify(value: number): string {\n return hexZeroPad(BigNumber.from(value).toHexString(), 32);\n}\n\n// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d)\nfunction base58Encode(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nexport interface Avatar {\n url: string;\n linkage: Array<{ type: string, content: string }>;\n}\n\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\"),\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\n\nfunction _parseString(result: string): null | string {\n try {\n return toUtf8String(_parseBytes(result));\n } catch(error) { }\n return null;\n}\n\nfunction _parseBytes(result: string): null | string {\n if (result === \"0x\") { return null; }\n\n const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber();\n const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber();\n return hexDataSlice(result, offset + 32, offset + 32 + length);\n}\n\n\nexport class Resolver implements EnsResolver {\n readonly provider: BaseProvider;\n\n readonly name: string;\n readonly address: string;\n\n readonly _resolvedAddress: null | string;\n\n // The resolvedAddress is only for creating a ReverseLookup resolver\n constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string) {\n defineReadOnly(this, \"provider\", provider);\n defineReadOnly(this, \"name\", name);\n defineReadOnly(this, \"address\", provider.formatter.address(address));\n defineReadOnly(this, \"_resolvedAddress\", resolvedAddress);\n }\n\n async _fetchBytes(selector: string, parameters?: string): Promise {\n // e.g. keccak256(\"addr(bytes32,uint256)\")\n const tx = {\n to: this.address,\n data: hexConcat([ selector, namehash(this.name), (parameters || \"0x\") ])\n };\n\n try {\n return _parseBytes(await this.provider.call(tx));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n _getAddress(coinType: number, hexBytes: string): string {\n const coinInfo = coinInfos[String(coinType)];\n\n if (coinInfo == null) {\n logger.throwError(`unsupported coin type: ${ coinType }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`\n });\n }\n\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n\n const bytes = arrayify(hexBytes);\n\n // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG\n if (coinInfo.p2pkh != null) {\n const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n const length = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2pkh ], (\"0x\" + p2pkh[2]) ]));\n }\n }\n }\n\n // P2SH: OP_HASH160 OP_EQUAL\n if (coinInfo.p2sh != null) {\n const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n const length = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2sh ], (\"0x\" + p2sh[2]) ]));\n }\n }\n }\n\n // Bech32\n if (coinInfo.prefix != null) {\n const length = bytes[1];\n\n // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program\n let version = bytes[0];\n if (version === 0x00) {\n if (length !== 20 && length !== 32) {\n version = -1;\n }\n } else {\n version = -1;\n }\n\n if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {\n const words = bech32.toWords(bytes.slice(2));\n words.unshift(version);\n return bech32.encode(coinInfo.prefix, words);\n }\n }\n\n return null;\n }\n\n\n async getAddress(coinType?: number): Promise {\n if (coinType == null) { coinType = 60; }\n\n // If Ethereum, use the standard `addr(bytes32)`\n if (coinType === 60) {\n try {\n // keccak256(\"addr(bytes32)\")\n const transaction = {\n to: this.address,\n data: (\"0x3b3b57de\" + namehash(this.name).substring(2))\n };\n const hexBytes = await this.provider.call(transaction);\n\n // No address\n if (hexBytes === \"0x\" || hexBytes === HashZero) { return null; }\n\n return this.provider.formatter.callAddress(hexBytes);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n // keccak256(\"addr(bytes32,uint256\")\n const hexBytes = await this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType));\n\n // No address\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // Compute the address\n const address = this._getAddress(coinType, hexBytes);\n\n if (address == null) {\n logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`,\n coinType: coinType,\n data: hexBytes\n });\n }\n\n return address;\n }\n\n async getAvatar(): Promise {\n const linkage: Array<{ type: string, content: string }> = [ ];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) { return null; }\n\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n\n if (match == null) { continue; }\n switch (match[1]) {\n case \"https\":\n linkage.push({ type: \"url\", content: avatar });\n return { linkage, url: avatar };\n\n case \"data\":\n linkage.push({ type: \"data\", content: avatar });\n return { linkage, url: avatar };\n\n case \"ipfs\":\n linkage.push({ type: \"ipfs\", content: avatar });\n return { linkage, url: `https:/\\/gateway.ipfs.io/ipfs/${ avatar.substring(7) }` }\n\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (match[1] === \"erc721\") ? \"0xc87b56dd\": \"0x0e89341c\";\n linkage.push({ type: match[1], content: avatar });\n\n // The owner of this name\n const owner = (this._resolvedAddress || await this.getAddress());\n\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) { return null; }\n\n const addr = await this.provider.formatter.address(comps[0]);\n const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);\n\n // Check that this account owns the token\n if (match[1] === \"erc721\") {\n // ownerOf(uint256 tokenId)\n const tokenOwner = this.provider.formatter.callAddress(await this.provider.call({\n to: addr, data: hexConcat([ \"0x6352211e\", tokenId ])\n }));\n if (owner !== tokenOwner) { return null; }\n linkage.push({ type: \"owner\", content: tokenOwner });\n\n } else if (match[1] === \"erc1155\") {\n // balanceOf(address owner, uint256 tokenId)\n const balance = BigNumber.from(await this.provider.call({\n to: addr, data: hexConcat([ \"0x00fdd58e\", hexZeroPad(owner, 32), tokenId ])\n }));\n if (balance.isZero()) { return null; }\n linkage.push({ type: \"balance\", content: balance.toString() });\n }\n\n // Call the token contract for the metadata URL\n const tx = {\n to: this.provider.formatter.address(comps[0]),\n data: hexConcat([ selector, tokenId ])\n };\n let metadataUrl = _parseString(await this.provider.call(tx))\n if (metadataUrl == null) { return null; }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n\n // ERC-1155 allows a generic {id} in the URL\n if (match[1] === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n }\n\n // Get the token metadata\n const metadata = await fetchJson(metadataUrl);\n\n // Pull the image URL out\n if (!metadata || typeof(metadata.image) !== \"string\" || !metadata.image.match(/^(https:\\/\\/|data:)/i)) {\n return null;\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n linkage.push({ type: \"url\", content: metadata.image });\n\n return { linkage, url: metadata.image };\n }\n }\n }\n } catch (error) { }\n\n return null;\n }\n\n async getContentHash(): Promise {\n\n // keccak256(\"contenthash()\")\n const hexBytes = await this._fetchBytes(\"0xbc1c58d1\");\n\n // No contenthash\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // IPFS (CID: 1, Type: DAG-PB)\n const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const length = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length * 2) {\n return \"ipfs:/\\/\" + Base58.encode(\"0x\" + ipfs[1]);\n }\n }\n\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/)\n if (swarm) {\n if (swarm[1].length === (32 * 2)) {\n return \"bzz:/\\/\" + swarm[1]\n }\n }\n\n return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n });\n }\n\n async getText(key: string): Promise {\n\n // The key encoded as parameter to fetchBytes\n let keyBytes = toUtf8Bytes(key);\n\n // The nodehash consumes the first slot, so the string pointer targets\n // offset 64, with the length at offset 64 and data starting at offset 96\n keyBytes = concat([ bytes32ify(64), bytes32ify(keyBytes.length), keyBytes ]);\n\n // Pad to word-size (32 bytes)\n if ((keyBytes.length % 32) !== 0) {\n keyBytes = concat([ keyBytes, hexZeroPad(\"0x\", 32 - (key.length % 32)) ])\n }\n\n const hexBytes = await this._fetchBytes(\"0x59d1d43c\", hexlify(keyBytes));\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n return toUtf8String(hexBytes);\n }\n}\n\nlet defaultFormatter: Formatter = null;\n\nlet nextPollId = 1;\n\nexport class BaseProvider extends Provider implements EnsProvider {\n _networkPromise: Promise;\n _network: Network;\n\n _events: Array;\n\n formatter: Formatter;\n\n // To help mitigate the eventually consistent nature of the blockchain\n // we keep a mapping of events we emit. If we emit an event X, we expect\n // that a user should be able to query for that event in the callback,\n // if the node returns null, we stall the response until we get back a\n // meaningful value, since we may be hitting a re-org, or a node that\n // has not indexed the event yet.\n // Events:\n // - t:{hash} - Transaction hash\n // - b:{hash} - BlockHash\n // - block - The most recent emitted block\n _emitted: { [ eventName: string ]: number | \"pending\" };\n\n _pollingInterval: number;\n _poller: NodeJS.Timer;\n _bootstrapPoll: NodeJS.Timer;\n\n _lastBlockNumber: number;\n\n _fastBlockNumber: number;\n _fastBlockNumberPromise: Promise;\n _fastQueryDate: number;\n\n _maxInternalBlockNumber: number;\n _internalBlockNumber: Promise<{ blockNumber: number, reqTime: number, respTime: number }>;\n\n readonly anyNetwork: boolean;\n\n\n /**\n * ready\n *\n * A Promise that resolves only once the provider is ready.\n *\n * Sub-classes that call the super with a network without a chainId\n * MUST set this. Standard named networks have a known chainId.\n *\n */\n\n constructor(network: Networkish | Promise) {\n logger.checkNew(new.target, Provider);\n\n super();\n\n // Events being listened to\n this._events = [];\n\n this._emitted = { block: -2 };\n\n this.formatter = new.target.getFormatter();\n\n // If network is any, this Provider allows the underlying\n // network to change dynamically, and we auto-detect the\n // current network\n defineReadOnly(this, \"anyNetwork\", (network === \"any\"));\n if (this.anyNetwork) { network = this.detectNetwork(); }\n\n if (network instanceof Promise) {\n this._networkPromise = network;\n\n // Squash any \"unhandled promise\" errors; that do not need to be handled\n network.catch((error) => { });\n\n // Trigger initial network setting (async)\n this._ready().catch((error) => { });\n\n } else {\n const knownNetwork = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (knownNetwork) {\n defineReadOnly(this, \"_network\", knownNetwork);\n this.emit(\"network\", knownNetwork, null);\n\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n\n this._maxInternalBlockNumber = -1024;\n\n this._lastBlockNumber = -2;\n\n this._pollingInterval = 4000;\n\n this._fastQueryDate = 0;\n }\n\n async _ready(): Promise {\n if (this._network == null) {\n let network: Network = null;\n if (this._networkPromise) {\n try {\n network = await this._networkPromise;\n } catch (error) { }\n }\n\n // Try the Provider's network detection (this MUST throw if it cannot)\n if (network == null) {\n network = await this.detectNetwork();\n }\n\n // This should never happen; every Provider sub-class should have\n // suggested a network by here (or have thrown).\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // Possible this call stacked so do not call defineReadOnly again\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n defineReadOnly(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n }\n\n return this._network;\n }\n\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get ready(): Promise {\n return poll(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }\n\n // @TODO: Remove this and just create a singleton formatter\n static getFormatter(): Formatter {\n if (defaultFormatter == null) {\n defaultFormatter = new Formatter();\n }\n return defaultFormatter;\n }\n\n // @TODO: Remove this and just use getNetwork\n static getNetwork(network: Networkish): Network {\n return getNetwork((network == null) ? \"homestead\": network);\n }\n\n // Fetches the blockNumber, but will reuse any result that is less\n // than maxAge old or has been requested since the last request\n async _getInternalBlockNumber(maxAge: number): Promise {\n await this._ready();\n\n // Allowing stale data up to maxAge old\n if (maxAge > 0) {\n\n // While there are pending internal block requests...\n while (this._internalBlockNumber) {\n\n // ...\"remember\" which fetch we started with\n const internalBlockNumber = this._internalBlockNumber;\n\n try {\n // Check the result is not too stale\n const result = await internalBlockNumber;\n if ((getTime() - result.respTime) <= maxAge) {\n return result.blockNumber;\n }\n\n // Too old; fetch a new value\n break;\n\n } catch(error) {\n\n // The fetch rejected; if we are the first to get the\n // rejection, drop through so we replace it with a new\n // fetch; all others blocked will then get that fetch\n // which won't match the one they \"remembered\" and loop\n if (this._internalBlockNumber === internalBlockNumber) {\n break;\n }\n }\n }\n }\n\n const reqTime = getTime();\n\n const checkInternalBlockNumber = resolveProperties({\n blockNumber: this.perform(\"getBlockNumber\", { }),\n networkError: this.getNetwork().then((network) => (null), (error) => (error))\n }).then(({ blockNumber, networkError }) => {\n if (networkError) {\n // Unremember this bad internal block number\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n throw networkError;\n }\n\n const respTime = getTime();\n\n blockNumber = BigNumber.from(blockNumber).toNumber();\n if (blockNumber < this._maxInternalBlockNumber) { blockNumber = this._maxInternalBlockNumber; }\n\n this._maxInternalBlockNumber = blockNumber;\n this._setFastBlockNumber(blockNumber); // @TODO: Still need this?\n return { blockNumber, reqTime, respTime };\n });\n\n this._internalBlockNumber = checkInternalBlockNumber;\n\n // Swallow unhandled exceptions; if needed they are handled else where\n checkInternalBlockNumber.catch((error) => {\n // Don't null the dead (rejected) fetch, if it has already been updated\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n });\n\n return (await checkInternalBlockNumber).blockNumber;\n }\n\n async poll(): Promise {\n const pollId = nextPollId++;\n\n // Track all running promises, so we can trigger a post-poll once they are complete\n const runners: Array> = [];\n\n let blockNumber: number = null;\n try {\n blockNumber = await this._getInternalBlockNumber(100 + this.pollingInterval / 2);\n } catch (error) {\n this.emit(\"error\", error);\n return;\n }\n this._setFastBlockNumber(blockNumber);\n\n // Emit a poll event after we have the latest (fast) block number\n this.emit(\"poll\", pollId, blockNumber);\n\n // If the block has not changed, meh.\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return;\n }\n\n // First polling cycle, trigger a \"block\" events\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n\n if (Math.abs(((this._emitted.block)) - blockNumber) > 1000) {\n logger.warn(`network block skew detected; skipping block events (emitted=${ this._emitted.block } blockNumber${ blockNumber })`);\n this.emit(\"error\", logger.makeError(\"network block skew detected\", Logger.errors.NETWORK_ERROR, {\n blockNumber: blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n\n } else {\n // Notify all listener for each block that has passed\n for (let i = (this._emitted.block) + 1; i <= blockNumber; i++) {\n this.emit(\"block\", i);\n }\n }\n\n // The emitted block was updated, check for obsolete events\n if ((this._emitted.block) !== blockNumber) {\n this._emitted.block = blockNumber;\n\n Object.keys(this._emitted).forEach((key) => {\n // The block event does not expire\n if (key === \"block\") { return; }\n\n // The block we were at when we emitted this event\n const eventBlockNumber = this._emitted[key];\n\n // We cannot garbage collect pending transactions or blocks here\n // They should be garbage collected by the Provider when setting\n // \"pending\" events\n if (eventBlockNumber === \"pending\") { return; }\n\n // Evict any transaction hashes or block hashes over 12 blocks\n // old, since they should not return null anyways\n if (blockNumber - eventBlockNumber > 12) {\n delete this._emitted[key];\n }\n });\n }\n\n // First polling cycle\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n\n // Find all transaction hashes we are waiting on\n this._events.forEach((event) => {\n switch (event.type) {\n case \"tx\": {\n const hash = event.hash;\n let runner = this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt || receipt.blockNumber == null) { return null; }\n this._emitted[\"t:\" + hash] = receipt.blockNumber;\n this.emit(hash, receipt);\n return null;\n }).catch((error: Error) => { this.emit(\"error\", error); });\n\n runners.push(runner);\n\n break;\n }\n\n case \"filter\": {\n const filter = event.filter;\n filter.fromBlock = this._lastBlockNumber + 1;\n filter.toBlock = blockNumber;\n\n const runner = this.getLogs(filter).then((logs) => {\n if (logs.length === 0) { return; }\n logs.forEach((log: Log) => {\n this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n this.emit(filter, log);\n });\n }).catch((error: Error) => { this.emit(\"error\", error); });\n runners.push(runner);\n\n break;\n }\n }\n });\n\n this._lastBlockNumber = blockNumber;\n\n // Once all events for this loop have been processed, emit \"didPoll\"\n Promise.all(runners).then(() => {\n this.emit(\"didPoll\", pollId);\n }).catch((error) => { this.emit(\"error\", error); });\n\n return;\n }\n\n // Deprecated; do not use this\n resetEventsBlock(blockNumber: number): void {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) { this.poll(); }\n }\n\n get network(): Network {\n return this._network;\n }\n\n // This method should query the network if the underlying network\n // can change, such as when connected to a JSON-RPC backend\n async detectNetwork(): Promise {\n return logger.throwError(\"provider does not support network detection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n });\n }\n\n async getNetwork(): Promise {\n const network = await this._ready();\n\n // Make sure we are still connected to the same network; this is\n // only an external call for backends which can have the underlying\n // network change spontaneously\n const currentNetwork = await this.detectNetwork();\n if (network.chainId !== currentNetwork.chainId) {\n\n // We are allowing network changes, things can get complex fast;\n // make sure you know what you are doing if you use \"any\"\n if (this.anyNetwork) {\n this._network = currentNetwork;\n\n // Reset all internal block number guards and caches\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n\n // The \"network\" event MUST happen before this method resolves\n // so any events have a chance to unregister, so we stall an\n // additional event loop before returning from /this/ call\n this.emit(\"network\", currentNetwork, network);\n await stall(0);\n\n return this._network;\n }\n\n const error = logger.makeError(\"underlying network changed\", Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network: network,\n detectedNetwork: currentNetwork\n });\n\n this.emit(\"error\", error);\n throw error;\n }\n\n return network;\n }\n\n get blockNumber(): number {\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => {\n this._setFastBlockNumber(blockNumber);\n }, (error) => { });\n\n return (this._fastBlockNumber != null) ? this._fastBlockNumber: -1;\n }\n\n get polling(): boolean {\n return (this._poller != null);\n }\n\n set polling(value: boolean) {\n if (value && !this._poller) {\n this._poller = setInterval(() => { this.poll(); }, this.pollingInterval);\n\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(() => {\n this.poll();\n\n // We block additional polls until the polling interval\n // is done, to prevent overwhelming the poll function\n this._bootstrapPoll = setTimeout(() => {\n // If polling was disabled, something may require a poke\n // since starting the bootstrap poll and it was disabled\n if (!this._poller) { this.poll(); }\n\n // Clear out the bootstrap so we can do another\n this._bootstrapPoll = null;\n }, this.pollingInterval);\n }, 0);\n }\n\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n }\n\n get pollingInterval(): number {\n return this._pollingInterval;\n }\n\n set pollingInterval(value: number) {\n if (typeof(value) !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n\n this._pollingInterval = value;\n\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(() => { this.poll(); }, this._pollingInterval);\n }\n }\n\n _getFastBlockNumber(): Promise {\n const now = getTime();\n\n // Stale block number, request a newer value\n if ((now - this._fastQueryDate) > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => {\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n }\n return this._fastBlockNumber;\n });\n }\n\n return this._fastBlockNumberPromise;\n }\n\n _setFastBlockNumber(blockNumber: number): void {\n // Older block, maybe a stale request\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { return; }\n\n // Update the time we updated the blocknumber\n this._fastQueryDate = getTime();\n\n // Newer block number, use it\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n }\n\n async waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise {\n return this._waitForTransaction(transactionHash, (confirmations == null) ? 1: confirmations, timeout || 0, null);\n }\n\n async _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { data: string, from: string, nonce: number, to: string, value: BigNumber, startBlock: number }): Promise {\n const receipt = await this.getTransactionReceipt(transactionHash);\n\n // Receipt is already good\n if ((receipt ? receipt.confirmations: 0) >= confirmations) { return receipt; }\n\n // Poll until the receipt is good...\n return new Promise((resolve, reject) => {\n const cancelFuncs: Array<() => void> = [];\n\n let done = false;\n const alreadyDone = function() {\n if (done) { return true; }\n done = true;\n cancelFuncs.forEach((func) => { func(); });\n return false;\n };\n\n const minedHandler = (receipt: TransactionReceipt) => {\n if (receipt.confirmations < confirmations) { return; }\n if (alreadyDone()) { return; }\n resolve(receipt);\n }\n this.on(transactionHash, minedHandler);\n cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); });\n\n if (replaceable) {\n let lastBlockNumber = replaceable.startBlock;\n let scannedBlock: number = null;\n const replaceHandler = async (blockNumber: number) => {\n if (done) { return; }\n\n // Wait 1 second; this is only used in the case of a fault, so\n // we will trade off a little bit of latency for more consistent\n // results and fewer JSON-RPC calls\n await stall(1000);\n\n this.getTransactionCount(replaceable.from).then(async (nonce) => {\n if (done) { return; }\n\n if (nonce <= replaceable.nonce) {\n lastBlockNumber = blockNumber;\n\n } else {\n // First check if the transaction was mined\n {\n const mined = await this.getTransaction(transactionHash);\n if (mined && mined.blockNumber != null) { return; }\n }\n\n // First time scanning. We start a little earlier for some\n // wiggle room here to handle the eventually consistent nature\n // of blockchain (e.g. the getTransactionCount was for a\n // different block)\n if (scannedBlock == null) {\n scannedBlock = lastBlockNumber - 3;\n if (scannedBlock < replaceable.startBlock) {\n scannedBlock = replaceable.startBlock;\n }\n }\n\n while (scannedBlock <= blockNumber) {\n if (done) { return; }\n\n const block = await this.getBlockWithTransactions(scannedBlock);\n for (let ti = 0; ti < block.transactions.length; ti++) {\n const tx = block.transactions[ti];\n\n // Successfully mined!\n if (tx.hash === transactionHash) { return; }\n\n // Matches our transaction from and nonce; its a replacement\n if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) {\n if (done) { return; }\n\n // Get the receipt of the replacement\n const receipt = await this.waitForTransaction(tx.hash, confirmations);\n\n // Already resolved or rejected (prolly a timeout)\n if (alreadyDone()) { return; }\n\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\"\n }\n\n // Explain why we were replaced\n reject(logger.makeError(\"transaction was replaced\", Logger.errors.TRANSACTION_REPLACED, {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt\n }));\n\n return;\n }\n }\n scannedBlock++;\n }\n }\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n }, (error) => {\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n });\n };\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n cancelFuncs.push(() => {\n this.removeListener(\"block\", replaceHandler);\n });\n }\n\n if (typeof(timeout) === \"number\" && timeout > 0) {\n const timer = setTimeout(() => {\n if (alreadyDone()) { return; }\n reject(logger.makeError(\"timeout exceeded\", Logger.errors.TIMEOUT, { timeout: timeout }));\n }, timeout);\n if (timer.unref) { timer.unref(); }\n\n cancelFuncs.push(() => { clearTimeout(timer); });\n }\n });\n }\n\n async getBlockNumber(): Promise {\n return this._getInternalBlockNumber(0);\n }\n\n async getGasPrice(): Promise {\n await this.getNetwork();\n\n const result = await this.perform(\"getGasPrice\", { });\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result, error\n });\n }\n }\n\n async getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getBalance\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params, result, error\n });\n }\n }\n\n async getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getTransactionCount\", params);\n try {\n return BigNumber.from(result).toNumber();\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params, result, error\n });\n }\n }\n\n async getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getCode\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params, result, error\n });\n }\n }\n\n async getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then((p) => hexValue(p))\n });\n const result = await this.perform(\"getStorageAt\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params, result, error\n });\n }\n }\n\n // This should be called by any subclass wrapping a TransactionResponse\n _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse {\n if (hash != null && hexDataLength(hash) !== 32) { throw new Error(\"invalid response - sendTransaction\"); }\n\n const result = tx;\n\n // Check the hash we expect is the same as the hash the server reported\n if (hash != null && tx.hash !== hash) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });\n }\n\n result.wait = async (confirms?: number, timeout?: number) => {\n if (confirms == null) { confirms = 1; }\n if (timeout == null) { timeout = 0; }\n\n // Get the details to detect replacement\n let replacement = undefined;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n\n const receipt = await this._waitForTransaction(tx.hash, confirms, timeout, replacement);\n if (receipt == null && confirms === 0) { return null; }\n\n // No longer pending, allow the polling loop to garbage collect this\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt: receipt\n });\n }\n return receipt;\n };\n\n return result;\n }\n\n async sendTransaction(signedTransaction: string | Promise): Promise {\n await this.getNetwork();\n const hexTx = await Promise.resolve(signedTransaction).then(t => hexlify(t));\n const tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) { tx.confirmations = 0; }\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n try {\n const hash = await this.perform(\"sendTransaction\", { signedTransaction: hexTx });\n return this._wrapTransaction(tx, hash, blockNumber);\n } catch (error) {\n (error).transaction = tx;\n (error).transactionHash = tx.hash;\n throw error;\n }\n }\n\n async _getTransactionRequest(transaction: Deferrable): Promise {\n const values: any = await transaction;\n\n const tx: any = { };\n\n [\"from\", \"to\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v): null))\n });\n\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v): null));\n });\n\n [\"type\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v: null));\n });\n\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n\n [\"data\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v): null));\n });\n\n return this.formatter.transactionRequest(await resolveProperties(tx));\n }\n\n async _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise {\n filter = await filter;\n\n const result: any = { };\n\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n\n [\"blockHash\", \"topics\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = (filter)[key];\n });\n\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = this._getBlockTag((filter)[key]);\n });\n\n return this.formatter.filter(await resolveProperties(result));\n }\n\n async call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"call\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params, result, error\n });\n }\n }\n\n async estimateGas(transaction: Deferrable): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction)\n });\n\n const result = await this.perform(\"estimateGas\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params, result, error\n });\n }\n }\n\n async _getAddress(addressOrName: string | Promise): Promise {\n addressOrName = await addressOrName;\n if (typeof(addressOrName) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n\n const address = await this.resolveName(addressOrName);\n if (address == null) {\n logger.throwError(\"ENS name not configured\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `resolveName(${ JSON.stringify(addressOrName) })`\n });\n }\n return address;\n }\n\n async _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise {\n await this.getNetwork();\n\n blockHashOrBlockTag = await blockHashOrBlockTag;\n\n // If blockTag is a number (not \"latest\", etc), this is the block number\n let blockNumber = -128;\n\n const params: { [key: string]: any } = {\n includeTransactions: !!includeTransactions\n };\n\n if (isHexString(blockHashOrBlockTag, 32)) {\n params.blockHash = blockHashOrBlockTag;\n } else {\n try {\n params.blockTag = await this._getBlockTag(blockHashOrBlockTag);\n if (isHexString(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n } catch (error) {\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n }\n }\n\n return poll(async () => {\n const block = await this.perform(\"getBlock\", params);\n\n // Block was not found\n if (block == null) {\n\n // For blockhashes, if we didn't say it existed, that blockhash may\n // not exist. If we did see it though, perhaps from a log, we know\n // it exists, and this node is just not caught up yet.\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) { return null; }\n }\n\n // For block tags, if we are asking for a future block, we return null\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) { return null; }\n }\n\n // Retry on the next block\n return undefined;\n }\n\n // Add transactions\n if (includeTransactions) {\n let blockNumber: number = null;\n for (let i = 0; i < block.transactions.length; i++) {\n const tx = block.transactions[i];\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n if (blockNumber == null) {\n blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n }\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n }\n\n const blockWithTxs: any = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map((tx: TransactionResponse) => this._wrapTransaction(tx));\n return blockWithTxs;\n }\n\n return this.formatter.block(block);\n\n }, { oncePoll: this });\n }\n\n getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, false));\n }\n\n getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, true));\n }\n\n async getTransaction(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransaction\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n const tx = this.formatter.transactionResponse(result);\n\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n\n return this._wrapTransaction(tx);\n }, { oncePoll: this });\n }\n\n async getTransactionReceipt(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransactionReceipt\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n // \"geth-etc\" returns receipts before they are ready\n if (result.blockHash == null) { return undefined; }\n\n const receipt = this.formatter.receipt(result);\n\n if (receipt.blockNumber == null) {\n receipt.confirmations = 0;\n\n } else if (receipt.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - receipt.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n receipt.confirmations = confirmations;\n }\n\n return receipt;\n }, { oncePoll: this });\n }\n\n async getLogs(filter: Filter | FilterByBlockHash | Promise): Promise> {\n await this.getNetwork();\n const params = await resolveProperties({ filter: this._getFilter(filter) });\n const logs: Array = await this.perform(\"getLogs\", params);\n logs.forEach((log) => {\n if (log.removed == null) { log.removed = false; }\n });\n return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs);\n }\n\n async getEtherPrice(): Promise {\n await this.getNetwork();\n return this.perform(\"getEtherPrice\", { });\n }\n\n async _getBlockTag(blockTag: BlockTag | Promise): Promise {\n blockTag = await blockTag;\n\n if (typeof(blockTag) === \"number\" && blockTag < 0) {\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n\n let blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n blockNumber += blockTag;\n if (blockNumber < 0) { blockNumber = 0; }\n return this.formatter.blockTag(blockNumber)\n }\n\n return this.formatter.blockTag(blockTag);\n }\n\n\n async getResolver(name: string): Promise {\n try {\n const address = await this._getResolver(name);\n if (address == null) { return null; }\n return new Resolver(this, address, name);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n async _getResolver(name: string): Promise {\n // Get the resolver from the blockchain\n const network = await this.getNetwork();\n\n // No ENS...\n if (!network.ensAddress) {\n logger.throwError(\n \"network does not support ENS\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // keccak256(\"resolver(bytes32)\")\n const transaction = {\n to: network.ensAddress,\n data: (\"0x0178b8bf\" + namehash(name).substring(2))\n };\n\n try {\n return this.formatter.callAddress(await this.call(transaction));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n async resolveName(name: string | Promise): Promise {\n name = await name;\n\n // If it is already an address, nothing to resolve\n try {\n return Promise.resolve(this.formatter.address(name));\n } catch (error) {\n // If is is a hexstring, the address is bad (See #694)\n if (isHexString(name)) { throw error; }\n }\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n\n // Get the addr from the resovler\n const resolver = await this.getResolver(name);\n if (!resolver) { return null; }\n\n return await resolver.getAddress();\n }\n\n async lookupAddress(address: string | Promise): Promise {\n address = await address;\n address = this.formatter.address(address);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n // keccak(\"name(bytes32)\")\n let bytes = arrayify(await this.call({\n to: resolverAddress,\n data: (\"0x691f3431\" + namehash(reverseName).substring(2))\n }));\n\n // Strip off the dynamic string pointer (0x20)\n if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { return null; }\n bytes = bytes.slice(32);\n\n // Not a length-prefixed string\n if (bytes.length < 32) { return null; }\n\n // Get the length of the string (from the length-prefix)\n const length = BigNumber.from(bytes.slice(0, 32)).toNumber();\n bytes = bytes.slice(32);\n\n // Length longer than available data\n if (length > bytes.length) { return null; }\n\n const name = toUtf8String(bytes.slice(0, length));\n\n // Make sure the reverse record matches the foward record\n const addr = await this.resolveName(name);\n if (addr != address) { return null; }\n\n return name;\n }\n\n async getAvatar(nameOrAddress: string): Promise {\n let resolver: Resolver = null;\n if (isHexString(nameOrAddress)) {\n // Address; reverse lookup\n const address = this.formatter.address(nameOrAddress);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n resolver = new Resolver(this, resolverAddress, \"_\", address);\n\n } else {\n // ENS name; forward lookup\n resolver = await this.getResolver(nameOrAddress);\n if (!resolver) { return null; }\n }\n\n const avatar = await resolver.getAvatar();\n if (avatar == null) { return null; }\n\n return avatar.url;\n }\n\n perform(method: string, params: any): Promise {\n return logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n\n _startEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _stopEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _addEventListener(eventName: EventType, listener: Listener, once: boolean): this {\n const event = new Event(getEventTag(eventName), listener, once)\n this._events.push(event);\n this._startEvent(event);\n\n return this;\n }\n\n on(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n once(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n\n emit(eventName: EventType, ...args: Array): boolean {\n let result = false;\n\n let stopped: Array = [ ];\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n\n setTimeout(() => {\n event.listener.apply(this, args);\n }, 0);\n\n result = true;\n\n if (event.once) {\n stopped.push(event);\n return false;\n }\n\n return true;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return result;\n }\n\n listenerCount(eventName?: EventType): number {\n if (!eventName) { return this._events.length; }\n\n let eventTag = getEventTag(eventName);\n return this._events.filter((event) => {\n return (event.tag === eventTag);\n }).length;\n }\n\n listeners(eventName?: EventType): Array {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n\n let eventTag = getEventTag(eventName);\n return this._events\n .filter((event) => (event.tag === eventTag))\n .map((event) => event.listener);\n }\n\n off(eventName: EventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [ ];\n\n let found = false;\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag || event.listener != listener) { return true; }\n if (found) { return true; }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n\n removeAllListeners(eventName?: EventType): this {\n let stopped: Array = [ ];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [ ];\n } else {\n const eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n}\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/JSON-RPC\n\nimport { Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Bytes, hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { checkProperties, deepCopy, Deferrable, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { AccessList, accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson, poll } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider, Event } from \"./base-provider\";\n\n\nconst errorGas = [ \"call\", \"estimateGas\" ];\n\nfunction checkError(method: string, error: any, params: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n if (e && e.message.match(\"reverted\") && isHexString(e.data)) {\n return e.data;\n }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n\n const transaction = params.transaction || params.signedTransaction;\n\n // \"insufficient funds for gas * price + value + cost(data)\"\n if (message.match(/insufficient funds|base fee exceeds gas limit/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"nonce too low\"\n if (message.match(/nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction underpriced/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/only replay-protected/)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", Logger.errors.UNSUPPORTED_OPERATION, {\n error, method, transaction\n });\n }\n\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nfunction timer(timeout: number): Promise {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n}\n\nfunction getResult(payload: { error?: { code?: number, data?: any, message?: string }, result?: any }): any {\n if (payload.error) {\n // @TODO: not any\n const error: any = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n\n return payload.result;\n}\n\nfunction getLowerCase(value: string): string {\n if (value) { return value.toLowerCase(); }\n return value;\n}\n\nconst _constructorGuard = {};\n\nexport class JsonRpcSigner extends Signer implements TypedDataSigner {\n readonly provider: JsonRpcProvider;\n _index: number;\n _address: string;\n\n constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number) {\n logger.checkNew(new.target, JsonRpcSigner);\n\n super();\n\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n\n defineReadOnly(this, \"provider\", provider);\n\n if (addressOrIndex == null) { addressOrIndex = 0; }\n\n if (typeof(addressOrIndex) === \"string\") {\n defineReadOnly(this, \"_address\", this.provider.formatter.address(addressOrIndex));\n defineReadOnly(this, \"_index\", null);\n\n } else if (typeof(addressOrIndex) === \"number\") {\n defineReadOnly(this, \"_index\", addressOrIndex);\n defineReadOnly(this, \"_address\", null);\n\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n }\n\n connect(provider: Provider): JsonRpcSigner {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n }\n\n connectUnchecked(): JsonRpcSigner {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n }\n\n getAddress(): Promise {\n if (this._address) {\n return Promise.resolve(this._address);\n }\n\n return this.provider.send(\"eth_accounts\", []).then((accounts) => {\n if (accounts.length <= this._index) {\n logger.throwError(\"unknown account #\" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return this.provider.formatter.address(accounts[this._index])\n });\n }\n\n sendUncheckedTransaction(transaction: Deferrable): Promise {\n transaction = shallowCopy(transaction);\n\n const fromAddress = this.getAddress().then((address) => {\n if (address) { address = address.toLowerCase(); }\n return address;\n });\n\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (transaction.gasLimit == null) {\n const estimate = shallowCopy(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.provider.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n }\n\n return resolveProperties({\n tx: resolveProperties(transaction),\n sender: fromAddress\n }).then(({ tx, sender }) => {\n\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n\n const hexTx = (this.provider.constructor).hexlifyTransaction(tx, { from: true });\n\n return this.provider.send(\"eth_sendTransaction\", [ hexTx ]).then((hash) => {\n return hash;\n }, (error) => {\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return logger.throwError(\"signing transactions is unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n }\n\n async sendTransaction(transaction: Deferrable): Promise {\n // This cannot be mined any earlier than any recent block\n const blockNumber = await this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval);\n\n // Send the transaction\n const hash = await this.sendUncheckedTransaction(transaction);\n\n try {\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return await poll(async () => {\n const tx = await this.provider.getTransaction(hash);\n if (tx === null) { return undefined; }\n return this.provider._wrapTransaction(tx, hash, blockNumber);\n }, { oncePoll: this.provider });\n } catch (error) {\n (error).transactionHash = hash;\n throw error;\n }\n }\n\n async signMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n return await this.provider.send(\"personal_sign\", [ hexlify(data), address.toLowerCase() ]);\n }\n\n async _legacySignMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n return await this.provider.send(\"eth_sign\", [ address.toLowerCase(), hexlify(data) ]);\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names (in-place)\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n return this.provider.resolveName(name);\n });\n\n const address = await this.getAddress();\n\n return await this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n\n async unlock(password: string): Promise {\n const provider = this.provider;\n\n const address = await this.getAddress();\n\n return provider.send(\"personal_unlockAccount\", [ address.toLowerCase(), password, null ]);\n }\n}\n\nclass UncheckedJsonRpcSigner extends JsonRpcSigner {\n sendTransaction(transaction: Deferrable): Promise {\n return this.sendUncheckedTransaction(transaction).then((hash) => {\n return {\n hash: hash,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: (confirmations?: number) => { return this.provider.waitForTransaction(hash, confirmations); }\n };\n });\n }\n}\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true\n}\n\nexport class JsonRpcProvider extends BaseProvider {\n readonly connection: ConnectionInfo;\n\n _pendingFilter: Promise;\n _nextId: number;\n\n // During any given event loop, the results for a given call will\n // all be the same, so we can dedup the calls to save requests and\n // bandwidth. @TODO: Try out generalizing this against send?\n _eventLoopCache: Record>;\n get _cache(): Record> {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = { };\n }\n return this._eventLoopCache;\n }\n\n constructor(url?: ConnectionInfo | string, network?: Networkish) {\n logger.checkNew(new.target, JsonRpcProvider);\n\n let networkOrReady: Networkish | Promise = network;\n\n // The network is unknown, query the JSON-RPC for it\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then((network) => {\n resolve(network);\n }, (error) => {\n reject(error);\n });\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Default URL\n if (!url) { url = getStatic<() => string>(this.constructor, \"defaultUrl\")(); }\n\n if (typeof(url) === \"string\") {\n defineReadOnly(this, \"connection\",Object.freeze({\n url: url\n }));\n } else {\n defineReadOnly(this, \"connection\", Object.freeze(shallowCopy(url)));\n }\n\n this._nextId = 42;\n }\n\n static defaultUrl(): string {\n return \"http:/\\/localhost:8545\";\n }\n\n detectNetwork(): Promise {\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n\n // Clear this cache at the beginning of the next event loop\n setTimeout(() => {\n this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n }\n\n async _uncachedDetectNetwork(): Promise {\n await timer(0);\n\n let chainId = null;\n try {\n chainId = await this.send(\"eth_chainId\", [ ]);\n } catch (error) {\n try {\n chainId = await this.send(\"net_version\", [ ]);\n } catch (error) { }\n }\n\n if (chainId != null) {\n const getNetwork = getStatic<(network: Networkish) => Network>(this.constructor, \"getNetwork\");\n try {\n return getNetwork(BigNumber.from(chainId).toNumber());\n } catch (error) {\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n chainId: chainId,\n event: \"invalidNetwork\",\n serverError: error\n });\n }\n }\n\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n });\n }\n\n getSigner(addressOrIndex?: string | number): JsonRpcSigner {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n }\n\n getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner {\n return this.getSigner(addressOrIndex).connectUnchecked();\n }\n\n listAccounts(): Promise> {\n return this.send(\"eth_accounts\", []).then((accounts: Array) => {\n return accounts.map((a) => this.formatter.address(a));\n });\n }\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n\n // We can expand this in the future to any call, but for now these\n // are the biggest wins and do not require any serializing parameters.\n const cache = ([ \"eth_chainId\", \"eth_blockNumber\" ].indexOf(method) >= 0);\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n\n const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n return result;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n throw error;\n });\n\n // Cache the fetch, but clear it on the next event loop\n if (cache) {\n this._cache[method] = result;\n setTimeout(() => {\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n\n prepareRequest(method: string, params: any): [ string, Array ] {\n switch (method) {\n case \"getBlockNumber\":\n return [ \"eth_blockNumber\", [] ];\n\n case \"getGasPrice\":\n return [ \"eth_gasPrice\", [] ];\n\n case \"getBalance\":\n return [ \"eth_getBalance\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getTransactionCount\":\n return [ \"eth_getTransactionCount\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getCode\":\n return [ \"eth_getCode\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getStorageAt\":\n return [ \"eth_getStorageAt\", [ getLowerCase(params.address), params.position, params.blockTag ] ];\n\n case \"sendTransaction\":\n return [ \"eth_sendRawTransaction\", [ params.signedTransaction ] ]\n\n case \"getBlock\":\n if (params.blockTag) {\n return [ \"eth_getBlockByNumber\", [ params.blockTag, !!params.includeTransactions ] ];\n } else if (params.blockHash) {\n return [ \"eth_getBlockByHash\", [ params.blockHash, !!params.includeTransactions ] ];\n }\n return null;\n\n case \"getTransaction\":\n return [ \"eth_getTransactionByHash\", [ params.transactionHash ] ];\n\n case \"getTransactionReceipt\":\n return [ \"eth_getTransactionReceipt\", [ params.transactionHash ] ];\n\n case \"call\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_call\", [ hexlifyTransaction(params.transaction, { from: true }), params.blockTag ] ];\n }\n\n case \"estimateGas\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_estimateGas\", [ hexlifyTransaction(params.transaction, { from: true }) ] ];\n }\n\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [ \"eth_getLogs\", [ params.filter ] ];\n\n default:\n break;\n }\n\n return null;\n }\n\n async perform(method: string, params: any): Promise {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (method === \"call\" || method === \"estimateGas\") {\n const tx = params.transaction;\n if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {\n // If there are no EIP-1559 properties, it might be non-EIP-a559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n params = shallowCopy(params);\n params.transaction = shallowCopy(tx);\n delete params.transaction.type;\n }\n }\n }\n }\n\n const args = this.prepareRequest(method, params);\n\n if (args == null) {\n logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n try {\n return await this.send(args[0], args[1])\n } catch (error) {\n return checkError(method, error, params);\n }\n }\n\n _startEvent(event: Event): void {\n if (event.tag === \"pending\") { this._startPending(); }\n super._startEvent(event);\n }\n\n _startPending(): void {\n if (this._pendingFilter != null) { return; }\n const self = this;\n\n const pendingFilter: Promise = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n\n pendingFilter.then(function(filterId) {\n function poll() {\n self.send(\"eth_getFilterChanges\", [ filterId ]).then(function(hashes: Array) {\n if (self._pendingFilter != pendingFilter) { return null; }\n\n let seq = Promise.resolve();\n hashes.forEach(function(hash) {\n // @TODO: This should be garbage collected at some point... How? When?\n self._emitted[\"t:\" + hash.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self.getTransaction(hash).then(function(tx) {\n self.emit(\"pending\", tx);\n return null;\n });\n });\n });\n\n return seq.then(function() {\n return timer(1000);\n });\n }).then(function() {\n if (self._pendingFilter != pendingFilter) {\n self.send(\"eth_uninstallFilter\", [ filterId ]);\n return;\n }\n setTimeout(function() { poll(); }, 0);\n\n return null;\n }).catch((error: Error) => { });\n }\n poll();\n\n return filterId;\n }).catch((error: Error) => { });\n }\n\n _stopEvent(event: Event): void {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n super._stopEvent(event);\n }\n\n // Convert an ethers.js transaction into a JSON-RPC transaction\n // - gasLimit => gas\n // - All values hexlified\n // - All numeric values zero-striped\n // - All addresses are lowercased\n // NOTE: This allows a TransactionRequest, but all values should be resolved\n // before this is called\n // @TODO: This will likely be removed in future versions and prepareRequest\n // will be the preferred method for this.\n static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { [key: string]: boolean }): { [key: string]: string | AccessList } {\n // Check only allowed properties are given\n const allowed = shallowCopy(allowedTransactionKeys);\n if (allowExtra) {\n for (const key in allowExtra) {\n if (allowExtra[key]) { allowed[key] = true; }\n }\n }\n\n checkProperties(transaction, allowed);\n\n const result: { [key: string]: string | AccessList } = {};\n\n // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros.\n [\"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n const value = hexValue((transaction)[key]);\n if (key === \"gasLimit\") { key = \"gas\"; }\n result[key] = value;\n });\n\n [\"from\", \"to\", \"data\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n result[key] = hexlify((transaction)[key]);\n });\n\n if ((transaction).accessList) {\n result[\"accessList\"] = accessListify((transaction).accessList);\n }\n\n return result;\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nlet WS: any = null;\n\ntry {\n WS = (WebSocket as any);\n if (WS == null) { throw new Error(\"inject please\"); }\n} catch (error) {\n const logger = new Logger(version);\n WS = function() {\n logger.throwError(\"WebSockets not supported in this environment\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n }\n}\n//export default WS;\n//module.exports = WS;\nexport { WS as WebSocket };\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Event } from \"./base-provider\";\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\nimport { WebSocket } from \"./ws\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n/**\n * Notes:\n *\n * This provider differs a bit from the polling providers. One main\n * difference is how it handles consistency. The polling providers\n * will stall responses to ensure a consistent state, while this\n * WebSocket provider assumes the connected backend will manage this.\n *\n * For example, if a polling provider emits an event which indicates\n * the event occurred in blockhash XXX, a call to fetch that block by\n * its hash XXX, if not present will retry until it is present. This\n * can occur when querying a pool of nodes that are mildly out of sync\n * with each other.\n */\n\nlet NextId = 1;\n\nexport type InflightRequest = {\n callback: (error: Error, result: any) => void;\n payload: string;\n};\n\nexport type Subscription = {\n tag: string;\n processFunc: (payload: any) => void;\n};\n\n\n// For more info about the Real-time Event API see:\n// https://geth.ethereum.org/docs/rpc/pubsub\n\nexport class WebSocketProvider extends JsonRpcProvider {\n readonly _websocket: any;\n readonly _requests: { [ name: string ]: InflightRequest };\n readonly _detectNetwork: Promise;\n\n // Maps event tag to subscription ID (we dedupe identical events)\n readonly _subIds: { [ tag: string ]: Promise };\n\n // Maps Subscription ID to Subscription\n readonly _subs: { [ name: string ]: Subscription };\n\n _wsReady: boolean;\n\n constructor(url: string, network?: Networkish) {\n // This will be added in the future; please open an issue to expedite\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n\n super(url, network);\n this._pollingInterval = -1;\n\n this._wsReady = false;\n\n defineReadOnly(this, \"_websocket\", new WebSocket(this.connection.url));\n defineReadOnly(this, \"_requests\", { });\n defineReadOnly(this, \"_subs\", { });\n defineReadOnly(this, \"_subIds\", { });\n defineReadOnly(this, \"_detectNetwork\", super.detectNetwork());\n\n // Stall sending requests until the socket is open...\n this._websocket.onopen = () => {\n this._wsReady = true;\n Object.keys(this._requests).forEach((id) => {\n this._websocket.send(this._requests[id].payload);\n });\n };\n\n this._websocket.onmessage = (messageEvent: { data: string }) => {\n const data = messageEvent.data;\n const result = JSON.parse(data);\n if (result.id != null) {\n const id = String(result.id);\n const request = this._requests[id];\n delete this._requests[id];\n\n if (result.result !== undefined) {\n request.callback(null, result.result);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: this\n });\n\n } else {\n let error: Error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n defineReadOnly(error, \"code\", result.error.code || null);\n defineReadOnly(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n\n request.callback(error, undefined);\n\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: JSON.parse(request.payload),\n provider: this\n });\n\n }\n\n } else if (result.method === \"eth_subscription\") {\n // Subscription...\n const sub = this._subs[result.params.subscription];\n if (sub) {\n //this.emit.apply(this, );\n sub.processFunc(result.params.result)\n }\n\n } else {\n console.warn(\"this should not happen\");\n }\n };\n\n // This Provider does not actually poll, but we want to trigger\n // poll events for things that depend on them (like stalling for\n // block and transaction lookups)\n const fauxPoll = setInterval(() => {\n this.emit(\"poll\");\n }, 1000);\n if (fauxPoll.unref) { fauxPoll.unref(); }\n }\n\n detectNetwork(): Promise {\n return this._detectNetwork;\n }\n\n get pollingInterval(): number {\n return 0;\n }\n\n resetEventsBlock(blockNumber: number): void {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n }\n\n set pollingInterval(value: number) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n }\n\n async poll(): Promise {\n return null;\n }\n\n set polling(value: boolean) {\n if (!value) { return; }\n\n logger.throwError(\"cannot set polling on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n }\n\n send(method: string, params?: Array): Promise {\n const rid = NextId++;\n\n return new Promise((resolve, reject) => {\n function callback(error: Error, result: any) {\n if (error) { return reject(error); }\n return resolve(result);\n }\n\n const payload = JSON.stringify({\n method: method,\n params: params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n\n this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: this\n });\n\n this._requests[String(rid)] = { callback, payload };\n\n if (this._wsReady) { this._websocket.send(payload); }\n });\n }\n\n static defaultUrl(): string {\n return \"ws:/\\/localhost:8546\";\n }\n\n async _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise {\n let subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then((param) => {\n return this.send(\"eth_subscribe\", param);\n });\n this._subIds[tag] = subIdPromise;\n }\n const subId = await subIdPromise;\n this._subs[subId] = { tag, processFunc };\n }\n\n _startEvent(event: Event): void {\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [ \"newHeads\" ], (result: any) => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit(\"block\", blockNumber);\n });\n break;\n\n case \"pending\":\n this._subscribe(\"pending\", [ \"newPendingTransactions\" ], (result: any) => {\n this.emit(\"pending\", result);\n });\n break;\n\n case \"filter\":\n this._subscribe(event.tag, [ \"logs\", this._getFilter(event.filter) ], (result: any) => {\n if (result.removed == null) { result.removed = false; }\n this.emit(event.filter, this.formatter.filterLog(result));\n });\n break;\n\n case \"tx\": {\n const emitReceipt = (event: Event) => {\n const hash = event.hash;\n this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt) { return; }\n this.emit(hash, receipt);\n });\n };\n\n // In case it is already mined\n emitReceipt(event);\n\n // To keep things simple, we start up a single newHeads subscription\n // to keep an eye out for transactions we are watching for.\n // Starting a subscription for an event (i.e. \"tx\") that is already\n // running is (basically) a nop.\n this._subscribe(\"tx\", [ \"newHeads\" ], (result: any) => {\n this._events.filter((e) => (e.type === \"tx\")).forEach(emitReceipt);\n });\n break;\n }\n\n // Nothing is needed\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n }\n\n _stopEvent(event: Event): void {\n let tag = event.tag;\n\n if (event.type === \"tx\") {\n // There are remaining transaction event listeners\n if (this._events.filter((e) => (e.type === \"tx\")).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n // There are remaining event listeners\n return;\n }\n\n const subId = this._subIds[tag];\n if (!subId) { return; }\n\n delete this._subIds[tag];\n subId.then((subId) => {\n if (!this._subs[subId]) { return; }\n delete this._subs[subId];\n this.send(\"eth_unsubscribe\", [ subId ]);\n });\n }\n\n async destroy(): Promise {\n // Wait until we have connected before trying to disconnect\n if (this._websocket.readyState === WebSocket.CONNECTING) {\n await (new Promise((resolve) => {\n this._websocket.onopen = function() {\n resolve(true);\n };\n\n this._websocket.onerror = function() {\n resolve(false);\n };\n }));\n }\n\n // Hangup\n // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes\n this._websocket.close(1000);\n }\n}\n","\n\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly, getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { CommunityResourcable } from \"./formatter\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\n\ntype getUrlFunc = (network: Network, apiKey: string) => string | ConnectionInfo;\n\n// A StaticJsonRpcProvider is useful when you *know* for certain that\n// the backend will never change, as it never calls eth_chainId to\n// verify its backend. However, if the backend does change, the effects\n// are undefined and may include:\n// - inconsistent results\n// - locking up the UI\n// - block skew warnings\n// - wrong results\n// If the network is not explicit (i.e. auto-detection is expected), the\n// node MUST be running and available to respond to requests BEFORE this\n// is instantiated.\nexport class StaticJsonRpcProvider extends JsonRpcProvider {\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // If still not set, set it\n if (this._network == null) {\n // A static network does not support \"any\"\n defineReadOnly(this, \"_network\", network);\n\n this.emit(\"network\", network, null);\n }\n }\n return network;\n }\n}\n\nexport abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable {\n readonly apiKey: any;\n\n constructor(network?: Networkish, apiKey?: any) {\n logger.checkAbstract(new.target, UrlJsonRpcProvider);\n\n // Normalize the Network and API Key\n network = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n apiKey = getStatic<(apiKey: string) => string>(new.target, \"getApiKey\")(apiKey);\n\n const connection = getStatic(new.target, \"getUrl\")(network, apiKey);\n\n super(connection, network);\n\n if (typeof(apiKey) === \"string\") {\n defineReadOnly(this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach((key) => {\n defineReadOnly(this, key, apiKey[key]);\n });\n }\n }\n\n _startPending(): void {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n }\n\n isCommunityResource(): boolean {\n return false;\n }\n\n getSigner(address?: string): JsonRpcSigner {\n return logger.throwError(\n \"API provider does not support signing\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"getSigner\" }\n );\n }\n\n listAccounts(): Promise> {\n return Promise.resolve([]);\n }\n\n // Return a defaultApiKey if null, otherwise validate the API key\n static getApiKey(apiKey: any): any {\n return apiKey;\n }\n\n // Returns the url or connection for the given network and API key. The\n // API key will have been sanitized by the getApiKey first, so any validation\n // or transformations can be done there.\n static getUrl(network: Network, apiKey: any): string | ConnectionInfo {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\nimport { WebSocketProvider } from \"./websocket-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// This key was provided to ethers.js by Alchemy to be used by the\n// default provider, but it is recommended that for your own\n// production environments, that you acquire your own API key at:\n// https://dashboard.alchemyapi.io\n\nconst defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\"\n\nexport class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new AlchemyProvider(network, apiKey);\n\n const url = provider.connection.url.replace(/^http/i, \"ws\")\n .replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n\n super(url, provider.network);\n defineReadOnly(this, \"apiKey\", provider.apiKey);\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n\nexport class AlchemyProvider extends UrlJsonRpcProvider {\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider {\n return new AlchemyWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n if (apiKey == null) { return defaultApiKey; }\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n }\n\n static getUrl(network: Network, apiKey: string): ConnectionInfo {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.alchemyapi.io/v2/\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.alchemyapi.io/v2/\";\n break;\n case \"kovan\":\n host = \"eth-kovan.alchemyapi.io/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arb-rinkeby.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-kovan\":\n host = \"opt-kovan.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + apiKey),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey === defaultApiKey) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport class CloudflareProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return host;\n }\n\n async perform(method: string, params: any): Promise {\n // The Cloudflare provider does not support eth_blockNumber,\n // so we get the latest block and pull it from that\n if (method === \"getBlockNumber\") {\n const block = await super.perform(\"getBlock\", { blockTag: \"latest\" });\n return block.number;\n }\n\n return super.perform(method, params);\n }\n}\n","\"use strict\";\n\nimport { BlockTag, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\nimport { accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson } from \"@ethersproject/web\";\n\nimport { showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider } from \"./base-provider\";\n\n\n// The transaction has already been sanitized by the calls in Provider\nfunction getTransactionPostData(transaction: TransactionRequest): Record {\n const result: Record = { };\n for (let key in transaction) {\n if ((transaction)[key] == null) { continue; }\n let value = (transaction)[key];\n if (key === \"type\" && value === 0) { continue; }\n\n // Quantity-types require no leading zero, unless 0\n if (({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true })[key]) {\n value = hexValue(hexlify(value));\n } else if (key === \"accessList\") {\n value = \"[\" + accessListify(value).map((set) => {\n return `{address:\"${ set.address }\",storageKeys:[\"${ set.storageKeys.join('\",\"') }\"]}`;\n }).join(\",\") + \"]\";\n } else {\n value = hexlify(value);\n }\n result[key] = value;\n }\n return result;\n}\n\nfunction getResult(result: { status?: number, message?: string, result?: any }): any {\n // getLogs, getHistory have weird success responses\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n\n if (result.status != 1 || result.message != \"OK\") {\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n\n return result.result;\n}\n\nfunction getJsonResult(result: { jsonrpc: string, result?: any, error?: { code?: number, data?: any, message?: string} } ): any {\n // This response indicates we are being throttled\n if (result && (result).status == 0 && (result).message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n const error: any = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n\n if (result.jsonrpc != \"2.0\") {\n // @TODO: not any\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n\n if (result.error) {\n // @TODO: not any\n const error: any = new Error(result.error.message || \"unknown error\");\n if (result.error.code) { error.code = result.error.code; }\n if (result.error.data) { error.data = result.error.data; }\n throw error;\n }\n\n return result.result;\n}\n\n// The blockTag was normalized as a string by the Provider pre-perform operations\nfunction checkLogTag(blockTag: string): number | \"latest\" {\n if (blockTag === \"pending\") { throw new Error(\"pending not supported\"); }\n if (blockTag === \"latest\") { return blockTag; }\n\n return parseInt(blockTag.substring(2), 16);\n}\n\n\nconst defaultApiKey = \"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB\";\n\nfunction checkError(method: string, error: any, transaction: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n\n // Etherscan keeps changing their string\n if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) {\n // Etherscan prefixes the data like \"Reverted 0x1234\"\n let data = e.data;\n if (data) { data = \"0x\" + data.replace(/^.*0x/i, \"\"); }\n\n if (isHexString(data)) { return data; }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n }\n\n // Get the message from any nested error structure\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR) {\n if (error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n\n // \"Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0\"\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"Transaction with the same hash was already imported.\"\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.\"\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nexport class EtherscanProvider extends BaseProvider{\n readonly baseUrl: string;\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: string) {\n logger.checkNew(new.target, EtherscanProvider);\n\n super(network);\n\n defineReadOnly(this, \"baseUrl\", this.getBaseUrl());\n defineReadOnly(this, \"apiKey\", apiKey || defaultApiKey);\n }\n\n getBaseUrl(): string {\n switch(this.network ? this.network.name: \"invalid\") {\n case \"homestead\":\n return \"https:/\\/api.etherscan.io\";\n case \"ropsten\":\n return \"https:/\\/api-ropsten.etherscan.io\";\n case \"rinkeby\":\n return \"https:/\\/api-rinkeby.etherscan.io\";\n case \"kovan\":\n return \"https:/\\/api-kovan.etherscan.io\";\n case \"goerli\":\n return \"https:/\\/api-goerli.etherscan.io\";\n default:\n }\n\n return logger.throwArgumentError(\"unsupported network\", \"network\", name);\n }\n\n getUrl(module: string, params: Record): string {\n const query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${ key }=${ value }`\n }\n return accum\n }, \"\");\n const apiKey = ((this.apiKey) ? `&apikey=${ this.apiKey }`: \"\");\n return `${ this.baseUrl }/api?module=${ module }${ query }${ apiKey }`;\n }\n\n getPostUrl(): string {\n return `${ this.baseUrl }/api`;\n }\n\n getPostData(module: string, params: Record): Record {\n params.module = module;\n params.apikey = this.apiKey;\n return params;\n }\n\n async fetch(module: string, params: Record, post?: boolean): Promise {\n const url = (post ? this.getPostUrl(): this.getUrl(module, params));\n const payload = (post ? this.getPostData(module, params): null);\n const procFunc = (module === \"proxy\") ? getJsonResult: getResult;\n\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n\n const connection: ConnectionInfo = {\n url: url,\n throttleSlotInterval: 1000,\n throttleCallback: (attempt: number, url: string) => {\n if (this.isCommunityResource()) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n let payloadStr: string = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map((key) => {\n return `${ key }=${ payload[key] }`\n }).join(\"&\");\n }\n\n const result = await fetchJson(connection, payloadStr, procFunc || getJsonResult);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: deepCopy(result),\n provider: this\n });\n\n return result;\n }\n\n async detectNetwork(): Promise {\n return this.network;\n }\n\n async perform(method: string, params: any): Promise {\n\n switch (method) {\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n\n case \"getBalance\":\n // Returns base-10 result\n return this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getStorageAt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n });\n\n case \"sendTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch((error) => {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n });\n\n case \"getBlock\":\n if (params.blockTag) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: (params.includeTransactions ? \"true\": \"false\")\n });\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n });\n\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n });\n\n case \"call\": {\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"call\", error, params.transaction);\n }\n }\n\n case \"estimateGas\": {\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"estimateGas\", error, params.transaction);\n }\n }\n\n case \"getLogs\": {\n const args: Record = { action: \"getLogs\" }\n\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n\n // @TODO: We can handle slightly more complicated logs using the logs API\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n\n if (params.filter.topics.length === 1) {\n const topic0 = params.filter.topics[0];\n if (typeof(topic0) !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 });\n }\n args.topic0 = topic0;\n }\n }\n\n const logs: Array = await this.fetch(\"logs\", args);\n\n // Cache txHash => blockHash\n let blocks: { [tag: string]: string } = {};\n\n // Add any missing blockHash to the logs\n for (let i = 0; i < logs.length; i++) {\n const log = logs[i];\n if (log.blockHash != null) { continue; }\n if (blocks[log.blockNumber] == null) {\n const block = await this.getBlock(log.blockNumber);\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n }\n log.blockHash = blocks[log.blockNumber];\n }\n\n return logs;\n }\n\n case \"getEtherPrice\":\n if (this.network.name !== \"homestead\") { return 0.0; }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n\n default:\n break;\n }\n\n return super.perform(method, params);\n }\n\n // Note: The `page` page parameter only allows pagination within the\n // 10,000 window available without a page and offset parameter\n // Error: Result window is too large, PageNo x Offset size must\n // be less than or equal to 10000\n async getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise> {\n const params = {\n action: \"txlist\",\n address: (await this.resolveName(addressOrName)),\n startblock: ((startBlock == null) ? 0: startBlock),\n endblock: ((endBlock == null) ? 99999999: endBlock),\n sort: \"asc\"\n };\n\n const result = await this.fetch(\"account\", params);\n\n return result.map((tx: any) => {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") { delete tx[key]; }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n const item = this.formatter.transactionResponse(tx);\n if (tx.timeStamp) { item.timestamp = parseInt(tx.timeStamp); }\n return item;\n });\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Block, BlockWithTransactions, Provider } from \"@ethersproject/abstract-provider\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\nimport { shuffled } from \"@ethersproject/random\";\nimport { poll } from \"@ethersproject/web\";\n\nimport { BaseProvider } from \"./base-provider\";\nimport { isCommunityResource } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction now() { return (new Date()).getTime(); }\n\n// Returns to network as long as all agree, or null if any is null.\n// Throws an error if any two networks do not match.\nfunction checkNetworks(networks: Array): Network {\n let result = null;\n\n for (let i = 0; i < networks.length; i++) {\n const network = networks[i];\n\n // Null! We do not know our network; bail.\n if (network == null) { return null; }\n\n if (result) {\n // Make sure the network matches the previous networks\n if (!(result.name === network.name && result.chainId === network.chainId &&\n ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) {\n\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n\n return result;\n}\n\nfunction median(values: Array, maxDelta?: number): number {\n values = values.slice().sort();\n const middle = Math.floor(values.length / 2);\n\n // Odd length; take the middle\n if (values.length % 2) {\n return values[middle];\n }\n\n // Even length; take the average of the two middle\n const a = values[middle - 1], b = values[middle];\n\n if (maxDelta != null && Math.abs(a - b) > maxDelta) {\n return null;\n }\n\n return (a + b) / 2;\n}\n\nfunction serialize(value: any): string {\n if (value === null) {\n return \"null\";\n } else if (typeof(value) === \"number\" || typeof(value) === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof(value) === \"string\") {\n return value;\n } else if (BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map((i) => serialize(i)));\n } else if (typeof(value) === \"object\") {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((key) => {\n let v = value[key];\n if (typeof(v) === \"function\") {\n v = \"[function]\";\n } else {\n v = serialize(v);\n }\n return JSON.stringify(key) + \":\" + v;\n }).join(\",\") + \"}\";\n }\n\n throw new Error(\"unknown value type: \" + typeof(value));\n}\n\n// Next request ID to use for emitting debug info\nlet nextRid = 1;\n\n\nexport interface FallbackProviderConfig {\n // The Provider\n provider: Provider;\n\n // The priority to favour this Provider; lower values are used first (higher priority)\n priority?: number;\n\n // Timeout before also triggering the next provider; this does not stop\n // this provider and if its result comes back before a quorum is reached\n // it will be incorporated into the vote\n // - lower values will cause more network traffic but may result in a\n // faster result.\n stallTimeout?: number;\n\n // How much this provider contributes to the quorum; sometimes a specific\n // provider may be more reliable or trustworthy than others, but usually\n // this should be left as the default\n weight?: number;\n};\n\n// A Staller is used to provide a delay to give a Provider a chance to response\n// before asking the next Provider to try.\ntype Staller = {\n wait: (func: () => void) => Promise\n getPromise: () => Promise,\n cancel: () => void\n};\n\nfunction stall(duration: number): Staller {\n let cancel: () => void = null;\n\n let timer: NodeJS.Timer = null;\n let promise = >(new Promise((resolve) => {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n }\n timer = setTimeout(cancel, duration);\n }));\n\n const wait = (func: () => void) => {\n promise = promise.then(func);\n return promise;\n }\n\n function getPromise(): Promise {\n return promise;\n }\n\n return { cancel, getPromise, wait };\n}\n\nconst ForwardErrors = [\n Logger.errors.CALL_EXCEPTION,\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n Logger.errors.UNPREDICTABLE_GAS_LIMIT\n];\n\nconst ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\",\n];\n\n\n// @TODO: Make this an object with staller and cancel built-in\ninterface RunningConfig extends FallbackProviderConfig {\n start?: number;\n done?: boolean;\n cancelled?: boolean;\n runner?: Promise;\n staller?: Staller;\n result?: any;\n error?: Error;\n};\n\nfunction exposeDebugConfig(config: RunningConfig, now?: number): any {\n const result: any = {\n weight: config.weight\n };\n Object.defineProperty(result, \"provider\", { get: () => config.provider });\n if (config.start) { result.start = config.start; }\n if (now) { result.duration = (now - config.start); }\n if (config.done) {\n if (config.error) {\n result.error = config.error;\n } else {\n result.result = config.result || null;\n }\n }\n return result;\n}\n\nfunction normalizedTally(normalize: (value: any) => string, quorum: number): (configs: Array) => any {\n return function(configs: Array): any {\n\n // Count the votes for each result\n const tally: { [ key: string]: { count: number, result: any } } = { };\n configs.forEach((c) => {\n const value = normalize(c.result);\n if (!tally[value]) { tally[value] = { count: 0, result: c.result }; }\n tally[value].count++;\n });\n\n // Check for a quorum on any given result\n const keys = Object.keys(tally);\n for (let i = 0; i < keys.length; i++) {\n const check = tally[keys[i]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n\n // No quroum\n return undefined;\n }\n}\nfunction getProcessFunc(provider: FallbackProvider, method: string, params: { [ key: string ]: any }): (configs: Array) => any {\n\n let normalize = serialize;\n\n switch (method) {\n case \"getBlockNumber\":\n // Return the median value, unless there is (median + 1) is also\n // present, in which case that is probably true and the median\n // is going to be stale soon. In the event of a malicious node,\n // the lie will be true soon enough.\n return function(configs: Array): number {\n const values = configs.map((c) => c.result);\n\n // Get the median block number\n let blockNumber = median(configs.map((c) => c.result), 2);\n if (blockNumber == null) { return undefined; }\n\n blockNumber = Math.ceil(blockNumber);\n\n // If the next block height is present, its prolly safe to use\n if (values.indexOf(blockNumber + 1) >= 0) { blockNumber++; }\n\n // Don't ever roll back the blockNumber\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n\n return provider._highestBlockNumber;\n };\n\n case \"getGasPrice\":\n // Return the middle (round index up) value, similar to median\n // but do not average even entries and choose the higher.\n // Malicious actors must compromise 50% of the nodes to lie.\n return function(configs: Array): BigNumber {\n const values = configs.map((c) => c.result);\n values.sort();\n return values[Math.floor(values.length / 2)];\n }\n\n case \"getEtherPrice\":\n // Returns the median price. Malicious actors must compromise at\n // least 50% of the nodes to lie (in a meaningful way).\n return function(configs: Array): number {\n return median(configs.map((c) => c.result));\n }\n\n // No additional normalizing required; serialize is enough\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize = function(tx: any): string {\n if (tx == null) { return null; }\n\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return serialize(tx);\n }\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getBlock\":\n // We drop the confirmations from transactions as it is approximate\n if (params.includeTransactions) {\n normalize = function(block: BlockWithTransactions): string {\n if (block == null) { return null; }\n\n block = shallowCopy(block);\n block.transactions = block.transactions.map((tx) => {\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize = function(block: Block): string {\n if (block == null) { return null; }\n return serialize(block);\n }\n }\n break;\n\n default:\n throw new Error(\"unknown method: \" + method);\n }\n\n // Return the result if and only if the expected quorum is\n // satisfied and agreed upon for the final result.\n return normalizedTally(normalize, provider.quorum);\n\n}\n\n// If we are doing a blockTag query, we need to make sure the backend is\n// caught up to the FallbackProvider, before sending a request to it.\nasync function waitForSync(config: RunningConfig, blockNumber: number): Promise {\n const provider = (config.provider);\n\n if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) {\n return provider;\n }\n\n return poll(() => {\n return new Promise((resolve, reject) => {\n setTimeout(function() {\n\n // We are synced\n if (provider.blockNumber >= blockNumber) { return resolve(provider); }\n\n // We're done; just quit\n if (config.cancelled) { return resolve(null); }\n\n // Try again, next block\n return resolve(undefined);\n }, 0);\n });\n }, { oncePoll: provider });\n}\n\nasync function getRunner(config: RunningConfig, currentBlockNumber: number, method: string, params: { [ key: string]: any }): Promise {\n let provider = config.provider;\n\n switch (method) {\n case \"getBlockNumber\":\n case \"getGasPrice\":\n return provider[method]();\n case \"getEtherPrice\":\n if ((provider).getEtherPrice) {\n return (provider).getEtherPrice();\n }\n break;\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.address, params.blockTag || \"latest\");\n case \"getStorageAt\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\");\n case \"getBlock\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[(params.includeTransactions ? \"getBlockWithTransactions\": \"getBlock\")](params.blockTag || params.blockHash);\n case \"call\":\n case \"estimateGas\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.transaction);\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n return provider[method](params.transactionHash);\n case \"getLogs\": {\n let filter = params.filter;\n if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getLogs(filter);\n }\n }\n\n return logger.throwError(\"unknown method error\", Logger.errors.UNKNOWN_ERROR, {\n method: method,\n params: params\n });\n}\n\nexport class FallbackProvider extends BaseProvider {\n readonly providerConfigs: ReadonlyArray;\n readonly quorum: number;\n\n // Due to the highly asyncronous nature of the blockchain, we need\n // to make sure we never unroll the blockNumber due to our random\n // sample of backends\n _highestBlockNumber: number;\n\n constructor(providers: Array, quorum?: number) {\n logger.checkNew(new.target, FallbackProvider);\n\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n\n const providerConfigs: Array = providers.map((configOrProvider, index) => {\n if (Provider.isProvider(configOrProvider)) {\n const stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n const priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n\n const config: FallbackProviderConfig = shallowCopy(configOrProvider);\n\n if (config.priority == null) { config.priority = 1; }\n if (config.stallTimeout == null) {\n config.stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n }\n if (config.weight == null) { config.weight = 1; }\n\n const weight = config.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", `providers[${ index }].weight`, weight);\n }\n\n return Object.freeze(config);\n });\n\n const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0);\n\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n\n // Are all providers' networks are known\n let networkOrReady: Network | Promise = checkNetworks(providerConfigs.map((c) => ((c.provider)).network));\n\n // Not all networks are known; we must stall\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Preserve a copy, so we do not get mutated\n defineReadOnly(this, \"providerConfigs\", Object.freeze(providerConfigs));\n defineReadOnly(this, \"quorum\", quorum);\n\n this._highestBlockNumber = -1;\n }\n\n async detectNetwork(): Promise {\n const networks = await Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork()));\n return checkNetworks(networks);\n }\n\n async perform(method: string, params: { [name: string]: any }): Promise {\n // Sending transactions is special; always broadcast it to all backends\n if (method === \"sendTransaction\") {\n const results: Array = await Promise.all(this.providerConfigs.map((c) => {\n return c.provider.sendTransaction(params.signedTransaction).then((result) => {\n return result.hash;\n }, (error) => {\n return error;\n });\n }));\n\n // Any success is good enough (other errors are likely \"already seen\" errors\n for (let i = 0; i < results.length; i++) {\n const result = results[i];\n if (typeof(result) === \"string\") { return result; }\n }\n\n // They were all an error; pick the first error\n throw results[0];\n }\n\n // We need to make sure we are in sync with our backends, so we need\n // to know this before we can make a lot of calls\n if (this._highestBlockNumber === -1 && method !== \"getBlockNumber\") {\n await this.getBlockNumber();\n }\n\n const processFunc = getProcessFunc(this, method, params);\n\n // Shuffle the providers and then sort them by their priority; we\n // shallowCopy them since we will store the result in them too\n const configs: Array = shuffled(this.providerConfigs.map(shallowCopy));\n configs.sort((a, b) => (a.priority - b.priority));\n\n const currentBlockNumber = this._highestBlockNumber;\n\n let i = 0;\n let first = true;\n while (true) {\n const t0 = now();\n\n // Compute the inflight weight (exclude anything past)\n let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout)))\n .reduce((accum, c) => (accum + c.weight), 0);\n\n // Start running enough to meet quorum\n while (inflightWeight < this.quorum && i < configs.length) {\n const config = configs[i++];\n\n const rid = nextRid++;\n\n config.start = now();\n config.staller = stall(config.stallTimeout);\n config.staller.wait(() => { config.staller = null; });\n\n config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => {\n config.done = true;\n config.result = result;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n }, (error) => {\n config.done = true;\n config.error = error;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n });\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, null),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n inflightWeight += config.weight;\n }\n\n // Wait for anything meaningful to finish or stall out\n const waiting: Array> = [ ];\n configs.forEach((c) => {\n if (c.done || !c.runner) { return; }\n waiting.push(c.runner);\n if (c.staller) { waiting.push(c.staller.getPromise()); }\n });\n\n if (waiting.length) { await Promise.race(waiting); }\n\n // Check the quorum and process the results; the process function\n // may additionally decide the quorum is not met\n const results = configs.filter((c) => (c.done && c.error == null));\n if (results.length >= this.quorum) {\n const result = processFunc(results);\n if (result !== undefined) {\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n return result;\n }\n if (!first) { await stall(100).getPromise(); }\n first = false;\n }\n\n // No result, check for errors that should be forwarded\n const errors = configs.reduce((accum, c) => {\n if (!c.done || c.error == null) { return accum; }\n\n const code = ((c.error)).code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) { accum[code] = { error: c.error, weight: 0 }; }\n accum[code].weight += c.weight;\n }\n\n return accum;\n }, <{ [ code: string ]: { error: Error, weight: number } }>({ }));\n\n Object.keys(errors).forEach((errorCode: string) => {\n const tally = errors[errorCode];\n if (tally.weight < this.quorum) { return; }\n\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n const e = (tally.error);\n\n const props: { [ name: string ]: any } = { };\n ForwardProperties.forEach((name) => {\n if (e[name] == null) { return; }\n props[name] = e[name];\n });\n\n logger.throwError(e.reason || e.message, errorCode, props);\n });\n\n // All configs have run to completion; we will never get more data\n if (configs.filter((c) => !c.done).length === 0) { break; }\n }\n\n // Shut down any stallers; shouldn't be any\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n return logger.throwError(\"failed to meet quorum\", Logger.errors.SERVER_ERROR, {\n method: method,\n params: params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map((c) => exposeDebugConfig(c)),\n provider: this\n });\n }\n}\n","\"use strict\";\n\nconst IpcProvider: any = null;\n\nexport {\n IpcProvider\n};\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n\nconst defaultProjectId = \"84842078b09946638c03157f83405213\"\n\nexport class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n readonly projectId: string;\n readonly projectSecret: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new InfuraProvider(network, apiKey);\n const connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n\n const url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, network);\n\n defineReadOnly(this, \"apiKey\", provider.projectId);\n defineReadOnly(this, \"projectId\", provider.projectId);\n defineReadOnly(this, \"projectSecret\", provider.projectSecret);\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n\nexport class InfuraProvider extends UrlJsonRpcProvider {\n readonly projectId: string;\n readonly projectSecret: string;\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider {\n return new InfuraWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n const apiKeyObj: { apiKey: string, projectId: string, projectSecret: string } = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n\n if (apiKey == null) { return apiKeyObj; }\n\n if (typeof(apiKey) === \"string\") {\n apiKeyObj.projectId = apiKey;\n\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument((typeof(apiKey.projectId) === \"string\"),\n \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument((typeof(apiKey.projectSecret) === \"string\"),\n \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n\n apiKeyObj.apiKey = apiKeyObj.projectId;\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch(network ? network.name: \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"ropsten\":\n host = \"ropsten.infura.io\";\n break;\n case \"rinkeby\":\n host = \"rinkeby.infura.io\";\n break;\n case \"kovan\":\n host = \"kovan.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-kovan\":\n host = \"optimism-kovan.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arbitrum-rinkeby.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n const connection: ConnectionInfo = {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + \"/v3/\" + apiKey.projectId),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey.projectId === defaultProjectId) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n","\nimport { deepCopy } from \"@ethersproject/properties\";\nimport { fetchJson } from \"@ethersproject/web\";\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Experimental\n\nexport class JsonRpcBatchProvider extends JsonRpcProvider {\n _pendingBatchAggregator: NodeJS.Timer;\n _pendingBatch: Array<{\n request: { method: string, params: Array, id: number, jsonrpc: \"2.0\" },\n resolve: (result: any) => void,\n reject: (error: Error) => void\n }>;\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n if (this._pendingBatch == null) {\n this._pendingBatch = [ ];\n }\n\n const inflightRequest: any = { request, resolve: null, reject: null };\n\n const promise = new Promise((resolve, reject) => {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n\n this._pendingBatch.push(inflightRequest);\n\n if (!this._pendingBatchAggregator) {\n // Schedule batch for next event loop + short duration\n this._pendingBatchAggregator = setTimeout(() => {\n\n // Get teh current batch and clear it, so new requests\n // go into the next batch\n const batch = this._pendingBatch;\n this._pendingBatch = null;\n this._pendingBatchAggregator = null;\n\n // Get the request as an array of requests\n const request = batch.map((inflight) => inflight.request);\n\n this.emit(\"debug\", {\n action: \"requestBatch\",\n request: deepCopy(request),\n provider: this\n });\n\n return fetchJson(this.connection, JSON.stringify(request)).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n // For each result, feed it to the correct Promise, depending\n // on whether it was a success or error\n batch.forEach((inflightRequest, index) => {\n const payload = result[index];\n if (payload.error) {\n const error = new Error(payload.error.message);\n (error).code = payload.error.code;\n (error).data = payload.error.data;\n inflightRequest.reject(error);\n } else {\n inflightRequest.resolve(payload.result);\n }\n });\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n batch.forEach((inflightRequest) => {\n inflightRequest.reject(error);\n });\n });\n\n }, 10);\n }\n\n return promise;\n }\n}\n","/* istanbul ignore file */\n\n\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Special API key provided by Nodesmith for ethers.js\nconst defaultApiKey = \"ETHERS_JS_SHARED\";\n\nexport class NodesmithProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return (host + \"?apiKey=\" + apiKey);\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// These are load-balancer-based application IDs\nconst defaultApplicationIds: Record = {\n homestead: \"6004bcd10040261633ade990\",\n ropsten: \"6004bd4d0040261633ade991\",\n rinkeby: \"6004bda20040261633ade994\",\n goerli: \"6004bd860040261633ade992\",\n};\n\nexport class PocketProvider extends UrlJsonRpcProvider {\n readonly applicationId: string;\n readonly applicationSecretKey: string;\n readonly loadBalancer: boolean;\n\n constructor(network?: Networkish, apiKey?: any) {\n // We need a bit of creativity in the constructor because\n // Pocket uses different default API keys based on the network\n\n if (apiKey == null) {\n const n = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (n) {\n const applicationId = defaultApplicationIds[n.name];\n if (applicationId) {\n apiKey = {\n applicationId: applicationId,\n loadBalancer: true\n };\n }\n }\n\n // If there was any issue above, we don't know this network\n if (apiKey == null) {\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n }\n\n super(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n // Most API Providers allow null to get the default configuration, but\n // Pocket requires the network to decide the default provider, so we\n // rely on hijacking the constructor to add a sensible default for us\n\n if (apiKey == null) {\n logger.throwArgumentError(\"PocketProvider.getApiKey does not support null apiKey\", \"apiKey\", apiKey);\n }\n\n const apiKeyObj: { applicationId: string, applicationSecretKey: string, loadBalancer: boolean } = {\n applicationId: null,\n loadBalancer: false,\n applicationSecretKey: null\n };\n\n // Parse applicationId and applicationSecretKey\n if (typeof (apiKey) === \"string\") {\n apiKeyObj.applicationId = apiKey;\n\n } else if (apiKey.applicationSecretKey != null) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"applicationSecretKey requires an applicationId\", \"applicationId\", apiKey.applicationId);\n logger.assertArgument((typeof (apiKey.applicationSecretKey) === \"string\"),\n \"invalid applicationSecretKey\", \"applicationSecretKey\", \"[REDACTED]\");\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else if (apiKey.applicationId) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"apiKey.applicationId must be a string\", \"apiKey.applicationId\", apiKey.applicationId);\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n let url = null;\n if (apiKey.loadBalancer) {\n url = `https:/\\/${ host }/v1/lb/${ apiKey.applicationId }`\n } else {\n url = `https:/\\/${ host }/v1/${ apiKey.applicationId }`\n }\n\n const connection: ConnectionInfo = { url };\n\n // Initialize empty headers\n connection.headers = {}\n\n // Apply application secret key\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.applicationId === defaultApplicationIds[this.network.name]);\n }\n}\n","\"use strict\";\n\nimport { Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Exported Types\nexport type ExternalProvider = {\n isMetaMask?: boolean;\n isStatus?: boolean;\n host?: string;\n path?: string;\n sendAsync?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n send?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n request?: (request: { method: string, params?: Array }) => Promise\n}\n\nlet _nextId = 1;\n\nexport type JsonRpcFetchFunc = (method: string, params?: Array) => Promise;\n\ntype Web3LegacySend = (request: any, callback: (error: Error, response: any) => void) => void;\n\nfunction buildWeb3LegacyFetcher(provider: ExternalProvider, sendFunc: Web3LegacySend) : JsonRpcFetchFunc {\n const fetcher = \"Web3LegacyFetcher\";\n\n return function(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (_nextId++),\n jsonrpc: \"2.0\"\n };\n\n return new Promise((resolve, reject) => {\n this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: deepCopy(request),\n provider: this\n });\n\n sendFunc(request, (error, response) => {\n\n if (error) {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: this\n });\n\n return reject(error);\n }\n\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: this\n });\n\n if (response.error) {\n const error = new Error(response.error.message);\n (error).code = response.error.code;\n (error).data = response.error.data;\n return reject(error);\n }\n\n resolve(response.result);\n });\n });\n }\n}\n\nfunction buildEip1193Fetcher(provider: ExternalProvider): JsonRpcFetchFunc {\n return function(method: string, params: Array): Promise {\n if (params == null) { params = [ ]; }\n\n const request = { method, params };\n\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: deepCopy(request),\n provider: this\n });\n\n return provider.request(request).then((response) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: this\n });\n\n return response;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: this\n });\n\n throw error;\n });\n }\n}\n\nexport class Web3Provider extends JsonRpcProvider {\n readonly provider: ExternalProvider;\n readonly jsonRpcFetchFunc: JsonRpcFetchFunc;\n\n constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish) {\n logger.checkNew(new.target, Web3Provider);\n\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n\n let path: string = null;\n let jsonRpcFetchFunc: JsonRpcFetchFunc = null;\n let subprovider: ExternalProvider = null;\n\n if (typeof(provider) === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n\n subprovider = provider;\n\n if (provider.request) {\n if (path === \"\") { path = \"eip-1193:\"; }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n\n if (!path) { path = \"unknown:\"; }\n }\n\n super(path, network);\n\n defineReadOnly(this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n defineReadOnly(this, \"provider\", subprovider);\n }\n\n send(method: string, params: Array): Promise {\n return this.jsonRpcFetchFunc(method, params);\n }\n}\n","\"use strict\";\n\nimport {\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n Provider,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from \"@ethersproject/abstract-provider\";\n\nimport { getNetwork } from \"@ethersproject/networks\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\n\nimport { BaseProvider, EnsProvider, EnsResolver, Resolver } from \"./base-provider\";\n\nimport { AlchemyProvider, AlchemyWebSocketProvider } from \"./alchemy-provider\";\nimport { CloudflareProvider } from \"./cloudflare-provider\";\nimport { EtherscanProvider } from \"./etherscan-provider\";\nimport { FallbackProvider, FallbackProviderConfig } from \"./fallback-provider\";\nimport { IpcProvider } from \"./ipc-provider\";\nimport { InfuraProvider, InfuraWebSocketProvider } from \"./infura-provider\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\nimport { JsonRpcBatchProvider } from \"./json-rpc-batch-provider\";\nimport { NodesmithProvider } from \"./nodesmith-provider\";\nimport { PocketProvider } from \"./pocket-provider\";\nimport { StaticJsonRpcProvider, UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\nimport { Web3Provider } from \"./web3-provider\";\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { ExternalProvider, JsonRpcFetchFunc } from \"./web3-provider\";\n\nimport { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n////////////////////////\n// Helper Functions\n\nfunction getDefaultProvider(network?: Networkish, options?: any): BaseProvider {\n if (network == null) { network = \"homestead\"; }\n\n // If passed a URL, figure out the right type of provider based on the scheme\n if (typeof(network) === \"string\") {\n // @TODO: Add support for IpcProvider; maybe if it ends in \".ipc\"?\n\n // Handle http and ws (and their secure variants)\n const match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1]) {\n case \"http\":\n return new JsonRpcProvider(network);\n case \"ws\":\n return new WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n\n const n = getNetwork(network);\n if (!n || !n._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network: network\n });\n }\n\n return n._defaultProvider({\n FallbackProvider,\n\n AlchemyProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n JsonRpcProvider,\n NodesmithProvider,\n PocketProvider,\n Web3Provider,\n\n IpcProvider,\n }, options);\n}\n\n////////////////////////\n// Exports\n\nexport {\n\n // Abstract Providers (or Abstract-ish)\n Provider,\n BaseProvider,\n\n Resolver,\n\n UrlJsonRpcProvider,\n\n ///////////////////////\n // Concrete Providers\n\n FallbackProvider,\n\n AlchemyProvider,\n AlchemyWebSocketProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n InfuraWebSocketProvider,\n JsonRpcProvider,\n JsonRpcBatchProvider,\n NodesmithProvider,\n PocketProvider,\n StaticJsonRpcProvider,\n Web3Provider,\n WebSocketProvider,\n\n IpcProvider,\n\n\n ///////////////////////\n // Signer\n\n JsonRpcSigner,\n\n\n ///////////////////////\n // Functions\n\n getDefaultProvider,\n getNetwork,\n isCommunityResource,\n isCommunityResourcable,\n showThrottleMessage,\n\n\n ///////////////////////\n // Objects\n\n Formatter,\n\n\n ///////////////////////\n // Types\n\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse,\n\n ExternalProvider,\n JsonRpcFetchFunc,\n\n FallbackProviderConfig,\n\n Network,\n Networkish,\n\n EnsProvider,\n EnsResolver,\n\n CommunityResourcable\n};\n\n","export const version = \"solidity/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n\nfunction _pack(type: string, value: any, isArray?: boolean): Uint8Array {\n switch(type) {\n case \"address\":\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\": \"0x00\");\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n }\n\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\")\n\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type)\n }\n\n if (isArray) { size = 256; }\n\n value = BigNumber.from(value).toTwos(size);\n\n return zeroPad(value, size / 8);\n }\n\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type)\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${ type }`, \"value\", value)\n }\n if (isArray) { return arrayify((value + Zeros).substring(0, 66)); }\n return value;\n }\n\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${ type }`, \"value\", value)\n }\n const result: Array = [];\n value.forEach(function(value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", type)\n}\n\n// @TODO: Array Enum\n\nexport function pack(types: ReadonlyArray, values: ReadonlyArray) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values)\n }\n const tight: Array = [];\n types.forEach(function(type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\n\nexport function keccak256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashKeccak256(pack(types, values));\n}\n\nexport function sha256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashSha256(pack(types, values));\n}\n","export const version = \"units/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n\n\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value: string | number): string {\n const comps = String(value).split(\".\");\n\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") { whole = whole.substring(1); }\n if (whole === \"\") { whole = \"0\"; }\n\n let suffix = \"\";\n if (comps.length === 2) { suffix = \".\" + (comps[1] || \"0\"); }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n\n return negative + formatted.join(\",\") + suffix;\n}\n\nexport function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string {\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return formatFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function parseUnits(value: string, unitName?: BigNumberish): BigNumber {\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return parseFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function formatEther(wei: BigNumberish): string {\n return formatUnits(wei, 18);\n}\n\nexport function parseEther(ether: string): BigNumber {\n return parseUnits(ether, 18);\n}\n\n","\"use strict\";\n\nimport { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription }from \"@ethersproject/abi\";\nimport { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from \"@ethersproject/address\";\nimport * as base64 from \"@ethersproject/base64\";\nimport { Base58 as base58 } from \"@ethersproject/basex\";\nimport { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from \"@ethersproject/hash\";\nimport { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from \"@ethersproject/hdnode\";\nimport { getJsonWalletAddress } from \"@ethersproject/json-wallets\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { computeHmac, ripemd160, sha256, sha512 } from \"@ethersproject/sha2\";\nimport { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from \"@ethersproject/solidity\";\nimport { randomBytes, shuffled } from \"@ethersproject/random\";\nimport { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey, SigningKey } from \"@ethersproject/signing-key\";\nimport { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from \"@ethersproject/strings\";\nimport { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from \"@ethersproject/transactions\";\nimport { commify, formatEther, parseEther, formatUnits, parseUnits } from \"@ethersproject/units\";\nimport { verifyMessage, verifyTypedData } from \"@ethersproject/wallet\";\nimport { _fetchData, fetchJson, poll } from \"@ethersproject/web\";\n\n////////////////////////\n// Enums\n\nimport { SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { UnicodeNormalizationForm, Utf8ErrorReason } from \"@ethersproject/strings\";\nimport { UnsignedTransaction } from \"@ethersproject/transactions\";\n\n////////////////////////\n// Types and Interfaces\n\nimport { CoerceFunc } from \"@ethersproject/abi\";\nimport { Bytes, BytesLike, Hexable } from \"@ethersproject/bytes\"\nimport { Mnemonic } from \"@ethersproject/hdnode\";\nimport { EncryptOptions, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { Deferrable } from \"@ethersproject/properties\";\nimport { Utf8ErrorFunc } from \"@ethersproject/strings\";\nimport { AccessList, AccessListish } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from \"@ethersproject/web\";\n\n////////////////////////\n// Exports\n\nexport {\n AbiCoder,\n defaultAbiCoder,\n\n Fragment,\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n checkResultErrors,\n Result,\n\n Logger,\n\n RLP,\n\n _fetchData,\n fetchJson,\n poll,\n\n checkProperties,\n deepCopy,\n defineReadOnly,\n getStatic,\n resolveProperties,\n shallowCopy,\n\n arrayify,\n\n concat,\n stripZeros,\n zeroPad,\n\n isBytes,\n isBytesLike,\n\n defaultPath,\n HDNode,\n SigningKey,\n\n Interface,\n\n LogDescription,\n TransactionDescription,\n\n base58,\n base64,\n\n hexlify,\n isHexString,\n hexConcat,\n hexStripZeros,\n hexValue,\n hexZeroPad,\n hexDataLength,\n hexDataSlice,\n\n nameprep,\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n Utf8ErrorFuncs,\n\n formatBytes32String,\n parseBytes32String,\n\n hashMessage,\n namehash,\n isValidName,\n id,\n\n _TypedDataEncoder,\n\n getAddress,\n getIcapAddress,\n getContractAddress,\n getCreate2Address,\n isAddress,\n\n formatEther,\n parseEther,\n\n formatUnits,\n parseUnits,\n\n commify,\n\n computeHmac,\n keccak256,\n ripemd160,\n sha256,\n sha512,\n\n randomBytes,\n shuffled,\n\n solidityPack,\n solidityKeccak256,\n soliditySha256,\n\n splitSignature,\n joinSignature,\n\n accessListify,\n parseTransaction,\n serializeTransaction,\n TransactionTypes,\n\n getJsonWalletAddress,\n\n computeAddress,\n recoverAddress,\n\n computePublicKey,\n recoverPublicKey,\n\n verifyMessage,\n verifyTypedData,\n\n getAccountPath,\n mnemonicToEntropy,\n entropyToMnemonic,\n isValidMnemonic,\n mnemonicToSeed,\n\n\n ////////////////////////\n // Enums\n\n SupportedAlgorithm,\n\n UnicodeNormalizationForm,\n Utf8ErrorReason,\n\n ////////////////////////\n // Types\n\n Bytes,\n BytesLike,\n Hexable,\n\n AccessList,\n AccessListish,\n UnsignedTransaction,\n\n CoerceFunc,\n\n Indexed,\n\n Mnemonic,\n\n Deferrable,\n\n Utf8ErrorFunc,\n\n ConnectionInfo,\n OnceBlockable,\n OncePollable,\n PollOptions,\n FetchJsonResponse,\n\n EncryptOptions,\n ProgressCallback\n}\n\n","export const version = \"ethers/5.5.2\";\n","\"use strict\";\n\nimport { BaseContract, Contract, ContractFactory } from \"@ethersproject/contracts\";\n\nimport { BigNumber, FixedNumber } from \"@ethersproject/bignumber\";\n\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { Wallet } from \"@ethersproject/wallet\";\n\nimport * as constants from \"@ethersproject/constants\";\n\nimport * as providers from \"@ethersproject/providers\";\nimport { getDefaultProvider } from \"@ethersproject/providers\";\n\nimport { Wordlist, wordlists} from \"@ethersproject/wordlists\";\n\nimport * as utils from \"./utils\";\n\nimport { ErrorCode as errors, Logger } from \"@ethersproject/logger\";\n\n////////////////////////\n// Types\n\nimport { BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike, Signature } from \"@ethersproject/bytes\";\nimport { Transaction, UnsignedTransaction } from \"@ethersproject/transactions\";\n\n\n////////////////////////\n// Compile-Time Constants\n\n// This is generated by \"npm run dist\"\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\n////////////////////////\n// Types\n\nimport {\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface\n} from \"@ethersproject/contracts\";\n\n\n////////////////////////\n// Exports\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n};\n\n","\"use strict\";\n\n// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js\n\nimport * as ethers from \"./ethers\";\n\ntry {\n const anyGlobal = (window as any);\n\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers;\n }\n} catch (error) { }\n\nexport { ethers };\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n} from \"./ethers\";\n"]} \ No newline at end of file diff --git a/node_modules/ethers/dist/ethers.umd.js b/node_modules/ethers/dist/ethers.umd.js new file mode 100644 index 0000000..89d3590 --- /dev/null +++ b/node_modules/ethers/dist/ethers.umd.js @@ -0,0 +1,27001 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ethers = factory()); +}(this, (function () { 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + } + + function createCommonjsModule(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; + } + + function getDefaultExportFromNamespaceIfPresent (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; + } + + function getDefaultExportFromNamespaceIfNotNamed (n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; + } + + function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var a = Object.defineProperty({}, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; + } + + function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); + } + + var bn = createCommonjsModule(function (module) { + (function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') { + Buffer = window.Buffer; + } else { + Buffer = /*RicMoo:ethers:require(buffer)*/(null).Buffer; + } + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + this.negative = 1; + } + + if (start < number.length) { + if (base === 16) { + this._parseHex(number, start, endian); + } else { + this._parseBase(number, base, start); + if (endian === 'le') { + this._initArray(this.toArray(), base, endian); + } + } + } + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; + + function parseHex4Bits (string, index) { + var c = string.charCodeAt(index); + // 'A' - 'F' + if (c >= 65 && c <= 70) { + return c - 55; + // 'a' - 'f' + } else if (c >= 97 && c <= 102) { + return c - 87; + // '0' - '9' + } else { + return (c - 48) & 0xf; + } + } + + function parseHexByte (string, lowerBound, index) { + var r = parseHex4Bits(string, index); + if (index - 1 >= lowerBound) { + r |= parseHex4Bits(string, index - 1) << 4; + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start, endian) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + // 24-bits chunks + var off = 0; + var j = 0; + + var w; + if (endian === 'be') { + for (i = number.length - 1; i >= start; i -= 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } else { + var parseLength = number.length - start; + for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } + + this.strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; + + // '0' - '9' + } else { + r += c; + } + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + this.strip(); + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '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' + ]; + + var groupSizes = [ + 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 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); + + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } + + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[i] = b; + } + + for (; i < reqLength; i++) { + res[i] = 0; + } + } + + return res; + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this.strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this.strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this.strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this.strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this.strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this.strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out.strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out.strip(); + } + + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this.strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this.strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this.strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this.strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this.strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this.strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return acc; + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + return this.strip(); + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this.strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + if (r.strip !== undefined) { + // r is BN v4 instance + r.strip(); + } else { + // r is BN v5 instance + r._strip(); + } + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1).toRed(this); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(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); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; + })('object' === 'undefined' || module, commonjsGlobal); + }); + + var _version = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "logger/5.5.0"; + + }); + + var _version$1 = /*@__PURE__*/getDefaultExportFromCjs(_version); + + var lib = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Logger = exports.ErrorCode = exports.LogLevel = void 0; + var _permanentCensorErrors = false; + var _censorErrors = false; + var LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 }; + var _logLevel = LogLevels["default"]; + + var _globalLogger = null; + function _checkNormalize() { + try { + var missing_1 = []; + // Make sure all forms of normalization are supported + ["NFD", "NFC", "NFKD", "NFKC"].forEach(function (form) { + try { + if ("test".normalize(form) !== "test") { + throw new Error("bad normalize"); + } + ; + } + catch (error) { + missing_1.push(form); + } + }); + if (missing_1.length) { + throw new Error("missing " + missing_1.join(", ")); + } + if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) { + throw new Error("broken implementation"); + } + } + catch (error) { + return error.message; + } + return null; + } + var _normalizeError = _checkNormalize(); + var LogLevel; + (function (LogLevel) { + LogLevel["DEBUG"] = "DEBUG"; + LogLevel["INFO"] = "INFO"; + LogLevel["WARNING"] = "WARNING"; + LogLevel["ERROR"] = "ERROR"; + LogLevel["OFF"] = "OFF"; + })(LogLevel = exports.LogLevel || (exports.LogLevel = {})); + var ErrorCode; + (function (ErrorCode) { + /////////////////// + // Generic Errors + // Unknown Error + ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; + // Not Implemented + ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED"; + // Unsupported Operation + // - operation + ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION"; + // Network Error (i.e. Ethereum Network, such as an invalid chain ID) + // - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown) + ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR"; + // Some sort of bad response from the server + ErrorCode["SERVER_ERROR"] = "SERVER_ERROR"; + // Timeout + ErrorCode["TIMEOUT"] = "TIMEOUT"; + /////////////////// + // Operational Errors + // Buffer Overrun + ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN"; + // Numeric Fault + // - operation: the operation being executed + // - fault: the reason this faulted + ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT"; + /////////////////// + // Argument Errors + // Missing new operator to an object + // - name: The name of the class + ErrorCode["MISSING_NEW"] = "MISSING_NEW"; + // Invalid argument (e.g. value is incompatible with type) to a function: + // - argument: The argument name that was invalid + // - value: The value of the argument + ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT"; + // Missing argument to a function: + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT"; + // Too many arguments + // - count: The number of arguments received + // - expectedCount: The number of arguments expected + ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT"; + /////////////////// + // Blockchain Errors + // Call exception + // - transaction: the transaction + // - address?: the contract address + // - args?: The arguments passed into the function + // - method?: The Solidity method signature + // - errorSignature?: The EIP848 error signature + // - errorArgs?: The EIP848 error parameters + // - reason: The reason (only for EIP848 "Error(string)") + ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION"; + // Insufficient funds (< value + gasLimit * gasPrice) + // - transaction: the transaction attempted + ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS"; + // Nonce has already been used + // - transaction: the transaction attempted + ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED"; + // The replacement fee for the transaction is too low + // - transaction: the transaction attempted + ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED"; + // The gas limit could not be estimated + // - transaction: the transaction passed to estimateGas + ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT"; + // The transaction was replaced by one with a higher gas price + // - reason: "cancelled", "replaced" or "repriced" + // - cancelled: true if reason == "cancelled" or reason == "replaced") + // - hash: original transaction hash + // - replacement: the full TransactionsResponse for the replacement + // - receipt: the receipt of the replacement + ErrorCode["TRANSACTION_REPLACED"] = "TRANSACTION_REPLACED"; + })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); + ; + var HEX = "0123456789abcdef"; + var Logger = /** @class */ (function () { + function Logger(version) { + Object.defineProperty(this, "version", { + enumerable: true, + value: version, + writable: false + }); + } + Logger.prototype._log = function (logLevel, args) { + var level = logLevel.toLowerCase(); + if (LogLevels[level] == null) { + this.throwArgumentError("invalid log level name", "logLevel", logLevel); + } + if (_logLevel > LogLevels[level]) { + return; + } + console.log.apply(console, args); + }; + Logger.prototype.debug = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this._log(Logger.levels.DEBUG, args); + }; + Logger.prototype.info = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this._log(Logger.levels.INFO, args); + }; + Logger.prototype.warn = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this._log(Logger.levels.WARNING, args); + }; + Logger.prototype.makeError = function (message, code, params) { + // Errors are being censored + if (_censorErrors) { + return this.makeError("censored error", code, {}); + } + if (!code) { + code = Logger.errors.UNKNOWN_ERROR; + } + if (!params) { + params = {}; + } + var messageDetails = []; + Object.keys(params).forEach(function (key) { + var value = params[key]; + try { + if (value instanceof Uint8Array) { + var hex = ""; + for (var i = 0; i < value.length; i++) { + hex += HEX[value[i] >> 4]; + hex += HEX[value[i] & 0x0f]; + } + messageDetails.push(key + "=Uint8Array(0x" + hex + ")"); + } + else { + messageDetails.push(key + "=" + JSON.stringify(value)); + } + } + catch (error) { + messageDetails.push(key + "=" + JSON.stringify(params[key].toString())); + } + }); + messageDetails.push("code=" + code); + messageDetails.push("version=" + this.version); + var reason = message; + if (messageDetails.length) { + message += " (" + messageDetails.join(", ") + ")"; + } + // @TODO: Any?? + var error = new Error(message); + error.reason = reason; + error.code = code; + Object.keys(params).forEach(function (key) { + error[key] = params[key]; + }); + return error; + }; + Logger.prototype.throwError = function (message, code, params) { + throw this.makeError(message, code, params); + }; + Logger.prototype.throwArgumentError = function (message, name, value) { + return this.throwError(message, Logger.errors.INVALID_ARGUMENT, { + argument: name, + value: value + }); + }; + Logger.prototype.assert = function (condition, message, code, params) { + if (!!condition) { + return; + } + this.throwError(message, code, params); + }; + Logger.prototype.assertArgument = function (condition, message, name, value) { + if (!!condition) { + return; + } + this.throwArgumentError(message, name, value); + }; + Logger.prototype.checkNormalize = function (message) { + if (message == null) { + message = "platform missing String.prototype.normalize"; + } + if (_normalizeError) { + this.throwError("platform missing String.prototype.normalize", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "String.prototype.normalize", form: _normalizeError + }); + } + }; + Logger.prototype.checkSafeUint53 = function (value, message) { + if (typeof (value) !== "number") { + return; + } + if (message == null) { + message = "value not safe"; + } + if (value < 0 || value >= 0x1fffffffffffff) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "out-of-safe-range", + value: value + }); + } + if (value % 1) { + this.throwError(message, Logger.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "non-integer", + value: value + }); + } + }; + Logger.prototype.checkArgumentCount = function (count, expectedCount, message) { + if (message) { + message = ": " + message; + } + else { + message = ""; + } + if (count < expectedCount) { + this.throwError("missing argument" + message, Logger.errors.MISSING_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + if (count > expectedCount) { + this.throwError("too many arguments" + message, Logger.errors.UNEXPECTED_ARGUMENT, { + count: count, + expectedCount: expectedCount + }); + } + }; + Logger.prototype.checkNew = function (target, kind) { + if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + }; + Logger.prototype.checkAbstract = function (target, kind) { + if (target === kind) { + this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); + } + else if (target === Object || target == null) { + this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); + } + }; + Logger.globalLogger = function () { + if (!_globalLogger) { + _globalLogger = new Logger(_version.version); + } + return _globalLogger; + }; + Logger.setCensorship = function (censorship, permanent) { + if (!censorship && permanent) { + this.globalLogger().throwError("cannot permanently disable censorship", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + if (_permanentCensorErrors) { + if (!censorship) { + return; + } + this.globalLogger().throwError("error censorship permanent", Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }); + } + _censorErrors = !!censorship; + _permanentCensorErrors = !!permanent; + }; + Logger.setLogLevel = function (logLevel) { + var level = LogLevels[logLevel.toLowerCase()]; + if (level == null) { + Logger.globalLogger().warn("invalid log level - " + logLevel); + return; + } + _logLevel = level; + }; + Logger.from = function (version) { + return new Logger(version); + }; + Logger.errors = ErrorCode; + Logger.levels = LogLevel; + return Logger; + }()); + exports.Logger = Logger; + + }); + + var index = /*@__PURE__*/getDefaultExportFromCjs(lib); + + var _version$2 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "bytes/5.5.0"; + + }); + + var _version$3 = /*@__PURE__*/getDefaultExportFromCjs(_version$2); + + var lib$1 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinSignature = exports.splitSignature = exports.hexZeroPad = exports.hexStripZeros = exports.hexValue = exports.hexConcat = exports.hexDataSlice = exports.hexDataLength = exports.hexlify = exports.isHexString = exports.zeroPad = exports.stripZeros = exports.concat = exports.arrayify = exports.isBytes = exports.isBytesLike = void 0; + + + var logger = new lib.Logger(_version$2.version); + /////////////////////////////// + function isHexable(value) { + return !!(value.toHexString); + } + function addSlice(array) { + if (array.slice) { + return array; + } + array.slice = function () { + var args = Array.prototype.slice.call(arguments); + return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args))); + }; + return array; + } + function isBytesLike(value) { + return ((isHexString(value) && !(value.length % 2)) || isBytes(value)); + } + exports.isBytesLike = isBytesLike; + function isInteger(value) { + return (typeof (value) === "number" && value == value && (value % 1) === 0); + } + function isBytes(value) { + if (value == null) { + return false; + } + if (value.constructor === Uint8Array) { + return true; + } + if (typeof (value) === "string") { + return false; + } + if (!isInteger(value.length) || value.length < 0) { + return false; + } + for (var i = 0; i < value.length; i++) { + var v = value[i]; + if (!isInteger(v) || v < 0 || v >= 256) { + return false; + } + } + return true; + } + exports.isBytes = isBytes; + function arrayify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid arrayify value"); + var result = []; + while (value) { + result.unshift(value & 0xff); + value = parseInt(String(value / 256)); + } + if (result.length === 0) { + result.push(0); + } + return addSlice(new Uint8Array(result)); + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + value = value.toHexString(); + } + if (isHexString(value)) { + var hex = value.substring(2); + if (hex.length % 2) { + if (options.hexPad === "left") { + hex = "0x0" + hex.substring(2); + } + else if (options.hexPad === "right") { + hex += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + var result = []; + for (var i = 0; i < hex.length; i += 2) { + result.push(parseInt(hex.substring(i, i + 2), 16)); + } + return addSlice(new Uint8Array(result)); + } + if (isBytes(value)) { + return addSlice(new Uint8Array(value)); + } + return logger.throwArgumentError("invalid arrayify value", "value", value); + } + exports.arrayify = arrayify; + function concat(items) { + var objects = items.map(function (item) { return arrayify(item); }); + var length = objects.reduce(function (accum, item) { return (accum + item.length); }, 0); + var result = new Uint8Array(length); + objects.reduce(function (offset, object) { + result.set(object, offset); + return offset + object.length; + }, 0); + return addSlice(result); + } + exports.concat = concat; + function stripZeros(value) { + var result = arrayify(value); + if (result.length === 0) { + return result; + } + // Find the first non-zero entry + var start = 0; + while (start < result.length && result[start] === 0) { + start++; + } + // If we started with zeros, strip them + if (start) { + result = result.slice(start); + } + return result; + } + exports.stripZeros = stripZeros; + function zeroPad(value, length) { + value = arrayify(value); + if (value.length > length) { + logger.throwArgumentError("value out of range", "value", arguments[0]); + } + var result = new Uint8Array(length); + result.set(value, length - value.length); + return addSlice(result); + } + exports.zeroPad = zeroPad; + function isHexString(value, length) { + if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + if (length && value.length !== 2 + 2 * length) { + return false; + } + return true; + } + exports.isHexString = isHexString; + var HexCharacters = "0123456789abcdef"; + function hexlify(value, options) { + if (!options) { + options = {}; + } + if (typeof (value) === "number") { + logger.checkSafeUint53(value, "invalid hexlify value"); + var hex = ""; + while (value) { + hex = HexCharacters[value & 0xf] + hex; + value = Math.floor(value / 16); + } + if (hex.length) { + if (hex.length % 2) { + hex = "0" + hex; + } + return "0x" + hex; + } + return "0x00"; + } + if (typeof (value) === "bigint") { + value = value.toString(16); + if (value.length % 2) { + return ("0x0" + value); + } + return "0x" + value; + } + if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if (isHexable(value)) { + return value.toHexString(); + } + if (isHexString(value)) { + if (value.length % 2) { + if (options.hexPad === "left") { + value = "0x0" + value.substring(2); + } + else if (options.hexPad === "right") { + value += "0"; + } + else { + logger.throwArgumentError("hex data is odd-length", "value", value); + } + } + return value.toLowerCase(); + } + if (isBytes(value)) { + var result = "0x"; + for (var i = 0; i < value.length; i++) { + var v = value[i]; + result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; + } + return result; + } + return logger.throwArgumentError("invalid hexlify value", "value", value); + } + exports.hexlify = hexlify; + /* + function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number { + if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") { + return "0x0" + value.substring(2); + } + return value; + } + */ + function hexDataLength(data) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + return null; + } + return (data.length - 2) / 2; + } + exports.hexDataLength = hexDataLength; + function hexDataSlice(data, offset, endOffset) { + if (typeof (data) !== "string") { + data = hexlify(data); + } + else if (!isHexString(data) || (data.length % 2)) { + logger.throwArgumentError("invalid hexData", "value", data); + } + offset = 2 + 2 * offset; + if (endOffset != null) { + return "0x" + data.substring(offset, 2 + 2 * endOffset); + } + return "0x" + data.substring(offset); + } + exports.hexDataSlice = hexDataSlice; + function hexConcat(items) { + var result = "0x"; + items.forEach(function (item) { + result += hexlify(item).substring(2); + }); + return result; + } + exports.hexConcat = hexConcat; + function hexValue(value) { + var trimmed = hexStripZeros(hexlify(value, { hexPad: "left" })); + if (trimmed === "0x") { + return "0x0"; + } + return trimmed; + } + exports.hexValue = hexValue; + function hexStripZeros(value) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + value = value.substring(2); + var offset = 0; + while (offset < value.length && value[offset] === "0") { + offset++; + } + return "0x" + value.substring(offset); + } + exports.hexStripZeros = hexStripZeros; + function hexZeroPad(value, length) { + if (typeof (value) !== "string") { + value = hexlify(value); + } + else if (!isHexString(value)) { + logger.throwArgumentError("invalid hex string", "value", value); + } + if (value.length > 2 * length + 2) { + logger.throwArgumentError("value out of range", "value", arguments[1]); + } + while (value.length < 2 * length + 2) { + value = "0x0" + value.substring(2); + } + return value; + } + exports.hexZeroPad = hexZeroPad; + function splitSignature(signature) { + var result = { + r: "0x", + s: "0x", + _vs: "0x", + recoveryParam: 0, + v: 0 + }; + if (isBytesLike(signature)) { + var bytes = arrayify(signature); + if (bytes.length !== 65) { + logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature); + } + // Get the r, s and v + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + // Allow a recid to be used as the v + if (result.v < 27) { + if (result.v === 0 || result.v === 1) { + result.v += 27; + } + else { + logger.throwArgumentError("signature invalid v byte", "signature", signature); + } + } + // Compute recoveryParam from v + result.recoveryParam = 1 - (result.v % 2); + // Compute _vs from recoveryParam and s + if (result.recoveryParam) { + bytes[32] |= 0x80; + } + result._vs = hexlify(bytes.slice(32, 64)); + } + else { + result.r = signature.r; + result.s = signature.s; + result.v = signature.v; + result.recoveryParam = signature.recoveryParam; + result._vs = signature._vs; + // If the _vs is available, use it to populate missing s, v and recoveryParam + // and verify non-missing s, v and recoveryParam + if (result._vs != null) { + var vs_1 = zeroPad(arrayify(result._vs), 32); + result._vs = hexlify(vs_1); + // Set or check the recid + var recoveryParam = ((vs_1[0] >= 128) ? 1 : 0); + if (result.recoveryParam == null) { + result.recoveryParam = recoveryParam; + } + else if (result.recoveryParam !== recoveryParam) { + logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature); + } + // Set or check the s + vs_1[0] &= 0x7f; + var s = hexlify(vs_1); + if (result.s == null) { + result.s = s; + } + else if (result.s !== s) { + logger.throwArgumentError("signature v mismatch _vs", "signature", signature); + } + } + // Use recid and v to populate each other + if (result.recoveryParam == null) { + if (result.v == null) { + logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature); + } + else if (result.v === 0 || result.v === 1) { + result.recoveryParam = result.v; + } + else { + result.recoveryParam = 1 - (result.v % 2); + } + } + else { + if (result.v == null) { + result.v = 27 + result.recoveryParam; + } + else { + var recId = (result.v === 0 || result.v === 1) ? result.v : (1 - (result.v % 2)); + if (result.recoveryParam !== recId) { + logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature); + } + } + } + if (result.r == null || !isHexString(result.r)) { + logger.throwArgumentError("signature missing or invalid r", "signature", signature); + } + else { + result.r = hexZeroPad(result.r, 32); + } + if (result.s == null || !isHexString(result.s)) { + logger.throwArgumentError("signature missing or invalid s", "signature", signature); + } + else { + result.s = hexZeroPad(result.s, 32); + } + var vs = arrayify(result.s); + if (vs[0] >= 128) { + logger.throwArgumentError("signature s out of range", "signature", signature); + } + if (result.recoveryParam) { + vs[0] |= 0x80; + } + var _vs = hexlify(vs); + if (result._vs) { + if (!isHexString(result._vs)) { + logger.throwArgumentError("signature invalid _vs", "signature", signature); + } + result._vs = hexZeroPad(result._vs, 32); + } + // Set or check the _vs + if (result._vs == null) { + result._vs = _vs; + } + else if (result._vs !== _vs) { + logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature); + } + } + return result; + } + exports.splitSignature = splitSignature; + function joinSignature(signature) { + signature = splitSignature(signature); + return hexlify(concat([ + signature.r, + signature.s, + (signature.recoveryParam ? "0x1c" : "0x1b") + ])); + } + exports.joinSignature = joinSignature; + + }); + + var index$1 = /*@__PURE__*/getDefaultExportFromCjs(lib$1); + + var _version$4 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "bignumber/5.5.0"; + + }); + + var _version$5 = /*@__PURE__*/getDefaultExportFromCjs(_version$4); + + var bignumber = createCommonjsModule(function (module, exports) { + "use strict"; + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._base16To36 = exports._base36To16 = exports.BigNumber = exports.isBigNumberish = void 0; + /** + * BigNumber + * + * A wrapper around the BN.js object. We use the BN.js library + * because it is used by elliptic, so it is required regardless. + * + */ + var bn_js_1 = __importDefault(bn); + var BN = bn_js_1.default.BN; + + + + var logger = new lib.Logger(_version$4.version); + var _constructorGuard = {}; + var MAX_SAFE = 0x1fffffffffffff; + function isBigNumberish(value) { + return (value != null) && (BigNumber.isBigNumber(value) || + (typeof (value) === "number" && (value % 1) === 0) || + (typeof (value) === "string" && !!value.match(/^-?[0-9]+$/)) || + (0, lib$1.isHexString)(value) || + (typeof (value) === "bigint") || + (0, lib$1.isBytes)(value)); + } + exports.isBigNumberish = isBigNumberish; + // Only warn about passing 10 into radix once + var _warnedToStringRadix = false; + var BigNumber = /** @class */ (function () { + function BigNumber(constructorGuard, hex) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, BigNumber); + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot call constructor directly; use BigNumber.from", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new (BigNumber)" + }); + } + this._hex = hex; + this._isBigNumber = true; + Object.freeze(this); + } + BigNumber.prototype.fromTwos = function (value) { + return toBigNumber(toBN(this).fromTwos(value)); + }; + BigNumber.prototype.toTwos = function (value) { + return toBigNumber(toBN(this).toTwos(value)); + }; + BigNumber.prototype.abs = function () { + if (this._hex[0] === "-") { + return BigNumber.from(this._hex.substring(1)); + } + return this; + }; + BigNumber.prototype.add = function (other) { + return toBigNumber(toBN(this).add(toBN(other))); + }; + BigNumber.prototype.sub = function (other) { + return toBigNumber(toBN(this).sub(toBN(other))); + }; + BigNumber.prototype.div = function (other) { + var o = BigNumber.from(other); + if (o.isZero()) { + throwFault("division by zero", "div"); + } + return toBigNumber(toBN(this).div(toBN(other))); + }; + BigNumber.prototype.mul = function (other) { + return toBigNumber(toBN(this).mul(toBN(other))); + }; + BigNumber.prototype.mod = function (other) { + var value = toBN(other); + if (value.isNeg()) { + throwFault("cannot modulo negative values", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + }; + BigNumber.prototype.pow = function (other) { + var value = toBN(other); + if (value.isNeg()) { + throwFault("cannot raise to negative values", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + }; + BigNumber.prototype.and = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'and' negative values", "and"); + } + return toBigNumber(toBN(this).and(value)); + }; + BigNumber.prototype.or = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'or' negative values", "or"); + } + return toBigNumber(toBN(this).or(value)); + }; + BigNumber.prototype.xor = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("cannot 'xor' negative values", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + }; + BigNumber.prototype.mask = function (value) { + if (this.isNegative() || value < 0) { + throwFault("cannot mask negative values", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + }; + BigNumber.prototype.shl = function (value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + }; + BigNumber.prototype.shr = function (value) { + if (this.isNegative() || value < 0) { + throwFault("cannot shift negative values", "shr"); + } + return toBigNumber(toBN(this).shrn(value)); + }; + BigNumber.prototype.eq = function (other) { + return toBN(this).eq(toBN(other)); + }; + BigNumber.prototype.lt = function (other) { + return toBN(this).lt(toBN(other)); + }; + BigNumber.prototype.lte = function (other) { + return toBN(this).lte(toBN(other)); + }; + BigNumber.prototype.gt = function (other) { + return toBN(this).gt(toBN(other)); + }; + BigNumber.prototype.gte = function (other) { + return toBN(this).gte(toBN(other)); + }; + BigNumber.prototype.isNegative = function () { + return (this._hex[0] === "-"); + }; + BigNumber.prototype.isZero = function () { + return toBN(this).isZero(); + }; + BigNumber.prototype.toNumber = function () { + try { + return toBN(this).toNumber(); + } + catch (error) { + throwFault("overflow", "toNumber", this.toString()); + } + return null; + }; + BigNumber.prototype.toBigInt = function () { + try { + return BigInt(this.toString()); + } + catch (e) { } + return logger.throwError("this platform does not support BigInt", lib.Logger.errors.UNSUPPORTED_OPERATION, { + value: this.toString() + }); + }; + BigNumber.prototype.toString = function () { + // Lots of people expect this, which we do not support, so check (See: #889) + if (arguments.length > 0) { + if (arguments[0] === 10) { + if (!_warnedToStringRadix) { + _warnedToStringRadix = true; + logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); + } + } + else if (arguments[0] === 16) { + logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", lib.Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + else { + logger.throwError("BigNumber.toString does not accept parameters", lib.Logger.errors.UNEXPECTED_ARGUMENT, {}); + } + } + return toBN(this).toString(10); + }; + BigNumber.prototype.toHexString = function () { + return this._hex; + }; + BigNumber.prototype.toJSON = function (key) { + return { type: "BigNumber", hex: this.toHexString() }; + }; + BigNumber.from = function (value) { + if (value instanceof BigNumber) { + return value; + } + if (typeof (value) === "string") { + if (value.match(/^-?0x[0-9a-f]+$/i)) { + return new BigNumber(_constructorGuard, toHex(value)); + } + if (value.match(/^-?[0-9]+$/)) { + return new BigNumber(_constructorGuard, toHex(new BN(value))); + } + return logger.throwArgumentError("invalid BigNumber string", "value", value); + } + if (typeof (value) === "number") { + if (value % 1) { + throwFault("underflow", "BigNumber.from", value); + } + if (value >= MAX_SAFE || value <= -MAX_SAFE) { + throwFault("overflow", "BigNumber.from", value); + } + return BigNumber.from(String(value)); + } + var anyValue = value; + if (typeof (anyValue) === "bigint") { + return BigNumber.from(anyValue.toString()); + } + if ((0, lib$1.isBytes)(anyValue)) { + return BigNumber.from((0, lib$1.hexlify)(anyValue)); + } + if (anyValue) { + // Hexable interface (takes priority) + if (anyValue.toHexString) { + var hex = anyValue.toHexString(); + if (typeof (hex) === "string") { + return BigNumber.from(hex); + } + } + else { + // For now, handle legacy JSON-ified values (goes away in v6) + var hex = anyValue._hex; + // New-form JSON + if (hex == null && anyValue.type === "BigNumber") { + hex = anyValue.hex; + } + if (typeof (hex) === "string") { + if ((0, lib$1.isHexString)(hex) || (hex[0] === "-" && (0, lib$1.isHexString)(hex.substring(1)))) { + return BigNumber.from(hex); + } + } + } + } + return logger.throwArgumentError("invalid BigNumber value", "value", value); + }; + BigNumber.isBigNumber = function (value) { + return !!(value && value._isBigNumber); + }; + return BigNumber; + }()); + exports.BigNumber = BigNumber; + // Normalize the hex string + function toHex(value) { + // For BN, call on the hex string + if (typeof (value) !== "string") { + return toHex(value.toString(16)); + } + // If negative, prepend the negative sign to the normalized positive value + if (value[0] === "-") { + // Strip off the negative sign + value = value.substring(1); + // Cannot have multiple negative signs (e.g. "--0x04") + if (value[0] === "-") { + logger.throwArgumentError("invalid hex", "value", value); + } + // Call toHex on the positive component + value = toHex(value); + // Do not allow "-0x00" + if (value === "0x00") { + return value; + } + // Negate the value + return "-" + value; + } + // Add a "0x" prefix if missing + if (value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + // Normalize zero + if (value === "0x") { + return "0x00"; + } + // Make the string even length + if (value.length % 2) { + value = "0x0" + value.substring(2); + } + // Trim to smallest even-length string + while (value.length > 4 && value.substring(0, 4) === "0x00") { + value = "0x" + value.substring(4); + } + return value; + } + function toBigNumber(value) { + return BigNumber.from(toHex(value)); + } + function toBN(value) { + var hex = BigNumber.from(value).toHexString(); + if (hex[0] === "-") { + return (new BN("-" + hex.substring(3), 16)); + } + return new BN(hex.substring(2), 16); + } + function throwFault(fault, operation, value) { + var params = { fault: fault, operation: operation }; + if (value != null) { + params.value = value; + } + return logger.throwError(fault, lib.Logger.errors.NUMERIC_FAULT, params); + } + // value should have no prefix + function _base36To16(value) { + return (new BN(value, 36)).toString(16); + } + exports._base36To16 = _base36To16; + // value should have no prefix + function _base16To36(value) { + return (new BN(value, 16)).toString(36); + } + exports._base16To36 = _base16To36; + + }); + + var bignumber$1 = /*@__PURE__*/getDefaultExportFromCjs(bignumber); + + var fixednumber = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.FixedNumber = exports.FixedFormat = exports.parseFixed = exports.formatFixed = void 0; + + + + var logger = new lib.Logger(_version$4.version); + + var _constructorGuard = {}; + var Zero = bignumber.BigNumber.from(0); + var NegativeOne = bignumber.BigNumber.from(-1); + function throwFault(message, fault, operation, value) { + var params = { fault: fault, operation: operation }; + if (value !== undefined) { + params.value = value; + } + return logger.throwError(message, lib.Logger.errors.NUMERIC_FAULT, params); + } + // Constant to pull zeros from for multipliers + var zeros = "0"; + while (zeros.length < 256) { + zeros += zeros; + } + // Returns a string "1" followed by decimal "0"s + function getMultiplier(decimals) { + if (typeof (decimals) !== "number") { + try { + decimals = bignumber.BigNumber.from(decimals).toNumber(); + } + catch (e) { } + } + if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) { + return ("1" + zeros.substring(0, decimals)); + } + return logger.throwArgumentError("invalid decimal size", "decimals", decimals); + } + function formatFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + var multiplier = getMultiplier(decimals); + // Make sure wei is a big number (convert as necessary) + value = bignumber.BigNumber.from(value); + var negative = value.lt(Zero); + if (negative) { + value = value.mul(NegativeOne); + } + var fraction = value.mod(multiplier).toString(); + while (fraction.length < multiplier.length - 1) { + fraction = "0" + fraction; + } + // Strip training 0 + fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1]; + var whole = value.div(multiplier).toString(); + if (multiplier.length === 1) { + value = whole; + } + else { + value = whole + "." + fraction; + } + if (negative) { + value = "-" + value; + } + return value; + } + exports.formatFixed = formatFixed; + function parseFixed(value, decimals) { + if (decimals == null) { + decimals = 0; + } + var multiplier = getMultiplier(decimals); + if (typeof (value) !== "string" || !value.match(/^-?[0-9.]+$/)) { + logger.throwArgumentError("invalid decimal value", "value", value); + } + // Is it negative? + var negative = (value.substring(0, 1) === "-"); + if (negative) { + value = value.substring(1); + } + if (value === ".") { + logger.throwArgumentError("missing value", "value", value); + } + // Split it into a whole and fractional part + var comps = value.split("."); + if (comps.length > 2) { + logger.throwArgumentError("too many decimal points", "value", value); + } + var whole = comps[0], fraction = comps[1]; + if (!whole) { + whole = "0"; + } + if (!fraction) { + fraction = "0"; + } + // Trim trailing zeros + while (fraction[fraction.length - 1] === "0") { + fraction = fraction.substring(0, fraction.length - 1); + } + // Check the fraction doesn't exceed our decimals size + if (fraction.length > multiplier.length - 1) { + throwFault("fractional component exceeds decimals", "underflow", "parseFixed"); + } + // If decimals is 0, we have an empty string for fraction + if (fraction === "") { + fraction = "0"; + } + // Fully pad the string with zeros to get to wei + while (fraction.length < multiplier.length - 1) { + fraction += "0"; + } + var wholeValue = bignumber.BigNumber.from(whole); + var fractionValue = bignumber.BigNumber.from(fraction); + var wei = (wholeValue.mul(multiplier)).add(fractionValue); + if (negative) { + wei = wei.mul(NegativeOne); + } + return wei; + } + exports.parseFixed = parseFixed; + var FixedFormat = /** @class */ (function () { + function FixedFormat(constructorGuard, signed, width, decimals) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedFormat constructor; use FixedFormat.from", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.signed = signed; + this.width = width; + this.decimals = decimals; + this.name = (signed ? "" : "u") + "fixed" + String(width) + "x" + String(decimals); + this._multiplier = getMultiplier(decimals); + Object.freeze(this); + } + FixedFormat.from = function (value) { + if (value instanceof FixedFormat) { + return value; + } + if (typeof (value) === "number") { + value = "fixed128x" + value; + } + var signed = true; + var width = 128; + var decimals = 18; + if (typeof (value) === "string") { + if (value === "fixed") { + // defaults... + } + else if (value === "ufixed") { + signed = false; + } + else { + var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/); + if (!match) { + logger.throwArgumentError("invalid fixed format", "format", value); + } + signed = (match[1] !== "u"); + width = parseInt(match[2]); + decimals = parseInt(match[3]); + } + } + else if (value) { + var check = function (key, type, defaultValue) { + if (value[key] == null) { + return defaultValue; + } + if (typeof (value[key]) !== type) { + logger.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]); + } + return value[key]; + }; + signed = check("signed", "boolean", signed); + width = check("width", "number", width); + decimals = check("decimals", "number", decimals); + } + if (width % 8) { + logger.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); + } + if (decimals > 80) { + logger.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); + } + return new FixedFormat(_constructorGuard, signed, width, decimals); + }; + return FixedFormat; + }()); + exports.FixedFormat = FixedFormat; + var FixedNumber = /** @class */ (function () { + function FixedNumber(constructorGuard, hex, value, format) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, FixedNumber); + if (constructorGuard !== _constructorGuard) { + logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new FixedFormat" + }); + } + this.format = format; + this._hex = hex; + this._value = value; + this._isFixedNumber = true; + Object.freeze(this); + } + FixedNumber.prototype._checkFormat = function (other) { + if (this.format.name !== other.format.name) { + logger.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); + } + }; + FixedNumber.prototype.addUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format); + }; + FixedNumber.prototype.subUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format); + }; + FixedNumber.prototype.mulUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format); + }; + FixedNumber.prototype.divUnsafe = function (other) { + this._checkFormat(other); + var a = parseFixed(this._value, this.format.decimals); + var b = parseFixed(other._value, other.format.decimals); + return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format); + }; + FixedNumber.prototype.floor = function () { + var comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + var result = FixedNumber.from(comps[0], this.format); + var hasFraction = !comps[1].match(/^(0*)$/); + if (this.isNegative() && hasFraction) { + result = result.subUnsafe(ONE.toFormat(result.format)); + } + return result; + }; + FixedNumber.prototype.ceiling = function () { + var comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + var result = FixedNumber.from(comps[0], this.format); + var hasFraction = !comps[1].match(/^(0*)$/); + if (!this.isNegative() && hasFraction) { + result = result.addUnsafe(ONE.toFormat(result.format)); + } + return result; + }; + // @TODO: Support other rounding algorithms + FixedNumber.prototype.round = function (decimals) { + if (decimals == null) { + decimals = 0; + } + // If we are already in range, we're done + var comps = this.toString().split("."); + if (comps.length === 1) { + comps.push("0"); + } + if (decimals < 0 || decimals > 80 || (decimals % 1)) { + logger.throwArgumentError("invalid decimal count", "decimals", decimals); + } + if (comps[1].length <= decimals) { + return this; + } + var factor = FixedNumber.from("1" + zeros.substring(0, decimals), this.format); + var bump = BUMP.toFormat(this.format); + return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor); + }; + FixedNumber.prototype.isZero = function () { + return (this._value === "0.0" || this._value === "0"); + }; + FixedNumber.prototype.isNegative = function () { + return (this._value[0] === "-"); + }; + FixedNumber.prototype.toString = function () { return this._value; }; + FixedNumber.prototype.toHexString = function (width) { + if (width == null) { + return this._hex; + } + if (width % 8) { + logger.throwArgumentError("invalid byte width", "width", width); + } + var hex = bignumber.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(); + return (0, lib$1.hexZeroPad)(hex, width / 8); + }; + FixedNumber.prototype.toUnsafeFloat = function () { return parseFloat(this.toString()); }; + FixedNumber.prototype.toFormat = function (format) { + return FixedNumber.fromString(this._value, format); + }; + FixedNumber.fromValue = function (value, decimals, format) { + // If decimals looks more like a format, and there is no format, shift the parameters + if (format == null && decimals != null && !(0, bignumber.isBigNumberish)(decimals)) { + format = decimals; + decimals = null; + } + if (decimals == null) { + decimals = 0; + } + if (format == null) { + format = "fixed"; + } + return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format)); + }; + FixedNumber.fromString = function (value, format) { + if (format == null) { + format = "fixed"; + } + var fixedFormat = FixedFormat.from(format); + var numeric = parseFixed(value, fixedFormat.decimals); + if (!fixedFormat.signed && numeric.lt(Zero)) { + throwFault("unsigned value cannot be negative", "overflow", "value", value); + } + var hex = null; + if (fixedFormat.signed) { + hex = numeric.toTwos(fixedFormat.width).toHexString(); + } + else { + hex = numeric.toHexString(); + hex = (0, lib$1.hexZeroPad)(hex, fixedFormat.width / 8); + } + var decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + }; + FixedNumber.fromBytes = function (value, format) { + if (format == null) { + format = "fixed"; + } + var fixedFormat = FixedFormat.from(format); + if ((0, lib$1.arrayify)(value).length > fixedFormat.width / 8) { + throw new Error("overflow"); + } + var numeric = bignumber.BigNumber.from(value); + if (fixedFormat.signed) { + numeric = numeric.fromTwos(fixedFormat.width); + } + var hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString(); + var decimal = formatFixed(numeric, fixedFormat.decimals); + return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat); + }; + FixedNumber.from = function (value, format) { + if (typeof (value) === "string") { + return FixedNumber.fromString(value, format); + } + if ((0, lib$1.isBytes)(value)) { + return FixedNumber.fromBytes(value, format); + } + try { + return FixedNumber.fromValue(value, 0, format); + } + catch (error) { + // Allow NUMERIC_FAULT to bubble up + if (error.code !== lib.Logger.errors.INVALID_ARGUMENT) { + throw error; + } + } + return logger.throwArgumentError("invalid FixedNumber value", "value", value); + }; + FixedNumber.isFixedNumber = function (value) { + return !!(value && value._isFixedNumber); + }; + return FixedNumber; + }()); + exports.FixedNumber = FixedNumber; + var ONE = FixedNumber.from(1); + var BUMP = FixedNumber.from("0.5"); + + }); + + var fixednumber$1 = /*@__PURE__*/getDefaultExportFromCjs(fixednumber); + + var lib$2 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._base36To16 = exports._base16To36 = exports.parseFixed = exports.FixedNumber = exports.FixedFormat = exports.formatFixed = exports.BigNumber = void 0; + + Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return bignumber.BigNumber; } }); + + Object.defineProperty(exports, "formatFixed", { enumerable: true, get: function () { return fixednumber.formatFixed; } }); + Object.defineProperty(exports, "FixedFormat", { enumerable: true, get: function () { return fixednumber.FixedFormat; } }); + Object.defineProperty(exports, "FixedNumber", { enumerable: true, get: function () { return fixednumber.FixedNumber; } }); + Object.defineProperty(exports, "parseFixed", { enumerable: true, get: function () { return fixednumber.parseFixed; } }); + // Internal methods used by address + var bignumber_2 = bignumber; + Object.defineProperty(exports, "_base16To36", { enumerable: true, get: function () { return bignumber_2._base16To36; } }); + Object.defineProperty(exports, "_base36To16", { enumerable: true, get: function () { return bignumber_2._base36To16; } }); + + }); + + var index$2 = /*@__PURE__*/getDefaultExportFromCjs(lib$2); + + var _version$6 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "properties/5.5.0"; + + }); + + var _version$7 = /*@__PURE__*/getDefaultExportFromCjs(_version$6); + + var lib$3 = createCommonjsModule(function (module, exports) { + "use strict"; + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Description = exports.deepCopy = exports.shallowCopy = exports.checkProperties = exports.resolveProperties = exports.getStatic = exports.defineReadOnly = void 0; + + + var logger = new lib.Logger(_version$6.version); + function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); + } + exports.defineReadOnly = defineReadOnly; + // Crawl up the constructor chain to find a static method + function getStatic(ctor, key) { + for (var i = 0; i < 32; i++) { + if (ctor[key]) { + return ctor[key]; + } + if (!ctor.prototype || typeof (ctor.prototype) !== "object") { + break; + } + ctor = Object.getPrototypeOf(ctor.prototype).constructor; + } + return null; + } + exports.getStatic = getStatic; + function resolveProperties(object) { + return __awaiter(this, void 0, void 0, function () { + var promises, results; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + promises = Object.keys(object).map(function (key) { + var value = object[key]; + return Promise.resolve(value).then(function (v) { return ({ key: key, value: v }); }); + }); + return [4 /*yield*/, Promise.all(promises)]; + case 1: + results = _a.sent(); + return [2 /*return*/, results.reduce(function (accum, result) { + accum[(result.key)] = result.value; + return accum; + }, {})]; + } + }); + }); + } + exports.resolveProperties = resolveProperties; + function checkProperties(object, properties) { + if (!object || typeof (object) !== "object") { + logger.throwArgumentError("invalid object", "object", object); + } + Object.keys(object).forEach(function (key) { + if (!properties[key]) { + logger.throwArgumentError("invalid object key - " + key, "transaction:" + key, object); + } + }); + } + exports.checkProperties = checkProperties; + function shallowCopy(object) { + var result = {}; + for (var key in object) { + result[key] = object[key]; + } + return result; + } + exports.shallowCopy = shallowCopy; + var opaque = { bigint: true, boolean: true, "function": true, number: true, string: true }; + function _isFrozen(object) { + // Opaque objects are not mutable, so safe to copy by assignment + if (object === undefined || object === null || opaque[typeof (object)]) { + return true; + } + if (Array.isArray(object) || typeof (object) === "object") { + if (!Object.isFrozen(object)) { + return false; + } + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++) { + var value = null; + try { + value = object[keys[i]]; + } + catch (error) { + // If accessing a value triggers an error, it is a getter + // designed to do so (e.g. Result) and is therefore "frozen" + continue; + } + if (!_isFrozen(value)) { + return false; + } + } + return true; + } + return logger.throwArgumentError("Cannot deepCopy " + typeof (object), "object", object); + } + // Returns a new copy of object, such that no properties may be replaced. + // New properties may be added only to objects. + function _deepCopy(object) { + if (_isFrozen(object)) { + return object; + } + // Arrays are mutable, so we need to create a copy + if (Array.isArray(object)) { + return Object.freeze(object.map(function (item) { return deepCopy(item); })); + } + if (typeof (object) === "object") { + var result = {}; + for (var key in object) { + var value = object[key]; + if (value === undefined) { + continue; + } + defineReadOnly(result, key, deepCopy(value)); + } + return result; + } + return logger.throwArgumentError("Cannot deepCopy " + typeof (object), "object", object); + } + function deepCopy(object) { + return _deepCopy(object); + } + exports.deepCopy = deepCopy; + var Description = /** @class */ (function () { + function Description(info) { + for (var key in info) { + this[key] = deepCopy(info[key]); + } + } + return Description; + }()); + exports.Description = Description; + + }); + + var index$3 = /*@__PURE__*/getDefaultExportFromCjs(lib$3); + + var _version$8 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "abi/5.5.0"; + + }); + + var _version$9 = /*@__PURE__*/getDefaultExportFromCjs(_version$8); + + var fragments = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ErrorFragment = exports.FunctionFragment = exports.ConstructorFragment = exports.EventFragment = exports.Fragment = exports.ParamType = exports.FormatTypes = void 0; + + + + + var logger = new lib.Logger(_version$8.version); + ; + var _constructorGuard = {}; + var ModifiersBytes = { calldata: true, memory: true, storage: true }; + var ModifiersNest = { calldata: true, memory: true }; + function checkModifier(type, name) { + if (type === "bytes" || type === "string") { + if (ModifiersBytes[name]) { + return true; + } + } + else if (type === "address") { + if (name === "payable") { + return true; + } + } + else if (type.indexOf("[") >= 0 || type === "tuple") { + if (ModifiersNest[name]) { + return true; + } + } + if (ModifiersBytes[name] || name === "payable") { + logger.throwArgumentError("invalid modifier", "name", name); + } + return false; + } + // @TODO: Make sure that children of an indexed tuple are marked with a null indexed + function parseParamType(param, allowIndexed) { + var originalParam = param; + function throwError(i) { + logger.throwArgumentError("unexpected character at position " + i, "param", param); + } + param = param.replace(/\s/g, " "); + function newNode(parent) { + var node = { type: "", name: "", parent: parent, state: { allowType: true } }; + if (allowIndexed) { + node.indexed = false; + } + return node; + } + var parent = { type: "", name: "", state: { allowType: true } }; + var node = parent; + for (var i = 0; i < param.length; i++) { + var c = param[i]; + switch (c) { + case "(": + if (node.state.allowType && node.type === "") { + node.type = "tuple"; + } + else if (!node.state.allowParams) { + throwError(i); + } + node.state.allowType = false; + node.type = verifyType(node.type); + node.components = [newNode(node)]; + node = node.components[0]; + break; + case ")": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + var child = node; + node = node.parent; + if (!node) { + throwError(i); + } + delete child.parent; + node.state.allowParams = false; + node.state.allowName = true; + node.state.allowArray = true; + break; + case ",": + delete node.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + if (checkModifier(node.type, node.name)) { + node.name = ""; + } + node.type = verifyType(node.type); + var sibling = newNode(node.parent); + //{ type: "", name: "", parent: node.parent, state: { allowType: true } }; + node.parent.components.push(sibling); + delete node.parent; + node = sibling; + break; + // Hit a space... + case " ": + // If reading type, the type is done and may read a param or name + if (node.state.allowType) { + if (node.type !== "") { + node.type = verifyType(node.type); + delete node.state.allowType; + node.state.allowName = true; + node.state.allowParams = true; + } + } + // If reading name, the name is done + if (node.state.allowName) { + if (node.name !== "") { + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(i); + } + if (node.indexed) { + throwError(i); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + else { + node.state.allowName = false; + } + } + } + break; + case "[": + if (!node.state.allowArray) { + throwError(i); + } + node.type += c; + node.state.allowArray = false; + node.state.allowName = false; + node.state.readArray = true; + break; + case "]": + if (!node.state.readArray) { + throwError(i); + } + node.type += c; + node.state.readArray = false; + node.state.allowArray = true; + node.state.allowName = true; + break; + default: + if (node.state.allowType) { + node.type += c; + node.state.allowParams = true; + node.state.allowArray = true; + } + else if (node.state.allowName) { + node.name += c; + delete node.state.allowArray; + } + else if (node.state.readArray) { + node.type += c; + } + else { + throwError(i); + } + } + } + if (node.parent) { + logger.throwArgumentError("unexpected eof", "param", param); + } + delete parent.state; + if (node.name === "indexed") { + if (!allowIndexed) { + throwError(originalParam.length - 7); + } + if (node.indexed) { + throwError(originalParam.length - 7); + } + node.indexed = true; + node.name = ""; + } + else if (checkModifier(node.type, node.name)) { + node.name = ""; + } + parent.type = verifyType(parent.type); + return parent; + } + function populate(object, params) { + for (var key in params) { + (0, lib$3.defineReadOnly)(object, key, params[key]); + } + } + exports.FormatTypes = Object.freeze({ + // Bare formatting, as is needed for computing a sighash of an event or function + sighash: "sighash", + // Human-Readable with Minimal spacing and without names (compact human-readable) + minimal: "minimal", + // Human-Readable with nice spacing, including all names + full: "full", + // JSON-format a la Solidity + json: "json" + }); + var paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/); + var ParamType = /** @class */ (function () { + function ParamType(constructorGuard, params) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use fromString", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new ParamType()" + }); + } + populate(this, params); + var match = this.type.match(paramTypeArray); + if (match) { + populate(this, { + arrayLength: parseInt(match[2] || "-1"), + arrayChildren: ParamType.fromObject({ + type: match[1], + components: this.components + }), + baseType: "array" + }); + } + else { + populate(this, { + arrayLength: null, + arrayChildren: null, + baseType: ((this.components != null) ? "tuple" : this.type) + }); + } + this._isParamType = true; + Object.freeze(this); + } + // Format the parameter fragment + // - sighash: "(uint256,address)" + // - minimal: "tuple(uint256,address) indexed" + // - full: "tuple(uint256 foo, address bar) indexed baz" + ParamType.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + var result_1 = { + type: ((this.baseType === "tuple") ? "tuple" : this.type), + name: (this.name || undefined) + }; + if (typeof (this.indexed) === "boolean") { + result_1.indexed = this.indexed; + } + if (this.components) { + result_1.components = this.components.map(function (comp) { return JSON.parse(comp.format(format)); }); + } + return JSON.stringify(result_1); + } + var result = ""; + // Array + if (this.baseType === "array") { + result += this.arrayChildren.format(format); + result += "[" + (this.arrayLength < 0 ? "" : String(this.arrayLength)) + "]"; + } + else { + if (this.baseType === "tuple") { + if (format !== exports.FormatTypes.sighash) { + result += this.type; + } + result += "(" + this.components.map(function (comp) { return comp.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ")"; + } + else { + result += this.type; + } + } + if (format !== exports.FormatTypes.sighash) { + if (this.indexed === true) { + result += " indexed"; + } + if (format === exports.FormatTypes.full && this.name) { + result += " " + this.name; + } + } + return result; + }; + ParamType.from = function (value, allowIndexed) { + if (typeof (value) === "string") { + return ParamType.fromString(value, allowIndexed); + } + return ParamType.fromObject(value); + }; + ParamType.fromObject = function (value) { + if (ParamType.isParamType(value)) { + return value; + } + return new ParamType(_constructorGuard, { + name: (value.name || null), + type: verifyType(value.type), + indexed: ((value.indexed == null) ? null : !!value.indexed), + components: (value.components ? value.components.map(ParamType.fromObject) : null) + }); + }; + ParamType.fromString = function (value, allowIndexed) { + function ParamTypify(node) { + return ParamType.fromObject({ + name: node.name, + type: node.type, + indexed: node.indexed, + components: node.components + }); + } + return ParamTypify(parseParamType(value, !!allowIndexed)); + }; + ParamType.isParamType = function (value) { + return !!(value != null && value._isParamType); + }; + return ParamType; + }()); + exports.ParamType = ParamType; + ; + function parseParams(value, allowIndex) { + return splitNesting(value).map(function (param) { return ParamType.fromString(param, allowIndex); }); + } + var Fragment = /** @class */ (function () { + function Fragment(constructorGuard, params) { + if (constructorGuard !== _constructorGuard) { + logger.throwError("use a static from method", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Fragment()" + }); + } + populate(this, params); + this._isFragment = true; + Object.freeze(this); + } + Fragment.from = function (value) { + if (Fragment.isFragment(value)) { + return value; + } + if (typeof (value) === "string") { + return Fragment.fromString(value); + } + return Fragment.fromObject(value); + }; + Fragment.fromObject = function (value) { + if (Fragment.isFragment(value)) { + return value; + } + switch (value.type) { + case "function": + return FunctionFragment.fromObject(value); + case "event": + return EventFragment.fromObject(value); + case "constructor": + return ConstructorFragment.fromObject(value); + case "error": + return ErrorFragment.fromObject(value); + case "fallback": + case "receive": + // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment? + return null; + } + return logger.throwArgumentError("invalid fragment object", "value", value); + }; + Fragment.fromString = function (value) { + // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space + value = value.replace(/\s/g, " "); + value = value.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " "); + value = value.trim(); + if (value.split(" ")[0] === "event") { + return EventFragment.fromString(value.substring(5).trim()); + } + else if (value.split(" ")[0] === "function") { + return FunctionFragment.fromString(value.substring(8).trim()); + } + else if (value.split("(")[0].trim() === "constructor") { + return ConstructorFragment.fromString(value.trim()); + } + else if (value.split(" ")[0] === "error") { + return ErrorFragment.fromString(value.substring(5).trim()); + } + return logger.throwArgumentError("unsupported fragment", "value", value); + }; + Fragment.isFragment = function (value) { + return !!(value && value._isFragment); + }; + return Fragment; + }()); + exports.Fragment = Fragment; + var EventFragment = /** @class */ (function (_super) { + __extends(EventFragment, _super); + function EventFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + EventFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "event", + anonymous: this.anonymous, + name: this.name, + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }) + }); + } + var result = ""; + if (format !== exports.FormatTypes.sighash) { + result += "event "; + } + result += this.name + "(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + if (format !== exports.FormatTypes.sighash) { + if (this.anonymous) { + result += "anonymous "; + } + } + return result.trim(); + }; + EventFragment.from = function (value) { + if (typeof (value) === "string") { + return EventFragment.fromString(value); + } + return EventFragment.fromObject(value); + }; + EventFragment.fromObject = function (value) { + if (EventFragment.isEventFragment(value)) { + return value; + } + if (value.type !== "event") { + logger.throwArgumentError("invalid event object", "value", value); + } + var params = { + name: verifyIdentifier(value.name), + anonymous: value.anonymous, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + type: "event" + }; + return new EventFragment(_constructorGuard, params); + }; + EventFragment.fromString = function (value) { + var match = value.match(regexParen); + if (!match) { + logger.throwArgumentError("invalid event string", "value", value); + } + var anonymous = false; + match[3].split(" ").forEach(function (modifier) { + switch (modifier.trim()) { + case "anonymous": + anonymous = true; + break; + case "": + break; + default: + logger.warn("unknown modifier: " + modifier); + } + }); + return EventFragment.fromObject({ + name: match[1].trim(), + anonymous: anonymous, + inputs: parseParams(match[2], true), + type: "event" + }); + }; + EventFragment.isEventFragment = function (value) { + return (value && value._isFragment && value.type === "event"); + }; + return EventFragment; + }(Fragment)); + exports.EventFragment = EventFragment; + function parseGas(value, params) { + params.gas = null; + var comps = value.split("@"); + if (comps.length !== 1) { + if (comps.length > 2) { + logger.throwArgumentError("invalid human-readable ABI signature", "value", value); + } + if (!comps[1].match(/^[0-9]+$/)) { + logger.throwArgumentError("invalid human-readable ABI signature gas", "value", value); + } + params.gas = lib$2.BigNumber.from(comps[1]); + return comps[0]; + } + return value; + } + function parseModifiers(value, params) { + params.constant = false; + params.payable = false; + params.stateMutability = "nonpayable"; + value.split(" ").forEach(function (modifier) { + switch (modifier.trim()) { + case "constant": + params.constant = true; + break; + case "payable": + params.payable = true; + params.stateMutability = "payable"; + break; + case "nonpayable": + params.payable = false; + params.stateMutability = "nonpayable"; + break; + case "pure": + params.constant = true; + params.stateMutability = "pure"; + break; + case "view": + params.constant = true; + params.stateMutability = "view"; + break; + case "external": + case "public": + case "": + break; + default: + console.log("unknown modifier: " + modifier); + } + }); + } + function verifyState(value) { + var result = { + constant: false, + payable: true, + stateMutability: "payable" + }; + if (value.stateMutability != null) { + result.stateMutability = value.stateMutability; + // Set (and check things are consistent) the constant property + result.constant = (result.stateMutability === "view" || result.stateMutability === "pure"); + if (value.constant != null) { + if ((!!value.constant) !== result.constant) { + logger.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); + } + } + // Set (and check things are consistent) the payable property + result.payable = (result.stateMutability === "payable"); + if (value.payable != null) { + if ((!!value.payable) !== result.payable) { + logger.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); + } + } + } + else if (value.payable != null) { + result.payable = !!value.payable; + // If payable we can assume non-constant; otherwise we can't assume + if (value.constant == null && !result.payable && value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + result.constant = !!value.constant; + if (result.constant) { + result.stateMutability = "view"; + } + else { + result.stateMutability = (result.payable ? "payable" : "nonpayable"); + } + if (result.payable && result.constant) { + logger.throwArgumentError("cannot have constant payable function", "value", value); + } + } + else if (value.constant != null) { + result.constant = !!value.constant; + result.payable = !result.constant; + result.stateMutability = (result.constant ? "view" : "payable"); + } + else if (value.type !== "constructor") { + logger.throwArgumentError("unable to determine stateMutability", "value", value); + } + return result; + } + var ConstructorFragment = /** @class */ (function (_super) { + __extends(ConstructorFragment, _super); + function ConstructorFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + ConstructorFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "constructor", + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }) + }); + } + if (format === exports.FormatTypes.sighash) { + logger.throwError("cannot format a constructor for sighash", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "format(sighash)" + }); + } + var result = "constructor(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + if (this.stateMutability && this.stateMutability !== "nonpayable") { + result += this.stateMutability + " "; + } + return result.trim(); + }; + ConstructorFragment.from = function (value) { + if (typeof (value) === "string") { + return ConstructorFragment.fromString(value); + } + return ConstructorFragment.fromObject(value); + }; + ConstructorFragment.fromObject = function (value) { + if (ConstructorFragment.isConstructorFragment(value)) { + return value; + } + if (value.type !== "constructor") { + logger.throwArgumentError("invalid constructor object", "value", value); + } + var state = verifyState(value); + if (state.constant) { + logger.throwArgumentError("constructor cannot be constant", "value", value); + } + var params = { + name: null, + type: value.type, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? lib$2.BigNumber.from(value.gas) : null) + }; + return new ConstructorFragment(_constructorGuard, params); + }; + ConstructorFragment.fromString = function (value) { + var params = { type: "constructor" }; + value = parseGas(value, params); + var parens = value.match(regexParen); + if (!parens || parens[1].trim() !== "constructor") { + logger.throwArgumentError("invalid constructor string", "value", value); + } + params.inputs = parseParams(parens[2].trim(), false); + parseModifiers(parens[3].trim(), params); + return ConstructorFragment.fromObject(params); + }; + ConstructorFragment.isConstructorFragment = function (value) { + return (value && value._isFragment && value.type === "constructor"); + }; + return ConstructorFragment; + }(Fragment)); + exports.ConstructorFragment = ConstructorFragment; + var FunctionFragment = /** @class */ (function (_super) { + __extends(FunctionFragment, _super); + function FunctionFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + FunctionFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "function", + name: this.name, + constant: this.constant, + stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), + payable: this.payable, + gas: (this.gas ? this.gas.toNumber() : undefined), + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }), + outputs: this.outputs.map(function (output) { return JSON.parse(output.format(format)); }), + }); + } + var result = ""; + if (format !== exports.FormatTypes.sighash) { + result += "function "; + } + result += this.name + "(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + if (format !== exports.FormatTypes.sighash) { + if (this.stateMutability) { + if (this.stateMutability !== "nonpayable") { + result += (this.stateMutability + " "); + } + } + else if (this.constant) { + result += "view "; + } + if (this.outputs && this.outputs.length) { + result += "returns (" + this.outputs.map(function (output) { return output.format(format); }).join(", ") + ") "; + } + if (this.gas != null) { + result += "@" + this.gas.toString() + " "; + } + } + return result.trim(); + }; + FunctionFragment.from = function (value) { + if (typeof (value) === "string") { + return FunctionFragment.fromString(value); + } + return FunctionFragment.fromObject(value); + }; + FunctionFragment.fromObject = function (value) { + if (FunctionFragment.isFunctionFragment(value)) { + return value; + } + if (value.type !== "function") { + logger.throwArgumentError("invalid function object", "value", value); + } + var state = verifyState(value); + var params = { + type: value.type, + name: verifyIdentifier(value.name), + constant: state.constant, + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []), + outputs: (value.outputs ? value.outputs.map(ParamType.fromObject) : []), + payable: state.payable, + stateMutability: state.stateMutability, + gas: (value.gas ? lib$2.BigNumber.from(value.gas) : null) + }; + return new FunctionFragment(_constructorGuard, params); + }; + FunctionFragment.fromString = function (value) { + var params = { type: "function" }; + value = parseGas(value, params); + var comps = value.split(" returns "); + if (comps.length > 2) { + logger.throwArgumentError("invalid function string", "value", value); + } + var parens = comps[0].match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid function signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + parseModifiers(parens[3].trim(), params); + // We have outputs + if (comps.length > 1) { + var returns = comps[1].match(regexParen); + if (returns[1].trim() != "" || returns[3].trim() != "") { + logger.throwArgumentError("unexpected tokens", "value", value); + } + params.outputs = parseParams(returns[2], false); + } + else { + params.outputs = []; + } + return FunctionFragment.fromObject(params); + }; + FunctionFragment.isFunctionFragment = function (value) { + return (value && value._isFragment && value.type === "function"); + }; + return FunctionFragment; + }(ConstructorFragment)); + exports.FunctionFragment = FunctionFragment; + //export class StructFragment extends Fragment { + //} + function checkForbidden(fragment) { + var sig = fragment.format(); + if (sig === "Error(string)" || sig === "Panic(uint256)") { + logger.throwArgumentError("cannot specify user defined " + sig + " error", "fragment", fragment); + } + return fragment; + } + var ErrorFragment = /** @class */ (function (_super) { + __extends(ErrorFragment, _super); + function ErrorFragment() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorFragment.prototype.format = function (format) { + if (!format) { + format = exports.FormatTypes.sighash; + } + if (!exports.FormatTypes[format]) { + logger.throwArgumentError("invalid format type", "format", format); + } + if (format === exports.FormatTypes.json) { + return JSON.stringify({ + type: "error", + name: this.name, + inputs: this.inputs.map(function (input) { return JSON.parse(input.format(format)); }), + }); + } + var result = ""; + if (format !== exports.FormatTypes.sighash) { + result += "error "; + } + result += this.name + "(" + this.inputs.map(function (input) { return input.format(format); }).join((format === exports.FormatTypes.full) ? ", " : ",") + ") "; + return result.trim(); + }; + ErrorFragment.from = function (value) { + if (typeof (value) === "string") { + return ErrorFragment.fromString(value); + } + return ErrorFragment.fromObject(value); + }; + ErrorFragment.fromObject = function (value) { + if (ErrorFragment.isErrorFragment(value)) { + return value; + } + if (value.type !== "error") { + logger.throwArgumentError("invalid error object", "value", value); + } + var params = { + type: value.type, + name: verifyIdentifier(value.name), + inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []) + }; + return checkForbidden(new ErrorFragment(_constructorGuard, params)); + }; + ErrorFragment.fromString = function (value) { + var params = { type: "error" }; + var parens = value.match(regexParen); + if (!parens) { + logger.throwArgumentError("invalid error signature", "value", value); + } + params.name = parens[1].trim(); + if (params.name) { + verifyIdentifier(params.name); + } + params.inputs = parseParams(parens[2], false); + return checkForbidden(ErrorFragment.fromObject(params)); + }; + ErrorFragment.isErrorFragment = function (value) { + return (value && value._isFragment && value.type === "error"); + }; + return ErrorFragment; + }(Fragment)); + exports.ErrorFragment = ErrorFragment; + function verifyType(type) { + // These need to be transformed to their full description + if (type.match(/^uint($|[^1-9])/)) { + type = "uint256" + type.substring(4); + } + else if (type.match(/^int($|[^1-9])/)) { + type = "int256" + type.substring(3); + } + // @TODO: more verification + return type; + } + // See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234 + var regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$"); + function verifyIdentifier(value) { + if (!value || !value.match(regexIdentifier)) { + logger.throwArgumentError("invalid identifier \"" + value + "\"", "value", value); + } + return value; + } + var regexParen = new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"); + function splitNesting(value) { + value = value.trim(); + var result = []; + var accum = ""; + var depth = 0; + for (var offset = 0; offset < value.length; offset++) { + var c = value[offset]; + if (c === "," && depth === 0) { + result.push(accum); + accum = ""; + } + else { + accum += c; + if (c === "(") { + depth++; + } + else if (c === ")") { + depth--; + if (depth === -1) { + logger.throwArgumentError("unbalanced parenthesis", "value", value); + } + } + } + } + if (accum) { + result.push(accum); + } + return result; + } + + }); + + var fragments$1 = /*@__PURE__*/getDefaultExportFromCjs(fragments); + + var abstractCoder = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Reader = exports.Writer = exports.Coder = exports.checkResultErrors = void 0; + + + + + + var logger = new lib.Logger(_version$8.version); + function checkResultErrors(result) { + // Find the first error (if any) + var errors = []; + var checkErrors = function (path, object) { + if (!Array.isArray(object)) { + return; + } + for (var key in object) { + var childPath = path.slice(); + childPath.push(key); + try { + checkErrors(childPath, object[key]); + } + catch (error) { + errors.push({ path: childPath, error: error }); + } + } + }; + checkErrors([], result); + return errors; + } + exports.checkResultErrors = checkResultErrors; + var Coder = /** @class */ (function () { + function Coder(name, type, localName, dynamic) { + // @TODO: defineReadOnly these + this.name = name; + this.type = type; + this.localName = localName; + this.dynamic = dynamic; + } + Coder.prototype._throwError = function (message, value) { + logger.throwArgumentError(message, this.localName, value); + }; + return Coder; + }()); + exports.Coder = Coder; + var Writer = /** @class */ (function () { + function Writer(wordSize) { + (0, lib$3.defineReadOnly)(this, "wordSize", wordSize || 32); + this._data = []; + this._dataLength = 0; + this._padding = new Uint8Array(wordSize); + } + Object.defineProperty(Writer.prototype, "data", { + get: function () { + return (0, lib$1.hexConcat)(this._data); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Writer.prototype, "length", { + get: function () { return this._dataLength; }, + enumerable: false, + configurable: true + }); + Writer.prototype._writeData = function (data) { + this._data.push(data); + this._dataLength += data.length; + return data.length; + }; + Writer.prototype.appendWriter = function (writer) { + return this._writeData((0, lib$1.concat)(writer._data)); + }; + // Arrayish items; padded on the right to wordSize + Writer.prototype.writeBytes = function (value) { + var bytes = (0, lib$1.arrayify)(value); + var paddingOffset = bytes.length % this.wordSize; + if (paddingOffset) { + bytes = (0, lib$1.concat)([bytes, this._padding.slice(paddingOffset)]); + } + return this._writeData(bytes); + }; + Writer.prototype._getValue = function (value) { + var bytes = (0, lib$1.arrayify)(lib$2.BigNumber.from(value)); + if (bytes.length > this.wordSize) { + logger.throwError("value out-of-bounds", lib.Logger.errors.BUFFER_OVERRUN, { + length: this.wordSize, + offset: bytes.length + }); + } + if (bytes.length % this.wordSize) { + bytes = (0, lib$1.concat)([this._padding.slice(bytes.length % this.wordSize), bytes]); + } + return bytes; + }; + // BigNumberish items; padded on the left to wordSize + Writer.prototype.writeValue = function (value) { + return this._writeData(this._getValue(value)); + }; + Writer.prototype.writeUpdatableValue = function () { + var _this = this; + var offset = this._data.length; + this._data.push(this._padding); + this._dataLength += this.wordSize; + return function (value) { + _this._data[offset] = _this._getValue(value); + }; + }; + return Writer; + }()); + exports.Writer = Writer; + var Reader = /** @class */ (function () { + function Reader(data, wordSize, coerceFunc, allowLoose) { + (0, lib$3.defineReadOnly)(this, "_data", (0, lib$1.arrayify)(data)); + (0, lib$3.defineReadOnly)(this, "wordSize", wordSize || 32); + (0, lib$3.defineReadOnly)(this, "_coerceFunc", coerceFunc); + (0, lib$3.defineReadOnly)(this, "allowLoose", allowLoose); + this._offset = 0; + } + Object.defineProperty(Reader.prototype, "data", { + get: function () { return (0, lib$1.hexlify)(this._data); }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Reader.prototype, "consumed", { + get: function () { return this._offset; }, + enumerable: false, + configurable: true + }); + // The default Coerce function + Reader.coerce = function (name, value) { + var match = name.match("^u?int([0-9]+)$"); + if (match && parseInt(match[1]) <= 48) { + value = value.toNumber(); + } + return value; + }; + Reader.prototype.coerce = function (name, value) { + if (this._coerceFunc) { + return this._coerceFunc(name, value); + } + return Reader.coerce(name, value); + }; + Reader.prototype._peekBytes = function (offset, length, loose) { + var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize; + if (this._offset + alignedLength > this._data.length) { + if (this.allowLoose && loose && this._offset + length <= this._data.length) { + alignedLength = length; + } + else { + logger.throwError("data out-of-bounds", lib.Logger.errors.BUFFER_OVERRUN, { + length: this._data.length, + offset: this._offset + alignedLength + }); + } + } + return this._data.slice(this._offset, this._offset + alignedLength); + }; + Reader.prototype.subReader = function (offset) { + return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose); + }; + Reader.prototype.readBytes = function (length, loose) { + var bytes = this._peekBytes(0, length, !!loose); + this._offset += bytes.length; + // @TODO: Make sure the length..end bytes are all 0? + return bytes.slice(0, length); + }; + Reader.prototype.readValue = function () { + return lib$2.BigNumber.from(this.readBytes(this.wordSize)); + }; + return Reader; + }()); + exports.Reader = Reader; + + }); + + var abstractCoder$1 = /*@__PURE__*/getDefaultExportFromCjs(abstractCoder); + + var sha3 = createCommonjsModule(function (module) { + /** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ + /*jslint bitwise: true */ + (function () { + 'use strict'; + + var INPUT_ERROR = 'input is invalid type'; + var FINALIZE_ERROR = 'finalize already called'; + var WINDOW = typeof window === 'object'; + var root = WINDOW ? window : {}; + if (root.JS_SHA3_NO_WINDOW) { + WINDOW = false; + } + var WEB_WORKER = !WINDOW && typeof self === 'object'; + var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; + if (NODE_JS) { + root = commonjsGlobal; + } else if (WEB_WORKER) { + root = self; + } + var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && 'object' === 'object' && module.exports; + var AMD = typeof undefined === 'function' && undefined.amd; + var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; + var HEX_CHARS = '0123456789abcdef'.split(''); + var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; + var CSHAKE_PADDING = [4, 1024, 262144, 67108864]; + var KECCAK_PADDING = [1, 256, 65536, 16777216]; + var PADDING = [6, 1536, 393216, 100663296]; + var SHIFT = [0, 8, 16, 24]; + var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, + 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, + 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, + 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, + 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; + var BITS = [224, 256, 384, 512]; + var SHAKE_BITS = [128, 256]; + var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest']; + var CSHAKE_BYTEPAD = { + '128': 168, + '256': 136 + }; + + if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) { + Array.isArray = function (obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; + }; + } + + if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { + ArrayBuffer.isView = function (obj) { + return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; + }; + } + + var createOutputMethod = function (bits, padding, outputType) { + return function (message) { + return new Keccak(bits, padding, bits).update(message)[outputType](); + }; + }; + + var createShakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits) { + return new Keccak(bits, padding, outputBits).update(message)[outputType](); + }; + }; + + var createCshakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits, n, s) { + return methods['cshake' + bits].update(message, outputBits, n, s)[outputType](); + }; + }; + + var createKmacOutputMethod = function (bits, padding, outputType) { + return function (key, message, outputBits, s) { + return methods['kmac' + bits].update(key, message, outputBits, s)[outputType](); + }; + }; + + var createOutputMethods = function (method, createMethod, bits, padding) { + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createMethod(bits, padding, type); + } + return method; + }; + + var createMethod = function (bits, padding) { + var method = createOutputMethod(bits, padding, 'hex'); + method.create = function () { + return new Keccak(bits, padding, bits); + }; + method.update = function (message) { + return method.create().update(message); + }; + return createOutputMethods(method, createOutputMethod, bits, padding); + }; + + var createShakeMethod = function (bits, padding) { + var method = createShakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits) { + return new Keccak(bits, padding, outputBits); + }; + method.update = function (message, outputBits) { + return method.create(outputBits).update(message); + }; + return createOutputMethods(method, createShakeOutputMethod, bits, padding); + }; + + var createCshakeMethod = function (bits, padding) { + var w = CSHAKE_BYTEPAD[bits]; + var method = createCshakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits, n, s) { + if (!n && !s) { + return methods['shake' + bits].create(outputBits); + } else { + return new Keccak(bits, padding, outputBits).bytepad([n, s], w); + } + }; + method.update = function (message, outputBits, n, s) { + return method.create(outputBits, n, s).update(message); + }; + return createOutputMethods(method, createCshakeOutputMethod, bits, padding); + }; + + var createKmacMethod = function (bits, padding) { + var w = CSHAKE_BYTEPAD[bits]; + var method = createKmacOutputMethod(bits, padding, 'hex'); + method.create = function (key, outputBits, s) { + return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w); + }; + method.update = function (key, message, outputBits, s) { + return method.create(key, outputBits, s).update(message); + }; + return createOutputMethods(method, createKmacOutputMethod, bits, padding); + }; + + var algorithms = [ + { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod }, + { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod }, + { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod }, + { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod }, + { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod } + ]; + + var methods = {}, methodNames = []; + + for (var i = 0; i < algorithms.length; ++i) { + var algorithm = algorithms[i]; + var bits = algorithm.bits; + for (var j = 0; j < bits.length; ++j) { + var methodName = algorithm.name + '_' + bits[j]; + methodNames.push(methodName); + methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding); + if (algorithm.name !== 'sha3') { + var newMethodName = algorithm.name + bits[j]; + methodNames.push(newMethodName); + methods[newMethodName] = methods[methodName]; + } + } + } + + function Keccak(bits, padding, outputBits) { + this.blocks = []; + this.s = []; + this.padding = padding; + this.outputBits = outputBits; + this.reset = true; + this.finalized = false; + this.block = 0; + this.start = 0; + this.blockCount = (1600 - (bits << 1)) >> 5; + this.byteCount = this.blockCount << 2; + this.outputBlocks = outputBits >> 5; + this.extraBytes = (outputBits & 31) >> 3; + + for (var i = 0; i < 50; ++i) { + this.s[i] = 0; + } + } + + Keccak.prototype.update = function (message) { + if (this.finalized) { + throw new Error(FINALIZE_ERROR); + } + var notString, type = typeof message; + if (type !== 'string') { + if (type === 'object') { + if (message === null) { + throw new Error(INPUT_ERROR); + } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } else if (!Array.isArray(message)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { + throw new Error(INPUT_ERROR); + } + } + } else { + throw new Error(INPUT_ERROR); + } + notString = true; + } + var blocks = this.blocks, byteCount = this.byteCount, length = message.length, + blockCount = this.blockCount, index = 0, s = this.s, i, code; + + while (index < length) { + if (this.reset) { + this.reset = false; + blocks[0] = this.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (notString) { + for (i = this.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + if (i >= byteCount) { + this.start = i - byteCount; + this.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + this.reset = true; + } else { + this.start = i; + } + } + return this; + }; + + Keccak.prototype.encode = function (x, right) { + var o = x & 255, n = 1; + var bytes = [o]; + x = x >> 8; + o = x & 255; + while (o > 0) { + bytes.unshift(o); + x = x >> 8; + o = x & 255; + ++n; + } + if (right) { + bytes.push(n); + } else { + bytes.unshift(n); + } + this.update(bytes); + return bytes.length; + }; + + Keccak.prototype.encodeString = function (str) { + var notString, type = typeof str; + if (type !== 'string') { + if (type === 'object') { + if (str === null) { + throw new Error(INPUT_ERROR); + } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) { + str = new Uint8Array(str); + } else if (!Array.isArray(str)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) { + throw new Error(INPUT_ERROR); + } + } + } else { + throw new Error(INPUT_ERROR); + } + notString = true; + } + var bytes = 0, length = str.length; + if (notString) { + bytes = length; + } else { + for (var i = 0; i < str.length; ++i) { + var code = str.charCodeAt(i); + if (code < 0x80) { + bytes += 1; + } else if (code < 0x800) { + bytes += 2; + } else if (code < 0xd800 || code >= 0xe000) { + bytes += 3; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff)); + bytes += 4; + } + } + } + bytes += this.encode(bytes * 8); + this.update(str); + return bytes; + }; + + Keccak.prototype.bytepad = function (strs, w) { + var bytes = this.encode(w); + for (var i = 0; i < strs.length; ++i) { + bytes += this.encodeString(strs[i]); + } + var paddingBytes = w - bytes % w; + var zeros = []; + zeros.length = paddingBytes; + this.update(zeros); + return this; + }; + + Keccak.prototype.finalize = function () { + if (this.finalized) { + return; + } + this.finalized = true; + var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; + blocks[i >> 2] |= this.padding[i & 3]; + if (this.lastByteIndex === this.byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + }; + + Keccak.prototype.toString = Keccak.prototype.hex = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var hex = '', block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + + HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + + HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + + HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + if (extraBytes) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; + if (extraBytes > 1) { + hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; + } + if (extraBytes > 2) { + hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; + } + } + return hex; + }; + + Keccak.prototype.arrayBuffer = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var bytes = this.outputBits >> 3; + var buffer; + if (extraBytes) { + buffer = new ArrayBuffer((outputBlocks + 1) << 2); + } else { + buffer = new ArrayBuffer(bytes); + } + var array = new Uint32Array(buffer); + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + array[j] = s[i]; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + array[i] = s[i]; + buffer = buffer.slice(0, bytes); + } + return buffer; + }; + + Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; + + Keccak.prototype.digest = Keccak.prototype.array = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var array = [], offset, block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + array[offset + 1] = (block >> 8) & 0xFF; + array[offset + 2] = (block >> 16) & 0xFF; + array[offset + 3] = (block >> 24) & 0xFF; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + if (extraBytes > 1) { + array[offset + 1] = (block >> 8) & 0xFF; + } + if (extraBytes > 2) { + array[offset + 2] = (block >> 16) & 0xFF; + } + } + return array; + }; + + function Kmac(bits, padding, outputBits) { + Keccak.call(this, bits, padding, outputBits); + } + + Kmac.prototype = new Keccak(); + + Kmac.prototype.finalize = function () { + this.encode(this.outputBits, true); + return Keccak.prototype.finalize.call(this); + }; + + var f = function (s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, + b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, + b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, + b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ ((c2 << 1) | (c3 >>> 31)); + l = c9 ^ ((c3 << 1) | (c2 >>> 31)); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ ((c4 << 1) | (c5 >>> 31)); + l = c1 ^ ((c5 << 1) | (c4 >>> 31)); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ ((c6 << 1) | (c7 >>> 31)); + l = c3 ^ ((c7 << 1) | (c6 >>> 31)); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ ((c8 << 1) | (c9 >>> 31)); + l = c5 ^ ((c9 << 1) | (c8 >>> 31)); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ ((c0 << 1) | (c1 >>> 31)); + l = c7 ^ ((c1 << 1) | (c0 >>> 31)); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = (s[11] << 4) | (s[10] >>> 28); + b33 = (s[10] << 4) | (s[11] >>> 28); + b14 = (s[20] << 3) | (s[21] >>> 29); + b15 = (s[21] << 3) | (s[20] >>> 29); + b46 = (s[31] << 9) | (s[30] >>> 23); + b47 = (s[30] << 9) | (s[31] >>> 23); + b28 = (s[40] << 18) | (s[41] >>> 14); + b29 = (s[41] << 18) | (s[40] >>> 14); + b20 = (s[2] << 1) | (s[3] >>> 31); + b21 = (s[3] << 1) | (s[2] >>> 31); + b2 = (s[13] << 12) | (s[12] >>> 20); + b3 = (s[12] << 12) | (s[13] >>> 20); + b34 = (s[22] << 10) | (s[23] >>> 22); + b35 = (s[23] << 10) | (s[22] >>> 22); + b16 = (s[33] << 13) | (s[32] >>> 19); + b17 = (s[32] << 13) | (s[33] >>> 19); + b48 = (s[42] << 2) | (s[43] >>> 30); + b49 = (s[43] << 2) | (s[42] >>> 30); + b40 = (s[5] << 30) | (s[4] >>> 2); + b41 = (s[4] << 30) | (s[5] >>> 2); + b22 = (s[14] << 6) | (s[15] >>> 26); + b23 = (s[15] << 6) | (s[14] >>> 26); + b4 = (s[25] << 11) | (s[24] >>> 21); + b5 = (s[24] << 11) | (s[25] >>> 21); + b36 = (s[34] << 15) | (s[35] >>> 17); + b37 = (s[35] << 15) | (s[34] >>> 17); + b18 = (s[45] << 29) | (s[44] >>> 3); + b19 = (s[44] << 29) | (s[45] >>> 3); + b10 = (s[6] << 28) | (s[7] >>> 4); + b11 = (s[7] << 28) | (s[6] >>> 4); + b42 = (s[17] << 23) | (s[16] >>> 9); + b43 = (s[16] << 23) | (s[17] >>> 9); + b24 = (s[26] << 25) | (s[27] >>> 7); + b25 = (s[27] << 25) | (s[26] >>> 7); + b6 = (s[36] << 21) | (s[37] >>> 11); + b7 = (s[37] << 21) | (s[36] >>> 11); + b38 = (s[47] << 24) | (s[46] >>> 8); + b39 = (s[46] << 24) | (s[47] >>> 8); + b30 = (s[8] << 27) | (s[9] >>> 5); + b31 = (s[9] << 27) | (s[8] >>> 5); + b12 = (s[18] << 20) | (s[19] >>> 12); + b13 = (s[19] << 20) | (s[18] >>> 12); + b44 = (s[29] << 7) | (s[28] >>> 25); + b45 = (s[28] << 7) | (s[29] >>> 25); + b26 = (s[38] << 8) | (s[39] >>> 24); + b27 = (s[39] << 8) | (s[38] >>> 24); + b8 = (s[48] << 14) | (s[49] >>> 18); + b9 = (s[49] << 14) | (s[48] >>> 18); + + s[0] = b0 ^ (~b2 & b4); + s[1] = b1 ^ (~b3 & b5); + s[10] = b10 ^ (~b12 & b14); + s[11] = b11 ^ (~b13 & b15); + s[20] = b20 ^ (~b22 & b24); + s[21] = b21 ^ (~b23 & b25); + s[30] = b30 ^ (~b32 & b34); + s[31] = b31 ^ (~b33 & b35); + s[40] = b40 ^ (~b42 & b44); + s[41] = b41 ^ (~b43 & b45); + s[2] = b2 ^ (~b4 & b6); + s[3] = b3 ^ (~b5 & b7); + s[12] = b12 ^ (~b14 & b16); + s[13] = b13 ^ (~b15 & b17); + s[22] = b22 ^ (~b24 & b26); + s[23] = b23 ^ (~b25 & b27); + s[32] = b32 ^ (~b34 & b36); + s[33] = b33 ^ (~b35 & b37); + s[42] = b42 ^ (~b44 & b46); + s[43] = b43 ^ (~b45 & b47); + s[4] = b4 ^ (~b6 & b8); + s[5] = b5 ^ (~b7 & b9); + s[14] = b14 ^ (~b16 & b18); + s[15] = b15 ^ (~b17 & b19); + s[24] = b24 ^ (~b26 & b28); + s[25] = b25 ^ (~b27 & b29); + s[34] = b34 ^ (~b36 & b38); + s[35] = b35 ^ (~b37 & b39); + s[44] = b44 ^ (~b46 & b48); + s[45] = b45 ^ (~b47 & b49); + s[6] = b6 ^ (~b8 & b0); + s[7] = b7 ^ (~b9 & b1); + s[16] = b16 ^ (~b18 & b10); + s[17] = b17 ^ (~b19 & b11); + s[26] = b26 ^ (~b28 & b20); + s[27] = b27 ^ (~b29 & b21); + s[36] = b36 ^ (~b38 & b30); + s[37] = b37 ^ (~b39 & b31); + s[46] = b46 ^ (~b48 & b40); + s[47] = b47 ^ (~b49 & b41); + s[8] = b8 ^ (~b0 & b2); + s[9] = b9 ^ (~b1 & b3); + s[18] = b18 ^ (~b10 & b12); + s[19] = b19 ^ (~b11 & b13); + s[28] = b28 ^ (~b20 & b22); + s[29] = b29 ^ (~b21 & b23); + s[38] = b38 ^ (~b30 & b32); + s[39] = b39 ^ (~b31 & b33); + s[48] = b48 ^ (~b40 & b42); + s[49] = b49 ^ (~b41 & b43); + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } + }; + + if (COMMON_JS) { + module.exports = methods; + } else { + for (i = 0; i < methodNames.length; ++i) { + root[methodNames[i]] = methods[methodNames[i]]; + } + if (AMD) { + undefined(function () { + return methods; + }); + } + } + })(); + }); + + var lib$4 = createCommonjsModule(function (module, exports) { + "use strict"; + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.keccak256 = void 0; + var js_sha3_1 = __importDefault(sha3); + + function keccak256(data) { + return '0x' + js_sha3_1.default.keccak_256((0, lib$1.arrayify)(data)); + } + exports.keccak256 = keccak256; + + }); + + var index$4 = /*@__PURE__*/getDefaultExportFromCjs(lib$4); + + var _version$a = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "rlp/5.5.0"; + + }); + + var _version$b = /*@__PURE__*/getDefaultExportFromCjs(_version$a); + + var lib$5 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.decode = exports.encode = void 0; + //See: https://github.com/ethereum/wiki/wiki/RLP + + + + var logger = new lib.Logger(_version$a.version); + function arrayifyInteger(value) { + var result = []; + while (value) { + result.unshift(value & 0xff); + value >>= 8; + } + return result; + } + function unarrayifyInteger(data, offset, length) { + var result = 0; + for (var i = 0; i < length; i++) { + result = (result * 256) + data[offset + i]; + } + return result; + } + function _encode(object) { + if (Array.isArray(object)) { + var payload_1 = []; + object.forEach(function (child) { + payload_1 = payload_1.concat(_encode(child)); + }); + if (payload_1.length <= 55) { + payload_1.unshift(0xc0 + payload_1.length); + return payload_1; + } + var length_1 = arrayifyInteger(payload_1.length); + length_1.unshift(0xf7 + length_1.length); + return length_1.concat(payload_1); + } + if (!(0, lib$1.isBytesLike)(object)) { + logger.throwArgumentError("RLP object must be BytesLike", "object", object); + } + var data = Array.prototype.slice.call((0, lib$1.arrayify)(object)); + if (data.length === 1 && data[0] <= 0x7f) { + return data; + } + else if (data.length <= 55) { + data.unshift(0x80 + data.length); + return data; + } + var length = arrayifyInteger(data.length); + length.unshift(0xb7 + length.length); + return length.concat(data); + } + function encode(object) { + return (0, lib$1.hexlify)(_encode(object)); + } + exports.encode = encode; + function _decodeChildren(data, offset, childOffset, length) { + var result = []; + while (childOffset < offset + 1 + length) { + var decoded = _decode(data, childOffset); + result.push(decoded.result); + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + logger.throwError("child data too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + } + return { consumed: (1 + length), result: result }; + } + // returns { consumed: number, result: Object } + function _decode(data, offset) { + if (data.length === 0) { + logger.throwError("data too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + // Array with extra length prefix + if (data[offset] >= 0xf8) { + var lengthLength = data[offset] - 0xf7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data short segment too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + var length_2 = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length_2 > data.length) { + logger.throwError("data long segment too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2); + } + else if (data[offset] >= 0xc0) { + var length_3 = data[offset] - 0xc0; + if (offset + 1 + length_3 > data.length) { + logger.throwError("data array too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1, length_3); + } + else if (data[offset] >= 0xb8) { + var lengthLength = data[offset] - 0xb7; + if (offset + 1 + lengthLength > data.length) { + logger.throwError("data array too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + var length_4 = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length_4 > data.length) { + logger.throwError("data array too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + var result = (0, lib$1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4)); + return { consumed: (1 + lengthLength + length_4), result: result }; + } + else if (data[offset] >= 0x80) { + var length_5 = data[offset] - 0x80; + if (offset + 1 + length_5 > data.length) { + logger.throwError("data too short", lib.Logger.errors.BUFFER_OVERRUN, {}); + } + var result = (0, lib$1.hexlify)(data.slice(offset + 1, offset + 1 + length_5)); + return { consumed: (1 + length_5), result: result }; + } + return { consumed: 1, result: (0, lib$1.hexlify)(data[offset]) }; + } + function decode(data) { + var bytes = (0, lib$1.arrayify)(data); + var decoded = _decode(bytes, 0); + if (decoded.consumed !== bytes.length) { + logger.throwArgumentError("invalid rlp data", "data", data); + } + return decoded.result; + } + exports.decode = decode; + + }); + + var index$5 = /*@__PURE__*/getDefaultExportFromCjs(lib$5); + + var _version$c = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "address/5.5.0"; + + }); + + var _version$d = /*@__PURE__*/getDefaultExportFromCjs(_version$c); + + var lib$6 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCreate2Address = exports.getContractAddress = exports.getIcapAddress = exports.isAddress = exports.getAddress = void 0; + + + + + + + var logger = new lib.Logger(_version$c.version); + function getChecksumAddress(address) { + if (!(0, lib$1.isHexString)(address, 20)) { + logger.throwArgumentError("invalid address", "address", address); + } + address = address.toLowerCase(); + var chars = address.substring(2).split(""); + var expanded = new Uint8Array(40); + for (var i = 0; i < 40; i++) { + expanded[i] = chars[i].charCodeAt(0); + } + var hashed = (0, lib$1.arrayify)((0, lib$4.keccak256)(expanded)); + for (var i = 0; i < 40; i += 2) { + if ((hashed[i >> 1] >> 4) >= 8) { + chars[i] = chars[i].toUpperCase(); + } + if ((hashed[i >> 1] & 0x0f) >= 8) { + chars[i + 1] = chars[i + 1].toUpperCase(); + } + } + return "0x" + chars.join(""); + } + // Shims for environments that are missing some required constants and functions + var MAX_SAFE_INTEGER = 0x1fffffffffffff; + function log10(x) { + if (Math.log10) { + return Math.log10(x); + } + return Math.log(x) / Math.LN10; + } + // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number + // Create lookup table + var ibanLookup = {}; + for (var i = 0; i < 10; i++) { + ibanLookup[String(i)] = String(i); + } + for (var i = 0; i < 26; i++) { + ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); + } + // How many decimal digits can we process? (for 64-bit float, this is 15) + var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); + function ibanChecksum(address) { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + "00"; + var expanded = address.split("").map(function (c) { return ibanLookup[c]; }).join(""); + // Javascript can handle integers safely up to 15 (decimal) digits + while (expanded.length >= safeDigits) { + var block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + var checksum = String(98 - (parseInt(expanded, 10) % 97)); + while (checksum.length < 2) { + checksum = "0" + checksum; + } + return checksum; + } + ; + function getAddress(address) { + var result = null; + if (typeof (address) !== "string") { + logger.throwArgumentError("invalid address", "address", address); + } + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + // Missing the 0x prefix + if (address.substring(0, 2) !== "0x") { + address = "0x" + address; + } + result = getChecksumAddress(address); + // It is a checksummed address with a bad checksum + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + logger.throwArgumentError("bad address checksum", "address", address); + } + // Maybe ICAP? (we only support direct mode) + } + else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + // It is an ICAP address with a bad checksum + if (address.substring(2, 4) !== ibanChecksum(address)) { + logger.throwArgumentError("bad icap checksum", "address", address); + } + result = (0, lib$2._base36To16)(address.substring(4)); + while (result.length < 40) { + result = "0" + result; + } + result = getChecksumAddress("0x" + result); + } + else { + logger.throwArgumentError("invalid address", "address", address); + } + return result; + } + exports.getAddress = getAddress; + function isAddress(address) { + try { + getAddress(address); + return true; + } + catch (error) { } + return false; + } + exports.isAddress = isAddress; + function getIcapAddress(address) { + var base36 = (0, lib$2._base16To36)(getAddress(address).substring(2)).toUpperCase(); + while (base36.length < 30) { + base36 = "0" + base36; + } + return "XE" + ibanChecksum("XE00" + base36) + base36; + } + exports.getIcapAddress = getIcapAddress; + // http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed + function getContractAddress(transaction) { + var from = null; + try { + from = getAddress(transaction.from); + } + catch (error) { + logger.throwArgumentError("missing from address", "transaction", transaction); + } + var nonce = (0, lib$1.stripZeros)((0, lib$1.arrayify)(lib$2.BigNumber.from(transaction.nonce).toHexString())); + return getAddress((0, lib$1.hexDataSlice)((0, lib$4.keccak256)((0, lib$5.encode)([from, nonce])), 12)); + } + exports.getContractAddress = getContractAddress; + function getCreate2Address(from, salt, initCodeHash) { + if ((0, lib$1.hexDataLength)(salt) !== 32) { + logger.throwArgumentError("salt must be 32 bytes", "salt", salt); + } + if ((0, lib$1.hexDataLength)(initCodeHash) !== 32) { + logger.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); + } + return getAddress((0, lib$1.hexDataSlice)((0, lib$4.keccak256)((0, lib$1.concat)(["0xff", getAddress(from), salt, initCodeHash])), 12)); + } + exports.getCreate2Address = getCreate2Address; + + }); + + var index$6 = /*@__PURE__*/getDefaultExportFromCjs(lib$6); + + var address = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AddressCoder = void 0; + + + + var AddressCoder = /** @class */ (function (_super) { + __extends(AddressCoder, _super); + function AddressCoder(localName) { + return _super.call(this, "address", "address", localName, false) || this; + } + AddressCoder.prototype.defaultValue = function () { + return "0x0000000000000000000000000000000000000000"; + }; + AddressCoder.prototype.encode = function (writer, value) { + try { + value = (0, lib$6.getAddress)(value); + } + catch (error) { + this._throwError(error.message, value); + } + return writer.writeValue(value); + }; + AddressCoder.prototype.decode = function (reader) { + return (0, lib$6.getAddress)((0, lib$1.hexZeroPad)(reader.readValue().toHexString(), 20)); + }; + return AddressCoder; + }(abstractCoder.Coder)); + exports.AddressCoder = AddressCoder; + + }); + + var address$1 = /*@__PURE__*/getDefaultExportFromCjs(address); + + var anonymous = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AnonymousCoder = void 0; + + // Clones the functionality of an existing Coder, but without a localName + var AnonymousCoder = /** @class */ (function (_super) { + __extends(AnonymousCoder, _super); + function AnonymousCoder(coder) { + var _this = _super.call(this, coder.name, coder.type, undefined, coder.dynamic) || this; + _this.coder = coder; + return _this; + } + AnonymousCoder.prototype.defaultValue = function () { + return this.coder.defaultValue(); + }; + AnonymousCoder.prototype.encode = function (writer, value) { + return this.coder.encode(writer, value); + }; + AnonymousCoder.prototype.decode = function (reader) { + return this.coder.decode(reader); + }; + return AnonymousCoder; + }(abstractCoder.Coder)); + exports.AnonymousCoder = AnonymousCoder; + + }); + + var anonymous$1 = /*@__PURE__*/getDefaultExportFromCjs(anonymous); + + var array = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ArrayCoder = exports.unpack = exports.pack = void 0; + + + var logger = new lib.Logger(_version$8.version); + + + function pack(writer, coders, values) { + var arrayValues = null; + if (Array.isArray(values)) { + arrayValues = values; + } + else if (values && typeof (values) === "object") { + var unique_1 = {}; + arrayValues = coders.map(function (coder) { + var name = coder.localName; + if (!name) { + logger.throwError("cannot encode object for signature with missing names", lib.Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + if (unique_1[name]) { + logger.throwError("cannot encode object for signature with duplicate names", lib.Logger.errors.INVALID_ARGUMENT, { + argument: "values", + coder: coder, + value: values + }); + } + unique_1[name] = true; + return values[name]; + }); + } + else { + logger.throwArgumentError("invalid tuple value", "tuple", values); + } + if (coders.length !== arrayValues.length) { + logger.throwArgumentError("types/value length mismatch", "tuple", values); + } + var staticWriter = new abstractCoder.Writer(writer.wordSize); + var dynamicWriter = new abstractCoder.Writer(writer.wordSize); + var updateFuncs = []; + coders.forEach(function (coder, index) { + var value = arrayValues[index]; + if (coder.dynamic) { + // Get current dynamic offset (for the future pointer) + var dynamicOffset_1 = dynamicWriter.length; + // Encode the dynamic value into the dynamicWriter + coder.encode(dynamicWriter, value); + // Prepare to populate the correct offset once we are done + var updateFunc_1 = staticWriter.writeUpdatableValue(); + updateFuncs.push(function (baseOffset) { + updateFunc_1(baseOffset + dynamicOffset_1); + }); + } + else { + coder.encode(staticWriter, value); + } + }); + // Backfill all the dynamic offsets, now that we know the static length + updateFuncs.forEach(function (func) { func(staticWriter.length); }); + var length = writer.appendWriter(staticWriter); + length += writer.appendWriter(dynamicWriter); + return length; + } + exports.pack = pack; + function unpack(reader, coders) { + var values = []; + // A reader anchored to this base + var baseReader = reader.subReader(0); + coders.forEach(function (coder) { + var value = null; + if (coder.dynamic) { + var offset = reader.readValue(); + var offsetReader = baseReader.subReader(offset.toNumber()); + try { + value = coder.decode(offsetReader); + } + catch (error) { + // Cannot recover from this + if (error.code === lib.Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + else { + try { + value = coder.decode(reader); + } + catch (error) { + // Cannot recover from this + if (error.code === lib.Logger.errors.BUFFER_OVERRUN) { + throw error; + } + value = error; + value.baseType = coder.name; + value.name = coder.localName; + value.type = coder.type; + } + } + if (value != undefined) { + values.push(value); + } + }); + // We only output named properties for uniquely named coders + var uniqueNames = coders.reduce(function (accum, coder) { + var name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add any named parameters (i.e. tuples) + coders.forEach(function (coder, index) { + var name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + var value = values[index]; + if (value instanceof Error) { + Object.defineProperty(values, name, { + enumerable: true, + get: function () { throw value; } + }); + } + else { + values[name] = value; + } + }); + var _loop_1 = function (i) { + var value = values[i]; + if (value instanceof Error) { + Object.defineProperty(values, i, { + enumerable: true, + get: function () { throw value; } + }); + } + }; + for (var i = 0; i < values.length; i++) { + _loop_1(i); + } + return Object.freeze(values); + } + exports.unpack = unpack; + var ArrayCoder = /** @class */ (function (_super) { + __extends(ArrayCoder, _super); + function ArrayCoder(coder, length, localName) { + var _this = this; + var type = (coder.type + "[" + (length >= 0 ? length : "") + "]"); + var dynamic = (length === -1 || coder.dynamic); + _this = _super.call(this, "array", type, localName, dynamic) || this; + _this.coder = coder; + _this.length = length; + return _this; + } + ArrayCoder.prototype.defaultValue = function () { + // Verifies the child coder is valid (even if the array is dynamic or 0-length) + var defaultChild = this.coder.defaultValue(); + var result = []; + for (var i = 0; i < this.length; i++) { + result.push(defaultChild); + } + return result; + }; + ArrayCoder.prototype.encode = function (writer, value) { + if (!Array.isArray(value)) { + this._throwError("expected array value", value); + } + var count = this.length; + if (count === -1) { + count = value.length; + writer.writeValue(value.length); + } + logger.checkArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : "")); + var coders = []; + for (var i = 0; i < value.length; i++) { + coders.push(this.coder); + } + return pack(writer, coders, value); + }; + ArrayCoder.prototype.decode = function (reader) { + var count = this.length; + if (count === -1) { + count = reader.readValue().toNumber(); + // Check that there is *roughly* enough data to ensure + // stray random data is not being read as a length. Each + // slot requires at least 32 bytes for their value (or 32 + // bytes as a link to the data). This could use a much + // tighter bound, but we are erroring on the side of safety. + if (count * 32 > reader._data.length) { + logger.throwError("insufficient data length", lib.Logger.errors.BUFFER_OVERRUN, { + length: reader._data.length, + count: count + }); + } + } + var coders = []; + for (var i = 0; i < count; i++) { + coders.push(new anonymous.AnonymousCoder(this.coder)); + } + return reader.coerce(this.name, unpack(reader, coders)); + }; + return ArrayCoder; + }(abstractCoder.Coder)); + exports.ArrayCoder = ArrayCoder; + + }); + + var array$1 = /*@__PURE__*/getDefaultExportFromCjs(array); + + var boolean_1 = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BooleanCoder = void 0; + + var BooleanCoder = /** @class */ (function (_super) { + __extends(BooleanCoder, _super); + function BooleanCoder(localName) { + return _super.call(this, "bool", "bool", localName, false) || this; + } + BooleanCoder.prototype.defaultValue = function () { + return false; + }; + BooleanCoder.prototype.encode = function (writer, value) { + return writer.writeValue(value ? 1 : 0); + }; + BooleanCoder.prototype.decode = function (reader) { + return reader.coerce(this.type, !reader.readValue().isZero()); + }; + return BooleanCoder; + }(abstractCoder.Coder)); + exports.BooleanCoder = BooleanCoder; + + }); + + var boolean = /*@__PURE__*/getDefaultExportFromCjs(boolean_1); + + var bytes = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BytesCoder = exports.DynamicBytesCoder = void 0; + + + var DynamicBytesCoder = /** @class */ (function (_super) { + __extends(DynamicBytesCoder, _super); + function DynamicBytesCoder(type, localName) { + return _super.call(this, type, type, localName, true) || this; + } + DynamicBytesCoder.prototype.defaultValue = function () { + return "0x"; + }; + DynamicBytesCoder.prototype.encode = function (writer, value) { + value = (0, lib$1.arrayify)(value); + var length = writer.writeValue(value.length); + length += writer.writeBytes(value); + return length; + }; + DynamicBytesCoder.prototype.decode = function (reader) { + return reader.readBytes(reader.readValue().toNumber(), true); + }; + return DynamicBytesCoder; + }(abstractCoder.Coder)); + exports.DynamicBytesCoder = DynamicBytesCoder; + var BytesCoder = /** @class */ (function (_super) { + __extends(BytesCoder, _super); + function BytesCoder(localName) { + return _super.call(this, "bytes", localName) || this; + } + BytesCoder.prototype.decode = function (reader) { + return reader.coerce(this.name, (0, lib$1.hexlify)(_super.prototype.decode.call(this, reader))); + }; + return BytesCoder; + }(DynamicBytesCoder)); + exports.BytesCoder = BytesCoder; + + }); + + var bytes$1 = /*@__PURE__*/getDefaultExportFromCjs(bytes); + + var fixedBytes = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.FixedBytesCoder = void 0; + + + // @TODO: Merge this with bytes + var FixedBytesCoder = /** @class */ (function (_super) { + __extends(FixedBytesCoder, _super); + function FixedBytesCoder(size, localName) { + var _this = this; + var name = "bytes" + String(size); + _this = _super.call(this, name, name, localName, false) || this; + _this.size = size; + return _this; + } + FixedBytesCoder.prototype.defaultValue = function () { + return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2); + }; + FixedBytesCoder.prototype.encode = function (writer, value) { + var data = (0, lib$1.arrayify)(value); + if (data.length !== this.size) { + this._throwError("incorrect data length", value); + } + return writer.writeBytes(data); + }; + FixedBytesCoder.prototype.decode = function (reader) { + return reader.coerce(this.name, (0, lib$1.hexlify)(reader.readBytes(this.size))); + }; + return FixedBytesCoder; + }(abstractCoder.Coder)); + exports.FixedBytesCoder = FixedBytesCoder; + + }); + + var fixedBytes$1 = /*@__PURE__*/getDefaultExportFromCjs(fixedBytes); + + var _null = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.NullCoder = void 0; + + var NullCoder = /** @class */ (function (_super) { + __extends(NullCoder, _super); + function NullCoder(localName) { + return _super.call(this, "null", "", localName, false) || this; + } + NullCoder.prototype.defaultValue = function () { + return null; + }; + NullCoder.prototype.encode = function (writer, value) { + if (value != null) { + this._throwError("not null", value); + } + return writer.writeBytes([]); + }; + NullCoder.prototype.decode = function (reader) { + reader.readBytes(0); + return reader.coerce(this.name, null); + }; + return NullCoder; + }(abstractCoder.Coder)); + exports.NullCoder = NullCoder; + + }); + + var _null$1 = /*@__PURE__*/getDefaultExportFromCjs(_null); + + var addresses = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AddressZero = void 0; + exports.AddressZero = "0x0000000000000000000000000000000000000000"; + + }); + + var addresses$1 = /*@__PURE__*/getDefaultExportFromCjs(addresses); + + var bignumbers = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.Two = exports.One = exports.Zero = exports.NegativeOne = void 0; + + var NegativeOne = ( /*#__PURE__*/lib$2.BigNumber.from(-1)); + exports.NegativeOne = NegativeOne; + var Zero = ( /*#__PURE__*/lib$2.BigNumber.from(0)); + exports.Zero = Zero; + var One = ( /*#__PURE__*/lib$2.BigNumber.from(1)); + exports.One = One; + var Two = ( /*#__PURE__*/lib$2.BigNumber.from(2)); + exports.Two = Two; + var WeiPerEther = ( /*#__PURE__*/lib$2.BigNumber.from("1000000000000000000")); + exports.WeiPerEther = WeiPerEther; + var MaxUint256 = ( /*#__PURE__*/lib$2.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); + exports.MaxUint256 = MaxUint256; + var MinInt256 = ( /*#__PURE__*/lib$2.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000")); + exports.MinInt256 = MinInt256; + var MaxInt256 = ( /*#__PURE__*/lib$2.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")); + exports.MaxInt256 = MaxInt256; + + }); + + var bignumbers$1 = /*@__PURE__*/getDefaultExportFromCjs(bignumbers); + + var hashes = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HashZero = void 0; + exports.HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; + + }); + + var hashes$1 = /*@__PURE__*/getDefaultExportFromCjs(hashes); + + var strings = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.EtherSymbol = void 0; + // NFKC (composed) // (decomposed) + exports.EtherSymbol = "\u039e"; // "\uD835\uDF63"; + + }); + + var strings$1 = /*@__PURE__*/getDefaultExportFromCjs(strings); + + var lib$7 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.EtherSymbol = exports.HashZero = exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.Two = exports.One = exports.Zero = exports.NegativeOne = exports.AddressZero = void 0; + + Object.defineProperty(exports, "AddressZero", { enumerable: true, get: function () { return addresses.AddressZero; } }); + + Object.defineProperty(exports, "NegativeOne", { enumerable: true, get: function () { return bignumbers.NegativeOne; } }); + Object.defineProperty(exports, "Zero", { enumerable: true, get: function () { return bignumbers.Zero; } }); + Object.defineProperty(exports, "One", { enumerable: true, get: function () { return bignumbers.One; } }); + Object.defineProperty(exports, "Two", { enumerable: true, get: function () { return bignumbers.Two; } }); + Object.defineProperty(exports, "WeiPerEther", { enumerable: true, get: function () { return bignumbers.WeiPerEther; } }); + Object.defineProperty(exports, "MaxUint256", { enumerable: true, get: function () { return bignumbers.MaxUint256; } }); + Object.defineProperty(exports, "MinInt256", { enumerable: true, get: function () { return bignumbers.MinInt256; } }); + Object.defineProperty(exports, "MaxInt256", { enumerable: true, get: function () { return bignumbers.MaxInt256; } }); + + Object.defineProperty(exports, "HashZero", { enumerable: true, get: function () { return hashes.HashZero; } }); + + Object.defineProperty(exports, "EtherSymbol", { enumerable: true, get: function () { return strings.EtherSymbol; } }); + + }); + + var index$7 = /*@__PURE__*/getDefaultExportFromCjs(lib$7); + + var number = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.NumberCoder = void 0; + + + + var NumberCoder = /** @class */ (function (_super) { + __extends(NumberCoder, _super); + function NumberCoder(size, signed, localName) { + var _this = this; + var name = ((signed ? "int" : "uint") + (size * 8)); + _this = _super.call(this, name, name, localName, false) || this; + _this.size = size; + _this.signed = signed; + return _this; + } + NumberCoder.prototype.defaultValue = function () { + return 0; + }; + NumberCoder.prototype.encode = function (writer, value) { + var v = lib$2.BigNumber.from(value); + // Check bounds are safe for encoding + var maxUintValue = lib$7.MaxUint256.mask(writer.wordSize * 8); + if (this.signed) { + var bounds = maxUintValue.mask(this.size * 8 - 1); + if (v.gt(bounds) || v.lt(bounds.add(lib$7.One).mul(lib$7.NegativeOne))) { + this._throwError("value out-of-bounds", value); + } + } + else if (v.lt(lib$7.Zero) || v.gt(maxUintValue.mask(this.size * 8))) { + this._throwError("value out-of-bounds", value); + } + v = v.toTwos(this.size * 8).mask(this.size * 8); + if (this.signed) { + v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize); + } + return writer.writeValue(v); + }; + NumberCoder.prototype.decode = function (reader) { + var value = reader.readValue().mask(this.size * 8); + if (this.signed) { + value = value.fromTwos(this.size * 8); + } + return reader.coerce(this.name, value); + }; + return NumberCoder; + }(abstractCoder.Coder)); + exports.NumberCoder = NumberCoder; + + }); + + var number$1 = /*@__PURE__*/getDefaultExportFromCjs(number); + + var _version$e = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "strings/5.5.0"; + + }); + + var _version$f = /*@__PURE__*/getDefaultExportFromCjs(_version$e); + + var utf8 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toUtf8CodePoints = exports.toUtf8String = exports._toUtf8String = exports._toEscapedUtf8String = exports.toUtf8Bytes = exports.Utf8ErrorFuncs = exports.Utf8ErrorReason = exports.UnicodeNormalizationForm = void 0; + + + + var logger = new lib.Logger(_version$e.version); + /////////////////////////////// + var UnicodeNormalizationForm; + (function (UnicodeNormalizationForm) { + UnicodeNormalizationForm["current"] = ""; + UnicodeNormalizationForm["NFC"] = "NFC"; + UnicodeNormalizationForm["NFD"] = "NFD"; + UnicodeNormalizationForm["NFKC"] = "NFKC"; + UnicodeNormalizationForm["NFKD"] = "NFKD"; + })(UnicodeNormalizationForm = exports.UnicodeNormalizationForm || (exports.UnicodeNormalizationForm = {})); + ; + var Utf8ErrorReason; + (function (Utf8ErrorReason) { + // A continuation byte was present where there was nothing to continue + // - offset = the index the codepoint began in + Utf8ErrorReason["UNEXPECTED_CONTINUE"] = "unexpected continuation byte"; + // An invalid (non-continuation) byte to start a UTF-8 codepoint was found + // - offset = the index the codepoint began in + Utf8ErrorReason["BAD_PREFIX"] = "bad codepoint prefix"; + // The string is too short to process the expected codepoint + // - offset = the index the codepoint began in + Utf8ErrorReason["OVERRUN"] = "string overrun"; + // A missing continuation byte was expected but not found + // - offset = the index the continuation byte was expected at + Utf8ErrorReason["MISSING_CONTINUE"] = "missing continuation byte"; + // The computed code point is outside the range for UTF-8 + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; outside the UTF-8 range + Utf8ErrorReason["OUT_OF_RANGE"] = "out of UTF-8 range"; + // UTF-8 strings may not contain UTF-16 surrogate pairs + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range + Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate"; + // The string is an overlong representation + // - offset = start of this codepoint + // - badCodepoint = the computed codepoint; already bounds checked + Utf8ErrorReason["OVERLONG"] = "overlong representation"; + })(Utf8ErrorReason = exports.Utf8ErrorReason || (exports.Utf8ErrorReason = {})); + ; + function errorFunc(reason, offset, bytes, output, badCodepoint) { + return logger.throwArgumentError("invalid codepoint at offset " + offset + "; " + reason, "bytes", bytes); + } + function ignoreFunc(reason, offset, bytes, output, badCodepoint) { + // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes + if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { + var i = 0; + for (var o = offset + 1; o < bytes.length; o++) { + if (bytes[o] >> 6 !== 0x02) { + break; + } + i++; + } + return i; + } + // This byte runs us past the end of the string, so just jump to the end + // (but the first byte was read already read and therefore skipped) + if (reason === Utf8ErrorReason.OVERRUN) { + return bytes.length - offset - 1; + } + // Nothing to skip + return 0; + } + function replaceFunc(reason, offset, bytes, output, badCodepoint) { + // Overlong representations are otherwise "valid" code points; just non-deistingtished + if (reason === Utf8ErrorReason.OVERLONG) { + output.push(badCodepoint); + return 0; + } + // Put the replacement character into the output + output.push(0xfffd); + // Otherwise, process as if ignoring errors + return ignoreFunc(reason, offset, bytes, output, badCodepoint); + } + // Common error handing strategies + exports.Utf8ErrorFuncs = Object.freeze({ + error: errorFunc, + ignore: ignoreFunc, + replace: replaceFunc + }); + // http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 + function getUtf8CodePoints(bytes, onError) { + if (onError == null) { + onError = exports.Utf8ErrorFuncs.error; + } + bytes = (0, lib$1.arrayify)(bytes); + var result = []; + var i = 0; + // Invalid bytes are ignored + while (i < bytes.length) { + var c = bytes[i++]; + // 0xxx xxxx + if (c >> 7 === 0) { + result.push(c); + continue; + } + // Multibyte; how many bytes left for this character? + var extraLength = null; + var overlongMask = null; + // 110x xxxx 10xx xxxx + if ((c & 0xe0) === 0xc0) { + extraLength = 1; + overlongMask = 0x7f; + // 1110 xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf0) === 0xe0) { + extraLength = 2; + overlongMask = 0x7ff; + // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx + } + else if ((c & 0xf8) === 0xf0) { + extraLength = 3; + overlongMask = 0xffff; + } + else { + if ((c & 0xc0) === 0x80) { + i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result); + } + else { + i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result); + } + continue; + } + // Do we have enough bytes in our data? + if (i - 1 + extraLength >= bytes.length) { + i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result); + continue; + } + // Remove the length prefix from the char + var res = c & ((1 << (8 - extraLength - 1)) - 1); + for (var j = 0; j < extraLength; j++) { + var nextChar = bytes[i]; + // Invalid continuation byte + if ((nextChar & 0xc0) != 0x80) { + i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result); + res = null; + break; + } + ; + res = (res << 6) | (nextChar & 0x3f); + i++; + } + // See above loop for invalid continuation byte + if (res === null) { + continue; + } + // Maximum code point + if (res > 0x10ffff) { + i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Reserved for UTF-16 surrogate halves + if (res >= 0xd800 && res <= 0xdfff) { + i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res); + continue; + } + // Check for overlong sequences (more bytes than needed) + if (res <= overlongMask) { + i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res); + continue; + } + result.push(res); + } + return result; + } + // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array + function toUtf8Bytes(str, form) { + if (form === void 0) { form = UnicodeNormalizationForm.current; } + if (form != UnicodeNormalizationForm.current) { + logger.checkNormalize(); + str = str.normalize(form); + } + var result = []; + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + if (c < 0x80) { + result.push(c); + } + else if (c < 0x800) { + result.push((c >> 6) | 0xc0); + result.push((c & 0x3f) | 0x80); + } + else if ((c & 0xfc00) == 0xd800) { + i++; + var c2 = str.charCodeAt(i); + if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) { + throw new Error("invalid utf-8 string"); + } + // Surrogate Pair + var pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + result.push((pair >> 18) | 0xf0); + result.push(((pair >> 12) & 0x3f) | 0x80); + result.push(((pair >> 6) & 0x3f) | 0x80); + result.push((pair & 0x3f) | 0x80); + } + else { + result.push((c >> 12) | 0xe0); + result.push(((c >> 6) & 0x3f) | 0x80); + result.push((c & 0x3f) | 0x80); + } + } + return (0, lib$1.arrayify)(result); + } + exports.toUtf8Bytes = toUtf8Bytes; + ; + function escapeChar(value) { + var hex = ("0000" + value.toString(16)); + return "\\u" + hex.substring(hex.length - 4); + } + function _toEscapedUtf8String(bytes, onError) { + return '"' + getUtf8CodePoints(bytes, onError).map(function (codePoint) { + if (codePoint < 256) { + switch (codePoint) { + case 8: return "\\b"; + case 9: return "\\t"; + case 10: return "\\n"; + case 13: return "\\r"; + case 34: return "\\\""; + case 92: return "\\\\"; + } + if (codePoint >= 32 && codePoint < 127) { + return String.fromCharCode(codePoint); + } + } + if (codePoint <= 0xffff) { + return escapeChar(codePoint); + } + codePoint -= 0x10000; + return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00); + }).join("") + '"'; + } + exports._toEscapedUtf8String = _toEscapedUtf8String; + function _toUtf8String(codePoints) { + return codePoints.map(function (codePoint) { + if (codePoint <= 0xffff) { + return String.fromCharCode(codePoint); + } + codePoint -= 0x10000; + return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00)); + }).join(""); + } + exports._toUtf8String = _toUtf8String; + function toUtf8String(bytes, onError) { + return _toUtf8String(getUtf8CodePoints(bytes, onError)); + } + exports.toUtf8String = toUtf8String; + function toUtf8CodePoints(str, form) { + if (form === void 0) { form = UnicodeNormalizationForm.current; } + return getUtf8CodePoints(toUtf8Bytes(str, form)); + } + exports.toUtf8CodePoints = toUtf8CodePoints; + + }); + + var utf8$1 = /*@__PURE__*/getDefaultExportFromCjs(utf8); + + var bytes32 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseBytes32String = exports.formatBytes32String = void 0; + + + + function formatBytes32String(text) { + // Get the bytes + var bytes = (0, utf8.toUtf8Bytes)(text); + // Check we have room for null-termination + if (bytes.length > 31) { + throw new Error("bytes32 string must be less than 32 bytes"); + } + // Zero-pad (implicitly null-terminates) + return (0, lib$1.hexlify)((0, lib$1.concat)([bytes, lib$7.HashZero]).slice(0, 32)); + } + exports.formatBytes32String = formatBytes32String; + function parseBytes32String(bytes) { + var data = (0, lib$1.arrayify)(bytes); + // Must be 32 bytes with a null-termination + if (data.length !== 32) { + throw new Error("invalid bytes32 - not 32 bytes long"); + } + if (data[31] !== 0) { + throw new Error("invalid bytes32 string - no null terminator"); + } + // Find the null termination + var length = 31; + while (data[length - 1] === 0) { + length--; + } + // Determine the string value + return (0, utf8.toUtf8String)(data.slice(0, length)); + } + exports.parseBytes32String = parseBytes32String; + + }); + + var bytes32$1 = /*@__PURE__*/getDefaultExportFromCjs(bytes32); + + var idna = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.nameprep = exports._nameprepTableC = exports._nameprepTableB2 = exports._nameprepTableA1 = void 0; + + function bytes2(data) { + if ((data.length % 4) !== 0) { + throw new Error("bad data"); + } + var result = []; + for (var i = 0; i < data.length; i += 4) { + result.push(parseInt(data.substring(i, i + 4), 16)); + } + return result; + } + function createTable(data, func) { + if (!func) { + func = function (value) { return [parseInt(value, 16)]; }; + } + var lo = 0; + var result = {}; + data.split(",").forEach(function (pair) { + var comps = pair.split(":"); + lo += parseInt(comps[0], 16); + result[lo] = func(comps[1]); + }); + return result; + } + function createRangeTable(data) { + var hi = 0; + return data.split(",").map(function (v) { + var comps = v.split("-"); + if (comps.length === 1) { + comps[1] = "0"; + } + else if (comps[1] === "") { + comps[1] = "1"; + } + var lo = hi + parseInt(comps[0], 16); + hi = parseInt(comps[1], 16); + return { l: lo, h: hi }; + }); + } + function matchMap(value, ranges) { + var lo = 0; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + lo += range.l; + if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) { + if (range.e && range.e.indexOf(value - lo) !== -1) { + continue; + } + return range; + } + } + return null; + } + var Table_A_1_ranges = createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"); + // @TODO: Make this relative... + var Table_B_1_flags = "ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function (v) { return parseInt(v, 16); }); + var Table_B_2_ranges = [ + { h: 25, s: 32, l: 65 }, + { h: 30, s: 32, e: [23], l: 127 }, + { h: 54, s: 1, e: [48], l: 64, d: 2 }, + { h: 14, s: 1, l: 57, d: 2 }, + { h: 44, s: 1, l: 17, d: 2 }, + { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 }, + { h: 16, s: 1, l: 68, d: 2 }, + { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 }, + { h: 26, s: 32, e: [17], l: 435 }, + { h: 22, s: 1, l: 71, d: 2 }, + { h: 15, s: 80, l: 40 }, + { h: 31, s: 32, l: 16 }, + { h: 32, s: 1, l: 80, d: 2 }, + { h: 52, s: 1, l: 42, d: 2 }, + { h: 12, s: 1, l: 55, d: 2 }, + { h: 40, s: 1, e: [38], l: 15, d: 2 }, + { h: 14, s: 1, l: 48, d: 2 }, + { h: 37, s: 48, l: 49 }, + { h: 148, s: 1, l: 6351, d: 2 }, + { h: 88, s: 1, l: 160, d: 2 }, + { h: 15, s: 16, l: 704 }, + { h: 25, s: 26, l: 854 }, + { h: 25, s: 32, l: 55915 }, + { h: 37, s: 40, l: 1247 }, + { h: 25, s: -119711, l: 53248 }, + { h: 25, s: -119763, l: 52 }, + { h: 25, s: -119815, l: 52 }, + { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 }, + { h: 25, s: -119919, l: 52 }, + { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 }, + { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 }, + { h: 25, s: -120075, l: 52 }, + { h: 25, s: -120127, l: 52 }, + { h: 25, s: -120179, l: 52 }, + { h: 25, s: -120231, l: 52 }, + { h: 25, s: -120283, l: 52 }, + { h: 25, s: -120335, l: 52 }, + { h: 24, s: -119543, e: [17], l: 56 }, + { h: 24, s: -119601, e: [17], l: 58 }, + { h: 24, s: -119659, e: [17], l: 58 }, + { h: 24, s: -119717, e: [17], l: 58 }, + { h: 24, s: -119775, e: [17], l: 58 } + ]; + var Table_B_2_lut_abs = createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"); + var Table_B_2_lut_rel = createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"); + var Table_B_2_complex = createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D", bytes2); + var Table_C_ranges = createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001"); + function flatten(values) { + return values.reduce(function (accum, value) { + value.forEach(function (value) { accum.push(value); }); + return accum; + }, []); + } + function _nameprepTableA1(codepoint) { + return !!matchMap(codepoint, Table_A_1_ranges); + } + exports._nameprepTableA1 = _nameprepTableA1; + function _nameprepTableB2(codepoint) { + var range = matchMap(codepoint, Table_B_2_ranges); + if (range) { + return [codepoint + range.s]; + } + var codes = Table_B_2_lut_abs[codepoint]; + if (codes) { + return codes; + } + var shift = Table_B_2_lut_rel[codepoint]; + if (shift) { + return [codepoint + shift[0]]; + } + var complex = Table_B_2_complex[codepoint]; + if (complex) { + return complex; + } + return null; + } + exports._nameprepTableB2 = _nameprepTableB2; + function _nameprepTableC(codepoint) { + return !!matchMap(codepoint, Table_C_ranges); + } + exports._nameprepTableC = _nameprepTableC; + function nameprep(value) { + // This allows platforms with incomplete normalize to bypass + // it for very basic names which the built-in toLowerCase + // will certainly handle correctly + if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { + return value.toLowerCase(); + } + // Get the code points (keeping the current normalization) + var codes = (0, utf8.toUtf8CodePoints)(value); + codes = flatten(codes.map(function (code) { + // Substitute Table B.1 (Maps to Nothing) + if (Table_B_1_flags.indexOf(code) >= 0) { + return []; + } + if (code >= 0xfe00 && code <= 0xfe0f) { + return []; + } + // Substitute Table B.2 (Case Folding) + var codesTableB2 = _nameprepTableB2(code); + if (codesTableB2) { + return codesTableB2; + } + // No Substitution + return [code]; + })); + // Normalize using form KC + codes = (0, utf8.toUtf8CodePoints)((0, utf8._toUtf8String)(codes), utf8.UnicodeNormalizationForm.NFKC); + // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9 + codes.forEach(function (code) { + if (_nameprepTableC(code)) { + throw new Error("STRINGPREP_CONTAINS_PROHIBITED"); + } + }); + // Prohibit Unassigned Code Points (Table A.1) + codes.forEach(function (code) { + if (_nameprepTableA1(code)) { + throw new Error("STRINGPREP_CONTAINS_UNASSIGNED"); + } + }); + // IDNA extras + var name = (0, utf8._toUtf8String)(codes); + // IDNA: 4.2.3.1 + if (name.substring(0, 1) === "-" || name.substring(2, 4) === "--" || name.substring(name.length - 1) === "-") { + throw new Error("invalid hyphen"); + } + // IDNA: 4.2.4 + if (name.length > 63) { + throw new Error("too long"); + } + return name; + } + exports.nameprep = nameprep; + + }); + + var idna$1 = /*@__PURE__*/getDefaultExportFromCjs(idna); + + var lib$8 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.nameprep = exports.parseBytes32String = exports.formatBytes32String = exports.UnicodeNormalizationForm = exports.Utf8ErrorReason = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports._toEscapedUtf8String = void 0; + + Object.defineProperty(exports, "formatBytes32String", { enumerable: true, get: function () { return bytes32.formatBytes32String; } }); + Object.defineProperty(exports, "parseBytes32String", { enumerable: true, get: function () { return bytes32.parseBytes32String; } }); + + Object.defineProperty(exports, "nameprep", { enumerable: true, get: function () { return idna.nameprep; } }); + + Object.defineProperty(exports, "_toEscapedUtf8String", { enumerable: true, get: function () { return utf8._toEscapedUtf8String; } }); + Object.defineProperty(exports, "toUtf8Bytes", { enumerable: true, get: function () { return utf8.toUtf8Bytes; } }); + Object.defineProperty(exports, "toUtf8CodePoints", { enumerable: true, get: function () { return utf8.toUtf8CodePoints; } }); + Object.defineProperty(exports, "toUtf8String", { enumerable: true, get: function () { return utf8.toUtf8String; } }); + Object.defineProperty(exports, "UnicodeNormalizationForm", { enumerable: true, get: function () { return utf8.UnicodeNormalizationForm; } }); + Object.defineProperty(exports, "Utf8ErrorFuncs", { enumerable: true, get: function () { return utf8.Utf8ErrorFuncs; } }); + Object.defineProperty(exports, "Utf8ErrorReason", { enumerable: true, get: function () { return utf8.Utf8ErrorReason; } }); + + }); + + var index$8 = /*@__PURE__*/getDefaultExportFromCjs(lib$8); + + var string = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.StringCoder = void 0; + + + var StringCoder = /** @class */ (function (_super) { + __extends(StringCoder, _super); + function StringCoder(localName) { + return _super.call(this, "string", localName) || this; + } + StringCoder.prototype.defaultValue = function () { + return ""; + }; + StringCoder.prototype.encode = function (writer, value) { + return _super.prototype.encode.call(this, writer, (0, lib$8.toUtf8Bytes)(value)); + }; + StringCoder.prototype.decode = function (reader) { + return (0, lib$8.toUtf8String)(_super.prototype.decode.call(this, reader)); + }; + return StringCoder; + }(bytes.DynamicBytesCoder)); + exports.StringCoder = StringCoder; + + }); + + var string$1 = /*@__PURE__*/getDefaultExportFromCjs(string); + + var tuple = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TupleCoder = void 0; + + + var TupleCoder = /** @class */ (function (_super) { + __extends(TupleCoder, _super); + function TupleCoder(coders, localName) { + var _this = this; + var dynamic = false; + var types = []; + coders.forEach(function (coder) { + if (coder.dynamic) { + dynamic = true; + } + types.push(coder.type); + }); + var type = ("tuple(" + types.join(",") + ")"); + _this = _super.call(this, "tuple", type, localName, dynamic) || this; + _this.coders = coders; + return _this; + } + TupleCoder.prototype.defaultValue = function () { + var values = []; + this.coders.forEach(function (coder) { + values.push(coder.defaultValue()); + }); + // We only output named properties for uniquely named coders + var uniqueNames = this.coders.reduce(function (accum, coder) { + var name = coder.localName; + if (name) { + if (!accum[name]) { + accum[name] = 0; + } + accum[name]++; + } + return accum; + }, {}); + // Add named values + this.coders.forEach(function (coder, index) { + var name = coder.localName; + if (!name || uniqueNames[name] !== 1) { + return; + } + if (name === "length") { + name = "_length"; + } + if (values[name] != null) { + return; + } + values[name] = values[index]; + }); + return Object.freeze(values); + }; + TupleCoder.prototype.encode = function (writer, value) { + return (0, array.pack)(writer, this.coders, value); + }; + TupleCoder.prototype.decode = function (reader) { + return reader.coerce(this.name, (0, array.unpack)(reader, this.coders)); + }; + return TupleCoder; + }(abstractCoder.Coder)); + exports.TupleCoder = TupleCoder; + + }); + + var tuple$1 = /*@__PURE__*/getDefaultExportFromCjs(tuple); + + var abiCoder = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.defaultAbiCoder = exports.AbiCoder = void 0; + // See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI + + + + + var logger = new lib.Logger(_version$8.version); + + + + + + + + + + + + var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); + var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); + var AbiCoder = /** @class */ (function () { + function AbiCoder(coerceFunc) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, AbiCoder); + (0, lib$3.defineReadOnly)(this, "coerceFunc", coerceFunc || null); + } + AbiCoder.prototype._getCoder = function (param) { + var _this = this; + switch (param.baseType) { + case "address": + return new address.AddressCoder(param.name); + case "bool": + return new boolean_1.BooleanCoder(param.name); + case "string": + return new string.StringCoder(param.name); + case "bytes": + return new bytes.BytesCoder(param.name); + case "array": + return new array.ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name); + case "tuple": + return new tuple.TupleCoder((param.components || []).map(function (component) { + return _this._getCoder(component); + }), param.name); + case "": + return new _null.NullCoder(param.name); + } + // u?int[0-9]* + var match = param.type.match(paramTypeNumber); + if (match) { + var size = parseInt(match[2] || "256"); + if (size === 0 || size > 256 || (size % 8) !== 0) { + logger.throwArgumentError("invalid " + match[1] + " bit length", "param", param); + } + return new number.NumberCoder(size / 8, (match[1] === "int"), param.name); + } + // bytes[0-9]+ + match = param.type.match(paramTypeBytes); + if (match) { + var size = parseInt(match[1]); + if (size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes length", "param", param); + } + return new fixedBytes.FixedBytesCoder(size, param.name); + } + return logger.throwArgumentError("invalid type", "type", param.type); + }; + AbiCoder.prototype._getWordSize = function () { return 32; }; + AbiCoder.prototype._getReader = function (data, allowLoose) { + return new abstractCoder.Reader(data, this._getWordSize(), this.coerceFunc, allowLoose); + }; + AbiCoder.prototype._getWriter = function () { + return new abstractCoder.Writer(this._getWordSize()); + }; + AbiCoder.prototype.getDefaultValue = function (types) { + var _this = this; + var coders = types.map(function (type) { return _this._getCoder(fragments.ParamType.from(type)); }); + var coder = new tuple.TupleCoder(coders, "_"); + return coder.defaultValue(); + }; + AbiCoder.prototype.encode = function (types, values) { + var _this = this; + if (types.length !== values.length) { + logger.throwError("types/values length mismatch", lib.Logger.errors.INVALID_ARGUMENT, { + count: { types: types.length, values: values.length }, + value: { types: types, values: values } + }); + } + var coders = types.map(function (type) { return _this._getCoder(fragments.ParamType.from(type)); }); + var coder = (new tuple.TupleCoder(coders, "_")); + var writer = this._getWriter(); + coder.encode(writer, values); + return writer.data; + }; + AbiCoder.prototype.decode = function (types, data, loose) { + var _this = this; + var coders = types.map(function (type) { return _this._getCoder(fragments.ParamType.from(type)); }); + var coder = new tuple.TupleCoder(coders, "_"); + return coder.decode(this._getReader((0, lib$1.arrayify)(data), loose)); + }; + return AbiCoder; + }()); + exports.AbiCoder = AbiCoder; + exports.defaultAbiCoder = new AbiCoder(); + + }); + + var abiCoder$1 = /*@__PURE__*/getDefaultExportFromCjs(abiCoder); + + var id_1 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.id = void 0; + + + function id(text) { + return (0, lib$4.keccak256)((0, lib$8.toUtf8Bytes)(text)); + } + exports.id = id; + + }); + + var id = /*@__PURE__*/getDefaultExportFromCjs(id_1); + + var _version$g = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "hash/5.5.0"; + + }); + + var _version$h = /*@__PURE__*/getDefaultExportFromCjs(_version$g); + + var namehash_1 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.namehash = exports.isValidName = void 0; + + + + + + var logger = new lib.Logger(_version$g.version); + var Zeros = new Uint8Array(32); + Zeros.fill(0); + var Partition = new RegExp("^((.*)\\.)?([^.]+)$"); + function isValidName(name) { + try { + var comps = name.split("."); + for (var i = 0; i < comps.length; i++) { + if ((0, lib$8.nameprep)(comps[i]).length === 0) { + throw new Error("empty"); + } + } + return true; + } + catch (error) { } + return false; + } + exports.isValidName = isValidName; + function namehash(name) { + /* istanbul ignore if */ + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid ENS name; not a string", "name", name); + } + var current = name; + var result = Zeros; + while (current.length) { + var partition = current.match(Partition); + if (partition == null || partition[2] === "") { + logger.throwArgumentError("invalid ENS address; missing component", "name", name); + } + var label = (0, lib$8.toUtf8Bytes)((0, lib$8.nameprep)(partition[3])); + result = (0, lib$4.keccak256)((0, lib$1.concat)([result, (0, lib$4.keccak256)(label)])); + current = partition[2] || ""; + } + return (0, lib$1.hexlify)(result); + } + exports.namehash = namehash; + + }); + + var namehash = /*@__PURE__*/getDefaultExportFromCjs(namehash_1); + + var message = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.hashMessage = exports.messagePrefix = void 0; + + + + exports.messagePrefix = "\x19Ethereum Signed Message:\n"; + function hashMessage(message) { + if (typeof (message) === "string") { + message = (0, lib$8.toUtf8Bytes)(message); + } + return (0, lib$4.keccak256)((0, lib$1.concat)([ + (0, lib$8.toUtf8Bytes)(exports.messagePrefix), + (0, lib$8.toUtf8Bytes)(String(message.length)), + message + ])); + } + exports.hashMessage = hashMessage; + + }); + + var message$1 = /*@__PURE__*/getDefaultExportFromCjs(message); + + var typedData = createCommonjsModule(function (module, exports) { + "use strict"; + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TypedDataEncoder = void 0; + + + + + + + + var logger = new lib.Logger(_version$g.version); + + var padding = new Uint8Array(32); + padding.fill(0); + var NegativeOne = lib$2.BigNumber.from(-1); + var Zero = lib$2.BigNumber.from(0); + var One = lib$2.BigNumber.from(1); + var MaxUint256 = lib$2.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + function hexPadRight(value) { + var bytes = (0, lib$1.arrayify)(value); + var padOffset = bytes.length % 32; + if (padOffset) { + return (0, lib$1.hexConcat)([bytes, padding.slice(padOffset)]); + } + return (0, lib$1.hexlify)(bytes); + } + var hexTrue = (0, lib$1.hexZeroPad)(One.toHexString(), 32); + var hexFalse = (0, lib$1.hexZeroPad)(Zero.toHexString(), 32); + var domainFieldTypes = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" + }; + var domainFieldNames = [ + "name", "version", "chainId", "verifyingContract", "salt" + ]; + function checkString(key) { + return function (value) { + if (typeof (value) !== "string") { + logger.throwArgumentError("invalid domain value for " + JSON.stringify(key), "domain." + key, value); + } + return value; + }; + } + var domainChecks = { + name: checkString("name"), + version: checkString("version"), + chainId: function (value) { + try { + return lib$2.BigNumber.from(value).toString(); + } + catch (error) { } + return logger.throwArgumentError("invalid domain value for \"chainId\"", "domain.chainId", value); + }, + verifyingContract: function (value) { + try { + return (0, lib$6.getAddress)(value).toLowerCase(); + } + catch (error) { } + return logger.throwArgumentError("invalid domain value \"verifyingContract\"", "domain.verifyingContract", value); + }, + salt: function (value) { + try { + var bytes = (0, lib$1.arrayify)(value); + if (bytes.length !== 32) { + throw new Error("bad length"); + } + return (0, lib$1.hexlify)(bytes); + } + catch (error) { } + return logger.throwArgumentError("invalid domain value \"salt\"", "domain.salt", value); + } + }; + function getBaseEncoder(type) { + // intXX and uintXX + { + var match = type.match(/^(u?)int(\d*)$/); + if (match) { + var signed = (match[1] === ""); + var width = parseInt(match[2] || "256"); + if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) { + logger.throwArgumentError("invalid numeric width", "type", type); + } + var boundsUpper_1 = MaxUint256.mask(signed ? (width - 1) : width); + var boundsLower_1 = signed ? boundsUpper_1.add(One).mul(NegativeOne) : Zero; + return function (value) { + var v = lib$2.BigNumber.from(value); + if (v.lt(boundsLower_1) || v.gt(boundsUpper_1)) { + logger.throwArgumentError("value out-of-bounds for " + type, "value", value); + } + return (0, lib$1.hexZeroPad)(v.toTwos(256).toHexString(), 32); + }; + } + } + // bytesXX + { + var match = type.match(/^bytes(\d+)$/); + if (match) { + var width_1 = parseInt(match[1]); + if (width_1 === 0 || width_1 > 32 || match[1] !== String(width_1)) { + logger.throwArgumentError("invalid bytes width", "type", type); + } + return function (value) { + var bytes = (0, lib$1.arrayify)(value); + if (bytes.length !== width_1) { + logger.throwArgumentError("invalid length for " + type, "value", value); + } + return hexPadRight(value); + }; + } + } + switch (type) { + case "address": return function (value) { + return (0, lib$1.hexZeroPad)((0, lib$6.getAddress)(value), 32); + }; + case "bool": return function (value) { + return ((!value) ? hexFalse : hexTrue); + }; + case "bytes": return function (value) { + return (0, lib$4.keccak256)(value); + }; + case "string": return function (value) { + return (0, id_1.id)(value); + }; + } + return null; + } + function encodeType(name, fields) { + return name + "(" + fields.map(function (_a) { + var name = _a.name, type = _a.type; + return (type + " " + name); + }).join(",") + ")"; + } + var TypedDataEncoder = /** @class */ (function () { + function TypedDataEncoder(types) { + (0, lib$3.defineReadOnly)(this, "types", Object.freeze((0, lib$3.deepCopy)(types))); + (0, lib$3.defineReadOnly)(this, "_encoderCache", {}); + (0, lib$3.defineReadOnly)(this, "_types", {}); + // Link struct types to their direct child structs + var links = {}; + // Link structs to structs which contain them as a child + var parents = {}; + // Link all subtypes within a given struct + var subtypes = {}; + Object.keys(types).forEach(function (type) { + links[type] = {}; + parents[type] = []; + subtypes[type] = {}; + }); + var _loop_1 = function (name_1) { + var uniqueNames = {}; + types[name_1].forEach(function (field) { + // Check each field has a unique name + if (uniqueNames[field.name]) { + logger.throwArgumentError("duplicate variable name " + JSON.stringify(field.name) + " in " + JSON.stringify(name_1), "types", types); + } + uniqueNames[field.name] = true; + // Get the base type (drop any array specifiers) + var baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1]; + if (baseType === name_1) { + logger.throwArgumentError("circular type reference to " + JSON.stringify(baseType), "types", types); + } + // Is this a base encoding type? + var encoder = getBaseEncoder(baseType); + if (encoder) { + return; + } + if (!parents[baseType]) { + logger.throwArgumentError("unknown type " + JSON.stringify(baseType), "types", types); + } + // Add linkage + parents[baseType].push(name_1); + links[name_1][baseType] = true; + }); + }; + for (var name_1 in types) { + _loop_1(name_1); + } + // Deduce the primary type + var primaryTypes = Object.keys(parents).filter(function (n) { return (parents[n].length === 0); }); + if (primaryTypes.length === 0) { + logger.throwArgumentError("missing primary type", "types", types); + } + else if (primaryTypes.length > 1) { + logger.throwArgumentError("ambiguous primary types or unused types: " + primaryTypes.map(function (t) { return (JSON.stringify(t)); }).join(", "), "types", types); + } + (0, lib$3.defineReadOnly)(this, "primaryType", primaryTypes[0]); + // Check for circular type references + function checkCircular(type, found) { + if (found[type]) { + logger.throwArgumentError("circular type reference to " + JSON.stringify(type), "types", types); + } + found[type] = true; + Object.keys(links[type]).forEach(function (child) { + if (!parents[child]) { + return; + } + // Recursively check children + checkCircular(child, found); + // Mark all ancestors as having this decendant + Object.keys(found).forEach(function (subtype) { + subtypes[subtype][child] = true; + }); + }); + delete found[type]; + } + checkCircular(this.primaryType, {}); + // Compute each fully describe type + for (var name_2 in subtypes) { + var st = Object.keys(subtypes[name_2]); + st.sort(); + this._types[name_2] = encodeType(name_2, types[name_2]) + st.map(function (t) { return encodeType(t, types[t]); }).join(""); + } + } + TypedDataEncoder.prototype.getEncoder = function (type) { + var encoder = this._encoderCache[type]; + if (!encoder) { + encoder = this._encoderCache[type] = this._getEncoder(type); + } + return encoder; + }; + TypedDataEncoder.prototype._getEncoder = function (type) { + var _this = this; + // Basic encoder type (address, bool, uint256, etc) + { + var encoder = getBaseEncoder(type); + if (encoder) { + return encoder; + } + } + // Array + var match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + var subtype_1 = match[1]; + var subEncoder_1 = this.getEncoder(subtype_1); + var length_1 = parseInt(match[3]); + return function (value) { + if (length_1 >= 0 && value.length !== length_1) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + var result = value.map(subEncoder_1); + if (_this._types[subtype_1]) { + result = result.map(lib$4.keccak256); + } + return (0, lib$4.keccak256)((0, lib$1.hexConcat)(result)); + }; + } + // Struct + var fields = this.types[type]; + if (fields) { + var encodedType_1 = (0, id_1.id)(this._types[type]); + return function (value) { + var values = fields.map(function (_a) { + var name = _a.name, type = _a.type; + var result = _this.getEncoder(type)(value[name]); + if (_this._types[type]) { + return (0, lib$4.keccak256)(result); + } + return result; + }); + values.unshift(encodedType_1); + return (0, lib$1.hexConcat)(values); + }; + } + return logger.throwArgumentError("unknown type: " + type, "type", type); + }; + TypedDataEncoder.prototype.encodeType = function (name) { + var result = this._types[name]; + if (!result) { + logger.throwArgumentError("unknown type: " + JSON.stringify(name), "name", name); + } + return result; + }; + TypedDataEncoder.prototype.encodeData = function (type, value) { + return this.getEncoder(type)(value); + }; + TypedDataEncoder.prototype.hashStruct = function (name, value) { + return (0, lib$4.keccak256)(this.encodeData(name, value)); + }; + TypedDataEncoder.prototype.encode = function (value) { + return this.encodeData(this.primaryType, value); + }; + TypedDataEncoder.prototype.hash = function (value) { + return this.hashStruct(this.primaryType, value); + }; + TypedDataEncoder.prototype._visit = function (type, value, callback) { + var _this = this; + // Basic encoder type (address, bool, uint256, etc) + { + var encoder = getBaseEncoder(type); + if (encoder) { + return callback(type, value); + } + } + // Array + var match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (match) { + var subtype_2 = match[1]; + var length_2 = parseInt(match[3]); + if (length_2 >= 0 && value.length !== length_2) { + logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + } + return value.map(function (v) { return _this._visit(subtype_2, v, callback); }); + } + // Struct + var fields = this.types[type]; + if (fields) { + return fields.reduce(function (accum, _a) { + var name = _a.name, type = _a.type; + accum[name] = _this._visit(type, value[name], callback); + return accum; + }, {}); + } + return logger.throwArgumentError("unknown type: " + type, "type", type); + }; + TypedDataEncoder.prototype.visit = function (value, callback) { + return this._visit(this.primaryType, value, callback); + }; + TypedDataEncoder.from = function (types) { + return new TypedDataEncoder(types); + }; + TypedDataEncoder.getPrimaryType = function (types) { + return TypedDataEncoder.from(types).primaryType; + }; + TypedDataEncoder.hashStruct = function (name, types, value) { + return TypedDataEncoder.from(types).hashStruct(name, value); + }; + TypedDataEncoder.hashDomain = function (domain) { + var domainFields = []; + for (var name_3 in domain) { + var type = domainFieldTypes[name_3]; + if (!type) { + logger.throwArgumentError("invalid typed-data domain key: " + JSON.stringify(name_3), "domain", domain); + } + domainFields.push({ name: name_3, type: type }); + } + domainFields.sort(function (a, b) { + return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name); + }); + return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); + }; + TypedDataEncoder.encode = function (domain, types, value) { + return (0, lib$1.hexConcat)([ + "0x1901", + TypedDataEncoder.hashDomain(domain), + TypedDataEncoder.from(types).hash(value) + ]); + }; + TypedDataEncoder.hash = function (domain, types, value) { + return (0, lib$4.keccak256)(TypedDataEncoder.encode(domain, types, value)); + }; + // Replaces all address types with ENS names with their looked up address + TypedDataEncoder.resolveNames = function (domain, types, value, resolveName) { + return __awaiter(this, void 0, void 0, function () { + var ensCache, encoder, _a, _b, _i, name_4, _c, _d; + return __generator(this, function (_e) { + switch (_e.label) { + case 0: + // Make a copy to isolate it from the object passed in + domain = (0, lib$3.shallowCopy)(domain); + ensCache = {}; + // Do we need to look up the domain's verifyingContract? + if (domain.verifyingContract && !(0, lib$1.isHexString)(domain.verifyingContract, 20)) { + ensCache[domain.verifyingContract] = "0x"; + } + encoder = TypedDataEncoder.from(types); + // Get a list of all the addresses + encoder.visit(value, function (type, value) { + if (type === "address" && !(0, lib$1.isHexString)(value, 20)) { + ensCache[value] = "0x"; + } + return value; + }); + _a = []; + for (_b in ensCache) + _a.push(_b); + _i = 0; + _e.label = 1; + case 1: + if (!(_i < _a.length)) return [3 /*break*/, 4]; + name_4 = _a[_i]; + _c = ensCache; + _d = name_4; + return [4 /*yield*/, resolveName(name_4)]; + case 2: + _c[_d] = _e.sent(); + _e.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: + // Replace the domain verifyingContract if needed + if (domain.verifyingContract && ensCache[domain.verifyingContract]) { + domain.verifyingContract = ensCache[domain.verifyingContract]; + } + // Replace all ENS names with their address + value = encoder.visit(value, function (type, value) { + if (type === "address" && ensCache[value]) { + return ensCache[value]; + } + return value; + }); + return [2 /*return*/, { domain: domain, value: value }]; + } + }); + }); + }; + TypedDataEncoder.getPayload = function (domain, types, value) { + // Validate the domain fields + TypedDataEncoder.hashDomain(domain); + // Derive the EIP712Domain Struct reference type + var domainValues = {}; + var domainTypes = []; + domainFieldNames.forEach(function (name) { + var value = domain[name]; + if (value == null) { + return; + } + domainValues[name] = domainChecks[name](value); + domainTypes.push({ name: name, type: domainFieldTypes[name] }); + }); + var encoder = TypedDataEncoder.from(types); + var typesWithDomain = (0, lib$3.shallowCopy)(types); + if (typesWithDomain.EIP712Domain) { + logger.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types); + } + else { + typesWithDomain.EIP712Domain = domainTypes; + } + // Validate the data structures and types + encoder.encode(value); + return { + types: typesWithDomain, + domain: domainValues, + primaryType: encoder.primaryType, + message: encoder.visit(value, function (type, value) { + // bytes + if (type.match(/^bytes(\d*)/)) { + return (0, lib$1.hexlify)((0, lib$1.arrayify)(value)); + } + // uint or int + if (type.match(/^u?int/)) { + return lib$2.BigNumber.from(value).toString(); + } + switch (type) { + case "address": + return value.toLowerCase(); + case "bool": + return !!value; + case "string": + if (typeof (value) !== "string") { + logger.throwArgumentError("invalid string", "value", value); + } + return value; + } + return logger.throwArgumentError("unsupported type", "type", type); + }) + }; + }; + return TypedDataEncoder; + }()); + exports.TypedDataEncoder = TypedDataEncoder; + + }); + + var typedData$1 = /*@__PURE__*/getDefaultExportFromCjs(typedData); + + var lib$9 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._TypedDataEncoder = exports.hashMessage = exports.messagePrefix = exports.isValidName = exports.namehash = exports.id = void 0; + + Object.defineProperty(exports, "id", { enumerable: true, get: function () { return id_1.id; } }); + + Object.defineProperty(exports, "isValidName", { enumerable: true, get: function () { return namehash_1.isValidName; } }); + Object.defineProperty(exports, "namehash", { enumerable: true, get: function () { return namehash_1.namehash; } }); + + Object.defineProperty(exports, "hashMessage", { enumerable: true, get: function () { return message.hashMessage; } }); + Object.defineProperty(exports, "messagePrefix", { enumerable: true, get: function () { return message.messagePrefix; } }); + + Object.defineProperty(exports, "_TypedDataEncoder", { enumerable: true, get: function () { return typedData.TypedDataEncoder; } }); + + }); + + var index$9 = /*@__PURE__*/getDefaultExportFromCjs(lib$9); + + var _interface = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Interface = exports.Indexed = exports.ErrorDescription = exports.TransactionDescription = exports.LogDescription = exports.checkResultErrors = void 0; + + + + + + + + + Object.defineProperty(exports, "checkResultErrors", { enumerable: true, get: function () { return abstractCoder.checkResultErrors; } }); + + + + var logger = new lib.Logger(_version$8.version); + var LogDescription = /** @class */ (function (_super) { + __extends(LogDescription, _super); + function LogDescription() { + return _super !== null && _super.apply(this, arguments) || this; + } + return LogDescription; + }(lib$3.Description)); + exports.LogDescription = LogDescription; + var TransactionDescription = /** @class */ (function (_super) { + __extends(TransactionDescription, _super); + function TransactionDescription() { + return _super !== null && _super.apply(this, arguments) || this; + } + return TransactionDescription; + }(lib$3.Description)); + exports.TransactionDescription = TransactionDescription; + var ErrorDescription = /** @class */ (function (_super) { + __extends(ErrorDescription, _super); + function ErrorDescription() { + return _super !== null && _super.apply(this, arguments) || this; + } + return ErrorDescription; + }(lib$3.Description)); + exports.ErrorDescription = ErrorDescription; + var Indexed = /** @class */ (function (_super) { + __extends(Indexed, _super); + function Indexed() { + return _super !== null && _super.apply(this, arguments) || this; + } + Indexed.isIndexed = function (value) { + return !!(value && value._isIndexed); + }; + return Indexed; + }(lib$3.Description)); + exports.Indexed = Indexed; + var BuiltinErrors = { + "0x08c379a0": { signature: "Error(string)", name: "Error", inputs: ["string"], reason: true }, + "0x4e487b71": { signature: "Panic(uint256)", name: "Panic", inputs: ["uint256"] } + }; + function wrapAccessError(property, error) { + var wrap = new Error("deferred error during ABI decoding triggered accessing " + property); + wrap.error = error; + return wrap; + } + /* + function checkNames(fragment: Fragment, type: "input" | "output", params: Array): void { + params.reduce((accum, param) => { + if (param.name) { + if (accum[param.name]) { + logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format("full") }`, "fragment", fragment); + } + accum[param.name] = true; + } + return accum; + }, <{ [ name: string ]: boolean }>{ }); + } + */ + var Interface = /** @class */ (function () { + function Interface(fragments$1) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Interface); + var abi = []; + if (typeof (fragments$1) === "string") { + abi = JSON.parse(fragments$1); + } + else { + abi = fragments$1; + } + (0, lib$3.defineReadOnly)(this, "fragments", abi.map(function (fragment) { + return fragments.Fragment.from(fragment); + }).filter(function (fragment) { return (fragment != null); })); + (0, lib$3.defineReadOnly)(this, "_abiCoder", (0, lib$3.getStatic)(_newTarget, "getAbiCoder")()); + (0, lib$3.defineReadOnly)(this, "functions", {}); + (0, lib$3.defineReadOnly)(this, "errors", {}); + (0, lib$3.defineReadOnly)(this, "events", {}); + (0, lib$3.defineReadOnly)(this, "structs", {}); + // Add all fragments by their signature + this.fragments.forEach(function (fragment) { + var bucket = null; + switch (fragment.type) { + case "constructor": + if (_this.deploy) { + logger.warn("duplicate definition - constructor"); + return; + } + //checkNames(fragment, "input", fragment.inputs); + (0, lib$3.defineReadOnly)(_this, "deploy", fragment); + return; + case "function": + //checkNames(fragment, "input", fragment.inputs); + //checkNames(fragment, "output", (fragment).outputs); + bucket = _this.functions; + break; + case "event": + //checkNames(fragment, "input", fragment.inputs); + bucket = _this.events; + break; + case "error": + bucket = _this.errors; + break; + default: + return; + } + var signature = fragment.format(); + if (bucket[signature]) { + logger.warn("duplicate definition - " + signature); + return; + } + bucket[signature] = fragment; + }); + // If we do not have a constructor add a default + if (!this.deploy) { + (0, lib$3.defineReadOnly)(this, "deploy", fragments.ConstructorFragment.from({ + payable: false, + type: "constructor" + })); + } + (0, lib$3.defineReadOnly)(this, "_isInterface", true); + } + Interface.prototype.format = function (format) { + if (!format) { + format = fragments.FormatTypes.full; + } + if (format === fragments.FormatTypes.sighash) { + logger.throwArgumentError("interface does not support formatting sighash", "format", format); + } + var abi = this.fragments.map(function (fragment) { return fragment.format(format); }); + // We need to re-bundle the JSON fragments a bit + if (format === fragments.FormatTypes.json) { + return JSON.stringify(abi.map(function (j) { return JSON.parse(j); })); + } + return abi; + }; + // Sub-classes can override these to handle other blockchains + Interface.getAbiCoder = function () { + return abiCoder.defaultAbiCoder; + }; + Interface.getAddress = function (address) { + return (0, lib$6.getAddress)(address); + }; + Interface.getSighash = function (fragment) { + return (0, lib$1.hexDataSlice)((0, lib$9.id)(fragment.format()), 0, 4); + }; + Interface.getEventTopic = function (eventFragment) { + return (0, lib$9.id)(eventFragment.format()); + }; + // Find a function definition by any means necessary (unless it is ambiguous) + Interface.prototype.getFunction = function (nameOrSignatureOrSighash) { + if ((0, lib$1.isHexString)(nameOrSignatureOrSighash)) { + for (var name_1 in this.functions) { + if (nameOrSignatureOrSighash === this.getSighash(name_1)) { + return this.functions[name_1]; + } + } + logger.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + var name_2 = nameOrSignatureOrSighash.trim(); + var matching = Object.keys(this.functions).filter(function (f) { return (f.split("(" /* fix:) */)[0] === name_2); }); + if (matching.length === 0) { + logger.throwArgumentError("no matching function", "name", name_2); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching functions", "name", name_2); + } + return this.functions[matching[0]]; + } + // Normalize the signature and lookup the function + var result = this.functions[fragments.FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); + } + return result; + }; + // Find an event definition by any means necessary (unless it is ambiguous) + Interface.prototype.getEvent = function (nameOrSignatureOrTopic) { + if ((0, lib$1.isHexString)(nameOrSignatureOrTopic)) { + var topichash = nameOrSignatureOrTopic.toLowerCase(); + for (var name_3 in this.events) { + if (topichash === this.getEventTopic(name_3)) { + return this.events[name_3]; + } + } + logger.throwArgumentError("no matching event", "topichash", topichash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrTopic.indexOf("(") === -1) { + var name_4 = nameOrSignatureOrTopic.trim(); + var matching = Object.keys(this.events).filter(function (f) { return (f.split("(" /* fix:) */)[0] === name_4); }); + if (matching.length === 0) { + logger.throwArgumentError("no matching event", "name", name_4); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching events", "name", name_4); + } + return this.events[matching[0]]; + } + // Normalize the signature and lookup the function + var result = this.events[fragments.EventFragment.fromString(nameOrSignatureOrTopic).format()]; + if (!result) { + logger.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); + } + return result; + }; + // Find a function definition by any means necessary (unless it is ambiguous) + Interface.prototype.getError = function (nameOrSignatureOrSighash) { + if ((0, lib$1.isHexString)(nameOrSignatureOrSighash)) { + var getSighash = (0, lib$3.getStatic)(this.constructor, "getSighash"); + for (var name_5 in this.errors) { + var error = this.errors[name_5]; + if (nameOrSignatureOrSighash === getSighash(error)) { + return this.errors[name_5]; + } + } + logger.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); + } + // It is a bare name, look up the function (will return null if ambiguous) + if (nameOrSignatureOrSighash.indexOf("(") === -1) { + var name_6 = nameOrSignatureOrSighash.trim(); + var matching = Object.keys(this.errors).filter(function (f) { return (f.split("(" /* fix:) */)[0] === name_6); }); + if (matching.length === 0) { + logger.throwArgumentError("no matching error", "name", name_6); + } + else if (matching.length > 1) { + logger.throwArgumentError("multiple matching errors", "name", name_6); + } + return this.errors[matching[0]]; + } + // Normalize the signature and lookup the function + var result = this.errors[fragments.FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; + if (!result) { + logger.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); + } + return result; + }; + // Get the sighash (the bytes4 selector) used by Solidity to identify a function + Interface.prototype.getSighash = function (fragment) { + if (typeof (fragment) === "string") { + try { + fragment = this.getFunction(fragment); + } + catch (error) { + try { + fragment = this.getError(fragment); + } + catch (_) { + throw error; + } + } + } + return (0, lib$3.getStatic)(this.constructor, "getSighash")(fragment); + }; + // Get the topic (the bytes32 hash) used by Solidity to identify an event + Interface.prototype.getEventTopic = function (eventFragment) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + return (0, lib$3.getStatic)(this.constructor, "getEventTopic")(eventFragment); + }; + Interface.prototype._decodeParams = function (params, data) { + return this._abiCoder.decode(params, data); + }; + Interface.prototype._encodeParams = function (params, values) { + return this._abiCoder.encode(params, values); + }; + Interface.prototype.encodeDeploy = function (values) { + return this._encodeParams(this.deploy.inputs, values || []); + }; + Interface.prototype.decodeErrorResult = function (fragment, data) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + var bytes = (0, lib$1.arrayify)(data); + if ((0, lib$1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) { + logger.throwArgumentError("data signature does not match error " + fragment.name + ".", "data", (0, lib$1.hexlify)(bytes)); + } + return this._decodeParams(fragment.inputs, bytes.slice(4)); + }; + Interface.prototype.encodeErrorResult = function (fragment, values) { + if (typeof (fragment) === "string") { + fragment = this.getError(fragment); + } + return (0, lib$1.hexlify)((0, lib$1.concat)([ + this.getSighash(fragment), + this._encodeParams(fragment.inputs, values || []) + ])); + }; + // Decode the data for a function call (e.g. tx.data) + Interface.prototype.decodeFunctionData = function (functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + var bytes = (0, lib$1.arrayify)(data); + if ((0, lib$1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) { + logger.throwArgumentError("data signature does not match function " + functionFragment.name + ".", "data", (0, lib$1.hexlify)(bytes)); + } + return this._decodeParams(functionFragment.inputs, bytes.slice(4)); + }; + // Encode the data for a function call (e.g. tx.data) + Interface.prototype.encodeFunctionData = function (functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return (0, lib$1.hexlify)((0, lib$1.concat)([ + this.getSighash(functionFragment), + this._encodeParams(functionFragment.inputs, values || []) + ])); + }; + // Decode the result from a function call (e.g. from eth_call) + Interface.prototype.decodeFunctionResult = function (functionFragment, data) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + var bytes = (0, lib$1.arrayify)(data); + var reason = null; + var errorArgs = null; + var errorName = null; + var errorSignature = null; + switch (bytes.length % this._abiCoder._getWordSize()) { + case 0: + try { + return this._abiCoder.decode(functionFragment.outputs, bytes); + } + catch (error) { } + break; + case 4: { + var selector = (0, lib$1.hexlify)(bytes.slice(0, 4)); + var builtin = BuiltinErrors[selector]; + if (builtin) { + errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4)); + errorName = builtin.name; + errorSignature = builtin.signature; + if (builtin.reason) { + reason = errorArgs[0]; + } + } + else { + try { + var error = this.getError(selector); + errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4)); + errorName = error.name; + errorSignature = error.format(); + } + catch (error) { + console.log(error); + } + } + break; + } + } + return logger.throwError("call revert exception", lib.Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + errorArgs: errorArgs, + errorName: errorName, + errorSignature: errorSignature, + reason: reason + }); + }; + // Encode the result for a function call (e.g. for eth_call) + Interface.prototype.encodeFunctionResult = function (functionFragment, values) { + if (typeof (functionFragment) === "string") { + functionFragment = this.getFunction(functionFragment); + } + return (0, lib$1.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || [])); + }; + // Create the filter for the event with search criteria (e.g. for eth_filterLog) + Interface.prototype.encodeFilterTopics = function (eventFragment, values) { + var _this = this; + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (values.length > eventFragment.inputs.length) { + logger.throwError("too many arguments for " + eventFragment.format(), lib.Logger.errors.UNEXPECTED_ARGUMENT, { + argument: "values", + value: values + }); + } + var topics = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + var encodeTopic = function (param, value) { + if (param.type === "string") { + return (0, lib$9.id)(value); + } + else if (param.type === "bytes") { + return (0, lib$4.keccak256)((0, lib$1.hexlify)(value)); + } + // Check addresses are valid + if (param.type === "address") { + _this._abiCoder.encode(["address"], [value]); + } + return (0, lib$1.hexZeroPad)((0, lib$1.hexlify)(value), 32); + }; + values.forEach(function (value, index) { + var param = eventFragment.inputs[index]; + if (!param.indexed) { + if (value != null) { + logger.throwArgumentError("cannot filter non-indexed parameters; must be null", ("contract." + param.name), value); + } + return; + } + if (value == null) { + topics.push(null); + } + else if (param.baseType === "array" || param.baseType === "tuple") { + logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); + } + else if (Array.isArray(value)) { + topics.push(value.map(function (value) { return encodeTopic(param, value); })); + } + else { + topics.push(encodeTopic(param, value)); + } + }); + // Trim off trailing nulls + while (topics.length && topics[topics.length - 1] === null) { + topics.pop(); + } + return topics; + }; + Interface.prototype.encodeEventLog = function (eventFragment, values) { + var _this = this; + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + var topics = []; + var dataTypes = []; + var dataValues = []; + if (!eventFragment.anonymous) { + topics.push(this.getEventTopic(eventFragment)); + } + if (values.length !== eventFragment.inputs.length) { + logger.throwArgumentError("event arguments/values mismatch", "values", values); + } + eventFragment.inputs.forEach(function (param, index) { + var value = values[index]; + if (param.indexed) { + if (param.type === "string") { + topics.push((0, lib$9.id)(value)); + } + else if (param.type === "bytes") { + topics.push((0, lib$4.keccak256)(value)); + } + else if (param.baseType === "tuple" || param.baseType === "array") { + // @TODO + throw new Error("not implemented"); + } + else { + topics.push(_this._abiCoder.encode([param.type], [value])); + } + } + else { + dataTypes.push(param); + dataValues.push(value); + } + }); + return { + data: this._abiCoder.encode(dataTypes, dataValues), + topics: topics + }; + }; + // Decode a filter for the event and the search criteria + Interface.prototype.decodeEventLog = function (eventFragment, data, topics) { + if (typeof (eventFragment) === "string") { + eventFragment = this.getEvent(eventFragment); + } + if (topics != null && !eventFragment.anonymous) { + var topicHash = this.getEventTopic(eventFragment); + if (!(0, lib$1.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { + logger.throwError("fragment/topic mismatch", lib.Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); + } + topics = topics.slice(1); + } + var indexed = []; + var nonIndexed = []; + var dynamic = []; + eventFragment.inputs.forEach(function (param, index) { + if (param.indexed) { + if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") { + indexed.push(fragments.ParamType.fromObject({ type: "bytes32", name: param.name })); + dynamic.push(true); + } + else { + indexed.push(param); + dynamic.push(false); + } + } + else { + nonIndexed.push(param); + dynamic.push(false); + } + }); + var resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, (0, lib$1.concat)(topics)) : null; + var resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true); + var result = []; + var nonIndexedIndex = 0, indexedIndex = 0; + eventFragment.inputs.forEach(function (param, index) { + if (param.indexed) { + if (resultIndexed == null) { + result[index] = new Indexed({ _isIndexed: true, hash: null }); + } + else if (dynamic[index]) { + result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] }); + } + else { + try { + result[index] = resultIndexed[indexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + } + else { + try { + result[index] = resultNonIndexed[nonIndexedIndex++]; + } + catch (error) { + result[index] = error; + } + } + // Add the keyword argument if named and safe + if (param.name && result[param.name] == null) { + var value_1 = result[index]; + // Make error named values throw on access + if (value_1 instanceof Error) { + Object.defineProperty(result, param.name, { + enumerable: true, + get: function () { throw wrapAccessError("property " + JSON.stringify(param.name), value_1); } + }); + } + else { + result[param.name] = value_1; + } + } + }); + var _loop_1 = function (i) { + var value = result[i]; + if (value instanceof Error) { + Object.defineProperty(result, i, { + enumerable: true, + get: function () { throw wrapAccessError("index " + i, value); } + }); + } + }; + // Make all error indexed values throw on access + for (var i = 0; i < result.length; i++) { + _loop_1(i); + } + return Object.freeze(result); + }; + // Given a transaction, find the matching function fragment (if any) and + // determine all its properties and call parameters + Interface.prototype.parseTransaction = function (tx) { + var fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new TransactionDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)), + functionFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + value: lib$2.BigNumber.from(tx.value || "0"), + }); + }; + // @TODO + //parseCallResult(data: BytesLike): ?? + // Given an event log, find the matching event fragment (if any) and + // determine all its properties and values + Interface.prototype.parseLog = function (log) { + var fragment = this.getEvent(log.topics[0]); + if (!fragment || fragment.anonymous) { + return null; + } + // @TODO: If anonymous, and the only method, and the input count matches, should we parse? + // Probably not, because just because it is the only event in the ABI does + // not mean we have the full ABI; maybe just a fragment? + return new LogDescription({ + eventFragment: fragment, + name: fragment.name, + signature: fragment.format(), + topic: this.getEventTopic(fragment), + args: this.decodeEventLog(fragment, log.data, log.topics) + }); + }; + Interface.prototype.parseError = function (data) { + var hexData = (0, lib$1.hexlify)(data); + var fragment = this.getError(hexData.substring(0, 10).toLowerCase()); + if (!fragment) { + return null; + } + return new ErrorDescription({ + args: this._abiCoder.decode(fragment.inputs, "0x" + hexData.substring(10)), + errorFragment: fragment, + name: fragment.name, + signature: fragment.format(), + sighash: this.getSighash(fragment), + }); + }; + /* + static from(value: Array | string | Interface) { + if (Interface.isInterface(value)) { + return value; + } + if (typeof(value) === "string") { + return new Interface(JSON.parse(value)); + } + return new Interface(value); + } + */ + Interface.isInterface = function (value) { + return !!(value && value._isInterface); + }; + return Interface; + }()); + exports.Interface = Interface; + + }); + + var _interface$1 = /*@__PURE__*/getDefaultExportFromCjs(_interface); + + var lib$a = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TransactionDescription = exports.LogDescription = exports.checkResultErrors = exports.Indexed = exports.Interface = exports.defaultAbiCoder = exports.AbiCoder = exports.FormatTypes = exports.ParamType = exports.FunctionFragment = exports.Fragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = void 0; + + Object.defineProperty(exports, "ConstructorFragment", { enumerable: true, get: function () { return fragments.ConstructorFragment; } }); + Object.defineProperty(exports, "ErrorFragment", { enumerable: true, get: function () { return fragments.ErrorFragment; } }); + Object.defineProperty(exports, "EventFragment", { enumerable: true, get: function () { return fragments.EventFragment; } }); + Object.defineProperty(exports, "FormatTypes", { enumerable: true, get: function () { return fragments.FormatTypes; } }); + Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return fragments.Fragment; } }); + Object.defineProperty(exports, "FunctionFragment", { enumerable: true, get: function () { return fragments.FunctionFragment; } }); + Object.defineProperty(exports, "ParamType", { enumerable: true, get: function () { return fragments.ParamType; } }); + + Object.defineProperty(exports, "AbiCoder", { enumerable: true, get: function () { return abiCoder.AbiCoder; } }); + Object.defineProperty(exports, "defaultAbiCoder", { enumerable: true, get: function () { return abiCoder.defaultAbiCoder; } }); + + Object.defineProperty(exports, "checkResultErrors", { enumerable: true, get: function () { return _interface.checkResultErrors; } }); + Object.defineProperty(exports, "Indexed", { enumerable: true, get: function () { return _interface.Indexed; } }); + Object.defineProperty(exports, "Interface", { enumerable: true, get: function () { return _interface.Interface; } }); + Object.defineProperty(exports, "LogDescription", { enumerable: true, get: function () { return _interface.LogDescription; } }); + Object.defineProperty(exports, "TransactionDescription", { enumerable: true, get: function () { return _interface.TransactionDescription; } }); + + }); + + var index$a = /*@__PURE__*/getDefaultExportFromCjs(lib$a); + + var _version$i = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "abstract-provider/5.5.1"; + + }); + + var _version$j = /*@__PURE__*/getDefaultExportFromCjs(_version$i); + + var lib$b = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Provider = exports.TransactionOrderForkEvent = exports.TransactionForkEvent = exports.BlockForkEvent = exports.ForkEvent = void 0; + + + + + + var logger = new lib.Logger(_version$i.version); + ; + ; + //export type CallTransactionable = { + // call(transaction: TransactionRequest): Promise; + //}; + var ForkEvent = /** @class */ (function (_super) { + __extends(ForkEvent, _super); + function ForkEvent() { + return _super !== null && _super.apply(this, arguments) || this; + } + ForkEvent.isForkEvent = function (value) { + return !!(value && value._isForkEvent); + }; + return ForkEvent; + }(lib$3.Description)); + exports.ForkEvent = ForkEvent; + var BlockForkEvent = /** @class */ (function (_super) { + __extends(BlockForkEvent, _super); + function BlockForkEvent(blockHash, expiry) { + var _this = this; + if (!(0, lib$1.isHexString)(blockHash, 32)) { + logger.throwArgumentError("invalid blockHash", "blockHash", blockHash); + } + _this = _super.call(this, { + _isForkEvent: true, + _isBlockForkEvent: true, + expiry: (expiry || 0), + blockHash: blockHash + }) || this; + return _this; + } + return BlockForkEvent; + }(ForkEvent)); + exports.BlockForkEvent = BlockForkEvent; + var TransactionForkEvent = /** @class */ (function (_super) { + __extends(TransactionForkEvent, _super); + function TransactionForkEvent(hash, expiry) { + var _this = this; + if (!(0, lib$1.isHexString)(hash, 32)) { + logger.throwArgumentError("invalid transaction hash", "hash", hash); + } + _this = _super.call(this, { + _isForkEvent: true, + _isTransactionForkEvent: true, + expiry: (expiry || 0), + hash: hash + }) || this; + return _this; + } + return TransactionForkEvent; + }(ForkEvent)); + exports.TransactionForkEvent = TransactionForkEvent; + var TransactionOrderForkEvent = /** @class */ (function (_super) { + __extends(TransactionOrderForkEvent, _super); + function TransactionOrderForkEvent(beforeHash, afterHash, expiry) { + var _this = this; + if (!(0, lib$1.isHexString)(beforeHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash); + } + if (!(0, lib$1.isHexString)(afterHash, 32)) { + logger.throwArgumentError("invalid transaction hash", "afterHash", afterHash); + } + _this = _super.call(this, { + _isForkEvent: true, + _isTransactionOrderForkEvent: true, + expiry: (expiry || 0), + beforeHash: beforeHash, + afterHash: afterHash + }) || this; + return _this; + } + return TransactionOrderForkEvent; + }(ForkEvent)); + exports.TransactionOrderForkEvent = TransactionOrderForkEvent; + /////////////////////////////// + // Exported Abstracts + var Provider = /** @class */ (function () { + function Provider() { + var _newTarget = this.constructor; + logger.checkAbstract(_newTarget, Provider); + (0, lib$3.defineReadOnly)(this, "_isProvider", true); + } + Provider.prototype.getFeeData = function () { + return __awaiter(this, void 0, void 0, function () { + var _a, block, gasPrice, maxFeePerGas, maxPriorityFeePerGas; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, (0, lib$3.resolveProperties)({ + block: this.getBlock("latest"), + gasPrice: this.getGasPrice().catch(function (error) { + // @TODO: Why is this now failing on Calaveras? + //console.log(error); + return null; + }) + })]; + case 1: + _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice; + maxFeePerGas = null, maxPriorityFeePerGas = null; + if (block && block.baseFeePerGas) { + // We may want to compute this more accurately in the future, + // using the formula "check if the base fee is correct". + // See: https://eips.ethereum.org/EIPS/eip-1559 + maxPriorityFeePerGas = lib$2.BigNumber.from("2500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + return [2 /*return*/, { maxFeePerGas: maxFeePerGas, maxPriorityFeePerGas: maxPriorityFeePerGas, gasPrice: gasPrice }]; + } + }); + }); + }; + // Alias for "on" + Provider.prototype.addListener = function (eventName, listener) { + return this.on(eventName, listener); + }; + // Alias for "off" + Provider.prototype.removeListener = function (eventName, listener) { + return this.off(eventName, listener); + }; + Provider.isProvider = function (value) { + return !!(value && value._isProvider); + }; + return Provider; + }()); + exports.Provider = Provider; + + }); + + var index$b = /*@__PURE__*/getDefaultExportFromCjs(lib$b); + + var _version$k = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "abstract-signer/5.5.0"; + + }); + + var _version$l = /*@__PURE__*/getDefaultExportFromCjs(_version$k); + + var lib$c = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.VoidSigner = exports.Signer = void 0; + + + + var logger = new lib.Logger(_version$k.version); + var allowedTransactionKeys = [ + "accessList", "chainId", "customData", "data", "from", "gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "to", "type", "value" + ]; + var forwardErrors = [ + lib.Logger.errors.INSUFFICIENT_FUNDS, + lib.Logger.errors.NONCE_EXPIRED, + lib.Logger.errors.REPLACEMENT_UNDERPRICED, + ]; + ; + ; + var Signer = /** @class */ (function () { + /////////////////// + // Sub-classes MUST call super + function Signer() { + var _newTarget = this.constructor; + logger.checkAbstract(_newTarget, Signer); + (0, lib$3.defineReadOnly)(this, "_isSigner", true); + } + /////////////////// + // Sub-classes MAY override these + Signer.prototype.getBalance = function (blockTag) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getBalance"); + return [4 /*yield*/, this.provider.getBalance(this.getAddress(), blockTag)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.getTransactionCount = function (blockTag) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getTransactionCount"); + return [4 /*yield*/, this.provider.getTransactionCount(this.getAddress(), blockTag)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Populates "from" if unspecified, and estimates the gas for the transaction + Signer.prototype.estimateGas = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("estimateGas"); + return [4 /*yield*/, (0, lib$3.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, this.provider.estimateGas(tx)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Populates "from" if unspecified, and calls with the transaction + Signer.prototype.call = function (transaction, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("call"); + return [4 /*yield*/, (0, lib$3.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, this.provider.call(tx, blockTag)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Populates all fields in a transaction, signs it and sends it to the network + Signer.prototype.sendTransaction = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var tx, signedTx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("sendTransaction"); + return [4 /*yield*/, this.populateTransaction(transaction)]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, this.signTransaction(tx)]; + case 2: + signedTx = _a.sent(); + return [4 /*yield*/, this.provider.sendTransaction(signedTx)]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.getChainId = function () { + return __awaiter(this, void 0, void 0, function () { + var network; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getChainId"); + return [4 /*yield*/, this.provider.getNetwork()]; + case 1: + network = _a.sent(); + return [2 /*return*/, network.chainId]; + } + }); + }); + }; + Signer.prototype.getGasPrice = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getGasPrice"); + return [4 /*yield*/, this.provider.getGasPrice()]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.getFeeData = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("getFeeData"); + return [4 /*yield*/, this.provider.getFeeData()]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Signer.prototype.resolveName = function (name) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this._checkProvider("resolveName"); + return [4 /*yield*/, this.provider.resolveName(name)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // Checks a transaction does not contain invalid keys and if + // no "from" is provided, populates it. + // - does NOT require a provider + // - adds "from" is not present + // - returns a COPY (safe to mutate the result) + // By default called from: (overriding these prevents it) + // - call + // - estimateGas + // - populateTransaction (and therefor sendTransaction) + Signer.prototype.checkTransaction = function (transaction) { + for (var key in transaction) { + if (allowedTransactionKeys.indexOf(key) === -1) { + logger.throwArgumentError("invalid transaction key: " + key, "transaction", transaction); + } + } + var tx = (0, lib$3.shallowCopy)(transaction); + if (tx.from == null) { + tx.from = this.getAddress(); + } + else { + // Make sure any provided address matches this signer + tx.from = Promise.all([ + Promise.resolve(tx.from), + this.getAddress() + ]).then(function (result) { + if (result[0].toLowerCase() !== result[1].toLowerCase()) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + return result[0]; + }); + } + return tx; + }; + // Populates ALL keys for a transaction and checks that "from" matches + // this Signer. Should be used by sendTransaction but NOT by signTransaction. + // By default called from: (overriding these prevents it) + // - sendTransaction + // + // Notes: + // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas + Signer.prototype.populateTransaction = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var tx, hasEip1559, feeData, gasPrice; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, lib$3.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx = _a.sent(); + if (tx.to != null) { + tx.to = Promise.resolve(tx.to).then(function (to) { return __awaiter(_this, void 0, void 0, function () { + var address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (to == null) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this.resolveName(to)]; + case 1: + address = _a.sent(); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return [2 /*return*/, address]; + } + }); + }); }); + // Prevent this error from causing an UnhandledPromiseException + tx.to.catch(function (error) { }); + } + hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null); + if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) { + logger.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); + } + else if ((tx.type === 0 || tx.type === 1) && hasEip1559) { + logger.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); + } + if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null))) return [3 /*break*/, 2]; + // Fully-formed EIP-1559 transaction (skip getFeeData) + tx.type = 2; + return [3 /*break*/, 5]; + case 2: + if (!(tx.type === 0 || tx.type === 1)) return [3 /*break*/, 3]; + // Explicit Legacy or EIP-2930 transaction + // Populate missing gasPrice + if (tx.gasPrice == null) { + tx.gasPrice = this.getGasPrice(); + } + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, this.getFeeData()]; + case 4: + feeData = _a.sent(); + if (tx.type == null) { + // We need to auto-detect the intended type of this transaction... + if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { + // The network supports EIP-1559! + // Upgrade transaction from null to eip-1559 + tx.type = 2; + if (tx.gasPrice != null) { + gasPrice = tx.gasPrice; + delete tx.gasPrice; + tx.maxFeePerGas = gasPrice; + tx.maxPriorityFeePerGas = gasPrice; + } + else { + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } + else if (feeData.gasPrice != null) { + // Network doesn't support EIP-1559... + // ...but they are trying to use EIP-1559 properties + if (hasEip1559) { + logger.throwError("network does not support EIP-1559", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "populateTransaction" + }); + } + // Populate missing fee data + if (tx.gasPrice == null) { + tx.gasPrice = feeData.gasPrice; + } + // Explicitly set untyped transaction to legacy + tx.type = 0; + } + else { + // getFeeData has failed us. + logger.throwError("failed to get consistent fee data", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signer.getFeeData" + }); + } + } + else if (tx.type === 2) { + // Explicitly using EIP-1559 + // Populate missing fee data + if (tx.maxFeePerGas == null) { + tx.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx.maxPriorityFeePerGas == null) { + tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + _a.label = 5; + case 5: + if (tx.nonce == null) { + tx.nonce = this.getTransactionCount("pending"); + } + if (tx.gasLimit == null) { + tx.gasLimit = this.estimateGas(tx).catch(function (error) { + if (forwardErrors.indexOf(error.code) >= 0) { + throw error; + } + return logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + tx: tx + }); + }); + } + if (tx.chainId == null) { + tx.chainId = this.getChainId(); + } + else { + tx.chainId = Promise.all([ + Promise.resolve(tx.chainId), + this.getChainId() + ]).then(function (results) { + if (results[1] !== 0 && results[0] !== results[1]) { + logger.throwArgumentError("chainId address mismatch", "transaction", transaction); + } + return results[0]; + }); + } + return [4 /*yield*/, (0, lib$3.resolveProperties)(tx)]; + case 6: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + /////////////////// + // Sub-classes SHOULD leave these alone + Signer.prototype._checkProvider = function (operation) { + if (!this.provider) { + logger.throwError("missing provider", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: (operation || "_checkProvider") + }); + } + }; + Signer.isSigner = function (value) { + return !!(value && value._isSigner); + }; + return Signer; + }()); + exports.Signer = Signer; + var VoidSigner = /** @class */ (function (_super) { + __extends(VoidSigner, _super); + function VoidSigner(address, provider) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, VoidSigner); + _this = _super.call(this) || this; + (0, lib$3.defineReadOnly)(_this, "address", address); + (0, lib$3.defineReadOnly)(_this, "provider", provider || null); + return _this; + } + VoidSigner.prototype.getAddress = function () { + return Promise.resolve(this.address); + }; + VoidSigner.prototype._fail = function (message, operation) { + return Promise.resolve().then(function () { + logger.throwError(message, lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: operation }); + }); + }; + VoidSigner.prototype.signMessage = function (message) { + return this._fail("VoidSigner cannot sign messages", "signMessage"); + }; + VoidSigner.prototype.signTransaction = function (transaction) { + return this._fail("VoidSigner cannot sign transactions", "signTransaction"); + }; + VoidSigner.prototype._signTypedData = function (domain, types, value) { + return this._fail("VoidSigner cannot sign typed data", "signTypedData"); + }; + VoidSigner.prototype.connect = function (provider) { + return new VoidSigner(this.address, provider); + }; + return VoidSigner; + }(Signer)); + exports.VoidSigner = VoidSigner; + + }); + + var index$c = /*@__PURE__*/getDefaultExportFromCjs(lib$c); + + var minimalisticAssert = assert; + + function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); + } + + assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); + }; + + var utils_1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + var utils = exports; + + function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } else { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } + return res; + } + utils.toArray = toArray; + + function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; + } + utils.zero2 = zero2; + + function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; + } + utils.toHex = toHex; + + utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; + }; + }); + + var utils_1$1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + var utils = exports; + + + + + utils.assert = minimalisticAssert; + utils.toArray = utils_1.toArray; + utils.zero2 = utils_1.zero2; + utils.toHex = utils_1.toHex; + utils.encode = utils_1.encode; + + // Represent num in a w-NAF form + function getNAF(num, w, bits) { + var naf = new Array(Math.max(num.bitLength(), bits) + 1); + naf.fill(0); + + var ws = 1 << (w + 1); + var k = num.clone(); + + for (var i = 0; i < naf.length; i++) { + var z; + var mod = k.andln(ws - 1); + if (k.isOdd()) { + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + + naf[i] = z; + k.iushrn(1); + } + + return naf; + } + utils.getNAF = getNAF; + + // Represent k1, k2 in a Joint Sparse Form + function getJSF(k1, k2) { + var jsf = [ + [], + [], + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + var m8; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; + } + utils.getJSF = getJSF; + + function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; + } + utils.cachedProperty = cachedProperty; + + function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; + } + utils.parseBytes = parseBytes; + + function intFromLE(bytes) { + return new bn(bytes, 'hex', 'le'); + } + utils.intFromLE = intFromLE; + }); + + 'use strict'; + + + + var getNAF = utils_1$1.getNAF; + var getJSF = utils_1$1.getJSF; + var assert$1 = utils_1$1.assert; + + function BaseCurve(type, conf) { + this.type = type; + this.p = new bn(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? bn.red(conf.prime) : bn.mont(this.p); + + // Useful for many curves + this.zero = new bn(0).toRed(this.red); + this.one = new bn(1).toRed(this.red); + this.two = new bn(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new bn(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + this._bitLength = this.n ? this.n.bitLength() : 0; + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } + } + var base = BaseCurve; + + BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); + }; + + BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); + }; + + BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert$1(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1, this._bitLength); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + var j; + var nafW; + for (j = 0; j < naf.length; j += doubles.step) { + nafW = 0; + for (var l = j + doubles.step - 1; l >= j; l--) + nafW = (nafW << 1) + naf[l]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (j = 0; j < repr.length; j++) { + nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); + }; + + BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w, this._bitLength); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var l = 0; i >= 0 && naf[i] === 0; i--) + l++; + if (i >= 0) + l++; + acc = acc.dblp(l); + + if (i < 0) + break; + var z = naf[i]; + assert$1(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; + }; + + BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + var i; + var j; + var p; + for (i = 0; i < len; i++) { + p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength); + naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b], /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3, /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (j = 0; j < len; j++) { + var z = tmp[j]; + p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); + }; + + function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; + } + BaseCurve.BasePoint = BasePoint; + + BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); + }; + + BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); + }; + + BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils_1$1.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert$1(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert$1(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); + }; + + BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); + }; + + BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)); + }; + + BasePoint.prototype.encode = function encode(enc, compact) { + return utils_1$1.encode(this._encode(compact), enc); + }; + + BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null, + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; + }; + + BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); + }; + + BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles, + }; + }; + + BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res, + }; + }; + + BasePoint.prototype._getBeta = function _getBeta() { + return null; + }; + + BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; + }; + + var inherits_browser = createCommonjsModule(function (module) { + if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; + } + }); + + 'use strict'; + + + + + + + var assert$2 = utils_1$1.assert; + + function ShortCurve(conf) { + base.call(this, 'short', conf); + + this.a = new bn(conf.a, 16).toRed(this.red); + this.b = new bn(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); + } + inherits_browser(ShortCurve, base); + var short_1 = ShortCurve; + + ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new bn(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new bn(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert$2(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new bn(vec.a, 16), + b: new bn(vec.b, 16), + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis, + }; + }; + + ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : bn.mont(num); + var tinv = new bn(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new bn(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; + }; + + ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new bn(1); + var y1 = new bn(0); + var x2 = new bn(0); + var y2 = new bn(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 }, + ]; + }; + + ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; + }; + + ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new bn(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); + }; + + ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; + }; + + ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; + }; + + function Point(curve, x, y, isRed) { + base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new bn(x, 16); + this.y = new bn(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } + } + inherits_browser(Point, base.BasePoint); + + ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); + }; + + ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); + }; + + Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul), + }, + }; + } + return beta; + }; + + Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1), + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1), + }, + } ]; + }; + + Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)), + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)), + }, + }; + return res; + }; + + Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; + }; + + Point.prototype.isInfinity = function isInfinity() { + return this.inf; + }; + + Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); + }; + + Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); + }; + + Point.prototype.getX = function getX() { + return this.x.fromRed(); + }; + + Point.prototype.getY = function getY() { + return this.y.fromRed(); + }; + + Point.prototype.mul = function mul(k) { + k = new bn(k, 16); + if (this.isInfinity()) + return this; + else if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); + }; + + Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); + }; + + Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); + }; + + Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); + }; + + Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate), + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate), + }, + }; + } + return res; + }; + + Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; + }; + + function JPoint(curve, x, y, z) { + base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new bn(0); + } else { + this.x = new bn(x, 16); + this.y = new bn(y, 16); + this.z = new bn(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; + } + inherits_browser(JPoint, base.BasePoint); + + ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); + }; + + JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); + }; + + JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); + }; + + JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); + }; + + JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); + }; + + JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + var i; + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); + }; + + JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); + }; + + JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); + }; + + JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); + }; + + JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); + }; + + JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); + }; + + JPoint.prototype.mul = function mul(k, kbase) { + k = new bn(k, kbase); + + return this.curve._wnafMul(this, k); + }; + + JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; + }; + + JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + }; + + JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; + }; + + JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; + }; + + var curve_1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + var curve = exports; + + curve.base = base; + curve.short = short_1; + curve.mont = /*RicMoo:ethers:require(./mont)*/(null); + curve.edwards = /*RicMoo:ethers:require(./edwards)*/(null); + }); + + 'use strict'; + + + + + var inherits_1 = inherits_browser; + + function isSurrogatePair(msg, i) { + if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) { + return false; + } + if (i < 0 || i + 1 >= msg.length) { + return false; + } + return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00; + } + + function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === 'string') { + if (!enc) { + // Inspired by stringToUtf8ByteArray() in closure-library by Google + // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 + // Apache License 2.0 + // https://github.com/google/closure-library/blob/master/LICENSE + var p = 0; + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + if (c < 128) { + res[p++] = c; + } else if (c < 2048) { + res[p++] = (c >> 6) | 192; + res[p++] = (c & 63) | 128; + } else if (isSurrogatePair(msg, i)) { + c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF); + res[p++] = (c >> 18) | 240; + res[p++] = ((c >> 12) & 63) | 128; + res[p++] = ((c >> 6) & 63) | 128; + res[p++] = (c & 63) | 128; + } else { + res[p++] = (c >> 12) | 224; + res[p++] = ((c >> 6) & 63) | 128; + res[p++] = (c & 63) | 128; + } + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; + } + var toArray_1 = toArray; + + function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; + } + var toHex_1 = toHex; + + function htonl(w) { + var res = (w >>> 24) | + ((w >>> 8) & 0xff00) | + ((w << 8) & 0xff0000) | + ((w & 0xff) << 24); + return res >>> 0; + } + var htonl_1 = htonl; + + function toHex32(msg, endian) { + var res = ''; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === 'little') + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; + } + var toHex32_1 = toHex32; + + function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; + } + var zero2_1 = zero2; + + function zero8(word) { + if (word.length === 7) + return '0' + word; + else if (word.length === 6) + return '00' + word; + else if (word.length === 5) + return '000' + word; + else if (word.length === 4) + return '0000' + word; + else if (word.length === 3) + return '00000' + word; + else if (word.length === 2) + return '000000' + word; + else if (word.length === 1) + return '0000000' + word; + else + return word; + } + var zero8_1 = zero8; + + function join32(msg, start, end, endian) { + var len = end - start; + minimalisticAssert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === 'big') + w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; + else + w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; + res[i] = w >>> 0; + } + return res; + } + var join32_1 = join32; + + function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === 'big') { + res[k] = m >>> 24; + res[k + 1] = (m >>> 16) & 0xff; + res[k + 2] = (m >>> 8) & 0xff; + res[k + 3] = m & 0xff; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = (m >>> 16) & 0xff; + res[k + 1] = (m >>> 8) & 0xff; + res[k] = m & 0xff; + } + } + return res; + } + var split32_1 = split32; + + function rotr32(w, b) { + return (w >>> b) | (w << (32 - b)); + } + var rotr32_1 = rotr32; + + function rotl32(w, b) { + return (w << b) | (w >>> (32 - b)); + } + var rotl32_1 = rotl32; + + function sum32(a, b) { + return (a + b) >>> 0; + } + var sum32_1 = sum32; + + function sum32_3(a, b, c) { + return (a + b + c) >>> 0; + } + var sum32_3_1 = sum32_3; + + function sum32_4(a, b, c, d) { + return (a + b + c + d) >>> 0; + } + var sum32_4_1 = sum32_4; + + function sum32_5(a, b, c, d, e) { + return (a + b + c + d + e) >>> 0; + } + var sum32_5_1 = sum32_5; + + function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; + } + var sum64_1 = sum64; + + function sum64_hi(ah, al, bh, bl) { + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; + } + var sum64_hi_1 = sum64_hi; + + function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; + } + var sum64_lo_1 = sum64_lo; + + function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; + } + var sum64_4_hi_1 = sum64_4_hi; + + function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; + } + var sum64_4_lo_1 = sum64_4_lo; + + function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + lo = (lo + el) >>> 0; + carry += lo < el ? 1 : 0; + + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; + } + var sum64_5_hi_1 = sum64_5_hi; + + function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + + return lo >>> 0; + } + var sum64_5_lo_1 = sum64_5_lo; + + function rotr64_hi(ah, al, num) { + var r = (al << (32 - num)) | (ah >>> num); + return r >>> 0; + } + var rotr64_hi_1 = rotr64_hi; + + function rotr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; + } + var rotr64_lo_1 = rotr64_lo; + + function shr64_hi(ah, al, num) { + return ah >>> num; + } + var shr64_hi_1 = shr64_hi; + + function shr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; + } + var shr64_lo_1 = shr64_lo; + + var utils = { + inherits: inherits_1, + toArray: toArray_1, + toHex: toHex_1, + htonl: htonl_1, + toHex32: toHex32_1, + zero2: zero2_1, + zero8: zero8_1, + join32: join32_1, + split32: split32_1, + rotr32: rotr32_1, + rotl32: rotl32_1, + sum32: sum32_1, + sum32_3: sum32_3_1, + sum32_4: sum32_4_1, + sum32_5: sum32_5_1, + sum64: sum64_1, + sum64_hi: sum64_hi_1, + sum64_lo: sum64_lo_1, + sum64_4_hi: sum64_4_hi_1, + sum64_4_lo: sum64_4_lo_1, + sum64_5_hi: sum64_5_hi_1, + sum64_5_lo: sum64_5_lo_1, + rotr64_hi: rotr64_hi_1, + rotr64_lo: rotr64_lo_1, + shr64_hi: shr64_hi_1, + shr64_lo: shr64_lo_1 + }; + + 'use strict'; + + + + + function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = 'big'; + + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; + } + var BlockHash_1 = BlockHash; + + BlockHash.prototype.update = function update(msg, enc) { + // Convert message to array, pad it, and join into 32bit blocks + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + + // Enough data, try updating + if (this.pending.length >= this._delta8) { + msg = this.pending; + + // Process pending data in blocks + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + + return this; + }; + + BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + minimalisticAssert(this.pending === null); + + return this._digest(enc); + }; + + BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - ((len + this.padLength) % bytes); + var res = new Array(k + this.padLength); + res[0] = 0x80; + for (var i = 1; i < k; i++) + res[i] = 0; + + // Append length + len <<= 3; + if (this.endian === 'big') { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = (len >>> 24) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = len & 0xff; + } else { + res[i++] = len & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 24) & 0xff; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + + return res; + }; + + var common = { + BlockHash: BlockHash_1 + }; + + 'use strict'; + + + var rotr32$1 = utils.rotr32; + + function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); + } + var ft_1_1 = ft_1; + + function ch32(x, y, z) { + return (x & y) ^ ((~x) & z); + } + var ch32_1 = ch32; + + function maj32(x, y, z) { + return (x & y) ^ (x & z) ^ (y & z); + } + var maj32_1 = maj32; + + function p32(x, y, z) { + return x ^ y ^ z; + } + var p32_1 = p32; + + function s0_256(x) { + return rotr32$1(x, 2) ^ rotr32$1(x, 13) ^ rotr32$1(x, 22); + } + var s0_256_1 = s0_256; + + function s1_256(x) { + return rotr32$1(x, 6) ^ rotr32$1(x, 11) ^ rotr32$1(x, 25); + } + var s1_256_1 = s1_256; + + function g0_256(x) { + return rotr32$1(x, 7) ^ rotr32$1(x, 18) ^ (x >>> 3); + } + var g0_256_1 = g0_256; + + function g1_256(x) { + return rotr32$1(x, 17) ^ rotr32$1(x, 19) ^ (x >>> 10); + } + var g1_256_1 = g1_256; + + var common$1 = { + ft_1: ft_1_1, + ch32: ch32_1, + maj32: maj32_1, + p32: p32_1, + s0_256: s0_256_1, + s1_256: s1_256_1, + g0_256: g0_256_1, + g1_256: g1_256_1 + }; + + 'use strict'; + + + + + + var rotl32$1 = utils.rotl32; + var sum32$1 = utils.sum32; + var sum32_5$1 = utils.sum32_5; + var ft_1$1 = common$1.ft_1; + var BlockHash$1 = common.BlockHash; + + var sha1_K = [ + 0x5A827999, 0x6ED9EBA1, + 0x8F1BBCDC, 0xCA62C1D6 + ]; + + function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + + BlockHash$1.call(this); + this.h = [ + 0x67452301, 0xefcdab89, 0x98badcfe, + 0x10325476, 0xc3d2e1f0 ]; + this.W = new Array(80); + } + + utils.inherits(SHA1, BlockHash$1); + var _1 = SHA1; + + SHA1.blockSize = 512; + SHA1.outSize = 160; + SHA1.hmacStrength = 80; + SHA1.padLength = 64; + + SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + + for(; i < W.length; i++) + W[i] = rotl32$1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5$1(rotl32$1(a, 5), ft_1$1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32$1(b, 30); + b = a; + a = t; + } + + this.h[0] = sum32$1(this.h[0], a); + this.h[1] = sum32$1(this.h[1], b); + this.h[2] = sum32$1(this.h[2], c); + this.h[3] = sum32$1(this.h[3], d); + this.h[4] = sum32$1(this.h[4], e); + }; + + SHA1.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); + }; + + 'use strict'; + + + + + + + var sum32$2 = utils.sum32; + var sum32_4$1 = utils.sum32_4; + var sum32_5$2 = utils.sum32_5; + var ch32$1 = common$1.ch32; + var maj32$1 = common$1.maj32; + var s0_256$1 = common$1.s0_256; + var s1_256$1 = common$1.s1_256; + var g0_256$1 = common$1.g0_256; + var g1_256$1 = common$1.g1_256; + + var BlockHash$2 = common.BlockHash; + + var sha256_K = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 + ]; + + function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + + BlockHash$2.call(this); + this.h = [ + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 + ]; + this.k = sha256_K; + this.W = new Array(64); + } + utils.inherits(SHA256, BlockHash$2); + var _256 = SHA256; + + SHA256.blockSize = 512; + SHA256.outSize = 256; + SHA256.hmacStrength = 192; + SHA256.padLength = 64; + + SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4$1(g1_256$1(W[i - 2]), W[i - 7], g0_256$1(W[i - 15]), W[i - 16]); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + + minimalisticAssert(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5$2(h, s1_256$1(e), ch32$1(e, f, g), this.k[i], W[i]); + var T2 = sum32$2(s0_256$1(a), maj32$1(a, b, c)); + h = g; + g = f; + f = e; + e = sum32$2(d, T1); + d = c; + c = b; + b = a; + a = sum32$2(T1, T2); + } + + this.h[0] = sum32$2(this.h[0], a); + this.h[1] = sum32$2(this.h[1], b); + this.h[2] = sum32$2(this.h[2], c); + this.h[3] = sum32$2(this.h[3], d); + this.h[4] = sum32$2(this.h[4], e); + this.h[5] = sum32$2(this.h[5], f); + this.h[6] = sum32$2(this.h[6], g); + this.h[7] = sum32$2(this.h[7], h); + }; + + SHA256.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); + }; + + 'use strict'; + + + + + function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + + _256.call(this); + this.h = [ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; + } + utils.inherits(SHA224, _256); + var _224 = SHA224; + + SHA224.blockSize = 512; + SHA224.outSize = 224; + SHA224.hmacStrength = 192; + SHA224.padLength = 64; + + SHA224.prototype._digest = function digest(enc) { + // Just truncate output + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 7), 'big'); + else + return utils.split32(this.h.slice(0, 7), 'big'); + }; + + 'use strict'; + + + + + + var rotr64_hi$1 = utils.rotr64_hi; + var rotr64_lo$1 = utils.rotr64_lo; + var shr64_hi$1 = utils.shr64_hi; + var shr64_lo$1 = utils.shr64_lo; + var sum64$1 = utils.sum64; + var sum64_hi$1 = utils.sum64_hi; + var sum64_lo$1 = utils.sum64_lo; + var sum64_4_hi$1 = utils.sum64_4_hi; + var sum64_4_lo$1 = utils.sum64_4_lo; + var sum64_5_hi$1 = utils.sum64_5_hi; + var sum64_5_lo$1 = utils.sum64_5_lo; + + var BlockHash$3 = common.BlockHash; + + var sha512_K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 + ]; + + function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + + BlockHash$3.call(this); + this.h = [ + 0x6a09e667, 0xf3bcc908, + 0xbb67ae85, 0x84caa73b, + 0x3c6ef372, 0xfe94f82b, + 0xa54ff53a, 0x5f1d36f1, + 0x510e527f, 0xade682d1, + 0x9b05688c, 0x2b3e6c1f, + 0x1f83d9ab, 0xfb41bd6b, + 0x5be0cd19, 0x137e2179 ]; + this.k = sha512_K; + this.W = new Array(160); + } + utils.inherits(SHA512, BlockHash$3); + var _512 = SHA512; + + SHA512.blockSize = 1024; + SHA512.outSize = 512; + SHA512.hmacStrength = 192; + SHA512.padLength = 128; + + SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + + // 32 x 32bit words + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; // i - 7 + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; // i - 16 + var c3_lo = W[i - 31]; + + W[i] = sum64_4_hi$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + W[i + 1] = sum64_4_lo$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + } + }; + + SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + + var W = this.W; + + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + + minimalisticAssert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + + var T1_hi = sum64_5_hi$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + var T1_lo = sum64_5_lo$1( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + + var T2_hi = sum64_hi$1(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo$1(c0_hi, c0_lo, c1_hi, c1_lo); + + hh = gh; + hl = gl; + + gh = fh; + gl = fl; + + fh = eh; + fl = el; + + eh = sum64_hi$1(dh, dl, T1_hi, T1_lo); + el = sum64_lo$1(dl, dl, T1_hi, T1_lo); + + dh = ch; + dl = cl; + + ch = bh; + cl = bl; + + bh = ah; + bl = al; + + ah = sum64_hi$1(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo$1(T1_hi, T1_lo, T2_hi, T2_lo); + } + + sum64$1(this.h, 0, ah, al); + sum64$1(this.h, 2, bh, bl); + sum64$1(this.h, 4, ch, cl); + sum64$1(this.h, 6, dh, dl); + sum64$1(this.h, 8, eh, el); + sum64$1(this.h, 10, fh, fl); + sum64$1(this.h, 12, gh, gl); + sum64$1(this.h, 14, hh, hl); + }; + + SHA512.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); + }; + + function ch64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ ((~xh) & zh); + if (r < 0) + r += 0x100000000; + return r; + } + + function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ ((~xl) & zl); + if (r < 0) + r += 0x100000000; + return r; + } + + function maj64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); + if (r < 0) + r += 0x100000000; + return r; + } + + function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); + if (r < 0) + r += 0x100000000; + return r; + } + + function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 28); + var c1_hi = rotr64_hi$1(xl, xh, 2); // 34 + var c2_hi = rotr64_hi$1(xl, xh, 7); // 39 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; + } + + function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 28); + var c1_lo = rotr64_lo$1(xl, xh, 2); // 34 + var c2_lo = rotr64_lo$1(xl, xh, 7); // 39 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; + } + + function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 14); + var c1_hi = rotr64_hi$1(xh, xl, 18); + var c2_hi = rotr64_hi$1(xl, xh, 9); // 41 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; + } + + function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 14); + var c1_lo = rotr64_lo$1(xh, xl, 18); + var c2_lo = rotr64_lo$1(xl, xh, 9); // 41 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; + } + + function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 1); + var c1_hi = rotr64_hi$1(xh, xl, 8); + var c2_hi = shr64_hi$1(xh, xl, 7); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; + } + + function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 1); + var c1_lo = rotr64_lo$1(xh, xl, 8); + var c2_lo = shr64_lo$1(xh, xl, 7); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; + } + + function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi$1(xh, xl, 19); + var c1_hi = rotr64_hi$1(xl, xh, 29); // 61 + var c2_hi = shr64_hi$1(xh, xl, 6); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; + } + + function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo$1(xh, xl, 19); + var c1_lo = rotr64_lo$1(xl, xh, 29); // 61 + var c2_lo = shr64_lo$1(xh, xl, 6); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; + } + + 'use strict'; + + + + + + function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + + _512.call(this); + this.h = [ + 0xcbbb9d5d, 0xc1059ed8, + 0x629a292a, 0x367cd507, + 0x9159015a, 0x3070dd17, + 0x152fecd8, 0xf70e5939, + 0x67332667, 0xffc00b31, + 0x8eb44a87, 0x68581511, + 0xdb0c2e0d, 0x64f98fa7, + 0x47b5481d, 0xbefa4fa4 ]; + } + utils.inherits(SHA384, _512); + var _384 = SHA384; + + SHA384.blockSize = 1024; + SHA384.outSize = 384; + SHA384.hmacStrength = 192; + SHA384.padLength = 128; + + SHA384.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 12), 'big'); + else + return utils.split32(this.h.slice(0, 12), 'big'); + }; + + 'use strict'; + + var sha1 = _1; + var sha224 = _224; + var sha256 = _256; + var sha384 = _384; + var sha512 = _512; + + var sha = { + sha1: sha1, + sha224: sha224, + sha256: sha256, + sha384: sha384, + sha512: sha512 + }; + + 'use strict'; + + + + + var rotl32$2 = utils.rotl32; + var sum32$3 = utils.sum32; + var sum32_3$1 = utils.sum32_3; + var sum32_4$2 = utils.sum32_4; + var BlockHash$4 = common.BlockHash; + + function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + + BlockHash$4.call(this); + + this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; + this.endian = 'little'; + } + utils.inherits(RIPEMD160, BlockHash$4); + var ripemd160 = RIPEMD160; + + RIPEMD160.blockSize = 512; + RIPEMD160.outSize = 160; + RIPEMD160.hmacStrength = 192; + RIPEMD160.padLength = 64; + + RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32$3( + rotl32$2( + sum32_4$2(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j]), + E); + A = E; + E = D; + D = rotl32$2(C, 10); + C = B; + B = T; + T = sum32$3( + rotl32$2( + sum32_4$2(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j]), + Eh); + Ah = Eh; + Eh = Dh; + Dh = rotl32$2(Ch, 10); + Ch = Bh; + Bh = T; + } + T = sum32_3$1(this.h[1], C, Dh); + this.h[1] = sum32_3$1(this.h[2], D, Eh); + this.h[2] = sum32_3$1(this.h[3], E, Ah); + this.h[3] = sum32_3$1(this.h[4], A, Bh); + this.h[4] = sum32_3$1(this.h[0], B, Ch); + this.h[0] = T; + }; + + RIPEMD160.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'little'); + else + return utils.split32(this.h, 'little'); + }; + + function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return (x & y) | ((~x) & z); + else if (j <= 47) + return (x | (~y)) ^ z; + else if (j <= 63) + return (x & z) | (y & (~z)); + else + return x ^ (y | (~z)); + } + + function K(j) { + if (j <= 15) + return 0x00000000; + else if (j <= 31) + return 0x5a827999; + else if (j <= 47) + return 0x6ed9eba1; + else if (j <= 63) + return 0x8f1bbcdc; + else + return 0xa953fd4e; + } + + function Kh(j) { + if (j <= 15) + return 0x50a28be6; + else if (j <= 31) + return 0x5c4dd124; + else if (j <= 47) + return 0x6d703ef3; + else if (j <= 63) + return 0x7a6d76e9; + else + return 0x00000000; + } + + var r = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 + ]; + + var rh = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 + ]; + + var s = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 + ]; + + var sh = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 + ]; + + var ripemd = { + ripemd160: ripemd160 + }; + + 'use strict'; + + + + + function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + + this._init(utils.toArray(key, enc)); + } + var hmac = Hmac; + + Hmac.prototype._init = function init(key) { + // Shorten key, if needed + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + minimalisticAssert(key.length <= this.blockSize); + + // Add padding to key + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + + for (i = 0; i < key.length; i++) + key[i] ^= 0x36; + this.inner = new this.Hash().update(key); + + // 0x36 ^ 0x5c = 0x6a + for (i = 0; i < key.length; i++) + key[i] ^= 0x6a; + this.outer = new this.Hash().update(key); + }; + + Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; + }; + + Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); + }; + + var hash_1 = createCommonjsModule(function (module, exports) { + var hash = exports; + + hash.utils = utils; + hash.common = common; + hash.sha = sha; + hash.ripemd = ripemd; + hash.hmac = hmac; + + // Proxy hash functions to the main object + hash.sha1 = hash.sha.sha1; + hash.sha256 = hash.sha.sha256; + hash.sha224 = hash.sha.sha224; + hash.sha384 = hash.sha.sha384; + hash.sha512 = hash.sha.sha512; + hash.ripemd160 = hash.ripemd.ripemd160; + }); + + var curves_1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + var curves = exports; + + + + + + var assert = utils_1$1.assert; + + function PresetCurve(options) { + if (options.type === 'short') + this.curve = new curve_1.short(options); + else if (options.type === 'edwards') + this.curve = new curve_1.edwards(options); + else + this.curve = new curve_1.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); + } + curves.PresetCurve = PresetCurve; + + function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve, + }); + return curve; + }, + }); + } + + defineCurve('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: hash_1.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811', + ], + }); + + defineCurve('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: hash_1.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', + ], + }); + + defineCurve('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: hash_1.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', + ], + }); + + defineCurve('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: hash_1.sha384, + gRed: false, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + + '5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', + ], + }); + + defineCurve('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: hash_1.sha512, + gRed: false, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + + '3fad0761 353c7086 a272c240 88be9476 9fd16650', + ], + }); + + defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash_1.sha256, + gRed: false, + g: [ + '9', + ], + }); + + defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash_1.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658', + ], + }); + + var pre; + try { + pre = /*RicMoo:ethers:require(./precomputed/secp256k1)*/(null).crash(); + } catch (e) { + pre = undefined; + } + + defineCurve('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: hash_1.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3', + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15', + }, + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre, + ], + }); + }); + + 'use strict'; + + + + + + function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + + this._reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + + var entropy = utils_1.toArray(options.entropy, options.entropyEnc || 'hex'); + var nonce = utils_1.toArray(options.nonce, options.nonceEnc || 'hex'); + var pers = utils_1.toArray(options.pers, options.persEnc || 'hex'); + minimalisticAssert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); + } + var hmacDrbg = HmacDRBG; + + HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this._reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 + }; + + HmacDRBG.prototype._hmac = function hmac() { + return new hash_1.hmac(this.hash, this.K); + }; + + HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); + }; + + HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils_1.toArray(entropy, entropyEnc); + add = utils_1.toArray(add, addEnc); + + minimalisticAssert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this._reseed = 1; + }; + + HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this._reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils_1.toArray(add, addEnc || 'hex'); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this._reseed++; + return utils_1.encode(res, enc); + }; + + 'use strict'; + + + + var assert$3 = utils_1$1.assert; + + function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); + } + var key = KeyPair; + + KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc, + }); + }; + + KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc, + }); + }; + + KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; + }; + + KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); + }; + + KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; + }; + + KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new bn(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); + }; + + KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + // Montgomery points only have an `x` coordinate. + // Weierstrass/Edwards points on the other hand have both `x` and + // `y` coordinates. + if (this.ec.curve.type === 'mont') { + assert$3(key.x, 'Need x coordinate'); + } else if (this.ec.curve.type === 'short' || + this.ec.curve.type === 'edwards') { + assert$3(key.x && key.y, 'Need both x and y coordinate'); + } + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); + }; + + // ECDH + KeyPair.prototype.derive = function derive(pub) { + if(!pub.validate()) { + assert$3(pub.validate(), 'public point not validated'); + } + return pub.mul(this.priv).getX(); + }; + + // ECDSA + KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); + }; + + KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); + }; + + KeyPair.prototype.inspect = function inspect() { + return ''; + }; + + 'use strict'; + + + + + var assert$4 = utils_1$1.assert; + + function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert$4(options.r && options.s, 'Signature without r or s'); + this.r = new bn(options.r, 16); + this.s = new bn(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; + } + var signature = Signature; + + function Position() { + this.place = 0; + } + + function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + + // Indefinite length or overflow + if (octetLen === 0 || octetLen > 4) { + return false; + } + + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + val >>>= 0; + } + + // Leading zeroes + if (val <= 0x7f) { + return false; + } + + p.place = off; + return val; + } + + function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); + } + + Signature.prototype._importDER = function _importDER(data, enc) { + data = utils_1$1.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if (len === false) { + return false; + } + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + if (rlen === false) { + return false; + } + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (slen === false) { + return false; + } + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0) { + if (r[1] & 0x80) { + r = r.slice(1); + } else { + // Leading zeroes + return false; + } + } + if (s[0] === 0) { + if (s[1] & 0x80) { + s = s.slice(1); + } else { + // Leading zeroes + return false; + } + } + + this.r = new bn(r); + this.s = new bn(s); + this.recoveryParam = null; + + return true; + }; + + function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); + } + + Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils_1$1.encode(res, enc); + }; + + 'use strict'; + + + + + + var rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); }); + var assert$5 = utils_1$1.assert; + + + + + function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert$5(Object.prototype.hasOwnProperty.call(curves_1, options), + 'Unknown curve ' + options); + + options = curves_1[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof curves_1.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; + } + var ec = EC; + + EC.prototype.keyPair = function keyPair(options) { + return new key(this, options); + }; + + EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return key.fromPrivate(this, priv, enc); + }; + + EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return key.fromPublic(this, pub, enc); + }; + + EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new hmacDrbg({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + entropy: options.entropy || rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || 'utf8', + nonce: this.n.toArray(), + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new bn(2)); + for (;;) { + var priv = new bn(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } + }; + + EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; + }; + + EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new bn(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new hmacDrbg({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new bn(1)); + + for (var iter = 0; ; iter++) { + var k = options.k ? + options.k(iter) : + new bn(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new signature({ r: r, s: s, recoveryParam: recoveryParam }); + } + }; + + EC.prototype.verify = function verify(msg, signature$1, key, enc) { + msg = this._truncateToN(new bn(msg, 16)); + key = this.keyFromPublic(key, enc); + signature$1 = new signature(signature$1, 'hex'); + + // Perform primitive values validation + var r = signature$1.r; + var s = signature$1.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + var p; + + if (!this.curve._maxwellTrick) { + p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); + }; + + EC.prototype.recoverPubKey = function(msg, signature$1, j, enc) { + assert$5((3 & j) === j, 'The recovery param is more than two bits'); + signature$1 = new signature(signature$1, enc); + + var n = this.n; + var e = new bn(msg); + var r = signature$1.r; + var s = signature$1.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature$1.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); + }; + + EC.prototype.getKeyRecoveryParam = function(e, signature$1, Q, enc) { + signature$1 = new signature(signature$1, enc); + if (signature$1.recoveryParam !== null) + return signature$1.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature$1, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); + }; + + var elliptic_1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + var elliptic = exports; + + elliptic.version = /*RicMoo:ethers*/{ version: "6.5.4" }.version; + elliptic.utils = utils_1$1; + elliptic.rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); }); + elliptic.curve = curve_1; + elliptic.curves = curves_1; + + // Protocols + elliptic.ec = ec; + elliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null); + }); + + var elliptic = createCommonjsModule(function (module, exports) { + "use strict"; + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.EC = void 0; + var elliptic_1$1 = __importDefault(elliptic_1); + var EC = elliptic_1$1.default.ec; + exports.EC = EC; + + }); + + var elliptic$1 = /*@__PURE__*/getDefaultExportFromCjs(elliptic); + + var _version$m = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "signing-key/5.5.0"; + + }); + + var _version$n = /*@__PURE__*/getDefaultExportFromCjs(_version$m); + + var lib$d = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.computePublicKey = exports.recoverPublicKey = exports.SigningKey = void 0; + + + + + + var logger = new lib.Logger(_version$m.version); + var _curve = null; + function getCurve() { + if (!_curve) { + _curve = new elliptic.EC("secp256k1"); + } + return _curve; + } + var SigningKey = /** @class */ (function () { + function SigningKey(privateKey) { + (0, lib$3.defineReadOnly)(this, "curve", "secp256k1"); + (0, lib$3.defineReadOnly)(this, "privateKey", (0, lib$1.hexlify)(privateKey)); + var keyPair = getCurve().keyFromPrivate((0, lib$1.arrayify)(this.privateKey)); + (0, lib$3.defineReadOnly)(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); + (0, lib$3.defineReadOnly)(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); + (0, lib$3.defineReadOnly)(this, "_isSigningKey", true); + } + SigningKey.prototype._addPoint = function (other) { + var p0 = getCurve().keyFromPublic((0, lib$1.arrayify)(this.publicKey)); + var p1 = getCurve().keyFromPublic((0, lib$1.arrayify)(other)); + return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); + }; + SigningKey.prototype.signDigest = function (digest) { + var keyPair = getCurve().keyFromPrivate((0, lib$1.arrayify)(this.privateKey)); + var digestBytes = (0, lib$1.arrayify)(digest); + if (digestBytes.length !== 32) { + logger.throwArgumentError("bad digest length", "digest", digest); + } + var signature = keyPair.sign(digestBytes, { canonical: true }); + return (0, lib$1.splitSignature)({ + recoveryParam: signature.recoveryParam, + r: (0, lib$1.hexZeroPad)("0x" + signature.r.toString(16), 32), + s: (0, lib$1.hexZeroPad)("0x" + signature.s.toString(16), 32), + }); + }; + SigningKey.prototype.computeSharedSecret = function (otherKey) { + var keyPair = getCurve().keyFromPrivate((0, lib$1.arrayify)(this.privateKey)); + var otherKeyPair = getCurve().keyFromPublic((0, lib$1.arrayify)(computePublicKey(otherKey))); + return (0, lib$1.hexZeroPad)("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); + }; + SigningKey.isSigningKey = function (value) { + return !!(value && value._isSigningKey); + }; + return SigningKey; + }()); + exports.SigningKey = SigningKey; + function recoverPublicKey(digest, signature) { + var sig = (0, lib$1.splitSignature)(signature); + var rs = { r: (0, lib$1.arrayify)(sig.r), s: (0, lib$1.arrayify)(sig.s) }; + return "0x" + getCurve().recoverPubKey((0, lib$1.arrayify)(digest), rs, sig.recoveryParam).encode("hex", false); + } + exports.recoverPublicKey = recoverPublicKey; + function computePublicKey(key, compressed) { + var bytes = (0, lib$1.arrayify)(key); + if (bytes.length === 32) { + var signingKey = new SigningKey(bytes); + if (compressed) { + return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); + } + return signingKey.publicKey; + } + else if (bytes.length === 33) { + if (compressed) { + return (0, lib$1.hexlify)(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); + } + else if (bytes.length === 65) { + if (!compressed) { + return (0, lib$1.hexlify)(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); + } + return logger.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); + } + exports.computePublicKey = computePublicKey; + + }); + + var index$d = /*@__PURE__*/getDefaultExportFromCjs(lib$d); + + var _version$o = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "transactions/5.5.0"; + + }); + + var _version$p = /*@__PURE__*/getDefaultExportFromCjs(_version$o); + + var lib$e = createCommonjsModule(function (module, exports) { + "use strict"; + var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parse = exports.serialize = exports.accessListify = exports.recoverAddress = exports.computeAddress = exports.TransactionTypes = void 0; + + + + + + + var RLP = __importStar(lib$5); + + + + var logger = new lib.Logger(_version$o.version); + var TransactionTypes; + (function (TransactionTypes) { + TransactionTypes[TransactionTypes["legacy"] = 0] = "legacy"; + TransactionTypes[TransactionTypes["eip2930"] = 1] = "eip2930"; + TransactionTypes[TransactionTypes["eip1559"] = 2] = "eip1559"; + })(TransactionTypes = exports.TransactionTypes || (exports.TransactionTypes = {})); + ; + /////////////////////////////// + function handleAddress(value) { + if (value === "0x") { + return null; + } + return (0, lib$6.getAddress)(value); + } + function handleNumber(value) { + if (value === "0x") { + return lib$7.Zero; + } + return lib$2.BigNumber.from(value); + } + // Legacy Transaction Fields + var transactionFields = [ + { name: "nonce", maxLength: 32, numeric: true }, + { name: "gasPrice", maxLength: 32, numeric: true }, + { name: "gasLimit", maxLength: 32, numeric: true }, + { name: "to", length: 20 }, + { name: "value", maxLength: 32, numeric: true }, + { name: "data" }, + ]; + var allowedTransactionKeys = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, type: true, value: true + }; + function computeAddress(key) { + var publicKey = (0, lib$d.computePublicKey)(key); + return (0, lib$6.getAddress)((0, lib$1.hexDataSlice)((0, lib$4.keccak256)((0, lib$1.hexDataSlice)(publicKey, 1)), 12)); + } + exports.computeAddress = computeAddress; + function recoverAddress(digest, signature) { + return computeAddress((0, lib$d.recoverPublicKey)((0, lib$1.arrayify)(digest), signature)); + } + exports.recoverAddress = recoverAddress; + function formatNumber(value, name) { + var result = (0, lib$1.stripZeros)(lib$2.BigNumber.from(value).toHexString()); + if (result.length > 32) { + logger.throwArgumentError("invalid length for " + name, ("transaction:" + name), value); + } + return result; + } + function accessSetify(addr, storageKeys) { + return { + address: (0, lib$6.getAddress)(addr), + storageKeys: (storageKeys || []).map(function (storageKey, index) { + if ((0, lib$1.hexDataLength)(storageKey) !== 32) { + logger.throwArgumentError("invalid access list storageKey", "accessList[" + addr + ":" + index + "]", storageKey); + } + return storageKey.toLowerCase(); + }) + }; + } + function accessListify(value) { + if (Array.isArray(value)) { + return value.map(function (set, index) { + if (Array.isArray(set)) { + if (set.length > 2) { + logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value[" + index + "]", set); + } + return accessSetify(set[0], set[1]); + } + return accessSetify(set.address, set.storageKeys); + }); + } + var result = Object.keys(value).map(function (addr) { + var storageKeys = value[addr].reduce(function (accum, storageKey) { + accum[storageKey] = true; + return accum; + }, {}); + return accessSetify(addr, Object.keys(storageKeys).sort()); + }); + result.sort(function (a, b) { return (a.address.localeCompare(b.address)); }); + return result; + } + exports.accessListify = accessListify; + function formatAccessList(value) { + return accessListify(value).map(function (set) { return [set.address, set.storageKeys]; }); + } + function _serializeEip1559(transaction, signature) { + // If there is an explicit gasPrice, make sure it matches the + // EIP-1559 fees; otherwise they may not understand what they + // think they are setting in terms of fee. + if (transaction.gasPrice != null) { + var gasPrice = lib$2.BigNumber.from(transaction.gasPrice); + var maxFeePerGas = lib$2.BigNumber.from(transaction.maxFeePerGas || 0); + if (!gasPrice.eq(maxFeePerGas)) { + logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + gasPrice: gasPrice, + maxFeePerGas: maxFeePerGas + }); + } + } + var fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), + formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? (0, lib$6.getAddress)(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + var sig = (0, lib$1.splitSignature)(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push((0, lib$1.stripZeros)(sig.r)); + fields.push((0, lib$1.stripZeros)(sig.s)); + } + return (0, lib$1.hexConcat)(["0x02", RLP.encode(fields)]); + } + function _serializeEip2930(transaction, signature) { + var fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.gasPrice || 0, "gasPrice"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + ((transaction.to != null) ? (0, lib$6.getAddress)(transaction.to) : "0x"), + formatNumber(transaction.value || 0, "value"), + (transaction.data || "0x"), + (formatAccessList(transaction.accessList || [])) + ]; + if (signature) { + var sig = (0, lib$1.splitSignature)(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push((0, lib$1.stripZeros)(sig.r)); + fields.push((0, lib$1.stripZeros)(sig.s)); + } + return (0, lib$1.hexConcat)(["0x01", RLP.encode(fields)]); + } + // Legacy Transactions and EIP-155 + function _serialize(transaction, signature) { + (0, lib$3.checkProperties)(transaction, allowedTransactionKeys); + var raw = []; + transactionFields.forEach(function (fieldInfo) { + var value = transaction[fieldInfo.name] || ([]); + var options = {}; + if (fieldInfo.numeric) { + options.hexPad = "left"; + } + value = (0, lib$1.arrayify)((0, lib$1.hexlify)(value, options)); + // Fixed-width field + if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + // Variable-width (with a maximum) + if (fieldInfo.maxLength) { + value = (0, lib$1.stripZeros)(value); + if (value.length > fieldInfo.maxLength) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, ("transaction:" + fieldInfo.name), value); + } + } + raw.push((0, lib$1.hexlify)(value)); + }); + var chainId = 0; + if (transaction.chainId != null) { + // A chainId was provided; if non-zero we'll use EIP-155 + chainId = transaction.chainId; + if (typeof (chainId) !== "number") { + logger.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + } + } + else if (signature && !(0, lib$1.isBytesLike)(signature) && signature.v > 28) { + // No chainId provided, but the signature is signing with EIP-155; derive chainId + chainId = Math.floor((signature.v - 35) / 2); + } + // We have an EIP-155 transaction (chainId was specified and non-zero) + if (chainId !== 0) { + raw.push((0, lib$1.hexlify)(chainId)); // @TODO: hexValue? + raw.push("0x"); + raw.push("0x"); + } + // Requesting an unsigned transaction + if (!signature) { + return RLP.encode(raw); + } + // The splitSignature will ensure the transaction has a recoveryParam in the + // case that the signTransaction function only adds a v. + var sig = (0, lib$1.splitSignature)(signature); + // We pushed a chainId and null r, s on for hashing only; remove those + var v = 27 + sig.recoveryParam; + if (chainId !== 0) { + raw.pop(); + raw.pop(); + raw.pop(); + v += chainId * 2 + 8; + // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it! + if (sig.v > 28 && sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + } + else if (sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + raw.push((0, lib$1.hexlify)(v)); + raw.push((0, lib$1.stripZeros)((0, lib$1.arrayify)(sig.r))); + raw.push((0, lib$1.stripZeros)((0, lib$1.arrayify)(sig.s))); + return RLP.encode(raw); + } + function serialize(transaction, signature) { + // Legacy and EIP-155 Transactions + if (transaction.type == null || transaction.type === 0) { + if (transaction.accessList != null) { + logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + } + return _serialize(transaction, signature); + } + // Typed Transactions (EIP-2718) + switch (transaction.type) { + case 1: + return _serializeEip2930(transaction, signature); + case 2: + return _serializeEip1559(transaction, signature); + default: + break; + } + return logger.throwError("unsupported transaction type: " + transaction.type, lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "serializeTransaction", + transactionType: transaction.type + }); + } + exports.serialize = serialize; + function _parseEipSignature(tx, fields, serialize) { + try { + var recid = handleNumber(fields[0]).toNumber(); + if (recid !== 0 && recid !== 1) { + throw new Error("bad recid"); + } + tx.v = recid; + } + catch (error) { + logger.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + } + tx.r = (0, lib$1.hexZeroPad)(fields[1], 32); + tx.s = (0, lib$1.hexZeroPad)(fields[2], 32); + try { + var digest = (0, lib$4.keccak256)(serialize(tx)); + tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); + } + catch (error) { + console.log(error); + } + } + function _parseEip1559(payload) { + var transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 9 && transaction.length !== 12) { + logger.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, lib$1.hexlify)(payload)); + } + var maxPriorityFeePerGas = handleNumber(transaction[2]); + var maxFeePerGas = handleNumber(transaction[3]); + var tx = { + type: 2, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + maxPriorityFeePerGas: maxPriorityFeePerGas, + maxFeePerGas: maxFeePerGas, + gasPrice: null, + gasLimit: handleNumber(transaction[4]), + to: handleAddress(transaction[5]), + value: handleNumber(transaction[6]), + data: transaction[7], + accessList: accessListify(transaction[8]), + }; + // Unsigned EIP-1559 Transaction + if (transaction.length === 9) { + return tx; + } + tx.hash = (0, lib$4.keccak256)(payload); + _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); + return tx; + } + function _parseEip2930(payload) { + var transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 8 && transaction.length !== 11) { + logger.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, lib$1.hexlify)(payload)); + } + var tx = { + type: 1, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + gasPrice: handleNumber(transaction[2]), + gasLimit: handleNumber(transaction[3]), + to: handleAddress(transaction[4]), + value: handleNumber(transaction[5]), + data: transaction[6], + accessList: accessListify(transaction[7]) + }; + // Unsigned EIP-2930 Transaction + if (transaction.length === 8) { + return tx; + } + tx.hash = (0, lib$4.keccak256)(payload); + _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); + return tx; + } + // Legacy Transactions and EIP-155 + function _parse(rawTransaction) { + var transaction = RLP.decode(rawTransaction); + if (transaction.length !== 9 && transaction.length !== 6) { + logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + } + var tx = { + nonce: handleNumber(transaction[0]).toNumber(), + gasPrice: handleNumber(transaction[1]), + gasLimit: handleNumber(transaction[2]), + to: handleAddress(transaction[3]), + value: handleNumber(transaction[4]), + data: transaction[5], + chainId: 0 + }; + // Legacy unsigned transaction + if (transaction.length === 6) { + return tx; + } + try { + tx.v = lib$2.BigNumber.from(transaction[6]).toNumber(); + } + catch (error) { + console.log(error); + return tx; + } + tx.r = (0, lib$1.hexZeroPad)(transaction[7], 32); + tx.s = (0, lib$1.hexZeroPad)(transaction[8], 32); + if (lib$2.BigNumber.from(tx.r).isZero() && lib$2.BigNumber.from(tx.s).isZero()) { + // EIP-155 unsigned transaction + tx.chainId = tx.v; + tx.v = 0; + } + else { + // Signed Transaction + tx.chainId = Math.floor((tx.v - 35) / 2); + if (tx.chainId < 0) { + tx.chainId = 0; + } + var recoveryParam = tx.v - 27; + var raw = transaction.slice(0, 6); + if (tx.chainId !== 0) { + raw.push((0, lib$1.hexlify)(tx.chainId)); + raw.push("0x"); + raw.push("0x"); + recoveryParam -= tx.chainId * 2 + 8; + } + var digest = (0, lib$4.keccak256)(RLP.encode(raw)); + try { + tx.from = recoverAddress(digest, { r: (0, lib$1.hexlify)(tx.r), s: (0, lib$1.hexlify)(tx.s), recoveryParam: recoveryParam }); + } + catch (error) { + console.log(error); + } + tx.hash = (0, lib$4.keccak256)(rawTransaction); + } + tx.type = null; + return tx; + } + function parse(rawTransaction) { + var payload = (0, lib$1.arrayify)(rawTransaction); + // Legacy and EIP-155 Transactions + if (payload[0] > 0x7f) { + return _parse(payload); + } + // Typed Transaction (EIP-2718) + switch (payload[0]) { + case 1: + return _parseEip2930(payload); + case 2: + return _parseEip1559(payload); + default: + break; + } + return logger.throwError("unsupported transaction type: " + payload[0], lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "parseTransaction", + transactionType: payload[0] + }); + } + exports.parse = parse; + + }); + + var index$e = /*@__PURE__*/getDefaultExportFromCjs(lib$e); + + var _version$q = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "contracts/5.5.0"; + + }); + + var _version$r = /*@__PURE__*/getDefaultExportFromCjs(_version$q); + + var lib$f = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __spreadArray = (commonjsGlobal && commonjsGlobal.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ContractFactory = exports.Contract = exports.BaseContract = void 0; + + + + + + + + + + + var logger = new lib.Logger(_version$q.version); + ; + ; + /////////////////////////////// + var allowedTransactionKeys = { + chainId: true, data: true, from: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true, + customData: true + }; + function resolveName(resolver, nameOrPromise) { + return __awaiter(this, void 0, void 0, function () { + var name, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, nameOrPromise]; + case 1: + name = _a.sent(); + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", name); + } + // If it is already an address, just use it (after adding checksum) + try { + return [2 /*return*/, (0, lib$6.getAddress)(name)]; + } + catch (error) { } + if (!resolver) { + logger.throwError("a provider or signer is needed to resolve ENS names", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName" + }); + } + return [4 /*yield*/, resolver.resolveName(name)]; + case 2: + address = _a.sent(); + if (address == null) { + logger.throwArgumentError("resolver or addr is not configured for ENS name", "name", name); + } + return [2 /*return*/, address]; + } + }); + }); + } + // Recursively replaces ENS names with promises to resolve the name and resolves all properties + function resolveAddresses(resolver, value, paramType) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!Array.isArray(paramType)) return [3 /*break*/, 2]; + return [4 /*yield*/, Promise.all(paramType.map(function (paramType, index) { + return resolveAddresses(resolver, ((Array.isArray(value)) ? value[index] : value[paramType.name]), paramType); + }))]; + case 1: return [2 /*return*/, _a.sent()]; + case 2: + if (!(paramType.type === "address")) return [3 /*break*/, 4]; + return [4 /*yield*/, resolveName(resolver, value)]; + case 3: return [2 /*return*/, _a.sent()]; + case 4: + if (!(paramType.type === "tuple")) return [3 /*break*/, 6]; + return [4 /*yield*/, resolveAddresses(resolver, value, paramType.components)]; + case 5: return [2 /*return*/, _a.sent()]; + case 6: + if (!(paramType.baseType === "array")) return [3 /*break*/, 8]; + if (!Array.isArray(value)) { + return [2 /*return*/, Promise.reject(logger.makeError("invalid value for array", lib.Logger.errors.INVALID_ARGUMENT, { + argument: "value", + value: value + }))]; + } + return [4 /*yield*/, Promise.all(value.map(function (v) { return resolveAddresses(resolver, v, paramType.arrayChildren); }))]; + case 7: return [2 /*return*/, _a.sent()]; + case 8: return [2 /*return*/, value]; + } + }); + }); + } + function populateTransaction(contract, fragment, args) { + return __awaiter(this, void 0, void 0, function () { + var overrides, resolved, data, tx, ro, intrinsic, bytes, i, roValue, leftovers; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + overrides = {}; + if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + overrides = (0, lib$3.shallowCopy)(args.pop()); + } + // Make sure the parameter count matches + logger.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); + // Populate "from" override (allow promises) + if (contract.signer) { + if (overrides.from) { + // Contracts with a Signer are from the Signer's frame-of-reference; + // but we allow overriding "from" if it matches the signer + overrides.from = (0, lib$3.resolveProperties)({ + override: resolveName(contract.signer, overrides.from), + signer: contract.signer.getAddress() + }).then(function (check) { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + if ((0, lib$6.getAddress)(check.signer) !== check.override) { + logger.throwError("Contract with a Signer cannot override from", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.from" + }); + } + return [2 /*return*/, check.override]; + }); + }); }); + } + else { + overrides.from = contract.signer.getAddress(); + } + } + else if (overrides.from) { + overrides.from = resolveName(contract.provider, overrides.from); + //} else { + // Contracts without a signer can override "from", and if + // unspecified the zero address is used + //overrides.from = AddressZero; + } + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs), + address: contract.resolvedAddress, + overrides: ((0, lib$3.resolveProperties)(overrides) || {}) + })]; + case 1: + resolved = _a.sent(); + data = contract.interface.encodeFunctionData(fragment, resolved.args); + tx = { + data: data, + to: resolved.address + }; + ro = resolved.overrides; + // Populate simple overrides + if (ro.nonce != null) { + tx.nonce = lib$2.BigNumber.from(ro.nonce).toNumber(); + } + if (ro.gasLimit != null) { + tx.gasLimit = lib$2.BigNumber.from(ro.gasLimit); + } + if (ro.gasPrice != null) { + tx.gasPrice = lib$2.BigNumber.from(ro.gasPrice); + } + if (ro.maxFeePerGas != null) { + tx.maxFeePerGas = lib$2.BigNumber.from(ro.maxFeePerGas); + } + if (ro.maxPriorityFeePerGas != null) { + tx.maxPriorityFeePerGas = lib$2.BigNumber.from(ro.maxPriorityFeePerGas); + } + if (ro.from != null) { + tx.from = ro.from; + } + if (ro.type != null) { + tx.type = ro.type; + } + if (ro.accessList != null) { + tx.accessList = (0, lib$e.accessListify)(ro.accessList); + } + // If there was no "gasLimit" override, but the ABI specifies a default, use it + if (tx.gasLimit == null && fragment.gas != null) { + intrinsic = 21000; + bytes = (0, lib$1.arrayify)(data); + for (i = 0; i < bytes.length; i++) { + intrinsic += 4; + if (bytes[i]) { + intrinsic += 64; + } + } + tx.gasLimit = lib$2.BigNumber.from(fragment.gas).add(intrinsic); + } + // Populate "value" override + if (ro.value) { + roValue = lib$2.BigNumber.from(ro.value); + if (!roValue.isZero() && !fragment.payable) { + logger.throwError("non-payable method cannot override value", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: overrides.value + }); + } + tx.value = roValue; + } + if (ro.customData) { + tx.customData = (0, lib$3.shallowCopy)(ro.customData); + } + // Remove the overrides + delete overrides.nonce; + delete overrides.gasLimit; + delete overrides.gasPrice; + delete overrides.from; + delete overrides.value; + delete overrides.type; + delete overrides.accessList; + delete overrides.maxFeePerGas; + delete overrides.maxPriorityFeePerGas; + delete overrides.customData; + leftovers = Object.keys(overrides).filter(function (key) { return (overrides[key] != null); }); + if (leftovers.length) { + logger.throwError("cannot override " + leftovers.map(function (l) { return JSON.stringify(l); }).join(","), lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides", + overrides: leftovers + }); + } + return [2 /*return*/, tx]; + } + }); + }); + } + function buildPopulate(contract, fragment) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return populateTransaction(contract, fragment, args); + }; + } + function buildEstimate(contract, fragment) { + var signerOrProvider = (contract.signer || contract.provider); + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!signerOrProvider) { + logger.throwError("estimate require a provider or signer", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "estimateGas" + }); + } + return [4 /*yield*/, populateTransaction(contract, fragment, args)]; + case 1: + tx = _a.sent(); + return [4 /*yield*/, signerOrProvider.estimateGas(tx)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + } + function addContractWait(contract, tx) { + var wait = tx.wait.bind(tx); + tx.wait = function (confirmations) { + return wait(confirmations).then(function (receipt) { + receipt.events = receipt.logs.map(function (log) { + var event = (0, lib$3.deepCopy)(log); + var parsed = null; + try { + parsed = contract.interface.parseLog(log); + } + catch (e) { } + // Successfully parsed the event log; include it + if (parsed) { + event.args = parsed.args; + event.decode = function (data, topics) { + return contract.interface.decodeEventLog(parsed.eventFragment, data, topics); + }; + event.event = parsed.name; + event.eventSignature = parsed.signature; + } + // Useful operations + event.removeListener = function () { return contract.provider; }; + event.getBlock = function () { + return contract.provider.getBlock(receipt.blockHash); + }; + event.getTransaction = function () { + return contract.provider.getTransaction(receipt.transactionHash); + }; + event.getTransactionReceipt = function () { + return Promise.resolve(receipt); + }; + return event; + }); + return receipt; + }); + }; + } + function buildCall(contract, fragment, collapseSimple) { + var signerOrProvider = (contract.signer || contract.provider); + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var blockTag, overrides, tx, result, value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + blockTag = undefined; + if (!(args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === "object")) return [3 /*break*/, 3]; + overrides = (0, lib$3.shallowCopy)(args.pop()); + if (!(overrides.blockTag != null)) return [3 /*break*/, 2]; + return [4 /*yield*/, overrides.blockTag]; + case 1: + blockTag = _a.sent(); + _a.label = 2; + case 2: + delete overrides.blockTag; + args.push(overrides); + _a.label = 3; + case 3: + if (!(contract.deployTransaction != null)) return [3 /*break*/, 5]; + return [4 /*yield*/, contract._deployed(blockTag)]; + case 4: + _a.sent(); + _a.label = 5; + case 5: return [4 /*yield*/, populateTransaction(contract, fragment, args)]; + case 6: + tx = _a.sent(); + return [4 /*yield*/, signerOrProvider.call(tx, blockTag)]; + case 7: + result = _a.sent(); + try { + value = contract.interface.decodeFunctionResult(fragment, result); + if (collapseSimple && fragment.outputs.length === 1) { + value = value[0]; + } + return [2 /*return*/, value]; + } + catch (error) { + if (error.code === lib.Logger.errors.CALL_EXCEPTION) { + error.address = contract.address; + error.args = args; + error.transaction = tx; + } + throw error; + } + return [2 /*return*/]; + } + }); + }); + }; + } + function buildSend(contract, fragment) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var txRequest, tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!contract.signer) { + logger.throwError("sending a transaction requires a signer", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "sendTransaction" + }); + } + if (!(contract.deployTransaction != null)) return [3 /*break*/, 2]; + return [4 /*yield*/, contract._deployed()]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [4 /*yield*/, populateTransaction(contract, fragment, args)]; + case 3: + txRequest = _a.sent(); + return [4 /*yield*/, contract.signer.sendTransaction(txRequest)]; + case 4: + tx = _a.sent(); + // Tweak the tx.wait so the receipt has extra properties + addContractWait(contract, tx); + return [2 /*return*/, tx]; + } + }); + }); + }; + } + function buildDefault(contract, fragment, collapseSimple) { + if (fragment.constant) { + return buildCall(contract, fragment, collapseSimple); + } + return buildSend(contract, fragment); + } + function getEventTag(filter) { + if (filter.address && (filter.topics == null || filter.topics.length === 0)) { + return "*"; + } + return (filter.address || "*") + "@" + (filter.topics ? filter.topics.map(function (topic) { + if (Array.isArray(topic)) { + return topic.join("|"); + } + return topic; + }).join(":") : ""); + } + var RunningEvent = /** @class */ (function () { + function RunningEvent(tag, filter) { + (0, lib$3.defineReadOnly)(this, "tag", tag); + (0, lib$3.defineReadOnly)(this, "filter", filter); + this._listeners = []; + } + RunningEvent.prototype.addListener = function (listener, once) { + this._listeners.push({ listener: listener, once: once }); + }; + RunningEvent.prototype.removeListener = function (listener) { + var done = false; + this._listeners = this._listeners.filter(function (item) { + if (done || item.listener !== listener) { + return true; + } + done = true; + return false; + }); + }; + RunningEvent.prototype.removeAllListeners = function () { + this._listeners = []; + }; + RunningEvent.prototype.listeners = function () { + return this._listeners.map(function (i) { return i.listener; }); + }; + RunningEvent.prototype.listenerCount = function () { + return this._listeners.length; + }; + RunningEvent.prototype.run = function (args) { + var _this = this; + var listenerCount = this.listenerCount(); + this._listeners = this._listeners.filter(function (item) { + var argsCopy = args.slice(); + // Call the callback in the next event loop + setTimeout(function () { + item.listener.apply(_this, argsCopy); + }, 0); + // Reschedule it if it not "once" + return !(item.once); + }); + return listenerCount; + }; + RunningEvent.prototype.prepareEvent = function (event) { + }; + // Returns the array that will be applied to an emit + RunningEvent.prototype.getEmit = function (event) { + return [event]; + }; + return RunningEvent; + }()); + var ErrorRunningEvent = /** @class */ (function (_super) { + __extends(ErrorRunningEvent, _super); + function ErrorRunningEvent() { + return _super.call(this, "error", null) || this; + } + return ErrorRunningEvent; + }(RunningEvent)); + // @TODO Fragment should inherit Wildcard? and just override getEmit? + // or have a common abstract super class, with enough constructor + // options to configure both. + // A Fragment Event will populate all the properties that Wildcard + // will, and additionally dereference the arguments when emitting + var FragmentRunningEvent = /** @class */ (function (_super) { + __extends(FragmentRunningEvent, _super); + function FragmentRunningEvent(address, contractInterface, fragment, topics) { + var _this = this; + var filter = { + address: address + }; + var topic = contractInterface.getEventTopic(fragment); + if (topics) { + if (topic !== topics[0]) { + logger.throwArgumentError("topic mismatch", "topics", topics); + } + filter.topics = topics.slice(); + } + else { + filter.topics = [topic]; + } + _this = _super.call(this, getEventTag(filter), filter) || this; + (0, lib$3.defineReadOnly)(_this, "address", address); + (0, lib$3.defineReadOnly)(_this, "interface", contractInterface); + (0, lib$3.defineReadOnly)(_this, "fragment", fragment); + return _this; + } + FragmentRunningEvent.prototype.prepareEvent = function (event) { + var _this = this; + _super.prototype.prepareEvent.call(this, event); + event.event = this.fragment.name; + event.eventSignature = this.fragment.format(); + event.decode = function (data, topics) { + return _this.interface.decodeEventLog(_this.fragment, data, topics); + }; + try { + event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics); + } + catch (error) { + event.args = null; + event.decodeError = error; + } + }; + FragmentRunningEvent.prototype.getEmit = function (event) { + var errors = (0, lib$a.checkResultErrors)(event.args); + if (errors.length) { + throw errors[0].error; + } + var args = (event.args || []).slice(); + args.push(event); + return args; + }; + return FragmentRunningEvent; + }(RunningEvent)); + // A Wildcard Event will attempt to populate: + // - event The name of the event name + // - eventSignature The full signature of the event + // - decode A function to decode data and topics + // - args The decoded data and topics + var WildcardRunningEvent = /** @class */ (function (_super) { + __extends(WildcardRunningEvent, _super); + function WildcardRunningEvent(address, contractInterface) { + var _this = _super.call(this, "*", { address: address }) || this; + (0, lib$3.defineReadOnly)(_this, "address", address); + (0, lib$3.defineReadOnly)(_this, "interface", contractInterface); + return _this; + } + WildcardRunningEvent.prototype.prepareEvent = function (event) { + var _this = this; + _super.prototype.prepareEvent.call(this, event); + try { + var parsed_1 = this.interface.parseLog(event); + event.event = parsed_1.name; + event.eventSignature = parsed_1.signature; + event.decode = function (data, topics) { + return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics); + }; + event.args = parsed_1.args; + } + catch (error) { + // No matching event + } + }; + return WildcardRunningEvent; + }(RunningEvent)); + var BaseContract = /** @class */ (function () { + function BaseContract(addressOrName, contractInterface, signerOrProvider) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Contract); + // @TODO: Maybe still check the addressOrName looks like a valid address or name? + //address = getAddress(address); + (0, lib$3.defineReadOnly)(this, "interface", (0, lib$3.getStatic)(_newTarget, "getInterface")(contractInterface)); + if (signerOrProvider == null) { + (0, lib$3.defineReadOnly)(this, "provider", null); + (0, lib$3.defineReadOnly)(this, "signer", null); + } + else if (lib$c.Signer.isSigner(signerOrProvider)) { + (0, lib$3.defineReadOnly)(this, "provider", signerOrProvider.provider || null); + (0, lib$3.defineReadOnly)(this, "signer", signerOrProvider); + } + else if (lib$b.Provider.isProvider(signerOrProvider)) { + (0, lib$3.defineReadOnly)(this, "provider", signerOrProvider); + (0, lib$3.defineReadOnly)(this, "signer", null); + } + else { + logger.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); + } + (0, lib$3.defineReadOnly)(this, "callStatic", {}); + (0, lib$3.defineReadOnly)(this, "estimateGas", {}); + (0, lib$3.defineReadOnly)(this, "functions", {}); + (0, lib$3.defineReadOnly)(this, "populateTransaction", {}); + (0, lib$3.defineReadOnly)(this, "filters", {}); + { + var uniqueFilters_1 = {}; + Object.keys(this.interface.events).forEach(function (eventSignature) { + var event = _this.interface.events[eventSignature]; + (0, lib$3.defineReadOnly)(_this.filters, eventSignature, function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return { + address: _this.address, + topics: _this.interface.encodeFilterTopics(event, args) + }; + }); + if (!uniqueFilters_1[event.name]) { + uniqueFilters_1[event.name] = []; + } + uniqueFilters_1[event.name].push(eventSignature); + }); + Object.keys(uniqueFilters_1).forEach(function (name) { + var filters = uniqueFilters_1[name]; + if (filters.length === 1) { + (0, lib$3.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]); + } + else { + logger.warn("Duplicate definition of " + name + " (" + filters.join(", ") + ")"); + } + }); + } + (0, lib$3.defineReadOnly)(this, "_runningEvents", {}); + (0, lib$3.defineReadOnly)(this, "_wrappedEmits", {}); + if (addressOrName == null) { + logger.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); + } + (0, lib$3.defineReadOnly)(this, "address", addressOrName); + if (this.provider) { + (0, lib$3.defineReadOnly)(this, "resolvedAddress", resolveName(this.provider, addressOrName)); + } + else { + try { + (0, lib$3.defineReadOnly)(this, "resolvedAddress", Promise.resolve((0, lib$6.getAddress)(addressOrName))); + } + catch (error) { + // Without a provider, we cannot use ENS names + logger.throwError("provider is required to use ENS name as contract address", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new Contract" + }); + } + } + var uniqueNames = {}; + var uniqueSignatures = {}; + Object.keys(this.interface.functions).forEach(function (signature) { + var fragment = _this.interface.functions[signature]; + // Check that the signature is unique; if not the ABI generation has + // not been cleaned or may be incorrectly generated + if (uniqueSignatures[signature]) { + logger.warn("Duplicate ABI entry for " + JSON.stringify(signature)); + return; + } + uniqueSignatures[signature] = true; + // Track unique names; we only expose bare named functions if they + // are ambiguous + { + var name_1 = fragment.name; + if (!uniqueNames["%" + name_1]) { + uniqueNames["%" + name_1] = []; + } + uniqueNames["%" + name_1].push(signature); + } + if (_this[signature] == null) { + (0, lib$3.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true)); + } + // We do not collapse simple calls on this bucket, which allows + // frameworks to safely use this without introspection as well as + // allows decoding error recovery. + if (_this.functions[signature] == null) { + (0, lib$3.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false)); + } + if (_this.callStatic[signature] == null) { + (0, lib$3.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true)); + } + if (_this.populateTransaction[signature] == null) { + (0, lib$3.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment)); + } + if (_this.estimateGas[signature] == null) { + (0, lib$3.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment)); + } + }); + Object.keys(uniqueNames).forEach(function (name) { + // Ambiguous names to not get attached as bare names + var signatures = uniqueNames[name]; + if (signatures.length > 1) { + return; + } + // Strip off the leading "%" used for prototype protection + name = name.substring(1); + var signature = signatures[0]; + // If overwriting a member property that is null, swallow the error + try { + if (_this[name] == null) { + (0, lib$3.defineReadOnly)(_this, name, _this[signature]); + } + } + catch (e) { } + if (_this.functions[name] == null) { + (0, lib$3.defineReadOnly)(_this.functions, name, _this.functions[signature]); + } + if (_this.callStatic[name] == null) { + (0, lib$3.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]); + } + if (_this.populateTransaction[name] == null) { + (0, lib$3.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]); + } + if (_this.estimateGas[name] == null) { + (0, lib$3.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]); + } + }); + } + BaseContract.getContractAddress = function (transaction) { + return (0, lib$6.getContractAddress)(transaction); + }; + BaseContract.getInterface = function (contractInterface) { + if (lib$a.Interface.isInterface(contractInterface)) { + return contractInterface; + } + return new lib$a.Interface(contractInterface); + }; + // @TODO: Allow timeout? + BaseContract.prototype.deployed = function () { + return this._deployed(); + }; + BaseContract.prototype._deployed = function (blockTag) { + var _this = this; + if (!this._deployedPromise) { + // If we were just deployed, we know the transaction we should occur in + if (this.deployTransaction) { + this._deployedPromise = this.deployTransaction.wait().then(function () { + return _this; + }); + } + else { + // @TODO: Once we allow a timeout to be passed in, we will wait + // up to that many blocks for getCode + // Otherwise, poll for our code to be deployed + this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function (code) { + if (code === "0x") { + logger.throwError("contract not deployed", lib.Logger.errors.UNSUPPORTED_OPERATION, { + contractAddress: _this.address, + operation: "getDeployed" + }); + } + return _this; + }); + } + } + return this._deployedPromise; + }; + // @TODO: + // estimateFallback(overrides?: TransactionRequest): Promise + // @TODO: + // estimateDeploy(bytecode: string, ...args): Promise + BaseContract.prototype.fallback = function (overrides) { + var _this = this; + if (!this.signer) { + logger.throwError("sending a transactions require a signer", lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }); + } + var tx = (0, lib$3.shallowCopy)(overrides || {}); + ["from", "to"].forEach(function (key) { + if (tx[key] == null) { + return; + } + logger.throwError("cannot override " + key, lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + tx.to = this.resolvedAddress; + return this.deployed().then(function () { + return _this.signer.sendTransaction(tx); + }); + }; + // Reconnect to a different signer or provider + BaseContract.prototype.connect = function (signerOrProvider) { + if (typeof (signerOrProvider) === "string") { + signerOrProvider = new lib$c.VoidSigner(signerOrProvider, this.provider); + } + var contract = new (this.constructor)(this.address, this.interface, signerOrProvider); + if (this.deployTransaction) { + (0, lib$3.defineReadOnly)(contract, "deployTransaction", this.deployTransaction); + } + return contract; + }; + // Re-attach to a different on-chain instance of this contract + BaseContract.prototype.attach = function (addressOrName) { + return new (this.constructor)(addressOrName, this.interface, this.signer || this.provider); + }; + BaseContract.isIndexed = function (value) { + return lib$a.Indexed.isIndexed(value); + }; + BaseContract.prototype._normalizeRunningEvent = function (runningEvent) { + // Already have an instance of this event running; we can re-use it + if (this._runningEvents[runningEvent.tag]) { + return this._runningEvents[runningEvent.tag]; + } + return runningEvent; + }; + BaseContract.prototype._getRunningEvent = function (eventName) { + if (typeof (eventName) === "string") { + // Listen for "error" events (if your contract has an error event, include + // the full signature to bypass this special event keyword) + if (eventName === "error") { + return this._normalizeRunningEvent(new ErrorRunningEvent()); + } + // Listen for any event that is registered + if (eventName === "event") { + return this._normalizeRunningEvent(new RunningEvent("event", null)); + } + // Listen for any event + if (eventName === "*") { + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + } + // Get the event Fragment (throws if ambiguous/unknown event) + var fragment = this.interface.getEvent(eventName); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment)); + } + // We have topics to filter by... + if (eventName.topics && eventName.topics.length > 0) { + // Is it a known topichash? (throws if no matching topichash) + try { + var topic = eventName.topics[0]; + if (typeof (topic) !== "string") { + throw new Error("invalid topic"); // @TODO: May happen for anonymous events + } + var fragment = this.interface.getEvent(topic); + return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics)); + } + catch (error) { } + // Filter by the unknown topichash + var filter = { + address: this.address, + topics: eventName.topics + }; + return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter)); + } + return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface)); + }; + BaseContract.prototype._checkRunningEvents = function (runningEvent) { + if (runningEvent.listenerCount() === 0) { + delete this._runningEvents[runningEvent.tag]; + // If we have a poller for this, remove it + var emit = this._wrappedEmits[runningEvent.tag]; + if (emit && runningEvent.filter) { + this.provider.off(runningEvent.filter, emit); + delete this._wrappedEmits[runningEvent.tag]; + } + } + }; + // Subclasses can override this to gracefully recover + // from parse errors if they wish + BaseContract.prototype._wrapEvent = function (runningEvent, log, listener) { + var _this = this; + var event = (0, lib$3.deepCopy)(log); + event.removeListener = function () { + if (!listener) { + return; + } + runningEvent.removeListener(listener); + _this._checkRunningEvents(runningEvent); + }; + event.getBlock = function () { return _this.provider.getBlock(log.blockHash); }; + event.getTransaction = function () { return _this.provider.getTransaction(log.transactionHash); }; + event.getTransactionReceipt = function () { return _this.provider.getTransactionReceipt(log.transactionHash); }; + // This may throw if the topics and data mismatch the signature + runningEvent.prepareEvent(event); + return event; + }; + BaseContract.prototype._addEventListener = function (runningEvent, listener, once) { + var _this = this; + if (!this.provider) { + logger.throwError("events require a provider or a signer with a provider", lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }); + } + runningEvent.addListener(listener, once); + // Track this running event and its listeners (may already be there; but no hard in updating) + this._runningEvents[runningEvent.tag] = runningEvent; + // If we are not polling the provider, start polling + if (!this._wrappedEmits[runningEvent.tag]) { + var wrappedEmit = function (log) { + var event = _this._wrapEvent(runningEvent, log, listener); + // Try to emit the result for the parameterized event... + if (event.decodeError == null) { + try { + var args = runningEvent.getEmit(event); + _this.emit.apply(_this, __spreadArray([runningEvent.filter], args, false)); + } + catch (error) { + event.decodeError = error.error; + } + } + // Always emit "event" for fragment-base events + if (runningEvent.filter != null) { + _this.emit("event", event); + } + // Emit "error" if there was an error + if (event.decodeError != null) { + _this.emit("error", event.decodeError, event); + } + }; + this._wrappedEmits[runningEvent.tag] = wrappedEmit; + // Special events, like "error" do not have a filter + if (runningEvent.filter != null) { + this.provider.on(runningEvent.filter, wrappedEmit); + } + } + }; + BaseContract.prototype.queryFilter = function (event, fromBlockOrBlockhash, toBlock) { + var _this = this; + var runningEvent = this._getRunningEvent(event); + var filter = (0, lib$3.shallowCopy)(runningEvent.filter); + if (typeof (fromBlockOrBlockhash) === "string" && (0, lib$1.isHexString)(fromBlockOrBlockhash, 32)) { + if (toBlock != null) { + logger.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); + } + filter.blockHash = fromBlockOrBlockhash; + } + else { + filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0); + filter.toBlock = ((toBlock != null) ? toBlock : "latest"); + } + return this.provider.getLogs(filter).then(function (logs) { + return logs.map(function (log) { return _this._wrapEvent(runningEvent, log, null); }); + }); + }; + BaseContract.prototype.on = function (event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, false); + return this; + }; + BaseContract.prototype.once = function (event, listener) { + this._addEventListener(this._getRunningEvent(event), listener, true); + return this; + }; + BaseContract.prototype.emit = function (eventName) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + if (!this.provider) { + return false; + } + var runningEvent = this._getRunningEvent(eventName); + var result = (runningEvent.run(args) > 0); + // May have drained all the "once" events; check for living events + this._checkRunningEvents(runningEvent); + return result; + }; + BaseContract.prototype.listenerCount = function (eventName) { + var _this = this; + if (!this.provider) { + return 0; + } + if (eventName == null) { + return Object.keys(this._runningEvents).reduce(function (accum, key) { + return accum + _this._runningEvents[key].listenerCount(); + }, 0); + } + return this._getRunningEvent(eventName).listenerCount(); + }; + BaseContract.prototype.listeners = function (eventName) { + if (!this.provider) { + return []; + } + if (eventName == null) { + var result_1 = []; + for (var tag in this._runningEvents) { + this._runningEvents[tag].listeners().forEach(function (listener) { + result_1.push(listener); + }); + } + return result_1; + } + return this._getRunningEvent(eventName).listeners(); + }; + BaseContract.prototype.removeAllListeners = function (eventName) { + if (!this.provider) { + return this; + } + if (eventName == null) { + for (var tag in this._runningEvents) { + var runningEvent_1 = this._runningEvents[tag]; + runningEvent_1.removeAllListeners(); + this._checkRunningEvents(runningEvent_1); + } + return this; + } + // Delete any listeners + var runningEvent = this._getRunningEvent(eventName); + runningEvent.removeAllListeners(); + this._checkRunningEvents(runningEvent); + return this; + }; + BaseContract.prototype.off = function (eventName, listener) { + if (!this.provider) { + return this; + } + var runningEvent = this._getRunningEvent(eventName); + runningEvent.removeListener(listener); + this._checkRunningEvents(runningEvent); + return this; + }; + BaseContract.prototype.removeListener = function (eventName, listener) { + return this.off(eventName, listener); + }; + return BaseContract; + }()); + exports.BaseContract = BaseContract; + var Contract = /** @class */ (function (_super) { + __extends(Contract, _super); + function Contract() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Contract; + }(BaseContract)); + exports.Contract = Contract; + var ContractFactory = /** @class */ (function () { + function ContractFactory(contractInterface, bytecode, signer) { + var _newTarget = this.constructor; + var bytecodeHex = null; + if (typeof (bytecode) === "string") { + bytecodeHex = bytecode; + } + else if ((0, lib$1.isBytes)(bytecode)) { + bytecodeHex = (0, lib$1.hexlify)(bytecode); + } + else if (bytecode && typeof (bytecode.object) === "string") { + // Allow the bytecode object from the Solidity compiler + bytecodeHex = bytecode.object; + } + else { + // Crash in the next verification step + bytecodeHex = "!"; + } + // Make sure it is 0x prefixed + if (bytecodeHex.substring(0, 2) !== "0x") { + bytecodeHex = "0x" + bytecodeHex; + } + // Make sure the final result is valid bytecode + if (!(0, lib$1.isHexString)(bytecodeHex) || (bytecodeHex.length % 2)) { + logger.throwArgumentError("invalid bytecode", "bytecode", bytecode); + } + // If we have a signer, make sure it is valid + if (signer && !lib$c.Signer.isSigner(signer)) { + logger.throwArgumentError("invalid signer", "signer", signer); + } + (0, lib$3.defineReadOnly)(this, "bytecode", bytecodeHex); + (0, lib$3.defineReadOnly)(this, "interface", (0, lib$3.getStatic)(_newTarget, "getInterface")(contractInterface)); + (0, lib$3.defineReadOnly)(this, "signer", signer || null); + } + // @TODO: Future; rename to populateTransaction? + ContractFactory.prototype.getDeployTransaction = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var tx = {}; + // If we have 1 additional argument, we allow transaction overrides + if (args.length === this.interface.deploy.inputs.length + 1 && typeof (args[args.length - 1]) === "object") { + tx = (0, lib$3.shallowCopy)(args.pop()); + for (var key in tx) { + if (!allowedTransactionKeys[key]) { + throw new Error("unknown transaction override " + key); + } + } + } + // Do not allow these to be overridden in a deployment transaction + ["data", "from", "to"].forEach(function (key) { + if (tx[key] == null) { + return; + } + logger.throwError("cannot override " + key, lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: key }); + }); + if (tx.value) { + var value = lib$2.BigNumber.from(tx.value); + if (!value.isZero() && !this.interface.deploy.payable) { + logger.throwError("non-payable constructor cannot override value", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "overrides.value", + value: tx.value + }); + } + } + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + // Set the data to the bytecode + the encoded constructor arguments + tx.data = (0, lib$1.hexlify)((0, lib$1.concat)([ + this.bytecode, + this.interface.encodeDeploy(args) + ])); + return tx; + }; + ContractFactory.prototype.deploy = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(this, void 0, void 0, function () { + var overrides, params, unsignedTx, tx, address, contract; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + overrides = {}; + // If 1 extra parameter was passed in, it contains overrides + if (args.length === this.interface.deploy.inputs.length + 1) { + overrides = args.pop(); + } + // Make sure the call matches the constructor signature + logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + return [4 /*yield*/, resolveAddresses(this.signer, args, this.interface.deploy.inputs)]; + case 1: + params = _a.sent(); + params.push(overrides); + unsignedTx = this.getDeployTransaction.apply(this, params); + return [4 /*yield*/, this.signer.sendTransaction(unsignedTx)]; + case 2: + tx = _a.sent(); + address = (0, lib$3.getStatic)(this.constructor, "getContractAddress")(tx); + contract = (0, lib$3.getStatic)(this.constructor, "getContract")(address, this.interface, this.signer); + // Add the modified wait that wraps events + addContractWait(contract, tx); + (0, lib$3.defineReadOnly)(contract, "deployTransaction", tx); + return [2 /*return*/, contract]; + } + }); + }); + }; + ContractFactory.prototype.attach = function (address) { + return (this.constructor).getContract(address, this.interface, this.signer); + }; + ContractFactory.prototype.connect = function (signer) { + return new (this.constructor)(this.interface, this.bytecode, signer); + }; + ContractFactory.fromSolidity = function (compilerOutput, signer) { + if (compilerOutput == null) { + logger.throwError("missing compiler output", lib.Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); + } + if (typeof (compilerOutput) === "string") { + compilerOutput = JSON.parse(compilerOutput); + } + var abi = compilerOutput.abi; + var bytecode = null; + if (compilerOutput.bytecode) { + bytecode = compilerOutput.bytecode; + } + else if (compilerOutput.evm && compilerOutput.evm.bytecode) { + bytecode = compilerOutput.evm.bytecode; + } + return new this(abi, bytecode, signer); + }; + ContractFactory.getInterface = function (contractInterface) { + return Contract.getInterface(contractInterface); + }; + ContractFactory.getContractAddress = function (tx) { + return (0, lib$6.getContractAddress)(tx); + }; + ContractFactory.getContract = function (address, contractInterface, signer) { + return new Contract(address, contractInterface, signer); + }; + return ContractFactory; + }()); + exports.ContractFactory = ContractFactory; + + }); + + var index$f = /*@__PURE__*/getDefaultExportFromCjs(lib$f); + + var lib$g = createCommonjsModule(function (module, exports) { + "use strict"; + /** + * var basex = require("base-x"); + * + * This implementation is heavily based on base-x. The main reason to + * deviate was to prevent the dependency of Buffer. + * + * Contributors: + * + * base-x encoding + * Forked from https://github.com/cryptocoinjs/bs58 + * Originally written by Mike Hearn for BitcoinJ + * Copyright (c) 2011 Google Inc + * Ported to JavaScript by Stefan Thomas + * Merged Buffer refactorings from base58-native by Stephen Pair + * Copyright (c) 2013 BitPay Inc + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Base58 = exports.Base32 = exports.BaseX = void 0; + + + var BaseX = /** @class */ (function () { + function BaseX(alphabet) { + (0, lib$3.defineReadOnly)(this, "alphabet", alphabet); + (0, lib$3.defineReadOnly)(this, "base", alphabet.length); + (0, lib$3.defineReadOnly)(this, "_alphabetMap", {}); + (0, lib$3.defineReadOnly)(this, "_leader", alphabet.charAt(0)); + // pre-compute lookup table + for (var i = 0; i < alphabet.length; i++) { + this._alphabetMap[alphabet.charAt(i)] = i; + } + } + BaseX.prototype.encode = function (value) { + var source = (0, lib$1.arrayify)(value); + if (source.length === 0) { + return ""; + } + var digits = [0]; + for (var i = 0; i < source.length; ++i) { + var carry = source[i]; + for (var j = 0; j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % this.base; + carry = (carry / this.base) | 0; + } + while (carry > 0) { + digits.push(carry % this.base); + carry = (carry / this.base) | 0; + } + } + var string = ""; + // deal with leading zeros + for (var k = 0; source[k] === 0 && k < source.length - 1; ++k) { + string += this._leader; + } + // convert digits to a string + for (var q = digits.length - 1; q >= 0; --q) { + string += this.alphabet[digits[q]]; + } + return string; + }; + BaseX.prototype.decode = function (value) { + if (typeof (value) !== "string") { + throw new TypeError("Expected String"); + } + var bytes = []; + if (value.length === 0) { + return new Uint8Array(bytes); + } + bytes.push(0); + for (var i = 0; i < value.length; i++) { + var byte = this._alphabetMap[value[i]]; + if (byte === undefined) { + throw new Error("Non-base" + this.base + " character"); + } + var carry = byte; + for (var j = 0; j < bytes.length; ++j) { + carry += bytes[j] * this.base; + bytes[j] = carry & 0xff; + carry >>= 8; + } + while (carry > 0) { + bytes.push(carry & 0xff); + carry >>= 8; + } + } + // deal with leading zeros + for (var k = 0; value[k] === this._leader && k < value.length - 1; ++k) { + bytes.push(0); + } + return (0, lib$1.arrayify)(new Uint8Array(bytes.reverse())); + }; + return BaseX; + }()); + exports.BaseX = BaseX; + var Base32 = new BaseX("abcdefghijklmnopqrstuvwxyz234567"); + exports.Base32 = Base32; + var Base58 = new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); + exports.Base58 = Base58; + //console.log(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj")) + //console.log(Base58.encode(Base58.decode("Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj"))) + + }); + + var index$g = /*@__PURE__*/getDefaultExportFromCjs(lib$g); + + var types = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SupportedAlgorithm = void 0; + var SupportedAlgorithm; + (function (SupportedAlgorithm) { + SupportedAlgorithm["sha256"] = "sha256"; + SupportedAlgorithm["sha512"] = "sha512"; + })(SupportedAlgorithm = exports.SupportedAlgorithm || (exports.SupportedAlgorithm = {})); + ; + + }); + + var types$1 = /*@__PURE__*/getDefaultExportFromCjs(types); + + var _version$s = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "sha2/5.5.0"; + + }); + + var _version$t = /*@__PURE__*/getDefaultExportFromCjs(_version$s); + + var browserSha2 = createCommonjsModule(function (module, exports) { + "use strict"; + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.computeHmac = exports.sha512 = exports.sha256 = exports.ripemd160 = void 0; + var hash_js_1 = __importDefault(hash_1); + //const _ripemd160 = _hash.ripemd160; + + + + + var logger = new lib.Logger(_version$s.version); + function ripemd160(data) { + return "0x" + (hash_js_1.default.ripemd160().update((0, lib$1.arrayify)(data)).digest("hex")); + } + exports.ripemd160 = ripemd160; + function sha256(data) { + return "0x" + (hash_js_1.default.sha256().update((0, lib$1.arrayify)(data)).digest("hex")); + } + exports.sha256 = sha256; + function sha512(data) { + return "0x" + (hash_js_1.default.sha512().update((0, lib$1.arrayify)(data)).digest("hex")); + } + exports.sha512 = sha512; + function computeHmac(algorithm, key, data) { + if (!types.SupportedAlgorithm[algorithm]) { + logger.throwError("unsupported algorithm " + algorithm, lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "hmac", + algorithm: algorithm + }); + } + return "0x" + hash_js_1.default.hmac(hash_js_1.default[algorithm], (0, lib$1.arrayify)(key)).update((0, lib$1.arrayify)(data)).digest("hex"); + } + exports.computeHmac = computeHmac; + + }); + + var browserSha2$1 = /*@__PURE__*/getDefaultExportFromCjs(browserSha2); + + var lib$h = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SupportedAlgorithm = exports.sha512 = exports.sha256 = exports.ripemd160 = exports.computeHmac = void 0; + + Object.defineProperty(exports, "computeHmac", { enumerable: true, get: function () { return browserSha2.computeHmac; } }); + Object.defineProperty(exports, "ripemd160", { enumerable: true, get: function () { return browserSha2.ripemd160; } }); + Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return browserSha2.sha256; } }); + Object.defineProperty(exports, "sha512", { enumerable: true, get: function () { return browserSha2.sha512; } }); + + Object.defineProperty(exports, "SupportedAlgorithm", { enumerable: true, get: function () { return types.SupportedAlgorithm; } }); + + }); + + var index$h = /*@__PURE__*/getDefaultExportFromCjs(lib$h); + + var browserPbkdf2 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.pbkdf2 = void 0; + + + function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) { + password = (0, lib$1.arrayify)(password); + salt = (0, lib$1.arrayify)(salt); + var hLen; + var l = 1; + var DK = new Uint8Array(keylen); + var block1 = new Uint8Array(salt.length + 4); + block1.set(salt); + //salt.copy(block1, 0, 0, salt.length) + var r; + var T; + for (var i = 1; i <= l; i++) { + //block1.writeUInt32BE(i, salt.length) + block1[salt.length] = (i >> 24) & 0xff; + block1[salt.length + 1] = (i >> 16) & 0xff; + block1[salt.length + 2] = (i >> 8) & 0xff; + block1[salt.length + 3] = i & 0xff; + //let U = createHmac(password).update(block1).digest(); + var U = (0, lib$1.arrayify)((0, lib$h.computeHmac)(hashAlgorithm, password, block1)); + if (!hLen) { + hLen = U.length; + T = new Uint8Array(hLen); + l = Math.ceil(keylen / hLen); + r = keylen - (l - 1) * hLen; + } + //U.copy(T, 0, 0, hLen) + T.set(U); + for (var j = 1; j < iterations; j++) { + //U = createHmac(password).update(U).digest(); + U = (0, lib$1.arrayify)((0, lib$h.computeHmac)(hashAlgorithm, password, U)); + for (var k = 0; k < hLen; k++) + T[k] ^= U[k]; + } + var destPos = (i - 1) * hLen; + var len = (i === l ? r : hLen); + //T.copy(DK, destPos, 0, len) + DK.set((0, lib$1.arrayify)(T).slice(0, len), destPos); + } + return (0, lib$1.hexlify)(DK); + } + exports.pbkdf2 = pbkdf2; + + }); + + var browserPbkdf2$1 = /*@__PURE__*/getDefaultExportFromCjs(browserPbkdf2); + + var lib$i = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.pbkdf2 = void 0; + + Object.defineProperty(exports, "pbkdf2", { enumerable: true, get: function () { return browserPbkdf2.pbkdf2; } }); + + }); + + var index$i = /*@__PURE__*/getDefaultExportFromCjs(lib$i); + + var _version$u = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "wordlists/5.5.0"; + + }); + + var _version$v = /*@__PURE__*/getDefaultExportFromCjs(_version$u); + + var wordlist = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Wordlist = exports.logger = void 0; + // This gets overridden by rollup + var exportWordlist = false; + + + + + exports.logger = new lib.Logger(_version$u.version); + var Wordlist = /** @class */ (function () { + function Wordlist(locale) { + var _newTarget = this.constructor; + exports.logger.checkAbstract(_newTarget, Wordlist); + (0, lib$3.defineReadOnly)(this, "locale", locale); + } + // Subclasses may override this + Wordlist.prototype.split = function (mnemonic) { + return mnemonic.toLowerCase().split(/ +/g); + }; + // Subclasses may override this + Wordlist.prototype.join = function (words) { + return words.join(" "); + }; + Wordlist.check = function (wordlist) { + var words = []; + for (var i = 0; i < 2048; i++) { + var word = wordlist.getWord(i); + /* istanbul ignore if */ + if (i !== wordlist.getWordIndex(word)) { + return "0x"; + } + words.push(word); + } + return (0, lib$9.id)(words.join("\n") + "\n"); + }; + Wordlist.register = function (lang, name) { + if (!name) { + name = lang.locale; + } + /* istanbul ignore if */ + if (exportWordlist) { + try { + var anyGlobal = window; + if (anyGlobal._ethers && anyGlobal._ethers.wordlists) { + if (!anyGlobal._ethers.wordlists[name]) { + (0, lib$3.defineReadOnly)(anyGlobal._ethers.wordlists, name, lang); + } + } + } + catch (error) { } + } + }; + return Wordlist; + }()); + exports.Wordlist = Wordlist; + + }); + + var wordlist$1 = /*@__PURE__*/getDefaultExportFromCjs(wordlist); + + var langEn_1 = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.langEn = void 0; + + var words = "AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo"; + var wordlist$1 = null; + function loadWords(lang) { + if (wordlist$1 != null) { + return; + } + wordlist$1 = words.replace(/([A-Z])/g, " $1").toLowerCase().substring(1).split(" "); + // Verify the computed list matches the official list + /* istanbul ignore if */ + if (wordlist.Wordlist.check(lang) !== "0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60") { + wordlist$1 = null; + throw new Error("BIP39 Wordlist for en (English) FAILED"); + } + } + var LangEn = /** @class */ (function (_super) { + __extends(LangEn, _super); + function LangEn() { + return _super.call(this, "en") || this; + } + LangEn.prototype.getWord = function (index) { + loadWords(this); + return wordlist$1[index]; + }; + LangEn.prototype.getWordIndex = function (word) { + loadWords(this); + return wordlist$1.indexOf(word); + }; + return LangEn; + }(wordlist.Wordlist)); + var langEn = new LangEn(); + exports.langEn = langEn; + wordlist.Wordlist.register(langEn); + + }); + + var langEn = /*@__PURE__*/getDefaultExportFromCjs(langEn_1); + + var browserWordlists = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.wordlists = void 0; + + exports.wordlists = { + en: langEn_1.langEn + }; + + }); + + var browserWordlists$1 = /*@__PURE__*/getDefaultExportFromCjs(browserWordlists); + + var lib$j = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.wordlists = exports.Wordlist = exports.logger = void 0; + // Wordlists + // See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md + + Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return wordlist.logger; } }); + Object.defineProperty(exports, "Wordlist", { enumerable: true, get: function () { return wordlist.Wordlist; } }); + + Object.defineProperty(exports, "wordlists", { enumerable: true, get: function () { return browserWordlists.wordlists; } }); + + }); + + var index$j = /*@__PURE__*/getDefaultExportFromCjs(lib$j); + + var _version$w = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "hdnode/5.5.0"; + + }); + + var _version$x = /*@__PURE__*/getDefaultExportFromCjs(_version$w); + + var lib$k = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getAccountPath = exports.isValidMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.mnemonicToSeed = exports.HDNode = exports.defaultPath = void 0; + + + + + + + + + + + + + var logger = new lib.Logger(_version$w.version); + var N = lib$2.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); + // "Bitcoin seed" + var MasterSecret = (0, lib$8.toUtf8Bytes)("Bitcoin seed"); + var HardenedBit = 0x80000000; + // Returns a byte with the MSB bits set + function getUpperMask(bits) { + return ((1 << bits) - 1) << (8 - bits); + } + // Returns a byte with the LSB bits set + function getLowerMask(bits) { + return (1 << bits) - 1; + } + function bytes32(value) { + return (0, lib$1.hexZeroPad)((0, lib$1.hexlify)(value), 32); + } + function base58check(data) { + return lib$g.Base58.encode((0, lib$1.concat)([data, (0, lib$1.hexDataSlice)((0, lib$h.sha256)((0, lib$h.sha256)(data)), 0, 4)])); + } + function getWordlist(wordlist) { + if (wordlist == null) { + return lib$j.wordlists["en"]; + } + if (typeof (wordlist) === "string") { + var words = lib$j.wordlists[wordlist]; + if (words == null) { + logger.throwArgumentError("unknown locale", "wordlist", wordlist); + } + return words; + } + return wordlist; + } + var _constructorGuard = {}; + exports.defaultPath = "m/44'/60'/0'/0/0"; + ; + var HDNode = /** @class */ (function () { + /** + * This constructor should not be called directly. + * + * Please use: + * - fromMnemonic + * - fromSeed + */ + function HDNode(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonicOrPath) { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, HDNode); + /* istanbul ignore if */ + if (constructorGuard !== _constructorGuard) { + throw new Error("HDNode constructor cannot be called directly"); + } + if (privateKey) { + var signingKey = new lib$d.SigningKey(privateKey); + (0, lib$3.defineReadOnly)(this, "privateKey", signingKey.privateKey); + (0, lib$3.defineReadOnly)(this, "publicKey", signingKey.compressedPublicKey); + } + else { + (0, lib$3.defineReadOnly)(this, "privateKey", null); + (0, lib$3.defineReadOnly)(this, "publicKey", (0, lib$1.hexlify)(publicKey)); + } + (0, lib$3.defineReadOnly)(this, "parentFingerprint", parentFingerprint); + (0, lib$3.defineReadOnly)(this, "fingerprint", (0, lib$1.hexDataSlice)((0, lib$h.ripemd160)((0, lib$h.sha256)(this.publicKey)), 0, 4)); + (0, lib$3.defineReadOnly)(this, "address", (0, lib$e.computeAddress)(this.publicKey)); + (0, lib$3.defineReadOnly)(this, "chainCode", chainCode); + (0, lib$3.defineReadOnly)(this, "index", index); + (0, lib$3.defineReadOnly)(this, "depth", depth); + if (mnemonicOrPath == null) { + // From a source that does not preserve the path (e.g. extended keys) + (0, lib$3.defineReadOnly)(this, "mnemonic", null); + (0, lib$3.defineReadOnly)(this, "path", null); + } + else if (typeof (mnemonicOrPath) === "string") { + // From a source that does not preserve the mnemonic (e.g. neutered) + (0, lib$3.defineReadOnly)(this, "mnemonic", null); + (0, lib$3.defineReadOnly)(this, "path", mnemonicOrPath); + } + else { + // From a fully qualified source + (0, lib$3.defineReadOnly)(this, "mnemonic", mnemonicOrPath); + (0, lib$3.defineReadOnly)(this, "path", mnemonicOrPath.path); + } + } + Object.defineProperty(HDNode.prototype, "extendedKey", { + get: function () { + // We only support the mainnet values for now, but if anyone needs + // testnet values, let me know. I believe current sentiment is that + // we should always use mainnet, and use BIP-44 to derive the network + // - Mainnet: public=0x0488B21E, private=0x0488ADE4 + // - Testnet: public=0x043587CF, private=0x04358394 + if (this.depth >= 256) { + throw new Error("Depth too large!"); + } + return base58check((0, lib$1.concat)([ + ((this.privateKey != null) ? "0x0488ADE4" : "0x0488B21E"), + (0, lib$1.hexlify)(this.depth), + this.parentFingerprint, + (0, lib$1.hexZeroPad)((0, lib$1.hexlify)(this.index), 4), + this.chainCode, + ((this.privateKey != null) ? (0, lib$1.concat)(["0x00", this.privateKey]) : this.publicKey), + ])); + }, + enumerable: false, + configurable: true + }); + HDNode.prototype.neuter = function () { + return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path); + }; + HDNode.prototype._derive = function (index) { + if (index > 0xffffffff) { + throw new Error("invalid index - " + String(index)); + } + // Base path + var path = this.path; + if (path) { + path += "/" + (index & ~HardenedBit); + } + var data = new Uint8Array(37); + if (index & HardenedBit) { + if (!this.privateKey) { + throw new Error("cannot derive child of neutered node"); + } + // Data = 0x00 || ser_256(k_par) + data.set((0, lib$1.arrayify)(this.privateKey), 1); + // Hardened path + if (path) { + path += "'"; + } + } + else { + // Data = ser_p(point(k_par)) + data.set((0, lib$1.arrayify)(this.publicKey)); + } + // Data += ser_32(i) + for (var i = 24; i >= 0; i -= 8) { + data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); + } + var I = (0, lib$1.arrayify)((0, lib$h.computeHmac)(lib$h.SupportedAlgorithm.sha512, this.chainCode, data)); + var IL = I.slice(0, 32); + var IR = I.slice(32); + // The private key + var ki = null; + // The public key + var Ki = null; + if (this.privateKey) { + ki = bytes32(lib$2.BigNumber.from(IL).add(this.privateKey).mod(N)); + } + else { + var ek = new lib$d.SigningKey((0, lib$1.hexlify)(IL)); + Ki = ek._addPoint(this.publicKey); + } + var mnemonicOrPath = path; + var srcMnemonic = this.mnemonic; + if (srcMnemonic) { + mnemonicOrPath = Object.freeze({ + phrase: srcMnemonic.phrase, + path: path, + locale: (srcMnemonic.locale || "en") + }); + } + return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath); + }; + HDNode.prototype.derivePath = function (path) { + var components = path.split("/"); + if (components.length === 0 || (components[0] === "m" && this.depth !== 0)) { + throw new Error("invalid path - " + path); + } + if (components[0] === "m") { + components.shift(); + } + var result = this; + for (var i = 0; i < components.length; i++) { + var component = components[i]; + if (component.match(/^[0-9]+'$/)) { + var index = parseInt(component.substring(0, component.length - 1)); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(HardenedBit + index); + } + else if (component.match(/^[0-9]+$/)) { + var index = parseInt(component); + if (index >= HardenedBit) { + throw new Error("invalid path index - " + component); + } + result = result._derive(index); + } + else { + throw new Error("invalid path component - " + component); + } + } + return result; + }; + HDNode._fromSeed = function (seed, mnemonic) { + var seedArray = (0, lib$1.arrayify)(seed); + if (seedArray.length < 16 || seedArray.length > 64) { + throw new Error("invalid seed"); + } + var I = (0, lib$1.arrayify)((0, lib$h.computeHmac)(lib$h.SupportedAlgorithm.sha512, MasterSecret, seedArray)); + return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); + }; + HDNode.fromMnemonic = function (mnemonic, password, wordlist) { + // If a locale name was passed in, find the associated wordlist + wordlist = getWordlist(wordlist); + // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid) + mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist); + return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), { + phrase: mnemonic, + path: "m", + locale: wordlist.locale + }); + }; + HDNode.fromSeed = function (seed) { + return HDNode._fromSeed(seed, null); + }; + HDNode.fromExtendedKey = function (extendedKey) { + var bytes = lib$g.Base58.decode(extendedKey); + if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) { + logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + } + var depth = bytes[4]; + var parentFingerprint = (0, lib$1.hexlify)(bytes.slice(5, 9)); + var index = parseInt((0, lib$1.hexlify)(bytes.slice(9, 13)).substring(2), 16); + var chainCode = (0, lib$1.hexlify)(bytes.slice(13, 45)); + var key = bytes.slice(45, 78); + switch ((0, lib$1.hexlify)(bytes.slice(0, 4))) { + // Public Key + case "0x0488b21e": + case "0x043587cf": + return new HDNode(_constructorGuard, null, (0, lib$1.hexlify)(key), parentFingerprint, chainCode, index, depth, null); + // Private Key + case "0x0488ade4": + case "0x04358394 ": + if (key[0] !== 0) { + break; + } + return new HDNode(_constructorGuard, (0, lib$1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null); + } + return logger.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + }; + return HDNode; + }()); + exports.HDNode = HDNode; + function mnemonicToSeed(mnemonic, password) { + if (!password) { + password = ""; + } + var salt = (0, lib$8.toUtf8Bytes)("mnemonic" + password, lib$8.UnicodeNormalizationForm.NFKD); + return (0, lib$i.pbkdf2)((0, lib$8.toUtf8Bytes)(mnemonic, lib$8.UnicodeNormalizationForm.NFKD), salt, 2048, 64, "sha512"); + } + exports.mnemonicToSeed = mnemonicToSeed; + function mnemonicToEntropy(mnemonic, wordlist) { + wordlist = getWordlist(wordlist); + logger.checkNormalize(); + var words = wordlist.split(mnemonic); + if ((words.length % 3) !== 0) { + throw new Error("invalid mnemonic"); + } + var entropy = (0, lib$1.arrayify)(new Uint8Array(Math.ceil(11 * words.length / 8))); + var offset = 0; + for (var i = 0; i < words.length; i++) { + var index = wordlist.getWordIndex(words[i].normalize("NFKD")); + if (index === -1) { + throw new Error("invalid mnemonic"); + } + for (var bit = 0; bit < 11; bit++) { + if (index & (1 << (10 - bit))) { + entropy[offset >> 3] |= (1 << (7 - (offset % 8))); + } + offset++; + } + } + var entropyBits = 32 * words.length / 3; + var checksumBits = words.length / 3; + var checksumMask = getUpperMask(checksumBits); + var checksum = (0, lib$1.arrayify)((0, lib$h.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; + if (checksum !== (entropy[entropy.length - 1] & checksumMask)) { + throw new Error("invalid checksum"); + } + return (0, lib$1.hexlify)(entropy.slice(0, entropyBits / 8)); + } + exports.mnemonicToEntropy = mnemonicToEntropy; + function entropyToMnemonic(entropy, wordlist) { + wordlist = getWordlist(wordlist); + entropy = (0, lib$1.arrayify)(entropy); + if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) { + throw new Error("invalid entropy"); + } + var indices = [0]; + var remainingBits = 11; + for (var i = 0; i < entropy.length; i++) { + // Consume the whole byte (with still more to go) + if (remainingBits > 8) { + indices[indices.length - 1] <<= 8; + indices[indices.length - 1] |= entropy[i]; + remainingBits -= 8; + // This byte will complete an 11-bit index + } + else { + indices[indices.length - 1] <<= remainingBits; + indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits); + // Start the next word + indices.push(entropy[i] & getLowerMask(8 - remainingBits)); + remainingBits += 3; + } + } + // Compute the checksum bits + var checksumBits = entropy.length / 4; + var checksum = (0, lib$1.arrayify)((0, lib$h.sha256)(entropy))[0] & getUpperMask(checksumBits); + // Shift the checksum into the word indices + indices[indices.length - 1] <<= checksumBits; + indices[indices.length - 1] |= (checksum >> (8 - checksumBits)); + return wordlist.join(indices.map(function (index) { return wordlist.getWord(index); })); + } + exports.entropyToMnemonic = entropyToMnemonic; + function isValidMnemonic(mnemonic, wordlist) { + try { + mnemonicToEntropy(mnemonic, wordlist); + return true; + } + catch (error) { } + return false; + } + exports.isValidMnemonic = isValidMnemonic; + function getAccountPath(index) { + if (typeof (index) !== "number" || index < 0 || index >= HardenedBit || index % 1) { + logger.throwArgumentError("invalid account index", "index", index); + } + return "m/44'/60'/" + index + "'/0/0"; + } + exports.getAccountPath = getAccountPath; + + }); + + var index$k = /*@__PURE__*/getDefaultExportFromCjs(lib$k); + + var _version$y = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "random/5.5.0"; + + }); + + var _version$z = /*@__PURE__*/getDefaultExportFromCjs(_version$y); + + var browserRandom = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.randomBytes = void 0; + + + + var logger = new lib.Logger(_version$y.version); + // Debugging line for testing browser lib in node + //const window = { crypto: { getRandomValues: () => { } } }; + var anyGlobal = null; + try { + anyGlobal = window; + if (anyGlobal == null) { + throw new Error("try next"); + } + } + catch (error) { + try { + anyGlobal = commonjsGlobal; + if (anyGlobal == null) { + throw new Error("try next"); + } + } + catch (error) { + anyGlobal = {}; + } + } + var crypto = anyGlobal.crypto || anyGlobal.msCrypto; + if (!crypto || !crypto.getRandomValues) { + logger.warn("WARNING: Missing strong random number source"); + crypto = { + getRandomValues: function (buffer) { + return logger.throwError("no secure random source avaialble", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "crypto.getRandomValues" + }); + } + }; + } + function randomBytes(length) { + if (length <= 0 || length > 1024 || (length % 1) || length != length) { + logger.throwArgumentError("invalid length", "length", length); + } + var result = new Uint8Array(length); + crypto.getRandomValues(result); + return (0, lib$1.arrayify)(result); + } + exports.randomBytes = randomBytes; + ; + + }); + + var browserRandom$1 = /*@__PURE__*/getDefaultExportFromCjs(browserRandom); + + var shuffle = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shuffled = void 0; + function shuffled(array) { + array = array.slice(); + for (var i = array.length - 1; i > 0; i--) { + var j = Math.floor(Math.random() * (i + 1)); + var tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + return array; + } + exports.shuffled = shuffled; + + }); + + var shuffle$1 = /*@__PURE__*/getDefaultExportFromCjs(shuffle); + + var lib$l = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shuffled = exports.randomBytes = void 0; + + Object.defineProperty(exports, "randomBytes", { enumerable: true, get: function () { return browserRandom.randomBytes; } }); + + Object.defineProperty(exports, "shuffled", { enumerable: true, get: function () { return shuffle.shuffled; } }); + + }); + + var index$l = /*@__PURE__*/getDefaultExportFromCjs(lib$l); + + var aesJs = createCommonjsModule(function (module, exports) { + "use strict"; + + (function(root) { + + function checkInt(value) { + return (parseInt(value) === value); + } + + function checkInts(arrayish) { + if (!checkInt(arrayish.length)) { return false; } + + for (var i = 0; i < arrayish.length; i++) { + if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) { + return false; + } + } + + return true; + } + + function coerceArray(arg, copy) { + + // ArrayBuffer view + if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') { + + if (copy) { + if (arg.slice) { + arg = arg.slice(); + } else { + arg = Array.prototype.slice.call(arg); + } + } + + return arg; + } + + // It's an array; check it is a valid representation of a byte + if (Array.isArray(arg)) { + if (!checkInts(arg)) { + throw new Error('Array contains invalid value: ' + arg); + } + + return new Uint8Array(arg); + } + + // Something else, but behaves like an array (maybe a Buffer? Arguments?) + if (checkInt(arg.length) && checkInts(arg)) { + return new Uint8Array(arg); + } + + throw new Error('unsupported array-like object'); + } + + function createArray(length) { + return new Uint8Array(length); + } + + function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) { + if (sourceStart != null || sourceEnd != null) { + if (sourceArray.slice) { + sourceArray = sourceArray.slice(sourceStart, sourceEnd); + } else { + sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd); + } + } + targetArray.set(sourceArray, targetStart); + } + + + + var convertUtf8 = (function() { + function toBytes(text) { + var result = [], i = 0; + text = encodeURI(text); + while (i < text.length) { + var c = text.charCodeAt(i++); + + // if it is a % sign, encode the following 2 bytes as a hex value + if (c === 37) { + result.push(parseInt(text.substr(i, 2), 16)); + i += 2; + + // otherwise, just the actual byte + } else { + result.push(c); + } + } + + return coerceArray(result); + } + + function fromBytes(bytes) { + var result = [], i = 0; + + while (i < bytes.length) { + var c = bytes[i]; + + if (c < 128) { + result.push(String.fromCharCode(c)); + i++; + } else if (c > 191 && c < 224) { + result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f))); + i += 2; + } else { + result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f))); + i += 3; + } + } + + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + var convertHex = (function() { + function toBytes(text) { + var result = []; + for (var i = 0; i < text.length; i += 2) { + result.push(parseInt(text.substr(i, 2), 16)); + } + + return result; + } + + // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html + var Hex = '0123456789abcdef'; + + function fromBytes(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i++) { + var v = bytes[i]; + result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]); + } + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + + // Number of rounds by keysize + var numberOfRounds = {16: 10, 24: 12, 32: 14}; + + // Round constant words + var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91]; + + // S-box and Inverse S-box (S is for Substitution) + var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f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d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]; + + // Transformations for encryption + var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a]; + var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616]; + var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16]; + var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c]; + + // Transformations for decryption + var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742]; + var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857]; + var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8]; + var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0]; + + // Transformations for decryption key expansion + var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]; + var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697]; + var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46]; + var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d]; + + function convertToInt32(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i += 4) { + result.push( + (bytes[i ] << 24) | + (bytes[i + 1] << 16) | + (bytes[i + 2] << 8) | + bytes[i + 3] + ); + } + return result; + } + + var AES = function(key) { + if (!(this instanceof AES)) { + throw Error('AES must be instanitated with `new`'); + } + + Object.defineProperty(this, 'key', { + value: coerceArray(key, true) + }); + + this._prepare(); + }; + + + AES.prototype._prepare = function() { + + var rounds = numberOfRounds[this.key.length]; + if (rounds == null) { + throw new Error('invalid key size (must be 16, 24 or 32 bytes)'); + } + + // encryption round keys + this._Ke = []; + + // decryption round keys + this._Kd = []; + + for (var i = 0; i <= rounds; i++) { + this._Ke.push([0, 0, 0, 0]); + this._Kd.push([0, 0, 0, 0]); + } + + var roundKeyCount = (rounds + 1) * 4; + var KC = this.key.length / 4; + + // convert the key into ints + var tk = convertToInt32(this.key); + + // copy values into round key arrays + var index; + for (var i = 0; i < KC; i++) { + index = i >> 2; + this._Ke[index][i % 4] = tk[i]; + this._Kd[rounds - index][i % 4] = tk[i]; + } + + // key expansion (fips-197 section 5.2) + var rconpointer = 0; + var t = KC, tt; + while (t < roundKeyCount) { + tt = tk[KC - 1]; + tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^ + (S[(tt >> 8) & 0xFF] << 16) ^ + (S[ tt & 0xFF] << 8) ^ + S[(tt >> 24) & 0xFF] ^ + (rcon[rconpointer] << 24)); + rconpointer += 1; + + // key expansion (for non-256 bit) + if (KC != 8) { + for (var i = 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + + // key expansion for 256-bit keys is "slightly different" (fips-197) + } else { + for (var i = 1; i < (KC / 2); i++) { + tk[i] ^= tk[i - 1]; + } + tt = tk[(KC / 2) - 1]; + + tk[KC / 2] ^= (S[ tt & 0xFF] ^ + (S[(tt >> 8) & 0xFF] << 8) ^ + (S[(tt >> 16) & 0xFF] << 16) ^ + (S[(tt >> 24) & 0xFF] << 24)); + + for (var i = (KC / 2) + 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + } + + // copy values into round key arrays + var i = 0, r, c; + while (i < KC && t < roundKeyCount) { + r = t >> 2; + c = t % 4; + this._Ke[r][c] = tk[i]; + this._Kd[rounds - r][c] = tk[i++]; + t++; + } + } + + // inverse-cipher-ify the decryption round key (fips-197 section 5.3) + for (var r = 1; r < rounds; r++) { + for (var c = 0; c < 4; c++) { + tt = this._Kd[r][c]; + this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^ + U2[(tt >> 16) & 0xFF] ^ + U3[(tt >> 8) & 0xFF] ^ + U4[ tt & 0xFF]); + } + } + }; + + AES.prototype.encrypt = function(plaintext) { + if (plaintext.length != 16) { + throw new Error('invalid plaintext size (must be 16 bytes)'); + } + + var rounds = this._Ke.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(plaintext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Ke[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T1[(t[ i ] >> 24) & 0xff] ^ + T2[(t[(i + 1) % 4] >> 16) & 0xff] ^ + T3[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T4[ t[(i + 3) % 4] & 0xff] ^ + this._Ke[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Ke[rounds][i]; + result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + }; + + AES.prototype.decrypt = function(ciphertext) { + if (ciphertext.length != 16) { + throw new Error('invalid ciphertext size (must be 16 bytes)'); + } + + var rounds = this._Kd.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(ciphertext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Kd[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T5[(t[ i ] >> 24) & 0xff] ^ + T6[(t[(i + 3) % 4] >> 16) & 0xff] ^ + T7[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T8[ t[(i + 1) % 4] & 0xff] ^ + this._Kd[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Kd[rounds][i]; + result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + }; + + + /** + * Mode Of Operation - Electonic Codebook (ECB) + */ + var ModeOfOperationECB = function(key) { + if (!(this instanceof ModeOfOperationECB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Electronic Code Block"; + this.name = "ecb"; + + this._aes = new AES(key); + }; + + ModeOfOperationECB.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + block = this._aes.encrypt(block); + copyArray(block, ciphertext, i); + } + + return ciphertext; + }; + + ModeOfOperationECB.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + copyArray(block, plaintext, i); + } + + return plaintext; + }; + + + /** + * Mode Of Operation - Cipher Block Chaining (CBC) + */ + var ModeOfOperationCBC = function(key, iv) { + if (!(this instanceof ModeOfOperationCBC)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Block Chaining"; + this.name = "cbc"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastCipherblock = coerceArray(iv, true); + + this._aes = new AES(key); + }; + + ModeOfOperationCBC.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + + for (var j = 0; j < 16; j++) { + block[j] ^= this._lastCipherblock[j]; + } + + this._lastCipherblock = this._aes.encrypt(block); + copyArray(this._lastCipherblock, ciphertext, i); + } + + return ciphertext; + }; + + ModeOfOperationCBC.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + + for (var j = 0; j < 16; j++) { + plaintext[i + j] = block[j] ^ this._lastCipherblock[j]; + } + + copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16); + } + + return plaintext; + }; + + + /** + * Mode Of Operation - Cipher Feedback (CFB) + */ + var ModeOfOperationCFB = function(key, iv, segmentSize) { + if (!(this instanceof ModeOfOperationCFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Feedback"; + this.name = "cfb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 size)'); + } + + if (!segmentSize) { segmentSize = 1; } + + this.segmentSize = segmentSize; + + this._shiftRegister = coerceArray(iv, true); + + this._aes = new AES(key); + }; + + ModeOfOperationCFB.prototype.encrypt = function(plaintext) { + if ((plaintext.length % this.segmentSize) != 0) { + throw new Error('invalid plaintext size (must be segmentSize bytes)'); + } + + var encrypted = coerceArray(plaintext, true); + + var xorSegment; + for (var i = 0; i < encrypted.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + for (var j = 0; j < this.segmentSize; j++) { + encrypted[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return encrypted; + }; + + ModeOfOperationCFB.prototype.decrypt = function(ciphertext) { + if ((ciphertext.length % this.segmentSize) != 0) { + throw new Error('invalid ciphertext size (must be segmentSize bytes)'); + } + + var plaintext = coerceArray(ciphertext, true); + + var xorSegment; + for (var i = 0; i < plaintext.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + + for (var j = 0; j < this.segmentSize; j++) { + plaintext[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return plaintext; + }; + + /** + * Mode Of Operation - Output Feedback (OFB) + */ + var ModeOfOperationOFB = function(key, iv) { + if (!(this instanceof ModeOfOperationOFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Output Feedback"; + this.name = "ofb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastPrecipher = coerceArray(iv, true); + this._lastPrecipherIndex = 16; + + this._aes = new AES(key); + }; + + ModeOfOperationOFB.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._lastPrecipherIndex === 16) { + this._lastPrecipher = this._aes.encrypt(this._lastPrecipher); + this._lastPrecipherIndex = 0; + } + encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++]; + } + + return encrypted; + }; + + // Decryption is symetric + ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt; + + + /** + * Counter object for CTR common mode of operation + */ + var Counter = function(initialValue) { + if (!(this instanceof Counter)) { + throw Error('Counter must be instanitated with `new`'); + } + + // We allow 0, but anything false-ish uses the default 1 + if (initialValue !== 0 && !initialValue) { initialValue = 1; } + + if (typeof(initialValue) === 'number') { + this._counter = createArray(16); + this.setValue(initialValue); + + } else { + this.setBytes(initialValue); + } + }; + + Counter.prototype.setValue = function(value) { + if (typeof(value) !== 'number' || parseInt(value) != value) { + throw new Error('invalid counter value (must be an integer)'); + } + + for (var index = 15; index >= 0; --index) { + this._counter[index] = value % 256; + value = value >> 8; + } + }; + + Counter.prototype.setBytes = function(bytes) { + bytes = coerceArray(bytes, true); + + if (bytes.length != 16) { + throw new Error('invalid counter bytes size (must be 16 bytes)'); + } + + this._counter = bytes; + }; + + Counter.prototype.increment = function() { + for (var i = 15; i >= 0; i--) { + if (this._counter[i] === 255) { + this._counter[i] = 0; + } else { + this._counter[i]++; + break; + } + } + }; + + + /** + * Mode Of Operation - Counter (CTR) + */ + var ModeOfOperationCTR = function(key, counter) { + if (!(this instanceof ModeOfOperationCTR)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Counter"; + this.name = "ctr"; + + if (!(counter instanceof Counter)) { + counter = new Counter(counter); + } + + this._counter = counter; + + this._remainingCounter = null; + this._remainingCounterIndex = 16; + + this._aes = new AES(key); + }; + + ModeOfOperationCTR.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._remainingCounterIndex === 16) { + this._remainingCounter = this._aes.encrypt(this._counter._counter); + this._remainingCounterIndex = 0; + this._counter.increment(); + } + encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++]; + } + + return encrypted; + }; + + // Decryption is symetric + ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt; + + + /////////////////////// + // Padding + + // See:https://tools.ietf.org/html/rfc2315 + function pkcs7pad(data) { + data = coerceArray(data, true); + var padder = 16 - (data.length % 16); + var result = createArray(data.length + padder); + copyArray(data, result); + for (var i = data.length; i < result.length; i++) { + result[i] = padder; + } + return result; + } + + function pkcs7strip(data) { + data = coerceArray(data, true); + if (data.length < 16) { throw new Error('PKCS#7 invalid length'); } + + var padder = data[data.length - 1]; + if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); } + + var length = data.length - padder; + for (var i = 0; i < padder; i++) { + if (data[length + i] !== padder) { + throw new Error('PKCS#7 invalid padding byte'); + } + } + + var result = createArray(length); + copyArray(data, result, 0, 0, length); + return result; + } + + /////////////////////// + // Exporting + + + // The block cipher + var aesjs = { + AES: AES, + Counter: Counter, + + ModeOfOperation: { + ecb: ModeOfOperationECB, + cbc: ModeOfOperationCBC, + cfb: ModeOfOperationCFB, + ofb: ModeOfOperationOFB, + ctr: ModeOfOperationCTR + }, + + utils: { + hex: convertHex, + utf8: convertUtf8 + }, + + padding: { + pkcs7: { + pad: pkcs7pad, + strip: pkcs7strip + } + }, + + _arrayTest: { + coerceArray: coerceArray, + createArray: createArray, + copyArray: copyArray, + } + }; + + + // node.js + if ('object' !== 'undefined') { + module.exports = aesjs; + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(undefined) === 'function' && undefined.amd) { + undefined(aesjs); + + // Web Browsers + } else { + + // If there was an existing library at "aesjs" make sure it's still available + if (root.aesjs) { + aesjs._aesjs = root.aesjs; + } + + root.aesjs = aesjs; + } + + + })(commonjsGlobal); + }); + + var _version$A = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "json-wallets/5.5.0"; + + }); + + var _version$B = /*@__PURE__*/getDefaultExportFromCjs(_version$A); + + var utils$1 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.uuidV4 = exports.searchPath = exports.getPassword = exports.zpad = exports.looseArrayify = void 0; + + + function looseArrayify(hexString) { + if (typeof (hexString) === 'string' && hexString.substring(0, 2) !== '0x') { + hexString = '0x' + hexString; + } + return (0, lib$1.arrayify)(hexString); + } + exports.looseArrayify = looseArrayify; + function zpad(value, length) { + value = String(value); + while (value.length < length) { + value = '0' + value; + } + return value; + } + exports.zpad = zpad; + function getPassword(password) { + if (typeof (password) === 'string') { + return (0, lib$8.toUtf8Bytes)(password, lib$8.UnicodeNormalizationForm.NFKC); + } + return (0, lib$1.arrayify)(password); + } + exports.getPassword = getPassword; + function searchPath(object, path) { + var currentChild = object; + var comps = path.toLowerCase().split('/'); + for (var i = 0; i < comps.length; i++) { + // Search for a child object with a case-insensitive matching key + var matchingChild = null; + for (var key in currentChild) { + if (key.toLowerCase() === comps[i]) { + matchingChild = currentChild[key]; + break; + } + } + // Didn't find one. :'( + if (matchingChild === null) { + return null; + } + // Now check this child... + currentChild = matchingChild; + } + return currentChild; + } + exports.searchPath = searchPath; + // See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4) + function uuidV4(randomBytes) { + var bytes = (0, lib$1.arrayify)(randomBytes); + // Section: 4.1.3: + // - time_hi_and_version[12:16] = 0b0100 + bytes[6] = (bytes[6] & 0x0f) | 0x40; + // Section 4.4 + // - clock_seq_hi_and_reserved[6] = 0b0 + // - clock_seq_hi_and_reserved[7] = 0b1 + bytes[8] = (bytes[8] & 0x3f) | 0x80; + var value = (0, lib$1.hexlify)(bytes); + return [ + value.substring(2, 10), + value.substring(10, 14), + value.substring(14, 18), + value.substring(18, 22), + value.substring(22, 34), + ].join("-"); + } + exports.uuidV4 = uuidV4; + + }); + + var utils$2 = /*@__PURE__*/getDefaultExportFromCjs(utils$1); + + var crowdsale = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.decrypt = exports.CrowdsaleAccount = void 0; + var aes_js_1 = __importDefault(aesJs); + + + + + + + + + var logger = new lib.Logger(_version$A.version); + + var CrowdsaleAccount = /** @class */ (function (_super) { + __extends(CrowdsaleAccount, _super); + function CrowdsaleAccount() { + return _super !== null && _super.apply(this, arguments) || this; + } + CrowdsaleAccount.prototype.isCrowdsaleAccount = function (value) { + return !!(value && value._isCrowdsaleAccount); + }; + return CrowdsaleAccount; + }(lib$3.Description)); + exports.CrowdsaleAccount = CrowdsaleAccount; + // See: https://github.com/ethereum/pyethsaletool + function decrypt(json, password) { + var data = JSON.parse(json); + password = (0, utils$1.getPassword)(password); + // Ethereum Address + var ethaddr = (0, lib$6.getAddress)((0, utils$1.searchPath)(data, "ethaddr")); + // Encrypted Seed + var encseed = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "encseed")); + if (!encseed || (encseed.length % 16) !== 0) { + logger.throwArgumentError("invalid encseed", "json", json); + } + var key = (0, lib$1.arrayify)((0, lib$i.pbkdf2)(password, password, 2000, 32, "sha256")).slice(0, 16); + var iv = encseed.slice(0, 16); + var encryptedSeed = encseed.slice(16); + // Decrypt the seed + var aesCbc = new aes_js_1.default.ModeOfOperation.cbc(key, iv); + var seed = aes_js_1.default.padding.pkcs7.strip((0, lib$1.arrayify)(aesCbc.decrypt(encryptedSeed))); + // This wallet format is weird... Convert the binary encoded hex to a string. + var seedHex = ""; + for (var i = 0; i < seed.length; i++) { + seedHex += String.fromCharCode(seed[i]); + } + var seedHexBytes = (0, lib$8.toUtf8Bytes)(seedHex); + var privateKey = (0, lib$4.keccak256)(seedHexBytes); + return new CrowdsaleAccount({ + _isCrowdsaleAccount: true, + address: ethaddr, + privateKey: privateKey + }); + } + exports.decrypt = decrypt; + + }); + + var crowdsale$1 = /*@__PURE__*/getDefaultExportFromCjs(crowdsale); + + var inspect = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getJsonWalletAddress = exports.isKeystoreWallet = exports.isCrowdsaleWallet = void 0; + + function isCrowdsaleWallet(json) { + var data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + return (data.encseed && data.ethaddr); + } + exports.isCrowdsaleWallet = isCrowdsaleWallet; + function isKeystoreWallet(json) { + var data = null; + try { + data = JSON.parse(json); + } + catch (error) { + return false; + } + if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) { + return false; + } + // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff + return true; + } + exports.isKeystoreWallet = isKeystoreWallet; + //export function isJsonWallet(json: string): boolean { + // return (isSecretStorageWallet(json) || isCrowdsaleWallet(json)); + //} + function getJsonWalletAddress(json) { + if (isCrowdsaleWallet(json)) { + try { + return (0, lib$6.getAddress)(JSON.parse(json).ethaddr); + } + catch (error) { + return null; + } + } + if (isKeystoreWallet(json)) { + try { + return (0, lib$6.getAddress)(JSON.parse(json).address); + } + catch (error) { + return null; + } + } + return null; + } + exports.getJsonWalletAddress = getJsonWalletAddress; + + }); + + var inspect$1 = /*@__PURE__*/getDefaultExportFromCjs(inspect); + + var scrypt = createCommonjsModule(function (module, exports) { + "use strict"; + + (function(root) { + const MAX_VALUE = 0x7fffffff; + + // The SHA256 and PBKDF2 implementation are from scrypt-async-js: + // See: https://github.com/dchest/scrypt-async-js + function SHA256(m) { + const K = new Uint32Array([ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, + 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, + 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, + 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, + 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, + 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, + 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, + 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, + 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, + 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 + ]); + + let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a; + let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19; + const w = new Uint32Array(64); + + function blocks(p) { + let off = 0, len = p.length; + while (len >= 64) { + let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2; + + for (i = 0; i < 16; i++) { + j = off + i*4; + w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) | + ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff); + } + + for (i = 16; i < 64; i++) { + u = w[i-2]; + t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10); + + u = w[i-15]; + t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3); + + w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0; + } + + for (i = 0; i < 64; i++) { + t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^ + ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) + + ((h + ((K[i] + w[i]) | 0)) | 0)) | 0; + + t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^ + ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + h0 = (h0 + a) | 0; + h1 = (h1 + b) | 0; + h2 = (h2 + c) | 0; + h3 = (h3 + d) | 0; + h4 = (h4 + e) | 0; + h5 = (h5 + f) | 0; + h6 = (h6 + g) | 0; + h7 = (h7 + h) | 0; + + off += 64; + len -= 64; + } + } + + blocks(m); + + let i, bytesLeft = m.length % 64, + bitLenHi = (m.length / 0x20000000) | 0, + bitLenLo = m.length << 3, + numZeros = (bytesLeft < 56) ? 56 : 120, + p = m.slice(m.length - bytesLeft, m.length); + + p.push(0x80); + for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); } + p.push((bitLenHi >>> 24) & 0xff); + p.push((bitLenHi >>> 16) & 0xff); + p.push((bitLenHi >>> 8) & 0xff); + p.push((bitLenHi >>> 0) & 0xff); + p.push((bitLenLo >>> 24) & 0xff); + p.push((bitLenLo >>> 16) & 0xff); + p.push((bitLenLo >>> 8) & 0xff); + p.push((bitLenLo >>> 0) & 0xff); + + blocks(p); + + return [ + (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff, + (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff, + (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff, + (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff, + (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff, + (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff, + (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff, + (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff + ]; + } + + function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) { + // compress password if it's longer than hash block length + password = (password.length <= 64) ? password : SHA256(password); + + const innerLen = 64 + salt.length + 4; + const inner = new Array(innerLen); + const outerKey = new Array(64); + + let i; + let dk = []; + + // inner = (password ^ ipad) || salt || counter + for (i = 0; i < 64; i++) { inner[i] = 0x36; } + for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; } + for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; } + for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; } + + // outerKey = password ^ opad + for (i = 0; i < 64; i++) outerKey[i] = 0x5c; + for (i = 0; i < password.length; i++) outerKey[i] ^= password[i]; + + // increments counter inside inner + function incrementCounter() { + for (let i = innerLen - 1; i >= innerLen - 4; i--) { + inner[i]++; + if (inner[i] <= 0xff) return; + inner[i] = 0; + } + } + + // output blocks = SHA256(outerKey || SHA256(inner)) ... + while (dkLen >= 32) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner)))); + dkLen -= 32; + } + if (dkLen > 0) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen)); + } + + return dk; + } + + // The following is an adaptation of scryptsy + // See: https://www.npmjs.com/package/scryptsy + function blockmix_salsa8(BY, Yi, r, x, _X) { + let i; + + arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16); + for (i = 0; i < 2 * r; i++) { + blockxor(BY, i * 16, _X, 16); + salsa20_8(_X, x); + arraycopy(_X, 0, BY, Yi + (i * 16), 16); + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16); + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16); + } + } + + function R(a, b) { + return (a << b) | (a >>> (32 - b)); + } + + function salsa20_8(B, x) { + arraycopy(B, 0, x, 0, 16); + + for (let i = 8; i > 0; i -= 2) { + x[ 4] ^= R(x[ 0] + x[12], 7); + x[ 8] ^= R(x[ 4] + x[ 0], 9); + x[12] ^= R(x[ 8] + x[ 4], 13); + x[ 0] ^= R(x[12] + x[ 8], 18); + x[ 9] ^= R(x[ 5] + x[ 1], 7); + x[13] ^= R(x[ 9] + x[ 5], 9); + x[ 1] ^= R(x[13] + x[ 9], 13); + x[ 5] ^= R(x[ 1] + x[13], 18); + x[14] ^= R(x[10] + x[ 6], 7); + x[ 2] ^= R(x[14] + x[10], 9); + x[ 6] ^= R(x[ 2] + x[14], 13); + x[10] ^= R(x[ 6] + x[ 2], 18); + x[ 3] ^= R(x[15] + x[11], 7); + x[ 7] ^= R(x[ 3] + x[15], 9); + x[11] ^= R(x[ 7] + x[ 3], 13); + x[15] ^= R(x[11] + x[ 7], 18); + x[ 1] ^= R(x[ 0] + x[ 3], 7); + x[ 2] ^= R(x[ 1] + x[ 0], 9); + x[ 3] ^= R(x[ 2] + x[ 1], 13); + x[ 0] ^= R(x[ 3] + x[ 2], 18); + x[ 6] ^= R(x[ 5] + x[ 4], 7); + x[ 7] ^= R(x[ 6] + x[ 5], 9); + x[ 4] ^= R(x[ 7] + x[ 6], 13); + x[ 5] ^= R(x[ 4] + x[ 7], 18); + x[11] ^= R(x[10] + x[ 9], 7); + x[ 8] ^= R(x[11] + x[10], 9); + x[ 9] ^= R(x[ 8] + x[11], 13); + x[10] ^= R(x[ 9] + x[ 8], 18); + x[12] ^= R(x[15] + x[14], 7); + x[13] ^= R(x[12] + x[15], 9); + x[14] ^= R(x[13] + x[12], 13); + x[15] ^= R(x[14] + x[13], 18); + } + + for (let i = 0; i < 16; ++i) { + B[i] += x[i]; + } + } + + // naive approach... going back to loop unrolling may yield additional performance + function blockxor(S, Si, D, len) { + for (let i = 0; i < len; i++) { + D[i] ^= S[Si + i]; + } + } + + function arraycopy(src, srcPos, dest, destPos, length) { + while (length--) { + dest[destPos++] = src[srcPos++]; + } + } + + function checkBufferish(o) { + if (!o || typeof(o.length) !== 'number') { return false; } + + for (let i = 0; i < o.length; i++) { + const v = o[i]; + if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) { + return false; + } + } + + return true; + } + + function ensureInteger(value, name) { + if (typeof(value) !== "number" || (value % 1)) { throw new Error('invalid ' + name); } + return value; + } + + // N = Cpu cost, r = Memory cost, p = parallelization cost + // callback(error, progress, key) + function _scrypt(password, salt, N, r, p, dkLen, callback) { + + N = ensureInteger(N, 'N'); + r = ensureInteger(r, 'r'); + p = ensureInteger(p, 'p'); + + dkLen = ensureInteger(dkLen, 'dkLen'); + + if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); } + + if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); } + if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); } + + if (!checkBufferish(password)) { + throw new Error('password must be an array or buffer'); + } + password = Array.prototype.slice.call(password); + + if (!checkBufferish(salt)) { + throw new Error('salt must be an array or buffer'); + } + salt = Array.prototype.slice.call(salt); + + let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r); + const B = new Uint32Array(p * 32 * r); + for (let i = 0; i < B.length; i++) { + const j = i * 4; + B[i] = ((b[j + 3] & 0xff) << 24) | + ((b[j + 2] & 0xff) << 16) | + ((b[j + 1] & 0xff) << 8) | + ((b[j + 0] & 0xff) << 0); + } + + const XY = new Uint32Array(64 * r); + const V = new Uint32Array(32 * r * N); + + const Yi = 32 * r; + + // scratch space + const x = new Uint32Array(16); // salsa20_8 + const _X = new Uint32Array(16); // blockmix_salsa8 + + const totalOps = p * N * 2; + let currentOp = 0; + let lastPercent10 = null; + + // Set this to true to abandon the scrypt on the next step + let stop = false; + + // State information + let state = 0; + let i0 = 0, i1; + let Bi; + + // How many blockmix_salsa8 can we do per step? + const limit = callback ? parseInt(1000 / r): 0xffffffff; + + // Trick from scrypt-async; if there is a setImmediate shim in place, use it + const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout; + + // This is really all I changed; making scryptsy a state machine so we occasionally + // stop and give other evnts on the evnt loop a chance to run. ~RicMoo + const incrementalSMix = function() { + if (stop) { + return callback(new Error('cancelled'), currentOp / totalOps); + } + + let steps; + + switch (state) { + case 0: + // for (var i = 0; i < p; i++)... + Bi = i0 * 32 * r; + + arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1 + + state = 1; // Move to ROMix 2 + i1 = 0; + + // Fall through + + case 1: + + // Run up to 1000 steps of the first inner smix loop + steps = N - i1; + if (steps > limit) { steps = limit; } + for (let i = 0; i < steps; i++) { // ROMix - 2 + arraycopy(XY, 0, V, (i1 + i) * Yi, Yi); // ROMix - 3 + blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4 + } + + // for (var i = 0; i < N; i++) + i1 += steps; + currentOp += steps; + + if (callback) { + // Call the callback with the progress (optionally stopping us) + const percent10 = parseInt(1000 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { break; } + lastPercent10 = percent10; + } + } + + if (i1 < N) { break; } + + i1 = 0; // Move to ROMix 6 + state = 2; + + // Fall through + + case 2: + + // Run up to 1000 steps of the second inner smix loop + steps = N - i1; + if (steps > limit) { steps = limit; } + for (let i = 0; i < steps; i++) { // ROMix - 6 + const offset = (2 * r - 1) * 16; // ROMix - 7 + const j = XY[offset] & (N - 1); + blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner) + blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer) + } + + // for (var i = 0; i < N; i++)... + i1 += steps; + currentOp += steps; + + // Call the callback with the progress (optionally stopping us) + if (callback) { + const percent10 = parseInt(1000 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { break; } + lastPercent10 = percent10; + } + } + + if (i1 < N) { break; } + + arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10 + + // for (var i = 0; i < p; i++)... + i0++; + if (i0 < p) { + state = 0; + break; + } + + b = []; + for (let i = 0; i < B.length; i++) { + b.push((B[i] >> 0) & 0xff); + b.push((B[i] >> 8) & 0xff); + b.push((B[i] >> 16) & 0xff); + b.push((B[i] >> 24) & 0xff); + } + + const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen); + + // Send the result to the callback + if (callback) { callback(null, 1.0, derivedKey); } + + // Done; don't break (which would reschedule) + return derivedKey; + } + + // Schedule the next steps + if (callback) { nextTick(incrementalSMix); } + }; + + // Run the smix state machine until completion + if (!callback) { + while (true) { + const derivedKey = incrementalSMix(); + if (derivedKey != undefined) { return derivedKey; } + } + } + + // Bootstrap the async incremental smix + incrementalSMix(); + } + + const lib = { + scrypt: function(password, salt, N, r, p, dkLen, progressCallback) { + return new Promise(function(resolve, reject) { + let lastProgress = 0; + if (progressCallback) { progressCallback(0); } + _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) { + if (error) { + reject(error); + } else if (key) { + if (progressCallback && lastProgress !== 1) { + progressCallback(1); + } + resolve(new Uint8Array(key)); + } else if (progressCallback && progress !== lastProgress) { + lastProgress = progress; + return progressCallback(progress); + } + }); + }); + }, + syncScrypt: function(password, salt, N, r, p, dkLen) { + return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen)); + } + }; + + // node.js + if ('object' !== 'undefined') { + module.exports = lib; + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(undefined) === 'function' && undefined.amd) { + undefined(lib); + + // Web Browsers + } else if (root) { + + // If there was an existing library "scrypt", make sure it is still available + if (root.scrypt) { + root._scrypt = root.scrypt; + } + + root.scrypt = lib; + } + + })(commonjsGlobal); + }); + + var keystore = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.encrypt = exports.decrypt = exports.decryptSync = exports.KeystoreAccount = void 0; + var aes_js_1 = __importDefault(aesJs); + var scrypt_js_1 = __importDefault(scrypt); + + + + + + + + + + + + var logger = new lib.Logger(_version$A.version); + // Exported Types + function hasMnemonic(value) { + return (value != null && value.mnemonic && value.mnemonic.phrase); + } + var KeystoreAccount = /** @class */ (function (_super) { + __extends(KeystoreAccount, _super); + function KeystoreAccount() { + return _super !== null && _super.apply(this, arguments) || this; + } + KeystoreAccount.prototype.isKeystoreAccount = function (value) { + return !!(value && value._isKeystoreAccount); + }; + return KeystoreAccount; + }(lib$3.Description)); + exports.KeystoreAccount = KeystoreAccount; + function _decrypt(data, key, ciphertext) { + var cipher = (0, utils$1.searchPath)(data, "crypto/cipher"); + if (cipher === "aes-128-ctr") { + var iv = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "crypto/cipherparams/iv")); + var counter = new aes_js_1.default.Counter(iv); + var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(key, counter); + return (0, lib$1.arrayify)(aesCtr.decrypt(ciphertext)); + } + return null; + } + function _getAccount(data, key) { + var ciphertext = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "crypto/ciphertext")); + var computedMAC = (0, lib$1.hexlify)((0, lib$4.keccak256)((0, lib$1.concat)([key.slice(16, 32), ciphertext]))).substring(2); + if (computedMAC !== (0, utils$1.searchPath)(data, "crypto/mac").toLowerCase()) { + throw new Error("invalid password"); + } + var privateKey = _decrypt(data, key.slice(0, 16), ciphertext); + if (!privateKey) { + logger.throwError("unsupported cipher", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "decrypt" + }); + } + var mnemonicKey = key.slice(32, 64); + var address = (0, lib$e.computeAddress)(privateKey); + if (data.address) { + var check = data.address.toLowerCase(); + if (check.substring(0, 2) !== "0x") { + check = "0x" + check; + } + if ((0, lib$6.getAddress)(check) !== address) { + throw new Error("address mismatch"); + } + } + var account = { + _isKeystoreAccount: true, + address: address, + privateKey: (0, lib$1.hexlify)(privateKey) + }; + // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase + if ((0, utils$1.searchPath)(data, "x-ethers/version") === "0.1") { + var mnemonicCiphertext = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "x-ethers/mnemonicCiphertext")); + var mnemonicIv = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "x-ethers/mnemonicCounter")); + var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv); + var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + var path = (0, utils$1.searchPath)(data, "x-ethers/path") || lib$k.defaultPath; + var locale = (0, utils$1.searchPath)(data, "x-ethers/locale") || "en"; + var entropy = (0, lib$1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext)); + try { + var mnemonic = (0, lib$k.entropyToMnemonic)(entropy, locale); + var node = lib$k.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + account.mnemonic = node.mnemonic; + } + catch (error) { + // If we don't have the locale wordlist installed to + // read this mnemonic, just bail and don't set the + // mnemonic + if (error.code !== lib.Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { + throw error; + } + } + } + return new KeystoreAccount(account); + } + function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) { + return (0, lib$1.arrayify)((0, lib$i.pbkdf2)(passwordBytes, salt, count, dkLen, prfFunc)); + } + function pbkdf2(passwordBytes, salt, count, dkLen, prfFunc) { + return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc)); + } + function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) { + var passwordBytes = (0, utils$1.getPassword)(password); + var kdf = (0, utils$1.searchPath)(data, "crypto/kdf"); + if (kdf && typeof (kdf) === "string") { + var throwError = function (name, value) { + return logger.throwArgumentError("invalid key-derivation function parameters", name, value); + }; + if (kdf.toLowerCase() === "scrypt") { + var salt = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "crypto/kdfparams/salt")); + var N = parseInt((0, utils$1.searchPath)(data, "crypto/kdfparams/n")); + var r = parseInt((0, utils$1.searchPath)(data, "crypto/kdfparams/r")); + var p = parseInt((0, utils$1.searchPath)(data, "crypto/kdfparams/p")); + // Check for all required parameters + if (!N || !r || !p) { + throwError("kdf", kdf); + } + // Make sure N is a power of 2 + if ((N & (N - 1)) !== 0) { + throwError("N", N); + } + var dkLen = parseInt((0, utils$1.searchPath)(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback); + } + else if (kdf.toLowerCase() === "pbkdf2") { + var salt = (0, utils$1.looseArrayify)((0, utils$1.searchPath)(data, "crypto/kdfparams/salt")); + var prfFunc = null; + var prf = (0, utils$1.searchPath)(data, "crypto/kdfparams/prf"); + if (prf === "hmac-sha256") { + prfFunc = "sha256"; + } + else if (prf === "hmac-sha512") { + prfFunc = "sha512"; + } + else { + throwError("prf", prf); + } + var count = parseInt((0, utils$1.searchPath)(data, "crypto/kdfparams/c")); + var dkLen = parseInt((0, utils$1.searchPath)(data, "crypto/kdfparams/dklen")); + if (dkLen !== 32) { + throwError("dklen", dkLen); + } + return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc); + } + } + return logger.throwArgumentError("unsupported key-derivation function", "kdf", kdf); + } + function decryptSync(json, password) { + var data = JSON.parse(json); + var key = _computeKdfKey(data, password, pbkdf2Sync, scrypt_js_1.default.syncScrypt); + return _getAccount(data, key); + } + exports.decryptSync = decryptSync; + function decrypt(json, password, progressCallback) { + return __awaiter(this, void 0, void 0, function () { + var data, key; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = JSON.parse(json); + return [4 /*yield*/, _computeKdfKey(data, password, pbkdf2, scrypt_js_1.default.scrypt, progressCallback)]; + case 1: + key = _a.sent(); + return [2 /*return*/, _getAccount(data, key)]; + } + }); + }); + } + exports.decrypt = decrypt; + function encrypt(account, password, options, progressCallback) { + try { + // Check the address matches the private key + if ((0, lib$6.getAddress)(account.address) !== (0, lib$e.computeAddress)(account.privateKey)) { + throw new Error("address/privateKey mismatch"); + } + // Check the mnemonic (if any) matches the private key + if (hasMnemonic(account)) { + var mnemonic = account.mnemonic; + var node = lib$k.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || lib$k.defaultPath); + if (node.privateKey != account.privateKey) { + throw new Error("mnemonic mismatch"); + } + } + } + catch (e) { + return Promise.reject(e); + } + // The options are optional, so adjust the call as needed + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (!options) { + options = {}; + } + var privateKey = (0, lib$1.arrayify)(account.privateKey); + var passwordBytes = (0, utils$1.getPassword)(password); + var entropy = null; + var path = null; + var locale = null; + if (hasMnemonic(account)) { + var srcMnemonic = account.mnemonic; + entropy = (0, lib$1.arrayify)((0, lib$k.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || "en")); + path = srcMnemonic.path || lib$k.defaultPath; + locale = srcMnemonic.locale || "en"; + } + var client = options.client; + if (!client) { + client = "ethers.js"; + } + // Check/generate the salt + var salt = null; + if (options.salt) { + salt = (0, lib$1.arrayify)(options.salt); + } + else { + salt = (0, lib$l.randomBytes)(32); + ; + } + // Override initialization vector + var iv = null; + if (options.iv) { + iv = (0, lib$1.arrayify)(options.iv); + if (iv.length !== 16) { + throw new Error("invalid iv"); + } + } + else { + iv = (0, lib$l.randomBytes)(16); + } + // Override the uuid + var uuidRandom = null; + if (options.uuid) { + uuidRandom = (0, lib$1.arrayify)(options.uuid); + if (uuidRandom.length !== 16) { + throw new Error("invalid uuid"); + } + } + else { + uuidRandom = (0, lib$l.randomBytes)(16); + } + // Override the scrypt password-based key derivation function parameters + var N = (1 << 17), r = 8, p = 1; + if (options.scrypt) { + if (options.scrypt.N) { + N = options.scrypt.N; + } + if (options.scrypt.r) { + r = options.scrypt.r; + } + if (options.scrypt.p) { + p = options.scrypt.p; + } + } + // We take 64 bytes: + // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix) + // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet) + return scrypt_js_1.default.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then(function (key) { + key = (0, lib$1.arrayify)(key); + // This will be used to encrypt the wallet (as per Web3 secret storage) + var derivedKey = key.slice(0, 16); + var macPrefix = key.slice(16, 32); + // This will be used to encrypt the mnemonic phrase (if any) + var mnemonicKey = key.slice(32, 64); + // Encrypt the private key + var counter = new aes_js_1.default.Counter(iv); + var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(derivedKey, counter); + var ciphertext = (0, lib$1.arrayify)(aesCtr.encrypt(privateKey)); + // Compute the message authentication code, used to check the password + var mac = (0, lib$4.keccak256)((0, lib$1.concat)([macPrefix, ciphertext])); + // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition + var data = { + address: account.address.substring(2).toLowerCase(), + id: (0, utils$1.uuidV4)(uuidRandom), + version: 3, + Crypto: { + cipher: "aes-128-ctr", + cipherparams: { + iv: (0, lib$1.hexlify)(iv).substring(2), + }, + ciphertext: (0, lib$1.hexlify)(ciphertext).substring(2), + kdf: "scrypt", + kdfparams: { + salt: (0, lib$1.hexlify)(salt).substring(2), + n: N, + dklen: 32, + p: p, + r: r + }, + mac: mac.substring(2) + } + }; + // If we have a mnemonic, encrypt it into the JSON wallet + if (entropy) { + var mnemonicIv = (0, lib$l.randomBytes)(16); + var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv); + var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); + var mnemonicCiphertext = (0, lib$1.arrayify)(mnemonicAesCtr.encrypt(entropy)); + var now = new Date(); + var timestamp = (now.getUTCFullYear() + "-" + + (0, utils$1.zpad)(now.getUTCMonth() + 1, 2) + "-" + + (0, utils$1.zpad)(now.getUTCDate(), 2) + "T" + + (0, utils$1.zpad)(now.getUTCHours(), 2) + "-" + + (0, utils$1.zpad)(now.getUTCMinutes(), 2) + "-" + + (0, utils$1.zpad)(now.getUTCSeconds(), 2) + ".0Z"); + data["x-ethers"] = { + client: client, + gethFilename: ("UTC--" + timestamp + "--" + data.address), + mnemonicCounter: (0, lib$1.hexlify)(mnemonicIv).substring(2), + mnemonicCiphertext: (0, lib$1.hexlify)(mnemonicCiphertext).substring(2), + path: path, + locale: locale, + version: "0.1" + }; + } + return JSON.stringify(data); + }); + } + exports.encrypt = encrypt; + + }); + + var keystore$1 = /*@__PURE__*/getDefaultExportFromCjs(keystore); + + var lib$m = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.decryptJsonWalletSync = exports.decryptJsonWallet = exports.getJsonWalletAddress = exports.isKeystoreWallet = exports.isCrowdsaleWallet = exports.encryptKeystore = exports.decryptKeystoreSync = exports.decryptKeystore = exports.decryptCrowdsale = void 0; + + Object.defineProperty(exports, "decryptCrowdsale", { enumerable: true, get: function () { return crowdsale.decrypt; } }); + + Object.defineProperty(exports, "getJsonWalletAddress", { enumerable: true, get: function () { return inspect.getJsonWalletAddress; } }); + Object.defineProperty(exports, "isCrowdsaleWallet", { enumerable: true, get: function () { return inspect.isCrowdsaleWallet; } }); + Object.defineProperty(exports, "isKeystoreWallet", { enumerable: true, get: function () { return inspect.isKeystoreWallet; } }); + + Object.defineProperty(exports, "decryptKeystore", { enumerable: true, get: function () { return keystore.decrypt; } }); + Object.defineProperty(exports, "decryptKeystoreSync", { enumerable: true, get: function () { return keystore.decryptSync; } }); + Object.defineProperty(exports, "encryptKeystore", { enumerable: true, get: function () { return keystore.encrypt; } }); + function decryptJsonWallet(json, password, progressCallback) { + if ((0, inspect.isCrowdsaleWallet)(json)) { + if (progressCallback) { + progressCallback(0); + } + var account = (0, crowdsale.decrypt)(json, password); + if (progressCallback) { + progressCallback(1); + } + return Promise.resolve(account); + } + if ((0, inspect.isKeystoreWallet)(json)) { + return (0, keystore.decrypt)(json, password, progressCallback); + } + return Promise.reject(new Error("invalid JSON wallet")); + } + exports.decryptJsonWallet = decryptJsonWallet; + function decryptJsonWalletSync(json, password) { + if ((0, inspect.isCrowdsaleWallet)(json)) { + return (0, crowdsale.decrypt)(json, password); + } + if ((0, inspect.isKeystoreWallet)(json)) { + return (0, keystore.decryptSync)(json, password); + } + throw new Error("invalid JSON wallet"); + } + exports.decryptJsonWalletSync = decryptJsonWalletSync; + + }); + + var index$m = /*@__PURE__*/getDefaultExportFromCjs(lib$m); + + var _version$C = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "wallet/5.5.0"; + + }); + + var _version$D = /*@__PURE__*/getDefaultExportFromCjs(_version$C); + + var lib$n = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.verifyTypedData = exports.verifyMessage = exports.Wallet = void 0; + + + + + + + + + + + + + + + var logger = new lib.Logger(_version$C.version); + function isAccount(value) { + return (value != null && (0, lib$1.isHexString)(value.privateKey, 32) && value.address != null); + } + function hasMnemonic(value) { + var mnemonic = value.mnemonic; + return (mnemonic && mnemonic.phrase); + } + var Wallet = /** @class */ (function (_super) { + __extends(Wallet, _super); + function Wallet(privateKey, provider) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Wallet); + _this = _super.call(this) || this; + if (isAccount(privateKey)) { + var signingKey_1 = new lib$d.SigningKey(privateKey.privateKey); + (0, lib$3.defineReadOnly)(_this, "_signingKey", function () { return signingKey_1; }); + (0, lib$3.defineReadOnly)(_this, "address", (0, lib$e.computeAddress)(_this.publicKey)); + if (_this.address !== (0, lib$6.getAddress)(privateKey.address)) { + logger.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); + } + if (hasMnemonic(privateKey)) { + var srcMnemonic_1 = privateKey.mnemonic; + (0, lib$3.defineReadOnly)(_this, "_mnemonic", function () { return ({ + phrase: srcMnemonic_1.phrase, + path: srcMnemonic_1.path || lib$k.defaultPath, + locale: srcMnemonic_1.locale || "en" + }); }); + var mnemonic = _this.mnemonic; + var node = lib$k.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path); + if ((0, lib$e.computeAddress)(node.privateKey) !== _this.address) { + logger.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); + } + } + else { + (0, lib$3.defineReadOnly)(_this, "_mnemonic", function () { return null; }); + } + } + else { + if (lib$d.SigningKey.isSigningKey(privateKey)) { + /* istanbul ignore if */ + if (privateKey.curve !== "secp256k1") { + logger.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); + } + (0, lib$3.defineReadOnly)(_this, "_signingKey", function () { return privateKey; }); + } + else { + // A lot of common tools do not prefix private keys with a 0x (see: #1166) + if (typeof (privateKey) === "string") { + if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { + privateKey = "0x" + privateKey; + } + } + var signingKey_2 = new lib$d.SigningKey(privateKey); + (0, lib$3.defineReadOnly)(_this, "_signingKey", function () { return signingKey_2; }); + } + (0, lib$3.defineReadOnly)(_this, "_mnemonic", function () { return null; }); + (0, lib$3.defineReadOnly)(_this, "address", (0, lib$e.computeAddress)(_this.publicKey)); + } + /* istanbul ignore if */ + if (provider && !lib$b.Provider.isProvider(provider)) { + logger.throwArgumentError("invalid provider", "provider", provider); + } + (0, lib$3.defineReadOnly)(_this, "provider", provider || null); + return _this; + } + Object.defineProperty(Wallet.prototype, "mnemonic", { + get: function () { return this._mnemonic(); }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Wallet.prototype, "privateKey", { + get: function () { return this._signingKey().privateKey; }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Wallet.prototype, "publicKey", { + get: function () { return this._signingKey().publicKey; }, + enumerable: false, + configurable: true + }); + Wallet.prototype.getAddress = function () { + return Promise.resolve(this.address); + }; + Wallet.prototype.connect = function (provider) { + return new Wallet(this, provider); + }; + Wallet.prototype.signTransaction = function (transaction) { + var _this = this; + return (0, lib$3.resolveProperties)(transaction).then(function (tx) { + if (tx.from != null) { + if ((0, lib$6.getAddress)(tx.from) !== _this.address) { + logger.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); + } + delete tx.from; + } + var signature = _this._signingKey().signDigest((0, lib$4.keccak256)((0, lib$e.serialize)(tx))); + return (0, lib$e.serialize)(tx, signature); + }); + }; + Wallet.prototype.signMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, (0, lib$1.joinSignature)(this._signingKey().signDigest((0, lib$9.hashMessage)(message)))]; + }); + }); + }; + Wallet.prototype._signTypedData = function (domain, types, value) { + return __awaiter(this, void 0, void 0, function () { + var populated; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, lib$9._TypedDataEncoder.resolveNames(domain, types, value, function (name) { + if (_this.provider == null) { + logger.throwError("cannot resolve ENS names without a provider", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName", + value: name + }); + } + return _this.provider.resolveName(name); + })]; + case 1: + populated = _a.sent(); + return [2 /*return*/, (0, lib$1.joinSignature)(this._signingKey().signDigest(lib$9._TypedDataEncoder.hash(populated.domain, types, populated.value)))]; + } + }); + }); + }; + Wallet.prototype.encrypt = function (password, options, progressCallback) { + if (typeof (options) === "function" && !progressCallback) { + progressCallback = options; + options = {}; + } + if (progressCallback && typeof (progressCallback) !== "function") { + throw new Error("invalid callback"); + } + if (!options) { + options = {}; + } + return (0, lib$m.encryptKeystore)(this, password, options, progressCallback); + }; + /** + * Static methods to create Wallet instances. + */ + Wallet.createRandom = function (options) { + var entropy = (0, lib$l.randomBytes)(16); + if (!options) { + options = {}; + } + if (options.extraEntropy) { + entropy = (0, lib$1.arrayify)((0, lib$1.hexDataSlice)((0, lib$4.keccak256)((0, lib$1.concat)([entropy, options.extraEntropy])), 0, 16)); + } + var mnemonic = (0, lib$k.entropyToMnemonic)(entropy, options.locale); + return Wallet.fromMnemonic(mnemonic, options.path, options.locale); + }; + Wallet.fromEncryptedJson = function (json, password, progressCallback) { + return (0, lib$m.decryptJsonWallet)(json, password, progressCallback).then(function (account) { + return new Wallet(account); + }); + }; + Wallet.fromEncryptedJsonSync = function (json, password) { + return new Wallet((0, lib$m.decryptJsonWalletSync)(json, password)); + }; + Wallet.fromMnemonic = function (mnemonic, path, wordlist) { + if (!path) { + path = lib$k.defaultPath; + } + return new Wallet(lib$k.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path)); + }; + return Wallet; + }(lib$c.Signer)); + exports.Wallet = Wallet; + function verifyMessage(message, signature) { + return (0, lib$e.recoverAddress)((0, lib$9.hashMessage)(message), signature); + } + exports.verifyMessage = verifyMessage; + function verifyTypedData(domain, types, value, signature) { + return (0, lib$e.recoverAddress)(lib$9._TypedDataEncoder.hash(domain, types, value), signature); + } + exports.verifyTypedData = verifyTypedData; + + }); + + var index$n = /*@__PURE__*/getDefaultExportFromCjs(lib$n); + + var _version$E = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "networks/5.5.1"; + + }); + + var _version$F = /*@__PURE__*/getDefaultExportFromCjs(_version$E); + + var lib$o = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getNetwork = void 0; + + + var logger = new lib.Logger(_version$E.version); + ; + function isRenetworkable(value) { + return (value && typeof (value.renetwork) === "function"); + } + function ethDefaultProvider(network) { + var func = function (providers, options) { + if (options == null) { + options = {}; + } + var providerList = []; + if (providers.InfuraProvider) { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } + catch (error) { } + } + if (providers.EtherscanProvider) { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } + catch (error) { } + } + if (providers.AlchemyProvider) { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } + catch (error) { } + } + if (providers.PocketProvider) { + // These networks are currently faulty on Pocket as their + // network does not handle the Berlin hardfork, which is + // live on these ones. + // @TODO: This goes away once Pocket has upgraded their nodes + var skip = ["goerli", "ropsten", "rinkeby"]; + try { + var provider = new providers.PocketProvider(network); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + catch (error) { } + } + if (providers.CloudflareProvider) { + try { + providerList.push(new providers.CloudflareProvider(network)); + } + catch (error) { } + } + if (providerList.length === 0) { + return null; + } + if (providers.FallbackProvider) { + var quorum = 1; + if (options.quorum != null) { + quorum = options.quorum; + } + else if (network === "homestead") { + quorum = 2; + } + return new providers.FallbackProvider(providerList, quorum); + } + return providerList[0]; + }; + func.renetwork = function (network) { + return ethDefaultProvider(network); + }; + return func; + } + function etcDefaultProvider(url, network) { + var func = function (providers, options) { + if (providers.JsonRpcProvider) { + return new providers.JsonRpcProvider(url, network); + } + return null; + }; + func.renetwork = function (network) { + return etcDefaultProvider(url, network); + }; + return func; + } + var homestead = { + chainId: 1, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "homestead", + _defaultProvider: ethDefaultProvider("homestead") + }; + var ropsten = { + chainId: 3, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "ropsten", + _defaultProvider: ethDefaultProvider("ropsten") + }; + var classicMordor = { + chainId: 63, + name: "classicMordor", + _defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor") + }; + // See: https://chainlist.org + var networks = { + unspecified: { chainId: 0, name: "unspecified" }, + homestead: homestead, + mainnet: homestead, + morden: { chainId: 2, name: "morden" }, + ropsten: ropsten, + testnet: ropsten, + rinkeby: { + chainId: 4, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "rinkeby", + _defaultProvider: ethDefaultProvider("rinkeby") + }, + kovan: { + chainId: 42, + name: "kovan", + _defaultProvider: ethDefaultProvider("kovan") + }, + goerli: { + chainId: 5, + ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + name: "goerli", + _defaultProvider: ethDefaultProvider("goerli") + }, + // ETC (See: #351) + classic: { + chainId: 61, + name: "classic", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/etc", "classic") + }, + classicMorden: { chainId: 62, name: "classicMorden" }, + classicMordor: classicMordor, + classicTestnet: classicMordor, + classicKotti: { + chainId: 6, + name: "classicKotti", + _defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/kotti", "classicKotti") + }, + xdai: { chainId: 100, name: "xdai" }, + matic: { chainId: 137, name: "matic" }, + maticmum: { chainId: 80001, name: "maticmum" }, + optimism: { chainId: 10, name: "optimism" }, + "optimism-kovan": { chainId: 69, name: "optimism-kovan" }, + "optimism-goerli": { chainId: 420, name: "optimism-goerli" }, + arbitrum: { chainId: 42161, name: "arbitrum" }, + "arbitrum-rinkeby": { chainId: 421611, name: "arbitrum-rinkeby" }, + bnb: { chainId: 56, name: "bnb" }, + bnbt: { chainId: 97, name: "bnbt" }, + }; + /** + * getNetwork + * + * Converts a named common networks or chain ID (network ID) to a Network + * and verifies a network is a valid Network.. + */ + function getNetwork(network) { + // No network (null) + if (network == null) { + return null; + } + if (typeof (network) === "number") { + for (var name_1 in networks) { + var standard_1 = networks[name_1]; + if (standard_1.chainId === network) { + return { + name: standard_1.name, + chainId: standard_1.chainId, + ensAddress: (standard_1.ensAddress || null), + _defaultProvider: (standard_1._defaultProvider || null) + }; + } + } + return { + chainId: network, + name: "unknown" + }; + } + if (typeof (network) === "string") { + var standard_2 = networks[network]; + if (standard_2 == null) { + return null; + } + return { + name: standard_2.name, + chainId: standard_2.chainId, + ensAddress: standard_2.ensAddress, + _defaultProvider: (standard_2._defaultProvider || null) + }; + } + var standard = networks[network.name]; + // Not a standard network; check that it is a valid network in general + if (!standard) { + if (typeof (network.chainId) !== "number") { + logger.throwArgumentError("invalid network chainId", "network", network); + } + return network; + } + // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155) + if (network.chainId !== 0 && network.chainId !== standard.chainId) { + logger.throwArgumentError("network chainId mismatch", "network", network); + } + // @TODO: In the next major version add an attach function to a defaultProvider + // class and move the _defaultProvider internal to this file (extend Network) + var defaultProvider = network._defaultProvider || null; + if (defaultProvider == null && standard._defaultProvider) { + if (isRenetworkable(standard._defaultProvider)) { + defaultProvider = standard._defaultProvider.renetwork(network); + } + else { + defaultProvider = standard._defaultProvider; + } + } + // Standard Network (allow overriding the ENS address) + return { + name: network.name, + chainId: standard.chainId, + ensAddress: (network.ensAddress || standard.ensAddress || null), + _defaultProvider: defaultProvider + }; + } + exports.getNetwork = getNetwork; + + }); + + var index$o = /*@__PURE__*/getDefaultExportFromCjs(lib$o); + + var browserBase64 = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.encode = exports.decode = void 0; + + function decode(textData) { + textData = atob(textData); + var data = []; + for (var i = 0; i < textData.length; i++) { + data.push(textData.charCodeAt(i)); + } + return (0, lib$1.arrayify)(data); + } + exports.decode = decode; + function encode(data) { + data = (0, lib$1.arrayify)(data); + var textData = ""; + for (var i = 0; i < data.length; i++) { + textData += String.fromCharCode(data[i]); + } + return btoa(textData); + } + exports.encode = encode; + + }); + + var browserBase64$1 = /*@__PURE__*/getDefaultExportFromCjs(browserBase64); + + var lib$p = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.encode = exports.decode = void 0; + + Object.defineProperty(exports, "decode", { enumerable: true, get: function () { return browserBase64.decode; } }); + Object.defineProperty(exports, "encode", { enumerable: true, get: function () { return browserBase64.encode; } }); + + }); + + var index$p = /*@__PURE__*/getDefaultExportFromCjs(lib$p); + + var _version$G = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "web/5.5.1"; + + }); + + var _version$H = /*@__PURE__*/getDefaultExportFromCjs(_version$G); + + var browserGeturl = createCommonjsModule(function (module, exports) { + "use strict"; + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getUrl = void 0; + + function getUrl(href, options) { + return __awaiter(this, void 0, void 0, function () { + var request, response, body, headers; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (options == null) { + options = {}; + } + request = { + method: (options.method || "GET"), + headers: (options.headers || {}), + body: (options.body || undefined), + }; + if (options.skipFetchSetup !== true) { + request.mode = "cors"; // no-cors, cors, *same-origin + request.cache = "no-cache"; // *default, no-cache, reload, force-cache, only-if-cached + request.credentials = "same-origin"; // include, *same-origin, omit + request.redirect = "follow"; // manual, *follow, error + request.referrer = "client"; // no-referrer, *client + } + ; + return [4 /*yield*/, fetch(href, request)]; + case 1: + response = _a.sent(); + return [4 /*yield*/, response.arrayBuffer()]; + case 2: + body = _a.sent(); + headers = {}; + if (response.headers.forEach) { + response.headers.forEach(function (value, key) { + headers[key.toLowerCase()] = value; + }); + } + else { + ((response.headers).keys)().forEach(function (key) { + headers[key.toLowerCase()] = response.headers.get(key); + }); + } + return [2 /*return*/, { + headers: headers, + statusCode: response.status, + statusMessage: response.statusText, + body: (0, lib$1.arrayify)(new Uint8Array(body)), + }]; + } + }); + }); + } + exports.getUrl = getUrl; + + }); + + var browserGeturl$1 = /*@__PURE__*/getDefaultExportFromCjs(browserGeturl); + + var lib$q = createCommonjsModule(function (module, exports) { + "use strict"; + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.poll = exports.fetchJson = exports._fetchData = void 0; + + + + + + + var logger = new lib.Logger(_version$G.version); + + function staller(duration) { + return new Promise(function (resolve) { + setTimeout(resolve, duration); + }); + } + function bodyify(value, type) { + if (value == null) { + return null; + } + if (typeof (value) === "string") { + return value; + } + if ((0, lib$1.isBytesLike)(value)) { + if (type && (type.split("/")[0] === "text" || type.split(";")[0].trim() === "application/json")) { + try { + return (0, lib$8.toUtf8String)(value); + } + catch (error) { } + ; + } + return (0, lib$1.hexlify)(value); + } + return value; + } + // This API is still a work in progress; the future changes will likely be: + // - ConnectionInfo => FetchDataRequest + // - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array } + // - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified) + // - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T + // For this reason, it should be considered internal until the API is finalized + function _fetchData(connection, body, processFunc) { + // How many times to retry in the event of a throttle + var attemptLimit = (typeof (connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit : 12; + logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); + var throttleCallback = ((typeof (connection) === "object") ? connection.throttleCallback : null); + var throttleSlotInterval = ((typeof (connection) === "object" && typeof (connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval : 100); + logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); + var headers = {}; + var url = null; + // @TODO: Allow ConnectionInfo to override some of these values + var options = { + method: "GET", + }; + var allow304 = false; + var timeout = 2 * 60 * 1000; + if (typeof (connection) === "string") { + url = connection; + } + else if (typeof (connection) === "object") { + if (connection == null || connection.url == null) { + logger.throwArgumentError("missing URL", "connection.url", connection); + } + url = connection.url; + if (typeof (connection.timeout) === "number" && connection.timeout > 0) { + timeout = connection.timeout; + } + if (connection.headers) { + for (var key in connection.headers) { + headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) }; + if (["if-none-match", "if-modified-since"].indexOf(key.toLowerCase()) >= 0) { + allow304 = true; + } + } + } + options.allowGzip = !!connection.allowGzip; + if (connection.user != null && connection.password != null) { + if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) { + logger.throwError("basic authentication requires a secure https url", lib.Logger.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" }); + } + var authorization = connection.user + ":" + connection.password; + headers["authorization"] = { + key: "Authorization", + value: "Basic " + (0, lib$p.encode)((0, lib$8.toUtf8Bytes)(authorization)) + }; + } + } + var reData = new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$", "i"); + var dataMatch = ((url) ? url.match(reData) : null); + if (dataMatch) { + try { + var response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": dataMatch[1] }, + body: (0, lib$p.decode)(dataMatch[2]) + }; + var result = response.body; + if (processFunc) { + result = processFunc(response.body, response); + } + return Promise.resolve(result); + } + catch (error) { + logger.throwError("processing response error", lib.Logger.errors.SERVER_ERROR, { + body: bodyify(dataMatch[1], dataMatch[2]), + error: error, + requestBody: null, + requestMethod: "GET", + url: url + }); + } + } + if (body) { + options.method = "POST"; + options.body = body; + if (headers["content-type"] == null) { + headers["content-type"] = { key: "Content-Type", value: "application/octet-stream" }; + } + if (headers["content-length"] == null) { + headers["content-length"] = { key: "Content-Length", value: String(body.length) }; + } + } + var flatHeaders = {}; + Object.keys(headers).forEach(function (key) { + var header = headers[key]; + flatHeaders[header.key] = header.value; + }); + options.headers = flatHeaders; + var runningTimeout = (function () { + var timer = null; + var promise = new Promise(function (resolve, reject) { + if (timeout) { + timer = setTimeout(function () { + if (timer == null) { + return; + } + timer = null; + reject(logger.makeError("timeout", lib.Logger.errors.TIMEOUT, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + timeout: timeout, + url: url + })); + }, timeout); + } + }); + var cancel = function () { + if (timer == null) { + return; + } + clearTimeout(timer); + timer = null; + }; + return { promise: promise, cancel: cancel }; + })(); + var runningFetch = (function () { + return __awaiter(this, void 0, void 0, function () { + var attempt, response, location_1, tryAgain, stall, retryAfter, error_1, body_1, result, error_2, tryAgain, timeout_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + attempt = 0; + _a.label = 1; + case 1: + if (!(attempt < attemptLimit)) return [3 /*break*/, 20]; + response = null; + _a.label = 2; + case 2: + _a.trys.push([2, 9, , 10]); + return [4 /*yield*/, (0, browserGeturl.getUrl)(url, options)]; + case 3: + response = _a.sent(); + if (!(attempt < attemptLimit)) return [3 /*break*/, 8]; + if (!(response.statusCode === 301 || response.statusCode === 302)) return [3 /*break*/, 4]; + location_1 = response.headers.location || ""; + if (options.method === "GET" && location_1.match(/^https:/)) { + url = response.headers.location; + return [3 /*break*/, 19]; + } + return [3 /*break*/, 8]; + case 4: + if (!(response.statusCode === 429)) return [3 /*break*/, 8]; + tryAgain = true; + if (!throttleCallback) return [3 /*break*/, 6]; + return [4 /*yield*/, throttleCallback(attempt, url)]; + case 5: + tryAgain = _a.sent(); + _a.label = 6; + case 6: + if (!tryAgain) return [3 /*break*/, 8]; + stall = 0; + retryAfter = response.headers["retry-after"]; + if (typeof (retryAfter) === "string" && retryAfter.match(/^[1-9][0-9]*$/)) { + stall = parseInt(retryAfter) * 1000; + } + else { + stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + } + //console.log("Stalling 429"); + return [4 /*yield*/, staller(stall)]; + case 7: + //console.log("Stalling 429"); + _a.sent(); + return [3 /*break*/, 19]; + case 8: return [3 /*break*/, 10]; + case 9: + error_1 = _a.sent(); + response = error_1.response; + if (response == null) { + runningTimeout.cancel(); + logger.throwError("missing response", lib.Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + serverError: error_1, + url: url + }); + } + return [3 /*break*/, 10]; + case 10: + body_1 = response.body; + if (allow304 && response.statusCode === 304) { + body_1 = null; + } + else if (response.statusCode < 200 || response.statusCode >= 300) { + runningTimeout.cancel(); + logger.throwError("bad response", lib.Logger.errors.SERVER_ERROR, { + status: response.statusCode, + headers: response.headers, + body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)), + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + } + if (!processFunc) return [3 /*break*/, 18]; + _a.label = 11; + case 11: + _a.trys.push([11, 13, , 18]); + return [4 /*yield*/, processFunc(body_1, response)]; + case 12: + result = _a.sent(); + runningTimeout.cancel(); + return [2 /*return*/, result]; + case 13: + error_2 = _a.sent(); + if (!(error_2.throttleRetry && attempt < attemptLimit)) return [3 /*break*/, 17]; + tryAgain = true; + if (!throttleCallback) return [3 /*break*/, 15]; + return [4 /*yield*/, throttleCallback(attempt, url)]; + case 14: + tryAgain = _a.sent(); + _a.label = 15; + case 15: + if (!tryAgain) return [3 /*break*/, 17]; + timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt))); + //console.log("Stalling callback"); + return [4 /*yield*/, staller(timeout_1)]; + case 16: + //console.log("Stalling callback"); + _a.sent(); + return [3 /*break*/, 19]; + case 17: + runningTimeout.cancel(); + logger.throwError("processing response error", lib.Logger.errors.SERVER_ERROR, { + body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)), + error: error_2, + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + }); + return [3 /*break*/, 18]; + case 18: + runningTimeout.cancel(); + // If we had a processFunc, it either returned a T or threw above. + // The "body" is now a Uint8Array. + return [2 /*return*/, body_1]; + case 19: + attempt++; + return [3 /*break*/, 1]; + case 20: return [2 /*return*/, logger.throwError("failed response", lib.Logger.errors.SERVER_ERROR, { + requestBody: bodyify(options.body, flatHeaders["content-type"]), + requestMethod: options.method, + url: url + })]; + } + }); + }); + })(); + return Promise.race([runningTimeout.promise, runningFetch]); + } + exports._fetchData = _fetchData; + function fetchJson(connection, json, processFunc) { + var processJsonFunc = function (value, response) { + var result = null; + if (value != null) { + try { + result = JSON.parse((0, lib$8.toUtf8String)(value)); + } + catch (error) { + logger.throwError("invalid JSON", lib.Logger.errors.SERVER_ERROR, { + body: value, + error: error + }); + } + } + if (processFunc) { + result = processFunc(result, response); + } + return result; + }; + // If we have json to send, we must + // - add content-type of application/json (unless already overridden) + // - convert the json to bytes + var body = null; + if (json != null) { + body = (0, lib$8.toUtf8Bytes)(json); + // Create a connection with the content-type set for JSON + var updated = (typeof (connection) === "string") ? ({ url: connection }) : (0, lib$3.shallowCopy)(connection); + if (updated.headers) { + var hasContentType = (Object.keys(updated.headers).filter(function (k) { return (k.toLowerCase() === "content-type"); }).length) !== 0; + if (!hasContentType) { + updated.headers = (0, lib$3.shallowCopy)(updated.headers); + updated.headers["content-type"] = "application/json"; + } + } + else { + updated.headers = { "content-type": "application/json" }; + } + connection = updated; + } + return _fetchData(connection, body, processJsonFunc); + } + exports.fetchJson = fetchJson; + function poll(func, options) { + if (!options) { + options = {}; + } + options = (0, lib$3.shallowCopy)(options); + if (options.floor == null) { + options.floor = 0; + } + if (options.ceiling == null) { + options.ceiling = 10000; + } + if (options.interval == null) { + options.interval = 250; + } + return new Promise(function (resolve, reject) { + var timer = null; + var done = false; + // Returns true if cancel was successful. Unsuccessful cancel means we're already done. + var cancel = function () { + if (done) { + return false; + } + done = true; + if (timer) { + clearTimeout(timer); + } + return true; + }; + if (options.timeout) { + timer = setTimeout(function () { + if (cancel()) { + reject(new Error("timeout")); + } + }, options.timeout); + } + var retryLimit = options.retryLimit; + var attempt = 0; + function check() { + return func().then(function (result) { + // If we have a result, or are allowed null then we're done + if (result !== undefined) { + if (cancel()) { + resolve(result); + } + } + else if (options.oncePoll) { + options.oncePoll.once("poll", check); + } + else if (options.onceBlock) { + options.onceBlock.once("block", check); + // Otherwise, exponential back-off (up to 10s) our next request + } + else if (!done) { + attempt++; + if (attempt > retryLimit) { + if (cancel()) { + reject(new Error("retry limit reached")); + } + return; + } + var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt))); + if (timeout < options.floor) { + timeout = options.floor; + } + if (timeout > options.ceiling) { + timeout = options.ceiling; + } + setTimeout(check, timeout); + } + return null; + }, function (error) { + if (cancel()) { + reject(error); + } + }); + } + check(); + }); + } + exports.poll = poll; + + }); + + var index$q = /*@__PURE__*/getDefaultExportFromCjs(lib$q); + + 'use strict'; + var ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'; + + // pre-compute lookup table + var ALPHABET_MAP = {}; + for (var z = 0; z < ALPHABET.length; z++) { + var x = ALPHABET.charAt(z); + + if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous') + ALPHABET_MAP[x] = z; + } + + function polymodStep (pre) { + var b = pre >> 25; + return ((pre & 0x1FFFFFF) << 5) ^ + (-((b >> 0) & 1) & 0x3b6a57b2) ^ + (-((b >> 1) & 1) & 0x26508e6d) ^ + (-((b >> 2) & 1) & 0x1ea119fa) ^ + (-((b >> 3) & 1) & 0x3d4233dd) ^ + (-((b >> 4) & 1) & 0x2a1462b3) + } + + function prefixChk (prefix) { + var chk = 1; + for (var i = 0; i < prefix.length; ++i) { + var c = prefix.charCodeAt(i); + if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')' + + chk = polymodStep(chk) ^ (c >> 5); + } + chk = polymodStep(chk); + + for (i = 0; i < prefix.length; ++i) { + var v = prefix.charCodeAt(i); + chk = polymodStep(chk) ^ (v & 0x1f); + } + return chk + } + + function encode (prefix, words, LIMIT) { + LIMIT = LIMIT || 90; + if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit') + + prefix = prefix.toLowerCase(); + + // determine chk mod + var chk = prefixChk(prefix); + if (typeof chk === 'string') throw new Error(chk) + + var result = prefix + '1'; + for (var i = 0; i < words.length; ++i) { + var x = words[i]; + if ((x >> 5) !== 0) throw new Error('Non 5-bit word') + + chk = polymodStep(chk) ^ x; + result += ALPHABET.charAt(x); + } + + for (i = 0; i < 6; ++i) { + chk = polymodStep(chk); + } + chk ^= 1; + + for (i = 0; i < 6; ++i) { + var v = (chk >> ((5 - i) * 5)) & 0x1f; + result += ALPHABET.charAt(v); + } + + return result + } + + function __decode (str, LIMIT) { + LIMIT = LIMIT || 90; + if (str.length < 8) return str + ' too short' + if (str.length > LIMIT) return 'Exceeds length limit' + + // don't allow mixed case + var lowered = str.toLowerCase(); + var uppered = str.toUpperCase(); + if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str + str = lowered; + + var split = str.lastIndexOf('1'); + if (split === -1) return 'No separator character for ' + str + if (split === 0) return 'Missing prefix for ' + str + + var prefix = str.slice(0, split); + var wordChars = str.slice(split + 1); + if (wordChars.length < 6) return 'Data too short' + + var chk = prefixChk(prefix); + if (typeof chk === 'string') return chk + + var words = []; + for (var i = 0; i < wordChars.length; ++i) { + var c = wordChars.charAt(i); + var v = ALPHABET_MAP[c]; + if (v === undefined) return 'Unknown character ' + c + chk = polymodStep(chk) ^ v; + + // not in the checksum? + if (i + 6 >= wordChars.length) continue + words.push(v); + } + + if (chk !== 1) return 'Invalid checksum for ' + str + return { prefix: prefix, words: words } + } + + function decodeUnsafe () { + var res = __decode.apply(null, arguments); + if (typeof res === 'object') return res + } + + function decode (str) { + var res = __decode.apply(null, arguments); + if (typeof res === 'object') return res + + throw new Error(res) + } + + function convert (data, inBits, outBits, pad) { + var value = 0; + var bits = 0; + var maxV = (1 << outBits) - 1; + + var result = []; + for (var i = 0; i < data.length; ++i) { + value = (value << inBits) | data[i]; + bits += inBits; + + while (bits >= outBits) { + bits -= outBits; + result.push((value >> bits) & maxV); + } + } + + if (pad) { + if (bits > 0) { + result.push((value << (outBits - bits)) & maxV); + } + } else { + if (bits >= inBits) return 'Excess padding' + if ((value << (outBits - bits)) & maxV) return 'Non-zero padding' + } + + return result + } + + function toWordsUnsafe (bytes) { + var res = convert(bytes, 8, 5, true); + if (Array.isArray(res)) return res + } + + function toWords (bytes) { + var res = convert(bytes, 8, 5, true); + if (Array.isArray(res)) return res + + throw new Error(res) + } + + function fromWordsUnsafe (words) { + var res = convert(words, 5, 8, false); + if (Array.isArray(res)) return res + } + + function fromWords (words) { + var res = convert(words, 5, 8, false); + if (Array.isArray(res)) return res + + throw new Error(res) + } + + var bech32 = { + decodeUnsafe: decodeUnsafe, + decode: decode, + encode: encode, + toWordsUnsafe: toWordsUnsafe, + toWords: toWords, + fromWordsUnsafe: fromWordsUnsafe, + fromWords: fromWords + }; + + var _version$I = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "providers/5.5.1"; + + }); + + var _version$J = /*@__PURE__*/getDefaultExportFromCjs(_version$I); + + var formatter = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.showThrottleMessage = exports.isCommunityResource = exports.isCommunityResourcable = exports.Formatter = void 0; + + + + + + + + + var logger = new lib.Logger(_version$I.version); + var Formatter = /** @class */ (function () { + function Formatter() { + var _newTarget = this.constructor; + logger.checkNew(_newTarget, Formatter); + this.formats = this.getDefaultFormats(); + } + Formatter.prototype.getDefaultFormats = function () { + var _this = this; + var formats = ({}); + var address = this.address.bind(this); + var bigNumber = this.bigNumber.bind(this); + var blockTag = this.blockTag.bind(this); + var data = this.data.bind(this); + var hash = this.hash.bind(this); + var hex = this.hex.bind(this); + var number = this.number.bind(this); + var type = this.type.bind(this); + var strictData = function (v) { return _this.data(v, true); }; + formats.transaction = { + hash: hash, + type: type, + accessList: Formatter.allowNull(this.accessList.bind(this), null), + blockHash: Formatter.allowNull(hash, null), + blockNumber: Formatter.allowNull(number, null), + transactionIndex: Formatter.allowNull(number, null), + confirmations: Formatter.allowNull(number, null), + from: address, + // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) + // must be set + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + gasLimit: bigNumber, + to: Formatter.allowNull(address, null), + value: bigNumber, + nonce: number, + data: data, + r: Formatter.allowNull(this.uint256), + s: Formatter.allowNull(this.uint256), + v: Formatter.allowNull(number), + creates: Formatter.allowNull(address, null), + raw: Formatter.allowNull(data), + }; + formats.transactionRequest = { + from: Formatter.allowNull(address), + nonce: Formatter.allowNull(number), + gasLimit: Formatter.allowNull(bigNumber), + gasPrice: Formatter.allowNull(bigNumber), + maxPriorityFeePerGas: Formatter.allowNull(bigNumber), + maxFeePerGas: Formatter.allowNull(bigNumber), + to: Formatter.allowNull(address), + value: Formatter.allowNull(bigNumber), + data: Formatter.allowNull(strictData), + type: Formatter.allowNull(number), + accessList: Formatter.allowNull(this.accessList.bind(this), null), + }; + formats.receiptLog = { + transactionIndex: number, + blockNumber: number, + transactionHash: hash, + address: address, + topics: Formatter.arrayOf(hash), + data: data, + logIndex: number, + blockHash: hash, + }; + formats.receipt = { + to: Formatter.allowNull(this.address, null), + from: Formatter.allowNull(this.address, null), + contractAddress: Formatter.allowNull(address, null), + transactionIndex: number, + // should be allowNull(hash), but broken-EIP-658 support is handled in receipt + root: Formatter.allowNull(hex), + gasUsed: bigNumber, + logsBloom: Formatter.allowNull(data), + blockHash: hash, + transactionHash: hash, + logs: Formatter.arrayOf(this.receiptLog.bind(this)), + blockNumber: number, + confirmations: Formatter.allowNull(number, null), + cumulativeGasUsed: bigNumber, + effectiveGasPrice: Formatter.allowNull(bigNumber), + status: Formatter.allowNull(number), + type: type + }; + formats.block = { + hash: hash, + parentHash: hash, + number: number, + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + gasLimit: bigNumber, + gasUsed: bigNumber, + miner: address, + extraData: data, + transactions: Formatter.allowNull(Formatter.arrayOf(hash)), + baseFeePerGas: Formatter.allowNull(bigNumber) + }; + formats.blockWithTransactions = (0, lib$3.shallowCopy)(formats.block); + formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))); + formats.filter = { + fromBlock: Formatter.allowNull(blockTag, undefined), + toBlock: Formatter.allowNull(blockTag, undefined), + blockHash: Formatter.allowNull(hash, undefined), + address: Formatter.allowNull(address, undefined), + topics: Formatter.allowNull(this.topics.bind(this), undefined), + }; + formats.filterLog = { + blockNumber: Formatter.allowNull(number), + blockHash: Formatter.allowNull(hash), + transactionIndex: number, + removed: Formatter.allowNull(this.boolean.bind(this)), + address: address, + data: Formatter.allowFalsish(data, "0x"), + topics: Formatter.arrayOf(hash), + transactionHash: hash, + logIndex: number, + }; + return formats; + }; + Formatter.prototype.accessList = function (accessList) { + return (0, lib$e.accessListify)(accessList || []); + }; + // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number + // Strict! Used on input. + Formatter.prototype.number = function (number) { + if (number === "0x") { + return 0; + } + return lib$2.BigNumber.from(number).toNumber(); + }; + Formatter.prototype.type = function (number) { + if (number === "0x" || number == null) { + return 0; + } + return lib$2.BigNumber.from(number).toNumber(); + }; + // Strict! Used on input. + Formatter.prototype.bigNumber = function (value) { + return lib$2.BigNumber.from(value); + }; + // Requires a boolean, "true" or "false"; returns a boolean + Formatter.prototype.boolean = function (value) { + if (typeof (value) === "boolean") { + return value; + } + if (typeof (value) === "string") { + value = value.toLowerCase(); + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + } + throw new Error("invalid boolean - " + value); + }; + Formatter.prototype.hex = function (value, strict) { + if (typeof (value) === "string") { + if (!strict && value.substring(0, 2) !== "0x") { + value = "0x" + value; + } + if ((0, lib$1.isHexString)(value)) { + return value.toLowerCase(); + } + } + return logger.throwArgumentError("invalid hash", "value", value); + }; + Formatter.prototype.data = function (value, strict) { + var result = this.hex(value, strict); + if ((result.length % 2) !== 0) { + throw new Error("invalid data; odd-length - " + value); + } + return result; + }; + // Requires an address + // Strict! Used on input. + Formatter.prototype.address = function (value) { + return (0, lib$6.getAddress)(value); + }; + Formatter.prototype.callAddress = function (value) { + if (!(0, lib$1.isHexString)(value, 32)) { + return null; + } + var address = (0, lib$6.getAddress)((0, lib$1.hexDataSlice)(value, 12)); + return (address === lib$7.AddressZero) ? null : address; + }; + Formatter.prototype.contractAddress = function (value) { + return (0, lib$6.getContractAddress)(value); + }; + // Strict! Used on input. + Formatter.prototype.blockTag = function (blockTag) { + if (blockTag == null) { + return "latest"; + } + if (blockTag === "earliest") { + return "0x0"; + } + if (blockTag === "latest" || blockTag === "pending") { + return blockTag; + } + if (typeof (blockTag) === "number" || (0, lib$1.isHexString)(blockTag)) { + return (0, lib$1.hexValue)(blockTag); + } + throw new Error("invalid blockTag"); + }; + // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash. + Formatter.prototype.hash = function (value, strict) { + var result = this.hex(value, strict); + if ((0, lib$1.hexDataLength)(result) !== 32) { + return logger.throwArgumentError("invalid hash", "value", value); + } + return result; + }; + // Returns the difficulty as a number, or if too large (i.e. PoA network) null + Formatter.prototype.difficulty = function (value) { + if (value == null) { + return null; + } + var v = lib$2.BigNumber.from(value); + try { + return v.toNumber(); + } + catch (error) { } + return null; + }; + Formatter.prototype.uint256 = function (value) { + if (!(0, lib$1.isHexString)(value)) { + throw new Error("invalid uint256"); + } + return (0, lib$1.hexZeroPad)(value, 32); + }; + Formatter.prototype._block = function (value, format) { + if (value.author != null && value.miner == null) { + value.miner = value.author; + } + // The difficulty may need to come from _difficulty in recursed blocks + var difficulty = (value._difficulty != null) ? value._difficulty : value.difficulty; + var result = Formatter.check(format, value); + result._difficulty = ((difficulty == null) ? null : lib$2.BigNumber.from(difficulty)); + return result; + }; + Formatter.prototype.block = function (value) { + return this._block(value, this.formats.block); + }; + Formatter.prototype.blockWithTransactions = function (value) { + return this._block(value, this.formats.blockWithTransactions); + }; + // Strict! Used on input. + Formatter.prototype.transactionRequest = function (value) { + return Formatter.check(this.formats.transactionRequest, value); + }; + Formatter.prototype.transactionResponse = function (transaction) { + // Rename gas to gasLimit + if (transaction.gas != null && transaction.gasLimit == null) { + transaction.gasLimit = transaction.gas; + } + // Some clients (TestRPC) do strange things like return 0x0 for the + // 0 address; correct this to be a real address + if (transaction.to && lib$2.BigNumber.from(transaction.to).isZero()) { + transaction.to = "0x0000000000000000000000000000000000000000"; + } + // Rename input to data + if (transaction.input != null && transaction.data == null) { + transaction.data = transaction.input; + } + // If to and creates are empty, populate the creates from the transaction + if (transaction.to == null && transaction.creates == null) { + transaction.creates = this.contractAddress(transaction); + } + if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) { + transaction.accessList = []; + } + var result = Formatter.check(this.formats.transaction, transaction); + if (transaction.chainId != null) { + var chainId = transaction.chainId; + if ((0, lib$1.isHexString)(chainId)) { + chainId = lib$2.BigNumber.from(chainId).toNumber(); + } + result.chainId = chainId; + } + else { + var chainId = transaction.networkId; + // geth-etc returns chainId + if (chainId == null && result.v == null) { + chainId = transaction.chainId; + } + if ((0, lib$1.isHexString)(chainId)) { + chainId = lib$2.BigNumber.from(chainId).toNumber(); + } + if (typeof (chainId) !== "number" && result.v != null) { + chainId = (result.v - 35) / 2; + if (chainId < 0) { + chainId = 0; + } + chainId = parseInt(chainId); + } + if (typeof (chainId) !== "number") { + chainId = 0; + } + result.chainId = chainId; + } + // 0x0000... should actually be null + if (result.blockHash && result.blockHash.replace(/0/g, "") === "x") { + result.blockHash = null; + } + return result; + }; + Formatter.prototype.transaction = function (value) { + return (0, lib$e.parse)(value); + }; + Formatter.prototype.receiptLog = function (value) { + return Formatter.check(this.formats.receiptLog, value); + }; + Formatter.prototype.receipt = function (value) { + var result = Formatter.check(this.formats.receipt, value); + // RSK incorrectly implemented EIP-658, so we munge things a bit here for it + if (result.root != null) { + if (result.root.length <= 4) { + // Could be 0x00, 0x0, 0x01 or 0x1 + var value_1 = lib$2.BigNumber.from(result.root).toNumber(); + if (value_1 === 0 || value_1 === 1) { + // Make sure if both are specified, they match + if (result.status != null && (result.status !== value_1)) { + logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); + } + result.status = value_1; + delete result.root; + } + else { + logger.throwArgumentError("invalid alt-root-status", "value.root", result.root); + } + } + else if (result.root.length !== 66) { + // Must be a valid bytes32 + logger.throwArgumentError("invalid root hash", "value.root", result.root); + } + } + if (result.status != null) { + result.byzantium = true; + } + return result; + }; + Formatter.prototype.topics = function (value) { + var _this = this; + if (Array.isArray(value)) { + return value.map(function (v) { return _this.topics(v); }); + } + else if (value != null) { + return this.hash(value, true); + } + return null; + }; + Formatter.prototype.filter = function (value) { + return Formatter.check(this.formats.filter, value); + }; + Formatter.prototype.filterLog = function (value) { + return Formatter.check(this.formats.filterLog, value); + }; + Formatter.check = function (format, object) { + var result = {}; + for (var key in format) { + try { + var value = format[key](object[key]); + if (value !== undefined) { + result[key] = value; + } + } + catch (error) { + error.checkKey = key; + error.checkValue = object[key]; + throw error; + } + } + return result; + }; + // if value is null-ish, nullValue is returned + Formatter.allowNull = function (format, nullValue) { + return (function (value) { + if (value == null) { + return nullValue; + } + return format(value); + }); + }; + // If value is false-ish, replaceValue is returned + Formatter.allowFalsish = function (format, replaceValue) { + return (function (value) { + if (!value) { + return replaceValue; + } + return format(value); + }); + }; + // Requires an Array satisfying check + Formatter.arrayOf = function (format) { + return (function (array) { + if (!Array.isArray(array)) { + throw new Error("not an array"); + } + var result = []; + array.forEach(function (value) { + result.push(format(value)); + }); + return result; + }); + }; + return Formatter; + }()); + exports.Formatter = Formatter; + function isCommunityResourcable(value) { + return (value && typeof (value.isCommunityResource) === "function"); + } + exports.isCommunityResourcable = isCommunityResourcable; + function isCommunityResource(value) { + return (isCommunityResourcable(value) && value.isCommunityResource()); + } + exports.isCommunityResource = isCommunityResource; + // Show the throttle message only once + var throttleMessage = false; + function showThrottleMessage() { + if (throttleMessage) { + return; + } + throttleMessage = true; + console.log("========= NOTICE ========="); + console.log("Request-Rate Exceeded (this message will not be repeated)"); + console.log(""); + console.log("The default API keys for each service are provided as a highly-throttled,"); + console.log("community resource for low-traffic projects and early prototyping."); + console.log(""); + console.log("While your application will continue to function, we highly recommended"); + console.log("signing up for your own API keys to improve performance, increase your"); + console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."); + console.log(""); + console.log("For more details: https:/\/docs.ethers.io/api-keys/"); + console.log("=========================="); + } + exports.showThrottleMessage = showThrottleMessage; + + }); + + var formatter$1 = /*@__PURE__*/getDefaultExportFromCjs(formatter); + + var baseProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BaseProvider = exports.Resolver = exports.Event = void 0; + + + + + + + + + + + + var bech32_1 = __importDefault(bech32); + + + var logger = new lib.Logger(_version$I.version); + + ////////////////////////////// + // Event Serializeing + function checkTopic(topic) { + if (topic == null) { + return "null"; + } + if ((0, lib$1.hexDataLength)(topic) !== 32) { + logger.throwArgumentError("invalid topic", "topic", topic); + } + return topic.toLowerCase(); + } + function serializeTopics(topics) { + // Remove trailing null AND-topics; they are redundant + topics = topics.slice(); + while (topics.length > 0 && topics[topics.length - 1] == null) { + topics.pop(); + } + return topics.map(function (topic) { + if (Array.isArray(topic)) { + // Only track unique OR-topics + var unique_1 = {}; + topic.forEach(function (topic) { + unique_1[checkTopic(topic)] = true; + }); + // The order of OR-topics does not matter + var sorted = Object.keys(unique_1); + sorted.sort(); + return sorted.join("|"); + } + else { + return checkTopic(topic); + } + }).join("&"); + } + function deserializeTopics(data) { + if (data === "") { + return []; + } + return data.split(/&/g).map(function (topic) { + if (topic === "") { + return []; + } + var comps = topic.split("|").map(function (topic) { + return ((topic === "null") ? null : topic); + }); + return ((comps.length === 1) ? comps[0] : comps); + }); + } + function getEventTag(eventName) { + if (typeof (eventName) === "string") { + eventName = eventName.toLowerCase(); + if ((0, lib$1.hexDataLength)(eventName) === 32) { + return "tx:" + eventName; + } + if (eventName.indexOf(":") === -1) { + return eventName; + } + } + else if (Array.isArray(eventName)) { + return "filter:*:" + serializeTopics(eventName); + } + else if (lib$b.ForkEvent.isForkEvent(eventName)) { + logger.warn("not implemented"); + throw new Error("not implemented"); + } + else if (eventName && typeof (eventName) === "object") { + return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []); + } + throw new Error("invalid event - " + eventName); + } + ////////////////////////////// + // Helper Object + function getTime() { + return (new Date()).getTime(); + } + function stall(duration) { + return new Promise(function (resolve) { + setTimeout(resolve, duration); + }); + } + ////////////////////////////// + // Provider Object + /** + * EventType + * - "block" + * - "poll" + * - "didPoll" + * - "pending" + * - "error" + * - "network" + * - filter + * - topics array + * - transaction hash + */ + var PollableEvents = ["block", "network", "pending", "poll"]; + var Event = /** @class */ (function () { + function Event(tag, listener, once) { + (0, lib$3.defineReadOnly)(this, "tag", tag); + (0, lib$3.defineReadOnly)(this, "listener", listener); + (0, lib$3.defineReadOnly)(this, "once", once); + } + Object.defineProperty(Event.prototype, "event", { + get: function () { + switch (this.type) { + case "tx": + return this.hash; + case "filter": + return this.filter; + } + return this.tag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Event.prototype, "type", { + get: function () { + return this.tag.split(":")[0]; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Event.prototype, "hash", { + get: function () { + var comps = this.tag.split(":"); + if (comps[0] !== "tx") { + return null; + } + return comps[1]; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Event.prototype, "filter", { + get: function () { + var comps = this.tag.split(":"); + if (comps[0] !== "filter") { + return null; + } + var address = comps[1]; + var topics = deserializeTopics(comps[2]); + var filter = {}; + if (topics.length > 0) { + filter.topics = topics; + } + if (address && address !== "*") { + filter.address = address; + } + return filter; + }, + enumerable: false, + configurable: true + }); + Event.prototype.pollable = function () { + return (this.tag.indexOf(":") >= 0 || PollableEvents.indexOf(this.tag) >= 0); + }; + return Event; + }()); + exports.Event = Event; + ; + // https://github.com/satoshilabs/slips/blob/master/slip-0044.md + var coinInfos = { + "0": { symbol: "btc", p2pkh: 0x00, p2sh: 0x05, prefix: "bc" }, + "2": { symbol: "ltc", p2pkh: 0x30, p2sh: 0x32, prefix: "ltc" }, + "3": { symbol: "doge", p2pkh: 0x1e, p2sh: 0x16 }, + "60": { symbol: "eth", ilk: "eth" }, + "61": { symbol: "etc", ilk: "eth" }, + "700": { symbol: "xdai", ilk: "eth" }, + }; + function bytes32ify(value) { + return (0, lib$1.hexZeroPad)(lib$2.BigNumber.from(value).toHexString(), 32); + } + // Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d) + function base58Encode(data) { + return lib$g.Base58.encode((0, lib$1.concat)([data, (0, lib$1.hexDataSlice)((0, lib$h.sha256)((0, lib$h.sha256)(data)), 0, 4)])); + } + var matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + new RegExp("^(ipfs):/\/(.*)$", "i"), + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), + ]; + function _parseString(result) { + try { + return (0, lib$8.toUtf8String)(_parseBytes(result)); + } + catch (error) { } + return null; + } + function _parseBytes(result) { + if (result === "0x") { + return null; + } + var offset = lib$2.BigNumber.from((0, lib$1.hexDataSlice)(result, 0, 32)).toNumber(); + var length = lib$2.BigNumber.from((0, lib$1.hexDataSlice)(result, offset, offset + 32)).toNumber(); + return (0, lib$1.hexDataSlice)(result, offset + 32, offset + 32 + length); + } + var Resolver = /** @class */ (function () { + // The resolvedAddress is only for creating a ReverseLookup resolver + function Resolver(provider, address, name, resolvedAddress) { + (0, lib$3.defineReadOnly)(this, "provider", provider); + (0, lib$3.defineReadOnly)(this, "name", name); + (0, lib$3.defineReadOnly)(this, "address", provider.formatter.address(address)); + (0, lib$3.defineReadOnly)(this, "_resolvedAddress", resolvedAddress); + } + Resolver.prototype._fetchBytes = function (selector, parameters) { + return __awaiter(this, void 0, void 0, function () { + var tx, _a, error_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + tx = { + to: this.address, + data: (0, lib$1.hexConcat)([selector, (0, lib$9.namehash)(this.name), (parameters || "0x")]) + }; + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + _a = _parseBytes; + return [4 /*yield*/, this.provider.call(tx)]; + case 2: return [2 /*return*/, _a.apply(void 0, [_b.sent()])]; + case 3: + error_1 = _b.sent(); + if (error_1.code === lib.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + return [2 /*return*/, null]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + Resolver.prototype._getAddress = function (coinType, hexBytes) { + var coinInfo = coinInfos[String(coinType)]; + if (coinInfo == null) { + logger.throwError("unsupported coin type: " + coinType, lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress(" + coinType + ")" + }); + } + if (coinInfo.ilk === "eth") { + return this.provider.formatter.address(hexBytes); + } + var bytes = (0, lib$1.arrayify)(hexBytes); + // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + if (coinInfo.p2pkh != null) { + var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/); + if (p2pkh) { + var length_1 = parseInt(p2pkh[1], 16); + if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) { + return base58Encode((0, lib$1.concat)([[coinInfo.p2pkh], ("0x" + p2pkh[2])])); + } + } + } + // P2SH: OP_HASH160 OP_EQUAL + if (coinInfo.p2sh != null) { + var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/); + if (p2sh) { + var length_2 = parseInt(p2sh[1], 16); + if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) { + return base58Encode((0, lib$1.concat)([[coinInfo.p2sh], ("0x" + p2sh[2])])); + } + } + } + // Bech32 + if (coinInfo.prefix != null) { + var length_3 = bytes[1]; + // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program + var version_1 = bytes[0]; + if (version_1 === 0x00) { + if (length_3 !== 20 && length_3 !== 32) { + version_1 = -1; + } + } + else { + version_1 = -1; + } + if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) { + var words = bech32_1.default.toWords(bytes.slice(2)); + words.unshift(version_1); + return bech32_1.default.encode(coinInfo.prefix, words); + } + } + return null; + }; + Resolver.prototype.getAddress = function (coinType) { + return __awaiter(this, void 0, void 0, function () { + var transaction, hexBytes_1, error_2, hexBytes, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (coinType == null) { + coinType = 60; + } + if (!(coinType === 60)) return [3 /*break*/, 4]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + transaction = { + to: this.address, + data: ("0x3b3b57de" + (0, lib$9.namehash)(this.name).substring(2)) + }; + return [4 /*yield*/, this.provider.call(transaction)]; + case 2: + hexBytes_1 = _a.sent(); + // No address + if (hexBytes_1 === "0x" || hexBytes_1 === lib$7.HashZero) { + return [2 /*return*/, null]; + } + return [2 /*return*/, this.provider.formatter.callAddress(hexBytes_1)]; + case 3: + error_2 = _a.sent(); + if (error_2.code === lib.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + throw error_2; + case 4: return [4 /*yield*/, this._fetchBytes("0xf1cb7e06", bytes32ify(coinType))]; + case 5: + hexBytes = _a.sent(); + // No address + if (hexBytes == null || hexBytes === "0x") { + return [2 /*return*/, null]; + } + address = this._getAddress(coinType, hexBytes); + if (address == null) { + logger.throwError("invalid or unsupported coin data", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress(" + coinType + ")", + coinType: coinType, + data: hexBytes + }); + } + return [2 /*return*/, address]; + } + }); + }); + }; + Resolver.prototype.getAvatar = function () { + return __awaiter(this, void 0, void 0, function () { + var linkage, avatar, i, match, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, error_3; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + linkage = []; + _h.label = 1; + case 1: + _h.trys.push([1, 19, , 20]); + return [4 /*yield*/, this.getText("avatar")]; + case 2: + avatar = _h.sent(); + if (avatar == null) { + return [2 /*return*/, null]; + } + i = 0; + _h.label = 3; + case 3: + if (!(i < matchers.length)) return [3 /*break*/, 18]; + match = avatar.match(matchers[i]); + if (match == null) { + return [3 /*break*/, 17]; + } + _a = match[1]; + switch (_a) { + case "https": return [3 /*break*/, 4]; + case "data": return [3 /*break*/, 5]; + case "ipfs": return [3 /*break*/, 6]; + case "erc721": return [3 /*break*/, 7]; + case "erc1155": return [3 /*break*/, 7]; + } + return [3 /*break*/, 17]; + case 4: + linkage.push({ type: "url", content: avatar }); + return [2 /*return*/, { linkage: linkage, url: avatar }]; + case 5: + linkage.push({ type: "data", content: avatar }); + return [2 /*return*/, { linkage: linkage, url: avatar }]; + case 6: + linkage.push({ type: "ipfs", content: avatar }); + return [2 /*return*/, { linkage: linkage, url: "https://gateway.ipfs.io/ipfs/" + avatar.substring(7) }]; + case 7: + selector = (match[1] === "erc721") ? "0xc87b56dd" : "0x0e89341c"; + linkage.push({ type: match[1], content: avatar }); + _b = this._resolvedAddress; + if (_b) return [3 /*break*/, 9]; + return [4 /*yield*/, this.getAddress()]; + case 8: + _b = (_h.sent()); + _h.label = 9; + case 9: + owner = (_b); + comps = (match[2] || "").split("/"); + if (comps.length !== 2) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this.provider.formatter.address(comps[0])]; + case 10: + addr = _h.sent(); + tokenId = (0, lib$1.hexZeroPad)(lib$2.BigNumber.from(comps[1]).toHexString(), 32); + if (!(match[1] === "erc721")) return [3 /*break*/, 12]; + _d = (_c = this.provider.formatter).callAddress; + return [4 /*yield*/, this.provider.call({ + to: addr, data: (0, lib$1.hexConcat)(["0x6352211e", tokenId]) + })]; + case 11: + tokenOwner = _d.apply(_c, [_h.sent()]); + if (owner !== tokenOwner) { + return [2 /*return*/, null]; + } + linkage.push({ type: "owner", content: tokenOwner }); + return [3 /*break*/, 14]; + case 12: + if (!(match[1] === "erc1155")) return [3 /*break*/, 14]; + _f = (_e = lib$2.BigNumber).from; + return [4 /*yield*/, this.provider.call({ + to: addr, data: (0, lib$1.hexConcat)(["0x00fdd58e", (0, lib$1.hexZeroPad)(owner, 32), tokenId]) + })]; + case 13: + balance = _f.apply(_e, [_h.sent()]); + if (balance.isZero()) { + return [2 /*return*/, null]; + } + linkage.push({ type: "balance", content: balance.toString() }); + _h.label = 14; + case 14: + tx = { + to: this.provider.formatter.address(comps[0]), + data: (0, lib$1.hexConcat)([selector, tokenId]) + }; + _g = _parseString; + return [4 /*yield*/, this.provider.call(tx)]; + case 15: + metadataUrl = _g.apply(void 0, [_h.sent()]); + if (metadataUrl == null) { + return [2 /*return*/, null]; + } + linkage.push({ type: "metadata-url", content: metadataUrl }); + // ERC-1155 allows a generic {id} in the URL + if (match[1] === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + } + return [4 /*yield*/, (0, lib$q.fetchJson)(metadataUrl)]; + case 16: + metadata = _h.sent(); + // Pull the image URL out + if (!metadata || typeof (metadata.image) !== "string" || !metadata.image.match(/^(https:\/\/|data:)/i)) { + return [2 /*return*/, null]; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + linkage.push({ type: "url", content: metadata.image }); + return [2 /*return*/, { linkage: linkage, url: metadata.image }]; + case 17: + i++; + return [3 /*break*/, 3]; + case 18: return [3 /*break*/, 20]; + case 19: + error_3 = _h.sent(); + return [3 /*break*/, 20]; + case 20: return [2 /*return*/, null]; + } + }); + }); + }; + Resolver.prototype.getContentHash = function () { + return __awaiter(this, void 0, void 0, function () { + var hexBytes, ipfs, length_4, swarm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._fetchBytes("0xbc1c58d1")]; + case 1: + hexBytes = _a.sent(); + // No contenthash + if (hexBytes == null || hexBytes === "0x") { + return [2 /*return*/, null]; + } + ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipfs) { + length_4 = parseInt(ipfs[3], 16); + if (ipfs[4].length === length_4 * 2) { + return [2 /*return*/, "ipfs:/\/" + lib$g.Base58.encode("0x" + ipfs[1])]; + } + } + swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/); + if (swarm) { + if (swarm[1].length === (32 * 2)) { + return [2 /*return*/, "bzz:/\/" + swarm[1]]; + } + } + return [2 /*return*/, logger.throwError("invalid or unsupported content hash data", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getContentHash()", + data: hexBytes + })]; + } + }); + }); + }; + Resolver.prototype.getText = function (key) { + return __awaiter(this, void 0, void 0, function () { + var keyBytes, hexBytes; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + keyBytes = (0, lib$8.toUtf8Bytes)(key); + // The nodehash consumes the first slot, so the string pointer targets + // offset 64, with the length at offset 64 and data starting at offset 96 + keyBytes = (0, lib$1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]); + // Pad to word-size (32 bytes) + if ((keyBytes.length % 32) !== 0) { + keyBytes = (0, lib$1.concat)([keyBytes, (0, lib$1.hexZeroPad)("0x", 32 - (key.length % 32))]); + } + return [4 /*yield*/, this._fetchBytes("0x59d1d43c", (0, lib$1.hexlify)(keyBytes))]; + case 1: + hexBytes = _a.sent(); + if (hexBytes == null || hexBytes === "0x") { + return [2 /*return*/, null]; + } + return [2 /*return*/, (0, lib$8.toUtf8String)(hexBytes)]; + } + }); + }); + }; + return Resolver; + }()); + exports.Resolver = Resolver; + var defaultFormatter = null; + var nextPollId = 1; + var BaseProvider = /** @class */ (function (_super) { + __extends(BaseProvider, _super); + /** + * ready + * + * A Promise that resolves only once the provider is ready. + * + * Sub-classes that call the super with a network without a chainId + * MUST set this. Standard named networks have a known chainId. + * + */ + function BaseProvider(network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, lib$b.Provider); + _this = _super.call(this) || this; + // Events being listened to + _this._events = []; + _this._emitted = { block: -2 }; + _this.formatter = _newTarget.getFormatter(); + // If network is any, this Provider allows the underlying + // network to change dynamically, and we auto-detect the + // current network + (0, lib$3.defineReadOnly)(_this, "anyNetwork", (network === "any")); + if (_this.anyNetwork) { + network = _this.detectNetwork(); + } + if (network instanceof Promise) { + _this._networkPromise = network; + // Squash any "unhandled promise" errors; that do not need to be handled + network.catch(function (error) { }); + // Trigger initial network setting (async) + _this._ready().catch(function (error) { }); + } + else { + var knownNetwork = (0, lib$3.getStatic)(_newTarget, "getNetwork")(network); + if (knownNetwork) { + (0, lib$3.defineReadOnly)(_this, "_network", knownNetwork); + _this.emit("network", knownNetwork, null); + } + else { + logger.throwArgumentError("invalid network", "network", network); + } + } + _this._maxInternalBlockNumber = -1024; + _this._lastBlockNumber = -2; + _this._pollingInterval = 4000; + _this._fastQueryDate = 0; + return _this; + } + BaseProvider.prototype._ready = function () { + return __awaiter(this, void 0, void 0, function () { + var network, error_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(this._network == null)) return [3 /*break*/, 7]; + network = null; + if (!this._networkPromise) return [3 /*break*/, 4]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this._networkPromise]; + case 2: + network = _a.sent(); + return [3 /*break*/, 4]; + case 3: + error_4 = _a.sent(); + return [3 /*break*/, 4]; + case 4: + if (!(network == null)) return [3 /*break*/, 6]; + return [4 /*yield*/, this.detectNetwork()]; + case 5: + network = _a.sent(); + _a.label = 6; + case 6: + // This should never happen; every Provider sub-class should have + // suggested a network by here (or have thrown). + if (!network) { + logger.throwError("no network detected", lib.Logger.errors.UNKNOWN_ERROR, {}); + } + // Possible this call stacked so do not call defineReadOnly again + if (this._network == null) { + if (this.anyNetwork) { + this._network = network; + } + else { + (0, lib$3.defineReadOnly)(this, "_network", network); + } + this.emit("network", network, null); + } + _a.label = 7; + case 7: return [2 /*return*/, this._network]; + } + }); + }); + }; + Object.defineProperty(BaseProvider.prototype, "ready", { + // This will always return the most recently established network. + // For "any", this can change (a "network" event is emitted before + // any change is reflected); otherwise this cannot change + get: function () { + var _this = this; + return (0, lib$q.poll)(function () { + return _this._ready().then(function (network) { + return network; + }, function (error) { + // If the network isn't running yet, we will wait + if (error.code === lib.Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { + return undefined; + } + throw error; + }); + }); + }, + enumerable: false, + configurable: true + }); + // @TODO: Remove this and just create a singleton formatter + BaseProvider.getFormatter = function () { + if (defaultFormatter == null) { + defaultFormatter = new formatter.Formatter(); + } + return defaultFormatter; + }; + // @TODO: Remove this and just use getNetwork + BaseProvider.getNetwork = function (network) { + return (0, lib$o.getNetwork)((network == null) ? "homestead" : network); + }; + // Fetches the blockNumber, but will reuse any result that is less + // than maxAge old or has been requested since the last request + BaseProvider.prototype._getInternalBlockNumber = function (maxAge) { + return __awaiter(this, void 0, void 0, function () { + var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._ready()]; + case 1: + _a.sent(); + if (!(maxAge > 0)) return [3 /*break*/, 7]; + _a.label = 2; + case 2: + if (!this._internalBlockNumber) return [3 /*break*/, 7]; + internalBlockNumber = this._internalBlockNumber; + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, internalBlockNumber]; + case 4: + result = _a.sent(); + if ((getTime() - result.respTime) <= maxAge) { + return [2 /*return*/, result.blockNumber]; + } + // Too old; fetch a new value + return [3 /*break*/, 7]; + case 5: + error_5 = _a.sent(); + // The fetch rejected; if we are the first to get the + // rejection, drop through so we replace it with a new + // fetch; all others blocked will then get that fetch + // which won't match the one they "remembered" and loop + if (this._internalBlockNumber === internalBlockNumber) { + return [3 /*break*/, 7]; + } + return [3 /*break*/, 6]; + case 6: return [3 /*break*/, 2]; + case 7: + reqTime = getTime(); + checkInternalBlockNumber = (0, lib$3.resolveProperties)({ + blockNumber: this.perform("getBlockNumber", {}), + networkError: this.getNetwork().then(function (network) { return (null); }, function (error) { return (error); }) + }).then(function (_a) { + var blockNumber = _a.blockNumber, networkError = _a.networkError; + if (networkError) { + // Unremember this bad internal block number + if (_this._internalBlockNumber === checkInternalBlockNumber) { + _this._internalBlockNumber = null; + } + throw networkError; + } + var respTime = getTime(); + blockNumber = lib$2.BigNumber.from(blockNumber).toNumber(); + if (blockNumber < _this._maxInternalBlockNumber) { + blockNumber = _this._maxInternalBlockNumber; + } + _this._maxInternalBlockNumber = blockNumber; + _this._setFastBlockNumber(blockNumber); // @TODO: Still need this? + return { blockNumber: blockNumber, reqTime: reqTime, respTime: respTime }; + }); + this._internalBlockNumber = checkInternalBlockNumber; + // Swallow unhandled exceptions; if needed they are handled else where + checkInternalBlockNumber.catch(function (error) { + // Don't null the dead (rejected) fetch, if it has already been updated + if (_this._internalBlockNumber === checkInternalBlockNumber) { + _this._internalBlockNumber = null; + } + }); + return [4 /*yield*/, checkInternalBlockNumber]; + case 8: return [2 /*return*/, (_a.sent()).blockNumber]; + } + }); + }); + }; + BaseProvider.prototype.poll = function () { + return __awaiter(this, void 0, void 0, function () { + var pollId, runners, blockNumber, error_6, i; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + pollId = nextPollId++; + runners = []; + blockNumber = null; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this._getInternalBlockNumber(100 + this.pollingInterval / 2)]; + case 2: + blockNumber = _a.sent(); + return [3 /*break*/, 4]; + case 3: + error_6 = _a.sent(); + this.emit("error", error_6); + return [2 /*return*/]; + case 4: + this._setFastBlockNumber(blockNumber); + // Emit a poll event after we have the latest (fast) block number + this.emit("poll", pollId, blockNumber); + // If the block has not changed, meh. + if (blockNumber === this._lastBlockNumber) { + this.emit("didPoll", pollId); + return [2 /*return*/]; + } + // First polling cycle, trigger a "block" events + if (this._emitted.block === -2) { + this._emitted.block = blockNumber - 1; + } + if (Math.abs((this._emitted.block) - blockNumber) > 1000) { + logger.warn("network block skew detected; skipping block events (emitted=" + this._emitted.block + " blockNumber" + blockNumber + ")"); + this.emit("error", logger.makeError("network block skew detected", lib.Logger.errors.NETWORK_ERROR, { + blockNumber: blockNumber, + event: "blockSkew", + previousBlockNumber: this._emitted.block + })); + this.emit("block", blockNumber); + } + else { + // Notify all listener for each block that has passed + for (i = this._emitted.block + 1; i <= blockNumber; i++) { + this.emit("block", i); + } + } + // The emitted block was updated, check for obsolete events + if (this._emitted.block !== blockNumber) { + this._emitted.block = blockNumber; + Object.keys(this._emitted).forEach(function (key) { + // The block event does not expire + if (key === "block") { + return; + } + // The block we were at when we emitted this event + var eventBlockNumber = _this._emitted[key]; + // We cannot garbage collect pending transactions or blocks here + // They should be garbage collected by the Provider when setting + // "pending" events + if (eventBlockNumber === "pending") { + return; + } + // Evict any transaction hashes or block hashes over 12 blocks + // old, since they should not return null anyways + if (blockNumber - eventBlockNumber > 12) { + delete _this._emitted[key]; + } + }); + } + // First polling cycle + if (this._lastBlockNumber === -2) { + this._lastBlockNumber = blockNumber - 1; + } + // Find all transaction hashes we are waiting on + this._events.forEach(function (event) { + switch (event.type) { + case "tx": { + var hash_2 = event.hash; + var runner = _this.getTransactionReceipt(hash_2).then(function (receipt) { + if (!receipt || receipt.blockNumber == null) { + return null; + } + _this._emitted["t:" + hash_2] = receipt.blockNumber; + _this.emit(hash_2, receipt); + return null; + }).catch(function (error) { _this.emit("error", error); }); + runners.push(runner); + break; + } + case "filter": { + var filter_1 = event.filter; + filter_1.fromBlock = _this._lastBlockNumber + 1; + filter_1.toBlock = blockNumber; + var runner = _this.getLogs(filter_1).then(function (logs) { + if (logs.length === 0) { + return; + } + logs.forEach(function (log) { + _this._emitted["b:" + log.blockHash] = log.blockNumber; + _this._emitted["t:" + log.transactionHash] = log.blockNumber; + _this.emit(filter_1, log); + }); + }).catch(function (error) { _this.emit("error", error); }); + runners.push(runner); + break; + } + } + }); + this._lastBlockNumber = blockNumber; + // Once all events for this loop have been processed, emit "didPoll" + Promise.all(runners).then(function () { + _this.emit("didPoll", pollId); + }).catch(function (error) { _this.emit("error", error); }); + return [2 /*return*/]; + } + }); + }); + }; + // Deprecated; do not use this + BaseProvider.prototype.resetEventsBlock = function (blockNumber) { + this._lastBlockNumber = blockNumber - 1; + if (this.polling) { + this.poll(); + } + }; + Object.defineProperty(BaseProvider.prototype, "network", { + get: function () { + return this._network; + }, + enumerable: false, + configurable: true + }); + // This method should query the network if the underlying network + // can change, such as when connected to a JSON-RPC backend + BaseProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, logger.throwError("provider does not support network detection", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "provider.detectNetwork" + })]; + }); + }); + }; + BaseProvider.prototype.getNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var network, currentNetwork, error; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._ready()]; + case 1: + network = _a.sent(); + return [4 /*yield*/, this.detectNetwork()]; + case 2: + currentNetwork = _a.sent(); + if (!(network.chainId !== currentNetwork.chainId)) return [3 /*break*/, 5]; + if (!this.anyNetwork) return [3 /*break*/, 4]; + this._network = currentNetwork; + // Reset all internal block number guards and caches + this._lastBlockNumber = -2; + this._fastBlockNumber = null; + this._fastBlockNumberPromise = null; + this._fastQueryDate = 0; + this._emitted.block = -2; + this._maxInternalBlockNumber = -1024; + this._internalBlockNumber = null; + // The "network" event MUST happen before this method resolves + // so any events have a chance to unregister, so we stall an + // additional event loop before returning from /this/ call + this.emit("network", currentNetwork, network); + return [4 /*yield*/, stall(0)]; + case 3: + _a.sent(); + return [2 /*return*/, this._network]; + case 4: + error = logger.makeError("underlying network changed", lib.Logger.errors.NETWORK_ERROR, { + event: "changed", + network: network, + detectedNetwork: currentNetwork + }); + this.emit("error", error); + throw error; + case 5: return [2 /*return*/, network]; + } + }); + }); + }; + Object.defineProperty(BaseProvider.prototype, "blockNumber", { + get: function () { + var _this = this; + this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function (blockNumber) { + _this._setFastBlockNumber(blockNumber); + }, function (error) { }); + return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BaseProvider.prototype, "polling", { + get: function () { + return (this._poller != null); + }, + set: function (value) { + var _this = this; + if (value && !this._poller) { + this._poller = setInterval(function () { _this.poll(); }, this.pollingInterval); + if (!this._bootstrapPoll) { + this._bootstrapPoll = setTimeout(function () { + _this.poll(); + // We block additional polls until the polling interval + // is done, to prevent overwhelming the poll function + _this._bootstrapPoll = setTimeout(function () { + // If polling was disabled, something may require a poke + // since starting the bootstrap poll and it was disabled + if (!_this._poller) { + _this.poll(); + } + // Clear out the bootstrap so we can do another + _this._bootstrapPoll = null; + }, _this.pollingInterval); + }, 0); + } + } + else if (!value && this._poller) { + clearInterval(this._poller); + this._poller = null; + } + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BaseProvider.prototype, "pollingInterval", { + get: function () { + return this._pollingInterval; + }, + set: function (value) { + var _this = this; + if (typeof (value) !== "number" || value <= 0 || parseInt(String(value)) != value) { + throw new Error("invalid polling interval"); + } + this._pollingInterval = value; + if (this._poller) { + clearInterval(this._poller); + this._poller = setInterval(function () { _this.poll(); }, this._pollingInterval); + } + }, + enumerable: false, + configurable: true + }); + BaseProvider.prototype._getFastBlockNumber = function () { + var _this = this; + var now = getTime(); + // Stale block number, request a newer value + if ((now - this._fastQueryDate) > 2 * this._pollingInterval) { + this._fastQueryDate = now; + this._fastBlockNumberPromise = this.getBlockNumber().then(function (blockNumber) { + if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) { + _this._fastBlockNumber = blockNumber; + } + return _this._fastBlockNumber; + }); + } + return this._fastBlockNumberPromise; + }; + BaseProvider.prototype._setFastBlockNumber = function (blockNumber) { + // Older block, maybe a stale request + if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { + return; + } + // Update the time we updated the blocknumber + this._fastQueryDate = getTime(); + // Newer block number, use it + if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) { + this._fastBlockNumber = blockNumber; + this._fastBlockNumberPromise = Promise.resolve(blockNumber); + } + }; + BaseProvider.prototype.waitForTransaction = function (transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this._waitForTransaction(transactionHash, (confirmations == null) ? 1 : confirmations, timeout || 0, null)]; + }); + }); + }; + BaseProvider.prototype._waitForTransaction = function (transactionHash, confirmations, timeout, replaceable) { + return __awaiter(this, void 0, void 0, function () { + var receipt; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getTransactionReceipt(transactionHash)]; + case 1: + receipt = _a.sent(); + // Receipt is already good + if ((receipt ? receipt.confirmations : 0) >= confirmations) { + return [2 /*return*/, receipt]; + } + // Poll until the receipt is good... + return [2 /*return*/, new Promise(function (resolve, reject) { + var cancelFuncs = []; + var done = false; + var alreadyDone = function () { + if (done) { + return true; + } + done = true; + cancelFuncs.forEach(function (func) { func(); }); + return false; + }; + var minedHandler = function (receipt) { + if (receipt.confirmations < confirmations) { + return; + } + if (alreadyDone()) { + return; + } + resolve(receipt); + }; + _this.on(transactionHash, minedHandler); + cancelFuncs.push(function () { _this.removeListener(transactionHash, minedHandler); }); + if (replaceable) { + var lastBlockNumber_1 = replaceable.startBlock; + var scannedBlock_1 = null; + var replaceHandler_1 = function (blockNumber) { return __awaiter(_this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (done) { + return [2 /*return*/]; + } + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + return [4 /*yield*/, stall(1000)]; + case 1: + // Wait 1 second; this is only used in the case of a fault, so + // we will trade off a little bit of latency for more consistent + // results and fewer JSON-RPC calls + _a.sent(); + this.getTransactionCount(replaceable.from).then(function (nonce) { return __awaiter(_this, void 0, void 0, function () { + var mined, block, ti, tx, receipt_1, reason; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (done) { + return [2 /*return*/]; + } + if (!(nonce <= replaceable.nonce)) return [3 /*break*/, 1]; + lastBlockNumber_1 = blockNumber; + return [3 /*break*/, 9]; + case 1: return [4 /*yield*/, this.getTransaction(transactionHash)]; + case 2: + mined = _a.sent(); + if (mined && mined.blockNumber != null) { + return [2 /*return*/]; + } + // First time scanning. We start a little earlier for some + // wiggle room here to handle the eventually consistent nature + // of blockchain (e.g. the getTransactionCount was for a + // different block) + if (scannedBlock_1 == null) { + scannedBlock_1 = lastBlockNumber_1 - 3; + if (scannedBlock_1 < replaceable.startBlock) { + scannedBlock_1 = replaceable.startBlock; + } + } + _a.label = 3; + case 3: + if (!(scannedBlock_1 <= blockNumber)) return [3 /*break*/, 9]; + if (done) { + return [2 /*return*/]; + } + return [4 /*yield*/, this.getBlockWithTransactions(scannedBlock_1)]; + case 4: + block = _a.sent(); + ti = 0; + _a.label = 5; + case 5: + if (!(ti < block.transactions.length)) return [3 /*break*/, 8]; + tx = block.transactions[ti]; + // Successfully mined! + if (tx.hash === transactionHash) { + return [2 /*return*/]; + } + if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce)) return [3 /*break*/, 7]; + if (done) { + return [2 /*return*/]; + } + return [4 /*yield*/, this.waitForTransaction(tx.hash, confirmations)]; + case 6: + receipt_1 = _a.sent(); + // Already resolved or rejected (prolly a timeout) + if (alreadyDone()) { + return [2 /*return*/]; + } + reason = "replaced"; + if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) { + reason = "repriced"; + } + else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) { + reason = "cancelled"; + } + // Explain why we were replaced + reject(logger.makeError("transaction was replaced", lib.Logger.errors.TRANSACTION_REPLACED, { + cancelled: (reason === "replaced" || reason === "cancelled"), + reason: reason, + replacement: this._wrapTransaction(tx), + hash: transactionHash, + receipt: receipt_1 + })); + return [2 /*return*/]; + case 7: + ti++; + return [3 /*break*/, 5]; + case 8: + scannedBlock_1++; + return [3 /*break*/, 3]; + case 9: + if (done) { + return [2 /*return*/]; + } + this.once("block", replaceHandler_1); + return [2 /*return*/]; + } + }); + }); }, function (error) { + if (done) { + return; + } + _this.once("block", replaceHandler_1); + }); + return [2 /*return*/]; + } + }); + }); }; + if (done) { + return; + } + _this.once("block", replaceHandler_1); + cancelFuncs.push(function () { + _this.removeListener("block", replaceHandler_1); + }); + } + if (typeof (timeout) === "number" && timeout > 0) { + var timer_1 = setTimeout(function () { + if (alreadyDone()) { + return; + } + reject(logger.makeError("timeout exceeded", lib.Logger.errors.TIMEOUT, { timeout: timeout })); + }, timeout); + if (timer_1.unref) { + timer_1.unref(); + } + cancelFuncs.push(function () { clearTimeout(timer_1); }); + } + })]; + } + }); + }); + }; + BaseProvider.prototype.getBlockNumber = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this._getInternalBlockNumber(0)]; + }); + }); + }; + BaseProvider.prototype.getGasPrice = function () { + return __awaiter(this, void 0, void 0, function () { + var result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, this.perform("getGasPrice", {})]; + case 2: + result = _a.sent(); + try { + return [2 /*return*/, lib$2.BigNumber.from(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "getGasPrice", + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getBalance = function (addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getBalance", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, lib$2.BigNumber.from(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "getBalance", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getTransactionCount = function (addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getTransactionCount", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, lib$2.BigNumber.from(result).toNumber()]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "getTransactionCount", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getCode = function (addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getCode", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, (0, lib$1.hexlify)(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "getCode", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.getStorageAt = function (addressOrName, position, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + address: this._getAddress(addressOrName), + blockTag: this._getBlockTag(blockTag), + position: Promise.resolve(position).then(function (p) { return (0, lib$1.hexValue)(p); }) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getStorageAt", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, (0, lib$1.hexlify)(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "getStorageAt", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + // This should be called by any subclass wrapping a TransactionResponse + BaseProvider.prototype._wrapTransaction = function (tx, hash, startBlock) { + var _this = this; + if (hash != null && (0, lib$1.hexDataLength)(hash) !== 32) { + throw new Error("invalid response - sendTransaction"); + } + var result = tx; + // Check the hash we expect is the same as the hash the server reported + if (hash != null && tx.hash !== hash) { + logger.throwError("Transaction hash mismatch from Provider.sendTransaction.", lib.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash }); + } + result.wait = function (confirms, timeout) { return __awaiter(_this, void 0, void 0, function () { + var replacement, receipt; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (confirms == null) { + confirms = 1; + } + if (timeout == null) { + timeout = 0; + } + replacement = undefined; + if (confirms !== 0 && startBlock != null) { + replacement = { + data: tx.data, + from: tx.from, + nonce: tx.nonce, + to: tx.to, + value: tx.value, + startBlock: startBlock + }; + } + return [4 /*yield*/, this._waitForTransaction(tx.hash, confirms, timeout, replacement)]; + case 1: + receipt = _a.sent(); + if (receipt == null && confirms === 0) { + return [2 /*return*/, null]; + } + // No longer pending, allow the polling loop to garbage collect this + this._emitted["t:" + tx.hash] = receipt.blockNumber; + if (receipt.status === 0) { + logger.throwError("transaction failed", lib.Logger.errors.CALL_EXCEPTION, { + transactionHash: tx.hash, + transaction: tx, + receipt: receipt + }); + } + return [2 /*return*/, receipt]; + } + }); + }); }; + return result; + }; + BaseProvider.prototype.sendTransaction = function (signedTransaction) { + return __awaiter(this, void 0, void 0, function () { + var hexTx, tx, blockNumber, hash, error_7; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, Promise.resolve(signedTransaction).then(function (t) { return (0, lib$1.hexlify)(t); })]; + case 2: + hexTx = _a.sent(); + tx = this.formatter.transaction(signedTransaction); + if (tx.confirmations == null) { + tx.confirmations = 0; + } + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 3: + blockNumber = _a.sent(); + _a.label = 4; + case 4: + _a.trys.push([4, 6, , 7]); + return [4 /*yield*/, this.perform("sendTransaction", { signedTransaction: hexTx })]; + case 5: + hash = _a.sent(); + return [2 /*return*/, this._wrapTransaction(tx, hash, blockNumber)]; + case 6: + error_7 = _a.sent(); + error_7.transaction = tx; + error_7.transactionHash = tx.hash; + throw error_7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getTransactionRequest = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var values, tx, _a, _b; + var _this = this; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, transaction]; + case 1: + values = _c.sent(); + tx = {}; + ["from", "to"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return (v ? _this._getAddress(v) : null); }); + }); + ["gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "value"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return (v ? lib$2.BigNumber.from(v) : null); }); + }); + ["type"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return ((v != null) ? v : null); }); + }); + if (values.accessList) { + tx.accessList = this.formatter.accessList(values.accessList); + } + ["data"].forEach(function (key) { + if (values[key] == null) { + return; + } + tx[key] = Promise.resolve(values[key]).then(function (v) { return (v ? (0, lib$1.hexlify)(v) : null); }); + }); + _b = (_a = this.formatter).transactionRequest; + return [4 /*yield*/, (0, lib$3.resolveProperties)(tx)]; + case 2: return [2 /*return*/, _b.apply(_a, [_c.sent()])]; + } + }); + }); + }; + BaseProvider.prototype._getFilter = function (filter) { + return __awaiter(this, void 0, void 0, function () { + var result, _a, _b; + var _this = this; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, filter]; + case 1: + filter = _c.sent(); + result = {}; + if (filter.address != null) { + result.address = this._getAddress(filter.address); + } + ["blockHash", "topics"].forEach(function (key) { + if (filter[key] == null) { + return; + } + result[key] = filter[key]; + }); + ["fromBlock", "toBlock"].forEach(function (key) { + if (filter[key] == null) { + return; + } + result[key] = _this._getBlockTag(filter[key]); + }); + _b = (_a = this.formatter).filter; + return [4 /*yield*/, (0, lib$3.resolveProperties)(result)]; + case 2: return [2 /*return*/, _b.apply(_a, [_c.sent()])]; + } + }); + }); + }; + BaseProvider.prototype.call = function (transaction, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("call", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, (0, lib$1.hexlify)(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "call", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.estimateGas = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ + transaction: this._getTransactionRequest(transaction) + })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("estimateGas", params)]; + case 3: + result = _a.sent(); + try { + return [2 /*return*/, lib$2.BigNumber.from(result)]; + } + catch (error) { + return [2 /*return*/, logger.throwError("bad result from backend", lib.Logger.errors.SERVER_ERROR, { + method: "estimateGas", + params: params, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getAddress = function (addressOrName) { + return __awaiter(this, void 0, void 0, function () { + var address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, addressOrName]; + case 1: + addressOrName = _a.sent(); + if (typeof (addressOrName) !== "string") { + logger.throwArgumentError("invalid address or ENS name", "name", addressOrName); + } + return [4 /*yield*/, this.resolveName(addressOrName)]; + case 2: + address = _a.sent(); + if (address == null) { + logger.throwError("ENS name not configured", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resolveName(" + JSON.stringify(addressOrName) + ")" + }); + } + return [2 /*return*/, address]; + } + }); + }); + }; + BaseProvider.prototype._getBlock = function (blockHashOrBlockTag, includeTransactions) { + return __awaiter(this, void 0, void 0, function () { + var blockNumber, params, _a, error_8; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _b.sent(); + return [4 /*yield*/, blockHashOrBlockTag]; + case 2: + blockHashOrBlockTag = _b.sent(); + blockNumber = -128; + params = { + includeTransactions: !!includeTransactions + }; + if (!(0, lib$1.isHexString)(blockHashOrBlockTag, 32)) return [3 /*break*/, 3]; + params.blockHash = blockHashOrBlockTag; + return [3 /*break*/, 6]; + case 3: + _b.trys.push([3, 5, , 6]); + _a = params; + return [4 /*yield*/, this._getBlockTag(blockHashOrBlockTag)]; + case 4: + _a.blockTag = _b.sent(); + if ((0, lib$1.isHexString)(params.blockTag)) { + blockNumber = parseInt(params.blockTag.substring(2), 16); + } + return [3 /*break*/, 6]; + case 5: + error_8 = _b.sent(); + logger.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); + return [3 /*break*/, 6]; + case 6: return [2 /*return*/, (0, lib$q.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var block, blockNumber_1, i, tx, confirmations, blockWithTxs; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.perform("getBlock", params)]; + case 1: + block = _a.sent(); + // Block was not found + if (block == null) { + // For blockhashes, if we didn't say it existed, that blockhash may + // not exist. If we did see it though, perhaps from a log, we know + // it exists, and this node is just not caught up yet. + if (params.blockHash != null) { + if (this._emitted["b:" + params.blockHash] == null) { + return [2 /*return*/, null]; + } + } + // For block tags, if we are asking for a future block, we return null + if (params.blockTag != null) { + if (blockNumber > this._emitted.block) { + return [2 /*return*/, null]; + } + } + // Retry on the next block + return [2 /*return*/, undefined]; + } + if (!includeTransactions) return [3 /*break*/, 8]; + blockNumber_1 = null; + i = 0; + _a.label = 2; + case 2: + if (!(i < block.transactions.length)) return [3 /*break*/, 7]; + tx = block.transactions[i]; + if (!(tx.blockNumber == null)) return [3 /*break*/, 3]; + tx.confirmations = 0; + return [3 /*break*/, 6]; + case 3: + if (!(tx.confirmations == null)) return [3 /*break*/, 6]; + if (!(blockNumber_1 == null)) return [3 /*break*/, 5]; + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 4: + blockNumber_1 = _a.sent(); + _a.label = 5; + case 5: + confirmations = (blockNumber_1 - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + _a.label = 6; + case 6: + i++; + return [3 /*break*/, 2]; + case 7: + blockWithTxs = this.formatter.blockWithTransactions(block); + blockWithTxs.transactions = blockWithTxs.transactions.map(function (tx) { return _this._wrapTransaction(tx); }); + return [2 /*return*/, blockWithTxs]; + case 8: return [2 /*return*/, this.formatter.block(block)]; + } + }); + }); }, { oncePoll: this })]; + } + }); + }); + }; + BaseProvider.prototype.getBlock = function (blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, false)); + }; + BaseProvider.prototype.getBlockWithTransactions = function (blockHashOrBlockTag) { + return (this._getBlock(blockHashOrBlockTag, true)); + }; + BaseProvider.prototype.getTransaction = function (transactionHash) { + return __awaiter(this, void 0, void 0, function () { + var params; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, transactionHash]; + case 2: + transactionHash = _a.sent(); + params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return [2 /*return*/, (0, lib$q.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var result, tx, blockNumber, confirmations; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.perform("getTransaction", params)]; + case 1: + result = _a.sent(); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, undefined]; + } + tx = this.formatter.transactionResponse(result); + if (!(tx.blockNumber == null)) return [3 /*break*/, 2]; + tx.confirmations = 0; + return [3 /*break*/, 4]; + case 2: + if (!(tx.confirmations == null)) return [3 /*break*/, 4]; + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 3: + blockNumber = _a.sent(); + confirmations = (blockNumber - tx.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + tx.confirmations = confirmations; + _a.label = 4; + case 4: return [2 /*return*/, this._wrapTransaction(tx)]; + } + }); + }); }, { oncePoll: this })]; + } + }); + }); + }; + BaseProvider.prototype.getTransactionReceipt = function (transactionHash) { + return __awaiter(this, void 0, void 0, function () { + var params; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, transactionHash]; + case 2: + transactionHash = _a.sent(); + params = { transactionHash: this.formatter.hash(transactionHash, true) }; + return [2 /*return*/, (0, lib$q.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var result, receipt, blockNumber, confirmations; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.perform("getTransactionReceipt", params)]; + case 1: + result = _a.sent(); + if (result == null) { + if (this._emitted["t:" + transactionHash] == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, undefined]; + } + // "geth-etc" returns receipts before they are ready + if (result.blockHash == null) { + return [2 /*return*/, undefined]; + } + receipt = this.formatter.receipt(result); + if (!(receipt.blockNumber == null)) return [3 /*break*/, 2]; + receipt.confirmations = 0; + return [3 /*break*/, 4]; + case 2: + if (!(receipt.confirmations == null)) return [3 /*break*/, 4]; + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 3: + blockNumber = _a.sent(); + confirmations = (blockNumber - receipt.blockNumber) + 1; + if (confirmations <= 0) { + confirmations = 1; + } + receipt.confirmations = confirmations; + _a.label = 4; + case 4: return [2 /*return*/, receipt]; + } + }); + }); }, { oncePoll: this })]; + } + }); + }); + }; + BaseProvider.prototype.getLogs = function (filter) { + return __awaiter(this, void 0, void 0, function () { + var params, logs; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [4 /*yield*/, (0, lib$3.resolveProperties)({ filter: this._getFilter(filter) })]; + case 2: + params = _a.sent(); + return [4 /*yield*/, this.perform("getLogs", params)]; + case 3: + logs = _a.sent(); + logs.forEach(function (log) { + if (log.removed == null) { + log.removed = false; + } + }); + return [2 /*return*/, formatter.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)]; + } + }); + }); + }; + BaseProvider.prototype.getEtherPrice = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + _a.sent(); + return [2 /*return*/, this.perform("getEtherPrice", {})]; + } + }); + }); + }; + BaseProvider.prototype._getBlockTag = function (blockTag) { + return __awaiter(this, void 0, void 0, function () { + var blockNumber; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, blockTag]; + case 1: + blockTag = _a.sent(); + if (!(typeof (blockTag) === "number" && blockTag < 0)) return [3 /*break*/, 3]; + if (blockTag % 1) { + logger.throwArgumentError("invalid BlockTag", "blockTag", blockTag); + } + return [4 /*yield*/, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)]; + case 2: + blockNumber = _a.sent(); + blockNumber += blockTag; + if (blockNumber < 0) { + blockNumber = 0; + } + return [2 /*return*/, this.formatter.blockTag(blockNumber)]; + case 3: return [2 /*return*/, this.formatter.blockTag(blockTag)]; + } + }); + }); + }; + BaseProvider.prototype.getResolver = function (name) { + return __awaiter(this, void 0, void 0, function () { + var address, error_9; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, this._getResolver(name)]; + case 1: + address = _a.sent(); + if (address == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, new Resolver(this, address, name)]; + case 2: + error_9 = _a.sent(); + if (error_9.code === lib.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + return [2 /*return*/, null]; + case 3: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getResolver = function (name) { + return __awaiter(this, void 0, void 0, function () { + var network, transaction, _a, _b, error_10; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, this.getNetwork()]; + case 1: + network = _c.sent(); + // No ENS... + if (!network.ensAddress) { + logger.throwError("network does not support ENS", lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: "ENS", network: network.name }); + } + transaction = { + to: network.ensAddress, + data: ("0x0178b8bf" + (0, lib$9.namehash)(name).substring(2)) + }; + _c.label = 2; + case 2: + _c.trys.push([2, 4, , 5]); + _b = (_a = this.formatter).callAddress; + return [4 /*yield*/, this.call(transaction)]; + case 3: return [2 /*return*/, _b.apply(_a, [_c.sent()])]; + case 4: + error_10 = _c.sent(); + if (error_10.code === lib.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + throw error_10; + case 5: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.resolveName = function (name) { + return __awaiter(this, void 0, void 0, function () { + var resolver; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, name]; + case 1: + name = _a.sent(); + // If it is already an address, nothing to resolve + try { + return [2 /*return*/, Promise.resolve(this.formatter.address(name))]; + } + catch (error) { + // If is is a hexstring, the address is bad (See #694) + if ((0, lib$1.isHexString)(name)) { + throw error; + } + } + if (typeof (name) !== "string") { + logger.throwArgumentError("invalid ENS name", "name", name); + } + return [4 /*yield*/, this.getResolver(name)]; + case 2: + resolver = _a.sent(); + if (!resolver) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, resolver.getAddress()]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + BaseProvider.prototype.lookupAddress = function (address) { + return __awaiter(this, void 0, void 0, function () { + var reverseName, resolverAddress, bytes, _a, length, name, addr; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, address]; + case 1: + address = _b.sent(); + address = this.formatter.address(address); + reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + return [4 /*yield*/, this._getResolver(reverseName)]; + case 2: + resolverAddress = _b.sent(); + if (!resolverAddress) { + return [2 /*return*/, null]; + } + _a = lib$1.arrayify; + return [4 /*yield*/, this.call({ + to: resolverAddress, + data: ("0x691f3431" + (0, lib$9.namehash)(reverseName).substring(2)) + })]; + case 3: + bytes = _a.apply(void 0, [_b.sent()]); + // Strip off the dynamic string pointer (0x20) + if (bytes.length < 32 || !lib$2.BigNumber.from(bytes.slice(0, 32)).eq(32)) { + return [2 /*return*/, null]; + } + bytes = bytes.slice(32); + // Not a length-prefixed string + if (bytes.length < 32) { + return [2 /*return*/, null]; + } + length = lib$2.BigNumber.from(bytes.slice(0, 32)).toNumber(); + bytes = bytes.slice(32); + // Length longer than available data + if (length > bytes.length) { + return [2 /*return*/, null]; + } + name = (0, lib$8.toUtf8String)(bytes.slice(0, length)); + return [4 /*yield*/, this.resolveName(name)]; + case 4: + addr = _b.sent(); + if (addr != address) { + return [2 /*return*/, null]; + } + return [2 /*return*/, name]; + } + }); + }); + }; + BaseProvider.prototype.getAvatar = function (nameOrAddress) { + return __awaiter(this, void 0, void 0, function () { + var resolver, address, reverseName, resolverAddress, avatar; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + resolver = null; + if (!(0, lib$1.isHexString)(nameOrAddress)) return [3 /*break*/, 2]; + address = this.formatter.address(nameOrAddress); + reverseName = address.substring(2).toLowerCase() + ".addr.reverse"; + return [4 /*yield*/, this._getResolver(reverseName)]; + case 1: + resolverAddress = _a.sent(); + if (!resolverAddress) { + return [2 /*return*/, null]; + } + resolver = new Resolver(this, resolverAddress, "_", address); + return [3 /*break*/, 4]; + case 2: return [4 /*yield*/, this.getResolver(nameOrAddress)]; + case 3: + // ENS name; forward lookup + resolver = _a.sent(); + if (!resolver) { + return [2 /*return*/, null]; + } + _a.label = 4; + case 4: return [4 /*yield*/, resolver.getAvatar()]; + case 5: + avatar = _a.sent(); + if (avatar == null) { + return [2 /*return*/, null]; + } + return [2 /*return*/, avatar.url]; + } + }); + }); + }; + BaseProvider.prototype.perform = function (method, params) { + return logger.throwError(method + " not implemented", lib.Logger.errors.NOT_IMPLEMENTED, { operation: method }); + }; + BaseProvider.prototype._startEvent = function (event) { + this.polling = (this._events.filter(function (e) { return e.pollable(); }).length > 0); + }; + BaseProvider.prototype._stopEvent = function (event) { + this.polling = (this._events.filter(function (e) { return e.pollable(); }).length > 0); + }; + BaseProvider.prototype._addEventListener = function (eventName, listener, once) { + var event = new Event(getEventTag(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + }; + BaseProvider.prototype.on = function (eventName, listener) { + return this._addEventListener(eventName, listener, false); + }; + BaseProvider.prototype.once = function (eventName, listener) { + return this._addEventListener(eventName, listener, true); + }; + BaseProvider.prototype.emit = function (eventName) { + var _this = this; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var result = false; + var stopped = []; + var eventTag = getEventTag(eventName); + this._events = this._events.filter(function (event) { + if (event.tag !== eventTag) { + return true; + } + setTimeout(function () { + event.listener.apply(_this, args); + }, 0); + result = true; + if (event.once) { + stopped.push(event); + return false; + } + return true; + }); + stopped.forEach(function (event) { _this._stopEvent(event); }); + return result; + }; + BaseProvider.prototype.listenerCount = function (eventName) { + if (!eventName) { + return this._events.length; + } + var eventTag = getEventTag(eventName); + return this._events.filter(function (event) { + return (event.tag === eventTag); + }).length; + }; + BaseProvider.prototype.listeners = function (eventName) { + if (eventName == null) { + return this._events.map(function (event) { return event.listener; }); + } + var eventTag = getEventTag(eventName); + return this._events + .filter(function (event) { return (event.tag === eventTag); }) + .map(function (event) { return event.listener; }); + }; + BaseProvider.prototype.off = function (eventName, listener) { + var _this = this; + if (listener == null) { + return this.removeAllListeners(eventName); + } + var stopped = []; + var found = false; + var eventTag = getEventTag(eventName); + this._events = this._events.filter(function (event) { + if (event.tag !== eventTag || event.listener != listener) { + return true; + } + if (found) { + return true; + } + found = true; + stopped.push(event); + return false; + }); + stopped.forEach(function (event) { _this._stopEvent(event); }); + return this; + }; + BaseProvider.prototype.removeAllListeners = function (eventName) { + var _this = this; + var stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + var eventTag_1 = getEventTag(eventName); + this._events = this._events.filter(function (event) { + if (event.tag !== eventTag_1) { + return true; + } + stopped.push(event); + return false; + }); + } + stopped.forEach(function (event) { _this._stopEvent(event); }); + return this; + }; + return BaseProvider; + }(lib$b.Provider)); + exports.BaseProvider = BaseProvider; + + }); + + var baseProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(baseProvider); + + var jsonRpcProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JsonRpcProvider = exports.JsonRpcSigner = void 0; + + + + + + + + + + + var logger = new lib.Logger(_version$I.version); + + var errorGas = ["call", "estimateGas"]; + function checkError(method, error, params) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === lib.Logger.errors.SERVER_ERROR) { + var e = error.error; + if (e && e.message.match("reverted") && (0, lib$1.isHexString)(e.data)) { + return e.data; + } + logger.throwError("missing revert data in call exception", lib.Logger.errors.CALL_EXCEPTION, { + error: error, + data: "0x" + }); + } + var message = error.message; + if (error.code === lib.Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + message = (message || "").toLowerCase(); + var transaction = params.transaction || params.signedTransaction; + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", lib.Logger.errors.INSUFFICIENT_FUNDS, { + error: error, + method: method, + transaction: transaction + }); + } + // "nonce too low" + if (message.match(/nonce too low/)) { + logger.throwError("nonce has already been used", lib.Logger.errors.NONCE_EXPIRED, { + error: error, + method: method, + transaction: transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced/)) { + logger.throwError("replacement fee too low", lib.Logger.errors.REPLACEMENT_UNDERPRICED, { + error: error, + method: method, + transaction: transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/only replay-protected/)) { + logger.throwError("legacy pre-eip-155 transactions not supported", lib.Logger.errors.UNSUPPORTED_OPERATION, { + error: error, + method: method, + transaction: transaction + }); + } + if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + method: method, + transaction: transaction + }); + } + throw error; + } + function timer(timeout) { + return new Promise(function (resolve) { + setTimeout(resolve, timeout); + }); + } + function getResult(payload) { + if (payload.error) { + // @TODO: not any + var error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + throw error; + } + return payload.result; + } + function getLowerCase(value) { + if (value) { + return value.toLowerCase(); + } + return value; + } + var _constructorGuard = {}; + var JsonRpcSigner = /** @class */ (function (_super) { + __extends(JsonRpcSigner, _super); + function JsonRpcSigner(constructorGuard, provider, addressOrIndex) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, JsonRpcSigner); + _this = _super.call(this) || this; + if (constructorGuard !== _constructorGuard) { + throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner"); + } + (0, lib$3.defineReadOnly)(_this, "provider", provider); + if (addressOrIndex == null) { + addressOrIndex = 0; + } + if (typeof (addressOrIndex) === "string") { + (0, lib$3.defineReadOnly)(_this, "_address", _this.provider.formatter.address(addressOrIndex)); + (0, lib$3.defineReadOnly)(_this, "_index", null); + } + else if (typeof (addressOrIndex) === "number") { + (0, lib$3.defineReadOnly)(_this, "_index", addressOrIndex); + (0, lib$3.defineReadOnly)(_this, "_address", null); + } + else { + logger.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); + } + return _this; + } + JsonRpcSigner.prototype.connect = function (provider) { + return logger.throwError("cannot alter JSON-RPC Signer connection", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "connect" + }); + }; + JsonRpcSigner.prototype.connectUnchecked = function () { + return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index); + }; + JsonRpcSigner.prototype.getAddress = function () { + var _this = this; + if (this._address) { + return Promise.resolve(this._address); + } + return this.provider.send("eth_accounts", []).then(function (accounts) { + if (accounts.length <= _this._index) { + logger.throwError("unknown account #" + _this._index, lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "getAddress" + }); + } + return _this.provider.formatter.address(accounts[_this._index]); + }); + }; + JsonRpcSigner.prototype.sendUncheckedTransaction = function (transaction) { + var _this = this; + transaction = (0, lib$3.shallowCopy)(transaction); + var fromAddress = this.getAddress().then(function (address) { + if (address) { + address = address.toLowerCase(); + } + return address; + }); + // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user + // wishes to use this, it is easy to specify explicitly, otherwise + // we look it up for them. + if (transaction.gasLimit == null) { + var estimate = (0, lib$3.shallowCopy)(transaction); + estimate.from = fromAddress; + transaction.gasLimit = this.provider.estimateGas(estimate); + } + if (transaction.to != null) { + transaction.to = Promise.resolve(transaction.to).then(function (to) { return __awaiter(_this, void 0, void 0, function () { + var address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (to == null) { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this.provider.resolveName(to)]; + case 1: + address = _a.sent(); + if (address == null) { + logger.throwArgumentError("provided ENS name resolves to null", "tx.to", to); + } + return [2 /*return*/, address]; + } + }); + }); }); + } + return (0, lib$3.resolveProperties)({ + tx: (0, lib$3.resolveProperties)(transaction), + sender: fromAddress + }).then(function (_a) { + var tx = _a.tx, sender = _a.sender; + if (tx.from != null) { + if (tx.from.toLowerCase() !== sender) { + logger.throwArgumentError("from address mismatch", "transaction", transaction); + } + } + else { + tx.from = sender; + } + var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true }); + return _this.provider.send("eth_sendTransaction", [hexTx]).then(function (hash) { + return hash; + }, function (error) { + return checkError("sendTransaction", error, hexTx); + }); + }); + }; + JsonRpcSigner.prototype.signTransaction = function (transaction) { + return logger.throwError("signing transactions is unsupported", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signTransaction" + }); + }; + JsonRpcSigner.prototype.sendTransaction = function (transaction) { + return __awaiter(this, void 0, void 0, function () { + var blockNumber, hash, error_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)]; + case 1: + blockNumber = _a.sent(); + return [4 /*yield*/, this.sendUncheckedTransaction(transaction)]; + case 2: + hash = _a.sent(); + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, (0, lib$q.poll)(function () { return __awaiter(_this, void 0, void 0, function () { + var tx; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.provider.getTransaction(hash)]; + case 1: + tx = _a.sent(); + if (tx === null) { + return [2 /*return*/, undefined]; + } + return [2 /*return*/, this.provider._wrapTransaction(tx, hash, blockNumber)]; + } + }); + }); }, { oncePoll: this.provider })]; + case 4: + // Unfortunately, JSON-RPC only provides and opaque transaction hash + // for a response, and we need the actual transaction, so we poll + // for it; it should show up very quickly + return [2 /*return*/, _a.sent()]; + case 5: + error_1 = _a.sent(); + error_1.transactionHash = hash; + throw error_1; + case 6: return [2 /*return*/]; + } + }); + }); + }; + JsonRpcSigner.prototype.signMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + var data, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = ((typeof (message) === "string") ? (0, lib$8.toUtf8Bytes)(message) : message); + return [4 /*yield*/, this.getAddress()]; + case 1: + address = _a.sent(); + return [4 /*yield*/, this.provider.send("personal_sign", [(0, lib$1.hexlify)(data), address.toLowerCase()])]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + JsonRpcSigner.prototype._legacySignMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + var data, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = ((typeof (message) === "string") ? (0, lib$8.toUtf8Bytes)(message) : message); + return [4 /*yield*/, this.getAddress()]; + case 1: + address = _a.sent(); + return [4 /*yield*/, this.provider.send("eth_sign", [address.toLowerCase(), (0, lib$1.hexlify)(data)])]; + case 2: + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + JsonRpcSigner.prototype._signTypedData = function (domain, types, value) { + return __awaiter(this, void 0, void 0, function () { + var populated, address; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, lib$9._TypedDataEncoder.resolveNames(domain, types, value, function (name) { + return _this.provider.resolveName(name); + })]; + case 1: + populated = _a.sent(); + return [4 /*yield*/, this.getAddress()]; + case 2: + address = _a.sent(); + return [4 /*yield*/, this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(lib$9._TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ])]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + JsonRpcSigner.prototype.unlock = function (password) { + return __awaiter(this, void 0, void 0, function () { + var provider, address; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + provider = this.provider; + return [4 /*yield*/, this.getAddress()]; + case 1: + address = _a.sent(); + return [2 /*return*/, provider.send("personal_unlockAccount", [address.toLowerCase(), password, null])]; + } + }); + }); + }; + return JsonRpcSigner; + }(lib$c.Signer)); + exports.JsonRpcSigner = JsonRpcSigner; + var UncheckedJsonRpcSigner = /** @class */ (function (_super) { + __extends(UncheckedJsonRpcSigner, _super); + function UncheckedJsonRpcSigner() { + return _super !== null && _super.apply(this, arguments) || this; + } + UncheckedJsonRpcSigner.prototype.sendTransaction = function (transaction) { + var _this = this; + return this.sendUncheckedTransaction(transaction).then(function (hash) { + return { + hash: hash, + nonce: null, + gasLimit: null, + gasPrice: null, + data: null, + value: null, + chainId: null, + confirmations: 0, + from: null, + wait: function (confirmations) { return _this.provider.waitForTransaction(hash, confirmations); } + }; + }); + }; + return UncheckedJsonRpcSigner; + }(JsonRpcSigner)); + var allowedTransactionKeys = { + chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true, + type: true, accessList: true, + maxFeePerGas: true, maxPriorityFeePerGas: true + }; + var JsonRpcProvider = /** @class */ (function (_super) { + __extends(JsonRpcProvider, _super); + function JsonRpcProvider(url, network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, JsonRpcProvider); + var networkOrReady = network; + // The network is unknown, query the JSON-RPC for it + if (networkOrReady == null) { + networkOrReady = new Promise(function (resolve, reject) { + setTimeout(function () { + _this.detectNetwork().then(function (network) { + resolve(network); + }, function (error) { + reject(error); + }); + }, 0); + }); + } + _this = _super.call(this, networkOrReady) || this; + // Default URL + if (!url) { + url = (0, lib$3.getStatic)(_this.constructor, "defaultUrl")(); + } + if (typeof (url) === "string") { + (0, lib$3.defineReadOnly)(_this, "connection", Object.freeze({ + url: url + })); + } + else { + (0, lib$3.defineReadOnly)(_this, "connection", Object.freeze((0, lib$3.shallowCopy)(url))); + } + _this._nextId = 42; + return _this; + } + Object.defineProperty(JsonRpcProvider.prototype, "_cache", { + get: function () { + if (this._eventLoopCache == null) { + this._eventLoopCache = {}; + } + return this._eventLoopCache; + }, + enumerable: false, + configurable: true + }); + JsonRpcProvider.defaultUrl = function () { + return "http:/\/localhost:8545"; + }; + JsonRpcProvider.prototype.detectNetwork = function () { + var _this = this; + if (!this._cache["detectNetwork"]) { + this._cache["detectNetwork"] = this._uncachedDetectNetwork(); + // Clear this cache at the beginning of the next event loop + setTimeout(function () { + _this._cache["detectNetwork"] = null; + }, 0); + } + return this._cache["detectNetwork"]; + }; + JsonRpcProvider.prototype._uncachedDetectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var chainId, error_2, error_3, getNetwork; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, timer(0)]; + case 1: + _a.sent(); + chainId = null; + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 9]); + return [4 /*yield*/, this.send("eth_chainId", [])]; + case 3: + chainId = _a.sent(); + return [3 /*break*/, 9]; + case 4: + error_2 = _a.sent(); + _a.label = 5; + case 5: + _a.trys.push([5, 7, , 8]); + return [4 /*yield*/, this.send("net_version", [])]; + case 6: + chainId = _a.sent(); + return [3 /*break*/, 8]; + case 7: + error_3 = _a.sent(); + return [3 /*break*/, 8]; + case 8: return [3 /*break*/, 9]; + case 9: + if (chainId != null) { + getNetwork = (0, lib$3.getStatic)(this.constructor, "getNetwork"); + try { + return [2 /*return*/, getNetwork(lib$2.BigNumber.from(chainId).toNumber())]; + } + catch (error) { + return [2 /*return*/, logger.throwError("could not detect network", lib.Logger.errors.NETWORK_ERROR, { + chainId: chainId, + event: "invalidNetwork", + serverError: error + })]; + } + } + return [2 /*return*/, logger.throwError("could not detect network", lib.Logger.errors.NETWORK_ERROR, { + event: "noNetwork" + })]; + } + }); + }); + }; + JsonRpcProvider.prototype.getSigner = function (addressOrIndex) { + return new JsonRpcSigner(_constructorGuard, this, addressOrIndex); + }; + JsonRpcProvider.prototype.getUncheckedSigner = function (addressOrIndex) { + return this.getSigner(addressOrIndex).connectUnchecked(); + }; + JsonRpcProvider.prototype.listAccounts = function () { + var _this = this; + return this.send("eth_accounts", []).then(function (accounts) { + return accounts.map(function (a) { return _this.formatter.address(a); }); + }); + }; + JsonRpcProvider.prototype.send = function (method, params) { + var _this = this; + var request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + this.emit("debug", { + action: "request", + request: (0, lib$3.deepCopy)(request), + provider: this + }); + // We can expand this in the future to any call, but for now these + // are the biggest wins and do not require any serializing parameters. + var cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0); + if (cache && this._cache[method]) { + return this._cache[method]; + } + var result = (0, lib$q.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function (result) { + _this.emit("debug", { + action: "response", + request: request, + response: result, + provider: _this + }); + return result; + }, function (error) { + _this.emit("debug", { + action: "response", + error: error, + request: request, + provider: _this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(function () { + _this._cache[method] = null; + }, 0); + } + return result; + }; + JsonRpcProvider.prototype.prepareRequest = function (method, params) { + switch (method) { + case "getBlockNumber": + return ["eth_blockNumber", []]; + case "getGasPrice": + return ["eth_gasPrice", []]; + case "getBalance": + return ["eth_getBalance", [getLowerCase(params.address), params.blockTag]]; + case "getTransactionCount": + return ["eth_getTransactionCount", [getLowerCase(params.address), params.blockTag]]; + case "getCode": + return ["eth_getCode", [getLowerCase(params.address), params.blockTag]]; + case "getStorageAt": + return ["eth_getStorageAt", [getLowerCase(params.address), params.position, params.blockTag]]; + case "sendTransaction": + return ["eth_sendRawTransaction", [params.signedTransaction]]; + case "getBlock": + if (params.blockTag) { + return ["eth_getBlockByNumber", [params.blockTag, !!params.includeTransactions]]; + } + else if (params.blockHash) { + return ["eth_getBlockByHash", [params.blockHash, !!params.includeTransactions]]; + } + return null; + case "getTransaction": + return ["eth_getTransactionByHash", [params.transactionHash]]; + case "getTransactionReceipt": + return ["eth_getTransactionReceipt", [params.transactionHash]]; + case "call": { + var hexlifyTransaction = (0, lib$3.getStatic)(this.constructor, "hexlifyTransaction"); + return ["eth_call", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]]; + } + case "estimateGas": { + var hexlifyTransaction = (0, lib$3.getStatic)(this.constructor, "hexlifyTransaction"); + return ["eth_estimateGas", [hexlifyTransaction(params.transaction, { from: true })]]; + } + case "getLogs": + if (params.filter && params.filter.address != null) { + params.filter.address = getLowerCase(params.filter.address); + } + return ["eth_getLogs", [params.filter]]; + default: + break; + } + return null; + }; + JsonRpcProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var tx, feeData, args, error_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(method === "call" || method === "estimateGas")) return [3 /*break*/, 2]; + tx = params.transaction; + if (!(tx && tx.type != null && lib$2.BigNumber.from(tx.type).isZero())) return [3 /*break*/, 2]; + if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null)) return [3 /*break*/, 2]; + return [4 /*yield*/, this.getFeeData()]; + case 1: + feeData = _a.sent(); + if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) { + // Network doesn't know about EIP-1559 (and hence type) + params = (0, lib$3.shallowCopy)(params); + params.transaction = (0, lib$3.shallowCopy)(tx); + delete params.transaction.type; + } + _a.label = 2; + case 2: + args = this.prepareRequest(method, params); + if (args == null) { + logger.throwError(method + " not implemented", lib.Logger.errors.NOT_IMPLEMENTED, { operation: method }); + } + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, this.send(args[0], args[1])]; + case 4: return [2 /*return*/, _a.sent()]; + case 5: + error_4 = _a.sent(); + return [2 /*return*/, checkError(method, error_4, params)]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + JsonRpcProvider.prototype._startEvent = function (event) { + if (event.tag === "pending") { + this._startPending(); + } + _super.prototype._startEvent.call(this, event); + }; + JsonRpcProvider.prototype._startPending = function () { + if (this._pendingFilter != null) { + return; + } + var self = this; + var pendingFilter = this.send("eth_newPendingTransactionFilter", []); + this._pendingFilter = pendingFilter; + pendingFilter.then(function (filterId) { + function poll() { + self.send("eth_getFilterChanges", [filterId]).then(function (hashes) { + if (self._pendingFilter != pendingFilter) { + return null; + } + var seq = Promise.resolve(); + hashes.forEach(function (hash) { + // @TODO: This should be garbage collected at some point... How? When? + self._emitted["t:" + hash.toLowerCase()] = "pending"; + seq = seq.then(function () { + return self.getTransaction(hash).then(function (tx) { + self.emit("pending", tx); + return null; + }); + }); + }); + return seq.then(function () { + return timer(1000); + }); + }).then(function () { + if (self._pendingFilter != pendingFilter) { + self.send("eth_uninstallFilter", [filterId]); + return; + } + setTimeout(function () { poll(); }, 0); + return null; + }).catch(function (error) { }); + } + poll(); + return filterId; + }).catch(function (error) { }); + }; + JsonRpcProvider.prototype._stopEvent = function (event) { + if (event.tag === "pending" && this.listenerCount("pending") === 0) { + this._pendingFilter = null; + } + _super.prototype._stopEvent.call(this, event); + }; + // Convert an ethers.js transaction into a JSON-RPC transaction + // - gasLimit => gas + // - All values hexlified + // - All numeric values zero-striped + // - All addresses are lowercased + // NOTE: This allows a TransactionRequest, but all values should be resolved + // before this is called + // @TODO: This will likely be removed in future versions and prepareRequest + // will be the preferred method for this. + JsonRpcProvider.hexlifyTransaction = function (transaction, allowExtra) { + // Check only allowed properties are given + var allowed = (0, lib$3.shallowCopy)(allowedTransactionKeys); + if (allowExtra) { + for (var key in allowExtra) { + if (allowExtra[key]) { + allowed[key] = true; + } + } + } + (0, lib$3.checkProperties)(transaction, allowed); + var result = {}; + // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros. + ["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + var value = (0, lib$1.hexValue)(transaction[key]); + if (key === "gasLimit") { + key = "gas"; + } + result[key] = value; + }); + ["from", "to", "data"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + result[key] = (0, lib$1.hexlify)(transaction[key]); + }); + if (transaction.accessList) { + result["accessList"] = (0, lib$e.accessListify)(transaction.accessList); + } + return result; + }; + return JsonRpcProvider; + }(baseProvider.BaseProvider)); + exports.JsonRpcProvider = JsonRpcProvider; + + }); + + var jsonRpcProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(jsonRpcProvider); + + var browserWs = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.WebSocket = void 0; + + + var WS = null; + exports.WebSocket = WS; + try { + exports.WebSocket = WS = WebSocket; + if (WS == null) { + throw new Error("inject please"); + } + } + catch (error) { + var logger_2 = new lib.Logger(_version$I.version); + exports.WebSocket = WS = function () { + logger_2.throwError("WebSockets not supported in this environment", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "new WebSocket()" + }); + }; + } + + }); + + var browserWs$1 = /*@__PURE__*/getDefaultExportFromCjs(browserWs); + + var websocketProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.WebSocketProvider = void 0; + + + + + + + var logger = new lib.Logger(_version$I.version); + /** + * Notes: + * + * This provider differs a bit from the polling providers. One main + * difference is how it handles consistency. The polling providers + * will stall responses to ensure a consistent state, while this + * WebSocket provider assumes the connected backend will manage this. + * + * For example, if a polling provider emits an event which indicates + * the event occurred in blockhash XXX, a call to fetch that block by + * its hash XXX, if not present will retry until it is present. This + * can occur when querying a pool of nodes that are mildly out of sync + * with each other. + */ + var NextId = 1; + // For more info about the Real-time Event API see: + // https://geth.ethereum.org/docs/rpc/pubsub + var WebSocketProvider = /** @class */ (function (_super) { + __extends(WebSocketProvider, _super); + function WebSocketProvider(url, network) { + var _this = this; + // This will be added in the future; please open an issue to expedite + if (network === "any") { + logger.throwError("WebSocketProvider does not support 'any' network yet", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "network:any" + }); + } + _this = _super.call(this, url, network) || this; + _this._pollingInterval = -1; + _this._wsReady = false; + (0, lib$3.defineReadOnly)(_this, "_websocket", new browserWs.WebSocket(_this.connection.url)); + (0, lib$3.defineReadOnly)(_this, "_requests", {}); + (0, lib$3.defineReadOnly)(_this, "_subs", {}); + (0, lib$3.defineReadOnly)(_this, "_subIds", {}); + (0, lib$3.defineReadOnly)(_this, "_detectNetwork", _super.prototype.detectNetwork.call(_this)); + // Stall sending requests until the socket is open... + _this._websocket.onopen = function () { + _this._wsReady = true; + Object.keys(_this._requests).forEach(function (id) { + _this._websocket.send(_this._requests[id].payload); + }); + }; + _this._websocket.onmessage = function (messageEvent) { + var data = messageEvent.data; + var result = JSON.parse(data); + if (result.id != null) { + var id = String(result.id); + var request = _this._requests[id]; + delete _this._requests[id]; + if (result.result !== undefined) { + request.callback(null, result.result); + _this.emit("debug", { + action: "response", + request: JSON.parse(request.payload), + response: result.result, + provider: _this + }); + } + else { + var error = null; + if (result.error) { + error = new Error(result.error.message || "unknown error"); + (0, lib$3.defineReadOnly)(error, "code", result.error.code || null); + (0, lib$3.defineReadOnly)(error, "response", data); + } + else { + error = new Error("unknown error"); + } + request.callback(error, undefined); + _this.emit("debug", { + action: "response", + error: error, + request: JSON.parse(request.payload), + provider: _this + }); + } + } + else if (result.method === "eth_subscription") { + // Subscription... + var sub = _this._subs[result.params.subscription]; + if (sub) { + //this.emit.apply(this, ); + sub.processFunc(result.params.result); + } + } + else { + console.warn("this should not happen"); + } + }; + // This Provider does not actually poll, but we want to trigger + // poll events for things that depend on them (like stalling for + // block and transaction lookups) + var fauxPoll = setInterval(function () { + _this.emit("poll"); + }, 1000); + if (fauxPoll.unref) { + fauxPoll.unref(); + } + return _this; + } + WebSocketProvider.prototype.detectNetwork = function () { + return this._detectNetwork; + }; + Object.defineProperty(WebSocketProvider.prototype, "pollingInterval", { + get: function () { + return 0; + }, + set: function (value) { + logger.throwError("cannot set polling interval on WebSocketProvider", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPollingInterval" + }); + }, + enumerable: false, + configurable: true + }); + WebSocketProvider.prototype.resetEventsBlock = function (blockNumber) { + logger.throwError("cannot reset events block on WebSocketProvider", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "resetEventBlock" + }); + }; + WebSocketProvider.prototype.poll = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, null]; + }); + }); + }; + Object.defineProperty(WebSocketProvider.prototype, "polling", { + set: function (value) { + if (!value) { + return; + } + logger.throwError("cannot set polling on WebSocketProvider", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "setPolling" + }); + }, + enumerable: false, + configurable: true + }); + WebSocketProvider.prototype.send = function (method, params) { + var _this = this; + var rid = NextId++; + return new Promise(function (resolve, reject) { + function callback(error, result) { + if (error) { + return reject(error); + } + return resolve(result); + } + var payload = JSON.stringify({ + method: method, + params: params, + id: rid, + jsonrpc: "2.0" + }); + _this.emit("debug", { + action: "request", + request: JSON.parse(payload), + provider: _this + }); + _this._requests[String(rid)] = { callback: callback, payload: payload }; + if (_this._wsReady) { + _this._websocket.send(payload); + } + }); + }; + WebSocketProvider.defaultUrl = function () { + return "ws:/\/localhost:8546"; + }; + WebSocketProvider.prototype._subscribe = function (tag, param, processFunc) { + return __awaiter(this, void 0, void 0, function () { + var subIdPromise, subId; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + subIdPromise = this._subIds[tag]; + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then(function (param) { + return _this.send("eth_subscribe", param); + }); + this._subIds[tag] = subIdPromise; + } + return [4 /*yield*/, subIdPromise]; + case 1: + subId = _a.sent(); + this._subs[subId] = { tag: tag, processFunc: processFunc }; + return [2 /*return*/]; + } + }); + }); + }; + WebSocketProvider.prototype._startEvent = function (event) { + var _this = this; + switch (event.type) { + case "block": + this._subscribe("block", ["newHeads"], function (result) { + var blockNumber = lib$2.BigNumber.from(result.number).toNumber(); + _this._emitted.block = blockNumber; + _this.emit("block", blockNumber); + }); + break; + case "pending": + this._subscribe("pending", ["newPendingTransactions"], function (result) { + _this.emit("pending", result); + }); + break; + case "filter": + this._subscribe(event.tag, ["logs", this._getFilter(event.filter)], function (result) { + if (result.removed == null) { + result.removed = false; + } + _this.emit(event.filter, _this.formatter.filterLog(result)); + }); + break; + case "tx": { + var emitReceipt_1 = function (event) { + var hash = event.hash; + _this.getTransactionReceipt(hash).then(function (receipt) { + if (!receipt) { + return; + } + _this.emit(hash, receipt); + }); + }; + // In case it is already mined + emitReceipt_1(event); + // To keep things simple, we start up a single newHeads subscription + // to keep an eye out for transactions we are watching for. + // Starting a subscription for an event (i.e. "tx") that is already + // running is (basically) a nop. + this._subscribe("tx", ["newHeads"], function (result) { + _this._events.filter(function (e) { return (e.type === "tx"); }).forEach(emitReceipt_1); + }); + break; + } + // Nothing is needed + case "debug": + case "poll": + case "willPoll": + case "didPoll": + case "error": + break; + default: + console.log("unhandled:", event); + break; + } + }; + WebSocketProvider.prototype._stopEvent = function (event) { + var _this = this; + var tag = event.tag; + if (event.type === "tx") { + // There are remaining transaction event listeners + if (this._events.filter(function (e) { return (e.type === "tx"); }).length) { + return; + } + tag = "tx"; + } + else if (this.listenerCount(event.event)) { + // There are remaining event listeners + return; + } + var subId = this._subIds[tag]; + if (!subId) { + return; + } + delete this._subIds[tag]; + subId.then(function (subId) { + if (!_this._subs[subId]) { + return; + } + delete _this._subs[subId]; + _this.send("eth_unsubscribe", [subId]); + }); + }; + WebSocketProvider.prototype.destroy = function () { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(this._websocket.readyState === browserWs.WebSocket.CONNECTING)) return [3 /*break*/, 2]; + return [4 /*yield*/, (new Promise(function (resolve) { + _this._websocket.onopen = function () { + resolve(true); + }; + _this._websocket.onerror = function () { + resolve(false); + }; + }))]; + case 1: + _a.sent(); + _a.label = 2; + case 2: + // Hangup + // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes + this._websocket.close(1000); + return [2 /*return*/]; + } + }); + }); + }; + return WebSocketProvider; + }(jsonRpcProvider.JsonRpcProvider)); + exports.WebSocketProvider = WebSocketProvider; + + }); + + var websocketProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(websocketProvider); + + var urlJsonRpcProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.UrlJsonRpcProvider = exports.StaticJsonRpcProvider = void 0; + + + + var logger = new lib.Logger(_version$I.version); + + // A StaticJsonRpcProvider is useful when you *know* for certain that + // the backend will never change, as it never calls eth_chainId to + // verify its backend. However, if the backend does change, the effects + // are undefined and may include: + // - inconsistent results + // - locking up the UI + // - block skew warnings + // - wrong results + // If the network is not explicit (i.e. auto-detection is expected), the + // node MUST be running and available to respond to requests BEFORE this + // is instantiated. + var StaticJsonRpcProvider = /** @class */ (function (_super) { + __extends(StaticJsonRpcProvider, _super); + function StaticJsonRpcProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + StaticJsonRpcProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var network; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + network = this.network; + if (!(network == null)) return [3 /*break*/, 2]; + return [4 /*yield*/, _super.prototype.detectNetwork.call(this)]; + case 1: + network = _a.sent(); + if (!network) { + logger.throwError("no network detected", lib.Logger.errors.UNKNOWN_ERROR, {}); + } + // If still not set, set it + if (this._network == null) { + // A static network does not support "any" + (0, lib$3.defineReadOnly)(this, "_network", network); + this.emit("network", network, null); + } + _a.label = 2; + case 2: return [2 /*return*/, network]; + } + }); + }); + }; + return StaticJsonRpcProvider; + }(jsonRpcProvider.JsonRpcProvider)); + exports.StaticJsonRpcProvider = StaticJsonRpcProvider; + var UrlJsonRpcProvider = /** @class */ (function (_super) { + __extends(UrlJsonRpcProvider, _super); + function UrlJsonRpcProvider(network, apiKey) { + var _newTarget = this.constructor; + var _this = this; + logger.checkAbstract(_newTarget, UrlJsonRpcProvider); + // Normalize the Network and API Key + network = (0, lib$3.getStatic)(_newTarget, "getNetwork")(network); + apiKey = (0, lib$3.getStatic)(_newTarget, "getApiKey")(apiKey); + var connection = (0, lib$3.getStatic)(_newTarget, "getUrl")(network, apiKey); + _this = _super.call(this, connection, network) || this; + if (typeof (apiKey) === "string") { + (0, lib$3.defineReadOnly)(_this, "apiKey", apiKey); + } + else if (apiKey != null) { + Object.keys(apiKey).forEach(function (key) { + (0, lib$3.defineReadOnly)(_this, key, apiKey[key]); + }); + } + return _this; + } + UrlJsonRpcProvider.prototype._startPending = function () { + logger.warn("WARNING: API provider does not support pending filters"); + }; + UrlJsonRpcProvider.prototype.isCommunityResource = function () { + return false; + }; + UrlJsonRpcProvider.prototype.getSigner = function (address) { + return logger.throwError("API provider does not support signing", lib.Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" }); + }; + UrlJsonRpcProvider.prototype.listAccounts = function () { + return Promise.resolve([]); + }; + // Return a defaultApiKey if null, otherwise validate the API key + UrlJsonRpcProvider.getApiKey = function (apiKey) { + return apiKey; + }; + // Returns the url or connection for the given network and API key. The + // API key will have been sanitized by the getApiKey first, so any validation + // or transformations can be done there. + UrlJsonRpcProvider.getUrl = function (network, apiKey) { + return logger.throwError("not implemented; sub-classes must override getUrl", lib.Logger.errors.NOT_IMPLEMENTED, { + operation: "getUrl" + }); + }; + return UrlJsonRpcProvider; + }(StaticJsonRpcProvider)); + exports.UrlJsonRpcProvider = UrlJsonRpcProvider; + + }); + + var urlJsonRpcProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(urlJsonRpcProvider); + + var alchemyProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AlchemyProvider = exports.AlchemyWebSocketProvider = void 0; + + + + + + var logger = new lib.Logger(_version$I.version); + + // This key was provided to ethers.js by Alchemy to be used by the + // default provider, but it is recommended that for your own + // production environments, that you acquire your own API key at: + // https://dashboard.alchemyapi.io + var defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC"; + var AlchemyWebSocketProvider = /** @class */ (function (_super) { + __extends(AlchemyWebSocketProvider, _super); + function AlchemyWebSocketProvider(network, apiKey) { + var _this = this; + var provider = new AlchemyProvider(network, apiKey); + var url = provider.connection.url.replace(/^http/i, "ws") + .replace(".alchemyapi.", ".ws.alchemyapi."); + _this = _super.call(this, url, provider.network) || this; + (0, lib$3.defineReadOnly)(_this, "apiKey", provider.apiKey); + return _this; + } + AlchemyWebSocketProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + return AlchemyWebSocketProvider; + }(websocketProvider.WebSocketProvider)); + exports.AlchemyWebSocketProvider = AlchemyWebSocketProvider; + var AlchemyProvider = /** @class */ (function (_super) { + __extends(AlchemyProvider, _super); + function AlchemyProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + AlchemyProvider.getWebSocketProvider = function (network, apiKey) { + return new AlchemyWebSocketProvider(network, apiKey); + }; + AlchemyProvider.getApiKey = function (apiKey) { + if (apiKey == null) { + return defaultApiKey; + } + if (apiKey && typeof (apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey; + }; + AlchemyProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network.name) { + case "homestead": + host = "eth-mainnet.alchemyapi.io/v2/"; + break; + case "ropsten": + host = "eth-ropsten.alchemyapi.io/v2/"; + break; + case "rinkeby": + host = "eth-rinkeby.alchemyapi.io/v2/"; + break; + case "goerli": + host = "eth-goerli.alchemyapi.io/v2/"; + break; + case "kovan": + host = "eth-kovan.alchemyapi.io/v2/"; + break; + case "matic": + host = "polygon-mainnet.g.alchemy.com/v2/"; + break; + case "maticmum": + host = "polygon-mumbai.g.alchemy.com/v2/"; + break; + case "arbitrum": + host = "arb-mainnet.g.alchemy.com/v2/"; + break; + case "arbitrum-rinkeby": + host = "arb-rinkeby.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-kovan": + host = "opt-kovan.g.alchemy.com/v2/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return { + allowGzip: true, + url: ("https:/" + "/" + host + apiKey), + throttleCallback: function (attempt, url) { + if (apiKey === defaultApiKey) { + (0, formatter.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + }; + AlchemyProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + return AlchemyProvider; + }(urlJsonRpcProvider.UrlJsonRpcProvider)); + exports.AlchemyProvider = AlchemyProvider; + + }); + + var alchemyProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(alchemyProvider); + + var cloudflareProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CloudflareProvider = void 0; + + + + var logger = new lib.Logger(_version$I.version); + var CloudflareProvider = /** @class */ (function (_super) { + __extends(CloudflareProvider, _super); + function CloudflareProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + CloudflareProvider.getApiKey = function (apiKey) { + if (apiKey != null) { + logger.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); + } + return null; + }; + CloudflareProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network.name) { + case "homestead": + host = "https://cloudflare-eth.com/"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return host; + }; + CloudflareProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var block; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(method === "getBlockNumber")) return [3 /*break*/, 2]; + return [4 /*yield*/, _super.prototype.perform.call(this, "getBlock", { blockTag: "latest" })]; + case 1: + block = _a.sent(); + return [2 /*return*/, block.number]; + case 2: return [2 /*return*/, _super.prototype.perform.call(this, method, params)]; + } + }); + }); + }; + return CloudflareProvider; + }(urlJsonRpcProvider.UrlJsonRpcProvider)); + exports.CloudflareProvider = CloudflareProvider; + + }); + + var cloudflareProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(cloudflareProvider); + + var etherscanProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.EtherscanProvider = void 0; + + + + + + + + var logger = new lib.Logger(_version$I.version); + + // The transaction has already been sanitized by the calls in Provider + function getTransactionPostData(transaction) { + var result = {}; + for (var key in transaction) { + if (transaction[key] == null) { + continue; + } + var value = transaction[key]; + if (key === "type" && value === 0) { + continue; + } + // Quantity-types require no leading zero, unless 0 + if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) { + value = (0, lib$1.hexValue)((0, lib$1.hexlify)(value)); + } + else if (key === "accessList") { + value = "[" + (0, lib$e.accessListify)(value).map(function (set) { + return "{address:\"" + set.address + "\",storageKeys:[\"" + set.storageKeys.join('","') + "\"]}"; + }).join(",") + "]"; + } + else { + value = (0, lib$1.hexlify)(value); + } + result[key] = value; + } + return result; + } + function getResult(result) { + // getLogs, getHistory have weird success responses + if (result.status == 0 && (result.message === "No records found" || result.message === "No transactions found")) { + return result.result; + } + if (result.status != 1 || result.message != "OK") { + var error = new Error("invalid response"); + error.result = JSON.stringify(result); + if ((result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + error.throttleRetry = true; + } + throw error; + } + return result.result; + } + function getJsonResult(result) { + // This response indicates we are being throttled + if (result && result.status == 0 && result.message == "NOTOK" && (result.result || "").toLowerCase().indexOf("rate limit") >= 0) { + var error = new Error("throttled response"); + error.result = JSON.stringify(result); + error.throttleRetry = true; + throw error; + } + if (result.jsonrpc != "2.0") { + // @TODO: not any + var error = new Error("invalid response"); + error.result = JSON.stringify(result); + throw error; + } + if (result.error) { + // @TODO: not any + var error = new Error(result.error.message || "unknown error"); + if (result.error.code) { + error.code = result.error.code; + } + if (result.error.data) { + error.data = result.error.data; + } + throw error; + } + return result.result; + } + // The blockTag was normalized as a string by the Provider pre-perform operations + function checkLogTag(blockTag) { + if (blockTag === "pending") { + throw new Error("pending not supported"); + } + if (blockTag === "latest") { + return blockTag; + } + return parseInt(blockTag.substring(2), 16); + } + var defaultApiKey = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"; + function checkError(method, error, transaction) { + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call" && error.code === lib.Logger.errors.SERVER_ERROR) { + var e = error.error; + // Etherscan keeps changing their string + if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) { + // Etherscan prefixes the data like "Reverted 0x1234" + var data = e.data; + if (data) { + data = "0x" + data.replace(/^.*0x/i, ""); + } + if ((0, lib$1.isHexString)(data)) { + return data; + } + logger.throwError("missing revert data in call exception", lib.Logger.errors.CALL_EXCEPTION, { + error: error, + data: "0x" + }); + } + } + // Get the message from any nested error structure + var message = error.message; + if (error.code === lib.Logger.errors.SERVER_ERROR) { + if (error.error && typeof (error.error.message) === "string") { + message = error.error.message; + } + else if (typeof (error.body) === "string") { + message = error.body; + } + else if (typeof (error.responseText) === "string") { + message = error.responseText; + } + } + message = (message || "").toLowerCase(); + // "Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0" + if (message.match(/insufficient funds/)) { + logger.throwError("insufficient funds for intrinsic transaction cost", lib.Logger.errors.INSUFFICIENT_FUNDS, { + error: error, + method: method, + transaction: transaction + }); + } + // "Transaction with the same hash was already imported." + if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) { + logger.throwError("nonce has already been used", lib.Logger.errors.NONCE_EXPIRED, { + error: error, + method: method, + transaction: transaction + }); + } + // "Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce." + if (message.match(/another transaction with same nonce/)) { + logger.throwError("replacement fee too low", lib.Logger.errors.REPLACEMENT_UNDERPRICED, { + error: error, + method: method, + transaction: transaction + }); + } + if (message.match(/execution failed due to an exception|execution reverted/)) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error: error, + method: method, + transaction: transaction + }); + } + throw error; + } + var EtherscanProvider = /** @class */ (function (_super) { + __extends(EtherscanProvider, _super); + function EtherscanProvider(network, apiKey) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, EtherscanProvider); + _this = _super.call(this, network) || this; + (0, lib$3.defineReadOnly)(_this, "baseUrl", _this.getBaseUrl()); + (0, lib$3.defineReadOnly)(_this, "apiKey", apiKey || defaultApiKey); + return _this; + } + EtherscanProvider.prototype.getBaseUrl = function () { + switch (this.network ? this.network.name : "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "ropsten": + return "https:/\/api-ropsten.etherscan.io"; + case "rinkeby": + return "https:/\/api-rinkeby.etherscan.io"; + case "kovan": + return "https:/\/api-kovan.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + default: + } + return logger.throwArgumentError("unsupported network", "network", name); + }; + EtherscanProvider.prototype.getUrl = function (module, params) { + var query = Object.keys(params).reduce(function (accum, key) { + var value = params[key]; + if (value != null) { + accum += "&" + key + "=" + value; + } + return accum; + }, ""); + var apiKey = ((this.apiKey) ? "&apikey=" + this.apiKey : ""); + return this.baseUrl + "/api?module=" + module + query + apiKey; + }; + EtherscanProvider.prototype.getPostUrl = function () { + return this.baseUrl + "/api"; + }; + EtherscanProvider.prototype.getPostData = function (module, params) { + params.module = module; + params.apikey = this.apiKey; + return params; + }; + EtherscanProvider.prototype.fetch = function (module, params, post) { + return __awaiter(this, void 0, void 0, function () { + var url, payload, procFunc, connection, payloadStr, result; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + url = (post ? this.getPostUrl() : this.getUrl(module, params)); + payload = (post ? this.getPostData(module, params) : null); + procFunc = (module === "proxy") ? getJsonResult : getResult; + this.emit("debug", { + action: "request", + request: url, + provider: this + }); + connection = { + url: url, + throttleSlotInterval: 1000, + throttleCallback: function (attempt, url) { + if (_this.isCommunityResource()) { + (0, formatter.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + payloadStr = null; + if (payload) { + connection.headers = { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" }; + payloadStr = Object.keys(payload).map(function (key) { + return key + "=" + payload[key]; + }).join("&"); + } + return [4 /*yield*/, (0, lib$q.fetchJson)(connection, payloadStr, procFunc || getJsonResult)]; + case 1: + result = _a.sent(); + this.emit("debug", { + action: "response", + request: url, + response: (0, lib$3.deepCopy)(result), + provider: this + }); + return [2 /*return*/, result]; + } + }); + }); + }; + EtherscanProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.network]; + }); + }); + }; + EtherscanProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i, log, block, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _a = method; + switch (_a) { + case "getBlockNumber": return [3 /*break*/, 1]; + case "getGasPrice": return [3 /*break*/, 2]; + case "getBalance": return [3 /*break*/, 3]; + case "getTransactionCount": return [3 /*break*/, 4]; + case "getCode": return [3 /*break*/, 5]; + case "getStorageAt": return [3 /*break*/, 6]; + case "sendTransaction": return [3 /*break*/, 7]; + case "getBlock": return [3 /*break*/, 8]; + case "getTransaction": return [3 /*break*/, 9]; + case "getTransactionReceipt": return [3 /*break*/, 10]; + case "call": return [3 /*break*/, 11]; + case "estimateGas": return [3 /*break*/, 15]; + case "getLogs": return [3 /*break*/, 19]; + case "getEtherPrice": return [3 /*break*/, 26]; + } + return [3 /*break*/, 28]; + case 1: return [2 /*return*/, this.fetch("proxy", { action: "eth_blockNumber" })]; + case 2: return [2 /*return*/, this.fetch("proxy", { action: "eth_gasPrice" })]; + case 3: + // Returns base-10 result + return [2 /*return*/, this.fetch("account", { + action: "balance", + address: params.address, + tag: params.blockTag + })]; + case 4: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getTransactionCount", + address: params.address, + tag: params.blockTag + })]; + case 5: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getCode", + address: params.address, + tag: params.blockTag + })]; + case 6: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getStorageAt", + address: params.address, + position: params.position, + tag: params.blockTag + })]; + case 7: return [2 /*return*/, this.fetch("proxy", { + action: "eth_sendRawTransaction", + hex: params.signedTransaction + }, true).catch(function (error) { + return checkError("sendTransaction", error, params.signedTransaction); + })]; + case 8: + if (params.blockTag) { + return [2 /*return*/, this.fetch("proxy", { + action: "eth_getBlockByNumber", + tag: params.blockTag, + boolean: (params.includeTransactions ? "true" : "false") + })]; + } + throw new Error("getBlock by blockHash not implemented"); + case 9: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getTransactionByHash", + txhash: params.transactionHash + })]; + case 10: return [2 /*return*/, this.fetch("proxy", { + action: "eth_getTransactionReceipt", + txhash: params.transactionHash + })]; + case 11: + if (params.blockTag !== "latest") { + throw new Error("EtherscanProvider does not support blockTag for call"); + } + postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_call"; + _c.label = 12; + case 12: + _c.trys.push([12, 14, , 15]); + return [4 /*yield*/, this.fetch("proxy", postData, true)]; + case 13: return [2 /*return*/, _c.sent()]; + case 14: + error_1 = _c.sent(); + return [2 /*return*/, checkError("call", error_1, params.transaction)]; + case 15: + postData = getTransactionPostData(params.transaction); + postData.module = "proxy"; + postData.action = "eth_estimateGas"; + _c.label = 16; + case 16: + _c.trys.push([16, 18, , 19]); + return [4 /*yield*/, this.fetch("proxy", postData, true)]; + case 17: return [2 /*return*/, _c.sent()]; + case 18: + error_2 = _c.sent(); + return [2 /*return*/, checkError("estimateGas", error_2, params.transaction)]; + case 19: + args = { action: "getLogs" }; + if (params.filter.fromBlock) { + args.fromBlock = checkLogTag(params.filter.fromBlock); + } + if (params.filter.toBlock) { + args.toBlock = checkLogTag(params.filter.toBlock); + } + if (params.filter.address) { + args.address = params.filter.address; + } + // @TODO: We can handle slightly more complicated logs using the logs API + if (params.filter.topics && params.filter.topics.length > 0) { + if (params.filter.topics.length > 1) { + logger.throwError("unsupported topic count", lib.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); + } + if (params.filter.topics.length === 1) { + topic0 = params.filter.topics[0]; + if (typeof (topic0) !== "string" || topic0.length !== 66) { + logger.throwError("unsupported topic format", lib.Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 }); + } + args.topic0 = topic0; + } + } + return [4 /*yield*/, this.fetch("logs", args)]; + case 20: + logs = _c.sent(); + blocks = {}; + i = 0; + _c.label = 21; + case 21: + if (!(i < logs.length)) return [3 /*break*/, 25]; + log = logs[i]; + if (log.blockHash != null) { + return [3 /*break*/, 24]; + } + if (!(blocks[log.blockNumber] == null)) return [3 /*break*/, 23]; + return [4 /*yield*/, this.getBlock(log.blockNumber)]; + case 22: + block = _c.sent(); + if (block) { + blocks[log.blockNumber] = block.hash; + } + _c.label = 23; + case 23: + log.blockHash = blocks[log.blockNumber]; + _c.label = 24; + case 24: + i++; + return [3 /*break*/, 21]; + case 25: return [2 /*return*/, logs]; + case 26: + if (this.network.name !== "homestead") { + return [2 /*return*/, 0.0]; + } + _b = parseFloat; + return [4 /*yield*/, this.fetch("stats", { action: "ethprice" })]; + case 27: return [2 /*return*/, _b.apply(void 0, [(_c.sent()).ethusd])]; + case 28: return [3 /*break*/, 29]; + case 29: return [2 /*return*/, _super.prototype.perform.call(this, method, params)]; + } + }); + }); + }; + // Note: The `page` page parameter only allows pagination within the + // 10,000 window available without a page and offset parameter + // Error: Result window is too large, PageNo x Offset size must + // be less than or equal to 10000 + EtherscanProvider.prototype.getHistory = function (addressOrName, startBlock, endBlock) { + return __awaiter(this, void 0, void 0, function () { + var params, result; + var _a; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = { + action: "txlist" + }; + return [4 /*yield*/, this.resolveName(addressOrName)]; + case 1: + params = (_a.address = (_b.sent()), + _a.startblock = ((startBlock == null) ? 0 : startBlock), + _a.endblock = ((endBlock == null) ? 99999999 : endBlock), + _a.sort = "asc", + _a); + return [4 /*yield*/, this.fetch("account", params)]; + case 2: + result = _b.sent(); + return [2 /*return*/, result.map(function (tx) { + ["contractAddress", "to"].forEach(function (key) { + if (tx[key] == "") { + delete tx[key]; + } + }); + if (tx.creates == null && tx.contractAddress != null) { + tx.creates = tx.contractAddress; + } + var item = _this.formatter.transactionResponse(tx); + if (tx.timeStamp) { + item.timestamp = parseInt(tx.timeStamp); + } + return item; + })]; + } + }); + }); + }; + EtherscanProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + return EtherscanProvider; + }(baseProvider.BaseProvider)); + exports.EtherscanProvider = EtherscanProvider; + + }); + + var etherscanProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(etherscanProvider); + + var fallbackProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.FallbackProvider = void 0; + + + + + + + + + + + var logger = new lib.Logger(_version$I.version); + function now() { return (new Date()).getTime(); } + // Returns to network as long as all agree, or null if any is null. + // Throws an error if any two networks do not match. + function checkNetworks(networks) { + var result = null; + for (var i = 0; i < networks.length; i++) { + var network = networks[i]; + // Null! We do not know our network; bail. + if (network == null) { + return null; + } + if (result) { + // Make sure the network matches the previous networks + if (!(result.name === network.name && result.chainId === network.chainId && + ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) { + logger.throwArgumentError("provider mismatch", "networks", networks); + } + } + else { + result = network; + } + } + return result; + } + function median(values, maxDelta) { + values = values.slice().sort(); + var middle = Math.floor(values.length / 2); + // Odd length; take the middle + if (values.length % 2) { + return values[middle]; + } + // Even length; take the average of the two middle + var a = values[middle - 1], b = values[middle]; + if (maxDelta != null && Math.abs(a - b) > maxDelta) { + return null; + } + return (a + b) / 2; + } + function serialize(value) { + if (value === null) { + return "null"; + } + else if (typeof (value) === "number" || typeof (value) === "boolean") { + return JSON.stringify(value); + } + else if (typeof (value) === "string") { + return value; + } + else if (lib$2.BigNumber.isBigNumber(value)) { + return value.toString(); + } + else if (Array.isArray(value)) { + return JSON.stringify(value.map(function (i) { return serialize(i); })); + } + else if (typeof (value) === "object") { + var keys = Object.keys(value); + keys.sort(); + return "{" + keys.map(function (key) { + var v = value[key]; + if (typeof (v) === "function") { + v = "[function]"; + } + else { + v = serialize(v); + } + return JSON.stringify(key) + ":" + v; + }).join(",") + "}"; + } + throw new Error("unknown value type: " + typeof (value)); + } + // Next request ID to use for emitting debug info + var nextRid = 1; + ; + function stall(duration) { + var cancel = null; + var timer = null; + var promise = (new Promise(function (resolve) { + cancel = function () { + if (timer) { + clearTimeout(timer); + timer = null; + } + resolve(); + }; + timer = setTimeout(cancel, duration); + })); + var wait = function (func) { + promise = promise.then(func); + return promise; + }; + function getPromise() { + return promise; + } + return { cancel: cancel, getPromise: getPromise, wait: wait }; + } + var ForwardErrors = [ + lib.Logger.errors.CALL_EXCEPTION, + lib.Logger.errors.INSUFFICIENT_FUNDS, + lib.Logger.errors.NONCE_EXPIRED, + lib.Logger.errors.REPLACEMENT_UNDERPRICED, + lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT + ]; + var ForwardProperties = [ + "address", + "args", + "errorArgs", + "errorSignature", + "method", + "transaction", + ]; + ; + function exposeDebugConfig(config, now) { + var result = { + weight: config.weight + }; + Object.defineProperty(result, "provider", { get: function () { return config.provider; } }); + if (config.start) { + result.start = config.start; + } + if (now) { + result.duration = (now - config.start); + } + if (config.done) { + if (config.error) { + result.error = config.error; + } + else { + result.result = config.result || null; + } + } + return result; + } + function normalizedTally(normalize, quorum) { + return function (configs) { + // Count the votes for each result + var tally = {}; + configs.forEach(function (c) { + var value = normalize(c.result); + if (!tally[value]) { + tally[value] = { count: 0, result: c.result }; + } + tally[value].count++; + }); + // Check for a quorum on any given result + var keys = Object.keys(tally); + for (var i = 0; i < keys.length; i++) { + var check = tally[keys[i]]; + if (check.count >= quorum) { + return check.result; + } + } + // No quroum + return undefined; + }; + } + function getProcessFunc(provider, method, params) { + var normalize = serialize; + switch (method) { + case "getBlockNumber": + // Return the median value, unless there is (median + 1) is also + // present, in which case that is probably true and the median + // is going to be stale soon. In the event of a malicious node, + // the lie will be true soon enough. + return function (configs) { + var values = configs.map(function (c) { return c.result; }); + // Get the median block number + var blockNumber = median(configs.map(function (c) { return c.result; }), 2); + if (blockNumber == null) { + return undefined; + } + blockNumber = Math.ceil(blockNumber); + // If the next block height is present, its prolly safe to use + if (values.indexOf(blockNumber + 1) >= 0) { + blockNumber++; + } + // Don't ever roll back the blockNumber + if (blockNumber >= provider._highestBlockNumber) { + provider._highestBlockNumber = blockNumber; + } + return provider._highestBlockNumber; + }; + case "getGasPrice": + // Return the middle (round index up) value, similar to median + // but do not average even entries and choose the higher. + // Malicious actors must compromise 50% of the nodes to lie. + return function (configs) { + var values = configs.map(function (c) { return c.result; }); + values.sort(); + return values[Math.floor(values.length / 2)]; + }; + case "getEtherPrice": + // Returns the median price. Malicious actors must compromise at + // least 50% of the nodes to lie (in a meaningful way). + return function (configs) { + return median(configs.map(function (c) { return c.result; })); + }; + // No additional normalizing required; serialize is enough + case "getBalance": + case "getTransactionCount": + case "getCode": + case "getStorageAt": + case "call": + case "estimateGas": + case "getLogs": + break; + // We drop the confirmations from transactions as it is approximate + case "getTransaction": + case "getTransactionReceipt": + normalize = function (tx) { + if (tx == null) { + return null; + } + tx = (0, lib$3.shallowCopy)(tx); + tx.confirmations = -1; + return serialize(tx); + }; + break; + // We drop the confirmations from transactions as it is approximate + case "getBlock": + // We drop the confirmations from transactions as it is approximate + if (params.includeTransactions) { + normalize = function (block) { + if (block == null) { + return null; + } + block = (0, lib$3.shallowCopy)(block); + block.transactions = block.transactions.map(function (tx) { + tx = (0, lib$3.shallowCopy)(tx); + tx.confirmations = -1; + return tx; + }); + return serialize(block); + }; + } + else { + normalize = function (block) { + if (block == null) { + return null; + } + return serialize(block); + }; + } + break; + default: + throw new Error("unknown method: " + method); + } + // Return the result if and only if the expected quorum is + // satisfied and agreed upon for the final result. + return normalizedTally(normalize, provider.quorum); + } + // If we are doing a blockTag query, we need to make sure the backend is + // caught up to the FallbackProvider, before sending a request to it. + function waitForSync(config, blockNumber) { + return __awaiter(this, void 0, void 0, function () { + var provider; + return __generator(this, function (_a) { + provider = (config.provider); + if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) { + return [2 /*return*/, provider]; + } + return [2 /*return*/, (0, lib$q.poll)(function () { + return new Promise(function (resolve, reject) { + setTimeout(function () { + // We are synced + if (provider.blockNumber >= blockNumber) { + return resolve(provider); + } + // We're done; just quit + if (config.cancelled) { + return resolve(null); + } + // Try again, next block + return resolve(undefined); + }, 0); + }); + }, { oncePoll: provider })]; + }); + }); + } + function getRunner(config, currentBlockNumber, method, params) { + return __awaiter(this, void 0, void 0, function () { + var provider, _a, filter; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + provider = config.provider; + _a = method; + switch (_a) { + case "getBlockNumber": return [3 /*break*/, 1]; + case "getGasPrice": return [3 /*break*/, 1]; + case "getEtherPrice": return [3 /*break*/, 2]; + case "getBalance": return [3 /*break*/, 3]; + case "getTransactionCount": return [3 /*break*/, 3]; + case "getCode": return [3 /*break*/, 3]; + case "getStorageAt": return [3 /*break*/, 6]; + case "getBlock": return [3 /*break*/, 9]; + case "call": return [3 /*break*/, 12]; + case "estimateGas": return [3 /*break*/, 12]; + case "getTransaction": return [3 /*break*/, 15]; + case "getTransactionReceipt": return [3 /*break*/, 15]; + case "getLogs": return [3 /*break*/, 16]; + } + return [3 /*break*/, 19]; + case 1: return [2 /*return*/, provider[method]()]; + case 2: + if (provider.getEtherPrice) { + return [2 /*return*/, provider.getEtherPrice()]; + } + return [3 /*break*/, 19]; + case 3: + if (!(params.blockTag && (0, lib$1.isHexString)(params.blockTag))) return [3 /*break*/, 5]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 4: + provider = _b.sent(); + _b.label = 5; + case 5: return [2 /*return*/, provider[method](params.address, params.blockTag || "latest")]; + case 6: + if (!(params.blockTag && (0, lib$1.isHexString)(params.blockTag))) return [3 /*break*/, 8]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 7: + provider = _b.sent(); + _b.label = 8; + case 8: return [2 /*return*/, provider.getStorageAt(params.address, params.position, params.blockTag || "latest")]; + case 9: + if (!(params.blockTag && (0, lib$1.isHexString)(params.blockTag))) return [3 /*break*/, 11]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 10: + provider = _b.sent(); + _b.label = 11; + case 11: return [2 /*return*/, provider[(params.includeTransactions ? "getBlockWithTransactions" : "getBlock")](params.blockTag || params.blockHash)]; + case 12: + if (!(params.blockTag && (0, lib$1.isHexString)(params.blockTag))) return [3 /*break*/, 14]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 13: + provider = _b.sent(); + _b.label = 14; + case 14: return [2 /*return*/, provider[method](params.transaction)]; + case 15: return [2 /*return*/, provider[method](params.transactionHash)]; + case 16: + filter = params.filter; + if (!((filter.fromBlock && (0, lib$1.isHexString)(filter.fromBlock)) || (filter.toBlock && (0, lib$1.isHexString)(filter.toBlock)))) return [3 /*break*/, 18]; + return [4 /*yield*/, waitForSync(config, currentBlockNumber)]; + case 17: + provider = _b.sent(); + _b.label = 18; + case 18: return [2 /*return*/, provider.getLogs(filter)]; + case 19: return [2 /*return*/, logger.throwError("unknown method error", lib.Logger.errors.UNKNOWN_ERROR, { + method: method, + params: params + })]; + } + }); + }); + } + var FallbackProvider = /** @class */ (function (_super) { + __extends(FallbackProvider, _super); + function FallbackProvider(providers, quorum) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, FallbackProvider); + if (providers.length === 0) { + logger.throwArgumentError("missing providers", "providers", providers); + } + var providerConfigs = providers.map(function (configOrProvider, index) { + if (lib$b.Provider.isProvider(configOrProvider)) { + var stallTimeout = (0, formatter.isCommunityResource)(configOrProvider) ? 2000 : 750; + var priority = 1; + return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout: stallTimeout, priority: priority }); + } + var config = (0, lib$3.shallowCopy)(configOrProvider); + if (config.priority == null) { + config.priority = 1; + } + if (config.stallTimeout == null) { + config.stallTimeout = (0, formatter.isCommunityResource)(configOrProvider) ? 2000 : 750; + } + if (config.weight == null) { + config.weight = 1; + } + var weight = config.weight; + if (weight % 1 || weight > 512 || weight < 1) { + logger.throwArgumentError("invalid weight; must be integer in [1, 512]", "providers[" + index + "].weight", weight); + } + return Object.freeze(config); + }); + var total = providerConfigs.reduce(function (accum, c) { return (accum + c.weight); }, 0); + if (quorum == null) { + quorum = total / 2; + } + else if (quorum > total) { + logger.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); + } + // Are all providers' networks are known + var networkOrReady = checkNetworks(providerConfigs.map(function (c) { return (c.provider).network; })); + // Not all networks are known; we must stall + if (networkOrReady == null) { + networkOrReady = new Promise(function (resolve, reject) { + setTimeout(function () { + _this.detectNetwork().then(resolve, reject); + }, 0); + }); + } + _this = _super.call(this, networkOrReady) || this; + // Preserve a copy, so we do not get mutated + (0, lib$3.defineReadOnly)(_this, "providerConfigs", Object.freeze(providerConfigs)); + (0, lib$3.defineReadOnly)(_this, "quorum", quorum); + _this._highestBlockNumber = -1; + return _this; + } + FallbackProvider.prototype.detectNetwork = function () { + return __awaiter(this, void 0, void 0, function () { + var networks; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Promise.all(this.providerConfigs.map(function (c) { return c.provider.getNetwork(); }))]; + case 1: + networks = _a.sent(); + return [2 /*return*/, checkNetworks(networks)]; + } + }); + }); + }; + FallbackProvider.prototype.perform = function (method, params) { + return __awaiter(this, void 0, void 0, function () { + var results, i_1, result, processFunc, configs, currentBlockNumber, i, first, _loop_1, this_1, state_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(method === "sendTransaction")) return [3 /*break*/, 2]; + return [4 /*yield*/, Promise.all(this.providerConfigs.map(function (c) { + return c.provider.sendTransaction(params.signedTransaction).then(function (result) { + return result.hash; + }, function (error) { + return error; + }); + }))]; + case 1: + results = _a.sent(); + // Any success is good enough (other errors are likely "already seen" errors + for (i_1 = 0; i_1 < results.length; i_1++) { + result = results[i_1]; + if (typeof (result) === "string") { + return [2 /*return*/, result]; + } + } + // They were all an error; pick the first error + throw results[0]; + case 2: + if (!(this._highestBlockNumber === -1 && method !== "getBlockNumber")) return [3 /*break*/, 4]; + return [4 /*yield*/, this.getBlockNumber()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + processFunc = getProcessFunc(this, method, params); + configs = (0, lib$l.shuffled)(this.providerConfigs.map(lib$3.shallowCopy)); + configs.sort(function (a, b) { return (a.priority - b.priority); }); + currentBlockNumber = this._highestBlockNumber; + i = 0; + first = true; + _loop_1 = function () { + var t0, inflightWeight, _loop_2, waiting, results, result, errors; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + t0 = now(); + inflightWeight = configs.filter(function (c) { return (c.runner && ((t0 - c.start) < c.stallTimeout)); }) + .reduce(function (accum, c) { return (accum + c.weight); }, 0); + _loop_2 = function () { + var config = configs[i++]; + var rid = nextRid++; + config.start = now(); + config.staller = stall(config.stallTimeout); + config.staller.wait(function () { config.staller = null; }); + config.runner = getRunner(config, currentBlockNumber, method, params).then(function (result) { + config.done = true; + config.result = result; + if (_this.listenerCount("debug")) { + _this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: (0, lib$3.deepCopy)(params) }, + provider: _this + }); + } + }, function (error) { + config.done = true; + config.error = error; + if (_this.listenerCount("debug")) { + _this.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, now()), + request: { method: method, params: (0, lib$3.deepCopy)(params) }, + provider: _this + }); + } + }); + if (this_1.listenerCount("debug")) { + this_1.emit("debug", { + action: "request", + rid: rid, + backend: exposeDebugConfig(config, null), + request: { method: method, params: (0, lib$3.deepCopy)(params) }, + provider: this_1 + }); + } + inflightWeight += config.weight; + }; + // Start running enough to meet quorum + while (inflightWeight < this_1.quorum && i < configs.length) { + _loop_2(); + } + waiting = []; + configs.forEach(function (c) { + if (c.done || !c.runner) { + return; + } + waiting.push(c.runner); + if (c.staller) { + waiting.push(c.staller.getPromise()); + } + }); + if (!waiting.length) return [3 /*break*/, 2]; + return [4 /*yield*/, Promise.race(waiting)]; + case 1: + _b.sent(); + _b.label = 2; + case 2: + results = configs.filter(function (c) { return (c.done && c.error == null); }); + if (!(results.length >= this_1.quorum)) return [3 /*break*/, 5]; + result = processFunc(results); + if (result !== undefined) { + // Shut down any stallers + configs.forEach(function (c) { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return [2 /*return*/, { value: result }]; + } + if (!!first) return [3 /*break*/, 4]; + return [4 /*yield*/, stall(100).getPromise()]; + case 3: + _b.sent(); + _b.label = 4; + case 4: + first = false; + _b.label = 5; + case 5: + errors = configs.reduce(function (accum, c) { + if (!c.done || c.error == null) { + return accum; + } + var code = (c.error).code; + if (ForwardErrors.indexOf(code) >= 0) { + if (!accum[code]) { + accum[code] = { error: c.error, weight: 0 }; + } + accum[code].weight += c.weight; + } + return accum; + }, ({})); + Object.keys(errors).forEach(function (errorCode) { + var tally = errors[errorCode]; + if (tally.weight < _this.quorum) { + return; + } + // Shut down any stallers + configs.forEach(function (c) { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + var e = (tally.error); + var props = {}; + ForwardProperties.forEach(function (name) { + if (e[name] == null) { + return; + } + props[name] = e[name]; + }); + logger.throwError(e.reason || e.message, errorCode, props); + }); + // All configs have run to completion; we will never get more data + if (configs.filter(function (c) { return !c.done; }).length === 0) { + return [2 /*return*/, "break"]; + } + return [2 /*return*/]; + } + }); + }; + this_1 = this; + _a.label = 5; + case 5: + if (!true) return [3 /*break*/, 7]; + return [5 /*yield**/, _loop_1()]; + case 6: + state_1 = _a.sent(); + if (typeof state_1 === "object") + return [2 /*return*/, state_1.value]; + if (state_1 === "break") + return [3 /*break*/, 7]; + return [3 /*break*/, 5]; + case 7: + // Shut down any stallers; shouldn't be any + configs.forEach(function (c) { + if (c.staller) { + c.staller.cancel(); + } + c.cancelled = true; + }); + return [2 /*return*/, logger.throwError("failed to meet quorum", lib.Logger.errors.SERVER_ERROR, { + method: method, + params: params, + //results: configs.map((c) => c.result), + //errors: configs.map((c) => c.error), + results: configs.map(function (c) { return exposeDebugConfig(c); }), + provider: this + })]; + } + }); + }); + }; + return FallbackProvider; + }(baseProvider.BaseProvider)); + exports.FallbackProvider = FallbackProvider; + + }); + + var fallbackProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(fallbackProvider); + + var browserIpcProvider = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.IpcProvider = void 0; + var IpcProvider = null; + exports.IpcProvider = IpcProvider; + + }); + + var browserIpcProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(browserIpcProvider); + + var infuraProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.InfuraProvider = exports.InfuraWebSocketProvider = void 0; + + + + + + var logger = new lib.Logger(_version$I.version); + + var defaultProjectId = "84842078b09946638c03157f83405213"; + var InfuraWebSocketProvider = /** @class */ (function (_super) { + __extends(InfuraWebSocketProvider, _super); + function InfuraWebSocketProvider(network, apiKey) { + var _this = this; + var provider = new InfuraProvider(network, apiKey); + var connection = provider.connection; + if (connection.password) { + logger.throwError("INFURA WebSocket project secrets unsupported", lib.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "InfuraProvider.getWebSocketProvider()" + }); + } + var url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/"); + _this = _super.call(this, url, network) || this; + (0, lib$3.defineReadOnly)(_this, "apiKey", provider.projectId); + (0, lib$3.defineReadOnly)(_this, "projectId", provider.projectId); + (0, lib$3.defineReadOnly)(_this, "projectSecret", provider.projectSecret); + return _this; + } + InfuraWebSocketProvider.prototype.isCommunityResource = function () { + return (this.projectId === defaultProjectId); + }; + return InfuraWebSocketProvider; + }(websocketProvider.WebSocketProvider)); + exports.InfuraWebSocketProvider = InfuraWebSocketProvider; + var InfuraProvider = /** @class */ (function (_super) { + __extends(InfuraProvider, _super); + function InfuraProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + InfuraProvider.getWebSocketProvider = function (network, apiKey) { + return new InfuraWebSocketProvider(network, apiKey); + }; + InfuraProvider.getApiKey = function (apiKey) { + var apiKeyObj = { + apiKey: defaultProjectId, + projectId: defaultProjectId, + projectSecret: null + }; + if (apiKey == null) { + return apiKeyObj; + } + if (typeof (apiKey) === "string") { + apiKeyObj.projectId = apiKey; + } + else if (apiKey.projectSecret != null) { + logger.assertArgument((typeof (apiKey.projectId) === "string"), "projectSecret requires a projectId", "projectId", apiKey.projectId); + logger.assertArgument((typeof (apiKey.projectSecret) === "string"), "invalid projectSecret", "projectSecret", "[REDACTED]"); + apiKeyObj.projectId = apiKey.projectId; + apiKeyObj.projectSecret = apiKey.projectSecret; + } + else if (apiKey.projectId) { + apiKeyObj.projectId = apiKey.projectId; + } + apiKeyObj.apiKey = apiKeyObj.projectId; + return apiKeyObj; + }; + InfuraProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "mainnet.infura.io"; + break; + case "ropsten": + host = "ropsten.infura.io"; + break; + case "rinkeby": + host = "rinkeby.infura.io"; + break; + case "kovan": + host = "kovan.infura.io"; + break; + case "goerli": + host = "goerli.infura.io"; + break; + case "matic": + host = "polygon-mainnet.infura.io"; + break; + case "maticmum": + host = "polygon-mumbai.infura.io"; + break; + case "optimism": + host = "optimism-mainnet.infura.io"; + break; + case "optimism-kovan": + host = "optimism-kovan.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-rinkeby": + host = "arbitrum-rinkeby.infura.io"; + break; + default: + logger.throwError("unsupported network", lib.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + var connection = { + allowGzip: true, + url: ("https:/" + "/" + host + "/v3/" + apiKey.projectId), + throttleCallback: function (attempt, url) { + if (apiKey.projectId === defaultProjectId) { + (0, formatter.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret; + } + return connection; + }; + InfuraProvider.prototype.isCommunityResource = function () { + return (this.projectId === defaultProjectId); + }; + return InfuraProvider; + }(urlJsonRpcProvider.UrlJsonRpcProvider)); + exports.InfuraProvider = InfuraProvider; + + }); + + var infuraProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(infuraProvider); + + var jsonRpcBatchProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JsonRpcBatchProvider = void 0; + + + + // Experimental + var JsonRpcBatchProvider = /** @class */ (function (_super) { + __extends(JsonRpcBatchProvider, _super); + function JsonRpcBatchProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + JsonRpcBatchProvider.prototype.send = function (method, params) { + var _this = this; + var request = { + method: method, + params: params, + id: (this._nextId++), + jsonrpc: "2.0" + }; + if (this._pendingBatch == null) { + this._pendingBatch = []; + } + var inflightRequest = { request: request, resolve: null, reject: null }; + var promise = new Promise(function (resolve, reject) { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this._pendingBatch.push(inflightRequest); + if (!this._pendingBatchAggregator) { + // Schedule batch for next event loop + short duration + this._pendingBatchAggregator = setTimeout(function () { + // Get teh current batch and clear it, so new requests + // go into the next batch + var batch = _this._pendingBatch; + _this._pendingBatch = null; + _this._pendingBatchAggregator = null; + // Get the request as an array of requests + var request = batch.map(function (inflight) { return inflight.request; }); + _this.emit("debug", { + action: "requestBatch", + request: (0, lib$3.deepCopy)(request), + provider: _this + }); + return (0, lib$q.fetchJson)(_this.connection, JSON.stringify(request)).then(function (result) { + _this.emit("debug", { + action: "response", + request: request, + response: result, + provider: _this + }); + // For each result, feed it to the correct Promise, depending + // on whether it was a success or error + batch.forEach(function (inflightRequest, index) { + var payload = result[index]; + if (payload.error) { + var error = new Error(payload.error.message); + error.code = payload.error.code; + error.data = payload.error.data; + inflightRequest.reject(error); + } + else { + inflightRequest.resolve(payload.result); + } + }); + }, function (error) { + _this.emit("debug", { + action: "response", + error: error, + request: request, + provider: _this + }); + batch.forEach(function (inflightRequest) { + inflightRequest.reject(error); + }); + }); + }, 10); + } + return promise; + }; + return JsonRpcBatchProvider; + }(jsonRpcProvider.JsonRpcProvider)); + exports.JsonRpcBatchProvider = JsonRpcBatchProvider; + + }); + + var jsonRpcBatchProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(jsonRpcBatchProvider); + + var nodesmithProvider = createCommonjsModule(function (module, exports) { + /* istanbul ignore file */ + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.NodesmithProvider = void 0; + + + + var logger = new lib.Logger(_version$I.version); + // Special API key provided by Nodesmith for ethers.js + var defaultApiKey = "ETHERS_JS_SHARED"; + var NodesmithProvider = /** @class */ (function (_super) { + __extends(NodesmithProvider, _super); + function NodesmithProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + NodesmithProvider.getApiKey = function (apiKey) { + if (apiKey && typeof (apiKey) !== "string") { + logger.throwArgumentError("invalid apiKey", "apiKey", apiKey); + } + return apiKey || defaultApiKey; + }; + NodesmithProvider.getUrl = function (network, apiKey) { + logger.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); + var host = null; + switch (network.name) { + case "homestead": + host = "https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc"; + break; + case "ropsten": + host = "https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc"; + break; + case "rinkeby": + host = "https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc"; + break; + case "goerli": + host = "https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc"; + break; + case "kovan": + host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc"; + break; + default: + logger.throwArgumentError("unsupported network", "network", arguments[0]); + } + return (host + "?apiKey=" + apiKey); + }; + return NodesmithProvider; + }(urlJsonRpcProvider.UrlJsonRpcProvider)); + exports.NodesmithProvider = NodesmithProvider; + + }); + + var nodesmithProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(nodesmithProvider); + + var pocketProvider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PocketProvider = void 0; + + + + var logger = new lib.Logger(_version$I.version); + + // These are load-balancer-based application IDs + var defaultApplicationIds = { + homestead: "6004bcd10040261633ade990", + ropsten: "6004bd4d0040261633ade991", + rinkeby: "6004bda20040261633ade994", + goerli: "6004bd860040261633ade992", + }; + var PocketProvider = /** @class */ (function (_super) { + __extends(PocketProvider, _super); + function PocketProvider(network, apiKey) { + // We need a bit of creativity in the constructor because + // Pocket uses different default API keys based on the network + var _newTarget = this.constructor; + var _this = this; + if (apiKey == null) { + var n = (0, lib$3.getStatic)(_newTarget, "getNetwork")(network); + if (n) { + var applicationId = defaultApplicationIds[n.name]; + if (applicationId) { + apiKey = { + applicationId: applicationId, + loadBalancer: true + }; + } + } + // If there was any issue above, we don't know this network + if (apiKey == null) { + logger.throwError("unsupported network", lib.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + } + _this = _super.call(this, network, apiKey) || this; + return _this; + } + PocketProvider.getApiKey = function (apiKey) { + // Most API Providers allow null to get the default configuration, but + // Pocket requires the network to decide the default provider, so we + // rely on hijacking the constructor to add a sensible default for us + if (apiKey == null) { + logger.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey); + } + var apiKeyObj = { + applicationId: null, + loadBalancer: false, + applicationSecretKey: null + }; + // Parse applicationId and applicationSecretKey + if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + } + else if (apiKey.applicationSecretKey != null) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId); + logger.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]"); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else if (apiKey.applicationId) { + logger.assertArgument((typeof (apiKey.applicationId) === "string"), "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId); + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.loadBalancer = !!apiKey.loadBalancer; + } + else { + logger.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + return apiKeyObj; + }; + PocketProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network ? network.name : "unknown") { + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", lib.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + var url = null; + if (apiKey.loadBalancer) { + url = "https://" + host + "/v1/lb/" + apiKey.applicationId; + } + else { + url = "https://" + host + "/v1/" + apiKey.applicationId; + } + var connection = { url: url }; + // Initialize empty headers + connection.headers = {}; + // Apply application secret key + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey; + } + return connection; + }; + PocketProvider.prototype.isCommunityResource = function () { + return (this.applicationId === defaultApplicationIds[this.network.name]); + }; + return PocketProvider; + }(urlJsonRpcProvider.UrlJsonRpcProvider)); + exports.PocketProvider = PocketProvider; + + }); + + var pocketProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(pocketProvider); + + var web3Provider = createCommonjsModule(function (module, exports) { + "use strict"; + var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Web3Provider = void 0; + + + + var logger = new lib.Logger(_version$I.version); + + var _nextId = 1; + function buildWeb3LegacyFetcher(provider, sendFunc) { + var fetcher = "Web3LegacyFetcher"; + return function (method, params) { + var _this = this; + var request = { + method: method, + params: params, + id: (_nextId++), + jsonrpc: "2.0" + }; + return new Promise(function (resolve, reject) { + _this.emit("debug", { + action: "request", + fetcher: fetcher, + request: (0, lib$3.deepCopy)(request), + provider: _this + }); + sendFunc(request, function (error, response) { + if (error) { + _this.emit("debug", { + action: "response", + fetcher: fetcher, + error: error, + request: request, + provider: _this + }); + return reject(error); + } + _this.emit("debug", { + action: "response", + fetcher: fetcher, + request: request, + response: response, + provider: _this + }); + if (response.error) { + var error_1 = new Error(response.error.message); + error_1.code = response.error.code; + error_1.data = response.error.data; + return reject(error_1); + } + resolve(response.result); + }); + }); + }; + } + function buildEip1193Fetcher(provider) { + return function (method, params) { + var _this = this; + if (params == null) { + params = []; + } + var request = { method: method, params: params }; + this.emit("debug", { + action: "request", + fetcher: "Eip1193Fetcher", + request: (0, lib$3.deepCopy)(request), + provider: this + }); + return provider.request(request).then(function (response) { + _this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request: request, + response: response, + provider: _this + }); + return response; + }, function (error) { + _this.emit("debug", { + action: "response", + fetcher: "Eip1193Fetcher", + request: request, + error: error, + provider: _this + }); + throw error; + }); + }; + } + var Web3Provider = /** @class */ (function (_super) { + __extends(Web3Provider, _super); + function Web3Provider(provider, network) { + var _newTarget = this.constructor; + var _this = this; + logger.checkNew(_newTarget, Web3Provider); + if (provider == null) { + logger.throwArgumentError("missing provider", "provider", provider); + } + var path = null; + var jsonRpcFetchFunc = null; + var subprovider = null; + if (typeof (provider) === "function") { + path = "unknown:"; + jsonRpcFetchFunc = provider; + } + else { + path = provider.host || provider.path || ""; + if (!path && provider.isMetaMask) { + path = "metamask"; + } + subprovider = provider; + if (provider.request) { + if (path === "") { + path = "eip-1193:"; + } + jsonRpcFetchFunc = buildEip1193Fetcher(provider); + } + else if (provider.sendAsync) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider)); + } + else if (provider.send) { + jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider)); + } + else { + logger.throwArgumentError("unsupported provider", "provider", provider); + } + if (!path) { + path = "unknown:"; + } + } + _this = _super.call(this, path, network) || this; + (0, lib$3.defineReadOnly)(_this, "jsonRpcFetchFunc", jsonRpcFetchFunc); + (0, lib$3.defineReadOnly)(_this, "provider", subprovider); + return _this; + } + Web3Provider.prototype.send = function (method, params) { + return this.jsonRpcFetchFunc(method, params); + }; + return Web3Provider; + }(jsonRpcProvider.JsonRpcProvider)); + exports.Web3Provider = Web3Provider; + + }); + + var web3Provider$1 = /*@__PURE__*/getDefaultExportFromCjs(web3Provider); + + var lib$r = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0; + + Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return lib$b.Provider; } }); + + Object.defineProperty(exports, "getNetwork", { enumerable: true, get: function () { return lib$o.getNetwork; } }); + + Object.defineProperty(exports, "BaseProvider", { enumerable: true, get: function () { return baseProvider.BaseProvider; } }); + Object.defineProperty(exports, "Resolver", { enumerable: true, get: function () { return baseProvider.Resolver; } }); + + Object.defineProperty(exports, "AlchemyProvider", { enumerable: true, get: function () { return alchemyProvider.AlchemyProvider; } }); + Object.defineProperty(exports, "AlchemyWebSocketProvider", { enumerable: true, get: function () { return alchemyProvider.AlchemyWebSocketProvider; } }); + + Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return cloudflareProvider.CloudflareProvider; } }); + + Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return etherscanProvider.EtherscanProvider; } }); + + Object.defineProperty(exports, "FallbackProvider", { enumerable: true, get: function () { return fallbackProvider.FallbackProvider; } }); + + Object.defineProperty(exports, "IpcProvider", { enumerable: true, get: function () { return browserIpcProvider.IpcProvider; } }); + + Object.defineProperty(exports, "InfuraProvider", { enumerable: true, get: function () { return infuraProvider.InfuraProvider; } }); + Object.defineProperty(exports, "InfuraWebSocketProvider", { enumerable: true, get: function () { return infuraProvider.InfuraWebSocketProvider; } }); + + Object.defineProperty(exports, "JsonRpcProvider", { enumerable: true, get: function () { return jsonRpcProvider.JsonRpcProvider; } }); + Object.defineProperty(exports, "JsonRpcSigner", { enumerable: true, get: function () { return jsonRpcProvider.JsonRpcSigner; } }); + + Object.defineProperty(exports, "JsonRpcBatchProvider", { enumerable: true, get: function () { return jsonRpcBatchProvider.JsonRpcBatchProvider; } }); + + Object.defineProperty(exports, "NodesmithProvider", { enumerable: true, get: function () { return nodesmithProvider.NodesmithProvider; } }); + + Object.defineProperty(exports, "PocketProvider", { enumerable: true, get: function () { return pocketProvider.PocketProvider; } }); + + Object.defineProperty(exports, "StaticJsonRpcProvider", { enumerable: true, get: function () { return urlJsonRpcProvider.StaticJsonRpcProvider; } }); + Object.defineProperty(exports, "UrlJsonRpcProvider", { enumerable: true, get: function () { return urlJsonRpcProvider.UrlJsonRpcProvider; } }); + + Object.defineProperty(exports, "Web3Provider", { enumerable: true, get: function () { return web3Provider.Web3Provider; } }); + + Object.defineProperty(exports, "WebSocketProvider", { enumerable: true, get: function () { return websocketProvider.WebSocketProvider; } }); + + Object.defineProperty(exports, "Formatter", { enumerable: true, get: function () { return formatter.Formatter; } }); + Object.defineProperty(exports, "isCommunityResourcable", { enumerable: true, get: function () { return formatter.isCommunityResourcable; } }); + Object.defineProperty(exports, "isCommunityResource", { enumerable: true, get: function () { return formatter.isCommunityResource; } }); + Object.defineProperty(exports, "showThrottleMessage", { enumerable: true, get: function () { return formatter.showThrottleMessage; } }); + + + var logger = new lib.Logger(_version$I.version); + //////////////////////// + // Helper Functions + function getDefaultProvider(network, options) { + if (network == null) { + network = "homestead"; + } + // If passed a URL, figure out the right type of provider based on the scheme + if (typeof (network) === "string") { + // @TODO: Add support for IpcProvider; maybe if it ends in ".ipc"? + // Handle http and ws (and their secure variants) + var match = network.match(/^(ws|http)s?:/i); + if (match) { + switch (match[1]) { + case "http": + return new jsonRpcProvider.JsonRpcProvider(network); + case "ws": + return new websocketProvider.WebSocketProvider(network); + default: + logger.throwArgumentError("unsupported URL scheme", "network", network); + } + } + } + var n = (0, lib$o.getNetwork)(network); + if (!n || !n._defaultProvider) { + logger.throwError("unsupported getDefaultProvider network", lib.Logger.errors.NETWORK_ERROR, { + operation: "getDefaultProvider", + network: network + }); + } + return n._defaultProvider({ + FallbackProvider: fallbackProvider.FallbackProvider, + AlchemyProvider: alchemyProvider.AlchemyProvider, + CloudflareProvider: cloudflareProvider.CloudflareProvider, + EtherscanProvider: etherscanProvider.EtherscanProvider, + InfuraProvider: infuraProvider.InfuraProvider, + JsonRpcProvider: jsonRpcProvider.JsonRpcProvider, + NodesmithProvider: nodesmithProvider.NodesmithProvider, + PocketProvider: pocketProvider.PocketProvider, + Web3Provider: web3Provider.Web3Provider, + IpcProvider: browserIpcProvider.IpcProvider, + }, options); + } + exports.getDefaultProvider = getDefaultProvider; + + }); + + var index$r = /*@__PURE__*/getDefaultExportFromCjs(lib$r); + + var _version$K = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "solidity/5.5.0"; + + }); + + var _version$L = /*@__PURE__*/getDefaultExportFromCjs(_version$K); + + var lib$s = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.sha256 = exports.keccak256 = exports.pack = void 0; + + + + + + var regexBytes = new RegExp("^bytes([0-9]+)$"); + var regexNumber = new RegExp("^(u?int)([0-9]*)$"); + var regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$"); + var Zeros = "0000000000000000000000000000000000000000000000000000000000000000"; + + + var logger = new lib.Logger(_version$K.version); + function _pack(type, value, isArray) { + switch (type) { + case "address": + if (isArray) { + return (0, lib$1.zeroPad)(value, 32); + } + return (0, lib$1.arrayify)(value); + case "string": + return (0, lib$8.toUtf8Bytes)(value); + case "bytes": + return (0, lib$1.arrayify)(value); + case "bool": + value = (value ? "0x01" : "0x00"); + if (isArray) { + return (0, lib$1.zeroPad)(value, 32); + } + return (0, lib$1.arrayify)(value); + } + var match = type.match(regexNumber); + if (match) { + //let signed = (match[1] === "int") + var size = parseInt(match[2] || "256"); + if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) { + logger.throwArgumentError("invalid number type", "type", type); + } + if (isArray) { + size = 256; + } + value = lib$2.BigNumber.from(value).toTwos(size); + return (0, lib$1.zeroPad)(value, size / 8); + } + match = type.match(regexBytes); + if (match) { + var size = parseInt(match[1]); + if (String(size) !== match[1] || size === 0 || size > 32) { + logger.throwArgumentError("invalid bytes type", "type", type); + } + if ((0, lib$1.arrayify)(value).byteLength !== size) { + logger.throwArgumentError("invalid value for " + type, "value", value); + } + if (isArray) { + return (0, lib$1.arrayify)((value + Zeros).substring(0, 66)); + } + return value; + } + match = type.match(regexArray); + if (match && Array.isArray(value)) { + var baseType_1 = match[1]; + var count = parseInt(match[2] || String(value.length)); + if (count != value.length) { + logger.throwArgumentError("invalid array length for " + type, "value", value); + } + var result_1 = []; + value.forEach(function (value) { + result_1.push(_pack(baseType_1, value, true)); + }); + return (0, lib$1.concat)(result_1); + } + return logger.throwArgumentError("invalid type", "type", type); + } + // @TODO: Array Enum + function pack(types, values) { + if (types.length != values.length) { + logger.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values); + } + var tight = []; + types.forEach(function (type, index) { + tight.push(_pack(type, values[index])); + }); + return (0, lib$1.hexlify)((0, lib$1.concat)(tight)); + } + exports.pack = pack; + function keccak256(types, values) { + return (0, lib$4.keccak256)(pack(types, values)); + } + exports.keccak256 = keccak256; + function sha256(types, values) { + return (0, lib$h.sha256)(pack(types, values)); + } + exports.sha256 = sha256; + + }); + + var index$s = /*@__PURE__*/getDefaultExportFromCjs(lib$s); + + var _version$M = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "units/5.5.0"; + + }); + + var _version$N = /*@__PURE__*/getDefaultExportFromCjs(_version$M); + + var lib$t = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseEther = exports.formatEther = exports.parseUnits = exports.formatUnits = exports.commify = void 0; + + + + var logger = new lib.Logger(_version$M.version); + var names = [ + "wei", + "kwei", + "mwei", + "gwei", + "szabo", + "finney", + "ether", + ]; + // Some environments have issues with RegEx that contain back-tracking, so we cannot + // use them. + function commify(value) { + var comps = String(value).split("."); + if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") { + logger.throwArgumentError("invalid value", "value", value); + } + // Make sure we have at least one whole digit (0 if none) + var whole = comps[0]; + var negative = ""; + if (whole.substring(0, 1) === "-") { + negative = "-"; + whole = whole.substring(1); + } + // Make sure we have at least 1 whole digit with no leading zeros + while (whole.substring(0, 1) === "0") { + whole = whole.substring(1); + } + if (whole === "") { + whole = "0"; + } + var suffix = ""; + if (comps.length === 2) { + suffix = "." + (comps[1] || "0"); + } + while (suffix.length > 2 && suffix[suffix.length - 1] === "0") { + suffix = suffix.substring(0, suffix.length - 1); + } + var formatted = []; + while (whole.length) { + if (whole.length <= 3) { + formatted.unshift(whole); + break; + } + else { + var index = whole.length - 3; + formatted.unshift(whole.substring(index)); + whole = whole.substring(0, index); + } + } + return negative + formatted.join(",") + suffix; + } + exports.commify = commify; + function formatUnits(value, unitName) { + if (typeof (unitName) === "string") { + var index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return (0, lib$2.formatFixed)(value, (unitName != null) ? unitName : 18); + } + exports.formatUnits = formatUnits; + function parseUnits(value, unitName) { + if (typeof (value) !== "string") { + logger.throwArgumentError("value must be a string", "value", value); + } + if (typeof (unitName) === "string") { + var index = names.indexOf(unitName); + if (index !== -1) { + unitName = 3 * index; + } + } + return (0, lib$2.parseFixed)(value, (unitName != null) ? unitName : 18); + } + exports.parseUnits = parseUnits; + function formatEther(wei) { + return formatUnits(wei, 18); + } + exports.formatEther = formatEther; + function parseEther(ether) { + return parseUnits(ether, 18); + } + exports.parseEther = parseEther; + + }); + + var index$t = /*@__PURE__*/getDefaultExportFromCjs(lib$t); + + var utils$3 = createCommonjsModule(function (module, exports) { + "use strict"; + var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatBytes32String = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports._toEscapedUtf8String = exports.nameprep = exports.hexDataSlice = exports.hexDataLength = exports.hexZeroPad = exports.hexValue = exports.hexStripZeros = exports.hexConcat = exports.isHexString = exports.hexlify = exports.base64 = exports.base58 = exports.TransactionDescription = exports.LogDescription = exports.Interface = exports.SigningKey = exports.HDNode = exports.defaultPath = exports.isBytesLike = exports.isBytes = exports.zeroPad = exports.stripZeros = exports.concat = exports.arrayify = exports.shallowCopy = exports.resolveProperties = exports.getStatic = exports.defineReadOnly = exports.deepCopy = exports.checkProperties = exports.poll = exports.fetchJson = exports._fetchData = exports.RLP = exports.Logger = exports.checkResultErrors = exports.FormatTypes = exports.ParamType = exports.FunctionFragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = exports.Fragment = exports.defaultAbiCoder = exports.AbiCoder = void 0; + exports.Indexed = exports.Utf8ErrorReason = exports.UnicodeNormalizationForm = exports.SupportedAlgorithm = exports.mnemonicToSeed = exports.isValidMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.getAccountPath = exports.verifyTypedData = exports.verifyMessage = exports.recoverPublicKey = exports.computePublicKey = exports.recoverAddress = exports.computeAddress = exports.getJsonWalletAddress = exports.TransactionTypes = exports.serializeTransaction = exports.parseTransaction = exports.accessListify = exports.joinSignature = exports.splitSignature = exports.soliditySha256 = exports.solidityKeccak256 = exports.solidityPack = exports.shuffled = exports.randomBytes = exports.sha512 = exports.sha256 = exports.ripemd160 = exports.keccak256 = exports.computeHmac = exports.commify = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.isAddress = exports.getCreate2Address = exports.getContractAddress = exports.getIcapAddress = exports.getAddress = exports._TypedDataEncoder = exports.id = exports.isValidName = exports.namehash = exports.hashMessage = exports.parseBytes32String = void 0; + + Object.defineProperty(exports, "AbiCoder", { enumerable: true, get: function () { return lib$a.AbiCoder; } }); + Object.defineProperty(exports, "checkResultErrors", { enumerable: true, get: function () { return lib$a.checkResultErrors; } }); + Object.defineProperty(exports, "ConstructorFragment", { enumerable: true, get: function () { return lib$a.ConstructorFragment; } }); + Object.defineProperty(exports, "defaultAbiCoder", { enumerable: true, get: function () { return lib$a.defaultAbiCoder; } }); + Object.defineProperty(exports, "ErrorFragment", { enumerable: true, get: function () { return lib$a.ErrorFragment; } }); + Object.defineProperty(exports, "EventFragment", { enumerable: true, get: function () { return lib$a.EventFragment; } }); + Object.defineProperty(exports, "FormatTypes", { enumerable: true, get: function () { return lib$a.FormatTypes; } }); + Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return lib$a.Fragment; } }); + Object.defineProperty(exports, "FunctionFragment", { enumerable: true, get: function () { return lib$a.FunctionFragment; } }); + Object.defineProperty(exports, "Indexed", { enumerable: true, get: function () { return lib$a.Indexed; } }); + Object.defineProperty(exports, "Interface", { enumerable: true, get: function () { return lib$a.Interface; } }); + Object.defineProperty(exports, "LogDescription", { enumerable: true, get: function () { return lib$a.LogDescription; } }); + Object.defineProperty(exports, "ParamType", { enumerable: true, get: function () { return lib$a.ParamType; } }); + Object.defineProperty(exports, "TransactionDescription", { enumerable: true, get: function () { return lib$a.TransactionDescription; } }); + + Object.defineProperty(exports, "getAddress", { enumerable: true, get: function () { return lib$6.getAddress; } }); + Object.defineProperty(exports, "getCreate2Address", { enumerable: true, get: function () { return lib$6.getCreate2Address; } }); + Object.defineProperty(exports, "getContractAddress", { enumerable: true, get: function () { return lib$6.getContractAddress; } }); + Object.defineProperty(exports, "getIcapAddress", { enumerable: true, get: function () { return lib$6.getIcapAddress; } }); + Object.defineProperty(exports, "isAddress", { enumerable: true, get: function () { return lib$6.isAddress; } }); + var base64 = __importStar(lib$p); + exports.base64 = base64; + + Object.defineProperty(exports, "base58", { enumerable: true, get: function () { return lib$g.Base58; } }); + + Object.defineProperty(exports, "arrayify", { enumerable: true, get: function () { return lib$1.arrayify; } }); + Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return lib$1.concat; } }); + Object.defineProperty(exports, "hexConcat", { enumerable: true, get: function () { return lib$1.hexConcat; } }); + Object.defineProperty(exports, "hexDataSlice", { enumerable: true, get: function () { return lib$1.hexDataSlice; } }); + Object.defineProperty(exports, "hexDataLength", { enumerable: true, get: function () { return lib$1.hexDataLength; } }); + Object.defineProperty(exports, "hexlify", { enumerable: true, get: function () { return lib$1.hexlify; } }); + Object.defineProperty(exports, "hexStripZeros", { enumerable: true, get: function () { return lib$1.hexStripZeros; } }); + Object.defineProperty(exports, "hexValue", { enumerable: true, get: function () { return lib$1.hexValue; } }); + Object.defineProperty(exports, "hexZeroPad", { enumerable: true, get: function () { return lib$1.hexZeroPad; } }); + Object.defineProperty(exports, "isBytes", { enumerable: true, get: function () { return lib$1.isBytes; } }); + Object.defineProperty(exports, "isBytesLike", { enumerable: true, get: function () { return lib$1.isBytesLike; } }); + Object.defineProperty(exports, "isHexString", { enumerable: true, get: function () { return lib$1.isHexString; } }); + Object.defineProperty(exports, "joinSignature", { enumerable: true, get: function () { return lib$1.joinSignature; } }); + Object.defineProperty(exports, "zeroPad", { enumerable: true, get: function () { return lib$1.zeroPad; } }); + Object.defineProperty(exports, "splitSignature", { enumerable: true, get: function () { return lib$1.splitSignature; } }); + Object.defineProperty(exports, "stripZeros", { enumerable: true, get: function () { return lib$1.stripZeros; } }); + + Object.defineProperty(exports, "_TypedDataEncoder", { enumerable: true, get: function () { return lib$9._TypedDataEncoder; } }); + Object.defineProperty(exports, "hashMessage", { enumerable: true, get: function () { return lib$9.hashMessage; } }); + Object.defineProperty(exports, "id", { enumerable: true, get: function () { return lib$9.id; } }); + Object.defineProperty(exports, "isValidName", { enumerable: true, get: function () { return lib$9.isValidName; } }); + Object.defineProperty(exports, "namehash", { enumerable: true, get: function () { return lib$9.namehash; } }); + + Object.defineProperty(exports, "defaultPath", { enumerable: true, get: function () { return lib$k.defaultPath; } }); + Object.defineProperty(exports, "entropyToMnemonic", { enumerable: true, get: function () { return lib$k.entropyToMnemonic; } }); + Object.defineProperty(exports, "getAccountPath", { enumerable: true, get: function () { return lib$k.getAccountPath; } }); + Object.defineProperty(exports, "HDNode", { enumerable: true, get: function () { return lib$k.HDNode; } }); + Object.defineProperty(exports, "isValidMnemonic", { enumerable: true, get: function () { return lib$k.isValidMnemonic; } }); + Object.defineProperty(exports, "mnemonicToEntropy", { enumerable: true, get: function () { return lib$k.mnemonicToEntropy; } }); + Object.defineProperty(exports, "mnemonicToSeed", { enumerable: true, get: function () { return lib$k.mnemonicToSeed; } }); + + Object.defineProperty(exports, "getJsonWalletAddress", { enumerable: true, get: function () { return lib$m.getJsonWalletAddress; } }); + + Object.defineProperty(exports, "keccak256", { enumerable: true, get: function () { return lib$4.keccak256; } }); + + Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return lib.Logger; } }); + + Object.defineProperty(exports, "computeHmac", { enumerable: true, get: function () { return lib$h.computeHmac; } }); + Object.defineProperty(exports, "ripemd160", { enumerable: true, get: function () { return lib$h.ripemd160; } }); + Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return lib$h.sha256; } }); + Object.defineProperty(exports, "sha512", { enumerable: true, get: function () { return lib$h.sha512; } }); + + Object.defineProperty(exports, "solidityKeccak256", { enumerable: true, get: function () { return lib$s.keccak256; } }); + Object.defineProperty(exports, "solidityPack", { enumerable: true, get: function () { return lib$s.pack; } }); + Object.defineProperty(exports, "soliditySha256", { enumerable: true, get: function () { return lib$s.sha256; } }); + + Object.defineProperty(exports, "randomBytes", { enumerable: true, get: function () { return lib$l.randomBytes; } }); + Object.defineProperty(exports, "shuffled", { enumerable: true, get: function () { return lib$l.shuffled; } }); + + Object.defineProperty(exports, "checkProperties", { enumerable: true, get: function () { return lib$3.checkProperties; } }); + Object.defineProperty(exports, "deepCopy", { enumerable: true, get: function () { return lib$3.deepCopy; } }); + Object.defineProperty(exports, "defineReadOnly", { enumerable: true, get: function () { return lib$3.defineReadOnly; } }); + Object.defineProperty(exports, "getStatic", { enumerable: true, get: function () { return lib$3.getStatic; } }); + Object.defineProperty(exports, "resolveProperties", { enumerable: true, get: function () { return lib$3.resolveProperties; } }); + Object.defineProperty(exports, "shallowCopy", { enumerable: true, get: function () { return lib$3.shallowCopy; } }); + var RLP = __importStar(lib$5); + exports.RLP = RLP; + + Object.defineProperty(exports, "computePublicKey", { enumerable: true, get: function () { return lib$d.computePublicKey; } }); + Object.defineProperty(exports, "recoverPublicKey", { enumerable: true, get: function () { return lib$d.recoverPublicKey; } }); + Object.defineProperty(exports, "SigningKey", { enumerable: true, get: function () { return lib$d.SigningKey; } }); + + Object.defineProperty(exports, "formatBytes32String", { enumerable: true, get: function () { return lib$8.formatBytes32String; } }); + Object.defineProperty(exports, "nameprep", { enumerable: true, get: function () { return lib$8.nameprep; } }); + Object.defineProperty(exports, "parseBytes32String", { enumerable: true, get: function () { return lib$8.parseBytes32String; } }); + Object.defineProperty(exports, "_toEscapedUtf8String", { enumerable: true, get: function () { return lib$8._toEscapedUtf8String; } }); + Object.defineProperty(exports, "toUtf8Bytes", { enumerable: true, get: function () { return lib$8.toUtf8Bytes; } }); + Object.defineProperty(exports, "toUtf8CodePoints", { enumerable: true, get: function () { return lib$8.toUtf8CodePoints; } }); + Object.defineProperty(exports, "toUtf8String", { enumerable: true, get: function () { return lib$8.toUtf8String; } }); + Object.defineProperty(exports, "Utf8ErrorFuncs", { enumerable: true, get: function () { return lib$8.Utf8ErrorFuncs; } }); + + Object.defineProperty(exports, "accessListify", { enumerable: true, get: function () { return lib$e.accessListify; } }); + Object.defineProperty(exports, "computeAddress", { enumerable: true, get: function () { return lib$e.computeAddress; } }); + Object.defineProperty(exports, "parseTransaction", { enumerable: true, get: function () { return lib$e.parse; } }); + Object.defineProperty(exports, "recoverAddress", { enumerable: true, get: function () { return lib$e.recoverAddress; } }); + Object.defineProperty(exports, "serializeTransaction", { enumerable: true, get: function () { return lib$e.serialize; } }); + Object.defineProperty(exports, "TransactionTypes", { enumerable: true, get: function () { return lib$e.TransactionTypes; } }); + + Object.defineProperty(exports, "commify", { enumerable: true, get: function () { return lib$t.commify; } }); + Object.defineProperty(exports, "formatEther", { enumerable: true, get: function () { return lib$t.formatEther; } }); + Object.defineProperty(exports, "parseEther", { enumerable: true, get: function () { return lib$t.parseEther; } }); + Object.defineProperty(exports, "formatUnits", { enumerable: true, get: function () { return lib$t.formatUnits; } }); + Object.defineProperty(exports, "parseUnits", { enumerable: true, get: function () { return lib$t.parseUnits; } }); + + Object.defineProperty(exports, "verifyMessage", { enumerable: true, get: function () { return lib$n.verifyMessage; } }); + Object.defineProperty(exports, "verifyTypedData", { enumerable: true, get: function () { return lib$n.verifyTypedData; } }); + + Object.defineProperty(exports, "_fetchData", { enumerable: true, get: function () { return lib$q._fetchData; } }); + Object.defineProperty(exports, "fetchJson", { enumerable: true, get: function () { return lib$q.fetchJson; } }); + Object.defineProperty(exports, "poll", { enumerable: true, get: function () { return lib$q.poll; } }); + //////////////////////// + // Enums + var sha2_2 = lib$h; + Object.defineProperty(exports, "SupportedAlgorithm", { enumerable: true, get: function () { return sha2_2.SupportedAlgorithm; } }); + var strings_2 = lib$8; + Object.defineProperty(exports, "UnicodeNormalizationForm", { enumerable: true, get: function () { return strings_2.UnicodeNormalizationForm; } }); + Object.defineProperty(exports, "Utf8ErrorReason", { enumerable: true, get: function () { return strings_2.Utf8ErrorReason; } }); + + }); + + var utils$4 = /*@__PURE__*/getDefaultExportFromCjs(utils$3); + + var _version$O = createCommonjsModule(function (module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.version = void 0; + exports.version = "ethers/5.5.2"; + + }); + + var _version$P = /*@__PURE__*/getDefaultExportFromCjs(_version$O); + + var ethers = createCommonjsModule(function (module, exports) { + "use strict"; + var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Wordlist = exports.version = exports.wordlists = exports.utils = exports.logger = exports.errors = exports.constants = exports.FixedNumber = exports.BigNumber = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.providers = exports.getDefaultProvider = exports.VoidSigner = exports.Wallet = exports.Signer = void 0; + + Object.defineProperty(exports, "BaseContract", { enumerable: true, get: function () { return lib$f.BaseContract; } }); + Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return lib$f.Contract; } }); + Object.defineProperty(exports, "ContractFactory", { enumerable: true, get: function () { return lib$f.ContractFactory; } }); + + Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return lib$2.BigNumber; } }); + Object.defineProperty(exports, "FixedNumber", { enumerable: true, get: function () { return lib$2.FixedNumber; } }); + + Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return lib$c.Signer; } }); + Object.defineProperty(exports, "VoidSigner", { enumerable: true, get: function () { return lib$c.VoidSigner; } }); + + Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return lib$n.Wallet; } }); + var constants = __importStar(lib$7); + exports.constants = constants; + var providers = __importStar(lib$r); + exports.providers = providers; + var providers_1 = lib$r; + Object.defineProperty(exports, "getDefaultProvider", { enumerable: true, get: function () { return providers_1.getDefaultProvider; } }); + + Object.defineProperty(exports, "Wordlist", { enumerable: true, get: function () { return lib$j.Wordlist; } }); + Object.defineProperty(exports, "wordlists", { enumerable: true, get: function () { return lib$j.wordlists; } }); + var utils = __importStar(utils$3); + exports.utils = utils; + + Object.defineProperty(exports, "errors", { enumerable: true, get: function () { return lib.ErrorCode; } }); + //////////////////////// + // Compile-Time Constants + // This is generated by "npm run dist" + + Object.defineProperty(exports, "version", { enumerable: true, get: function () { return _version$O.version; } }); + var logger = new lib.Logger(_version$O.version); + exports.logger = logger; + + }); + + var ethers$1 = /*@__PURE__*/getDefaultExportFromCjs(ethers); + + var lib$u = createCommonjsModule(function (module, exports) { + "use strict"; + var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Wordlist = exports.version = exports.wordlists = exports.utils = exports.logger = exports.errors = exports.constants = exports.FixedNumber = exports.BigNumber = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.providers = exports.getDefaultProvider = exports.VoidSigner = exports.Wallet = exports.Signer = exports.ethers = void 0; + // To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js + var ethers$1 = __importStar(ethers); + exports.ethers = ethers$1; + try { + var anyGlobal = window; + if (anyGlobal._ethers == null) { + anyGlobal._ethers = ethers$1; + } + } + catch (error) { } + var ethers_1 = ethers; + Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return ethers_1.Signer; } }); + Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return ethers_1.Wallet; } }); + Object.defineProperty(exports, "VoidSigner", { enumerable: true, get: function () { return ethers_1.VoidSigner; } }); + Object.defineProperty(exports, "getDefaultProvider", { enumerable: true, get: function () { return ethers_1.getDefaultProvider; } }); + Object.defineProperty(exports, "providers", { enumerable: true, get: function () { return ethers_1.providers; } }); + Object.defineProperty(exports, "BaseContract", { enumerable: true, get: function () { return ethers_1.BaseContract; } }); + Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return ethers_1.Contract; } }); + Object.defineProperty(exports, "ContractFactory", { enumerable: true, get: function () { return ethers_1.ContractFactory; } }); + Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return ethers_1.BigNumber; } }); + Object.defineProperty(exports, "FixedNumber", { enumerable: true, get: function () { return ethers_1.FixedNumber; } }); + Object.defineProperty(exports, "constants", { enumerable: true, get: function () { return ethers_1.constants; } }); + Object.defineProperty(exports, "errors", { enumerable: true, get: function () { return ethers_1.errors; } }); + Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return ethers_1.logger; } }); + Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return ethers_1.utils; } }); + Object.defineProperty(exports, "wordlists", { enumerable: true, get: function () { return ethers_1.wordlists; } }); + //////////////////////// + // Compile-Time Constants + Object.defineProperty(exports, "version", { enumerable: true, get: function () { return ethers_1.version; } }); + Object.defineProperty(exports, "Wordlist", { enumerable: true, get: function () { return ethers_1.Wordlist; } }); + + }); + + var index$u = /*@__PURE__*/getDefaultExportFromCjs(lib$u); + + return index$u; + +}))); +//# sourceMappingURL=ethers.umd.js.map diff --git a/node_modules/ethers/dist/ethers.umd.js.map b/node_modules/ethers/dist/ethers.umd.js.map new file mode 100644 index 0000000..86ae4cd --- /dev/null +++ b/node_modules/ethers/dist/ethers.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ethers.umd.js","sources":["../../../node_modules/bn.js/lib/bn.js","../../logger/src.ts/_version.ts","../../logger/src.ts/index.ts","../../bytes/src.ts/_version.ts","../../bytes/src.ts/index.ts","../../bignumber/src.ts/_version.ts","../../bignumber/src.ts/bignumber.ts","../../bignumber/src.ts/fixednumber.ts","../../bignumber/src.ts/index.ts","../../properties/src.ts/_version.ts","../../properties/src.ts/index.ts","../../abi/src.ts/_version.ts","../../abi/src.ts/fragments.ts","../../abi/src.ts/coders/abstract-coder.ts","../../../node_modules/js-sha3/src/sha3.js","../../keccak256/src.ts/index.ts","../../rlp/src.ts/_version.ts","../../rlp/src.ts/index.ts","../../address/src.ts/_version.ts","../../address/src.ts/index.ts","../../abi/src.ts/coders/address.ts","../../abi/src.ts/coders/anonymous.ts","../../abi/src.ts/coders/array.ts","../../abi/src.ts/coders/boolean.ts","../../abi/src.ts/coders/bytes.ts","../../abi/src.ts/coders/fixed-bytes.ts","../../abi/src.ts/coders/null.ts","../../constants/src.ts/addresses.ts","../../constants/src.ts/bignumbers.ts","../../constants/src.ts/hashes.ts","../../constants/src.ts/strings.ts","../../constants/src.ts/index.ts","../../abi/src.ts/coders/number.ts","../../strings/src.ts/_version.ts","../../strings/src.ts/utf8.ts","../../strings/src.ts/bytes32.ts","../../strings/src.ts/idna.ts","../../strings/src.ts/index.ts","../../abi/src.ts/coders/string.ts","../../abi/src.ts/coders/tuple.ts","../../abi/src.ts/abi-coder.ts","../../hash/src.ts/id.ts","../../hash/src.ts/_version.ts","../../hash/src.ts/namehash.ts","../../hash/src.ts/message.ts","../../hash/src.ts/typed-data.ts","../../hash/src.ts/index.ts","../../abi/src.ts/interface.ts","../../abi/src.ts/index.ts","../../abstract-provider/src.ts/_version.ts","../../abstract-provider/src.ts/index.ts","../../abstract-signer/src.ts/_version.ts","../../abstract-signer/src.ts/index.ts","../../../node_modules/minimalistic-assert/index.js","../../../node_modules/minimalistic-crypto-utils/lib/utils.js","../../../node_modules/elliptic/lib/elliptic/utils.js","../../../node_modules/elliptic/lib/elliptic/curve/base.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/elliptic/lib/elliptic/curve/short.js","../../../node_modules/elliptic/lib/elliptic/curve/index.js","../../../node_modules/hash.js/lib/hash/utils.js","../../../node_modules/hash.js/lib/hash/common.js","../../../node_modules/hash.js/lib/hash/sha/common.js","../../../node_modules/hash.js/lib/hash/sha/1.js","../../../node_modules/hash.js/lib/hash/sha/256.js","../../../node_modules/hash.js/lib/hash/sha/224.js","../../../node_modules/hash.js/lib/hash/sha/512.js","../../../node_modules/hash.js/lib/hash/sha/384.js","../../../node_modules/hash.js/lib/hash/sha.js","../../../node_modules/hash.js/lib/hash/ripemd.js","../../../node_modules/hash.js/lib/hash/hmac.js","../../../node_modules/hash.js/lib/hash.js","../../../node_modules/elliptic/lib/elliptic/curves.js","../../../node_modules/hmac-drbg/lib/hmac-drbg.js","../../../node_modules/elliptic/lib/elliptic/ec/key.js","../../../node_modules/elliptic/lib/elliptic/ec/signature.js","../../../node_modules/elliptic/lib/elliptic/ec/index.js","../../../node_modules/elliptic/lib/elliptic.js","../../signing-key/src.ts/elliptic.ts","../../signing-key/src.ts/_version.ts","../../signing-key/src.ts/index.ts","../../transactions/src.ts/_version.ts","../../transactions/src.ts/index.ts","../../contracts/src.ts/_version.ts","../../contracts/src.ts/index.ts","../../basex/src.ts/index.ts","../../sha2/src.ts/types.ts","../../sha2/src.ts/_version.ts","../../sha2/src.ts/browser-sha2.ts","../../sha2/src.ts/index.ts","../../pbkdf2/src.ts/browser-pbkdf2.ts","../../pbkdf2/src.ts/index.ts","../../wordlists/src.ts/_version.ts","../../wordlists/src.ts/wordlist.ts","../../wordlists/src.ts/lang-en.ts","../../wordlists/src.ts/browser-wordlists.ts","../../wordlists/src.ts/index.ts","../../hdnode/src.ts/_version.ts","../../hdnode/src.ts/index.ts","../../random/src.ts/_version.ts","../../random/src.ts/browser-random.ts","../../random/src.ts/shuffle.ts","../../random/src.ts/index.ts","../../../node_modules/aes-js/index.js","../../json-wallets/src.ts/_version.ts","../../json-wallets/src.ts/utils.ts","../../json-wallets/src.ts/crowdsale.ts","../../json-wallets/src.ts/inspect.ts","../../../node_modules/scrypt-js/scrypt.js","../../json-wallets/src.ts/keystore.ts","../../json-wallets/src.ts/index.ts","../../wallet/src.ts/_version.ts","../../wallet/src.ts/index.ts","../../networks/src.ts/_version.ts","../../networks/src.ts/index.ts","../../base64/src.ts/browser-base64.ts","../../base64/src.ts/index.ts","../../web/src.ts/_version.ts","../../web/src.ts/browser-geturl.ts","../../web/src.ts/index.ts","../../../node_modules/bech32/index.js","../../providers/src.ts/_version.ts","../../providers/src.ts/formatter.ts","../../providers/src.ts/base-provider.ts","../../providers/src.ts/json-rpc-provider.ts","../../providers/src.ts/browser-ws.ts","../../providers/src.ts/websocket-provider.ts","../../providers/src.ts/url-json-rpc-provider.ts","../../providers/src.ts/alchemy-provider.ts","../../providers/src.ts/cloudflare-provider.ts","../../providers/src.ts/etherscan-provider.ts","../../providers/src.ts/fallback-provider.ts","../../providers/src.ts/browser-ipc-provider.ts","../../providers/src.ts/infura-provider.ts","../../providers/src.ts/json-rpc-batch-provider.ts","../../providers/src.ts/nodesmith-provider.ts","../../providers/src.ts/pocket-provider.ts","../../providers/src.ts/web3-provider.ts","../../providers/src.ts/index.ts","../../solidity/src.ts/_version.ts","../../solidity/src.ts/index.ts","../../units/src.ts/_version.ts","../../units/src.ts/index.ts","../src.ts/utils.ts","../src.ts/_version.ts","../src.ts/ethers.ts","../src.ts/index.ts"],"sourcesContent":["(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","export const version = \"logger/5.5.0\";\n","\"use strict\";\n\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\n\nconst LogLevels: { [ name: string ]: number } = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\n\nimport { version } from \"./_version\";\n\nlet _globalLogger: Logger = null;\n\nfunction _checkNormalize(): string {\n try {\n const missing: Array = [ ];\n\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n };\n } catch(error) {\n missing.push(form);\n }\n });\n\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\")\n }\n } catch (error) {\n return error.message;\n }\n\n return null;\n}\n\nconst _normalizeError = _checkNormalize();\n\nexport enum LogLevel {\n DEBUG = \"DEBUG\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n OFF = \"OFF\"\n}\n\n\nexport enum ErrorCode {\n\n ///////////////////\n // Generic Errors\n\n // Unknown Error\n UNKNOWN_ERROR = \"UNKNOWN_ERROR\",\n\n // Not Implemented\n NOT_IMPLEMENTED = \"NOT_IMPLEMENTED\",\n\n // Unsupported Operation\n // - operation\n UNSUPPORTED_OPERATION = \"UNSUPPORTED_OPERATION\",\n\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n NETWORK_ERROR = \"NETWORK_ERROR\",\n\n // Some sort of bad response from the server\n SERVER_ERROR = \"SERVER_ERROR\",\n\n // Timeout\n TIMEOUT = \"TIMEOUT\",\n\n ///////////////////\n // Operational Errors\n\n // Buffer Overrun\n BUFFER_OVERRUN = \"BUFFER_OVERRUN\",\n\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n NUMERIC_FAULT = \"NUMERIC_FAULT\",\n\n\n ///////////////////\n // Argument Errors\n\n // Missing new operator to an object\n // - name: The name of the class\n MISSING_NEW = \"MISSING_NEW\",\n\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n INVALID_ARGUMENT = \"INVALID_ARGUMENT\",\n\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n MISSING_ARGUMENT = \"MISSING_ARGUMENT\",\n\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n UNEXPECTED_ARGUMENT = \"UNEXPECTED_ARGUMENT\",\n\n\n ///////////////////\n // Blockchain Errors\n\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n CALL_EXCEPTION = \"CALL_EXCEPTION\",\n\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n INSUFFICIENT_FUNDS = \"INSUFFICIENT_FUNDS\",\n\n // Nonce has already been used\n // - transaction: the transaction attempted\n NONCE_EXPIRED = \"NONCE_EXPIRED\",\n\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n REPLACEMENT_UNDERPRICED = \"REPLACEMENT_UNDERPRICED\",\n\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n UNPREDICTABLE_GAS_LIMIT = \"UNPREDICTABLE_GAS_LIMIT\",\n\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n TRANSACTION_REPLACED = \"TRANSACTION_REPLACED\",\n};\n\nconst HEX = \"0123456789abcdef\";\n\nexport class Logger {\n readonly version: string;\n\n static errors = ErrorCode;\n\n static levels = LogLevel;\n\n constructor(version: string) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n\n _log(logLevel: LogLevel, args: Array): void {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) { return; }\n console.log.apply(console, args);\n }\n\n debug(...args: Array): void {\n this._log(Logger.levels.DEBUG, args);\n }\n\n info(...args: Array): void {\n this._log(Logger.levels.INFO, args);\n }\n\n warn(...args: Array): void {\n this._log(Logger.levels.WARNING, args);\n }\n\n makeError(message: string, code?: ErrorCode, params?: any): Error {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, { });\n }\n\n if (!code) { code = Logger.errors.UNKNOWN_ERROR; }\n if (!params) { params = {}; }\n\n const messageDetails: Array = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${ code }`);\n messageDetails.push(`version=${ this.version }`);\n\n const reason = message;\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n\n // @TODO: Any??\n const error: any = new Error(message);\n error.reason = reason;\n error.code = code\n\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n\n return error;\n }\n\n throwError(message: string, code?: ErrorCode, params?: any): never {\n throw this.makeError(message, code, params);\n }\n\n throwArgumentError(message: string, name: string, value: any): never {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n\n assert(condition: any, message: string, code?: ErrorCode, params?: any): void {\n if (!!condition) { return; }\n this.throwError(message, code, params);\n }\n\n assertArgument(condition: any, message: string, name: string, value: any): void {\n if (!!condition) { return; }\n this.throwArgumentError(message, name, value);\n }\n\n checkNormalize(message?: string): void {\n if (message == null) { message = \"platform missing String.prototype.normalize\"; }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n\n checkSafeUint53(value: number, message?: string): void {\n if (typeof(value) !== \"number\") { return; }\n\n if (message == null) { message = \"value not safe\"; }\n\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n\n checkArgumentCount(count: number, expectedCount: number, message?: string): void {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n\n checkNew(target: any, kind: any): void {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n checkAbstract(target: any, kind: any): void {\n if (target === kind) {\n this.throwError(\n \"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { name: target.name, operation: \"new\" }\n );\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n static globalLogger(): Logger {\n if (!_globalLogger) { _globalLogger = new Logger(version); }\n return _globalLogger;\n }\n\n static setCensorship(censorship: boolean, permanent?: boolean): void {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n if (_permanentCensorErrors) {\n if (!censorship) { return; }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n\n static setLogLevel(logLevel: LogLevel): void {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n\n static from(version: string): Logger {\n return new Logger(version);\n }\n}\n","export const version = \"bytes/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type Bytes = ArrayLike;\n\nexport type BytesLike = Bytes | string;\n\nexport type DataOptions = {\n allowMissingPrefix?: boolean;\n hexPad?: \"left\" | \"right\" | null;\n};\n\nexport interface Hexable {\n toHexString(): string;\n}\n\n\n/*\nexport interface HexString {\n length: number;\n substring: (start: number, end?: number) => string;\n\n [index: number]: string;\n}\n*/\n\nexport type SignatureLike = {\n r: string;\n s?: string;\n _vs?: string,\n recoveryParam?: number;\n v?: number;\n} | BytesLike;\n\nexport interface Signature {\n r: string;\n\n s: string;\n _vs: string,\n\n recoveryParam: number;\n v: number;\n}\n\n///////////////////////////////\n\n\nfunction isHexable(value: any): value is Hexable {\n return !!(value.toHexString);\n}\n\nfunction addSlice(array: Uint8Array): Uint8Array {\n if (array.slice) { return array; }\n\n array.slice = function() {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n }\n\n return array;\n}\n\nexport function isBytesLike(value: any): value is BytesLike {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\n\nfunction isInteger(value: number) {\n return (typeof(value) === \"number\" && value == value && (value % 1) === 0);\n}\n\nexport function isBytes(value: any): value is Bytes {\n if (value == null) { return false; }\n\n if (value.constructor === Uint8Array) { return true; }\n if (typeof(value) === \"string\") { return false; }\n if (!isInteger(value.length) || value.length < 0) { return false; }\n\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) { return false; }\n }\n return true;\n}\n\n\nexport function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) { result.push(0); }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { value = value.toHexString(); }\n\n if (isHexString(value)) {\n let hex = (value).substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0x0\" + hex.substring(2);\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n\n const result = [];\n for (let i = 0; i < hex.length; i += 2) {\n result.push(parseInt(hex.substring(i, i + 2), 16));\n }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (isBytes(value)) {\n return addSlice(new Uint8Array(value));\n }\n\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n}\n\nexport function concat(items: ReadonlyArray): Uint8Array {\n const objects = items.map(item => arrayify(item));\n const length = objects.reduce((accum, item) => (accum + item.length), 0);\n\n const result = new Uint8Array(length);\n\n objects.reduce((offset, object) => {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n\n return addSlice(result);\n}\n\nexport function stripZeros(value: BytesLike): Uint8Array {\n let result: Uint8Array = arrayify(value);\n\n if (result.length === 0) { return result; }\n\n // Find the first non-zero entry\n let start = 0;\n while (start < result.length && result[start] === 0) { start++ }\n\n // If we started with zeros, strip them\n if (start) {\n result = result.slice(start);\n }\n\n return result;\n}\n\nexport function zeroPad(value: BytesLike, length: number): Uint8Array {\n value = arrayify(value);\n\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n\n const result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n}\n\n\nexport function isHexString(value: any, length?: number): boolean {\n if (typeof(value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false\n }\n if (length && value.length !== 2 + 2 * length) { return false; }\n return true;\n}\n\nconst HexCharacters: string = \"0123456789abcdef\";\n\nexport function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n\n let hex = \"\";\n while (value) {\n hex = HexCharacters[value & 0xf] + hex;\n value = Math.floor(value / 16);\n }\n\n if (hex.length) {\n if (hex.length % 2) { hex = \"0\" + hex; }\n return \"0x\" + hex;\n }\n\n return \"0x00\";\n }\n\n if (typeof(value) === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) { return (\"0x0\" + value); }\n return \"0x\" + value;\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { return value.toHexString(); }\n\n if (isHexString(value)) {\n if ((value).length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + (value).substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return (value).toLowerCase();\n }\n\n if (isBytes(value)) {\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n let v = value[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n }\n\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n}\n\n/*\nfunction unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {\n if (typeof(value) === \"string\" && value.length % 2 && value.substring(0, 2) === \"0x\") {\n return \"0x0\" + value.substring(2);\n }\n return value;\n}\n*/\nexport function hexDataLength(data: BytesLike) {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n return null;\n }\n\n return (data.length - 2) / 2;\n}\n\nexport function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data );\n }\n\n offset = 2 + 2 * offset;\n\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n\n return \"0x\" + data.substring(offset);\n}\n\nexport function hexConcat(items: ReadonlyArray): string {\n let result = \"0x\";\n items.forEach((item) => {\n result += hexlify(item).substring(2);\n });\n return result;\n}\n\nexport function hexValue(value: BytesLike | Hexable | number | bigint): string {\n const trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") { return \"0x0\"; }\n return trimmed;\n}\n\nexport function hexStripZeros(value: BytesLike): string {\n if (typeof(value) !== \"string\") { value = hexlify(value); }\n\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n let offset = 0;\n while (offset < value.length && value[offset] === \"0\") { offset++; }\n return \"0x\" + value.substring(offset);\n}\n\nexport function hexZeroPad(value: BytesLike, length: number): string {\n if (typeof(value) !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n\n return value;\n}\n\nexport function splitSignature(signature: SignatureLike): Signature {\n const result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0\n };\n\n if (isBytesLike(signature)) {\n const bytes: Uint8Array = arrayify(signature);\n if (bytes.length !== 65) {\n logger.throwArgumentError(\"invalid signature string; must be 65 bytes\", \"signature\", signature);\n }\n\n // Get the r, s and v\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n\n // Allow a recid to be used as the v\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n\n // Compute recoveryParam from v\n result.recoveryParam = 1 - (result.v % 2);\n\n // Compute _vs from recoveryParam and s\n if (result.recoveryParam) { bytes[32] |= 0x80; }\n result._vs = hexlify(bytes.slice(32, 64))\n\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n\n // If the _vs is available, use it to populate missing s, v and recoveryParam\n // and verify non-missing s, v and recoveryParam\n if (result._vs != null) {\n const vs = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs);\n\n // Set or check the recid\n const recoveryParam = ((vs[0] >= 128) ? 1: 0);\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n\n // Set or check the s\n vs[0] &= 0x7f;\n const s = hexlify(vs);\n if (result.s == null) {\n result.s = s;\n } else if (result.s !== s) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n\n // Use recid and v to populate each other\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - (result.v % 2);\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n const recId = (result.v === 0 || result.v === 1) ? result.v :(1 - (result.v % 2));\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n\n const vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) { vs[0] |= 0x80; }\n const _vs = hexlify(vs);\n\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n\n // Set or check the _vs\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n\n return result;\n}\n\nexport function joinSignature(signature: SignatureLike): string {\n signature = splitSignature(signature);\n\n return hexlify(concat([\n signature.r,\n signature.s,\n (signature.recoveryParam ? \"0x1c\": \"0x1b\")\n ]));\n}\n\n","export const version = \"bignumber/5.5.0\";\n","\"use strict\";\n\n/**\n * BigNumber\n *\n * A wrapper around the BN.js object. We use the BN.js library\n * because it is used by elliptic, so it is required regardless.\n *\n */\n\nimport _BN from \"bn.js\";\nimport BN = _BN.BN;\n\nimport { Bytes, Hexable, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst _constructorGuard = { };\n\nconst MAX_SAFE = 0x1fffffffffffff;\n\n\nexport type BigNumberish = BigNumber | Bytes | bigint | string | number;\n\nexport function isBigNumberish(value: any): value is BigNumberish {\n return (value != null) && (\n BigNumber.isBigNumber(value) ||\n (typeof(value) === \"number\" && (value % 1) === 0) ||\n (typeof(value) === \"string\" && !!value.match(/^-?[0-9]+$/)) ||\n isHexString(value) ||\n (typeof(value) === \"bigint\") ||\n isBytes(value)\n );\n}\n\n// Only warn about passing 10 into radix once\nlet _warnedToStringRadix = false;\n\nexport class BigNumber implements Hexable {\n readonly _hex: string;\n readonly _isBigNumber: boolean;\n\n constructor(constructorGuard: any, hex: string) {\n logger.checkNew(new.target, BigNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n\n this._hex = hex;\n this._isBigNumber = true;\n\n Object.freeze(this);\n }\n\n fromTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).fromTwos(value));\n }\n\n toTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).toTwos(value));\n }\n\n abs(): BigNumber {\n if (this._hex[0] === \"-\") {\n return BigNumber.from(this._hex.substring(1));\n }\n return this;\n }\n\n add(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).add(toBN(other)));\n }\n\n sub(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).sub(toBN(other)));\n }\n\n div(other: BigNumberish): BigNumber {\n const o = BigNumber.from(other);\n if (o.isZero()) {\n throwFault(\"division by zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n }\n\n mul(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).mul(toBN(other)));\n }\n\n mod(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot modulo negative values\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n }\n\n pow(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot raise to negative values\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n }\n\n and(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'and' negative values\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n }\n\n or(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'or' negative values\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n }\n\n xor(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'xor' negative values\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n }\n\n mask(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot mask negative values\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n }\n\n shl(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n }\n\n shr(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n }\n\n eq(other: BigNumberish): boolean {\n return toBN(this).eq(toBN(other));\n }\n\n lt(other: BigNumberish): boolean {\n return toBN(this).lt(toBN(other));\n }\n\n lte(other: BigNumberish): boolean {\n return toBN(this).lte(toBN(other));\n }\n\n gt(other: BigNumberish): boolean {\n return toBN(this).gt(toBN(other));\n }\n\n gte(other: BigNumberish): boolean {\n return toBN(this).gte(toBN(other));\n }\n\n isNegative(): boolean {\n return (this._hex[0] === \"-\");\n }\n\n isZero(): boolean {\n return toBN(this).isZero();\n }\n\n toNumber(): number {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n }\n\n toBigInt(): bigint {\n try {\n return BigInt(this.toString());\n } catch (e) { }\n\n return logger.throwError(\"this platform does not support BigInt\", Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n }\n\n toString(): string {\n // Lots of people expect this, which we do not support, so check (See: #889)\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n }\n }\n return toBN(this).toString(10);\n }\n\n toHexString(): string {\n return this._hex;\n }\n\n toJSON(key?: string): any {\n return { type: \"BigNumber\", hex: this.toHexString() };\n }\n\n static from(value: any): BigNumber {\n if (value instanceof BigNumber) { return value; }\n\n if (typeof(value) === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber(_constructorGuard, toHex(value));\n }\n\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber(_constructorGuard, toHex(new BN(value)));\n }\n\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n\n if (typeof(value) === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n\n return BigNumber.from(String(value));\n }\n\n const anyValue = value;\n\n if (typeof(anyValue) === \"bigint\") {\n return BigNumber.from(anyValue.toString());\n }\n\n if (isBytes(anyValue)) {\n return BigNumber.from(hexlify(anyValue));\n }\n\n if (anyValue) {\n\n // Hexable interface (takes priority)\n if (anyValue.toHexString) {\n const hex = anyValue.toHexString();\n if (typeof(hex) === \"string\") {\n return BigNumber.from(hex);\n }\n\n } else {\n // For now, handle legacy JSON-ified values (goes away in v6)\n let hex = anyValue._hex;\n\n // New-form JSON\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n\n if (typeof(hex) === \"string\") {\n if (isHexString(hex) || (hex[0] === \"-\" && isHexString(hex.substring(1)))) {\n return BigNumber.from(hex);\n }\n }\n }\n }\n\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n }\n\n static isBigNumber(value: any): value is BigNumber {\n return !!(value && value._isBigNumber);\n }\n}\n\n// Normalize the hex string\nfunction toHex(value: string | BN): string {\n\n // For BN, call on the hex string\n if (typeof(value) !== \"string\") {\n return toHex(value.toString(16));\n }\n\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n\n // Cannot have multiple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") { logger.throwArgumentError(\"invalid hex\", \"value\", value); }\n\n // Call toHex on the positive component\n value = toHex(value);\n\n // Do not allow \"-0x00\"\n if (value === \"0x00\") { return value; }\n\n // Negate the value\n return \"-\" + value;\n }\n\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n\n // Normalize zero\n if (value === \"0x\") { return \"0x00\"; }\n\n // Make the string even length\n if (value.length % 2) { value = \"0x0\" + value.substring(2); }\n\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n\n return value;\n}\n\nfunction toBigNumber(value: BN): BigNumber {\n return BigNumber.from(toHex(value));\n}\n\nfunction toBN(value: BigNumberish): BN {\n const hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return (new BN(\"-\" + hex.substring(3), 16));\n }\n return new BN(hex.substring(2), 16);\n}\n\nfunction throwFault(fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value != null) { params.value = value; }\n\n return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// value should have no prefix\nexport function _base36To16(value: string): string {\n return (new BN(value, 36)).toString(16);\n}\n\n// value should have no prefix\nexport function _base16To36(value: string): string {\n return (new BN(value, 16)).toString(36);\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexZeroPad, isBytes } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BigNumber, BigNumberish, isBigNumberish } from \"./bignumber\";\n\nconst _constructorGuard = { };\n\nconst Zero = BigNumber.from(0);\nconst NegativeOne = BigNumber.from(-1);\n\nfunction throwFault(message: string, fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value !== undefined) { params.value = value; }\n return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// Constant to pull zeros from for multipliers\nlet zeros = \"0\";\nwhile (zeros.length < 256) { zeros += zeros; }\n\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getMultiplier(decimals: BigNumberish): string {\n\n if (typeof(decimals) !== \"number\") {\n try {\n decimals = BigNumber.from(decimals).toNumber();\n } catch (e) { }\n }\n\n if (typeof(decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}\n\nexport function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string {\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n // Make sure wei is a big number (convert as necessary)\n value = BigNumber.from(value);\n\n const negative = value.lt(Zero);\n if (negative) { value = value.mul(NegativeOne); }\n\n let fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) { fraction = \"0\" + fraction; }\n\n // Strip training 0\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n\n const whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n\n if (negative) { value = \"-\" + value; }\n\n return value;\n}\n\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n if (typeof(value) !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n\n // Is it negative?\n const negative = (value.substring(0, 1) === \"-\");\n if (negative) { value = value.substring(1); }\n\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n\n // Split it into a whole and fractional part\n const comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n\n let whole = comps[0], fraction = comps[1];\n if (!whole) { whole = \"0\"; }\n if (!fraction) { fraction = \"0\"; }\n\n // Trim trailing zeros\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n\n // Check the fraction doesn't exceed our decimals size\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n\n // If decimals is 0, we have an empty string for fraction\n if (fraction === \"\") { fraction = \"0\"; }\n\n // Fully pad the string with zeros to get to wei\n while (fraction.length < multiplier.length - 1) { fraction += \"0\"; }\n\n const wholeValue = BigNumber.from(whole);\n const fractionValue = BigNumber.from(fraction);\n\n let wei = (wholeValue.mul(multiplier)).add(fractionValue);\n\n if (negative) { wei = wei.mul(NegativeOne); }\n\n return wei;\n}\n\n\nexport class FixedFormat {\n readonly signed: boolean;\n readonly width: number;\n readonly decimals: number;\n readonly name: string;\n readonly _multiplier: string;\n\n constructor(constructorGuard: any, signed: boolean, width: number, decimals: number) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n\n this.name = (signed ? \"\": \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n\n this._multiplier = getMultiplier(decimals);\n\n Object.freeze(this);\n }\n\n static from(value: any): FixedFormat {\n if (value instanceof FixedFormat) { return value; }\n\n if (typeof(value) === \"number\") {\n value = `fixed128x${value}`\n }\n\n let signed = true;\n let width = 128;\n let decimals = 18;\n\n if (typeof(value) === \"string\") {\n if (value === \"fixed\") {\n // defaults...\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) { logger.throwArgumentError(\"invalid fixed format\", \"format\", value); }\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const check = (key: string, type: string, defaultValue: any): any => {\n if (value[key] == null) { return defaultValue; }\n if (typeof(value[key]) !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type +\")\", \"format.\" + key, value[key]);\n }\n return value[key];\n }\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n\n return new FixedFormat(_constructorGuard, signed, width, decimals);\n }\n}\n\nexport class FixedNumber {\n readonly format: FixedFormat;\n readonly _hex: string;\n readonly _value: string;\n\n readonly _isFixedNumber: boolean;\n\n constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat) {\n logger.checkNew(new.target, FixedNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.format = format;\n this._hex = hex;\n this._value = value;\n\n this._isFixedNumber = true;\n\n Object.freeze(this);\n }\n\n _checkFormat(other: FixedNumber): void {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n }\n\n addUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format);\n }\n\n subUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format);\n }\n\n mulUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format);\n }\n\n divUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format);\n }\n\n floor(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n ceiling(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n // @TODO: Support other rounding algorithms\n round(decimals?: number): FixedNumber {\n if (decimals == null) { decimals = 0; }\n\n // If we are already in range, we're done\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n if (decimals < 0 || decimals > 80 || (decimals % 1)) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n\n if (comps[1].length <= decimals) { return this; }\n\n const factor = FixedNumber.from(\"1\" + zeros.substring(0, decimals), this.format);\n const bump = BUMP.toFormat(this.format);\n\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n }\n\n isZero(): boolean {\n return (this._value === \"0.0\" || this._value === \"0\");\n }\n\n isNegative(): boolean {\n return (this._value[0] === \"-\");\n }\n\n toString(): string { return this._value; }\n\n toHexString(width?: number): string {\n if (width == null) { return this._hex; }\n if (width % 8) { logger.throwArgumentError(\"invalid byte width\", \"width\", width); }\n const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return hexZeroPad(hex, width / 8);\n }\n\n toUnsafeFloat(): number { return parseFloat(this.toString()); }\n\n toFormat(format: FixedFormat | string): FixedNumber {\n return FixedNumber.fromString(this._value, format);\n }\n\n\n static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber {\n // If decimals looks more like a format, and there is no format, shift the parameters\n if (format == null && decimals != null && !isBigNumberish(decimals)) {\n format = decimals;\n decimals = null;\n }\n\n if (decimals == null) { decimals = 0; }\n if (format == null) { format = \"fixed\"; }\n\n return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n }\n\n\n static fromString(value: string, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n const numeric = parseFixed(value, fixedFormat.decimals);\n\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n\n let hex: string = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = hexZeroPad(hex, fixedFormat.width / 8);\n }\n\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n if (arrayify(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n\n let numeric = BigNumber.from(value);\n if (fixedFormat.signed) { numeric = numeric.fromTwos(fixedFormat.width); }\n\n const hex = numeric.toTwos((fixedFormat.signed ? 0: 1) + fixedFormat.width).toHexString();\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static from(value: any, format?: FixedFormat | string | number) {\n if (typeof(value) === \"string\") {\n return FixedNumber.fromString(value, format);\n }\n\n if (isBytes(value)) {\n return FixedNumber.fromBytes(value, format);\n }\n\n try {\n return FixedNumber.fromValue(value, 0, format);\n } catch (error) {\n // Allow NUMERIC_FAULT to bubble up\n if (error.code !== Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n }\n\n static isFixedNumber(value: any): value is FixedNumber {\n return !!(value && value._isFixedNumber);\n }\n}\n\nconst ONE = FixedNumber.from(1);\nconst BUMP = FixedNumber.from(\"0.5\");\n","export { BigNumber, BigNumberish } from \"./bignumber\";\nexport { formatFixed, FixedFormat, FixedNumber, parseFixed } from \"./fixednumber\";\n\n// Internal methods used by address\nexport { _base16To36, _base36To16 } from \"./bignumber\";\n","export const version = \"properties/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function defineReadOnly(object: T, name: K, value: T[K]): void {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor: any, key: string): T {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) { return ctor[key]; }\n if (!ctor.prototype || typeof(ctor.prototype) !== \"object\") { break; }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\n\nexport type Deferrable = {\n [ K in keyof T ]: T[K] | Promise;\n}\n\n\ntype Result = { key: string, value: any};\n\nexport async function resolveProperties(object: Readonly>): Promise {\n const promises: Array> = Object.keys(object).map((key) => {\n const value = object[>key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, { });\n}\n\nexport function checkProperties(object: any, properties: { [ name: string ]: boolean }): void {\n if (!object || typeof(object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\n\nexport function shallowCopy(object: T): T {\n const result: any = {};\n for (const key in object) { result[key] = object[key]; }\n return result;\n}\n\nconst opaque: { [key: string]: boolean } = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n\nfunction _isFrozen(object: any): boolean {\n\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof(object)]) { return true; }\n\n if (Array.isArray(object) || typeof(object) === \"object\") {\n if (!Object.isFrozen(object)) { return false; }\n\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value: any = null;\n try {\n value = object[keys[i]];\n } catch (error) {\n // If accessing a value triggers an error, it is a getter\n // designed to do so (e.g. Result) and is therefore \"frozen\"\n continue;\n }\n\n if (!_isFrozen(value)) { return false; }\n }\n\n return true;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\n// Returns a new copy of object, such that no properties may be replaced.\n// New properties may be added only to objects.\nfunction _deepCopy(object: any): any {\n\n if (_isFrozen(object)) { return object; }\n\n // Arrays are mutable, so we need to create a copy\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n\n if (typeof(object) === \"object\") {\n const result: { [ key: string ]: any } = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) { continue; }\n defineReadOnly(result, key, deepCopy(value));\n }\n\n return result;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\nexport function deepCopy(object: T): T {\n return _deepCopy(object);\n}\n\nexport class Description {\n constructor(info: { [ K in keyof T ]: T[K] }) {\n for (const key in info) {\n (this)[key] = deepCopy(info[key]);\n }\n }\n}\n","export const version = \"abi/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport interface JsonFragmentType {\n readonly name?: string;\n readonly indexed?: boolean;\n readonly type?: string;\n readonly internalType?: any; // @TODO: in v6 reduce type\n readonly components?: ReadonlyArray;\n}\n\nexport interface JsonFragment {\n readonly name?: string;\n readonly type?: string;\n\n readonly anonymous?: boolean;\n\n readonly payable?: boolean;\n readonly constant?: boolean;\n readonly stateMutability?: string;\n\n readonly inputs?: ReadonlyArray;\n readonly outputs?: ReadonlyArray;\n\n readonly gas?: string;\n};\n\nconst _constructorGuard = { };\n\n// AST Node parser state\ntype ParseState = {\n allowArray?: boolean,\n allowName?: boolean,\n allowParams?: boolean,\n allowType?: boolean,\n readArray?: boolean,\n};\n\n// AST Node\ntype ParseNode = {\n parent?: any,\n type?: string,\n name?: string,\n state?: ParseState,\n indexed?: boolean,\n components?: Array\n};\n\nlet ModifiersBytes: { [ name: string ]: boolean } = { calldata: true, memory: true, storage: true };\nlet ModifiersNest: { [ name: string ]: boolean } = { calldata: true, memory: true };\nfunction checkModifier(type: string, name: string): boolean {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) { return true; }\n } else if (type === \"address\") {\n if (name === \"payable\") { return true; }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) { return true; }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n}\n\n// @TODO: Make sure that children of an indexed tuple are marked with a null indexed\nfunction parseParamType(param: string, allowIndexed: boolean): ParseNode {\n\n let originalParam = param;\n function throwError(i: number) {\n logger.throwArgumentError(`unexpected character at position ${ i }`, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n\n function newNode(parent: ParseNode): ParseNode {\n let node: ParseNode = { type: \"\", name: \"\", parent: parent, state: { allowType: true } };\n if (allowIndexed) { node.indexed = false; }\n return node\n }\n\n let parent: ParseNode = { type: \"\", name: \"\", state: { allowType: true } };\n let node = parent;\n\n for (let i = 0; i < param.length; i++) {\n let c = param[i];\n switch (c) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [ newNode(node) ];\n node = node.components[0];\n break;\n\n case \")\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let child = node;\n node = node.parent;\n if (!node) { throwError(i); }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n\n case \",\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let sibling: ParseNode = newNode(node.parent);\n //{ type: \"\", name: \"\", parent: node.parent, state: { allowType: true } };\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n\n // Hit a space...\n case \" \":\n\n // If reading type, the type is done and may read a param or name\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n\n // If reading name, the name is done\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n if (node.indexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n\n break;\n\n case \"[\":\n if (!node.state.allowArray) { throwError(i); }\n\n node.type += c;\n\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n\n case \"]\":\n if (!node.state.readArray) { throwError(i); }\n\n node.type += c;\n\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n\n default:\n if (node.state.allowType) {\n node.type += c;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c;\n } else {\n throwError(i);\n }\n }\n }\n\n if (node.parent) { logger.throwArgumentError(\"unexpected eof\", \"param\", param); }\n\n delete parent.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(originalParam.length - 7); }\n if (node.indexed) { throwError(originalParam.length - 7); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n\n parent.type = verifyType(parent.type);\n\n return parent;\n}\n\nfunction populate(object: any, params: any) {\n for (let key in params) { defineReadOnly(object, key, params[key]); }\n}\n\nexport const FormatTypes: { [ name: string ]: string } = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n\n // JSON-format a la Solidity\n json: \"json\"\n});\n\nconst paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n\nexport class ParamType {\n\n // The local name of the parameter (of null if unbound)\n readonly name: string;\n\n // The fully qualified type (e.g. \"address\", \"tuple(address)\", \"uint256[3][]\"\n readonly type: string;\n\n // The base type (e.g. \"address\", \"tuple\", \"array\")\n readonly baseType: string;\n\n // Indexable Paramters ONLY (otherwise null)\n readonly indexed: boolean;\n\n // Tuples ONLY: (otherwise null)\n // - sub-components\n readonly components: Array;\n\n // Arrays ONLY: (otherwise null)\n // - length of the array (-1 for dynamic length)\n // - child type\n readonly arrayLength: number;\n readonly arrayChildren: ParamType;\n\n readonly _isParamType: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) { logger.throwError(\"use fromString\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n }); }\n populate(this, params);\n\n let match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: ((this.components != null) ? \"tuple\": this.type)\n });\n }\n\n this._isParamType = true;\n\n Object.freeze(this);\n }\n\n // Format the parameter fragment\n // - sighash: \"(uint256,address)\"\n // - minimal: \"tuple(uint256,address) indexed\"\n // - full: \"tuple(uint256 foo, address bar) indexed baz\"\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n let result: any = {\n type: ((this.baseType === \"tuple\") ? \"tuple\": this.type),\n name: (this.name || undefined)\n };\n if (typeof(this.indexed) === \"boolean\") { result.indexed = this.indexed; }\n if (this.components) {\n result.components = this.components.map((comp) => JSON.parse(comp.format(format)));\n }\n return JSON.stringify(result);\n }\n\n let result = \"\";\n\n // Array\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\": String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(\n (comp) => comp.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n\n if (format !== FormatTypes.sighash) {\n if (this.indexed === true) { result += \" indexed\"; }\n if (format === FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n\n return result;\n }\n\n static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType {\n if (typeof(value) === \"string\") {\n return ParamType.fromString(value, allowIndexed);\n }\n return ParamType.fromObject(value);\n }\n\n static fromObject(value: JsonFragmentType | ParamType): ParamType {\n if (ParamType.isParamType(value)) { return value; }\n\n return new ParamType(_constructorGuard, {\n name: (value.name || null),\n type: verifyType(value.type),\n indexed: ((value.indexed == null) ? null: !!value.indexed),\n components: (value.components ? value.components.map(ParamType.fromObject): null)\n });\n }\n\n static fromString(value: string, allowIndexed?: boolean): ParamType {\n function ParamTypify(node: ParseNode): ParamType {\n return ParamType.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n\n return ParamTypify(parseParamType(value, !!allowIndexed));\n }\n\n static isParamType(value: any): value is ParamType {\n return !!(value != null && value._isParamType);\n }\n};\n\nfunction parseParams(value: string, allowIndex: boolean): Array {\n return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex));\n}\n\ntype TypeCheck = { -readonly [ K in keyof T ]: T[K] };\n\ninterface _Fragment {\n readonly type: string;\n readonly name: string;\n readonly inputs: ReadonlyArray;\n}\n\nexport abstract class Fragment {\n\n readonly type: string;\n readonly name: string;\n readonly inputs: Array;\n\n readonly _isFragment: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n\n this._isFragment = true;\n\n Object.freeze(this);\n }\n\n abstract format(format?: string): string;\n\n static from(value: Fragment | JsonFragment | string): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n if (typeof(value) === \"string\") {\n return Fragment.fromString(value);\n }\n\n return Fragment.fromObject(value);\n }\n\n static fromObject(value: Fragment | JsonFragment): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment?\n return null;\n }\n\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n }\n\n static fromString(value: string): Fragment {\n // Make sure the \"returns\" is surrounded by a space and all whitespace is exactly one space\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n }\n\n static isFragment(value: any): value is Fragment {\n return !!(value && value._isFragment);\n }\n}\n\ninterface _EventFragment extends _Fragment {\n readonly anonymous: boolean;\n}\n\nexport class EventFragment extends Fragment {\n readonly anonymous: boolean;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"event \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: EventFragment | JsonFragment | string): EventFragment {\n if (typeof(value) === \"string\") {\n return EventFragment.fromString(value);\n }\n return EventFragment.fromObject(value);\n }\n\n static fromObject(value: JsonFragment | EventFragment): EventFragment {\n if (EventFragment.isEventFragment(value)) { return value; }\n\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n\n const params: TypeCheck<_EventFragment> = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n type: \"event\"\n };\n\n return new EventFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): EventFragment {\n\n let match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n\n let anonymous = false;\n match[3].split(\" \").forEach((modifier) => {\n switch(modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n\n return EventFragment.fromObject({\n name: match[1].trim(),\n anonymous: anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n }\n\n static isEventFragment(value: any): value is EventFragment {\n return (value && value._isFragment && value.type === \"event\");\n }\n}\n\nfunction parseGas(value: string, params: any): string {\n params.gas = null;\n\n let comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = BigNumber.from(comps[1]);\n return comps[0];\n }\n\n return value;\n}\n\nfunction parseModifiers(value: string, params: any): void {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n\n value.split(\" \").forEach((modifier) => {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n}\n\ntype StateInputValue = {\n constant?: boolean;\n payable?: boolean;\n stateMutability?: string;\n type?: string;\n};\n\ntype StateOutputValue = {\n constant: boolean;\n payable: boolean;\n stateMutability: string;\n};\n\nfunction verifyState(value: StateInputValue): StateOutputValue {\n let result: any = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n\n // Set (and check things are consistent) the constant property\n result.constant = (result.stateMutability === \"view\" || result.stateMutability === \"pure\");\n if (value.constant != null) {\n if ((!!value.constant) !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n // Set (and check things are consistent) the payable property\n result.payable = (result.stateMutability === \"payable\");\n if (value.payable != null) {\n if ((!!value.payable) !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n\n // If payable we can assume non-constant; otherwise we can't assume\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n result.constant = !!value.constant;\n\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = (result.payable ? \"payable\": \"nonpayable\");\n }\n\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = (result.constant ? \"view\": \"payable\");\n\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n return result;\n}\n\ninterface _ConstructorFragment extends _Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n}\n\nexport class ConstructorFragment extends Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n if (format === FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n\n let result = \"constructor(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n\n return result.trim();\n }\n\n static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment {\n if (typeof(value) === \"string\") {\n return ConstructorFragment.fromString(value);\n }\n return ConstructorFragment.fromObject(value);\n }\n\n static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment {\n if (ConstructorFragment.isConstructorFragment(value)) { return value; }\n\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n\n let state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n\n const params: TypeCheck<_ConstructorFragment> = {\n name: null,\n type: value.type,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new ConstructorFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): ConstructorFragment {\n let params: any = { type: \"constructor\" };\n\n value = parseGas(value, params);\n\n let parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n\n params.inputs = parseParams(parens[2].trim(), false);\n\n parseModifiers(parens[3].trim(), params);\n\n return ConstructorFragment.fromObject(params);\n }\n\n static isConstructorFragment(value: any): value is ConstructorFragment {\n return (value && value._isFragment && value.type === \"constructor\");\n }\n}\n\ninterface _FunctionFragment extends _ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n}\n\nexport class FunctionFragment extends ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n outputs: this.outputs.map((output) => JSON.parse(output.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"function \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += (this.stateMutability + \" \");\n }\n } else if (this.constant) {\n result += \"view \";\n }\n\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(\n (output) => output.format(format)\n ).join(\", \") + \") \";\n }\n\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: FunctionFragment | JsonFragment | string): FunctionFragment {\n if (typeof(value) === \"string\") {\n return FunctionFragment.fromString(value);\n }\n return FunctionFragment.fromObject(value);\n }\n\n static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment {\n if (FunctionFragment.isFunctionFragment(value)) { return value; }\n\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n\n let state = verifyState(value);\n\n const params: TypeCheck<_FunctionFragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n outputs: (value.outputs ? value.outputs.map(ParamType.fromObject): [ ]),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new FunctionFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): FunctionFragment {\n let params: any = { type: \"function\" };\n value = parseGas(value, params);\n\n let comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n\n let parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n parseModifiers(parens[3].trim(), params);\n\n // We have outputs\n if (comps.length > 1) {\n let returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [ ];\n }\n\n return FunctionFragment.fromObject(params);\n }\n\n static isFunctionFragment(value: any): value is FunctionFragment {\n return (value && value._isFragment && value.type === \"function\");\n }\n}\n\n//export class StructFragment extends Fragment {\n//}\n\nfunction checkForbidden(fragment: ErrorFragment): ErrorFragment {\n const sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(`cannot specify user defined ${ sig } error`, \"fragment\", fragment);\n }\n return fragment;\n}\n\nexport class ErrorFragment extends Fragment {\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"error \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n return result.trim();\n }\n\n static from(value: ErrorFragment | JsonFragment | string): ErrorFragment {\n if (typeof(value) === \"string\") {\n return ErrorFragment.fromString(value);\n }\n return ErrorFragment.fromObject(value);\n }\n\n static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment {\n if (ErrorFragment.isErrorFragment(value)) { return value; }\n\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n\n const params: TypeCheck<_Fragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): [])\n };\n\n return checkForbidden(new ErrorFragment(_constructorGuard, params));\n }\n\n static fromString(value: string): ErrorFragment {\n let params: any = { type: \"error\" };\n\n let parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n return checkForbidden(ErrorFragment.fromObject(params));\n }\n\n static isErrorFragment(value: any): value is ErrorFragment {\n return (value && value._isFragment && value.type === \"error\");\n }\n}\n\nfunction verifyType(type: string): string {\n\n // These need to be transformed to their full description\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n\n // @TODO: more verification\n\n return type;\n}\n\n// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234\nconst regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\nfunction verifyIdentifier(value: string): string {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError(`invalid identifier \"${ value }\"`, \"value\", value);\n }\n return value;\n}\n\nconst regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n\nfunction splitNesting(value: string): Array {\n value = value.trim();\n\n let result = [];\n let accum = \"\";\n let depth = 0;\n for (let offset = 0; offset < value.length; offset++) {\n let c = value[offset];\n if (c === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c;\n if (c === \"(\") {\n depth++;\n } else if (c === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) { result.push(accum); }\n\n return result;\n}\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexConcat, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nexport interface Result extends ReadonlyArray {\n readonly [key: string]: any;\n}\n\nexport function checkResultErrors(result: Result): Array<{ path: Array, error: Error }> {\n // Find the first error (if any)\n const errors: Array<{ path: Array, error: Error }> = [ ];\n\n const checkErrors = function(path: Array, object: any): void {\n if (!Array.isArray(object)) { return; }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n }\n checkErrors([ ], result);\n\n return errors;\n\n}\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport abstract class Coder {\n\n // The coder name:\n // - address, uint256, tuple, array, etc.\n readonly name: string;\n\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n readonly type: string;\n\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n readonly localName: string;\n\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n readonly dynamic: boolean;\n\n constructor(name: string, type: string, localName: string, dynamic: boolean) {\n // @TODO: defineReadOnly these\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n\n _throwError(message: string, value: any): void {\n logger.throwArgumentError(message, this.localName, value);\n }\n\n abstract encode(writer: Writer, value: any): number;\n abstract decode(reader: Reader): any;\n\n abstract defaultValue(): any;\n}\n\nexport class Writer {\n readonly wordSize: number;\n\n _data: Array;\n _dataLength: number;\n _padding: Uint8Array;\n\n constructor(wordSize?: number) {\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n this._data = [ ];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n\n get data(): string {\n return hexConcat(this._data);\n }\n get length(): number { return this._dataLength; }\n\n _writeData(data: Uint8Array): number {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n }\n\n appendWriter(writer: Writer): number {\n return this._writeData(concat(writer._data));\n }\n\n // Arrayish items; padded on the right to wordSize\n writeBytes(value: BytesLike): number {\n let bytes = arrayify(value);\n const paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = concat([ bytes, this._padding.slice(paddingOffset) ])\n }\n return this._writeData(bytes);\n }\n\n _getValue(value: BigNumberish): Uint8Array {\n let bytes = arrayify(BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = concat([ this._padding.slice(bytes.length % this.wordSize), bytes ]);\n }\n return bytes;\n }\n\n // BigNumberish items; padded on the left to wordSize\n writeValue(value: BigNumberish): number {\n return this._writeData(this._getValue(value));\n }\n\n writeUpdatableValue(): (value: BigNumberish) => void {\n const offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return (value: BigNumberish) => {\n this._data[offset] = this._getValue(value);\n };\n }\n}\n\nexport class Reader {\n readonly wordSize: number;\n readonly allowLoose: boolean;\n\n readonly _data: Uint8Array;\n readonly _coerceFunc: CoerceFunc;\n\n _offset: number;\n\n constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean) {\n defineReadOnly(this, \"_data\", arrayify(data));\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n defineReadOnly(this, \"_coerceFunc\", coerceFunc);\n defineReadOnly(this, \"allowLoose\", allowLoose);\n\n this._offset = 0;\n }\n\n get data(): string { return hexlify(this._data); }\n get consumed(): number { return this._offset; }\n\n // The default Coerce function\n static coerce(name: string, value: any): any {\n let match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) { value = value.toNumber(); }\n return value;\n }\n\n coerce(name: string, value: any): any {\n if (this._coerceFunc) { return this._coerceFunc(name, value); }\n return Reader.coerce(name, value);\n }\n\n _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array {\n let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger.throwError(\"data out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength)\n }\n\n subReader(offset: number): Reader {\n return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n }\n\n readBytes(length: number, loose?: boolean): Uint8Array {\n let bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n\n readValue(): BigNumber {\n return BigNumber.from(this.readBytes(this.wordSize));\n }\n}\n","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","\"use strict\";\n\nimport sha3 from \"js-sha3\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function keccak256(data: BytesLike): string {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n","export const version = \"rlp/5.5.0\";\n","\"use strict\";\n\n//See: https://github.com/ethereum/wiki/wiki/RLP\n\nimport { arrayify, BytesLike, hexlify, isBytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction arrayifyInteger(value: number): Array {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\n\nfunction unarrayifyInteger(data: Uint8Array, offset: number, length: number): number {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\n\nfunction _encode(object: Array | string): Array {\n if (Array.isArray(object)) {\n let payload: Array = [];\n object.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length)\n return payload;\n }\n\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n\n return length.concat(payload);\n\n }\n\n if (!isBytesLike(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n\n const data: Array = Array.prototype.slice.call(arrayify(object));\n\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n\n } else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n\n return length.concat(data);\n}\n\nexport function encode(object: any): string {\n return hexlify(_encode(object));\n}\n\ntype Decoded = {\n result: any;\n consumed: number;\n};\n\nfunction _decodeChildren(data: Uint8Array, offset: number, childOffset: number, length: number): Decoded {\n const result = [];\n\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n\n result.push(decoded.result);\n\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n }\n\n return {consumed: (1 + length), result: result};\n}\n\n// returns { consumed: number, result: Object }\nfunction _decode(data: Uint8Array, offset: number): { consumed: number, result: any } {\n if (data.length === 0) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data long segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n\n } else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1, length);\n\n } else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result }\n\n } else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result }\n }\n return { consumed: 1, result: hexlify(data[offset]) };\n}\n\nexport function decode(data: BytesLike): any {\n const bytes = arrayify(data);\n const decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n}\n\n","export const version = \"address/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish, _base16To36, _base36To16 } from \"@ethersproject/bignumber\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { encode } from \"@ethersproject/rlp\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction getChecksumAddress(address: string): string {\n if (!isHexString(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n address = address.toLowerCase();\n\n const chars = address.substring(2).split(\"\");\n\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n\n const hashed = arrayify(keccak256(expanded));\n\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n\n return \"0x\" + chars.join(\"\");\n}\n\n// Shims for environments that are missing some required constants and functions\nconst MAX_SAFE_INTEGER: number = 0x1fffffffffffff;\n\nfunction log10(x: number): number {\n if (Math.log10) { return Math.log10(x); }\n return Math.log(x) / Math.LN10;\n}\n\n\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n\n// Create lookup table\nconst ibanLookup: { [character: string]: string } = { };\nfor (let i = 0; i < 10; i++) { ibanLookup[String(i)] = String(i); }\nfor (let i = 0; i < 26; i++) { ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); }\n\n// How many decimal digits can we process? (for 64-bit float, this is 15)\nconst safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n\nfunction ibanChecksum(address: string): string {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits){\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) { checksum = \"0\" + checksum; }\n\n return checksum;\n};\n\nexport function getAddress(address: string): string {\n let result = null;\n\n if (typeof(address) !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n\n // Missing the 0x prefix\n if (address.substring(0, 2) !== \"0x\") { address = \"0x\" + address; }\n\n result = getChecksumAddress(address);\n\n // It is a checksummed address with a bad checksum\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n\n // Maybe ICAP? (we only support direct mode)\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n\n // It is an ICAP address with a bad checksum\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n\n result = _base36To16(address.substring(4));\n while (result.length < 40) { result = \"0\" + result; }\n result = getChecksumAddress(\"0x\" + result);\n\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n return result;\n}\n\nexport function isAddress(address: string): boolean {\n try {\n getAddress(address);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getIcapAddress(address: string): string {\n let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n while (base36.length < 30) { base36 = \"0\" + base36; }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\nexport function getContractAddress(transaction: { from: string, nonce: BigNumberish }) {\n let from: string = null;\n try {\n from = getAddress(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n\n const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));\n\n return getAddress(hexDataSlice(keccak256(encode([ from, nonce ])), 12));\n}\n\nexport function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string {\n if (hexDataLength(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if (hexDataLength(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress(hexDataSlice(keccak256(concat([ \"0xff\", getAddress(from), salt, initCodeHash ])), 12))\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { hexZeroPad } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class AddressCoder extends Coder {\n\n constructor(localName: string) {\n super(\"address\", \"address\", localName, false);\n }\n\n defaultValue(): string {\n return \"0x0000000000000000000000000000000000000000\";\n }\n\n encode(writer: Writer, value: string): number {\n try {\n value = getAddress(value)\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n }\n\n decode(reader: Reader): any {\n return getAddress(hexZeroPad(reader.readValue().toHexString(), 20));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// Clones the functionality of an existing Coder, but without a localName\nexport class AnonymousCoder extends Coder {\n private coder: Coder;\n\n constructor(coder: Coder) {\n super(coder.name, coder.type, undefined, coder.dynamic);\n this.coder = coder;\n }\n\n defaultValue(): any {\n return this.coder.defaultValue();\n }\n\n encode(writer: Writer, value: any): number {\n return this.coder.encode(writer, value);\n }\n\n decode(reader: Reader): any {\n return this.coder.decode(reader);\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./abstract-coder\";\nimport { AnonymousCoder } from \"./anonymous\";\n\nexport function pack(writer: Writer, coders: ReadonlyArray, values: Array | { [ name: string ]: any }): number {\n let arrayValues: Array = null;\n\n if (Array.isArray(values)) {\n arrayValues = values;\n\n } else if (values && typeof(values) === \"object\") {\n let unique: { [ name: string ]: boolean } = { };\n\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n if (unique[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n unique[name] = true;\n\n return values[name];\n });\n\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n\n let staticWriter = new Writer(writer.wordSize);\n let dynamicWriter = new Writer(writer.wordSize);\n\n let updateFuncs: Array<(baseOffset: number) => void> = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset: number) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n\n } else {\n coder.encode(staticWriter, value);\n }\n });\n\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\n\nexport function unpack(reader: Reader, coders: Array): Result {\n let values: any = [];\n\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n\n coders.forEach((coder) => {\n let value: any = null;\n\n if (coder.dynamic) {\n let offset = reader.readValue();\n let offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n\n if (value != undefined) {\n values.push(value);\n }\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add any named parameters (i.e. tuples)\n coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n const value = values[index];\n\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: () => { throw value; }\n });\n } else {\n values[name] = value;\n }\n });\n\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if (value instanceof Error) {\n Object.defineProperty(values, i, {\n enumerable: true,\n get: () => { throw value; }\n });\n }\n }\n\n return Object.freeze(values);\n}\n\n\nexport class ArrayCoder extends Coder {\n readonly coder: Coder;\n readonly length: number;\n\n constructor(coder: Coder, length: number, localName: string) {\n const type = (coder.type + \"[\" + (length >= 0 ? length: \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n\n this.coder = coder;\n this.length = length;\n }\n\n defaultValue(): Array {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n\n const result: Array = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n\n encode(writer: Writer, value: Array): number {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n\n let count = this.length;\n\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName? (\" \"+ this.localName): \"\"));\n\n let coders = [];\n for (let i = 0; i < value.length; i++) { coders.push(this.coder); }\n\n return pack(writer, coders, value);\n }\n\n decode(reader: Reader): any {\n let count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count: count\n });\n }\n }\n let coders = [];\n for (let i = 0; i < count; i++) { coders.push(new AnonymousCoder(this.coder)); }\n\n return reader.coerce(this.name, unpack(reader, coders));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class BooleanCoder extends Coder {\n\n constructor(localName: string) {\n super(\"bool\", \"bool\", localName, false);\n }\n\n defaultValue(): boolean {\n return false;\n }\n\n encode(writer: Writer, value: boolean): number {\n return writer.writeValue(value ? 1: 0);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.type, !reader.readValue().isZero());\n }\n}\n\n","\"use strict\";\n\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class DynamicBytesCoder extends Coder {\n constructor(type: string, localName: string) {\n super(type, type, localName, true);\n }\n\n defaultValue(): string {\n return \"0x\";\n }\n\n encode(writer: Writer, value: any): number {\n value = arrayify(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n\n decode(reader: Reader): any {\n return reader.readBytes(reader.readValue().toNumber(), true);\n }\n}\n\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName: string) {\n super(\"bytes\", localName);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(super.decode(reader)));\n }\n}\n\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// @TODO: Merge this with bytes\nexport class FixedBytesCoder extends Coder {\n readonly size: number;\n\n constructor(size: number, localName: string) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n this.size = size;\n }\n\n defaultValue(): string {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n\n encode(writer: Writer, value: BytesLike): number {\n let data = arrayify(value);\n if (data.length !== this.size) { this._throwError(\"incorrect data length\", value); }\n return writer.writeBytes(data);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(reader.readBytes(this.size)));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NullCoder extends Coder {\n\n constructor(localName: string) {\n super(\"null\", \"\", localName, false);\n }\n\n defaultValue(): null {\n return null;\n }\n\n encode(writer: Writer, value: any): number {\n if (value != null) { this._throwError(\"not null\", value); }\n return writer.writeBytes([ ]);\n }\n\n decode(reader: Reader): any {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n }\n}\n","export const AddressZero = \"0x0000000000000000000000000000000000000000\";\n\n","import { BigNumber } from \"@ethersproject/bignumber\";\n\nconst NegativeOne: BigNumber = (/*#__PURE__*/BigNumber.from(-1));\nconst Zero: BigNumber = (/*#__PURE__*/BigNumber.from(0));\nconst One: BigNumber = (/*#__PURE__*/BigNumber.from(1));\nconst Two: BigNumber = (/*#__PURE__*/BigNumber.from(2));\nconst WeiPerEther: BigNumber = (/*#__PURE__*/BigNumber.from(\"1000000000000000000\"));\nconst MaxUint256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nconst MinInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\"));\nconst MaxInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256,\n};\n","export const HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n\n","// NFKC (composed) // (decomposed)\nexport const EtherSymbol = \"\\u039e\"; // \"\\uD835\\uDF63\";\n","\"use strict\";\n\nexport { AddressZero } from \"./addresses\";\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256\n} from \"./bignumbers\";\nexport { HashZero } from \"./hashes\";\nexport { EtherSymbol } from \"./strings\";\n\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { MaxUint256, NegativeOne, One, Zero } from \"@ethersproject/constants\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NumberCoder extends Coder {\n readonly size: number;\n readonly signed: boolean;\n\n constructor(size: number, signed: boolean, localName: string) {\n const name = ((signed ? \"int\": \"uint\") + (size * 8));\n super(name, name, localName, false);\n\n this.size = size;\n this.signed = signed;\n }\n\n defaultValue(): number {\n return 0;\n }\n\n encode(writer: Writer, value: BigNumberish): number {\n let v = BigNumber.from(value);\n\n // Check bounds are safe for encoding\n let maxUintValue = MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n let bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n\n v = v.toTwos(this.size * 8).mask(this.size * 8);\n\n if (this.signed) {\n v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n\n return writer.writeValue(v);\n }\n\n decode(reader: Reader): any {\n let value = reader.readValue().mask(this.size * 8);\n\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n\n return reader.coerce(this.name, value);\n }\n}\n\n","export const version = \"strings/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n\nexport enum UnicodeNormalizationForm {\n current = \"\",\n NFC = \"NFC\",\n NFD = \"NFD\",\n NFKC = \"NFKC\",\n NFKD = \"NFKD\"\n};\n\nexport enum Utf8ErrorReason {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n UNEXPECTED_CONTINUE = \"unexpected continuation byte\",\n\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n BAD_PREFIX = \"bad codepoint prefix\",\n\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n OVERRUN = \"string overrun\",\n\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n MISSING_CONTINUE = \"missing continuation byte\",\n\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n OUT_OF_RANGE = \"out of UTF-8 range\",\n\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n UTF16_SURROGATE = \"UTF-16 surrogate\",\n\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n OVERLONG = \"overlong representation\",\n};\n\n\nexport type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number;\n\nfunction errorFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n return logger.throwArgumentError(`invalid codepoint at offset ${ offset }; ${ reason }`, \"bytes\", bytes);\n}\n\nfunction ignoreFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) { break; }\n i++;\n }\n return i;\n }\n\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n\n // Nothing to skip\n return 0;\n}\n\nfunction replaceFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n\n // Put the replacement character into the output\n output.push(0xfffd);\n\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n\n// Common error handing strategies\nexport const Utf8ErrorFuncs: { [ name: string ]: Utf8ErrorFunc } = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes: BytesLike, onError?: Utf8ErrorFunc): Array {\n if (onError == null) { onError = Utf8ErrorFuncs.error; }\n\n bytes = arrayify(bytes);\n\n const result: Array = [];\n let i = 0;\n\n // Invalid bytes are ignored\n while(i < bytes.length) {\n\n const c = bytes[i++];\n\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n\n // 1110 xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n\n } else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n } else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n };\n\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n\n // See above loop for invalid continuation byte\n if (res === null) { continue; }\n\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n result.push(res);\n }\n\n return result;\n}\n\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Uint8Array {\n\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n\n if (c < 0x80) {\n result.push(c);\n\n } else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n\n } else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n\n } else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n\n return arrayify(result);\n};\n\nfunction escapeChar(value: number) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\n\nexport function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\"\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\n\nexport function _toUtf8String(codePoints: Array): string {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode(\n (((codePoint >> 10) & 0x3ff) + 0xd800),\n ((codePoint & 0x3ff) + 0xdc00)\n );\n }).join(\"\");\n}\n\nexport function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n\nexport function toUtf8CodePoints(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Array {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n","\"use strict\";\n\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\n\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\n\n\nexport function formatBytes32String(text: string): string {\n\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n\n // Check we have room for null-termination\n if (bytes.length > 31) { throw new Error(\"bytes32 string must be less than 32 bytes\"); }\n\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([ bytes, HashZero ]).slice(0, 32));\n}\n\nexport function parseBytes32String(bytes: BytesLike): string {\n const data = arrayify(bytes);\n\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) { throw new Error(\"invalid bytes32 - not 32 bytes long\"); }\n if (data[31] !== 0) { throw new Error(\"invalid bytes32 string - no null terminator\"); }\n\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) { length--; }\n\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n\n","\"use strict\";\n\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\n\ntype Ranged = {\n l: number, // Lo value\n h: number, // High value (less the lo)\n d?: number, // Delta/stride (default: 1)\n s?: number, // Shift (default: 1)\n e?: Array // Exceptions to skip\n};\n\ntype Table = { [ src: number ]: Array };\n\nfunction bytes2(data: string): Array {\n if ((data.length % 4) !== 0) { throw new Error(\"bad data\"); }\n let result = [];\n for (let i = 0; i < data.length; i += 4) {\n result.push(parseInt(data.substring(i, i + 4), 16));\n }\n return result;\n}\n\nfunction createTable(data: string, func?: (value: string) => Array): Table {\n if (!func) {\n func = function(value: string) { return [ parseInt(value, 16) ]; }\n }\n\n let lo = 0;\n\n let result: Table = { };\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n\n return result;\n}\n\nfunction createRangeTable(data: string): Array {\n let hi = 0;\n return data.split(\",\").map((v) => {\n let comps = v.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\n\nfunction matchMap(value: number, ranges: Array): Ranged {\n let lo = 0;\n for (let i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) { continue; }\n return range;\n }\n }\n return null;\n}\n\nconst Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n\n// @TODO: Make this relative...\nconst Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v) => parseInt(v, 16));\n\nconst Table_B_2_ranges: Array = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [ 23 ], l: 127 },\n { h: 54, s: 1, e: [ 48 ], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [ 2, 6, 8 ], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [ 18, 24, 66 ], l: 19, d: 2 },\n { h: 26, s: 32, e: [ 17 ], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [ 38 ], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [ 1, 4, 5, 7, 8, 11, 12, 17 ], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [ 2, 7, 8, 17 ], l: 52 },\n { h: 24, s: -120023, e: [ 2, 7, 13, 15, 16, 17 ], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [ 17 ], l: 56 },\n { h: 24, s: -119601, e: [ 17 ], l: 58 },\n { h: 24, s: -119659, e: [ 17 ], l: 58 },\n { h: 24, s: -119717, e: [ 17 ], l: 58 },\n { h: 24, s: -119775, e: [ 17 ], l: 58 }\n];\nconst Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\nconst Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\nconst Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n\nconst Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n\n\nfunction flatten(values: Array>): Array {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, [ ]);\n}\n\nexport function _nameprepTableA1(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\n\nexport function _nameprepTableB2(codepoint: number): Array {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) { return [ codepoint + range.s ]; }\n\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) { return codes; }\n\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) { return [ codepoint + shift[0] ]; }\n\n let complex = Table_B_2_complex[codepoint];\n if (complex) { return complex; }\n\n return null;\n}\n\nexport function _nameprepTableC(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_C_ranges);\n}\n\nexport function nameprep(value: string): string {\n\n // This allows platforms with incomplete normalize to bypass\n // it for very basic names which the built-in toLowerCase\n // will certainly handle correctly\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { return value.toLowerCase(); }\n\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) { return [ ]; }\n if (code >= 0xfe00 && code <= 0xfe0f) { return [ ]; }\n\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) { return codesTableB2; }\n\n // No Substitution\n return [ code ];\n }));\n\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\n\n // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9\n codes.forEach((code) => {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n\n // Prohibit Unassigned Code Points (Table A.1)\n codes.forEach((code) => {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n\n // IDNA extras\n let name = _toUtf8String(codes);\n\n // IDNA: 4.2.3.1\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n\n // IDNA: 4.2.4\n if (name.length > 63) { throw new Error(\"too long\"); }\n\n\n\n return name;\n}\n\n","\"use strict\";\n\nimport { formatBytes32String, parseBytes32String } from \"./bytes32\";\nimport { nameprep } from \"./idna\";\nimport { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from \"./utf8\";\n\nexport {\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n\n Utf8ErrorFunc,\n Utf8ErrorFuncs,\n Utf8ErrorReason,\n\n UnicodeNormalizationForm,\n\n formatBytes32String,\n parseBytes32String,\n\n nameprep\n}\n","\"use strict\";\n\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Reader, Writer } from \"./abstract-coder\";\nimport { DynamicBytesCoder } from \"./bytes\";\n\nexport class StringCoder extends DynamicBytesCoder {\n\n constructor(localName: string) {\n super(\"string\", localName);\n }\n\n defaultValue(): string {\n return \"\";\n }\n\n encode(writer: Writer, value: any): number {\n return super.encode(writer, toUtf8Bytes(value));\n }\n\n decode(reader: Reader): any {\n return toUtf8String(super.decode(reader));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\nimport { pack, unpack } from \"./array\";\n\nexport class TupleCoder extends Coder {\n readonly coders: Array;\n\n constructor(coders: Array, localName: string) {\n let dynamic = false;\n const types: Array = [];\n coders.forEach((coder) => {\n if (coder.dynamic) { dynamic = true; }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n\n super(\"tuple\", type, localName, dynamic);\n this.coders = coders;\n }\n\n defaultValue(): any {\n const values: any = [ ];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add named values\n this.coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n values[name] = values[index];\n });\n\n return Object.freeze(values);\n }\n\n encode(writer: Writer, value: Array | { [ name: string ]: any }): number {\n return pack(writer, this.coders, value);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, unpack(reader, this.coders));\n }\n}\n\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./coders/abstract-coder\";\nimport { AddressCoder } from \"./coders/address\";\nimport { ArrayCoder } from \"./coders/array\";\nimport { BooleanCoder } from \"./coders/boolean\";\nimport { BytesCoder } from \"./coders/bytes\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes\";\nimport { NullCoder } from \"./coders/null\";\nimport { NumberCoder } from \"./coders/number\";\nimport { StringCoder } from \"./coders/string\";\nimport { TupleCoder } from \"./coders/tuple\";\n\nimport { ParamType } from \"./fragments\";\n\n\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport class AbiCoder {\n readonly coerceFunc: CoerceFunc;\n\n constructor(coerceFunc?: CoerceFunc) {\n logger.checkNew(new.target, AbiCoder);\n defineReadOnly(this, \"coerceFunc\", coerceFunc || null);\n }\n\n _getCoder(param: ParamType): Coder {\n\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"array\":\n return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new TupleCoder((param.components || []).map((component) => {\n return this._getCoder(component);\n }), param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n if (size === 0 || size > 256 || (size % 8) !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n if (size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new FixedBytesCoder(size, param.name);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n }\n\n _getWordSize(): number { return 32; }\n\n _getReader(data: Uint8Array, allowLoose?: boolean): Reader {\n return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n }\n\n _getWriter(): Writer {\n return new Writer(this._getWordSize());\n }\n\n getDefaultValue(types: ReadonlyArray): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n\n encode(types: ReadonlyArray, values: ReadonlyArray): string {\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types: types, values: values }\n });\n }\n\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n\n const writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n }\n\n decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(this._getReader(arrayify(data), loose));\n }\n}\n\nexport const defaultAbiCoder: AbiCoder = new AbiCoder();\n\n","import { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport function id(text: string): string {\n return keccak256(toUtf8Bytes(text));\n}\n","export const version = \"hash/5.5.0\";\n","import { concat, hexlify } from \"@ethersproject/bytes\";\nimport { nameprep, toUtf8Bytes } from \"@ethersproject/strings\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\n\nconst Partition = new RegExp(\"^((.*)\\\\.)?([^.]+)$\");\n\nexport function isValidName(name: string): boolean {\n try {\n const comps = name.split(\".\");\n for (let i = 0; i < comps.length; i++) {\n if (nameprep(comps[i]).length === 0) {\n throw new Error(\"empty\")\n }\n }\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function namehash(name: string): string {\n /* istanbul ignore if */\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n\n let current = name;\n let result: string | Uint8Array = Zeros;\n while (current.length) {\n const partition = current.match(Partition);\n if (partition == null || partition[2] === \"\") {\n logger.throwArgumentError(\"invalid ENS address; missing component\", \"name\", name);\n }\n const label = toUtf8Bytes(nameprep(partition[3]));\n result = keccak256(concat([result, keccak256(label)]));\n\n current = partition[2] || \"\";\n }\n\n return hexlify(result);\n}\n\n","import { Bytes, concat } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport const messagePrefix = \"\\x19Ethereum Signed Message:\\n\";\n\nexport function hashMessage(message: Bytes | string): string {\n if (typeof(message) === \"string\") { message = toUtf8Bytes(message); }\n return keccak256(concat([\n toUtf8Bytes(messagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n\n","import { TypedDataDomain, TypedDataField } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, hexConcat, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { id } from \"./id\";\n\nconst padding = new Uint8Array(32);\npadding.fill(0);\n\nconst NegativeOne: BigNumber = BigNumber.from(-1);\nconst Zero: BigNumber = BigNumber.from(0);\nconst One: BigNumber = BigNumber.from(1);\nconst MaxUint256: BigNumber = BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n\nfunction hexPadRight(value: BytesLike) {\n const bytes = arrayify(value);\n const padOffset = bytes.length % 32\n if (padOffset) {\n return hexConcat([ bytes, padding.slice(padOffset) ]);\n }\n return hexlify(bytes);\n}\n\nconst hexTrue = hexZeroPad(One.toHexString(), 32);\nconst hexFalse = hexZeroPad(Zero.toHexString(), 32);\n\nconst domainFieldTypes: Record = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\n\nconst domainFieldNames: Array = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\n\nfunction checkString(key: string): (value: any) => string {\n return function (value: any){\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid domain value for ${ JSON.stringify(key) }`, `domain.${ key }`, value);\n }\n return value;\n }\n}\n\nconst domainChecks: Record any> = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value: any) {\n try {\n return BigNumber.from(value).toString()\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value for \"chainId\"`, \"domain.chainId\", value);\n },\n verifyingContract: function(value: any) {\n try {\n return getAddress(value).toLowerCase();\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value: any) {\n try {\n const bytes = arrayify(value);\n if (bytes.length !== 32) { throw new Error(\"bad length\"); }\n return hexlify(bytes);\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"salt\"`, \"domain.salt\", value);\n }\n}\n\nfunction getBaseEncoder(type: string): (value: any) => string {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n const signed = (match[1] === \"\");\n\n const width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n\n const boundsUpper = MaxUint256.mask(signed ? (width - 1): width);\n const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne): Zero;\n\n return function(value: BigNumberish) {\n const v = BigNumber.from(value);\n\n if (v.lt(boundsLower) || v.gt(boundsUpper)) {\n logger.throwArgumentError(`value out-of-bounds for ${ type }`, \"value\", value);\n }\n\n return hexZeroPad(v.toTwos(256).toHexString(), 32);\n };\n }\n }\n\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n if (width === 0 || width > 32 || match[1] !== String(width)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n\n return function(value: BytesLike) {\n const bytes = arrayify(value);\n if (bytes.length !== width) {\n logger.throwArgumentError(`invalid length for ${ type }`, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n\n switch (type) {\n case \"address\": return function(value: string) {\n return hexZeroPad(getAddress(value), 32);\n };\n case \"bool\": return function(value: boolean) {\n return ((!value) ? hexFalse: hexTrue);\n };\n case \"bytes\": return function(value: BytesLike) {\n return keccak256(value);\n };\n case \"string\": return function(value: string) {\n return id(value);\n };\n }\n\n return null;\n}\n\nfunction encodeType(name: string, fields: Array): string {\n return `${ name }(${ fields.map(({ name, type }) => (type + \" \" + name)).join(\",\") })`;\n}\n\nexport class TypedDataEncoder {\n readonly primaryType: string;\n readonly types: Record>;\n\n readonly _encoderCache: Record string>;\n readonly _types: Record;\n\n constructor(types: Record>) {\n defineReadOnly(this, \"types\", Object.freeze(deepCopy(types)));\n\n defineReadOnly(this, \"_encoderCache\", { });\n defineReadOnly(this, \"_types\", { });\n\n // Link struct types to their direct child structs\n const links: Record> = { };\n\n // Link structs to structs which contain them as a child\n const parents: Record> = { };\n\n // Link all subtypes within a given struct\n const subtypes: Record> = { };\n\n Object.keys(types).forEach((type) => {\n links[type] = { };\n parents[type] = [ ];\n subtypes[type] = { }\n });\n\n for (const name in types) {\n\n const uniqueNames: Record = { };\n\n types[name].forEach((field) => {\n\n // Check each field has a unique name\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(`duplicate variable name ${ JSON.stringify(field.name) } in ${ JSON.stringify(name) }`, \"types\", types);\n }\n uniqueNames[field.name] = true;\n\n // Get the base type (drop any array specifiers)\n const baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) { return ;}\n\n if (!parents[baseType]) {\n logger.throwArgumentError(`unknown type ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Add linkage\n parents[baseType].push(name);\n links[name][baseType] = true;\n });\n }\n\n // Deduce the primary type\n const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0));\n\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(`ambiguous primary types or unused types: ${ primaryTypes.map((t) => (JSON.stringify(t))).join(\", \") }`, \"types\", types);\n }\n\n defineReadOnly(this, \"primaryType\", primaryTypes[0]);\n\n // Check for circular type references\n function checkCircular(type: string, found: Record) {\n if (found[type]) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(type) }`, \"types\", types);\n }\n\n found[type] = true;\n\n Object.keys(links[type]).forEach((child) => {\n if (!parents[child]) { return; }\n\n // Recursively check children\n checkCircular(child, found);\n\n // Mark all ancestors as having this decendant\n Object.keys(found).forEach((subtype) => {\n subtypes[subtype][child] = true;\n });\n });\n\n delete found[type];\n }\n checkCircular(this.primaryType, { });\n\n // Compute each fully describe type\n for (const name in subtypes) {\n const st = Object.keys(subtypes[name]);\n st.sort();\n this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\");\n }\n }\n\n getEncoder(type: string): (value: any) => string {\n let encoder = this._encoderCache[type];\n if (!encoder) {\n encoder = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder;\n }\n\n _getEncoder(type: string): (value: any) => string {\n\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return encoder; }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const subEncoder = this.getEncoder(subtype);\n const length = parseInt(match[3]);\n return (value: Array) => {\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n\n let result = value.map(subEncoder);\n if (this._types[subtype]) {\n result = result.map(keccak256);\n }\n\n return keccak256(hexConcat(result));\n };\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this._types[type]);\n return (value: Record) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this._types[type]) { return keccak256(result); }\n return result;\n });\n values.unshift(encodedType);\n return hexConcat(values);\n }\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n encodeType(name: string): string {\n const result = this._types[name];\n if (!result) {\n logger.throwArgumentError(`unknown type: ${ JSON.stringify(name) }`, \"name\", name);\n }\n return result;\n }\n\n encodeData(type: string, value: any): string {\n return this.getEncoder(type)(value);\n }\n\n hashStruct(name: string, value: Record): string {\n return keccak256(this.encodeData(name, value));\n }\n\n encode(value: Record): string {\n return this.encodeData(this.primaryType, value);\n }\n\n hash(value: Record): string {\n return this.hashStruct(this.primaryType, value);\n }\n\n _visit(type: string, value: any, callback: (type: string, data: any) => any): any {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return callback(type, value); }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const length = parseInt(match[3]);\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map((v: any) => this._visit(subtype, v, callback));\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, >{});\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n visit(value: Record, callback: (type: string, data: any) => any): any {\n return this._visit(this.primaryType, value, callback);\n }\n\n static from(types: Record>): TypedDataEncoder {\n return new TypedDataEncoder(types);\n }\n\n static getPrimaryType(types: Record>): string {\n return TypedDataEncoder.from(types).primaryType;\n }\n\n static hashStruct(name: string, types: Record>, value: Record): string {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n\n static hashDomain(domain: TypedDataDomain): string {\n const domainFields: Array = [ ];\n for (const name in domain) {\n const type = domainFieldTypes[name];\n if (!type) {\n logger.throwArgumentError(`invalid typed-data domain key: ${ JSON.stringify(name) }`, \"domain\", domain);\n }\n domainFields.push({ name, type });\n }\n\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n\n static encode(domain: TypedDataDomain, types: Record>, value: Record): string {\n return hexConcat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n\n static hash(domain: TypedDataDomain, types: Record>, value: Record): string {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n\n // Replaces all address types with ENS names with their looked up address\n static async resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ domain: TypedDataDomain, value: any }> {\n // Make a copy to isolate it from the object passed in\n domain = shallowCopy(domain);\n\n // Look up all ENS names\n const ensCache: Record = { };\n\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n\n // Get a list of all the addresses\n encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n\n // Replace all ENS names with their address\n value = encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && ensCache[value]) { return ensCache[value]; }\n return value;\n });\n\n return { domain, value };\n }\n\n static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n\n // Derive the EIP712Domain Struct reference type\n const domainValues: Record = { };\n const domainTypes: Array<{ name: string, type:string }> = [ ];\n\n domainFieldNames.forEach((name) => {\n const value = (domain)[name];\n if (value == null) { return; }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n\n const encoder = TypedDataEncoder.from(types);\n\n const typesWithDomain = shallowCopy(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n\n // Validate the data structures and types\n encoder.encode(value);\n\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type: string, value: any) => {\n\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(arrayify(value));\n }\n\n // uint or int\n if (type.match(/^u?int/)) {\n return BigNumber.from(value).toString();\n }\n\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid string`, \"value\", value);\n }\n return value;\n }\n\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n }\n}\n\n","\"use strict\";\n\nimport { id } from \"./id\";\nimport { isValidName, namehash } from \"./namehash\";\nimport { hashMessage, messagePrefix } from \"./message\";\n\nimport { TypedDataEncoder as _TypedDataEncoder } from \"./typed-data\";\n\nexport {\n id,\n\n namehash,\n isValidName,\n\n messagePrefix,\n hashMessage,\n\n _TypedDataEncoder,\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { id } from \"@ethersproject/hash\";\nimport { keccak256 } from \"@ethersproject/keccak256\"\nimport { defineReadOnly, Description, getStatic } from \"@ethersproject/properties\";\n\nimport { AbiCoder, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Result } from \"./coders/abstract-coder\";\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, ParamType } from \"./fragments\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport { checkResultErrors, Result };\n\nexport class LogDescription extends Description {\n readonly eventFragment: EventFragment;\n readonly name: string;\n readonly signature: string;\n readonly topic: string;\n readonly args: Result\n}\n\nexport class TransactionDescription extends Description {\n readonly functionFragment: FunctionFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n readonly value: BigNumber;\n}\n\nexport class ErrorDescription extends Description {\n readonly errorFragment: ErrorFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n}\n\nexport class Indexed extends Description {\n readonly hash: string;\n readonly _isIndexed: boolean;\n\n static isIndexed(value: any): value is Indexed {\n return !!(value && value._isIndexed);\n }\n}\n\nconst BuiltinErrors: Record, name: string, reason?: boolean }> = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [ \"string\" ], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [ \"uint256\" ] }\n}\n\nfunction wrapAccessError(property: string, error: Error): Error {\n const wrap = new Error(`deferred error during ABI decoding triggered accessing ${ property }`);\n (wrap).error = error;\n return wrap;\n}\n\n/*\nfunction checkNames(fragment: Fragment, type: \"input\" | \"output\", params: Array): void {\n params.reduce((accum, param) => {\n if (param.name) {\n if (accum[param.name]) {\n logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format(\"full\") }`, \"fragment\", fragment);\n }\n accum[param.name] = true;\n }\n return accum;\n }, <{ [ name: string ]: boolean }>{ });\n}\n*/\nexport class Interface {\n readonly fragments: ReadonlyArray;\n\n readonly errors: { [ name: string ]: ErrorFragment };\n readonly events: { [ name: string ]: EventFragment };\n readonly functions: { [ name: string ]: FunctionFragment };\n readonly structs: { [ name: string ]: any };\n\n readonly deploy: ConstructorFragment;\n\n readonly _abiCoder: AbiCoder;\n\n readonly _isInterface: boolean;\n\n constructor(fragments: string | ReadonlyArray) {\n logger.checkNew(new.target, Interface);\n\n let abi: ReadonlyArray = [ ];\n if (typeof(fragments) === \"string\") {\n abi = JSON.parse(fragments);\n } else {\n abi = fragments;\n }\n\n defineReadOnly(this, \"fragments\", abi.map((fragment) => {\n return Fragment.from(fragment);\n }).filter((fragment) => (fragment != null)));\n\n defineReadOnly(this, \"_abiCoder\", getStatic<() => AbiCoder>(new.target, \"getAbiCoder\")());\n\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"errors\", { });\n defineReadOnly(this, \"events\", { });\n defineReadOnly(this, \"structs\", { });\n\n // Add all fragments by their signature\n this.fragments.forEach((fragment) => {\n let bucket: { [ name: string ]: Fragment } = null;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineReadOnly(this, \"deploy\", fragment);\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.events;\n break;\n case \"error\":\n bucket = this.errors;\n break;\n default:\n return;\n }\n\n let signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n\n bucket[signature] = fragment;\n });\n\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineReadOnly(this, \"deploy\", ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n\n defineReadOnly(this, \"_isInterface\", true);\n }\n\n format(format?: string): string | Array {\n if (!format) { format = FormatTypes.full; }\n if (format === FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n\n const abi = this.fragments.map((fragment) => fragment.format(format));\n\n // We need to re-bundle the JSON fragments a bit\n if (format === FormatTypes.json) {\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n\n return abi;\n }\n\n // Sub-classes can override these to handle other blockchains\n static getAbiCoder(): AbiCoder {\n return defaultAbiCoder;\n }\n\n static getAddress(address: string): string {\n return getAddress(address);\n }\n\n static getSighash(fragment: ErrorFragment | FunctionFragment): string {\n return hexDataSlice(id(fragment.format()), 0, 4);\n }\n\n static getEventTopic(eventFragment: EventFragment): string {\n return id(eventFragment.format());\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getFunction(nameOrSignatureOrSighash: string): FunctionFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n for (const name in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name)) {\n return this.functions[name];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.functions).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name);\n }\n\n return this.functions[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Find an event definition by any means necessary (unless it is ambiguous)\n getEvent(nameOrSignatureOrTopic: string): EventFragment {\n if (isHexString(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n\n return this.events[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getError(nameOrSignatureOrSighash: string): ErrorFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n const getSighash = getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\");\n for (const name in this.errors) {\n const error = this.errors[name];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.errors).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name);\n }\n\n return this.errors[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Get the sighash (the bytes4 selector) used by Solidity to identify a function\n getSighash(fragment: ErrorFragment | FunctionFragment | string): string {\n if (typeof(fragment) === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_) {\n throw error;\n }\n }\n }\n\n return getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\")(fragment);\n }\n\n // Get the topic (the bytes32 hash) used by Solidity to identify an event\n getEventTopic(eventFragment: EventFragment | string): string {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n return getStatic<(e: EventFragment) => string>(this.constructor, \"getEventTopic\")(eventFragment);\n }\n\n\n _decodeParams(params: ReadonlyArray, data: BytesLike): Result {\n return this._abiCoder.decode(params, data)\n }\n\n _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string {\n return this._abiCoder.encode(params, values)\n }\n\n encodeDeploy(values?: ReadonlyArray): string {\n return this._encodeParams(this.deploy.inputs, values || [ ]);\n }\n\n decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(`data signature does not match error ${ fragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n }\n\n encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n return hexlify(concat([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the data for a function call (e.g. tx.data)\n decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(`data signature does not match function ${ functionFragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n }\n\n // Encode the data for a function call (e.g. tx.data)\n encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(concat([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the result from a function call (e.g. from eth_call)\n decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n let bytes = arrayify(data);\n\n let reason: string = null;\n let errorArgs: Result = null;\n let errorName: string = null;\n let errorSignature: string = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error) { }\n break;\n\n case 4: {\n const selector = hexlify(bytes.slice(0, 4));\n const builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) { reason = errorArgs[0]; }\n } else {\n try {\n const error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error) {\n console.log(error);\n }\n }\n break;\n }\n }\n\n return logger.throwError(\"call revert exception\", Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n errorArgs, errorName, errorSignature, reason\n });\n }\n\n // Encode the result for a function call (e.g. for eth_call)\n encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [ ]));\n }\n\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array> {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n })\n }\n\n let topics: Array> = [];\n if (!eventFragment.anonymous) { topics.push(this.getEventTopic(eventFragment)); }\n\n const encodeTopic = (param: ParamType, value: any): string => {\n if (param.type === \"string\") {\n return id(value);\n } else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n\n // Check addresses are valid\n if (param.type === \"address\") { this._abiCoder.encode( [ \"address\" ], [ value ]); }\n return hexZeroPad(hexlify(value), 32);\n };\n\n values.forEach((value, index) => {\n\n let param = eventFragment.inputs[index];\n\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n }\n return;\n }\n\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n\n return topics;\n }\n\n encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { data: string, topics: Array } {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n const topics: Array = [ ];\n\n const dataTypes: Array = [ ];\n const dataValues: Array = [ ];\n\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n\n eventFragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value))\n } else if (param.type === \"bytes\") {\n topics.push(keccak256(value))\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n } else {\n topics.push(this._abiCoder.encode([ param.type] , [ value ]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n\n return {\n data: this._abiCoder.encode(dataTypes , dataValues),\n topics: topics\n };\n }\n\n // Decode a filter for the event and the search criteria\n decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n\n let indexed: Array = [];\n let nonIndexed: Array = [];\n let dynamic: Array = [];\n\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)): null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n\n let result: (Array & { [ key: string ]: any }) = [ ];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n\n } else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n\n } else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n } else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: () => { throw wrapAccessError(`property ${ JSON.stringify(param.name) }`, value); }\n });\n } else {\n result[param.name] = value;\n }\n }\n });\n\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n enumerable: true,\n get: () => { throw wrapAccessError(`index ${ i }`, value); }\n });\n }\n }\n\n return Object.freeze(result);\n }\n\n // Given a transaction, find the matching function fragment (if any) and\n // determine all its properties and call parameters\n parseTransaction(tx: { data: string, value?: BigNumberish }): TransactionDescription {\n let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: BigNumber.from(tx.value || \"0\"),\n });\n }\n\n // @TODO\n //parseCallResult(data: BytesLike): ??\n\n // Given an event log, find the matching event fragment (if any) and\n // determine all its properties and values\n parseLog(log: { topics: Array, data: string}): LogDescription {\n let fragment = this.getEvent(log.topics[0]);\n\n if (!fragment || fragment.anonymous) { return null; }\n\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n\n\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }\n\n parseError(data: BytesLike): ErrorDescription {\n const hexData = hexlify(data);\n let fragment = this.getError(hexData.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n });\n }\n\n\n /*\n static from(value: Array | string | Interface) {\n if (Interface.isInterface(value)) {\n return value;\n }\n if (typeof(value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n return new Interface(value);\n }\n */\n\n static isInterface(value: any): value is Interface {\n return !!(value && value._isInterface);\n }\n}\n\n","\"use strict\";\n\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from \"./fragments\";\nimport { AbiCoder, CoerceFunc, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from \"./interface\";\n\nexport {\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n Fragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n AbiCoder,\n defaultAbiCoder,\n\n Interface,\n Indexed,\n\n /////////////////////////\n // Types\n\n CoerceFunc,\n JsonFragment,\n JsonFragmentType,\n\n Result,\n checkResultErrors,\n\n LogDescription,\n TransactionDescription\n};\n","export const version = \"abstract-provider/5.5.1\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { BytesLike, isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { Deferrable, Description, defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { AccessListish, Transaction } from \"@ethersproject/transactions\";\nimport { OnceBlockable } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\n\nexport type TransactionRequest = {\n to?: string,\n from?: string,\n nonce?: BigNumberish,\n\n gasLimit?: BigNumberish,\n gasPrice?: BigNumberish,\n\n data?: BytesLike,\n value?: BigNumberish,\n chainId?: number\n\n type?: number;\n accessList?: AccessListish;\n\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n\n customData?: Record;\n}\n\nexport interface TransactionResponse extends Transaction {\n hash: string;\n\n // Only if a transaction has been mined\n blockNumber?: number,\n blockHash?: string,\n timestamp?: number,\n\n confirmations: number,\n\n // Not optional (as it is in Transaction)\n from: string;\n\n // The raw transaction\n raw?: string,\n\n // This function waits until the transaction has been mined\n wait: (confirmations?: number) => Promise\n};\n\nexport type BlockTag = string | number;\n\nexport interface _Block {\n hash: string;\n parentHash: string;\n number: number;\n\n timestamp: number;\n nonce: string;\n difficulty: number;\n _difficulty: BigNumber;\n\n gasLimit: BigNumber;\n gasUsed: BigNumber;\n\n miner: string;\n extraData: string;\n\n baseFeePerGas?: null | BigNumber;\n}\n\nexport interface Block extends _Block {\n transactions: Array;\n}\n\nexport interface BlockWithTransactions extends _Block {\n transactions: Array;\n}\n\n\nexport interface Log {\n blockNumber: number;\n blockHash: string;\n transactionIndex: number;\n\n removed: boolean;\n\n address: string;\n data: string;\n\n topics: Array;\n\n transactionHash: string;\n logIndex: number;\n}\n\nexport interface TransactionReceipt {\n to: string;\n from: string;\n contractAddress: string,\n transactionIndex: number,\n root?: string,\n gasUsed: BigNumber,\n logsBloom: string,\n blockHash: string,\n transactionHash: string,\n logs: Array,\n blockNumber: number,\n confirmations: number,\n cumulativeGasUsed: BigNumber,\n effectiveGasPrice: BigNumber,\n byzantium: boolean,\n type: number;\n status?: number\n};\n\nexport interface FeeData {\n maxFeePerGas: null | BigNumber;\n maxPriorityFeePerGas: null | BigNumber;\n gasPrice: null | BigNumber;\n}\n\nexport interface EventFilter {\n address?: string;\n topics?: Array | null>;\n}\n\nexport interface Filter extends EventFilter {\n fromBlock?: BlockTag,\n toBlock?: BlockTag,\n}\n\nexport interface FilterByBlockHash extends EventFilter {\n blockHash?: string;\n}\n\n//export type CallTransactionable = {\n// call(transaction: TransactionRequest): Promise;\n//};\n\nexport abstract class ForkEvent extends Description {\n readonly expiry: number;\n\n readonly _isForkEvent?: boolean;\n\n static isForkEvent(value: any): value is ForkEvent {\n return !!(value && value._isForkEvent);\n }\n}\n\nexport class BlockForkEvent extends ForkEvent {\n readonly blockHash: string;\n\n readonly _isBlockForkEvent?: boolean;\n\n constructor(blockHash: string, expiry?: number) {\n if (!isHexString(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n\n super({\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: (expiry || 0),\n blockHash: blockHash\n });\n }\n}\n\nexport class TransactionForkEvent extends ForkEvent {\n readonly hash: string;\n\n readonly _isTransactionOrderForkEvent?: boolean;\n\n constructor(hash: string, expiry?: number) {\n if (!isHexString(hash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: (expiry || 0),\n hash: hash\n });\n }\n}\n\nexport class TransactionOrderForkEvent extends ForkEvent {\n readonly beforeHash: string;\n readonly afterHash: string;\n\n constructor(beforeHash: string, afterHash: string, expiry?: number) {\n if (!isHexString(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!isHexString(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: (expiry || 0),\n beforeHash: beforeHash,\n afterHash: afterHash\n });\n }\n}\n\nexport type EventType = string | Array> | EventFilter | ForkEvent;\n\nexport type Listener = (...args: Array) => void;\n\n///////////////////////////////\n// Exported Abstracts\nexport abstract class Provider implements OnceBlockable {\n\n // Network\n abstract getNetwork(): Promise;\n\n // Latest State\n abstract getBlockNumber(): Promise;\n abstract getGasPrice(): Promise;\n async getFeeData(): Promise {\n const { block, gasPrice } = await resolveProperties({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch((error) => {\n // @TODO: Why is this now failing on Calaveras?\n //console.log(error);\n return null;\n })\n });\n\n let maxFeePerGas = null, maxPriorityFeePerGas = null;\n\n if (block && block.baseFeePerGas) {\n // We may want to compute this more accurately in the future,\n // using the formula \"check if the base fee is correct\".\n // See: https://eips.ethereum.org/EIPS/eip-1559\n maxPriorityFeePerGas = BigNumber.from(\"2500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n\n return { maxFeePerGas, maxPriorityFeePerGas, gasPrice };\n }\n\n // Account\n abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise ;\n abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise;\n\n // Execution\n abstract sendTransaction(signedTransaction: string | Promise): Promise;\n abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise;\n abstract estimateGas(transaction: Deferrable): Promise;\n\n // Queries\n abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getTransaction(transactionHash: string): Promise;\n abstract getTransactionReceipt(transactionHash: string): Promise;\n\n // Bloom-filter Queries\n abstract getLogs(filter: Filter): Promise>;\n\n // ENS\n abstract resolveName(name: string | Promise): Promise;\n abstract lookupAddress(address: string | Promise): Promise;\n\n // Event Emitter (ish)\n abstract on(eventName: EventType, listener: Listener): Provider;\n abstract once(eventName: EventType, listener: Listener): Provider;\n abstract emit(eventName: EventType, ...args: Array): boolean\n abstract listenerCount(eventName?: EventType): number;\n abstract listeners(eventName?: EventType): Array;\n abstract off(eventName: EventType, listener?: Listener): Provider;\n abstract removeAllListeners(eventName?: EventType): Provider;\n\n // Alias for \"on\"\n addListener(eventName: EventType, listener: Listener): Provider {\n return this.on(eventName, listener);\n }\n\n // Alias for \"off\"\n removeListener(eventName: EventType, listener: Listener): Provider {\n return this.off(eventName, listener);\n }\n\n // @TODO: This *could* be implemented here, but would pull in events...\n abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise;\n\n readonly _isProvider: boolean;\n\n constructor() {\n logger.checkAbstract(new.target, Provider);\n defineReadOnly(this, \"_isProvider\", true);\n }\n\n static isProvider(value: any): value is Provider {\n return !!(value && value._isProvider);\n }\n\n/*\n static getResolver(network: Network, callable: CallTransactionable, namehash: string): string {\n // No ENS...\n if (!network.ensAddress) {\n errors.throwError(\n \"network does support ENS\",\n errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // Not a namehash\n if (!isHexString(namehash, 32)) {\n errors.throwArgumentError(\"invalid name hash\", \"namehash\", namehash);\n }\n\n // keccak256(\"resolver(bytes32)\")\n let data = \"0x0178b8bf\" + namehash.substring(2);\n let transaction = { to: network.ensAddress, data: data };\n\n return provider.call(transaction).then((data) => {\n return provider.formatter.callAddress(data);\n });\n }\n\n static resolveNamehash(network: Network, callable: CallTransactionable, namehash: string): string {\n return this.getResolver(network, callable, namehash).then((resolverAddress) => {\n if (!resolverAddress) { return null; }\n\n // keccak256(\"addr(bytes32)\")\n let data = \"0x3b3b57de\" + namehash(name).substring(2);\n let transaction = { to: resolverAddress, data: data };\n return callable.call(transaction).then((data) => {\n return this.formatter.callAddress(data);\n });\n\n })\n }\n*/\n}\n","export const version = \"abstract-signer/5.5.0\";\n","\"use strict\";\n\nimport { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst allowedTransactionKeys: Array = [\n \"accessList\", \"chainId\", \"customData\", \"data\", \"from\", \"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"to\", \"type\", \"value\"\n];\n\nconst forwardErrors = [\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n];\n\n// EIP-712 Typed Data\n// See: https://eips.ethereum.org/EIPS/eip-712\n\nexport interface TypedDataDomain {\n name?: string;\n version?: string;\n chainId?: BigNumberish;\n verifyingContract?: string;\n salt?: BytesLike;\n};\n\nexport interface TypedDataField {\n name: string;\n type: string;\n};\n\n// Sub-classes of Signer may optionally extend this interface to indicate\n// they have a private key available synchronously\nexport interface ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n}\n\n// Sub-Class Notes:\n// - A Signer MUST always make sure, that if present, the \"from\" field\n// matches the Signer, before sending or signing a transaction\n// - A Signer SHOULD always wrap private information (such as a private\n// key or mnemonic) in a function, so that console.log does not leak\n// the data\n\n// @TODO: This is a temporary measure to preserve backwards compatibility\n// In v6, the method on TypedDataSigner will be added to Signer\nexport interface TypedDataSigner {\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise;\n}\n\nexport abstract class Signer {\n readonly provider?: Provider;\n\n ///////////////////\n // Sub-classes MUST implement these\n\n // Returns the checksum address\n abstract getAddress(): Promise\n\n // Returns the signed prefixed-message. This MUST treat:\n // - Bytes as a binary message\n // - string as a UTF8-message\n // i.e. \"0x1234\" is a SIX (6) byte string, NOT 2 bytes of data\n abstract signMessage(message: Bytes | string): Promise;\n\n // Signs a transaction and returns the fully serialized, signed transaction.\n // The EXACT transaction MUST be signed, and NO additional properties to be added.\n // - This MAY throw if signing transactions is not supports, but if\n // it does, sentTransaction MUST be overridden.\n abstract signTransaction(transaction: Deferrable): Promise;\n\n // Returns a new instance of the Signer, connected to provider.\n // This MAY throw if changing providers is not supported.\n abstract connect(provider: Provider): Signer;\n\n readonly _isSigner: boolean;\n\n\n ///////////////////\n // Sub-classes MUST call super\n constructor() {\n logger.checkAbstract(new.target, Signer);\n defineReadOnly(this, \"_isSigner\", true);\n }\n\n\n ///////////////////\n // Sub-classes MAY override these\n\n async getBalance(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getBalance\");\n return await this.provider.getBalance(this.getAddress(), blockTag);\n }\n\n async getTransactionCount(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getTransactionCount\");\n return await this.provider.getTransactionCount(this.getAddress(), blockTag);\n }\n\n // Populates \"from\" if unspecified, and estimates the gas for the transaction\n async estimateGas(transaction: Deferrable): Promise {\n this._checkProvider(\"estimateGas\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.estimateGas(tx);\n }\n\n // Populates \"from\" if unspecified, and calls with the transaction\n async call(transaction: Deferrable, blockTag?: BlockTag): Promise {\n this._checkProvider(\"call\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.call(tx, blockTag);\n }\n\n // Populates all fields in a transaction, signs it and sends it to the network\n async sendTransaction(transaction: Deferrable): Promise {\n this._checkProvider(\"sendTransaction\");\n const tx = await this.populateTransaction(transaction);\n const signedTx = await this.signTransaction(tx);\n return await this.provider.sendTransaction(signedTx);\n }\n\n async getChainId(): Promise {\n this._checkProvider(\"getChainId\");\n const network = await this.provider.getNetwork();\n return network.chainId;\n }\n\n async getGasPrice(): Promise {\n this._checkProvider(\"getGasPrice\");\n return await this.provider.getGasPrice();\n }\n\n async getFeeData(): Promise {\n this._checkProvider(\"getFeeData\");\n return await this.provider.getFeeData();\n }\n\n\n async resolveName(name: string): Promise {\n this._checkProvider(\"resolveName\");\n return await this.provider.resolveName(name);\n }\n\n\n\n // Checks a transaction does not contain invalid keys and if\n // no \"from\" is provided, populates it.\n // - does NOT require a provider\n // - adds \"from\" is not present\n // - returns a COPY (safe to mutate the result)\n // By default called from: (overriding these prevents it)\n // - call\n // - estimateGas\n // - populateTransaction (and therefor sendTransaction)\n checkTransaction(transaction: Deferrable): Deferrable {\n for (const key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n\n const tx = shallowCopy(transaction);\n\n if (tx.from == null) {\n tx.from = this.getAddress();\n\n } else {\n // Make sure any provided address matches this signer\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then((result) => {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n\n return tx;\n }\n\n // Populates ALL keys for a transaction and checks that \"from\" matches\n // this Signer. Should be used by sendTransaction but NOT by signTransaction.\n // By default called from: (overriding these prevents it)\n // - sendTransaction\n //\n // Notes:\n // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas\n async populateTransaction(transaction: Deferrable): Promise {\n\n const tx: Deferrable = await resolveProperties(this.checkTransaction(transaction))\n\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n\n // Prevent this error from causing an UnhandledPromiseException\n tx.to.catch((error) => { });\n }\n\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null);\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n\n if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n tx.type = 2;\n\n } else if (tx.type === 0 || tx.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n\n // Populate missing gasPrice\n if (tx.gasPrice == null) { tx.gasPrice = this.getGasPrice(); }\n\n } else {\n\n // We need to get fee data to determine things\n const feeData = await this.getFeeData();\n\n if (tx.type == null) {\n // We need to auto-detect the intended type of this transaction...\n\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n\n // Upgrade transaction from null to eip-1559\n tx.type = 2;\n\n if (tx.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n\n } else {\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n\n } else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n\n // ...but they are trying to use EIP-1559 properties\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n\n // Populate missing fee data\n if (tx.gasPrice == null) { tx.gasPrice = feeData.gasPrice; }\n\n // Explicitly set untyped transaction to legacy\n tx.type = 0;\n\n } else {\n // getFeeData has failed us.\n logger.throwError(\"failed to get consistent fee data\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n\n } else if (tx.type === 2) {\n // Explicitly using EIP-1559\n\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n }\n\n if (tx.nonce == null) { tx.nonce = this.getTransactionCount(\"pending\"); }\n\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch((error) => {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error: error,\n tx: tx\n });\n });\n }\n\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then((results) => {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n\n return await resolveProperties(tx);\n }\n\n\n ///////////////////\n // Sub-classes SHOULD leave these alone\n\n _checkProvider(operation?: string): void {\n if (!this.provider) { logger.throwError(\"missing provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: (operation || \"_checkProvider\") });\n }\n }\n\n static isSigner(value: any): value is Signer {\n return !!(value && value._isSigner);\n }\n}\n\nexport class VoidSigner extends Signer implements TypedDataSigner {\n readonly address: string;\n\n constructor(address: string, provider?: Provider) {\n logger.checkNew(new.target, VoidSigner);\n super();\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n _fail(message: string, operation: string): Promise {\n return Promise.resolve().then(() => {\n logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation });\n });\n }\n\n signMessage(message: Bytes | string): Promise {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n }\n\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n }\n\n connect(provider: Provider): VoidSigner {\n return new VoidSigner(this.address, provider);\n }\n}\n\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","import _ec from \"elliptic\";\nimport EC = _ec.ec;\n\nexport { EC }\n","export const version = \"signing-key/5.5.0\";\n","\"use strict\";\n\nimport { EC } from \"./elliptic\";\n\nimport { arrayify, BytesLike, hexlify, hexZeroPad, Signature, SignatureLike, splitSignature } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nlet _curve: EC = null\nfunction getCurve() {\n if (!_curve) {\n _curve = new EC(\"secp256k1\");\n }\n return _curve;\n}\n\nexport class SigningKey {\n\n readonly curve: string;\n\n readonly privateKey: string;\n readonly publicKey: string;\n readonly compressedPublicKey: string;\n\n //readonly address: string;\n\n readonly _isSigningKey: boolean;\n\n constructor(privateKey: BytesLike) {\n defineReadOnly(this, \"curve\", \"secp256k1\");\n\n defineReadOnly(this, \"privateKey\", hexlify(privateKey));\n\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n\n defineReadOnly(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n defineReadOnly(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n\n defineReadOnly(this, \"_isSigningKey\", true);\n }\n\n _addPoint(other: BytesLike): string {\n const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));\n const p1 = getCurve().keyFromPublic(arrayify(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n }\n\n signDigest(digest: BytesLike): Signature {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const digestBytes = arrayify(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n const signature = keyPair.sign(digestBytes, { canonical: true });\n return splitSignature({\n recoveryParam: signature.recoveryParam,\n r: hexZeroPad(\"0x\" + signature.r.toString(16), 32),\n s: hexZeroPad(\"0x\" + signature.s.toString(16), 32),\n })\n }\n\n computeSharedSecret(otherKey: BytesLike): string {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));\n return hexZeroPad(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n }\n\n static isSigningKey(value: any): value is SigningKey {\n return !!(value && value._isSigningKey);\n }\n}\n\nexport function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string {\n const sig = splitSignature(signature);\n const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };\n return \"0x\" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n}\n\nexport function computePublicKey(key: BytesLike, compressed?: boolean): string {\n const bytes = arrayify(key);\n\n if (bytes.length === 32) {\n const signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n\n } else if (bytes.length === 33) {\n if (compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n\n } else if (bytes.length === 65) {\n if (!compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n}\n\n","export const version = \"transactions/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, DataOptions, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, SignatureLike, splitSignature, stripZeros, } from \"@ethersproject/bytes\";\nimport { Zero } from \"@ethersproject/constants\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { checkProperties } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey } from \"@ethersproject/signing-key\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type AccessList = Array<{ address: string, storageKeys: Array }>;\n\n// Input allows flexibility in describing an access list\nexport type AccessListish = AccessList |\n Array<[ string, Array ]> |\n Record>;\n\nexport enum TransactionTypes {\n legacy = 0,\n eip2930 = 1,\n eip1559 = 2,\n};\n\nexport type UnsignedTransaction = {\n to?: string;\n nonce?: number;\n\n gasLimit?: BigNumberish;\n gasPrice?: BigNumberish;\n\n data?: BytesLike;\n value?: BigNumberish;\n chainId?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessListish;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n}\n\nexport interface Transaction {\n hash?: string;\n\n to?: string;\n from?: string;\n nonce: number;\n\n gasLimit: BigNumber;\n gasPrice?: BigNumber;\n\n data: string;\n value: BigNumber;\n chainId: number;\n\n r?: string;\n s?: string;\n v?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessList;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumber;\n maxFeePerGas?: BigNumber;\n}\n\n///////////////////////////////\n\nfunction handleAddress(value: string): string {\n if (value === \"0x\") { return null; }\n return getAddress(value);\n}\n\nfunction handleNumber(value: string): BigNumber {\n if (value === \"0x\") { return Zero; }\n return BigNumber.from(value);\n}\n\n// Legacy Transaction Fields\nconst transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" },\n];\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, type: true, value: true\n}\n\nexport function computeAddress(key: BytesLike | string): string {\n const publicKey = computePublicKey(key);\n return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));\n}\n\nexport function recoverAddress(digest: BytesLike, signature: SignatureLike): string {\n return computeAddress(recoverPublicKey(arrayify(digest), signature));\n}\n\nfunction formatNumber(value: BigNumberish, name: string): Uint8Array {\n const result = stripZeros(BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, (\"transaction:\" + name), value);\n }\n return result;\n}\n\nfunction accessSetify(addr: string, storageKeys: Array): { address: string,storageKeys: Array } {\n return {\n address: getAddress(addr),\n storageKeys: (storageKeys || []).map((storageKey, index) => {\n if (hexDataLength(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", `accessList[${ addr }:${ index }]`, storageKey)\n }\n return storageKey.toLowerCase();\n })\n };\n}\n\nexport function accessListify(value: AccessListish): AccessList {\n if (Array.isArray(value)) {\n return (] | { address: string, storageKeys: Array}>>value).map((set, index) => {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", `value[${ index }]`, set);\n }\n return accessSetify(set[0], set[1])\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n\n const result: Array<{ address: string, storageKeys: Array }> = Object.keys(value).map((addr) => {\n const storageKeys: Record = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, >{ });\n return accessSetify(addr, Object.keys(storageKeys).sort())\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\n\nfunction formatAccessList(value: AccessListish): Array<[ string, Array ]> {\n return accessListify(value).map((set) => [ set.address, set.storageKeys ]);\n}\n\nfunction _serializeEip1559(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // If there is an explicit gasPrice, make sure it matches the\n // EIP-1559 fees; otherwise they may not understand what they\n // think they are setting in terms of fee.\n if (transaction.gasPrice != null) {\n const gasPrice = BigNumber.from(transaction.gasPrice);\n const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice, maxFeePerGas\n });\n }\n }\n\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x02\", RLP.encode(fields)]);\n}\n\nfunction _serializeEip2930(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x01\", RLP.encode(fields)]);\n}\n\n// Legacy Transactions and EIP-155\nfunction _serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n checkProperties(transaction, allowedTransactionKeys);\n\n const raw: Array = [];\n\n transactionFields.forEach(function(fieldInfo) {\n let value = (transaction)[fieldInfo.name] || ([]);\n const options: DataOptions = { };\n if (fieldInfo.numeric) { options.hexPad = \"left\"; }\n value = arrayify(hexlify(value, options));\n\n // Fixed-width field\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n\n // Variable-width (with a maximum)\n if (fieldInfo.maxLength) {\n value = stripZeros(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value );\n }\n }\n\n raw.push(hexlify(value));\n });\n\n let chainId = 0;\n if (transaction.chainId != null) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = transaction.chainId;\n\n if (typeof(chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n\n } else if (signature && !isBytesLike(signature) && signature.v > 28) {\n // No chainId provided, but the signature is signing with EIP-155; derive chainId\n chainId = Math.floor((signature.v - 35) / 2);\n }\n\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== 0) {\n raw.push(hexlify(chainId)); // @TODO: hexValue?\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n\n // Requesting an unsigned transaction\n if (!signature) {\n return RLP.encode(raw);\n }\n\n // The splitSignature will ensure the transaction has a recoveryParam in the\n // case that the signTransaction function only adds a v.\n const sig = splitSignature(signature);\n\n // We pushed a chainId and null r, s on for hashing only; remove those\n let v = 27 + sig.recoveryParam\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v += chainId * 2 + 8;\n\n // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it!\n if (sig.v > 28 && sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n\n raw.push(hexlify(v));\n raw.push(stripZeros(arrayify(sig.r)));\n raw.push(stripZeros(arrayify(sig.s)));\n\n return RLP.encode(raw);\n}\n\nexport function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // Legacy and EIP-155 Transactions\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n\n // Typed Transactions (EIP-2718)\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ transaction.type }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n}\n\nfunction _parseEipSignature(tx: Transaction, fields: Array, serialize: (tx: UnsignedTransaction) => string): void {\n try {\n const recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) { throw new Error(\"bad recid\"); }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n\n tx.r = hexZeroPad(fields[1], 32);\n tx.s = hexZeroPad(fields[2], 32);\n\n try {\n const digest = keccak256(serialize(tx));\n tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n console.log(error);\n }\n}\n\nfunction _parseEip1559(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", hexlify(payload));\n }\n\n const maxPriorityFeePerGas = handleNumber(transaction[2]);\n const maxFeePerGas = handleNumber(transaction[3]);\n const tx: Transaction = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas: maxPriorityFeePerGas,\n maxFeePerGas: maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8]),\n };\n\n // Unsigned EIP-1559 Transaction\n if (transaction.length === 9) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n\n return tx;\n}\n\nfunction _parseEip2930(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", hexlify(payload));\n }\n\n const tx: Transaction = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n\n // Unsigned EIP-2930 Transaction\n if (transaction.length === 8) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n\n return tx;\n}\n\n// Legacy Transactions and EIP-155\nfunction _parse(rawTransaction: Uint8Array): Transaction {\n const transaction = RLP.decode(rawTransaction);\n\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n\n const tx: Transaction = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n\n // Legacy unsigned transaction\n if (transaction.length === 6) { return tx; }\n\n try {\n tx.v = BigNumber.from(transaction[6]).toNumber();\n\n } catch (error) {\n console.log(error);\n return tx;\n }\n\n tx.r = hexZeroPad(transaction[7], 32);\n tx.s = hexZeroPad(transaction[8], 32);\n\n if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) {\n // EIP-155 unsigned transaction\n tx.chainId = tx.v;\n tx.v = 0;\n\n } else {\n // Signed Transaction\n\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) { tx.chainId = 0; }\n\n let recoveryParam = tx.v - 27;\n\n const raw = transaction.slice(0, 6);\n\n if (tx.chainId !== 0) {\n raw.push(hexlify(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n\n const digest = keccak256(RLP.encode(raw));\n try {\n tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam });\n } catch (error) {\n console.log(error);\n }\n\n tx.hash = keccak256(rawTransaction);\n }\n\n tx.type = null;\n\n return tx;\n}\n\n\nexport function parse(rawTransaction: BytesLike): Transaction {\n const payload = arrayify(rawTransaction);\n\n // Legacy and EIP-155 Transactions\n if (payload[0] > 0x7f) { return _parse(payload); }\n\n // Typed Transaction (EIP-2718)\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ payload[0] }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n}\n\n","export const version = \"contracts/5.5.0\";\n","\"use strict\";\n\nimport { checkResultErrors, EventFragment, Fragment, FunctionFragment, Indexed, Interface, JsonFragment, LogDescription, ParamType, Result } from \"@ethersproject/abi\";\nimport { Block, BlockTag, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, AccessListish } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\nexport interface Overrides {\n gasLimit?: BigNumberish | Promise;\n gasPrice?: BigNumberish | Promise;\n maxFeePerGas?: BigNumberish | Promise;\n maxPriorityFeePerGas?: BigNumberish | Promise;\n nonce?: BigNumberish | Promise;\n type?: number;\n accessList?: AccessListish;\n customData?: Record;\n};\n\nexport interface PayableOverrides extends Overrides {\n value?: BigNumberish | Promise;\n}\n\nexport interface CallOverrides extends PayableOverrides {\n blockTag?: BlockTag | Promise;\n from?: string | Promise;\n}\n\n// @TODO: Better hierarchy with: (in v6)\n// - abstract-provider:TransactionRequest\n// - transactions:Transaction\n// - transaction:UnsignedTransaction\n\nexport interface PopulatedTransaction {\n to?: string;\n from?: string;\n nonce?: number;\n\n gasLimit?: BigNumber;\n gasPrice?: BigNumber;\n\n data?: string;\n value?: BigNumber;\n chainId?: number;\n\n type?: number;\n accessList?: AccessList;\n\n maxFeePerGas?: BigNumber;\n maxPriorityFeePerGas?: BigNumber;\n\n customData?: Record;\n};\n\nexport type EventFilter = {\n address?: string;\n topics?: Array>;\n};\n\n\nexport type ContractFunction = (...args: Array) => Promise;\n\n\n// The (n + 1)th parameter passed to contract event callbacks\nexport interface Event extends Log {\n\n // The event name\n event?: string;\n\n // The event signature\n eventSignature?: string;\n\n // The parsed arguments to the event\n args?: Result;\n\n // If parsing the arguments failed, this is the error\n decodeError?: Error;\n\n // A function that can be used to decode event data and topics\n decode?: (data: string, topics?: Array) => any;\n\n // A function that will remove the listener responsible for this event (if any)\n removeListener: () => void;\n\n // Get blockchain details about this event's block and transaction\n getBlock: () => Promise;\n getTransaction: () => Promise;\n getTransactionReceipt: () => Promise;\n}\n\nexport interface ContractReceipt extends TransactionReceipt {\n events?: Array;\n}\n\nexport interface ContractTransaction extends TransactionResponse {\n wait(confirmations?: number): Promise;\n}\n\n///////////////////////////////\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, from: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true,\n customData: true\n}\n\nasync function resolveName(resolver: Signer | Provider, nameOrPromise: string | Promise): Promise {\n const name = await nameOrPromise;\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n\n // If it is already an address, just use it (after adding checksum)\n try {\n return getAddress(name);\n } catch (error) { }\n\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n\n const address = await resolver.resolveName(name);\n\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n\n return address;\n}\n\n// Recursively replaces ENS names with promises to resolve the name and resolves all properties\nasync function resolveAddresses(resolver: Signer | Provider, value: any, paramType: ParamType | Array): Promise {\n if (Array.isArray(paramType)) {\n return await Promise.all(paramType.map((paramType, index) => {\n return resolveAddresses(\n resolver,\n ((Array.isArray(value)) ? value[index]: value[paramType.name]),\n paramType\n );\n }));\n }\n\n if (paramType.type === \"address\") {\n return await resolveName(resolver, value);\n }\n\n if (paramType.type === \"tuple\") {\n return await resolveAddresses(resolver, value, paramType.components);\n }\n\n if (paramType.baseType === \"array\") {\n if (!Array.isArray(value)) {\n return Promise.reject(logger.makeError(\"invalid value for array\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }));\n }\n return await Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren)));\n }\n\n return value;\n}\n\nasync function populateTransaction(contract: Contract, fragment: FunctionFragment, args: Array): Promise {\n // If an extra argument is given, it is overrides\n let overrides: CallOverrides = { };\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n overrides = shallowCopy(args.pop());\n }\n\n // Make sure the parameter count matches\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n\n // Populate \"from\" override (allow promises)\n if (contract.signer) {\n if (overrides.from) {\n // Contracts with a Signer are from the Signer's frame-of-reference;\n // but we allow overriding \"from\" if it matches the signer\n overrides.from = resolveProperties({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(async (check) => {\n if (getAddress(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n\n return check.override;\n });\n\n } else {\n overrides.from = contract.signer.getAddress();\n }\n\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n\n //} else {\n // Contracts without a signer can override \"from\", and if\n // unspecified the zero address is used\n //overrides.from = AddressZero;\n }\n\n // Wait for all dependencies to be resolved (prefer the signer over the provider)\n const resolved = await resolveProperties({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (resolveProperties(overrides) || { })\n });\n\n // The ABI coded transaction\n const data = contract.interface.encodeFunctionData(fragment, resolved.args);\n const tx: PopulatedTransaction = {\n data: data,\n to: resolved.address\n };\n\n // Resolved Overrides\n const ro = resolved.overrides;\n\n // Populate simple overrides\n if (ro.nonce != null) { tx.nonce = BigNumber.from(ro.nonce).toNumber(); }\n if (ro.gasLimit != null) { tx.gasLimit = BigNumber.from(ro.gasLimit); }\n if (ro.gasPrice != null) { tx.gasPrice = BigNumber.from(ro.gasPrice); }\n if (ro.maxFeePerGas != null) { tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); }\n if (ro.maxPriorityFeePerGas != null) { tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); }\n if (ro.from != null) { tx.from = ro.from; }\n\n if (ro.type != null) { tx.type = ro.type; }\n if (ro.accessList != null) { tx.accessList = accessListify(ro.accessList); }\n\n // If there was no \"gasLimit\" override, but the ABI specifies a default, use it\n if (tx.gasLimit == null && fragment.gas != null) {\n // Compute the intrinsic gas cost for this transaction\n // @TODO: This is based on the yellow paper as of Petersburg; this is something\n // we may wish to parameterize in v6 as part of the Network object. Since this\n // is always a non-nil to address, we can ignore G_create, but may wish to add\n // similar logic to the ContractFactory.\n let intrinsic = 21000;\n const bytes = arrayify(data);\n for (let i = 0; i < bytes.length; i++) {\n intrinsic += 4;\n if (bytes[i]) { intrinsic += 64; }\n }\n tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic);\n }\n\n // Populate \"value\" override\n if (ro.value) {\n const roValue = BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n\n if (ro.customData) {\n tx.customData = shallowCopy(ro.customData);\n }\n\n // Remove the overrides\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n\n delete overrides.type;\n delete overrides.accessList;\n\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n\n delete overrides.customData;\n\n // Make sure there are no stray overrides, which may indicate a\n // typo or using an unsupported key.\n const leftovers = Object.keys(overrides).filter((key) => ((overrides)[key] != null));\n if (leftovers.length) {\n logger.throwError(`cannot override ${ leftovers.map((l) => JSON.stringify(l)).join(\",\") }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n\n return tx;\n}\n\n\nfunction buildPopulate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return function(...args: Array): Promise {\n return populateTransaction(contract, fragment, args);\n };\n}\n\nfunction buildEstimate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n return async function(...args: Array): Promise {\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n })\n }\n\n const tx = await populateTransaction(contract, fragment, args);\n return await signerOrProvider.estimateGas(tx);\n };\n}\n\nfunction addContractWait(contract: Contract, tx: TransactionResponse) {\n const wait = tx.wait.bind(tx);\n tx.wait = (confirmations?: number) => {\n return wait(confirmations).then((receipt: ContractReceipt) => {\n receipt.events = receipt.logs.map((log) => {\n let event: Event = (deepCopy(log));\n let parsed: LogDescription = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e){ }\n\n // Successfully parsed the event log; include it\n if (parsed) {\n event.args = parsed.args;\n event.decode = (data: BytesLike, topics?: Array) => {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n\n // Useful operations\n event.removeListener = () => { return contract.provider; }\n event.getBlock = () => {\n return contract.provider.getBlock(receipt.blockHash);\n }\n event.getTransaction = () => {\n return contract.provider.getTransaction(receipt.transactionHash);\n }\n event.getTransactionReceipt = () => {\n return Promise.resolve(receipt);\n }\n\n return event;\n });\n\n return receipt;\n });\n };\n}\n\nfunction buildCall(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n\n return async function(...args: Array): Promise {\n // Extract the \"blockTag\" override if present\n let blockTag = undefined;\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n const overrides = shallowCopy(args.pop());\n if (overrides.blockTag != null) {\n blockTag = await overrides.blockTag;\n }\n delete overrides.blockTag;\n args.push(overrides);\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed(blockTag);\n }\n\n // Call a node and get the result\n const tx = await populateTransaction(contract, fragment, args);\n const result = await signerOrProvider.call(tx, blockTag);\n\n try {\n let value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return value;\n\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n };\n}\n\nfunction buildSend(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return async function(...args: Array): Promise {\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n })\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed();\n }\n\n const txRequest = await populateTransaction(contract, fragment, args);\n\n const tx = await contract.signer.sendTransaction(txRequest);\n\n // Tweak the tx.wait so the receipt has extra properties\n addContractWait(contract, tx);\n\n return tx;\n };\n}\n\nfunction buildDefault(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n}\n\nfunction getEventTag(filter: EventFilter): string {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map((topic) => {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\"): \"\");\n}\n\nclass RunningEvent {\n readonly tag: string;\n readonly filter: EventFilter;\n private _listeners: Array<{ listener: Listener, once: boolean }>;\n\n constructor(tag: string, filter: EventFilter) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"filter\", filter);\n this._listeners = [ ];\n }\n\n addListener(listener: Listener, once: boolean): void {\n this._listeners.push({ listener: listener, once: once });\n }\n\n removeListener(listener: Listener): void {\n let done = false;\n this._listeners = this._listeners.filter((item) => {\n if (done || item.listener !== listener) { return true; }\n done = true;\n return false;\n });\n }\n\n removeAllListeners(): void {\n this._listeners = [];\n }\n\n listeners(): Array {\n return this._listeners.map((i) => i.listener);\n }\n\n listenerCount(): number {\n return this._listeners.length;\n }\n\n run(args: Array): number {\n const listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter((item) => {\n\n const argsCopy = args.slice();\n\n // Call the callback in the next event loop\n setTimeout(() => {\n item.listener.apply(this, argsCopy);\n }, 0);\n\n // Reschedule it if it not \"once\"\n return !(item.once);\n });\n\n return listenerCount;\n }\n\n prepareEvent(event: Event): void {\n }\n\n // Returns the array that will be applied to an emit\n getEmit(event: Event): Array {\n return [ event ];\n }\n}\n\nclass ErrorRunningEvent extends RunningEvent {\n constructor() {\n super(\"error\", null);\n }\n}\n\n\n// @TODO Fragment should inherit Wildcard? and just override getEmit?\n// or have a common abstract super class, with enough constructor\n// options to configure both.\n\n// A Fragment Event will populate all the properties that Wildcard\n// will, and additionally dereference the arguments when emitting\nclass FragmentRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n readonly fragment: EventFragment;\n\n constructor(address: string, contractInterface: Interface, fragment: EventFragment, topics?: Array>) {\n const filter: EventFilter = {\n address: address\n }\n\n let topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) { logger.throwArgumentError(\"topic mismatch\", \"topics\", topics); }\n filter.topics = topics.slice();\n } else {\n filter.topics = [ topic ];\n }\n\n super(getEventTag(filter), filter);\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n defineReadOnly(this, \"fragment\", fragment);\n }\n\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(this.fragment, data, topics);\n };\n\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n }\n\n getEmit(event: Event): Array {\n const errors = checkResultErrors(event.args);\n if (errors.length) { throw errors[0].error; }\n\n const args = (event.args || []).slice();\n args.push(event);\n return args;\n }\n}\n\n// A Wildcard Event will attempt to populate:\n// - event The name of the event name\n// - eventSignature The full signature of the event\n// - decode A function to decode data and topics\n// - args The decoded data and topics\nclass WildcardRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n\n constructor(address: string, contractInterface: Interface) {\n super(\"*\", { address: address });\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n }\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n try {\n const parsed = this.interface.parseLog(event);\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n\n event.args = parsed.args;\n } catch (error) {\n // No matching event\n }\n }\n}\n\nexport type ContractInterface = string | ReadonlyArray | Interface;\n\ntype InterfaceFunc = (contractInterface: ContractInterface) => Interface;\n\n\nexport class BaseContract {\n readonly address: string;\n readonly interface: Interface;\n\n readonly signer: Signer;\n readonly provider: Provider;\n\n readonly functions: { [ name: string ]: ContractFunction };\n\n readonly callStatic: { [ name: string ]: ContractFunction };\n readonly estimateGas: { [ name: string ]: ContractFunction };\n readonly populateTransaction: { [ name: string ]: ContractFunction };\n\n readonly filters: { [ name: string ]: (...args: Array) => EventFilter };\n\n // This will always be an address. This will only differ from\n // address if an ENS name was used in the constructor\n readonly resolvedAddress: Promise;\n\n // This is only set if the contract was created with a call to deploy\n readonly deployTransaction: TransactionResponse;\n\n _deployedPromise: Promise;\n\n // A list of RunningEvents to track listeners for each event tag\n _runningEvents: { [ eventTag: string ]: RunningEvent };\n\n // Wrapped functions to call emit and allow deregistration from the provider\n _wrappedEmits: { [ eventTag: string ]: (...args: Array) => void };\n\n constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider) {\n logger.checkNew(new.target, Contract);\n\n // @TODO: Maybe still check the addressOrName looks like a valid address or name?\n //address = getAddress(address);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n\n if (signerOrProvider == null) {\n defineReadOnly(this, \"provider\", null);\n defineReadOnly(this, \"signer\", null);\n } else if (Signer.isSigner(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider.provider || null);\n defineReadOnly(this, \"signer\", signerOrProvider);\n } else if (Provider.isProvider(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider);\n defineReadOnly(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n\n defineReadOnly(this, \"callStatic\", { });\n defineReadOnly(this, \"estimateGas\", { });\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"populateTransaction\", { });\n\n defineReadOnly(this, \"filters\", { });\n\n {\n const uniqueFilters: { [ name: string ]: Array } = { };\n Object.keys(this.interface.events).forEach((eventSignature) => {\n const event = this.interface.events[eventSignature];\n defineReadOnly(this.filters, eventSignature, (...args: Array) => {\n return {\n address: this.address,\n topics: this.interface.encodeFilterTopics(event, args)\n }\n });\n if (!uniqueFilters[event.name]) { uniqueFilters[event.name] = [ ]; }\n uniqueFilters[event.name].push(eventSignature);\n });\n\n Object.keys(uniqueFilters).forEach((name) => {\n const filters = uniqueFilters[name];\n if (filters.length === 1) {\n defineReadOnly(this.filters, name, this.filters[filters[0]]);\n } else {\n logger.warn(`Duplicate definition of ${ name } (${ filters.join(\", \")})`);\n }\n });\n }\n\n defineReadOnly(this, \"_runningEvents\", { });\n defineReadOnly(this, \"_wrappedEmits\", { });\n\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n\n defineReadOnly(this, \"address\", addressOrName);\n if (this.provider) {\n defineReadOnly(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n defineReadOnly(this, \"resolvedAddress\", Promise.resolve(getAddress(addressOrName)));\n } catch (error) {\n // Without a provider, we cannot use ENS names\n logger.throwError(\"provider is required to use ENS name as contract address\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n\n const uniqueNames: { [ name: string ]: Array } = { };\n const uniqueSignatures: { [ signature: string ]: boolean } = { };\n Object.keys(this.interface.functions).forEach((signature) => {\n const fragment = this.interface.functions[signature];\n\n // Check that the signature is unique; if not the ABI generation has\n // not been cleaned or may be incorrectly generated\n if (uniqueSignatures[signature]) {\n logger.warn(`Duplicate ABI entry for ${ JSON.stringify(signature) }`);\n return;\n }\n uniqueSignatures[signature] = true;\n\n // Track unique names; we only expose bare named functions if they\n // are ambiguous\n {\n const name = fragment.name;\n if (!uniqueNames[`%${ name }`]) { uniqueNames[`%${ name }`] = [ ]; }\n uniqueNames[`%${ name }`].push(signature);\n }\n\n if ((this)[signature] == null) {\n defineReadOnly(this, signature, buildDefault(this, fragment, true));\n }\n\n // We do not collapse simple calls on this bucket, which allows\n // frameworks to safely use this without introspection as well as\n // allows decoding error recovery.\n if (this.functions[signature] == null) {\n defineReadOnly(this.functions, signature, buildDefault(this, fragment, false));\n }\n\n if (this.callStatic[signature] == null) {\n defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true));\n }\n\n if (this.populateTransaction[signature] == null) {\n defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment));\n }\n\n if (this.estimateGas[signature] == null) {\n defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment));\n }\n });\n\n Object.keys(uniqueNames).forEach((name) => {\n // Ambiguous names to not get attached as bare names\n const signatures = uniqueNames[name];\n if (signatures.length > 1) { return; }\n\n // Strip off the leading \"%\" used for prototype protection\n name = name.substring(1);\n\n const signature = signatures[0];\n\n // If overwriting a member property that is null, swallow the error\n try {\n if ((this)[name] == null) {\n defineReadOnly(this, name, (this)[signature]);\n }\n } catch (e) { }\n\n if (this.functions[name] == null) {\n defineReadOnly(this.functions, name, this.functions[signature]);\n }\n\n if (this.callStatic[name] == null) {\n defineReadOnly(this.callStatic, name, this.callStatic[signature]);\n }\n\n if (this.populateTransaction[name] == null) {\n defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]);\n }\n\n if (this.estimateGas[name] == null) {\n defineReadOnly(this.estimateGas, name, this.estimateGas[signature]);\n }\n });\n }\n\n static getContractAddress(transaction: { from: string, nonce: BigNumberish }): string {\n return getContractAddress(transaction);\n }\n\n static getInterface(contractInterface: ContractInterface): Interface {\n if (Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new Interface(contractInterface);\n }\n\n // @TODO: Allow timeout?\n deployed(): Promise {\n return this._deployed();\n }\n\n _deployed(blockTag?: BlockTag): Promise {\n if (!this._deployedPromise) {\n\n // If we were just deployed, we know the transaction we should occur in\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(() => {\n return this;\n });\n\n } else {\n // @TODO: Once we allow a timeout to be passed in, we will wait\n // up to that many blocks for getCode\n\n // Otherwise, poll for our code to be deployed\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: this.address,\n operation: \"getDeployed\"\n });\n }\n return this;\n });\n }\n }\n\n return this._deployedPromise;\n }\n\n // @TODO:\n // estimateFallback(overrides?: TransactionRequest): Promise\n\n // @TODO:\n // estimateDeploy(bytecode: string, ...args): Promise\n\n fallback(overrides?: TransactionRequest): Promise {\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" })\n }\n\n const tx: Deferrable = shallowCopy(overrides || {});\n\n [\"from\", \"to\"].forEach(function(key) {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n tx.to = this.resolvedAddress;\n return this.deployed().then(() => {\n return this.signer.sendTransaction(tx);\n });\n }\n\n // Reconnect to a different signer or provider\n connect(signerOrProvider: Signer | Provider | string): Contract {\n if (typeof(signerOrProvider) === \"string\") {\n signerOrProvider = new VoidSigner(signerOrProvider, this.provider);\n }\n\n const contract = new (<{ new(...args: any[]): Contract }>(this.constructor))(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n defineReadOnly(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n }\n\n // Re-attach to a different on-chain instance of this contract\n attach(addressOrName: string): Contract {\n return new (<{ new(...args: any[]): Contract }>(this.constructor))(addressOrName, this.interface, this.signer || this.provider);\n }\n\n static isIndexed(value: any): value is Indexed {\n return Indexed.isIndexed(value);\n }\n\n private _normalizeRunningEvent(runningEvent: RunningEvent): RunningEvent {\n // Already have an instance of this event running; we can re-use it\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent\n }\n\n private _getRunningEvent(eventName: EventFilter | string): RunningEvent {\n if (typeof(eventName) === \"string\") {\n\n // Listen for \"error\" events (if your contract has an error event, include\n // the full signature to bypass this special event keyword)\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n\n // Listen for any event that is registered\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n\n // Listen for any event\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n // Get the event Fragment (throws if ambiguous/unknown event)\n const fragment = this.interface.getEvent(eventName)\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n\n // We have topics to filter by...\n if (eventName.topics && eventName.topics.length > 0) {\n\n // Is it a known topichash? (throws if no matching topichash)\n try {\n const topic = eventName.topics[0];\n if (typeof(topic) !== \"string\") {\n throw new Error(\"invalid topic\"); // @TODO: May happen for anonymous events\n }\n const fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) { }\n\n // Filter by the unknown topichash\n const filter: EventFilter = {\n address: this.address,\n topics: eventName.topics\n }\n\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n _checkRunningEvents(runningEvent: RunningEvent): void {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n\n // If we have a poller for this, remove it\n const emit = this._wrappedEmits[runningEvent.tag];\n if (emit && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n }\n\n // Subclasses can override this to gracefully recover\n // from parse errors if they wish\n _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event {\n const event = deepCopy(log);\n\n event.removeListener = () => {\n if (!listener) { return; }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); }\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); }\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); }\n\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n\n return event;\n }\n\n private _addEventListener(runningEvent: RunningEvent, listener: Listener, once: boolean): void {\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" })\n }\n\n runningEvent.addListener(listener, once);\n\n // Track this running event and its listeners (may already be there; but no hard in updating)\n this._runningEvents[runningEvent.tag] = runningEvent;\n\n // If we are not polling the provider, start polling\n if (!this._wrappedEmits[runningEvent.tag]) {\n const wrappedEmit = (log: Log) => {\n let event = this._wrapEvent(runningEvent, log, listener);\n\n // Try to emit the result for the parameterized event...\n if (event.decodeError == null) {\n try {\n const args = runningEvent.getEmit(event);\n this.emit(runningEvent.filter, ...args);\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n\n // Always emit \"event\" for fragment-base events\n if (runningEvent.filter != null) {\n this.emit(\"event\", event);\n }\n\n // Emit \"error\" if there was an error\n if (event.decodeError != null) {\n this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n\n // Special events, like \"error\" do not have a filter\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n }\n\n queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise> {\n const runningEvent = this._getRunningEvent(event);\n const filter = shallowCopy(runningEvent.filter);\n\n if (typeof(fromBlockOrBlockhash) === \"string\" && isHexString(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n (filter).blockHash = fromBlockOrBlockhash;\n } else {\n (filter).fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash: 0);\n (filter).toBlock = ((toBlock != null) ? toBlock: \"latest\");\n }\n\n return this.provider.getLogs(filter).then((logs) => {\n return logs.map((log) => this._wrapEvent(runningEvent, log, null));\n });\n }\n\n on(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n }\n\n once(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n }\n\n emit(eventName: EventFilter | string, ...args: Array): boolean {\n if (!this.provider) { return false; }\n\n const runningEvent = this._getRunningEvent(eventName);\n const result = (runningEvent.run(args) > 0);\n\n // May have drained all the \"once\" events; check for living events\n this._checkRunningEvents(runningEvent);\n\n return result;\n }\n\n listenerCount(eventName?: EventFilter | string): number {\n if (!this.provider) { return 0; }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce((accum, key) => {\n return accum + this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n }\n\n listeners(eventName?: EventFilter | string): Array {\n if (!this.provider) { return []; }\n\n if (eventName == null) {\n const result: Array = [ ];\n for (let tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach((listener) => {\n result.push(listener)\n });\n }\n return result;\n }\n\n return this._getRunningEvent(eventName).listeners();\n }\n\n removeAllListeners(eventName?: EventFilter | string): this {\n if (!this.provider) { return this; }\n\n if (eventName == null) {\n for (const tag in this._runningEvents) {\n const runningEvent = this._runningEvents[tag];\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n }\n return this;\n }\n\n // Delete any listeners\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n\n return this;\n }\n\n off(eventName: EventFilter | string, listener: Listener): this {\n if (!this.provider) { return this; }\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n }\n\n removeListener(eventName: EventFilter | string, listener: Listener): this {\n return this.off(eventName, listener);\n }\n\n}\n\nexport class Contract extends BaseContract {\n // The meta-class properties\n readonly [ key: string ]: ContractFunction | any;\n}\n\nexport class ContractFactory {\n\n readonly interface: Interface;\n readonly bytecode: string;\n readonly signer: Signer;\n\n constructor(contractInterface: ContractInterface, bytecode: BytesLike | { object: string }, signer?: Signer) {\n\n let bytecodeHex: string = null;\n\n if (typeof(bytecode) === \"string\") {\n bytecodeHex = bytecode;\n } else if (isBytes(bytecode)) {\n bytecodeHex = hexlify(bytecode);\n } else if (bytecode && typeof(bytecode.object) === \"string\") {\n // Allow the bytecode object from the Solidity compiler\n bytecodeHex = (bytecode).object;\n } else {\n // Crash in the next verification step\n bytecodeHex = \"!\";\n }\n\n // Make sure it is 0x prefixed\n if (bytecodeHex.substring(0, 2) !== \"0x\") { bytecodeHex = \"0x\" + bytecodeHex; }\n\n // Make sure the final result is valid bytecode\n if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n\n // If we have a signer, make sure it is valid\n if (signer && !Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n\n defineReadOnly(this, \"bytecode\", bytecodeHex);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n defineReadOnly(this, \"signer\", signer || null);\n }\n\n // @TODO: Future; rename to populateTransaction?\n getDeployTransaction(...args: Array): TransactionRequest {\n let tx: TransactionRequest = { };\n\n // If we have 1 additional argument, we allow transaction overrides\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n tx = shallowCopy(args.pop());\n for (const key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n\n // Do not allow these to be overridden in a deployment transaction\n [\"data\", \"from\", \"to\"].forEach((key) => {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n if (tx.value) {\n const value = BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Set the data to the bytecode + the encoded constructor arguments\n tx.data = hexlify(concat([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n\n return tx\n }\n\n async deploy(...args: Array): Promise {\n\n let overrides: any = { };\n\n // If 1 extra parameter was passed in, it contains overrides\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Resolve ENS names and promises in the arguments\n const params = await resolveAddresses(this.signer, args, this.interface.deploy.inputs);\n params.push(overrides);\n\n // Get the deployment transaction (with optional overrides)\n const unsignedTx = this.getDeployTransaction(...params);\n\n // Send the deployment transaction\n const tx = await this.signer.sendTransaction(unsignedTx);\n\n const address = getStatic<(tx: TransactionResponse) => string>(this.constructor, \"getContractAddress\")(tx);\n const contract = getStatic<(address: string, contractInterface: ContractInterface, signer?: Signer) => Contract>(this.constructor, \"getContract\")(address, this.interface, this.signer);\n\n // Add the modified wait that wraps events\n addContractWait(contract, tx);\n\n defineReadOnly(contract, \"deployTransaction\", tx);\n return contract;\n }\n\n attach(address: string): Contract {\n return ((this.constructor)).getContract(address, this.interface, this.signer);\n }\n\n connect(signer: Signer) {\n return new (<{ new(...args: any[]): ContractFactory }>(this.constructor))(this.interface, this.bytecode, signer);\n }\n\n static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n\n if (typeof(compilerOutput) === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n\n const abi = compilerOutput.abi;\n\n let bytecode: any = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n\n return new this(abi, bytecode, signer);\n }\n\n static getInterface(contractInterface: ContractInterface) {\n return Contract.getInterface(contractInterface);\n }\n\n static getContractAddress(tx: { from: string, nonce: BytesLike | BigNumber | number }): string {\n return getContractAddress(tx);\n }\n\n static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract {\n return new Contract(address, contractInterface, signer);\n }\n}\n","/**\n * var basex = require(\"base-x\");\n *\n * This implementation is heavily based on base-x. The main reason to\n * deviate was to prevent the dependency of Buffer.\n *\n * Contributors:\n *\n * base-x encoding\n * Forked from https://github.com/cryptocoinjs/bs58\n * Originally written by Mike Hearn for BitcoinJ\n * Copyright (c) 2011 Google Inc\n * Ported to JavaScript by Stefan Thomas\n * Merged Buffer refactorings from base58-native by Stephen Pair\n * Copyright (c) 2013 BitPay Inc\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n */\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nexport class BaseX {\n readonly alphabet: string;\n readonly base: number;\n\n _alphabetMap: { [ character: string ]: number };\n _leader: string;\n\n constructor(alphabet: string) {\n defineReadOnly(this, \"alphabet\", alphabet);\n defineReadOnly(this, \"base\", alphabet.length);\n\n defineReadOnly(this, \"_alphabetMap\", { });\n defineReadOnly(this, \"_leader\", alphabet.charAt(0));\n\n // pre-compute lookup table\n for (let i = 0; i < alphabet.length; i++) {\n this._alphabetMap[alphabet.charAt(i)] = i;\n }\n }\n\n encode(value: BytesLike): string {\n let source = arrayify(value);\n\n if (source.length === 0) { return \"\"; }\n\n let digits = [ 0 ]\n for (let i = 0; i < source.length; ++i) {\n let carry = source[i];\n for (let j = 0; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % this.base;\n carry = (carry / this.base) | 0;\n }\n\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = (carry / this.base) | 0;\n }\n }\n\n let string = \"\"\n\n // deal with leading zeros\n for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) {\n string += this._leader;\n }\n\n // convert digits to a string\n for (let q = digits.length - 1; q >= 0; --q) {\n string += this.alphabet[digits[q]];\n }\n\n return string;\n }\n\n decode(value: string): Uint8Array {\n if (typeof(value) !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n\n let bytes: Array = [];\n if (value.length === 0) { return new Uint8Array(bytes); }\n\n bytes.push(0);\n for (let i = 0; i < value.length; i++) {\n let byte = this._alphabetMap[value[i]];\n\n if (byte === undefined) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n\n let carry = byte;\n for (let j = 0; j < bytes.length; ++j) {\n carry += bytes[j] * this.base;\n bytes[j] = carry & 0xff;\n carry >>= 8;\n }\n\n while (carry > 0) {\n bytes.push(carry & 0xff);\n carry >>= 8;\n }\n }\n\n // deal with leading zeros\n for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) {\n bytes.push(0)\n }\n\n return arrayify(new Uint8Array(bytes.reverse()))\n }\n}\n\nconst Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\nconst Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n\nexport { Base32, Base58 };\n\n//console.log(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\"))\n//console.log(Base58.encode(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\")))\n","export enum SupportedAlgorithm { sha256 = \"sha256\", sha512 = \"sha512\" };\n\n","export const version = \"sha2/5.5.0\";\n","\"use strict\";\n\nimport hash from \"hash.js\";\n//const _ripemd160 = _hash.ripemd160;\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { SupportedAlgorithm } from \"./types\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function ripemd160(data: BytesLike): string {\n return \"0x\" + (hash.ripemd160().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha256(data: BytesLike): string {\n return \"0x\" + (hash.sha256().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha512(data: BytesLike): string {\n return \"0x\" + (hash.sha512().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string {\n if (!SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm: algorithm\n });\n }\n\n return \"0x\" + hash.hmac((hash)[algorithm], arrayify(key)).update(arrayify(data)).digest(\"hex\");\n}\n\n","import { computeHmac, ripemd160, sha256, sha512 } from \"./sha2\";\n\nimport { SupportedAlgorithm } from \"./types\";\n\nexport {\n computeHmac,\n\n ripemd160,\n\n sha256,\n sha512,\n\n SupportedAlgorithm\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { computeHmac, SupportedAlgorithm } from \"@ethersproject/sha2\";\n\nexport function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string {\n password = arrayify(password);\n salt = arrayify(salt);\n let hLen;\n let l = 1;\n const DK = new Uint8Array(keylen)\n const block1 = new Uint8Array(salt.length + 4)\n block1.set(salt);\n //salt.copy(block1, 0, 0, salt.length)\n\n let r: number;\n let T: Uint8Array;\n\n for (let i = 1; i <= l; i++) {\n //block1.writeUInt32BE(i, salt.length)\n block1[salt.length] = (i >> 24) & 0xff;\n block1[salt.length + 1] = (i >> 16) & 0xff;\n block1[salt.length + 2] = (i >> 8) & 0xff;\n block1[salt.length + 3] = i & 0xff;\n\n //let U = createHmac(password).update(block1).digest();\n let U = arrayify(computeHmac(hashAlgorithm, password, block1));\n\n if (!hLen) {\n hLen = U.length\n T = new Uint8Array(hLen)\n l = Math.ceil(keylen / hLen)\n r = keylen - (l - 1) * hLen\n }\n\n //U.copy(T, 0, 0, hLen)\n T.set(U);\n\n\n for (let j = 1; j < iterations; j++) {\n //U = createHmac(password).update(U).digest();\n U = arrayify(computeHmac(hashAlgorithm, password, U));\n for (let k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n\n const destPos = (i - 1) * hLen\n const len = (i === l ? r : hLen)\n //T.copy(DK, destPos, 0, len)\n DK.set(arrayify(T).slice(0, len), destPos);\n }\n\n return hexlify(DK)\n}\n\n","\nexport { pbkdf2 } from \"./pbkdf2\";\n","export const version = \"wordlists/5.5.0\";\n","\"use strict\";\n\n// This gets overridden by rollup\nconst exportWordlist = false;\n\nimport { id } from \"@ethersproject/hash\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nexport const logger = new Logger(version);\n\nexport abstract class Wordlist {\n readonly locale: string;\n\n constructor(locale: string) {\n logger.checkAbstract(new.target, Wordlist);\n defineReadOnly(this, \"locale\", locale);\n }\n\n abstract getWord(index: number): string;\n abstract getWordIndex(word: string): number;\n\n // Subclasses may override this\n split(mnemonic: string): Array {\n return mnemonic.toLowerCase().split(/ +/g)\n }\n\n // Subclasses may override this\n join(words: Array): string {\n return words.join(\" \");\n }\n\n static check(wordlist: Wordlist): string {\n const words = [];\n for (let i = 0; i < 2048; i++) {\n const word = wordlist.getWord(i);\n /* istanbul ignore if */\n if (i !== wordlist.getWordIndex(word)) { return \"0x\"; }\n words.push(word);\n }\n return id(words.join(\"\\n\") + \"\\n\");\n }\n\n static register(lang: Wordlist, name?: string): void {\n if (!name) { name = lang.locale; }\n\n /* istanbul ignore if */\n if (exportWordlist) {\n try {\n const anyGlobal = (window as any)\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n defineReadOnly(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) { }\n }\n }\n\n}\n\n","\"use strict\";\n\nimport { Wordlist } from \"./wordlist\";\n\n\nconst words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n\nlet wordlist: Array = null;\n\n\nfunction loadWords(lang: Wordlist): void {\n if (wordlist != null) { return; }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n\n // Verify the computed list matches the official list\n /* istanbul ignore if */\n if (Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n}\n\nclass LangEn extends Wordlist {\n constructor() {\n super(\"en\");\n }\n\n getWord(index: number): string {\n loadWords(this);\n return wordlist[index];\n }\n\n getWordIndex(word: string): number {\n loadWords(this);\n return wordlist.indexOf(word);\n }\n}\n\nconst langEn = new LangEn();\nWordlist.register(langEn);\n\nexport { langEn };\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\n// Browser; only include English by default\n\nimport { Wordlist } from \"./wordlist\";\n\nimport { langEn as en } from \"./lang-en\";\n\nexport const wordlists: { [ locale: string ]: Wordlist } = {\n en: en\n}\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\nimport { logger, Wordlist } from \"./wordlist\";\n\nimport { wordlists } from \"./wordlists\";\n\nexport {\n logger,\n Wordlist,\n wordlists\n}\n","export const version = \"hdnode/5.5.0\";\n","\"use strict\";\n\n// See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\n\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexZeroPad, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from \"@ethersproject/strings\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { computeHmac, ripemd160, sha256, SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { computeAddress } from \"@ethersproject/transactions\";\nimport { Wordlist, wordlists } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst N = BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n\n\n// \"Bitcoin seed\"\nconst MasterSecret = toUtf8Bytes(\"Bitcoin seed\");\n\nconst HardenedBit = 0x80000000;\n\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits: number): number {\n return ((1 << bits) - 1) << (8 - bits);\n}\n\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits: number): number {\n return (1 << bits) - 1;\n}\n\nfunction bytes32(value: BigNumber | Uint8Array): string {\n return hexZeroPad(hexlify(value), 32);\n}\n\nfunction base58check(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nfunction getWordlist(wordlist: string | Wordlist): Wordlist {\n if (wordlist == null) {\n return wordlists[\"en\"];\n }\n\n if (typeof(wordlist) === \"string\") {\n const words = wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n\n return wordlist;\n}\n\nconst _constructorGuard: any = {};\n\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n\nexport interface Mnemonic {\n readonly phrase: string;\n readonly path: string;\n readonly locale: string;\n};\n\nexport class HDNode implements ExternallyOwnedAccount {\n readonly privateKey: string;\n readonly publicKey: string;\n\n readonly fingerprint: string;\n readonly parentFingerprint: string;\n\n readonly address: string;\n\n readonly mnemonic?: Mnemonic;\n readonly path: string;\n\n readonly chainCode: string;\n\n readonly index: number;\n readonly depth: number;\n\n /**\n * This constructor should not be called directly.\n *\n * Please use:\n * - fromMnemonic\n * - fromSeed\n */\n constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string) {\n logger.checkNew(new.target, HDNode);\n\n /* istanbul ignore if */\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n\n if (privateKey) {\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"privateKey\", signingKey.privateKey);\n defineReadOnly(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n defineReadOnly(this, \"privateKey\", null);\n defineReadOnly(this, \"publicKey\", hexlify(publicKey));\n }\n\n defineReadOnly(this, \"parentFingerprint\", parentFingerprint);\n defineReadOnly(this, \"fingerprint\", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4));\n\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n defineReadOnly(this, \"chainCode\", chainCode);\n\n defineReadOnly(this, \"index\", index);\n defineReadOnly(this, \"depth\", depth);\n\n if (mnemonicOrPath == null) {\n // From a source that does not preserve the path (e.g. extended keys)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", null);\n\n } else if (typeof(mnemonicOrPath) === \"string\") {\n // From a source that does not preserve the mnemonic (e.g. neutered)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", mnemonicOrPath);\n\n } else {\n // From a fully qualified source\n defineReadOnly(this, \"mnemonic\", mnemonicOrPath);\n defineReadOnly(this, \"path\", mnemonicOrPath.path);\n }\n }\n\n get extendedKey(): string {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n\n if (this.depth >= 256) { throw new Error(\"Depth too large!\"); }\n\n return base58check(concat([\n ((this.privateKey != null) ? \"0x0488ADE4\": \"0x0488B21E\"),\n hexlify(this.depth),\n this.parentFingerprint,\n hexZeroPad(hexlify(this.index), 4),\n this.chainCode,\n ((this.privateKey != null) ? concat([ \"0x00\", this.privateKey ]): this.publicKey),\n ]));\n }\n\n neuter(): HDNode {\n return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n }\n\n private _derive(index: number): HDNode {\n if (index > 0xffffffff) { throw new Error(\"invalid index - \" + String(index)); }\n\n // Base path\n let path = this.path;\n if (path) { path += \"/\" + (index & ~HardenedBit); }\n\n const data = new Uint8Array(37);\n\n if (index & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n\n // Data = 0x00 || ser_256(k_par)\n data.set(arrayify(this.privateKey), 1);\n\n // Hardened path\n if (path) { path += \"'\"; }\n\n } else {\n // Data = ser_p(point(k_par))\n data.set(arrayify(this.publicKey));\n }\n\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); }\n\n const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data));\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n\n // The private key\n let ki: string = null\n\n // The public key\n let Ki: string = null;\n\n if (this.privateKey) {\n ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N));\n } else {\n const ek = new SigningKey(hexlify(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n\n let mnemonicOrPath: Mnemonic | string = path;\n\n const srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path: path,\n locale: (srcMnemonic.locale || \"en\")\n });\n }\n\n return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);\n }\n\n derivePath(path: string): HDNode {\n const components = path.split(\"/\");\n\n if (components.length === 0 || (components[0] === \"m\" && this.depth !== 0)) {\n throw new Error(\"invalid path - \" + path);\n }\n\n if (components[0] === \"m\") { components.shift(); }\n\n let result: HDNode = this;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(HardenedBit + index);\n } else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(index);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n\n return result;\n }\n\n\n static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode {\n const seedArray: Uint8Array = arrayify(seed);\n if (seedArray.length < 16 || seedArray.length > 64) { throw new Error(\"invalid seed\"); }\n\n const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray));\n\n return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, \"0x00000000\", bytes32(I.slice(32)), 0, 0, mnemonic);\n }\n\n static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode {\n\n // If a locale name was passed in, find the associated wordlist\n wordlist = getWordlist(wordlist);\n\n // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid)\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n\n return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n }\n\n static fromSeed(seed: BytesLike): HDNode {\n return HDNode._fromSeed(seed, null);\n }\n\n static fromExtendedKey(extendedKey: string): HDNode {\n const bytes = Base58.decode(extendedKey);\n\n if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\": case \"0x043587cf\":\n return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null);\n\n // Private Key\n case \"0x0488ade4\": case \"0x04358394 \":\n if (key[0] !== 0) { break; }\n return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null);\n }\n\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n}\n\nexport function mnemonicToSeed(mnemonic: string, password?: string): string {\n if (!password) { password = \"\"; }\n\n const salt = toUtf8Bytes(\"mnemonic\" + password, UnicodeNormalizationForm.NFKD);\n\n return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n}\n\nexport function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n logger.checkNormalize();\n\n const words = wordlist.split(mnemonic);\n if ((words.length % 3) !== 0) { throw new Error(\"invalid mnemonic\"); }\n\n const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8)));\n\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n if (index === -1) { throw new Error(\"invalid mnemonic\"); }\n\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n\n const entropyBits = 32 * words.length / 3;\n\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n\n const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n\n if (checksum !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\n\nexport function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n entropy = arrayify(entropy);\n\n if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n\n const indices: Array = [ 0 ];\n\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n\n remainingBits -= 8;\n\n // This byte will complete an 11-bit index\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n\n remainingBits += 3;\n }\n }\n\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits);\n\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n\n return wordlist.join(indices.map((index) => (wordlist).getWord(index)));\n}\n\nexport function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getAccountPath(index: number): string {\n if (typeof(index) !== \"number\" || index < 0 || index >= HardenedBit || index % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index);\n }\n return `m/44'/60'/${ index }'/0/0`;\n}\n","export const version = \"random/5.5.0\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Debugging line for testing browser lib in node\n//const window = { crypto: { getRandomValues: () => { } } };\n\nlet anyGlobal: any = null;\ntry {\n anyGlobal = (window as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n} catch (error) {\n try {\n anyGlobal = (global as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n } catch (error) {\n anyGlobal = { };\n }\n}\n\nlet crypto: any = anyGlobal.crypto || anyGlobal.msCrypto;\nif (!crypto || !crypto.getRandomValues) {\n\n logger.warn(\"WARNING: Missing strong random number source\");\n\n crypto = {\n getRandomValues: function(buffer: Uint8Array): Uint8Array {\n return logger.throwError(\"no secure random source avaialble\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n}\n\nexport function randomBytes(length: number): Uint8Array {\n if (length <= 0 || length > 1024 || (length % 1) || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return arrayify(result);\n};\n","\"use strict\";\n\nexport function shuffled(array: Array): Array {\n array = array.slice();\n\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n\n return array;\n}\n","\"use strict\";\n\nexport { randomBytes } from \"./random\";\nexport { shuffled } from \"./shuffle\";\n","\"use strict\";\n\n(function(root) {\n\n function checkInt(value) {\n return (parseInt(value) === value);\n }\n\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) { return false; }\n\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n\n return true;\n }\n\n function coerceArray(arg, copy) {\n\n // ArrayBuffer view\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') {\n\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n\n throw new Error('unsupported array-like object');\n }\n\n function createArray(length) {\n return new Uint8Array(length);\n }\n\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n\n\n\n var convertUtf8 = (function() {\n function toBytes(text) {\n var result = [], i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16))\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c)\n }\n }\n\n return coerceArray(result);\n }\n\n function fromBytes(bytes) {\n var result = [], i = 0;\n\n while (i < bytes.length) {\n var c = bytes[i];\n\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));\n i += 2;\n } else {\n result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));\n i += 3;\n }\n }\n\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n var convertHex = (function() {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n\n // Number of rounds by keysize\n var numberOfRounds = {16: 10, 24: 12, 32: 14}\n\n // Round constant words\n var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n // S-box and Inverse S-box (S is for Substitution)\n var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 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3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n // Transformations for encryption\n var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\n var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\n var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\n var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n // Transformations for decryption\n var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\n var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\n var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\n var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n // Transformations for decryption key expansion\n var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\n var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\n var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\n var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\n\n function convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(\n (bytes[i ] << 24) |\n (bytes[i + 1] << 16) |\n (bytes[i + 2] << 8) |\n bytes[i + 3]\n );\n }\n return result;\n }\n\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n\n this._prepare();\n }\n\n\n AES.prototype._prepare = function() {\n\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[ tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n\n tk[KC / 2] ^= (S[ tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n\n for (var i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[ tt & 0xFF]);\n }\n }\n }\n\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T1[(t[ i ] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[ t[(i + 3) % 4] & 0xff] ^\n this._Ke[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T5[(t[ i ] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[ t[(i + 1) % 4] & 0xff] ^\n this._Kd[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n\n /**\n * Mode Of Operation - Electonic Codebook (ECB)\n */\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastCipherblock = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Feedback (CFB)\n */\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 size)');\n }\n\n if (!segmentSize) { segmentSize = 1; }\n\n this.segmentSize = segmentSize;\n\n this._shiftRegister = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if ((plaintext.length % this.segmentSize) != 0) {\n throw new Error('invalid plaintext size (must be segmentSize bytes)');\n }\n\n var encrypted = coerceArray(plaintext, true);\n\n var xorSegment;\n for (var i = 0; i < encrypted.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j = 0; j < this.segmentSize; j++) {\n encrypted[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return encrypted;\n }\n\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if ((ciphertext.length % this.segmentSize) != 0) {\n throw new Error('invalid ciphertext size (must be segmentSize bytes)');\n }\n\n var plaintext = coerceArray(ciphertext, true);\n\n var xorSegment;\n for (var i = 0; i < plaintext.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n\n for (var j = 0; j < this.segmentSize; j++) {\n plaintext[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return plaintext;\n }\n\n /**\n * Mode Of Operation - Output Feedback (OFB)\n */\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n\n\n /**\n * Counter object for CTR common mode of operation\n */\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) { initialValue = 1; }\n\n if (typeof(initialValue) === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n\n } else {\n this.setBytes(initialValue);\n }\n }\n\n Counter.prototype.setValue = function(value) {\n if (typeof(value) !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = value >> 8;\n }\n }\n\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n\n this._counter = bytes;\n };\n\n Counter.prototype.increment = function() {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n }\n\n\n /**\n * Mode Of Operation - Counter (CTR)\n */\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Counter\";\n this.name = \"ctr\";\n\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter)\n }\n\n this._counter = counter;\n\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n\n\n ///////////////////////\n // Padding\n\n // See:https://tools.ietf.org/html/rfc2315\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - (data.length % 16);\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n }\n\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }\n\n var padder = data[data.length - 1];\n if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }\n\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n\n ///////////////////////\n // Exporting\n\n\n // The block cipher\n var aesjs = {\n AES: AES,\n Counter: Counter,\n\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray,\n }\n };\n\n\n // node.js\n if (typeof exports !== 'undefined') {\n module.exports = aesjs\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(aesjs);\n\n // Web Browsers\n } else {\n\n // If there was an existing library at \"aesjs\" make sure it's still available\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n\n root.aesjs = aesjs;\n }\n\n\n})(this);\n","export const version = \"json-wallets/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, Bytes, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings';\n\nexport function looseArrayify(hexString: string): Uint8Array {\n if (typeof(hexString) === 'string' && hexString.substring(0, 2) !== '0x') {\n hexString = '0x' + hexString;\n }\n return arrayify(hexString);\n}\n\nexport function zpad(value: String | number, length: number): String {\n value = String(value);\n while (value.length < length) { value = '0' + value; }\n return value;\n}\n\nexport function getPassword(password: Bytes | string): Uint8Array {\n if (typeof(password) === 'string') {\n return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC);\n }\n return arrayify(password);\n}\n\nexport function searchPath(object: any, path: string): string {\n let currentChild = object;\n\n const comps = path.toLowerCase().split('/');\n for (let i = 0; i < comps.length; i++) {\n\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comps[i]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n\n // Didn't find one. :'(\n if (matchingChild === null) {\n return null;\n }\n\n // Now check this child...\n currentChild = matchingChild;\n }\n\n return currentChild;\n}\n\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\nexport function uuidV4(randomBytes: BytesLike): string {\n const bytes = arrayify(randomBytes);\n\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n const value = hexlify(bytes);\n\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n\n","\"use strict\";\n\nimport aes from \"aes-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { Description } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getPassword, looseArrayify, searchPath } from \"./utils\";\n\nexport interface _CrowdsaleAccount {\n address: string;\n privateKey: string;\n\n _isCrowdsaleAccount: boolean;\n}\n\nexport class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: string;\n readonly path?: string;\n\n readonly _isCrowdsaleAccount: boolean;\n\n isCrowdsaleAccount(value: any): value is CrowdsaleAccount {\n return !!(value && value._isCrowdsaleAccount);\n }\n}\n\n// See: https://github.com/ethereum/pyethsaletool\nexport function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount {\n const data = JSON.parse(json);\n\n password = getPassword(password);\n\n // Ethereum Address\n const ethaddr = getAddress(searchPath(data, \"ethaddr\"));\n\n // Encrypted Seed\n const encseed = looseArrayify(searchPath(data, \"encseed\"));\n if (!encseed || (encseed.length % 16) !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n\n const key = arrayify(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n\n // Decrypt the seed\n const aesCbc = new aes.ModeOfOperation.cbc(key, iv);\n const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed)));\n\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n\n const seedHexBytes = toUtf8Bytes(seedHex);\n\n const privateKey = keccak256(seedHexBytes);\n\n return new CrowdsaleAccount ({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey: privateKey\n });\n}\n\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\n\n\nexport function isCrowdsaleWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n return (data.encseed && data.ethaddr);\n}\n\nexport function isKeystoreWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n\n // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff\n return true;\n}\n\n//export function isJsonWallet(json: string): boolean {\n// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json));\n//}\n\nexport function getJsonWalletAddress(json: string): string {\n if (isCrowdsaleWallet(json)) {\n try {\n return getAddress(JSON.parse(json).ethaddr);\n } catch (error) { return null; }\n }\n\n if (isKeystoreWallet(json)) {\n try {\n return getAddress(JSON.parse(json).address);\n } catch (error) { return null; }\n }\n\n return null;\n}\n\n","\"use strict\";\n\n(function(root) {\n const MAX_VALUE = 0x7fffffff;\n\n // The SHA256 and PBKDF2 implementation are from scrypt-async-js:\n // See: https://github.com/dchest/scrypt-async-js\n function SHA256(m) {\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ]);\n\n let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;\n let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;\n const w = new Uint32Array(64);\n\n function blocks(p) {\n let off = 0, len = p.length;\n while (len >= 64) {\n let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;\n\n for (i = 0; i < 16; i++) {\n j = off + i*4;\n w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |\n ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);\n }\n\n for (i = 16; i < 64; i++) {\n u = w[i-2];\n t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);\n\n u = w[i-15];\n t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);\n\n w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;\n }\n\n for (i = 0; i < 64; i++) {\n t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^\n ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n\n t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^\n ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n\n h0 = (h0 + a) | 0;\n h1 = (h1 + b) | 0;\n h2 = (h2 + c) | 0;\n h3 = (h3 + d) | 0;\n h4 = (h4 + e) | 0;\n h5 = (h5 + f) | 0;\n h6 = (h6 + g) | 0;\n h7 = (h7 + h) | 0;\n\n off += 64;\n len -= 64;\n }\n }\n\n blocks(m);\n\n let i, bytesLeft = m.length % 64,\n bitLenHi = (m.length / 0x20000000) | 0,\n bitLenLo = m.length << 3,\n numZeros = (bytesLeft < 56) ? 56 : 120,\n p = m.slice(m.length - bytesLeft, m.length);\n\n p.push(0x80);\n for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }\n p.push((bitLenHi >>> 24) & 0xff);\n p.push((bitLenHi >>> 16) & 0xff);\n p.push((bitLenHi >>> 8) & 0xff);\n p.push((bitLenHi >>> 0) & 0xff);\n p.push((bitLenLo >>> 24) & 0xff);\n p.push((bitLenLo >>> 16) & 0xff);\n p.push((bitLenLo >>> 8) & 0xff);\n p.push((bitLenLo >>> 0) & 0xff);\n\n blocks(p);\n\n return [\n (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff,\n (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff,\n (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff,\n (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff,\n (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff,\n (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff,\n (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff,\n (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff\n ];\n }\n\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n // compress password if it's longer than hash block length\n password = (password.length <= 64) ? password : SHA256(password);\n\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n\n let i;\n let dk = [];\n\n // inner = (password ^ ipad) || salt || counter\n for (i = 0; i < 64; i++) { inner[i] = 0x36; }\n for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; }\n for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; }\n for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; }\n\n // outerKey = password ^ opad\n for (i = 0; i < 64; i++) outerKey[i] = 0x5c;\n for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];\n\n // increments counter inside inner\n function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }\n\n // output blocks = SHA256(outerKey || SHA256(inner)) ...\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));\n }\n\n return dk;\n }\n\n // The following is an adaptation of scryptsy\n // See: https://www.npmjs.com/package/scryptsy\n function blockmix_salsa8(BY, Yi, r, x, _X) {\n let i;\n\n arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);\n for (i = 0; i < 2 * r; i++) {\n blockxor(BY, i * 16, _X, 16);\n salsa20_8(_X, x);\n arraycopy(_X, 0, BY, Yi + (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);\n }\n }\n\n function R(a, b) {\n return (a << b) | (a >>> (32 - b));\n }\n\n function salsa20_8(B, x) {\n arraycopy(B, 0, x, 0, 16);\n\n for (let i = 8; i > 0; i -= 2) {\n x[ 4] ^= R(x[ 0] + x[12], 7);\n x[ 8] ^= R(x[ 4] + x[ 0], 9);\n x[12] ^= R(x[ 8] + x[ 4], 13);\n x[ 0] ^= R(x[12] + x[ 8], 18);\n x[ 9] ^= R(x[ 5] + x[ 1], 7);\n x[13] ^= R(x[ 9] + x[ 5], 9);\n x[ 1] ^= R(x[13] + x[ 9], 13);\n x[ 5] ^= R(x[ 1] + x[13], 18);\n x[14] ^= R(x[10] + x[ 6], 7);\n x[ 2] ^= R(x[14] + x[10], 9);\n x[ 6] ^= R(x[ 2] + x[14], 13);\n x[10] ^= R(x[ 6] + x[ 2], 18);\n x[ 3] ^= R(x[15] + x[11], 7);\n x[ 7] ^= R(x[ 3] + x[15], 9);\n x[11] ^= R(x[ 7] + x[ 3], 13);\n x[15] ^= R(x[11] + x[ 7], 18);\n x[ 1] ^= R(x[ 0] + x[ 3], 7);\n x[ 2] ^= R(x[ 1] + x[ 0], 9);\n x[ 3] ^= R(x[ 2] + x[ 1], 13);\n x[ 0] ^= R(x[ 3] + x[ 2], 18);\n x[ 6] ^= R(x[ 5] + x[ 4], 7);\n x[ 7] ^= R(x[ 6] + x[ 5], 9);\n x[ 4] ^= R(x[ 7] + x[ 6], 13);\n x[ 5] ^= R(x[ 4] + x[ 7], 18);\n x[11] ^= R(x[10] + x[ 9], 7);\n x[ 8] ^= R(x[11] + x[10], 9);\n x[ 9] ^= R(x[ 8] + x[11], 13);\n x[10] ^= R(x[ 9] + x[ 8], 18);\n x[12] ^= R(x[15] + x[14], 7);\n x[13] ^= R(x[12] + x[15], 9);\n x[14] ^= R(x[13] + x[12], 13);\n x[15] ^= R(x[14] + x[13], 18);\n }\n\n for (let i = 0; i < 16; ++i) {\n B[i] += x[i];\n }\n }\n\n // naive approach... going back to loop unrolling may yield additional performance\n function blockxor(S, Si, D, len) {\n for (let i = 0; i < len; i++) {\n D[i] ^= S[Si + i]\n }\n }\n\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n\n function checkBufferish(o) {\n if (!o || typeof(o.length) !== 'number') { return false; }\n\n for (let i = 0; i < o.length; i++) {\n const v = o[i];\n if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) {\n return false;\n }\n }\n\n return true;\n }\n\n function ensureInteger(value, name) {\n if (typeof(value) !== \"number\" || (value % 1)) { throw new Error('invalid ' + name); }\n return value;\n }\n\n // N = Cpu cost, r = Memory cost, p = parallelization cost\n // callback(error, progress, key)\n function _scrypt(password, salt, N, r, p, dkLen, callback) {\n\n N = ensureInteger(N, 'N');\n r = ensureInteger(r, 'r');\n p = ensureInteger(p, 'p');\n\n dkLen = ensureInteger(dkLen, 'dkLen');\n\n if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }\n\n if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }\n if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }\n\n if (!checkBufferish(password)) {\n throw new Error('password must be an array or buffer');\n }\n password = Array.prototype.slice.call(password);\n\n if (!checkBufferish(salt)) {\n throw new Error('salt must be an array or buffer');\n }\n salt = Array.prototype.slice.call(salt);\n\n let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);\n const B = new Uint32Array(p * 32 * r)\n for (let i = 0; i < B.length; i++) {\n const j = i * 4;\n B[i] = ((b[j + 3] & 0xff) << 24) |\n ((b[j + 2] & 0xff) << 16) |\n ((b[j + 1] & 0xff) << 8) |\n ((b[j + 0] & 0xff) << 0);\n }\n\n const XY = new Uint32Array(64 * r);\n const V = new Uint32Array(32 * r * N);\n\n const Yi = 32 * r;\n\n // scratch space\n const x = new Uint32Array(16); // salsa20_8\n const _X = new Uint32Array(16); // blockmix_salsa8\n\n const totalOps = p * N * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n\n // Set this to true to abandon the scrypt on the next step\n let stop = false;\n\n // State information\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n\n // How many blockmix_salsa8 can we do per step?\n const limit = callback ? parseInt(1000 / r): 0xffffffff;\n\n // Trick from scrypt-async; if there is a setImmediate shim in place, use it\n const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;\n\n // This is really all I changed; making scryptsy a state machine so we occasionally\n // stop and give other evnts on the evnt loop a chance to run. ~RicMoo\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error('cancelled'), currentOp / totalOps);\n }\n\n let steps;\n\n switch (state) {\n case 0:\n // for (var i = 0; i < p; i++)...\n Bi = i0 * 32 * r;\n\n arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1\n\n state = 1; // Move to ROMix 2\n i1 = 0;\n\n // Fall through\n\n case 1:\n\n // Run up to 1000 steps of the first inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 2\n arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4\n }\n\n // for (var i = 0; i < N; i++)\n i1 += steps;\n currentOp += steps;\n\n if (callback) {\n // Call the callback with the progress (optionally stopping us)\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n i1 = 0; // Move to ROMix 6\n state = 2;\n\n // Fall through\n\n case 2:\n\n // Run up to 1000 steps of the second inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 6\n const offset = (2 * r - 1) * 16; // ROMix - 7\n const j = XY[offset] & (N - 1);\n blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner)\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer)\n }\n\n // for (var i = 0; i < N; i++)...\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n if (callback) {\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10\n\n // for (var i = 0; i < p; i++)...\n i0++;\n if (i0 < p) {\n state = 0;\n break;\n }\n\n b = [];\n for (let i = 0; i < B.length; i++) {\n b.push((B[i] >> 0) & 0xff);\n b.push((B[i] >> 8) & 0xff);\n b.push((B[i] >> 16) & 0xff);\n b.push((B[i] >> 24) & 0xff);\n }\n\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);\n\n // Send the result to the callback\n if (callback) { callback(null, 1.0, derivedKey); }\n\n // Done; don't break (which would reschedule)\n return derivedKey;\n }\n\n // Schedule the next steps\n if (callback) { nextTick(incrementalSMix); }\n }\n\n // Run the smix state machine until completion\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != undefined) { return derivedKey; }\n }\n }\n\n // Bootstrap the async incremental smix\n incrementalSMix();\n }\n\n const lib = {\n scrypt: function(password, salt, N, r, p, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) { progressCallback(0); }\n _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N, r, p, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen));\n }\n };\n\n // node.js\n if (typeof(exports) !== 'undefined') {\n module.exports = lib;\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(lib);\n\n // Web Browsers\n } else if (root) {\n\n // If there was an existing library \"scrypt\", make sure it is still available\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n\n root.scrypt = lib;\n }\n\n})(this);\n","\"use strict\";\n\nimport aes from \"aes-js\";\nimport scrypt from \"scrypt-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\nimport { defaultPath, entropyToMnemonic, HDNode, Mnemonic, mnemonicToEntropy } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 as _pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { Description } from \"@ethersproject/properties\";\nimport { computeAddress } from \"@ethersproject/transactions\";\n\nimport { getPassword, looseArrayify, searchPath, uuidV4, zpad } from \"./utils\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Exported Types\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n return (value != null && value.mnemonic && value.mnemonic.phrase);\n}\n\nexport interface _KeystoreAccount {\n address: string;\n privateKey: string;\n mnemonic?: Mnemonic;\n\n _isKeystoreAccount: boolean;\n}\n\nexport class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: Mnemonic;\n\n readonly _isKeystoreAccount: boolean;\n\n isKeystoreAccount(value: any): value is KeystoreAccount {\n return !!(value && value._isKeystoreAccount);\n }\n}\n\nexport type ProgressCallback = (percent: number) => void;\n\nexport type EncryptOptions = {\n iv?: BytesLike;\n entropy?: BytesLike;\n client?: string;\n salt?: BytesLike;\n uuid?: string;\n scrypt?: {\n N?: number;\n r?: number;\n p?: number;\n }\n}\n\nfunction _decrypt(data: any, key: Uint8Array, ciphertext: Uint8Array): Uint8Array {\n const cipher = searchPath(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n const iv = looseArrayify(searchPath(data, \"crypto/cipherparams/iv\"))\n const counter = new aes.Counter(iv);\n\n const aesCtr = new aes.ModeOfOperation.ctr(key, counter);\n\n return arrayify(aesCtr.decrypt(ciphertext));\n }\n\n return null;\n}\n\nfunction _getAccount(data: any, key: Uint8Array): KeystoreAccount {\n const ciphertext = looseArrayify(searchPath(data, \"crypto/ciphertext\"));\n\n const computedMAC = hexlify(keccak256(concat([ key.slice(16, 32), ciphertext ]))).substring(2);\n if (computedMAC !== searchPath(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n\n const privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n\n const mnemonicKey = key.slice(32, 64);\n\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") { check = \"0x\" + check; }\n\n if (getAddress(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n\n const account: _KeystoreAccount = {\n _isKeystoreAccount: true,\n address: address,\n privateKey: hexlify(privateKey)\n };\n\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n if (searchPath(data, \"x-ethers/version\") === \"0.1\") {\n const mnemonicCiphertext = looseArrayify(searchPath(data, \"x-ethers/mnemonicCiphertext\"));\n const mnemonicIv = looseArrayify(searchPath(data, \"x-ethers/mnemonicCounter\"));\n\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n\n const path = searchPath(data, \"x-ethers/path\") || defaultPath;\n const locale = searchPath(data, \"x-ethers/locale\") || \"en\";\n\n const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n\n try {\n const mnemonic = entropyToMnemonic(entropy, locale);\n const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n\n account.mnemonic = node.mnemonic;\n\n } catch (error) {\n // If we don't have the locale wordlist installed to\n // read this mnemonic, just bail and don't set the\n // mnemonic\n if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n\n return new KeystoreAccount(account);\n}\n\ntype ScryptFunc = (pw: Uint8Array, salt: Uint8Array, n: number, r: number, p: number, dkLen: number, callback?: ProgressCallback) => T;\ntype Pbkdf2Func = (pw: Uint8Array, salt: Uint8Array, c: number, dkLen: number, prfFunc: string) => T;\n\nfunction pbkdf2Sync(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Uint8Array {\n return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction pbkdf2(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Promise {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction _computeKdfKey(data: any, password: Bytes | string, pbkdf2Func: Pbkdf2Func, scryptFunc: ScryptFunc, progressCallback?: ProgressCallback): T {\n const passwordBytes = getPassword(password);\n\n const kdf = searchPath(data, \"crypto/kdf\");\n\n if (kdf && typeof(kdf) === \"string\") {\n const throwError = function(name: string, value: any): never {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n }\n\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n const N = parseInt(searchPath(data, \"crypto/kdfparams/n\"));\n const r = parseInt(searchPath(data, \"crypto/kdfparams/r\"));\n const p = parseInt(searchPath(data, \"crypto/kdfparams/p\"));\n\n // Check for all required parameters\n if (!N || !r || !p) { throwError(\"kdf\", kdf); }\n\n // Make sure N is a power of 2\n if ((N & (N - 1)) !== 0) { throwError(\"N\", N); }\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback);\n\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n\n let prfFunc: string = null;\n const prf = searchPath(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n\n const count = parseInt(searchPath(data, \"crypto/kdfparams/c\"));\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n}\n\n\nexport function decryptSync(json: string, password: Bytes | string): KeystoreAccount {\n const data = JSON.parse(json);\n\n const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt);\n return _getAccount(data, key);\n}\n\nexport async function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n const data = JSON.parse(json);\n\n const key = await _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback);\n return _getAccount(data, key);\n}\n\n\nexport function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise {\n\n try {\n // Check the address matches the private key\n if (getAddress(account.address) !== computeAddress(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n\n // Check the mnemonic (if any) matches the private key\n if (hasMnemonic(account)) {\n const mnemonic = account.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n\n } catch (e) {\n return Promise.reject(e);\n }\n\n // The options are optional, so adjust the call as needed\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) { options = {}; }\n\n const privateKey: Uint8Array = arrayify(account.privateKey);\n const passwordBytes = getPassword(password);\n\n let entropy: Uint8Array = null\n let path: string = null;\n let locale: string = null;\n if (hasMnemonic(account)) {\n const srcMnemonic = account.mnemonic;\n entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n\n let client = options.client;\n if (!client) { client = \"ethers.js\"; }\n\n // Check/generate the salt\n let salt: Uint8Array = null;\n if (options.salt) {\n salt = arrayify(options.salt);\n } else {\n salt = randomBytes(32);;\n }\n\n // Override initialization vector\n let iv: Uint8Array = null;\n if (options.iv) {\n iv = arrayify(options.iv);\n if (iv.length !== 16) { throw new Error(\"invalid iv\"); }\n } else {\n iv = randomBytes(16);\n }\n\n // Override the uuid\n let uuidRandom: Uint8Array = null;\n if (options.uuid) {\n uuidRandom = arrayify(options.uuid);\n if (uuidRandom.length !== 16) { throw new Error(\"invalid uuid\"); }\n } else {\n uuidRandom = randomBytes(16);\n }\n\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) { N = options.scrypt.N; }\n if (options.scrypt.r) { r = options.scrypt.r; }\n if (options.scrypt.p) { p = options.scrypt.p; }\n }\n\n // We take 64 bytes:\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => {\n key = arrayify(key);\n\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n\n // This will be used to encrypt the mnemonic phrase (if any)\n const mnemonicKey = key.slice(32, 64);\n\n // Encrypt the private key\n const counter = new aes.Counter(iv);\n const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter);\n const ciphertext = arrayify(aesCtr.encrypt(privateKey));\n\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]))\n\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data: { [key: string]: any } = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(salt).substring(2),\n n: N,\n dklen: 32,\n p: p,\n r: r\n },\n mac: mac.substring(2)\n }\n };\n\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (entropy) {\n const mnemonicIv = randomBytes(16);\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\"\n );\n data[\"x-ethers\"] = {\n client: client,\n gethFilename: (\"UTC--\" + timestamp + \"--\" + data.address),\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n path: path,\n locale: locale,\n version: \"0.1\"\n };\n }\n\n return JSON.stringify(data);\n });\n}\n","\"use strict\";\n\nimport { Bytes } from \"@ethersproject/bytes\";\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\n\nimport { decrypt as decryptCrowdsale } from \"./crowdsale\";\nimport { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from \"./inspect\";\nimport { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from \"./keystore\";\n\nfunction decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n if (isCrowdsaleWallet(json)) {\n if (progressCallback) { progressCallback(0); }\n const account = decryptCrowdsale(json, password)\n if (progressCallback) { progressCallback(1); }\n return Promise.resolve(account);\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystore(json, password, progressCallback);\n }\n\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n}\n\nfunction decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount {\n if (isCrowdsaleWallet(json)) {\n return decryptCrowdsale(json, password)\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystoreSync(json, password);\n }\n\n throw new Error(\"invalid JSON wallet\");\n}\n\nexport {\n decryptCrowdsale,\n\n decryptKeystore,\n decryptKeystoreSync,\n encryptKeystore,\n\n isCrowdsaleWallet,\n isKeystoreWallet,\n getJsonWalletAddress,\n\n decryptJsonWallet,\n decryptJsonWalletSync,\n\n ProgressCallback,\n EncryptOptions,\n};\n","export const version = \"wallet/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { Provider, TransactionRequest } from \"@ethersproject/abstract-provider\";\nimport { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { arrayify, Bytes, BytesLike, concat, hexDataSlice, isHexString, joinSignature, SignatureLike } from \"@ethersproject/bytes\";\nimport { hashMessage, _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { defaultPath, HDNode, entropyToMnemonic, Mnemonic } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { computeAddress, recoverAddress, serialize, UnsignedTransaction } from \"@ethersproject/transactions\";\nimport { Wordlist } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction isAccount(value: any): value is ExternallyOwnedAccount {\n return (value != null && isHexString(value.privateKey, 32) && value.address != null);\n}\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n const mnemonic = value.mnemonic;\n return (mnemonic && mnemonic.phrase);\n}\n\nexport class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner {\n\n readonly address: string;\n readonly provider: Provider;\n\n // Wrapping the _signingKey and _mnemonic in a getter function prevents\n // leaking the private key in console.log; still, be careful! :)\n readonly _signingKey: () => SigningKey;\n readonly _mnemonic: () => Mnemonic;\n\n constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider) {\n logger.checkNew(new.target, Wallet);\n\n super();\n\n if (isAccount(privateKey)) {\n const signingKey = new SigningKey(privateKey.privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n if (this.address !== getAddress(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n\n if (hasMnemonic(privateKey)) {\n const srcMnemonic = privateKey.mnemonic;\n defineReadOnly(this, \"_mnemonic\", () => (\n {\n phrase: srcMnemonic.phrase,\n path: srcMnemonic.path || defaultPath,\n locale: srcMnemonic.locale || \"en\"\n }\n ));\n const mnemonic = this.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if (computeAddress(node.privateKey) !== this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n }\n\n\n } else {\n if (SigningKey.isSigningKey(privateKey)) {\n /* istanbul ignore if */\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n defineReadOnly(this, \"_signingKey\", () => (privateKey));\n\n } else {\n // A lot of common tools do not prefix private keys with a 0x (see: #1166)\n if (typeof(privateKey) === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n }\n\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n }\n\n /* istanbul ignore if */\n if (provider && !Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n get mnemonic(): Mnemonic { return this._mnemonic(); }\n get privateKey(): string { return this._signingKey().privateKey; }\n get publicKey(): string { return this._signingKey().publicKey; }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n connect(provider: Provider): Wallet {\n return new Wallet(this, provider);\n }\n\n signTransaction(transaction: TransactionRequest): Promise {\n return resolveProperties(transaction).then((tx) => {\n if (tx.from != null) {\n if (getAddress(tx.from) !== this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n\n const signature = this._signingKey().signDigest(keccak256(serialize(tx)));\n return serialize(tx, signature);\n });\n }\n\n async signMessage(message: Bytes | string): Promise {\n return joinSignature(this._signingKey().signDigest(hashMessage(message)));\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n if (this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return this.provider.resolveName(name);\n });\n\n return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value)));\n }\n\n encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise {\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n\n if (progressCallback && typeof(progressCallback) !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n\n if (!options) { options = {}; }\n\n return encryptKeystore(this, password, options, progressCallback);\n }\n\n\n /**\n * Static methods to create Wallet instances.\n */\n static createRandom(options?: any): Wallet {\n let entropy: Uint8Array = randomBytes(16);\n\n if (!options) { options = { }; }\n\n if (options.extraEntropy) {\n entropy = arrayify(hexDataSlice(keccak256(concat([ entropy, options.extraEntropy ])), 0, 16));\n }\n\n const mnemonic = entropyToMnemonic(entropy, options.locale);\n return Wallet.fromMnemonic(mnemonic, options.path, options.locale);\n }\n\n static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n return decryptJsonWallet(json, password, progressCallback).then((account) => {\n return new Wallet(account);\n });\n }\n\n static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet {\n return new Wallet(decryptJsonWalletSync(json, password));\n }\n\n static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet {\n if (!path) { path = defaultPath; }\n return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n }\n}\n\nexport function verifyMessage(message: Bytes | string, signature: SignatureLike): string {\n return recoverAddress(hashMessage(message), signature);\n}\n\nexport function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string {\n return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature);\n}\n","export const version = \"networks/5.5.1\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Network, Networkish } from \"./types\";\n\nexport {\n Network,\n Networkish\n};\n\ntype DefaultProviderFunc = (providers: any, options?: any) => any;\n\ninterface Renetworkable extends DefaultProviderFunc {\n renetwork: (network: Network) => DefaultProviderFunc;\n};\n\nfunction isRenetworkable(value: any): value is Renetworkable {\n return (value && typeof(value.renetwork) === \"function\");\n}\n\nfunction ethDefaultProvider(network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (options == null) { options = { }; }\n const providerList: Array = [];\n\n if (providers.InfuraProvider) {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch(error) { }\n }\n\n if (providers.EtherscanProvider) {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch(error) { }\n }\n\n if (providers.AlchemyProvider) {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch(error) { }\n }\n\n if (providers.PocketProvider) {\n // These networks are currently faulty on Pocket as their\n // network does not handle the Berlin hardfork, which is\n // live on these ones.\n // @TODO: This goes away once Pocket has upgraded their nodes\n const skip = [ \"goerli\", \"ropsten\", \"rinkeby\" ];\n try {\n const provider = new providers.PocketProvider(network);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch(error) { }\n }\n\n if (providers.CloudflareProvider) {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch(error) { }\n }\n\n if (providerList.length === 0) { return null; }\n\n if (providers.FallbackProvider) {\n let quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n\n return providerList[0];\n };\n\n func.renetwork = function(network: Network) {\n return ethDefaultProvider(network);\n };\n\n return func;\n}\n\nfunction etcDefaultProvider(url: string, network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n\n return null;\n };\n\n func.renetwork = function(network: Network) {\n return etcDefaultProvider(url, network);\n };\n\n return func;\n}\n\nconst homestead: Network = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n};\n\nconst ropsten: Network = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n};\n\nconst classicMordor: Network = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n};\n\n// See: https://chainlist.org\nconst networks: { [name: string]: Network } = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n\n homestead: homestead,\n mainnet: homestead,\n\n morden: { chainId: 2, name: \"morden\" },\n\n ropsten: ropsten,\n testnet: ropsten,\n\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n\n\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/etc\", \"classic\")\n },\n\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n\n classicMordor: classicMordor,\n classicTestnet: classicMordor,\n\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/kotti\", \"classicKotti\")\n },\n\n xdai: { chainId: 100, name: \"xdai\" },\n\n matic: { chainId: 137, name: \"matic\" },\n maticmum: { chainId: 80001, name: \"maticmum\" },\n\n optimism: { chainId: 10, name: \"optimism\" },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" },\n}\n\n/**\n * getNetwork\n *\n * Converts a named common networks or chain ID (network ID) to a Network\n * and verifies a network is a valid Network..\n */\nexport function getNetwork(network: Networkish): Network {\n // No network (null)\n if (network == null) { return null; }\n\n if (typeof(network) === \"number\") {\n for (const name in networks) {\n const standard = networks[name];\n if (standard.chainId === network) {\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: (standard.ensAddress || null),\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n }\n\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n\n if (typeof(network) === \"string\") {\n const standard = networks[network];\n if (standard == null) { return null; }\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: standard.ensAddress,\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n\n const standard = networks[network.name];\n\n // Not a standard network; check that it is a valid network in general\n if (!standard) {\n if (typeof(network.chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n\n // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155)\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n\n // @TODO: In the next major version add an attach function to a defaultProvider\n // class and move the _defaultProvider internal to this file (extend Network)\n let defaultProvider: DefaultProviderFunc = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n\n // Standard Network (allow overriding the ENS address)\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: (network.ensAddress || standard.ensAddress || null),\n _defaultProvider: defaultProvider\n };\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function decode(textData: string): Uint8Array {\n textData = atob(textData);\n const data = [];\n for (let i = 0; i < textData.length; i++) {\n data.push(textData.charCodeAt(i));\n }\n return arrayify(data);\n}\n\nexport function encode(data: BytesLike): string {\n data = arrayify(data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n\n\n","\"use strict\";\n\nexport { decode, encode } from \"./base64\";\n","export const version = \"web/5.5.1\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport type { GetUrlResponse, Options } from \"./types\";\n\nexport { GetUrlResponse, Options };\n\nexport async function getUrl(href: string, options?: Options): Promise {\n if (options == null) { options = { }; }\n\n const request: RequestInit = {\n method: (options.method || \"GET\"),\n headers: (options.headers || { }),\n body: (options.body || undefined),\n };\n\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\"; // no-cors, cors, *same-origin\n request.cache = \"no-cache\"; // *default, no-cache, reload, force-cache, only-if-cached\n request.credentials = \"same-origin\"; // include, *same-origin, omit\n request.redirect = \"follow\"; // manual, *follow, error\n request.referrer = \"client\"; // no-referrer, *client\n };\n\n const response = await fetch(href, request);\n const body = await response.arrayBuffer();\n\n const headers: { [ name: string ]: string } = { };\n if (response.headers.forEach) {\n response.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n } else {\n (<() => Array>(((response.headers)).keys))().forEach((key) => {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n\n return {\n headers: headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: arrayify(new Uint8Array(body)),\n }\n}\n","\"use strict\";\n\nimport { decode as base64Decode, encode as base64Encode } from \"@ethersproject/base64\";\nimport { hexlify, isBytesLike } from \"@ethersproject/bytes\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getUrl, GetUrlResponse, Options } from \"./geturl\";\n\nfunction staller(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\nfunction bodyify(value: any, type: string): string {\n if (value == null) { return null; }\n\n if (typeof(value) === \"string\") { return value; }\n\n if (isBytesLike(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return toUtf8String(value);\n } catch (error) { };\n }\n return hexlify(value);\n }\n\n return value;\n}\n\n// Exported Types\nexport type ConnectionInfo = {\n url: string,\n headers?: { [key: string]: string | number }\n\n user?: string,\n password?: string,\n\n allowInsecureAuthentication?: boolean,\n allowGzip?: boolean,\n\n throttleLimit?: number,\n throttleSlotInterval?: number;\n throttleCallback?: (attempt: number, url: string) => Promise,\n\n timeout?: number,\n};\n\nexport interface OnceBlockable {\n once(eventName: \"block\", handler: () => void): void;\n}\n\nexport interface OncePollable {\n once(eventName: \"poll\", handler: () => void): void;\n}\n\nexport type PollOptions = {\n timeout?: number,\n floor?: number,\n ceiling?: number,\n interval?: number,\n retryLimit?: number,\n onceBlock?: OnceBlockable\n oncePoll?: OncePollable\n};\n\nexport type FetchJsonResponse = {\n statusCode: number;\n headers: { [ header: string ]: string };\n};\n\n\ntype Header = { key: string, value: string };\n\n// This API is still a work in progress; the future changes will likely be:\n// - ConnectionInfo => FetchDataRequest\n// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }\n// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified)\n// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T\n// For this reason, it should be considered internal until the API is finalized\nexport function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise {\n\n // How many times to retry in the event of a throttle\n const attemptLimit = (typeof(connection) === \"object\" && connection.throttleLimit != null) ? connection.throttleLimit: 12;\n logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0),\n \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n\n const throttleCallback = ((typeof(connection) === \"object\") ? connection.throttleCallback: null);\n const throttleSlotInterval = ((typeof(connection) === \"object\" && typeof(connection.throttleSlotInterval) === \"number\") ? connection.throttleSlotInterval: 100);\n logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0),\n \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n\n const headers: { [key: string]: Header } = { };\n\n let url: string = null;\n\n // @TODO: Allow ConnectionInfo to override some of these values\n const options: Options = {\n method: \"GET\",\n };\n\n let allow304 = false;\n\n let timeout = 2 * 60 * 1000;\n\n if (typeof(connection) === \"string\") {\n url = connection;\n\n } else if (typeof(connection) === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n\n url = connection.url;\n\n if (typeof(connection.timeout) === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n\n if (connection.headers) {\n for (const key in connection.headers) {\n headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n\n options.allowGzip = !!connection.allowGzip;\n\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\n \"basic authentication requires a secure https url\",\n Logger.errors.INVALID_ARGUMENT,\n { argument: \"url\", url: url, user: connection.user, password: \"[REDACTED]\" }\n );\n }\n\n const authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + base64Encode(toUtf8Bytes(authorization))\n };\n }\n }\n const reData = new RegExp(\"^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$\", \"i\");\n const dataMatch = ((url) ? url.match(reData): null);\n if (dataMatch) {\n try {\n const response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] },\n body: base64Decode(dataMatch[2])\n };\n\n let result: T = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n\n } catch (error) {\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error: error,\n requestBody: null,\n requestMethod: \"GET\",\n url: url\n });\n }\n }\n\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n\n const flatHeaders: { [ key: string ]: string } = { };\n Object.keys(headers).forEach((key) => {\n const header = headers[key];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n\n const runningTimeout = (function() {\n let timer: NodeJS.Timer = null;\n const promise: Promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(() => {\n if (timer == null) { return; }\n timer = null;\n\n reject(logger.makeError(\"timeout\", Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout: timeout,\n url: url\n }));\n }, timeout);\n }\n });\n\n const cancel = function() {\n if (timer == null) { return; }\n clearTimeout(timer);\n timer = null;\n }\n\n return { promise, cancel };\n })();\n\n const runningFetch = (async function() {\n\n for (let attempt = 0; attempt < attemptLimit; attempt++) {\n let response: GetUrlResponse = null;\n\n try {\n response = await getUrl(url, options);\n\n if (attempt < attemptLimit) {\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirection; for now we only support absolute locataions\n const location = response.headers.location || \"\";\n if (options.method === \"GET\" && location.match(/^https:/)) {\n url = response.headers.location;\n continue;\n }\n\n } else if (response.statusCode === 429) {\n // Exponential back-off throttling\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n let stall = 0;\n\n const retryAfter = response.headers[\"retry-after\"];\n if (typeof(retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1000;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n\n //console.log(\"Stalling 429\");\n await staller(stall);\n continue;\n }\n }\n }\n\n } catch (error) {\n response = (error).response;\n if (response == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error,\n url: url\n });\n }\n }\n\n\n let body = response.body;\n\n if (allow304 && response.statusCode === 304) {\n body = null;\n\n } else if (response.statusCode < 200 || response.statusCode >= 300) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", Logger.errors.SERVER_ERROR, {\n status: response.statusCode,\n headers: response.headers,\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n\n if (processFunc) {\n try {\n const result = await processFunc(body, response);\n runningTimeout.cancel();\n return result;\n\n } catch (error) {\n // Allow the processFunc to trigger a throttle\n if (error.throttleRetry && attempt < attemptLimit) {\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n //console.log(\"Stalling callback\");\n await staller(timeout);\n continue;\n }\n }\n\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n error: error,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n }\n\n runningTimeout.cancel();\n\n // If we had a processFunc, it either returned a T or threw above.\n // The \"body\" is now a Uint8Array.\n return (body);\n }\n\n return logger.throwError(\"failed response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n })();\n\n return Promise.race([ runningTimeout.promise, runningFetch ]);\n}\n\nexport function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise {\n let processJsonFunc = (value: Uint8Array, response: FetchJsonResponse) => {\n let result: any = null;\n if (value != null) {\n try {\n result = JSON.parse(toUtf8String(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", Logger.errors.SERVER_ERROR, {\n body: value,\n error: error\n });\n }\n }\n\n if (processFunc) {\n result = processFunc(result, response);\n }\n\n return result;\n }\n\n // If we have json to send, we must\n // - add content-type of application/json (unless already overridden)\n // - convert the json to bytes\n let body: Uint8Array = null;\n if (json != null) {\n body = toUtf8Bytes(json);\n\n // Create a connection with the content-type set for JSON\n const updated: ConnectionInfo = (typeof(connection) === \"string\") ? ({ url: connection }): shallowCopy(connection);\n if (updated.headers) {\n const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === \"content-type\")).length) !== 0;\n if (!hasContentType) {\n updated.headers = shallowCopy(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n\n return _fetchData(connection, body, processJsonFunc);\n}\n\nexport function poll(func: () => Promise, options?: PollOptions): Promise {\n if (!options) { options = {}; }\n options = shallowCopy(options);\n if (options.floor == null) { options.floor = 0; }\n if (options.ceiling == null) { options.ceiling = 10000; }\n if (options.interval == null) { options.interval = 250; }\n\n return new Promise(function(resolve, reject) {\n\n let timer: NodeJS.Timer = null;\n let done: boolean = false;\n\n // Returns true if cancel was successful. Unsuccessful cancel means we're already done.\n const cancel = (): boolean => {\n if (done) { return false; }\n done = true;\n if (timer) { clearTimeout(timer); }\n return true;\n };\n\n if (options.timeout) {\n timer = setTimeout(() => {\n if (cancel()) { reject(new Error(\"timeout\")); }\n }, options.timeout)\n }\n\n const retryLimit = options.retryLimit;\n\n let attempt = 0;\n function check() {\n return func().then(function(result) {\n\n // If we have a result, or are allowed null then we're done\n if (result !== undefined) {\n if (cancel()) { resolve(result); }\n\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n\n // Otherwise, exponential back-off (up to 10s) our next request\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) { reject(new Error(\"retry limit reached\")); }\n return;\n }\n\n let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) { timeout = options.floor; }\n if (timeout > options.ceiling) { timeout = options.ceiling; }\n\n setTimeout(check, timeout);\n }\n\n return null;\n }, function(error) {\n if (cancel()) { reject(error); }\n });\n }\n check();\n });\n}\n\n","'use strict'\nvar ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'\n\n// pre-compute lookup table\nvar ALPHABET_MAP = {}\nfor (var z = 0; z < ALPHABET.length; z++) {\n var x = ALPHABET.charAt(z)\n\n if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\n ALPHABET_MAP[x] = z\n}\n\nfunction polymodStep (pre) {\n var b = pre >> 25\n return ((pre & 0x1FFFFFF) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3)\n}\n\nfunction prefixChk (prefix) {\n var chk = 1\n for (var i = 0; i < prefix.length; ++i) {\n var c = prefix.charCodeAt(i)\n if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')'\n\n chk = polymodStep(chk) ^ (c >> 5)\n }\n chk = polymodStep(chk)\n\n for (i = 0; i < prefix.length; ++i) {\n var v = prefix.charCodeAt(i)\n chk = polymodStep(chk) ^ (v & 0x1f)\n }\n return chk\n}\n\nfunction encode (prefix, words, LIMIT) {\n LIMIT = LIMIT || 90\n if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit')\n\n prefix = prefix.toLowerCase()\n\n // determine chk mod\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') throw new Error(chk)\n\n var result = prefix + '1'\n for (var i = 0; i < words.length; ++i) {\n var x = words[i]\n if ((x >> 5) !== 0) throw new Error('Non 5-bit word')\n\n chk = polymodStep(chk) ^ x\n result += ALPHABET.charAt(x)\n }\n\n for (i = 0; i < 6; ++i) {\n chk = polymodStep(chk)\n }\n chk ^= 1\n\n for (i = 0; i < 6; ++i) {\n var v = (chk >> ((5 - i) * 5)) & 0x1f\n result += ALPHABET.charAt(v)\n }\n\n return result\n}\n\nfunction __decode (str, LIMIT) {\n LIMIT = LIMIT || 90\n if (str.length < 8) return str + ' too short'\n if (str.length > LIMIT) return 'Exceeds length limit'\n\n // don't allow mixed case\n var lowered = str.toLowerCase()\n var uppered = str.toUpperCase()\n if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str\n str = lowered\n\n var split = str.lastIndexOf('1')\n if (split === -1) return 'No separator character for ' + str\n if (split === 0) return 'Missing prefix for ' + str\n\n var prefix = str.slice(0, split)\n var wordChars = str.slice(split + 1)\n if (wordChars.length < 6) return 'Data too short'\n\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') return chk\n\n var words = []\n for (var i = 0; i < wordChars.length; ++i) {\n var c = wordChars.charAt(i)\n var v = ALPHABET_MAP[c]\n if (v === undefined) return 'Unknown character ' + c\n chk = polymodStep(chk) ^ v\n\n // not in the checksum?\n if (i + 6 >= wordChars.length) continue\n words.push(v)\n }\n\n if (chk !== 1) return 'Invalid checksum for ' + str\n return { prefix: prefix, words: words }\n}\n\nfunction decodeUnsafe () {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n}\n\nfunction decode (str) {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n\n throw new Error(res)\n}\n\nfunction convert (data, inBits, outBits, pad) {\n var value = 0\n var bits = 0\n var maxV = (1 << outBits) - 1\n\n var result = []\n for (var i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i]\n bits += inBits\n\n while (bits >= outBits) {\n bits -= outBits\n result.push((value >> bits) & maxV)\n }\n }\n\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV)\n }\n } else {\n if (bits >= inBits) return 'Excess padding'\n if ((value << (outBits - bits)) & maxV) return 'Non-zero padding'\n }\n\n return result\n}\n\nfunction toWordsUnsafe (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n}\n\nfunction toWords (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nfunction fromWordsUnsafe (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n}\n\nfunction fromWords (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nmodule.exports = {\n decodeUnsafe: decodeUnsafe,\n decode: decode,\n encode: encode,\n toWordsUnsafe: toWordsUnsafe,\n toWords: toWords,\n fromWordsUnsafe: fromWordsUnsafe,\n fromWords: fromWords\n}\n","export const version = \"providers/5.5.1\";\n","\"use strict\";\n\nimport { Block, TransactionReceipt, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { AddressZero } from \"@ethersproject/constants\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, parse as parseTransaction } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport type FormatFunc = (value: any) => any;\n\nexport type FormatFuncs = { [ key: string ]: FormatFunc };\n\nexport type Formats = {\n transaction: FormatFuncs,\n transactionRequest: FormatFuncs,\n receipt: FormatFuncs,\n receiptLog: FormatFuncs,\n block: FormatFuncs,\n blockWithTransactions: FormatFuncs,\n filter: FormatFuncs,\n filterLog: FormatFuncs,\n};\n\nexport class Formatter {\n readonly formats: Formats;\n\n constructor() {\n logger.checkNew(new.target, Formatter);\n this.formats = this.getDefaultFormats();\n }\n\n getDefaultFormats(): Formats {\n const formats: Formats = ({ });\n\n const address = this.address.bind(this);\n const bigNumber = this.bigNumber.bind(this);\n const blockTag = this.blockTag.bind(this);\n const data = this.data.bind(this);\n const hash = this.hash.bind(this);\n const hex = this.hex.bind(this);\n const number = this.number.bind(this);\n const type = this.type.bind(this);\n\n const strictData = (v: any) => { return this.data(v, true); };\n\n formats.transaction = {\n hash: hash,\n\n type: type,\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n\n blockHash: Formatter.allowNull(hash, null),\n blockNumber: Formatter.allowNull(number, null),\n transactionIndex: Formatter.allowNull(number, null),\n\n confirmations: Formatter.allowNull(number, null),\n\n from: address,\n\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n\n gasLimit: bigNumber,\n to: Formatter.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data: data,\n\n r: Formatter.allowNull(this.uint256),\n s: Formatter.allowNull(this.uint256),\n v: Formatter.allowNull(number),\n\n creates: Formatter.allowNull(address, null),\n\n raw: Formatter.allowNull(data),\n };\n\n formats.transactionRequest = {\n from: Formatter.allowNull(address),\n nonce: Formatter.allowNull(number),\n gasLimit: Formatter.allowNull(bigNumber),\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n to: Formatter.allowNull(address),\n value: Formatter.allowNull(bigNumber),\n data: Formatter.allowNull(strictData),\n type: Formatter.allowNull(number),\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n };\n\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash,\n address: address,\n topics: Formatter.arrayOf(hash),\n data: data,\n logIndex: number,\n blockHash: hash,\n };\n\n formats.receipt = {\n to: Formatter.allowNull(this.address, null),\n from: Formatter.allowNull(this.address, null),\n contractAddress: Formatter.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter.allowNull(data),// @TODO: should this be data?\n blockHash: hash,\n transactionHash: hash,\n logs: Formatter.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter.allowNull(bigNumber),\n status: Formatter.allowNull(number),\n type: type\n };\n\n formats.block = {\n hash: hash,\n parentHash: hash,\n number: number,\n\n timestamp: number,\n nonce: Formatter.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n\n miner: address,\n extraData: data,\n\n transactions: Formatter.allowNull(Formatter.arrayOf(hash)),\n\n baseFeePerGas: Formatter.allowNull(bigNumber)\n };\n\n formats.blockWithTransactions = shallowCopy(formats.block);\n formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));\n\n formats.filter = {\n fromBlock: Formatter.allowNull(blockTag, undefined),\n toBlock: Formatter.allowNull(blockTag, undefined),\n blockHash: Formatter.allowNull(hash, undefined),\n address: Formatter.allowNull(address, undefined),\n topics: Formatter.allowNull(this.topics.bind(this), undefined),\n };\n\n formats.filterLog = {\n blockNumber: Formatter.allowNull(number),\n blockHash: Formatter.allowNull(hash),\n transactionIndex: number,\n\n removed: Formatter.allowNull(this.boolean.bind(this)),\n\n address: address,\n data: Formatter.allowFalsish(data, \"0x\"),\n\n topics: Formatter.arrayOf(hash),\n\n transactionHash: hash,\n logIndex: number,\n };\n\n return formats;\n }\n\n accessList(accessList: Array): AccessList {\n return accessListify(accessList || []);\n }\n\n // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number\n // Strict! Used on input.\n number(number: any): number {\n if (number === \"0x\") { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n type(number: any): number {\n if (number === \"0x\" || number == null) { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n // Strict! Used on input.\n bigNumber(value: any): BigNumber {\n return BigNumber.from(value);\n }\n\n // Requires a boolean, \"true\" or \"false\"; returns a boolean\n boolean(value: any): boolean {\n if (typeof(value) === \"boolean\") { return value; }\n if (typeof(value) === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") { return true; }\n if (value === \"false\") { return false; }\n }\n throw new Error(\"invalid boolean - \" + value);\n }\n\n hex(value: any, strict?: boolean): string {\n if (typeof(value) === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n if (isHexString(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n\n data(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if ((result.length % 2) !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n }\n\n // Requires an address\n // Strict! Used on input.\n address(value: any): string {\n return getAddress(value);\n }\n\n callAddress(value: any): string {\n if (!isHexString(value, 32)) { return null; }\n const address = getAddress(hexDataSlice(value, 12));\n return (address === AddressZero) ? null: address;\n }\n\n contractAddress(value: any): string {\n return getContractAddress(value);\n }\n\n // Strict! Used on input.\n blockTag(blockTag: any): string {\n if (blockTag == null) { return \"latest\"; }\n\n if (blockTag === \"earliest\") { return \"0x0\"; }\n\n if (blockTag === \"latest\" || blockTag === \"pending\") {\n return blockTag;\n }\n\n if (typeof(blockTag) === \"number\" || isHexString(blockTag)) {\n return hexValue(blockTag);\n }\n\n throw new Error(\"invalid blockTag\");\n }\n\n // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash.\n hash(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if (hexDataLength(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n }\n\n // Returns the difficulty as a number, or if too large (i.e. PoA network) null\n difficulty(value: any): number {\n if (value == null) { return null; }\n\n const v = BigNumber.from(value);\n\n try {\n return v.toNumber();\n } catch (error) { }\n\n return null;\n }\n\n uint256(value: any): string {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return hexZeroPad(value, 32);\n }\n\n _block(value: any, format: any): Block {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n // The difficulty may need to come from _difficulty in recursed blocks\n const difficulty = (value._difficulty != null) ? value._difficulty: value.difficulty;\n const result = Formatter.check(format, value);\n result._difficulty = ((difficulty == null) ? null: BigNumber.from(difficulty));\n return result;\n }\n\n block(value: any): Block {\n return this._block(value, this.formats.block);\n }\n\n blockWithTransactions(value: any): Block {\n return this._block(value, this.formats.blockWithTransactions);\n }\n\n // Strict! Used on input.\n transactionRequest(value: any): any {\n return Formatter.check(this.formats.transactionRequest, value);\n }\n\n transactionResponse(transaction: any): TransactionResponse {\n\n // Rename gas to gasLimit\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (transaction.to && BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n\n // Rename input to data\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n\n // If to and creates are empty, populate the creates from the transaction\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n\n if ((transaction.type === 1 || transaction.type === 2)&& transaction.accessList == null) {\n transaction.accessList = [ ];\n }\n\n const result: TransactionResponse = Formatter.check(this.formats.transaction, transaction);\n\n if (transaction.chainId != null) {\n let chainId = transaction.chainId;\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n result.chainId = chainId;\n\n } else {\n let chainId = transaction.networkId;\n\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n if (typeof(chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) { chainId = 0; }\n chainId = parseInt(chainId);\n }\n\n if (typeof(chainId) !== \"number\") { chainId = 0; }\n\n result.chainId = chainId;\n }\n\n // 0x0000... should actually be null\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n\n return result;\n }\n\n transaction(value: any): any {\n return parseTransaction(value);\n }\n\n receiptLog(value: any): any {\n return Formatter.check(this.formats.receiptLog, value);\n }\n\n receipt(value: any): TransactionReceipt {\n const result: TransactionReceipt = Formatter.check(this.formats.receipt, value);\n\n // RSK incorrectly implemented EIP-658, so we munge things a bit here for it\n if (result.root != null) {\n if (result.root.length <= 4) {\n // Could be 0x00, 0x0, 0x01 or 0x1\n const value = BigNumber.from(result.root).toNumber();\n if (value === 0 || value === 1) {\n // Make sure if both are specified, they match\n if (result.status != null && (result.status !== value)) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n // Must be a valid bytes32\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n\n if (result.status != null) {\n result.byzantium = true;\n }\n\n return result;\n }\n\n topics(value: any): any {\n if (Array.isArray(value)) {\n return value.map((v) => this.topics(v));\n\n } else if (value != null) {\n return this.hash(value, true);\n }\n\n return null;\n }\n\n filter(value: any): any {\n return Formatter.check(this.formats.filter, value);\n }\n\n filterLog(value: any): any {\n return Formatter.check(this.formats.filterLog, value);\n }\n\n static check(format: { [ name: string ]: FormatFunc }, object: any): any {\n const result: any = {};\n for (const key in format) {\n try {\n const value = format[key](object[key]);\n if (value !== undefined) { result[key] = value; }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n }\n\n // if value is null-ish, nullValue is returned\n static allowNull(format: FormatFunc, nullValue?: any): FormatFunc {\n return (function(value: any) {\n if (value == null) { return nullValue; }\n return format(value);\n });\n }\n\n // If value is false-ish, replaceValue is returned\n static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc {\n return (function(value: any) {\n if (!value) { return replaceValue; }\n return format(value);\n });\n }\n\n // Requires an Array satisfying check\n static arrayOf(format: FormatFunc): FormatFunc {\n return (function(array: any): Array {\n if (!Array.isArray(array)) { throw new Error(\"not an array\"); }\n\n const result: any = [];\n\n array.forEach(function(value) {\n result.push(format(value));\n });\n\n return result;\n });\n }\n}\n\nexport interface CommunityResourcable {\n isCommunityResource(): boolean;\n}\n\nexport function isCommunityResourcable(value: any): value is CommunityResourcable {\n return (value && typeof(value.isCommunityResource) === \"function\");\n}\n\nexport function isCommunityResource(value: any): boolean {\n return (isCommunityResourcable(value) && value.isCommunityResource());\n}\n\n// Show the throttle message only once\nlet throttleMessage = false;\nexport function showThrottleMessage() {\n if (throttleMessage) { return; }\n throttleMessage = true;\n\n console.log(\"========= NOTICE =========\")\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n}\n\n","\"use strict\";\n\nimport {\n Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, ForkEvent,\n Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse\n} from \"@ethersproject/abstract-provider\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { namehash } from \"@ethersproject/hash\";\nimport { getNetwork, Network, Networkish } from \"@ethersproject/networks\";\nimport { Deferrable, defineReadOnly, getStatic, resolveProperties } from \"@ethersproject/properties\";\nimport { Transaction } from \"@ethersproject/transactions\";\nimport { sha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { fetchJson, poll } from \"@ethersproject/web\";\n\nimport bech32 from \"bech32\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Formatter } from \"./formatter\";\n\n//////////////////////////////\n// Event Serializeing\n\nfunction checkTopic(topic: string): string {\n if (topic == null) { return \"null\"; }\n if (hexDataLength(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n}\n\nfunction serializeTopics(topics: Array>): string {\n // Remove trailing null AND-topics; they are redundant\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) { topics.pop(); }\n\n return topics.map((topic) => {\n if (Array.isArray(topic)) {\n\n // Only track unique OR-topics\n const unique: { [ topic: string ]: boolean } = { }\n topic.forEach((topic) => {\n unique[checkTopic(topic)] = true;\n });\n\n // The order of OR-topics does not matter\n const sorted = Object.keys(unique);\n sorted.sort();\n\n return sorted.join(\"|\");\n\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n}\n\nfunction deserializeTopics(data: string): Array> {\n if (data === \"\") { return [ ]; }\n\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") { return [ ]; }\n\n const comps = topic.split(\"|\").map((topic) => {\n return ((topic === \"null\") ? null: topic);\n });\n\n return ((comps.length === 1) ? comps[0]: comps);\n });\n}\n\nfunction getEventTag(eventName: EventType): string {\n if (typeof(eventName) === \"string\") {\n eventName = eventName.toLowerCase();\n\n if (hexDataLength(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n\n } else if (ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n\n } else if (eventName && typeof(eventName) === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n\n throw new Error(\"invalid event - \" + eventName);\n}\n\n//////////////////////////////\n// Helper Object\n\nfunction getTime() {\n return (new Date()).getTime();\n}\n\nfunction stall(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\n//////////////////////////////\n// Provider Object\n\n\n/**\n * EventType\n * - \"block\"\n * - \"poll\"\n * - \"didPoll\"\n * - \"pending\"\n * - \"error\"\n * - \"network\"\n * - filter\n * - topics array\n * - transaction hash\n */\n\nconst PollableEvents = [ \"block\", \"network\", \"pending\", \"poll\" ];\n\nexport class Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"listener\", listener);\n defineReadOnly(this, \"once\", once);\n }\n\n get event(): EventType {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n }\n\n get type(): string {\n return this.tag.split(\":\")[0]\n }\n\n get hash(): string {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") { return null; }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") { return null; }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = { };\n\n if (topics.length > 0) { filter.topics = topics; }\n if (address && address !== \"*\") { filter.address = address; }\n\n return filter;\n }\n\n pollable(): boolean {\n return (this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0);\n }\n}\n\nexport interface EnsResolver {\n\n // Name this Resolver is associated with\n readonly name: string;\n\n // The address of the resolver\n readonly address: string;\n\n // Multichain address resolution (also normal address resolution)\n // See: https://eips.ethereum.org/EIPS/eip-2304\n getAddress(coinType?: 60): Promise\n\n // Contenthash field\n // See: https://eips.ethereum.org/EIPS/eip-1577\n getContentHash(): Promise;\n\n // Storage of text records\n // See: https://eips.ethereum.org/EIPS/eip-634\n getText(key: string): Promise;\n};\n\nexport interface EnsProvider {\n resolveName(name: string): Promise;\n lookupAddress(address: string): Promise;\n getResolver(name: string): Promise;\n}\n\ntype CoinInfo = {\n symbol: string,\n ilk?: string, // General family\n prefix?: string, // Bech32 prefix\n p2pkh?: number, // Pay-to-Public-Key-Hash Version\n p2sh?: number, // Pay-to-Script-Hash Version\n};\n\n// https://github.com/satoshilabs/slips/blob/master/slip-0044.md\nconst coinInfos: { [ coinType: string ]: CoinInfo } = {\n \"0\": { symbol: \"btc\", p2pkh: 0x00, p2sh: 0x05, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 0x30, p2sh: 0x32, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 0x1e, p2sh: 0x16 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" },\n};\n\nfunction bytes32ify(value: number): string {\n return hexZeroPad(BigNumber.from(value).toHexString(), 32);\n}\n\n// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d)\nfunction base58Encode(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nexport interface Avatar {\n url: string;\n linkage: Array<{ type: string, content: string }>;\n}\n\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\"),\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\n\nfunction _parseString(result: string): null | string {\n try {\n return toUtf8String(_parseBytes(result));\n } catch(error) { }\n return null;\n}\n\nfunction _parseBytes(result: string): null | string {\n if (result === \"0x\") { return null; }\n\n const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber();\n const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber();\n return hexDataSlice(result, offset + 32, offset + 32 + length);\n}\n\n\nexport class Resolver implements EnsResolver {\n readonly provider: BaseProvider;\n\n readonly name: string;\n readonly address: string;\n\n readonly _resolvedAddress: null | string;\n\n // The resolvedAddress is only for creating a ReverseLookup resolver\n constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string) {\n defineReadOnly(this, \"provider\", provider);\n defineReadOnly(this, \"name\", name);\n defineReadOnly(this, \"address\", provider.formatter.address(address));\n defineReadOnly(this, \"_resolvedAddress\", resolvedAddress);\n }\n\n async _fetchBytes(selector: string, parameters?: string): Promise {\n // e.g. keccak256(\"addr(bytes32,uint256)\")\n const tx = {\n to: this.address,\n data: hexConcat([ selector, namehash(this.name), (parameters || \"0x\") ])\n };\n\n try {\n return _parseBytes(await this.provider.call(tx));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n _getAddress(coinType: number, hexBytes: string): string {\n const coinInfo = coinInfos[String(coinType)];\n\n if (coinInfo == null) {\n logger.throwError(`unsupported coin type: ${ coinType }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`\n });\n }\n\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n\n const bytes = arrayify(hexBytes);\n\n // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG\n if (coinInfo.p2pkh != null) {\n const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n const length = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2pkh ], (\"0x\" + p2pkh[2]) ]));\n }\n }\n }\n\n // P2SH: OP_HASH160 OP_EQUAL\n if (coinInfo.p2sh != null) {\n const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n const length = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2sh ], (\"0x\" + p2sh[2]) ]));\n }\n }\n }\n\n // Bech32\n if (coinInfo.prefix != null) {\n const length = bytes[1];\n\n // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program\n let version = bytes[0];\n if (version === 0x00) {\n if (length !== 20 && length !== 32) {\n version = -1;\n }\n } else {\n version = -1;\n }\n\n if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {\n const words = bech32.toWords(bytes.slice(2));\n words.unshift(version);\n return bech32.encode(coinInfo.prefix, words);\n }\n }\n\n return null;\n }\n\n\n async getAddress(coinType?: number): Promise {\n if (coinType == null) { coinType = 60; }\n\n // If Ethereum, use the standard `addr(bytes32)`\n if (coinType === 60) {\n try {\n // keccak256(\"addr(bytes32)\")\n const transaction = {\n to: this.address,\n data: (\"0x3b3b57de\" + namehash(this.name).substring(2))\n };\n const hexBytes = await this.provider.call(transaction);\n\n // No address\n if (hexBytes === \"0x\" || hexBytes === HashZero) { return null; }\n\n return this.provider.formatter.callAddress(hexBytes);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n // keccak256(\"addr(bytes32,uint256\")\n const hexBytes = await this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType));\n\n // No address\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // Compute the address\n const address = this._getAddress(coinType, hexBytes);\n\n if (address == null) {\n logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`,\n coinType: coinType,\n data: hexBytes\n });\n }\n\n return address;\n }\n\n async getAvatar(): Promise {\n const linkage: Array<{ type: string, content: string }> = [ ];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) { return null; }\n\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n\n if (match == null) { continue; }\n switch (match[1]) {\n case \"https\":\n linkage.push({ type: \"url\", content: avatar });\n return { linkage, url: avatar };\n\n case \"data\":\n linkage.push({ type: \"data\", content: avatar });\n return { linkage, url: avatar };\n\n case \"ipfs\":\n linkage.push({ type: \"ipfs\", content: avatar });\n return { linkage, url: `https:/\\/gateway.ipfs.io/ipfs/${ avatar.substring(7) }` }\n\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (match[1] === \"erc721\") ? \"0xc87b56dd\": \"0x0e89341c\";\n linkage.push({ type: match[1], content: avatar });\n\n // The owner of this name\n const owner = (this._resolvedAddress || await this.getAddress());\n\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) { return null; }\n\n const addr = await this.provider.formatter.address(comps[0]);\n const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);\n\n // Check that this account owns the token\n if (match[1] === \"erc721\") {\n // ownerOf(uint256 tokenId)\n const tokenOwner = this.provider.formatter.callAddress(await this.provider.call({\n to: addr, data: hexConcat([ \"0x6352211e\", tokenId ])\n }));\n if (owner !== tokenOwner) { return null; }\n linkage.push({ type: \"owner\", content: tokenOwner });\n\n } else if (match[1] === \"erc1155\") {\n // balanceOf(address owner, uint256 tokenId)\n const balance = BigNumber.from(await this.provider.call({\n to: addr, data: hexConcat([ \"0x00fdd58e\", hexZeroPad(owner, 32), tokenId ])\n }));\n if (balance.isZero()) { return null; }\n linkage.push({ type: \"balance\", content: balance.toString() });\n }\n\n // Call the token contract for the metadata URL\n const tx = {\n to: this.provider.formatter.address(comps[0]),\n data: hexConcat([ selector, tokenId ])\n };\n let metadataUrl = _parseString(await this.provider.call(tx))\n if (metadataUrl == null) { return null; }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n\n // ERC-1155 allows a generic {id} in the URL\n if (match[1] === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n }\n\n // Get the token metadata\n const metadata = await fetchJson(metadataUrl);\n\n // Pull the image URL out\n if (!metadata || typeof(metadata.image) !== \"string\" || !metadata.image.match(/^(https:\\/\\/|data:)/i)) {\n return null;\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n linkage.push({ type: \"url\", content: metadata.image });\n\n return { linkage, url: metadata.image };\n }\n }\n }\n } catch (error) { }\n\n return null;\n }\n\n async getContentHash(): Promise {\n\n // keccak256(\"contenthash()\")\n const hexBytes = await this._fetchBytes(\"0xbc1c58d1\");\n\n // No contenthash\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // IPFS (CID: 1, Type: DAG-PB)\n const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const length = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length * 2) {\n return \"ipfs:/\\/\" + Base58.encode(\"0x\" + ipfs[1]);\n }\n }\n\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/)\n if (swarm) {\n if (swarm[1].length === (32 * 2)) {\n return \"bzz:/\\/\" + swarm[1]\n }\n }\n\n return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n });\n }\n\n async getText(key: string): Promise {\n\n // The key encoded as parameter to fetchBytes\n let keyBytes = toUtf8Bytes(key);\n\n // The nodehash consumes the first slot, so the string pointer targets\n // offset 64, with the length at offset 64 and data starting at offset 96\n keyBytes = concat([ bytes32ify(64), bytes32ify(keyBytes.length), keyBytes ]);\n\n // Pad to word-size (32 bytes)\n if ((keyBytes.length % 32) !== 0) {\n keyBytes = concat([ keyBytes, hexZeroPad(\"0x\", 32 - (key.length % 32)) ])\n }\n\n const hexBytes = await this._fetchBytes(\"0x59d1d43c\", hexlify(keyBytes));\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n return toUtf8String(hexBytes);\n }\n}\n\nlet defaultFormatter: Formatter = null;\n\nlet nextPollId = 1;\n\nexport class BaseProvider extends Provider implements EnsProvider {\n _networkPromise: Promise;\n _network: Network;\n\n _events: Array;\n\n formatter: Formatter;\n\n // To help mitigate the eventually consistent nature of the blockchain\n // we keep a mapping of events we emit. If we emit an event X, we expect\n // that a user should be able to query for that event in the callback,\n // if the node returns null, we stall the response until we get back a\n // meaningful value, since we may be hitting a re-org, or a node that\n // has not indexed the event yet.\n // Events:\n // - t:{hash} - Transaction hash\n // - b:{hash} - BlockHash\n // - block - The most recent emitted block\n _emitted: { [ eventName: string ]: number | \"pending\" };\n\n _pollingInterval: number;\n _poller: NodeJS.Timer;\n _bootstrapPoll: NodeJS.Timer;\n\n _lastBlockNumber: number;\n\n _fastBlockNumber: number;\n _fastBlockNumberPromise: Promise;\n _fastQueryDate: number;\n\n _maxInternalBlockNumber: number;\n _internalBlockNumber: Promise<{ blockNumber: number, reqTime: number, respTime: number }>;\n\n readonly anyNetwork: boolean;\n\n\n /**\n * ready\n *\n * A Promise that resolves only once the provider is ready.\n *\n * Sub-classes that call the super with a network without a chainId\n * MUST set this. Standard named networks have a known chainId.\n *\n */\n\n constructor(network: Networkish | Promise) {\n logger.checkNew(new.target, Provider);\n\n super();\n\n // Events being listened to\n this._events = [];\n\n this._emitted = { block: -2 };\n\n this.formatter = new.target.getFormatter();\n\n // If network is any, this Provider allows the underlying\n // network to change dynamically, and we auto-detect the\n // current network\n defineReadOnly(this, \"anyNetwork\", (network === \"any\"));\n if (this.anyNetwork) { network = this.detectNetwork(); }\n\n if (network instanceof Promise) {\n this._networkPromise = network;\n\n // Squash any \"unhandled promise\" errors; that do not need to be handled\n network.catch((error) => { });\n\n // Trigger initial network setting (async)\n this._ready().catch((error) => { });\n\n } else {\n const knownNetwork = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (knownNetwork) {\n defineReadOnly(this, \"_network\", knownNetwork);\n this.emit(\"network\", knownNetwork, null);\n\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n\n this._maxInternalBlockNumber = -1024;\n\n this._lastBlockNumber = -2;\n\n this._pollingInterval = 4000;\n\n this._fastQueryDate = 0;\n }\n\n async _ready(): Promise {\n if (this._network == null) {\n let network: Network = null;\n if (this._networkPromise) {\n try {\n network = await this._networkPromise;\n } catch (error) { }\n }\n\n // Try the Provider's network detection (this MUST throw if it cannot)\n if (network == null) {\n network = await this.detectNetwork();\n }\n\n // This should never happen; every Provider sub-class should have\n // suggested a network by here (or have thrown).\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // Possible this call stacked so do not call defineReadOnly again\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n defineReadOnly(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n }\n\n return this._network;\n }\n\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get ready(): Promise {\n return poll(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }\n\n // @TODO: Remove this and just create a singleton formatter\n static getFormatter(): Formatter {\n if (defaultFormatter == null) {\n defaultFormatter = new Formatter();\n }\n return defaultFormatter;\n }\n\n // @TODO: Remove this and just use getNetwork\n static getNetwork(network: Networkish): Network {\n return getNetwork((network == null) ? \"homestead\": network);\n }\n\n // Fetches the blockNumber, but will reuse any result that is less\n // than maxAge old or has been requested since the last request\n async _getInternalBlockNumber(maxAge: number): Promise {\n await this._ready();\n\n // Allowing stale data up to maxAge old\n if (maxAge > 0) {\n\n // While there are pending internal block requests...\n while (this._internalBlockNumber) {\n\n // ...\"remember\" which fetch we started with\n const internalBlockNumber = this._internalBlockNumber;\n\n try {\n // Check the result is not too stale\n const result = await internalBlockNumber;\n if ((getTime() - result.respTime) <= maxAge) {\n return result.blockNumber;\n }\n\n // Too old; fetch a new value\n break;\n\n } catch(error) {\n\n // The fetch rejected; if we are the first to get the\n // rejection, drop through so we replace it with a new\n // fetch; all others blocked will then get that fetch\n // which won't match the one they \"remembered\" and loop\n if (this._internalBlockNumber === internalBlockNumber) {\n break;\n }\n }\n }\n }\n\n const reqTime = getTime();\n\n const checkInternalBlockNumber = resolveProperties({\n blockNumber: this.perform(\"getBlockNumber\", { }),\n networkError: this.getNetwork().then((network) => (null), (error) => (error))\n }).then(({ blockNumber, networkError }) => {\n if (networkError) {\n // Unremember this bad internal block number\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n throw networkError;\n }\n\n const respTime = getTime();\n\n blockNumber = BigNumber.from(blockNumber).toNumber();\n if (blockNumber < this._maxInternalBlockNumber) { blockNumber = this._maxInternalBlockNumber; }\n\n this._maxInternalBlockNumber = blockNumber;\n this._setFastBlockNumber(blockNumber); // @TODO: Still need this?\n return { blockNumber, reqTime, respTime };\n });\n\n this._internalBlockNumber = checkInternalBlockNumber;\n\n // Swallow unhandled exceptions; if needed they are handled else where\n checkInternalBlockNumber.catch((error) => {\n // Don't null the dead (rejected) fetch, if it has already been updated\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n });\n\n return (await checkInternalBlockNumber).blockNumber;\n }\n\n async poll(): Promise {\n const pollId = nextPollId++;\n\n // Track all running promises, so we can trigger a post-poll once they are complete\n const runners: Array> = [];\n\n let blockNumber: number = null;\n try {\n blockNumber = await this._getInternalBlockNumber(100 + this.pollingInterval / 2);\n } catch (error) {\n this.emit(\"error\", error);\n return;\n }\n this._setFastBlockNumber(blockNumber);\n\n // Emit a poll event after we have the latest (fast) block number\n this.emit(\"poll\", pollId, blockNumber);\n\n // If the block has not changed, meh.\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return;\n }\n\n // First polling cycle, trigger a \"block\" events\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n\n if (Math.abs(((this._emitted.block)) - blockNumber) > 1000) {\n logger.warn(`network block skew detected; skipping block events (emitted=${ this._emitted.block } blockNumber${ blockNumber })`);\n this.emit(\"error\", logger.makeError(\"network block skew detected\", Logger.errors.NETWORK_ERROR, {\n blockNumber: blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n\n } else {\n // Notify all listener for each block that has passed\n for (let i = (this._emitted.block) + 1; i <= blockNumber; i++) {\n this.emit(\"block\", i);\n }\n }\n\n // The emitted block was updated, check for obsolete events\n if ((this._emitted.block) !== blockNumber) {\n this._emitted.block = blockNumber;\n\n Object.keys(this._emitted).forEach((key) => {\n // The block event does not expire\n if (key === \"block\") { return; }\n\n // The block we were at when we emitted this event\n const eventBlockNumber = this._emitted[key];\n\n // We cannot garbage collect pending transactions or blocks here\n // They should be garbage collected by the Provider when setting\n // \"pending\" events\n if (eventBlockNumber === \"pending\") { return; }\n\n // Evict any transaction hashes or block hashes over 12 blocks\n // old, since they should not return null anyways\n if (blockNumber - eventBlockNumber > 12) {\n delete this._emitted[key];\n }\n });\n }\n\n // First polling cycle\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n\n // Find all transaction hashes we are waiting on\n this._events.forEach((event) => {\n switch (event.type) {\n case \"tx\": {\n const hash = event.hash;\n let runner = this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt || receipt.blockNumber == null) { return null; }\n this._emitted[\"t:\" + hash] = receipt.blockNumber;\n this.emit(hash, receipt);\n return null;\n }).catch((error: Error) => { this.emit(\"error\", error); });\n\n runners.push(runner);\n\n break;\n }\n\n case \"filter\": {\n const filter = event.filter;\n filter.fromBlock = this._lastBlockNumber + 1;\n filter.toBlock = blockNumber;\n\n const runner = this.getLogs(filter).then((logs) => {\n if (logs.length === 0) { return; }\n logs.forEach((log: Log) => {\n this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n this.emit(filter, log);\n });\n }).catch((error: Error) => { this.emit(\"error\", error); });\n runners.push(runner);\n\n break;\n }\n }\n });\n\n this._lastBlockNumber = blockNumber;\n\n // Once all events for this loop have been processed, emit \"didPoll\"\n Promise.all(runners).then(() => {\n this.emit(\"didPoll\", pollId);\n }).catch((error) => { this.emit(\"error\", error); });\n\n return;\n }\n\n // Deprecated; do not use this\n resetEventsBlock(blockNumber: number): void {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) { this.poll(); }\n }\n\n get network(): Network {\n return this._network;\n }\n\n // This method should query the network if the underlying network\n // can change, such as when connected to a JSON-RPC backend\n async detectNetwork(): Promise {\n return logger.throwError(\"provider does not support network detection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n });\n }\n\n async getNetwork(): Promise {\n const network = await this._ready();\n\n // Make sure we are still connected to the same network; this is\n // only an external call for backends which can have the underlying\n // network change spontaneously\n const currentNetwork = await this.detectNetwork();\n if (network.chainId !== currentNetwork.chainId) {\n\n // We are allowing network changes, things can get complex fast;\n // make sure you know what you are doing if you use \"any\"\n if (this.anyNetwork) {\n this._network = currentNetwork;\n\n // Reset all internal block number guards and caches\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n\n // The \"network\" event MUST happen before this method resolves\n // so any events have a chance to unregister, so we stall an\n // additional event loop before returning from /this/ call\n this.emit(\"network\", currentNetwork, network);\n await stall(0);\n\n return this._network;\n }\n\n const error = logger.makeError(\"underlying network changed\", Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network: network,\n detectedNetwork: currentNetwork\n });\n\n this.emit(\"error\", error);\n throw error;\n }\n\n return network;\n }\n\n get blockNumber(): number {\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => {\n this._setFastBlockNumber(blockNumber);\n }, (error) => { });\n\n return (this._fastBlockNumber != null) ? this._fastBlockNumber: -1;\n }\n\n get polling(): boolean {\n return (this._poller != null);\n }\n\n set polling(value: boolean) {\n if (value && !this._poller) {\n this._poller = setInterval(() => { this.poll(); }, this.pollingInterval);\n\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(() => {\n this.poll();\n\n // We block additional polls until the polling interval\n // is done, to prevent overwhelming the poll function\n this._bootstrapPoll = setTimeout(() => {\n // If polling was disabled, something may require a poke\n // since starting the bootstrap poll and it was disabled\n if (!this._poller) { this.poll(); }\n\n // Clear out the bootstrap so we can do another\n this._bootstrapPoll = null;\n }, this.pollingInterval);\n }, 0);\n }\n\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n }\n\n get pollingInterval(): number {\n return this._pollingInterval;\n }\n\n set pollingInterval(value: number) {\n if (typeof(value) !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n\n this._pollingInterval = value;\n\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(() => { this.poll(); }, this._pollingInterval);\n }\n }\n\n _getFastBlockNumber(): Promise {\n const now = getTime();\n\n // Stale block number, request a newer value\n if ((now - this._fastQueryDate) > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => {\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n }\n return this._fastBlockNumber;\n });\n }\n\n return this._fastBlockNumberPromise;\n }\n\n _setFastBlockNumber(blockNumber: number): void {\n // Older block, maybe a stale request\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { return; }\n\n // Update the time we updated the blocknumber\n this._fastQueryDate = getTime();\n\n // Newer block number, use it\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n }\n\n async waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise {\n return this._waitForTransaction(transactionHash, (confirmations == null) ? 1: confirmations, timeout || 0, null);\n }\n\n async _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { data: string, from: string, nonce: number, to: string, value: BigNumber, startBlock: number }): Promise {\n const receipt = await this.getTransactionReceipt(transactionHash);\n\n // Receipt is already good\n if ((receipt ? receipt.confirmations: 0) >= confirmations) { return receipt; }\n\n // Poll until the receipt is good...\n return new Promise((resolve, reject) => {\n const cancelFuncs: Array<() => void> = [];\n\n let done = false;\n const alreadyDone = function() {\n if (done) { return true; }\n done = true;\n cancelFuncs.forEach((func) => { func(); });\n return false;\n };\n\n const minedHandler = (receipt: TransactionReceipt) => {\n if (receipt.confirmations < confirmations) { return; }\n if (alreadyDone()) { return; }\n resolve(receipt);\n }\n this.on(transactionHash, minedHandler);\n cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); });\n\n if (replaceable) {\n let lastBlockNumber = replaceable.startBlock;\n let scannedBlock: number = null;\n const replaceHandler = async (blockNumber: number) => {\n if (done) { return; }\n\n // Wait 1 second; this is only used in the case of a fault, so\n // we will trade off a little bit of latency for more consistent\n // results and fewer JSON-RPC calls\n await stall(1000);\n\n this.getTransactionCount(replaceable.from).then(async (nonce) => {\n if (done) { return; }\n\n if (nonce <= replaceable.nonce) {\n lastBlockNumber = blockNumber;\n\n } else {\n // First check if the transaction was mined\n {\n const mined = await this.getTransaction(transactionHash);\n if (mined && mined.blockNumber != null) { return; }\n }\n\n // First time scanning. We start a little earlier for some\n // wiggle room here to handle the eventually consistent nature\n // of blockchain (e.g. the getTransactionCount was for a\n // different block)\n if (scannedBlock == null) {\n scannedBlock = lastBlockNumber - 3;\n if (scannedBlock < replaceable.startBlock) {\n scannedBlock = replaceable.startBlock;\n }\n }\n\n while (scannedBlock <= blockNumber) {\n if (done) { return; }\n\n const block = await this.getBlockWithTransactions(scannedBlock);\n for (let ti = 0; ti < block.transactions.length; ti++) {\n const tx = block.transactions[ti];\n\n // Successfully mined!\n if (tx.hash === transactionHash) { return; }\n\n // Matches our transaction from and nonce; its a replacement\n if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) {\n if (done) { return; }\n\n // Get the receipt of the replacement\n const receipt = await this.waitForTransaction(tx.hash, confirmations);\n\n // Already resolved or rejected (prolly a timeout)\n if (alreadyDone()) { return; }\n\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\"\n }\n\n // Explain why we were replaced\n reject(logger.makeError(\"transaction was replaced\", Logger.errors.TRANSACTION_REPLACED, {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt\n }));\n\n return;\n }\n }\n scannedBlock++;\n }\n }\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n }, (error) => {\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n });\n };\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n cancelFuncs.push(() => {\n this.removeListener(\"block\", replaceHandler);\n });\n }\n\n if (typeof(timeout) === \"number\" && timeout > 0) {\n const timer = setTimeout(() => {\n if (alreadyDone()) { return; }\n reject(logger.makeError(\"timeout exceeded\", Logger.errors.TIMEOUT, { timeout: timeout }));\n }, timeout);\n if (timer.unref) { timer.unref(); }\n\n cancelFuncs.push(() => { clearTimeout(timer); });\n }\n });\n }\n\n async getBlockNumber(): Promise {\n return this._getInternalBlockNumber(0);\n }\n\n async getGasPrice(): Promise {\n await this.getNetwork();\n\n const result = await this.perform(\"getGasPrice\", { });\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result, error\n });\n }\n }\n\n async getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getBalance\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params, result, error\n });\n }\n }\n\n async getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getTransactionCount\", params);\n try {\n return BigNumber.from(result).toNumber();\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params, result, error\n });\n }\n }\n\n async getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getCode\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params, result, error\n });\n }\n }\n\n async getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then((p) => hexValue(p))\n });\n const result = await this.perform(\"getStorageAt\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params, result, error\n });\n }\n }\n\n // This should be called by any subclass wrapping a TransactionResponse\n _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse {\n if (hash != null && hexDataLength(hash) !== 32) { throw new Error(\"invalid response - sendTransaction\"); }\n\n const result = tx;\n\n // Check the hash we expect is the same as the hash the server reported\n if (hash != null && tx.hash !== hash) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });\n }\n\n result.wait = async (confirms?: number, timeout?: number) => {\n if (confirms == null) { confirms = 1; }\n if (timeout == null) { timeout = 0; }\n\n // Get the details to detect replacement\n let replacement = undefined;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n\n const receipt = await this._waitForTransaction(tx.hash, confirms, timeout, replacement);\n if (receipt == null && confirms === 0) { return null; }\n\n // No longer pending, allow the polling loop to garbage collect this\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt: receipt\n });\n }\n return receipt;\n };\n\n return result;\n }\n\n async sendTransaction(signedTransaction: string | Promise): Promise {\n await this.getNetwork();\n const hexTx = await Promise.resolve(signedTransaction).then(t => hexlify(t));\n const tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) { tx.confirmations = 0; }\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n try {\n const hash = await this.perform(\"sendTransaction\", { signedTransaction: hexTx });\n return this._wrapTransaction(tx, hash, blockNumber);\n } catch (error) {\n (error).transaction = tx;\n (error).transactionHash = tx.hash;\n throw error;\n }\n }\n\n async _getTransactionRequest(transaction: Deferrable): Promise {\n const values: any = await transaction;\n\n const tx: any = { };\n\n [\"from\", \"to\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v): null))\n });\n\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v): null));\n });\n\n [\"type\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v: null));\n });\n\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n\n [\"data\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v): null));\n });\n\n return this.formatter.transactionRequest(await resolveProperties(tx));\n }\n\n async _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise {\n filter = await filter;\n\n const result: any = { };\n\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n\n [\"blockHash\", \"topics\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = (filter)[key];\n });\n\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = this._getBlockTag((filter)[key]);\n });\n\n return this.formatter.filter(await resolveProperties(result));\n }\n\n async call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"call\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params, result, error\n });\n }\n }\n\n async estimateGas(transaction: Deferrable): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction)\n });\n\n const result = await this.perform(\"estimateGas\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params, result, error\n });\n }\n }\n\n async _getAddress(addressOrName: string | Promise): Promise {\n addressOrName = await addressOrName;\n if (typeof(addressOrName) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n\n const address = await this.resolveName(addressOrName);\n if (address == null) {\n logger.throwError(\"ENS name not configured\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `resolveName(${ JSON.stringify(addressOrName) })`\n });\n }\n return address;\n }\n\n async _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise {\n await this.getNetwork();\n\n blockHashOrBlockTag = await blockHashOrBlockTag;\n\n // If blockTag is a number (not \"latest\", etc), this is the block number\n let blockNumber = -128;\n\n const params: { [key: string]: any } = {\n includeTransactions: !!includeTransactions\n };\n\n if (isHexString(blockHashOrBlockTag, 32)) {\n params.blockHash = blockHashOrBlockTag;\n } else {\n try {\n params.blockTag = await this._getBlockTag(blockHashOrBlockTag);\n if (isHexString(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n } catch (error) {\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n }\n }\n\n return poll(async () => {\n const block = await this.perform(\"getBlock\", params);\n\n // Block was not found\n if (block == null) {\n\n // For blockhashes, if we didn't say it existed, that blockhash may\n // not exist. If we did see it though, perhaps from a log, we know\n // it exists, and this node is just not caught up yet.\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) { return null; }\n }\n\n // For block tags, if we are asking for a future block, we return null\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) { return null; }\n }\n\n // Retry on the next block\n return undefined;\n }\n\n // Add transactions\n if (includeTransactions) {\n let blockNumber: number = null;\n for (let i = 0; i < block.transactions.length; i++) {\n const tx = block.transactions[i];\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n if (blockNumber == null) {\n blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n }\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n }\n\n const blockWithTxs: any = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map((tx: TransactionResponse) => this._wrapTransaction(tx));\n return blockWithTxs;\n }\n\n return this.formatter.block(block);\n\n }, { oncePoll: this });\n }\n\n getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, false));\n }\n\n getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, true));\n }\n\n async getTransaction(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransaction\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n const tx = this.formatter.transactionResponse(result);\n\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n\n return this._wrapTransaction(tx);\n }, { oncePoll: this });\n }\n\n async getTransactionReceipt(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransactionReceipt\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n // \"geth-etc\" returns receipts before they are ready\n if (result.blockHash == null) { return undefined; }\n\n const receipt = this.formatter.receipt(result);\n\n if (receipt.blockNumber == null) {\n receipt.confirmations = 0;\n\n } else if (receipt.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - receipt.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n receipt.confirmations = confirmations;\n }\n\n return receipt;\n }, { oncePoll: this });\n }\n\n async getLogs(filter: Filter | FilterByBlockHash | Promise): Promise> {\n await this.getNetwork();\n const params = await resolveProperties({ filter: this._getFilter(filter) });\n const logs: Array = await this.perform(\"getLogs\", params);\n logs.forEach((log) => {\n if (log.removed == null) { log.removed = false; }\n });\n return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs);\n }\n\n async getEtherPrice(): Promise {\n await this.getNetwork();\n return this.perform(\"getEtherPrice\", { });\n }\n\n async _getBlockTag(blockTag: BlockTag | Promise): Promise {\n blockTag = await blockTag;\n\n if (typeof(blockTag) === \"number\" && blockTag < 0) {\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n\n let blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n blockNumber += blockTag;\n if (blockNumber < 0) { blockNumber = 0; }\n return this.formatter.blockTag(blockNumber)\n }\n\n return this.formatter.blockTag(blockTag);\n }\n\n\n async getResolver(name: string): Promise {\n try {\n const address = await this._getResolver(name);\n if (address == null) { return null; }\n return new Resolver(this, address, name);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n async _getResolver(name: string): Promise {\n // Get the resolver from the blockchain\n const network = await this.getNetwork();\n\n // No ENS...\n if (!network.ensAddress) {\n logger.throwError(\n \"network does not support ENS\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // keccak256(\"resolver(bytes32)\")\n const transaction = {\n to: network.ensAddress,\n data: (\"0x0178b8bf\" + namehash(name).substring(2))\n };\n\n try {\n return this.formatter.callAddress(await this.call(transaction));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n async resolveName(name: string | Promise): Promise {\n name = await name;\n\n // If it is already an address, nothing to resolve\n try {\n return Promise.resolve(this.formatter.address(name));\n } catch (error) {\n // If is is a hexstring, the address is bad (See #694)\n if (isHexString(name)) { throw error; }\n }\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n\n // Get the addr from the resovler\n const resolver = await this.getResolver(name);\n if (!resolver) { return null; }\n\n return await resolver.getAddress();\n }\n\n async lookupAddress(address: string | Promise): Promise {\n address = await address;\n address = this.formatter.address(address);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n // keccak(\"name(bytes32)\")\n let bytes = arrayify(await this.call({\n to: resolverAddress,\n data: (\"0x691f3431\" + namehash(reverseName).substring(2))\n }));\n\n // Strip off the dynamic string pointer (0x20)\n if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { return null; }\n bytes = bytes.slice(32);\n\n // Not a length-prefixed string\n if (bytes.length < 32) { return null; }\n\n // Get the length of the string (from the length-prefix)\n const length = BigNumber.from(bytes.slice(0, 32)).toNumber();\n bytes = bytes.slice(32);\n\n // Length longer than available data\n if (length > bytes.length) { return null; }\n\n const name = toUtf8String(bytes.slice(0, length));\n\n // Make sure the reverse record matches the foward record\n const addr = await this.resolveName(name);\n if (addr != address) { return null; }\n\n return name;\n }\n\n async getAvatar(nameOrAddress: string): Promise {\n let resolver: Resolver = null;\n if (isHexString(nameOrAddress)) {\n // Address; reverse lookup\n const address = this.formatter.address(nameOrAddress);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n resolver = new Resolver(this, resolverAddress, \"_\", address);\n\n } else {\n // ENS name; forward lookup\n resolver = await this.getResolver(nameOrAddress);\n if (!resolver) { return null; }\n }\n\n const avatar = await resolver.getAvatar();\n if (avatar == null) { return null; }\n\n return avatar.url;\n }\n\n perform(method: string, params: any): Promise {\n return logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n\n _startEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _stopEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _addEventListener(eventName: EventType, listener: Listener, once: boolean): this {\n const event = new Event(getEventTag(eventName), listener, once)\n this._events.push(event);\n this._startEvent(event);\n\n return this;\n }\n\n on(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n once(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n\n emit(eventName: EventType, ...args: Array): boolean {\n let result = false;\n\n let stopped: Array = [ ];\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n\n setTimeout(() => {\n event.listener.apply(this, args);\n }, 0);\n\n result = true;\n\n if (event.once) {\n stopped.push(event);\n return false;\n }\n\n return true;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return result;\n }\n\n listenerCount(eventName?: EventType): number {\n if (!eventName) { return this._events.length; }\n\n let eventTag = getEventTag(eventName);\n return this._events.filter((event) => {\n return (event.tag === eventTag);\n }).length;\n }\n\n listeners(eventName?: EventType): Array {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n\n let eventTag = getEventTag(eventName);\n return this._events\n .filter((event) => (event.tag === eventTag))\n .map((event) => event.listener);\n }\n\n off(eventName: EventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [ ];\n\n let found = false;\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag || event.listener != listener) { return true; }\n if (found) { return true; }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n\n removeAllListeners(eventName?: EventType): this {\n let stopped: Array = [ ];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [ ];\n } else {\n const eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n}\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/JSON-RPC\n\nimport { Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Bytes, hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { checkProperties, deepCopy, Deferrable, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { AccessList, accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson, poll } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider, Event } from \"./base-provider\";\n\n\nconst errorGas = [ \"call\", \"estimateGas\" ];\n\nfunction checkError(method: string, error: any, params: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n if (e && e.message.match(\"reverted\") && isHexString(e.data)) {\n return e.data;\n }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n\n const transaction = params.transaction || params.signedTransaction;\n\n // \"insufficient funds for gas * price + value + cost(data)\"\n if (message.match(/insufficient funds|base fee exceeds gas limit/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"nonce too low\"\n if (message.match(/nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction underpriced/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/only replay-protected/)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", Logger.errors.UNSUPPORTED_OPERATION, {\n error, method, transaction\n });\n }\n\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nfunction timer(timeout: number): Promise {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n}\n\nfunction getResult(payload: { error?: { code?: number, data?: any, message?: string }, result?: any }): any {\n if (payload.error) {\n // @TODO: not any\n const error: any = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n\n return payload.result;\n}\n\nfunction getLowerCase(value: string): string {\n if (value) { return value.toLowerCase(); }\n return value;\n}\n\nconst _constructorGuard = {};\n\nexport class JsonRpcSigner extends Signer implements TypedDataSigner {\n readonly provider: JsonRpcProvider;\n _index: number;\n _address: string;\n\n constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number) {\n logger.checkNew(new.target, JsonRpcSigner);\n\n super();\n\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n\n defineReadOnly(this, \"provider\", provider);\n\n if (addressOrIndex == null) { addressOrIndex = 0; }\n\n if (typeof(addressOrIndex) === \"string\") {\n defineReadOnly(this, \"_address\", this.provider.formatter.address(addressOrIndex));\n defineReadOnly(this, \"_index\", null);\n\n } else if (typeof(addressOrIndex) === \"number\") {\n defineReadOnly(this, \"_index\", addressOrIndex);\n defineReadOnly(this, \"_address\", null);\n\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n }\n\n connect(provider: Provider): JsonRpcSigner {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n }\n\n connectUnchecked(): JsonRpcSigner {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n }\n\n getAddress(): Promise {\n if (this._address) {\n return Promise.resolve(this._address);\n }\n\n return this.provider.send(\"eth_accounts\", []).then((accounts) => {\n if (accounts.length <= this._index) {\n logger.throwError(\"unknown account #\" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return this.provider.formatter.address(accounts[this._index])\n });\n }\n\n sendUncheckedTransaction(transaction: Deferrable): Promise {\n transaction = shallowCopy(transaction);\n\n const fromAddress = this.getAddress().then((address) => {\n if (address) { address = address.toLowerCase(); }\n return address;\n });\n\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (transaction.gasLimit == null) {\n const estimate = shallowCopy(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.provider.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n }\n\n return resolveProperties({\n tx: resolveProperties(transaction),\n sender: fromAddress\n }).then(({ tx, sender }) => {\n\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n\n const hexTx = (this.provider.constructor).hexlifyTransaction(tx, { from: true });\n\n return this.provider.send(\"eth_sendTransaction\", [ hexTx ]).then((hash) => {\n return hash;\n }, (error) => {\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return logger.throwError(\"signing transactions is unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n }\n\n async sendTransaction(transaction: Deferrable): Promise {\n // This cannot be mined any earlier than any recent block\n const blockNumber = await this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval);\n\n // Send the transaction\n const hash = await this.sendUncheckedTransaction(transaction);\n\n try {\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return await poll(async () => {\n const tx = await this.provider.getTransaction(hash);\n if (tx === null) { return undefined; }\n return this.provider._wrapTransaction(tx, hash, blockNumber);\n }, { oncePoll: this.provider });\n } catch (error) {\n (error).transactionHash = hash;\n throw error;\n }\n }\n\n async signMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n return await this.provider.send(\"personal_sign\", [ hexlify(data), address.toLowerCase() ]);\n }\n\n async _legacySignMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n return await this.provider.send(\"eth_sign\", [ address.toLowerCase(), hexlify(data) ]);\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names (in-place)\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n return this.provider.resolveName(name);\n });\n\n const address = await this.getAddress();\n\n return await this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n\n async unlock(password: string): Promise {\n const provider = this.provider;\n\n const address = await this.getAddress();\n\n return provider.send(\"personal_unlockAccount\", [ address.toLowerCase(), password, null ]);\n }\n}\n\nclass UncheckedJsonRpcSigner extends JsonRpcSigner {\n sendTransaction(transaction: Deferrable): Promise {\n return this.sendUncheckedTransaction(transaction).then((hash) => {\n return {\n hash: hash,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: (confirmations?: number) => { return this.provider.waitForTransaction(hash, confirmations); }\n };\n });\n }\n}\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true\n}\n\nexport class JsonRpcProvider extends BaseProvider {\n readonly connection: ConnectionInfo;\n\n _pendingFilter: Promise;\n _nextId: number;\n\n // During any given event loop, the results for a given call will\n // all be the same, so we can dedup the calls to save requests and\n // bandwidth. @TODO: Try out generalizing this against send?\n _eventLoopCache: Record>;\n get _cache(): Record> {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = { };\n }\n return this._eventLoopCache;\n }\n\n constructor(url?: ConnectionInfo | string, network?: Networkish) {\n logger.checkNew(new.target, JsonRpcProvider);\n\n let networkOrReady: Networkish | Promise = network;\n\n // The network is unknown, query the JSON-RPC for it\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then((network) => {\n resolve(network);\n }, (error) => {\n reject(error);\n });\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Default URL\n if (!url) { url = getStatic<() => string>(this.constructor, \"defaultUrl\")(); }\n\n if (typeof(url) === \"string\") {\n defineReadOnly(this, \"connection\",Object.freeze({\n url: url\n }));\n } else {\n defineReadOnly(this, \"connection\", Object.freeze(shallowCopy(url)));\n }\n\n this._nextId = 42;\n }\n\n static defaultUrl(): string {\n return \"http:/\\/localhost:8545\";\n }\n\n detectNetwork(): Promise {\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n\n // Clear this cache at the beginning of the next event loop\n setTimeout(() => {\n this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n }\n\n async _uncachedDetectNetwork(): Promise {\n await timer(0);\n\n let chainId = null;\n try {\n chainId = await this.send(\"eth_chainId\", [ ]);\n } catch (error) {\n try {\n chainId = await this.send(\"net_version\", [ ]);\n } catch (error) { }\n }\n\n if (chainId != null) {\n const getNetwork = getStatic<(network: Networkish) => Network>(this.constructor, \"getNetwork\");\n try {\n return getNetwork(BigNumber.from(chainId).toNumber());\n } catch (error) {\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n chainId: chainId,\n event: \"invalidNetwork\",\n serverError: error\n });\n }\n }\n\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n });\n }\n\n getSigner(addressOrIndex?: string | number): JsonRpcSigner {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n }\n\n getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner {\n return this.getSigner(addressOrIndex).connectUnchecked();\n }\n\n listAccounts(): Promise> {\n return this.send(\"eth_accounts\", []).then((accounts: Array) => {\n return accounts.map((a) => this.formatter.address(a));\n });\n }\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n\n // We can expand this in the future to any call, but for now these\n // are the biggest wins and do not require any serializing parameters.\n const cache = ([ \"eth_chainId\", \"eth_blockNumber\" ].indexOf(method) >= 0);\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n\n const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n return result;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n throw error;\n });\n\n // Cache the fetch, but clear it on the next event loop\n if (cache) {\n this._cache[method] = result;\n setTimeout(() => {\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n\n prepareRequest(method: string, params: any): [ string, Array ] {\n switch (method) {\n case \"getBlockNumber\":\n return [ \"eth_blockNumber\", [] ];\n\n case \"getGasPrice\":\n return [ \"eth_gasPrice\", [] ];\n\n case \"getBalance\":\n return [ \"eth_getBalance\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getTransactionCount\":\n return [ \"eth_getTransactionCount\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getCode\":\n return [ \"eth_getCode\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getStorageAt\":\n return [ \"eth_getStorageAt\", [ getLowerCase(params.address), params.position, params.blockTag ] ];\n\n case \"sendTransaction\":\n return [ \"eth_sendRawTransaction\", [ params.signedTransaction ] ]\n\n case \"getBlock\":\n if (params.blockTag) {\n return [ \"eth_getBlockByNumber\", [ params.blockTag, !!params.includeTransactions ] ];\n } else if (params.blockHash) {\n return [ \"eth_getBlockByHash\", [ params.blockHash, !!params.includeTransactions ] ];\n }\n return null;\n\n case \"getTransaction\":\n return [ \"eth_getTransactionByHash\", [ params.transactionHash ] ];\n\n case \"getTransactionReceipt\":\n return [ \"eth_getTransactionReceipt\", [ params.transactionHash ] ];\n\n case \"call\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_call\", [ hexlifyTransaction(params.transaction, { from: true }), params.blockTag ] ];\n }\n\n case \"estimateGas\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_estimateGas\", [ hexlifyTransaction(params.transaction, { from: true }) ] ];\n }\n\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [ \"eth_getLogs\", [ params.filter ] ];\n\n default:\n break;\n }\n\n return null;\n }\n\n async perform(method: string, params: any): Promise {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (method === \"call\" || method === \"estimateGas\") {\n const tx = params.transaction;\n if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {\n // If there are no EIP-1559 properties, it might be non-EIP-a559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n params = shallowCopy(params);\n params.transaction = shallowCopy(tx);\n delete params.transaction.type;\n }\n }\n }\n }\n\n const args = this.prepareRequest(method, params);\n\n if (args == null) {\n logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n try {\n return await this.send(args[0], args[1])\n } catch (error) {\n return checkError(method, error, params);\n }\n }\n\n _startEvent(event: Event): void {\n if (event.tag === \"pending\") { this._startPending(); }\n super._startEvent(event);\n }\n\n _startPending(): void {\n if (this._pendingFilter != null) { return; }\n const self = this;\n\n const pendingFilter: Promise = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n\n pendingFilter.then(function(filterId) {\n function poll() {\n self.send(\"eth_getFilterChanges\", [ filterId ]).then(function(hashes: Array) {\n if (self._pendingFilter != pendingFilter) { return null; }\n\n let seq = Promise.resolve();\n hashes.forEach(function(hash) {\n // @TODO: This should be garbage collected at some point... How? When?\n self._emitted[\"t:\" + hash.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self.getTransaction(hash).then(function(tx) {\n self.emit(\"pending\", tx);\n return null;\n });\n });\n });\n\n return seq.then(function() {\n return timer(1000);\n });\n }).then(function() {\n if (self._pendingFilter != pendingFilter) {\n self.send(\"eth_uninstallFilter\", [ filterId ]);\n return;\n }\n setTimeout(function() { poll(); }, 0);\n\n return null;\n }).catch((error: Error) => { });\n }\n poll();\n\n return filterId;\n }).catch((error: Error) => { });\n }\n\n _stopEvent(event: Event): void {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n super._stopEvent(event);\n }\n\n // Convert an ethers.js transaction into a JSON-RPC transaction\n // - gasLimit => gas\n // - All values hexlified\n // - All numeric values zero-striped\n // - All addresses are lowercased\n // NOTE: This allows a TransactionRequest, but all values should be resolved\n // before this is called\n // @TODO: This will likely be removed in future versions and prepareRequest\n // will be the preferred method for this.\n static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { [key: string]: boolean }): { [key: string]: string | AccessList } {\n // Check only allowed properties are given\n const allowed = shallowCopy(allowedTransactionKeys);\n if (allowExtra) {\n for (const key in allowExtra) {\n if (allowExtra[key]) { allowed[key] = true; }\n }\n }\n\n checkProperties(transaction, allowed);\n\n const result: { [key: string]: string | AccessList } = {};\n\n // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros.\n [\"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n const value = hexValue((transaction)[key]);\n if (key === \"gasLimit\") { key = \"gas\"; }\n result[key] = value;\n });\n\n [\"from\", \"to\", \"data\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n result[key] = hexlify((transaction)[key]);\n });\n\n if ((transaction).accessList) {\n result[\"accessList\"] = accessListify((transaction).accessList);\n }\n\n return result;\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nlet WS: any = null;\n\ntry {\n WS = (WebSocket as any);\n if (WS == null) { throw new Error(\"inject please\"); }\n} catch (error) {\n const logger = new Logger(version);\n WS = function() {\n logger.throwError(\"WebSockets not supported in this environment\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n }\n}\n//export default WS;\n//module.exports = WS;\nexport { WS as WebSocket };\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Event } from \"./base-provider\";\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\nimport { WebSocket } from \"./ws\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n/**\n * Notes:\n *\n * This provider differs a bit from the polling providers. One main\n * difference is how it handles consistency. The polling providers\n * will stall responses to ensure a consistent state, while this\n * WebSocket provider assumes the connected backend will manage this.\n *\n * For example, if a polling provider emits an event which indicates\n * the event occurred in blockhash XXX, a call to fetch that block by\n * its hash XXX, if not present will retry until it is present. This\n * can occur when querying a pool of nodes that are mildly out of sync\n * with each other.\n */\n\nlet NextId = 1;\n\nexport type InflightRequest = {\n callback: (error: Error, result: any) => void;\n payload: string;\n};\n\nexport type Subscription = {\n tag: string;\n processFunc: (payload: any) => void;\n};\n\n\n// For more info about the Real-time Event API see:\n// https://geth.ethereum.org/docs/rpc/pubsub\n\nexport class WebSocketProvider extends JsonRpcProvider {\n readonly _websocket: any;\n readonly _requests: { [ name: string ]: InflightRequest };\n readonly _detectNetwork: Promise;\n\n // Maps event tag to subscription ID (we dedupe identical events)\n readonly _subIds: { [ tag: string ]: Promise };\n\n // Maps Subscription ID to Subscription\n readonly _subs: { [ name: string ]: Subscription };\n\n _wsReady: boolean;\n\n constructor(url: string, network?: Networkish) {\n // This will be added in the future; please open an issue to expedite\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n\n super(url, network);\n this._pollingInterval = -1;\n\n this._wsReady = false;\n\n defineReadOnly(this, \"_websocket\", new WebSocket(this.connection.url));\n defineReadOnly(this, \"_requests\", { });\n defineReadOnly(this, \"_subs\", { });\n defineReadOnly(this, \"_subIds\", { });\n defineReadOnly(this, \"_detectNetwork\", super.detectNetwork());\n\n // Stall sending requests until the socket is open...\n this._websocket.onopen = () => {\n this._wsReady = true;\n Object.keys(this._requests).forEach((id) => {\n this._websocket.send(this._requests[id].payload);\n });\n };\n\n this._websocket.onmessage = (messageEvent: { data: string }) => {\n const data = messageEvent.data;\n const result = JSON.parse(data);\n if (result.id != null) {\n const id = String(result.id);\n const request = this._requests[id];\n delete this._requests[id];\n\n if (result.result !== undefined) {\n request.callback(null, result.result);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: this\n });\n\n } else {\n let error: Error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n defineReadOnly(error, \"code\", result.error.code || null);\n defineReadOnly(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n\n request.callback(error, undefined);\n\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: JSON.parse(request.payload),\n provider: this\n });\n\n }\n\n } else if (result.method === \"eth_subscription\") {\n // Subscription...\n const sub = this._subs[result.params.subscription];\n if (sub) {\n //this.emit.apply(this, );\n sub.processFunc(result.params.result)\n }\n\n } else {\n console.warn(\"this should not happen\");\n }\n };\n\n // This Provider does not actually poll, but we want to trigger\n // poll events for things that depend on them (like stalling for\n // block and transaction lookups)\n const fauxPoll = setInterval(() => {\n this.emit(\"poll\");\n }, 1000);\n if (fauxPoll.unref) { fauxPoll.unref(); }\n }\n\n detectNetwork(): Promise {\n return this._detectNetwork;\n }\n\n get pollingInterval(): number {\n return 0;\n }\n\n resetEventsBlock(blockNumber: number): void {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n }\n\n set pollingInterval(value: number) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n }\n\n async poll(): Promise {\n return null;\n }\n\n set polling(value: boolean) {\n if (!value) { return; }\n\n logger.throwError(\"cannot set polling on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n }\n\n send(method: string, params?: Array): Promise {\n const rid = NextId++;\n\n return new Promise((resolve, reject) => {\n function callback(error: Error, result: any) {\n if (error) { return reject(error); }\n return resolve(result);\n }\n\n const payload = JSON.stringify({\n method: method,\n params: params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n\n this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: this\n });\n\n this._requests[String(rid)] = { callback, payload };\n\n if (this._wsReady) { this._websocket.send(payload); }\n });\n }\n\n static defaultUrl(): string {\n return \"ws:/\\/localhost:8546\";\n }\n\n async _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise {\n let subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then((param) => {\n return this.send(\"eth_subscribe\", param);\n });\n this._subIds[tag] = subIdPromise;\n }\n const subId = await subIdPromise;\n this._subs[subId] = { tag, processFunc };\n }\n\n _startEvent(event: Event): void {\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [ \"newHeads\" ], (result: any) => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit(\"block\", blockNumber);\n });\n break;\n\n case \"pending\":\n this._subscribe(\"pending\", [ \"newPendingTransactions\" ], (result: any) => {\n this.emit(\"pending\", result);\n });\n break;\n\n case \"filter\":\n this._subscribe(event.tag, [ \"logs\", this._getFilter(event.filter) ], (result: any) => {\n if (result.removed == null) { result.removed = false; }\n this.emit(event.filter, this.formatter.filterLog(result));\n });\n break;\n\n case \"tx\": {\n const emitReceipt = (event: Event) => {\n const hash = event.hash;\n this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt) { return; }\n this.emit(hash, receipt);\n });\n };\n\n // In case it is already mined\n emitReceipt(event);\n\n // To keep things simple, we start up a single newHeads subscription\n // to keep an eye out for transactions we are watching for.\n // Starting a subscription for an event (i.e. \"tx\") that is already\n // running is (basically) a nop.\n this._subscribe(\"tx\", [ \"newHeads\" ], (result: any) => {\n this._events.filter((e) => (e.type === \"tx\")).forEach(emitReceipt);\n });\n break;\n }\n\n // Nothing is needed\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n }\n\n _stopEvent(event: Event): void {\n let tag = event.tag;\n\n if (event.type === \"tx\") {\n // There are remaining transaction event listeners\n if (this._events.filter((e) => (e.type === \"tx\")).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n // There are remaining event listeners\n return;\n }\n\n const subId = this._subIds[tag];\n if (!subId) { return; }\n\n delete this._subIds[tag];\n subId.then((subId) => {\n if (!this._subs[subId]) { return; }\n delete this._subs[subId];\n this.send(\"eth_unsubscribe\", [ subId ]);\n });\n }\n\n async destroy(): Promise {\n // Wait until we have connected before trying to disconnect\n if (this._websocket.readyState === WebSocket.CONNECTING) {\n await (new Promise((resolve) => {\n this._websocket.onopen = function() {\n resolve(true);\n };\n\n this._websocket.onerror = function() {\n resolve(false);\n };\n }));\n }\n\n // Hangup\n // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes\n this._websocket.close(1000);\n }\n}\n","\n\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly, getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { CommunityResourcable } from \"./formatter\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\n\ntype getUrlFunc = (network: Network, apiKey: string) => string | ConnectionInfo;\n\n// A StaticJsonRpcProvider is useful when you *know* for certain that\n// the backend will never change, as it never calls eth_chainId to\n// verify its backend. However, if the backend does change, the effects\n// are undefined and may include:\n// - inconsistent results\n// - locking up the UI\n// - block skew warnings\n// - wrong results\n// If the network is not explicit (i.e. auto-detection is expected), the\n// node MUST be running and available to respond to requests BEFORE this\n// is instantiated.\nexport class StaticJsonRpcProvider extends JsonRpcProvider {\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // If still not set, set it\n if (this._network == null) {\n // A static network does not support \"any\"\n defineReadOnly(this, \"_network\", network);\n\n this.emit(\"network\", network, null);\n }\n }\n return network;\n }\n}\n\nexport abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable {\n readonly apiKey: any;\n\n constructor(network?: Networkish, apiKey?: any) {\n logger.checkAbstract(new.target, UrlJsonRpcProvider);\n\n // Normalize the Network and API Key\n network = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n apiKey = getStatic<(apiKey: string) => string>(new.target, \"getApiKey\")(apiKey);\n\n const connection = getStatic(new.target, \"getUrl\")(network, apiKey);\n\n super(connection, network);\n\n if (typeof(apiKey) === \"string\") {\n defineReadOnly(this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach((key) => {\n defineReadOnly(this, key, apiKey[key]);\n });\n }\n }\n\n _startPending(): void {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n }\n\n isCommunityResource(): boolean {\n return false;\n }\n\n getSigner(address?: string): JsonRpcSigner {\n return logger.throwError(\n \"API provider does not support signing\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"getSigner\" }\n );\n }\n\n listAccounts(): Promise> {\n return Promise.resolve([]);\n }\n\n // Return a defaultApiKey if null, otherwise validate the API key\n static getApiKey(apiKey: any): any {\n return apiKey;\n }\n\n // Returns the url or connection for the given network and API key. The\n // API key will have been sanitized by the getApiKey first, so any validation\n // or transformations can be done there.\n static getUrl(network: Network, apiKey: any): string | ConnectionInfo {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\nimport { WebSocketProvider } from \"./websocket-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// This key was provided to ethers.js by Alchemy to be used by the\n// default provider, but it is recommended that for your own\n// production environments, that you acquire your own API key at:\n// https://dashboard.alchemyapi.io\n\nconst defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\"\n\nexport class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new AlchemyProvider(network, apiKey);\n\n const url = provider.connection.url.replace(/^http/i, \"ws\")\n .replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n\n super(url, provider.network);\n defineReadOnly(this, \"apiKey\", provider.apiKey);\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n\nexport class AlchemyProvider extends UrlJsonRpcProvider {\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider {\n return new AlchemyWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n if (apiKey == null) { return defaultApiKey; }\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n }\n\n static getUrl(network: Network, apiKey: string): ConnectionInfo {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.alchemyapi.io/v2/\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.alchemyapi.io/v2/\";\n break;\n case \"kovan\":\n host = \"eth-kovan.alchemyapi.io/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arb-rinkeby.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-kovan\":\n host = \"opt-kovan.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + apiKey),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey === defaultApiKey) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport class CloudflareProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return host;\n }\n\n async perform(method: string, params: any): Promise {\n // The Cloudflare provider does not support eth_blockNumber,\n // so we get the latest block and pull it from that\n if (method === \"getBlockNumber\") {\n const block = await super.perform(\"getBlock\", { blockTag: \"latest\" });\n return block.number;\n }\n\n return super.perform(method, params);\n }\n}\n","\"use strict\";\n\nimport { BlockTag, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\nimport { accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson } from \"@ethersproject/web\";\n\nimport { showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider } from \"./base-provider\";\n\n\n// The transaction has already been sanitized by the calls in Provider\nfunction getTransactionPostData(transaction: TransactionRequest): Record {\n const result: Record = { };\n for (let key in transaction) {\n if ((transaction)[key] == null) { continue; }\n let value = (transaction)[key];\n if (key === \"type\" && value === 0) { continue; }\n\n // Quantity-types require no leading zero, unless 0\n if (({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true })[key]) {\n value = hexValue(hexlify(value));\n } else if (key === \"accessList\") {\n value = \"[\" + accessListify(value).map((set) => {\n return `{address:\"${ set.address }\",storageKeys:[\"${ set.storageKeys.join('\",\"') }\"]}`;\n }).join(\",\") + \"]\";\n } else {\n value = hexlify(value);\n }\n result[key] = value;\n }\n return result;\n}\n\nfunction getResult(result: { status?: number, message?: string, result?: any }): any {\n // getLogs, getHistory have weird success responses\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n\n if (result.status != 1 || result.message != \"OK\") {\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n\n return result.result;\n}\n\nfunction getJsonResult(result: { jsonrpc: string, result?: any, error?: { code?: number, data?: any, message?: string} } ): any {\n // This response indicates we are being throttled\n if (result && (result).status == 0 && (result).message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n const error: any = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n\n if (result.jsonrpc != \"2.0\") {\n // @TODO: not any\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n\n if (result.error) {\n // @TODO: not any\n const error: any = new Error(result.error.message || \"unknown error\");\n if (result.error.code) { error.code = result.error.code; }\n if (result.error.data) { error.data = result.error.data; }\n throw error;\n }\n\n return result.result;\n}\n\n// The blockTag was normalized as a string by the Provider pre-perform operations\nfunction checkLogTag(blockTag: string): number | \"latest\" {\n if (blockTag === \"pending\") { throw new Error(\"pending not supported\"); }\n if (blockTag === \"latest\") { return blockTag; }\n\n return parseInt(blockTag.substring(2), 16);\n}\n\n\nconst defaultApiKey = \"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB\";\n\nfunction checkError(method: string, error: any, transaction: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n\n // Etherscan keeps changing their string\n if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) {\n // Etherscan prefixes the data like \"Reverted 0x1234\"\n let data = e.data;\n if (data) { data = \"0x\" + data.replace(/^.*0x/i, \"\"); }\n\n if (isHexString(data)) { return data; }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n }\n\n // Get the message from any nested error structure\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR) {\n if (error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n\n // \"Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0\"\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"Transaction with the same hash was already imported.\"\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.\"\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nexport class EtherscanProvider extends BaseProvider{\n readonly baseUrl: string;\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: string) {\n logger.checkNew(new.target, EtherscanProvider);\n\n super(network);\n\n defineReadOnly(this, \"baseUrl\", this.getBaseUrl());\n defineReadOnly(this, \"apiKey\", apiKey || defaultApiKey);\n }\n\n getBaseUrl(): string {\n switch(this.network ? this.network.name: \"invalid\") {\n case \"homestead\":\n return \"https:/\\/api.etherscan.io\";\n case \"ropsten\":\n return \"https:/\\/api-ropsten.etherscan.io\";\n case \"rinkeby\":\n return \"https:/\\/api-rinkeby.etherscan.io\";\n case \"kovan\":\n return \"https:/\\/api-kovan.etherscan.io\";\n case \"goerli\":\n return \"https:/\\/api-goerli.etherscan.io\";\n default:\n }\n\n return logger.throwArgumentError(\"unsupported network\", \"network\", name);\n }\n\n getUrl(module: string, params: Record): string {\n const query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${ key }=${ value }`\n }\n return accum\n }, \"\");\n const apiKey = ((this.apiKey) ? `&apikey=${ this.apiKey }`: \"\");\n return `${ this.baseUrl }/api?module=${ module }${ query }${ apiKey }`;\n }\n\n getPostUrl(): string {\n return `${ this.baseUrl }/api`;\n }\n\n getPostData(module: string, params: Record): Record {\n params.module = module;\n params.apikey = this.apiKey;\n return params;\n }\n\n async fetch(module: string, params: Record, post?: boolean): Promise {\n const url = (post ? this.getPostUrl(): this.getUrl(module, params));\n const payload = (post ? this.getPostData(module, params): null);\n const procFunc = (module === \"proxy\") ? getJsonResult: getResult;\n\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n\n const connection: ConnectionInfo = {\n url: url,\n throttleSlotInterval: 1000,\n throttleCallback: (attempt: number, url: string) => {\n if (this.isCommunityResource()) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n let payloadStr: string = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map((key) => {\n return `${ key }=${ payload[key] }`\n }).join(\"&\");\n }\n\n const result = await fetchJson(connection, payloadStr, procFunc || getJsonResult);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: deepCopy(result),\n provider: this\n });\n\n return result;\n }\n\n async detectNetwork(): Promise {\n return this.network;\n }\n\n async perform(method: string, params: any): Promise {\n\n switch (method) {\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n\n case \"getBalance\":\n // Returns base-10 result\n return this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getStorageAt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n });\n\n case \"sendTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch((error) => {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n });\n\n case \"getBlock\":\n if (params.blockTag) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: (params.includeTransactions ? \"true\": \"false\")\n });\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n });\n\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n });\n\n case \"call\": {\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"call\", error, params.transaction);\n }\n }\n\n case \"estimateGas\": {\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"estimateGas\", error, params.transaction);\n }\n }\n\n case \"getLogs\": {\n const args: Record = { action: \"getLogs\" }\n\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n\n // @TODO: We can handle slightly more complicated logs using the logs API\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n\n if (params.filter.topics.length === 1) {\n const topic0 = params.filter.topics[0];\n if (typeof(topic0) !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 });\n }\n args.topic0 = topic0;\n }\n }\n\n const logs: Array = await this.fetch(\"logs\", args);\n\n // Cache txHash => blockHash\n let blocks: { [tag: string]: string } = {};\n\n // Add any missing blockHash to the logs\n for (let i = 0; i < logs.length; i++) {\n const log = logs[i];\n if (log.blockHash != null) { continue; }\n if (blocks[log.blockNumber] == null) {\n const block = await this.getBlock(log.blockNumber);\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n }\n log.blockHash = blocks[log.blockNumber];\n }\n\n return logs;\n }\n\n case \"getEtherPrice\":\n if (this.network.name !== \"homestead\") { return 0.0; }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n\n default:\n break;\n }\n\n return super.perform(method, params);\n }\n\n // Note: The `page` page parameter only allows pagination within the\n // 10,000 window available without a page and offset parameter\n // Error: Result window is too large, PageNo x Offset size must\n // be less than or equal to 10000\n async getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise> {\n const params = {\n action: \"txlist\",\n address: (await this.resolveName(addressOrName)),\n startblock: ((startBlock == null) ? 0: startBlock),\n endblock: ((endBlock == null) ? 99999999: endBlock),\n sort: \"asc\"\n };\n\n const result = await this.fetch(\"account\", params);\n\n return result.map((tx: any) => {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") { delete tx[key]; }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n const item = this.formatter.transactionResponse(tx);\n if (tx.timeStamp) { item.timestamp = parseInt(tx.timeStamp); }\n return item;\n });\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Block, BlockWithTransactions, Provider } from \"@ethersproject/abstract-provider\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\nimport { shuffled } from \"@ethersproject/random\";\nimport { poll } from \"@ethersproject/web\";\n\nimport { BaseProvider } from \"./base-provider\";\nimport { isCommunityResource } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction now() { return (new Date()).getTime(); }\n\n// Returns to network as long as all agree, or null if any is null.\n// Throws an error if any two networks do not match.\nfunction checkNetworks(networks: Array): Network {\n let result = null;\n\n for (let i = 0; i < networks.length; i++) {\n const network = networks[i];\n\n // Null! We do not know our network; bail.\n if (network == null) { return null; }\n\n if (result) {\n // Make sure the network matches the previous networks\n if (!(result.name === network.name && result.chainId === network.chainId &&\n ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) {\n\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n\n return result;\n}\n\nfunction median(values: Array, maxDelta?: number): number {\n values = values.slice().sort();\n const middle = Math.floor(values.length / 2);\n\n // Odd length; take the middle\n if (values.length % 2) {\n return values[middle];\n }\n\n // Even length; take the average of the two middle\n const a = values[middle - 1], b = values[middle];\n\n if (maxDelta != null && Math.abs(a - b) > maxDelta) {\n return null;\n }\n\n return (a + b) / 2;\n}\n\nfunction serialize(value: any): string {\n if (value === null) {\n return \"null\";\n } else if (typeof(value) === \"number\" || typeof(value) === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof(value) === \"string\") {\n return value;\n } else if (BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map((i) => serialize(i)));\n } else if (typeof(value) === \"object\") {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((key) => {\n let v = value[key];\n if (typeof(v) === \"function\") {\n v = \"[function]\";\n } else {\n v = serialize(v);\n }\n return JSON.stringify(key) + \":\" + v;\n }).join(\",\") + \"}\";\n }\n\n throw new Error(\"unknown value type: \" + typeof(value));\n}\n\n// Next request ID to use for emitting debug info\nlet nextRid = 1;\n\n\nexport interface FallbackProviderConfig {\n // The Provider\n provider: Provider;\n\n // The priority to favour this Provider; lower values are used first (higher priority)\n priority?: number;\n\n // Timeout before also triggering the next provider; this does not stop\n // this provider and if its result comes back before a quorum is reached\n // it will be incorporated into the vote\n // - lower values will cause more network traffic but may result in a\n // faster result.\n stallTimeout?: number;\n\n // How much this provider contributes to the quorum; sometimes a specific\n // provider may be more reliable or trustworthy than others, but usually\n // this should be left as the default\n weight?: number;\n};\n\n// A Staller is used to provide a delay to give a Provider a chance to response\n// before asking the next Provider to try.\ntype Staller = {\n wait: (func: () => void) => Promise\n getPromise: () => Promise,\n cancel: () => void\n};\n\nfunction stall(duration: number): Staller {\n let cancel: () => void = null;\n\n let timer: NodeJS.Timer = null;\n let promise = >(new Promise((resolve) => {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n }\n timer = setTimeout(cancel, duration);\n }));\n\n const wait = (func: () => void) => {\n promise = promise.then(func);\n return promise;\n }\n\n function getPromise(): Promise {\n return promise;\n }\n\n return { cancel, getPromise, wait };\n}\n\nconst ForwardErrors = [\n Logger.errors.CALL_EXCEPTION,\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n Logger.errors.UNPREDICTABLE_GAS_LIMIT\n];\n\nconst ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\",\n];\n\n\n// @TODO: Make this an object with staller and cancel built-in\ninterface RunningConfig extends FallbackProviderConfig {\n start?: number;\n done?: boolean;\n cancelled?: boolean;\n runner?: Promise;\n staller?: Staller;\n result?: any;\n error?: Error;\n};\n\nfunction exposeDebugConfig(config: RunningConfig, now?: number): any {\n const result: any = {\n weight: config.weight\n };\n Object.defineProperty(result, \"provider\", { get: () => config.provider });\n if (config.start) { result.start = config.start; }\n if (now) { result.duration = (now - config.start); }\n if (config.done) {\n if (config.error) {\n result.error = config.error;\n } else {\n result.result = config.result || null;\n }\n }\n return result;\n}\n\nfunction normalizedTally(normalize: (value: any) => string, quorum: number): (configs: Array) => any {\n return function(configs: Array): any {\n\n // Count the votes for each result\n const tally: { [ key: string]: { count: number, result: any } } = { };\n configs.forEach((c) => {\n const value = normalize(c.result);\n if (!tally[value]) { tally[value] = { count: 0, result: c.result }; }\n tally[value].count++;\n });\n\n // Check for a quorum on any given result\n const keys = Object.keys(tally);\n for (let i = 0; i < keys.length; i++) {\n const check = tally[keys[i]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n\n // No quroum\n return undefined;\n }\n}\nfunction getProcessFunc(provider: FallbackProvider, method: string, params: { [ key: string ]: any }): (configs: Array) => any {\n\n let normalize = serialize;\n\n switch (method) {\n case \"getBlockNumber\":\n // Return the median value, unless there is (median + 1) is also\n // present, in which case that is probably true and the median\n // is going to be stale soon. In the event of a malicious node,\n // the lie will be true soon enough.\n return function(configs: Array): number {\n const values = configs.map((c) => c.result);\n\n // Get the median block number\n let blockNumber = median(configs.map((c) => c.result), 2);\n if (blockNumber == null) { return undefined; }\n\n blockNumber = Math.ceil(blockNumber);\n\n // If the next block height is present, its prolly safe to use\n if (values.indexOf(blockNumber + 1) >= 0) { blockNumber++; }\n\n // Don't ever roll back the blockNumber\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n\n return provider._highestBlockNumber;\n };\n\n case \"getGasPrice\":\n // Return the middle (round index up) value, similar to median\n // but do not average even entries and choose the higher.\n // Malicious actors must compromise 50% of the nodes to lie.\n return function(configs: Array): BigNumber {\n const values = configs.map((c) => c.result);\n values.sort();\n return values[Math.floor(values.length / 2)];\n }\n\n case \"getEtherPrice\":\n // Returns the median price. Malicious actors must compromise at\n // least 50% of the nodes to lie (in a meaningful way).\n return function(configs: Array): number {\n return median(configs.map((c) => c.result));\n }\n\n // No additional normalizing required; serialize is enough\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize = function(tx: any): string {\n if (tx == null) { return null; }\n\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return serialize(tx);\n }\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getBlock\":\n // We drop the confirmations from transactions as it is approximate\n if (params.includeTransactions) {\n normalize = function(block: BlockWithTransactions): string {\n if (block == null) { return null; }\n\n block = shallowCopy(block);\n block.transactions = block.transactions.map((tx) => {\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize = function(block: Block): string {\n if (block == null) { return null; }\n return serialize(block);\n }\n }\n break;\n\n default:\n throw new Error(\"unknown method: \" + method);\n }\n\n // Return the result if and only if the expected quorum is\n // satisfied and agreed upon for the final result.\n return normalizedTally(normalize, provider.quorum);\n\n}\n\n// If we are doing a blockTag query, we need to make sure the backend is\n// caught up to the FallbackProvider, before sending a request to it.\nasync function waitForSync(config: RunningConfig, blockNumber: number): Promise {\n const provider = (config.provider);\n\n if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) {\n return provider;\n }\n\n return poll(() => {\n return new Promise((resolve, reject) => {\n setTimeout(function() {\n\n // We are synced\n if (provider.blockNumber >= blockNumber) { return resolve(provider); }\n\n // We're done; just quit\n if (config.cancelled) { return resolve(null); }\n\n // Try again, next block\n return resolve(undefined);\n }, 0);\n });\n }, { oncePoll: provider });\n}\n\nasync function getRunner(config: RunningConfig, currentBlockNumber: number, method: string, params: { [ key: string]: any }): Promise {\n let provider = config.provider;\n\n switch (method) {\n case \"getBlockNumber\":\n case \"getGasPrice\":\n return provider[method]();\n case \"getEtherPrice\":\n if ((provider).getEtherPrice) {\n return (provider).getEtherPrice();\n }\n break;\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.address, params.blockTag || \"latest\");\n case \"getStorageAt\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\");\n case \"getBlock\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[(params.includeTransactions ? \"getBlockWithTransactions\": \"getBlock\")](params.blockTag || params.blockHash);\n case \"call\":\n case \"estimateGas\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.transaction);\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n return provider[method](params.transactionHash);\n case \"getLogs\": {\n let filter = params.filter;\n if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getLogs(filter);\n }\n }\n\n return logger.throwError(\"unknown method error\", Logger.errors.UNKNOWN_ERROR, {\n method: method,\n params: params\n });\n}\n\nexport class FallbackProvider extends BaseProvider {\n readonly providerConfigs: ReadonlyArray;\n readonly quorum: number;\n\n // Due to the highly asyncronous nature of the blockchain, we need\n // to make sure we never unroll the blockNumber due to our random\n // sample of backends\n _highestBlockNumber: number;\n\n constructor(providers: Array, quorum?: number) {\n logger.checkNew(new.target, FallbackProvider);\n\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n\n const providerConfigs: Array = providers.map((configOrProvider, index) => {\n if (Provider.isProvider(configOrProvider)) {\n const stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n const priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n\n const config: FallbackProviderConfig = shallowCopy(configOrProvider);\n\n if (config.priority == null) { config.priority = 1; }\n if (config.stallTimeout == null) {\n config.stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n }\n if (config.weight == null) { config.weight = 1; }\n\n const weight = config.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", `providers[${ index }].weight`, weight);\n }\n\n return Object.freeze(config);\n });\n\n const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0);\n\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n\n // Are all providers' networks are known\n let networkOrReady: Network | Promise = checkNetworks(providerConfigs.map((c) => ((c.provider)).network));\n\n // Not all networks are known; we must stall\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Preserve a copy, so we do not get mutated\n defineReadOnly(this, \"providerConfigs\", Object.freeze(providerConfigs));\n defineReadOnly(this, \"quorum\", quorum);\n\n this._highestBlockNumber = -1;\n }\n\n async detectNetwork(): Promise {\n const networks = await Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork()));\n return checkNetworks(networks);\n }\n\n async perform(method: string, params: { [name: string]: any }): Promise {\n // Sending transactions is special; always broadcast it to all backends\n if (method === \"sendTransaction\") {\n const results: Array = await Promise.all(this.providerConfigs.map((c) => {\n return c.provider.sendTransaction(params.signedTransaction).then((result) => {\n return result.hash;\n }, (error) => {\n return error;\n });\n }));\n\n // Any success is good enough (other errors are likely \"already seen\" errors\n for (let i = 0; i < results.length; i++) {\n const result = results[i];\n if (typeof(result) === \"string\") { return result; }\n }\n\n // They were all an error; pick the first error\n throw results[0];\n }\n\n // We need to make sure we are in sync with our backends, so we need\n // to know this before we can make a lot of calls\n if (this._highestBlockNumber === -1 && method !== \"getBlockNumber\") {\n await this.getBlockNumber();\n }\n\n const processFunc = getProcessFunc(this, method, params);\n\n // Shuffle the providers and then sort them by their priority; we\n // shallowCopy them since we will store the result in them too\n const configs: Array = shuffled(this.providerConfigs.map(shallowCopy));\n configs.sort((a, b) => (a.priority - b.priority));\n\n const currentBlockNumber = this._highestBlockNumber;\n\n let i = 0;\n let first = true;\n while (true) {\n const t0 = now();\n\n // Compute the inflight weight (exclude anything past)\n let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout)))\n .reduce((accum, c) => (accum + c.weight), 0);\n\n // Start running enough to meet quorum\n while (inflightWeight < this.quorum && i < configs.length) {\n const config = configs[i++];\n\n const rid = nextRid++;\n\n config.start = now();\n config.staller = stall(config.stallTimeout);\n config.staller.wait(() => { config.staller = null; });\n\n config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => {\n config.done = true;\n config.result = result;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n }, (error) => {\n config.done = true;\n config.error = error;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n });\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, null),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n inflightWeight += config.weight;\n }\n\n // Wait for anything meaningful to finish or stall out\n const waiting: Array> = [ ];\n configs.forEach((c) => {\n if (c.done || !c.runner) { return; }\n waiting.push(c.runner);\n if (c.staller) { waiting.push(c.staller.getPromise()); }\n });\n\n if (waiting.length) { await Promise.race(waiting); }\n\n // Check the quorum and process the results; the process function\n // may additionally decide the quorum is not met\n const results = configs.filter((c) => (c.done && c.error == null));\n if (results.length >= this.quorum) {\n const result = processFunc(results);\n if (result !== undefined) {\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n return result;\n }\n if (!first) { await stall(100).getPromise(); }\n first = false;\n }\n\n // No result, check for errors that should be forwarded\n const errors = configs.reduce((accum, c) => {\n if (!c.done || c.error == null) { return accum; }\n\n const code = ((c.error)).code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) { accum[code] = { error: c.error, weight: 0 }; }\n accum[code].weight += c.weight;\n }\n\n return accum;\n }, <{ [ code: string ]: { error: Error, weight: number } }>({ }));\n\n Object.keys(errors).forEach((errorCode: string) => {\n const tally = errors[errorCode];\n if (tally.weight < this.quorum) { return; }\n\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n const e = (tally.error);\n\n const props: { [ name: string ]: any } = { };\n ForwardProperties.forEach((name) => {\n if (e[name] == null) { return; }\n props[name] = e[name];\n });\n\n logger.throwError(e.reason || e.message, errorCode, props);\n });\n\n // All configs have run to completion; we will never get more data\n if (configs.filter((c) => !c.done).length === 0) { break; }\n }\n\n // Shut down any stallers; shouldn't be any\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n return logger.throwError(\"failed to meet quorum\", Logger.errors.SERVER_ERROR, {\n method: method,\n params: params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map((c) => exposeDebugConfig(c)),\n provider: this\n });\n }\n}\n","\"use strict\";\n\nconst IpcProvider: any = null;\n\nexport {\n IpcProvider\n};\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n\nconst defaultProjectId = \"84842078b09946638c03157f83405213\"\n\nexport class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n readonly projectId: string;\n readonly projectSecret: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new InfuraProvider(network, apiKey);\n const connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n\n const url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, network);\n\n defineReadOnly(this, \"apiKey\", provider.projectId);\n defineReadOnly(this, \"projectId\", provider.projectId);\n defineReadOnly(this, \"projectSecret\", provider.projectSecret);\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n\nexport class InfuraProvider extends UrlJsonRpcProvider {\n readonly projectId: string;\n readonly projectSecret: string;\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider {\n return new InfuraWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n const apiKeyObj: { apiKey: string, projectId: string, projectSecret: string } = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n\n if (apiKey == null) { return apiKeyObj; }\n\n if (typeof(apiKey) === \"string\") {\n apiKeyObj.projectId = apiKey;\n\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument((typeof(apiKey.projectId) === \"string\"),\n \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument((typeof(apiKey.projectSecret) === \"string\"),\n \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n\n apiKeyObj.apiKey = apiKeyObj.projectId;\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch(network ? network.name: \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"ropsten\":\n host = \"ropsten.infura.io\";\n break;\n case \"rinkeby\":\n host = \"rinkeby.infura.io\";\n break;\n case \"kovan\":\n host = \"kovan.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-kovan\":\n host = \"optimism-kovan.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arbitrum-rinkeby.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n const connection: ConnectionInfo = {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + \"/v3/\" + apiKey.projectId),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey.projectId === defaultProjectId) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n","\nimport { deepCopy } from \"@ethersproject/properties\";\nimport { fetchJson } from \"@ethersproject/web\";\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Experimental\n\nexport class JsonRpcBatchProvider extends JsonRpcProvider {\n _pendingBatchAggregator: NodeJS.Timer;\n _pendingBatch: Array<{\n request: { method: string, params: Array, id: number, jsonrpc: \"2.0\" },\n resolve: (result: any) => void,\n reject: (error: Error) => void\n }>;\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n if (this._pendingBatch == null) {\n this._pendingBatch = [ ];\n }\n\n const inflightRequest: any = { request, resolve: null, reject: null };\n\n const promise = new Promise((resolve, reject) => {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n\n this._pendingBatch.push(inflightRequest);\n\n if (!this._pendingBatchAggregator) {\n // Schedule batch for next event loop + short duration\n this._pendingBatchAggregator = setTimeout(() => {\n\n // Get teh current batch and clear it, so new requests\n // go into the next batch\n const batch = this._pendingBatch;\n this._pendingBatch = null;\n this._pendingBatchAggregator = null;\n\n // Get the request as an array of requests\n const request = batch.map((inflight) => inflight.request);\n\n this.emit(\"debug\", {\n action: \"requestBatch\",\n request: deepCopy(request),\n provider: this\n });\n\n return fetchJson(this.connection, JSON.stringify(request)).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n // For each result, feed it to the correct Promise, depending\n // on whether it was a success or error\n batch.forEach((inflightRequest, index) => {\n const payload = result[index];\n if (payload.error) {\n const error = new Error(payload.error.message);\n (error).code = payload.error.code;\n (error).data = payload.error.data;\n inflightRequest.reject(error);\n } else {\n inflightRequest.resolve(payload.result);\n }\n });\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n batch.forEach((inflightRequest) => {\n inflightRequest.reject(error);\n });\n });\n\n }, 10);\n }\n\n return promise;\n }\n}\n","/* istanbul ignore file */\n\n\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Special API key provided by Nodesmith for ethers.js\nconst defaultApiKey = \"ETHERS_JS_SHARED\";\n\nexport class NodesmithProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return (host + \"?apiKey=\" + apiKey);\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// These are load-balancer-based application IDs\nconst defaultApplicationIds: Record = {\n homestead: \"6004bcd10040261633ade990\",\n ropsten: \"6004bd4d0040261633ade991\",\n rinkeby: \"6004bda20040261633ade994\",\n goerli: \"6004bd860040261633ade992\",\n};\n\nexport class PocketProvider extends UrlJsonRpcProvider {\n readonly applicationId: string;\n readonly applicationSecretKey: string;\n readonly loadBalancer: boolean;\n\n constructor(network?: Networkish, apiKey?: any) {\n // We need a bit of creativity in the constructor because\n // Pocket uses different default API keys based on the network\n\n if (apiKey == null) {\n const n = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (n) {\n const applicationId = defaultApplicationIds[n.name];\n if (applicationId) {\n apiKey = {\n applicationId: applicationId,\n loadBalancer: true\n };\n }\n }\n\n // If there was any issue above, we don't know this network\n if (apiKey == null) {\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n }\n\n super(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n // Most API Providers allow null to get the default configuration, but\n // Pocket requires the network to decide the default provider, so we\n // rely on hijacking the constructor to add a sensible default for us\n\n if (apiKey == null) {\n logger.throwArgumentError(\"PocketProvider.getApiKey does not support null apiKey\", \"apiKey\", apiKey);\n }\n\n const apiKeyObj: { applicationId: string, applicationSecretKey: string, loadBalancer: boolean } = {\n applicationId: null,\n loadBalancer: false,\n applicationSecretKey: null\n };\n\n // Parse applicationId and applicationSecretKey\n if (typeof (apiKey) === \"string\") {\n apiKeyObj.applicationId = apiKey;\n\n } else if (apiKey.applicationSecretKey != null) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"applicationSecretKey requires an applicationId\", \"applicationId\", apiKey.applicationId);\n logger.assertArgument((typeof (apiKey.applicationSecretKey) === \"string\"),\n \"invalid applicationSecretKey\", \"applicationSecretKey\", \"[REDACTED]\");\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else if (apiKey.applicationId) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"apiKey.applicationId must be a string\", \"apiKey.applicationId\", apiKey.applicationId);\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n let url = null;\n if (apiKey.loadBalancer) {\n url = `https:/\\/${ host }/v1/lb/${ apiKey.applicationId }`\n } else {\n url = `https:/\\/${ host }/v1/${ apiKey.applicationId }`\n }\n\n const connection: ConnectionInfo = { url };\n\n // Initialize empty headers\n connection.headers = {}\n\n // Apply application secret key\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.applicationId === defaultApplicationIds[this.network.name]);\n }\n}\n","\"use strict\";\n\nimport { Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Exported Types\nexport type ExternalProvider = {\n isMetaMask?: boolean;\n isStatus?: boolean;\n host?: string;\n path?: string;\n sendAsync?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n send?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n request?: (request: { method: string, params?: Array }) => Promise\n}\n\nlet _nextId = 1;\n\nexport type JsonRpcFetchFunc = (method: string, params?: Array) => Promise;\n\ntype Web3LegacySend = (request: any, callback: (error: Error, response: any) => void) => void;\n\nfunction buildWeb3LegacyFetcher(provider: ExternalProvider, sendFunc: Web3LegacySend) : JsonRpcFetchFunc {\n const fetcher = \"Web3LegacyFetcher\";\n\n return function(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (_nextId++),\n jsonrpc: \"2.0\"\n };\n\n return new Promise((resolve, reject) => {\n this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: deepCopy(request),\n provider: this\n });\n\n sendFunc(request, (error, response) => {\n\n if (error) {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: this\n });\n\n return reject(error);\n }\n\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: this\n });\n\n if (response.error) {\n const error = new Error(response.error.message);\n (error).code = response.error.code;\n (error).data = response.error.data;\n return reject(error);\n }\n\n resolve(response.result);\n });\n });\n }\n}\n\nfunction buildEip1193Fetcher(provider: ExternalProvider): JsonRpcFetchFunc {\n return function(method: string, params: Array): Promise {\n if (params == null) { params = [ ]; }\n\n const request = { method, params };\n\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: deepCopy(request),\n provider: this\n });\n\n return provider.request(request).then((response) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: this\n });\n\n return response;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: this\n });\n\n throw error;\n });\n }\n}\n\nexport class Web3Provider extends JsonRpcProvider {\n readonly provider: ExternalProvider;\n readonly jsonRpcFetchFunc: JsonRpcFetchFunc;\n\n constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish) {\n logger.checkNew(new.target, Web3Provider);\n\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n\n let path: string = null;\n let jsonRpcFetchFunc: JsonRpcFetchFunc = null;\n let subprovider: ExternalProvider = null;\n\n if (typeof(provider) === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n\n subprovider = provider;\n\n if (provider.request) {\n if (path === \"\") { path = \"eip-1193:\"; }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n\n if (!path) { path = \"unknown:\"; }\n }\n\n super(path, network);\n\n defineReadOnly(this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n defineReadOnly(this, \"provider\", subprovider);\n }\n\n send(method: string, params: Array): Promise {\n return this.jsonRpcFetchFunc(method, params);\n }\n}\n","\"use strict\";\n\nimport {\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n Provider,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from \"@ethersproject/abstract-provider\";\n\nimport { getNetwork } from \"@ethersproject/networks\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\n\nimport { BaseProvider, EnsProvider, EnsResolver, Resolver } from \"./base-provider\";\n\nimport { AlchemyProvider, AlchemyWebSocketProvider } from \"./alchemy-provider\";\nimport { CloudflareProvider } from \"./cloudflare-provider\";\nimport { EtherscanProvider } from \"./etherscan-provider\";\nimport { FallbackProvider, FallbackProviderConfig } from \"./fallback-provider\";\nimport { IpcProvider } from \"./ipc-provider\";\nimport { InfuraProvider, InfuraWebSocketProvider } from \"./infura-provider\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\nimport { JsonRpcBatchProvider } from \"./json-rpc-batch-provider\";\nimport { NodesmithProvider } from \"./nodesmith-provider\";\nimport { PocketProvider } from \"./pocket-provider\";\nimport { StaticJsonRpcProvider, UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\nimport { Web3Provider } from \"./web3-provider\";\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { ExternalProvider, JsonRpcFetchFunc } from \"./web3-provider\";\n\nimport { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n////////////////////////\n// Helper Functions\n\nfunction getDefaultProvider(network?: Networkish, options?: any): BaseProvider {\n if (network == null) { network = \"homestead\"; }\n\n // If passed a URL, figure out the right type of provider based on the scheme\n if (typeof(network) === \"string\") {\n // @TODO: Add support for IpcProvider; maybe if it ends in \".ipc\"?\n\n // Handle http and ws (and their secure variants)\n const match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1]) {\n case \"http\":\n return new JsonRpcProvider(network);\n case \"ws\":\n return new WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n\n const n = getNetwork(network);\n if (!n || !n._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network: network\n });\n }\n\n return n._defaultProvider({\n FallbackProvider,\n\n AlchemyProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n JsonRpcProvider,\n NodesmithProvider,\n PocketProvider,\n Web3Provider,\n\n IpcProvider,\n }, options);\n}\n\n////////////////////////\n// Exports\n\nexport {\n\n // Abstract Providers (or Abstract-ish)\n Provider,\n BaseProvider,\n\n Resolver,\n\n UrlJsonRpcProvider,\n\n ///////////////////////\n // Concrete Providers\n\n FallbackProvider,\n\n AlchemyProvider,\n AlchemyWebSocketProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n InfuraWebSocketProvider,\n JsonRpcProvider,\n JsonRpcBatchProvider,\n NodesmithProvider,\n PocketProvider,\n StaticJsonRpcProvider,\n Web3Provider,\n WebSocketProvider,\n\n IpcProvider,\n\n\n ///////////////////////\n // Signer\n\n JsonRpcSigner,\n\n\n ///////////////////////\n // Functions\n\n getDefaultProvider,\n getNetwork,\n isCommunityResource,\n isCommunityResourcable,\n showThrottleMessage,\n\n\n ///////////////////////\n // Objects\n\n Formatter,\n\n\n ///////////////////////\n // Types\n\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse,\n\n ExternalProvider,\n JsonRpcFetchFunc,\n\n FallbackProviderConfig,\n\n Network,\n Networkish,\n\n EnsProvider,\n EnsResolver,\n\n CommunityResourcable\n};\n\n","export const version = \"solidity/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n\nfunction _pack(type: string, value: any, isArray?: boolean): Uint8Array {\n switch(type) {\n case \"address\":\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\": \"0x00\");\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n }\n\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\")\n\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type)\n }\n\n if (isArray) { size = 256; }\n\n value = BigNumber.from(value).toTwos(size);\n\n return zeroPad(value, size / 8);\n }\n\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type)\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${ type }`, \"value\", value)\n }\n if (isArray) { return arrayify((value + Zeros).substring(0, 66)); }\n return value;\n }\n\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${ type }`, \"value\", value)\n }\n const result: Array = [];\n value.forEach(function(value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", type)\n}\n\n// @TODO: Array Enum\n\nexport function pack(types: ReadonlyArray, values: ReadonlyArray) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values)\n }\n const tight: Array = [];\n types.forEach(function(type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\n\nexport function keccak256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashKeccak256(pack(types, values));\n}\n\nexport function sha256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashSha256(pack(types, values));\n}\n","export const version = \"units/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n\n\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value: string | number): string {\n const comps = String(value).split(\".\");\n\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") { whole = whole.substring(1); }\n if (whole === \"\") { whole = \"0\"; }\n\n let suffix = \"\";\n if (comps.length === 2) { suffix = \".\" + (comps[1] || \"0\"); }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n\n return negative + formatted.join(\",\") + suffix;\n}\n\nexport function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string {\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return formatFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function parseUnits(value: string, unitName?: BigNumberish): BigNumber {\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return parseFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function formatEther(wei: BigNumberish): string {\n return formatUnits(wei, 18);\n}\n\nexport function parseEther(ether: string): BigNumber {\n return parseUnits(ether, 18);\n}\n\n","\"use strict\";\n\nimport { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription }from \"@ethersproject/abi\";\nimport { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from \"@ethersproject/address\";\nimport * as base64 from \"@ethersproject/base64\";\nimport { Base58 as base58 } from \"@ethersproject/basex\";\nimport { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from \"@ethersproject/hash\";\nimport { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from \"@ethersproject/hdnode\";\nimport { getJsonWalletAddress } from \"@ethersproject/json-wallets\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { computeHmac, ripemd160, sha256, sha512 } from \"@ethersproject/sha2\";\nimport { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from \"@ethersproject/solidity\";\nimport { randomBytes, shuffled } from \"@ethersproject/random\";\nimport { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey, SigningKey } from \"@ethersproject/signing-key\";\nimport { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from \"@ethersproject/strings\";\nimport { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from \"@ethersproject/transactions\";\nimport { commify, formatEther, parseEther, formatUnits, parseUnits } from \"@ethersproject/units\";\nimport { verifyMessage, verifyTypedData } from \"@ethersproject/wallet\";\nimport { _fetchData, fetchJson, poll } from \"@ethersproject/web\";\n\n////////////////////////\n// Enums\n\nimport { SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { UnicodeNormalizationForm, Utf8ErrorReason } from \"@ethersproject/strings\";\nimport { UnsignedTransaction } from \"@ethersproject/transactions\";\n\n////////////////////////\n// Types and Interfaces\n\nimport { CoerceFunc } from \"@ethersproject/abi\";\nimport { Bytes, BytesLike, Hexable } from \"@ethersproject/bytes\"\nimport { Mnemonic } from \"@ethersproject/hdnode\";\nimport { EncryptOptions, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { Deferrable } from \"@ethersproject/properties\";\nimport { Utf8ErrorFunc } from \"@ethersproject/strings\";\nimport { AccessList, AccessListish } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from \"@ethersproject/web\";\n\n////////////////////////\n// Exports\n\nexport {\n AbiCoder,\n defaultAbiCoder,\n\n Fragment,\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n checkResultErrors,\n Result,\n\n Logger,\n\n RLP,\n\n _fetchData,\n fetchJson,\n poll,\n\n checkProperties,\n deepCopy,\n defineReadOnly,\n getStatic,\n resolveProperties,\n shallowCopy,\n\n arrayify,\n\n concat,\n stripZeros,\n zeroPad,\n\n isBytes,\n isBytesLike,\n\n defaultPath,\n HDNode,\n SigningKey,\n\n Interface,\n\n LogDescription,\n TransactionDescription,\n\n base58,\n base64,\n\n hexlify,\n isHexString,\n hexConcat,\n hexStripZeros,\n hexValue,\n hexZeroPad,\n hexDataLength,\n hexDataSlice,\n\n nameprep,\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n Utf8ErrorFuncs,\n\n formatBytes32String,\n parseBytes32String,\n\n hashMessage,\n namehash,\n isValidName,\n id,\n\n _TypedDataEncoder,\n\n getAddress,\n getIcapAddress,\n getContractAddress,\n getCreate2Address,\n isAddress,\n\n formatEther,\n parseEther,\n\n formatUnits,\n parseUnits,\n\n commify,\n\n computeHmac,\n keccak256,\n ripemd160,\n sha256,\n sha512,\n\n randomBytes,\n shuffled,\n\n solidityPack,\n solidityKeccak256,\n soliditySha256,\n\n splitSignature,\n joinSignature,\n\n accessListify,\n parseTransaction,\n serializeTransaction,\n TransactionTypes,\n\n getJsonWalletAddress,\n\n computeAddress,\n recoverAddress,\n\n computePublicKey,\n recoverPublicKey,\n\n verifyMessage,\n verifyTypedData,\n\n getAccountPath,\n mnemonicToEntropy,\n entropyToMnemonic,\n isValidMnemonic,\n mnemonicToSeed,\n\n\n ////////////////////////\n // Enums\n\n SupportedAlgorithm,\n\n UnicodeNormalizationForm,\n Utf8ErrorReason,\n\n ////////////////////////\n // Types\n\n Bytes,\n BytesLike,\n Hexable,\n\n AccessList,\n AccessListish,\n UnsignedTransaction,\n\n CoerceFunc,\n\n Indexed,\n\n Mnemonic,\n\n Deferrable,\n\n Utf8ErrorFunc,\n\n ConnectionInfo,\n OnceBlockable,\n OncePollable,\n PollOptions,\n FetchJsonResponse,\n\n EncryptOptions,\n ProgressCallback\n}\n\n","export const version = \"ethers/5.5.2\";\n","\"use strict\";\n\nimport { BaseContract, Contract, ContractFactory } from \"@ethersproject/contracts\";\n\nimport { BigNumber, FixedNumber } from \"@ethersproject/bignumber\";\n\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { Wallet } from \"@ethersproject/wallet\";\n\nimport * as constants from \"@ethersproject/constants\";\n\nimport * as providers from \"@ethersproject/providers\";\nimport { getDefaultProvider } from \"@ethersproject/providers\";\n\nimport { Wordlist, wordlists} from \"@ethersproject/wordlists\";\n\nimport * as utils from \"./utils\";\n\nimport { ErrorCode as errors, Logger } from \"@ethersproject/logger\";\n\n////////////////////////\n// Types\n\nimport { BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike, Signature } from \"@ethersproject/bytes\";\nimport { Transaction, UnsignedTransaction } from \"@ethersproject/transactions\";\n\n\n////////////////////////\n// Compile-Time Constants\n\n// This is generated by \"npm run dist\"\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\n////////////////////////\n// Types\n\nimport {\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface\n} from \"@ethersproject/contracts\";\n\n\n////////////////////////\n// Exports\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n};\n\n","\"use strict\";\n\n// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js\n\nimport * as ethers from \"./ethers\";\n\ntry {\n const anyGlobal = (window as any);\n\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers;\n }\n} catch (error) { }\n\nexport { ethers };\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n} from \"./ethers\";\n"],"names":["this","_version_1","logger_1","bytes_1","bignumber_1","properties_1","global","define","keccak256_1","rlp_1","address_1","abstract_coder_1","anonymous_1","constants_1","utf8_1","bytes32_1","idna_1","strings_1","array_1","string_1","bytes_2","tuple_1","null_1","number_1","fixed_bytes_1","fragments_1","message_1","typed_data_1","fragments","abi_coder_1","hash_1","interface_1","minAssert","minUtils","BN","utils","assert","Base","inherits","require$$0","require$$1","rotr32","rotl32","sum32","sum32_5","ft_1","shaCommon","BlockHash","sum32_4","ch32","maj32","s0_256","s1_256","g0_256","g1_256","SHA256","rotr64_hi","rotr64_lo","shr64_hi","shr64_lo","sum64","sum64_hi","sum64_lo","sum64_4_hi","sum64_4_lo","sum64_5_hi","sum64_5_lo","SHA512","require$$2","require$$3","require$$4","sum32_3","curve","hash","curves","KeyPair","HmacDRBG","Signature","signature","elliptic_1","signing_key_1","transactions_1","abi_1","abstract_signer_1","abstract_provider_1","types_1","sha2_1","wordlist","wordlist_1","lang_en_1","wordlists_1","basex_1","pbkdf2_1","utils_1","hdnode_1","random_1","crowdsale_1","inspect_1","keystore_1","json_wallets_1","base64_1","geturl_1","web_1","formatter_1","networks_1","base_provider_1","ws_1","json_rpc_provider_1","websocket_provider_1","url_json_rpc_provider_1","alchemy_provider_1","cloudflare_provider_1","etherscan_provider_1","fallback_provider_1","ipc_provider_1","infura_provider_1","json_rpc_batch_provider_1","nodesmith_provider_1","pocket_provider_1","web3_provider_1","solidity_1","units_1","wallet_1","contracts_1","ethers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,CAAC,UAAU,MAAM,EAAE,OAAO,EAAE;CAC5B,EAAE,YAAY,CAAC;AACf;CACA;CACA,EAAE,SAAS,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE;CAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,kBAAkB,CAAC,CAAC;CACzD,GAAG;AACH;CACA;CACA;CACA,EAAE,SAAS,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;CACtC,IAAI,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;CAC5B,IAAI,IAAI,QAAQ,GAAG,YAAY,EAAE,CAAC;CAClC,IAAI,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;CAC7C,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC;CACpC,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;CACtC,GAAG;AACH;CACA;AACA;CACA,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;CACrC,IAAI,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;CACzB,MAAM,OAAO,MAAM,CAAC;CACpB,KAAK;AACL;CACA,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,C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CAAC,OAAO,KAAK,EAAE,GAAG;CAInB,sBA4DkB;CA3Dd,gGAAA,MAAM,OAAA;CAEN,gGAAA,MAAM,OAAA;CACN,oGAAA,UAAU,OAAA;CAEV,4GAAA,kBAAkB,OAAA;CAClB,mGAAA,SAAS,OAAA;CAET,sGAAA,YAAY,OAAA;CACZ,kGAAA,QAAQ,OAAA;CACR,yGAAA,eAAe,OAAA;CAEf,mGAAA,SAAS,OAAA;CACT,qGAAA,WAAW,OAAA;CAEX,mGAAA,SAAS,OAAA;CACT,gGAAA,MAAM,OAAA;CAEN,gGAAA,MAAM,OAAA;CAEN,+FAAA,KAAK,OAAA;CAEL,mGAAA,SAAS,OAAA;CAGT;CACA;CAEA,iGAAA,OAAO,OAAA;CA8BP,kGAAA,QAAQ,OAAA;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/ethers/dist/ethers.umd.min.js b/node_modules/ethers/dist/ethers.umd.min.js new file mode 100644 index 0000000..3316203 --- /dev/null +++ b/node_modules/ethers/dist/ethers.umd.min.js @@ -0,0 +1 @@ +(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,global.ethers=factory())})(this,function(){"use strict";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function createCommonjsModule(fn,basedir,module){return module={path:basedir,exports:{},require:function(path,base){return commonjsRequire(path,base===undefined||base===null?module.path:base)}},fn(module,module.exports),module.exports}function getDefaultExportFromNamespaceIfPresent(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")?n["default"]:n}function getDefaultExportFromNamespaceIfNotNamed(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")&&Object.keys(n).length===1?n["default"]:n}function getAugmentedNamespace(n){if(n.__esModule)return n;var a=Object.defineProperty({},"__esModule",{value:true});Object.keys(n).forEach(function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})});return a}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var bn=createCommonjsModule(function(module){(function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number)){return number}this.negative=0;this.words=null;this.length=0;this.red=null;if(number!==null){if(base==="le"||base==="be"){endian=base;base=10}this._init(number||0,base||10,endian||"be")}}if(typeof module==="object"){module.exports=BN}else{exports.BN=BN}BN.BN=BN;BN.wordSize=26;var Buffer;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined"){Buffer=window.Buffer}else{Buffer=null.Buffer}}catch(e){}BN.isBN=function isBN(num){if(num instanceof BN){return true}return num!==null&&typeof num==="object"&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)};BN.max=function max(left,right){if(left.cmp(right)>0)return left;return right};BN.min=function min(left,right){if(left.cmp(right)<0)return left;return right};BN.prototype._init=function init(number,base,endian){if(typeof number==="number"){return this._initNumber(number,base,endian)}if(typeof number==="object"){return this._initArray(number,base,endian)}if(base==="hex"){base=16}assert(base===(base|0)&&base>=2&&base<=36);number=number.toString().replace(/\s+/g,"");var start=0;if(number[0]==="-"){start++;this.negative=1}if(start=0;i-=3){w=number[i]|number[i-1]<<8|number[i-2]<<16;this.words[j]|=w<>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}else if(endian==="le"){for(i=0,j=0;i>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}return this.strip()};function parseHex4Bits(string,index){var c=string.charCodeAt(index);if(c>=65&&c<=70){return c-55}else if(c>=97&&c<=102){return c-87}else{return c-48&15}}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);if(index-1>=lowerBound){r|=parseHex4Bits(string,index-1)<<4}return r}BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6);this.words=new Array(this.length);for(var i=0;i=start;i-=2){w=parseHexByte(number,start,i)<=18){off-=18;j+=1;this.words[j]|=w>>>26}else{off+=8}}}else{var parseLength=number.length-start;for(i=parseLength%2===0?start+1:start;i=18){off-=18;j+=1;this.words[j]|=w>>>26}else{off+=8}}}this.strip()};function parseBase(str,start,end,mul){var r=0;var len=Math.min(str.length,end);for(var i=start;i=49){r+=c-49+10}else if(c>=17){r+=c-17+10}else{r+=c}}return r}BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0];this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base){limbLen++}limbLen--;limbPow=limbPow/base|0;var total=number.length-start;var mod=total%limbLen;var end=Math.min(total,total-mod)+start;var word=0;for(var i=start;i1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?""};var zeros=["","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"];var groupSizes=[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];var groupBases=[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];BN.prototype.toString=function toString(base,padding){base=base||10;padding=padding|0||1;var out;if(base===16||base==="hex"){out="";var off=0;var carry=0;for(var i=0;i>>24-off&16777215;if(carry!==0||i!==this.length-1){out=zeros[6-word.length]+word+out}else{out=word+out}off+=2;if(off>=26){off-=26;i--}}if(carry!==0){out=carry.toString(16)+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}if(base===(base|0)&&base>=2&&base<=36){var groupSize=groupSizes[base];var groupBase=groupBases[base];out="";var c=this.clone();c.negative=0;while(!c.isZero()){var r=c.modn(groupBase).toString(base);c=c.idivn(groupBase);if(!c.isZero()){out=zeros[groupSize-r.length]+r+out}else{out=r+out}}if(this.isZero()){out="0"+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ret=this.words[0];if(this.length===2){ret+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ret+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ret:ret};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(endian,length){assert(typeof Buffer!=="undefined");return this.toArrayLike(Buffer,endian,length)};BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength();var reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length");assert(reqLength>0,"Requested array length <= 0");this.strip();var littleEndian=endian==="le";var res=new ArrayType(reqLength);var b,i;var q=this.clone();if(!littleEndian){for(i=0;i=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(w){if(w===0)return 26;var t=w;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1];var hi=this._countBits(w);return(this.length-1)*26+hi};function toBitArray(num){var w=new Array(num.bitLength());for(var bit=0;bit>>wbit}return w}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var r=0;for(var i=0;inum.length)return this.clone().ior(num);return num.clone().ior(this)};BN.prototype.uor=function uor(num){if(this.length>num.length)return this.clone().iuor(num);return num.clone().iuor(this)};BN.prototype.iuand=function iuand(num){var b;if(this.length>num.length){b=num}else{b=this}for(var i=0;inum.length)return this.clone().iand(num);return num.clone().iand(this)};BN.prototype.uand=function uand(num){if(this.length>num.length)return this.clone().iuand(num);return num.clone().iuand(this)};BN.prototype.iuxor=function iuxor(num){var a;var b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}for(var i=0;inum.length)return this.clone().ixor(num);return num.clone().ixor(this)};BN.prototype.uxor=function uxor(num){if(this.length>num.length)return this.clone().iuxor(num);return num.clone().iuxor(this)};BN.prototype.inotn=function inotn(width){assert(typeof width==="number"&&width>=0);var bytesNeeded=Math.ceil(width/26)|0;var bitsLeft=width%26;this._expand(bytesNeeded);if(bitsLeft>0){bytesNeeded--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-bitsLeft}return this.strip()};BN.prototype.notn=function notn(width){return this.clone().inotn(width)};BN.prototype.setn=function setn(bit,val){assert(typeof bit==="number"&&bit>=0);var off=bit/26|0;var wbit=bit%26;this._expand(off+1);if(val){this.words[off]=this.words[off]|1<num.length){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>>26}for(;carry!==0&&i>>26}this.length=a.length;if(carry!==0){this.words[this.length]=carry;this.length++}else if(a!==this){for(;inum.length)return this.clone().iadd(num);return num.clone().iadd(this)};BN.prototype.isub=function isub(num){if(num.negative!==0){num.negative=0;var r=this.iadd(num);num.negative=1;return r._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(num);this.negative=1;return this._normSign()}var cmp=this.cmp(num);if(cmp===0){this.negative=0;this.length=1;this.words[0]=0;return this}var a,b;if(cmp>0){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>26;this.words[i]=r&67108863}for(;carry!==0&&i>26;this.words[i]=r&67108863}if(carry===0&&i>>26;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/67108864|0;rword=r&67108863}out.words[k]=rword|0;carry=ncarry|0}if(carry!==0){out.words[k]=carry|0}else{out.length--}return out.strip()}var comb10MulTo=function comb10MulTo(self,num,out){var a=self.words;var b=num.words;var o=out.words;var c=0;var lo;var mid;var hi;var a0=a[0]|0;var al0=a0&8191;var ah0=a0>>>13;var a1=a[1]|0;var al1=a1&8191;var ah1=a1>>>13;var a2=a[2]|0;var al2=a2&8191;var ah2=a2>>>13;var a3=a[3]|0;var al3=a3&8191;var ah3=a3>>>13;var a4=a[4]|0;var al4=a4&8191;var ah4=a4>>>13;var a5=a[5]|0;var al5=a5&8191;var ah5=a5>>>13;var a6=a[6]|0;var al6=a6&8191;var ah6=a6>>>13;var a7=a[7]|0;var al7=a7&8191;var ah7=a7>>>13;var a8=a[8]|0;var al8=a8&8191;var ah8=a8>>>13;var a9=a[9]|0;var al9=a9&8191;var ah9=a9>>>13;var b0=b[0]|0;var bl0=b0&8191;var bh0=b0>>>13;var b1=b[1]|0;var bl1=b1&8191;var bh1=b1>>>13;var b2=b[2]|0;var bl2=b2&8191;var bh2=b2>>>13;var b3=b[3]|0;var bl3=b3&8191;var bh3=b3>>>13;var b4=b[4]|0;var bl4=b4&8191;var bh4=b4>>>13;var b5=b[5]|0;var bl5=b5&8191;var bh5=b5>>>13;var b6=b[6]|0;var bl6=b6&8191;var bh6=b6>>>13;var b7=b[7]|0;var bl7=b7&8191;var bh7=b7>>>13;var b8=b[8]|0;var bl8=b8&8191;var bh8=b8>>>13;var b9=b[9]|0;var bl9=b9&8191;var bh9=b9>>>13;out.negative=self.negative^num.negative;out.length=19;lo=Math.imul(al0,bl0);mid=Math.imul(al0,bh0);mid=mid+Math.imul(ah0,bl0)|0;hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0;w0&=67108863;lo=Math.imul(al1,bl0);mid=Math.imul(al1,bh0);mid=mid+Math.imul(ah1,bl0)|0;hi=Math.imul(ah1,bh0);lo=lo+Math.imul(al0,bl1)|0;mid=mid+Math.imul(al0,bh1)|0;mid=mid+Math.imul(ah0,bl1)|0;hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0;w1&=67108863;lo=Math.imul(al2,bl0);mid=Math.imul(al2,bh0);mid=mid+Math.imul(ah2,bl0)|0;hi=Math.imul(ah2,bh0);lo=lo+Math.imul(al1,bl1)|0;mid=mid+Math.imul(al1,bh1)|0;mid=mid+Math.imul(ah1,bl1)|0;hi=hi+Math.imul(ah1,bh1)|0;lo=lo+Math.imul(al0,bl2)|0;mid=mid+Math.imul(al0,bh2)|0;mid=mid+Math.imul(ah0,bl2)|0;hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0;w2&=67108863;lo=Math.imul(al3,bl0);mid=Math.imul(al3,bh0);mid=mid+Math.imul(ah3,bl0)|0;hi=Math.imul(ah3,bh0);lo=lo+Math.imul(al2,bl1)|0;mid=mid+Math.imul(al2,bh1)|0;mid=mid+Math.imul(ah2,bl1)|0;hi=hi+Math.imul(ah2,bh1)|0;lo=lo+Math.imul(al1,bl2)|0;mid=mid+Math.imul(al1,bh2)|0;mid=mid+Math.imul(ah1,bl2)|0;hi=hi+Math.imul(ah1,bh2)|0;lo=lo+Math.imul(al0,bl3)|0;mid=mid+Math.imul(al0,bh3)|0;mid=mid+Math.imul(ah0,bl3)|0;hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0;w3&=67108863;lo=Math.imul(al4,bl0);mid=Math.imul(al4,bh0);mid=mid+Math.imul(ah4,bl0)|0;hi=Math.imul(ah4,bh0);lo=lo+Math.imul(al3,bl1)|0;mid=mid+Math.imul(al3,bh1)|0;mid=mid+Math.imul(ah3,bl1)|0;hi=hi+Math.imul(ah3,bh1)|0;lo=lo+Math.imul(al2,bl2)|0;mid=mid+Math.imul(al2,bh2)|0;mid=mid+Math.imul(ah2,bl2)|0;hi=hi+Math.imul(ah2,bh2)|0;lo=lo+Math.imul(al1,bl3)|0;mid=mid+Math.imul(al1,bh3)|0;mid=mid+Math.imul(ah1,bl3)|0;hi=hi+Math.imul(ah1,bh3)|0;lo=lo+Math.imul(al0,bl4)|0;mid=mid+Math.imul(al0,bh4)|0;mid=mid+Math.imul(ah0,bl4)|0;hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0;w4&=67108863;lo=Math.imul(al5,bl0);mid=Math.imul(al5,bh0);mid=mid+Math.imul(ah5,bl0)|0;hi=Math.imul(ah5,bh0);lo=lo+Math.imul(al4,bl1)|0;mid=mid+Math.imul(al4,bh1)|0;mid=mid+Math.imul(ah4,bl1)|0;hi=hi+Math.imul(ah4,bh1)|0;lo=lo+Math.imul(al3,bl2)|0;mid=mid+Math.imul(al3,bh2)|0;mid=mid+Math.imul(ah3,bl2)|0;hi=hi+Math.imul(ah3,bh2)|0;lo=lo+Math.imul(al2,bl3)|0;mid=mid+Math.imul(al2,bh3)|0;mid=mid+Math.imul(ah2,bl3)|0;hi=hi+Math.imul(ah2,bh3)|0;lo=lo+Math.imul(al1,bl4)|0;mid=mid+Math.imul(al1,bh4)|0;mid=mid+Math.imul(ah1,bl4)|0;hi=hi+Math.imul(ah1,bh4)|0;lo=lo+Math.imul(al0,bl5)|0;mid=mid+Math.imul(al0,bh5)|0;mid=mid+Math.imul(ah0,bl5)|0;hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0;w5&=67108863;lo=Math.imul(al6,bl0);mid=Math.imul(al6,bh0);mid=mid+Math.imul(ah6,bl0)|0;hi=Math.imul(ah6,bh0);lo=lo+Math.imul(al5,bl1)|0;mid=mid+Math.imul(al5,bh1)|0;mid=mid+Math.imul(ah5,bl1)|0;hi=hi+Math.imul(ah5,bh1)|0;lo=lo+Math.imul(al4,bl2)|0;mid=mid+Math.imul(al4,bh2)|0;mid=mid+Math.imul(ah4,bl2)|0;hi=hi+Math.imul(ah4,bh2)|0;lo=lo+Math.imul(al3,bl3)|0;mid=mid+Math.imul(al3,bh3)|0;mid=mid+Math.imul(ah3,bl3)|0;hi=hi+Math.imul(ah3,bh3)|0;lo=lo+Math.imul(al2,bl4)|0;mid=mid+Math.imul(al2,bh4)|0;mid=mid+Math.imul(ah2,bl4)|0;hi=hi+Math.imul(ah2,bh4)|0;lo=lo+Math.imul(al1,bl5)|0;mid=mid+Math.imul(al1,bh5)|0;mid=mid+Math.imul(ah1,bl5)|0;hi=hi+Math.imul(ah1,bh5)|0;lo=lo+Math.imul(al0,bl6)|0;mid=mid+Math.imul(al0,bh6)|0;mid=mid+Math.imul(ah0,bl6)|0;hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w6>>>26)|0;w6&=67108863;lo=Math.imul(al7,bl0);mid=Math.imul(al7,bh0);mid=mid+Math.imul(ah7,bl0)|0;hi=Math.imul(ah7,bh0);lo=lo+Math.imul(al6,bl1)|0;mid=mid+Math.imul(al6,bh1)|0;mid=mid+Math.imul(ah6,bl1)|0;hi=hi+Math.imul(ah6,bh1)|0;lo=lo+Math.imul(al5,bl2)|0;mid=mid+Math.imul(al5,bh2)|0;mid=mid+Math.imul(ah5,bl2)|0;hi=hi+Math.imul(ah5,bh2)|0;lo=lo+Math.imul(al4,bl3)|0;mid=mid+Math.imul(al4,bh3)|0;mid=mid+Math.imul(ah4,bl3)|0;hi=hi+Math.imul(ah4,bh3)|0;lo=lo+Math.imul(al3,bl4)|0;mid=mid+Math.imul(al3,bh4)|0;mid=mid+Math.imul(ah3,bl4)|0;hi=hi+Math.imul(ah3,bh4)|0;lo=lo+Math.imul(al2,bl5)|0;mid=mid+Math.imul(al2,bh5)|0;mid=mid+Math.imul(ah2,bl5)|0;hi=hi+Math.imul(ah2,bh5)|0;lo=lo+Math.imul(al1,bl6)|0;mid=mid+Math.imul(al1,bh6)|0;mid=mid+Math.imul(ah1,bl6)|0;hi=hi+Math.imul(ah1,bh6)|0;lo=lo+Math.imul(al0,bl7)|0;mid=mid+Math.imul(al0,bh7)|0;mid=mid+Math.imul(ah0,bl7)|0;hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0;w7&=67108863;lo=Math.imul(al8,bl0);mid=Math.imul(al8,bh0);mid=mid+Math.imul(ah8,bl0)|0;hi=Math.imul(ah8,bh0);lo=lo+Math.imul(al7,bl1)|0;mid=mid+Math.imul(al7,bh1)|0;mid=mid+Math.imul(ah7,bl1)|0;hi=hi+Math.imul(ah7,bh1)|0;lo=lo+Math.imul(al6,bl2)|0;mid=mid+Math.imul(al6,bh2)|0;mid=mid+Math.imul(ah6,bl2)|0;hi=hi+Math.imul(ah6,bh2)|0;lo=lo+Math.imul(al5,bl3)|0;mid=mid+Math.imul(al5,bh3)|0;mid=mid+Math.imul(ah5,bl3)|0;hi=hi+Math.imul(ah5,bh3)|0;lo=lo+Math.imul(al4,bl4)|0;mid=mid+Math.imul(al4,bh4)|0;mid=mid+Math.imul(ah4,bl4)|0;hi=hi+Math.imul(ah4,bh4)|0;lo=lo+Math.imul(al3,bl5)|0;mid=mid+Math.imul(al3,bh5)|0;mid=mid+Math.imul(ah3,bl5)|0;hi=hi+Math.imul(ah3,bh5)|0;lo=lo+Math.imul(al2,bl6)|0;mid=mid+Math.imul(al2,bh6)|0;mid=mid+Math.imul(ah2,bl6)|0;hi=hi+Math.imul(ah2,bh6)|0;lo=lo+Math.imul(al1,bl7)|0;mid=mid+Math.imul(al1,bh7)|0;mid=mid+Math.imul(ah1,bl7)|0;hi=hi+Math.imul(ah1,bh7)|0;lo=lo+Math.imul(al0,bl8)|0;mid=mid+Math.imul(al0,bh8)|0;mid=mid+Math.imul(ah0,bl8)|0;hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0;w8&=67108863;lo=Math.imul(al9,bl0);mid=Math.imul(al9,bh0);mid=mid+Math.imul(ah9,bl0)|0;hi=Math.imul(ah9,bh0);lo=lo+Math.imul(al8,bl1)|0;mid=mid+Math.imul(al8,bh1)|0;mid=mid+Math.imul(ah8,bl1)|0;hi=hi+Math.imul(ah8,bh1)|0;lo=lo+Math.imul(al7,bl2)|0;mid=mid+Math.imul(al7,bh2)|0;mid=mid+Math.imul(ah7,bl2)|0;hi=hi+Math.imul(ah7,bh2)|0;lo=lo+Math.imul(al6,bl3)|0;mid=mid+Math.imul(al6,bh3)|0;mid=mid+Math.imul(ah6,bl3)|0;hi=hi+Math.imul(ah6,bh3)|0;lo=lo+Math.imul(al5,bl4)|0;mid=mid+Math.imul(al5,bh4)|0;mid=mid+Math.imul(ah5,bl4)|0;hi=hi+Math.imul(ah5,bh4)|0;lo=lo+Math.imul(al4,bl5)|0;mid=mid+Math.imul(al4,bh5)|0;mid=mid+Math.imul(ah4,bl5)|0;hi=hi+Math.imul(ah4,bh5)|0;lo=lo+Math.imul(al3,bl6)|0;mid=mid+Math.imul(al3,bh6)|0;mid=mid+Math.imul(ah3,bl6)|0;hi=hi+Math.imul(ah3,bh6)|0;lo=lo+Math.imul(al2,bl7)|0;mid=mid+Math.imul(al2,bh7)|0;mid=mid+Math.imul(ah2,bl7)|0;hi=hi+Math.imul(ah2,bh7)|0;lo=lo+Math.imul(al1,bl8)|0;mid=mid+Math.imul(al1,bh8)|0;mid=mid+Math.imul(ah1,bl8)|0;hi=hi+Math.imul(ah1,bh8)|0;lo=lo+Math.imul(al0,bl9)|0;mid=mid+Math.imul(al0,bh9)|0;mid=mid+Math.imul(ah0,bl9)|0;hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0;w9&=67108863;lo=Math.imul(al9,bl1);mid=Math.imul(al9,bh1);mid=mid+Math.imul(ah9,bl1)|0;hi=Math.imul(ah9,bh1);lo=lo+Math.imul(al8,bl2)|0;mid=mid+Math.imul(al8,bh2)|0;mid=mid+Math.imul(ah8,bl2)|0;hi=hi+Math.imul(ah8,bh2)|0;lo=lo+Math.imul(al7,bl3)|0;mid=mid+Math.imul(al7,bh3)|0;mid=mid+Math.imul(ah7,bl3)|0;hi=hi+Math.imul(ah7,bh3)|0;lo=lo+Math.imul(al6,bl4)|0;mid=mid+Math.imul(al6,bh4)|0;mid=mid+Math.imul(ah6,bl4)|0;hi=hi+Math.imul(ah6,bh4)|0;lo=lo+Math.imul(al5,bl5)|0;mid=mid+Math.imul(al5,bh5)|0;mid=mid+Math.imul(ah5,bl5)|0;hi=hi+Math.imul(ah5,bh5)|0;lo=lo+Math.imul(al4,bl6)|0;mid=mid+Math.imul(al4,bh6)|0;mid=mid+Math.imul(ah4,bl6)|0;hi=hi+Math.imul(ah4,bh6)|0;lo=lo+Math.imul(al3,bl7)|0;mid=mid+Math.imul(al3,bh7)|0;mid=mid+Math.imul(ah3,bl7)|0;hi=hi+Math.imul(ah3,bh7)|0;lo=lo+Math.imul(al2,bl8)|0;mid=mid+Math.imul(al2,bh8)|0;mid=mid+Math.imul(ah2,bl8)|0;hi=hi+Math.imul(ah2,bh8)|0;lo=lo+Math.imul(al1,bl9)|0;mid=mid+Math.imul(al1,bh9)|0;mid=mid+Math.imul(ah1,bl9)|0;hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0;w10&=67108863;lo=Math.imul(al9,bl2);mid=Math.imul(al9,bh2);mid=mid+Math.imul(ah9,bl2)|0;hi=Math.imul(ah9,bh2);lo=lo+Math.imul(al8,bl3)|0;mid=mid+Math.imul(al8,bh3)|0;mid=mid+Math.imul(ah8,bl3)|0;hi=hi+Math.imul(ah8,bh3)|0;lo=lo+Math.imul(al7,bl4)|0;mid=mid+Math.imul(al7,bh4)|0;mid=mid+Math.imul(ah7,bl4)|0;hi=hi+Math.imul(ah7,bh4)|0;lo=lo+Math.imul(al6,bl5)|0;mid=mid+Math.imul(al6,bh5)|0;mid=mid+Math.imul(ah6,bl5)|0;hi=hi+Math.imul(ah6,bh5)|0;lo=lo+Math.imul(al5,bl6)|0;mid=mid+Math.imul(al5,bh6)|0;mid=mid+Math.imul(ah5,bl6)|0;hi=hi+Math.imul(ah5,bh6)|0;lo=lo+Math.imul(al4,bl7)|0;mid=mid+Math.imul(al4,bh7)|0;mid=mid+Math.imul(ah4,bl7)|0;hi=hi+Math.imul(ah4,bh7)|0;lo=lo+Math.imul(al3,bl8)|0;mid=mid+Math.imul(al3,bh8)|0;mid=mid+Math.imul(ah3,bl8)|0;hi=hi+Math.imul(ah3,bh8)|0;lo=lo+Math.imul(al2,bl9)|0;mid=mid+Math.imul(al2,bh9)|0;mid=mid+Math.imul(ah2,bl9)|0;hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0;w11&=67108863;lo=Math.imul(al9,bl3);mid=Math.imul(al9,bh3);mid=mid+Math.imul(ah9,bl3)|0;hi=Math.imul(ah9,bh3);lo=lo+Math.imul(al8,bl4)|0;mid=mid+Math.imul(al8,bh4)|0;mid=mid+Math.imul(ah8,bl4)|0;hi=hi+Math.imul(ah8,bh4)|0;lo=lo+Math.imul(al7,bl5)|0;mid=mid+Math.imul(al7,bh5)|0;mid=mid+Math.imul(ah7,bl5)|0;hi=hi+Math.imul(ah7,bh5)|0;lo=lo+Math.imul(al6,bl6)|0;mid=mid+Math.imul(al6,bh6)|0;mid=mid+Math.imul(ah6,bl6)|0;hi=hi+Math.imul(ah6,bh6)|0;lo=lo+Math.imul(al5,bl7)|0;mid=mid+Math.imul(al5,bh7)|0;mid=mid+Math.imul(ah5,bl7)|0;hi=hi+Math.imul(ah5,bh7)|0;lo=lo+Math.imul(al4,bl8)|0;mid=mid+Math.imul(al4,bh8)|0;mid=mid+Math.imul(ah4,bl8)|0;hi=hi+Math.imul(ah4,bh8)|0;lo=lo+Math.imul(al3,bl9)|0;mid=mid+Math.imul(al3,bh9)|0;mid=mid+Math.imul(ah3,bl9)|0;hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0;w12&=67108863;lo=Math.imul(al9,bl4);mid=Math.imul(al9,bh4);mid=mid+Math.imul(ah9,bl4)|0;hi=Math.imul(ah9,bh4);lo=lo+Math.imul(al8,bl5)|0;mid=mid+Math.imul(al8,bh5)|0;mid=mid+Math.imul(ah8,bl5)|0;hi=hi+Math.imul(ah8,bh5)|0;lo=lo+Math.imul(al7,bl6)|0;mid=mid+Math.imul(al7,bh6)|0;mid=mid+Math.imul(ah7,bl6)|0;hi=hi+Math.imul(ah7,bh6)|0;lo=lo+Math.imul(al6,bl7)|0;mid=mid+Math.imul(al6,bh7)|0;mid=mid+Math.imul(ah6,bl7)|0;hi=hi+Math.imul(ah6,bh7)|0;lo=lo+Math.imul(al5,bl8)|0;mid=mid+Math.imul(al5,bh8)|0;mid=mid+Math.imul(ah5,bl8)|0;hi=hi+Math.imul(ah5,bh8)|0;lo=lo+Math.imul(al4,bl9)|0;mid=mid+Math.imul(al4,bh9)|0;mid=mid+Math.imul(ah4,bl9)|0;hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0;w13&=67108863;lo=Math.imul(al9,bl5);mid=Math.imul(al9,bh5);mid=mid+Math.imul(ah9,bl5)|0;hi=Math.imul(ah9,bh5);lo=lo+Math.imul(al8,bl6)|0;mid=mid+Math.imul(al8,bh6)|0;mid=mid+Math.imul(ah8,bl6)|0;hi=hi+Math.imul(ah8,bh6)|0;lo=lo+Math.imul(al7,bl7)|0;mid=mid+Math.imul(al7,bh7)|0;mid=mid+Math.imul(ah7,bl7)|0;hi=hi+Math.imul(ah7,bh7)|0;lo=lo+Math.imul(al6,bl8)|0;mid=mid+Math.imul(al6,bh8)|0;mid=mid+Math.imul(ah6,bl8)|0;hi=hi+Math.imul(ah6,bh8)|0;lo=lo+Math.imul(al5,bl9)|0;mid=mid+Math.imul(al5,bh9)|0;mid=mid+Math.imul(ah5,bl9)|0;hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0;w14&=67108863;lo=Math.imul(al9,bl6);mid=Math.imul(al9,bh6);mid=mid+Math.imul(ah9,bl6)|0;hi=Math.imul(ah9,bh6);lo=lo+Math.imul(al8,bl7)|0;mid=mid+Math.imul(al8,bh7)|0;mid=mid+Math.imul(ah8,bl7)|0;hi=hi+Math.imul(ah8,bh7)|0;lo=lo+Math.imul(al7,bl8)|0;mid=mid+Math.imul(al7,bh8)|0;mid=mid+Math.imul(ah7,bl8)|0;hi=hi+Math.imul(ah7,bh8)|0;lo=lo+Math.imul(al6,bl9)|0;mid=mid+Math.imul(al6,bh9)|0;mid=mid+Math.imul(ah6,bl9)|0;hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0;w15&=67108863;lo=Math.imul(al9,bl7);mid=Math.imul(al9,bh7);mid=mid+Math.imul(ah9,bl7)|0;hi=Math.imul(ah9,bh7);lo=lo+Math.imul(al8,bl8)|0;mid=mid+Math.imul(al8,bh8)|0;mid=mid+Math.imul(ah8,bl8)|0;hi=hi+Math.imul(ah8,bh8)|0;lo=lo+Math.imul(al7,bl9)|0;mid=mid+Math.imul(al7,bh9)|0;mid=mid+Math.imul(ah7,bl9)|0;hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0;w16&=67108863;lo=Math.imul(al9,bl8);mid=Math.imul(al9,bh8);mid=mid+Math.imul(ah9,bl8)|0;hi=Math.imul(ah9,bh8);lo=lo+Math.imul(al8,bl9)|0;mid=mid+Math.imul(al8,bh9)|0;mid=mid+Math.imul(ah8,bl9)|0;hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0;w17&=67108863;lo=Math.imul(al9,bl9);mid=Math.imul(al9,bh9);mid=mid+Math.imul(ah9,bl9)|0;hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w18>>>26)|0;w18&=67108863;o[0]=w0;o[1]=w1;o[2]=w2;o[3]=w3;o[4]=w4;o[5]=w5;o[6]=w6;o[7]=w7;o[8]=w8;o[9]=w9;o[10]=w10;o[11]=w11;o[12]=w12;o[13]=w13;o[14]=w14;o[15]=w15;o[16]=w16;o[17]=w17;o[18]=w18;if(c!==0){o[19]=c;out.length++}return out};if(!Math.imul){comb10MulTo=smallMulTo}function bigMulTo(self,num,out){out.negative=num.negative^self.negative;out.length=self.length+num.length;var carry=0;var hncarry=0;for(var k=0;k>>26)|0;hncarry+=ncarry>>>26;ncarry&=67108863}out.words[k]=rword;carry=ncarry;ncarry=hncarry}if(carry!==0){out.words[k]=carry}else{out.length--}return out.strip()}function jumboMulTo(self,num,out){var fftm=new FFTM;return fftm.mulp(self,num,out)}BN.prototype.mulTo=function mulTo(num,out){var res;var len=this.length+num.length;if(this.length===10&&num.length===10){res=comb10MulTo(this,num,out)}else if(len<63){res=smallMulTo(this,num,out)}else if(len<1024){res=bigMulTo(this,num,out)}else{res=jumboMulTo(this,num,out)}return res};function FFTM(x,y){this.x=x;this.y=y}FFTM.prototype.makeRBT=function makeRBT(N){var t=new Array(N);var l=BN.prototype._countBits(N)-1;for(var i=0;i>=1}return rb};FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i>>1){i++}return 1<>>13;rws[2*i+1]=carry&8191;carry=carry>>>13}for(i=2*len;i>=26;carry+=w/67108864|0;carry+=lo>>>26;this.words[i]=lo&67108863}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.muln=function muln(num){return this.clone().imuln(num)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(num){var w=toBitArray(num);if(w.length===0)return new BN(1);var res=this;for(var i=0;i=0);var r=bits%26;var s=(bits-r)/26;var carryMask=67108863>>>26-r<<26-r;var i;if(r!==0){var carry=0;for(i=0;i>>26-r}if(carry){this.words[i]=carry;this.length++}}if(s!==0){for(i=this.length-1;i>=0;i--){this.words[i+s]=this.words[i]}for(i=0;i=0);var h;if(hint){h=(hint-hint%26)/26}else{h=0}var r=bits%26;var s=Math.min((bits-r)/26,this.length);var mask=67108863^67108863>>>r<s){this.length-=s;for(i=0;i=0&&(carry!==0||i>=h);i--){var word=this.words[i]|0;this.words[i]=carry<<26-r|word>>>r;carry=word&mask}if(maskedWords&&carry!==0){maskedWords.words[maskedWords.length++]=carry}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(bits,hint,extended){assert(this.negative===0);return this.iushrn(bits,hint,extended)};BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)};BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)};BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)};BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)};BN.prototype.testn=function testn(bit){assert(typeof bit==="number"&&bit>=0);var r=bit%26;var s=(bit-r)/26;var q=1<=0);var r=bits%26;var s=(bits-r)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=s){return this}if(r!==0){s++}this.length=Math.min(s,this.length);if(r!==0){var mask=67108863^67108863>>>r<=67108864;i++){this.words[i]-=67108864;if(i===this.length-1){this.words[i+1]=1}else{this.words[i+1]++}}this.length=Math.max(this.length,i+1);return this};BN.prototype.isubn=function isubn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.iaddn(-num);if(this.negative!==0){this.negative=0;this.iaddn(num);this.negative=1;return this}this.words[0]-=num;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var i=0;i>26)-(right/67108864|0);this.words[i+shift]=w&67108863}for(;i>26;this.words[i+shift]=w&67108863}if(carry===0)return this.strip();assert(carry===-1);carry=0;for(i=0;i>26;this.words[i]=w&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=this.length-num.length;var a=this.clone();var b=num;var bhi=b.words[b.length-1]|0;var bhiBits=this._countBits(bhi);shift=26-bhiBits;if(shift!==0){b=b.ushln(shift);a.iushln(shift);bhi=b.words[b.length-1]|0}var m=a.length-b.length;var q;if(mode!=="mod"){q=new BN(null);q.length=m+1;q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=(a.words[b.length+j]|0)*67108864+(a.words[b.length+j-1]|0);qj=Math.min(qj/bhi|0,67108863);a._ishlnsubmul(b,qj,j);while(a.negative!==0){qj--;a.negative=0;a._ishlnsubmul(b,1,j);if(!a.isZero()){a.negative^=1}}if(q){q.words[j]=qj}}if(q){q.strip()}a.strip();if(mode!=="div"&&shift!==0){a.iushrn(shift)}return{div:q||null,mod:a}};BN.prototype.divmod=function divmod(num,mode,positive){assert(!num.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var div,mod,res;if(this.negative!==0&&num.negative===0){res=this.neg().divmod(num,mode);if(mode!=="mod"){div=res.div.neg()}if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.iadd(num)}}return{div:div,mod:mod}}if(this.negative===0&&num.negative!==0){res=this.divmod(num.neg(),mode);if(mode!=="mod"){div=res.div.neg()}return{div:div,mod:res.mod}}if((this.negative&num.negative)!==0){res=this.neg().divmod(num.neg(),mode);if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.isub(num)}}return{div:res.div,mod:mod}}if(num.length>this.length||this.cmp(num)<0){return{div:new BN(0),mod:this}}if(num.length===1){if(mode==="div"){return{div:this.divn(num.words[0]),mod:null}}if(mode==="mod"){return{div:null,mod:new BN(this.modn(num.words[0]))}}return{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}}return this._wordDiv(num,mode)};BN.prototype.div=function div(num){return this.divmod(num,"div",false).div};BN.prototype.mod=function mod(num){return this.divmod(num,"mod",false).mod};BN.prototype.umod=function umod(num){return this.divmod(num,"mod",true).mod};BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=dm.div.negative!==0?dm.mod.isub(num):dm.mod;var half=num.ushrn(1);var r2=num.andln(1);var cmp=mod.cmp(half);if(cmp<0||r2===1&&cmp===0)return dm.div;return dm.div.negative!==0?dm.div.isubn(1):dm.div.iaddn(1)};BN.prototype.modn=function modn(num){assert(num<=67108863);var p=(1<<26)%num;var acc=0;for(var i=this.length-1;i>=0;i--){acc=(p*acc+(this.words[i]|0))%num}return acc};BN.prototype.idivn=function idivn(num){assert(num<=67108863);var carry=0;for(var i=this.length-1;i>=0;i--){var w=(this.words[i]|0)+carry*67108864;this.words[i]=w/num|0;carry=w%num}return this.strip()};BN.prototype.divn=function divn(num){return this.clone().idivn(num)};BN.prototype.egcd=function egcd(p){assert(p.negative===0);assert(!p.isZero());var x=this;var y=p.clone();if(x.negative!==0){x=x.umod(p)}else{x=x.clone()}var A=new BN(1);var B=new BN(0);var C=new BN(0);var D=new BN(1);var g=0;while(x.isEven()&&y.isEven()){x.iushrn(1);y.iushrn(1);++g}var yp=y.clone();var xp=x.clone();while(!x.isZero()){for(var i=0,im=1;(x.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){x.iushrn(i);while(i-- >0){if(A.isOdd()||B.isOdd()){A.iadd(yp);B.isub(xp)}A.iushrn(1);B.iushrn(1)}}for(var j=0,jm=1;(y.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){y.iushrn(j);while(j-- >0){if(C.isOdd()||D.isOdd()){C.iadd(yp);D.isub(xp)}C.iushrn(1);D.iushrn(1)}}if(x.cmp(y)>=0){x.isub(y);A.isub(C);B.isub(D)}else{y.isub(x);C.isub(A);D.isub(B)}}return{a:C,b:D,gcd:y.iushln(g)}};BN.prototype._invmp=function _invmp(p){assert(p.negative===0);assert(!p.isZero());var a=this;var b=p.clone();if(a.negative!==0){a=a.umod(p)}else{a=a.clone()}var x1=new BN(1);var x2=new BN(0);var delta=b.clone();while(a.cmpn(1)>0&&b.cmpn(1)>0){for(var i=0,im=1;(a.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){a.iushrn(i);while(i-- >0){if(x1.isOdd()){x1.iadd(delta)}x1.iushrn(1)}}for(var j=0,jm=1;(b.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){b.iushrn(j);while(j-- >0){if(x2.isOdd()){x2.iadd(delta)}x2.iushrn(1)}}if(a.cmp(b)>=0){a.isub(b);x1.isub(x2)}else{b.isub(a);x2.isub(x1)}}var res;if(a.cmpn(1)===0){res=x1}else{res=x2}if(res.cmpn(0)<0){res.iadd(p)}return res};BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone();var b=num.clone();a.negative=0;b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++){a.iushrn(1);b.iushrn(1)}do{while(a.isEven()){a.iushrn(1)}while(b.isEven()){b.iushrn(1)}var r=a.cmp(b);if(r<0){var t=a;a=b;b=t}else if(r===0||b.cmpn(1)===0){break}a.isub(b)}while(true);return b.iushln(shift)};BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(num){return this.words[0]&num};BN.prototype.bincn=function bincn(bit){assert(typeof bit==="number");var r=bit%26;var s=(bit-r)/26;var q=1<>>26;w&=67108863;this.words[i]=w}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(num){var negative=num<0;if(this.negative!==0&&!negative)return-1;if(this.negative===0&&negative)return 1;this.strip();var res;if(this.length>1){res=1}else{if(negative){num=-num}assert(num<=67108863,"Number is too big");var w=this.words[0]|0;res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=this.words[i]|0;var b=num.words[i]|0;if(a===b)continue;if(ab){res=1}break}return res};BN.prototype.gtn=function gtn(num){return this.cmpn(num)===1};BN.prototype.gt=function gt(num){return this.cmp(num)===1};BN.prototype.gten=function gten(num){return this.cmpn(num)>=0};BN.prototype.gte=function gte(num){return this.cmp(num)>=0};BN.prototype.ltn=function ltn(num){return this.cmpn(num)===-1};BN.prototype.lt=function lt(num){return this.cmp(num)===-1};BN.prototype.lten=function lten(num){return this.cmpn(num)<=0};BN.prototype.lte=function lte(num){return this.cmp(num)<=0};BN.prototype.eqn=function eqn(num){return this.cmpn(num)===0};BN.prototype.eq=function eq(num){return this.cmp(num)===0};BN.red=function red(num){return new Red(num)};BN.prototype.toRed=function toRed(ctx){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ctx.convertTo(this)._forceRed(ctx)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ctx){this.red=ctx;return this};BN.prototype.forceRed=function forceRed(ctx){assert(!this.red,"Already a number in reduction context");return this._forceRed(ctx)};BN.prototype.redAdd=function redAdd(num){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,num)};BN.prototype.redIAdd=function redIAdd(num){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,num)};BN.prototype.redSub=function redSub(num){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,num)};BN.prototype.redISub=function redISub(num){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,num)};BN.prototype.redShl=function redShl(num){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,num)};BN.prototype.redMul=function redMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.mul(this,num)};BN.prototype.redIMul=function redIMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.imul(this,num)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(num){assert(this.red&&!num.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name;this.p=new BN(p,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);tmp.words=new Array(Math.ceil(this.n/13));return tmp};MPrime.prototype.ireduce=function ireduce(num){var r=num;var rlen;do{this.split(r,this.tmp);r=this.imulK(r);r=r.iadd(this.tmp);rlen=r.bitLength()}while(rlen>this.n);var cmp=rlen0){r.isub(this.p)}else{if(r.strip!==undefined){r.strip()}else{r._strip()}}return r};MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)};MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(input,output){var mask=4194303;var outLen=Math.min(input.length,9);for(var i=0;i>>22;prev=next}prev>>>=22;input.words[i-10]=prev;if(prev===0&&input.length>10){input.length-=10}else{input.length-=9}};K256.prototype.imulK=function imulK(num){num.words[num.length]=0;num.words[num.length+1]=0;num.length+=2;var lo=0;for(var i=0;i>>=26;num.words[i]=lo;carry=hi}if(carry!==0){num.words[num.length++]=carry}return num};BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if(name==="k256"){prime=new K256}else if(name==="p224"){prime=new P224}else if(name==="p192"){prime=new P192}else if(name==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+name)}primes[name]=prime;return prime};function Red(m){if(typeof m==="string"){var prime=BN._prime(m);this.m=prime.p;this.prime=prime}else{assert(m.gtn(1),"modulus must be greater than 1");this.m=m;this.prime=null}}Red.prototype._verify1=function _verify1(a){assert(a.negative===0,"red works only with positives");assert(a.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(a,b){assert((a.negative|b.negative)===0,"red works only with positives");assert(a.red&&a.red===b.red,"red works only with red numbers")};Red.prototype.imod=function imod(a){if(this.prime)return this.prime.ireduce(a)._forceRed(this);return a.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(a){if(a.isZero()){return a.clone()}return this.m.sub(a)._forceRed(this)};Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res._forceRed(this)};Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res};Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res._forceRed(this)};Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res};Red.prototype.shl=function shl(a,num){this._verify1(a);return this.imod(a.ushln(num))};Red.prototype.imul=function imul(a,b){this._verify2(a,b);return this.imod(a.imul(b))};Red.prototype.mul=function mul(a,b){this._verify2(a,b);return this.imod(a.mul(b))};Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())};Red.prototype.sqr=function sqr(a){return this.mul(a,a)};Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);assert(mod3%2===1);if(mod3===3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}var q=this.m.subn(1);var s=0;while(!q.isZero()&&q.andln(1)===0){s++;q.iushrn(1)}assert(!q.isZero());var one=new BN(1).toRed(this);var nOne=one.redNeg();var lpow=this.m.subn(1).iushrn(1);var z=this.m.bitLength();z=new BN(2*z*z).toRed(this);while(this.pow(z,lpow).cmp(nOne)!==0){z.redIAdd(nOne)}var c=this.pow(z,q);var r=this.pow(a,q.addn(1).iushrn(1));var t=this.pow(a,q);var m=s;while(t.cmp(one)!==0){var tmp=t;for(var i=0;tmp.cmp(one)!==0;i++){tmp=tmp.redSqr()}assert(i=0;i--){var word=num.words[i];for(var j=start-1;j>=0;j--){var bit=word>>j&1;if(res!==wnd[0]){res=this.sqr(res)}if(bit===0&¤t===0){currentLen=0;continue}current<<=1;current|=bit;currentLen++;if(currentLen!==windowSize&&(i!==0||j!==0))continue;res=this.mul(res,wnd[current]);currentLen=0;current=0}start=26}return res};Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r};Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();res.red=null;return res};BN.mont=function mont(num){return new Mont(num)};function Mont(m){Red.call(this,m);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));r.red=null;return r};Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero()){a.words[0]=0;a.length=1;return a}var t=a.imul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.invm=function invm(a){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}})("object"==="undefined"||module,commonjsGlobal)});var _version=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="logger/5.5.0"});var _version$1=getDefaultExportFromCjs(_version);var lib=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Logger=exports.ErrorCode=exports.LogLevel=void 0;var _permanentCensorErrors=false;var _censorErrors=false;var LogLevels={debug:1,default:2,info:2,warning:3,error:4,off:5};var _logLevel=LogLevels["default"];var _globalLogger=null;function _checkNormalize(){try{var missing_1=[];["NFD","NFC","NFKD","NFKC"].forEach(function(form){try{if("test".normalize(form)!=="test"){throw new Error("bad normalize")}}catch(error){missing_1.push(form)}});if(missing_1.length){throw new Error("missing "+missing_1.join(", "))}if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769)){throw new Error("broken implementation")}}catch(error){return error.message}return null}var _normalizeError=_checkNormalize();var LogLevel;(function(LogLevel){LogLevel["DEBUG"]="DEBUG";LogLevel["INFO"]="INFO";LogLevel["WARNING"]="WARNING";LogLevel["ERROR"]="ERROR";LogLevel["OFF"]="OFF"})(LogLevel=exports.LogLevel||(exports.LogLevel={}));var ErrorCode;(function(ErrorCode){ErrorCode["UNKNOWN_ERROR"]="UNKNOWN_ERROR";ErrorCode["NOT_IMPLEMENTED"]="NOT_IMPLEMENTED";ErrorCode["UNSUPPORTED_OPERATION"]="UNSUPPORTED_OPERATION";ErrorCode["NETWORK_ERROR"]="NETWORK_ERROR";ErrorCode["SERVER_ERROR"]="SERVER_ERROR";ErrorCode["TIMEOUT"]="TIMEOUT";ErrorCode["BUFFER_OVERRUN"]="BUFFER_OVERRUN";ErrorCode["NUMERIC_FAULT"]="NUMERIC_FAULT";ErrorCode["MISSING_NEW"]="MISSING_NEW";ErrorCode["INVALID_ARGUMENT"]="INVALID_ARGUMENT";ErrorCode["MISSING_ARGUMENT"]="MISSING_ARGUMENT";ErrorCode["UNEXPECTED_ARGUMENT"]="UNEXPECTED_ARGUMENT";ErrorCode["CALL_EXCEPTION"]="CALL_EXCEPTION";ErrorCode["INSUFFICIENT_FUNDS"]="INSUFFICIENT_FUNDS";ErrorCode["NONCE_EXPIRED"]="NONCE_EXPIRED";ErrorCode["REPLACEMENT_UNDERPRICED"]="REPLACEMENT_UNDERPRICED";ErrorCode["UNPREDICTABLE_GAS_LIMIT"]="UNPREDICTABLE_GAS_LIMIT";ErrorCode["TRANSACTION_REPLACED"]="TRANSACTION_REPLACED"})(ErrorCode=exports.ErrorCode||(exports.ErrorCode={}));var HEX="0123456789abcdef";var Logger=function(){function Logger(version){Object.defineProperty(this,"version",{enumerable:true,value:version,writable:false})}Logger.prototype._log=function(logLevel,args){var level=logLevel.toLowerCase();if(LogLevels[level]==null){this.throwArgumentError("invalid log level name","logLevel",logLevel)}if(_logLevel>LogLevels[level]){return}console.log.apply(console,args)};Logger.prototype.debug=function(){var args=[];for(var _i=0;_i>4];hex+=HEX[value[i]&15]}messageDetails.push(key+"=Uint8Array(0x"+hex+")")}else{messageDetails.push(key+"="+JSON.stringify(value))}}catch(error){messageDetails.push(key+"="+JSON.stringify(params[key].toString()))}});messageDetails.push("code="+code);messageDetails.push("version="+this.version);var reason=message;if(messageDetails.length){message+=" ("+messageDetails.join(", ")+")"}var error=new Error(message);error.reason=reason;error.code=code;Object.keys(params).forEach(function(key){error[key]=params[key]});return error};Logger.prototype.throwError=function(message,code,params){throw this.makeError(message,code,params)};Logger.prototype.throwArgumentError=function(message,name,value){return this.throwError(message,Logger.errors.INVALID_ARGUMENT,{argument:name,value:value})};Logger.prototype.assert=function(condition,message,code,params){if(!!condition){return}this.throwError(message,code,params)};Logger.prototype.assertArgument=function(condition,message,name,value){if(!!condition){return}this.throwArgumentError(message,name,value)};Logger.prototype.checkNormalize=function(message){if(message==null){message="platform missing String.prototype.normalize"}if(_normalizeError){this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:_normalizeError})}};Logger.prototype.checkSafeUint53=function(value,message){if(typeof value!=="number"){return}if(message==null){message="value not safe"}if(value<0||value>=9007199254740991){this.throwError(message,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:value})}if(value%1){this.throwError(message,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:value})}};Logger.prototype.checkArgumentCount=function(count,expectedCount,message){if(message){message=": "+message}else{message=""}if(countexpectedCount){this.throwError("too many arguments"+message,Logger.errors.UNEXPECTED_ARGUMENT,{count:count,expectedCount:expectedCount})}};Logger.prototype.checkNew=function(target,kind){if(target===Object||target==null){this.throwError("missing new",Logger.errors.MISSING_NEW,{name:kind.name})}};Logger.prototype.checkAbstract=function(target,kind){if(target===kind){this.throwError("cannot instantiate abstract class "+JSON.stringify(kind.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:target.name,operation:"new"})}else if(target===Object||target==null){this.throwError("missing new",Logger.errors.MISSING_NEW,{name:kind.name})}};Logger.globalLogger=function(){if(!_globalLogger){_globalLogger=new Logger(_version.version)}return _globalLogger};Logger.setCensorship=function(censorship,permanent){if(!censorship&&permanent){this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}if(_permanentCensorErrors){if(!censorship){return}this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}_censorErrors=!!censorship;_permanentCensorErrors=!!permanent};Logger.setLogLevel=function(logLevel){var level=LogLevels[logLevel.toLowerCase()];if(level==null){Logger.globalLogger().warn("invalid log level - "+logLevel);return}_logLevel=level};Logger.from=function(version){return new Logger(version)};Logger.errors=ErrorCode;Logger.levels=LogLevel;return Logger}();exports.Logger=Logger});var index=getDefaultExportFromCjs(lib);var _version$2=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="bytes/5.5.0"});var _version$3=getDefaultExportFromCjs(_version$2);var lib$1=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.joinSignature=exports.splitSignature=exports.hexZeroPad=exports.hexStripZeros=exports.hexValue=exports.hexConcat=exports.hexDataSlice=exports.hexDataLength=exports.hexlify=exports.isHexString=exports.zeroPad=exports.stripZeros=exports.concat=exports.arrayify=exports.isBytes=exports.isBytesLike=void 0;var logger=new lib.Logger(_version$2.version);function isHexable(value){return!!value.toHexString}function addSlice(array){if(array.slice){return array}array.slice=function(){var args=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(array,args)))};return array}function isBytesLike(value){return isHexString(value)&&!(value.length%2)||isBytes(value)}exports.isBytesLike=isBytesLike;function isInteger(value){return typeof value==="number"&&value==value&&value%1===0}function isBytes(value){if(value==null){return false}if(value.constructor===Uint8Array){return true}if(typeof value==="string"){return false}if(!isInteger(value.length)||value.length<0){return false}for(var i=0;i=256){return false}}return true}exports.isBytes=isBytes;function arrayify(value,options){if(!options){options={}}if(typeof value==="number"){logger.checkSafeUint53(value,"invalid arrayify value");var result=[];while(value){result.unshift(value&255);value=parseInt(String(value/256))}if(result.length===0){result.push(0)}return addSlice(new Uint8Array(result))}if(options.allowMissingPrefix&&typeof value==="string"&&value.substring(0,2)!=="0x"){value="0x"+value}if(isHexable(value)){value=value.toHexString()}if(isHexString(value)){var hex=value.substring(2);if(hex.length%2){if(options.hexPad==="left"){hex="0x0"+hex.substring(2)}else if(options.hexPad==="right"){hex+="0"}else{logger.throwArgumentError("hex data is odd-length","value",value)}}var result=[];for(var i=0;ilength){logger.throwArgumentError("value out of range","value",arguments[0])}var result=new Uint8Array(length);result.set(value,length-value.length);return addSlice(result)}exports.zeroPad=zeroPad;function isHexString(value,length){if(typeof value!=="string"||!value.match(/^0x[0-9A-Fa-f]*$/)){return false}if(length&&value.length!==2+2*length){return false}return true}exports.isHexString=isHexString;var HexCharacters="0123456789abcdef";function hexlify(value,options){if(!options){options={}}if(typeof value==="number"){logger.checkSafeUint53(value,"invalid hexlify value");var hex="";while(value){hex=HexCharacters[value&15]+hex;value=Math.floor(value/16)}if(hex.length){if(hex.length%2){hex="0"+hex}return"0x"+hex}return"0x00"}if(typeof value==="bigint"){value=value.toString(16);if(value.length%2){return"0x0"+value}return"0x"+value}if(options.allowMissingPrefix&&typeof value==="string"&&value.substring(0,2)!=="0x"){value="0x"+value}if(isHexable(value)){return value.toHexString()}if(isHexString(value)){if(value.length%2){if(options.hexPad==="left"){value="0x0"+value.substring(2)}else if(options.hexPad==="right"){value+="0"}else{logger.throwArgumentError("hex data is odd-length","value",value)}}return value.toLowerCase()}if(isBytes(value)){var result="0x";for(var i=0;i>4]+HexCharacters[v&15]}return result}return logger.throwArgumentError("invalid hexlify value","value",value)}exports.hexlify=hexlify;function hexDataLength(data){if(typeof data!=="string"){data=hexlify(data)}else if(!isHexString(data)||data.length%2){return null}return(data.length-2)/2}exports.hexDataLength=hexDataLength;function hexDataSlice(data,offset,endOffset){if(typeof data!=="string"){data=hexlify(data)}else if(!isHexString(data)||data.length%2){logger.throwArgumentError("invalid hexData","value",data)}offset=2+2*offset;if(endOffset!=null){return"0x"+data.substring(offset,2+2*endOffset)}return"0x"+data.substring(offset)}exports.hexDataSlice=hexDataSlice;function hexConcat(items){var result="0x";items.forEach(function(item){result+=hexlify(item).substring(2)});return result}exports.hexConcat=hexConcat;function hexValue(value){var trimmed=hexStripZeros(hexlify(value,{hexPad:"left"}));if(trimmed==="0x"){return"0x0"}return trimmed}exports.hexValue=hexValue;function hexStripZeros(value){if(typeof value!=="string"){value=hexlify(value)}if(!isHexString(value)){logger.throwArgumentError("invalid hex string","value",value)}value=value.substring(2);var offset=0;while(offset2*length+2){logger.throwArgumentError("value out of range","value",arguments[1])}while(value.length<2*length+2){value="0x0"+value.substring(2)}return value}exports.hexZeroPad=hexZeroPad;function splitSignature(signature){var result={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(isBytesLike(signature)){var bytes=arrayify(signature);if(bytes.length!==65){logger.throwArgumentError("invalid signature string; must be 65 bytes","signature",signature)}result.r=hexlify(bytes.slice(0,32));result.s=hexlify(bytes.slice(32,64));result.v=bytes[64];if(result.v<27){if(result.v===0||result.v===1){result.v+=27}else{logger.throwArgumentError("signature invalid v byte","signature",signature)}}result.recoveryParam=1-result.v%2;if(result.recoveryParam){bytes[32]|=128}result._vs=hexlify(bytes.slice(32,64))}else{result.r=signature.r;result.s=signature.s;result.v=signature.v;result.recoveryParam=signature.recoveryParam;result._vs=signature._vs;if(result._vs!=null){var vs_1=zeroPad(arrayify(result._vs),32);result._vs=hexlify(vs_1);var recoveryParam=vs_1[0]>=128?1:0;if(result.recoveryParam==null){result.recoveryParam=recoveryParam}else if(result.recoveryParam!==recoveryParam){logger.throwArgumentError("signature recoveryParam mismatch _vs","signature",signature)}vs_1[0]&=127;var s=hexlify(vs_1);if(result.s==null){result.s=s}else if(result.s!==s){logger.throwArgumentError("signature v mismatch _vs","signature",signature)}}if(result.recoveryParam==null){if(result.v==null){logger.throwArgumentError("signature missing v and recoveryParam","signature",signature)}else if(result.v===0||result.v===1){result.recoveryParam=result.v}else{result.recoveryParam=1-result.v%2}}else{if(result.v==null){result.v=27+result.recoveryParam}else{var recId=result.v===0||result.v===1?result.v:1-result.v%2;if(result.recoveryParam!==recId){logger.throwArgumentError("signature recoveryParam mismatch v","signature",signature)}}}if(result.r==null||!isHexString(result.r)){logger.throwArgumentError("signature missing or invalid r","signature",signature)}else{result.r=hexZeroPad(result.r,32)}if(result.s==null||!isHexString(result.s)){logger.throwArgumentError("signature missing or invalid s","signature",signature)}else{result.s=hexZeroPad(result.s,32)}var vs=arrayify(result.s);if(vs[0]>=128){logger.throwArgumentError("signature s out of range","signature",signature)}if(result.recoveryParam){vs[0]|=128}var _vs=hexlify(vs);if(result._vs){if(!isHexString(result._vs)){logger.throwArgumentError("signature invalid _vs","signature",signature)}result._vs=hexZeroPad(result._vs,32)}if(result._vs==null){result._vs=_vs}else if(result._vs!==_vs){logger.throwArgumentError("signature _vs mismatch v and s","signature",signature)}}return result}exports.splitSignature=splitSignature;function joinSignature(signature){signature=splitSignature(signature);return hexlify(concat([signature.r,signature.s,signature.recoveryParam?"0x1c":"0x1b"]))}exports.joinSignature=joinSignature});var index$1=getDefaultExportFromCjs(lib$1);var _version$4=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="bignumber/5.5.0"});var _version$5=getDefaultExportFromCjs(_version$4);var bignumber=createCommonjsModule(function(module,exports){"use strict";var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports._base16To36=exports._base36To16=exports.BigNumber=exports.isBigNumberish=void 0;var bn_js_1=__importDefault(bn);var BN=bn_js_1.default.BN;var logger=new lib.Logger(_version$4.version);var _constructorGuard={};var MAX_SAFE=9007199254740991;function isBigNumberish(value){return value!=null&&(BigNumber.isBigNumber(value)||typeof value==="number"&&value%1===0||typeof value==="string"&&!!value.match(/^-?[0-9]+$/)||(0,lib$1.isHexString)(value)||typeof value==="bigint"||(0,lib$1.isBytes)(value))}exports.isBigNumberish=isBigNumberish;var _warnedToStringRadix=false;var BigNumber=function(){function BigNumber(constructorGuard,hex){var _newTarget=this.constructor;logger.checkNew(_newTarget,BigNumber);if(constructorGuard!==_constructorGuard){logger.throwError("cannot call constructor directly; use BigNumber.from",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"})}this._hex=hex;this._isBigNumber=true;Object.freeze(this)}BigNumber.prototype.fromTwos=function(value){return toBigNumber(toBN(this).fromTwos(value))};BigNumber.prototype.toTwos=function(value){return toBigNumber(toBN(this).toTwos(value))};BigNumber.prototype.abs=function(){if(this._hex[0]==="-"){return BigNumber.from(this._hex.substring(1))}return this};BigNumber.prototype.add=function(other){return toBigNumber(toBN(this).add(toBN(other)))};BigNumber.prototype.sub=function(other){return toBigNumber(toBN(this).sub(toBN(other)))};BigNumber.prototype.div=function(other){var o=BigNumber.from(other);if(o.isZero()){throwFault("division by zero","div")}return toBigNumber(toBN(this).div(toBN(other)))};BigNumber.prototype.mul=function(other){return toBigNumber(toBN(this).mul(toBN(other)))};BigNumber.prototype.mod=function(other){var value=toBN(other);if(value.isNeg()){throwFault("cannot modulo negative values","mod")}return toBigNumber(toBN(this).umod(value))};BigNumber.prototype.pow=function(other){var value=toBN(other);if(value.isNeg()){throwFault("cannot raise to negative values","pow")}return toBigNumber(toBN(this).pow(value))};BigNumber.prototype.and=function(other){var value=toBN(other);if(this.isNegative()||value.isNeg()){throwFault("cannot 'and' negative values","and")}return toBigNumber(toBN(this).and(value))};BigNumber.prototype.or=function(other){var value=toBN(other);if(this.isNegative()||value.isNeg()){throwFault("cannot 'or' negative values","or")}return toBigNumber(toBN(this).or(value))};BigNumber.prototype.xor=function(other){var value=toBN(other);if(this.isNegative()||value.isNeg()){throwFault("cannot 'xor' negative values","xor")}return toBigNumber(toBN(this).xor(value))};BigNumber.prototype.mask=function(value){if(this.isNegative()||value<0){throwFault("cannot mask negative values","mask")}return toBigNumber(toBN(this).maskn(value))};BigNumber.prototype.shl=function(value){if(this.isNegative()||value<0){throwFault("cannot shift negative values","shl")}return toBigNumber(toBN(this).shln(value))};BigNumber.prototype.shr=function(value){if(this.isNegative()||value<0){throwFault("cannot shift negative values","shr")}return toBigNumber(toBN(this).shrn(value))};BigNumber.prototype.eq=function(other){return toBN(this).eq(toBN(other))};BigNumber.prototype.lt=function(other){return toBN(this).lt(toBN(other))};BigNumber.prototype.lte=function(other){return toBN(this).lte(toBN(other))};BigNumber.prototype.gt=function(other){return toBN(this).gt(toBN(other))};BigNumber.prototype.gte=function(other){return toBN(this).gte(toBN(other))};BigNumber.prototype.isNegative=function(){return this._hex[0]==="-"};BigNumber.prototype.isZero=function(){return toBN(this).isZero()};BigNumber.prototype.toNumber=function(){try{return toBN(this).toNumber()}catch(error){throwFault("overflow","toNumber",this.toString())}return null};BigNumber.prototype.toBigInt=function(){try{return BigInt(this.toString())}catch(e){}return logger.throwError("this platform does not support BigInt",lib.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})};BigNumber.prototype.toString=function(){if(arguments.length>0){if(arguments[0]===10){if(!_warnedToStringRadix){_warnedToStringRadix=true;logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")}}else if(arguments[0]===16){logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",lib.Logger.errors.UNEXPECTED_ARGUMENT,{})}else{logger.throwError("BigNumber.toString does not accept parameters",lib.Logger.errors.UNEXPECTED_ARGUMENT,{})}}return toBN(this).toString(10)};BigNumber.prototype.toHexString=function(){return this._hex};BigNumber.prototype.toJSON=function(key){return{type:"BigNumber",hex:this.toHexString()}};BigNumber.from=function(value){if(value instanceof BigNumber){return value}if(typeof value==="string"){if(value.match(/^-?0x[0-9a-f]+$/i)){return new BigNumber(_constructorGuard,toHex(value))}if(value.match(/^-?[0-9]+$/)){return new BigNumber(_constructorGuard,toHex(new BN(value)))}return logger.throwArgumentError("invalid BigNumber string","value",value)}if(typeof value==="number"){if(value%1){throwFault("underflow","BigNumber.from",value)}if(value>=MAX_SAFE||value<=-MAX_SAFE){throwFault("overflow","BigNumber.from",value)}return BigNumber.from(String(value))}var anyValue=value;if(typeof anyValue==="bigint"){return BigNumber.from(anyValue.toString())}if((0,lib$1.isBytes)(anyValue)){return BigNumber.from((0,lib$1.hexlify)(anyValue))}if(anyValue){if(anyValue.toHexString){var hex=anyValue.toHexString();if(typeof hex==="string"){return BigNumber.from(hex)}}else{var hex=anyValue._hex;if(hex==null&&anyValue.type==="BigNumber"){hex=anyValue.hex}if(typeof hex==="string"){if((0,lib$1.isHexString)(hex)||hex[0]==="-"&&(0,lib$1.isHexString)(hex.substring(1))){return BigNumber.from(hex)}}}}return logger.throwArgumentError("invalid BigNumber value","value",value)};BigNumber.isBigNumber=function(value){return!!(value&&value._isBigNumber)};return BigNumber}();exports.BigNumber=BigNumber;function toHex(value){if(typeof value!=="string"){return toHex(value.toString(16))}if(value[0]==="-"){value=value.substring(1);if(value[0]==="-"){logger.throwArgumentError("invalid hex","value",value)}value=toHex(value);if(value==="0x00"){return value}return"-"+value}if(value.substring(0,2)!=="0x"){value="0x"+value}if(value==="0x"){return"0x00"}if(value.length%2){value="0x0"+value.substring(2)}while(value.length>4&&value.substring(0,4)==="0x00"){value="0x"+value.substring(4)}return value}function toBigNumber(value){return BigNumber.from(toHex(value))}function toBN(value){var hex=BigNumber.from(value).toHexString();if(hex[0]==="-"){return new BN("-"+hex.substring(3),16)}return new BN(hex.substring(2),16)}function throwFault(fault,operation,value){var params={fault:fault,operation:operation};if(value!=null){params.value=value}return logger.throwError(fault,lib.Logger.errors.NUMERIC_FAULT,params)}function _base36To16(value){return new BN(value,36).toString(16)}exports._base36To16=_base36To16;function _base16To36(value){return new BN(value,16).toString(36)}exports._base16To36=_base16To36});var bignumber$1=getDefaultExportFromCjs(bignumber);var fixednumber=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.FixedNumber=exports.FixedFormat=exports.parseFixed=exports.formatFixed=void 0;var logger=new lib.Logger(_version$4.version);var _constructorGuard={};var Zero=bignumber.BigNumber.from(0);var NegativeOne=bignumber.BigNumber.from(-1);function throwFault(message,fault,operation,value){var params={fault:fault,operation:operation};if(value!==undefined){params.value=value}return logger.throwError(message,lib.Logger.errors.NUMERIC_FAULT,params)}var zeros="0";while(zeros.length<256){zeros+=zeros}function getMultiplier(decimals){if(typeof decimals!=="number"){try{decimals=bignumber.BigNumber.from(decimals).toNumber()}catch(e){}}if(typeof decimals==="number"&&decimals>=0&&decimals<=256&&!(decimals%1)){return"1"+zeros.substring(0,decimals)}return logger.throwArgumentError("invalid decimal size","decimals",decimals)}function formatFixed(value,decimals){if(decimals==null){decimals=0}var multiplier=getMultiplier(decimals);value=bignumber.BigNumber.from(value);var negative=value.lt(Zero);if(negative){value=value.mul(NegativeOne)}var fraction=value.mod(multiplier).toString();while(fraction.length2){logger.throwArgumentError("too many decimal points","value",value)}var whole=comps[0],fraction=comps[1];if(!whole){whole="0"}if(!fraction){fraction="0"}while(fraction[fraction.length-1]==="0"){fraction=fraction.substring(0,fraction.length-1)}if(fraction.length>multiplier.length-1){throwFault("fractional component exceeds decimals","underflow","parseFixed")}if(fraction===""){fraction="0"}while(fraction.length80){logger.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",decimals)}return new FixedFormat(_constructorGuard,signed,width,decimals)};return FixedFormat}();exports.FixedFormat=FixedFormat;var FixedNumber=function(){function FixedNumber(constructorGuard,hex,value,format){var _newTarget=this.constructor;logger.checkNew(_newTarget,FixedNumber);if(constructorGuard!==_constructorGuard){logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"})}this.format=format;this._hex=hex;this._value=value;this._isFixedNumber=true;Object.freeze(this)}FixedNumber.prototype._checkFormat=function(other){if(this.format.name!==other.format.name){logger.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",other)}};FixedNumber.prototype.addUnsafe=function(other){this._checkFormat(other);var a=parseFixed(this._value,this.format.decimals);var b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.add(b),this.format.decimals,this.format)};FixedNumber.prototype.subUnsafe=function(other){this._checkFormat(other);var a=parseFixed(this._value,this.format.decimals);var b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.sub(b),this.format.decimals,this.format)};FixedNumber.prototype.mulUnsafe=function(other){this._checkFormat(other);var a=parseFixed(this._value,this.format.decimals);var b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier),this.format.decimals,this.format)};FixedNumber.prototype.divUnsafe=function(other){this._checkFormat(other);var a=parseFixed(this._value,this.format.decimals);var b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b),this.format.decimals,this.format)};FixedNumber.prototype.floor=function(){var comps=this.toString().split(".");if(comps.length===1){comps.push("0")}var result=FixedNumber.from(comps[0],this.format);var hasFraction=!comps[1].match(/^(0*)$/);if(this.isNegative()&&hasFraction){result=result.subUnsafe(ONE.toFormat(result.format))}return result};FixedNumber.prototype.ceiling=function(){var comps=this.toString().split(".");if(comps.length===1){comps.push("0")}var result=FixedNumber.from(comps[0],this.format);var hasFraction=!comps[1].match(/^(0*)$/);if(!this.isNegative()&&hasFraction){result=result.addUnsafe(ONE.toFormat(result.format))}return result};FixedNumber.prototype.round=function(decimals){if(decimals==null){decimals=0}var comps=this.toString().split(".");if(comps.length===1){comps.push("0")}if(decimals<0||decimals>80||decimals%1){logger.throwArgumentError("invalid decimal count","decimals",decimals)}if(comps[1].length<=decimals){return this}var factor=FixedNumber.from("1"+zeros.substring(0,decimals),this.format);var bump=BUMP.toFormat(this.format);return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor)};FixedNumber.prototype.isZero=function(){return this._value==="0.0"||this._value==="0"};FixedNumber.prototype.isNegative=function(){return this._value[0]==="-"};FixedNumber.prototype.toString=function(){return this._value};FixedNumber.prototype.toHexString=function(width){if(width==null){return this._hex}if(width%8){logger.throwArgumentError("invalid byte width","width",width)}var hex=bignumber.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();return(0,lib$1.hexZeroPad)(hex,width/8)};FixedNumber.prototype.toUnsafeFloat=function(){return parseFloat(this.toString())};FixedNumber.prototype.toFormat=function(format){return FixedNumber.fromString(this._value,format)};FixedNumber.fromValue=function(value,decimals,format){if(format==null&&decimals!=null&&!(0,bignumber.isBigNumberish)(decimals)){format=decimals;decimals=null}if(decimals==null){decimals=0}if(format==null){format="fixed"}return FixedNumber.fromString(formatFixed(value,decimals),FixedFormat.from(format))};FixedNumber.fromString=function(value,format){if(format==null){format="fixed"}var fixedFormat=FixedFormat.from(format);var numeric=parseFixed(value,fixedFormat.decimals);if(!fixedFormat.signed&&numeric.lt(Zero)){throwFault("unsigned value cannot be negative","overflow","value",value)}var hex=null;if(fixedFormat.signed){hex=numeric.toTwos(fixedFormat.width).toHexString()}else{hex=numeric.toHexString();hex=(0,lib$1.hexZeroPad)(hex,fixedFormat.width/8)}var decimal=formatFixed(numeric,fixedFormat.decimals);return new FixedNumber(_constructorGuard,hex,decimal,fixedFormat)};FixedNumber.fromBytes=function(value,format){if(format==null){format="fixed"}var fixedFormat=FixedFormat.from(format);if((0,lib$1.arrayify)(value).length>fixedFormat.width/8){throw new Error("overflow")}var numeric=bignumber.BigNumber.from(value);if(fixedFormat.signed){numeric=numeric.fromTwos(fixedFormat.width)}var hex=numeric.toTwos((fixedFormat.signed?0:1)+fixedFormat.width).toHexString();var decimal=formatFixed(numeric,fixedFormat.decimals);return new FixedNumber(_constructorGuard,hex,decimal,fixedFormat)};FixedNumber.from=function(value,format){if(typeof value==="string"){return FixedNumber.fromString(value,format)}if((0,lib$1.isBytes)(value)){return FixedNumber.fromBytes(value,format)}try{return FixedNumber.fromValue(value,0,format)}catch(error){if(error.code!==lib.Logger.errors.INVALID_ARGUMENT){throw error}}return logger.throwArgumentError("invalid FixedNumber value","value",value)};FixedNumber.isFixedNumber=function(value){return!!(value&&value._isFixedNumber)};return FixedNumber}();exports.FixedNumber=FixedNumber;var ONE=FixedNumber.from(1);var BUMP=FixedNumber.from("0.5")});var fixednumber$1=getDefaultExportFromCjs(fixednumber);var lib$2=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports._base36To16=exports._base16To36=exports.parseFixed=exports.FixedNumber=exports.FixedFormat=exports.formatFixed=exports.BigNumber=void 0;Object.defineProperty(exports,"BigNumber",{enumerable:true,get:function(){return bignumber.BigNumber}});Object.defineProperty(exports,"formatFixed",{enumerable:true,get:function(){return fixednumber.formatFixed}});Object.defineProperty(exports,"FixedFormat",{enumerable:true,get:function(){return fixednumber.FixedFormat}});Object.defineProperty(exports,"FixedNumber",{enumerable:true,get:function(){return fixednumber.FixedNumber}});Object.defineProperty(exports,"parseFixed",{enumerable:true,get:function(){return fixednumber.parseFixed}});var bignumber_2=bignumber;Object.defineProperty(exports,"_base16To36",{enumerable:true,get:function(){return bignumber_2._base16To36}});Object.defineProperty(exports,"_base36To16",{enumerable:true,get:function(){return bignumber_2._base36To16}})});var index$2=getDefaultExportFromCjs(lib$2);var _version$6=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="properties/5.5.0"});var _version$7=getDefaultExportFromCjs(_version$6);var lib$3=createCommonjsModule(function(module,exports){"use strict";var __awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};var __generator=commonjsGlobal&&commonjsGlobal.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]=0||type==="tuple"){if(ModifiersNest[name]){return true}}if(ModifiersBytes[name]||name==="payable"){logger.throwArgumentError("invalid modifier","name",name)}return false}function parseParamType(param,allowIndexed){var originalParam=param;function throwError(i){logger.throwArgumentError("unexpected character at position "+i,"param",param)}param=param.replace(/\s/g," ");function newNode(parent){var node={type:"",name:"",parent:parent,state:{allowType:true}};if(allowIndexed){node.indexed=false}return node}var parent={type:"",name:"",state:{allowType:true}};var node=parent;for(var i=0;i2){logger.throwArgumentError("invalid human-readable ABI signature","value",value)}if(!comps[1].match(/^[0-9]+$/)){logger.throwArgumentError("invalid human-readable ABI signature gas","value",value)}params.gas=lib$2.BigNumber.from(comps[1]);return comps[0]}return value}function parseModifiers(value,params){params.constant=false;params.payable=false;params.stateMutability="nonpayable";value.split(" ").forEach(function(modifier){switch(modifier.trim()){case"constant":params.constant=true;break;case"payable":params.payable=true;params.stateMutability="payable";break;case"nonpayable":params.payable=false;params.stateMutability="nonpayable";break;case"pure":params.constant=true;params.stateMutability="pure";break;case"view":params.constant=true;params.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+modifier)}})}function verifyState(value){var result={constant:false,payable:true,stateMutability:"payable"};if(value.stateMutability!=null){result.stateMutability=value.stateMutability;result.constant=result.stateMutability==="view"||result.stateMutability==="pure";if(value.constant!=null){if(!!value.constant!==result.constant){logger.throwArgumentError("cannot have constant function with mutability "+result.stateMutability,"value",value)}}result.payable=result.stateMutability==="payable";if(value.payable!=null){if(!!value.payable!==result.payable){logger.throwArgumentError("cannot have payable function with mutability "+result.stateMutability,"value",value)}}}else if(value.payable!=null){result.payable=!!value.payable;if(value.constant==null&&!result.payable&&value.type!=="constructor"){logger.throwArgumentError("unable to determine stateMutability","value",value)}result.constant=!!value.constant;if(result.constant){result.stateMutability="view"}else{result.stateMutability=result.payable?"payable":"nonpayable"}if(result.payable&&result.constant){logger.throwArgumentError("cannot have constant payable function","value",value)}}else if(value.constant!=null){result.constant=!!value.constant;result.payable=!result.constant;result.stateMutability=result.constant?"view":"payable"}else if(value.type!=="constructor"){logger.throwArgumentError("unable to determine stateMutability","value",value)}return result}var ConstructorFragment=function(_super){__extends(ConstructorFragment,_super);function ConstructorFragment(){return _super!==null&&_super.apply(this,arguments)||this}ConstructorFragment.prototype.format=function(format){if(!format){format=exports.FormatTypes.sighash}if(!exports.FormatTypes[format]){logger.throwArgumentError("invalid format type","format",format)}if(format===exports.FormatTypes.json){return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map(function(input){return JSON.parse(input.format(format))})})}if(format===exports.FormatTypes.sighash){logger.throwError("cannot format a constructor for sighash",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"})}var result="constructor("+this.inputs.map(function(input){return input.format(format)}).join(format===exports.FormatTypes.full?", ":",")+") ";if(this.stateMutability&&this.stateMutability!=="nonpayable"){result+=this.stateMutability+" "}return result.trim()};ConstructorFragment.from=function(value){if(typeof value==="string"){return ConstructorFragment.fromString(value)}return ConstructorFragment.fromObject(value)};ConstructorFragment.fromObject=function(value){if(ConstructorFragment.isConstructorFragment(value)){return value}if(value.type!=="constructor"){logger.throwArgumentError("invalid constructor object","value",value)}var state=verifyState(value);if(state.constant){logger.throwArgumentError("constructor cannot be constant","value",value)}var params={name:null,type:value.type,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],payable:state.payable,stateMutability:state.stateMutability,gas:value.gas?lib$2.BigNumber.from(value.gas):null};return new ConstructorFragment(_constructorGuard,params)};ConstructorFragment.fromString=function(value){var params={type:"constructor"};value=parseGas(value,params);var parens=value.match(regexParen);if(!parens||parens[1].trim()!=="constructor"){logger.throwArgumentError("invalid constructor string","value",value)}params.inputs=parseParams(parens[2].trim(),false);parseModifiers(parens[3].trim(),params);return ConstructorFragment.fromObject(params)};ConstructorFragment.isConstructorFragment=function(value){return value&&value._isFragment&&value.type==="constructor"};return ConstructorFragment}(Fragment);exports.ConstructorFragment=ConstructorFragment;var FunctionFragment=function(_super){__extends(FunctionFragment,_super);function FunctionFragment(){return _super!==null&&_super.apply(this,arguments)||this}FunctionFragment.prototype.format=function(format){if(!format){format=exports.FormatTypes.sighash}if(!exports.FormatTypes[format]){logger.throwArgumentError("invalid format type","format",format)}if(format===exports.FormatTypes.json){return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map(function(input){return JSON.parse(input.format(format))}),outputs:this.outputs.map(function(output){return JSON.parse(output.format(format))})})}var result="";if(format!==exports.FormatTypes.sighash){result+="function "}result+=this.name+"("+this.inputs.map(function(input){return input.format(format)}).join(format===exports.FormatTypes.full?", ":",")+") ";if(format!==exports.FormatTypes.sighash){if(this.stateMutability){if(this.stateMutability!=="nonpayable"){result+=this.stateMutability+" "}}else if(this.constant){result+="view "}if(this.outputs&&this.outputs.length){result+="returns ("+this.outputs.map(function(output){return output.format(format)}).join(", ")+") "}if(this.gas!=null){result+="@"+this.gas.toString()+" "}}return result.trim()};FunctionFragment.from=function(value){if(typeof value==="string"){return FunctionFragment.fromString(value)}return FunctionFragment.fromObject(value)};FunctionFragment.fromObject=function(value){if(FunctionFragment.isFunctionFragment(value)){return value}if(value.type!=="function"){logger.throwArgumentError("invalid function object","value",value)}var state=verifyState(value);var params={type:value.type,name:verifyIdentifier(value.name),constant:state.constant,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],outputs:value.outputs?value.outputs.map(ParamType.fromObject):[],payable:state.payable,stateMutability:state.stateMutability,gas:value.gas?lib$2.BigNumber.from(value.gas):null};return new FunctionFragment(_constructorGuard,params)};FunctionFragment.fromString=function(value){var params={type:"function"};value=parseGas(value,params);var comps=value.split(" returns ");if(comps.length>2){logger.throwArgumentError("invalid function string","value",value)}var parens=comps[0].match(regexParen);if(!parens){logger.throwArgumentError("invalid function signature","value",value)}params.name=parens[1].trim();if(params.name){verifyIdentifier(params.name)}params.inputs=parseParams(parens[2],false);parseModifiers(parens[3].trim(),params);if(comps.length>1){var returns=comps[1].match(regexParen);if(returns[1].trim()!=""||returns[3].trim()!=""){logger.throwArgumentError("unexpected tokens","value",value)}params.outputs=parseParams(returns[2],false)}else{params.outputs=[]}return FunctionFragment.fromObject(params)};FunctionFragment.isFunctionFragment=function(value){return value&&value._isFragment&&value.type==="function"};return FunctionFragment}(ConstructorFragment);exports.FunctionFragment=FunctionFragment;function checkForbidden(fragment){var sig=fragment.format();if(sig==="Error(string)"||sig==="Panic(uint256)"){logger.throwArgumentError("cannot specify user defined "+sig+" error","fragment",fragment)}return fragment}var ErrorFragment=function(_super){__extends(ErrorFragment,_super);function ErrorFragment(){return _super!==null&&_super.apply(this,arguments)||this}ErrorFragment.prototype.format=function(format){if(!format){format=exports.FormatTypes.sighash}if(!exports.FormatTypes[format]){logger.throwArgumentError("invalid format type","format",format)}if(format===exports.FormatTypes.json){return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(function(input){return JSON.parse(input.format(format))})})}var result="";if(format!==exports.FormatTypes.sighash){result+="error "}result+=this.name+"("+this.inputs.map(function(input){return input.format(format)}).join(format===exports.FormatTypes.full?", ":",")+") ";return result.trim()};ErrorFragment.from=function(value){if(typeof value==="string"){return ErrorFragment.fromString(value)}return ErrorFragment.fromObject(value)};ErrorFragment.fromObject=function(value){if(ErrorFragment.isErrorFragment(value)){return value}if(value.type!=="error"){logger.throwArgumentError("invalid error object","value",value)}var params={type:value.type,name:verifyIdentifier(value.name),inputs:value.inputs?value.inputs.map(ParamType.fromObject):[]};return checkForbidden(new ErrorFragment(_constructorGuard,params))};ErrorFragment.fromString=function(value){var params={type:"error"};var parens=value.match(regexParen);if(!parens){logger.throwArgumentError("invalid error signature","value",value)}params.name=parens[1].trim();if(params.name){verifyIdentifier(params.name)}params.inputs=parseParams(parens[2],false);return checkForbidden(ErrorFragment.fromObject(params))};ErrorFragment.isErrorFragment=function(value){return value&&value._isFragment&&value.type==="error"};return ErrorFragment}(Fragment);exports.ErrorFragment=ErrorFragment;function verifyType(type){if(type.match(/^uint($|[^1-9])/)){type="uint256"+type.substring(4)}else if(type.match(/^int($|[^1-9])/)){type="int256"+type.substring(3)}return type}var regexIdentifier=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(value){if(!value||!value.match(regexIdentifier)){logger.throwArgumentError('invalid identifier "'+value+'"',"value",value)}return value}var regexParen=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function splitNesting(value){value=value.trim();var result=[];var accum="";var depth=0;for(var offset=0;offsetthis.wordSize){logger.throwError("value out-of-bounds",lib.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:bytes.length})}if(bytes.length%this.wordSize){bytes=(0,lib$1.concat)([this._padding.slice(bytes.length%this.wordSize),bytes])}return bytes};Writer.prototype.writeValue=function(value){return this._writeData(this._getValue(value))};Writer.prototype.writeUpdatableValue=function(){var _this=this;var offset=this._data.length;this._data.push(this._padding);this._dataLength+=this.wordSize;return function(value){_this._data[offset]=_this._getValue(value)}};return Writer}();exports.Writer=Writer;var Reader=function(){function Reader(data,wordSize,coerceFunc,allowLoose){(0,lib$3.defineReadOnly)(this,"_data",(0,lib$1.arrayify)(data));(0,lib$3.defineReadOnly)(this,"wordSize",wordSize||32);(0,lib$3.defineReadOnly)(this,"_coerceFunc",coerceFunc);(0,lib$3.defineReadOnly)(this,"allowLoose",allowLoose);this._offset=0}Object.defineProperty(Reader.prototype,"data",{get:function(){return(0,lib$1.hexlify)(this._data)},enumerable:false,configurable:true});Object.defineProperty(Reader.prototype,"consumed",{get:function(){return this._offset},enumerable:false,configurable:true});Reader.coerce=function(name,value){var match=name.match("^u?int([0-9]+)$");if(match&&parseInt(match[1])<=48){value=value.toNumber()}return value};Reader.prototype.coerce=function(name,value){if(this._coerceFunc){return this._coerceFunc(name,value)}return Reader.coerce(name,value)};Reader.prototype._peekBytes=function(offset,length,loose){var alignedLength=Math.ceil(length/this.wordSize)*this.wordSize;if(this._offset+alignedLength>this._data.length){if(this.allowLoose&&loose&&this._offset+length<=this._data.length){alignedLength=length}else{logger.throwError("data out-of-bounds",lib.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+alignedLength})}}return this._data.slice(this._offset,this._offset+alignedLength)};Reader.prototype.subReader=function(offset){return new Reader(this._data.slice(this._offset+offset),this.wordSize,this._coerceFunc,this.allowLoose)};Reader.prototype.readBytes=function(length,loose){var bytes=this._peekBytes(0,length,!!loose);this._offset+=bytes.length;return bytes.slice(0,length)};Reader.prototype.readValue=function(){return lib$2.BigNumber.from(this.readBytes(this.wordSize))};return Reader}();exports.Reader=Reader});var abstractCoder$1=getDefaultExportFromCjs(abstractCoder);var sha3=createCommonjsModule(function(module){(function(){"use strict";var INPUT_ERROR="input is invalid type";var FINALIZE_ERROR="finalize already called";var WINDOW=typeof window==="object";var root=WINDOW?window:{};if(root.JS_SHA3_NO_WINDOW){WINDOW=false}var WEB_WORKER=!WINDOW&&typeof self==="object";var NODE_JS=!root.JS_SHA3_NO_NODE_JS&&typeof process==="object"&&process.versions&&process.versions.node;if(NODE_JS){root=commonjsGlobal}else if(WEB_WORKER){root=self}var COMMON_JS=!root.JS_SHA3_NO_COMMON_JS&&"object"==="object"&&module.exports;var AMD=typeof undefined==="function"&&undefined.amd;var ARRAY_BUFFER=!root.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=="undefined";var HEX_CHARS="0123456789abcdef".split("");var SHAKE_PADDING=[31,7936,2031616,520093696];var CSHAKE_PADDING=[4,1024,262144,67108864];var KECCAK_PADDING=[1,256,65536,16777216];var PADDING=[6,1536,393216,100663296];var SHIFT=[0,8,16,24];var RC=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];var BITS=[224,256,384,512];var SHAKE_BITS=[128,256];var OUTPUT_TYPES=["hex","buffer","arrayBuffer","array","digest"];var CSHAKE_BYTEPAD={128:168,256:136};if(root.JS_SHA3_NO_NODE_JS||!Array.isArray){Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"}}if(ARRAY_BUFFER&&(root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(obj){return typeof obj==="object"&&obj.buffer&&obj.buffer.constructor===ArrayBuffer}}var createOutputMethod=function(bits,padding,outputType){return function(message){return new Keccak(bits,padding,bits).update(message)[outputType]()}};var createShakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits){return new Keccak(bits,padding,outputBits).update(message)[outputType]()}};var createCshakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits,n,s){return methods["cshake"+bits].update(message,outputBits,n,s)[outputType]()}};var createKmacOutputMethod=function(bits,padding,outputType){return function(key,message,outputBits,s){return methods["kmac"+bits].update(key,message,outputBits,s)[outputType]()}};var createOutputMethods=function(method,createMethod,bits,padding){for(var i=0;i>5;this.byteCount=this.blockCount<<2;this.outputBlocks=outputBits>>5;this.extraBytes=(outputBits&31)>>3;for(var i=0;i<50;++i){this.s[i]=0}}Keccak.prototype.update=function(message){if(this.finalized){throw new Error(FINALIZE_ERROR)}var notString,type=typeof message;if(type!=="string"){if(type==="object"){if(message===null){throw new Error(INPUT_ERROR)}else if(ARRAY_BUFFER&&message.constructor===ArrayBuffer){message=new Uint8Array(message)}else if(!Array.isArray(message)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(message)){throw new Error(INPUT_ERROR)}}}else{throw new Error(INPUT_ERROR)}notString=true}var blocks=this.blocks,byteCount=this.byteCount,length=message.length,blockCount=this.blockCount,index=0,s=this.s,i,code;while(index>2]|=message[index]<>2]|=code<>2]|=(192|code>>6)<>2]|=(128|code&63)<=57344){blocks[i>>2]|=(224|code>>12)<>2]|=(128|code>>6&63)<>2]|=(128|code&63)<>2]|=(240|code>>18)<>2]|=(128|code>>12&63)<>2]|=(128|code>>6&63)<>2]|=(128|code&63)<=byteCount){this.start=i-byteCount;this.block=blocks[blockCount];for(i=0;i>8;o=x&255;while(o>0){bytes.unshift(o);x=x>>8;o=x&255;++n}if(right){bytes.push(n)}else{bytes.unshift(n)}this.update(bytes);return bytes.length};Keccak.prototype.encodeString=function(str){var notString,type=typeof str;if(type!=="string"){if(type==="object"){if(str===null){throw new Error(INPUT_ERROR)}else if(ARRAY_BUFFER&&str.constructor===ArrayBuffer){str=new Uint8Array(str)}else if(!Array.isArray(str)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(str)){throw new Error(INPUT_ERROR)}}}else{throw new Error(INPUT_ERROR)}notString=true}var bytes=0,length=str.length;if(notString){bytes=length}else{for(var i=0;i=57344){bytes+=3}else{code=65536+((code&1023)<<10|str.charCodeAt(++i)&1023);bytes+=4}}}bytes+=this.encode(bytes*8);this.update(str);return bytes};Keccak.prototype.bytepad=function(strs,w){var bytes=this.encode(w);for(var i=0;i>2]|=this.padding[i&3];if(this.lastByteIndex===this.byteCount){blocks[0]=blocks[blockCount];for(i=1;i>4&15]+HEX_CHARS[block&15]+HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]+HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]+HEX_CHARS[block>>28&15]+HEX_CHARS[block>>24&15]}if(j%blockCount===0){f(s);i=0}}if(extraBytes){block=s[i];hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[block&15];if(extraBytes>1){hex+=HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]}if(extraBytes>2){hex+=HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]}}return hex};Keccak.prototype.arrayBuffer=function(){this.finalize();var blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0;var bytes=this.outputBits>>3;var buffer;if(extraBytes){buffer=new ArrayBuffer(outputBlocks+1<<2)}else{buffer=new ArrayBuffer(bytes)}var array=new Uint32Array(buffer);while(j>8&255;array[offset+2]=block>>16&255;array[offset+3]=block>>24&255}if(j%blockCount===0){f(s)}}if(extraBytes){offset=j<<2;block=s[i];array[offset]=block&255;if(extraBytes>1){array[offset+1]=block>>8&255}if(extraBytes>2){array[offset+2]=block>>16&255}}return array};function Kmac(bits,padding,outputBits){Keccak.call(this,bits,padding,outputBits)}Kmac.prototype=new Keccak;Kmac.prototype.finalize=function(){this.encode(this.outputBits,true);return Keccak.prototype.finalize.call(this)};var f=function(s){var h,l,n,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b44,b45,b46,b47,b48,b49;for(n=0;n<48;n+=2){c0=s[0]^s[10]^s[20]^s[30]^s[40];c1=s[1]^s[11]^s[21]^s[31]^s[41];c2=s[2]^s[12]^s[22]^s[32]^s[42];c3=s[3]^s[13]^s[23]^s[33]^s[43];c4=s[4]^s[14]^s[24]^s[34]^s[44];c5=s[5]^s[15]^s[25]^s[35]^s[45];c6=s[6]^s[16]^s[26]^s[36]^s[46];c7=s[7]^s[17]^s[27]^s[37]^s[47];c8=s[8]^s[18]^s[28]^s[38]^s[48];c9=s[9]^s[19]^s[29]^s[39]^s[49];h=c8^(c2<<1|c3>>>31);l=c9^(c3<<1|c2>>>31);s[0]^=h;s[1]^=l;s[10]^=h;s[11]^=l;s[20]^=h;s[21]^=l;s[30]^=h;s[31]^=l;s[40]^=h;s[41]^=l;h=c0^(c4<<1|c5>>>31);l=c1^(c5<<1|c4>>>31);s[2]^=h;s[3]^=l;s[12]^=h;s[13]^=l;s[22]^=h;s[23]^=l;s[32]^=h;s[33]^=l;s[42]^=h;s[43]^=l;h=c2^(c6<<1|c7>>>31);l=c3^(c7<<1|c6>>>31);s[4]^=h;s[5]^=l;s[14]^=h;s[15]^=l;s[24]^=h;s[25]^=l;s[34]^=h;s[35]^=l;s[44]^=h;s[45]^=l;h=c4^(c8<<1|c9>>>31);l=c5^(c9<<1|c8>>>31);s[6]^=h;s[7]^=l;s[16]^=h;s[17]^=l;s[26]^=h;s[27]^=l;s[36]^=h;s[37]^=l;s[46]^=h;s[47]^=l;h=c6^(c0<<1|c1>>>31);l=c7^(c1<<1|c0>>>31);s[8]^=h;s[9]^=l;s[18]^=h;s[19]^=l;s[28]^=h;s[29]^=l;s[38]^=h;s[39]^=l;s[48]^=h;s[49]^=l;b0=s[0];b1=s[1];b32=s[11]<<4|s[10]>>>28;b33=s[10]<<4|s[11]>>>28;b14=s[20]<<3|s[21]>>>29;b15=s[21]<<3|s[20]>>>29;b46=s[31]<<9|s[30]>>>23;b47=s[30]<<9|s[31]>>>23;b28=s[40]<<18|s[41]>>>14;b29=s[41]<<18|s[40]>>>14;b20=s[2]<<1|s[3]>>>31;b21=s[3]<<1|s[2]>>>31;b2=s[13]<<12|s[12]>>>20;b3=s[12]<<12|s[13]>>>20;b34=s[22]<<10|s[23]>>>22;b35=s[23]<<10|s[22]>>>22;b16=s[33]<<13|s[32]>>>19;b17=s[32]<<13|s[33]>>>19;b48=s[42]<<2|s[43]>>>30;b49=s[43]<<2|s[42]>>>30;b40=s[5]<<30|s[4]>>>2;b41=s[4]<<30|s[5]>>>2;b22=s[14]<<6|s[15]>>>26;b23=s[15]<<6|s[14]>>>26;b4=s[25]<<11|s[24]>>>21;b5=s[24]<<11|s[25]>>>21;b36=s[34]<<15|s[35]>>>17;b37=s[35]<<15|s[34]>>>17;b18=s[45]<<29|s[44]>>>3;b19=s[44]<<29|s[45]>>>3;b10=s[6]<<28|s[7]>>>4;b11=s[7]<<28|s[6]>>>4;b42=s[17]<<23|s[16]>>>9;b43=s[16]<<23|s[17]>>>9;b24=s[26]<<25|s[27]>>>7;b25=s[27]<<25|s[26]>>>7;b6=s[36]<<21|s[37]>>>11;b7=s[37]<<21|s[36]>>>11;b38=s[47]<<24|s[46]>>>8;b39=s[46]<<24|s[47]>>>8;b30=s[8]<<27|s[9]>>>5;b31=s[9]<<27|s[8]>>>5;b12=s[18]<<20|s[19]>>>12;b13=s[19]<<20|s[18]>>>12;b44=s[29]<<7|s[28]>>>25;b45=s[28]<<7|s[29]>>>25;b26=s[38]<<8|s[39]>>>24;b27=s[39]<<8|s[38]>>>24;b8=s[48]<<14|s[49]>>>18;b9=s[49]<<14|s[48]>>>18;s[0]=b0^~b2&b4;s[1]=b1^~b3&b5;s[10]=b10^~b12&b14;s[11]=b11^~b13&b15;s[20]=b20^~b22&b24;s[21]=b21^~b23&b25;s[30]=b30^~b32&b34;s[31]=b31^~b33&b35;s[40]=b40^~b42&b44;s[41]=b41^~b43&b45;s[2]=b2^~b4&b6;s[3]=b3^~b5&b7;s[12]=b12^~b14&b16;s[13]=b13^~b15&b17;s[22]=b22^~b24&b26;s[23]=b23^~b25&b27;s[32]=b32^~b34&b36;s[33]=b33^~b35&b37;s[42]=b42^~b44&b46;s[43]=b43^~b45&b47;s[4]=b4^~b6&b8;s[5]=b5^~b7&b9;s[14]=b14^~b16&b18;s[15]=b15^~b17&b19;s[24]=b24^~b26&b28;s[25]=b25^~b27&b29;s[34]=b34^~b36&b38;s[35]=b35^~b37&b39;s[44]=b44^~b46&b48;s[45]=b45^~b47&b49;s[6]=b6^~b8&b0;s[7]=b7^~b9&b1;s[16]=b16^~b18&b10;s[17]=b17^~b19&b11;s[26]=b26^~b28&b20;s[27]=b27^~b29&b21;s[36]=b36^~b38&b30;s[37]=b37^~b39&b31;s[46]=b46^~b48&b40;s[47]=b47^~b49&b41;s[8]=b8^~b0&b2;s[9]=b9^~b1&b3;s[18]=b18^~b10&b12;s[19]=b19^~b11&b13;s[28]=b28^~b20&b22;s[29]=b29^~b21&b23;s[38]=b38^~b30&b32;s[39]=b39^~b31&b33;s[48]=b48^~b40&b42;s[49]=b49^~b41&b43;s[0]^=RC[n];s[1]^=RC[n+1]}};if(COMMON_JS){module.exports=methods}else{for(i=0;i>=8}return result}function unarrayifyInteger(data,offset,length){var result=0;for(var i=0;ioffset+1+length){logger.throwError("child data too short",lib.Logger.errors.BUFFER_OVERRUN,{})}}return{consumed:1+length,result:result}}function _decode(data,offset){if(data.length===0){logger.throwError("data too short",lib.Logger.errors.BUFFER_OVERRUN,{})}if(data[offset]>=248){var lengthLength=data[offset]-247;if(offset+1+lengthLength>data.length){logger.throwError("data short segment too short",lib.Logger.errors.BUFFER_OVERRUN,{})}var length_2=unarrayifyInteger(data,offset+1,lengthLength);if(offset+1+lengthLength+length_2>data.length){logger.throwError("data long segment too short",lib.Logger.errors.BUFFER_OVERRUN,{})}return _decodeChildren(data,offset,offset+1+lengthLength,lengthLength+length_2)}else if(data[offset]>=192){var length_3=data[offset]-192;if(offset+1+length_3>data.length){logger.throwError("data array too short",lib.Logger.errors.BUFFER_OVERRUN,{})}return _decodeChildren(data,offset,offset+1,length_3)}else if(data[offset]>=184){var lengthLength=data[offset]-183;if(offset+1+lengthLength>data.length){logger.throwError("data array too short",lib.Logger.errors.BUFFER_OVERRUN,{})}var length_4=unarrayifyInteger(data,offset+1,lengthLength);if(offset+1+lengthLength+length_4>data.length){logger.throwError("data array too short",lib.Logger.errors.BUFFER_OVERRUN,{})}var result=(0,lib$1.hexlify)(data.slice(offset+1+lengthLength,offset+1+lengthLength+length_4));return{consumed:1+lengthLength+length_4,result:result}}else if(data[offset]>=128){var length_5=data[offset]-128;if(offset+1+length_5>data.length){logger.throwError("data too short",lib.Logger.errors.BUFFER_OVERRUN,{})}var result=(0,lib$1.hexlify)(data.slice(offset+1,offset+1+length_5));return{consumed:1+length_5,result:result}}return{consumed:1,result:(0,lib$1.hexlify)(data[offset])}}function decode(data){var bytes=(0,lib$1.arrayify)(data);var decoded=_decode(bytes,0);if(decoded.consumed!==bytes.length){logger.throwArgumentError("invalid rlp data","data",data)}return decoded.result}exports.decode=decode});var index$5=getDefaultExportFromCjs(lib$5);var _version$c=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="address/5.5.0"});var _version$d=getDefaultExportFromCjs(_version$c);var lib$6=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getCreate2Address=exports.getContractAddress=exports.getIcapAddress=exports.isAddress=exports.getAddress=void 0;var logger=new lib.Logger(_version$c.version);function getChecksumAddress(address){if(!(0,lib$1.isHexString)(address,20)){logger.throwArgumentError("invalid address","address",address)}address=address.toLowerCase();var chars=address.substring(2).split("");var expanded=new Uint8Array(40);for(var i=0;i<40;i++){expanded[i]=chars[i].charCodeAt(0)}var hashed=(0,lib$1.arrayify)((0,lib$4.keccak256)(expanded));for(var i=0;i<40;i+=2){if(hashed[i>>1]>>4>=8){chars[i]=chars[i].toUpperCase()}if((hashed[i>>1]&15)>=8){chars[i+1]=chars[i+1].toUpperCase()}}return"0x"+chars.join("")}var MAX_SAFE_INTEGER=9007199254740991;function log10(x){if(Math.log10){return Math.log10(x)}return Math.log(x)/Math.LN10}var ibanLookup={};for(var i=0;i<10;i++){ibanLookup[String(i)]=String(i)}for(var i=0;i<26;i++){ibanLookup[String.fromCharCode(65+i)]=String(10+i)}var safeDigits=Math.floor(log10(MAX_SAFE_INTEGER));function ibanChecksum(address){address=address.toUpperCase();address=address.substring(4)+address.substring(0,2)+"00";var expanded=address.split("").map(function(c){return ibanLookup[c]}).join("");while(expanded.length>=safeDigits){var block=expanded.substring(0,safeDigits);expanded=parseInt(block,10)%97+expanded.substring(block.length)}var checksum=String(98-parseInt(expanded,10)%97);while(checksum.length<2){checksum="0"+checksum}return checksum}function getAddress(address){var result=null;if(typeof address!=="string"){logger.throwArgumentError("invalid address","address",address)}if(address.match(/^(0x)?[0-9a-fA-F]{40}$/)){if(address.substring(0,2)!=="0x"){address="0x"+address}result=getChecksumAddress(address);if(address.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&result!==address){logger.throwArgumentError("bad address checksum","address",address)}}else if(address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){if(address.substring(2,4)!==ibanChecksum(address)){logger.throwArgumentError("bad icap checksum","address",address)}result=(0,lib$2._base36To16)(address.substring(4));while(result.length<40){result="0"+result}result=getChecksumAddress("0x"+result)}else{logger.throwArgumentError("invalid address","address",address)}return result}exports.getAddress=getAddress;function isAddress(address){try{getAddress(address);return true}catch(error){}return false}exports.isAddress=isAddress;function getIcapAddress(address){var base36=(0,lib$2._base16To36)(getAddress(address).substring(2)).toUpperCase();while(base36.length<30){base36="0"+base36}return"XE"+ibanChecksum("XE00"+base36)+base36}exports.getIcapAddress=getIcapAddress;function getContractAddress(transaction){var from=null;try{from=getAddress(transaction.from)}catch(error){logger.throwArgumentError("missing from address","transaction",transaction)}var nonce=(0,lib$1.stripZeros)((0,lib$1.arrayify)(lib$2.BigNumber.from(transaction.nonce).toHexString()));return getAddress((0,lib$1.hexDataSlice)((0,lib$4.keccak256)((0,lib$5.encode)([from,nonce])),12))}exports.getContractAddress=getContractAddress;function getCreate2Address(from,salt,initCodeHash){if((0,lib$1.hexDataLength)(salt)!==32){logger.throwArgumentError("salt must be 32 bytes","salt",salt)}if((0,lib$1.hexDataLength)(initCodeHash)!==32){logger.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",initCodeHash)}return getAddress((0,lib$1.hexDataSlice)((0,lib$4.keccak256)((0,lib$1.concat)(["0xff",getAddress(from),salt,initCodeHash])),12))}exports.getCreate2Address=getCreate2Address});var index$6=getDefaultExportFromCjs(lib$6);var address=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.AddressCoder=void 0;var AddressCoder=function(_super){__extends(AddressCoder,_super);function AddressCoder(localName){return _super.call(this,"address","address",localName,false)||this}AddressCoder.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000"};AddressCoder.prototype.encode=function(writer,value){try{value=(0,lib$6.getAddress)(value)}catch(error){this._throwError(error.message,value)}return writer.writeValue(value)};AddressCoder.prototype.decode=function(reader){return(0,lib$6.getAddress)((0,lib$1.hexZeroPad)(reader.readValue().toHexString(),20))};return AddressCoder}(abstractCoder.Coder);exports.AddressCoder=AddressCoder});var address$1=getDefaultExportFromCjs(address);var anonymous=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.AnonymousCoder=void 0;var AnonymousCoder=function(_super){__extends(AnonymousCoder,_super);function AnonymousCoder(coder){var _this=_super.call(this,coder.name,coder.type,undefined,coder.dynamic)||this;_this.coder=coder;return _this}AnonymousCoder.prototype.defaultValue=function(){return this.coder.defaultValue()};AnonymousCoder.prototype.encode=function(writer,value){return this.coder.encode(writer,value)};AnonymousCoder.prototype.decode=function(reader){return this.coder.decode(reader)};return AnonymousCoder}(abstractCoder.Coder);exports.AnonymousCoder=AnonymousCoder});var anonymous$1=getDefaultExportFromCjs(anonymous);var array=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.ArrayCoder=exports.unpack=exports.pack=void 0;var logger=new lib.Logger(_version$8.version);function pack(writer,coders,values){var arrayValues=null;if(Array.isArray(values)){arrayValues=values}else if(values&&typeof values==="object"){var unique_1={};arrayValues=coders.map(function(coder){var name=coder.localName;if(!name){logger.throwError("cannot encode object for signature with missing names",lib.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:coder,value:values})}if(unique_1[name]){logger.throwError("cannot encode object for signature with duplicate names",lib.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:coder,value:values})}unique_1[name]=true;return values[name]})}else{logger.throwArgumentError("invalid tuple value","tuple",values)}if(coders.length!==arrayValues.length){logger.throwArgumentError("types/value length mismatch","tuple",values)}var staticWriter=new abstractCoder.Writer(writer.wordSize);var dynamicWriter=new abstractCoder.Writer(writer.wordSize);var updateFuncs=[];coders.forEach(function(coder,index){var value=arrayValues[index];if(coder.dynamic){var dynamicOffset_1=dynamicWriter.length;coder.encode(dynamicWriter,value);var updateFunc_1=staticWriter.writeUpdatableValue();updateFuncs.push(function(baseOffset){updateFunc_1(baseOffset+dynamicOffset_1)})}else{coder.encode(staticWriter,value)}});updateFuncs.forEach(function(func){func(staticWriter.length)});var length=writer.appendWriter(staticWriter);length+=writer.appendWriter(dynamicWriter);return length}exports.pack=pack;function unpack(reader,coders){var values=[];var baseReader=reader.subReader(0);coders.forEach(function(coder){var value=null;if(coder.dynamic){var offset=reader.readValue();var offsetReader=baseReader.subReader(offset.toNumber());try{value=coder.decode(offsetReader)}catch(error){if(error.code===lib.Logger.errors.BUFFER_OVERRUN){throw error}value=error;value.baseType=coder.name;value.name=coder.localName;value.type=coder.type}}else{try{value=coder.decode(reader)}catch(error){if(error.code===lib.Logger.errors.BUFFER_OVERRUN){throw error}value=error;value.baseType=coder.name;value.name=coder.localName;value.type=coder.type}}if(value!=undefined){values.push(value)}});var uniqueNames=coders.reduce(function(accum,coder){var name=coder.localName;if(name){if(!accum[name]){accum[name]=0}accum[name]++}return accum},{});coders.forEach(function(coder,index){var name=coder.localName;if(!name||uniqueNames[name]!==1){return}if(name==="length"){name="_length"}if(values[name]!=null){return}var value=values[index];if(value instanceof Error){Object.defineProperty(values,name,{enumerable:true,get:function(){throw value}})}else{values[name]=value}});var _loop_1=function(i){var value=values[i];if(value instanceof Error){Object.defineProperty(values,i,{enumerable:true,get:function(){throw value}})}};for(var i=0;i=0?length:"")+"]";var dynamic=length===-1||coder.dynamic;_this=_super.call(this,"array",type,localName,dynamic)||this;_this.coder=coder;_this.length=length;return _this}ArrayCoder.prototype.defaultValue=function(){var defaultChild=this.coder.defaultValue();var result=[];for(var i=0;ireader._data.length){logger.throwError("insufficient data length",lib.Logger.errors.BUFFER_OVERRUN,{length:reader._data.length,count:count})}}var coders=[];for(var i=0;i>6!==2){break}i++}return i}if(reason===Utf8ErrorReason.OVERRUN){return bytes.length-offset-1}return 0}function replaceFunc(reason,offset,bytes,output,badCodepoint){if(reason===Utf8ErrorReason.OVERLONG){output.push(badCodepoint);return 0}output.push(65533);return ignoreFunc(reason,offset,bytes,output,badCodepoint)}exports.Utf8ErrorFuncs=Object.freeze({error:errorFunc,ignore:ignoreFunc,replace:replaceFunc});function getUtf8CodePoints(bytes,onError){if(onError==null){onError=exports.Utf8ErrorFuncs.error}bytes=(0,lib$1.arrayify)(bytes);var result=[];var i=0;while(i>7===0){result.push(c);continue}var extraLength=null;var overlongMask=null;if((c&224)===192){extraLength=1;overlongMask=127}else if((c&240)===224){extraLength=2;overlongMask=2047}else if((c&248)===240){extraLength=3;overlongMask=65535}else{if((c&192)===128){i+=onError(Utf8ErrorReason.UNEXPECTED_CONTINUE,i-1,bytes,result)}else{i+=onError(Utf8ErrorReason.BAD_PREFIX,i-1,bytes,result)}continue}if(i-1+extraLength>=bytes.length){i+=onError(Utf8ErrorReason.OVERRUN,i-1,bytes,result);continue}var res=c&(1<<8-extraLength-1)-1;for(var j=0;j1114111){i+=onError(Utf8ErrorReason.OUT_OF_RANGE,i-1-extraLength,bytes,result,res);continue}if(res>=55296&&res<=57343){i+=onError(Utf8ErrorReason.UTF16_SURROGATE,i-1-extraLength,bytes,result,res);continue}if(res<=overlongMask){i+=onError(Utf8ErrorReason.OVERLONG,i-1-extraLength,bytes,result,res);continue}result.push(res)}return result}function toUtf8Bytes(str,form){if(form===void 0){form=UnicodeNormalizationForm.current}if(form!=UnicodeNormalizationForm.current){logger.checkNormalize();str=str.normalize(form)}var result=[];for(var i=0;i>6|192);result.push(c&63|128)}else if((c&64512)==55296){i++;var c2=str.charCodeAt(i);if(i>=str.length||(c2&64512)!==56320){throw new Error("invalid utf-8 string")}var pair=65536+((c&1023)<<10)+(c2&1023);result.push(pair>>18|240);result.push(pair>>12&63|128);result.push(pair>>6&63|128);result.push(pair&63|128)}else{result.push(c>>12|224);result.push(c>>6&63|128);result.push(c&63|128)}}return(0,lib$1.arrayify)(result)}exports.toUtf8Bytes=toUtf8Bytes;function escapeChar(value){var hex="0000"+value.toString(16);return"\\u"+hex.substring(hex.length-4)}function _toEscapedUtf8String(bytes,onError){return'"'+getUtf8CodePoints(bytes,onError).map(function(codePoint){if(codePoint<256){switch(codePoint){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(codePoint>=32&&codePoint<127){return String.fromCharCode(codePoint)}}if(codePoint<=65535){return escapeChar(codePoint)}codePoint-=65536;return escapeChar((codePoint>>10&1023)+55296)+escapeChar((codePoint&1023)+56320)}).join("")+'"'}exports._toEscapedUtf8String=_toEscapedUtf8String;function _toUtf8String(codePoints){return codePoints.map(function(codePoint){if(codePoint<=65535){return String.fromCharCode(codePoint)}codePoint-=65536;return String.fromCharCode((codePoint>>10&1023)+55296,(codePoint&1023)+56320)}).join("")}exports._toUtf8String=_toUtf8String;function toUtf8String(bytes,onError){return _toUtf8String(getUtf8CodePoints(bytes,onError))}exports.toUtf8String=toUtf8String;function toUtf8CodePoints(str,form){if(form===void 0){form=UnicodeNormalizationForm.current}return getUtf8CodePoints(toUtf8Bytes(str,form))}exports.toUtf8CodePoints=toUtf8CodePoints});var utf8$1=getDefaultExportFromCjs(utf8);var bytes32=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.parseBytes32String=exports.formatBytes32String=void 0;function formatBytes32String(text){var bytes=(0,utf8.toUtf8Bytes)(text);if(bytes.length>31){throw new Error("bytes32 string must be less than 32 bytes")}return(0,lib$1.hexlify)((0,lib$1.concat)([bytes,lib$7.HashZero]).slice(0,32))}exports.formatBytes32String=formatBytes32String;function parseBytes32String(bytes){var data=(0,lib$1.arrayify)(bytes);if(data.length!==32){throw new Error("invalid bytes32 - not 32 bytes long")}if(data[31]!==0){throw new Error("invalid bytes32 string - no null terminator")}var length=31;while(data[length-1]===0){length--}return(0,utf8.toUtf8String)(data.slice(0,length))}exports.parseBytes32String=parseBytes32String});var bytes32$1=getDefaultExportFromCjs(bytes32);var idna=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.nameprep=exports._nameprepTableC=exports._nameprepTableB2=exports._nameprepTableA1=void 0;function bytes2(data){if(data.length%4!==0){throw new Error("bad data")}var result=[];for(var i=0;i=lo&&value<=lo+range.h&&(value-lo)%(range.d||1)===0){if(range.e&&range.e.indexOf(value-lo)!==-1){continue}return range}}return null}var Table_A_1_ranges=createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d");var Table_B_1_flags="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function(v){return parseInt(v,16)});var Table_B_2_ranges=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}];var Table_B_2_lut_abs=createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3");var Table_B_2_lut_rel=createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7");var Table_B_2_complex=createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",bytes2);var Table_C_ranges=createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function flatten(values){return values.reduce(function(accum,value){value.forEach(function(value){accum.push(value)});return accum},[])}function _nameprepTableA1(codepoint){return!!matchMap(codepoint,Table_A_1_ranges)}exports._nameprepTableA1=_nameprepTableA1;function _nameprepTableB2(codepoint){var range=matchMap(codepoint,Table_B_2_ranges);if(range){return[codepoint+range.s]}var codes=Table_B_2_lut_abs[codepoint];if(codes){return codes}var shift=Table_B_2_lut_rel[codepoint];if(shift){return[codepoint+shift[0]]}var complex=Table_B_2_complex[codepoint];if(complex){return complex}return null}exports._nameprepTableB2=_nameprepTableB2;function _nameprepTableC(codepoint){return!!matchMap(codepoint,Table_C_ranges)}exports._nameprepTableC=_nameprepTableC;function nameprep(value){if(value.match(/^[a-z0-9-]*$/i)&&value.length<=59){return value.toLowerCase()}var codes=(0,utf8.toUtf8CodePoints)(value);codes=flatten(codes.map(function(code){if(Table_B_1_flags.indexOf(code)>=0){return[]}if(code>=65024&&code<=65039){return[]}var codesTableB2=_nameprepTableB2(code);if(codesTableB2){return codesTableB2}return[code]}));codes=(0,utf8.toUtf8CodePoints)((0,utf8._toUtf8String)(codes),utf8.UnicodeNormalizationForm.NFKC);codes.forEach(function(code){if(_nameprepTableC(code)){throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}});codes.forEach(function(code){if(_nameprepTableA1(code)){throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}});var name=(0,utf8._toUtf8String)(codes);if(name.substring(0,1)==="-"||name.substring(2,4)==="--"||name.substring(name.length-1)==="-"){throw new Error("invalid hyphen")}if(name.length>63){throw new Error("too long")}return name}exports.nameprep=nameprep});var idna$1=getDefaultExportFromCjs(idna);var lib$8=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.nameprep=exports.parseBytes32String=exports.formatBytes32String=exports.UnicodeNormalizationForm=exports.Utf8ErrorReason=exports.Utf8ErrorFuncs=exports.toUtf8String=exports.toUtf8CodePoints=exports.toUtf8Bytes=exports._toEscapedUtf8String=void 0;Object.defineProperty(exports,"formatBytes32String",{enumerable:true,get:function(){return bytes32.formatBytes32String}});Object.defineProperty(exports,"parseBytes32String",{enumerable:true,get:function(){return bytes32.parseBytes32String}});Object.defineProperty(exports,"nameprep",{enumerable:true,get:function(){return idna.nameprep}});Object.defineProperty(exports,"_toEscapedUtf8String",{enumerable:true,get:function(){return utf8._toEscapedUtf8String}});Object.defineProperty(exports,"toUtf8Bytes",{enumerable:true,get:function(){return utf8.toUtf8Bytes}});Object.defineProperty(exports,"toUtf8CodePoints",{enumerable:true,get:function(){return utf8.toUtf8CodePoints}});Object.defineProperty(exports,"toUtf8String",{enumerable:true,get:function(){return utf8.toUtf8String}});Object.defineProperty(exports,"UnicodeNormalizationForm",{enumerable:true,get:function(){return utf8.UnicodeNormalizationForm}});Object.defineProperty(exports,"Utf8ErrorFuncs",{enumerable:true,get:function(){return utf8.Utf8ErrorFuncs}});Object.defineProperty(exports,"Utf8ErrorReason",{enumerable:true,get:function(){return utf8.Utf8ErrorReason}})});var index$8=getDefaultExportFromCjs(lib$8);var string=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.StringCoder=void 0;var StringCoder=function(_super){__extends(StringCoder,_super);function StringCoder(localName){return _super.call(this,"string",localName)||this}StringCoder.prototype.defaultValue=function(){return""};StringCoder.prototype.encode=function(writer,value){return _super.prototype.encode.call(this,writer,(0,lib$8.toUtf8Bytes)(value))};StringCoder.prototype.decode=function(reader){return(0,lib$8.toUtf8String)(_super.prototype.decode.call(this,reader))};return StringCoder}(bytes.DynamicBytesCoder);exports.StringCoder=StringCoder});var string$1=getDefaultExportFromCjs(string);var tuple=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.TupleCoder=void 0;var TupleCoder=function(_super){__extends(TupleCoder,_super);function TupleCoder(coders,localName){var _this=this;var dynamic=false;var types=[];coders.forEach(function(coder){if(coder.dynamic){dynamic=true}types.push(coder.type)});var type="tuple("+types.join(",")+")";_this=_super.call(this,"tuple",type,localName,dynamic)||this;_this.coders=coders;return _this}TupleCoder.prototype.defaultValue=function(){var values=[];this.coders.forEach(function(coder){values.push(coder.defaultValue())});var uniqueNames=this.coders.reduce(function(accum,coder){var name=coder.localName;if(name){if(!accum[name]){accum[name]=0}accum[name]++}return accum},{});this.coders.forEach(function(coder,index){var name=coder.localName;if(!name||uniqueNames[name]!==1){return}if(name==="length"){name="_length"}if(values[name]!=null){return}values[name]=values[index]});return Object.freeze(values)};TupleCoder.prototype.encode=function(writer,value){return(0,array.pack)(writer,this.coders,value)};TupleCoder.prototype.decode=function(reader){return reader.coerce(this.name,(0,array.unpack)(reader,this.coders))};return TupleCoder}(abstractCoder.Coder);exports.TupleCoder=TupleCoder});var tuple$1=getDefaultExportFromCjs(tuple);var abiCoder=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.defaultAbiCoder=exports.AbiCoder=void 0;var logger=new lib.Logger(_version$8.version);var paramTypeBytes=new RegExp(/^bytes([0-9]*)$/);var paramTypeNumber=new RegExp(/^(u?int)([0-9]*)$/);var AbiCoder=function(){function AbiCoder(coerceFunc){var _newTarget=this.constructor;logger.checkNew(_newTarget,AbiCoder);(0,lib$3.defineReadOnly)(this,"coerceFunc",coerceFunc||null)}AbiCoder.prototype._getCoder=function(param){var _this=this;switch(param.baseType){case"address":return new address.AddressCoder(param.name);case"bool":return new boolean_1.BooleanCoder(param.name);case"string":return new string.StringCoder(param.name);case"bytes":return new bytes.BytesCoder(param.name);case"array":return new array.ArrayCoder(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new tuple.TupleCoder((param.components||[]).map(function(component){return _this._getCoder(component)}),param.name);case"":return new _null.NullCoder(param.name)}var match=param.type.match(paramTypeNumber);if(match){var size=parseInt(match[2]||"256");if(size===0||size>256||size%8!==0){logger.throwArgumentError("invalid "+match[1]+" bit length","param",param)}return new number.NumberCoder(size/8,match[1]==="int",param.name)}match=param.type.match(paramTypeBytes);if(match){var size=parseInt(match[1]);if(size===0||size>32){logger.throwArgumentError("invalid bytes length","param",param)}return new fixedBytes.FixedBytesCoder(size,param.name)}return logger.throwArgumentError("invalid type","type",param.type)};AbiCoder.prototype._getWordSize=function(){return 32};AbiCoder.prototype._getReader=function(data,allowLoose){return new abstractCoder.Reader(data,this._getWordSize(),this.coerceFunc,allowLoose)};AbiCoder.prototype._getWriter=function(){return new abstractCoder.Writer(this._getWordSize())};AbiCoder.prototype.getDefaultValue=function(types){var _this=this;var coders=types.map(function(type){return _this._getCoder(fragments.ParamType.from(type))});var coder=new tuple.TupleCoder(coders,"_");return coder.defaultValue()};AbiCoder.prototype.encode=function(types,values){var _this=this;if(types.length!==values.length){logger.throwError("types/values length mismatch",lib.Logger.errors.INVALID_ARGUMENT,{count:{types:types.length,values:values.length},value:{types:types,values:values}})}var coders=types.map(function(type){return _this._getCoder(fragments.ParamType.from(type))});var coder=new tuple.TupleCoder(coders,"_");var writer=this._getWriter();coder.encode(writer,values);return writer.data};AbiCoder.prototype.decode=function(types,data,loose){var _this=this;var coders=types.map(function(type){return _this._getCoder(fragments.ParamType.from(type))});var coder=new tuple.TupleCoder(coders,"_");return coder.decode(this._getReader((0,lib$1.arrayify)(data),loose))};return AbiCoder}();exports.AbiCoder=AbiCoder;exports.defaultAbiCoder=new AbiCoder});var abiCoder$1=getDefaultExportFromCjs(abiCoder);var id_1=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.id=void 0;function id(text){return(0,lib$4.keccak256)((0,lib$8.toUtf8Bytes)(text))}exports.id=id});var id=getDefaultExportFromCjs(id_1);var _version$g=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="hash/5.5.0"});var _version$h=getDefaultExportFromCjs(_version$g);var namehash_1=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.namehash=exports.isValidName=void 0;var logger=new lib.Logger(_version$g.version);var Zeros=new Uint8Array(32);Zeros.fill(0);var Partition=new RegExp("^((.*)\\.)?([^.]+)$");function isValidName(name){try{var comps=name.split(".");for(var i=0;i0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]256||match[2]&&match[2]!==String(width)){logger.throwArgumentError("invalid numeric width","type",type)}var boundsUpper_1=MaxUint256.mask(signed?width-1:width);var boundsLower_1=signed?boundsUpper_1.add(One).mul(NegativeOne):Zero;return function(value){var v=lib$2.BigNumber.from(value);if(v.lt(boundsLower_1)||v.gt(boundsUpper_1)){logger.throwArgumentError("value out-of-bounds for "+type,"value",value)}return(0,lib$1.hexZeroPad)(v.toTwos(256).toHexString(),32)}}}{var match=type.match(/^bytes(\d+)$/);if(match){var width_1=parseInt(match[1]);if(width_1===0||width_1>32||match[1]!==String(width_1)){logger.throwArgumentError("invalid bytes width","type",type)}return function(value){var bytes=(0,lib$1.arrayify)(value);if(bytes.length!==width_1){logger.throwArgumentError("invalid length for "+type,"value",value)}return hexPadRight(value)}}}switch(type){case"address":return function(value){return(0,lib$1.hexZeroPad)((0,lib$6.getAddress)(value),32)};case"bool":return function(value){return!value?hexFalse:hexTrue};case"bytes":return function(value){return(0,lib$4.keccak256)(value)};case"string":return function(value){return(0,id_1.id)(value)}}return null}function encodeType(name,fields){return name+"("+fields.map(function(_a){var name=_a.name,type=_a.type;return type+" "+name}).join(",")+")"}var TypedDataEncoder=function(){function TypedDataEncoder(types){(0,lib$3.defineReadOnly)(this,"types",Object.freeze((0,lib$3.deepCopy)(types)));(0,lib$3.defineReadOnly)(this,"_encoderCache",{});(0,lib$3.defineReadOnly)(this,"_types",{});var links={};var parents={};var subtypes={};Object.keys(types).forEach(function(type){links[type]={};parents[type]=[];subtypes[type]={}});var _loop_1=function(name_1){var uniqueNames={};types[name_1].forEach(function(field){if(uniqueNames[field.name]){logger.throwArgumentError("duplicate variable name "+JSON.stringify(field.name)+" in "+JSON.stringify(name_1),"types",types)}uniqueNames[field.name]=true;var baseType=field.type.match(/^([^\x5b]*)(\x5b|$)/)[1];if(baseType===name_1){logger.throwArgumentError("circular type reference to "+JSON.stringify(baseType),"types",types)}var encoder=getBaseEncoder(baseType);if(encoder){return}if(!parents[baseType]){logger.throwArgumentError("unknown type "+JSON.stringify(baseType),"types",types)}parents[baseType].push(name_1);links[name_1][baseType]=true})};for(var name_1 in types){_loop_1(name_1)}var primaryTypes=Object.keys(parents).filter(function(n){return parents[n].length===0});if(primaryTypes.length===0){logger.throwArgumentError("missing primary type","types",types)}else if(primaryTypes.length>1){logger.throwArgumentError("ambiguous primary types or unused types: "+primaryTypes.map(function(t){return JSON.stringify(t)}).join(", "),"types",types)}(0,lib$3.defineReadOnly)(this,"primaryType",primaryTypes[0]);function checkCircular(type,found){if(found[type]){logger.throwArgumentError("circular type reference to "+JSON.stringify(type),"types",types)}found[type]=true;Object.keys(links[type]).forEach(function(child){if(!parents[child]){return}checkCircular(child,found);Object.keys(found).forEach(function(subtype){subtypes[subtype][child]=true})});delete found[type]}checkCircular(this.primaryType,{});for(var name_2 in subtypes){var st=Object.keys(subtypes[name_2]);st.sort();this._types[name_2]=encodeType(name_2,types[name_2])+st.map(function(t){return encodeType(t,types[t])}).join("")}}TypedDataEncoder.prototype.getEncoder=function(type){var encoder=this._encoderCache[type];if(!encoder){encoder=this._encoderCache[type]=this._getEncoder(type)}return encoder};TypedDataEncoder.prototype._getEncoder=function(type){var _this=this;{var encoder=getBaseEncoder(type);if(encoder){return encoder}}var match=type.match(/^(.*)(\x5b(\d*)\x5d)$/);if(match){var subtype_1=match[1];var subEncoder_1=this.getEncoder(subtype_1);var length_1=parseInt(match[3]);return function(value){if(length_1>=0&&value.length!==length_1){logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",value)}var result=value.map(subEncoder_1);if(_this._types[subtype_1]){result=result.map(lib$4.keccak256)}return(0,lib$4.keccak256)((0,lib$1.hexConcat)(result))}}var fields=this.types[type];if(fields){var encodedType_1=(0,id_1.id)(this._types[type]);return function(value){var values=fields.map(function(_a){var name=_a.name,type=_a.type;var result=_this.getEncoder(type)(value[name]);if(_this._types[type]){return(0,lib$4.keccak256)(result)}return result});values.unshift(encodedType_1);return(0,lib$1.hexConcat)(values)}}return logger.throwArgumentError("unknown type: "+type,"type",type)};TypedDataEncoder.prototype.encodeType=function(name){var result=this._types[name];if(!result){logger.throwArgumentError("unknown type: "+JSON.stringify(name),"name",name)}return result};TypedDataEncoder.prototype.encodeData=function(type,value){return this.getEncoder(type)(value)};TypedDataEncoder.prototype.hashStruct=function(name,value){return(0,lib$4.keccak256)(this.encodeData(name,value))};TypedDataEncoder.prototype.encode=function(value){return this.encodeData(this.primaryType,value)};TypedDataEncoder.prototype.hash=function(value){return this.hashStruct(this.primaryType,value)};TypedDataEncoder.prototype._visit=function(type,value,callback){var _this=this;{var encoder=getBaseEncoder(type);if(encoder){return callback(type,value)}}var match=type.match(/^(.*)(\x5b(\d*)\x5d)$/);if(match){var subtype_2=match[1];var length_2=parseInt(match[3]);if(length_2>=0&&value.length!==length_2){logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",value)}return value.map(function(v){return _this._visit(subtype_2,v,callback)})}var fields=this.types[type];if(fields){return fields.reduce(function(accum,_a){var name=_a.name,type=_a.type;accum[name]=_this._visit(type,value[name],callback);return accum},{})}return logger.throwArgumentError("unknown type: "+type,"type",type)};TypedDataEncoder.prototype.visit=function(value,callback){return this._visit(this.primaryType,value,callback)};TypedDataEncoder.from=function(types){return new TypedDataEncoder(types)};TypedDataEncoder.getPrimaryType=function(types){return TypedDataEncoder.from(types).primaryType};TypedDataEncoder.hashStruct=function(name,types,value){return TypedDataEncoder.from(types).hashStruct(name,value)};TypedDataEncoder.hashDomain=function(domain){var domainFields=[];for(var name_3 in domain){var type=domainFieldTypes[name_3];if(!type){logger.throwArgumentError("invalid typed-data domain key: "+JSON.stringify(name_3),"domain",domain)}domainFields.push({name:name_3,type:type})}domainFields.sort(function(a,b){return domainFieldNames.indexOf(a.name)-domainFieldNames.indexOf(b.name)});return TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:domainFields},domain)};TypedDataEncoder.encode=function(domain,types,value){return(0,lib$1.hexConcat)(["0x1901",TypedDataEncoder.hashDomain(domain),TypedDataEncoder.from(types).hash(value)])};TypedDataEncoder.hash=function(domain,types,value){return(0,lib$4.keccak256)(TypedDataEncoder.encode(domain,types,value))};TypedDataEncoder.resolveNames=function(domain,types,value,resolveName){return __awaiter(this,void 0,void 0,function(){var ensCache,encoder,_a,_b,_i,name_4,_c,_d;return __generator(this,function(_e){switch(_e.label){case 0:domain=(0,lib$3.shallowCopy)(domain);ensCache={};if(domain.verifyingContract&&!(0,lib$1.isHexString)(domain.verifyingContract,20)){ensCache[domain.verifyingContract]="0x"}encoder=TypedDataEncoder.from(types);encoder.visit(value,function(type,value){if(type==="address"&&!(0,lib$1.isHexString)(value,20)){ensCache[value]="0x"}return value});_a=[];for(_b in ensCache)_a.push(_b);_i=0;_e.label=1;case 1:if(!(_i<_a.length))return[3,4];name_4=_a[_i];_c=ensCache;_d=name_4;return[4,resolveName(name_4)];case 2:_c[_d]=_e.sent();_e.label=3;case 3:_i++;return[3,1];case 4:if(domain.verifyingContract&&ensCache[domain.verifyingContract]){domain.verifyingContract=ensCache[domain.verifyingContract]}value=encoder.visit(value,function(type,value){if(type==="address"&&ensCache[value]){return ensCache[value]}return value});return[2,{domain:domain,value:value}]}})})};TypedDataEncoder.getPayload=function(domain,types,value){TypedDataEncoder.hashDomain(domain);var domainValues={};var domainTypes=[];domainFieldNames.forEach(function(name){var value=domain[name];if(value==null){return}domainValues[name]=domainChecks[name](value);domainTypes.push({name:name,type:domainFieldTypes[name]})});var encoder=TypedDataEncoder.from(types);var typesWithDomain=(0,lib$3.shallowCopy)(types);if(typesWithDomain.EIP712Domain){logger.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",types)}else{typesWithDomain.EIP712Domain=domainTypes}encoder.encode(value);return{types:typesWithDomain,domain:domainValues,primaryType:encoder.primaryType,message:encoder.visit(value,function(type,value){if(type.match(/^bytes(\d*)/)){return(0,lib$1.hexlify)((0,lib$1.arrayify)(value))}if(type.match(/^u?int/)){return lib$2.BigNumber.from(value).toString()}switch(type){case"address":return value.toLowerCase();case"bool":return!!value;case"string":if(typeof value!=="string"){logger.throwArgumentError("invalid string","value",value)}return value}return logger.throwArgumentError("unsupported type","type",type)})}};return TypedDataEncoder}();exports.TypedDataEncoder=TypedDataEncoder});var typedData$1=getDefaultExportFromCjs(typedData);var lib$9=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports._TypedDataEncoder=exports.hashMessage=exports.messagePrefix=exports.isValidName=exports.namehash=exports.id=void 0;Object.defineProperty(exports,"id",{enumerable:true,get:function(){return id_1.id}});Object.defineProperty(exports,"isValidName",{enumerable:true,get:function(){return namehash_1.isValidName}});Object.defineProperty(exports,"namehash",{enumerable:true,get:function(){return namehash_1.namehash}});Object.defineProperty(exports,"hashMessage",{enumerable:true,get:function(){return message.hashMessage}});Object.defineProperty(exports,"messagePrefix",{enumerable:true,get:function(){return message.messagePrefix}});Object.defineProperty(exports,"_TypedDataEncoder",{enumerable:true,get:function(){return typedData.TypedDataEncoder}})});var index$9=getDefaultExportFromCjs(lib$9);var _interface=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.Interface=exports.Indexed=exports.ErrorDescription=exports.TransactionDescription=exports.LogDescription=exports.checkResultErrors=void 0;Object.defineProperty(exports,"checkResultErrors",{enumerable:true,get:function(){return abstractCoder.checkResultErrors}});var logger=new lib.Logger(_version$8.version);var LogDescription=function(_super){__extends(LogDescription,_super);function LogDescription(){return _super!==null&&_super.apply(this,arguments)||this}return LogDescription}(lib$3.Description);exports.LogDescription=LogDescription;var TransactionDescription=function(_super){__extends(TransactionDescription,_super);function TransactionDescription(){return _super!==null&&_super.apply(this,arguments)||this}return TransactionDescription}(lib$3.Description);exports.TransactionDescription=TransactionDescription;var ErrorDescription=function(_super){__extends(ErrorDescription,_super);function ErrorDescription(){return _super!==null&&_super.apply(this,arguments)||this}return ErrorDescription}(lib$3.Description);exports.ErrorDescription=ErrorDescription;var Indexed=function(_super){__extends(Indexed,_super);function Indexed(){return _super!==null&&_super.apply(this,arguments)||this}Indexed.isIndexed=function(value){return!!(value&&value._isIndexed)};return Indexed}(lib$3.Description);exports.Indexed=Indexed;var BuiltinErrors={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:true},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(property,error){var wrap=new Error("deferred error during ABI decoding triggered accessing "+property);wrap.error=error;return wrap}var Interface=function(){function Interface(fragments$1){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,Interface);var abi=[];if(typeof fragments$1==="string"){abi=JSON.parse(fragments$1)}else{abi=fragments$1}(0,lib$3.defineReadOnly)(this,"fragments",abi.map(function(fragment){return fragments.Fragment.from(fragment)}).filter(function(fragment){return fragment!=null}));(0,lib$3.defineReadOnly)(this,"_abiCoder",(0,lib$3.getStatic)(_newTarget,"getAbiCoder")());(0,lib$3.defineReadOnly)(this,"functions",{});(0,lib$3.defineReadOnly)(this,"errors",{});(0,lib$3.defineReadOnly)(this,"events",{});(0,lib$3.defineReadOnly)(this,"structs",{});this.fragments.forEach(function(fragment){var bucket=null;switch(fragment.type){case"constructor":if(_this.deploy){logger.warn("duplicate definition - constructor");return}(0,lib$3.defineReadOnly)(_this,"deploy",fragment);return;case"function":bucket=_this.functions;break;case"event":bucket=_this.events;break;case"error":bucket=_this.errors;break;default:return}var signature=fragment.format();if(bucket[signature]){logger.warn("duplicate definition - "+signature);return}bucket[signature]=fragment});if(!this.deploy){(0,lib$3.defineReadOnly)(this,"deploy",fragments.ConstructorFragment.from({payable:false,type:"constructor"}))}(0,lib$3.defineReadOnly)(this,"_isInterface",true)}Interface.prototype.format=function(format){if(!format){format=fragments.FormatTypes.full}if(format===fragments.FormatTypes.sighash){logger.throwArgumentError("interface does not support formatting sighash","format",format)}var abi=this.fragments.map(function(fragment){return fragment.format(format)});if(format===fragments.FormatTypes.json){return JSON.stringify(abi.map(function(j){return JSON.parse(j)}))}return abi};Interface.getAbiCoder=function(){return abiCoder.defaultAbiCoder};Interface.getAddress=function(address){return(0,lib$6.getAddress)(address)};Interface.getSighash=function(fragment){return(0,lib$1.hexDataSlice)((0,lib$9.id)(fragment.format()),0,4)};Interface.getEventTopic=function(eventFragment){return(0,lib$9.id)(eventFragment.format())};Interface.prototype.getFunction=function(nameOrSignatureOrSighash){if((0,lib$1.isHexString)(nameOrSignatureOrSighash)){for(var name_1 in this.functions){if(nameOrSignatureOrSighash===this.getSighash(name_1)){return this.functions[name_1]}}logger.throwArgumentError("no matching function","sighash",nameOrSignatureOrSighash)}if(nameOrSignatureOrSighash.indexOf("(")===-1){var name_2=nameOrSignatureOrSighash.trim();var matching=Object.keys(this.functions).filter(function(f){return f.split("(")[0]===name_2});if(matching.length===0){logger.throwArgumentError("no matching function","name",name_2)}else if(matching.length>1){logger.throwArgumentError("multiple matching functions","name",name_2)}return this.functions[matching[0]]}var result=this.functions[fragments.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];if(!result){logger.throwArgumentError("no matching function","signature",nameOrSignatureOrSighash)}return result};Interface.prototype.getEvent=function(nameOrSignatureOrTopic){if((0,lib$1.isHexString)(nameOrSignatureOrTopic)){var topichash=nameOrSignatureOrTopic.toLowerCase();for(var name_3 in this.events){if(topichash===this.getEventTopic(name_3)){return this.events[name_3]}}logger.throwArgumentError("no matching event","topichash",topichash)}if(nameOrSignatureOrTopic.indexOf("(")===-1){var name_4=nameOrSignatureOrTopic.trim();var matching=Object.keys(this.events).filter(function(f){return f.split("(")[0]===name_4});if(matching.length===0){logger.throwArgumentError("no matching event","name",name_4)}else if(matching.length>1){logger.throwArgumentError("multiple matching events","name",name_4)}return this.events[matching[0]]}var result=this.events[fragments.EventFragment.fromString(nameOrSignatureOrTopic).format()];if(!result){logger.throwArgumentError("no matching event","signature",nameOrSignatureOrTopic)}return result};Interface.prototype.getError=function(nameOrSignatureOrSighash){if((0,lib$1.isHexString)(nameOrSignatureOrSighash)){var getSighash=(0,lib$3.getStatic)(this.constructor,"getSighash");for(var name_5 in this.errors){var error=this.errors[name_5];if(nameOrSignatureOrSighash===getSighash(error)){return this.errors[name_5]}}logger.throwArgumentError("no matching error","sighash",nameOrSignatureOrSighash)}if(nameOrSignatureOrSighash.indexOf("(")===-1){var name_6=nameOrSignatureOrSighash.trim();var matching=Object.keys(this.errors).filter(function(f){return f.split("(")[0]===name_6});if(matching.length===0){logger.throwArgumentError("no matching error","name",name_6)}else if(matching.length>1){logger.throwArgumentError("multiple matching errors","name",name_6)}return this.errors[matching[0]]}var result=this.errors[fragments.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];if(!result){logger.throwArgumentError("no matching error","signature",nameOrSignatureOrSighash)}return result};Interface.prototype.getSighash=function(fragment){if(typeof fragment==="string"){try{fragment=this.getFunction(fragment)}catch(error){try{fragment=this.getError(fragment)}catch(_){throw error}}}return(0,lib$3.getStatic)(this.constructor,"getSighash")(fragment)};Interface.prototype.getEventTopic=function(eventFragment){if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}return(0,lib$3.getStatic)(this.constructor,"getEventTopic")(eventFragment)};Interface.prototype._decodeParams=function(params,data){return this._abiCoder.decode(params,data)};Interface.prototype._encodeParams=function(params,values){return this._abiCoder.encode(params,values)};Interface.prototype.encodeDeploy=function(values){return this._encodeParams(this.deploy.inputs,values||[])};Interface.prototype.decodeErrorResult=function(fragment,data){if(typeof fragment==="string"){fragment=this.getError(fragment)}var bytes=(0,lib$1.arrayify)(data);if((0,lib$1.hexlify)(bytes.slice(0,4))!==this.getSighash(fragment)){logger.throwArgumentError("data signature does not match error "+fragment.name+".","data",(0,lib$1.hexlify)(bytes))}return this._decodeParams(fragment.inputs,bytes.slice(4))};Interface.prototype.encodeErrorResult=function(fragment,values){if(typeof fragment==="string"){fragment=this.getError(fragment)}return(0,lib$1.hexlify)((0,lib$1.concat)([this.getSighash(fragment),this._encodeParams(fragment.inputs,values||[])]))};Interface.prototype.decodeFunctionData=function(functionFragment,data){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}var bytes=(0,lib$1.arrayify)(data);if((0,lib$1.hexlify)(bytes.slice(0,4))!==this.getSighash(functionFragment)){logger.throwArgumentError("data signature does not match function "+functionFragment.name+".","data",(0,lib$1.hexlify)(bytes))}return this._decodeParams(functionFragment.inputs,bytes.slice(4))};Interface.prototype.encodeFunctionData=function(functionFragment,values){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}return(0,lib$1.hexlify)((0,lib$1.concat)([this.getSighash(functionFragment),this._encodeParams(functionFragment.inputs,values||[])]))};Interface.prototype.decodeFunctionResult=function(functionFragment,data){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}var bytes=(0,lib$1.arrayify)(data);var reason=null;var errorArgs=null;var errorName=null;var errorSignature=null;switch(bytes.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(functionFragment.outputs,bytes)}catch(error){}break;case 4:{var selector=(0,lib$1.hexlify)(bytes.slice(0,4));var builtin=BuiltinErrors[selector];if(builtin){errorArgs=this._abiCoder.decode(builtin.inputs,bytes.slice(4));errorName=builtin.name;errorSignature=builtin.signature;if(builtin.reason){reason=errorArgs[0]}}else{try{var error=this.getError(selector);errorArgs=this._abiCoder.decode(error.inputs,bytes.slice(4));errorName=error.name;errorSignature=error.format()}catch(error){console.log(error)}}break}}return logger.throwError("call revert exception",lib.Logger.errors.CALL_EXCEPTION,{method:functionFragment.format(),errorArgs:errorArgs,errorName:errorName,errorSignature:errorSignature,reason:reason})};Interface.prototype.encodeFunctionResult=function(functionFragment,values){if(typeof functionFragment==="string"){functionFragment=this.getFunction(functionFragment)}return(0,lib$1.hexlify)(this._abiCoder.encode(functionFragment.outputs,values||[]))};Interface.prototype.encodeFilterTopics=function(eventFragment,values){var _this=this;if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}if(values.length>eventFragment.inputs.length){logger.throwError("too many arguments for "+eventFragment.format(),lib.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:values})}var topics=[];if(!eventFragment.anonymous){topics.push(this.getEventTopic(eventFragment))}var encodeTopic=function(param,value){if(param.type==="string"){return(0,lib$9.id)(value)}else if(param.type==="bytes"){return(0,lib$4.keccak256)((0,lib$1.hexlify)(value))}if(param.type==="address"){_this._abiCoder.encode(["address"],[value])}return(0,lib$1.hexZeroPad)((0,lib$1.hexlify)(value),32)};values.forEach(function(value,index){var param=eventFragment.inputs[index];if(!param.indexed){if(value!=null){logger.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,value)}return}if(value==null){topics.push(null)}else if(param.baseType==="array"||param.baseType==="tuple"){logger.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,value)}else if(Array.isArray(value)){topics.push(value.map(function(value){return encodeTopic(param,value)}))}else{topics.push(encodeTopic(param,value))}});while(topics.length&&topics[topics.length-1]===null){topics.pop()}return topics};Interface.prototype.encodeEventLog=function(eventFragment,values){var _this=this;if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}var topics=[];var dataTypes=[];var dataValues=[];if(!eventFragment.anonymous){topics.push(this.getEventTopic(eventFragment))}if(values.length!==eventFragment.inputs.length){logger.throwArgumentError("event arguments/values mismatch","values",values)}eventFragment.inputs.forEach(function(param,index){var value=values[index];if(param.indexed){if(param.type==="string"){topics.push((0,lib$9.id)(value))}else if(param.type==="bytes"){topics.push((0,lib$4.keccak256)(value))}else if(param.baseType==="tuple"||param.baseType==="array"){throw new Error("not implemented")}else{topics.push(_this._abiCoder.encode([param.type],[value]))}}else{dataTypes.push(param);dataValues.push(value)}});return{data:this._abiCoder.encode(dataTypes,dataValues),topics:topics}};Interface.prototype.decodeEventLog=function(eventFragment,data,topics){if(typeof eventFragment==="string"){eventFragment=this.getEvent(eventFragment)}if(topics!=null&&!eventFragment.anonymous){var topicHash=this.getEventTopic(eventFragment);if(!(0,lib$1.isHexString)(topics[0],32)||topics[0].toLowerCase()!==topicHash){logger.throwError("fragment/topic mismatch",lib.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:topicHash,value:topics[0]})}topics=topics.slice(1)}var indexed=[];var nonIndexed=[];var dynamic=[];eventFragment.inputs.forEach(function(param,index){if(param.indexed){if(param.type==="string"||param.type==="bytes"||param.baseType==="tuple"||param.baseType==="array"){indexed.push(fragments.ParamType.fromObject({type:"bytes32",name:param.name}));dynamic.push(true)}else{indexed.push(param);dynamic.push(false)}}else{nonIndexed.push(param);dynamic.push(false)}});var resultIndexed=topics!=null?this._abiCoder.decode(indexed,(0,lib$1.concat)(topics)):null;var resultNonIndexed=this._abiCoder.decode(nonIndexed,data,true);var result=[];var nonIndexedIndex=0,indexedIndex=0;eventFragment.inputs.forEach(function(param,index){if(param.indexed){if(resultIndexed==null){result[index]=new Indexed({_isIndexed:true,hash:null})}else if(dynamic[index]){result[index]=new Indexed({_isIndexed:true,hash:resultIndexed[indexedIndex++]})}else{try{result[index]=resultIndexed[indexedIndex++]}catch(error){result[index]=error}}}else{try{result[index]=resultNonIndexed[nonIndexedIndex++]}catch(error){result[index]=error}}if(param.name&&result[param.name]==null){var value_1=result[index];if(value_1 instanceof Error){Object.defineProperty(result,param.name,{enumerable:true,get:function(){throw wrapAccessError("property "+JSON.stringify(param.name),value_1)}})}else{result[param.name]=value_1}}});var _loop_1=function(i){var value=result[i];if(value instanceof Error){Object.defineProperty(result,i,{enumerable:true,get:function(){throw wrapAccessError("index "+i,value)}})}};for(var i=0;i0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]=0){throw error}return logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:error,tx:tx})})}if(tx.chainId==null){tx.chainId=this.getChainId()}else{tx.chainId=Promise.all([Promise.resolve(tx.chainId),this.getChainId()]).then(function(results){if(results[1]!==0&&results[0]!==results[1]){logger.throwArgumentError("chainId address mismatch","transaction",transaction)}return results[0]})}return[4,(0,lib$3.resolveProperties)(tx)];case 6:return[2,_a.sent()]}})})};Signer.prototype._checkProvider=function(operation){if(!this.provider){logger.throwError("missing provider",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:operation||"_checkProvider"})}};Signer.isSigner=function(value){return!!(value&&value._isSigner)};return Signer}();exports.Signer=Signer;var VoidSigner=function(_super){__extends(VoidSigner,_super);function VoidSigner(address,provider){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,VoidSigner);_this=_super.call(this)||this;(0,lib$3.defineReadOnly)(_this,"address",address);(0,lib$3.defineReadOnly)(_this,"provider",provider||null);return _this}VoidSigner.prototype.getAddress=function(){return Promise.resolve(this.address)};VoidSigner.prototype._fail=function(message,operation){return Promise.resolve().then(function(){logger.throwError(message,lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:operation})})};VoidSigner.prototype.signMessage=function(message){return this._fail("VoidSigner cannot sign messages","signMessage")};VoidSigner.prototype.signTransaction=function(transaction){return this._fail("VoidSigner cannot sign transactions","signTransaction")};VoidSigner.prototype._signTypedData=function(domain,types,value){return this._fail("VoidSigner cannot sign typed data","signTypedData")};VoidSigner.prototype.connect=function(provider){return new VoidSigner(this.address,provider)};return VoidSigner}(Signer);exports.VoidSigner=VoidSigner});var index$c=getDefaultExportFromCjs(lib$c);var minimalisticAssert=assert;function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)};var utils_1=createCommonjsModule(function(module,exports){"use strict";var utils=exports;function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg!=="string"){for(var i=0;i>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}return res}utils.toArray=toArray;function zero2(word){if(word.length===1)return"0"+word;else return word}utils.zero2=zero2;function toHex(msg){var res="";for(var i=0;i(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z)}else{z=0}naf[i]=z;k.iushrn(1)}return naf}utils.getNAF=getNAF;function getJSF(k1,k2){var jsf=[[],[]];k1=k1.clone();k2=k2.clone();var d1=0;var d2=0;var m8;while(k1.cmpn(-d1)>0||k2.cmpn(-d2)>0){var m14=k1.andln(3)+d1&3;var m24=k2.andln(3)+d2&3;if(m14===3)m14=-1;if(m24===3)m24=-1;var u1;if((m14&1)===0){u1=0}else{m8=k1.andln(7)+d1&7;if((m8===3||m8===5)&&m24===2)u1=-m14;else u1=m14}jsf[0].push(u1);var u2;if((m24&1)===0){u2=0}else{m8=k2.andln(7)+d2&7;if((m8===3||m8===5)&&m14===2)u2=-m24;else u2=m24}jsf[1].push(u2);if(2*d1===u1+1)d1=1-d1;if(2*d2===u2+1)d2=1-d2;k1.iushrn(1);k2.iushrn(1)}return jsf}utils.getJSF=getJSF;function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return this[key]!==undefined?this[key]:this[key]=computer.call(this)}}utils.cachedProperty=cachedProperty;function parseBytes(bytes){return typeof bytes==="string"?utils.toArray(bytes,"hex"):bytes}utils.parseBytes=parseBytes;function intFromLE(bytes){return new bn(bytes,"hex","le")}utils.intFromLE=intFromLE});"use strict";var getNAF=utils_1$1.getNAF;var getJSF=utils_1$1.getJSF;var assert$1=utils_1$1.assert;function BaseCurve(type,conf){this.type=type;this.p=new bn(conf.p,16);this.red=conf.prime?bn.red(conf.prime):bn.mont(this.p);this.zero=new bn(0).toRed(this.red);this.one=new bn(1).toRed(this.red);this.two=new bn(2).toRed(this.red);this.n=conf.n&&new bn(conf.n,16);this.g=conf.g&&this.pointFromJSON(conf.g,conf.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);this._bitLength=this.n?this.n.bitLength():0;var adjustCount=this.n&&this.p.div(this.n);if(!adjustCount||adjustCount.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}var base=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert$1(p.precomputed);var doubles=p._getDoubles();var naf=getNAF(k,1,this._bitLength);var I=(1<=j;l--)nafW=(nafW<<1)+naf[l];repr.push(nafW)}var a=this.jpoint(null,null,null);var b=this.jpoint(null,null,null);for(var i=I;i>0;i--){for(j=0;j=0;i--){for(var l=0;i>=0&&naf[i]===0;i--)l++;if(i>=0)l++;acc=acc.dblp(l);if(i<0)break;var z=naf[i];assert$1(z!==0);if(p.type==="affine"){if(z>0)acc=acc.mixedAdd(wnd[z-1>>1]);else acc=acc.mixedAdd(wnd[-z-1>>1].neg())}else{if(z>0)acc=acc.add(wnd[z-1>>1]);else acc=acc.add(wnd[-z-1>>1].neg())}}return p.type==="affine"?acc.toP():acc};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var wndWidth=this._wnafT1;var wnd=this._wnafT2;var naf=this._wnafT3;var max=0;var i;var j;var p;for(i=0;i=1;i-=2){var a=i-1;var b=i;if(wndWidth[a]!==1||wndWidth[b]!==1){naf[a]=getNAF(coeffs[a],wndWidth[a],this._bitLength);naf[b]=getNAF(coeffs[b],wndWidth[b],this._bitLength);max=Math.max(naf[a].length,max);max=Math.max(naf[b].length,max);continue}var comb=[points[a],null,null,points[b]];if(points[a].y.cmp(points[b].y)===0){comb[1]=points[a].add(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}else if(points[a].y.cmp(points[b].y.redNeg())===0){comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].add(points[b].neg())}else{comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}var index=[-3,-1,-5,-7,0,7,5,1,3];var jsf=getJSF(coeffs[a],coeffs[b]);max=Math.max(jsf[0].length,max);naf[a]=new Array(max);naf[b]=new Array(max);for(j=0;j=0;i--){var k=0;while(i>=0){var zero=true;for(j=0;j=0)k++;acc=acc.dblp(k);if(i<0)break;for(j=0;j0)p=wnd[j][z-1>>1];else if(z<0)p=wnd[j][-z-1>>1].neg();if(p.type==="affine")acc=acc.mixedAdd(p);else acc=acc.add(p)}}for(i=0;i=Math.ceil((k.bitLength()+1)/doubles.step)};BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var doubles=[this];var acc=this;for(var i=0;i=0){a2=a0;b2=b0}if(a1.negative){a1=a1.neg();b1=b1.neg()}if(a2.negative){a2=a2.neg();b2=b2.neg()}return[{a:a1,b:b1},{a:a2,b:b2}]};ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis;var v1=basis[0];var v2=basis[1];var c1=v2.b.mul(k).divRound(this.n);var c2=v1.b.neg().mul(k).divRound(this.n);var p1=c1.mul(v1.a);var p2=c2.mul(v2.a);var q1=c1.mul(v1.b);var q2=c2.mul(v2.b);var k1=k.sub(p1).sub(p2);var k2=q1.add(q2).neg();return{k1:k1,k2:k2}};ShortCurve.prototype.pointFromX=function pointFromX(x,odd){x=new bn(x,16);if(!x.red)x=x.toRed(this.red);var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);var y=y2.redSqrt();if(y.redSqr().redSub(y2).cmp(this.zero)!==0)throw new Error("invalid point");var isOdd=y.fromRed().isOdd();if(odd&&!isOdd||!odd&&isOdd)y=y.redNeg();return this.point(x,y)};ShortCurve.prototype.validate=function validate(point){if(point.inf)return true;var x=point.x;var y=point.y;var ax=this.a.redMul(x);var rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return y.redSqr().redISub(rhs).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){var npoints=this._endoWnafT1;var ncoeffs=this._endoWnafT2;for(var i=0;i";return""};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(this.x.cmp(p.x)===0)return this.curve.point(null,null);var c=this.y.redSub(p.y);if(c.cmpn(0)!==0)c=c.redMul(this.x.redSub(p.x).redInvm());var nx=c.redSqr().redISub(this.x).redISub(p.x);var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(ys1.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a;var x2=this.x.redSqr();var dyinv=ys1.redInvm();var c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);var nx=c.redSqr().redISub(this.x.redAdd(this.x));var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(k){k=new bn(k,16);if(this.isInfinity())return this;else if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[k]);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs);else return this.curve._wnafMulAdd(1,points,coeffs,2)};Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs,true);else return this.curve._wnafMulAdd(1,points,coeffs,2,true)};Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||this.x.cmp(p.x)===0&&this.y.cmp(p.y)===0)};Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed;var negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var res=this.curve.jpoint(this.x,this.y,this.curve.one);return res};function JPoint(curve,x,y,z){base.BasePoint.call(this,curve,"jacobian");if(x===null&&y===null&&z===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new bn(0)}else{this.x=new bn(x,16);this.y=new bn(y,16);this.z=new bn(z,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}inherits_browser(JPoint,base.BasePoint);ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm();var zinv2=zinv.redSqr();var ax=this.x.redMul(zinv2);var ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr();var z2=this.z.redSqr();var u1=this.x.redMul(pz2);var u2=p.x.redMul(z2);var s1=this.y.redMul(pz2.redMul(p.z));var s2=p.y.redMul(z2.redMul(this.z));var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr();var u1=this.x;var u2=p.x.redMul(z2);var s1=this.y;var s2=p.y.redMul(z2).redMul(this.z);var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.dblp=function dblp(pow){if(pow===0)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var r=this;for(i=0;i=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};var curve_1=createCommonjsModule(function(module,exports){"use strict";var curve=exports;curve.base=base;curve.short=short_1;curve.mont=null;curve.edwards=null});"use strict";var inherits_1=inherits_browser;function isSurrogatePair(msg,i){if((msg.charCodeAt(i)&64512)!==55296){return false}if(i<0||i+1>=msg.length){return false}return(msg.charCodeAt(i+1)&64512)===56320}function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg==="string"){if(!enc){var p=0;for(var i=0;i>6|192;res[p++]=c&63|128}else if(isSurrogatePair(msg,i)){c=65536+((c&1023)<<10)+(msg.charCodeAt(++i)&1023);res[p++]=c>>18|240;res[p++]=c>>12&63|128;res[p++]=c>>6&63|128;res[p++]=c&63|128}else{res[p++]=c>>12|224;res[p++]=c>>6&63|128;res[p++]=c&63|128}}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(i=0;i>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return res>>>0}var htonl_1=htonl;function toHex32(msg,endian){var res="";for(var i=0;i>>0}return res}var join32_1=join32;function split32(msg,endian){var res=new Array(msg.length*4);for(var i=0,k=0;i>>24;res[k+1]=m>>>16&255;res[k+2]=m>>>8&255;res[k+3]=m&255}else{res[k+3]=m>>>24;res[k+2]=m>>>16&255;res[k+1]=m>>>8&255;res[k]=m&255}}return res}var split32_1=split32;function rotr32(w,b){return w>>>b|w<<32-b}var rotr32_1=rotr32;function rotl32(w,b){return w<>>32-b}var rotl32_1=rotl32;function sum32(a,b){return a+b>>>0}var sum32_1=sum32;function sum32_3(a,b,c){return a+b+c>>>0}var sum32_3_1=sum32_3;function sum32_4(a,b,c,d){return a+b+c+d>>>0}var sum32_4_1=sum32_4;function sum32_5(a,b,c,d,e){return a+b+c+d+e>>>0}var sum32_5_1=sum32_5;function sum64(buf,pos,ah,al){var bh=buf[pos];var bl=buf[pos+1];var lo=al+bl>>>0;var hi=(lo>>0;buf[pos+1]=lo}var sum64_1=sum64;function sum64_hi(ah,al,bh,bl){var lo=al+bl>>>0;var hi=(lo>>0}var sum64_hi_1=sum64_hi;function sum64_lo(ah,al,bh,bl){var lo=al+bl;return lo>>>0}var sum64_lo_1=sum64_lo;function sum64_4_hi(ah,al,bh,bl,ch,cl,dh,dl){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}var sum64_4_hi_1=sum64_4_hi;function sum64_4_lo(ah,al,bh,bl,ch,cl,dh,dl){var lo=al+bl+cl+dl;return lo>>>0}var sum64_4_lo_1=sum64_4_lo;function sum64_5_hi(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0;carry+=lo>>0}var sum64_5_hi_1=sum64_5_hi;function sum64_5_lo(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var lo=al+bl+cl+dl+el;return lo>>>0}var sum64_5_lo_1=sum64_5_lo;function rotr64_hi(ah,al,num){var r=al<<32-num|ah>>>num;return r>>>0}var rotr64_hi_1=rotr64_hi;function rotr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}var rotr64_lo_1=rotr64_lo;function shr64_hi(ah,al,num){return ah>>>num}var shr64_hi_1=shr64_hi;function shr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}var shr64_lo_1=shr64_lo;var utils={inherits:inherits_1,toArray:toArray_1,toHex:toHex_1,htonl:htonl_1,toHex32:toHex32_1,zero2:zero2_1,zero8:zero8_1,join32:join32_1,split32:split32_1,rotr32:rotr32_1,rotl32:rotl32_1,sum32:sum32_1,sum32_3:sum32_3_1,sum32_4:sum32_4_1,sum32_5:sum32_5_1,sum64:sum64_1,sum64_hi:sum64_hi_1,sum64_lo:sum64_lo_1,sum64_4_hi:sum64_4_hi_1,sum64_4_lo:sum64_4_lo_1,sum64_5_hi:sum64_5_hi_1,sum64_5_lo:sum64_5_lo_1,rotr64_hi:rotr64_hi_1,rotr64_lo:rotr64_lo_1,shr64_hi:shr64_hi_1,shr64_lo:shr64_lo_1};"use strict";function BlockHash(){this.pending=null;this.pendingTotal=0;this.blockSize=this.constructor.blockSize;this.outSize=this.constructor.outSize;this.hmacStrength=this.constructor.hmacStrength;this.padLength=this.constructor.padLength/8;this.endian="big";this._delta8=this.blockSize/8;this._delta32=this.blockSize/32}var BlockHash_1=BlockHash;BlockHash.prototype.update=function update(msg,enc){msg=utils.toArray(msg,enc);if(!this.pending)this.pending=msg;else this.pending=this.pending.concat(msg);this.pendingTotal+=msg.length;if(this.pending.length>=this._delta8){msg=this.pending;var r=msg.length%this._delta8;this.pending=msg.slice(msg.length-r,msg.length);if(this.pending.length===0)this.pending=null;msg=utils.join32(msg,0,msg.length-r,this.endian);for(var i=0;i>>24&255;res[i++]=len>>>16&255;res[i++]=len>>>8&255;res[i++]=len&255}else{res[i++]=len&255;res[i++]=len>>>8&255;res[i++]=len>>>16&255;res[i++]=len>>>24&255;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;for(t=8;t>>3}var g0_256_1=g0_256;function g1_256(x){return rotr32$1(x,17)^rotr32$1(x,19)^x>>>10}var g1_256_1=g1_256;var common$1={ft_1:ft_1_1,ch32:ch32_1,maj32:maj32_1,p32:p32_1,s0_256:s0_256_1,s1_256:s1_256_1,g0_256:g0_256_1,g1_256:g1_256_1};"use strict";var rotl32$1=utils.rotl32;var sum32$1=utils.sum32;var sum32_5$1=utils.sum32_5;var ft_1$1=common$1.ft_1;var BlockHash$1=common.BlockHash;var sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash$1.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}utils.inherits(SHA1,BlockHash$1);var _1=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function _update(msg,start){var W=this.W;for(var i=0;i<16;i++)W[i]=msg[start+i];for(;ithis.blockSize)key=(new this.Hash).update(key).digest();minimalisticAssert(key.length<=this.blockSize);for(var i=key.length;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(entropy,nonce,pers)}var hmacDrbg=HmacDRBG;HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(entropy.concat(add||[]));this._reseed=1};HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof enc!=="string"){addEnc=add;add=enc;enc=null}if(add){add=utils_1.toArray(add,addEnc||"hex");this._update(add)}var temp=[];while(temp.length"};"use strict";var assert$4=utils_1$1.assert;function Signature(options,enc){if(options instanceof Signature)return options;if(this._importDER(options,enc))return;assert$4(options.r&&options.s,"Signature without r or s");this.r=new bn(options.r,16);this.s=new bn(options.s,16);if(options.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=options.recoveryParam}var signature=Signature;function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(initial&128)){return initial}var octetLen=initial&15;if(octetLen===0||octetLen>4){return false}var val=0;for(var i=0,off=p.place;i>>=0}if(val<=127){return false}p.place=off;return val}function rmPadding(buf){var i=0;var len=buf.length-1;while(!buf[i]&&!(buf[i+1]&128)&&i>>3);arr.push(octets|128);while(--octets){arr.push(len>>>(octets<<3)&255)}arr.push(len)}Signature.prototype.toDER=function toDER(enc){var r=this.r.toArray();var s=this.s.toArray();if(r[0]&128)r=[0].concat(r);if(s[0]&128)s=[0].concat(s);r=rmPadding(r);s=rmPadding(s);while(!s[0]&&!(s[1]&128)){s=s.slice(1)}var arr=[2];constructLength(arr,r.length);arr=arr.concat(r);arr.push(2);constructLength(arr,s.length);var backHalf=arr.concat(s);var res=[48];constructLength(res,backHalf.length);res=res.concat(backHalf);return utils_1$1.encode(res,enc)};"use strict";var rand=function(){throw new Error("unsupported")};var assert$5=utils_1$1.assert;function EC(options){if(!(this instanceof EC))return new EC(options);if(typeof options==="string"){assert$5(Object.prototype.hasOwnProperty.call(curves_1,options),"Unknown curve "+options);options=curves_1[options]}if(options instanceof curves_1.PresetCurve)options={curve:options};this.curve=options.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=options.curve.g;this.g.precompute(options.curve.n.bitLength()+1);this.hash=options.hash||options.curve.hash}var ec=EC;EC.prototype.keyPair=function keyPair(options){return new key(this,options)};EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return key.fromPrivate(this,priv,enc)};EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return key.fromPublic(this,pub,enc)};EC.prototype.genKeyPair=function genKeyPair(options){if(!options)options={};var drbg=new hmacDrbg({hash:this.hash,pers:options.pers,persEnc:options.persEnc||"utf8",entropy:options.entropy||rand(this.hash.hmacStrength),entropyEnc:options.entropy&&options.entropyEnc||"utf8",nonce:this.n.toArray()});var bytes=this.n.byteLength();var ns2=this.n.sub(new bn(2));for(;;){var priv=new bn(drbg.generate(bytes));if(priv.cmp(ns2)>0)continue;priv.iaddn(1);return this.keyFromPrivate(priv)}};EC.prototype._truncateToN=function _truncateToN(msg,truncOnly){var delta=msg.byteLength()*8-this.n.bitLength();if(delta>0)msg=msg.ushrn(delta);if(!truncOnly&&msg.cmp(this.n)>=0)return msg.sub(this.n);else return msg};EC.prototype.sign=function sign(msg,key,enc,options){if(typeof enc==="object"){options=enc;enc=null}if(!options)options={};key=this.keyFromPrivate(key,enc);msg=this._truncateToN(new bn(msg,16));var bytes=this.n.byteLength();var bkey=key.getPrivate().toArray("be",bytes);var nonce=msg.toArray("be",bytes);var drbg=new hmacDrbg({hash:this.hash,entropy:bkey,nonce:nonce,pers:options.pers,persEnc:options.persEnc||"utf8"});var ns1=this.n.sub(new bn(1));for(var iter=0;;iter++){var k=options.k?options.k(iter):new bn(drbg.generate(this.n.byteLength()));k=this._truncateToN(k,true);if(k.cmpn(1)<=0||k.cmp(ns1)>=0)continue;var kp=this.g.mul(k);if(kp.isInfinity())continue;var kpX=kp.getX();var r=kpX.umod(this.n);if(r.cmpn(0)===0)continue;var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));s=s.umod(this.n);if(s.cmpn(0)===0)continue;var recoveryParam=(kp.getY().isOdd()?1:0)|(kpX.cmp(r)!==0?2:0);if(options.canonical&&s.cmp(this.nh)>0){s=this.n.sub(s);recoveryParam^=1}return new signature({r:r,s:s,recoveryParam:recoveryParam})}};EC.prototype.verify=function verify(msg,signature$1,key,enc){msg=this._truncateToN(new bn(msg,16));key=this.keyFromPublic(key,enc);signature$1=new signature(signature$1,"hex");var r=signature$1.r;var s=signature$1.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return false;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return false;var sinv=s.invm(this.n);var u1=sinv.mul(msg).umod(this.n);var u2=sinv.mul(r).umod(this.n);var p;if(!this.curve._maxwellTrick){p=this.g.mulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.getX().umod(this.n).cmp(r)===0}p=this.g.jmulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.eqXToP(r)};EC.prototype.recoverPubKey=function(msg,signature$1,j,enc){assert$5((3&j)===j,"The recovery param is more than two bits");signature$1=new signature(signature$1,enc);var n=this.n;var e=new bn(msg);var r=signature$1.r;var s=signature$1.s;var isYOdd=j&1;var isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");if(isSecondKey)r=this.curve.pointFromX(r.add(this.curve.n),isYOdd);else r=this.curve.pointFromX(r,isYOdd);var rInv=signature$1.r.invm(n);var s1=n.sub(e).mul(rInv).umod(n);var s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)};EC.prototype.getKeyRecoveryParam=function(e,signature$1,Q,enc){signature$1=new signature(signature$1,enc);if(signature$1.recoveryParam!==null)return signature$1.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature$1,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")};var elliptic_1=createCommonjsModule(function(module,exports){"use strict";var elliptic=exports;elliptic.version={version:"6.5.4"}.version;elliptic.utils=utils_1$1;elliptic.rand=function(){throw new Error("unsupported")};elliptic.curve=curve_1;elliptic.curves=curves_1;elliptic.ec=ec;elliptic.eddsa=null});var elliptic=createCommonjsModule(function(module,exports){"use strict";var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.EC=void 0;var elliptic_1$1=__importDefault(elliptic_1);var EC=elliptic_1$1.default.ec;exports.EC=EC});var elliptic$1=getDefaultExportFromCjs(elliptic);var _version$m=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="signing-key/5.5.0"});var _version$n=getDefaultExportFromCjs(_version$m);var lib$d=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.computePublicKey=exports.recoverPublicKey=exports.SigningKey=void 0;var logger=new lib.Logger(_version$m.version);var _curve=null;function getCurve(){if(!_curve){_curve=new elliptic.EC("secp256k1")}return _curve}var SigningKey=function(){function SigningKey(privateKey){(0,lib$3.defineReadOnly)(this,"curve","secp256k1");(0,lib$3.defineReadOnly)(this,"privateKey",(0,lib$1.hexlify)(privateKey));var keyPair=getCurve().keyFromPrivate((0,lib$1.arrayify)(this.privateKey));(0,lib$3.defineReadOnly)(this,"publicKey","0x"+keyPair.getPublic(false,"hex"));(0,lib$3.defineReadOnly)(this,"compressedPublicKey","0x"+keyPair.getPublic(true,"hex"));(0,lib$3.defineReadOnly)(this,"_isSigningKey",true)}SigningKey.prototype._addPoint=function(other){var p0=getCurve().keyFromPublic((0,lib$1.arrayify)(this.publicKey));var p1=getCurve().keyFromPublic((0,lib$1.arrayify)(other));return"0x"+p0.pub.add(p1.pub).encodeCompressed("hex")};SigningKey.prototype.signDigest=function(digest){var keyPair=getCurve().keyFromPrivate((0,lib$1.arrayify)(this.privateKey));var digestBytes=(0,lib$1.arrayify)(digest);if(digestBytes.length!==32){logger.throwArgumentError("bad digest length","digest",digest)}var signature=keyPair.sign(digestBytes,{canonical:true});return(0,lib$1.splitSignature)({recoveryParam:signature.recoveryParam,r:(0,lib$1.hexZeroPad)("0x"+signature.r.toString(16),32),s:(0,lib$1.hexZeroPad)("0x"+signature.s.toString(16),32)})};SigningKey.prototype.computeSharedSecret=function(otherKey){var keyPair=getCurve().keyFromPrivate((0,lib$1.arrayify)(this.privateKey));var otherKeyPair=getCurve().keyFromPublic((0,lib$1.arrayify)(computePublicKey(otherKey)));return(0,lib$1.hexZeroPad)("0x"+keyPair.derive(otherKeyPair.getPublic()).toString(16),32)};SigningKey.isSigningKey=function(value){return!!(value&&value._isSigningKey)};return SigningKey}();exports.SigningKey=SigningKey;function recoverPublicKey(digest,signature){var sig=(0,lib$1.splitSignature)(signature);var rs={r:(0,lib$1.arrayify)(sig.r),s:(0,lib$1.arrayify)(sig.s)};return"0x"+getCurve().recoverPubKey((0,lib$1.arrayify)(digest),rs,sig.recoveryParam).encode("hex",false)}exports.recoverPublicKey=recoverPublicKey;function computePublicKey(key,compressed){var bytes=(0,lib$1.arrayify)(key);if(bytes.length===32){var signingKey=new SigningKey(bytes);if(compressed){return"0x"+getCurve().keyFromPrivate(bytes).getPublic(true,"hex")}return signingKey.publicKey}else if(bytes.length===33){if(compressed){return(0,lib$1.hexlify)(bytes)}return"0x"+getCurve().keyFromPublic(bytes).getPublic(false,"hex")}else if(bytes.length===65){if(!compressed){return(0,lib$1.hexlify)(bytes)}return"0x"+getCurve().keyFromPublic(bytes).getPublic(true,"hex")}return logger.throwArgumentError("invalid public or private key","key","[REDACTED]")}exports.computePublicKey=computePublicKey});var index$d=getDefaultExportFromCjs(lib$d);var _version$o=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="transactions/5.5.0"});var _version$p=getDefaultExportFromCjs(_version$o);var lib$e=createCommonjsModule(function(module,exports){"use strict";var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};Object.defineProperty(exports,"__esModule",{value:true});exports.parse=exports.serialize=exports.accessListify=exports.recoverAddress=exports.computeAddress=exports.TransactionTypes=void 0;var RLP=__importStar(lib$5);var logger=new lib.Logger(_version$o.version);var TransactionTypes;(function(TransactionTypes){TransactionTypes[TransactionTypes["legacy"]=0]="legacy";TransactionTypes[TransactionTypes["eip2930"]=1]="eip2930";TransactionTypes[TransactionTypes["eip1559"]=2]="eip1559"})(TransactionTypes=exports.TransactionTypes||(exports.TransactionTypes={}));function handleAddress(value){if(value==="0x"){return null}return(0,lib$6.getAddress)(value)}function handleNumber(value){if(value==="0x"){return lib$7.Zero}return lib$2.BigNumber.from(value)}var transactionFields=[{name:"nonce",maxLength:32,numeric:true},{name:"gasPrice",maxLength:32,numeric:true},{name:"gasLimit",maxLength:32,numeric:true},{name:"to",length:20},{name:"value",maxLength:32,numeric:true},{name:"data"}];var allowedTransactionKeys={chainId:true,data:true,gasLimit:true,gasPrice:true,nonce:true,to:true,type:true,value:true};function computeAddress(key){var publicKey=(0,lib$d.computePublicKey)(key);return(0,lib$6.getAddress)((0,lib$1.hexDataSlice)((0,lib$4.keccak256)((0,lib$1.hexDataSlice)(publicKey,1)),12))}exports.computeAddress=computeAddress;function recoverAddress(digest,signature){return computeAddress((0,lib$d.recoverPublicKey)((0,lib$1.arrayify)(digest),signature))}exports.recoverAddress=recoverAddress;function formatNumber(value,name){var result=(0,lib$1.stripZeros)(lib$2.BigNumber.from(value).toHexString());if(result.length>32){logger.throwArgumentError("invalid length for "+name,"transaction:"+name,value)}return result}function accessSetify(addr,storageKeys){return{address:(0,lib$6.getAddress)(addr),storageKeys:(storageKeys||[]).map(function(storageKey,index){if((0,lib$1.hexDataLength)(storageKey)!==32){logger.throwArgumentError("invalid access list storageKey","accessList["+addr+":"+index+"]",storageKey)}return storageKey.toLowerCase()})}}function accessListify(value){if(Array.isArray(value)){return value.map(function(set,index){if(Array.isArray(set)){if(set.length>2){logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value["+index+"]",set)}return accessSetify(set[0],set[1])}return accessSetify(set.address,set.storageKeys)})}var result=Object.keys(value).map(function(addr){var storageKeys=value[addr].reduce(function(accum,storageKey){accum[storageKey]=true;return accum},{});return accessSetify(addr,Object.keys(storageKeys).sort())});result.sort(function(a,b){return a.address.localeCompare(b.address)});return result}exports.accessListify=accessListify;function formatAccessList(value){return accessListify(value).map(function(set){return[set.address,set.storageKeys]})}function _serializeEip1559(transaction,signature){if(transaction.gasPrice!=null){var gasPrice=lib$2.BigNumber.from(transaction.gasPrice);var maxFeePerGas=lib$2.BigNumber.from(transaction.maxFeePerGas||0);if(!gasPrice.eq(maxFeePerGas)){logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:gasPrice,maxFeePerGas:maxFeePerGas})}}var fields=[formatNumber(transaction.chainId||0,"chainId"),formatNumber(transaction.nonce||0,"nonce"),formatNumber(transaction.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber(transaction.maxFeePerGas||0,"maxFeePerGas"),formatNumber(transaction.gasLimit||0,"gasLimit"),transaction.to!=null?(0,lib$6.getAddress)(transaction.to):"0x",formatNumber(transaction.value||0,"value"),transaction.data||"0x",formatAccessList(transaction.accessList||[])];if(signature){var sig=(0,lib$1.splitSignature)(signature);fields.push(formatNumber(sig.recoveryParam,"recoveryParam"));fields.push((0,lib$1.stripZeros)(sig.r));fields.push((0,lib$1.stripZeros)(sig.s))}return(0,lib$1.hexConcat)(["0x02",RLP.encode(fields)])}function _serializeEip2930(transaction,signature){var fields=[formatNumber(transaction.chainId||0,"chainId"),formatNumber(transaction.nonce||0,"nonce"),formatNumber(transaction.gasPrice||0,"gasPrice"),formatNumber(transaction.gasLimit||0,"gasLimit"),transaction.to!=null?(0,lib$6.getAddress)(transaction.to):"0x",formatNumber(transaction.value||0,"value"),transaction.data||"0x",formatAccessList(transaction.accessList||[])];if(signature){var sig=(0,lib$1.splitSignature)(signature);fields.push(formatNumber(sig.recoveryParam,"recoveryParam"));fields.push((0,lib$1.stripZeros)(sig.r));fields.push((0,lib$1.stripZeros)(sig.s))}return(0,lib$1.hexConcat)(["0x01",RLP.encode(fields)])}function _serialize(transaction,signature){(0,lib$3.checkProperties)(transaction,allowedTransactionKeys);var raw=[];transactionFields.forEach(function(fieldInfo){var value=transaction[fieldInfo.name]||[];var options={};if(fieldInfo.numeric){options.hexPad="left"}value=(0,lib$1.arrayify)((0,lib$1.hexlify)(value,options));if(fieldInfo.length&&value.length!==fieldInfo.length&&value.length>0){logger.throwArgumentError("invalid length for "+fieldInfo.name,"transaction:"+fieldInfo.name,value)}if(fieldInfo.maxLength){value=(0,lib$1.stripZeros)(value);if(value.length>fieldInfo.maxLength){logger.throwArgumentError("invalid length for "+fieldInfo.name,"transaction:"+fieldInfo.name,value)}}raw.push((0,lib$1.hexlify)(value))});var chainId=0;if(transaction.chainId!=null){chainId=transaction.chainId;if(typeof chainId!=="number"){logger.throwArgumentError("invalid transaction.chainId","transaction",transaction)}}else if(signature&&!(0,lib$1.isBytesLike)(signature)&&signature.v>28){chainId=Math.floor((signature.v-35)/2)}if(chainId!==0){raw.push((0,lib$1.hexlify)(chainId));raw.push("0x");raw.push("0x")}if(!signature){return RLP.encode(raw)}var sig=(0,lib$1.splitSignature)(signature);var v=27+sig.recoveryParam;if(chainId!==0){raw.pop();raw.pop();raw.pop();v+=chainId*2+8;if(sig.v>28&&sig.v!==v){logger.throwArgumentError("transaction.chainId/signature.v mismatch","signature",signature)}}else if(sig.v!==v){logger.throwArgumentError("transaction.chainId/signature.v mismatch","signature",signature)}raw.push((0,lib$1.hexlify)(v));raw.push((0,lib$1.stripZeros)((0,lib$1.arrayify)(sig.r)));raw.push((0,lib$1.stripZeros)((0,lib$1.arrayify)(sig.s)));return RLP.encode(raw)}function serialize(transaction,signature){if(transaction.type==null||transaction.type===0){if(transaction.accessList!=null){logger.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",transaction)}return _serialize(transaction,signature)}switch(transaction.type){case 1:return _serializeEip2930(transaction,signature);case 2:return _serializeEip1559(transaction,signature);default:break}return logger.throwError("unsupported transaction type: "+transaction.type,lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:transaction.type})}exports.serialize=serialize;function _parseEipSignature(tx,fields,serialize){try{var recid=handleNumber(fields[0]).toNumber();if(recid!==0&&recid!==1){throw new Error("bad recid")}tx.v=recid}catch(error){logger.throwArgumentError("invalid v for transaction type: 1","v",fields[0])}tx.r=(0,lib$1.hexZeroPad)(fields[1],32);tx.s=(0,lib$1.hexZeroPad)(fields[2],32);try{var digest=(0,lib$4.keccak256)(serialize(tx));tx.from=recoverAddress(digest,{r:tx.r,s:tx.s,recoveryParam:tx.v})}catch(error){console.log(error)}}function _parseEip1559(payload){var transaction=RLP.decode(payload.slice(1));if(transaction.length!==9&&transaction.length!==12){logger.throwArgumentError("invalid component count for transaction type: 2","payload",(0,lib$1.hexlify)(payload))}var maxPriorityFeePerGas=handleNumber(transaction[2]);var maxFeePerGas=handleNumber(transaction[3]);var tx={type:2,chainId:handleNumber(transaction[0]).toNumber(),nonce:handleNumber(transaction[1]).toNumber(),maxPriorityFeePerGas:maxPriorityFeePerGas,maxFeePerGas:maxFeePerGas,gasPrice:null,gasLimit:handleNumber(transaction[4]),to:handleAddress(transaction[5]),value:handleNumber(transaction[6]),data:transaction[7],accessList:accessListify(transaction[8])};if(transaction.length===9){return tx}tx.hash=(0,lib$4.keccak256)(payload);_parseEipSignature(tx,transaction.slice(9),_serializeEip1559);return tx}function _parseEip2930(payload){var transaction=RLP.decode(payload.slice(1));if(transaction.length!==8&&transaction.length!==11){logger.throwArgumentError("invalid component count for transaction type: 1","payload",(0,lib$1.hexlify)(payload))}var tx={type:1,chainId:handleNumber(transaction[0]).toNumber(),nonce:handleNumber(transaction[1]).toNumber(),gasPrice:handleNumber(transaction[2]),gasLimit:handleNumber(transaction[3]),to:handleAddress(transaction[4]),value:handleNumber(transaction[5]),data:transaction[6],accessList:accessListify(transaction[7])};if(transaction.length===8){return tx}tx.hash=(0,lib$4.keccak256)(payload);_parseEipSignature(tx,transaction.slice(8),_serializeEip2930);return tx}function _parse(rawTransaction){var transaction=RLP.decode(rawTransaction);if(transaction.length!==9&&transaction.length!==6){logger.throwArgumentError("invalid raw transaction","rawTransaction",rawTransaction)}var tx={nonce:handleNumber(transaction[0]).toNumber(),gasPrice:handleNumber(transaction[1]),gasLimit:handleNumber(transaction[2]),to:handleAddress(transaction[3]),value:handleNumber(transaction[4]),data:transaction[5],chainId:0};if(transaction.length===6){return tx}try{tx.v=lib$2.BigNumber.from(transaction[6]).toNumber()}catch(error){console.log(error);return tx}tx.r=(0,lib$1.hexZeroPad)(transaction[7],32);tx.s=(0,lib$1.hexZeroPad)(transaction[8],32);if(lib$2.BigNumber.from(tx.r).isZero()&&lib$2.BigNumber.from(tx.s).isZero()){tx.chainId=tx.v;tx.v=0}else{tx.chainId=Math.floor((tx.v-35)/2);if(tx.chainId<0){tx.chainId=0}var recoveryParam=tx.v-27;var raw=transaction.slice(0,6);if(tx.chainId!==0){raw.push((0,lib$1.hexlify)(tx.chainId));raw.push("0x");raw.push("0x");recoveryParam-=tx.chainId*2+8}var digest=(0,lib$4.keccak256)(RLP.encode(raw));try{tx.from=recoverAddress(digest,{r:(0,lib$1.hexlify)(tx.r),s:(0,lib$1.hexlify)(tx.s),recoveryParam:recoveryParam})}catch(error){console.log(error)}tx.hash=(0,lib$4.keccak256)(rawTransaction)}tx.type=null;return tx}function parse(rawTransaction){var payload=(0,lib$1.arrayify)(rawTransaction);if(payload[0]>127){return _parse(payload)}switch(payload[0]){case 1:return _parseEip2930(payload);case 2:return _parseEip1559(payload);default:break}return logger.throwError("unsupported transaction type: "+payload[0],lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:payload[0]})}exports.parse=parse});var index$e=getDefaultExportFromCjs(lib$e);var _version$q=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="contracts/5.5.0"});var _version$r=getDefaultExportFromCjs(_version$q);var lib$f=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();var __awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};var __generator=commonjsGlobal&&commonjsGlobal.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]1){return}name=name.substring(1);var signature=signatures[0];try{if(_this[name]==null){(0,lib$3.defineReadOnly)(_this,name,_this[signature])}}catch(e){}if(_this.functions[name]==null){(0,lib$3.defineReadOnly)(_this.functions,name,_this.functions[signature])}if(_this.callStatic[name]==null){(0,lib$3.defineReadOnly)(_this.callStatic,name,_this.callStatic[signature])}if(_this.populateTransaction[name]==null){(0,lib$3.defineReadOnly)(_this.populateTransaction,name,_this.populateTransaction[signature])}if(_this.estimateGas[name]==null){(0,lib$3.defineReadOnly)(_this.estimateGas,name,_this.estimateGas[signature])}})}BaseContract.getContractAddress=function(transaction){return(0,lib$6.getContractAddress)(transaction)};BaseContract.getInterface=function(contractInterface){if(lib$a.Interface.isInterface(contractInterface)){return contractInterface}return new lib$a.Interface(contractInterface)};BaseContract.prototype.deployed=function(){return this._deployed()};BaseContract.prototype._deployed=function(blockTag){var _this=this;if(!this._deployedPromise){if(this.deployTransaction){this._deployedPromise=this.deployTransaction.wait().then(function(){return _this})}else{this._deployedPromise=this.provider.getCode(this.address,blockTag).then(function(code){if(code==="0x"){logger.throwError("contract not deployed",lib.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:_this.address,operation:"getDeployed"})}return _this})}}return this._deployedPromise};BaseContract.prototype.fallback=function(overrides){var _this=this;if(!this.signer){logger.throwError("sending a transactions require a signer",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"})}var tx=(0,lib$3.shallowCopy)(overrides||{});["from","to"].forEach(function(key){if(tx[key]==null){return}logger.throwError("cannot override "+key,lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:key})});tx.to=this.resolvedAddress;return this.deployed().then(function(){return _this.signer.sendTransaction(tx)})};BaseContract.prototype.connect=function(signerOrProvider){if(typeof signerOrProvider==="string"){signerOrProvider=new lib$c.VoidSigner(signerOrProvider,this.provider)}var contract=new this.constructor(this.address,this.interface,signerOrProvider);if(this.deployTransaction){(0,lib$3.defineReadOnly)(contract,"deployTransaction",this.deployTransaction)}return contract};BaseContract.prototype.attach=function(addressOrName){return new this.constructor(addressOrName,this.interface,this.signer||this.provider)};BaseContract.isIndexed=function(value){return lib$a.Indexed.isIndexed(value)};BaseContract.prototype._normalizeRunningEvent=function(runningEvent){if(this._runningEvents[runningEvent.tag]){return this._runningEvents[runningEvent.tag]}return runningEvent};BaseContract.prototype._getRunningEvent=function(eventName){if(typeof eventName==="string"){if(eventName==="error"){return this._normalizeRunningEvent(new ErrorRunningEvent)}if(eventName==="event"){return this._normalizeRunningEvent(new RunningEvent("event",null))}if(eventName==="*"){return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}var fragment=this.interface.getEvent(eventName);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,fragment))}if(eventName.topics&&eventName.topics.length>0){try{var topic=eventName.topics[0];if(typeof topic!=="string"){throw new Error("invalid topic")}var fragment=this.interface.getEvent(topic);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,fragment,eventName.topics))}catch(error){}var filter={address:this.address,topics:eventName.topics};return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter),filter))}return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))};BaseContract.prototype._checkRunningEvents=function(runningEvent){if(runningEvent.listenerCount()===0){delete this._runningEvents[runningEvent.tag];var emit=this._wrappedEmits[runningEvent.tag];if(emit&&runningEvent.filter){this.provider.off(runningEvent.filter,emit);delete this._wrappedEmits[runningEvent.tag]}}};BaseContract.prototype._wrapEvent=function(runningEvent,log,listener){var _this=this;var event=(0,lib$3.deepCopy)(log);event.removeListener=function(){if(!listener){return}runningEvent.removeListener(listener);_this._checkRunningEvents(runningEvent)};event.getBlock=function(){return _this.provider.getBlock(log.blockHash)};event.getTransaction=function(){return _this.provider.getTransaction(log.transactionHash)};event.getTransactionReceipt=function(){return _this.provider.getTransactionReceipt(log.transactionHash)};runningEvent.prepareEvent(event);return event};BaseContract.prototype._addEventListener=function(runningEvent,listener,once){var _this=this;if(!this.provider){logger.throwError("events require a provider or a signer with a provider",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"})}runningEvent.addListener(listener,once);this._runningEvents[runningEvent.tag]=runningEvent;if(!this._wrappedEmits[runningEvent.tag]){var wrappedEmit=function(log){var event=_this._wrapEvent(runningEvent,log,listener);if(event.decodeError==null){try{var args=runningEvent.getEmit(event);_this.emit.apply(_this,__spreadArray([runningEvent.filter],args,false))}catch(error){event.decodeError=error.error}}if(runningEvent.filter!=null){_this.emit("event",event)}if(event.decodeError!=null){_this.emit("error",event.decodeError,event)}};this._wrappedEmits[runningEvent.tag]=wrappedEmit;if(runningEvent.filter!=null){this.provider.on(runningEvent.filter,wrappedEmit)}}};BaseContract.prototype.queryFilter=function(event,fromBlockOrBlockhash,toBlock){var _this=this;var runningEvent=this._getRunningEvent(event);var filter=(0,lib$3.shallowCopy)(runningEvent.filter);if(typeof fromBlockOrBlockhash==="string"&&(0,lib$1.isHexString)(fromBlockOrBlockhash,32)){if(toBlock!=null){logger.throwArgumentError("cannot specify toBlock with blockhash","toBlock",toBlock)}filter.blockHash=fromBlockOrBlockhash}else{filter.fromBlock=fromBlockOrBlockhash!=null?fromBlockOrBlockhash:0;filter.toBlock=toBlock!=null?toBlock:"latest"}return this.provider.getLogs(filter).then(function(logs){return logs.map(function(log){return _this._wrapEvent(runningEvent,log,null)})})};BaseContract.prototype.on=function(event,listener){this._addEventListener(this._getRunningEvent(event),listener,false);return this};BaseContract.prototype.once=function(event,listener){this._addEventListener(this._getRunningEvent(event),listener,true);return this};BaseContract.prototype.emit=function(eventName){var args=[];for(var _i=1;_i0;this._checkRunningEvents(runningEvent);return result};BaseContract.prototype.listenerCount=function(eventName){var _this=this;if(!this.provider){return 0}if(eventName==null){return Object.keys(this._runningEvents).reduce(function(accum,key){return accum+_this._runningEvents[key].listenerCount()},0)}return this._getRunningEvent(eventName).listenerCount()};BaseContract.prototype.listeners=function(eventName){if(!this.provider){return[]}if(eventName==null){var result_1=[];for(var tag in this._runningEvents){this._runningEvents[tag].listeners().forEach(function(listener){result_1.push(listener)})}return result_1}return this._getRunningEvent(eventName).listeners()};BaseContract.prototype.removeAllListeners=function(eventName){if(!this.provider){return this}if(eventName==null){for(var tag in this._runningEvents){var runningEvent_1=this._runningEvents[tag];runningEvent_1.removeAllListeners();this._checkRunningEvents(runningEvent_1)}return this}var runningEvent=this._getRunningEvent(eventName);runningEvent.removeAllListeners();this._checkRunningEvents(runningEvent);return this};BaseContract.prototype.off=function(eventName,listener){if(!this.provider){return this}var runningEvent=this._getRunningEvent(eventName);runningEvent.removeListener(listener);this._checkRunningEvents(runningEvent);return this};BaseContract.prototype.removeListener=function(eventName,listener){return this.off(eventName,listener)};return BaseContract}();exports.BaseContract=BaseContract;var Contract=function(_super){__extends(Contract,_super);function Contract(){return _super!==null&&_super.apply(this,arguments)||this}return Contract}(BaseContract);exports.Contract=Contract;var ContractFactory=function(){function ContractFactory(contractInterface,bytecode,signer){var _newTarget=this.constructor;var bytecodeHex=null;if(typeof bytecode==="string"){bytecodeHex=bytecode}else if((0,lib$1.isBytes)(bytecode)){bytecodeHex=(0,lib$1.hexlify)(bytecode)}else if(bytecode&&typeof bytecode.object==="string"){bytecodeHex=bytecode.object}else{bytecodeHex="!"}if(bytecodeHex.substring(0,2)!=="0x"){bytecodeHex="0x"+bytecodeHex}if(!(0,lib$1.isHexString)(bytecodeHex)||bytecodeHex.length%2){logger.throwArgumentError("invalid bytecode","bytecode",bytecode)}if(signer&&!lib$c.Signer.isSigner(signer)){logger.throwArgumentError("invalid signer","signer",signer)}(0,lib$3.defineReadOnly)(this,"bytecode",bytecodeHex);(0,lib$3.defineReadOnly)(this,"interface",(0,lib$3.getStatic)(_newTarget,"getInterface")(contractInterface));(0,lib$3.defineReadOnly)(this,"signer",signer||null)}ContractFactory.prototype.getDeployTransaction=function(){var args=[];for(var _i=0;_i0){digits.push(carry%this.base);carry=carry/this.base|0}}var string="";for(var k=0;source[k]===0&&k=0;--q){string+=this.alphabet[digits[q]]}return string};BaseX.prototype.decode=function(value){if(typeof value!=="string"){throw new TypeError("Expected String")}var bytes=[];if(value.length===0){return new Uint8Array(bytes)}bytes.push(0);for(var i=0;i>=8}while(carry>0){bytes.push(carry&255);carry>>=8}}for(var k=0;value[k]===this._leader&&k>24&255;block1[salt.length+1]=i>>16&255;block1[salt.length+2]=i>>8&255;block1[salt.length+3]=i&255;var U=(0,lib$1.arrayify)((0,lib$h.computeHmac)(hashAlgorithm,password,block1));if(!hLen){hLen=U.length;T=new Uint8Array(hLen);l=Math.ceil(keylen/hLen);r=keylen-(l-1)*hLen}T.set(U);for(var j=1;j=256){throw new Error("Depth too large!")}return base58check((0,lib$1.concat)([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",(0,lib$1.hexlify)(this.depth),this.parentFingerprint,(0,lib$1.hexZeroPad)((0,lib$1.hexlify)(this.index),4),this.chainCode,this.privateKey!=null?(0,lib$1.concat)(["0x00",this.privateKey]):this.publicKey]))},enumerable:false,configurable:true});HDNode.prototype.neuter=function(){return new HDNode(_constructorGuard,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)};HDNode.prototype._derive=function(index){if(index>4294967295){throw new Error("invalid index - "+String(index))}var path=this.path;if(path){path+="/"+(index&~HardenedBit)}var data=new Uint8Array(37);if(index&HardenedBit){if(!this.privateKey){throw new Error("cannot derive child of neutered node")}data.set((0,lib$1.arrayify)(this.privateKey),1);if(path){path+="'"}}else{data.set((0,lib$1.arrayify)(this.publicKey))}for(var i=24;i>=0;i-=8){data[33+(i>>3)]=index>>24-i&255}var I=(0,lib$1.arrayify)((0,lib$h.computeHmac)(lib$h.SupportedAlgorithm.sha512,this.chainCode,data));var IL=I.slice(0,32);var IR=I.slice(32);var ki=null;var Ki=null;if(this.privateKey){ki=bytes32(lib$2.BigNumber.from(IL).add(this.privateKey).mod(N))}else{var ek=new lib$d.SigningKey((0,lib$1.hexlify)(IL));Ki=ek._addPoint(this.publicKey)}var mnemonicOrPath=path;var srcMnemonic=this.mnemonic;if(srcMnemonic){mnemonicOrPath=Object.freeze({phrase:srcMnemonic.phrase,path:path,locale:srcMnemonic.locale||"en"})}return new HDNode(_constructorGuard,ki,Ki,this.fingerprint,bytes32(IR),index,this.depth+1,mnemonicOrPath)};HDNode.prototype.derivePath=function(path){var components=path.split("/");if(components.length===0||components[0]==="m"&&this.depth!==0){throw new Error("invalid path - "+path)}if(components[0]==="m"){components.shift()}var result=this;for(var i=0;i=HardenedBit){throw new Error("invalid path index - "+component)}result=result._derive(HardenedBit+index)}else if(component.match(/^[0-9]+$/)){var index=parseInt(component);if(index>=HardenedBit){throw new Error("invalid path index - "+component)}result=result._derive(index)}else{throw new Error("invalid path component - "+component)}}return result};HDNode._fromSeed=function(seed,mnemonic){var seedArray=(0,lib$1.arrayify)(seed);if(seedArray.length<16||seedArray.length>64){throw new Error("invalid seed")}var I=(0,lib$1.arrayify)((0,lib$h.computeHmac)(lib$h.SupportedAlgorithm.sha512,MasterSecret,seedArray));return new HDNode(_constructorGuard,bytes32(I.slice(0,32)),null,"0x00000000",bytes32(I.slice(32)),0,0,mnemonic)};HDNode.fromMnemonic=function(mnemonic,password,wordlist){wordlist=getWordlist(wordlist);mnemonic=entropyToMnemonic(mnemonicToEntropy(mnemonic,wordlist),wordlist);return HDNode._fromSeed(mnemonicToSeed(mnemonic,password),{phrase:mnemonic,path:"m",locale:wordlist.locale})};HDNode.fromSeed=function(seed){return HDNode._fromSeed(seed,null)};HDNode.fromExtendedKey=function(extendedKey){var bytes=lib$g.Base58.decode(extendedKey);if(bytes.length!==82||base58check(bytes.slice(0,78))!==extendedKey){logger.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}var depth=bytes[4];var parentFingerprint=(0,lib$1.hexlify)(bytes.slice(5,9));var index=parseInt((0,lib$1.hexlify)(bytes.slice(9,13)).substring(2),16);var chainCode=(0,lib$1.hexlify)(bytes.slice(13,45));var key=bytes.slice(45,78);switch((0,lib$1.hexlify)(bytes.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new HDNode(_constructorGuard,null,(0,lib$1.hexlify)(key),parentFingerprint,chainCode,index,depth,null);case"0x0488ade4":case"0x04358394 ":if(key[0]!==0){break}return new HDNode(_constructorGuard,(0,lib$1.hexlify)(key.slice(1)),null,parentFingerprint,chainCode,index,depth,null)}return logger.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")};return HDNode}();exports.HDNode=HDNode;function mnemonicToSeed(mnemonic,password){if(!password){password=""}var salt=(0,lib$8.toUtf8Bytes)("mnemonic"+password,lib$8.UnicodeNormalizationForm.NFKD);return(0,lib$i.pbkdf2)((0,lib$8.toUtf8Bytes)(mnemonic,lib$8.UnicodeNormalizationForm.NFKD),salt,2048,64,"sha512")}exports.mnemonicToSeed=mnemonicToSeed;function mnemonicToEntropy(mnemonic,wordlist){wordlist=getWordlist(wordlist);logger.checkNormalize();var words=wordlist.split(mnemonic);if(words.length%3!==0){throw new Error("invalid mnemonic")}var entropy=(0,lib$1.arrayify)(new Uint8Array(Math.ceil(11*words.length/8)));var offset=0;for(var i=0;i>3]|=1<<7-offset%8}offset++}}var entropyBits=32*words.length/3;var checksumBits=words.length/3;var checksumMask=getUpperMask(checksumBits);var checksum=(0,lib$1.arrayify)((0,lib$h.sha256)(entropy.slice(0,entropyBits/8)))[0]&checksumMask;if(checksum!==(entropy[entropy.length-1]&checksumMask)){throw new Error("invalid checksum")}return(0,lib$1.hexlify)(entropy.slice(0,entropyBits/8))}exports.mnemonicToEntropy=mnemonicToEntropy;function entropyToMnemonic(entropy,wordlist){wordlist=getWordlist(wordlist);entropy=(0,lib$1.arrayify)(entropy);if(entropy.length%4!==0||entropy.length<16||entropy.length>32){throw new Error("invalid entropy")}var indices=[0];var remainingBits=11;for(var i=0;i8){indices[indices.length-1]<<=8;indices[indices.length-1]|=entropy[i];remainingBits-=8}else{indices[indices.length-1]<<=remainingBits;indices[indices.length-1]|=entropy[i]>>8-remainingBits;indices.push(entropy[i]&getLowerMask(8-remainingBits));remainingBits+=3}}var checksumBits=entropy.length/4;var checksum=(0,lib$1.arrayify)((0,lib$h.sha256)(entropy))[0]&getUpperMask(checksumBits);indices[indices.length-1]<<=checksumBits;indices[indices.length-1]|=checksum>>8-checksumBits;return wordlist.join(indices.map(function(index){return wordlist.getWord(index)}))}exports.entropyToMnemonic=entropyToMnemonic;function isValidMnemonic(mnemonic,wordlist){try{mnemonicToEntropy(mnemonic,wordlist);return true}catch(error){}return false}exports.isValidMnemonic=isValidMnemonic;function getAccountPath(index){if(typeof index!=="number"||index<0||index>=HardenedBit||index%1){logger.throwArgumentError("invalid account index","index",index)}return"m/44'/60'/"+index+"'/0/0"}exports.getAccountPath=getAccountPath});var index$k=getDefaultExportFromCjs(lib$k);var _version$y=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="random/5.5.0"});var _version$z=getDefaultExportFromCjs(_version$y);var browserRandom=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.randomBytes=void 0;var logger=new lib.Logger(_version$y.version);var anyGlobal=null;try{anyGlobal=window;if(anyGlobal==null){throw new Error("try next")}}catch(error){try{anyGlobal=commonjsGlobal;if(anyGlobal==null){throw new Error("try next")}}catch(error){anyGlobal={}}}var crypto=anyGlobal.crypto||anyGlobal.msCrypto;if(!crypto||!crypto.getRandomValues){logger.warn("WARNING: Missing strong random number source");crypto={getRandomValues:function(buffer){return logger.throwError("no secure random source avaialble",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}}}function randomBytes(length){if(length<=0||length>1024||length%1||length!=length){logger.throwArgumentError("invalid length","length",length)}var result=new Uint8Array(length);crypto.getRandomValues(result);return(0,lib$1.arrayify)(result)}exports.randomBytes=randomBytes});var browserRandom$1=getDefaultExportFromCjs(browserRandom);var shuffle=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.shuffled=void 0;function shuffled(array){array=array.slice();for(var i=array.length-1;i>0;i--){var j=Math.floor(Math.random()*(i+1));var tmp=array[i];array[i]=array[j];array[j]=tmp}return array}exports.shuffled=shuffled});var shuffle$1=getDefaultExportFromCjs(shuffle);var lib$l=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.shuffled=exports.randomBytes=void 0;Object.defineProperty(exports,"randomBytes",{enumerable:true,get:function(){return browserRandom.randomBytes}});Object.defineProperty(exports,"shuffled",{enumerable:true,get:function(){return shuffle.shuffled}})});var index$l=getDefaultExportFromCjs(lib$l);var aesJs=createCommonjsModule(function(module,exports){"use strict";(function(root){function checkInt(value){return parseInt(value)===value}function checkInts(arrayish){if(!checkInt(arrayish.length)){return false}for(var i=0;i255){return false}}return true}function coerceArray(arg,copy){if(arg.buffer&&ArrayBuffer.isView(arg)&&arg.name==="Uint8Array"){if(copy){if(arg.slice){arg=arg.slice()}else{arg=Array.prototype.slice.call(arg)}}return arg}if(Array.isArray(arg)){if(!checkInts(arg)){throw new Error("Array contains invalid value: "+arg)}return new Uint8Array(arg)}if(checkInt(arg.length)&&checkInts(arg)){return new Uint8Array(arg)}throw new Error("unsupported array-like object")}function createArray(length){return new Uint8Array(length)}function copyArray(sourceArray,targetArray,targetStart,sourceStart,sourceEnd){if(sourceStart!=null||sourceEnd!=null){if(sourceArray.slice){sourceArray=sourceArray.slice(sourceStart,sourceEnd)}else{sourceArray=Array.prototype.slice.call(sourceArray,sourceStart,sourceEnd)}}targetArray.set(sourceArray,targetStart)}var convertUtf8=function(){function toBytes(text){var result=[],i=0;text=encodeURI(text);while(i191&&c<224){result.push(String.fromCharCode((c&31)<<6|bytes[i+1]&63));i+=2}else{result.push(String.fromCharCode((c&15)<<12|(bytes[i+1]&63)<<6|bytes[i+2]&63));i+=3}}return result.join("")}return{toBytes:toBytes,fromBytes:fromBytes}}();var convertHex=function(){function toBytes(text){var result=[];for(var i=0;i>4]+Hex[v&15])}return result.join("")}return{toBytes:toBytes,fromBytes:fromBytes}}();var numberOfRounds={16:10,24:12,32:14};var rcon=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145];var S=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];var Si=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125];var T1=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986];var T2=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766];var T3=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126];var T4=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436];var T5=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890];var T6=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935];var T7=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600];var T8=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480];var U1=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795];var U2=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855];var U3=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150];var U4=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function convertToInt32(bytes){var result=[];for(var i=0;i>2;this._Ke[index][i%4]=tk[i];this._Kd[rounds-index][i%4]=tk[i]}var rconpointer=0;var t=KC,tt;while(t>16&255]<<24^S[tt>>8&255]<<16^S[tt&255]<<8^S[tt>>24&255]^rcon[rconpointer]<<24;rconpointer+=1;if(KC!=8){for(var i=1;i>8&255]<<8^S[tt>>16&255]<<16^S[tt>>24&255]<<24;for(var i=KC/2+1;i>2;c=t%4;this._Ke[r][c]=tk[i];this._Kd[rounds-r][c]=tk[i++];t++}}for(var r=1;r>24&255]^U2[tt>>16&255]^U3[tt>>8&255]^U4[tt&255]}}};AES.prototype.encrypt=function(plaintext){if(plaintext.length!=16){throw new Error("invalid plaintext size (must be 16 bytes)")}var rounds=this._Ke.length-1;var a=[0,0,0,0];var t=convertToInt32(plaintext);for(var i=0;i<4;i++){t[i]^=this._Ke[0][i]}for(var r=1;r>24&255]^T2[t[(i+1)%4]>>16&255]^T3[t[(i+2)%4]>>8&255]^T4[t[(i+3)%4]&255]^this._Ke[r][i]}t=a.slice()}var result=createArray(16),tt;for(var i=0;i<4;i++){tt=this._Ke[rounds][i];result[4*i]=(S[t[i]>>24&255]^tt>>24)&255;result[4*i+1]=(S[t[(i+1)%4]>>16&255]^tt>>16)&255;result[4*i+2]=(S[t[(i+2)%4]>>8&255]^tt>>8)&255;result[4*i+3]=(S[t[(i+3)%4]&255]^tt)&255}return result};AES.prototype.decrypt=function(ciphertext){if(ciphertext.length!=16){throw new Error("invalid ciphertext size (must be 16 bytes)")}var rounds=this._Kd.length-1;var a=[0,0,0,0];var t=convertToInt32(ciphertext);for(var i=0;i<4;i++){t[i]^=this._Kd[0][i]}for(var r=1;r>24&255]^T6[t[(i+3)%4]>>16&255]^T7[t[(i+2)%4]>>8&255]^T8[t[(i+1)%4]&255]^this._Kd[r][i]}t=a.slice()}var result=createArray(16),tt;for(var i=0;i<4;i++){tt=this._Kd[rounds][i];result[4*i]=(Si[t[i]>>24&255]^tt>>24)&255;result[4*i+1]=(Si[t[(i+3)%4]>>16&255]^tt>>16)&255;result[4*i+2]=(Si[t[(i+2)%4]>>8&255]^tt>>8)&255;result[4*i+3]=(Si[t[(i+1)%4]&255]^tt)&255}return result};var ModeOfOperationECB=function(key){if(!(this instanceof ModeOfOperationECB)){throw Error("AES must be instanitated with `new`")}this.description="Electronic Code Block";this.name="ecb";this._aes=new AES(key)};ModeOfOperationECB.prototype.encrypt=function(plaintext){plaintext=coerceArray(plaintext);if(plaintext.length%16!==0){throw new Error("invalid plaintext size (must be multiple of 16 bytes)")}var ciphertext=createArray(plaintext.length);var block=createArray(16);for(var i=0;i=0;--index){this._counter[index]=value%256;value=value>>8}};Counter.prototype.setBytes=function(bytes){bytes=coerceArray(bytes,true);if(bytes.length!=16){throw new Error("invalid counter bytes size (must be 16 bytes)")}this._counter=bytes};Counter.prototype.increment=function(){for(var i=15;i>=0;i--){if(this._counter[i]===255){this._counter[i]=0}else{this._counter[i]++;break}}};var ModeOfOperationCTR=function(key,counter){if(!(this instanceof ModeOfOperationCTR)){throw Error("AES must be instanitated with `new`")}this.description="Counter";this.name="ctr";if(!(counter instanceof Counter)){counter=new Counter(counter)}this._counter=counter;this._remainingCounter=null;this._remainingCounterIndex=16;this._aes=new AES(key)};ModeOfOperationCTR.prototype.encrypt=function(plaintext){var encrypted=coerceArray(plaintext,true);for(var i=0;i16){throw new Error("PKCS#7 padding byte out of range")}var length=data.length-padder;for(var i=0;i=64){let a=h0,b=h1,c=h2,d=h3,e=h4,f=h5,g=h6,h=h7,u,i,j,t1,t2;for(i=0;i<16;i++){j=off+i*4;w[i]=(p[j]&255)<<24|(p[j+1]&255)<<16|(p[j+2]&255)<<8|p[j+3]&255}for(i=16;i<64;i++){u=w[i-2];t1=(u>>>17|u<<32-17)^(u>>>19|u<<32-19)^u>>>10;u=w[i-15];t2=(u>>>7|u<<32-7)^(u>>>18|u<<32-18)^u>>>3;w[i]=(t1+w[i-7]|0)+(t2+w[i-16]|0)|0}for(i=0;i<64;i++){t1=(((e>>>6|e<<32-6)^(e>>>11|e<<32-11)^(e>>>25|e<<32-25))+(e&f^~e&g)|0)+(h+(K[i]+w[i]|0)|0)|0;t2=((a>>>2|a<<32-2)^(a>>>13|a<<32-13)^(a>>>22|a<<32-22))+(a&b^a&c^b&c)|0;h=g;g=f;f=e;e=d+t1|0;d=c;c=b;b=a;a=t1+t2|0}h0=h0+a|0;h1=h1+b|0;h2=h2+c|0;h3=h3+d|0;h4=h4+e|0;h5=h5+f|0;h6=h6+g|0;h7=h7+h|0;off+=64;len-=64}}blocks(m);let i,bytesLeft=m.length%64,bitLenHi=m.length/536870912|0,bitLenLo=m.length<<3,numZeros=bytesLeft<56?56:120,p=m.slice(m.length-bytesLeft,m.length);p.push(128);for(i=bytesLeft+1;i>>24&255);p.push(bitLenHi>>>16&255);p.push(bitLenHi>>>8&255);p.push(bitLenHi>>>0&255);p.push(bitLenLo>>>24&255);p.push(bitLenLo>>>16&255);p.push(bitLenLo>>>8&255);p.push(bitLenLo>>>0&255);blocks(p);return[h0>>>24&255,h0>>>16&255,h0>>>8&255,h0>>>0&255,h1>>>24&255,h1>>>16&255,h1>>>8&255,h1>>>0&255,h2>>>24&255,h2>>>16&255,h2>>>8&255,h2>>>0&255,h3>>>24&255,h3>>>16&255,h3>>>8&255,h3>>>0&255,h4>>>24&255,h4>>>16&255,h4>>>8&255,h4>>>0&255,h5>>>24&255,h5>>>16&255,h5>>>8&255,h5>>>0&255,h6>>>24&255,h6>>>16&255,h6>>>8&255,h6>>>0&255,h7>>>24&255,h7>>>16&255,h7>>>8&255,h7>>>0&255]}function PBKDF2_HMAC_SHA256_OneIter(password,salt,dkLen){password=password.length<=64?password:SHA256(password);const innerLen=64+salt.length+4;const inner=new Array(innerLen);const outerKey=new Array(64);let i;let dk=[];for(i=0;i<64;i++){inner[i]=54}for(i=0;i=innerLen-4;i--){inner[i]++;if(inner[i]<=255)return;inner[i]=0}}while(dkLen>=32){incrementCounter();dk=dk.concat(SHA256(outerKey.concat(SHA256(inner))));dkLen-=32}if(dkLen>0){incrementCounter();dk=dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0,dkLen))}return dk}function blockmix_salsa8(BY,Yi,r,x,_X){let i;arraycopy(BY,(2*r-1)*16,_X,0,16);for(i=0;i<2*r;i++){blockxor(BY,i*16,_X,16);salsa20_8(_X,x);arraycopy(_X,0,BY,Yi+i*16,16)}for(i=0;i>>32-b}function salsa20_8(B,x){arraycopy(B,0,x,0,16);for(let i=8;i>0;i-=2){x[4]^=R(x[0]+x[12],7);x[8]^=R(x[4]+x[0],9);x[12]^=R(x[8]+x[4],13);x[0]^=R(x[12]+x[8],18);x[9]^=R(x[5]+x[1],7);x[13]^=R(x[9]+x[5],9);x[1]^=R(x[13]+x[9],13);x[5]^=R(x[1]+x[13],18);x[14]^=R(x[10]+x[6],7);x[2]^=R(x[14]+x[10],9);x[6]^=R(x[2]+x[14],13);x[10]^=R(x[6]+x[2],18);x[3]^=R(x[15]+x[11],7);x[7]^=R(x[3]+x[15],9);x[11]^=R(x[7]+x[3],13);x[15]^=R(x[11]+x[7],18);x[1]^=R(x[0]+x[3],7);x[2]^=R(x[1]+x[0],9);x[3]^=R(x[2]+x[1],13);x[0]^=R(x[3]+x[2],18);x[6]^=R(x[5]+x[4],7);x[7]^=R(x[6]+x[5],9);x[4]^=R(x[7]+x[6],13);x[5]^=R(x[4]+x[7],18);x[11]^=R(x[10]+x[9],7);x[8]^=R(x[11]+x[10],9);x[9]^=R(x[8]+x[11],13);x[10]^=R(x[9]+x[8],18);x[12]^=R(x[15]+x[14],7);x[13]^=R(x[12]+x[15],9);x[14]^=R(x[13]+x[12],13);x[15]^=R(x[14]+x[13],18)}for(let i=0;i<16;++i){B[i]+=x[i]}}function blockxor(S,Si,D,len){for(let i=0;i=256){return false}}return true}function ensureInteger(value,name){if(typeof value!=="number"||value%1){throw new Error("invalid "+name)}return value}function _scrypt(password,salt,N,r,p,dkLen,callback){N=ensureInteger(N,"N");r=ensureInteger(r,"r");p=ensureInteger(p,"p");dkLen=ensureInteger(dkLen,"dkLen");if(N===0||(N&N-1)!==0){throw new Error("N must be power of 2")}if(N>MAX_VALUE/128/r){throw new Error("N too large")}if(r>MAX_VALUE/128/p){throw new Error("r too large")}if(!checkBufferish(password)){throw new Error("password must be an array or buffer")}password=Array.prototype.slice.call(password);if(!checkBufferish(salt)){throw new Error("salt must be an array or buffer")}salt=Array.prototype.slice.call(salt);let b=PBKDF2_HMAC_SHA256_OneIter(password,salt,p*128*r);const B=new Uint32Array(p*32*r);for(let i=0;ilimit){steps=limit}for(let i=0;ilimit){steps=limit}for(let i=0;i>0&255);b.push(B[i]>>8&255);b.push(B[i]>>16&255);b.push(B[i]>>24&255)}const derivedKey=PBKDF2_HMAC_SHA256_OneIter(password,b,dkLen);if(callback){callback(null,1,derivedKey)}return derivedKey}if(callback){nextTick(incrementalSMix)}};if(!callback){while(true){const derivedKey=incrementalSMix();if(derivedKey!=undefined){return derivedKey}}}incrementalSMix()}const lib={scrypt:function(password,salt,N,r,p,dkLen,progressCallback){return new Promise(function(resolve,reject){let lastProgress=0;if(progressCallback){progressCallback(0)}_scrypt(password,salt,N,r,p,dkLen,function(error,progress,key){if(error){reject(error)}else if(key){if(progressCallback&&lastProgress!==1){progressCallback(1)}resolve(new Uint8Array(key))}else if(progressCallback&&progress!==lastProgress){lastProgress=progress;return progressCallback(progress)}})})},syncScrypt:function(password,salt,N,r,p,dkLen){return new Uint8Array(_scrypt(password,salt,N,r,p,dkLen))}};if("object"!=="undefined"){module.exports=lib}else if(typeof undefined==="function"&&undefined.amd){undefined(lib)}else if(root){if(root.scrypt){root._scrypt=root.scrypt}root.scrypt=lib}})(commonjsGlobal)});var keystore=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();var __awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};var __generator=commonjsGlobal&&commonjsGlobal.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&attemptLimit%1===0,"invalid connection throttle limit","connection.throttleLimit",attemptLimit);var throttleCallback=typeof connection==="object"?connection.throttleCallback:null;var throttleSlotInterval=typeof connection==="object"&&typeof connection.throttleSlotInterval==="number"?connection.throttleSlotInterval:100;logger.assertArgument(throttleSlotInterval>0&&throttleSlotInterval%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",throttleSlotInterval);var headers={};var url=null;var options={method:"GET"};var allow304=false;var timeout=2*60*1e3;if(typeof connection==="string"){url=connection}else if(typeof connection==="object"){if(connection==null||connection.url==null){logger.throwArgumentError("missing URL","connection.url",connection)}url=connection.url;if(typeof connection.timeout==="number"&&connection.timeout>0){timeout=connection.timeout}if(connection.headers){for(var key in connection.headers){headers[key.toLowerCase()]={key:key,value:String(connection.headers[key])};if(["if-none-match","if-modified-since"].indexOf(key.toLowerCase())>=0){allow304=true}}}options.allowGzip=!!connection.allowGzip;if(connection.user!=null&&connection.password!=null){if(url.substring(0,6)!=="https:"&&connection.allowInsecureAuthentication!==true){logger.throwError("basic authentication requires a secure https url",lib.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:url,user:connection.user,password:"[REDACTED]"})}var authorization=connection.user+":"+connection.password;headers["authorization"]={key:"Authorization",value:"Basic "+(0,lib$p.encode)((0,lib$8.toUtf8Bytes)(authorization))}}}var reData=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i");var dataMatch=url?url.match(reData):null;if(dataMatch){try{var response={statusCode:200,statusMessage:"OK",headers:{"content-type":dataMatch[1]},body:(0,lib$p.decode)(dataMatch[2])};var result=response.body;if(processFunc){result=processFunc(response.body,response)}return Promise.resolve(result)}catch(error){logger.throwError("processing response error",lib.Logger.errors.SERVER_ERROR,{body:bodyify(dataMatch[1],dataMatch[2]),error:error,requestBody:null,requestMethod:"GET",url:url})}}if(body){options.method="POST";options.body=body;if(headers["content-type"]==null){headers["content-type"]={key:"Content-Type",value:"application/octet-stream"}}if(headers["content-length"]==null){headers["content-length"]={key:"Content-Length",value:String(body.length)}}}var flatHeaders={};Object.keys(headers).forEach(function(key){var header=headers[key];flatHeaders[header.key]=header.value});options.headers=flatHeaders;var runningTimeout=function(){var timer=null;var promise=new Promise(function(resolve,reject){if(timeout){timer=setTimeout(function(){if(timer==null){return}timer=null;reject(logger.makeError("timeout",lib.Logger.errors.TIMEOUT,{requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,timeout:timeout,url:url}))},timeout)}});var cancel=function(){if(timer==null){return}clearTimeout(timer);timer=null};return{promise:promise,cancel:cancel}}();var runningFetch=function(){return __awaiter(this,void 0,void 0,function(){var attempt,response,location_1,tryAgain,stall,retryAfter,error_1,body_1,result,error_2,tryAgain,timeout_1;return __generator(this,function(_a){switch(_a.label){case 0:attempt=0;_a.label=1;case 1:if(!(attempt=300){runningTimeout.cancel();logger.throwError("bad response",lib.Logger.errors.SERVER_ERROR,{status:response.statusCode,headers:response.headers,body:bodyify(body_1,response.headers?response.headers["content-type"]:null),requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,url:url})}if(!processFunc)return[3,18];_a.label=11;case 11:_a.trys.push([11,13,,18]);return[4,processFunc(body_1,response)];case 12:result=_a.sent();runningTimeout.cancel();return[2,result];case 13:error_2=_a.sent();if(!(error_2.throttleRetry&&attemptretryLimit){if(cancel()){reject(new Error("retry limit reached"))}return}var timeout=options.interval*parseInt(String(Math.random()*Math.pow(2,attempt)));if(timeoutoptions.ceiling){timeout=options.ceiling}setTimeout(check,timeout)}return null},function(error){if(cancel()){reject(error)}})}check()})}exports.poll=poll});var index$q=getDefaultExportFromCjs(lib$q);"use strict";var ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l";var ALPHABET_MAP={};for(var z=0;z>25;return(pre&33554431)<<5^-(b>>0&1)&996825010^-(b>>1&1)&642813549^-(b>>2&1)&513874426^-(b>>3&1)&1027748829^-(b>>4&1)&705979059}function prefixChk(prefix){var chk=1;for(var i=0;i126)return"Invalid prefix ("+prefix+")";chk=polymodStep(chk)^c>>5}chk=polymodStep(chk);for(i=0;iLIMIT)throw new TypeError("Exceeds length limit");prefix=prefix.toLowerCase();var chk=prefixChk(prefix);if(typeof chk==="string")throw new Error(chk);var result=prefix+"1";for(var i=0;i>5!==0)throw new Error("Non 5-bit word");chk=polymodStep(chk)^x;result+=ALPHABET.charAt(x)}for(i=0;i<6;++i){chk=polymodStep(chk)}chk^=1;for(i=0;i<6;++i){var v=chk>>(5-i)*5&31;result+=ALPHABET.charAt(v)}return result}function __decode(str,LIMIT){LIMIT=LIMIT||90;if(str.length<8)return str+" too short";if(str.length>LIMIT)return"Exceeds length limit";var lowered=str.toLowerCase();var uppered=str.toUpperCase();if(str!==lowered&&str!==uppered)return"Mixed-case string "+str;str=lowered;var split=str.lastIndexOf("1");if(split===-1)return"No separator character for "+str;if(split===0)return"Missing prefix for "+str;var prefix=str.slice(0,split);var wordChars=str.slice(split+1);if(wordChars.length<6)return"Data too short";var chk=prefixChk(prefix);if(typeof chk==="string")return chk;var words=[];for(var i=0;i=wordChars.length)continue;words.push(v)}if(chk!==1)return"Invalid checksum for "+str;return{prefix:prefix,words:words}}function decodeUnsafe(){var res=__decode.apply(null,arguments);if(typeof res==="object")return res}function decode(str){var res=__decode.apply(null,arguments);if(typeof res==="object")return res;throw new Error(res)}function convert(data,inBits,outBits,pad){var value=0;var bits=0;var maxV=(1<=outBits){bits-=outBits;result.push(value>>bits&maxV)}}if(pad){if(bits>0){result.push(value<=inBits)return"Excess padding";if(value<0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&topics[topics.length-1]==null){topics.pop()}return topics.map(function(topic){if(Array.isArray(topic)){var unique_1={};topic.forEach(function(topic){unique_1[checkTopic(topic)]=true});var sorted=Object.keys(unique_1);sorted.sort();return sorted.join("|")}else{return checkTopic(topic)}}).join("&")}function deserializeTopics(data){if(data===""){return[]}return data.split(/&/g).map(function(topic){if(topic===""){return[]}var comps=topic.split("|").map(function(topic){return topic==="null"?null:topic});return comps.length===1?comps[0]:comps})}function getEventTag(eventName){if(typeof eventName==="string"){eventName=eventName.toLowerCase();if((0,lib$1.hexDataLength)(eventName)===32){return"tx:"+eventName}if(eventName.indexOf(":")===-1){return eventName}}else if(Array.isArray(eventName)){return"filter:*:"+serializeTopics(eventName)}else if(lib$b.ForkEvent.isForkEvent(eventName)){logger.warn("not implemented");throw new Error("not implemented")}else if(eventName&&typeof eventName==="object"){return"filter:"+(eventName.address||"*")+":"+serializeTopics(eventName.topics||[])}throw new Error("invalid event - "+eventName)}function getTime(){return(new Date).getTime()}function stall(duration){return new Promise(function(resolve){setTimeout(resolve,duration)})}var PollableEvents=["block","network","pending","poll"];var Event=function(){function Event(tag,listener,once){(0,lib$3.defineReadOnly)(this,"tag",tag);(0,lib$3.defineReadOnly)(this,"listener",listener);(0,lib$3.defineReadOnly)(this,"once",once)}Object.defineProperty(Event.prototype,"event",{get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag},enumerable:false,configurable:true});Object.defineProperty(Event.prototype,"type",{get:function(){return this.tag.split(":")[0]},enumerable:false,configurable:true});Object.defineProperty(Event.prototype,"hash",{get:function(){var comps=this.tag.split(":");if(comps[0]!=="tx"){return null}return comps[1]},enumerable:false,configurable:true});Object.defineProperty(Event.prototype,"filter",{get:function(){var comps=this.tag.split(":");if(comps[0]!=="filter"){return null}var address=comps[1];var topics=deserializeTopics(comps[2]);var filter={};if(topics.length>0){filter.topics=topics}if(address&&address!=="*"){filter.address=address}return filter},enumerable:false,configurable:true});Event.prototype.pollable=function(){return this.tag.indexOf(":")>=0||PollableEvents.indexOf(this.tag)>=0};return Event}();exports.Event=Event;var coinInfos={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bytes32ify(value){return(0,lib$1.hexZeroPad)(lib$2.BigNumber.from(value).toHexString(),32)}function base58Encode(data){return lib$g.Base58.encode((0,lib$1.concat)([data,(0,lib$1.hexDataSlice)((0,lib$h.sha256)((0,lib$h.sha256)(data)),0,4)]))}var matchers=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),new RegExp("^(ipfs)://(.*)$","i"),new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function _parseString(result){try{return(0,lib$8.toUtf8String)(_parseBytes(result))}catch(error){}return null}function _parseBytes(result){if(result==="0x"){return null}var offset=lib$2.BigNumber.from((0,lib$1.hexDataSlice)(result,0,32)).toNumber();var length=lib$2.BigNumber.from((0,lib$1.hexDataSlice)(result,offset,offset+32)).toNumber();return(0,lib$1.hexDataSlice)(result,offset+32,offset+32+length)}var Resolver=function(){function Resolver(provider,address,name,resolvedAddress){(0,lib$3.defineReadOnly)(this,"provider",provider);(0,lib$3.defineReadOnly)(this,"name",name);(0,lib$3.defineReadOnly)(this,"address",provider.formatter.address(address));(0,lib$3.defineReadOnly)(this,"_resolvedAddress",resolvedAddress)}Resolver.prototype._fetchBytes=function(selector,parameters){return __awaiter(this,void 0,void 0,function(){var tx,_a,error_1;return __generator(this,function(_b){switch(_b.label){case 0:tx={to:this.address,data:(0,lib$1.hexConcat)([selector,(0,lib$9.namehash)(this.name),parameters||"0x"])};_b.label=1;case 1:_b.trys.push([1,3,,4]);_a=_parseBytes;return[4,this.provider.call(tx)];case 2:return[2,_a.apply(void 0,[_b.sent()])];case 3:error_1=_b.sent();if(error_1.code===lib.Logger.errors.CALL_EXCEPTION){return[2,null]}return[2,null];case 4:return[2]}})})};Resolver.prototype._getAddress=function(coinType,hexBytes){var coinInfo=coinInfos[String(coinType)];if(coinInfo==null){logger.throwError("unsupported coin type: "+coinType,lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress("+coinType+")"})}if(coinInfo.ilk==="eth"){return this.provider.formatter.address(hexBytes)}var bytes=(0,lib$1.arrayify)(hexBytes);if(coinInfo.p2pkh!=null){var p2pkh=hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(p2pkh){var length_1=parseInt(p2pkh[1],16);if(p2pkh[2].length===length_1*2&&length_1>=1&&length_1<=75){return base58Encode((0,lib$1.concat)([[coinInfo.p2pkh],"0x"+p2pkh[2]]))}}}if(coinInfo.p2sh!=null){var p2sh=hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(p2sh){var length_2=parseInt(p2sh[1],16);if(p2sh[2].length===length_2*2&&length_2>=1&&length_2<=75){return base58Encode((0,lib$1.concat)([[coinInfo.p2sh],"0x"+p2sh[2]]))}}}if(coinInfo.prefix!=null){var length_3=bytes[1];var version_1=bytes[0];if(version_1===0){if(length_3!==20&&length_3!==32){version_1=-1}}else{version_1=-1}if(version_1>=0&&bytes.length===2+length_3&&length_3>=1&&length_3<=75){var words=bech32_1.default.toWords(bytes.slice(2));words.unshift(version_1);return bech32_1.default.encode(coinInfo.prefix,words)}}return null};Resolver.prototype.getAddress=function(coinType){return __awaiter(this,void 0,void 0,function(){var transaction,hexBytes_1,error_2,hexBytes,address;return __generator(this,function(_a){switch(_a.label){case 0:if(coinType==null){coinType=60}if(!(coinType===60))return[3,4];_a.label=1;case 1:_a.trys.push([1,3,,4]);transaction={to:this.address,data:"0x3b3b57de"+(0,lib$9.namehash)(this.name).substring(2)};return[4,this.provider.call(transaction)];case 2:hexBytes_1=_a.sent();if(hexBytes_1==="0x"||hexBytes_1===lib$7.HashZero){return[2,null]}return[2,this.provider.formatter.callAddress(hexBytes_1)];case 3:error_2=_a.sent();if(error_2.code===lib.Logger.errors.CALL_EXCEPTION){return[2,null]}throw error_2;case 4:return[4,this._fetchBytes("0xf1cb7e06",bytes32ify(coinType))];case 5:hexBytes=_a.sent();if(hexBytes==null||hexBytes==="0x"){return[2,null]}address=this._getAddress(coinType,hexBytes);if(address==null){logger.throwError("invalid or unsupported coin data",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress("+coinType+")",coinType:coinType,data:hexBytes})}return[2,address]}})})};Resolver.prototype.getAvatar=function(){return __awaiter(this,void 0,void 0,function(){var linkage,avatar,i,match,_a,selector,owner,_b,comps,addr,tokenId,tokenOwner,_c,_d,balance,_e,_f,tx,metadataUrl,_g,metadata,error_3;return __generator(this,function(_h){switch(_h.label){case 0:linkage=[];_h.label=1;case 1:_h.trys.push([1,19,,20]);return[4,this.getText("avatar")];case 2:avatar=_h.sent();if(avatar==null){return[2,null]}i=0;_h.label=3;case 3:if(!(i0))return[3,7];_a.label=2;case 2:if(!this._internalBlockNumber)return[3,7];internalBlockNumber=this._internalBlockNumber;_a.label=3;case 3:_a.trys.push([3,5,,6]);return[4,internalBlockNumber];case 4:result=_a.sent();if(getTime()-result.respTime<=maxAge){return[2,result.blockNumber]}return[3,7];case 5:error_5=_a.sent();if(this._internalBlockNumber===internalBlockNumber){return[3,7]}return[3,6];case 6:return[3,2];case 7:reqTime=getTime();checkInternalBlockNumber=(0,lib$3.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(function(network){return null},function(error){return error})}).then(function(_a){var blockNumber=_a.blockNumber,networkError=_a.networkError;if(networkError){if(_this._internalBlockNumber===checkInternalBlockNumber){_this._internalBlockNumber=null}throw networkError}var respTime=getTime();blockNumber=lib$2.BigNumber.from(blockNumber).toNumber();if(blockNumber<_this._maxInternalBlockNumber){blockNumber=_this._maxInternalBlockNumber}_this._maxInternalBlockNumber=blockNumber;_this._setFastBlockNumber(blockNumber);return{blockNumber:blockNumber,reqTime:reqTime,respTime:respTime}});this._internalBlockNumber=checkInternalBlockNumber;checkInternalBlockNumber.catch(function(error){if(_this._internalBlockNumber===checkInternalBlockNumber){_this._internalBlockNumber=null}});return[4,checkInternalBlockNumber];case 8:return[2,_a.sent().blockNumber]}})})};BaseProvider.prototype.poll=function(){return __awaiter(this,void 0,void 0,function(){var pollId,runners,blockNumber,error_6,i;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:pollId=nextPollId++;runners=[];blockNumber=null;_a.label=1;case 1:_a.trys.push([1,3,,4]);return[4,this._getInternalBlockNumber(100+this.pollingInterval/2)];case 2:blockNumber=_a.sent();return[3,4];case 3:error_6=_a.sent();this.emit("error",error_6);return[2];case 4:this._setFastBlockNumber(blockNumber);this.emit("poll",pollId,blockNumber);if(blockNumber===this._lastBlockNumber){this.emit("didPoll",pollId);return[2]}if(this._emitted.block===-2){this._emitted.block=blockNumber-1}if(Math.abs(this._emitted.block-blockNumber)>1e3){logger.warn("network block skew detected; skipping block events (emitted="+this._emitted.block+" blockNumber"+blockNumber+")");this.emit("error",logger.makeError("network block skew detected",lib.Logger.errors.NETWORK_ERROR,{blockNumber:blockNumber,event:"blockSkew",previousBlockNumber:this._emitted.block}));this.emit("block",blockNumber)}else{for(i=this._emitted.block+1;i<=blockNumber;i++){this.emit("block",i)}}if(this._emitted.block!==blockNumber){this._emitted.block=blockNumber;Object.keys(this._emitted).forEach(function(key){if(key==="block"){return}var eventBlockNumber=_this._emitted[key];if(eventBlockNumber==="pending"){return}if(blockNumber-eventBlockNumber>12){delete _this._emitted[key]}})}if(this._lastBlockNumber===-2){this._lastBlockNumber=blockNumber-1}this._events.forEach(function(event){switch(event.type){case"tx":{var hash_2=event.hash;var runner=_this.getTransactionReceipt(hash_2).then(function(receipt){if(!receipt||receipt.blockNumber==null){return null}_this._emitted["t:"+hash_2]=receipt.blockNumber;_this.emit(hash_2,receipt);return null}).catch(function(error){_this.emit("error",error)});runners.push(runner);break}case"filter":{var filter_1=event.filter;filter_1.fromBlock=_this._lastBlockNumber+1;filter_1.toBlock=blockNumber;var runner=_this.getLogs(filter_1).then(function(logs){if(logs.length===0){return}logs.forEach(function(log){_this._emitted["b:"+log.blockHash]=log.blockNumber;_this._emitted["t:"+log.transactionHash]=log.blockNumber;_this.emit(filter_1,log)})}).catch(function(error){_this.emit("error",error)});runners.push(runner);break}}});this._lastBlockNumber=blockNumber;Promise.all(runners).then(function(){_this.emit("didPoll",pollId)}).catch(function(error){_this.emit("error",error)});return[2]}})})};BaseProvider.prototype.resetEventsBlock=function(blockNumber){this._lastBlockNumber=blockNumber-1;if(this.polling){this.poll()}};Object.defineProperty(BaseProvider.prototype,"network",{get:function(){return this._network},enumerable:false,configurable:true});BaseProvider.prototype.detectNetwork=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){return[2,logger.throwError("provider does not support network detection",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})]})})};BaseProvider.prototype.getNetwork=function(){return __awaiter(this,void 0,void 0,function(){var network,currentNetwork,error;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this._ready()];case 1:network=_a.sent();return[4,this.detectNetwork()];case 2:currentNetwork=_a.sent();if(!(network.chainId!==currentNetwork.chainId))return[3,5];if(!this.anyNetwork)return[3,4];this._network=currentNetwork;this._lastBlockNumber=-2;this._fastBlockNumber=null;this._fastBlockNumberPromise=null;this._fastQueryDate=0;this._emitted.block=-2;this._maxInternalBlockNumber=-1024;this._internalBlockNumber=null;this.emit("network",currentNetwork,network);return[4,stall(0)];case 3:_a.sent();return[2,this._network];case 4:error=logger.makeError("underlying network changed",lib.Logger.errors.NETWORK_ERROR,{event:"changed",network:network,detectedNetwork:currentNetwork});this.emit("error",error);throw error;case 5:return[2,network]}})})};Object.defineProperty(BaseProvider.prototype,"blockNumber",{get:function(){var _this=this;this._getInternalBlockNumber(100+this.pollingInterval/2).then(function(blockNumber){_this._setFastBlockNumber(blockNumber)},function(error){});return this._fastBlockNumber!=null?this._fastBlockNumber:-1},enumerable:false,configurable:true});Object.defineProperty(BaseProvider.prototype,"polling",{get:function(){return this._poller!=null},set:function(value){var _this=this;if(value&&!this._poller){this._poller=setInterval(function(){_this.poll()},this.pollingInterval);if(!this._bootstrapPoll){this._bootstrapPoll=setTimeout(function(){_this.poll();_this._bootstrapPoll=setTimeout(function(){if(!_this._poller){_this.poll()}_this._bootstrapPoll=null},_this.pollingInterval)},0)}}else if(!value&&this._poller){clearInterval(this._poller);this._poller=null}},enumerable:false,configurable:true});Object.defineProperty(BaseProvider.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(value){var _this=this;if(typeof value!=="number"||value<=0||parseInt(String(value))!=value){throw new Error("invalid polling interval")}this._pollingInterval=value;if(this._poller){clearInterval(this._poller);this._poller=setInterval(function(){_this.poll()},this._pollingInterval)}},enumerable:false,configurable:true});BaseProvider.prototype._getFastBlockNumber=function(){var _this=this;var now=getTime();if(now-this._fastQueryDate>2*this._pollingInterval){this._fastQueryDate=now;this._fastBlockNumberPromise=this.getBlockNumber().then(function(blockNumber){if(_this._fastBlockNumber==null||blockNumber>_this._fastBlockNumber){_this._fastBlockNumber=blockNumber}return _this._fastBlockNumber})}return this._fastBlockNumberPromise};BaseProvider.prototype._setFastBlockNumber=function(blockNumber){if(this._fastBlockNumber!=null&&blockNumberthis._fastBlockNumber){this._fastBlockNumber=blockNumber;this._fastBlockNumberPromise=Promise.resolve(blockNumber)}};BaseProvider.prototype.waitForTransaction=function(transactionHash,confirmations,timeout){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){return[2,this._waitForTransaction(transactionHash,confirmations==null?1:confirmations,timeout||0,null)]})})};BaseProvider.prototype._waitForTransaction=function(transactionHash,confirmations,timeout,replaceable){return __awaiter(this,void 0,void 0,function(){var receipt;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getTransactionReceipt(transactionHash)];case 1:receipt=_a.sent();if((receipt?receipt.confirmations:0)>=confirmations){return[2,receipt]}return[2,new Promise(function(resolve,reject){var cancelFuncs=[];var done=false;var alreadyDone=function(){if(done){return true}done=true;cancelFuncs.forEach(function(func){func()});return false};var minedHandler=function(receipt){if(receipt.confirmations0){var timer_1=setTimeout(function(){if(alreadyDone()){return}reject(logger.makeError("timeout exceeded",lib.Logger.errors.TIMEOUT,{timeout:timeout}))},timeout);if(timer_1.unref){timer_1.unref()}cancelFuncs.push(function(){clearTimeout(timer_1)})}})]}})})};BaseProvider.prototype.getBlockNumber=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){return[2,this._getInternalBlockNumber(0)]})})};BaseProvider.prototype.getGasPrice=function(){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,this.perform("getGasPrice",{})];case 2:result=_a.sent();try{return[2,lib$2.BigNumber.from(result)]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:result,error:error})]}return[2]}})})};BaseProvider.prototype.getBalance=function(addressOrName,blockTag){return __awaiter(this,void 0,void 0,function(){var params,result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,(0,lib$3.resolveProperties)({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)})];case 2:params=_a.sent();return[4,this.perform("getBalance",params)];case 3:result=_a.sent();try{return[2,lib$2.BigNumber.from(result)]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"getBalance",params:params,result:result,error:error})]}return[2]}})})};BaseProvider.prototype.getTransactionCount=function(addressOrName,blockTag){return __awaiter(this,void 0,void 0,function(){var params,result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,(0,lib$3.resolveProperties)({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)})];case 2:params=_a.sent();return[4,this.perform("getTransactionCount",params)];case 3:result=_a.sent();try{return[2,lib$2.BigNumber.from(result).toNumber()]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:params,result:result,error:error})]}return[2]}})})};BaseProvider.prototype.getCode=function(addressOrName,blockTag){return __awaiter(this,void 0,void 0,function(){var params,result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,(0,lib$3.resolveProperties)({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)})];case 2:params=_a.sent();return[4,this.perform("getCode",params)];case 3:result=_a.sent();try{return[2,(0,lib$1.hexlify)(result)]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"getCode",params:params,result:result,error:error})]}return[2]}})})};BaseProvider.prototype.getStorageAt=function(addressOrName,position,blockTag){return __awaiter(this,void 0,void 0,function(){var params,result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,(0,lib$3.resolveProperties)({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag),position:Promise.resolve(position).then(function(p){return(0,lib$1.hexValue)(p)})})];case 2:params=_a.sent();return[4,this.perform("getStorageAt",params)];case 3:result=_a.sent();try{return[2,(0,lib$1.hexlify)(result)]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:params,result:result,error:error})]}return[2]}})})};BaseProvider.prototype._wrapTransaction=function(tx,hash,startBlock){var _this=this;if(hash!=null&&(0,lib$1.hexDataLength)(hash)!==32){throw new Error("invalid response - sendTransaction")}var result=tx;if(hash!=null&&tx.hash!==hash){logger.throwError("Transaction hash mismatch from Provider.sendTransaction.",lib.Logger.errors.UNKNOWN_ERROR,{expectedHash:tx.hash,returnedHash:hash})}result.wait=function(confirms,timeout){return __awaiter(_this,void 0,void 0,function(){var replacement,receipt;return __generator(this,function(_a){switch(_a.label){case 0:if(confirms==null){confirms=1}if(timeout==null){timeout=0}replacement=undefined;if(confirms!==0&&startBlock!=null){replacement={data:tx.data,from:tx.from,nonce:tx.nonce,to:tx.to,value:tx.value,startBlock:startBlock}}return[4,this._waitForTransaction(tx.hash,confirms,timeout,replacement)];case 1:receipt=_a.sent();if(receipt==null&&confirms===0){return[2,null]}this._emitted["t:"+tx.hash]=receipt.blockNumber;if(receipt.status===0){logger.throwError("transaction failed",lib.Logger.errors.CALL_EXCEPTION,{transactionHash:tx.hash,transaction:tx,receipt:receipt})}return[2,receipt]}})})};return result};BaseProvider.prototype.sendTransaction=function(signedTransaction){return __awaiter(this,void 0,void 0,function(){var hexTx,tx,blockNumber,hash,error_7;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,Promise.resolve(signedTransaction).then(function(t){return(0,lib$1.hexlify)(t)})];case 2:hexTx=_a.sent();tx=this.formatter.transaction(signedTransaction);if(tx.confirmations==null){tx.confirmations=0}return[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:blockNumber=_a.sent();_a.label=4;case 4:_a.trys.push([4,6,,7]);return[4,this.perform("sendTransaction",{signedTransaction:hexTx})];case 5:hash=_a.sent();return[2,this._wrapTransaction(tx,hash,blockNumber)];case 6:error_7=_a.sent();error_7.transaction=tx;error_7.transactionHash=tx.hash;throw error_7;case 7:return[2]}})})};BaseProvider.prototype._getTransactionRequest=function(transaction){return __awaiter(this,void 0,void 0,function(){var values,tx,_a,_b;var _this=this;return __generator(this,function(_c){switch(_c.label){case 0:return[4,transaction];case 1:values=_c.sent();tx={};["from","to"].forEach(function(key){if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(function(v){return v?_this._getAddress(v):null})});["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(function(key){if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(function(v){return v?lib$2.BigNumber.from(v):null})});["type"].forEach(function(key){if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(function(v){return v!=null?v:null})});if(values.accessList){tx.accessList=this.formatter.accessList(values.accessList)}["data"].forEach(function(key){if(values[key]==null){return}tx[key]=Promise.resolve(values[key]).then(function(v){return v?(0,lib$1.hexlify)(v):null})});_b=(_a=this.formatter).transactionRequest;return[4,(0,lib$3.resolveProperties)(tx)];case 2:return[2,_b.apply(_a,[_c.sent()])]}})})};BaseProvider.prototype._getFilter=function(filter){return __awaiter(this,void 0,void 0,function(){var result,_a,_b;var _this=this;return __generator(this,function(_c){switch(_c.label){case 0:return[4,filter];case 1:filter=_c.sent();result={};if(filter.address!=null){result.address=this._getAddress(filter.address)}["blockHash","topics"].forEach(function(key){if(filter[key]==null){return}result[key]=filter[key]});["fromBlock","toBlock"].forEach(function(key){if(filter[key]==null){return}result[key]=_this._getBlockTag(filter[key])});_b=(_a=this.formatter).filter;return[4,(0,lib$3.resolveProperties)(result)];case 2:return[2,_b.apply(_a,[_c.sent()])]}})})};BaseProvider.prototype.call=function(transaction,blockTag){return __awaiter(this,void 0,void 0,function(){var params,result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,(0,lib$3.resolveProperties)({transaction:this._getTransactionRequest(transaction),blockTag:this._getBlockTag(blockTag)})];case 2:params=_a.sent();return[4,this.perform("call",params)];case 3:result=_a.sent();try{return[2,(0,lib$1.hexlify)(result)]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"call",params:params,result:result,error:error})]}return[2]}})})};BaseProvider.prototype.estimateGas=function(transaction){return __awaiter(this,void 0,void 0,function(){var params,result;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.getNetwork()];case 1:_a.sent();return[4,(0,lib$3.resolveProperties)({transaction:this._getTransactionRequest(transaction)})];case 2:params=_a.sent();return[4,this.perform("estimateGas",params)];case 3:result=_a.sent();try{return[2,lib$2.BigNumber.from(result)]}catch(error){return[2,logger.throwError("bad result from backend",lib.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:params,result:result,error:error})]}return[2]}})})};BaseProvider.prototype._getAddress=function(addressOrName){return __awaiter(this,void 0,void 0,function(){var address;return __generator(this,function(_a){switch(_a.label){case 0:return[4,addressOrName];case 1:addressOrName=_a.sent();if(typeof addressOrName!=="string"){logger.throwArgumentError("invalid address or ENS name","name",addressOrName)}return[4,this.resolveName(addressOrName)];case 2:address=_a.sent();if(address==null){logger.throwError("ENS name not configured",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName("+JSON.stringify(addressOrName)+")"})}return[2,address]}})})};BaseProvider.prototype._getBlock=function(blockHashOrBlockTag,includeTransactions){return __awaiter(this,void 0,void 0,function(){var blockNumber,params,_a,error_8;var _this=this;return __generator(this,function(_b){switch(_b.label){case 0:return[4,this.getNetwork()];case 1:_b.sent();return[4,blockHashOrBlockTag];case 2:blockHashOrBlockTag=_b.sent();blockNumber=-128;params={includeTransactions:!!includeTransactions};if(!(0,lib$1.isHexString)(blockHashOrBlockTag,32))return[3,3];params.blockHash=blockHashOrBlockTag;return[3,6];case 3:_b.trys.push([3,5,,6]);_a=params;return[4,this._getBlockTag(blockHashOrBlockTag)];case 4:_a.blockTag=_b.sent();if((0,lib$1.isHexString)(params.blockTag)){blockNumber=parseInt(params.blockTag.substring(2),16)}return[3,6];case 5:error_8=_b.sent();logger.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",blockHashOrBlockTag);return[3,6];case 6:return[2,(0,lib$q.poll)(function(){return __awaiter(_this,void 0,void 0,function(){var block,blockNumber_1,i,tx,confirmations,blockWithTxs;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.perform("getBlock",params)];case 1:block=_a.sent();if(block==null){if(params.blockHash!=null){if(this._emitted["b:"+params.blockHash]==null){return[2,null]}}if(params.blockTag!=null){if(blockNumber>this._emitted.block){return[2,null]}}return[2,undefined]}if(!includeTransactions)return[3,8];blockNumber_1=null;i=0;_a.label=2;case 2:if(!(ibytes.length){return[2,null]}name=(0,lib$8.toUtf8String)(bytes.slice(0,length));return[4,this.resolveName(name)];case 4:addr=_b.sent();if(addr!=address){return[2,null]}return[2,name]}})})};BaseProvider.prototype.getAvatar=function(nameOrAddress){return __awaiter(this,void 0,void 0,function(){var resolver,address,reverseName,resolverAddress,avatar;return __generator(this,function(_a){switch(_a.label){case 0:resolver=null;if(!(0,lib$1.isHexString)(nameOrAddress))return[3,2];address=this.formatter.address(nameOrAddress);reverseName=address.substring(2).toLowerCase()+".addr.reverse";return[4,this._getResolver(reverseName)];case 1:resolverAddress=_a.sent();if(!resolverAddress){return[2,null]}resolver=new Resolver(this,resolverAddress,"_",address);return[3,4];case 2:return[4,this.getResolver(nameOrAddress)];case 3:resolver=_a.sent();if(!resolver){return[2,null]}_a.label=4;case 4:return[4,resolver.getAvatar()];case 5:avatar=_a.sent();if(avatar==null){return[2,null]}return[2,avatar.url]}})})};BaseProvider.prototype.perform=function(method,params){return logger.throwError(method+" not implemented",lib.Logger.errors.NOT_IMPLEMENTED,{operation:method})};BaseProvider.prototype._startEvent=function(event){this.polling=this._events.filter(function(e){return e.pollable()}).length>0};BaseProvider.prototype._stopEvent=function(event){this.polling=this._events.filter(function(e){return e.pollable()}).length>0};BaseProvider.prototype._addEventListener=function(eventName,listener,once){var event=new Event(getEventTag(eventName),listener,once);this._events.push(event);this._startEvent(event);return this};BaseProvider.prototype.on=function(eventName,listener){return this._addEventListener(eventName,listener,false)};BaseProvider.prototype.once=function(eventName,listener){return this._addEventListener(eventName,listener,true)};BaseProvider.prototype.emit=function(eventName){var _this=this;var args=[];for(var _i=1;_i0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]=0&&message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)){logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:error,method:method,transaction:transaction})}throw error}function timer(timeout){return new Promise(function(resolve){setTimeout(resolve,timeout)})}function getResult(payload){if(payload.error){var error=new Error(payload.error.message);error.code=payload.error.code;error.data=payload.error.data;throw error}return payload.result}function getLowerCase(value){if(value){return value.toLowerCase()}return value}var _constructorGuard={};var JsonRpcSigner=function(_super){__extends(JsonRpcSigner,_super);function JsonRpcSigner(constructorGuard,provider,addressOrIndex){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,JsonRpcSigner);_this=_super.call(this)||this;if(constructorGuard!==_constructorGuard){throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner")}(0,lib$3.defineReadOnly)(_this,"provider",provider);if(addressOrIndex==null){addressOrIndex=0}if(typeof addressOrIndex==="string"){(0,lib$3.defineReadOnly)(_this,"_address",_this.provider.formatter.address(addressOrIndex));(0,lib$3.defineReadOnly)(_this,"_index",null)}else if(typeof addressOrIndex==="number"){(0,lib$3.defineReadOnly)(_this,"_index",addressOrIndex);(0,lib$3.defineReadOnly)(_this,"_address",null)}else{logger.throwArgumentError("invalid address or index","addressOrIndex",addressOrIndex)}return _this}JsonRpcSigner.prototype.connect=function(provider){return logger.throwError("cannot alter JSON-RPC Signer connection",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})};JsonRpcSigner.prototype.connectUnchecked=function(){return new UncheckedJsonRpcSigner(_constructorGuard,this.provider,this._address||this._index)};JsonRpcSigner.prototype.getAddress=function(){var _this=this;if(this._address){return Promise.resolve(this._address)}return this.provider.send("eth_accounts",[]).then(function(accounts){if(accounts.length<=_this._index){logger.throwError("unknown account #"+_this._index,lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"})}return _this.provider.formatter.address(accounts[_this._index])})};JsonRpcSigner.prototype.sendUncheckedTransaction=function(transaction){var _this=this;transaction=(0,lib$3.shallowCopy)(transaction);var fromAddress=this.getAddress().then(function(address){if(address){address=address.toLowerCase()}return address});if(transaction.gasLimit==null){var estimate=(0,lib$3.shallowCopy)(transaction);estimate.from=fromAddress;transaction.gasLimit=this.provider.estimateGas(estimate)}if(transaction.to!=null){transaction.to=Promise.resolve(transaction.to).then(function(to){return __awaiter(_this,void 0,void 0,function(){var address;return __generator(this,function(_a){switch(_a.label){case 0:if(to==null){return[2,null]}return[4,this.provider.resolveName(to)];case 1:address=_a.sent();if(address==null){logger.throwArgumentError("provided ENS name resolves to null","tx.to",to)}return[2,address]}})})})}return(0,lib$3.resolveProperties)({tx:(0,lib$3.resolveProperties)(transaction),sender:fromAddress}).then(function(_a){var tx=_a.tx,sender=_a.sender;if(tx.from!=null){if(tx.from.toLowerCase()!==sender){logger.throwArgumentError("from address mismatch","transaction",transaction)}}else{tx.from=sender}var hexTx=_this.provider.constructor.hexlifyTransaction(tx,{from:true});return _this.provider.send("eth_sendTransaction",[hexTx]).then(function(hash){return hash},function(error){return checkError("sendTransaction",error,hexTx)})})};JsonRpcSigner.prototype.signTransaction=function(transaction){return logger.throwError("signing transactions is unsupported",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})};JsonRpcSigner.prototype.sendTransaction=function(transaction){return __awaiter(this,void 0,void 0,function(){var blockNumber,hash,error_1;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval)];case 1:blockNumber=_a.sent();return[4,this.sendUncheckedTransaction(transaction)];case 2:hash=_a.sent();_a.label=3;case 3:_a.trys.push([3,5,,6]);return[4,(0,lib$q.poll)(function(){return __awaiter(_this,void 0,void 0,function(){var tx;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.provider.getTransaction(hash)];case 1:tx=_a.sent();if(tx===null){return[2,undefined]}return[2,this.provider._wrapTransaction(tx,hash,blockNumber)]}})})},{oncePoll:this.provider})];case 4:return[2,_a.sent()];case 5:error_1=_a.sent();error_1.transactionHash=hash;throw error_1;case 6:return[2]}})})};JsonRpcSigner.prototype.signMessage=function(message){return __awaiter(this,void 0,void 0,function(){var data,address;return __generator(this,function(_a){switch(_a.label){case 0:data=typeof message==="string"?(0,lib$8.toUtf8Bytes)(message):message;return[4,this.getAddress()];case 1:address=_a.sent();return[4,this.provider.send("personal_sign",[(0,lib$1.hexlify)(data),address.toLowerCase()])];case 2:return[2,_a.sent()]}})})};JsonRpcSigner.prototype._legacySignMessage=function(message){return __awaiter(this,void 0,void 0,function(){var data,address;return __generator(this,function(_a){switch(_a.label){case 0:data=typeof message==="string"?(0,lib$8.toUtf8Bytes)(message):message;return[4,this.getAddress()];case 1:address=_a.sent();return[4,this.provider.send("eth_sign",[address.toLowerCase(),(0,lib$1.hexlify)(data)])];case 2:return[2,_a.sent()]}})})};JsonRpcSigner.prototype._signTypedData=function(domain,types,value){return __awaiter(this,void 0,void 0,function(){var populated,address;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:return[4,lib$9._TypedDataEncoder.resolveNames(domain,types,value,function(name){return _this.provider.resolveName(name)})];case 1:populated=_a.sent();return[4,this.getAddress()];case 2:address=_a.sent();return[4,this.provider.send("eth_signTypedData_v4",[address.toLowerCase(),JSON.stringify(lib$9._TypedDataEncoder.getPayload(populated.domain,types,populated.value))])];case 3:return[2,_a.sent()]}})})};JsonRpcSigner.prototype.unlock=function(password){return __awaiter(this,void 0,void 0,function(){var provider,address;return __generator(this,function(_a){switch(_a.label){case 0:provider=this.provider;return[4,this.getAddress()];case 1:address=_a.sent();return[2,provider.send("personal_unlockAccount",[address.toLowerCase(),password,null])]}})})};return JsonRpcSigner}(lib$c.Signer);exports.JsonRpcSigner=JsonRpcSigner;var UncheckedJsonRpcSigner=function(_super){__extends(UncheckedJsonRpcSigner,_super);function UncheckedJsonRpcSigner(){return _super!==null&&_super.apply(this,arguments)||this}UncheckedJsonRpcSigner.prototype.sendTransaction=function(transaction){var _this=this;return this.sendUncheckedTransaction(transaction).then(function(hash){return{hash:hash,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(confirmations){return _this.provider.waitForTransaction(hash,confirmations)}}})};return UncheckedJsonRpcSigner}(JsonRpcSigner);var allowedTransactionKeys={chainId:true,data:true,gasLimit:true,gasPrice:true,nonce:true,to:true,value:true,type:true,accessList:true,maxFeePerGas:true,maxPriorityFeePerGas:true};var JsonRpcProvider=function(_super){__extends(JsonRpcProvider,_super);function JsonRpcProvider(url,network){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,JsonRpcProvider);var networkOrReady=network;if(networkOrReady==null){networkOrReady=new Promise(function(resolve,reject){setTimeout(function(){_this.detectNetwork().then(function(network){resolve(network)},function(error){reject(error)})},0)})}_this=_super.call(this,networkOrReady)||this;if(!url){url=(0,lib$3.getStatic)(_this.constructor,"defaultUrl")()}if(typeof url==="string"){(0,lib$3.defineReadOnly)(_this,"connection",Object.freeze({url:url}))}else{(0,lib$3.defineReadOnly)(_this,"connection",Object.freeze((0,lib$3.shallowCopy)(url)))}_this._nextId=42;return _this}Object.defineProperty(JsonRpcProvider.prototype,"_cache",{get:function(){if(this._eventLoopCache==null){this._eventLoopCache={}}return this._eventLoopCache},enumerable:false,configurable:true});JsonRpcProvider.defaultUrl=function(){return"http://localhost:8545"};JsonRpcProvider.prototype.detectNetwork=function(){var _this=this;if(!this._cache["detectNetwork"]){this._cache["detectNetwork"]=this._uncachedDetectNetwork();setTimeout(function(){_this._cache["detectNetwork"]=null},0)}return this._cache["detectNetwork"]};JsonRpcProvider.prototype._uncachedDetectNetwork=function(){return __awaiter(this,void 0,void 0,function(){var chainId,error_2,error_3,getNetwork;return __generator(this,function(_a){switch(_a.label){case 0:return[4,timer(0)];case 1:_a.sent();chainId=null;_a.label=2;case 2:_a.trys.push([2,4,,9]);return[4,this.send("eth_chainId",[])];case 3:chainId=_a.sent();return[3,9];case 4:error_2=_a.sent();_a.label=5;case 5:_a.trys.push([5,7,,8]);return[4,this.send("net_version",[])];case 6:chainId=_a.sent();return[3,8];case 7:error_3=_a.sent();return[3,8];case 8:return[3,9];case 9:if(chainId!=null){getNetwork=(0,lib$3.getStatic)(this.constructor,"getNetwork");try{return[2,getNetwork(lib$2.BigNumber.from(chainId).toNumber())]}catch(error){return[2,logger.throwError("could not detect network",lib.Logger.errors.NETWORK_ERROR,{chainId:chainId,event:"invalidNetwork",serverError:error})]}}return[2,logger.throwError("could not detect network",lib.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})]}})})};JsonRpcProvider.prototype.getSigner=function(addressOrIndex){return new JsonRpcSigner(_constructorGuard,this,addressOrIndex)};JsonRpcProvider.prototype.getUncheckedSigner=function(addressOrIndex){return this.getSigner(addressOrIndex).connectUnchecked()};JsonRpcProvider.prototype.listAccounts=function(){var _this=this;return this.send("eth_accounts",[]).then(function(accounts){return accounts.map(function(a){return _this.formatter.address(a)})})};JsonRpcProvider.prototype.send=function(method,params){var _this=this;var request={method:method,params:params,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,lib$3.deepCopy)(request),provider:this});var cache=["eth_chainId","eth_blockNumber"].indexOf(method)>=0;if(cache&&this._cache[method]){return this._cache[method]}var result=(0,lib$q.fetchJson)(this.connection,JSON.stringify(request),getResult).then(function(result){_this.emit("debug",{action:"response",request:request,response:result,provider:_this});return result},function(error){_this.emit("debug",{action:"response",error:error,request:request,provider:_this});throw error});if(cache){this._cache[method]=result;setTimeout(function(){_this._cache[method]=null},0)}return result};JsonRpcProvider.prototype.prepareRequest=function(method,params){switch(method){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[getLowerCase(params.address),params.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[getLowerCase(params.address),params.blockTag]];case"getCode":return["eth_getCode",[getLowerCase(params.address),params.blockTag]];case"getStorageAt":return["eth_getStorageAt",[getLowerCase(params.address),params.position,params.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[params.signedTransaction]];case"getBlock":if(params.blockTag){return["eth_getBlockByNumber",[params.blockTag,!!params.includeTransactions]]}else if(params.blockHash){return["eth_getBlockByHash",[params.blockHash,!!params.includeTransactions]]}return null;case"getTransaction":return["eth_getTransactionByHash",[params.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[params.transactionHash]];case"call":{var hexlifyTransaction=(0,lib$3.getStatic)(this.constructor,"hexlifyTransaction");return["eth_call",[hexlifyTransaction(params.transaction,{from:true}),params.blockTag]]}case"estimateGas":{var hexlifyTransaction=(0,lib$3.getStatic)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[hexlifyTransaction(params.transaction,{from:true})]]}case"getLogs":if(params.filter&¶ms.filter.address!=null){params.filter.address=getLowerCase(params.filter.address)}return["eth_getLogs",[params.filter]];default:break}return null};JsonRpcProvider.prototype.perform=function(method,params){return __awaiter(this,void 0,void 0,function(){var tx,feeData,args,error_4;return __generator(this,function(_a){switch(_a.label){case 0:if(!(method==="call"||method==="estimateGas"))return[3,2];tx=params.transaction;if(!(tx&&tx.type!=null&&lib$2.BigNumber.from(tx.type).isZero()))return[3,2];if(!(tx.maxFeePerGas==null&&tx.maxPriorityFeePerGas==null))return[3,2];return[4,this.getFeeData()];case 1:feeData=_a.sent();if(feeData.maxFeePerGas==null&&feeData.maxPriorityFeePerGas==null){params=(0,lib$3.shallowCopy)(params);params.transaction=(0,lib$3.shallowCopy)(tx);delete params.transaction.type}_a.label=2;case 2:args=this.prepareRequest(method,params);if(args==null){logger.throwError(method+" not implemented",lib.Logger.errors.NOT_IMPLEMENTED,{operation:method})}_a.label=3;case 3:_a.trys.push([3,5,,6]);return[4,this.send(args[0],args[1])];case 4:return[2,_a.sent()];case 5:error_4=_a.sent();return[2,checkError(method,error_4,params)];case 6:return[2]}})})};JsonRpcProvider.prototype._startEvent=function(event){if(event.tag==="pending"){this._startPending()}_super.prototype._startEvent.call(this,event)};JsonRpcProvider.prototype._startPending=function(){if(this._pendingFilter!=null){return}var self=this;var pendingFilter=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=pendingFilter;pendingFilter.then(function(filterId){function poll(){self.send("eth_getFilterChanges",[filterId]).then(function(hashes){if(self._pendingFilter!=pendingFilter){return null}var seq=Promise.resolve();hashes.forEach(function(hash){self._emitted["t:"+hash.toLowerCase()]="pending";seq=seq.then(function(){return self.getTransaction(hash).then(function(tx){self.emit("pending",tx);return null})})});return seq.then(function(){return timer(1e3)})}).then(function(){if(self._pendingFilter!=pendingFilter){self.send("eth_uninstallFilter",[filterId]);return}setTimeout(function(){poll()},0);return null}).catch(function(error){})}poll();return filterId}).catch(function(error){})};JsonRpcProvider.prototype._stopEvent=function(event){if(event.tag==="pending"&&this.listenerCount("pending")===0){this._pendingFilter=null}_super.prototype._stopEvent.call(this,event)};JsonRpcProvider.hexlifyTransaction=function(transaction,allowExtra){var allowed=(0,lib$3.shallowCopy)(allowedTransactionKeys);if(allowExtra){for(var key in allowExtra){if(allowExtra[key]){allowed[key]=true}}}(0,lib$3.checkProperties)(transaction,allowed);var result={};["gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(key){if(transaction[key]==null){return}var value=(0,lib$1.hexValue)(transaction[key]);if(key==="gasLimit"){key="gas"}result[key]=value});["from","to","data"].forEach(function(key){if(transaction[key]==null){return}result[key]=(0,lib$1.hexlify)(transaction[key])});if(transaction.accessList){result["accessList"]=(0,lib$e.accessListify)(transaction.accessList)}return result};return JsonRpcProvider}(baseProvider.BaseProvider);exports.JsonRpcProvider=JsonRpcProvider});var jsonRpcProvider$1=getDefaultExportFromCjs(jsonRpcProvider);var browserWs=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.WebSocket=void 0;var WS=null;exports.WebSocket=WS;try{exports.WebSocket=WS=WebSocket;if(WS==null){throw new Error("inject please")}}catch(error){var logger_2=new lib.Logger(_version$I.version);exports.WebSocket=WS=function(){logger_2.throwError("WebSockets not supported in this environment",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}});var browserWs$1=getDefaultExportFromCjs(browserWs);var websocketProvider=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();var __awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};var __generator=commonjsGlobal&&commonjsGlobal.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]=0){error.throttleRetry=true}throw error}return result.result}function getJsonResult(result){if(result&&result.status==0&&result.message=="NOTOK"&&(result.result||"").toLowerCase().indexOf("rate limit")>=0){var error=new Error("throttled response");error.result=JSON.stringify(result);error.throttleRetry=true;throw error}if(result.jsonrpc!="2.0"){var error=new Error("invalid response");error.result=JSON.stringify(result);throw error}if(result.error){var error=new Error(result.error.message||"unknown error");if(result.error.code){error.code=result.error.code}if(result.error.data){error.data=result.error.data}throw error}return result.result}function checkLogTag(blockTag){if(blockTag==="pending"){throw new Error("pending not supported")}if(blockTag==="latest"){return blockTag}return parseInt(blockTag.substring(2),16)}var defaultApiKey="9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";function checkError(method,error,transaction){if(method==="call"&&error.code===lib.Logger.errors.SERVER_ERROR){var e=error.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){var data=e.data;if(data){data="0x"+data.replace(/^.*0x/i,"")}if((0,lib$1.isHexString)(data)){return data}logger.throwError("missing revert data in call exception",lib.Logger.errors.CALL_EXCEPTION,{error:error,data:"0x"})}}var message=error.message;if(error.code===lib.Logger.errors.SERVER_ERROR){if(error.error&&typeof error.error.message==="string"){message=error.error.message}else if(typeof error.body==="string"){message=error.body}else if(typeof error.responseText==="string"){message=error.responseText}}message=(message||"").toLowerCase();if(message.match(/insufficient funds/)){logger.throwError("insufficient funds for intrinsic transaction cost",lib.Logger.errors.INSUFFICIENT_FUNDS,{error:error,method:method,transaction:transaction})}if(message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)){logger.throwError("nonce has already been used",lib.Logger.errors.NONCE_EXPIRED,{error:error,method:method,transaction:transaction})}if(message.match(/another transaction with same nonce/)){logger.throwError("replacement fee too low",lib.Logger.errors.REPLACEMENT_UNDERPRICED,{error:error,method:method,transaction:transaction})}if(message.match(/execution failed due to an exception|execution reverted/)){logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:error,method:method,transaction:transaction})}throw error}var EtherscanProvider=function(_super){__extends(EtherscanProvider,_super);function EtherscanProvider(network,apiKey){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,EtherscanProvider);_this=_super.call(this,network)||this;(0,lib$3.defineReadOnly)(_this,"baseUrl",_this.getBaseUrl());(0,lib$3.defineReadOnly)(_this,"apiKey",apiKey||defaultApiKey);return _this}EtherscanProvider.prototype.getBaseUrl=function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";default:}return logger.throwArgumentError("unsupported network","network",name)};EtherscanProvider.prototype.getUrl=function(module,params){var query=Object.keys(params).reduce(function(accum,key){var value=params[key];if(value!=null){accum+="&"+key+"="+value}return accum},"");var apiKey=this.apiKey?"&apikey="+this.apiKey:"";return this.baseUrl+"/api?module="+module+query+apiKey};EtherscanProvider.prototype.getPostUrl=function(){return this.baseUrl+"/api"};EtherscanProvider.prototype.getPostData=function(module,params){params.module=module;params.apikey=this.apiKey;return params};EtherscanProvider.prototype.fetch=function(module,params,post){return __awaiter(this,void 0,void 0,function(){var url,payload,procFunc,connection,payloadStr,result;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:url=post?this.getPostUrl():this.getUrl(module,params);payload=post?this.getPostData(module,params):null;procFunc=module==="proxy"?getJsonResult:getResult;this.emit("debug",{action:"request",request:url,provider:this});connection={url:url,throttleSlotInterval:1e3,throttleCallback:function(attempt,url){if(_this.isCommunityResource()){(0,formatter.showThrottleMessage)()}return Promise.resolve(true)}};payloadStr=null;if(payload){connection.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"};payloadStr=Object.keys(payload).map(function(key){return key+"="+payload[key]}).join("&")}return[4,(0,lib$q.fetchJson)(connection,payloadStr,procFunc||getJsonResult)];case 1:result=_a.sent();this.emit("debug",{action:"response",request:url,response:(0,lib$3.deepCopy)(result),provider:this});return[2,result]}})})};EtherscanProvider.prototype.detectNetwork=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){return[2,this.network]})})};EtherscanProvider.prototype.perform=function(method,params){return __awaiter(this,void 0,void 0,function(){var _a,postData,error_1,postData,error_2,args,topic0,logs,blocks,i,log,block,_b;return __generator(this,function(_c){switch(_c.label){case 0:_a=method;switch(_a){case"getBlockNumber":return[3,1];case"getGasPrice":return[3,2];case"getBalance":return[3,3];case"getTransactionCount":return[3,4];case"getCode":return[3,5];case"getStorageAt":return[3,6];case"sendTransaction":return[3,7];case"getBlock":return[3,8];case"getTransaction":return[3,9];case"getTransactionReceipt":return[3,10];case"call":return[3,11];case"estimateGas":return[3,15];case"getLogs":return[3,19];case"getEtherPrice":return[3,26]}return[3,28];case 1:return[2,this.fetch("proxy",{action:"eth_blockNumber"})];case 2:return[2,this.fetch("proxy",{action:"eth_gasPrice"})];case 3:return[2,this.fetch("account",{action:"balance",address:params.address,tag:params.blockTag})];case 4:return[2,this.fetch("proxy",{action:"eth_getTransactionCount",address:params.address,tag:params.blockTag})];case 5:return[2,this.fetch("proxy",{action:"eth_getCode",address:params.address,tag:params.blockTag})];case 6:return[2,this.fetch("proxy",{action:"eth_getStorageAt",address:params.address,position:params.position,tag:params.blockTag})];case 7:return[2,this.fetch("proxy",{action:"eth_sendRawTransaction",hex:params.signedTransaction},true).catch(function(error){return checkError("sendTransaction",error,params.signedTransaction)})];case 8:if(params.blockTag){return[2,this.fetch("proxy",{action:"eth_getBlockByNumber",tag:params.blockTag,boolean:params.includeTransactions?"true":"false"})]}throw new Error("getBlock by blockHash not implemented");case 9:return[2,this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:params.transactionHash})];case 10:return[2,this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:params.transactionHash})];case 11:if(params.blockTag!=="latest"){throw new Error("EtherscanProvider does not support blockTag for call")}postData=getTransactionPostData(params.transaction);postData.module="proxy";postData.action="eth_call";_c.label=12;case 12:_c.trys.push([12,14,,15]);return[4,this.fetch("proxy",postData,true)];case 13:return[2,_c.sent()];case 14:error_1=_c.sent();return[2,checkError("call",error_1,params.transaction)];case 15:postData=getTransactionPostData(params.transaction);postData.module="proxy";postData.action="eth_estimateGas";_c.label=16;case 16:_c.trys.push([16,18,,19]);return[4,this.fetch("proxy",postData,true)];case 17:return[2,_c.sent()];case 18:error_2=_c.sent();return[2,checkError("estimateGas",error_2,params.transaction)];case 19:args={action:"getLogs"};if(params.filter.fromBlock){args.fromBlock=checkLogTag(params.filter.fromBlock)}if(params.filter.toBlock){args.toBlock=checkLogTag(params.filter.toBlock)}if(params.filter.address){args.address=params.filter.address}if(params.filter.topics&¶ms.filter.topics.length>0){if(params.filter.topics.length>1){logger.throwError("unsupported topic count",lib.Logger.errors.UNSUPPORTED_OPERATION,{topics:params.filter.topics})}if(params.filter.topics.length===1){topic0=params.filter.topics[0];if(typeof topic0!=="string"||topic0.length!==66){logger.throwError("unsupported topic format",lib.Logger.errors.UNSUPPORTED_OPERATION,{topic0:topic0})}args.topic0=topic0}}return[4,this.fetch("logs",args)];case 20:logs=_c.sent();blocks={};i=0;_c.label=21;case 21:if(!(i0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]maxDelta){return null}return(a+b)/2}function serialize(value){if(value===null){return"null"}else if(typeof value==="number"||typeof value==="boolean"){return JSON.stringify(value)}else if(typeof value==="string"){return value}else if(lib$2.BigNumber.isBigNumber(value)){return value.toString()}else if(Array.isArray(value)){return JSON.stringify(value.map(function(i){return serialize(i)}))}else if(typeof value==="object"){var keys=Object.keys(value);keys.sort();return"{"+keys.map(function(key){var v=value[key];if(typeof v==="function"){v="[function]"}else{v=serialize(v)}return JSON.stringify(key)+":"+v}).join(",")+"}"}throw new Error("unknown value type: "+typeof value)}var nextRid=1;function stall(duration){var cancel=null;var timer=null;var promise=new Promise(function(resolve){cancel=function(){if(timer){clearTimeout(timer);timer=null}resolve()};timer=setTimeout(cancel,duration)});var wait=function(func){promise=promise.then(func);return promise};function getPromise(){return promise}return{cancel:cancel,getPromise:getPromise,wait:wait}}var ForwardErrors=[lib.Logger.errors.CALL_EXCEPTION,lib.Logger.errors.INSUFFICIENT_FUNDS,lib.Logger.errors.NONCE_EXPIRED,lib.Logger.errors.REPLACEMENT_UNDERPRICED,lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT];var ForwardProperties=["address","args","errorArgs","errorSignature","method","transaction"];function exposeDebugConfig(config,now){var result={weight:config.weight};Object.defineProperty(result,"provider",{get:function(){return config.provider}});if(config.start){result.start=config.start}if(now){result.duration=now-config.start}if(config.done){if(config.error){result.error=config.error}else{result.result=config.result||null}}return result}function normalizedTally(normalize,quorum){return function(configs){var tally={};configs.forEach(function(c){var value=normalize(c.result);if(!tally[value]){tally[value]={count:0,result:c.result}}tally[value].count++});var keys=Object.keys(tally);for(var i=0;i=quorum){return check.result}}return undefined}}function getProcessFunc(provider,method,params){var normalize=serialize;switch(method){case"getBlockNumber":return function(configs){var values=configs.map(function(c){return c.result});var blockNumber=median(configs.map(function(c){return c.result}),2);if(blockNumber==null){return undefined}blockNumber=Math.ceil(blockNumber);if(values.indexOf(blockNumber+1)>=0){blockNumber++}if(blockNumber>=provider._highestBlockNumber){provider._highestBlockNumber=blockNumber}return provider._highestBlockNumber};case"getGasPrice":return function(configs){var values=configs.map(function(c){return c.result});values.sort();return values[Math.floor(values.length/2)]};case"getEtherPrice":return function(configs){return median(configs.map(function(c){return c.result}))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":normalize=function(tx){if(tx==null){return null}tx=(0,lib$3.shallowCopy)(tx);tx.confirmations=-1;return serialize(tx)};break;case"getBlock":if(params.includeTransactions){normalize=function(block){if(block==null){return null}block=(0,lib$3.shallowCopy)(block);block.transactions=block.transactions.map(function(tx){tx=(0,lib$3.shallowCopy)(tx);tx.confirmations=-1;return tx});return serialize(block)}}else{normalize=function(block){if(block==null){return null}return serialize(block)}}break;default:throw new Error("unknown method: "+method)}return normalizedTally(normalize,provider.quorum)}function waitForSync(config,blockNumber){return __awaiter(this,void 0,void 0,function(){var provider;return __generator(this,function(_a){provider=config.provider;if(provider.blockNumber!=null&&provider.blockNumber>=blockNumber||blockNumber===-1){return[2,provider]}return[2,(0,lib$q.poll)(function(){return new Promise(function(resolve,reject){setTimeout(function(){if(provider.blockNumber>=blockNumber){return resolve(provider)}if(config.cancelled){return resolve(null)}return resolve(undefined)},0)})},{oncePoll:provider})]})})}function getRunner(config,currentBlockNumber,method,params){return __awaiter(this,void 0,void 0,function(){var provider,_a,filter;return __generator(this,function(_b){switch(_b.label){case 0:provider=config.provider;_a=method;switch(_a){case"getBlockNumber":return[3,1];case"getGasPrice":return[3,1];case"getEtherPrice":return[3,2];case"getBalance":return[3,3];case"getTransactionCount":return[3,3];case"getCode":return[3,3];case"getStorageAt":return[3,6];case"getBlock":return[3,9];case"call":return[3,12];case"estimateGas":return[3,12];case"getTransaction":return[3,15];case"getTransactionReceipt":return[3,15];case"getLogs":return[3,16]}return[3,19];case 1:return[2,provider[method]()];case 2:if(provider.getEtherPrice){return[2,provider.getEtherPrice()]}return[3,19];case 3:if(!(params.blockTag&&(0,lib$1.isHexString)(params.blockTag)))return[3,5];return[4,waitForSync(config,currentBlockNumber)];case 4:provider=_b.sent();_b.label=5;case 5:return[2,provider[method](params.address,params.blockTag||"latest")];case 6:if(!(params.blockTag&&(0,lib$1.isHexString)(params.blockTag)))return[3,8];return[4,waitForSync(config,currentBlockNumber)];case 7:provider=_b.sent();_b.label=8;case 8:return[2,provider.getStorageAt(params.address,params.position,params.blockTag||"latest")];case 9:if(!(params.blockTag&&(0,lib$1.isHexString)(params.blockTag)))return[3,11];return[4,waitForSync(config,currentBlockNumber)];case 10:provider=_b.sent();_b.label=11;case 11:return[2,provider[params.includeTransactions?"getBlockWithTransactions":"getBlock"](params.blockTag||params.blockHash)];case 12:if(!(params.blockTag&&(0,lib$1.isHexString)(params.blockTag)))return[3,14];return[4,waitForSync(config,currentBlockNumber)];case 13:provider=_b.sent();_b.label=14;case 14:return[2,provider[method](params.transaction)];case 15:return[2,provider[method](params.transactionHash)];case 16:filter=params.filter;if(!(filter.fromBlock&&(0,lib$1.isHexString)(filter.fromBlock)||filter.toBlock&&(0,lib$1.isHexString)(filter.toBlock)))return[3,18];return[4,waitForSync(config,currentBlockNumber)];case 17:provider=_b.sent();_b.label=18;case 18:return[2,provider.getLogs(filter)];case 19:return[2,logger.throwError("unknown method error",lib.Logger.errors.UNKNOWN_ERROR,{method:method,params:params})]}})})}var FallbackProvider=function(_super){__extends(FallbackProvider,_super);function FallbackProvider(providers,quorum){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,FallbackProvider);if(providers.length===0){logger.throwArgumentError("missing providers","providers",providers)}var providerConfigs=providers.map(function(configOrProvider,index){if(lib$b.Provider.isProvider(configOrProvider)){var stallTimeout=(0,formatter.isCommunityResource)(configOrProvider)?2e3:750;var priority=1;return Object.freeze({provider:configOrProvider,weight:1,stallTimeout:stallTimeout,priority:priority})}var config=(0,lib$3.shallowCopy)(configOrProvider);if(config.priority==null){config.priority=1}if(config.stallTimeout==null){config.stallTimeout=(0,formatter.isCommunityResource)(configOrProvider)?2e3:750}if(config.weight==null){config.weight=1}var weight=config.weight;if(weight%1||weight>512||weight<1){logger.throwArgumentError("invalid weight; must be integer in [1, 512]","providers["+index+"].weight",weight)}return Object.freeze(config)});var total=providerConfigs.reduce(function(accum,c){return accum+c.weight},0);if(quorum==null){quorum=total/2}else if(quorum>total){logger.throwArgumentError("quorum will always fail; larger than total weight","quorum",quorum)}var networkOrReady=checkNetworks(providerConfigs.map(function(c){return c.provider.network}));if(networkOrReady==null){networkOrReady=new Promise(function(resolve,reject){setTimeout(function(){_this.detectNetwork().then(resolve,reject)},0)})}_this=_super.call(this,networkOrReady)||this;(0,lib$3.defineReadOnly)(_this,"providerConfigs",Object.freeze(providerConfigs));(0,lib$3.defineReadOnly)(_this,"quorum",quorum);_this._highestBlockNumber=-1;return _this}FallbackProvider.prototype.detectNetwork=function(){return __awaiter(this,void 0,void 0,function(){var networks;return __generator(this,function(_a){switch(_a.label){case 0:return[4,Promise.all(this.providerConfigs.map(function(c){return c.provider.getNetwork()}))];case 1:networks=_a.sent();return[2,checkNetworks(networks)]}})})};FallbackProvider.prototype.perform=function(method,params){return __awaiter(this,void 0,void 0,function(){var results,i_1,result,processFunc,configs,currentBlockNumber,i,first,_loop_1,this_1,state_1;var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:if(!(method==="sendTransaction"))return[3,2];return[4,Promise.all(this.providerConfigs.map(function(c){return c.provider.sendTransaction(params.signedTransaction).then(function(result){return result.hash},function(error){return error})}))];case 1:results=_a.sent();for(i_1=0;i_1=this_1.quorum))return[3,5];result=processFunc(results);if(result!==undefined){configs.forEach(function(c){if(c.staller){c.staller.cancel()}c.cancelled=true});return[2,{value:result}]}if(!!first)return[3,4];return[4,stall(100).getPromise()];case 3:_b.sent();_b.label=4;case 4:first=false;_b.label=5;case 5:errors=configs.reduce(function(accum,c){if(!c.done||c.error==null){return accum}var code=c.error.code;if(ForwardErrors.indexOf(code)>=0){if(!accum[code]){accum[code]={error:c.error,weight:0}}accum[code].weight+=c.weight}return accum},{});Object.keys(errors).forEach(function(errorCode){var tally=errors[errorCode];if(tally.weight<_this.quorum){return}configs.forEach(function(c){if(c.staller){c.staller.cancel()}c.cancelled=true});var e=tally.error;var props={};ForwardProperties.forEach(function(name){if(e[name]==null){return}props[name]=e[name]});logger.throwError(e.reason||e.message,errorCode,props)});if(configs.filter(function(c){return!c.done}).length===0){return[2,"break"]}return[2]}})};this_1=this;_a.label=5;case 5:if(!true)return[3,7];return[5,_loop_1()];case 6:state_1=_a.sent();if(typeof state_1==="object")return[2,state_1.value];if(state_1==="break")return[3,7];return[3,5];case 7:configs.forEach(function(c){if(c.staller){c.staller.cancel()}c.cancelled=true});return[2,logger.throwError("failed to meet quorum",lib.Logger.errors.SERVER_ERROR,{method:method,params:params,results:configs.map(function(c){return exposeDebugConfig(c)}),provider:this})]}})})};return FallbackProvider}(baseProvider.BaseProvider);exports.FallbackProvider=FallbackProvider});var fallbackProvider$1=getDefaultExportFromCjs(fallbackProvider);var browserIpcProvider=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.IpcProvider=void 0;var IpcProvider=null;exports.IpcProvider=IpcProvider});var browserIpcProvider$1=getDefaultExportFromCjs(browserIpcProvider);var infuraProvider=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.InfuraProvider=exports.InfuraWebSocketProvider=void 0;var logger=new lib.Logger(_version$I.version);var defaultProjectId="84842078b09946638c03157f83405213";var InfuraWebSocketProvider=function(_super){__extends(InfuraWebSocketProvider,_super);function InfuraWebSocketProvider(network,apiKey){var _this=this;var provider=new InfuraProvider(network,apiKey);var connection=provider.connection;if(connection.password){logger.throwError("INFURA WebSocket project secrets unsupported",lib.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"})}var url=connection.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");_this=_super.call(this,url,network)||this;(0,lib$3.defineReadOnly)(_this,"apiKey",provider.projectId);(0,lib$3.defineReadOnly)(_this,"projectId",provider.projectId);(0,lib$3.defineReadOnly)(_this,"projectSecret",provider.projectSecret);return _this}InfuraWebSocketProvider.prototype.isCommunityResource=function(){return this.projectId===defaultProjectId};return InfuraWebSocketProvider}(websocketProvider.WebSocketProvider);exports.InfuraWebSocketProvider=InfuraWebSocketProvider;var InfuraProvider=function(_super){__extends(InfuraProvider,_super);function InfuraProvider(){return _super!==null&&_super.apply(this,arguments)||this}InfuraProvider.getWebSocketProvider=function(network,apiKey){return new InfuraWebSocketProvider(network,apiKey)};InfuraProvider.getApiKey=function(apiKey){var apiKeyObj={apiKey:defaultProjectId,projectId:defaultProjectId,projectSecret:null};if(apiKey==null){return apiKeyObj}if(typeof apiKey==="string"){apiKeyObj.projectId=apiKey}else if(apiKey.projectSecret!=null){logger.assertArgument(typeof apiKey.projectId==="string","projectSecret requires a projectId","projectId",apiKey.projectId);logger.assertArgument(typeof apiKey.projectSecret==="string","invalid projectSecret","projectSecret","[REDACTED]");apiKeyObj.projectId=apiKey.projectId;apiKeyObj.projectSecret=apiKey.projectSecret}else if(apiKey.projectId){apiKeyObj.projectId=apiKey.projectId}apiKeyObj.apiKey=apiKeyObj.projectId;return apiKeyObj};InfuraProvider.getUrl=function(network,apiKey){var host=null;switch(network?network.name:"unknown"){case"homestead":host="mainnet.infura.io";break;case"ropsten":host="ropsten.infura.io";break;case"rinkeby":host="rinkeby.infura.io";break;case"kovan":host="kovan.infura.io";break;case"goerli":host="goerli.infura.io";break;case"matic":host="polygon-mainnet.infura.io";break;case"maticmum":host="polygon-mumbai.infura.io";break;case"optimism":host="optimism-mainnet.infura.io";break;case"optimism-kovan":host="optimism-kovan.infura.io";break;case"arbitrum":host="arbitrum-mainnet.infura.io";break;case"arbitrum-rinkeby":host="arbitrum-rinkeby.infura.io";break;default:logger.throwError("unsupported network",lib.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}var connection={allowGzip:true,url:"https:/"+"/"+host+"/v3/"+apiKey.projectId,throttleCallback:function(attempt,url){if(apiKey.projectId===defaultProjectId){(0,formatter.showThrottleMessage)()}return Promise.resolve(true)}};if(apiKey.projectSecret!=null){connection.user="";connection.password=apiKey.projectSecret}return connection};InfuraProvider.prototype.isCommunityResource=function(){return this.projectId===defaultProjectId};return InfuraProvider}(urlJsonRpcProvider.UrlJsonRpcProvider);exports.InfuraProvider=InfuraProvider});var infuraProvider$1=getDefaultExportFromCjs(infuraProvider);var jsonRpcBatchProvider=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.JsonRpcBatchProvider=void 0;var JsonRpcBatchProvider=function(_super){__extends(JsonRpcBatchProvider,_super);function JsonRpcBatchProvider(){return _super!==null&&_super.apply(this,arguments)||this}JsonRpcBatchProvider.prototype.send=function(method,params){var _this=this;var request={method:method,params:params,id:this._nextId++,jsonrpc:"2.0"};if(this._pendingBatch==null){this._pendingBatch=[]}var inflightRequest={request:request,resolve:null,reject:null};var promise=new Promise(function(resolve,reject){inflightRequest.resolve=resolve;inflightRequest.reject=reject});this._pendingBatch.push(inflightRequest);if(!this._pendingBatchAggregator){this._pendingBatchAggregator=setTimeout(function(){var batch=_this._pendingBatch;_this._pendingBatch=null;_this._pendingBatchAggregator=null;var request=batch.map(function(inflight){return inflight.request});_this.emit("debug",{action:"requestBatch",request:(0,lib$3.deepCopy)(request),provider:_this});return(0,lib$q.fetchJson)(_this.connection,JSON.stringify(request)).then(function(result){_this.emit("debug",{action:"response",request:request,response:result,provider:_this});batch.forEach(function(inflightRequest,index){var payload=result[index];if(payload.error){var error=new Error(payload.error.message);error.code=payload.error.code;error.data=payload.error.data;inflightRequest.reject(error)}else{inflightRequest.resolve(payload.result)}})},function(error){_this.emit("debug",{action:"response",error:error,request:request,provider:_this});batch.forEach(function(inflightRequest){inflightRequest.reject(error)})})},10)}return promise};return JsonRpcBatchProvider}(jsonRpcProvider.JsonRpcProvider);exports.JsonRpcBatchProvider=JsonRpcBatchProvider});var jsonRpcBatchProvider$1=getDefaultExportFromCjs(jsonRpcBatchProvider);var nodesmithProvider=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.NodesmithProvider=void 0;var logger=new lib.Logger(_version$I.version);var defaultApiKey="ETHERS_JS_SHARED";var NodesmithProvider=function(_super){__extends(NodesmithProvider,_super);function NodesmithProvider(){return _super!==null&&_super.apply(this,arguments)||this}NodesmithProvider.getApiKey=function(apiKey){if(apiKey&&typeof apiKey!=="string"){logger.throwArgumentError("invalid apiKey","apiKey",apiKey)}return apiKey||defaultApiKey};NodesmithProvider.getUrl=function(network,apiKey){logger.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var host=null;switch(network.name){case"homestead":host="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":host="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":host="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":host="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":host="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:logger.throwArgumentError("unsupported network","network",arguments[0])}return host+"?apiKey="+apiKey};return NodesmithProvider}(urlJsonRpcProvider.UrlJsonRpcProvider);exports.NodesmithProvider=NodesmithProvider});var nodesmithProvider$1=getDefaultExportFromCjs(nodesmithProvider);var pocketProvider=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.PocketProvider=void 0;var logger=new lib.Logger(_version$I.version);var defaultApplicationIds={homestead:"6004bcd10040261633ade990",ropsten:"6004bd4d0040261633ade991",rinkeby:"6004bda20040261633ade994",goerli:"6004bd860040261633ade992"};var PocketProvider=function(_super){__extends(PocketProvider,_super);function PocketProvider(network,apiKey){var _newTarget=this.constructor;var _this=this;if(apiKey==null){var n=(0,lib$3.getStatic)(_newTarget,"getNetwork")(network);if(n){var applicationId=defaultApplicationIds[n.name];if(applicationId){apiKey={applicationId:applicationId,loadBalancer:true}}}if(apiKey==null){logger.throwError("unsupported network",lib.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}}_this=_super.call(this,network,apiKey)||this;return _this}PocketProvider.getApiKey=function(apiKey){if(apiKey==null){logger.throwArgumentError("PocketProvider.getApiKey does not support null apiKey","apiKey",apiKey)}var apiKeyObj={applicationId:null,loadBalancer:false,applicationSecretKey:null};if(typeof apiKey==="string"){apiKeyObj.applicationId=apiKey}else if(apiKey.applicationSecretKey!=null){logger.assertArgument(typeof apiKey.applicationId==="string","applicationSecretKey requires an applicationId","applicationId",apiKey.applicationId);logger.assertArgument(typeof apiKey.applicationSecretKey==="string","invalid applicationSecretKey","applicationSecretKey","[REDACTED]");apiKeyObj.applicationId=apiKey.applicationId;apiKeyObj.applicationSecretKey=apiKey.applicationSecretKey;apiKeyObj.loadBalancer=!!apiKey.loadBalancer}else if(apiKey.applicationId){logger.assertArgument(typeof apiKey.applicationId==="string","apiKey.applicationId must be a string","apiKey.applicationId",apiKey.applicationId);apiKeyObj.applicationId=apiKey.applicationId;apiKeyObj.loadBalancer=!!apiKey.loadBalancer}else{logger.throwArgumentError("unsupported PocketProvider apiKey","apiKey",apiKey)}return apiKeyObj};PocketProvider.getUrl=function(network,apiKey){var host=null;switch(network?network.name:"unknown"){case"homestead":host="eth-mainnet.gateway.pokt.network";break;case"ropsten":host="eth-ropsten.gateway.pokt.network";break;case"rinkeby":host="eth-rinkeby.gateway.pokt.network";break;case"goerli":host="eth-goerli.gateway.pokt.network";break;default:logger.throwError("unsupported network",lib.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}var url=null;if(apiKey.loadBalancer){url="https://"+host+"/v1/lb/"+apiKey.applicationId}else{url="https://"+host+"/v1/"+apiKey.applicationId}var connection={url:url};connection.headers={};if(apiKey.applicationSecretKey!=null){connection.user="";connection.password=apiKey.applicationSecretKey}return connection};PocketProvider.prototype.isCommunityResource=function(){return this.applicationId===defaultApplicationIds[this.network.name]};return PocketProvider}(urlJsonRpcProvider.UrlJsonRpcProvider);exports.PocketProvider=PocketProvider});var pocketProvider$1=getDefaultExportFromCjs(pocketProvider);var web3Provider=createCommonjsModule(function(module,exports){"use strict";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.Web3Provider=void 0;var logger=new lib.Logger(_version$I.version);var _nextId=1;function buildWeb3LegacyFetcher(provider,sendFunc){var fetcher="Web3LegacyFetcher";return function(method,params){var _this=this;var request={method:method,params:params,id:_nextId++,jsonrpc:"2.0"};return new Promise(function(resolve,reject){_this.emit("debug",{action:"request",fetcher:fetcher,request:(0,lib$3.deepCopy)(request),provider:_this});sendFunc(request,function(error,response){if(error){_this.emit("debug",{action:"response",fetcher:fetcher,error:error,request:request,provider:_this});return reject(error)}_this.emit("debug",{action:"response",fetcher:fetcher,request:request,response:response,provider:_this});if(response.error){var error_1=new Error(response.error.message);error_1.code=response.error.code;error_1.data=response.error.data;return reject(error_1)}resolve(response.result)})})}}function buildEip1193Fetcher(provider){return function(method,params){var _this=this;if(params==null){params=[]}var request={method:method,params:params};this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,lib$3.deepCopy)(request),provider:this});return provider.request(request).then(function(response){_this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:request,response:response,provider:_this});return response},function(error){_this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:request,error:error,provider:_this});throw error})}}var Web3Provider=function(_super){__extends(Web3Provider,_super);function Web3Provider(provider,network){var _newTarget=this.constructor;var _this=this;logger.checkNew(_newTarget,Web3Provider);if(provider==null){logger.throwArgumentError("missing provider","provider",provider)}var path=null;var jsonRpcFetchFunc=null;var subprovider=null;if(typeof provider==="function"){path="unknown:";jsonRpcFetchFunc=provider}else{path=provider.host||provider.path||"";if(!path&&provider.isMetaMask){path="metamask"}subprovider=provider;if(provider.request){if(path===""){path="eip-1193:"}jsonRpcFetchFunc=buildEip1193Fetcher(provider)}else if(provider.sendAsync){jsonRpcFetchFunc=buildWeb3LegacyFetcher(provider,provider.sendAsync.bind(provider))}else if(provider.send){jsonRpcFetchFunc=buildWeb3LegacyFetcher(provider,provider.send.bind(provider))}else{logger.throwArgumentError("unsupported provider","provider",provider)}if(!path){path="unknown:"}}_this=_super.call(this,path,network)||this;(0,lib$3.defineReadOnly)(_this,"jsonRpcFetchFunc",jsonRpcFetchFunc);(0,lib$3.defineReadOnly)(_this,"provider",subprovider);return _this}Web3Provider.prototype.send=function(method,params){return this.jsonRpcFetchFunc(method,params)};return Web3Provider}(jsonRpcProvider.JsonRpcProvider);exports.Web3Provider=Web3Provider});var web3Provider$1=getDefaultExportFromCjs(web3Provider);var lib$r=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Formatter=exports.showThrottleMessage=exports.isCommunityResourcable=exports.isCommunityResource=exports.getNetwork=exports.getDefaultProvider=exports.JsonRpcSigner=exports.IpcProvider=exports.WebSocketProvider=exports.Web3Provider=exports.StaticJsonRpcProvider=exports.PocketProvider=exports.NodesmithProvider=exports.JsonRpcBatchProvider=exports.JsonRpcProvider=exports.InfuraWebSocketProvider=exports.InfuraProvider=exports.EtherscanProvider=exports.CloudflareProvider=exports.AlchemyWebSocketProvider=exports.AlchemyProvider=exports.FallbackProvider=exports.UrlJsonRpcProvider=exports.Resolver=exports.BaseProvider=exports.Provider=void 0;Object.defineProperty(exports,"Provider",{enumerable:true,get:function(){return lib$b.Provider}});Object.defineProperty(exports,"getNetwork",{enumerable:true,get:function(){return lib$o.getNetwork}});Object.defineProperty(exports,"BaseProvider",{enumerable:true,get:function(){return baseProvider.BaseProvider}});Object.defineProperty(exports,"Resolver",{enumerable:true,get:function(){return baseProvider.Resolver}});Object.defineProperty(exports,"AlchemyProvider",{enumerable:true,get:function(){return alchemyProvider.AlchemyProvider}});Object.defineProperty(exports,"AlchemyWebSocketProvider",{enumerable:true,get:function(){return alchemyProvider.AlchemyWebSocketProvider}});Object.defineProperty(exports,"CloudflareProvider",{enumerable:true,get:function(){return cloudflareProvider.CloudflareProvider}});Object.defineProperty(exports,"EtherscanProvider",{enumerable:true,get:function(){return etherscanProvider.EtherscanProvider}});Object.defineProperty(exports,"FallbackProvider",{enumerable:true,get:function(){return fallbackProvider.FallbackProvider}});Object.defineProperty(exports,"IpcProvider",{enumerable:true,get:function(){return browserIpcProvider.IpcProvider}});Object.defineProperty(exports,"InfuraProvider",{enumerable:true,get:function(){return infuraProvider.InfuraProvider}});Object.defineProperty(exports,"InfuraWebSocketProvider",{enumerable:true,get:function(){return infuraProvider.InfuraWebSocketProvider}});Object.defineProperty(exports,"JsonRpcProvider",{enumerable:true,get:function(){return jsonRpcProvider.JsonRpcProvider}});Object.defineProperty(exports,"JsonRpcSigner",{enumerable:true,get:function(){return jsonRpcProvider.JsonRpcSigner}});Object.defineProperty(exports,"JsonRpcBatchProvider",{enumerable:true,get:function(){return jsonRpcBatchProvider.JsonRpcBatchProvider}});Object.defineProperty(exports,"NodesmithProvider",{enumerable:true,get:function(){return nodesmithProvider.NodesmithProvider}});Object.defineProperty(exports,"PocketProvider",{enumerable:true,get:function(){return pocketProvider.PocketProvider}});Object.defineProperty(exports,"StaticJsonRpcProvider",{enumerable:true,get:function(){return urlJsonRpcProvider.StaticJsonRpcProvider}});Object.defineProperty(exports,"UrlJsonRpcProvider",{enumerable:true,get:function(){return urlJsonRpcProvider.UrlJsonRpcProvider}});Object.defineProperty(exports,"Web3Provider",{enumerable:true,get:function(){return web3Provider.Web3Provider}});Object.defineProperty(exports,"WebSocketProvider",{enumerable:true,get:function(){return websocketProvider.WebSocketProvider}});Object.defineProperty(exports,"Formatter",{enumerable:true,get:function(){return formatter.Formatter}});Object.defineProperty(exports,"isCommunityResourcable",{enumerable:true,get:function(){return formatter.isCommunityResourcable}});Object.defineProperty(exports,"isCommunityResource",{enumerable:true,get:function(){return formatter.isCommunityResource}});Object.defineProperty(exports,"showThrottleMessage",{enumerable:true,get:function(){return formatter.showThrottleMessage}});var logger=new lib.Logger(_version$I.version);function getDefaultProvider(network,options){if(network==null){network="homestead"}if(typeof network==="string"){var match=network.match(/^(ws|http)s?:/i);if(match){switch(match[1]){case"http":return new jsonRpcProvider.JsonRpcProvider(network);case"ws":return new websocketProvider.WebSocketProvider(network);default:logger.throwArgumentError("unsupported URL scheme","network",network)}}}var n=(0,lib$o.getNetwork)(network);if(!n||!n._defaultProvider){logger.throwError("unsupported getDefaultProvider network",lib.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:network})}return n._defaultProvider({FallbackProvider:fallbackProvider.FallbackProvider,AlchemyProvider:alchemyProvider.AlchemyProvider,CloudflareProvider:cloudflareProvider.CloudflareProvider,EtherscanProvider:etherscanProvider.EtherscanProvider,InfuraProvider:infuraProvider.InfuraProvider,JsonRpcProvider:jsonRpcProvider.JsonRpcProvider,NodesmithProvider:nodesmithProvider.NodesmithProvider,PocketProvider:pocketProvider.PocketProvider,Web3Provider:web3Provider.Web3Provider,IpcProvider:browserIpcProvider.IpcProvider},options)}exports.getDefaultProvider=getDefaultProvider});var index$r=getDefaultExportFromCjs(lib$r);var _version$K=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="solidity/5.5.0"});var _version$L=getDefaultExportFromCjs(_version$K);var lib$s=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.sha256=exports.keccak256=exports.pack=void 0;var regexBytes=new RegExp("^bytes([0-9]+)$");var regexNumber=new RegExp("^(u?int)([0-9]*)$");var regexArray=new RegExp("^(.*)\\[([0-9]*)\\]$");var Zeros="0000000000000000000000000000000000000000000000000000000000000000";var logger=new lib.Logger(_version$K.version);function _pack(type,value,isArray){switch(type){case"address":if(isArray){return(0,lib$1.zeroPad)(value,32)}return(0,lib$1.arrayify)(value);case"string":return(0,lib$8.toUtf8Bytes)(value);case"bytes":return(0,lib$1.arrayify)(value);case"bool":value=value?"0x01":"0x00";if(isArray){return(0,lib$1.zeroPad)(value,32)}return(0,lib$1.arrayify)(value)}var match=type.match(regexNumber);if(match){var size=parseInt(match[2]||"256");if(match[2]&&String(size)!==match[2]||size%8!==0||size===0||size>256){logger.throwArgumentError("invalid number type","type",type)}if(isArray){size=256}value=lib$2.BigNumber.from(value).toTwos(size);return(0,lib$1.zeroPad)(value,size/8)}match=type.match(regexBytes);if(match){var size=parseInt(match[1]);if(String(size)!==match[1]||size===0||size>32){logger.throwArgumentError("invalid bytes type","type",type)}if((0,lib$1.arrayify)(value).byteLength!==size){logger.throwArgumentError("invalid value for "+type,"value",value)}if(isArray){return(0,lib$1.arrayify)((value+Zeros).substring(0,66))}return value}match=type.match(regexArray);if(match&&Array.isArray(value)){var baseType_1=match[1];var count=parseInt(match[2]||String(value.length));if(count!=value.length){logger.throwArgumentError("invalid array length for "+type,"value",value)}var result_1=[];value.forEach(function(value){result_1.push(_pack(baseType_1,value,true))});return(0,lib$1.concat)(result_1)}return logger.throwArgumentError("invalid type","type",type)}function pack(types,values){if(types.length!=values.length){logger.throwArgumentError("wrong number of values; expected ${ types.length }","values",values)}var tight=[];types.forEach(function(type,index){tight.push(_pack(type,values[index]))});return(0,lib$1.hexlify)((0,lib$1.concat)(tight))}exports.pack=pack;function keccak256(types,values){return(0,lib$4.keccak256)(pack(types,values))}exports.keccak256=keccak256;function sha256(types,values){return(0,lib$h.sha256)(pack(types,values))}exports.sha256=sha256});var index$s=getDefaultExportFromCjs(lib$s);var _version$M=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="units/5.5.0"});var _version$N=getDefaultExportFromCjs(_version$M);var lib$t=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.parseEther=exports.formatEther=exports.parseUnits=exports.formatUnits=exports.commify=void 0;var logger=new lib.Logger(_version$M.version);var names=["wei","kwei","mwei","gwei","szabo","finney","ether"];function commify(value){var comps=String(value).split(".");if(comps.length>2||!comps[0].match(/^-?[0-9]*$/)||comps[1]&&!comps[1].match(/^[0-9]*$/)||value==="."||value==="-."){logger.throwArgumentError("invalid value","value",value)}var whole=comps[0];var negative="";if(whole.substring(0,1)==="-"){negative="-";whole=whole.substring(1)}while(whole.substring(0,1)==="0"){whole=whole.substring(1)}if(whole===""){whole="0"}var suffix="";if(comps.length===2){suffix="."+(comps[1]||"0")}while(suffix.length>2&&suffix[suffix.length-1]==="0"){suffix=suffix.substring(0,suffix.length-1)}var formatted=[];while(whole.length){if(whole.length<=3){formatted.unshift(whole);break}else{var index=whole.length-3;formatted.unshift(whole.substring(index));whole=whole.substring(0,index)}}return negative+formatted.join(",")+suffix}exports.commify=commify;function formatUnits(value,unitName){if(typeof unitName==="string"){var index=names.indexOf(unitName);if(index!==-1){unitName=3*index}}return(0,lib$2.formatFixed)(value,unitName!=null?unitName:18)}exports.formatUnits=formatUnits;function parseUnits(value,unitName){if(typeof value!=="string"){logger.throwArgumentError("value must be a string","value",value)}if(typeof unitName==="string"){var index=names.indexOf(unitName);if(index!==-1){unitName=3*index}}return(0,lib$2.parseFixed)(value,unitName!=null?unitName:18)}exports.parseUnits=parseUnits;function formatEther(wei){return formatUnits(wei,18)}exports.formatEther=formatEther;function parseEther(ether){return parseUnits(ether,18)}exports.parseEther=parseEther});var index$t=getDefaultExportFromCjs(lib$t);var utils$3=createCommonjsModule(function(module,exports){"use strict";var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};Object.defineProperty(exports,"__esModule",{value:true});exports.formatBytes32String=exports.Utf8ErrorFuncs=exports.toUtf8String=exports.toUtf8CodePoints=exports.toUtf8Bytes=exports._toEscapedUtf8String=exports.nameprep=exports.hexDataSlice=exports.hexDataLength=exports.hexZeroPad=exports.hexValue=exports.hexStripZeros=exports.hexConcat=exports.isHexString=exports.hexlify=exports.base64=exports.base58=exports.TransactionDescription=exports.LogDescription=exports.Interface=exports.SigningKey=exports.HDNode=exports.defaultPath=exports.isBytesLike=exports.isBytes=exports.zeroPad=exports.stripZeros=exports.concat=exports.arrayify=exports.shallowCopy=exports.resolveProperties=exports.getStatic=exports.defineReadOnly=exports.deepCopy=exports.checkProperties=exports.poll=exports.fetchJson=exports._fetchData=exports.RLP=exports.Logger=exports.checkResultErrors=exports.FormatTypes=exports.ParamType=exports.FunctionFragment=exports.EventFragment=exports.ErrorFragment=exports.ConstructorFragment=exports.Fragment=exports.defaultAbiCoder=exports.AbiCoder=void 0;exports.Indexed=exports.Utf8ErrorReason=exports.UnicodeNormalizationForm=exports.SupportedAlgorithm=exports.mnemonicToSeed=exports.isValidMnemonic=exports.entropyToMnemonic=exports.mnemonicToEntropy=exports.getAccountPath=exports.verifyTypedData=exports.verifyMessage=exports.recoverPublicKey=exports.computePublicKey=exports.recoverAddress=exports.computeAddress=exports.getJsonWalletAddress=exports.TransactionTypes=exports.serializeTransaction=exports.parseTransaction=exports.accessListify=exports.joinSignature=exports.splitSignature=exports.soliditySha256=exports.solidityKeccak256=exports.solidityPack=exports.shuffled=exports.randomBytes=exports.sha512=exports.sha256=exports.ripemd160=exports.keccak256=exports.computeHmac=exports.commify=exports.parseUnits=exports.formatUnits=exports.parseEther=exports.formatEther=exports.isAddress=exports.getCreate2Address=exports.getContractAddress=exports.getIcapAddress=exports.getAddress=exports._TypedDataEncoder=exports.id=exports.isValidName=exports.namehash=exports.hashMessage=exports.parseBytes32String=void 0;Object.defineProperty(exports,"AbiCoder",{enumerable:true,get:function(){return lib$a.AbiCoder}});Object.defineProperty(exports,"checkResultErrors",{enumerable:true,get:function(){return lib$a.checkResultErrors}});Object.defineProperty(exports,"ConstructorFragment",{enumerable:true,get:function(){return lib$a.ConstructorFragment}});Object.defineProperty(exports,"defaultAbiCoder",{enumerable:true,get:function(){return lib$a.defaultAbiCoder}});Object.defineProperty(exports,"ErrorFragment",{enumerable:true,get:function(){return lib$a.ErrorFragment}});Object.defineProperty(exports,"EventFragment",{enumerable:true,get:function(){return lib$a.EventFragment}});Object.defineProperty(exports,"FormatTypes",{enumerable:true,get:function(){return lib$a.FormatTypes}});Object.defineProperty(exports,"Fragment",{enumerable:true,get:function(){return lib$a.Fragment}});Object.defineProperty(exports,"FunctionFragment",{enumerable:true,get:function(){return lib$a.FunctionFragment}});Object.defineProperty(exports,"Indexed",{enumerable:true,get:function(){return lib$a.Indexed}});Object.defineProperty(exports,"Interface",{enumerable:true,get:function(){return lib$a.Interface}});Object.defineProperty(exports,"LogDescription",{enumerable:true,get:function(){return lib$a.LogDescription}});Object.defineProperty(exports,"ParamType",{enumerable:true,get:function(){return lib$a.ParamType}});Object.defineProperty(exports,"TransactionDescription",{enumerable:true,get:function(){return lib$a.TransactionDescription}});Object.defineProperty(exports,"getAddress",{enumerable:true,get:function(){return lib$6.getAddress}});Object.defineProperty(exports,"getCreate2Address",{enumerable:true,get:function(){return lib$6.getCreate2Address}});Object.defineProperty(exports,"getContractAddress",{enumerable:true,get:function(){return lib$6.getContractAddress}});Object.defineProperty(exports,"getIcapAddress",{enumerable:true,get:function(){return lib$6.getIcapAddress}});Object.defineProperty(exports,"isAddress",{enumerable:true,get:function(){return lib$6.isAddress}});var base64=__importStar(lib$p);exports.base64=base64;Object.defineProperty(exports,"base58",{enumerable:true,get:function(){return lib$g.Base58}});Object.defineProperty(exports,"arrayify",{enumerable:true,get:function(){return lib$1.arrayify}});Object.defineProperty(exports,"concat",{enumerable:true,get:function(){return lib$1.concat}});Object.defineProperty(exports,"hexConcat",{enumerable:true,get:function(){return lib$1.hexConcat}});Object.defineProperty(exports,"hexDataSlice",{enumerable:true,get:function(){return lib$1.hexDataSlice}});Object.defineProperty(exports,"hexDataLength",{enumerable:true,get:function(){return lib$1.hexDataLength}});Object.defineProperty(exports,"hexlify",{enumerable:true,get:function(){return lib$1.hexlify}});Object.defineProperty(exports,"hexStripZeros",{enumerable:true,get:function(){return lib$1.hexStripZeros}});Object.defineProperty(exports,"hexValue",{enumerable:true,get:function(){return lib$1.hexValue}});Object.defineProperty(exports,"hexZeroPad",{enumerable:true,get:function(){return lib$1.hexZeroPad}});Object.defineProperty(exports,"isBytes",{enumerable:true,get:function(){return lib$1.isBytes}});Object.defineProperty(exports,"isBytesLike",{enumerable:true,get:function(){return lib$1.isBytesLike}});Object.defineProperty(exports,"isHexString",{enumerable:true,get:function(){return lib$1.isHexString}});Object.defineProperty(exports,"joinSignature",{enumerable:true,get:function(){return lib$1.joinSignature}});Object.defineProperty(exports,"zeroPad",{enumerable:true,get:function(){return lib$1.zeroPad}});Object.defineProperty(exports,"splitSignature",{enumerable:true,get:function(){return lib$1.splitSignature}});Object.defineProperty(exports,"stripZeros",{enumerable:true,get:function(){return lib$1.stripZeros}});Object.defineProperty(exports,"_TypedDataEncoder",{enumerable:true,get:function(){return lib$9._TypedDataEncoder}});Object.defineProperty(exports,"hashMessage",{enumerable:true,get:function(){return lib$9.hashMessage}});Object.defineProperty(exports,"id",{enumerable:true,get:function(){return lib$9.id}});Object.defineProperty(exports,"isValidName",{enumerable:true,get:function(){return lib$9.isValidName}});Object.defineProperty(exports,"namehash",{enumerable:true,get:function(){return lib$9.namehash}});Object.defineProperty(exports,"defaultPath",{enumerable:true,get:function(){return lib$k.defaultPath}});Object.defineProperty(exports,"entropyToMnemonic",{enumerable:true,get:function(){return lib$k.entropyToMnemonic}});Object.defineProperty(exports,"getAccountPath",{enumerable:true,get:function(){return lib$k.getAccountPath}});Object.defineProperty(exports,"HDNode",{enumerable:true,get:function(){return lib$k.HDNode}});Object.defineProperty(exports,"isValidMnemonic",{enumerable:true,get:function(){return lib$k.isValidMnemonic}});Object.defineProperty(exports,"mnemonicToEntropy",{enumerable:true,get:function(){return lib$k.mnemonicToEntropy}});Object.defineProperty(exports,"mnemonicToSeed",{enumerable:true,get:function(){return lib$k.mnemonicToSeed}});Object.defineProperty(exports,"getJsonWalletAddress",{enumerable:true,get:function(){return lib$m.getJsonWalletAddress}});Object.defineProperty(exports,"keccak256",{enumerable:true,get:function(){return lib$4.keccak256}});Object.defineProperty(exports,"Logger",{enumerable:true,get:function(){return lib.Logger}});Object.defineProperty(exports,"computeHmac",{enumerable:true,get:function(){return lib$h.computeHmac}});Object.defineProperty(exports,"ripemd160",{enumerable:true,get:function(){return lib$h.ripemd160}});Object.defineProperty(exports,"sha256",{enumerable:true,get:function(){return lib$h.sha256}});Object.defineProperty(exports,"sha512",{enumerable:true,get:function(){return lib$h.sha512}});Object.defineProperty(exports,"solidityKeccak256",{enumerable:true,get:function(){return lib$s.keccak256}});Object.defineProperty(exports,"solidityPack",{enumerable:true,get:function(){return lib$s.pack}});Object.defineProperty(exports,"soliditySha256",{enumerable:true,get:function(){return lib$s.sha256}});Object.defineProperty(exports,"randomBytes",{enumerable:true,get:function(){return lib$l.randomBytes}});Object.defineProperty(exports,"shuffled",{enumerable:true,get:function(){return lib$l.shuffled}});Object.defineProperty(exports,"checkProperties",{enumerable:true,get:function(){return lib$3.checkProperties}});Object.defineProperty(exports,"deepCopy",{enumerable:true,get:function(){return lib$3.deepCopy}});Object.defineProperty(exports,"defineReadOnly",{enumerable:true,get:function(){return lib$3.defineReadOnly}});Object.defineProperty(exports,"getStatic",{enumerable:true,get:function(){return lib$3.getStatic}});Object.defineProperty(exports,"resolveProperties",{enumerable:true,get:function(){return lib$3.resolveProperties}});Object.defineProperty(exports,"shallowCopy",{enumerable:true,get:function(){return lib$3.shallowCopy}});var RLP=__importStar(lib$5);exports.RLP=RLP;Object.defineProperty(exports,"computePublicKey",{enumerable:true,get:function(){return lib$d.computePublicKey}});Object.defineProperty(exports,"recoverPublicKey",{enumerable:true,get:function(){return lib$d.recoverPublicKey}});Object.defineProperty(exports,"SigningKey",{enumerable:true,get:function(){return lib$d.SigningKey}});Object.defineProperty(exports,"formatBytes32String",{enumerable:true,get:function(){return lib$8.formatBytes32String}});Object.defineProperty(exports,"nameprep",{enumerable:true,get:function(){return lib$8.nameprep}});Object.defineProperty(exports,"parseBytes32String",{enumerable:true,get:function(){return lib$8.parseBytes32String}});Object.defineProperty(exports,"_toEscapedUtf8String",{enumerable:true,get:function(){return lib$8._toEscapedUtf8String}});Object.defineProperty(exports,"toUtf8Bytes",{enumerable:true,get:function(){return lib$8.toUtf8Bytes}});Object.defineProperty(exports,"toUtf8CodePoints",{enumerable:true,get:function(){return lib$8.toUtf8CodePoints}});Object.defineProperty(exports,"toUtf8String",{enumerable:true,get:function(){return lib$8.toUtf8String}});Object.defineProperty(exports,"Utf8ErrorFuncs",{enumerable:true,get:function(){return lib$8.Utf8ErrorFuncs}});Object.defineProperty(exports,"accessListify",{enumerable:true,get:function(){return lib$e.accessListify}});Object.defineProperty(exports,"computeAddress",{enumerable:true,get:function(){return lib$e.computeAddress}});Object.defineProperty(exports,"parseTransaction",{enumerable:true,get:function(){return lib$e.parse}});Object.defineProperty(exports,"recoverAddress",{enumerable:true,get:function(){return lib$e.recoverAddress}});Object.defineProperty(exports,"serializeTransaction",{enumerable:true,get:function(){return lib$e.serialize}});Object.defineProperty(exports,"TransactionTypes",{enumerable:true,get:function(){return lib$e.TransactionTypes}});Object.defineProperty(exports,"commify",{enumerable:true,get:function(){return lib$t.commify}});Object.defineProperty(exports,"formatEther",{enumerable:true,get:function(){return lib$t.formatEther}});Object.defineProperty(exports,"parseEther",{enumerable:true,get:function(){return lib$t.parseEther}});Object.defineProperty(exports,"formatUnits",{enumerable:true,get:function(){return lib$t.formatUnits}});Object.defineProperty(exports,"parseUnits",{enumerable:true,get:function(){return lib$t.parseUnits}});Object.defineProperty(exports,"verifyMessage",{enumerable:true,get:function(){return lib$n.verifyMessage}});Object.defineProperty(exports,"verifyTypedData",{enumerable:true,get:function(){return lib$n.verifyTypedData}});Object.defineProperty(exports,"_fetchData",{enumerable:true,get:function(){return lib$q._fetchData}});Object.defineProperty(exports,"fetchJson",{enumerable:true,get:function(){return lib$q.fetchJson}});Object.defineProperty(exports,"poll",{enumerable:true,get:function(){return lib$q.poll}});var sha2_2=lib$h;Object.defineProperty(exports,"SupportedAlgorithm",{enumerable:true,get:function(){return sha2_2.SupportedAlgorithm}});var strings_2=lib$8;Object.defineProperty(exports,"UnicodeNormalizationForm",{enumerable:true,get:function(){return strings_2.UnicodeNormalizationForm}});Object.defineProperty(exports,"Utf8ErrorReason",{enumerable:true,get:function(){return strings_2.Utf8ErrorReason}})});var utils$4=getDefaultExportFromCjs(utils$3);var _version$O=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;exports.version="ethers/5.5.2"});var _version$P=getDefaultExportFromCjs(_version$O);var ethers=createCommonjsModule(function(module,exports){"use strict";var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};Object.defineProperty(exports,"__esModule",{value:true});exports.Wordlist=exports.version=exports.wordlists=exports.utils=exports.logger=exports.errors=exports.constants=exports.FixedNumber=exports.BigNumber=exports.ContractFactory=exports.Contract=exports.BaseContract=exports.providers=exports.getDefaultProvider=exports.VoidSigner=exports.Wallet=exports.Signer=void 0;Object.defineProperty(exports,"BaseContract",{enumerable:true,get:function(){return lib$f.BaseContract}});Object.defineProperty(exports,"Contract",{enumerable:true,get:function(){return lib$f.Contract}});Object.defineProperty(exports,"ContractFactory",{enumerable:true,get:function(){return lib$f.ContractFactory}});Object.defineProperty(exports,"BigNumber",{enumerable:true,get:function(){return lib$2.BigNumber}});Object.defineProperty(exports,"FixedNumber",{enumerable:true,get:function(){return lib$2.FixedNumber}});Object.defineProperty(exports,"Signer",{enumerable:true,get:function(){return lib$c.Signer}});Object.defineProperty(exports,"VoidSigner",{enumerable:true,get:function(){return lib$c.VoidSigner}});Object.defineProperty(exports,"Wallet",{enumerable:true,get:function(){return lib$n.Wallet}});var constants=__importStar(lib$7);exports.constants=constants;var providers=__importStar(lib$r);exports.providers=providers;var providers_1=lib$r;Object.defineProperty(exports,"getDefaultProvider",{enumerable:true,get:function(){return providers_1.getDefaultProvider}});Object.defineProperty(exports,"Wordlist",{enumerable:true,get:function(){return lib$j.Wordlist}});Object.defineProperty(exports,"wordlists",{enumerable:true,get:function(){return lib$j.wordlists}});var utils=__importStar(utils$3);exports.utils=utils;Object.defineProperty(exports,"errors",{enumerable:true,get:function(){return lib.ErrorCode}});Object.defineProperty(exports,"version",{enumerable:true,get:function(){return _version$O.version}});var logger=new lib.Logger(_version$O.version);exports.logger=logger});var ethers$1=getDefaultExportFromCjs(ethers);var lib$u=createCommonjsModule(function(module,exports){"use strict";var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};Object.defineProperty(exports,"__esModule",{value:true});exports.Wordlist=exports.version=exports.wordlists=exports.utils=exports.logger=exports.errors=exports.constants=exports.FixedNumber=exports.BigNumber=exports.ContractFactory=exports.Contract=exports.BaseContract=exports.providers=exports.getDefaultProvider=exports.VoidSigner=exports.Wallet=exports.Signer=exports.ethers=void 0;var ethers$1=__importStar(ethers);exports.ethers=ethers$1;try{var anyGlobal=window;if(anyGlobal._ethers==null){anyGlobal._ethers=ethers$1}}catch(error){}var ethers_1=ethers;Object.defineProperty(exports,"Signer",{enumerable:true,get:function(){return ethers_1.Signer}});Object.defineProperty(exports,"Wallet",{enumerable:true,get:function(){return ethers_1.Wallet}});Object.defineProperty(exports,"VoidSigner",{enumerable:true,get:function(){return ethers_1.VoidSigner}});Object.defineProperty(exports,"getDefaultProvider",{enumerable:true,get:function(){return ethers_1.getDefaultProvider}});Object.defineProperty(exports,"providers",{enumerable:true,get:function(){return ethers_1.providers}});Object.defineProperty(exports,"BaseContract",{enumerable:true,get:function(){return ethers_1.BaseContract}});Object.defineProperty(exports,"Contract",{enumerable:true,get:function(){return ethers_1.Contract}});Object.defineProperty(exports,"ContractFactory",{enumerable:true,get:function(){return ethers_1.ContractFactory}});Object.defineProperty(exports,"BigNumber",{enumerable:true,get:function(){return ethers_1.BigNumber}});Object.defineProperty(exports,"FixedNumber",{enumerable:true,get:function(){return ethers_1.FixedNumber}});Object.defineProperty(exports,"constants",{enumerable:true,get:function(){return ethers_1.constants}});Object.defineProperty(exports,"errors",{enumerable:true,get:function(){return ethers_1.errors}});Object.defineProperty(exports,"logger",{enumerable:true,get:function(){return ethers_1.logger}});Object.defineProperty(exports,"utils",{enumerable:true,get:function(){return ethers_1.utils}});Object.defineProperty(exports,"wordlists",{enumerable:true,get:function(){return ethers_1.wordlists}});Object.defineProperty(exports,"version",{enumerable:true,get:function(){return ethers_1.version}});Object.defineProperty(exports,"Wordlist",{enumerable:true,get:function(){return ethers_1.Wordlist}})});var index$u=getDefaultExportFromCjs(lib$u);return index$u}); \ No newline at end of file diff --git a/node_modules/ethers/dist/ethers.umd.min.js.map b/node_modules/ethers/dist/ethers.umd.min.js.map new file mode 100644 index 0000000..bf9e5bc --- /dev/null +++ b/node_modules/ethers/dist/ethers.umd.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../node_modules/bn.js/lib/bn.js","../../logger/src.ts/_version.ts","../../logger/src.ts/index.ts","../../bytes/src.ts/_version.ts","../../bytes/src.ts/index.ts","../../bignumber/src.ts/_version.ts","../../bignumber/src.ts/bignumber.ts","../../bignumber/src.ts/fixednumber.ts","../../bignumber/src.ts/index.ts","../../properties/src.ts/_version.ts","../../properties/src.ts/index.ts","../../abi/src.ts/_version.ts","../../abi/src.ts/fragments.ts","../../abi/src.ts/coders/abstract-coder.ts","../../../node_modules/js-sha3/src/sha3.js","../../keccak256/src.ts/index.ts","../../rlp/src.ts/_version.ts","../../rlp/src.ts/index.ts","../../address/src.ts/_version.ts","../../address/src.ts/index.ts","../../abi/src.ts/coders/address.ts","../../abi/src.ts/coders/anonymous.ts","../../abi/src.ts/coders/array.ts","../../abi/src.ts/coders/boolean.ts","../../abi/src.ts/coders/bytes.ts","../../abi/src.ts/coders/fixed-bytes.ts","../../abi/src.ts/coders/null.ts","../../constants/src.ts/addresses.ts","../../constants/src.ts/bignumbers.ts","../../constants/src.ts/hashes.ts","../../constants/src.ts/strings.ts","../../constants/src.ts/index.ts","../../abi/src.ts/coders/number.ts","../../strings/src.ts/_version.ts","../../strings/src.ts/utf8.ts","../../strings/src.ts/bytes32.ts","../../strings/src.ts/idna.ts","../../strings/src.ts/index.ts","../../abi/src.ts/coders/string.ts","../../abi/src.ts/coders/tuple.ts","../../abi/src.ts/abi-coder.ts","../../hash/src.ts/id.ts","../../hash/src.ts/_version.ts","../../hash/src.ts/namehash.ts","../../hash/src.ts/message.ts","../../hash/src.ts/typed-data.ts","../../hash/src.ts/index.ts","../../abi/src.ts/interface.ts","../../abi/src.ts/index.ts","../../abstract-provider/src.ts/_version.ts","../../abstract-provider/src.ts/index.ts","../../abstract-signer/src.ts/_version.ts","../../abstract-signer/src.ts/index.ts","../../../node_modules/minimalistic-assert/index.js","../../../node_modules/minimalistic-crypto-utils/lib/utils.js","../../../node_modules/elliptic/lib/elliptic/utils.js","../../../node_modules/elliptic/lib/elliptic/curve/base.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/elliptic/lib/elliptic/curve/short.js","../../../node_modules/elliptic/lib/elliptic/curve/index.js","../../../node_modules/hash.js/lib/hash/utils.js","../../../node_modules/hash.js/lib/hash/common.js","../../../node_modules/hash.js/lib/hash/sha/common.js","../../../node_modules/hash.js/lib/hash/sha/1.js","../../../node_modules/hash.js/lib/hash/sha/256.js","../../../node_modules/hash.js/lib/hash/sha/224.js","../../../node_modules/hash.js/lib/hash/sha/512.js","../../../node_modules/hash.js/lib/hash/sha/384.js","../../../node_modules/hash.js/lib/hash/sha.js","../../../node_modules/hash.js/lib/hash/ripemd.js","../../../node_modules/hash.js/lib/hash/hmac.js","../../../node_modules/hash.js/lib/hash.js","../../../node_modules/elliptic/lib/elliptic/curves.js","../../../node_modules/hmac-drbg/lib/hmac-drbg.js","../../../node_modules/elliptic/lib/elliptic/ec/key.js","../../../node_modules/elliptic/lib/elliptic/ec/signature.js","../../../node_modules/elliptic/lib/elliptic/ec/index.js","../../../node_modules/elliptic/lib/elliptic.js","../../signing-key/src.ts/elliptic.ts","../../signing-key/src.ts/_version.ts","../../signing-key/src.ts/index.ts","../../transactions/src.ts/_version.ts","../../transactions/src.ts/index.ts","../../contracts/src.ts/_version.ts","../../contracts/src.ts/index.ts","../../basex/src.ts/index.ts","../../sha2/src.ts/types.ts","../../sha2/src.ts/_version.ts","../../sha2/src.ts/browser-sha2.ts","../../sha2/src.ts/index.ts","../../pbkdf2/src.ts/browser-pbkdf2.ts","../../pbkdf2/src.ts/index.ts","../../wordlists/src.ts/_version.ts","../../wordlists/src.ts/wordlist.ts","../../wordlists/src.ts/lang-en.ts","../../wordlists/src.ts/browser-wordlists.ts","../../wordlists/src.ts/index.ts","../../hdnode/src.ts/_version.ts","../../hdnode/src.ts/index.ts","../../random/src.ts/_version.ts","../../random/src.ts/browser-random.ts","../../random/src.ts/shuffle.ts","../../random/src.ts/index.ts","../../../node_modules/aes-js/index.js","../../json-wallets/src.ts/_version.ts","../../json-wallets/src.ts/utils.ts","../../json-wallets/src.ts/crowdsale.ts","../../json-wallets/src.ts/inspect.ts","../../../node_modules/scrypt-js/scrypt.js","../../json-wallets/src.ts/keystore.ts","../../json-wallets/src.ts/index.ts","../../wallet/src.ts/_version.ts","../../wallet/src.ts/index.ts","../../networks/src.ts/_version.ts","../../networks/src.ts/index.ts","../../base64/src.ts/browser-base64.ts","../../base64/src.ts/index.ts","../../web/src.ts/_version.ts","../../web/src.ts/browser-geturl.ts","../../web/src.ts/index.ts","../../../node_modules/bech32/index.js","../../providers/src.ts/_version.ts","../../providers/src.ts/formatter.ts","../../providers/src.ts/base-provider.ts","../../providers/src.ts/json-rpc-provider.ts","../../providers/src.ts/browser-ws.ts","../../providers/src.ts/websocket-provider.ts","../../providers/src.ts/url-json-rpc-provider.ts","../../providers/src.ts/alchemy-provider.ts","../../providers/src.ts/cloudflare-provider.ts","../../providers/src.ts/etherscan-provider.ts","../../providers/src.ts/fallback-provider.ts","../../providers/src.ts/browser-ipc-provider.ts","../../providers/src.ts/infura-provider.ts","../../providers/src.ts/json-rpc-batch-provider.ts","../../providers/src.ts/nodesmith-provider.ts","../../providers/src.ts/pocket-provider.ts","../../providers/src.ts/web3-provider.ts","../../providers/src.ts/index.ts","../../solidity/src.ts/_version.ts","../../solidity/src.ts/index.ts","../../units/src.ts/_version.ts","../../units/src.ts/index.ts","../src.ts/utils.ts","../src.ts/_version.ts","../src.ts/ethers.ts","../src.ts/index.ts"],"names":["module","exports","assert","val","msg","Error","inherits","ctor","superCtor","super_","TempCtor","prototype","constructor","BN","number","base","endian","isBN","this","negative","words","length","red","_init","wordSize","Buffer","window","e","num","Array","isArray","max","left","right","cmp","min","init","_initNumber","_initArray","toString","replace","start","_parseHex","_parseBase","toArray","Math","ceil","i","j","w","off","strip","parseHex4Bits","string","index","c","charCodeAt","parseHexByte","lowerBound","r","parseLength","parseBase","str","end","mul","len","limbLen","limbPow","total","mod","word","imuln","_iaddn","pow","copy","dest","clone","_expand","size","_normSign","inspect","zeros","groupSizes","groupBases","padding","out","carry","groupSize","groupBase","isZero","modn","idivn","toNumber","ret","toJSON","toBuffer","toArrayLike","ArrayType","byteLength","reqLength","littleEndian","res","b","q","andln","iushrn","clz32","_countBits","t","_zeroBits","bitLength","hi","toBitArray","bit","wbit","zeroBits","toTwos","width","abs","inotn","iaddn","fromTwos","testn","notn","ineg","isNeg","neg","iuor","ior","or","uor","iuand","iand","and","uand","iuxor","a","ixor","xor","uxor","bytesNeeded","bitsLeft","setn","iadd","isub","add","sub","smallMulTo","self","lo","k","ncarry","rword","maxJ","comb10MulTo","o","mid","a0","al0","ah0","a1","al1","ah1","a2","al2","ah2","a3","al3","ah3","a4","al4","ah4","a5","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","b1","bl1","bh1","b2","bl2","bh2","b3","bl3","bh3","b4","bl4","bh4","b5","bl5","bh5","b6","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","b9","bl9","bh9","imul","w0","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","fftm","FFTM","mulp","mulTo","x","y","makeRBT","N","l","revBin","rb","permute","rbt","rws","iws","rtws","itws","transform","s","rtwdf","cos","PI","itwdf","sin","p","rtwdf_","itwdf_","re","ie","ro","io","rx","guessLen13b","n","m","odd","conjugate","normalize13b","ws","round","convert13b","stub","ph","_","rwst","iwst","nrws","nrwst","niwst","rmws","mulf","muln","sqr","isqr","iushln","bits","carryMask","newCarry","ishln","hint","extended","h","mask","maskedWords","ishrn","shln","ushln","shrn","ushrn","imaskn","maskn","isubn","addn","subn","iabs","_ishlnsubmul","shift","_wordDiv","mode","bhi","bhiBits","diff","qj","div","divmod","positive","divn","umod","divRound","dm","half","r2","acc","egcd","A","B","C","D","g","isEven","yp","xp","im","isOdd","jm","gcd","_invmp","x1","x2","delta","cmpn","invm","bincn","ucmp","gtn","gt","gten","gte","ltn","lt","lten","lte","eqn","eq","Red","toRed","ctx","convertTo","_forceRed","fromRed","convertFrom","forceRed","redAdd","redIAdd","redSub","redISub","redShl","shl","redMul","_verify2","redIMul","redSqr","_verify1","redISqr","redSqrt","sqrt","redInvm","redNeg","redPow","primes","k256","p224","p192","p25519","MPrime","name","tmp","_tmp","ireduce","rlen","split","imulK","undefined","_strip","input","K256","call","output","outLen","prev","next","P224","P192","P25519","_prime","prime","imod","mod3","one","nOne","lpow","z","inv","windowSize","wnd","current","currentLen","mont","Mont","rinv","minv","u","version","_permanentCensorErrors","_censorErrors","LogLevels","debug","default","info","warning","error","_logLevel","_globalLogger","_checkNormalize","missing_1","forEach","form","normalize","push","join","String","fromCharCode","message","_normalizeError","LogLevel","ErrorCode","HEX","Logger","Object","defineProperty","enumerable","value","writable","_log","logLevel","args","level","toLowerCase","throwArgumentError","console","log","apply","_i","arguments","levels","DEBUG","INFO","warn","WARNING","makeError","code","params","errors","UNKNOWN_ERROR","messageDetails","keys","key","Uint8Array","hex","JSON","stringify","reason","throwError","INVALID_ARGUMENT","argument","condition","assertArgument","checkNormalize","UNSUPPORTED_OPERATION","operation","checkSafeUint53","NUMERIC_FAULT","fault","checkArgumentCount","count","expectedCount","MISSING_ARGUMENT","UNEXPECTED_ARGUMENT","checkNew","target","kind","MISSING_NEW","checkAbstract","globalLogger","_version_1","setCensorship","censorship","permanent","setLogLevel","from","logger","logger_1","isHexable","addSlice","array","slice","isBytesLike","isHexString","isBytes","isInteger","v","arrayify","options","result","unshift","parseInt","allowMissingPrefix","substring","toHexString","hexPad","concat","items","objects","map","item","reduce","accum","offset","object","set","stripZeros","zeroPad","match","HexCharacters","hexlify","floor","hexDataLength","data","hexDataSlice","endOffset","hexConcat","hexValue","trimmed","hexStripZeros","hexZeroPad","splitSignature","signature","_vs","recoveryParam","bytes","vs_1","recId","vs","joinSignature","bn_js_1","__importDefault","bn","_constructorGuard","MAX_SAFE","isBigNumberish","BigNumber","isBigNumber","bytes_1","_warnedToStringRadix","constructorGuard","_newTarget","_hex","_isBigNumber","freeze","toBigNumber","toBN","other","throwFault","isNegative","shr","toBigInt","BigInt","type","toHex","anyValue","_base36To16","_base16To36","Zero","bignumber_1","NegativeOne","getMultiplier","decimals","formatFixed","multiplier","fraction","whole","parseFixed","comps","wholeValue","fractionValue","wei","FixedFormat","signed","_multiplier","check","defaultValue","FixedNumber","format","_value","_isFixedNumber","_checkFormat","addUnsafe","fromValue","subUnsafe","mulUnsafe","divUnsafe","hasFraction","ONE","toFormat","ceiling","factor","bump","BUMP","toUnsafeFloat","parseFloat","fromString","fixedFormat","numeric","decimal","fromBytes","isFixedNumber","get","bignumber","fixednumber","bignumber_2","defineReadOnly","getStatic","getPrototypeOf","resolveProperties","promises","Promise","resolve","then","all","results","_a","sent","checkProperties","properties","shallowCopy","opaque","bigint","boolean","function","_isFrozen","isFrozen","_deepCopy","deepCopy","Description","ModifiersBytes","calldata","memory","storage","ModifiersNest","checkModifier","indexOf","parseParamType","param","allowIndexed","originalParam","newNode","parent","node","state","allowType","indexed","allowParams","verifyType","components","child","allowName","allowArray","sibling","readArray","populate","properties_1","FormatTypes","sighash","minimal","full","json","paramTypeArray","RegExp","ParamType","arrayLength","arrayChildren","fromObject","baseType","_isParamType","result_1","comp","parse","isParamType","ParamTypify","parseParams","allowIndex","splitNesting","Fragment","_isFragment","isFragment","FunctionFragment","EventFragment","ConstructorFragment","ErrorFragment","trim","_super","__extends","anonymous","inputs","isEventFragment","verifyIdentifier","regexParen","modifier","parseGas","gas","parseModifiers","constant","payable","stateMutability","verifyState","isConstructorFragment","parens","outputs","isFunctionFragment","returns","checkForbidden","fragment","sig","isErrorFragment","regexIdentifier","depth","checkResultErrors","checkErrors","path","childPath","Coder","localName","dynamic","_throwError","Writer","_data","_dataLength","_padding","_writeData","appendWriter","writer","writeBytes","paddingOffset","_getValue","BUFFER_OVERRUN","writeValue","writeUpdatableValue","_this","Reader","coerceFunc","allowLoose","_offset","coerce","_coerceFunc","_peekBytes","loose","alignedLength","subReader","readBytes","readValue","INPUT_ERROR","FINALIZE_ERROR","WINDOW","root","JS_SHA3_NO_WINDOW","WEB_WORKER","NODE_JS","JS_SHA3_NO_NODE_JS","process","versions","global","COMMON_JS","JS_SHA3_NO_COMMON_JS","AMD","define","amd","ARRAY_BUFFER","JS_SHA3_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","SHAKE_PADDING","CSHAKE_PADDING","KECCAK_PADDING","PADDING","SHIFT","RC","BITS","SHAKE_BITS","OUTPUT_TYPES","CSHAKE_BYTEPAD","128","256","obj","JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","outputType","Keccak","update","createShakeOutputMethod","outputBits","createCshakeOutputMethod","methods","createKmacOutputMethod","createOutputMethods","method","createMethod","create","createShakeMethod","createCshakeMethod","bytepad","createKmacMethod","Kmac","algorithms","methodNames","algorithm","methodName","newMethodName","blocks","reset","finalized","block","blockCount","byteCount","outputBlocks","extraBytes","notString","lastByteIndex","f","encode","encodeString","strs","paddingBytes","finalize","arrayBuffer","Uint32Array","digest","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","b10","b11","b12","b13","b14","b15","b16","b17","b18","b19","b20","b21","b22","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b40","b41","b42","b43","b44","b45","b46","b47","b48","b49","js_sha3_1","sha3","keccak256","keccak_256","arrayifyInteger","unarrayifyInteger","_encode","payload_1","length_1","_decodeChildren","childOffset","decoded","_decode","consumed","lengthLength","length_2","length_3","length_4","length_5","decode","getChecksumAddress","address","chars","expanded","hashed","keccak256_1","toUpperCase","MAX_SAFE_INTEGER","log10","LN10","ibanLookup","safeDigits","ibanChecksum","checksum","getAddress","isAddress","getIcapAddress","base36","getContractAddress","transaction","nonce","rlp_1","getCreate2Address","salt","initCodeHash","AddressCoder","address_1","reader","abstract_coder_1","AnonymousCoder","coder","pack","coders","values","arrayValues","unique_1","staticWriter","dynamicWriter","updateFuncs","dynamicOffset_1","updateFunc_1","baseOffset","func","unpack","baseReader","offsetReader","uniqueNames","ArrayCoder","defaultChild","anonymous_1","BooleanCoder","DynamicBytesCoder","BytesCoder","FixedBytesCoder","NullCoder","AddressZero","One","Two","WeiPerEther","MaxUint256","MinInt256","MaxInt256","HashZero","EtherSymbol","addresses","bignumbers","hashes","strings","NumberCoder","maxUintValue","constants_1","bounds","UnicodeNormalizationForm","Utf8ErrorReason","errorFunc","badCodepoint","ignoreFunc","BAD_PREFIX","UNEXPECTED_CONTINUE","OVERRUN","replaceFunc","OVERLONG","Utf8ErrorFuncs","ignore","getUtf8CodePoints","onError","extraLength","overlongMask","nextChar","MISSING_CONTINUE","OUT_OF_RANGE","UTF16_SURROGATE","toUtf8Bytes","pair","escapeChar","_toEscapedUtf8String","codePoint","_toUtf8String","codePoints","toUtf8String","toUtf8CodePoints","formatBytes32String","text","utf8_1","parseBytes32String","bytes2","createTable","createRangeTable","matchMap","ranges","range","d","Table_A_1_ranges","Table_B_1_flags","Table_B_2_ranges","Table_B_2_lut_abs","Table_B_2_lut_rel","Table_B_2_complex","Table_C_ranges","flatten","_nameprepTableA1","codepoint","_nameprepTableB2","codes","complex","_nameprepTableC","nameprep","codesTableB2","NFKC","bytes32_1","idna_1","StringCoder","strings_1","TupleCoder","types","array_1","paramTypeBytes","paramTypeNumber","AbiCoder","_getCoder","boolean_1","string_1","bytes_2","tuple_1","component","null_1","number_1","fixed_bytes_1","_getWordSize","_getReader","_getWriter","getDefaultValue","fragments_1","defaultAbiCoder","id","Zeros","fill","Partition","isValidName","namehash","partition","label","messagePrefix","hashMessage","hexPadRight","padOffset","hexTrue","hexFalse","domainFieldTypes","chainId","verifyingContract","domainFieldNames","checkString","domainChecks","getBaseEncoder","boundsUpper_1","boundsLower_1","width_1","id_1","encodeType","fields","TypedDataEncoder","links","parents","subtypes","name_1","field","encoder","primaryTypes","filter","checkCircular","found","subtype","primaryType","name_2","st","sort","_types","getEncoder","_encoderCache","_getEncoder","subtype_1","subEncoder_1","encodedType_1","encodeData","hashStruct","hash","_visit","callback","subtype_2","visit","getPrimaryType","hashDomain","domain","domainFields","name_3","EIP712Domain","resolveNames","resolveName","ensCache","_c","_d","name_4","_e","getPayload","domainValues","domainTypes","typesWithDomain","namehash_1","message_1","typed_data_1","LogDescription","TransactionDescription","ErrorDescription","Indexed","isIndexed","_isIndexed","BuiltinErrors","0x08c379a0","0x4e487b71","wrapAccessError","property","wrap","Interface","fragments","abi","bucket","deploy","functions","events","getAbiCoder","abi_coder_1","getSighash","hash_1","getEventTopic","eventFragment","getFunction","nameOrSignatureOrSighash","matching","getEvent","nameOrSignatureOrTopic","topichash","getError","name_5","name_6","_decodeParams","_abiCoder","_encodeParams","encodeDeploy","decodeErrorResult","encodeErrorResult","decodeFunctionData","functionFragment","encodeFunctionData","decodeFunctionResult","errorArgs","errorName","errorSignature","selector","builtin","CALL_EXCEPTION","encodeFunctionResult","encodeFilterTopics","topics","encodeTopic","pop","encodeEventLog","dataTypes","dataValues","decodeEventLog","topicHash","expected","nonIndexed","resultIndexed","resultNonIndexed","nonIndexedIndex","indexedIndex","value_1","parseTransaction","tx","parseLog","topic","parseError","hexData","errorFragment","isInterface","_isInterface","interface_1","ForkEvent","isForkEvent","_isForkEvent","BlockForkEvent","blockHash","expiry","_isBlockForkEvent","TransactionForkEvent","_isTransactionForkEvent","TransactionOrderForkEvent","beforeHash","afterHash","_isTransactionOrderForkEvent","Provider","getFeeData","getBlock","gasPrice","getGasPrice","catch","_b","maxFeePerGas","maxPriorityFeePerGas","baseFeePerGas","addListener","eventName","listener","on","removeListener","isProvider","_isProvider","allowedTransactionKeys","forwardErrors","INSUFFICIENT_FUNDS","NONCE_EXPIRED","REPLACEMENT_UNDERPRICED","Signer","getBalance","blockTag","_checkProvider","provider","getTransactionCount","estimateGas","checkTransaction","sendTransaction","populateTransaction","signTransaction","signedTx","getChainId","getNetwork","network","to","__awaiter","hasEip1559","feeData","gasLimit","UNPREDICTABLE_GAS_LIMIT","isSigner","_isSigner","VoidSigner","_fail","signMessage","_signTypedData","connect","minimalisticAssert","equal","assertEqual","utils","enc","zero2","arr","minAssert","minUtils","getNAF","naf","getJSF","k1","k2","jsf","d1","d2","m8","m14","m24","u1","u2","cachedProperty","computer","parseBytes","intFromLE","BaseCurve","conf","zero","two","pointFromJSON","gRed","_wnafT1","_wnafT2","_wnafT3","_wnafT4","_bitLength","adjustCount","redN","_maxwellTrick","point","validate","_fixedNafMul","precomputed","doubles","_getDoubles","I","step","repr","nafW","jpoint","mixedAdd","points","toP","_wnafMul","nafPoints","_getNAFPoints","dblp","_wnafMulAdd","defW","coeffs","jacobianResult","wndWidth","comb","toJ","ja","jb","BasePoint","curve","decodePoint","pointFromX","encodeCompressed","compact","getX","getY","precompute","power","beta","_getBeta","_hasDoubles","dbl","configurable","ShortCurve","Base","tinv","zeroA","threeA","endo","_getEndomorphism","_endoWnafT1","_endoWnafT2","short_1","lambda","betas","_getEndoRoots","lambdas","basis","vec","_getEndoBasis","ntinv","l1","l2","aprxSqrt","y1","y2","prevR","len1","len2","_endoSplit","v1","v2","p1","p2","q1","q2","inf","ax","rhs","_endoWnafMulAdd","npoints","ncoeffs","Point","isRed","fromJSON","pre","endoMul","obj2point","isInfinity","nx","ny","ys1","dyinv","mulAdd","jmulAdd","_precompute","negate","JPoint","zOne","zinv","zinv2","ay","pz2","z2","s1","s2","h2","h3","nz","jx","jy","jz","jz4","jyd","jx2","jyd2","jyd4","t1","t2","dny","_zeroDbl","_threeDbl","_dbl","xx","yy","yyyy","yyyy8","gamma","alpha","beta4","beta8","ggamma8","jy2","jxd4","jyd8","trpl","zz","mm","ee","yyu4","kbase","z3","pz3","eqXToP","zs","xc","require$$0","short","require$$1","edwards","inherits_1","isSurrogatePair","toArray_1","toHex_1","htonl","htonl_1","toHex32","zero8","toHex32_1","zero2_1","zero8_1","join32","join32_1","split32","split32_1","rotr32","rotr32_1","rotl32","rotl32_1","sum32","sum32_1","sum32_3","sum32_3_1","sum32_4","sum32_4_1","sum32_5","sum32_5_1","sum64","buf","pos","ah","al","bh","bl","sum64_1","sum64_hi","sum64_hi_1","sum64_lo","sum64_lo_1","sum64_4_hi","ch","cl","dh","dl","sum64_4_hi_1","sum64_4_lo","sum64_4_lo_1","sum64_5_hi","eh","el","sum64_5_hi_1","sum64_5_lo","sum64_5_lo_1","rotr64_hi","rotr64_hi_1","rotr64_lo","rotr64_lo_1","shr64_hi","shr64_hi_1","shr64_lo","shr64_lo_1","BlockHash","pending","pendingTotal","blockSize","outSize","hmacStrength","padLength","_delta8","_delta32","BlockHash_1","_update","_pad","_digest","pad","ft_1","ch32","p32","maj32","ft_1_1","ch32_1","maj32_1","p32_1","s0_256","s0_256_1","s1_256","s1_256_1","g0_256","g0_256_1","g1_256","g1_256_1","shaCommon","common","sha1_K","SHA1","W","_1","sha256_K","SHA256","_256","T1","T2","SHA224","_224","sha512_K","SHA512","_512","_prepareBlock","c0_hi","g1_512_hi","c0_lo","g1_512_lo","c1_hi","c1_lo","c2_hi","g0_512_hi","c2_lo","g0_512_lo","c3_hi","c3_lo","fh","fl","gh","gl","hh","hl","s1_512_hi","s1_512_lo","ch64_hi","ch64_lo","c4_hi","c4_lo","T1_hi","T1_lo","s0_512_hi","s0_512_lo","maj64_hi","maj64_lo","T2_hi","T2_lo","xh","xl","yh","yl","zh","zl","SHA384","_384","sha1","sha224","sha256","require$$2","sha384","require$$3","sha512","require$$4","RIPEMD160","ripemd160","E","Ah","Bh","Ch","Dh","Eh","T","K","rh","Kh","sh","Hmac","Hash","inner","outer","hmac","sha","ripemd","curves","PresetCurve","defineCurve","crash","HmacDRBG","predResist","minEntropy","_reseed","reseedInterval","V","entropy","entropyEnc","nonceEnc","pers","persEnc","hmacDrbg","seed","_hmac","kmac","reseed","addEnc","generate","temp","KeyPair","ec","priv","pub","_importPrivate","privEnc","_importPublic","pubEnc","fromPublic","fromPrivate","getPublic","getPrivate","derive","sign","verify","Signature","_importDER","Position","place","getLength","initial","octetLen","rmPadding","slen","constructLength","octets","LN2","toDER","backHalf","rand","EC","hasOwnProperty","nh","keyPair","keyFromPrivate","keyFromPublic","genKeyPair","drbg","ns2","_truncateToN","truncOnly","bkey","ns1","iter","kp","kpX","canonical","sinv","recoverPubKey","isYOdd","isSecondKey","rInv","getKeyRecoveryParam","Q","Qprime","elliptic","eddsa","elliptic_1$1","elliptic_1","_curve","getCurve","SigningKey","privateKey","_addPoint","p0","publicKey","signDigest","digestBytes","computeSharedSecret","otherKey","otherKeyPair","computePublicKey","isSigningKey","_isSigningKey","recoverPublicKey","rs","compressed","signingKey","RLP","__importStar","lib$5","TransactionTypes","handleAddress","handleNumber","transactionFields","maxLength","computeAddress","signing_key_1","recoverAddress","formatNumber","accessSetify","addr","storageKeys","storageKey","accessListify","localeCompare","formatAccessList","_serializeEip1559","accessList","_serializeEip2930","_serialize","raw","fieldInfo","serialize","transactionType","_parseEipSignature","recid","_parseEip1559","payload","_parseEip2930","_parse","rawTransaction","customData","resolver","nameOrPromise","resolveAddresses","paramType","reject","contract","overrides","signer","override","resolvedAddress","resolved","interface","transactions_1","intrinsic","roValue","leftovers","buildPopulate","buildEstimate","signerOrProvider","addContractWait","wait","bind","confirmations","receipt","logs","event","parsed","eventSignature","getTransaction","transactionHash","getTransactionReceipt","buildCall","collapseSimple","deployTransaction","_deployed","buildSend","txRequest","buildDefault","getEventTag","RunningEvent","tag","_listeners","once","done","removeAllListeners","listeners","listenerCount","run","argsCopy","setTimeout","prepareEvent","getEmit","ErrorRunningEvent","FragmentRunningEvent","contractInterface","decodeError","abi_1","WildcardRunningEvent","parsed_1","BaseContract","addressOrName","Contract","abstract_signer_1","abstract_provider_1","uniqueFilters_1","filters","uniqueSignatures","callStatic","signatures","getInterface","deployed","_deployedPromise","getCode","contractAddress","fallback","attach","_normalizeRunningEvent","runningEvent","_runningEvents","_getRunningEvent","_checkRunningEvents","emit","_wrappedEmits","_wrapEvent","_addEventListener","wrappedEmit","__spreadArray","queryFilter","fromBlockOrBlockhash","toBlock","fromBlock","getLogs","runningEvent_1","ContractFactory","bytecode","bytecodeHex","getDeployTransaction","unsignedTx","getContract","fromSolidity","compilerOutput","evm","BaseX","alphabet","charAt","_alphabetMap","source","digits","_leader","TypeError","byte","reverse","Base32","Base58","SupportedAlgorithm","hash_js_1","computeHmac","types_1","sha2_1","pbkdf2","password","iterations","keylen","hashAlgorithm","hLen","DK","block1","U","destPos","browserPbkdf2","exportWordlist","Wordlist","locale","mnemonic","wordlist","getWord","getWordIndex","register","lang","anyGlobal","_ethers","wordlists","loadWords","wordlist_1","LangEn","langEn","en","lang_en_1","wordlists_1","MasterSecret","HardenedBit","getUpperMask","getLowerMask","bytes32","base58check","basex_1","getWordlist","defaultPath","HDNode","parentFingerprint","chainCode","mnemonicOrPath","compressedPublicKey","neuter","_derive","IL","IR","ki","Ki","ek","srcMnemonic","phrase","fingerprint","derivePath","_fromSeed","seedArray","fromMnemonic","entropyToMnemonic","mnemonicToEntropy","mnemonicToSeed","fromSeed","fromExtendedKey","extendedKey","NFKD","pbkdf2_1","entropyBits","checksumBits","checksumMask","indices","remainingBits","isValidMnemonic","getAccountPath","crypto","msCrypto","getRandomValues","randomBytes","shuffled","random","browserRandom","shuffle","checkInt","checkInts","arrayish","coerceArray","arg","createArray","copyArray","sourceArray","targetArray","targetStart","sourceStart","sourceEnd","convertUtf8","toBytes","encodeURI","substr","convertHex","Hex","numberOfRounds","16","24","32","rcon","S","Si","T3","T4","T5","T6","T7","T8","U1","U2","U3","U4","convertToInt32","AES","_prepare","rounds","_Ke","_Kd","roundKeyCount","KC","tk","rconpointer","tt","encrypt","plaintext","decrypt","ciphertext","ModeOfOperationECB","description","_aes","ModeOfOperationCBC","iv","_lastCipherblock","ModeOfOperationCFB","segmentSize","_shiftRegister","encrypted","xorSegment","ModeOfOperationOFB","_lastPrecipher","_lastPrecipherIndex","Counter","initialValue","_counter","setValue","setBytes","increment","ModeOfOperationCTR","counter","_remainingCounter","_remainingCounterIndex","pkcs7pad","padder","pkcs7strip","aesjs","ModeOfOperation","ecb","cbc","cfb","ofb","ctr","utf8","pkcs7","_arrayTest","_aesjs","looseArrayify","hexString","zpad","getPassword","searchPath","currentChild","matchingChild","uuidV4","aes_js_1","aesJs","CrowdsaleAccount","isCrowdsaleAccount","_isCrowdsaleAccount","utils_1","ethaddr","encseed","encryptedSeed","aesCbc","seedHex","seedHexBytes","isCrowdsaleWallet","isKeystoreWallet","getJsonWalletAddress","MAX_VALUE","h0","h1","h4","h5","h6","h7","bytesLeft","bitLenHi","bitLenLo","numZeros","PBKDF2_HMAC_SHA256_OneIter","dkLen","innerLen","outerKey","dk","incrementCounter","blockmix_salsa8","BY","Yi","_X","arraycopy","blockxor","salsa20_8","R","src","srcPos","checkBufferish","ensureInteger","_scrypt","XY","totalOps","currentOp","lastPercent10","stop","i0","i1","Bi","limit","nextTick","setImmediate","incrementalSMix","steps","percent10","derivedKey","lib","scrypt","progressCallback","lastProgress","progress","syncScrypt","scrypt_js_1","hasMnemonic","KeystoreAccount","isKeystoreAccount","_isKeystoreAccount","_decrypt","cipher","aesCtr","_getAccount","computedMAC","mnemonicKey","account","mnemonicCiphertext","mnemonicIv","mnemonicCounter","mnemonicAesCtr","hdnode_1","pbkdf2Sync","passwordBytes","prfFunc","_computeKdfKey","pbkdf2Func","scryptFunc","kdf","prf","decryptSync","client","random_1","uuidRandom","uuid","macPrefix","mac","Crypto","cipherparams","kdfparams","dklen","now","Date","timestamp","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","gethFilename","crowdsale_1","inspect_1","keystore_1","decryptJsonWallet","decryptJsonWalletSync","isAccount","Wallet","signingKey_1","srcMnemonic_1","signingKey_2","_mnemonic","_signingKey","populated","json_wallets_1","createRandom","extraEntropy","fromEncryptedJson","fromEncryptedJsonSync","verifyMessage","verifyTypedData","isRenetworkable","ethDefaultProvider","providers","providerList","InfuraProvider","infura","EtherscanProvider","etherscan","AlchemyProvider","alchemy","PocketProvider","skip","CloudflareProvider","FallbackProvider","quorum","renetwork","etcDefaultProvider","url","JsonRpcProvider","homestead","ensAddress","_defaultProvider","ropsten","classicMordor","networks","unspecified","mainnet","morden","testnet","rinkeby","kovan","goerli","classic","classicMorden","classicTestnet","classicKotti","xdai","matic","maticmum","optimism","optimism-kovan","optimism-goerli","arbitrum","arbitrum-rinkeby","bnb","bnbt","standard_1","standard_2","standard","defaultProvider","textData","atob","btoa","browserBase64","getUrl","href","request","headers","body","skipFetchSetup","cache","credentials","redirect","referrer","fetch","response","statusCode","status","statusMessage","statusText","staller","duration","bodyify","_fetchData","connection","processFunc","attemptLimit","throttleLimit","throttleCallback","throttleSlotInterval","allow304","timeout","allowGzip","user","allowInsecureAuthentication","authorization","base64_1","reData","dataMatch","content-type","SERVER_ERROR","requestBody","requestMethod","flatHeaders","header","runningTimeout","timer","promise","TIMEOUT","cancel","clearTimeout","runningFetch","attempt","geturl_1","location_1","location","tryAgain","stall","retryAfter","error_1","serverError","body_1","error_2","throttleRetry","timeout_1","race","fetchJson","processJsonFunc","updated","hasContentType","poll","interval","retryLimit","oncePoll","onceBlock","ALPHABET","ALPHABET_MAP","polymodStep","prefixChk","prefix","chk","LIMIT","__decode","lowered","uppered","lastIndexOf","wordChars","decodeUnsafe","convert","inBits","outBits","maxV","toWordsUnsafe","toWords","fromWordsUnsafe","fromWords","bech32","Formatter","formats","getDefaultFormats","bigNumber","strictData","allowNull","blockNumber","transactionIndex","uint256","creates","transactionRequest","receiptLog","arrayOf","logIndex","gasUsed","logsBloom","cumulativeGasUsed","effectiveGasPrice","parentHash","difficulty","miner","extraData","transactions","blockWithTransactions","transactionResponse","filterLog","removed","allowFalsish","strict","callAddress","_block","author","_difficulty","networkId","byzantium","checkKey","checkValue","nullValue","replaceValue","isCommunityResourcable","isCommunityResource","throttleMessage","showThrottleMessage","bech32_1","checkTopic","serializeTopics","sorted","deserializeTopics","getTime","PollableEvents","Event","pollable","coinInfos","0","symbol","p2pkh","p2sh","2","3","60","ilk","61","700","bytes32ify","base58Encode","matchers","_parseString","_parseBytes","Resolver","formatter","_fetchBytes","parameters","_getAddress","coinType","hexBytes","coinInfo","version_1","hexBytes_1","getAvatar","linkage","getText","avatar","_h","content","_resolvedAddress","owner","tokenId","tokenOwner","_f","balance","_g","metadataUrl","web_1","metadata","image","getContentHash","ipfs","swarm","keyBytes","defaultFormatter","nextPollId","BaseProvider","_events","_emitted","getFormatter","anyNetwork","detectNetwork","_networkPromise","_ready","knownNetwork","_maxInternalBlockNumber","_lastBlockNumber","_pollingInterval","_fastQueryDate","_network","NETWORK_ERROR","formatter_1","networks_1","_getInternalBlockNumber","maxAge","_internalBlockNumber","internalBlockNumber","respTime","reqTime","checkInternalBlockNumber","perform","networkError","_setFastBlockNumber","pollId","runners","pollingInterval","error_6","previousBlockNumber","eventBlockNumber","hash_2","runner","filter_1","resetEventsBlock","polling","currentNetwork","_fastBlockNumber","_fastBlockNumberPromise","detectedNetwork","_poller","setInterval","_bootstrapPoll","clearInterval","_getFastBlockNumber","getBlockNumber","waitForTransaction","_waitForTransaction","replaceable","cancelFuncs","alreadyDone","minedHandler","lastBlockNumber_1","startBlock","scannedBlock_1","replaceHandler_1","mined","getBlockWithTransactions","ti","receipt_1","TRANSACTION_REPLACED","cancelled","replacement","_wrapTransaction","timer_1","unref","_getBlockTag","getStorageAt","position","expectedHash","returnedHash","confirms","signedTransaction","hexTx","error_7","_getTransactionRequest","_getFilter","_getBlock","blockHashOrBlockTag","includeTransactions","blockNumber_1","blockWithTxs","getEtherPrice","getResolver","_getResolver","error_9","error_10","lookupAddress","reverseName","resolverAddress","nameOrAddress","NOT_IMPLEMENTED","_startEvent","_stopEvent","stopped","eventTag","eventTag_1","errorGas","checkError","responseText","getResult","getLowerCase","JsonRpcSigner","addressOrIndex","connectUnchecked","UncheckedJsonRpcSigner","_address","_index","send","accounts","sendUncheckedTransaction","fromAddress","estimate","sender","hexlifyTransaction","_legacySignMessage","unlock","networkOrReady","_nextId","_eventLoopCache","defaultUrl","_cache","_uncachedDetectNetwork","getSigner","getUncheckedSigner","listAccounts","jsonrpc","action","prepareRequest","error_4","_startPending","_pendingFilter","pendingFilter","filterId","seq","allowExtra","allowed","base_provider_1","WS","WebSocket","logger_2","NextId","WebSocketProvider","_wsReady","ws_1","_websocket","onopen","_requests","onmessage","messageEvent","_subs","subscription","fauxPoll","_detectNetwork","rid","_subscribe","subIdPromise","_subIds","subId","emitReceipt_1","destroy","readyState","CONNECTING","onerror","close","json_rpc_provider_1","StaticJsonRpcProvider","UrlJsonRpcProvider","apiKey","getApiKey","defaultApiKey","AlchemyWebSocketProvider","websocket_provider_1","getWebSocketProvider","host","url_json_rpc_provider_1","getTransactionPostData","maxFeePerGs","getJsonResult","checkLogTag","getBaseUrl","query","baseUrl","getPostUrl","getPostData","apikey","post","procFunc","payloadStr","txhash","postData","topic0","ethusd","getHistory","endBlock","startblock","endblock","timeStamp","checkNetworks","median","maxDelta","middle","nextRid","getPromise","ForwardErrors","ForwardProperties","exposeDebugConfig","config","weight","normalizedTally","configs","tally","getProcessFunc","_highestBlockNumber","waitForSync","getRunner","currentBlockNumber","providerConfigs","configOrProvider","stallTimeout","priority","i_1","first","t0","inflightWeight","backend","this_1","waiting","errorCode","props","IpcProvider","defaultProjectId","InfuraWebSocketProvider","projectId","projectSecret","apiKeyObj","JsonRpcBatchProvider","_pendingBatch","inflightRequest","_pendingBatchAggregator","batch","inflight","NodesmithProvider","defaultApplicationIds","applicationId","loadBalancer","applicationSecretKey","buildWeb3LegacyFetcher","sendFunc","fetcher","buildEip1193Fetcher","Web3Provider","jsonRpcFetchFunc","subprovider","isMetaMask","sendAsync","alchemy_provider_1","cloudflare_provider_1","etherscan_provider_1","fallback_provider_1","ipc_provider_1","infura_provider_1","json_rpc_batch_provider_1","nodesmith_provider_1","pocket_provider_1","web3_provider_1","getDefaultProvider","fallbackProvider","alchemyProvider","cloudflareProvider","etherscanProvider","infuraProvider","jsonRpcProvider","nodesmithProvider","pocketProvider","web3Provider","browserIpcProvider","regexBytes","regexNumber","regexArray","_pack","baseType_1","tight","names","commify","suffix","formatted","formatUnits","unitName","parseUnits","formatEther","parseEther","ether","base64","lib$p","solidity_1","units_1","wallet_1","sha2_2","lib$h","strings_2","lib$8","contracts_1","constants","lib$7","lib$r","providers_1","utils$3","ethers$1","ethers","ethers_1"],"mappings":"kgDAAA,SAAWA,OAAQC,SACjB,aAGA,SAASC,OAAQC,IAAKC,KACpB,IAAKD,IAAK,MAAM,IAAIE,MAAMD,KAAO,oBAKnC,SAASE,SAAUC,KAAMC,WACvBD,KAAKE,OAASD,UACd,IAAIE,SAAW,aACfA,SAASC,UAAYH,UAAUG,UAC/BJ,KAAKI,UAAY,IAAID,SACrBH,KAAKI,UAAUC,YAAcL,KAK/B,SAASM,GAAIC,OAAQC,KAAMC,QACzB,GAAIH,GAAGI,KAAKH,QAAS,CACnB,OAAOA,OAGTI,KAAKC,SAAW,EAChBD,KAAKE,MAAQ,KACbF,KAAKG,OAAS,EAGdH,KAAKI,IAAM,KAEX,GAAIR,SAAW,KAAM,CACnB,GAAIC,OAAS,MAAQA,OAAS,KAAM,CAClCC,OAASD,KACTA,KAAO,GAGTG,KAAKK,MAAMT,QAAU,EAAGC,MAAQ,GAAIC,QAAU,OAGlD,UAAWhB,SAAW,SAAU,CAC9BA,OAAOC,QAAUY,OACZ,CACLZ,QAAQY,GAAKA,GAGfA,GAAGA,GAAKA,GACRA,GAAGW,SAAW,GAEd,IAAIC,OACJ,IACE,UAAWC,SAAW,oBAAsBA,OAAOD,SAAW,YAAa,CACzEA,OAASC,OAAOD,WACX,CACLA,OAAM,KAAqBA,QAE7B,MAAOE,IAGTd,GAAGI,KAAO,SAASA,KAAMW,KACvB,GAAIA,eAAef,GAAI,CACrB,OAAO,K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KAAA0L,IAAA,WAAA,OAAAwmE,SAAA/3B,mBAEAr6C,OAAAC,eAAA1c,QAAA,aAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAA1qE,aACA1H,OAAAC,eAAA1c,QAAA,eAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAAjoE,eAEAnK,OAAAC,eAAA1c,QAAA,aAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAAP,aACA7xE,OAAAC,eAAA1c,QAAA,UAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAA5wE,UAEAxB,OAAAC,eAAA1c,QAAA,UAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAAtuE,UAEA9D,OAAAC,eAAA1c,QAAA,SAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAA98C,SAEAt1B,OAAAC,eAAA1c,QAAA,aAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAA/0B,aAMAr9C,OAAAC,eAAA1c,QAAA,WAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAA9zE,WA8BA0B,OAAAC,eAAA1c,QAAA,YAAA2c,WAAA,KAAA0L,IAAA,WAAA,OAAAwmE,SAAAz1B","sourcesContent":["(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","export const version = \"logger/5.5.0\";\n","\"use strict\";\n\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\n\nconst LogLevels: { [ name: string ]: number } = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\n\nimport { version } from \"./_version\";\n\nlet _globalLogger: Logger = null;\n\nfunction _checkNormalize(): string {\n try {\n const missing: Array = [ ];\n\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n };\n } catch(error) {\n missing.push(form);\n }\n });\n\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\")\n }\n } catch (error) {\n return error.message;\n }\n\n return null;\n}\n\nconst _normalizeError = _checkNormalize();\n\nexport enum LogLevel {\n DEBUG = \"DEBUG\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n OFF = \"OFF\"\n}\n\n\nexport enum ErrorCode {\n\n ///////////////////\n // Generic Errors\n\n // Unknown Error\n UNKNOWN_ERROR = \"UNKNOWN_ERROR\",\n\n // Not Implemented\n NOT_IMPLEMENTED = \"NOT_IMPLEMENTED\",\n\n // Unsupported Operation\n // - operation\n UNSUPPORTED_OPERATION = \"UNSUPPORTED_OPERATION\",\n\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n NETWORK_ERROR = \"NETWORK_ERROR\",\n\n // Some sort of bad response from the server\n SERVER_ERROR = \"SERVER_ERROR\",\n\n // Timeout\n TIMEOUT = \"TIMEOUT\",\n\n ///////////////////\n // Operational Errors\n\n // Buffer Overrun\n BUFFER_OVERRUN = \"BUFFER_OVERRUN\",\n\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n NUMERIC_FAULT = \"NUMERIC_FAULT\",\n\n\n ///////////////////\n // Argument Errors\n\n // Missing new operator to an object\n // - name: The name of the class\n MISSING_NEW = \"MISSING_NEW\",\n\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n INVALID_ARGUMENT = \"INVALID_ARGUMENT\",\n\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n MISSING_ARGUMENT = \"MISSING_ARGUMENT\",\n\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n UNEXPECTED_ARGUMENT = \"UNEXPECTED_ARGUMENT\",\n\n\n ///////////////////\n // Blockchain Errors\n\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n CALL_EXCEPTION = \"CALL_EXCEPTION\",\n\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n INSUFFICIENT_FUNDS = \"INSUFFICIENT_FUNDS\",\n\n // Nonce has already been used\n // - transaction: the transaction attempted\n NONCE_EXPIRED = \"NONCE_EXPIRED\",\n\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n REPLACEMENT_UNDERPRICED = \"REPLACEMENT_UNDERPRICED\",\n\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n UNPREDICTABLE_GAS_LIMIT = \"UNPREDICTABLE_GAS_LIMIT\",\n\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n TRANSACTION_REPLACED = \"TRANSACTION_REPLACED\",\n};\n\nconst HEX = \"0123456789abcdef\";\n\nexport class Logger {\n readonly version: string;\n\n static errors = ErrorCode;\n\n static levels = LogLevel;\n\n constructor(version: string) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n\n _log(logLevel: LogLevel, args: Array): void {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) { return; }\n console.log.apply(console, args);\n }\n\n debug(...args: Array): void {\n this._log(Logger.levels.DEBUG, args);\n }\n\n info(...args: Array): void {\n this._log(Logger.levels.INFO, args);\n }\n\n warn(...args: Array): void {\n this._log(Logger.levels.WARNING, args);\n }\n\n makeError(message: string, code?: ErrorCode, params?: any): Error {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, { });\n }\n\n if (!code) { code = Logger.errors.UNKNOWN_ERROR; }\n if (!params) { params = {}; }\n\n const messageDetails: Array = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${ code }`);\n messageDetails.push(`version=${ this.version }`);\n\n const reason = message;\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n\n // @TODO: Any??\n const error: any = new Error(message);\n error.reason = reason;\n error.code = code\n\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n\n return error;\n }\n\n throwError(message: string, code?: ErrorCode, params?: any): never {\n throw this.makeError(message, code, params);\n }\n\n throwArgumentError(message: string, name: string, value: any): never {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n\n assert(condition: any, message: string, code?: ErrorCode, params?: any): void {\n if (!!condition) { return; }\n this.throwError(message, code, params);\n }\n\n assertArgument(condition: any, message: string, name: string, value: any): void {\n if (!!condition) { return; }\n this.throwArgumentError(message, name, value);\n }\n\n checkNormalize(message?: string): void {\n if (message == null) { message = \"platform missing String.prototype.normalize\"; }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n\n checkSafeUint53(value: number, message?: string): void {\n if (typeof(value) !== \"number\") { return; }\n\n if (message == null) { message = \"value not safe\"; }\n\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n\n checkArgumentCount(count: number, expectedCount: number, message?: string): void {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n\n checkNew(target: any, kind: any): void {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n checkAbstract(target: any, kind: any): void {\n if (target === kind) {\n this.throwError(\n \"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { name: target.name, operation: \"new\" }\n );\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n\n static globalLogger(): Logger {\n if (!_globalLogger) { _globalLogger = new Logger(version); }\n return _globalLogger;\n }\n\n static setCensorship(censorship: boolean, permanent?: boolean): void {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n if (_permanentCensorErrors) {\n if (!censorship) { return; }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n\n static setLogLevel(logLevel: LogLevel): void {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n\n static from(version: string): Logger {\n return new Logger(version);\n }\n}\n","export const version = \"bytes/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type Bytes = ArrayLike;\n\nexport type BytesLike = Bytes | string;\n\nexport type DataOptions = {\n allowMissingPrefix?: boolean;\n hexPad?: \"left\" | \"right\" | null;\n};\n\nexport interface Hexable {\n toHexString(): string;\n}\n\n\n/*\nexport interface HexString {\n length: number;\n substring: (start: number, end?: number) => string;\n\n [index: number]: string;\n}\n*/\n\nexport type SignatureLike = {\n r: string;\n s?: string;\n _vs?: string,\n recoveryParam?: number;\n v?: number;\n} | BytesLike;\n\nexport interface Signature {\n r: string;\n\n s: string;\n _vs: string,\n\n recoveryParam: number;\n v: number;\n}\n\n///////////////////////////////\n\n\nfunction isHexable(value: any): value is Hexable {\n return !!(value.toHexString);\n}\n\nfunction addSlice(array: Uint8Array): Uint8Array {\n if (array.slice) { return array; }\n\n array.slice = function() {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n }\n\n return array;\n}\n\nexport function isBytesLike(value: any): value is BytesLike {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\n\nfunction isInteger(value: number) {\n return (typeof(value) === \"number\" && value == value && (value % 1) === 0);\n}\n\nexport function isBytes(value: any): value is Bytes {\n if (value == null) { return false; }\n\n if (value.constructor === Uint8Array) { return true; }\n if (typeof(value) === \"string\") { return false; }\n if (!isInteger(value.length) || value.length < 0) { return false; }\n\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) { return false; }\n }\n return true;\n}\n\n\nexport function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) { result.push(0); }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { value = value.toHexString(); }\n\n if (isHexString(value)) {\n let hex = (value).substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0x0\" + hex.substring(2);\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n\n const result = [];\n for (let i = 0; i < hex.length; i += 2) {\n result.push(parseInt(hex.substring(i, i + 2), 16));\n }\n\n return addSlice(new Uint8Array(result));\n }\n\n if (isBytes(value)) {\n return addSlice(new Uint8Array(value));\n }\n\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n}\n\nexport function concat(items: ReadonlyArray): Uint8Array {\n const objects = items.map(item => arrayify(item));\n const length = objects.reduce((accum, item) => (accum + item.length), 0);\n\n const result = new Uint8Array(length);\n\n objects.reduce((offset, object) => {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n\n return addSlice(result);\n}\n\nexport function stripZeros(value: BytesLike): Uint8Array {\n let result: Uint8Array = arrayify(value);\n\n if (result.length === 0) { return result; }\n\n // Find the first non-zero entry\n let start = 0;\n while (start < result.length && result[start] === 0) { start++ }\n\n // If we started with zeros, strip them\n if (start) {\n result = result.slice(start);\n }\n\n return result;\n}\n\nexport function zeroPad(value: BytesLike, length: number): Uint8Array {\n value = arrayify(value);\n\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n\n const result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n}\n\n\nexport function isHexString(value: any, length?: number): boolean {\n if (typeof(value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false\n }\n if (length && value.length !== 2 + 2 * length) { return false; }\n return true;\n}\n\nconst HexCharacters: string = \"0123456789abcdef\";\n\nexport function hexlify(value: BytesLike | Hexable | number | bigint, options?: DataOptions): string {\n if (!options) { options = { }; }\n\n if (typeof(value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n\n let hex = \"\";\n while (value) {\n hex = HexCharacters[value & 0xf] + hex;\n value = Math.floor(value / 16);\n }\n\n if (hex.length) {\n if (hex.length % 2) { hex = \"0\" + hex; }\n return \"0x\" + hex;\n }\n\n return \"0x00\";\n }\n\n if (typeof(value) === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) { return (\"0x0\" + value); }\n return \"0x\" + value;\n }\n\n if (options.allowMissingPrefix && typeof(value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n\n if (isHexable(value)) { return value.toHexString(); }\n\n if (isHexString(value)) {\n if ((value).length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + (value).substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return (value).toLowerCase();\n }\n\n if (isBytes(value)) {\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n let v = value[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n }\n\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n}\n\n/*\nfunction unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {\n if (typeof(value) === \"string\" && value.length % 2 && value.substring(0, 2) === \"0x\") {\n return \"0x0\" + value.substring(2);\n }\n return value;\n}\n*/\nexport function hexDataLength(data: BytesLike) {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n return null;\n }\n\n return (data.length - 2) / 2;\n}\n\nexport function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string {\n if (typeof(data) !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || (data.length % 2)) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data );\n }\n\n offset = 2 + 2 * offset;\n\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n\n return \"0x\" + data.substring(offset);\n}\n\nexport function hexConcat(items: ReadonlyArray): string {\n let result = \"0x\";\n items.forEach((item) => {\n result += hexlify(item).substring(2);\n });\n return result;\n}\n\nexport function hexValue(value: BytesLike | Hexable | number | bigint): string {\n const trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") { return \"0x0\"; }\n return trimmed;\n}\n\nexport function hexStripZeros(value: BytesLike): string {\n if (typeof(value) !== \"string\") { value = hexlify(value); }\n\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n let offset = 0;\n while (offset < value.length && value[offset] === \"0\") { offset++; }\n return \"0x\" + value.substring(offset);\n}\n\nexport function hexZeroPad(value: BytesLike, length: number): string {\n if (typeof(value) !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n\n return value;\n}\n\nexport function splitSignature(signature: SignatureLike): Signature {\n const result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0\n };\n\n if (isBytesLike(signature)) {\n const bytes: Uint8Array = arrayify(signature);\n if (bytes.length !== 65) {\n logger.throwArgumentError(\"invalid signature string; must be 65 bytes\", \"signature\", signature);\n }\n\n // Get the r, s and v\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n\n // Allow a recid to be used as the v\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n\n // Compute recoveryParam from v\n result.recoveryParam = 1 - (result.v % 2);\n\n // Compute _vs from recoveryParam and s\n if (result.recoveryParam) { bytes[32] |= 0x80; }\n result._vs = hexlify(bytes.slice(32, 64))\n\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n\n // If the _vs is available, use it to populate missing s, v and recoveryParam\n // and verify non-missing s, v and recoveryParam\n if (result._vs != null) {\n const vs = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs);\n\n // Set or check the recid\n const recoveryParam = ((vs[0] >= 128) ? 1: 0);\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n\n // Set or check the s\n vs[0] &= 0x7f;\n const s = hexlify(vs);\n if (result.s == null) {\n result.s = s;\n } else if (result.s !== s) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n\n // Use recid and v to populate each other\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - (result.v % 2);\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n const recId = (result.v === 0 || result.v === 1) ? result.v :(1 - (result.v % 2));\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n\n const vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) { vs[0] |= 0x80; }\n const _vs = hexlify(vs);\n\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n\n // Set or check the _vs\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n\n return result;\n}\n\nexport function joinSignature(signature: SignatureLike): string {\n signature = splitSignature(signature);\n\n return hexlify(concat([\n signature.r,\n signature.s,\n (signature.recoveryParam ? \"0x1c\": \"0x1b\")\n ]));\n}\n\n","export const version = \"bignumber/5.5.0\";\n","\"use strict\";\n\n/**\n * BigNumber\n *\n * A wrapper around the BN.js object. We use the BN.js library\n * because it is used by elliptic, so it is required regardless.\n *\n */\n\nimport _BN from \"bn.js\";\nimport BN = _BN.BN;\n\nimport { Bytes, Hexable, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst _constructorGuard = { };\n\nconst MAX_SAFE = 0x1fffffffffffff;\n\n\nexport type BigNumberish = BigNumber | Bytes | bigint | string | number;\n\nexport function isBigNumberish(value: any): value is BigNumberish {\n return (value != null) && (\n BigNumber.isBigNumber(value) ||\n (typeof(value) === \"number\" && (value % 1) === 0) ||\n (typeof(value) === \"string\" && !!value.match(/^-?[0-9]+$/)) ||\n isHexString(value) ||\n (typeof(value) === \"bigint\") ||\n isBytes(value)\n );\n}\n\n// Only warn about passing 10 into radix once\nlet _warnedToStringRadix = false;\n\nexport class BigNumber implements Hexable {\n readonly _hex: string;\n readonly _isBigNumber: boolean;\n\n constructor(constructorGuard: any, hex: string) {\n logger.checkNew(new.target, BigNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n\n this._hex = hex;\n this._isBigNumber = true;\n\n Object.freeze(this);\n }\n\n fromTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).fromTwos(value));\n }\n\n toTwos(value: number): BigNumber {\n return toBigNumber(toBN(this).toTwos(value));\n }\n\n abs(): BigNumber {\n if (this._hex[0] === \"-\") {\n return BigNumber.from(this._hex.substring(1));\n }\n return this;\n }\n\n add(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).add(toBN(other)));\n }\n\n sub(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).sub(toBN(other)));\n }\n\n div(other: BigNumberish): BigNumber {\n const o = BigNumber.from(other);\n if (o.isZero()) {\n throwFault(\"division by zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n }\n\n mul(other: BigNumberish): BigNumber {\n return toBigNumber(toBN(this).mul(toBN(other)));\n }\n\n mod(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot modulo negative values\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n }\n\n pow(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"cannot raise to negative values\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n }\n\n and(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'and' negative values\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n }\n\n or(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'or' negative values\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n }\n\n xor(other: BigNumberish): BigNumber {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"cannot 'xor' negative values\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n }\n\n mask(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot mask negative values\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n }\n\n shl(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n }\n\n shr(value: number): BigNumber {\n if (this.isNegative() || value < 0) {\n throwFault(\"cannot shift negative values\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n }\n\n eq(other: BigNumberish): boolean {\n return toBN(this).eq(toBN(other));\n }\n\n lt(other: BigNumberish): boolean {\n return toBN(this).lt(toBN(other));\n }\n\n lte(other: BigNumberish): boolean {\n return toBN(this).lte(toBN(other));\n }\n\n gt(other: BigNumberish): boolean {\n return toBN(this).gt(toBN(other));\n }\n\n gte(other: BigNumberish): boolean {\n return toBN(this).gte(toBN(other));\n }\n\n isNegative(): boolean {\n return (this._hex[0] === \"-\");\n }\n\n isZero(): boolean {\n return toBN(this).isZero();\n }\n\n toNumber(): number {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n }\n\n toBigInt(): bigint {\n try {\n return BigInt(this.toString());\n } catch (e) { }\n\n return logger.throwError(\"this platform does not support BigInt\", Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n }\n\n toString(): string {\n // Lots of people expect this, which we do not support, so check (See: #889)\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", Logger.errors.UNEXPECTED_ARGUMENT, { });\n }\n }\n return toBN(this).toString(10);\n }\n\n toHexString(): string {\n return this._hex;\n }\n\n toJSON(key?: string): any {\n return { type: \"BigNumber\", hex: this.toHexString() };\n }\n\n static from(value: any): BigNumber {\n if (value instanceof BigNumber) { return value; }\n\n if (typeof(value) === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber(_constructorGuard, toHex(value));\n }\n\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber(_constructorGuard, toHex(new BN(value)));\n }\n\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n\n if (typeof(value) === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n\n return BigNumber.from(String(value));\n }\n\n const anyValue = value;\n\n if (typeof(anyValue) === \"bigint\") {\n return BigNumber.from(anyValue.toString());\n }\n\n if (isBytes(anyValue)) {\n return BigNumber.from(hexlify(anyValue));\n }\n\n if (anyValue) {\n\n // Hexable interface (takes priority)\n if (anyValue.toHexString) {\n const hex = anyValue.toHexString();\n if (typeof(hex) === \"string\") {\n return BigNumber.from(hex);\n }\n\n } else {\n // For now, handle legacy JSON-ified values (goes away in v6)\n let hex = anyValue._hex;\n\n // New-form JSON\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n\n if (typeof(hex) === \"string\") {\n if (isHexString(hex) || (hex[0] === \"-\" && isHexString(hex.substring(1)))) {\n return BigNumber.from(hex);\n }\n }\n }\n }\n\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n }\n\n static isBigNumber(value: any): value is BigNumber {\n return !!(value && value._isBigNumber);\n }\n}\n\n// Normalize the hex string\nfunction toHex(value: string | BN): string {\n\n // For BN, call on the hex string\n if (typeof(value) !== \"string\") {\n return toHex(value.toString(16));\n }\n\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n\n // Cannot have multiple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") { logger.throwArgumentError(\"invalid hex\", \"value\", value); }\n\n // Call toHex on the positive component\n value = toHex(value);\n\n // Do not allow \"-0x00\"\n if (value === \"0x00\") { return value; }\n\n // Negate the value\n return \"-\" + value;\n }\n\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n\n // Normalize zero\n if (value === \"0x\") { return \"0x00\"; }\n\n // Make the string even length\n if (value.length % 2) { value = \"0x0\" + value.substring(2); }\n\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n\n return value;\n}\n\nfunction toBigNumber(value: BN): BigNumber {\n return BigNumber.from(toHex(value));\n}\n\nfunction toBN(value: BigNumberish): BN {\n const hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return (new BN(\"-\" + hex.substring(3), 16));\n }\n return new BN(hex.substring(2), 16);\n}\n\nfunction throwFault(fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value != null) { params.value = value; }\n\n return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// value should have no prefix\nexport function _base36To16(value: string): string {\n return (new BN(value, 36)).toString(16);\n}\n\n// value should have no prefix\nexport function _base16To36(value: string): string {\n return (new BN(value, 16)).toString(36);\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexZeroPad, isBytes } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BigNumber, BigNumberish, isBigNumberish } from \"./bignumber\";\n\nconst _constructorGuard = { };\n\nconst Zero = BigNumber.from(0);\nconst NegativeOne = BigNumber.from(-1);\n\nfunction throwFault(message: string, fault: string, operation: string, value?: any): never {\n const params: any = { fault: fault, operation: operation };\n if (value !== undefined) { params.value = value; }\n return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params);\n}\n\n// Constant to pull zeros from for multipliers\nlet zeros = \"0\";\nwhile (zeros.length < 256) { zeros += zeros; }\n\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getMultiplier(decimals: BigNumberish): string {\n\n if (typeof(decimals) !== \"number\") {\n try {\n decimals = BigNumber.from(decimals).toNumber();\n } catch (e) { }\n }\n\n if (typeof(decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}\n\nexport function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string {\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n // Make sure wei is a big number (convert as necessary)\n value = BigNumber.from(value);\n\n const negative = value.lt(Zero);\n if (negative) { value = value.mul(NegativeOne); }\n\n let fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) { fraction = \"0\" + fraction; }\n\n // Strip training 0\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n\n const whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n\n if (negative) { value = \"-\" + value; }\n\n return value;\n}\n\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n\n if (decimals == null) { decimals = 0; }\n const multiplier = getMultiplier(decimals);\n\n if (typeof(value) !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n\n // Is it negative?\n const negative = (value.substring(0, 1) === \"-\");\n if (negative) { value = value.substring(1); }\n\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n\n // Split it into a whole and fractional part\n const comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n\n let whole = comps[0], fraction = comps[1];\n if (!whole) { whole = \"0\"; }\n if (!fraction) { fraction = \"0\"; }\n\n // Trim trailing zeros\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n\n // Check the fraction doesn't exceed our decimals size\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n\n // If decimals is 0, we have an empty string for fraction\n if (fraction === \"\") { fraction = \"0\"; }\n\n // Fully pad the string with zeros to get to wei\n while (fraction.length < multiplier.length - 1) { fraction += \"0\"; }\n\n const wholeValue = BigNumber.from(whole);\n const fractionValue = BigNumber.from(fraction);\n\n let wei = (wholeValue.mul(multiplier)).add(fractionValue);\n\n if (negative) { wei = wei.mul(NegativeOne); }\n\n return wei;\n}\n\n\nexport class FixedFormat {\n readonly signed: boolean;\n readonly width: number;\n readonly decimals: number;\n readonly name: string;\n readonly _multiplier: string;\n\n constructor(constructorGuard: any, signed: boolean, width: number, decimals: number) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n\n this.name = (signed ? \"\": \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n\n this._multiplier = getMultiplier(decimals);\n\n Object.freeze(this);\n }\n\n static from(value: any): FixedFormat {\n if (value instanceof FixedFormat) { return value; }\n\n if (typeof(value) === \"number\") {\n value = `fixed128x${value}`\n }\n\n let signed = true;\n let width = 128;\n let decimals = 18;\n\n if (typeof(value) === \"string\") {\n if (value === \"fixed\") {\n // defaults...\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) { logger.throwArgumentError(\"invalid fixed format\", \"format\", value); }\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const check = (key: string, type: string, defaultValue: any): any => {\n if (value[key] == null) { return defaultValue; }\n if (typeof(value[key]) !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type +\")\", \"format.\" + key, value[key]);\n }\n return value[key];\n }\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n\n return new FixedFormat(_constructorGuard, signed, width, decimals);\n }\n}\n\nexport class FixedNumber {\n readonly format: FixedFormat;\n readonly _hex: string;\n readonly _value: string;\n\n readonly _isFixedNumber: boolean;\n\n constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat) {\n logger.checkNew(new.target, FixedNumber);\n\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n\n this.format = format;\n this._hex = hex;\n this._value = value;\n\n this._isFixedNumber = true;\n\n Object.freeze(this);\n }\n\n _checkFormat(other: FixedNumber): void {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n }\n\n addUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format);\n }\n\n subUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format);\n }\n\n mulUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format);\n }\n\n divUnsafe(other: FixedNumber): FixedNumber {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format);\n }\n\n floor(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n ceiling(): FixedNumber {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n let result = FixedNumber.from(comps[0], this.format);\n\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n\n return result;\n }\n\n // @TODO: Support other rounding algorithms\n round(decimals?: number): FixedNumber {\n if (decimals == null) { decimals = 0; }\n\n // If we are already in range, we're done\n const comps = this.toString().split(\".\");\n if (comps.length === 1) { comps.push(\"0\"); }\n\n if (decimals < 0 || decimals > 80 || (decimals % 1)) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n\n if (comps[1].length <= decimals) { return this; }\n\n const factor = FixedNumber.from(\"1\" + zeros.substring(0, decimals), this.format);\n const bump = BUMP.toFormat(this.format);\n\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n }\n\n isZero(): boolean {\n return (this._value === \"0.0\" || this._value === \"0\");\n }\n\n isNegative(): boolean {\n return (this._value[0] === \"-\");\n }\n\n toString(): string { return this._value; }\n\n toHexString(width?: number): string {\n if (width == null) { return this._hex; }\n if (width % 8) { logger.throwArgumentError(\"invalid byte width\", \"width\", width); }\n const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return hexZeroPad(hex, width / 8);\n }\n\n toUnsafeFloat(): number { return parseFloat(this.toString()); }\n\n toFormat(format: FixedFormat | string): FixedNumber {\n return FixedNumber.fromString(this._value, format);\n }\n\n\n static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber {\n // If decimals looks more like a format, and there is no format, shift the parameters\n if (format == null && decimals != null && !isBigNumberish(decimals)) {\n format = decimals;\n decimals = null;\n }\n\n if (decimals == null) { decimals = 0; }\n if (format == null) { format = \"fixed\"; }\n\n return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n }\n\n\n static fromString(value: string, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n const numeric = parseFixed(value, fixedFormat.decimals);\n\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n\n let hex: string = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = hexZeroPad(hex, fixedFormat.width / 8);\n }\n\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber {\n if (format == null) { format = \"fixed\"; }\n\n const fixedFormat = FixedFormat.from(format);\n\n if (arrayify(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n\n let numeric = BigNumber.from(value);\n if (fixedFormat.signed) { numeric = numeric.fromTwos(fixedFormat.width); }\n\n const hex = numeric.toTwos((fixedFormat.signed ? 0: 1) + fixedFormat.width).toHexString();\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n\n static from(value: any, format?: FixedFormat | string | number) {\n if (typeof(value) === \"string\") {\n return FixedNumber.fromString(value, format);\n }\n\n if (isBytes(value)) {\n return FixedNumber.fromBytes(value, format);\n }\n\n try {\n return FixedNumber.fromValue(value, 0, format);\n } catch (error) {\n // Allow NUMERIC_FAULT to bubble up\n if (error.code !== Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n }\n\n static isFixedNumber(value: any): value is FixedNumber {\n return !!(value && value._isFixedNumber);\n }\n}\n\nconst ONE = FixedNumber.from(1);\nconst BUMP = FixedNumber.from(\"0.5\");\n","export { BigNumber, BigNumberish } from \"./bignumber\";\nexport { formatFixed, FixedFormat, FixedNumber, parseFixed } from \"./fixednumber\";\n\n// Internal methods used by address\nexport { _base16To36, _base36To16 } from \"./bignumber\";\n","export const version = \"properties/5.5.0\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function defineReadOnly(object: T, name: K, value: T[K]): void {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor: any, key: string): T {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) { return ctor[key]; }\n if (!ctor.prototype || typeof(ctor.prototype) !== \"object\") { break; }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\n\nexport type Deferrable = {\n [ K in keyof T ]: T[K] | Promise;\n}\n\n\ntype Result = { key: string, value: any};\n\nexport async function resolveProperties(object: Readonly>): Promise {\n const promises: Array> = Object.keys(object).map((key) => {\n const value = object[>key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, { });\n}\n\nexport function checkProperties(object: any, properties: { [ name: string ]: boolean }): void {\n if (!object || typeof(object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\n\nexport function shallowCopy(object: T): T {\n const result: any = {};\n for (const key in object) { result[key] = object[key]; }\n return result;\n}\n\nconst opaque: { [key: string]: boolean } = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n\nfunction _isFrozen(object: any): boolean {\n\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof(object)]) { return true; }\n\n if (Array.isArray(object) || typeof(object) === \"object\") {\n if (!Object.isFrozen(object)) { return false; }\n\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value: any = null;\n try {\n value = object[keys[i]];\n } catch (error) {\n // If accessing a value triggers an error, it is a getter\n // designed to do so (e.g. Result) and is therefore \"frozen\"\n continue;\n }\n\n if (!_isFrozen(value)) { return false; }\n }\n\n return true;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\n// Returns a new copy of object, such that no properties may be replaced.\n// New properties may be added only to objects.\nfunction _deepCopy(object: any): any {\n\n if (_isFrozen(object)) { return object; }\n\n // Arrays are mutable, so we need to create a copy\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n\n if (typeof(object) === \"object\") {\n const result: { [ key: string ]: any } = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) { continue; }\n defineReadOnly(result, key, deepCopy(value));\n }\n\n return result;\n }\n\n return logger.throwArgumentError(`Cannot deepCopy ${ typeof(object) }`, \"object\", object);\n}\n\nexport function deepCopy(object: T): T {\n return _deepCopy(object);\n}\n\nexport class Description {\n constructor(info: { [ K in keyof T ]: T[K] }) {\n for (const key in info) {\n (this)[key] = deepCopy(info[key]);\n }\n }\n}\n","export const version = \"abi/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport interface JsonFragmentType {\n readonly name?: string;\n readonly indexed?: boolean;\n readonly type?: string;\n readonly internalType?: any; // @TODO: in v6 reduce type\n readonly components?: ReadonlyArray;\n}\n\nexport interface JsonFragment {\n readonly name?: string;\n readonly type?: string;\n\n readonly anonymous?: boolean;\n\n readonly payable?: boolean;\n readonly constant?: boolean;\n readonly stateMutability?: string;\n\n readonly inputs?: ReadonlyArray;\n readonly outputs?: ReadonlyArray;\n\n readonly gas?: string;\n};\n\nconst _constructorGuard = { };\n\n// AST Node parser state\ntype ParseState = {\n allowArray?: boolean,\n allowName?: boolean,\n allowParams?: boolean,\n allowType?: boolean,\n readArray?: boolean,\n};\n\n// AST Node\ntype ParseNode = {\n parent?: any,\n type?: string,\n name?: string,\n state?: ParseState,\n indexed?: boolean,\n components?: Array\n};\n\nlet ModifiersBytes: { [ name: string ]: boolean } = { calldata: true, memory: true, storage: true };\nlet ModifiersNest: { [ name: string ]: boolean } = { calldata: true, memory: true };\nfunction checkModifier(type: string, name: string): boolean {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) { return true; }\n } else if (type === \"address\") {\n if (name === \"payable\") { return true; }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) { return true; }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n}\n\n// @TODO: Make sure that children of an indexed tuple are marked with a null indexed\nfunction parseParamType(param: string, allowIndexed: boolean): ParseNode {\n\n let originalParam = param;\n function throwError(i: number) {\n logger.throwArgumentError(`unexpected character at position ${ i }`, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n\n function newNode(parent: ParseNode): ParseNode {\n let node: ParseNode = { type: \"\", name: \"\", parent: parent, state: { allowType: true } };\n if (allowIndexed) { node.indexed = false; }\n return node\n }\n\n let parent: ParseNode = { type: \"\", name: \"\", state: { allowType: true } };\n let node = parent;\n\n for (let i = 0; i < param.length; i++) {\n let c = param[i];\n switch (c) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [ newNode(node) ];\n node = node.components[0];\n break;\n\n case \")\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let child = node;\n node = node.parent;\n if (!node) { throwError(i); }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n\n case \",\":\n delete node.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n }\n\n if (checkModifier(node.type, node.name)) { node.name = \"\"; }\n\n node.type = verifyType(node.type);\n\n let sibling: ParseNode = newNode(node.parent);\n //{ type: \"\", name: \"\", parent: node.parent, state: { allowType: true } };\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n\n // Hit a space...\n case \" \":\n\n // If reading type, the type is done and may read a param or name\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n\n // If reading name, the name is done\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(i); }\n if (node.indexed) { throwError(i); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n\n break;\n\n case \"[\":\n if (!node.state.allowArray) { throwError(i); }\n\n node.type += c;\n\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n\n case \"]\":\n if (!node.state.readArray) { throwError(i); }\n\n node.type += c;\n\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n\n default:\n if (node.state.allowType) {\n node.type += c;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c;\n } else {\n throwError(i);\n }\n }\n }\n\n if (node.parent) { logger.throwArgumentError(\"unexpected eof\", \"param\", param); }\n\n delete parent.state;\n\n if (node.name === \"indexed\") {\n if (!allowIndexed) { throwError(originalParam.length - 7); }\n if (node.indexed) { throwError(originalParam.length - 7); }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n\n parent.type = verifyType(parent.type);\n\n return parent;\n}\n\nfunction populate(object: any, params: any) {\n for (let key in params) { defineReadOnly(object, key, params[key]); }\n}\n\nexport const FormatTypes: { [ name: string ]: string } = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n\n // JSON-format a la Solidity\n json: \"json\"\n});\n\nconst paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n\nexport class ParamType {\n\n // The local name of the parameter (of null if unbound)\n readonly name: string;\n\n // The fully qualified type (e.g. \"address\", \"tuple(address)\", \"uint256[3][]\"\n readonly type: string;\n\n // The base type (e.g. \"address\", \"tuple\", \"array\")\n readonly baseType: string;\n\n // Indexable Paramters ONLY (otherwise null)\n readonly indexed: boolean;\n\n // Tuples ONLY: (otherwise null)\n // - sub-components\n readonly components: Array;\n\n // Arrays ONLY: (otherwise null)\n // - length of the array (-1 for dynamic length)\n // - child type\n readonly arrayLength: number;\n readonly arrayChildren: ParamType;\n\n readonly _isParamType: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) { logger.throwError(\"use fromString\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n }); }\n populate(this, params);\n\n let match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: ((this.components != null) ? \"tuple\": this.type)\n });\n }\n\n this._isParamType = true;\n\n Object.freeze(this);\n }\n\n // Format the parameter fragment\n // - sighash: \"(uint256,address)\"\n // - minimal: \"tuple(uint256,address) indexed\"\n // - full: \"tuple(uint256 foo, address bar) indexed baz\"\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n let result: any = {\n type: ((this.baseType === \"tuple\") ? \"tuple\": this.type),\n name: (this.name || undefined)\n };\n if (typeof(this.indexed) === \"boolean\") { result.indexed = this.indexed; }\n if (this.components) {\n result.components = this.components.map((comp) => JSON.parse(comp.format(format)));\n }\n return JSON.stringify(result);\n }\n\n let result = \"\";\n\n // Array\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\": String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(\n (comp) => comp.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n\n if (format !== FormatTypes.sighash) {\n if (this.indexed === true) { result += \" indexed\"; }\n if (format === FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n\n return result;\n }\n\n static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType {\n if (typeof(value) === \"string\") {\n return ParamType.fromString(value, allowIndexed);\n }\n return ParamType.fromObject(value);\n }\n\n static fromObject(value: JsonFragmentType | ParamType): ParamType {\n if (ParamType.isParamType(value)) { return value; }\n\n return new ParamType(_constructorGuard, {\n name: (value.name || null),\n type: verifyType(value.type),\n indexed: ((value.indexed == null) ? null: !!value.indexed),\n components: (value.components ? value.components.map(ParamType.fromObject): null)\n });\n }\n\n static fromString(value: string, allowIndexed?: boolean): ParamType {\n function ParamTypify(node: ParseNode): ParamType {\n return ParamType.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n\n return ParamTypify(parseParamType(value, !!allowIndexed));\n }\n\n static isParamType(value: any): value is ParamType {\n return !!(value != null && value._isParamType);\n }\n};\n\nfunction parseParams(value: string, allowIndex: boolean): Array {\n return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex));\n}\n\ntype TypeCheck = { -readonly [ K in keyof T ]: T[K] };\n\ninterface _Fragment {\n readonly type: string;\n readonly name: string;\n readonly inputs: ReadonlyArray;\n}\n\nexport abstract class Fragment {\n\n readonly type: string;\n readonly name: string;\n readonly inputs: Array;\n\n readonly _isFragment: boolean;\n\n constructor(constructorGuard: any, params: any) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n\n this._isFragment = true;\n\n Object.freeze(this);\n }\n\n abstract format(format?: string): string;\n\n static from(value: Fragment | JsonFragment | string): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n if (typeof(value) === \"string\") {\n return Fragment.fromString(value);\n }\n\n return Fragment.fromObject(value);\n }\n\n static fromObject(value: Fragment | JsonFragment): Fragment {\n if (Fragment.isFragment(value)) { return value; }\n\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment?\n return null;\n }\n\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n }\n\n static fromString(value: string): Fragment {\n // Make sure the \"returns\" is surrounded by a space and all whitespace is exactly one space\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n }\n\n static isFragment(value: any): value is Fragment {\n return !!(value && value._isFragment);\n }\n}\n\ninterface _EventFragment extends _Fragment {\n readonly anonymous: boolean;\n}\n\nexport class EventFragment extends Fragment {\n readonly anonymous: boolean;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"event \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: EventFragment | JsonFragment | string): EventFragment {\n if (typeof(value) === \"string\") {\n return EventFragment.fromString(value);\n }\n return EventFragment.fromObject(value);\n }\n\n static fromObject(value: JsonFragment | EventFragment): EventFragment {\n if (EventFragment.isEventFragment(value)) { return value; }\n\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n\n const params: TypeCheck<_EventFragment> = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n type: \"event\"\n };\n\n return new EventFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): EventFragment {\n\n let match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n\n let anonymous = false;\n match[3].split(\" \").forEach((modifier) => {\n switch(modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n\n return EventFragment.fromObject({\n name: match[1].trim(),\n anonymous: anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n }\n\n static isEventFragment(value: any): value is EventFragment {\n return (value && value._isFragment && value.type === \"event\");\n }\n}\n\nfunction parseGas(value: string, params: any): string {\n params.gas = null;\n\n let comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = BigNumber.from(comps[1]);\n return comps[0];\n }\n\n return value;\n}\n\nfunction parseModifiers(value: string, params: any): void {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n\n value.split(\" \").forEach((modifier) => {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n}\n\ntype StateInputValue = {\n constant?: boolean;\n payable?: boolean;\n stateMutability?: string;\n type?: string;\n};\n\ntype StateOutputValue = {\n constant: boolean;\n payable: boolean;\n stateMutability: string;\n};\n\nfunction verifyState(value: StateInputValue): StateOutputValue {\n let result: any = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n\n // Set (and check things are consistent) the constant property\n result.constant = (result.stateMutability === \"view\" || result.stateMutability === \"pure\");\n if (value.constant != null) {\n if ((!!value.constant) !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n // Set (and check things are consistent) the payable property\n result.payable = (result.stateMutability === \"payable\");\n if (value.payable != null) {\n if ((!!value.payable) !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n\n // If payable we can assume non-constant; otherwise we can't assume\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n result.constant = !!value.constant;\n\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = (result.payable ? \"payable\": \"nonpayable\");\n }\n\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = (result.constant ? \"view\": \"payable\");\n\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n\n return result;\n}\n\ninterface _ConstructorFragment extends _Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n}\n\nexport class ConstructorFragment extends Fragment {\n stateMutability: string;\n payable: boolean;\n gas?: BigNumber;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n\n if (format === FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n\n let result = \"constructor(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n\n return result.trim();\n }\n\n static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment {\n if (typeof(value) === \"string\") {\n return ConstructorFragment.fromString(value);\n }\n return ConstructorFragment.fromObject(value);\n }\n\n static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment {\n if (ConstructorFragment.isConstructorFragment(value)) { return value; }\n\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n\n let state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n\n const params: TypeCheck<_ConstructorFragment> = {\n name: null,\n type: value.type,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new ConstructorFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): ConstructorFragment {\n let params: any = { type: \"constructor\" };\n\n value = parseGas(value, params);\n\n let parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n\n params.inputs = parseParams(parens[2].trim(), false);\n\n parseModifiers(parens[3].trim(), params);\n\n return ConstructorFragment.fromObject(params);\n }\n\n static isConstructorFragment(value: any): value is ConstructorFragment {\n return (value && value._isFragment && value.type === \"constructor\");\n }\n}\n\ninterface _FunctionFragment extends _ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n}\n\nexport class FunctionFragment extends ConstructorFragment {\n constant: boolean;\n outputs?: Array;\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability: undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber(): undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n outputs: this.outputs.map((output) => JSON.parse(output.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"function \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n if (format !== FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += (this.stateMutability + \" \");\n }\n } else if (this.constant) {\n result += \"view \";\n }\n\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(\n (output) => output.format(format)\n ).join(\", \") + \") \";\n }\n\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n\n return result.trim();\n }\n\n static from(value: FunctionFragment | JsonFragment | string): FunctionFragment {\n if (typeof(value) === \"string\") {\n return FunctionFragment.fromString(value);\n }\n return FunctionFragment.fromObject(value);\n }\n\n static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment {\n if (FunctionFragment.isFunctionFragment(value)) { return value; }\n\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n\n let state = verifyState(value);\n\n const params: TypeCheck<_FunctionFragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): []),\n outputs: (value.outputs ? value.outputs.map(ParamType.fromObject): [ ]),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas): null)\n };\n\n return new FunctionFragment(_constructorGuard, params);\n }\n\n static fromString(value: string): FunctionFragment {\n let params: any = { type: \"function\" };\n value = parseGas(value, params);\n\n let comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n\n let parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n parseModifiers(parens[3].trim(), params);\n\n // We have outputs\n if (comps.length > 1) {\n let returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [ ];\n }\n\n return FunctionFragment.fromObject(params);\n }\n\n static isFunctionFragment(value: any): value is FunctionFragment {\n return (value && value._isFragment && value.type === \"function\");\n }\n}\n\n//export class StructFragment extends Fragment {\n//}\n\nfunction checkForbidden(fragment: ErrorFragment): ErrorFragment {\n const sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(`cannot specify user defined ${ sig } error`, \"fragment\", fragment);\n }\n return fragment;\n}\n\nexport class ErrorFragment extends Fragment {\n\n format(format?: string): string {\n if (!format) { format = FormatTypes.sighash; }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n\n let result = \"\";\n\n if (format !== FormatTypes.sighash) {\n result += \"error \";\n }\n\n result += this.name + \"(\" + this.inputs.map(\n (input) => input.format(format)\n ).join((format === FormatTypes.full) ? \", \": \",\") + \") \";\n\n return result.trim();\n }\n\n static from(value: ErrorFragment | JsonFragment | string): ErrorFragment {\n if (typeof(value) === \"string\") {\n return ErrorFragment.fromString(value);\n }\n return ErrorFragment.fromObject(value);\n }\n\n static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment {\n if (ErrorFragment.isErrorFragment(value)) { return value; }\n\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n\n const params: TypeCheck<_Fragment> = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject): [])\n };\n\n return checkForbidden(new ErrorFragment(_constructorGuard, params));\n }\n\n static fromString(value: string): ErrorFragment {\n let params: any = { type: \"error\" };\n\n let parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n\n params.name = parens[1].trim();\n if (params.name) { verifyIdentifier(params.name); }\n\n params.inputs = parseParams(parens[2], false);\n\n return checkForbidden(ErrorFragment.fromObject(params));\n }\n\n static isErrorFragment(value: any): value is ErrorFragment {\n return (value && value._isFragment && value.type === \"error\");\n }\n}\n\nfunction verifyType(type: string): string {\n\n // These need to be transformed to their full description\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n\n // @TODO: more verification\n\n return type;\n}\n\n// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234\nconst regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\nfunction verifyIdentifier(value: string): string {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError(`invalid identifier \"${ value }\"`, \"value\", value);\n }\n return value;\n}\n\nconst regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n\nfunction splitNesting(value: string): Array {\n value = value.trim();\n\n let result = [];\n let accum = \"\";\n let depth = 0;\n for (let offset = 0; offset < value.length; offset++) {\n let c = value[offset];\n if (c === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c;\n if (c === \"(\") {\n depth++;\n } else if (c === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) { result.push(accum); }\n\n return result;\n}\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexConcat, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nexport interface Result extends ReadonlyArray {\n readonly [key: string]: any;\n}\n\nexport function checkResultErrors(result: Result): Array<{ path: Array, error: Error }> {\n // Find the first error (if any)\n const errors: Array<{ path: Array, error: Error }> = [ ];\n\n const checkErrors = function(path: Array, object: any): void {\n if (!Array.isArray(object)) { return; }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n }\n checkErrors([ ], result);\n\n return errors;\n\n}\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport abstract class Coder {\n\n // The coder name:\n // - address, uint256, tuple, array, etc.\n readonly name: string;\n\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n readonly type: string;\n\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n readonly localName: string;\n\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n readonly dynamic: boolean;\n\n constructor(name: string, type: string, localName: string, dynamic: boolean) {\n // @TODO: defineReadOnly these\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n\n _throwError(message: string, value: any): void {\n logger.throwArgumentError(message, this.localName, value);\n }\n\n abstract encode(writer: Writer, value: any): number;\n abstract decode(reader: Reader): any;\n\n abstract defaultValue(): any;\n}\n\nexport class Writer {\n readonly wordSize: number;\n\n _data: Array;\n _dataLength: number;\n _padding: Uint8Array;\n\n constructor(wordSize?: number) {\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n this._data = [ ];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n\n get data(): string {\n return hexConcat(this._data);\n }\n get length(): number { return this._dataLength; }\n\n _writeData(data: Uint8Array): number {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n }\n\n appendWriter(writer: Writer): number {\n return this._writeData(concat(writer._data));\n }\n\n // Arrayish items; padded on the right to wordSize\n writeBytes(value: BytesLike): number {\n let bytes = arrayify(value);\n const paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = concat([ bytes, this._padding.slice(paddingOffset) ])\n }\n return this._writeData(bytes);\n }\n\n _getValue(value: BigNumberish): Uint8Array {\n let bytes = arrayify(BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = concat([ this._padding.slice(bytes.length % this.wordSize), bytes ]);\n }\n return bytes;\n }\n\n // BigNumberish items; padded on the left to wordSize\n writeValue(value: BigNumberish): number {\n return this._writeData(this._getValue(value));\n }\n\n writeUpdatableValue(): (value: BigNumberish) => void {\n const offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return (value: BigNumberish) => {\n this._data[offset] = this._getValue(value);\n };\n }\n}\n\nexport class Reader {\n readonly wordSize: number;\n readonly allowLoose: boolean;\n\n readonly _data: Uint8Array;\n readonly _coerceFunc: CoerceFunc;\n\n _offset: number;\n\n constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc, allowLoose?: boolean) {\n defineReadOnly(this, \"_data\", arrayify(data));\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n defineReadOnly(this, \"_coerceFunc\", coerceFunc);\n defineReadOnly(this, \"allowLoose\", allowLoose);\n\n this._offset = 0;\n }\n\n get data(): string { return hexlify(this._data); }\n get consumed(): number { return this._offset; }\n\n // The default Coerce function\n static coerce(name: string, value: any): any {\n let match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) { value = value.toNumber(); }\n return value;\n }\n\n coerce(name: string, value: any): any {\n if (this._coerceFunc) { return this._coerceFunc(name, value); }\n return Reader.coerce(name, value);\n }\n\n _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array {\n let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger.throwError(\"data out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength)\n }\n\n subReader(offset: number): Reader {\n return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n }\n\n readBytes(length: number, loose?: boolean): Uint8Array {\n let bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n\n readValue(): BigNumber {\n return BigNumber.from(this.readBytes(this.wordSize));\n }\n}\n","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","\"use strict\";\n\nimport sha3 from \"js-sha3\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function keccak256(data: BytesLike): string {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n","export const version = \"rlp/5.5.0\";\n","\"use strict\";\n\n//See: https://github.com/ethereum/wiki/wiki/RLP\n\nimport { arrayify, BytesLike, hexlify, isBytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction arrayifyInteger(value: number): Array {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\n\nfunction unarrayifyInteger(data: Uint8Array, offset: number, length: number): number {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\n\nfunction _encode(object: Array | string): Array {\n if (Array.isArray(object)) {\n let payload: Array = [];\n object.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length)\n return payload;\n }\n\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n\n return length.concat(payload);\n\n }\n\n if (!isBytesLike(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n\n const data: Array = Array.prototype.slice.call(arrayify(object));\n\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n\n } else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n\n return length.concat(data);\n}\n\nexport function encode(object: any): string {\n return hexlify(_encode(object));\n}\n\ntype Decoded = {\n result: any;\n consumed: number;\n};\n\nfunction _decodeChildren(data: Uint8Array, offset: number, childOffset: number, length: number): Decoded {\n const result = [];\n\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n\n result.push(decoded.result);\n\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n }\n\n return {consumed: (1 + length), result: result};\n}\n\n// returns { consumed: number, result: Object }\nfunction _decode(data: Uint8Array, offset: number): { consumed: number, result: any } {\n if (data.length === 0) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data long segment too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n\n } else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n return _decodeChildren(data, offset, offset + 1, length);\n\n } else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result }\n\n } else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, { });\n }\n\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result }\n }\n return { consumed: 1, result: hexlify(data[offset]) };\n}\n\nexport function decode(data: BytesLike): any {\n const bytes = arrayify(data);\n const decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n}\n\n","export const version = \"address/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from \"@ethersproject/bytes\";\nimport { BigNumber, BigNumberish, _base16To36, _base36To16 } from \"@ethersproject/bignumber\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { encode } from \"@ethersproject/rlp\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction getChecksumAddress(address: string): string {\n if (!isHexString(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n address = address.toLowerCase();\n\n const chars = address.substring(2).split(\"\");\n\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n\n const hashed = arrayify(keccak256(expanded));\n\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n\n return \"0x\" + chars.join(\"\");\n}\n\n// Shims for environments that are missing some required constants and functions\nconst MAX_SAFE_INTEGER: number = 0x1fffffffffffff;\n\nfunction log10(x: number): number {\n if (Math.log10) { return Math.log10(x); }\n return Math.log(x) / Math.LN10;\n}\n\n\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n\n// Create lookup table\nconst ibanLookup: { [character: string]: string } = { };\nfor (let i = 0; i < 10; i++) { ibanLookup[String(i)] = String(i); }\nfor (let i = 0; i < 26; i++) { ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); }\n\n// How many decimal digits can we process? (for 64-bit float, this is 15)\nconst safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n\nfunction ibanChecksum(address: string): string {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits){\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) { checksum = \"0\" + checksum; }\n\n return checksum;\n};\n\nexport function getAddress(address: string): string {\n let result = null;\n\n if (typeof(address) !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n\n // Missing the 0x prefix\n if (address.substring(0, 2) !== \"0x\") { address = \"0x\" + address; }\n\n result = getChecksumAddress(address);\n\n // It is a checksummed address with a bad checksum\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n\n // Maybe ICAP? (we only support direct mode)\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n\n // It is an ICAP address with a bad checksum\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n\n result = _base36To16(address.substring(4));\n while (result.length < 40) { result = \"0\" + result; }\n result = getChecksumAddress(\"0x\" + result);\n\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n\n return result;\n}\n\nexport function isAddress(address: string): boolean {\n try {\n getAddress(address);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getIcapAddress(address: string): string {\n let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n while (base36.length < 30) { base36 = \"0\" + base36; }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\nexport function getContractAddress(transaction: { from: string, nonce: BigNumberish }) {\n let from: string = null;\n try {\n from = getAddress(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n\n const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));\n\n return getAddress(hexDataSlice(keccak256(encode([ from, nonce ])), 12));\n}\n\nexport function getCreate2Address(from: string, salt: BytesLike, initCodeHash: BytesLike): string {\n if (hexDataLength(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if (hexDataLength(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress(hexDataSlice(keccak256(concat([ \"0xff\", getAddress(from), salt, initCodeHash ])), 12))\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { hexZeroPad } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class AddressCoder extends Coder {\n\n constructor(localName: string) {\n super(\"address\", \"address\", localName, false);\n }\n\n defaultValue(): string {\n return \"0x0000000000000000000000000000000000000000\";\n }\n\n encode(writer: Writer, value: string): number {\n try {\n value = getAddress(value)\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n }\n\n decode(reader: Reader): any {\n return getAddress(hexZeroPad(reader.readValue().toHexString(), 20));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// Clones the functionality of an existing Coder, but without a localName\nexport class AnonymousCoder extends Coder {\n private coder: Coder;\n\n constructor(coder: Coder) {\n super(coder.name, coder.type, undefined, coder.dynamic);\n this.coder = coder;\n }\n\n defaultValue(): any {\n return this.coder.defaultValue();\n }\n\n encode(writer: Writer, value: any): number {\n return this.coder.encode(writer, value);\n }\n\n decode(reader: Reader): any {\n return this.coder.decode(reader);\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./abstract-coder\";\nimport { AnonymousCoder } from \"./anonymous\";\n\nexport function pack(writer: Writer, coders: ReadonlyArray, values: Array | { [ name: string ]: any }): number {\n let arrayValues: Array = null;\n\n if (Array.isArray(values)) {\n arrayValues = values;\n\n } else if (values && typeof(values) === \"object\") {\n let unique: { [ name: string ]: boolean } = { };\n\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n if (unique[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n\n unique[name] = true;\n\n return values[name];\n });\n\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n\n let staticWriter = new Writer(writer.wordSize);\n let dynamicWriter = new Writer(writer.wordSize);\n\n let updateFuncs: Array<(baseOffset: number) => void> = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset: number) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n\n } else {\n coder.encode(staticWriter, value);\n }\n });\n\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\n\nexport function unpack(reader: Reader, coders: Array): Result {\n let values: any = [];\n\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n\n coders.forEach((coder) => {\n let value: any = null;\n\n if (coder.dynamic) {\n let offset = reader.readValue();\n let offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) { throw error; }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n\n if (value != undefined) {\n values.push(value);\n }\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add any named parameters (i.e. tuples)\n coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n const value = values[index];\n\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: () => { throw value; }\n });\n } else {\n values[name] = value;\n }\n });\n\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if (value instanceof Error) {\n Object.defineProperty(values, i, {\n enumerable: true,\n get: () => { throw value; }\n });\n }\n }\n\n return Object.freeze(values);\n}\n\n\nexport class ArrayCoder extends Coder {\n readonly coder: Coder;\n readonly length: number;\n\n constructor(coder: Coder, length: number, localName: string) {\n const type = (coder.type + \"[\" + (length >= 0 ? length: \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n\n this.coder = coder;\n this.length = length;\n }\n\n defaultValue(): Array {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n\n const result: Array = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n\n encode(writer: Writer, value: Array): number {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n\n let count = this.length;\n\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName? (\" \"+ this.localName): \"\"));\n\n let coders = [];\n for (let i = 0; i < value.length; i++) { coders.push(this.coder); }\n\n return pack(writer, coders, value);\n }\n\n decode(reader: Reader): any {\n let count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count: count\n });\n }\n }\n let coders = [];\n for (let i = 0; i < count; i++) { coders.push(new AnonymousCoder(this.coder)); }\n\n return reader.coerce(this.name, unpack(reader, coders));\n }\n}\n\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class BooleanCoder extends Coder {\n\n constructor(localName: string) {\n super(\"bool\", \"bool\", localName, false);\n }\n\n defaultValue(): boolean {\n return false;\n }\n\n encode(writer: Writer, value: boolean): number {\n return writer.writeValue(value ? 1: 0);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.type, !reader.readValue().isZero());\n }\n}\n\n","\"use strict\";\n\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class DynamicBytesCoder extends Coder {\n constructor(type: string, localName: string) {\n super(type, type, localName, true);\n }\n\n defaultValue(): string {\n return \"0x\";\n }\n\n encode(writer: Writer, value: any): number {\n value = arrayify(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n\n decode(reader: Reader): any {\n return reader.readBytes(reader.readValue().toNumber(), true);\n }\n}\n\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName: string) {\n super(\"bytes\", localName);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(super.decode(reader)));\n }\n}\n\n\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\n// @TODO: Merge this with bytes\nexport class FixedBytesCoder extends Coder {\n readonly size: number;\n\n constructor(size: number, localName: string) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n this.size = size;\n }\n\n defaultValue(): string {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n\n encode(writer: Writer, value: BytesLike): number {\n let data = arrayify(value);\n if (data.length !== this.size) { this._throwError(\"incorrect data length\", value); }\n return writer.writeBytes(data);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, hexlify(reader.readBytes(this.size)));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NullCoder extends Coder {\n\n constructor(localName: string) {\n super(\"null\", \"\", localName, false);\n }\n\n defaultValue(): null {\n return null;\n }\n\n encode(writer: Writer, value: any): number {\n if (value != null) { this._throwError(\"not null\", value); }\n return writer.writeBytes([ ]);\n }\n\n decode(reader: Reader): any {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n }\n}\n","export const AddressZero = \"0x0000000000000000000000000000000000000000\";\n\n","import { BigNumber } from \"@ethersproject/bignumber\";\n\nconst NegativeOne: BigNumber = (/*#__PURE__*/BigNumber.from(-1));\nconst Zero: BigNumber = (/*#__PURE__*/BigNumber.from(0));\nconst One: BigNumber = (/*#__PURE__*/BigNumber.from(1));\nconst Two: BigNumber = (/*#__PURE__*/BigNumber.from(2));\nconst WeiPerEther: BigNumber = (/*#__PURE__*/BigNumber.from(\"1000000000000000000\"));\nconst MaxUint256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nconst MinInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\"));\nconst MaxInt256: BigNumber = (/*#__PURE__*/BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\n\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256,\n};\n","export const HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n\n","// NFKC (composed) // (decomposed)\nexport const EtherSymbol = \"\\u039e\"; // \"\\uD835\\uDF63\";\n","\"use strict\";\n\nexport { AddressZero } from \"./addresses\";\nexport {\n NegativeOne,\n Zero,\n One,\n Two,\n WeiPerEther,\n MaxUint256,\n MinInt256,\n MaxInt256\n} from \"./bignumbers\";\nexport { HashZero } from \"./hashes\";\nexport { EtherSymbol } from \"./strings\";\n\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { MaxUint256, NegativeOne, One, Zero } from \"@ethersproject/constants\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\n\nexport class NumberCoder extends Coder {\n readonly size: number;\n readonly signed: boolean;\n\n constructor(size: number, signed: boolean, localName: string) {\n const name = ((signed ? \"int\": \"uint\") + (size * 8));\n super(name, name, localName, false);\n\n this.size = size;\n this.signed = signed;\n }\n\n defaultValue(): number {\n return 0;\n }\n\n encode(writer: Writer, value: BigNumberish): number {\n let v = BigNumber.from(value);\n\n // Check bounds are safe for encoding\n let maxUintValue = MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n let bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n\n v = v.toTwos(this.size * 8).mask(this.size * 8);\n\n if (this.signed) {\n v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n\n return writer.writeValue(v);\n }\n\n decode(reader: Reader): any {\n let value = reader.readValue().mask(this.size * 8);\n\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n\n return reader.coerce(this.name, value);\n }\n}\n\n","export const version = \"strings/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n\nexport enum UnicodeNormalizationForm {\n current = \"\",\n NFC = \"NFC\",\n NFD = \"NFD\",\n NFKC = \"NFKC\",\n NFKD = \"NFKD\"\n};\n\nexport enum Utf8ErrorReason {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n UNEXPECTED_CONTINUE = \"unexpected continuation byte\",\n\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n BAD_PREFIX = \"bad codepoint prefix\",\n\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n OVERRUN = \"string overrun\",\n\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n MISSING_CONTINUE = \"missing continuation byte\",\n\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n OUT_OF_RANGE = \"out of UTF-8 range\",\n\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n UTF16_SURROGATE = \"UTF-16 surrogate\",\n\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n OVERLONG = \"overlong representation\",\n};\n\n\nexport type Utf8ErrorFunc = (reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number) => number;\n\nfunction errorFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n return logger.throwArgumentError(`invalid codepoint at offset ${ offset }; ${ reason }`, \"bytes\", bytes);\n}\n\nfunction ignoreFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) { break; }\n i++;\n }\n return i;\n }\n\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n\n // Nothing to skip\n return 0;\n}\n\nfunction replaceFunc(reason: Utf8ErrorReason, offset: number, bytes: ArrayLike, output: Array, badCodepoint?: number): number {\n\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n\n // Put the replacement character into the output\n output.push(0xfffd);\n\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n\n// Common error handing strategies\nexport const Utf8ErrorFuncs: { [ name: string ]: Utf8ErrorFunc } = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes: BytesLike, onError?: Utf8ErrorFunc): Array {\n if (onError == null) { onError = Utf8ErrorFuncs.error; }\n\n bytes = arrayify(bytes);\n\n const result: Array = [];\n let i = 0;\n\n // Invalid bytes are ignored\n while(i < bytes.length) {\n\n const c = bytes[i++];\n\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n\n // 1110 xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n } else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n\n } else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n } else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n };\n\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n\n // See above loop for invalid continuation byte\n if (res === null) { continue; }\n\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n\n result.push(res);\n }\n\n return result;\n}\n\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Uint8Array {\n\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n\n if (c < 0x80) {\n result.push(c);\n\n } else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n\n } else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n\n } else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n\n return arrayify(result);\n};\n\nfunction escapeChar(value: number) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\n\nexport function _toEscapedUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\"\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\n\nexport function _toUtf8String(codePoints: Array): string {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode(\n (((codePoint >> 10) & 0x3ff) + 0xd800),\n ((codePoint & 0x3ff) + 0xdc00)\n );\n }).join(\"\");\n}\n\nexport function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n\nexport function toUtf8CodePoints(str: string, form: UnicodeNormalizationForm = UnicodeNormalizationForm.current): Array {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n","\"use strict\";\n\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\n\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\n\n\nexport function formatBytes32String(text: string): string {\n\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n\n // Check we have room for null-termination\n if (bytes.length > 31) { throw new Error(\"bytes32 string must be less than 32 bytes\"); }\n\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([ bytes, HashZero ]).slice(0, 32));\n}\n\nexport function parseBytes32String(bytes: BytesLike): string {\n const data = arrayify(bytes);\n\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) { throw new Error(\"invalid bytes32 - not 32 bytes long\"); }\n if (data[31] !== 0) { throw new Error(\"invalid bytes32 string - no null terminator\"); }\n\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) { length--; }\n\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n\n","\"use strict\";\n\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\n\ntype Ranged = {\n l: number, // Lo value\n h: number, // High value (less the lo)\n d?: number, // Delta/stride (default: 1)\n s?: number, // Shift (default: 1)\n e?: Array // Exceptions to skip\n};\n\ntype Table = { [ src: number ]: Array };\n\nfunction bytes2(data: string): Array {\n if ((data.length % 4) !== 0) { throw new Error(\"bad data\"); }\n let result = [];\n for (let i = 0; i < data.length; i += 4) {\n result.push(parseInt(data.substring(i, i + 4), 16));\n }\n return result;\n}\n\nfunction createTable(data: string, func?: (value: string) => Array): Table {\n if (!func) {\n func = function(value: string) { return [ parseInt(value, 16) ]; }\n }\n\n let lo = 0;\n\n let result: Table = { };\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n\n return result;\n}\n\nfunction createRangeTable(data: string): Array {\n let hi = 0;\n return data.split(\",\").map((v) => {\n let comps = v.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\n\nfunction matchMap(value: number, ranges: Array): Ranged {\n let lo = 0;\n for (let i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) { continue; }\n return range;\n }\n }\n return null;\n}\n\nconst Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n\n// @TODO: Make this relative...\nconst Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v) => parseInt(v, 16));\n\nconst Table_B_2_ranges: Array = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [ 23 ], l: 127 },\n { h: 54, s: 1, e: [ 48 ], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [ 2, 6, 8 ], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [ 18, 24, 66 ], l: 19, d: 2 },\n { h: 26, s: 32, e: [ 17 ], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [ 38 ], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [ 1, 4, 5, 7, 8, 11, 12, 17 ], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [ 2, 7, 8, 17 ], l: 52 },\n { h: 24, s: -120023, e: [ 2, 7, 13, 15, 16, 17 ], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [ 17 ], l: 56 },\n { h: 24, s: -119601, e: [ 17 ], l: 58 },\n { h: 24, s: -119659, e: [ 17 ], l: 58 },\n { h: 24, s: -119717, e: [ 17 ], l: 58 },\n { h: 24, s: -119775, e: [ 17 ], l: 58 }\n];\nconst Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\nconst Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\nconst Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n\nconst Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n\n\nfunction flatten(values: Array>): Array {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, [ ]);\n}\n\nexport function _nameprepTableA1(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\n\nexport function _nameprepTableB2(codepoint: number): Array {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) { return [ codepoint + range.s ]; }\n\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) { return codes; }\n\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) { return [ codepoint + shift[0] ]; }\n\n let complex = Table_B_2_complex[codepoint];\n if (complex) { return complex; }\n\n return null;\n}\n\nexport function _nameprepTableC(codepoint: number): boolean {\n return !!matchMap(codepoint, Table_C_ranges);\n}\n\nexport function nameprep(value: string): string {\n\n // This allows platforms with incomplete normalize to bypass\n // it for very basic names which the built-in toLowerCase\n // will certainly handle correctly\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) { return value.toLowerCase(); }\n\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) { return [ ]; }\n if (code >= 0xfe00 && code <= 0xfe0f) { return [ ]; }\n\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) { return codesTableB2; }\n\n // No Substitution\n return [ code ];\n }));\n\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\n\n // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9\n codes.forEach((code) => {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n\n // Prohibit Unassigned Code Points (Table A.1)\n codes.forEach((code) => {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n\n // IDNA extras\n let name = _toUtf8String(codes);\n\n // IDNA: 4.2.3.1\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n\n // IDNA: 4.2.4\n if (name.length > 63) { throw new Error(\"too long\"); }\n\n\n\n return name;\n}\n\n","\"use strict\";\n\nimport { formatBytes32String, parseBytes32String } from \"./bytes32\";\nimport { nameprep } from \"./idna\";\nimport { _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, UnicodeNormalizationForm, Utf8ErrorFunc, Utf8ErrorFuncs, Utf8ErrorReason } from \"./utf8\";\n\nexport {\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n\n Utf8ErrorFunc,\n Utf8ErrorFuncs,\n Utf8ErrorReason,\n\n UnicodeNormalizationForm,\n\n formatBytes32String,\n parseBytes32String,\n\n nameprep\n}\n","\"use strict\";\n\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Reader, Writer } from \"./abstract-coder\";\nimport { DynamicBytesCoder } from \"./bytes\";\n\nexport class StringCoder extends DynamicBytesCoder {\n\n constructor(localName: string) {\n super(\"string\", localName);\n }\n\n defaultValue(): string {\n return \"\";\n }\n\n encode(writer: Writer, value: any): number {\n return super.encode(writer, toUtf8Bytes(value));\n }\n\n decode(reader: Reader): any {\n return toUtf8String(super.decode(reader));\n }\n}\n","\"use strict\";\n\nimport { Coder, Reader, Writer } from \"./abstract-coder\";\nimport { pack, unpack } from \"./array\";\n\nexport class TupleCoder extends Coder {\n readonly coders: Array;\n\n constructor(coders: Array, localName: string) {\n let dynamic = false;\n const types: Array = [];\n coders.forEach((coder) => {\n if (coder.dynamic) { dynamic = true; }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n\n super(\"tuple\", type, localName, dynamic);\n this.coders = coders;\n }\n\n defaultValue(): any {\n const values: any = [ ];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) { accum[name] = 0; }\n accum[name]++;\n }\n return accum;\n }, <{ [ name: string ]: number }>{ });\n\n // Add named values\n this.coders.forEach((coder: Coder, index: number) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) { return; }\n\n if (name === \"length\") { name = \"_length\"; }\n\n if (values[name] != null) { return; }\n\n values[name] = values[index];\n });\n\n return Object.freeze(values);\n }\n\n encode(writer: Writer, value: Array | { [ name: string ]: any }): number {\n return pack(writer, this.coders, value);\n }\n\n decode(reader: Reader): any {\n return reader.coerce(this.name, unpack(reader, this.coders));\n }\n}\n\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Coder, Reader, Result, Writer } from \"./coders/abstract-coder\";\nimport { AddressCoder } from \"./coders/address\";\nimport { ArrayCoder } from \"./coders/array\";\nimport { BooleanCoder } from \"./coders/boolean\";\nimport { BytesCoder } from \"./coders/bytes\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes\";\nimport { NullCoder } from \"./coders/null\";\nimport { NumberCoder } from \"./coders/number\";\nimport { StringCoder } from \"./coders/string\";\nimport { TupleCoder } from \"./coders/tuple\";\n\nimport { ParamType } from \"./fragments\";\n\n\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n\n\nexport type CoerceFunc = (type: string, value: any) => any;\n\nexport class AbiCoder {\n readonly coerceFunc: CoerceFunc;\n\n constructor(coerceFunc?: CoerceFunc) {\n logger.checkNew(new.target, AbiCoder);\n defineReadOnly(this, \"coerceFunc\", coerceFunc || null);\n }\n\n _getCoder(param: ParamType): Coder {\n\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"array\":\n return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new TupleCoder((param.components || []).map((component) => {\n return this._getCoder(component);\n }), param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n if (size === 0 || size > 256 || (size % 8) !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n if (size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new FixedBytesCoder(size, param.name);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n }\n\n _getWordSize(): number { return 32; }\n\n _getReader(data: Uint8Array, allowLoose?: boolean): Reader {\n return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n }\n\n _getWriter(): Writer {\n return new Writer(this._getWordSize());\n }\n\n getDefaultValue(types: ReadonlyArray): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n\n encode(types: ReadonlyArray, values: ReadonlyArray): string {\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types: types, values: values }\n });\n }\n\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n\n const writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n }\n\n decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result {\n const coders: Array = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(this._getReader(arrayify(data), loose));\n }\n}\n\nexport const defaultAbiCoder: AbiCoder = new AbiCoder();\n\n","import { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport function id(text: string): string {\n return keccak256(toUtf8Bytes(text));\n}\n","export const version = \"hash/5.5.0\";\n","import { concat, hexlify } from \"@ethersproject/bytes\";\nimport { nameprep, toUtf8Bytes } from \"@ethersproject/strings\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\n\nconst Partition = new RegExp(\"^((.*)\\\\.)?([^.]+)$\");\n\nexport function isValidName(name: string): boolean {\n try {\n const comps = name.split(\".\");\n for (let i = 0; i < comps.length; i++) {\n if (nameprep(comps[i]).length === 0) {\n throw new Error(\"empty\")\n }\n }\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function namehash(name: string): string {\n /* istanbul ignore if */\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n\n let current = name;\n let result: string | Uint8Array = Zeros;\n while (current.length) {\n const partition = current.match(Partition);\n if (partition == null || partition[2] === \"\") {\n logger.throwArgumentError(\"invalid ENS address; missing component\", \"name\", name);\n }\n const label = toUtf8Bytes(nameprep(partition[3]));\n result = keccak256(concat([result, keccak256(label)]));\n\n current = partition[2] || \"\";\n }\n\n return hexlify(result);\n}\n\n","import { Bytes, concat } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nexport const messagePrefix = \"\\x19Ethereum Signed Message:\\n\";\n\nexport function hashMessage(message: Bytes | string): string {\n if (typeof(message) === \"string\") { message = toUtf8Bytes(message); }\n return keccak256(concat([\n toUtf8Bytes(messagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n\n","import { TypedDataDomain, TypedDataField } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, hexConcat, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { id } from \"./id\";\n\nconst padding = new Uint8Array(32);\npadding.fill(0);\n\nconst NegativeOne: BigNumber = BigNumber.from(-1);\nconst Zero: BigNumber = BigNumber.from(0);\nconst One: BigNumber = BigNumber.from(1);\nconst MaxUint256: BigNumber = BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n\nfunction hexPadRight(value: BytesLike) {\n const bytes = arrayify(value);\n const padOffset = bytes.length % 32\n if (padOffset) {\n return hexConcat([ bytes, padding.slice(padOffset) ]);\n }\n return hexlify(bytes);\n}\n\nconst hexTrue = hexZeroPad(One.toHexString(), 32);\nconst hexFalse = hexZeroPad(Zero.toHexString(), 32);\n\nconst domainFieldTypes: Record = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\n\nconst domainFieldNames: Array = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\n\nfunction checkString(key: string): (value: any) => string {\n return function (value: any){\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid domain value for ${ JSON.stringify(key) }`, `domain.${ key }`, value);\n }\n return value;\n }\n}\n\nconst domainChecks: Record any> = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value: any) {\n try {\n return BigNumber.from(value).toString()\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value for \"chainId\"`, \"domain.chainId\", value);\n },\n verifyingContract: function(value: any) {\n try {\n return getAddress(value).toLowerCase();\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value: any) {\n try {\n const bytes = arrayify(value);\n if (bytes.length !== 32) { throw new Error(\"bad length\"); }\n return hexlify(bytes);\n } catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"salt\"`, \"domain.salt\", value);\n }\n}\n\nfunction getBaseEncoder(type: string): (value: any) => string {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n const signed = (match[1] === \"\");\n\n const width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n\n const boundsUpper = MaxUint256.mask(signed ? (width - 1): width);\n const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne): Zero;\n\n return function(value: BigNumberish) {\n const v = BigNumber.from(value);\n\n if (v.lt(boundsLower) || v.gt(boundsUpper)) {\n logger.throwArgumentError(`value out-of-bounds for ${ type }`, \"value\", value);\n }\n\n return hexZeroPad(v.toTwos(256).toHexString(), 32);\n };\n }\n }\n\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n if (width === 0 || width > 32 || match[1] !== String(width)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n\n return function(value: BytesLike) {\n const bytes = arrayify(value);\n if (bytes.length !== width) {\n logger.throwArgumentError(`invalid length for ${ type }`, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n\n switch (type) {\n case \"address\": return function(value: string) {\n return hexZeroPad(getAddress(value), 32);\n };\n case \"bool\": return function(value: boolean) {\n return ((!value) ? hexFalse: hexTrue);\n };\n case \"bytes\": return function(value: BytesLike) {\n return keccak256(value);\n };\n case \"string\": return function(value: string) {\n return id(value);\n };\n }\n\n return null;\n}\n\nfunction encodeType(name: string, fields: Array): string {\n return `${ name }(${ fields.map(({ name, type }) => (type + \" \" + name)).join(\",\") })`;\n}\n\nexport class TypedDataEncoder {\n readonly primaryType: string;\n readonly types: Record>;\n\n readonly _encoderCache: Record string>;\n readonly _types: Record;\n\n constructor(types: Record>) {\n defineReadOnly(this, \"types\", Object.freeze(deepCopy(types)));\n\n defineReadOnly(this, \"_encoderCache\", { });\n defineReadOnly(this, \"_types\", { });\n\n // Link struct types to their direct child structs\n const links: Record> = { };\n\n // Link structs to structs which contain them as a child\n const parents: Record> = { };\n\n // Link all subtypes within a given struct\n const subtypes: Record> = { };\n\n Object.keys(types).forEach((type) => {\n links[type] = { };\n parents[type] = [ ];\n subtypes[type] = { }\n });\n\n for (const name in types) {\n\n const uniqueNames: Record = { };\n\n types[name].forEach((field) => {\n\n // Check each field has a unique name\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(`duplicate variable name ${ JSON.stringify(field.name) } in ${ JSON.stringify(name) }`, \"types\", types);\n }\n uniqueNames[field.name] = true;\n\n // Get the base type (drop any array specifiers)\n const baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) { return ;}\n\n if (!parents[baseType]) {\n logger.throwArgumentError(`unknown type ${ JSON.stringify(baseType) }`, \"types\", types);\n }\n\n // Add linkage\n parents[baseType].push(name);\n links[name][baseType] = true;\n });\n }\n\n // Deduce the primary type\n const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0));\n\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(`ambiguous primary types or unused types: ${ primaryTypes.map((t) => (JSON.stringify(t))).join(\", \") }`, \"types\", types);\n }\n\n defineReadOnly(this, \"primaryType\", primaryTypes[0]);\n\n // Check for circular type references\n function checkCircular(type: string, found: Record) {\n if (found[type]) {\n logger.throwArgumentError(`circular type reference to ${ JSON.stringify(type) }`, \"types\", types);\n }\n\n found[type] = true;\n\n Object.keys(links[type]).forEach((child) => {\n if (!parents[child]) { return; }\n\n // Recursively check children\n checkCircular(child, found);\n\n // Mark all ancestors as having this decendant\n Object.keys(found).forEach((subtype) => {\n subtypes[subtype][child] = true;\n });\n });\n\n delete found[type];\n }\n checkCircular(this.primaryType, { });\n\n // Compute each fully describe type\n for (const name in subtypes) {\n const st = Object.keys(subtypes[name]);\n st.sort();\n this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\");\n }\n }\n\n getEncoder(type: string): (value: any) => string {\n let encoder = this._encoderCache[type];\n if (!encoder) {\n encoder = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder;\n }\n\n _getEncoder(type: string): (value: any) => string {\n\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return encoder; }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const subEncoder = this.getEncoder(subtype);\n const length = parseInt(match[3]);\n return (value: Array) => {\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n\n let result = value.map(subEncoder);\n if (this._types[subtype]) {\n result = result.map(keccak256);\n }\n\n return keccak256(hexConcat(result));\n };\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this._types[type]);\n return (value: Record) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this._types[type]) { return keccak256(result); }\n return result;\n });\n values.unshift(encodedType);\n return hexConcat(values);\n }\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n encodeType(name: string): string {\n const result = this._types[name];\n if (!result) {\n logger.throwArgumentError(`unknown type: ${ JSON.stringify(name) }`, \"name\", name);\n }\n return result;\n }\n\n encodeData(type: string, value: any): string {\n return this.getEncoder(type)(value);\n }\n\n hashStruct(name: string, value: Record): string {\n return keccak256(this.encodeData(name, value));\n }\n\n encode(value: Record): string {\n return this.encodeData(this.primaryType, value);\n }\n\n hash(value: Record): string {\n return this.hashStruct(this.primaryType, value);\n }\n\n _visit(type: string, value: any, callback: (type: string, data: any) => any): any {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) { return callback(type, value); }\n }\n\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const length = parseInt(match[3]);\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map((v: any) => this._visit(subtype, v, callback));\n }\n\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, >{});\n }\n\n return logger.throwArgumentError(`unknown type: ${ type }`, \"type\", type);\n }\n\n visit(value: Record, callback: (type: string, data: any) => any): any {\n return this._visit(this.primaryType, value, callback);\n }\n\n static from(types: Record>): TypedDataEncoder {\n return new TypedDataEncoder(types);\n }\n\n static getPrimaryType(types: Record>): string {\n return TypedDataEncoder.from(types).primaryType;\n }\n\n static hashStruct(name: string, types: Record>, value: Record): string {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n\n static hashDomain(domain: TypedDataDomain): string {\n const domainFields: Array = [ ];\n for (const name in domain) {\n const type = domainFieldTypes[name];\n if (!type) {\n logger.throwArgumentError(`invalid typed-data domain key: ${ JSON.stringify(name) }`, \"domain\", domain);\n }\n domainFields.push({ name, type });\n }\n\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n\n static encode(domain: TypedDataDomain, types: Record>, value: Record): string {\n return hexConcat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n\n static hash(domain: TypedDataDomain, types: Record>, value: Record): string {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n\n // Replaces all address types with ENS names with their looked up address\n static async resolveNames(domain: TypedDataDomain, types: Record>, value: Record, resolveName: (name: string) => Promise): Promise<{ domain: TypedDataDomain, value: any }> {\n // Make a copy to isolate it from the object passed in\n domain = shallowCopy(domain);\n\n // Look up all ENS names\n const ensCache: Record = { };\n\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n\n // Get a list of all the addresses\n encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n\n // Replace all ENS names with their address\n value = encoder.visit(value, (type: string, value: any) => {\n if (type === \"address\" && ensCache[value]) { return ensCache[value]; }\n return value;\n });\n\n return { domain, value };\n }\n\n static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n\n // Derive the EIP712Domain Struct reference type\n const domainValues: Record = { };\n const domainTypes: Array<{ name: string, type:string }> = [ ];\n\n domainFieldNames.forEach((name) => {\n const value = (domain)[name];\n if (value == null) { return; }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n\n const encoder = TypedDataEncoder.from(types);\n\n const typesWithDomain = shallowCopy(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n\n // Validate the data structures and types\n encoder.encode(value);\n\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type: string, value: any) => {\n\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(arrayify(value));\n }\n\n // uint or int\n if (type.match(/^u?int/)) {\n return BigNumber.from(value).toString();\n }\n\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(`invalid string`, \"value\", value);\n }\n return value;\n }\n\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n }\n}\n\n","\"use strict\";\n\nimport { id } from \"./id\";\nimport { isValidName, namehash } from \"./namehash\";\nimport { hashMessage, messagePrefix } from \"./message\";\n\nimport { TypedDataEncoder as _TypedDataEncoder } from \"./typed-data\";\n\nexport {\n id,\n\n namehash,\n isValidName,\n\n messagePrefix,\n hashMessage,\n\n _TypedDataEncoder,\n}\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { id } from \"@ethersproject/hash\";\nimport { keccak256 } from \"@ethersproject/keccak256\"\nimport { defineReadOnly, Description, getStatic } from \"@ethersproject/properties\";\n\nimport { AbiCoder, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Result } from \"./coders/abstract-coder\";\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, ParamType } from \"./fragments\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport { checkResultErrors, Result };\n\nexport class LogDescription extends Description {\n readonly eventFragment: EventFragment;\n readonly name: string;\n readonly signature: string;\n readonly topic: string;\n readonly args: Result\n}\n\nexport class TransactionDescription extends Description {\n readonly functionFragment: FunctionFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n readonly value: BigNumber;\n}\n\nexport class ErrorDescription extends Description {\n readonly errorFragment: ErrorFragment;\n readonly name: string;\n readonly args: Result;\n readonly signature: string;\n readonly sighash: string;\n}\n\nexport class Indexed extends Description {\n readonly hash: string;\n readonly _isIndexed: boolean;\n\n static isIndexed(value: any): value is Indexed {\n return !!(value && value._isIndexed);\n }\n}\n\nconst BuiltinErrors: Record, name: string, reason?: boolean }> = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [ \"string\" ], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [ \"uint256\" ] }\n}\n\nfunction wrapAccessError(property: string, error: Error): Error {\n const wrap = new Error(`deferred error during ABI decoding triggered accessing ${ property }`);\n (wrap).error = error;\n return wrap;\n}\n\n/*\nfunction checkNames(fragment: Fragment, type: \"input\" | \"output\", params: Array): void {\n params.reduce((accum, param) => {\n if (param.name) {\n if (accum[param.name]) {\n logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format(\"full\") }`, \"fragment\", fragment);\n }\n accum[param.name] = true;\n }\n return accum;\n }, <{ [ name: string ]: boolean }>{ });\n}\n*/\nexport class Interface {\n readonly fragments: ReadonlyArray;\n\n readonly errors: { [ name: string ]: ErrorFragment };\n readonly events: { [ name: string ]: EventFragment };\n readonly functions: { [ name: string ]: FunctionFragment };\n readonly structs: { [ name: string ]: any };\n\n readonly deploy: ConstructorFragment;\n\n readonly _abiCoder: AbiCoder;\n\n readonly _isInterface: boolean;\n\n constructor(fragments: string | ReadonlyArray) {\n logger.checkNew(new.target, Interface);\n\n let abi: ReadonlyArray = [ ];\n if (typeof(fragments) === \"string\") {\n abi = JSON.parse(fragments);\n } else {\n abi = fragments;\n }\n\n defineReadOnly(this, \"fragments\", abi.map((fragment) => {\n return Fragment.from(fragment);\n }).filter((fragment) => (fragment != null)));\n\n defineReadOnly(this, \"_abiCoder\", getStatic<() => AbiCoder>(new.target, \"getAbiCoder\")());\n\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"errors\", { });\n defineReadOnly(this, \"events\", { });\n defineReadOnly(this, \"structs\", { });\n\n // Add all fragments by their signature\n this.fragments.forEach((fragment) => {\n let bucket: { [ name: string ]: Fragment } = null;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineReadOnly(this, \"deploy\", fragment);\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.events;\n break;\n case \"error\":\n bucket = this.errors;\n break;\n default:\n return;\n }\n\n let signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n\n bucket[signature] = fragment;\n });\n\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineReadOnly(this, \"deploy\", ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n\n defineReadOnly(this, \"_isInterface\", true);\n }\n\n format(format?: string): string | Array {\n if (!format) { format = FormatTypes.full; }\n if (format === FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n\n const abi = this.fragments.map((fragment) => fragment.format(format));\n\n // We need to re-bundle the JSON fragments a bit\n if (format === FormatTypes.json) {\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n\n return abi;\n }\n\n // Sub-classes can override these to handle other blockchains\n static getAbiCoder(): AbiCoder {\n return defaultAbiCoder;\n }\n\n static getAddress(address: string): string {\n return getAddress(address);\n }\n\n static getSighash(fragment: ErrorFragment | FunctionFragment): string {\n return hexDataSlice(id(fragment.format()), 0, 4);\n }\n\n static getEventTopic(eventFragment: EventFragment): string {\n return id(eventFragment.format());\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getFunction(nameOrSignatureOrSighash: string): FunctionFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n for (const name in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name)) {\n return this.functions[name];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.functions).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name);\n }\n\n return this.functions[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Find an event definition by any means necessary (unless it is ambiguous)\n getEvent(nameOrSignatureOrTopic: string): EventFragment {\n if (isHexString(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n\n return this.events[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }\n\n // Find a function definition by any means necessary (unless it is ambiguous)\n getError(nameOrSignatureOrSighash: string): ErrorFragment {\n if (isHexString(nameOrSignatureOrSighash)) {\n const getSighash = getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\");\n for (const name in this.errors) {\n const error = this.errors[name];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.errors).filter((f) => (f.split(\"(\"/* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name);\n }\n\n return this.errors[matching[0]];\n }\n\n // Normalize the signature and lookup the function\n const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n\n // Get the sighash (the bytes4 selector) used by Solidity to identify a function\n getSighash(fragment: ErrorFragment | FunctionFragment | string): string {\n if (typeof(fragment) === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_) {\n throw error;\n }\n }\n }\n\n return getStatic<(f: ErrorFragment | FunctionFragment) => string>(this.constructor, \"getSighash\")(fragment);\n }\n\n // Get the topic (the bytes32 hash) used by Solidity to identify an event\n getEventTopic(eventFragment: EventFragment | string): string {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n return getStatic<(e: EventFragment) => string>(this.constructor, \"getEventTopic\")(eventFragment);\n }\n\n\n _decodeParams(params: ReadonlyArray, data: BytesLike): Result {\n return this._abiCoder.decode(params, data)\n }\n\n _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string {\n return this._abiCoder.encode(params, values)\n }\n\n encodeDeploy(values?: ReadonlyArray): string {\n return this._encodeParams(this.deploy.inputs, values || [ ]);\n }\n\n decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(`data signature does not match error ${ fragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n }\n\n encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string {\n if (typeof(fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n\n return hexlify(concat([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the data for a function call (e.g. tx.data)\n decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n const bytes = arrayify(data);\n\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(`data signature does not match function ${ functionFragment.name }.`, \"data\", hexlify(bytes));\n }\n\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n }\n\n // Encode the data for a function call (e.g. tx.data)\n encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(concat([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [ ])\n ]));\n }\n\n // Decode the result from a function call (e.g. from eth_call)\n decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n let bytes = arrayify(data);\n\n let reason: string = null;\n let errorArgs: Result = null;\n let errorName: string = null;\n let errorSignature: string = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error) { }\n break;\n\n case 4: {\n const selector = hexlify(bytes.slice(0, 4));\n const builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) { reason = errorArgs[0]; }\n } else {\n try {\n const error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error) {\n console.log(error);\n }\n }\n break;\n }\n }\n\n return logger.throwError(\"call revert exception\", Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n errorArgs, errorName, errorSignature, reason\n });\n }\n\n // Encode the result for a function call (e.g. for eth_call)\n encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray): string {\n if (typeof(functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return hexlify(this._abiCoder.encode(functionFragment.outputs, values || [ ]));\n }\n\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array> {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n })\n }\n\n let topics: Array> = [];\n if (!eventFragment.anonymous) { topics.push(this.getEventTopic(eventFragment)); }\n\n const encodeTopic = (param: ParamType, value: any): string => {\n if (param.type === \"string\") {\n return id(value);\n } else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n\n // Check addresses are valid\n if (param.type === \"address\") { this._abiCoder.encode( [ \"address\" ], [ value ]); }\n return hexZeroPad(hexlify(value), 32);\n };\n\n values.forEach((value, index) => {\n\n let param = eventFragment.inputs[index];\n\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n }\n return;\n }\n\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n\n return topics;\n }\n\n encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { data: string, topics: Array } {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n const topics: Array = [ ];\n\n const dataTypes: Array = [ ];\n const dataValues: Array = [ ];\n\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n\n eventFragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value))\n } else if (param.type === \"bytes\") {\n topics.push(keccak256(value))\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n } else {\n topics.push(this._abiCoder.encode([ param.type] , [ value ]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n\n return {\n data: this._abiCoder.encode(dataTypes , dataValues),\n topics: topics\n };\n }\n\n // Decode a filter for the event and the search criteria\n decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result {\n if (typeof(eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n\n let indexed: Array = [];\n let nonIndexed: Array = [];\n let dynamic: Array = [];\n\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)): null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n\n let result: (Array & { [ key: string ]: any }) = [ ];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n\n } else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n\n } else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n } else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index] = error;\n }\n }\n\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: () => { throw wrapAccessError(`property ${ JSON.stringify(param.name) }`, value); }\n });\n } else {\n result[param.name] = value;\n }\n }\n });\n\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n enumerable: true,\n get: () => { throw wrapAccessError(`index ${ i }`, value); }\n });\n }\n }\n\n return Object.freeze(result);\n }\n\n // Given a transaction, find the matching function fragment (if any) and\n // determine all its properties and call parameters\n parseTransaction(tx: { data: string, value?: BigNumberish }): TransactionDescription {\n let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: BigNumber.from(tx.value || \"0\"),\n });\n }\n\n // @TODO\n //parseCallResult(data: BytesLike): ??\n\n // Given an event log, find the matching event fragment (if any) and\n // determine all its properties and values\n parseLog(log: { topics: Array, data: string}): LogDescription {\n let fragment = this.getEvent(log.topics[0]);\n\n if (!fragment || fragment.anonymous) { return null; }\n\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n\n\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }\n\n parseError(data: BytesLike): ErrorDescription {\n const hexData = hexlify(data);\n let fragment = this.getError(hexData.substring(0, 10).toLowerCase())\n\n if (!fragment) { return null; }\n\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n });\n }\n\n\n /*\n static from(value: Array | string | Interface) {\n if (Interface.isInterface(value)) {\n return value;\n }\n if (typeof(value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n return new Interface(value);\n }\n */\n\n static isInterface(value: any): value is Interface {\n return !!(value && value._isInterface);\n }\n}\n\n","\"use strict\";\n\nimport { ConstructorFragment, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, JsonFragment, JsonFragmentType, ParamType } from \"./fragments\";\nimport { AbiCoder, CoerceFunc, defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors, Indexed, Interface, LogDescription, Result, TransactionDescription } from \"./interface\";\n\nexport {\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n Fragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n AbiCoder,\n defaultAbiCoder,\n\n Interface,\n Indexed,\n\n /////////////////////////\n // Types\n\n CoerceFunc,\n JsonFragment,\n JsonFragmentType,\n\n Result,\n checkResultErrors,\n\n LogDescription,\n TransactionDescription\n};\n","export const version = \"abstract-provider/5.5.1\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { BytesLike, isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { Deferrable, Description, defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { AccessListish, Transaction } from \"@ethersproject/transactions\";\nimport { OnceBlockable } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\n\nexport type TransactionRequest = {\n to?: string,\n from?: string,\n nonce?: BigNumberish,\n\n gasLimit?: BigNumberish,\n gasPrice?: BigNumberish,\n\n data?: BytesLike,\n value?: BigNumberish,\n chainId?: number\n\n type?: number;\n accessList?: AccessListish;\n\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n\n customData?: Record;\n}\n\nexport interface TransactionResponse extends Transaction {\n hash: string;\n\n // Only if a transaction has been mined\n blockNumber?: number,\n blockHash?: string,\n timestamp?: number,\n\n confirmations: number,\n\n // Not optional (as it is in Transaction)\n from: string;\n\n // The raw transaction\n raw?: string,\n\n // This function waits until the transaction has been mined\n wait: (confirmations?: number) => Promise\n};\n\nexport type BlockTag = string | number;\n\nexport interface _Block {\n hash: string;\n parentHash: string;\n number: number;\n\n timestamp: number;\n nonce: string;\n difficulty: number;\n _difficulty: BigNumber;\n\n gasLimit: BigNumber;\n gasUsed: BigNumber;\n\n miner: string;\n extraData: string;\n\n baseFeePerGas?: null | BigNumber;\n}\n\nexport interface Block extends _Block {\n transactions: Array;\n}\n\nexport interface BlockWithTransactions extends _Block {\n transactions: Array;\n}\n\n\nexport interface Log {\n blockNumber: number;\n blockHash: string;\n transactionIndex: number;\n\n removed: boolean;\n\n address: string;\n data: string;\n\n topics: Array;\n\n transactionHash: string;\n logIndex: number;\n}\n\nexport interface TransactionReceipt {\n to: string;\n from: string;\n contractAddress: string,\n transactionIndex: number,\n root?: string,\n gasUsed: BigNumber,\n logsBloom: string,\n blockHash: string,\n transactionHash: string,\n logs: Array,\n blockNumber: number,\n confirmations: number,\n cumulativeGasUsed: BigNumber,\n effectiveGasPrice: BigNumber,\n byzantium: boolean,\n type: number;\n status?: number\n};\n\nexport interface FeeData {\n maxFeePerGas: null | BigNumber;\n maxPriorityFeePerGas: null | BigNumber;\n gasPrice: null | BigNumber;\n}\n\nexport interface EventFilter {\n address?: string;\n topics?: Array | null>;\n}\n\nexport interface Filter extends EventFilter {\n fromBlock?: BlockTag,\n toBlock?: BlockTag,\n}\n\nexport interface FilterByBlockHash extends EventFilter {\n blockHash?: string;\n}\n\n//export type CallTransactionable = {\n// call(transaction: TransactionRequest): Promise;\n//};\n\nexport abstract class ForkEvent extends Description {\n readonly expiry: number;\n\n readonly _isForkEvent?: boolean;\n\n static isForkEvent(value: any): value is ForkEvent {\n return !!(value && value._isForkEvent);\n }\n}\n\nexport class BlockForkEvent extends ForkEvent {\n readonly blockHash: string;\n\n readonly _isBlockForkEvent?: boolean;\n\n constructor(blockHash: string, expiry?: number) {\n if (!isHexString(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n\n super({\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: (expiry || 0),\n blockHash: blockHash\n });\n }\n}\n\nexport class TransactionForkEvent extends ForkEvent {\n readonly hash: string;\n\n readonly _isTransactionOrderForkEvent?: boolean;\n\n constructor(hash: string, expiry?: number) {\n if (!isHexString(hash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: (expiry || 0),\n hash: hash\n });\n }\n}\n\nexport class TransactionOrderForkEvent extends ForkEvent {\n readonly beforeHash: string;\n readonly afterHash: string;\n\n constructor(beforeHash: string, afterHash: string, expiry?: number) {\n if (!isHexString(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!isHexString(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n\n super({\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: (expiry || 0),\n beforeHash: beforeHash,\n afterHash: afterHash\n });\n }\n}\n\nexport type EventType = string | Array> | EventFilter | ForkEvent;\n\nexport type Listener = (...args: Array) => void;\n\n///////////////////////////////\n// Exported Abstracts\nexport abstract class Provider implements OnceBlockable {\n\n // Network\n abstract getNetwork(): Promise;\n\n // Latest State\n abstract getBlockNumber(): Promise;\n abstract getGasPrice(): Promise;\n async getFeeData(): Promise {\n const { block, gasPrice } = await resolveProperties({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch((error) => {\n // @TODO: Why is this now failing on Calaveras?\n //console.log(error);\n return null;\n })\n });\n\n let maxFeePerGas = null, maxPriorityFeePerGas = null;\n\n if (block && block.baseFeePerGas) {\n // We may want to compute this more accurately in the future,\n // using the formula \"check if the base fee is correct\".\n // See: https://eips.ethereum.org/EIPS/eip-1559\n maxPriorityFeePerGas = BigNumber.from(\"2500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n\n return { maxFeePerGas, maxPriorityFeePerGas, gasPrice };\n }\n\n // Account\n abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise;\n abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise ;\n abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise;\n\n // Execution\n abstract sendTransaction(signedTransaction: string | Promise): Promise;\n abstract call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise;\n abstract estimateGas(transaction: Deferrable): Promise;\n\n // Queries\n abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise;\n abstract getTransaction(transactionHash: string): Promise;\n abstract getTransactionReceipt(transactionHash: string): Promise;\n\n // Bloom-filter Queries\n abstract getLogs(filter: Filter): Promise>;\n\n // ENS\n abstract resolveName(name: string | Promise): Promise;\n abstract lookupAddress(address: string | Promise): Promise;\n\n // Event Emitter (ish)\n abstract on(eventName: EventType, listener: Listener): Provider;\n abstract once(eventName: EventType, listener: Listener): Provider;\n abstract emit(eventName: EventType, ...args: Array): boolean\n abstract listenerCount(eventName?: EventType): number;\n abstract listeners(eventName?: EventType): Array;\n abstract off(eventName: EventType, listener?: Listener): Provider;\n abstract removeAllListeners(eventName?: EventType): Provider;\n\n // Alias for \"on\"\n addListener(eventName: EventType, listener: Listener): Provider {\n return this.on(eventName, listener);\n }\n\n // Alias for \"off\"\n removeListener(eventName: EventType, listener: Listener): Provider {\n return this.off(eventName, listener);\n }\n\n // @TODO: This *could* be implemented here, but would pull in events...\n abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise;\n\n readonly _isProvider: boolean;\n\n constructor() {\n logger.checkAbstract(new.target, Provider);\n defineReadOnly(this, \"_isProvider\", true);\n }\n\n static isProvider(value: any): value is Provider {\n return !!(value && value._isProvider);\n }\n\n/*\n static getResolver(network: Network, callable: CallTransactionable, namehash: string): string {\n // No ENS...\n if (!network.ensAddress) {\n errors.throwError(\n \"network does support ENS\",\n errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // Not a namehash\n if (!isHexString(namehash, 32)) {\n errors.throwArgumentError(\"invalid name hash\", \"namehash\", namehash);\n }\n\n // keccak256(\"resolver(bytes32)\")\n let data = \"0x0178b8bf\" + namehash.substring(2);\n let transaction = { to: network.ensAddress, data: data };\n\n return provider.call(transaction).then((data) => {\n return provider.formatter.callAddress(data);\n });\n }\n\n static resolveNamehash(network: Network, callable: CallTransactionable, namehash: string): string {\n return this.getResolver(network, callable, namehash).then((resolverAddress) => {\n if (!resolverAddress) { return null; }\n\n // keccak256(\"addr(bytes32)\")\n let data = \"0x3b3b57de\" + namehash(name).substring(2);\n let transaction = { to: resolverAddress, data: data };\n return callable.call(transaction).then((data) => {\n return this.formatter.callAddress(data);\n });\n\n })\n }\n*/\n}\n","export const version = \"abstract-signer/5.5.0\";\n","\"use strict\";\n\nimport { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst allowedTransactionKeys: Array = [\n \"accessList\", \"chainId\", \"customData\", \"data\", \"from\", \"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"to\", \"type\", \"value\"\n];\n\nconst forwardErrors = [\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n];\n\n// EIP-712 Typed Data\n// See: https://eips.ethereum.org/EIPS/eip-712\n\nexport interface TypedDataDomain {\n name?: string;\n version?: string;\n chainId?: BigNumberish;\n verifyingContract?: string;\n salt?: BytesLike;\n};\n\nexport interface TypedDataField {\n name: string;\n type: string;\n};\n\n// Sub-classes of Signer may optionally extend this interface to indicate\n// they have a private key available synchronously\nexport interface ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n}\n\n// Sub-Class Notes:\n// - A Signer MUST always make sure, that if present, the \"from\" field\n// matches the Signer, before sending or signing a transaction\n// - A Signer SHOULD always wrap private information (such as a private\n// key or mnemonic) in a function, so that console.log does not leak\n// the data\n\n// @TODO: This is a temporary measure to preserve backwards compatibility\n// In v6, the method on TypedDataSigner will be added to Signer\nexport interface TypedDataSigner {\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise;\n}\n\nexport abstract class Signer {\n readonly provider?: Provider;\n\n ///////////////////\n // Sub-classes MUST implement these\n\n // Returns the checksum address\n abstract getAddress(): Promise\n\n // Returns the signed prefixed-message. This MUST treat:\n // - Bytes as a binary message\n // - string as a UTF8-message\n // i.e. \"0x1234\" is a SIX (6) byte string, NOT 2 bytes of data\n abstract signMessage(message: Bytes | string): Promise;\n\n // Signs a transaction and returns the fully serialized, signed transaction.\n // The EXACT transaction MUST be signed, and NO additional properties to be added.\n // - This MAY throw if signing transactions is not supports, but if\n // it does, sentTransaction MUST be overridden.\n abstract signTransaction(transaction: Deferrable): Promise;\n\n // Returns a new instance of the Signer, connected to provider.\n // This MAY throw if changing providers is not supported.\n abstract connect(provider: Provider): Signer;\n\n readonly _isSigner: boolean;\n\n\n ///////////////////\n // Sub-classes MUST call super\n constructor() {\n logger.checkAbstract(new.target, Signer);\n defineReadOnly(this, \"_isSigner\", true);\n }\n\n\n ///////////////////\n // Sub-classes MAY override these\n\n async getBalance(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getBalance\");\n return await this.provider.getBalance(this.getAddress(), blockTag);\n }\n\n async getTransactionCount(blockTag?: BlockTag): Promise {\n this._checkProvider(\"getTransactionCount\");\n return await this.provider.getTransactionCount(this.getAddress(), blockTag);\n }\n\n // Populates \"from\" if unspecified, and estimates the gas for the transaction\n async estimateGas(transaction: Deferrable): Promise {\n this._checkProvider(\"estimateGas\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.estimateGas(tx);\n }\n\n // Populates \"from\" if unspecified, and calls with the transaction\n async call(transaction: Deferrable, blockTag?: BlockTag): Promise {\n this._checkProvider(\"call\");\n const tx = await resolveProperties(this.checkTransaction(transaction));\n return await this.provider.call(tx, blockTag);\n }\n\n // Populates all fields in a transaction, signs it and sends it to the network\n async sendTransaction(transaction: Deferrable): Promise {\n this._checkProvider(\"sendTransaction\");\n const tx = await this.populateTransaction(transaction);\n const signedTx = await this.signTransaction(tx);\n return await this.provider.sendTransaction(signedTx);\n }\n\n async getChainId(): Promise {\n this._checkProvider(\"getChainId\");\n const network = await this.provider.getNetwork();\n return network.chainId;\n }\n\n async getGasPrice(): Promise {\n this._checkProvider(\"getGasPrice\");\n return await this.provider.getGasPrice();\n }\n\n async getFeeData(): Promise {\n this._checkProvider(\"getFeeData\");\n return await this.provider.getFeeData();\n }\n\n\n async resolveName(name: string): Promise {\n this._checkProvider(\"resolveName\");\n return await this.provider.resolveName(name);\n }\n\n\n\n // Checks a transaction does not contain invalid keys and if\n // no \"from\" is provided, populates it.\n // - does NOT require a provider\n // - adds \"from\" is not present\n // - returns a COPY (safe to mutate the result)\n // By default called from: (overriding these prevents it)\n // - call\n // - estimateGas\n // - populateTransaction (and therefor sendTransaction)\n checkTransaction(transaction: Deferrable): Deferrable {\n for (const key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n\n const tx = shallowCopy(transaction);\n\n if (tx.from == null) {\n tx.from = this.getAddress();\n\n } else {\n // Make sure any provided address matches this signer\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then((result) => {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n\n return tx;\n }\n\n // Populates ALL keys for a transaction and checks that \"from\" matches\n // this Signer. Should be used by sendTransaction but NOT by signTransaction.\n // By default called from: (overriding these prevents it)\n // - sendTransaction\n //\n // Notes:\n // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas\n async populateTransaction(transaction: Deferrable): Promise {\n\n const tx: Deferrable = await resolveProperties(this.checkTransaction(transaction))\n\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n\n // Prevent this error from causing an UnhandledPromiseException\n tx.to.catch((error) => { });\n }\n\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null);\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n\n if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n tx.type = 2;\n\n } else if (tx.type === 0 || tx.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n\n // Populate missing gasPrice\n if (tx.gasPrice == null) { tx.gasPrice = this.getGasPrice(); }\n\n } else {\n\n // We need to get fee data to determine things\n const feeData = await this.getFeeData();\n\n if (tx.type == null) {\n // We need to auto-detect the intended type of this transaction...\n\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n\n // Upgrade transaction from null to eip-1559\n tx.type = 2;\n\n if (tx.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n\n } else {\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n\n } else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n\n // ...but they are trying to use EIP-1559 properties\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n\n // Populate missing fee data\n if (tx.gasPrice == null) { tx.gasPrice = feeData.gasPrice; }\n\n // Explicitly set untyped transaction to legacy\n tx.type = 0;\n\n } else {\n // getFeeData has failed us.\n logger.throwError(\"failed to get consistent fee data\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n\n } else if (tx.type === 2) {\n // Explicitly using EIP-1559\n\n // Populate missing fee data\n if (tx.maxFeePerGas == null) { tx.maxFeePerGas = feeData.maxFeePerGas; }\n if (tx.maxPriorityFeePerGas == null) { tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; }\n }\n }\n\n if (tx.nonce == null) { tx.nonce = this.getTransactionCount(\"pending\"); }\n\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch((error) => {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error: error,\n tx: tx\n });\n });\n }\n\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then((results) => {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n\n return await resolveProperties(tx);\n }\n\n\n ///////////////////\n // Sub-classes SHOULD leave these alone\n\n _checkProvider(operation?: string): void {\n if (!this.provider) { logger.throwError(\"missing provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: (operation || \"_checkProvider\") });\n }\n }\n\n static isSigner(value: any): value is Signer {\n return !!(value && value._isSigner);\n }\n}\n\nexport class VoidSigner extends Signer implements TypedDataSigner {\n readonly address: string;\n\n constructor(address: string, provider?: Provider) {\n logger.checkNew(new.target, VoidSigner);\n super();\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n _fail(message: string, operation: string): Promise {\n return Promise.resolve().then(() => {\n logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation });\n });\n }\n\n signMessage(message: Bytes | string): Promise {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n }\n\n _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n }\n\n connect(provider: Provider): VoidSigner {\n return new VoidSigner(this.address, provider);\n }\n}\n\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","import _ec from \"elliptic\";\nimport EC = _ec.ec;\n\nexport { EC }\n","export const version = \"signing-key/5.5.0\";\n","\"use strict\";\n\nimport { EC } from \"./elliptic\";\n\nimport { arrayify, BytesLike, hexlify, hexZeroPad, Signature, SignatureLike, splitSignature } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nlet _curve: EC = null\nfunction getCurve() {\n if (!_curve) {\n _curve = new EC(\"secp256k1\");\n }\n return _curve;\n}\n\nexport class SigningKey {\n\n readonly curve: string;\n\n readonly privateKey: string;\n readonly publicKey: string;\n readonly compressedPublicKey: string;\n\n //readonly address: string;\n\n readonly _isSigningKey: boolean;\n\n constructor(privateKey: BytesLike) {\n defineReadOnly(this, \"curve\", \"secp256k1\");\n\n defineReadOnly(this, \"privateKey\", hexlify(privateKey));\n\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n\n defineReadOnly(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n defineReadOnly(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n\n defineReadOnly(this, \"_isSigningKey\", true);\n }\n\n _addPoint(other: BytesLike): string {\n const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));\n const p1 = getCurve().keyFromPublic(arrayify(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n }\n\n signDigest(digest: BytesLike): Signature {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const digestBytes = arrayify(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n const signature = keyPair.sign(digestBytes, { canonical: true });\n return splitSignature({\n recoveryParam: signature.recoveryParam,\n r: hexZeroPad(\"0x\" + signature.r.toString(16), 32),\n s: hexZeroPad(\"0x\" + signature.s.toString(16), 32),\n })\n }\n\n computeSharedSecret(otherKey: BytesLike): string {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));\n return hexZeroPad(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n }\n\n static isSigningKey(value: any): value is SigningKey {\n return !!(value && value._isSigningKey);\n }\n}\n\nexport function recoverPublicKey(digest: BytesLike, signature: SignatureLike): string {\n const sig = splitSignature(signature);\n const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };\n return \"0x\" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n}\n\nexport function computePublicKey(key: BytesLike, compressed?: boolean): string {\n const bytes = arrayify(key);\n\n if (bytes.length === 32) {\n const signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n\n } else if (bytes.length === 33) {\n if (compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n\n } else if (bytes.length === 65) {\n if (!compressed) { return hexlify(bytes); }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n}\n\n","export const version = \"transactions/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, DataOptions, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, SignatureLike, splitSignature, stripZeros, } from \"@ethersproject/bytes\";\nimport { Zero } from \"@ethersproject/constants\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { checkProperties } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey } from \"@ethersproject/signing-key\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n///////////////////////////////\n// Exported Types\n\nexport type AccessList = Array<{ address: string, storageKeys: Array }>;\n\n// Input allows flexibility in describing an access list\nexport type AccessListish = AccessList |\n Array<[ string, Array ]> |\n Record>;\n\nexport enum TransactionTypes {\n legacy = 0,\n eip2930 = 1,\n eip1559 = 2,\n};\n\nexport type UnsignedTransaction = {\n to?: string;\n nonce?: number;\n\n gasLimit?: BigNumberish;\n gasPrice?: BigNumberish;\n\n data?: BytesLike;\n value?: BigNumberish;\n chainId?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessListish;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumberish;\n maxFeePerGas?: BigNumberish;\n}\n\nexport interface Transaction {\n hash?: string;\n\n to?: string;\n from?: string;\n nonce: number;\n\n gasLimit: BigNumber;\n gasPrice?: BigNumber;\n\n data: string;\n value: BigNumber;\n chainId: number;\n\n r?: string;\n s?: string;\n v?: number;\n\n // Typed-Transaction features\n type?: number | null;\n\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList?: AccessList;\n\n // EIP-1559; Type 2\n maxPriorityFeePerGas?: BigNumber;\n maxFeePerGas?: BigNumber;\n}\n\n///////////////////////////////\n\nfunction handleAddress(value: string): string {\n if (value === \"0x\") { return null; }\n return getAddress(value);\n}\n\nfunction handleNumber(value: string): BigNumber {\n if (value === \"0x\") { return Zero; }\n return BigNumber.from(value);\n}\n\n// Legacy Transaction Fields\nconst transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" },\n];\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, type: true, value: true\n}\n\nexport function computeAddress(key: BytesLike | string): string {\n const publicKey = computePublicKey(key);\n return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));\n}\n\nexport function recoverAddress(digest: BytesLike, signature: SignatureLike): string {\n return computeAddress(recoverPublicKey(arrayify(digest), signature));\n}\n\nfunction formatNumber(value: BigNumberish, name: string): Uint8Array {\n const result = stripZeros(BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, (\"transaction:\" + name), value);\n }\n return result;\n}\n\nfunction accessSetify(addr: string, storageKeys: Array): { address: string,storageKeys: Array } {\n return {\n address: getAddress(addr),\n storageKeys: (storageKeys || []).map((storageKey, index) => {\n if (hexDataLength(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", `accessList[${ addr }:${ index }]`, storageKey)\n }\n return storageKey.toLowerCase();\n })\n };\n}\n\nexport function accessListify(value: AccessListish): AccessList {\n if (Array.isArray(value)) {\n return (] | { address: string, storageKeys: Array}>>value).map((set, index) => {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", `value[${ index }]`, set);\n }\n return accessSetify(set[0], set[1])\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n\n const result: Array<{ address: string, storageKeys: Array }> = Object.keys(value).map((addr) => {\n const storageKeys: Record = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, >{ });\n return accessSetify(addr, Object.keys(storageKeys).sort())\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\n\nfunction formatAccessList(value: AccessListish): Array<[ string, Array ]> {\n return accessListify(value).map((set) => [ set.address, set.storageKeys ]);\n}\n\nfunction _serializeEip1559(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // If there is an explicit gasPrice, make sure it matches the\n // EIP-1559 fees; otherwise they may not understand what they\n // think they are setting in terms of fee.\n if (transaction.gasPrice != null) {\n const gasPrice = BigNumber.from(transaction.gasPrice);\n const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice, maxFeePerGas\n });\n }\n }\n\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x02\", RLP.encode(fields)]);\n}\n\nfunction _serializeEip2930(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n const fields: any = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to): \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n\n return hexConcat([ \"0x01\", RLP.encode(fields)]);\n}\n\n// Legacy Transactions and EIP-155\nfunction _serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n checkProperties(transaction, allowedTransactionKeys);\n\n const raw: Array = [];\n\n transactionFields.forEach(function(fieldInfo) {\n let value = (transaction)[fieldInfo.name] || ([]);\n const options: DataOptions = { };\n if (fieldInfo.numeric) { options.hexPad = \"left\"; }\n value = arrayify(hexlify(value, options));\n\n // Fixed-width field\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n\n // Variable-width (with a maximum)\n if (fieldInfo.maxLength) {\n value = stripZeros(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value );\n }\n }\n\n raw.push(hexlify(value));\n });\n\n let chainId = 0;\n if (transaction.chainId != null) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = transaction.chainId;\n\n if (typeof(chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n\n } else if (signature && !isBytesLike(signature) && signature.v > 28) {\n // No chainId provided, but the signature is signing with EIP-155; derive chainId\n chainId = Math.floor((signature.v - 35) / 2);\n }\n\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== 0) {\n raw.push(hexlify(chainId)); // @TODO: hexValue?\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n\n // Requesting an unsigned transaction\n if (!signature) {\n return RLP.encode(raw);\n }\n\n // The splitSignature will ensure the transaction has a recoveryParam in the\n // case that the signTransaction function only adds a v.\n const sig = splitSignature(signature);\n\n // We pushed a chainId and null r, s on for hashing only; remove those\n let v = 27 + sig.recoveryParam\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v += chainId * 2 + 8;\n\n // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it!\n if (sig.v > 28 && sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n\n raw.push(hexlify(v));\n raw.push(stripZeros(arrayify(sig.r)));\n raw.push(stripZeros(arrayify(sig.s)));\n\n return RLP.encode(raw);\n}\n\nexport function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {\n // Legacy and EIP-155 Transactions\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n\n // Typed Transactions (EIP-2718)\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ transaction.type }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n}\n\nfunction _parseEipSignature(tx: Transaction, fields: Array, serialize: (tx: UnsignedTransaction) => string): void {\n try {\n const recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) { throw new Error(\"bad recid\"); }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n\n tx.r = hexZeroPad(fields[1], 32);\n tx.s = hexZeroPad(fields[2], 32);\n\n try {\n const digest = keccak256(serialize(tx));\n tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n console.log(error);\n }\n}\n\nfunction _parseEip1559(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", hexlify(payload));\n }\n\n const maxPriorityFeePerGas = handleNumber(transaction[2]);\n const maxFeePerGas = handleNumber(transaction[3]);\n const tx: Transaction = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas: maxPriorityFeePerGas,\n maxFeePerGas: maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8]),\n };\n\n // Unsigned EIP-1559 Transaction\n if (transaction.length === 9) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n\n return tx;\n}\n\nfunction _parseEip2930(payload: Uint8Array): Transaction {\n const transaction = RLP.decode(payload.slice(1));\n\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", hexlify(payload));\n }\n\n const tx: Transaction = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n\n // Unsigned EIP-2930 Transaction\n if (transaction.length === 8) { return tx; }\n\n tx.hash = keccak256(payload);\n\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n\n return tx;\n}\n\n// Legacy Transactions and EIP-155\nfunction _parse(rawTransaction: Uint8Array): Transaction {\n const transaction = RLP.decode(rawTransaction);\n\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n\n const tx: Transaction = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n\n // Legacy unsigned transaction\n if (transaction.length === 6) { return tx; }\n\n try {\n tx.v = BigNumber.from(transaction[6]).toNumber();\n\n } catch (error) {\n console.log(error);\n return tx;\n }\n\n tx.r = hexZeroPad(transaction[7], 32);\n tx.s = hexZeroPad(transaction[8], 32);\n\n if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) {\n // EIP-155 unsigned transaction\n tx.chainId = tx.v;\n tx.v = 0;\n\n } else {\n // Signed Transaction\n\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) { tx.chainId = 0; }\n\n let recoveryParam = tx.v - 27;\n\n const raw = transaction.slice(0, 6);\n\n if (tx.chainId !== 0) {\n raw.push(hexlify(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n\n const digest = keccak256(RLP.encode(raw));\n try {\n tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam });\n } catch (error) {\n console.log(error);\n }\n\n tx.hash = keccak256(rawTransaction);\n }\n\n tx.type = null;\n\n return tx;\n}\n\n\nexport function parse(rawTransaction: BytesLike): Transaction {\n const payload = arrayify(rawTransaction);\n\n // Legacy and EIP-155 Transactions\n if (payload[0] > 0x7f) { return _parse(payload); }\n\n // Typed Transaction (EIP-2718)\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n\n return logger.throwError(`unsupported transaction type: ${ payload[0] }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n}\n\n","export const version = \"contracts/5.5.0\";\n","\"use strict\";\n\nimport { checkResultErrors, EventFragment, Fragment, FunctionFragment, Indexed, Interface, JsonFragment, LogDescription, ParamType, Result } from \"@ethersproject/abi\";\nimport { Block, BlockTag, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, BytesLike, concat, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { Deferrable, defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, AccessListish } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\nexport interface Overrides {\n gasLimit?: BigNumberish | Promise;\n gasPrice?: BigNumberish | Promise;\n maxFeePerGas?: BigNumberish | Promise;\n maxPriorityFeePerGas?: BigNumberish | Promise;\n nonce?: BigNumberish | Promise;\n type?: number;\n accessList?: AccessListish;\n customData?: Record;\n};\n\nexport interface PayableOverrides extends Overrides {\n value?: BigNumberish | Promise;\n}\n\nexport interface CallOverrides extends PayableOverrides {\n blockTag?: BlockTag | Promise;\n from?: string | Promise;\n}\n\n// @TODO: Better hierarchy with: (in v6)\n// - abstract-provider:TransactionRequest\n// - transactions:Transaction\n// - transaction:UnsignedTransaction\n\nexport interface PopulatedTransaction {\n to?: string;\n from?: string;\n nonce?: number;\n\n gasLimit?: BigNumber;\n gasPrice?: BigNumber;\n\n data?: string;\n value?: BigNumber;\n chainId?: number;\n\n type?: number;\n accessList?: AccessList;\n\n maxFeePerGas?: BigNumber;\n maxPriorityFeePerGas?: BigNumber;\n\n customData?: Record;\n};\n\nexport type EventFilter = {\n address?: string;\n topics?: Array>;\n};\n\n\nexport type ContractFunction = (...args: Array) => Promise;\n\n\n// The (n + 1)th parameter passed to contract event callbacks\nexport interface Event extends Log {\n\n // The event name\n event?: string;\n\n // The event signature\n eventSignature?: string;\n\n // The parsed arguments to the event\n args?: Result;\n\n // If parsing the arguments failed, this is the error\n decodeError?: Error;\n\n // A function that can be used to decode event data and topics\n decode?: (data: string, topics?: Array) => any;\n\n // A function that will remove the listener responsible for this event (if any)\n removeListener: () => void;\n\n // Get blockchain details about this event's block and transaction\n getBlock: () => Promise;\n getTransaction: () => Promise;\n getTransactionReceipt: () => Promise;\n}\n\nexport interface ContractReceipt extends TransactionReceipt {\n events?: Array;\n}\n\nexport interface ContractTransaction extends TransactionResponse {\n wait(confirmations?: number): Promise;\n}\n\n///////////////////////////////\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, from: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true,\n customData: true\n}\n\nasync function resolveName(resolver: Signer | Provider, nameOrPromise: string | Promise): Promise {\n const name = await nameOrPromise;\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n\n // If it is already an address, just use it (after adding checksum)\n try {\n return getAddress(name);\n } catch (error) { }\n\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n\n const address = await resolver.resolveName(name);\n\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n\n return address;\n}\n\n// Recursively replaces ENS names with promises to resolve the name and resolves all properties\nasync function resolveAddresses(resolver: Signer | Provider, value: any, paramType: ParamType | Array): Promise {\n if (Array.isArray(paramType)) {\n return await Promise.all(paramType.map((paramType, index) => {\n return resolveAddresses(\n resolver,\n ((Array.isArray(value)) ? value[index]: value[paramType.name]),\n paramType\n );\n }));\n }\n\n if (paramType.type === \"address\") {\n return await resolveName(resolver, value);\n }\n\n if (paramType.type === \"tuple\") {\n return await resolveAddresses(resolver, value, paramType.components);\n }\n\n if (paramType.baseType === \"array\") {\n if (!Array.isArray(value)) {\n return Promise.reject(logger.makeError(\"invalid value for array\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }));\n }\n return await Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren)));\n }\n\n return value;\n}\n\nasync function populateTransaction(contract: Contract, fragment: FunctionFragment, args: Array): Promise {\n // If an extra argument is given, it is overrides\n let overrides: CallOverrides = { };\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n overrides = shallowCopy(args.pop());\n }\n\n // Make sure the parameter count matches\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n\n // Populate \"from\" override (allow promises)\n if (contract.signer) {\n if (overrides.from) {\n // Contracts with a Signer are from the Signer's frame-of-reference;\n // but we allow overriding \"from\" if it matches the signer\n overrides.from = resolveProperties({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(async (check) => {\n if (getAddress(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n\n return check.override;\n });\n\n } else {\n overrides.from = contract.signer.getAddress();\n }\n\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n\n //} else {\n // Contracts without a signer can override \"from\", and if\n // unspecified the zero address is used\n //overrides.from = AddressZero;\n }\n\n // Wait for all dependencies to be resolved (prefer the signer over the provider)\n const resolved = await resolveProperties({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (resolveProperties(overrides) || { })\n });\n\n // The ABI coded transaction\n const data = contract.interface.encodeFunctionData(fragment, resolved.args);\n const tx: PopulatedTransaction = {\n data: data,\n to: resolved.address\n };\n\n // Resolved Overrides\n const ro = resolved.overrides;\n\n // Populate simple overrides\n if (ro.nonce != null) { tx.nonce = BigNumber.from(ro.nonce).toNumber(); }\n if (ro.gasLimit != null) { tx.gasLimit = BigNumber.from(ro.gasLimit); }\n if (ro.gasPrice != null) { tx.gasPrice = BigNumber.from(ro.gasPrice); }\n if (ro.maxFeePerGas != null) { tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas); }\n if (ro.maxPriorityFeePerGas != null) { tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas); }\n if (ro.from != null) { tx.from = ro.from; }\n\n if (ro.type != null) { tx.type = ro.type; }\n if (ro.accessList != null) { tx.accessList = accessListify(ro.accessList); }\n\n // If there was no \"gasLimit\" override, but the ABI specifies a default, use it\n if (tx.gasLimit == null && fragment.gas != null) {\n // Compute the intrinsic gas cost for this transaction\n // @TODO: This is based on the yellow paper as of Petersburg; this is something\n // we may wish to parameterize in v6 as part of the Network object. Since this\n // is always a non-nil to address, we can ignore G_create, but may wish to add\n // similar logic to the ContractFactory.\n let intrinsic = 21000;\n const bytes = arrayify(data);\n for (let i = 0; i < bytes.length; i++) {\n intrinsic += 4;\n if (bytes[i]) { intrinsic += 64; }\n }\n tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic);\n }\n\n // Populate \"value\" override\n if (ro.value) {\n const roValue = BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n\n if (ro.customData) {\n tx.customData = shallowCopy(ro.customData);\n }\n\n // Remove the overrides\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n\n delete overrides.type;\n delete overrides.accessList;\n\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n\n delete overrides.customData;\n\n // Make sure there are no stray overrides, which may indicate a\n // typo or using an unsupported key.\n const leftovers = Object.keys(overrides).filter((key) => ((overrides)[key] != null));\n if (leftovers.length) {\n logger.throwError(`cannot override ${ leftovers.map((l) => JSON.stringify(l)).join(\",\") }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n\n return tx;\n}\n\n\nfunction buildPopulate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return function(...args: Array): Promise {\n return populateTransaction(contract, fragment, args);\n };\n}\n\nfunction buildEstimate(contract: Contract, fragment: FunctionFragment): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n return async function(...args: Array): Promise {\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n })\n }\n\n const tx = await populateTransaction(contract, fragment, args);\n return await signerOrProvider.estimateGas(tx);\n };\n}\n\nfunction addContractWait(contract: Contract, tx: TransactionResponse) {\n const wait = tx.wait.bind(tx);\n tx.wait = (confirmations?: number) => {\n return wait(confirmations).then((receipt: ContractReceipt) => {\n receipt.events = receipt.logs.map((log) => {\n let event: Event = (deepCopy(log));\n let parsed: LogDescription = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e){ }\n\n // Successfully parsed the event log; include it\n if (parsed) {\n event.args = parsed.args;\n event.decode = (data: BytesLike, topics?: Array) => {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n\n // Useful operations\n event.removeListener = () => { return contract.provider; }\n event.getBlock = () => {\n return contract.provider.getBlock(receipt.blockHash);\n }\n event.getTransaction = () => {\n return contract.provider.getTransaction(receipt.transactionHash);\n }\n event.getTransactionReceipt = () => {\n return Promise.resolve(receipt);\n }\n\n return event;\n });\n\n return receipt;\n });\n };\n}\n\nfunction buildCall(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n const signerOrProvider = (contract.signer || contract.provider);\n\n return async function(...args: Array): Promise {\n // Extract the \"blockTag\" override if present\n let blockTag = undefined;\n if (args.length === fragment.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n const overrides = shallowCopy(args.pop());\n if (overrides.blockTag != null) {\n blockTag = await overrides.blockTag;\n }\n delete overrides.blockTag;\n args.push(overrides);\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed(blockTag);\n }\n\n // Call a node and get the result\n const tx = await populateTransaction(contract, fragment, args);\n const result = await signerOrProvider.call(tx, blockTag);\n\n try {\n let value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return value;\n\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n };\n}\n\nfunction buildSend(contract: Contract, fragment: FunctionFragment): ContractFunction {\n return async function(...args: Array): Promise {\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n })\n }\n\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n await contract._deployed();\n }\n\n const txRequest = await populateTransaction(contract, fragment, args);\n\n const tx = await contract.signer.sendTransaction(txRequest);\n\n // Tweak the tx.wait so the receipt has extra properties\n addContractWait(contract, tx);\n\n return tx;\n };\n}\n\nfunction buildDefault(contract: Contract, fragment: FunctionFragment, collapseSimple: boolean): ContractFunction {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n}\n\nfunction getEventTag(filter: EventFilter): string {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map((topic) => {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\"): \"\");\n}\n\nclass RunningEvent {\n readonly tag: string;\n readonly filter: EventFilter;\n private _listeners: Array<{ listener: Listener, once: boolean }>;\n\n constructor(tag: string, filter: EventFilter) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"filter\", filter);\n this._listeners = [ ];\n }\n\n addListener(listener: Listener, once: boolean): void {\n this._listeners.push({ listener: listener, once: once });\n }\n\n removeListener(listener: Listener): void {\n let done = false;\n this._listeners = this._listeners.filter((item) => {\n if (done || item.listener !== listener) { return true; }\n done = true;\n return false;\n });\n }\n\n removeAllListeners(): void {\n this._listeners = [];\n }\n\n listeners(): Array {\n return this._listeners.map((i) => i.listener);\n }\n\n listenerCount(): number {\n return this._listeners.length;\n }\n\n run(args: Array): number {\n const listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter((item) => {\n\n const argsCopy = args.slice();\n\n // Call the callback in the next event loop\n setTimeout(() => {\n item.listener.apply(this, argsCopy);\n }, 0);\n\n // Reschedule it if it not \"once\"\n return !(item.once);\n });\n\n return listenerCount;\n }\n\n prepareEvent(event: Event): void {\n }\n\n // Returns the array that will be applied to an emit\n getEmit(event: Event): Array {\n return [ event ];\n }\n}\n\nclass ErrorRunningEvent extends RunningEvent {\n constructor() {\n super(\"error\", null);\n }\n}\n\n\n// @TODO Fragment should inherit Wildcard? and just override getEmit?\n// or have a common abstract super class, with enough constructor\n// options to configure both.\n\n// A Fragment Event will populate all the properties that Wildcard\n// will, and additionally dereference the arguments when emitting\nclass FragmentRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n readonly fragment: EventFragment;\n\n constructor(address: string, contractInterface: Interface, fragment: EventFragment, topics?: Array>) {\n const filter: EventFilter = {\n address: address\n }\n\n let topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) { logger.throwArgumentError(\"topic mismatch\", \"topics\", topics); }\n filter.topics = topics.slice();\n } else {\n filter.topics = [ topic ];\n }\n\n super(getEventTag(filter), filter);\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n defineReadOnly(this, \"fragment\", fragment);\n }\n\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(this.fragment, data, topics);\n };\n\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n }\n\n getEmit(event: Event): Array {\n const errors = checkResultErrors(event.args);\n if (errors.length) { throw errors[0].error; }\n\n const args = (event.args || []).slice();\n args.push(event);\n return args;\n }\n}\n\n// A Wildcard Event will attempt to populate:\n// - event The name of the event name\n// - eventSignature The full signature of the event\n// - decode A function to decode data and topics\n// - args The decoded data and topics\nclass WildcardRunningEvent extends RunningEvent {\n readonly address: string;\n readonly interface: Interface;\n\n constructor(address: string, contractInterface: Interface) {\n super(\"*\", { address: address });\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n }\n\n prepareEvent(event: Event): void {\n super.prepareEvent(event);\n\n try {\n const parsed = this.interface.parseLog(event);\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n\n event.decode = (data: BytesLike, topics?: Array) => {\n return this.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n\n event.args = parsed.args;\n } catch (error) {\n // No matching event\n }\n }\n}\n\nexport type ContractInterface = string | ReadonlyArray | Interface;\n\ntype InterfaceFunc = (contractInterface: ContractInterface) => Interface;\n\n\nexport class BaseContract {\n readonly address: string;\n readonly interface: Interface;\n\n readonly signer: Signer;\n readonly provider: Provider;\n\n readonly functions: { [ name: string ]: ContractFunction };\n\n readonly callStatic: { [ name: string ]: ContractFunction };\n readonly estimateGas: { [ name: string ]: ContractFunction };\n readonly populateTransaction: { [ name: string ]: ContractFunction };\n\n readonly filters: { [ name: string ]: (...args: Array) => EventFilter };\n\n // This will always be an address. This will only differ from\n // address if an ENS name was used in the constructor\n readonly resolvedAddress: Promise;\n\n // This is only set if the contract was created with a call to deploy\n readonly deployTransaction: TransactionResponse;\n\n _deployedPromise: Promise;\n\n // A list of RunningEvents to track listeners for each event tag\n _runningEvents: { [ eventTag: string ]: RunningEvent };\n\n // Wrapped functions to call emit and allow deregistration from the provider\n _wrappedEmits: { [ eventTag: string ]: (...args: Array) => void };\n\n constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider) {\n logger.checkNew(new.target, Contract);\n\n // @TODO: Maybe still check the addressOrName looks like a valid address or name?\n //address = getAddress(address);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n\n if (signerOrProvider == null) {\n defineReadOnly(this, \"provider\", null);\n defineReadOnly(this, \"signer\", null);\n } else if (Signer.isSigner(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider.provider || null);\n defineReadOnly(this, \"signer\", signerOrProvider);\n } else if (Provider.isProvider(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider);\n defineReadOnly(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n\n defineReadOnly(this, \"callStatic\", { });\n defineReadOnly(this, \"estimateGas\", { });\n defineReadOnly(this, \"functions\", { });\n defineReadOnly(this, \"populateTransaction\", { });\n\n defineReadOnly(this, \"filters\", { });\n\n {\n const uniqueFilters: { [ name: string ]: Array } = { };\n Object.keys(this.interface.events).forEach((eventSignature) => {\n const event = this.interface.events[eventSignature];\n defineReadOnly(this.filters, eventSignature, (...args: Array) => {\n return {\n address: this.address,\n topics: this.interface.encodeFilterTopics(event, args)\n }\n });\n if (!uniqueFilters[event.name]) { uniqueFilters[event.name] = [ ]; }\n uniqueFilters[event.name].push(eventSignature);\n });\n\n Object.keys(uniqueFilters).forEach((name) => {\n const filters = uniqueFilters[name];\n if (filters.length === 1) {\n defineReadOnly(this.filters, name, this.filters[filters[0]]);\n } else {\n logger.warn(`Duplicate definition of ${ name } (${ filters.join(\", \")})`);\n }\n });\n }\n\n defineReadOnly(this, \"_runningEvents\", { });\n defineReadOnly(this, \"_wrappedEmits\", { });\n\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n\n defineReadOnly(this, \"address\", addressOrName);\n if (this.provider) {\n defineReadOnly(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n defineReadOnly(this, \"resolvedAddress\", Promise.resolve(getAddress(addressOrName)));\n } catch (error) {\n // Without a provider, we cannot use ENS names\n logger.throwError(\"provider is required to use ENS name as contract address\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n\n const uniqueNames: { [ name: string ]: Array } = { };\n const uniqueSignatures: { [ signature: string ]: boolean } = { };\n Object.keys(this.interface.functions).forEach((signature) => {\n const fragment = this.interface.functions[signature];\n\n // Check that the signature is unique; if not the ABI generation has\n // not been cleaned or may be incorrectly generated\n if (uniqueSignatures[signature]) {\n logger.warn(`Duplicate ABI entry for ${ JSON.stringify(signature) }`);\n return;\n }\n uniqueSignatures[signature] = true;\n\n // Track unique names; we only expose bare named functions if they\n // are ambiguous\n {\n const name = fragment.name;\n if (!uniqueNames[`%${ name }`]) { uniqueNames[`%${ name }`] = [ ]; }\n uniqueNames[`%${ name }`].push(signature);\n }\n\n if ((this)[signature] == null) {\n defineReadOnly(this, signature, buildDefault(this, fragment, true));\n }\n\n // We do not collapse simple calls on this bucket, which allows\n // frameworks to safely use this without introspection as well as\n // allows decoding error recovery.\n if (this.functions[signature] == null) {\n defineReadOnly(this.functions, signature, buildDefault(this, fragment, false));\n }\n\n if (this.callStatic[signature] == null) {\n defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true));\n }\n\n if (this.populateTransaction[signature] == null) {\n defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment));\n }\n\n if (this.estimateGas[signature] == null) {\n defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment));\n }\n });\n\n Object.keys(uniqueNames).forEach((name) => {\n // Ambiguous names to not get attached as bare names\n const signatures = uniqueNames[name];\n if (signatures.length > 1) { return; }\n\n // Strip off the leading \"%\" used for prototype protection\n name = name.substring(1);\n\n const signature = signatures[0];\n\n // If overwriting a member property that is null, swallow the error\n try {\n if ((this)[name] == null) {\n defineReadOnly(this, name, (this)[signature]);\n }\n } catch (e) { }\n\n if (this.functions[name] == null) {\n defineReadOnly(this.functions, name, this.functions[signature]);\n }\n\n if (this.callStatic[name] == null) {\n defineReadOnly(this.callStatic, name, this.callStatic[signature]);\n }\n\n if (this.populateTransaction[name] == null) {\n defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]);\n }\n\n if (this.estimateGas[name] == null) {\n defineReadOnly(this.estimateGas, name, this.estimateGas[signature]);\n }\n });\n }\n\n static getContractAddress(transaction: { from: string, nonce: BigNumberish }): string {\n return getContractAddress(transaction);\n }\n\n static getInterface(contractInterface: ContractInterface): Interface {\n if (Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new Interface(contractInterface);\n }\n\n // @TODO: Allow timeout?\n deployed(): Promise {\n return this._deployed();\n }\n\n _deployed(blockTag?: BlockTag): Promise {\n if (!this._deployedPromise) {\n\n // If we were just deployed, we know the transaction we should occur in\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(() => {\n return this;\n });\n\n } else {\n // @TODO: Once we allow a timeout to be passed in, we will wait\n // up to that many blocks for getCode\n\n // Otherwise, poll for our code to be deployed\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: this.address,\n operation: \"getDeployed\"\n });\n }\n return this;\n });\n }\n }\n\n return this._deployedPromise;\n }\n\n // @TODO:\n // estimateFallback(overrides?: TransactionRequest): Promise\n\n // @TODO:\n // estimateDeploy(bytecode: string, ...args): Promise\n\n fallback(overrides?: TransactionRequest): Promise {\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" })\n }\n\n const tx: Deferrable = shallowCopy(overrides || {});\n\n [\"from\", \"to\"].forEach(function(key) {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n tx.to = this.resolvedAddress;\n return this.deployed().then(() => {\n return this.signer.sendTransaction(tx);\n });\n }\n\n // Reconnect to a different signer or provider\n connect(signerOrProvider: Signer | Provider | string): Contract {\n if (typeof(signerOrProvider) === \"string\") {\n signerOrProvider = new VoidSigner(signerOrProvider, this.provider);\n }\n\n const contract = new (<{ new(...args: any[]): Contract }>(this.constructor))(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n defineReadOnly(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n }\n\n // Re-attach to a different on-chain instance of this contract\n attach(addressOrName: string): Contract {\n return new (<{ new(...args: any[]): Contract }>(this.constructor))(addressOrName, this.interface, this.signer || this.provider);\n }\n\n static isIndexed(value: any): value is Indexed {\n return Indexed.isIndexed(value);\n }\n\n private _normalizeRunningEvent(runningEvent: RunningEvent): RunningEvent {\n // Already have an instance of this event running; we can re-use it\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent\n }\n\n private _getRunningEvent(eventName: EventFilter | string): RunningEvent {\n if (typeof(eventName) === \"string\") {\n\n // Listen for \"error\" events (if your contract has an error event, include\n // the full signature to bypass this special event keyword)\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n\n // Listen for any event that is registered\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n\n // Listen for any event\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n // Get the event Fragment (throws if ambiguous/unknown event)\n const fragment = this.interface.getEvent(eventName)\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n\n // We have topics to filter by...\n if (eventName.topics && eventName.topics.length > 0) {\n\n // Is it a known topichash? (throws if no matching topichash)\n try {\n const topic = eventName.topics[0];\n if (typeof(topic) !== \"string\") {\n throw new Error(\"invalid topic\"); // @TODO: May happen for anonymous events\n }\n const fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) { }\n\n // Filter by the unknown topichash\n const filter: EventFilter = {\n address: this.address,\n topics: eventName.topics\n }\n\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n\n _checkRunningEvents(runningEvent: RunningEvent): void {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n\n // If we have a poller for this, remove it\n const emit = this._wrappedEmits[runningEvent.tag];\n if (emit && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n }\n\n // Subclasses can override this to gracefully recover\n // from parse errors if they wish\n _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event {\n const event = deepCopy(log);\n\n event.removeListener = () => {\n if (!listener) { return; }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); }\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); }\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); }\n\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n\n return event;\n }\n\n private _addEventListener(runningEvent: RunningEvent, listener: Listener, once: boolean): void {\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" })\n }\n\n runningEvent.addListener(listener, once);\n\n // Track this running event and its listeners (may already be there; but no hard in updating)\n this._runningEvents[runningEvent.tag] = runningEvent;\n\n // If we are not polling the provider, start polling\n if (!this._wrappedEmits[runningEvent.tag]) {\n const wrappedEmit = (log: Log) => {\n let event = this._wrapEvent(runningEvent, log, listener);\n\n // Try to emit the result for the parameterized event...\n if (event.decodeError == null) {\n try {\n const args = runningEvent.getEmit(event);\n this.emit(runningEvent.filter, ...args);\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n\n // Always emit \"event\" for fragment-base events\n if (runningEvent.filter != null) {\n this.emit(\"event\", event);\n }\n\n // Emit \"error\" if there was an error\n if (event.decodeError != null) {\n this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n\n // Special events, like \"error\" do not have a filter\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n }\n\n queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise> {\n const runningEvent = this._getRunningEvent(event);\n const filter = shallowCopy(runningEvent.filter);\n\n if (typeof(fromBlockOrBlockhash) === \"string\" && isHexString(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n (filter).blockHash = fromBlockOrBlockhash;\n } else {\n (filter).fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash: 0);\n (filter).toBlock = ((toBlock != null) ? toBlock: \"latest\");\n }\n\n return this.provider.getLogs(filter).then((logs) => {\n return logs.map((log) => this._wrapEvent(runningEvent, log, null));\n });\n }\n\n on(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n }\n\n once(event: EventFilter | string, listener: Listener): this {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n }\n\n emit(eventName: EventFilter | string, ...args: Array): boolean {\n if (!this.provider) { return false; }\n\n const runningEvent = this._getRunningEvent(eventName);\n const result = (runningEvent.run(args) > 0);\n\n // May have drained all the \"once\" events; check for living events\n this._checkRunningEvents(runningEvent);\n\n return result;\n }\n\n listenerCount(eventName?: EventFilter | string): number {\n if (!this.provider) { return 0; }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce((accum, key) => {\n return accum + this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n }\n\n listeners(eventName?: EventFilter | string): Array {\n if (!this.provider) { return []; }\n\n if (eventName == null) {\n const result: Array = [ ];\n for (let tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach((listener) => {\n result.push(listener)\n });\n }\n return result;\n }\n\n return this._getRunningEvent(eventName).listeners();\n }\n\n removeAllListeners(eventName?: EventFilter | string): this {\n if (!this.provider) { return this; }\n\n if (eventName == null) {\n for (const tag in this._runningEvents) {\n const runningEvent = this._runningEvents[tag];\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n }\n return this;\n }\n\n // Delete any listeners\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n\n return this;\n }\n\n off(eventName: EventFilter | string, listener: Listener): this {\n if (!this.provider) { return this; }\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n }\n\n removeListener(eventName: EventFilter | string, listener: Listener): this {\n return this.off(eventName, listener);\n }\n\n}\n\nexport class Contract extends BaseContract {\n // The meta-class properties\n readonly [ key: string ]: ContractFunction | any;\n}\n\nexport class ContractFactory {\n\n readonly interface: Interface;\n readonly bytecode: string;\n readonly signer: Signer;\n\n constructor(contractInterface: ContractInterface, bytecode: BytesLike | { object: string }, signer?: Signer) {\n\n let bytecodeHex: string = null;\n\n if (typeof(bytecode) === \"string\") {\n bytecodeHex = bytecode;\n } else if (isBytes(bytecode)) {\n bytecodeHex = hexlify(bytecode);\n } else if (bytecode && typeof(bytecode.object) === \"string\") {\n // Allow the bytecode object from the Solidity compiler\n bytecodeHex = (bytecode).object;\n } else {\n // Crash in the next verification step\n bytecodeHex = \"!\";\n }\n\n // Make sure it is 0x prefixed\n if (bytecodeHex.substring(0, 2) !== \"0x\") { bytecodeHex = \"0x\" + bytecodeHex; }\n\n // Make sure the final result is valid bytecode\n if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n\n // If we have a signer, make sure it is valid\n if (signer && !Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n\n defineReadOnly(this, \"bytecode\", bytecodeHex);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n defineReadOnly(this, \"signer\", signer || null);\n }\n\n // @TODO: Future; rename to populateTransaction?\n getDeployTransaction(...args: Array): TransactionRequest {\n let tx: TransactionRequest = { };\n\n // If we have 1 additional argument, we allow transaction overrides\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof(args[args.length - 1]) === \"object\") {\n tx = shallowCopy(args.pop());\n for (const key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n\n // Do not allow these to be overridden in a deployment transaction\n [\"data\", \"from\", \"to\"].forEach((key) => {\n if ((tx)[key] == null) { return; }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key })\n });\n\n if (tx.value) {\n const value = BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Set the data to the bytecode + the encoded constructor arguments\n tx.data = hexlify(concat([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n\n return tx\n }\n\n async deploy(...args: Array): Promise {\n\n let overrides: any = { };\n\n // If 1 extra parameter was passed in, it contains overrides\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n\n // Resolve ENS names and promises in the arguments\n const params = await resolveAddresses(this.signer, args, this.interface.deploy.inputs);\n params.push(overrides);\n\n // Get the deployment transaction (with optional overrides)\n const unsignedTx = this.getDeployTransaction(...params);\n\n // Send the deployment transaction\n const tx = await this.signer.sendTransaction(unsignedTx);\n\n const address = getStatic<(tx: TransactionResponse) => string>(this.constructor, \"getContractAddress\")(tx);\n const contract = getStatic<(address: string, contractInterface: ContractInterface, signer?: Signer) => Contract>(this.constructor, \"getContract\")(address, this.interface, this.signer);\n\n // Add the modified wait that wraps events\n addContractWait(contract, tx);\n\n defineReadOnly(contract, \"deployTransaction\", tx);\n return contract;\n }\n\n attach(address: string): Contract {\n return ((this.constructor)).getContract(address, this.interface, this.signer);\n }\n\n connect(signer: Signer) {\n return new (<{ new(...args: any[]): ContractFactory }>(this.constructor))(this.interface, this.bytecode, signer);\n }\n\n static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n\n if (typeof(compilerOutput) === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n\n const abi = compilerOutput.abi;\n\n let bytecode: any = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n\n return new this(abi, bytecode, signer);\n }\n\n static getInterface(contractInterface: ContractInterface) {\n return Contract.getInterface(contractInterface);\n }\n\n static getContractAddress(tx: { from: string, nonce: BytesLike | BigNumber | number }): string {\n return getContractAddress(tx);\n }\n\n static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract {\n return new Contract(address, contractInterface, signer);\n }\n}\n","/**\n * var basex = require(\"base-x\");\n *\n * This implementation is heavily based on base-x. The main reason to\n * deviate was to prevent the dependency of Buffer.\n *\n * Contributors:\n *\n * base-x encoding\n * Forked from https://github.com/cryptocoinjs/bs58\n * Originally written by Mike Hearn for BitcoinJ\n * Copyright (c) 2011 Google Inc\n * Ported to JavaScript by Stefan Thomas\n * Merged Buffer refactorings from base58-native by Stephen Pair\n * Copyright (c) 2013 BitPay Inc\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n */\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nexport class BaseX {\n readonly alphabet: string;\n readonly base: number;\n\n _alphabetMap: { [ character: string ]: number };\n _leader: string;\n\n constructor(alphabet: string) {\n defineReadOnly(this, \"alphabet\", alphabet);\n defineReadOnly(this, \"base\", alphabet.length);\n\n defineReadOnly(this, \"_alphabetMap\", { });\n defineReadOnly(this, \"_leader\", alphabet.charAt(0));\n\n // pre-compute lookup table\n for (let i = 0; i < alphabet.length; i++) {\n this._alphabetMap[alphabet.charAt(i)] = i;\n }\n }\n\n encode(value: BytesLike): string {\n let source = arrayify(value);\n\n if (source.length === 0) { return \"\"; }\n\n let digits = [ 0 ]\n for (let i = 0; i < source.length; ++i) {\n let carry = source[i];\n for (let j = 0; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % this.base;\n carry = (carry / this.base) | 0;\n }\n\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = (carry / this.base) | 0;\n }\n }\n\n let string = \"\"\n\n // deal with leading zeros\n for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) {\n string += this._leader;\n }\n\n // convert digits to a string\n for (let q = digits.length - 1; q >= 0; --q) {\n string += this.alphabet[digits[q]];\n }\n\n return string;\n }\n\n decode(value: string): Uint8Array {\n if (typeof(value) !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n\n let bytes: Array = [];\n if (value.length === 0) { return new Uint8Array(bytes); }\n\n bytes.push(0);\n for (let i = 0; i < value.length; i++) {\n let byte = this._alphabetMap[value[i]];\n\n if (byte === undefined) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n\n let carry = byte;\n for (let j = 0; j < bytes.length; ++j) {\n carry += bytes[j] * this.base;\n bytes[j] = carry & 0xff;\n carry >>= 8;\n }\n\n while (carry > 0) {\n bytes.push(carry & 0xff);\n carry >>= 8;\n }\n }\n\n // deal with leading zeros\n for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) {\n bytes.push(0)\n }\n\n return arrayify(new Uint8Array(bytes.reverse()))\n }\n}\n\nconst Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\nconst Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n\nexport { Base32, Base58 };\n\n//console.log(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\"))\n//console.log(Base58.encode(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\")))\n","export enum SupportedAlgorithm { sha256 = \"sha256\", sha512 = \"sha512\" };\n\n","export const version = \"sha2/5.5.0\";\n","\"use strict\";\n\nimport hash from \"hash.js\";\n//const _ripemd160 = _hash.ripemd160;\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nimport { SupportedAlgorithm } from \"./types\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport function ripemd160(data: BytesLike): string {\n return \"0x\" + (hash.ripemd160().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha256(data: BytesLike): string {\n return \"0x\" + (hash.sha256().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function sha512(data: BytesLike): string {\n return \"0x\" + (hash.sha512().update(arrayify(data)).digest(\"hex\"));\n}\n\nexport function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string {\n if (!SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm: algorithm\n });\n }\n\n return \"0x\" + hash.hmac((hash)[algorithm], arrayify(key)).update(arrayify(data)).digest(\"hex\");\n}\n\n","import { computeHmac, ripemd160, sha256, sha512 } from \"./sha2\";\n\nimport { SupportedAlgorithm } from \"./types\";\n\nexport {\n computeHmac,\n\n ripemd160,\n\n sha256,\n sha512,\n\n SupportedAlgorithm\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { computeHmac, SupportedAlgorithm } from \"@ethersproject/sha2\";\n\nexport function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: string): string {\n password = arrayify(password);\n salt = arrayify(salt);\n let hLen;\n let l = 1;\n const DK = new Uint8Array(keylen)\n const block1 = new Uint8Array(salt.length + 4)\n block1.set(salt);\n //salt.copy(block1, 0, 0, salt.length)\n\n let r: number;\n let T: Uint8Array;\n\n for (let i = 1; i <= l; i++) {\n //block1.writeUInt32BE(i, salt.length)\n block1[salt.length] = (i >> 24) & 0xff;\n block1[salt.length + 1] = (i >> 16) & 0xff;\n block1[salt.length + 2] = (i >> 8) & 0xff;\n block1[salt.length + 3] = i & 0xff;\n\n //let U = createHmac(password).update(block1).digest();\n let U = arrayify(computeHmac(hashAlgorithm, password, block1));\n\n if (!hLen) {\n hLen = U.length\n T = new Uint8Array(hLen)\n l = Math.ceil(keylen / hLen)\n r = keylen - (l - 1) * hLen\n }\n\n //U.copy(T, 0, 0, hLen)\n T.set(U);\n\n\n for (let j = 1; j < iterations; j++) {\n //U = createHmac(password).update(U).digest();\n U = arrayify(computeHmac(hashAlgorithm, password, U));\n for (let k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n\n const destPos = (i - 1) * hLen\n const len = (i === l ? r : hLen)\n //T.copy(DK, destPos, 0, len)\n DK.set(arrayify(T).slice(0, len), destPos);\n }\n\n return hexlify(DK)\n}\n\n","\nexport { pbkdf2 } from \"./pbkdf2\";\n","export const version = \"wordlists/5.5.0\";\n","\"use strict\";\n\n// This gets overridden by rollup\nconst exportWordlist = false;\n\nimport { id } from \"@ethersproject/hash\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nexport const logger = new Logger(version);\n\nexport abstract class Wordlist {\n readonly locale: string;\n\n constructor(locale: string) {\n logger.checkAbstract(new.target, Wordlist);\n defineReadOnly(this, \"locale\", locale);\n }\n\n abstract getWord(index: number): string;\n abstract getWordIndex(word: string): number;\n\n // Subclasses may override this\n split(mnemonic: string): Array {\n return mnemonic.toLowerCase().split(/ +/g)\n }\n\n // Subclasses may override this\n join(words: Array): string {\n return words.join(\" \");\n }\n\n static check(wordlist: Wordlist): string {\n const words = [];\n for (let i = 0; i < 2048; i++) {\n const word = wordlist.getWord(i);\n /* istanbul ignore if */\n if (i !== wordlist.getWordIndex(word)) { return \"0x\"; }\n words.push(word);\n }\n return id(words.join(\"\\n\") + \"\\n\");\n }\n\n static register(lang: Wordlist, name?: string): void {\n if (!name) { name = lang.locale; }\n\n /* istanbul ignore if */\n if (exportWordlist) {\n try {\n const anyGlobal = (window as any)\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n defineReadOnly(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) { }\n }\n }\n\n}\n\n","\"use strict\";\n\nimport { Wordlist } from \"./wordlist\";\n\n\nconst words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n\nlet wordlist: Array = null;\n\n\nfunction loadWords(lang: Wordlist): void {\n if (wordlist != null) { return; }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n\n // Verify the computed list matches the official list\n /* istanbul ignore if */\n if (Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n}\n\nclass LangEn extends Wordlist {\n constructor() {\n super(\"en\");\n }\n\n getWord(index: number): string {\n loadWords(this);\n return wordlist[index];\n }\n\n getWordIndex(word: string): number {\n loadWords(this);\n return wordlist.indexOf(word);\n }\n}\n\nconst langEn = new LangEn();\nWordlist.register(langEn);\n\nexport { langEn };\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\n// Browser; only include English by default\n\nimport { Wordlist } from \"./wordlist\";\n\nimport { langEn as en } from \"./lang-en\";\n\nexport const wordlists: { [ locale: string ]: Wordlist } = {\n en: en\n}\n","\"use strict\";\n\n// Wordlists\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md\n\nimport { logger, Wordlist } from \"./wordlist\";\n\nimport { wordlists } from \"./wordlists\";\n\nexport {\n logger,\n Wordlist,\n wordlists\n}\n","export const version = \"hdnode/5.5.0\";\n","\"use strict\";\n\n// See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\n// See: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\n\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { arrayify, BytesLike, concat, hexDataSlice, hexZeroPad, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from \"@ethersproject/strings\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { computeHmac, ripemd160, sha256, SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { computeAddress } from \"@ethersproject/transactions\";\nimport { Wordlist, wordlists } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst N = BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n\n\n// \"Bitcoin seed\"\nconst MasterSecret = toUtf8Bytes(\"Bitcoin seed\");\n\nconst HardenedBit = 0x80000000;\n\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits: number): number {\n return ((1 << bits) - 1) << (8 - bits);\n}\n\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits: number): number {\n return (1 << bits) - 1;\n}\n\nfunction bytes32(value: BigNumber | Uint8Array): string {\n return hexZeroPad(hexlify(value), 32);\n}\n\nfunction base58check(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nfunction getWordlist(wordlist: string | Wordlist): Wordlist {\n if (wordlist == null) {\n return wordlists[\"en\"];\n }\n\n if (typeof(wordlist) === \"string\") {\n const words = wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n\n return wordlist;\n}\n\nconst _constructorGuard: any = {};\n\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n\nexport interface Mnemonic {\n readonly phrase: string;\n readonly path: string;\n readonly locale: string;\n};\n\nexport class HDNode implements ExternallyOwnedAccount {\n readonly privateKey: string;\n readonly publicKey: string;\n\n readonly fingerprint: string;\n readonly parentFingerprint: string;\n\n readonly address: string;\n\n readonly mnemonic?: Mnemonic;\n readonly path: string;\n\n readonly chainCode: string;\n\n readonly index: number;\n readonly depth: number;\n\n /**\n * This constructor should not be called directly.\n *\n * Please use:\n * - fromMnemonic\n * - fromSeed\n */\n constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string) {\n logger.checkNew(new.target, HDNode);\n\n /* istanbul ignore if */\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n\n if (privateKey) {\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"privateKey\", signingKey.privateKey);\n defineReadOnly(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n defineReadOnly(this, \"privateKey\", null);\n defineReadOnly(this, \"publicKey\", hexlify(publicKey));\n }\n\n defineReadOnly(this, \"parentFingerprint\", parentFingerprint);\n defineReadOnly(this, \"fingerprint\", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4));\n\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n defineReadOnly(this, \"chainCode\", chainCode);\n\n defineReadOnly(this, \"index\", index);\n defineReadOnly(this, \"depth\", depth);\n\n if (mnemonicOrPath == null) {\n // From a source that does not preserve the path (e.g. extended keys)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", null);\n\n } else if (typeof(mnemonicOrPath) === \"string\") {\n // From a source that does not preserve the mnemonic (e.g. neutered)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", mnemonicOrPath);\n\n } else {\n // From a fully qualified source\n defineReadOnly(this, \"mnemonic\", mnemonicOrPath);\n defineReadOnly(this, \"path\", mnemonicOrPath.path);\n }\n }\n\n get extendedKey(): string {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n\n if (this.depth >= 256) { throw new Error(\"Depth too large!\"); }\n\n return base58check(concat([\n ((this.privateKey != null) ? \"0x0488ADE4\": \"0x0488B21E\"),\n hexlify(this.depth),\n this.parentFingerprint,\n hexZeroPad(hexlify(this.index), 4),\n this.chainCode,\n ((this.privateKey != null) ? concat([ \"0x00\", this.privateKey ]): this.publicKey),\n ]));\n }\n\n neuter(): HDNode {\n return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n }\n\n private _derive(index: number): HDNode {\n if (index > 0xffffffff) { throw new Error(\"invalid index - \" + String(index)); }\n\n // Base path\n let path = this.path;\n if (path) { path += \"/\" + (index & ~HardenedBit); }\n\n const data = new Uint8Array(37);\n\n if (index & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n\n // Data = 0x00 || ser_256(k_par)\n data.set(arrayify(this.privateKey), 1);\n\n // Hardened path\n if (path) { path += \"'\"; }\n\n } else {\n // Data = ser_p(point(k_par))\n data.set(arrayify(this.publicKey));\n }\n\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); }\n\n const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data));\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n\n // The private key\n let ki: string = null\n\n // The public key\n let Ki: string = null;\n\n if (this.privateKey) {\n ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N));\n } else {\n const ek = new SigningKey(hexlify(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n\n let mnemonicOrPath: Mnemonic | string = path;\n\n const srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path: path,\n locale: (srcMnemonic.locale || \"en\")\n });\n }\n\n return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);\n }\n\n derivePath(path: string): HDNode {\n const components = path.split(\"/\");\n\n if (components.length === 0 || (components[0] === \"m\" && this.depth !== 0)) {\n throw new Error(\"invalid path - \" + path);\n }\n\n if (components[0] === \"m\") { components.shift(); }\n\n let result: HDNode = this;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(HardenedBit + index);\n } else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n if (index >= HardenedBit) { throw new Error(\"invalid path index - \" + component); }\n result = result._derive(index);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n\n return result;\n }\n\n\n static _fromSeed(seed: BytesLike, mnemonic: Mnemonic): HDNode {\n const seedArray: Uint8Array = arrayify(seed);\n if (seedArray.length < 16 || seedArray.length > 64) { throw new Error(\"invalid seed\"); }\n\n const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray));\n\n return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, \"0x00000000\", bytes32(I.slice(32)), 0, 0, mnemonic);\n }\n\n static fromMnemonic(mnemonic: string, password?: string, wordlist?: string | Wordlist): HDNode {\n\n // If a locale name was passed in, find the associated wordlist\n wordlist = getWordlist(wordlist);\n\n // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid)\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n\n return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n }\n\n static fromSeed(seed: BytesLike): HDNode {\n return HDNode._fromSeed(seed, null);\n }\n\n static fromExtendedKey(extendedKey: string): HDNode {\n const bytes = Base58.decode(extendedKey);\n\n if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\": case \"0x043587cf\":\n return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null);\n\n // Private Key\n case \"0x0488ade4\": case \"0x04358394 \":\n if (key[0] !== 0) { break; }\n return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null);\n }\n\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n}\n\nexport function mnemonicToSeed(mnemonic: string, password?: string): string {\n if (!password) { password = \"\"; }\n\n const salt = toUtf8Bytes(\"mnemonic\" + password, UnicodeNormalizationForm.NFKD);\n\n return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n}\n\nexport function mnemonicToEntropy(mnemonic: string, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n logger.checkNormalize();\n\n const words = wordlist.split(mnemonic);\n if ((words.length % 3) !== 0) { throw new Error(\"invalid mnemonic\"); }\n\n const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8)));\n\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n if (index === -1) { throw new Error(\"invalid mnemonic\"); }\n\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n\n const entropyBits = 32 * words.length / 3;\n\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n\n const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n\n if (checksum !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\n\nexport function entropyToMnemonic(entropy: BytesLike, wordlist?: string | Wordlist): string {\n wordlist = getWordlist(wordlist);\n\n entropy = arrayify(entropy);\n\n if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n\n const indices: Array = [ 0 ];\n\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n\n remainingBits -= 8;\n\n // This byte will complete an 11-bit index\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n\n remainingBits += 3;\n }\n }\n\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits);\n\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n\n return wordlist.join(indices.map((index) => (wordlist).getWord(index)));\n}\n\nexport function isValidMnemonic(mnemonic: string, wordlist?: Wordlist): boolean {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) { }\n return false;\n}\n\nexport function getAccountPath(index: number): string {\n if (typeof(index) !== \"number\" || index < 0 || index >= HardenedBit || index % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index);\n }\n return `m/44'/60'/${ index }'/0/0`;\n}\n","export const version = \"random/5.5.0\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Debugging line for testing browser lib in node\n//const window = { crypto: { getRandomValues: () => { } } };\n\nlet anyGlobal: any = null;\ntry {\n anyGlobal = (window as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n} catch (error) {\n try {\n anyGlobal = (global as any);\n if (anyGlobal == null) { throw new Error(\"try next\"); }\n } catch (error) {\n anyGlobal = { };\n }\n}\n\nlet crypto: any = anyGlobal.crypto || anyGlobal.msCrypto;\nif (!crypto || !crypto.getRandomValues) {\n\n logger.warn(\"WARNING: Missing strong random number source\");\n\n crypto = {\n getRandomValues: function(buffer: Uint8Array): Uint8Array {\n return logger.throwError(\"no secure random source avaialble\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n}\n\nexport function randomBytes(length: number): Uint8Array {\n if (length <= 0 || length > 1024 || (length % 1) || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return arrayify(result);\n};\n","\"use strict\";\n\nexport function shuffled(array: Array): Array {\n array = array.slice();\n\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n\n return array;\n}\n","\"use strict\";\n\nexport { randomBytes } from \"./random\";\nexport { shuffled } from \"./shuffle\";\n","\"use strict\";\n\n(function(root) {\n\n function checkInt(value) {\n return (parseInt(value) === value);\n }\n\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) { return false; }\n\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n\n return true;\n }\n\n function coerceArray(arg, copy) {\n\n // ArrayBuffer view\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') {\n\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n\n throw new Error('unsupported array-like object');\n }\n\n function createArray(length) {\n return new Uint8Array(length);\n }\n\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n\n\n\n var convertUtf8 = (function() {\n function toBytes(text) {\n var result = [], i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16))\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c)\n }\n }\n\n return coerceArray(result);\n }\n\n function fromBytes(bytes) {\n var result = [], i = 0;\n\n while (i < bytes.length) {\n var c = bytes[i];\n\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));\n i += 2;\n } else {\n result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));\n i += 3;\n }\n }\n\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n var convertHex = (function() {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n\n // Number of rounds by keysize\n var numberOfRounds = {16: 10, 24: 12, 32: 14}\n\n // Round constant words\n var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n // S-box and Inverse S-box (S is for Substitution)\n var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8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0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n // Transformations for encryption\n var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\n var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\n var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\n var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n // Transformations for decryption\n var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\n var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\n var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\n var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n // Transformations for decryption key expansion\n var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\n var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\n var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\n var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\n\n function convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(\n (bytes[i ] << 24) |\n (bytes[i + 1] << 16) |\n (bytes[i + 2] << 8) |\n bytes[i + 3]\n );\n }\n return result;\n }\n\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n\n this._prepare();\n }\n\n\n AES.prototype._prepare = function() {\n\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[ tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n\n tk[KC / 2] ^= (S[ tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n\n for (var i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[ tt & 0xFF]);\n }\n }\n }\n\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T1[(t[ i ] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[ t[(i + 3) % 4] & 0xff] ^\n this._Ke[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T5[(t[ i ] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[ t[(i + 1) % 4] & 0xff] ^\n this._Kd[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n\n /**\n * Mode Of Operation - Electonic Codebook (ECB)\n */\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastCipherblock = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Feedback (CFB)\n */\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 size)');\n }\n\n if (!segmentSize) { segmentSize = 1; }\n\n this.segmentSize = segmentSize;\n\n this._shiftRegister = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if ((plaintext.length % this.segmentSize) != 0) {\n throw new Error('invalid plaintext size (must be segmentSize bytes)');\n }\n\n var encrypted = coerceArray(plaintext, true);\n\n var xorSegment;\n for (var i = 0; i < encrypted.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j = 0; j < this.segmentSize; j++) {\n encrypted[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return encrypted;\n }\n\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if ((ciphertext.length % this.segmentSize) != 0) {\n throw new Error('invalid ciphertext size (must be segmentSize bytes)');\n }\n\n var plaintext = coerceArray(ciphertext, true);\n\n var xorSegment;\n for (var i = 0; i < plaintext.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n\n for (var j = 0; j < this.segmentSize; j++) {\n plaintext[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return plaintext;\n }\n\n /**\n * Mode Of Operation - Output Feedback (OFB)\n */\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n\n\n /**\n * Counter object for CTR common mode of operation\n */\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) { initialValue = 1; }\n\n if (typeof(initialValue) === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n\n } else {\n this.setBytes(initialValue);\n }\n }\n\n Counter.prototype.setValue = function(value) {\n if (typeof(value) !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = value >> 8;\n }\n }\n\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n\n this._counter = bytes;\n };\n\n Counter.prototype.increment = function() {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n }\n\n\n /**\n * Mode Of Operation - Counter (CTR)\n */\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Counter\";\n this.name = \"ctr\";\n\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter)\n }\n\n this._counter = counter;\n\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n\n\n ///////////////////////\n // Padding\n\n // See:https://tools.ietf.org/html/rfc2315\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - (data.length % 16);\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n }\n\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }\n\n var padder = data[data.length - 1];\n if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }\n\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n\n ///////////////////////\n // Exporting\n\n\n // The block cipher\n var aesjs = {\n AES: AES,\n Counter: Counter,\n\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray,\n }\n };\n\n\n // node.js\n if (typeof exports !== 'undefined') {\n module.exports = aesjs\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(aesjs);\n\n // Web Browsers\n } else {\n\n // If there was an existing library at \"aesjs\" make sure it's still available\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n\n root.aesjs = aesjs;\n }\n\n\n})(this);\n","export const version = \"json-wallets/5.5.0\";\n","\"use strict\";\n\nimport { arrayify, Bytes, BytesLike, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings';\n\nexport function looseArrayify(hexString: string): Uint8Array {\n if (typeof(hexString) === 'string' && hexString.substring(0, 2) !== '0x') {\n hexString = '0x' + hexString;\n }\n return arrayify(hexString);\n}\n\nexport function zpad(value: String | number, length: number): String {\n value = String(value);\n while (value.length < length) { value = '0' + value; }\n return value;\n}\n\nexport function getPassword(password: Bytes | string): Uint8Array {\n if (typeof(password) === 'string') {\n return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC);\n }\n return arrayify(password);\n}\n\nexport function searchPath(object: any, path: string): string {\n let currentChild = object;\n\n const comps = path.toLowerCase().split('/');\n for (let i = 0; i < comps.length; i++) {\n\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comps[i]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n\n // Didn't find one. :'(\n if (matchingChild === null) {\n return null;\n }\n\n // Now check this child...\n currentChild = matchingChild;\n }\n\n return currentChild;\n}\n\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\nexport function uuidV4(randomBytes: BytesLike): string {\n const bytes = arrayify(randomBytes);\n\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n const value = hexlify(bytes);\n\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n\n","\"use strict\";\n\nimport aes from \"aes-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { Description } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getPassword, looseArrayify, searchPath } from \"./utils\";\n\nexport interface _CrowdsaleAccount {\n address: string;\n privateKey: string;\n\n _isCrowdsaleAccount: boolean;\n}\n\nexport class CrowdsaleAccount extends Description<_CrowdsaleAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: string;\n readonly path?: string;\n\n readonly _isCrowdsaleAccount: boolean;\n\n isCrowdsaleAccount(value: any): value is CrowdsaleAccount {\n return !!(value && value._isCrowdsaleAccount);\n }\n}\n\n// See: https://github.com/ethereum/pyethsaletool\nexport function decrypt(json: string, password: Bytes | string): ExternallyOwnedAccount {\n const data = JSON.parse(json);\n\n password = getPassword(password);\n\n // Ethereum Address\n const ethaddr = getAddress(searchPath(data, \"ethaddr\"));\n\n // Encrypted Seed\n const encseed = looseArrayify(searchPath(data, \"encseed\"));\n if (!encseed || (encseed.length % 16) !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n\n const key = arrayify(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n\n // Decrypt the seed\n const aesCbc = new aes.ModeOfOperation.cbc(key, iv);\n const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed)));\n\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n\n const seedHexBytes = toUtf8Bytes(seedHex);\n\n const privateKey = keccak256(seedHexBytes);\n\n return new CrowdsaleAccount ({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey: privateKey\n });\n}\n\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\n\n\nexport function isCrowdsaleWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n return (data.encseed && data.ethaddr);\n}\n\nexport function isKeystoreWallet(json: string): boolean {\n let data: any = null;\n try {\n data = JSON.parse(json);\n } catch (error) { return false; }\n\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n\n // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff\n return true;\n}\n\n//export function isJsonWallet(json: string): boolean {\n// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json));\n//}\n\nexport function getJsonWalletAddress(json: string): string {\n if (isCrowdsaleWallet(json)) {\n try {\n return getAddress(JSON.parse(json).ethaddr);\n } catch (error) { return null; }\n }\n\n if (isKeystoreWallet(json)) {\n try {\n return getAddress(JSON.parse(json).address);\n } catch (error) { return null; }\n }\n\n return null;\n}\n\n","\"use strict\";\n\n(function(root) {\n const MAX_VALUE = 0x7fffffff;\n\n // The SHA256 and PBKDF2 implementation are from scrypt-async-js:\n // See: https://github.com/dchest/scrypt-async-js\n function SHA256(m) {\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ]);\n\n let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;\n let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;\n const w = new Uint32Array(64);\n\n function blocks(p) {\n let off = 0, len = p.length;\n while (len >= 64) {\n let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;\n\n for (i = 0; i < 16; i++) {\n j = off + i*4;\n w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |\n ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);\n }\n\n for (i = 16; i < 64; i++) {\n u = w[i-2];\n t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);\n\n u = w[i-15];\n t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);\n\n w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;\n }\n\n for (i = 0; i < 64; i++) {\n t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^\n ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n\n t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^\n ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n\n h0 = (h0 + a) | 0;\n h1 = (h1 + b) | 0;\n h2 = (h2 + c) | 0;\n h3 = (h3 + d) | 0;\n h4 = (h4 + e) | 0;\n h5 = (h5 + f) | 0;\n h6 = (h6 + g) | 0;\n h7 = (h7 + h) | 0;\n\n off += 64;\n len -= 64;\n }\n }\n\n blocks(m);\n\n let i, bytesLeft = m.length % 64,\n bitLenHi = (m.length / 0x20000000) | 0,\n bitLenLo = m.length << 3,\n numZeros = (bytesLeft < 56) ? 56 : 120,\n p = m.slice(m.length - bytesLeft, m.length);\n\n p.push(0x80);\n for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }\n p.push((bitLenHi >>> 24) & 0xff);\n p.push((bitLenHi >>> 16) & 0xff);\n p.push((bitLenHi >>> 8) & 0xff);\n p.push((bitLenHi >>> 0) & 0xff);\n p.push((bitLenLo >>> 24) & 0xff);\n p.push((bitLenLo >>> 16) & 0xff);\n p.push((bitLenLo >>> 8) & 0xff);\n p.push((bitLenLo >>> 0) & 0xff);\n\n blocks(p);\n\n return [\n (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff,\n (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff,\n (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff,\n (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff,\n (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff,\n (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff,\n (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff,\n (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff\n ];\n }\n\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n // compress password if it's longer than hash block length\n password = (password.length <= 64) ? password : SHA256(password);\n\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n\n let i;\n let dk = [];\n\n // inner = (password ^ ipad) || salt || counter\n for (i = 0; i < 64; i++) { inner[i] = 0x36; }\n for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; }\n for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; }\n for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; }\n\n // outerKey = password ^ opad\n for (i = 0; i < 64; i++) outerKey[i] = 0x5c;\n for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];\n\n // increments counter inside inner\n function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }\n\n // output blocks = SHA256(outerKey || SHA256(inner)) ...\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));\n }\n\n return dk;\n }\n\n // The following is an adaptation of scryptsy\n // See: https://www.npmjs.com/package/scryptsy\n function blockmix_salsa8(BY, Yi, r, x, _X) {\n let i;\n\n arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);\n for (i = 0; i < 2 * r; i++) {\n blockxor(BY, i * 16, _X, 16);\n salsa20_8(_X, x);\n arraycopy(_X, 0, BY, Yi + (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);\n }\n }\n\n function R(a, b) {\n return (a << b) | (a >>> (32 - b));\n }\n\n function salsa20_8(B, x) {\n arraycopy(B, 0, x, 0, 16);\n\n for (let i = 8; i > 0; i -= 2) {\n x[ 4] ^= R(x[ 0] + x[12], 7);\n x[ 8] ^= R(x[ 4] + x[ 0], 9);\n x[12] ^= R(x[ 8] + x[ 4], 13);\n x[ 0] ^= R(x[12] + x[ 8], 18);\n x[ 9] ^= R(x[ 5] + x[ 1], 7);\n x[13] ^= R(x[ 9] + x[ 5], 9);\n x[ 1] ^= R(x[13] + x[ 9], 13);\n x[ 5] ^= R(x[ 1] + x[13], 18);\n x[14] ^= R(x[10] + x[ 6], 7);\n x[ 2] ^= R(x[14] + x[10], 9);\n x[ 6] ^= R(x[ 2] + x[14], 13);\n x[10] ^= R(x[ 6] + x[ 2], 18);\n x[ 3] ^= R(x[15] + x[11], 7);\n x[ 7] ^= R(x[ 3] + x[15], 9);\n x[11] ^= R(x[ 7] + x[ 3], 13);\n x[15] ^= R(x[11] + x[ 7], 18);\n x[ 1] ^= R(x[ 0] + x[ 3], 7);\n x[ 2] ^= R(x[ 1] + x[ 0], 9);\n x[ 3] ^= R(x[ 2] + x[ 1], 13);\n x[ 0] ^= R(x[ 3] + x[ 2], 18);\n x[ 6] ^= R(x[ 5] + x[ 4], 7);\n x[ 7] ^= R(x[ 6] + x[ 5], 9);\n x[ 4] ^= R(x[ 7] + x[ 6], 13);\n x[ 5] ^= R(x[ 4] + x[ 7], 18);\n x[11] ^= R(x[10] + x[ 9], 7);\n x[ 8] ^= R(x[11] + x[10], 9);\n x[ 9] ^= R(x[ 8] + x[11], 13);\n x[10] ^= R(x[ 9] + x[ 8], 18);\n x[12] ^= R(x[15] + x[14], 7);\n x[13] ^= R(x[12] + x[15], 9);\n x[14] ^= R(x[13] + x[12], 13);\n x[15] ^= R(x[14] + x[13], 18);\n }\n\n for (let i = 0; i < 16; ++i) {\n B[i] += x[i];\n }\n }\n\n // naive approach... going back to loop unrolling may yield additional performance\n function blockxor(S, Si, D, len) {\n for (let i = 0; i < len; i++) {\n D[i] ^= S[Si + i]\n }\n }\n\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n\n function checkBufferish(o) {\n if (!o || typeof(o.length) !== 'number') { return false; }\n\n for (let i = 0; i < o.length; i++) {\n const v = o[i];\n if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) {\n return false;\n }\n }\n\n return true;\n }\n\n function ensureInteger(value, name) {\n if (typeof(value) !== \"number\" || (value % 1)) { throw new Error('invalid ' + name); }\n return value;\n }\n\n // N = Cpu cost, r = Memory cost, p = parallelization cost\n // callback(error, progress, key)\n function _scrypt(password, salt, N, r, p, dkLen, callback) {\n\n N = ensureInteger(N, 'N');\n r = ensureInteger(r, 'r');\n p = ensureInteger(p, 'p');\n\n dkLen = ensureInteger(dkLen, 'dkLen');\n\n if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }\n\n if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }\n if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }\n\n if (!checkBufferish(password)) {\n throw new Error('password must be an array or buffer');\n }\n password = Array.prototype.slice.call(password);\n\n if (!checkBufferish(salt)) {\n throw new Error('salt must be an array or buffer');\n }\n salt = Array.prototype.slice.call(salt);\n\n let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);\n const B = new Uint32Array(p * 32 * r)\n for (let i = 0; i < B.length; i++) {\n const j = i * 4;\n B[i] = ((b[j + 3] & 0xff) << 24) |\n ((b[j + 2] & 0xff) << 16) |\n ((b[j + 1] & 0xff) << 8) |\n ((b[j + 0] & 0xff) << 0);\n }\n\n const XY = new Uint32Array(64 * r);\n const V = new Uint32Array(32 * r * N);\n\n const Yi = 32 * r;\n\n // scratch space\n const x = new Uint32Array(16); // salsa20_8\n const _X = new Uint32Array(16); // blockmix_salsa8\n\n const totalOps = p * N * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n\n // Set this to true to abandon the scrypt on the next step\n let stop = false;\n\n // State information\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n\n // How many blockmix_salsa8 can we do per step?\n const limit = callback ? parseInt(1000 / r): 0xffffffff;\n\n // Trick from scrypt-async; if there is a setImmediate shim in place, use it\n const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;\n\n // This is really all I changed; making scryptsy a state machine so we occasionally\n // stop and give other evnts on the evnt loop a chance to run. ~RicMoo\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error('cancelled'), currentOp / totalOps);\n }\n\n let steps;\n\n switch (state) {\n case 0:\n // for (var i = 0; i < p; i++)...\n Bi = i0 * 32 * r;\n\n arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1\n\n state = 1; // Move to ROMix 2\n i1 = 0;\n\n // Fall through\n\n case 1:\n\n // Run up to 1000 steps of the first inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 2\n arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4\n }\n\n // for (var i = 0; i < N; i++)\n i1 += steps;\n currentOp += steps;\n\n if (callback) {\n // Call the callback with the progress (optionally stopping us)\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n i1 = 0; // Move to ROMix 6\n state = 2;\n\n // Fall through\n\n case 2:\n\n // Run up to 1000 steps of the second inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 6\n const offset = (2 * r - 1) * 16; // ROMix - 7\n const j = XY[offset] & (N - 1);\n blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner)\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer)\n }\n\n // for (var i = 0; i < N; i++)...\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n if (callback) {\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10\n\n // for (var i = 0; i < p; i++)...\n i0++;\n if (i0 < p) {\n state = 0;\n break;\n }\n\n b = [];\n for (let i = 0; i < B.length; i++) {\n b.push((B[i] >> 0) & 0xff);\n b.push((B[i] >> 8) & 0xff);\n b.push((B[i] >> 16) & 0xff);\n b.push((B[i] >> 24) & 0xff);\n }\n\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);\n\n // Send the result to the callback\n if (callback) { callback(null, 1.0, derivedKey); }\n\n // Done; don't break (which would reschedule)\n return derivedKey;\n }\n\n // Schedule the next steps\n if (callback) { nextTick(incrementalSMix); }\n }\n\n // Run the smix state machine until completion\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != undefined) { return derivedKey; }\n }\n }\n\n // Bootstrap the async incremental smix\n incrementalSMix();\n }\n\n const lib = {\n scrypt: function(password, salt, N, r, p, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) { progressCallback(0); }\n _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N, r, p, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen));\n }\n };\n\n // node.js\n if (typeof(exports) !== 'undefined') {\n module.exports = lib;\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(lib);\n\n // Web Browsers\n } else if (root) {\n\n // If there was an existing library \"scrypt\", make sure it is still available\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n\n root.scrypt = lib;\n }\n\n})(this);\n","\"use strict\";\n\nimport aes from \"aes-js\";\nimport scrypt from \"scrypt-js\";\n\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, Bytes, BytesLike, concat, hexlify } from \"@ethersproject/bytes\";\nimport { defaultPath, entropyToMnemonic, HDNode, Mnemonic, mnemonicToEntropy } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 as _pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { Description } from \"@ethersproject/properties\";\nimport { computeAddress } from \"@ethersproject/transactions\";\n\nimport { getPassword, looseArrayify, searchPath, uuidV4, zpad } from \"./utils\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Exported Types\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n return (value != null && value.mnemonic && value.mnemonic.phrase);\n}\n\nexport interface _KeystoreAccount {\n address: string;\n privateKey: string;\n mnemonic?: Mnemonic;\n\n _isKeystoreAccount: boolean;\n}\n\nexport class KeystoreAccount extends Description<_KeystoreAccount> implements ExternallyOwnedAccount {\n readonly address: string;\n readonly privateKey: string;\n readonly mnemonic?: Mnemonic;\n\n readonly _isKeystoreAccount: boolean;\n\n isKeystoreAccount(value: any): value is KeystoreAccount {\n return !!(value && value._isKeystoreAccount);\n }\n}\n\nexport type ProgressCallback = (percent: number) => void;\n\nexport type EncryptOptions = {\n iv?: BytesLike;\n entropy?: BytesLike;\n client?: string;\n salt?: BytesLike;\n uuid?: string;\n scrypt?: {\n N?: number;\n r?: number;\n p?: number;\n }\n}\n\nfunction _decrypt(data: any, key: Uint8Array, ciphertext: Uint8Array): Uint8Array {\n const cipher = searchPath(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n const iv = looseArrayify(searchPath(data, \"crypto/cipherparams/iv\"))\n const counter = new aes.Counter(iv);\n\n const aesCtr = new aes.ModeOfOperation.ctr(key, counter);\n\n return arrayify(aesCtr.decrypt(ciphertext));\n }\n\n return null;\n}\n\nfunction _getAccount(data: any, key: Uint8Array): KeystoreAccount {\n const ciphertext = looseArrayify(searchPath(data, \"crypto/ciphertext\"));\n\n const computedMAC = hexlify(keccak256(concat([ key.slice(16, 32), ciphertext ]))).substring(2);\n if (computedMAC !== searchPath(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n\n const privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n\n const mnemonicKey = key.slice(32, 64);\n\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") { check = \"0x\" + check; }\n\n if (getAddress(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n\n const account: _KeystoreAccount = {\n _isKeystoreAccount: true,\n address: address,\n privateKey: hexlify(privateKey)\n };\n\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n if (searchPath(data, \"x-ethers/version\") === \"0.1\") {\n const mnemonicCiphertext = looseArrayify(searchPath(data, \"x-ethers/mnemonicCiphertext\"));\n const mnemonicIv = looseArrayify(searchPath(data, \"x-ethers/mnemonicCounter\"));\n\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n\n const path = searchPath(data, \"x-ethers/path\") || defaultPath;\n const locale = searchPath(data, \"x-ethers/locale\") || \"en\";\n\n const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n\n try {\n const mnemonic = entropyToMnemonic(entropy, locale);\n const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n\n account.mnemonic = node.mnemonic;\n\n } catch (error) {\n // If we don't have the locale wordlist installed to\n // read this mnemonic, just bail and don't set the\n // mnemonic\n if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n\n return new KeystoreAccount(account);\n}\n\ntype ScryptFunc = (pw: Uint8Array, salt: Uint8Array, n: number, r: number, p: number, dkLen: number, callback?: ProgressCallback) => T;\ntype Pbkdf2Func = (pw: Uint8Array, salt: Uint8Array, c: number, dkLen: number, prfFunc: string) => T;\n\nfunction pbkdf2Sync(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Uint8Array {\n return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction pbkdf2(passwordBytes: Uint8Array, salt: Uint8Array, count: number, dkLen: number, prfFunc: string): Promise {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n}\n\nfunction _computeKdfKey(data: any, password: Bytes | string, pbkdf2Func: Pbkdf2Func, scryptFunc: ScryptFunc, progressCallback?: ProgressCallback): T {\n const passwordBytes = getPassword(password);\n\n const kdf = searchPath(data, \"crypto/kdf\");\n\n if (kdf && typeof(kdf) === \"string\") {\n const throwError = function(name: string, value: any): never {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n }\n\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n const N = parseInt(searchPath(data, \"crypto/kdfparams/n\"));\n const r = parseInt(searchPath(data, \"crypto/kdfparams/r\"));\n const p = parseInt(searchPath(data, \"crypto/kdfparams/p\"));\n\n // Check for all required parameters\n if (!N || !r || !p) { throwError(\"kdf\", kdf); }\n\n // Make sure N is a power of 2\n if ((N & (N - 1)) !== 0) { throwError(\"N\", N); }\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback);\n\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n\n let prfFunc: string = null;\n const prf = searchPath(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n\n const count = parseInt(searchPath(data, \"crypto/kdfparams/c\"));\n\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) { throwError(\"dklen\", dkLen); }\n\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n}\n\n\nexport function decryptSync(json: string, password: Bytes | string): KeystoreAccount {\n const data = JSON.parse(json);\n\n const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt);\n return _getAccount(data, key);\n}\n\nexport async function decrypt(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n const data = JSON.parse(json);\n\n const key = await _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback);\n return _getAccount(data, key);\n}\n\n\nexport function encrypt(account: ExternallyOwnedAccount, password: Bytes | string, options?: EncryptOptions, progressCallback?: ProgressCallback): Promise {\n\n try {\n // Check the address matches the private key\n if (getAddress(account.address) !== computeAddress(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n\n // Check the mnemonic (if any) matches the private key\n if (hasMnemonic(account)) {\n const mnemonic = account.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath);\n\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n\n } catch (e) {\n return Promise.reject(e);\n }\n\n // The options are optional, so adjust the call as needed\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) { options = {}; }\n\n const privateKey: Uint8Array = arrayify(account.privateKey);\n const passwordBytes = getPassword(password);\n\n let entropy: Uint8Array = null\n let path: string = null;\n let locale: string = null;\n if (hasMnemonic(account)) {\n const srcMnemonic = account.mnemonic;\n entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n\n let client = options.client;\n if (!client) { client = \"ethers.js\"; }\n\n // Check/generate the salt\n let salt: Uint8Array = null;\n if (options.salt) {\n salt = arrayify(options.salt);\n } else {\n salt = randomBytes(32);;\n }\n\n // Override initialization vector\n let iv: Uint8Array = null;\n if (options.iv) {\n iv = arrayify(options.iv);\n if (iv.length !== 16) { throw new Error(\"invalid iv\"); }\n } else {\n iv = randomBytes(16);\n }\n\n // Override the uuid\n let uuidRandom: Uint8Array = null;\n if (options.uuid) {\n uuidRandom = arrayify(options.uuid);\n if (uuidRandom.length !== 16) { throw new Error(\"invalid uuid\"); }\n } else {\n uuidRandom = randomBytes(16);\n }\n\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) { N = options.scrypt.N; }\n if (options.scrypt.r) { r = options.scrypt.r; }\n if (options.scrypt.p) { p = options.scrypt.p; }\n }\n\n // We take 64 bytes:\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => {\n key = arrayify(key);\n\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n\n // This will be used to encrypt the mnemonic phrase (if any)\n const mnemonicKey = key.slice(32, 64);\n\n // Encrypt the private key\n const counter = new aes.Counter(iv);\n const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter);\n const ciphertext = arrayify(aesCtr.encrypt(privateKey));\n\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]))\n\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data: { [key: string]: any } = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(salt).substring(2),\n n: N,\n dklen: 32,\n p: p,\n r: r\n },\n mac: mac.substring(2)\n }\n };\n\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (entropy) {\n const mnemonicIv = randomBytes(16);\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\"\n );\n data[\"x-ethers\"] = {\n client: client,\n gethFilename: (\"UTC--\" + timestamp + \"--\" + data.address),\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n path: path,\n locale: locale,\n version: \"0.1\"\n };\n }\n\n return JSON.stringify(data);\n });\n}\n","\"use strict\";\n\nimport { Bytes } from \"@ethersproject/bytes\";\nimport { ExternallyOwnedAccount } from \"@ethersproject/abstract-signer\";\n\nimport { decrypt as decryptCrowdsale } from \"./crowdsale\";\nimport { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from \"./inspect\";\nimport { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore, EncryptOptions, ProgressCallback } from \"./keystore\";\n\nfunction decryptJsonWallet(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n if (isCrowdsaleWallet(json)) {\n if (progressCallback) { progressCallback(0); }\n const account = decryptCrowdsale(json, password)\n if (progressCallback) { progressCallback(1); }\n return Promise.resolve(account);\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystore(json, password, progressCallback);\n }\n\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n}\n\nfunction decryptJsonWalletSync(json: string, password: Bytes | string): ExternallyOwnedAccount {\n if (isCrowdsaleWallet(json)) {\n return decryptCrowdsale(json, password)\n }\n\n if (isKeystoreWallet(json)) {\n return decryptKeystoreSync(json, password);\n }\n\n throw new Error(\"invalid JSON wallet\");\n}\n\nexport {\n decryptCrowdsale,\n\n decryptKeystore,\n decryptKeystoreSync,\n encryptKeystore,\n\n isCrowdsaleWallet,\n isKeystoreWallet,\n getJsonWalletAddress,\n\n decryptJsonWallet,\n decryptJsonWalletSync,\n\n ProgressCallback,\n EncryptOptions,\n};\n","export const version = \"wallet/5.5.0\";\n","\"use strict\";\n\nimport { getAddress } from \"@ethersproject/address\";\nimport { Provider, TransactionRequest } from \"@ethersproject/abstract-provider\";\nimport { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { arrayify, Bytes, BytesLike, concat, hexDataSlice, isHexString, joinSignature, SignatureLike } from \"@ethersproject/bytes\";\nimport { hashMessage, _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { defaultPath, HDNode, entropyToMnemonic, Mnemonic } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { computeAddress, recoverAddress, serialize, UnsignedTransaction } from \"@ethersproject/transactions\";\nimport { Wordlist } from \"@ethersproject/wordlists\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction isAccount(value: any): value is ExternallyOwnedAccount {\n return (value != null && isHexString(value.privateKey, 32) && value.address != null);\n}\n\nfunction hasMnemonic(value: any): value is { mnemonic: Mnemonic } {\n const mnemonic = value.mnemonic;\n return (mnemonic && mnemonic.phrase);\n}\n\nexport class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner {\n\n readonly address: string;\n readonly provider: Provider;\n\n // Wrapping the _signingKey and _mnemonic in a getter function prevents\n // leaking the private key in console.log; still, be careful! :)\n readonly _signingKey: () => SigningKey;\n readonly _mnemonic: () => Mnemonic;\n\n constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider) {\n logger.checkNew(new.target, Wallet);\n\n super();\n\n if (isAccount(privateKey)) {\n const signingKey = new SigningKey(privateKey.privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n\n if (this.address !== getAddress(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n\n if (hasMnemonic(privateKey)) {\n const srcMnemonic = privateKey.mnemonic;\n defineReadOnly(this, \"_mnemonic\", () => (\n {\n phrase: srcMnemonic.phrase,\n path: srcMnemonic.path || defaultPath,\n locale: srcMnemonic.locale || \"en\"\n }\n ));\n const mnemonic = this.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if (computeAddress(node.privateKey) !== this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n }\n\n\n } else {\n if (SigningKey.isSigningKey(privateKey)) {\n /* istanbul ignore if */\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n defineReadOnly(this, \"_signingKey\", () => (privateKey));\n\n } else {\n // A lot of common tools do not prefix private keys with a 0x (see: #1166)\n if (typeof(privateKey) === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n }\n\n defineReadOnly(this, \"_mnemonic\", (): Mnemonic => null);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n }\n\n /* istanbul ignore if */\n if (provider && !Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n\n defineReadOnly(this, \"provider\", provider || null);\n }\n\n get mnemonic(): Mnemonic { return this._mnemonic(); }\n get privateKey(): string { return this._signingKey().privateKey; }\n get publicKey(): string { return this._signingKey().publicKey; }\n\n getAddress(): Promise {\n return Promise.resolve(this.address);\n }\n\n connect(provider: Provider): Wallet {\n return new Wallet(this, provider);\n }\n\n signTransaction(transaction: TransactionRequest): Promise {\n return resolveProperties(transaction).then((tx) => {\n if (tx.from != null) {\n if (getAddress(tx.from) !== this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n\n const signature = this._signingKey().signDigest(keccak256(serialize(tx)));\n return serialize(tx, signature);\n });\n }\n\n async signMessage(message: Bytes | string): Promise {\n return joinSignature(this._signingKey().signDigest(hashMessage(message)));\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n if (this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return this.provider.resolveName(name);\n });\n\n return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value)));\n }\n\n encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise {\n if (typeof(options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n\n if (progressCallback && typeof(progressCallback) !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n\n if (!options) { options = {}; }\n\n return encryptKeystore(this, password, options, progressCallback);\n }\n\n\n /**\n * Static methods to create Wallet instances.\n */\n static createRandom(options?: any): Wallet {\n let entropy: Uint8Array = randomBytes(16);\n\n if (!options) { options = { }; }\n\n if (options.extraEntropy) {\n entropy = arrayify(hexDataSlice(keccak256(concat([ entropy, options.extraEntropy ])), 0, 16));\n }\n\n const mnemonic = entropyToMnemonic(entropy, options.locale);\n return Wallet.fromMnemonic(mnemonic, options.path, options.locale);\n }\n\n static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise {\n return decryptJsonWallet(json, password, progressCallback).then((account) => {\n return new Wallet(account);\n });\n }\n\n static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet {\n return new Wallet(decryptJsonWalletSync(json, password));\n }\n\n static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet {\n if (!path) { path = defaultPath; }\n return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n }\n}\n\nexport function verifyMessage(message: Bytes | string, signature: SignatureLike): string {\n return recoverAddress(hashMessage(message), signature);\n}\n\nexport function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string {\n return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature);\n}\n","export const version = \"networks/5.5.1\";\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Network, Networkish } from \"./types\";\n\nexport {\n Network,\n Networkish\n};\n\ntype DefaultProviderFunc = (providers: any, options?: any) => any;\n\ninterface Renetworkable extends DefaultProviderFunc {\n renetwork: (network: Network) => DefaultProviderFunc;\n};\n\nfunction isRenetworkable(value: any): value is Renetworkable {\n return (value && typeof(value.renetwork) === \"function\");\n}\n\nfunction ethDefaultProvider(network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (options == null) { options = { }; }\n const providerList: Array = [];\n\n if (providers.InfuraProvider) {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch(error) { }\n }\n\n if (providers.EtherscanProvider) {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch(error) { }\n }\n\n if (providers.AlchemyProvider) {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch(error) { }\n }\n\n if (providers.PocketProvider) {\n // These networks are currently faulty on Pocket as their\n // network does not handle the Berlin hardfork, which is\n // live on these ones.\n // @TODO: This goes away once Pocket has upgraded their nodes\n const skip = [ \"goerli\", \"ropsten\", \"rinkeby\" ];\n try {\n const provider = new providers.PocketProvider(network);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch(error) { }\n }\n\n if (providers.CloudflareProvider) {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch(error) { }\n }\n\n if (providerList.length === 0) { return null; }\n\n if (providers.FallbackProvider) {\n let quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n\n return providerList[0];\n };\n\n func.renetwork = function(network: Network) {\n return ethDefaultProvider(network);\n };\n\n return func;\n}\n\nfunction etcDefaultProvider(url: string, network: string | Network): Renetworkable {\n const func = function(providers: any, options?: any): any {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n\n return null;\n };\n\n func.renetwork = function(network: Network) {\n return etcDefaultProvider(url, network);\n };\n\n return func;\n}\n\nconst homestead: Network = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n};\n\nconst ropsten: Network = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n};\n\nconst classicMordor: Network = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n};\n\n// See: https://chainlist.org\nconst networks: { [name: string]: Network } = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n\n homestead: homestead,\n mainnet: homestead,\n\n morden: { chainId: 2, name: \"morden\" },\n\n ropsten: ropsten,\n testnet: ropsten,\n\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n\n\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/etc\", \"classic\")\n },\n\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n\n classicMordor: classicMordor,\n classicTestnet: classicMordor,\n\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/kotti\", \"classicKotti\")\n },\n\n xdai: { chainId: 100, name: \"xdai\" },\n\n matic: { chainId: 137, name: \"matic\" },\n maticmum: { chainId: 80001, name: \"maticmum\" },\n\n optimism: { chainId: 10, name: \"optimism\" },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" },\n}\n\n/**\n * getNetwork\n *\n * Converts a named common networks or chain ID (network ID) to a Network\n * and verifies a network is a valid Network..\n */\nexport function getNetwork(network: Networkish): Network {\n // No network (null)\n if (network == null) { return null; }\n\n if (typeof(network) === \"number\") {\n for (const name in networks) {\n const standard = networks[name];\n if (standard.chainId === network) {\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: (standard.ensAddress || null),\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n }\n\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n\n if (typeof(network) === \"string\") {\n const standard = networks[network];\n if (standard == null) { return null; }\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: standard.ensAddress,\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n\n const standard = networks[network.name];\n\n // Not a standard network; check that it is a valid network in general\n if (!standard) {\n if (typeof(network.chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n\n // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155)\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n\n // @TODO: In the next major version add an attach function to a defaultProvider\n // class and move the _defaultProvider internal to this file (extend Network)\n let defaultProvider: DefaultProviderFunc = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n\n // Standard Network (allow overriding the ENS address)\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: (network.ensAddress || standard.ensAddress || null),\n _defaultProvider: defaultProvider\n };\n}\n","\"use strict\";\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function decode(textData: string): Uint8Array {\n textData = atob(textData);\n const data = [];\n for (let i = 0; i < textData.length; i++) {\n data.push(textData.charCodeAt(i));\n }\n return arrayify(data);\n}\n\nexport function encode(data: BytesLike): string {\n data = arrayify(data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n\n\n","\"use strict\";\n\nexport { decode, encode } from \"./base64\";\n","export const version = \"web/5.5.1\";\n","\"use strict\";\n\nimport { arrayify } from \"@ethersproject/bytes\";\n\nimport type { GetUrlResponse, Options } from \"./types\";\n\nexport { GetUrlResponse, Options };\n\nexport async function getUrl(href: string, options?: Options): Promise {\n if (options == null) { options = { }; }\n\n const request: RequestInit = {\n method: (options.method || \"GET\"),\n headers: (options.headers || { }),\n body: (options.body || undefined),\n };\n\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\"; // no-cors, cors, *same-origin\n request.cache = \"no-cache\"; // *default, no-cache, reload, force-cache, only-if-cached\n request.credentials = \"same-origin\"; // include, *same-origin, omit\n request.redirect = \"follow\"; // manual, *follow, error\n request.referrer = \"client\"; // no-referrer, *client\n };\n\n const response = await fetch(href, request);\n const body = await response.arrayBuffer();\n\n const headers: { [ name: string ]: string } = { };\n if (response.headers.forEach) {\n response.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n } else {\n (<() => Array>(((response.headers)).keys))().forEach((key) => {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n\n return {\n headers: headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: arrayify(new Uint8Array(body)),\n }\n}\n","\"use strict\";\n\nimport { decode as base64Decode, encode as base64Encode } from \"@ethersproject/base64\";\nimport { hexlify, isBytesLike } from \"@ethersproject/bytes\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { getUrl, GetUrlResponse, Options } from \"./geturl\";\n\nfunction staller(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\nfunction bodyify(value: any, type: string): string {\n if (value == null) { return null; }\n\n if (typeof(value) === \"string\") { return value; }\n\n if (isBytesLike(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return toUtf8String(value);\n } catch (error) { };\n }\n return hexlify(value);\n }\n\n return value;\n}\n\n// Exported Types\nexport type ConnectionInfo = {\n url: string,\n headers?: { [key: string]: string | number }\n\n user?: string,\n password?: string,\n\n allowInsecureAuthentication?: boolean,\n allowGzip?: boolean,\n\n throttleLimit?: number,\n throttleSlotInterval?: number;\n throttleCallback?: (attempt: number, url: string) => Promise,\n\n timeout?: number,\n};\n\nexport interface OnceBlockable {\n once(eventName: \"block\", handler: () => void): void;\n}\n\nexport interface OncePollable {\n once(eventName: \"poll\", handler: () => void): void;\n}\n\nexport type PollOptions = {\n timeout?: number,\n floor?: number,\n ceiling?: number,\n interval?: number,\n retryLimit?: number,\n onceBlock?: OnceBlockable\n oncePoll?: OncePollable\n};\n\nexport type FetchJsonResponse = {\n statusCode: number;\n headers: { [ header: string ]: string };\n};\n\n\ntype Header = { key: string, value: string };\n\n// This API is still a work in progress; the future changes will likely be:\n// - ConnectionInfo => FetchDataRequest\n// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }\n// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified)\n// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T\n// For this reason, it should be considered internal until the API is finalized\nexport function _fetchData(connection: string | ConnectionInfo, body?: Uint8Array, processFunc?: (value: Uint8Array, response: FetchJsonResponse) => T): Promise {\n\n // How many times to retry in the event of a throttle\n const attemptLimit = (typeof(connection) === \"object\" && connection.throttleLimit != null) ? connection.throttleLimit: 12;\n logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0),\n \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n\n const throttleCallback = ((typeof(connection) === \"object\") ? connection.throttleCallback: null);\n const throttleSlotInterval = ((typeof(connection) === \"object\" && typeof(connection.throttleSlotInterval) === \"number\") ? connection.throttleSlotInterval: 100);\n logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0),\n \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n\n const headers: { [key: string]: Header } = { };\n\n let url: string = null;\n\n // @TODO: Allow ConnectionInfo to override some of these values\n const options: Options = {\n method: \"GET\",\n };\n\n let allow304 = false;\n\n let timeout = 2 * 60 * 1000;\n\n if (typeof(connection) === \"string\") {\n url = connection;\n\n } else if (typeof(connection) === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n\n url = connection.url;\n\n if (typeof(connection.timeout) === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n\n if (connection.headers) {\n for (const key in connection.headers) {\n headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n\n options.allowGzip = !!connection.allowGzip;\n\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\n \"basic authentication requires a secure https url\",\n Logger.errors.INVALID_ARGUMENT,\n { argument: \"url\", url: url, user: connection.user, password: \"[REDACTED]\" }\n );\n }\n\n const authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + base64Encode(toUtf8Bytes(authorization))\n };\n }\n }\n const reData = new RegExp(\"^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$\", \"i\");\n const dataMatch = ((url) ? url.match(reData): null);\n if (dataMatch) {\n try {\n const response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] },\n body: base64Decode(dataMatch[2])\n };\n\n let result: T = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n\n } catch (error) {\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error: error,\n requestBody: null,\n requestMethod: \"GET\",\n url: url\n });\n }\n }\n\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n\n const flatHeaders: { [ key: string ]: string } = { };\n Object.keys(headers).forEach((key) => {\n const header = headers[key];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n\n const runningTimeout = (function() {\n let timer: NodeJS.Timer = null;\n const promise: Promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(() => {\n if (timer == null) { return; }\n timer = null;\n\n reject(logger.makeError(\"timeout\", Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout: timeout,\n url: url\n }));\n }, timeout);\n }\n });\n\n const cancel = function() {\n if (timer == null) { return; }\n clearTimeout(timer);\n timer = null;\n }\n\n return { promise, cancel };\n })();\n\n const runningFetch = (async function() {\n\n for (let attempt = 0; attempt < attemptLimit; attempt++) {\n let response: GetUrlResponse = null;\n\n try {\n response = await getUrl(url, options);\n\n if (attempt < attemptLimit) {\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirection; for now we only support absolute locataions\n const location = response.headers.location || \"\";\n if (options.method === \"GET\" && location.match(/^https:/)) {\n url = response.headers.location;\n continue;\n }\n\n } else if (response.statusCode === 429) {\n // Exponential back-off throttling\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n let stall = 0;\n\n const retryAfter = response.headers[\"retry-after\"];\n if (typeof(retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1000;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n\n //console.log(\"Stalling 429\");\n await staller(stall);\n continue;\n }\n }\n }\n\n } catch (error) {\n response = (error).response;\n if (response == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error,\n url: url\n });\n }\n }\n\n\n let body = response.body;\n\n if (allow304 && response.statusCode === 304) {\n body = null;\n\n } else if (response.statusCode < 200 || response.statusCode >= 300) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", Logger.errors.SERVER_ERROR, {\n status: response.statusCode,\n headers: response.headers,\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n\n if (processFunc) {\n try {\n const result = await processFunc(body, response);\n runningTimeout.cancel();\n return result;\n\n } catch (error) {\n // Allow the processFunc to trigger a throttle\n if (error.throttleRetry && attempt < attemptLimit) {\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = await throttleCallback(attempt, url);\n }\n\n if (tryAgain) {\n const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n //console.log(\"Stalling callback\");\n await staller(timeout);\n continue;\n }\n }\n\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"]: null)),\n error: error,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n }\n\n runningTimeout.cancel();\n\n // If we had a processFunc, it either returned a T or threw above.\n // The \"body\" is now a Uint8Array.\n return (body);\n }\n\n return logger.throwError(\"failed response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n })();\n\n return Promise.race([ runningTimeout.promise, runningFetch ]);\n}\n\nexport function fetchJson(connection: string | ConnectionInfo, json?: string, processFunc?: (value: any, response: FetchJsonResponse) => any): Promise {\n let processJsonFunc = (value: Uint8Array, response: FetchJsonResponse) => {\n let result: any = null;\n if (value != null) {\n try {\n result = JSON.parse(toUtf8String(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", Logger.errors.SERVER_ERROR, {\n body: value,\n error: error\n });\n }\n }\n\n if (processFunc) {\n result = processFunc(result, response);\n }\n\n return result;\n }\n\n // If we have json to send, we must\n // - add content-type of application/json (unless already overridden)\n // - convert the json to bytes\n let body: Uint8Array = null;\n if (json != null) {\n body = toUtf8Bytes(json);\n\n // Create a connection with the content-type set for JSON\n const updated: ConnectionInfo = (typeof(connection) === \"string\") ? ({ url: connection }): shallowCopy(connection);\n if (updated.headers) {\n const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === \"content-type\")).length) !== 0;\n if (!hasContentType) {\n updated.headers = shallowCopy(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n\n return _fetchData(connection, body, processJsonFunc);\n}\n\nexport function poll(func: () => Promise, options?: PollOptions): Promise {\n if (!options) { options = {}; }\n options = shallowCopy(options);\n if (options.floor == null) { options.floor = 0; }\n if (options.ceiling == null) { options.ceiling = 10000; }\n if (options.interval == null) { options.interval = 250; }\n\n return new Promise(function(resolve, reject) {\n\n let timer: NodeJS.Timer = null;\n let done: boolean = false;\n\n // Returns true if cancel was successful. Unsuccessful cancel means we're already done.\n const cancel = (): boolean => {\n if (done) { return false; }\n done = true;\n if (timer) { clearTimeout(timer); }\n return true;\n };\n\n if (options.timeout) {\n timer = setTimeout(() => {\n if (cancel()) { reject(new Error(\"timeout\")); }\n }, options.timeout)\n }\n\n const retryLimit = options.retryLimit;\n\n let attempt = 0;\n function check() {\n return func().then(function(result) {\n\n // If we have a result, or are allowed null then we're done\n if (result !== undefined) {\n if (cancel()) { resolve(result); }\n\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n\n // Otherwise, exponential back-off (up to 10s) our next request\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) { reject(new Error(\"retry limit reached\")); }\n return;\n }\n\n let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) { timeout = options.floor; }\n if (timeout > options.ceiling) { timeout = options.ceiling; }\n\n setTimeout(check, timeout);\n }\n\n return null;\n }, function(error) {\n if (cancel()) { reject(error); }\n });\n }\n check();\n });\n}\n\n","'use strict'\nvar ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'\n\n// pre-compute lookup table\nvar ALPHABET_MAP = {}\nfor (var z = 0; z < ALPHABET.length; z++) {\n var x = ALPHABET.charAt(z)\n\n if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\n ALPHABET_MAP[x] = z\n}\n\nfunction polymodStep (pre) {\n var b = pre >> 25\n return ((pre & 0x1FFFFFF) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3)\n}\n\nfunction prefixChk (prefix) {\n var chk = 1\n for (var i = 0; i < prefix.length; ++i) {\n var c = prefix.charCodeAt(i)\n if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')'\n\n chk = polymodStep(chk) ^ (c >> 5)\n }\n chk = polymodStep(chk)\n\n for (i = 0; i < prefix.length; ++i) {\n var v = prefix.charCodeAt(i)\n chk = polymodStep(chk) ^ (v & 0x1f)\n }\n return chk\n}\n\nfunction encode (prefix, words, LIMIT) {\n LIMIT = LIMIT || 90\n if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit')\n\n prefix = prefix.toLowerCase()\n\n // determine chk mod\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') throw new Error(chk)\n\n var result = prefix + '1'\n for (var i = 0; i < words.length; ++i) {\n var x = words[i]\n if ((x >> 5) !== 0) throw new Error('Non 5-bit word')\n\n chk = polymodStep(chk) ^ x\n result += ALPHABET.charAt(x)\n }\n\n for (i = 0; i < 6; ++i) {\n chk = polymodStep(chk)\n }\n chk ^= 1\n\n for (i = 0; i < 6; ++i) {\n var v = (chk >> ((5 - i) * 5)) & 0x1f\n result += ALPHABET.charAt(v)\n }\n\n return result\n}\n\nfunction __decode (str, LIMIT) {\n LIMIT = LIMIT || 90\n if (str.length < 8) return str + ' too short'\n if (str.length > LIMIT) return 'Exceeds length limit'\n\n // don't allow mixed case\n var lowered = str.toLowerCase()\n var uppered = str.toUpperCase()\n if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str\n str = lowered\n\n var split = str.lastIndexOf('1')\n if (split === -1) return 'No separator character for ' + str\n if (split === 0) return 'Missing prefix for ' + str\n\n var prefix = str.slice(0, split)\n var wordChars = str.slice(split + 1)\n if (wordChars.length < 6) return 'Data too short'\n\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') return chk\n\n var words = []\n for (var i = 0; i < wordChars.length; ++i) {\n var c = wordChars.charAt(i)\n var v = ALPHABET_MAP[c]\n if (v === undefined) return 'Unknown character ' + c\n chk = polymodStep(chk) ^ v\n\n // not in the checksum?\n if (i + 6 >= wordChars.length) continue\n words.push(v)\n }\n\n if (chk !== 1) return 'Invalid checksum for ' + str\n return { prefix: prefix, words: words }\n}\n\nfunction decodeUnsafe () {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n}\n\nfunction decode (str) {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n\n throw new Error(res)\n}\n\nfunction convert (data, inBits, outBits, pad) {\n var value = 0\n var bits = 0\n var maxV = (1 << outBits) - 1\n\n var result = []\n for (var i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i]\n bits += inBits\n\n while (bits >= outBits) {\n bits -= outBits\n result.push((value >> bits) & maxV)\n }\n }\n\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV)\n }\n } else {\n if (bits >= inBits) return 'Excess padding'\n if ((value << (outBits - bits)) & maxV) return 'Non-zero padding'\n }\n\n return result\n}\n\nfunction toWordsUnsafe (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n}\n\nfunction toWords (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nfunction fromWordsUnsafe (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n}\n\nfunction fromWords (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nmodule.exports = {\n decodeUnsafe: decodeUnsafe,\n decode: decode,\n encode: encode,\n toWordsUnsafe: toWordsUnsafe,\n toWords: toWords,\n fromWordsUnsafe: fromWordsUnsafe,\n fromWords: fromWords\n}\n","export const version = \"providers/5.5.1\";\n","\"use strict\";\n\nimport { Block, TransactionReceipt, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { AddressZero } from \"@ethersproject/constants\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { AccessList, accessListify, parse as parseTransaction } from \"@ethersproject/transactions\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport type FormatFunc = (value: any) => any;\n\nexport type FormatFuncs = { [ key: string ]: FormatFunc };\n\nexport type Formats = {\n transaction: FormatFuncs,\n transactionRequest: FormatFuncs,\n receipt: FormatFuncs,\n receiptLog: FormatFuncs,\n block: FormatFuncs,\n blockWithTransactions: FormatFuncs,\n filter: FormatFuncs,\n filterLog: FormatFuncs,\n};\n\nexport class Formatter {\n readonly formats: Formats;\n\n constructor() {\n logger.checkNew(new.target, Formatter);\n this.formats = this.getDefaultFormats();\n }\n\n getDefaultFormats(): Formats {\n const formats: Formats = ({ });\n\n const address = this.address.bind(this);\n const bigNumber = this.bigNumber.bind(this);\n const blockTag = this.blockTag.bind(this);\n const data = this.data.bind(this);\n const hash = this.hash.bind(this);\n const hex = this.hex.bind(this);\n const number = this.number.bind(this);\n const type = this.type.bind(this);\n\n const strictData = (v: any) => { return this.data(v, true); };\n\n formats.transaction = {\n hash: hash,\n\n type: type,\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n\n blockHash: Formatter.allowNull(hash, null),\n blockNumber: Formatter.allowNull(number, null),\n transactionIndex: Formatter.allowNull(number, null),\n\n confirmations: Formatter.allowNull(number, null),\n\n from: address,\n\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n\n gasLimit: bigNumber,\n to: Formatter.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data: data,\n\n r: Formatter.allowNull(this.uint256),\n s: Formatter.allowNull(this.uint256),\n v: Formatter.allowNull(number),\n\n creates: Formatter.allowNull(address, null),\n\n raw: Formatter.allowNull(data),\n };\n\n formats.transactionRequest = {\n from: Formatter.allowNull(address),\n nonce: Formatter.allowNull(number),\n gasLimit: Formatter.allowNull(bigNumber),\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n to: Formatter.allowNull(address),\n value: Formatter.allowNull(bigNumber),\n data: Formatter.allowNull(strictData),\n type: Formatter.allowNull(number),\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n };\n\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash,\n address: address,\n topics: Formatter.arrayOf(hash),\n data: data,\n logIndex: number,\n blockHash: hash,\n };\n\n formats.receipt = {\n to: Formatter.allowNull(this.address, null),\n from: Formatter.allowNull(this.address, null),\n contractAddress: Formatter.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter.allowNull(data),// @TODO: should this be data?\n blockHash: hash,\n transactionHash: hash,\n logs: Formatter.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter.allowNull(bigNumber),\n status: Formatter.allowNull(number),\n type: type\n };\n\n formats.block = {\n hash: hash,\n parentHash: hash,\n number: number,\n\n timestamp: number,\n nonce: Formatter.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n\n miner: address,\n extraData: data,\n\n transactions: Formatter.allowNull(Formatter.arrayOf(hash)),\n\n baseFeePerGas: Formatter.allowNull(bigNumber)\n };\n\n formats.blockWithTransactions = shallowCopy(formats.block);\n formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));\n\n formats.filter = {\n fromBlock: Formatter.allowNull(blockTag, undefined),\n toBlock: Formatter.allowNull(blockTag, undefined),\n blockHash: Formatter.allowNull(hash, undefined),\n address: Formatter.allowNull(address, undefined),\n topics: Formatter.allowNull(this.topics.bind(this), undefined),\n };\n\n formats.filterLog = {\n blockNumber: Formatter.allowNull(number),\n blockHash: Formatter.allowNull(hash),\n transactionIndex: number,\n\n removed: Formatter.allowNull(this.boolean.bind(this)),\n\n address: address,\n data: Formatter.allowFalsish(data, \"0x\"),\n\n topics: Formatter.arrayOf(hash),\n\n transactionHash: hash,\n logIndex: number,\n };\n\n return formats;\n }\n\n accessList(accessList: Array): AccessList {\n return accessListify(accessList || []);\n }\n\n // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number\n // Strict! Used on input.\n number(number: any): number {\n if (number === \"0x\") { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n type(number: any): number {\n if (number === \"0x\" || number == null) { return 0; }\n return BigNumber.from(number).toNumber();\n }\n\n // Strict! Used on input.\n bigNumber(value: any): BigNumber {\n return BigNumber.from(value);\n }\n\n // Requires a boolean, \"true\" or \"false\"; returns a boolean\n boolean(value: any): boolean {\n if (typeof(value) === \"boolean\") { return value; }\n if (typeof(value) === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") { return true; }\n if (value === \"false\") { return false; }\n }\n throw new Error(\"invalid boolean - \" + value);\n }\n\n hex(value: any, strict?: boolean): string {\n if (typeof(value) === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") { value = \"0x\" + value; }\n if (isHexString(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n\n data(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if ((result.length % 2) !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n }\n\n // Requires an address\n // Strict! Used on input.\n address(value: any): string {\n return getAddress(value);\n }\n\n callAddress(value: any): string {\n if (!isHexString(value, 32)) { return null; }\n const address = getAddress(hexDataSlice(value, 12));\n return (address === AddressZero) ? null: address;\n }\n\n contractAddress(value: any): string {\n return getContractAddress(value);\n }\n\n // Strict! Used on input.\n blockTag(blockTag: any): string {\n if (blockTag == null) { return \"latest\"; }\n\n if (blockTag === \"earliest\") { return \"0x0\"; }\n\n if (blockTag === \"latest\" || blockTag === \"pending\") {\n return blockTag;\n }\n\n if (typeof(blockTag) === \"number\" || isHexString(blockTag)) {\n return hexValue(blockTag);\n }\n\n throw new Error(\"invalid blockTag\");\n }\n\n // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash.\n hash(value: any, strict?: boolean): string {\n const result = this.hex(value, strict);\n if (hexDataLength(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n }\n\n // Returns the difficulty as a number, or if too large (i.e. PoA network) null\n difficulty(value: any): number {\n if (value == null) { return null; }\n\n const v = BigNumber.from(value);\n\n try {\n return v.toNumber();\n } catch (error) { }\n\n return null;\n }\n\n uint256(value: any): string {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return hexZeroPad(value, 32);\n }\n\n _block(value: any, format: any): Block {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n // The difficulty may need to come from _difficulty in recursed blocks\n const difficulty = (value._difficulty != null) ? value._difficulty: value.difficulty;\n const result = Formatter.check(format, value);\n result._difficulty = ((difficulty == null) ? null: BigNumber.from(difficulty));\n return result;\n }\n\n block(value: any): Block {\n return this._block(value, this.formats.block);\n }\n\n blockWithTransactions(value: any): Block {\n return this._block(value, this.formats.blockWithTransactions);\n }\n\n // Strict! Used on input.\n transactionRequest(value: any): any {\n return Formatter.check(this.formats.transactionRequest, value);\n }\n\n transactionResponse(transaction: any): TransactionResponse {\n\n // Rename gas to gasLimit\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (transaction.to && BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n\n // Rename input to data\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n\n // If to and creates are empty, populate the creates from the transaction\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n\n if ((transaction.type === 1 || transaction.type === 2)&& transaction.accessList == null) {\n transaction.accessList = [ ];\n }\n\n const result: TransactionResponse = Formatter.check(this.formats.transaction, transaction);\n\n if (transaction.chainId != null) {\n let chainId = transaction.chainId;\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n result.chainId = chainId;\n\n } else {\n let chainId = transaction.networkId;\n\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n if (typeof(chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) { chainId = 0; }\n chainId = parseInt(chainId);\n }\n\n if (typeof(chainId) !== \"number\") { chainId = 0; }\n\n result.chainId = chainId;\n }\n\n // 0x0000... should actually be null\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n\n return result;\n }\n\n transaction(value: any): any {\n return parseTransaction(value);\n }\n\n receiptLog(value: any): any {\n return Formatter.check(this.formats.receiptLog, value);\n }\n\n receipt(value: any): TransactionReceipt {\n const result: TransactionReceipt = Formatter.check(this.formats.receipt, value);\n\n // RSK incorrectly implemented EIP-658, so we munge things a bit here for it\n if (result.root != null) {\n if (result.root.length <= 4) {\n // Could be 0x00, 0x0, 0x01 or 0x1\n const value = BigNumber.from(result.root).toNumber();\n if (value === 0 || value === 1) {\n // Make sure if both are specified, they match\n if (result.status != null && (result.status !== value)) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n // Must be a valid bytes32\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n\n if (result.status != null) {\n result.byzantium = true;\n }\n\n return result;\n }\n\n topics(value: any): any {\n if (Array.isArray(value)) {\n return value.map((v) => this.topics(v));\n\n } else if (value != null) {\n return this.hash(value, true);\n }\n\n return null;\n }\n\n filter(value: any): any {\n return Formatter.check(this.formats.filter, value);\n }\n\n filterLog(value: any): any {\n return Formatter.check(this.formats.filterLog, value);\n }\n\n static check(format: { [ name: string ]: FormatFunc }, object: any): any {\n const result: any = {};\n for (const key in format) {\n try {\n const value = format[key](object[key]);\n if (value !== undefined) { result[key] = value; }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n }\n\n // if value is null-ish, nullValue is returned\n static allowNull(format: FormatFunc, nullValue?: any): FormatFunc {\n return (function(value: any) {\n if (value == null) { return nullValue; }\n return format(value);\n });\n }\n\n // If value is false-ish, replaceValue is returned\n static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc {\n return (function(value: any) {\n if (!value) { return replaceValue; }\n return format(value);\n });\n }\n\n // Requires an Array satisfying check\n static arrayOf(format: FormatFunc): FormatFunc {\n return (function(array: any): Array {\n if (!Array.isArray(array)) { throw new Error(\"not an array\"); }\n\n const result: any = [];\n\n array.forEach(function(value) {\n result.push(format(value));\n });\n\n return result;\n });\n }\n}\n\nexport interface CommunityResourcable {\n isCommunityResource(): boolean;\n}\n\nexport function isCommunityResourcable(value: any): value is CommunityResourcable {\n return (value && typeof(value.isCommunityResource) === \"function\");\n}\n\nexport function isCommunityResource(value: any): boolean {\n return (isCommunityResourcable(value) && value.isCommunityResource());\n}\n\n// Show the throttle message only once\nlet throttleMessage = false;\nexport function showThrottleMessage() {\n if (throttleMessage) { return; }\n throttleMessage = true;\n\n console.log(\"========= NOTICE =========\")\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n}\n\n","\"use strict\";\n\nimport {\n Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, ForkEvent,\n Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse\n} from \"@ethersproject/abstract-provider\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { namehash } from \"@ethersproject/hash\";\nimport { getNetwork, Network, Networkish } from \"@ethersproject/networks\";\nimport { Deferrable, defineReadOnly, getStatic, resolveProperties } from \"@ethersproject/properties\";\nimport { Transaction } from \"@ethersproject/transactions\";\nimport { sha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { fetchJson, poll } from \"@ethersproject/web\";\n\nimport bech32 from \"bech32\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { Formatter } from \"./formatter\";\n\n//////////////////////////////\n// Event Serializeing\n\nfunction checkTopic(topic: string): string {\n if (topic == null) { return \"null\"; }\n if (hexDataLength(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n}\n\nfunction serializeTopics(topics: Array>): string {\n // Remove trailing null AND-topics; they are redundant\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) { topics.pop(); }\n\n return topics.map((topic) => {\n if (Array.isArray(topic)) {\n\n // Only track unique OR-topics\n const unique: { [ topic: string ]: boolean } = { }\n topic.forEach((topic) => {\n unique[checkTopic(topic)] = true;\n });\n\n // The order of OR-topics does not matter\n const sorted = Object.keys(unique);\n sorted.sort();\n\n return sorted.join(\"|\");\n\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n}\n\nfunction deserializeTopics(data: string): Array> {\n if (data === \"\") { return [ ]; }\n\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") { return [ ]; }\n\n const comps = topic.split(\"|\").map((topic) => {\n return ((topic === \"null\") ? null: topic);\n });\n\n return ((comps.length === 1) ? comps[0]: comps);\n });\n}\n\nfunction getEventTag(eventName: EventType): string {\n if (typeof(eventName) === \"string\") {\n eventName = eventName.toLowerCase();\n\n if (hexDataLength(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n\n } else if (ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n\n } else if (eventName && typeof(eventName) === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n\n throw new Error(\"invalid event - \" + eventName);\n}\n\n//////////////////////////////\n// Helper Object\n\nfunction getTime() {\n return (new Date()).getTime();\n}\n\nfunction stall(duration: number): Promise {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n\n//////////////////////////////\n// Provider Object\n\n\n/**\n * EventType\n * - \"block\"\n * - \"poll\"\n * - \"didPoll\"\n * - \"pending\"\n * - \"error\"\n * - \"network\"\n * - filter\n * - topics array\n * - transaction hash\n */\n\nconst PollableEvents = [ \"block\", \"network\", \"pending\", \"poll\" ];\n\nexport class Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"listener\", listener);\n defineReadOnly(this, \"once\", once);\n }\n\n get event(): EventType {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n }\n\n get type(): string {\n return this.tag.split(\":\")[0]\n }\n\n get hash(): string {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") { return null; }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") { return null; }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = { };\n\n if (topics.length > 0) { filter.topics = topics; }\n if (address && address !== \"*\") { filter.address = address; }\n\n return filter;\n }\n\n pollable(): boolean {\n return (this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0);\n }\n}\n\nexport interface EnsResolver {\n\n // Name this Resolver is associated with\n readonly name: string;\n\n // The address of the resolver\n readonly address: string;\n\n // Multichain address resolution (also normal address resolution)\n // See: https://eips.ethereum.org/EIPS/eip-2304\n getAddress(coinType?: 60): Promise\n\n // Contenthash field\n // See: https://eips.ethereum.org/EIPS/eip-1577\n getContentHash(): Promise;\n\n // Storage of text records\n // See: https://eips.ethereum.org/EIPS/eip-634\n getText(key: string): Promise;\n};\n\nexport interface EnsProvider {\n resolveName(name: string): Promise;\n lookupAddress(address: string): Promise;\n getResolver(name: string): Promise;\n}\n\ntype CoinInfo = {\n symbol: string,\n ilk?: string, // General family\n prefix?: string, // Bech32 prefix\n p2pkh?: number, // Pay-to-Public-Key-Hash Version\n p2sh?: number, // Pay-to-Script-Hash Version\n};\n\n// https://github.com/satoshilabs/slips/blob/master/slip-0044.md\nconst coinInfos: { [ coinType: string ]: CoinInfo } = {\n \"0\": { symbol: \"btc\", p2pkh: 0x00, p2sh: 0x05, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 0x30, p2sh: 0x32, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 0x1e, p2sh: 0x16 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" },\n};\n\nfunction bytes32ify(value: number): string {\n return hexZeroPad(BigNumber.from(value).toHexString(), 32);\n}\n\n// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d)\nfunction base58Encode(data: Uint8Array): string {\n return Base58.encode(concat([ data, hexDataSlice(sha256(sha256(data)), 0, 4) ]));\n}\n\nexport interface Avatar {\n url: string;\n linkage: Array<{ type: string, content: string }>;\n}\n\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\"),\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\n\nfunction _parseString(result: string): null | string {\n try {\n return toUtf8String(_parseBytes(result));\n } catch(error) { }\n return null;\n}\n\nfunction _parseBytes(result: string): null | string {\n if (result === \"0x\") { return null; }\n\n const offset = BigNumber.from(hexDataSlice(result, 0, 32)).toNumber();\n const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber();\n return hexDataSlice(result, offset + 32, offset + 32 + length);\n}\n\n\nexport class Resolver implements EnsResolver {\n readonly provider: BaseProvider;\n\n readonly name: string;\n readonly address: string;\n\n readonly _resolvedAddress: null | string;\n\n // The resolvedAddress is only for creating a ReverseLookup resolver\n constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string) {\n defineReadOnly(this, \"provider\", provider);\n defineReadOnly(this, \"name\", name);\n defineReadOnly(this, \"address\", provider.formatter.address(address));\n defineReadOnly(this, \"_resolvedAddress\", resolvedAddress);\n }\n\n async _fetchBytes(selector: string, parameters?: string): Promise {\n // e.g. keccak256(\"addr(bytes32,uint256)\")\n const tx = {\n to: this.address,\n data: hexConcat([ selector, namehash(this.name), (parameters || \"0x\") ])\n };\n\n try {\n return _parseBytes(await this.provider.call(tx));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n _getAddress(coinType: number, hexBytes: string): string {\n const coinInfo = coinInfos[String(coinType)];\n\n if (coinInfo == null) {\n logger.throwError(`unsupported coin type: ${ coinType }`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`\n });\n }\n\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n\n const bytes = arrayify(hexBytes);\n\n // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG\n if (coinInfo.p2pkh != null) {\n const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n const length = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2pkh ], (\"0x\" + p2pkh[2]) ]));\n }\n }\n }\n\n // P2SH: OP_HASH160 OP_EQUAL\n if (coinInfo.p2sh != null) {\n const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n const length = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([ [ coinInfo.p2sh ], (\"0x\" + p2sh[2]) ]));\n }\n }\n }\n\n // Bech32\n if (coinInfo.prefix != null) {\n const length = bytes[1];\n\n // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program\n let version = bytes[0];\n if (version === 0x00) {\n if (length !== 20 && length !== 32) {\n version = -1;\n }\n } else {\n version = -1;\n }\n\n if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {\n const words = bech32.toWords(bytes.slice(2));\n words.unshift(version);\n return bech32.encode(coinInfo.prefix, words);\n }\n }\n\n return null;\n }\n\n\n async getAddress(coinType?: number): Promise {\n if (coinType == null) { coinType = 60; }\n\n // If Ethereum, use the standard `addr(bytes32)`\n if (coinType === 60) {\n try {\n // keccak256(\"addr(bytes32)\")\n const transaction = {\n to: this.address,\n data: (\"0x3b3b57de\" + namehash(this.name).substring(2))\n };\n const hexBytes = await this.provider.call(transaction);\n\n // No address\n if (hexBytes === \"0x\" || hexBytes === HashZero) { return null; }\n\n return this.provider.formatter.callAddress(hexBytes);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n // keccak256(\"addr(bytes32,uint256\")\n const hexBytes = await this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType));\n\n // No address\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // Compute the address\n const address = this._getAddress(coinType, hexBytes);\n\n if (address == null) {\n logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${ coinType })`,\n coinType: coinType,\n data: hexBytes\n });\n }\n\n return address;\n }\n\n async getAvatar(): Promise {\n const linkage: Array<{ type: string, content: string }> = [ ];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) { return null; }\n\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n\n if (match == null) { continue; }\n switch (match[1]) {\n case \"https\":\n linkage.push({ type: \"url\", content: avatar });\n return { linkage, url: avatar };\n\n case \"data\":\n linkage.push({ type: \"data\", content: avatar });\n return { linkage, url: avatar };\n\n case \"ipfs\":\n linkage.push({ type: \"ipfs\", content: avatar });\n return { linkage, url: `https:/\\/gateway.ipfs.io/ipfs/${ avatar.substring(7) }` }\n\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (match[1] === \"erc721\") ? \"0xc87b56dd\": \"0x0e89341c\";\n linkage.push({ type: match[1], content: avatar });\n\n // The owner of this name\n const owner = (this._resolvedAddress || await this.getAddress());\n\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) { return null; }\n\n const addr = await this.provider.formatter.address(comps[0]);\n const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);\n\n // Check that this account owns the token\n if (match[1] === \"erc721\") {\n // ownerOf(uint256 tokenId)\n const tokenOwner = this.provider.formatter.callAddress(await this.provider.call({\n to: addr, data: hexConcat([ \"0x6352211e\", tokenId ])\n }));\n if (owner !== tokenOwner) { return null; }\n linkage.push({ type: \"owner\", content: tokenOwner });\n\n } else if (match[1] === \"erc1155\") {\n // balanceOf(address owner, uint256 tokenId)\n const balance = BigNumber.from(await this.provider.call({\n to: addr, data: hexConcat([ \"0x00fdd58e\", hexZeroPad(owner, 32), tokenId ])\n }));\n if (balance.isZero()) { return null; }\n linkage.push({ type: \"balance\", content: balance.toString() });\n }\n\n // Call the token contract for the metadata URL\n const tx = {\n to: this.provider.formatter.address(comps[0]),\n data: hexConcat([ selector, tokenId ])\n };\n let metadataUrl = _parseString(await this.provider.call(tx))\n if (metadataUrl == null) { return null; }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n\n // ERC-1155 allows a generic {id} in the URL\n if (match[1] === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n }\n\n // Get the token metadata\n const metadata = await fetchJson(metadataUrl);\n\n // Pull the image URL out\n if (!metadata || typeof(metadata.image) !== \"string\" || !metadata.image.match(/^(https:\\/\\/|data:)/i)) {\n return null;\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n linkage.push({ type: \"url\", content: metadata.image });\n\n return { linkage, url: metadata.image };\n }\n }\n }\n } catch (error) { }\n\n return null;\n }\n\n async getContentHash(): Promise {\n\n // keccak256(\"contenthash()\")\n const hexBytes = await this._fetchBytes(\"0xbc1c58d1\");\n\n // No contenthash\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n // IPFS (CID: 1, Type: DAG-PB)\n const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const length = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length * 2) {\n return \"ipfs:/\\/\" + Base58.encode(\"0x\" + ipfs[1]);\n }\n }\n\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/)\n if (swarm) {\n if (swarm[1].length === (32 * 2)) {\n return \"bzz:/\\/\" + swarm[1]\n }\n }\n\n return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n });\n }\n\n async getText(key: string): Promise {\n\n // The key encoded as parameter to fetchBytes\n let keyBytes = toUtf8Bytes(key);\n\n // The nodehash consumes the first slot, so the string pointer targets\n // offset 64, with the length at offset 64 and data starting at offset 96\n keyBytes = concat([ bytes32ify(64), bytes32ify(keyBytes.length), keyBytes ]);\n\n // Pad to word-size (32 bytes)\n if ((keyBytes.length % 32) !== 0) {\n keyBytes = concat([ keyBytes, hexZeroPad(\"0x\", 32 - (key.length % 32)) ])\n }\n\n const hexBytes = await this._fetchBytes(\"0x59d1d43c\", hexlify(keyBytes));\n if (hexBytes == null || hexBytes === \"0x\") { return null; }\n\n return toUtf8String(hexBytes);\n }\n}\n\nlet defaultFormatter: Formatter = null;\n\nlet nextPollId = 1;\n\nexport class BaseProvider extends Provider implements EnsProvider {\n _networkPromise: Promise;\n _network: Network;\n\n _events: Array;\n\n formatter: Formatter;\n\n // To help mitigate the eventually consistent nature of the blockchain\n // we keep a mapping of events we emit. If we emit an event X, we expect\n // that a user should be able to query for that event in the callback,\n // if the node returns null, we stall the response until we get back a\n // meaningful value, since we may be hitting a re-org, or a node that\n // has not indexed the event yet.\n // Events:\n // - t:{hash} - Transaction hash\n // - b:{hash} - BlockHash\n // - block - The most recent emitted block\n _emitted: { [ eventName: string ]: number | \"pending\" };\n\n _pollingInterval: number;\n _poller: NodeJS.Timer;\n _bootstrapPoll: NodeJS.Timer;\n\n _lastBlockNumber: number;\n\n _fastBlockNumber: number;\n _fastBlockNumberPromise: Promise;\n _fastQueryDate: number;\n\n _maxInternalBlockNumber: number;\n _internalBlockNumber: Promise<{ blockNumber: number, reqTime: number, respTime: number }>;\n\n readonly anyNetwork: boolean;\n\n\n /**\n * ready\n *\n * A Promise that resolves only once the provider is ready.\n *\n * Sub-classes that call the super with a network without a chainId\n * MUST set this. Standard named networks have a known chainId.\n *\n */\n\n constructor(network: Networkish | Promise) {\n logger.checkNew(new.target, Provider);\n\n super();\n\n // Events being listened to\n this._events = [];\n\n this._emitted = { block: -2 };\n\n this.formatter = new.target.getFormatter();\n\n // If network is any, this Provider allows the underlying\n // network to change dynamically, and we auto-detect the\n // current network\n defineReadOnly(this, \"anyNetwork\", (network === \"any\"));\n if (this.anyNetwork) { network = this.detectNetwork(); }\n\n if (network instanceof Promise) {\n this._networkPromise = network;\n\n // Squash any \"unhandled promise\" errors; that do not need to be handled\n network.catch((error) => { });\n\n // Trigger initial network setting (async)\n this._ready().catch((error) => { });\n\n } else {\n const knownNetwork = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (knownNetwork) {\n defineReadOnly(this, \"_network\", knownNetwork);\n this.emit(\"network\", knownNetwork, null);\n\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n\n this._maxInternalBlockNumber = -1024;\n\n this._lastBlockNumber = -2;\n\n this._pollingInterval = 4000;\n\n this._fastQueryDate = 0;\n }\n\n async _ready(): Promise {\n if (this._network == null) {\n let network: Network = null;\n if (this._networkPromise) {\n try {\n network = await this._networkPromise;\n } catch (error) { }\n }\n\n // Try the Provider's network detection (this MUST throw if it cannot)\n if (network == null) {\n network = await this.detectNetwork();\n }\n\n // This should never happen; every Provider sub-class should have\n // suggested a network by here (or have thrown).\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // Possible this call stacked so do not call defineReadOnly again\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n defineReadOnly(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n }\n\n return this._network;\n }\n\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get ready(): Promise {\n return poll(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }\n\n // @TODO: Remove this and just create a singleton formatter\n static getFormatter(): Formatter {\n if (defaultFormatter == null) {\n defaultFormatter = new Formatter();\n }\n return defaultFormatter;\n }\n\n // @TODO: Remove this and just use getNetwork\n static getNetwork(network: Networkish): Network {\n return getNetwork((network == null) ? \"homestead\": network);\n }\n\n // Fetches the blockNumber, but will reuse any result that is less\n // than maxAge old or has been requested since the last request\n async _getInternalBlockNumber(maxAge: number): Promise {\n await this._ready();\n\n // Allowing stale data up to maxAge old\n if (maxAge > 0) {\n\n // While there are pending internal block requests...\n while (this._internalBlockNumber) {\n\n // ...\"remember\" which fetch we started with\n const internalBlockNumber = this._internalBlockNumber;\n\n try {\n // Check the result is not too stale\n const result = await internalBlockNumber;\n if ((getTime() - result.respTime) <= maxAge) {\n return result.blockNumber;\n }\n\n // Too old; fetch a new value\n break;\n\n } catch(error) {\n\n // The fetch rejected; if we are the first to get the\n // rejection, drop through so we replace it with a new\n // fetch; all others blocked will then get that fetch\n // which won't match the one they \"remembered\" and loop\n if (this._internalBlockNumber === internalBlockNumber) {\n break;\n }\n }\n }\n }\n\n const reqTime = getTime();\n\n const checkInternalBlockNumber = resolveProperties({\n blockNumber: this.perform(\"getBlockNumber\", { }),\n networkError: this.getNetwork().then((network) => (null), (error) => (error))\n }).then(({ blockNumber, networkError }) => {\n if (networkError) {\n // Unremember this bad internal block number\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n throw networkError;\n }\n\n const respTime = getTime();\n\n blockNumber = BigNumber.from(blockNumber).toNumber();\n if (blockNumber < this._maxInternalBlockNumber) { blockNumber = this._maxInternalBlockNumber; }\n\n this._maxInternalBlockNumber = blockNumber;\n this._setFastBlockNumber(blockNumber); // @TODO: Still need this?\n return { blockNumber, reqTime, respTime };\n });\n\n this._internalBlockNumber = checkInternalBlockNumber;\n\n // Swallow unhandled exceptions; if needed they are handled else where\n checkInternalBlockNumber.catch((error) => {\n // Don't null the dead (rejected) fetch, if it has already been updated\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n });\n\n return (await checkInternalBlockNumber).blockNumber;\n }\n\n async poll(): Promise {\n const pollId = nextPollId++;\n\n // Track all running promises, so we can trigger a post-poll once they are complete\n const runners: Array> = [];\n\n let blockNumber: number = null;\n try {\n blockNumber = await this._getInternalBlockNumber(100 + this.pollingInterval / 2);\n } catch (error) {\n this.emit(\"error\", error);\n return;\n }\n this._setFastBlockNumber(blockNumber);\n\n // Emit a poll event after we have the latest (fast) block number\n this.emit(\"poll\", pollId, blockNumber);\n\n // If the block has not changed, meh.\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return;\n }\n\n // First polling cycle, trigger a \"block\" events\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n\n if (Math.abs(((this._emitted.block)) - blockNumber) > 1000) {\n logger.warn(`network block skew detected; skipping block events (emitted=${ this._emitted.block } blockNumber${ blockNumber })`);\n this.emit(\"error\", logger.makeError(\"network block skew detected\", Logger.errors.NETWORK_ERROR, {\n blockNumber: blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n\n } else {\n // Notify all listener for each block that has passed\n for (let i = (this._emitted.block) + 1; i <= blockNumber; i++) {\n this.emit(\"block\", i);\n }\n }\n\n // The emitted block was updated, check for obsolete events\n if ((this._emitted.block) !== blockNumber) {\n this._emitted.block = blockNumber;\n\n Object.keys(this._emitted).forEach((key) => {\n // The block event does not expire\n if (key === \"block\") { return; }\n\n // The block we were at when we emitted this event\n const eventBlockNumber = this._emitted[key];\n\n // We cannot garbage collect pending transactions or blocks here\n // They should be garbage collected by the Provider when setting\n // \"pending\" events\n if (eventBlockNumber === \"pending\") { return; }\n\n // Evict any transaction hashes or block hashes over 12 blocks\n // old, since they should not return null anyways\n if (blockNumber - eventBlockNumber > 12) {\n delete this._emitted[key];\n }\n });\n }\n\n // First polling cycle\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n\n // Find all transaction hashes we are waiting on\n this._events.forEach((event) => {\n switch (event.type) {\n case \"tx\": {\n const hash = event.hash;\n let runner = this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt || receipt.blockNumber == null) { return null; }\n this._emitted[\"t:\" + hash] = receipt.blockNumber;\n this.emit(hash, receipt);\n return null;\n }).catch((error: Error) => { this.emit(\"error\", error); });\n\n runners.push(runner);\n\n break;\n }\n\n case \"filter\": {\n const filter = event.filter;\n filter.fromBlock = this._lastBlockNumber + 1;\n filter.toBlock = blockNumber;\n\n const runner = this.getLogs(filter).then((logs) => {\n if (logs.length === 0) { return; }\n logs.forEach((log: Log) => {\n this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n this.emit(filter, log);\n });\n }).catch((error: Error) => { this.emit(\"error\", error); });\n runners.push(runner);\n\n break;\n }\n }\n });\n\n this._lastBlockNumber = blockNumber;\n\n // Once all events for this loop have been processed, emit \"didPoll\"\n Promise.all(runners).then(() => {\n this.emit(\"didPoll\", pollId);\n }).catch((error) => { this.emit(\"error\", error); });\n\n return;\n }\n\n // Deprecated; do not use this\n resetEventsBlock(blockNumber: number): void {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) { this.poll(); }\n }\n\n get network(): Network {\n return this._network;\n }\n\n // This method should query the network if the underlying network\n // can change, such as when connected to a JSON-RPC backend\n async detectNetwork(): Promise {\n return logger.throwError(\"provider does not support network detection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n });\n }\n\n async getNetwork(): Promise {\n const network = await this._ready();\n\n // Make sure we are still connected to the same network; this is\n // only an external call for backends which can have the underlying\n // network change spontaneously\n const currentNetwork = await this.detectNetwork();\n if (network.chainId !== currentNetwork.chainId) {\n\n // We are allowing network changes, things can get complex fast;\n // make sure you know what you are doing if you use \"any\"\n if (this.anyNetwork) {\n this._network = currentNetwork;\n\n // Reset all internal block number guards and caches\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n\n // The \"network\" event MUST happen before this method resolves\n // so any events have a chance to unregister, so we stall an\n // additional event loop before returning from /this/ call\n this.emit(\"network\", currentNetwork, network);\n await stall(0);\n\n return this._network;\n }\n\n const error = logger.makeError(\"underlying network changed\", Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network: network,\n detectedNetwork: currentNetwork\n });\n\n this.emit(\"error\", error);\n throw error;\n }\n\n return network;\n }\n\n get blockNumber(): number {\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => {\n this._setFastBlockNumber(blockNumber);\n }, (error) => { });\n\n return (this._fastBlockNumber != null) ? this._fastBlockNumber: -1;\n }\n\n get polling(): boolean {\n return (this._poller != null);\n }\n\n set polling(value: boolean) {\n if (value && !this._poller) {\n this._poller = setInterval(() => { this.poll(); }, this.pollingInterval);\n\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(() => {\n this.poll();\n\n // We block additional polls until the polling interval\n // is done, to prevent overwhelming the poll function\n this._bootstrapPoll = setTimeout(() => {\n // If polling was disabled, something may require a poke\n // since starting the bootstrap poll and it was disabled\n if (!this._poller) { this.poll(); }\n\n // Clear out the bootstrap so we can do another\n this._bootstrapPoll = null;\n }, this.pollingInterval);\n }, 0);\n }\n\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n }\n\n get pollingInterval(): number {\n return this._pollingInterval;\n }\n\n set pollingInterval(value: number) {\n if (typeof(value) !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n\n this._pollingInterval = value;\n\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(() => { this.poll(); }, this._pollingInterval);\n }\n }\n\n _getFastBlockNumber(): Promise {\n const now = getTime();\n\n // Stale block number, request a newer value\n if ((now - this._fastQueryDate) > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => {\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n }\n return this._fastBlockNumber;\n });\n }\n\n return this._fastBlockNumberPromise;\n }\n\n _setFastBlockNumber(blockNumber: number): void {\n // Older block, maybe a stale request\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) { return; }\n\n // Update the time we updated the blocknumber\n this._fastQueryDate = getTime();\n\n // Newer block number, use it\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n }\n\n async waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise {\n return this._waitForTransaction(transactionHash, (confirmations == null) ? 1: confirmations, timeout || 0, null);\n }\n\n async _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { data: string, from: string, nonce: number, to: string, value: BigNumber, startBlock: number }): Promise {\n const receipt = await this.getTransactionReceipt(transactionHash);\n\n // Receipt is already good\n if ((receipt ? receipt.confirmations: 0) >= confirmations) { return receipt; }\n\n // Poll until the receipt is good...\n return new Promise((resolve, reject) => {\n const cancelFuncs: Array<() => void> = [];\n\n let done = false;\n const alreadyDone = function() {\n if (done) { return true; }\n done = true;\n cancelFuncs.forEach((func) => { func(); });\n return false;\n };\n\n const minedHandler = (receipt: TransactionReceipt) => {\n if (receipt.confirmations < confirmations) { return; }\n if (alreadyDone()) { return; }\n resolve(receipt);\n }\n this.on(transactionHash, minedHandler);\n cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); });\n\n if (replaceable) {\n let lastBlockNumber = replaceable.startBlock;\n let scannedBlock: number = null;\n const replaceHandler = async (blockNumber: number) => {\n if (done) { return; }\n\n // Wait 1 second; this is only used in the case of a fault, so\n // we will trade off a little bit of latency for more consistent\n // results and fewer JSON-RPC calls\n await stall(1000);\n\n this.getTransactionCount(replaceable.from).then(async (nonce) => {\n if (done) { return; }\n\n if (nonce <= replaceable.nonce) {\n lastBlockNumber = blockNumber;\n\n } else {\n // First check if the transaction was mined\n {\n const mined = await this.getTransaction(transactionHash);\n if (mined && mined.blockNumber != null) { return; }\n }\n\n // First time scanning. We start a little earlier for some\n // wiggle room here to handle the eventually consistent nature\n // of blockchain (e.g. the getTransactionCount was for a\n // different block)\n if (scannedBlock == null) {\n scannedBlock = lastBlockNumber - 3;\n if (scannedBlock < replaceable.startBlock) {\n scannedBlock = replaceable.startBlock;\n }\n }\n\n while (scannedBlock <= blockNumber) {\n if (done) { return; }\n\n const block = await this.getBlockWithTransactions(scannedBlock);\n for (let ti = 0; ti < block.transactions.length; ti++) {\n const tx = block.transactions[ti];\n\n // Successfully mined!\n if (tx.hash === transactionHash) { return; }\n\n // Matches our transaction from and nonce; its a replacement\n if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) {\n if (done) { return; }\n\n // Get the receipt of the replacement\n const receipt = await this.waitForTransaction(tx.hash, confirmations);\n\n // Already resolved or rejected (prolly a timeout)\n if (alreadyDone()) { return; }\n\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\"\n }\n\n // Explain why we were replaced\n reject(logger.makeError(\"transaction was replaced\", Logger.errors.TRANSACTION_REPLACED, {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt\n }));\n\n return;\n }\n }\n scannedBlock++;\n }\n }\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n }, (error) => {\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n });\n };\n\n if (done) { return; }\n this.once(\"block\", replaceHandler);\n\n cancelFuncs.push(() => {\n this.removeListener(\"block\", replaceHandler);\n });\n }\n\n if (typeof(timeout) === \"number\" && timeout > 0) {\n const timer = setTimeout(() => {\n if (alreadyDone()) { return; }\n reject(logger.makeError(\"timeout exceeded\", Logger.errors.TIMEOUT, { timeout: timeout }));\n }, timeout);\n if (timer.unref) { timer.unref(); }\n\n cancelFuncs.push(() => { clearTimeout(timer); });\n }\n });\n }\n\n async getBlockNumber(): Promise {\n return this._getInternalBlockNumber(0);\n }\n\n async getGasPrice(): Promise {\n await this.getNetwork();\n\n const result = await this.perform(\"getGasPrice\", { });\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result, error\n });\n }\n }\n\n async getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getBalance\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params, result, error\n });\n }\n }\n\n async getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getTransactionCount\", params);\n try {\n return BigNumber.from(result).toNumber();\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params, result, error\n });\n }\n }\n\n async getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"getCode\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params, result, error\n });\n }\n }\n\n async getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then((p) => hexValue(p))\n });\n const result = await this.perform(\"getStorageAt\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params, result, error\n });\n }\n }\n\n // This should be called by any subclass wrapping a TransactionResponse\n _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse {\n if (hash != null && hexDataLength(hash) !== 32) { throw new Error(\"invalid response - sendTransaction\"); }\n\n const result = tx;\n\n // Check the hash we expect is the same as the hash the server reported\n if (hash != null && tx.hash !== hash) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });\n }\n\n result.wait = async (confirms?: number, timeout?: number) => {\n if (confirms == null) { confirms = 1; }\n if (timeout == null) { timeout = 0; }\n\n // Get the details to detect replacement\n let replacement = undefined;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n\n const receipt = await this._waitForTransaction(tx.hash, confirms, timeout, replacement);\n if (receipt == null && confirms === 0) { return null; }\n\n // No longer pending, allow the polling loop to garbage collect this\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt: receipt\n });\n }\n return receipt;\n };\n\n return result;\n }\n\n async sendTransaction(signedTransaction: string | Promise): Promise {\n await this.getNetwork();\n const hexTx = await Promise.resolve(signedTransaction).then(t => hexlify(t));\n const tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) { tx.confirmations = 0; }\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n try {\n const hash = await this.perform(\"sendTransaction\", { signedTransaction: hexTx });\n return this._wrapTransaction(tx, hash, blockNumber);\n } catch (error) {\n (error).transaction = tx;\n (error).transactionHash = tx.hash;\n throw error;\n }\n }\n\n async _getTransactionRequest(transaction: Deferrable): Promise {\n const values: any = await transaction;\n\n const tx: any = { };\n\n [\"from\", \"to\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v): null))\n });\n\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v): null));\n });\n\n [\"type\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v: null));\n });\n\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n\n [\"data\"].forEach((key) => {\n if (values[key] == null) { return; }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v): null));\n });\n\n return this.formatter.transactionRequest(await resolveProperties(tx));\n }\n\n async _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise {\n filter = await filter;\n\n const result: any = { };\n\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n\n [\"blockHash\", \"topics\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = (filter)[key];\n });\n\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if ((filter)[key] == null) { return; }\n result[key] = this._getBlockTag((filter)[key]);\n });\n\n return this.formatter.filter(await resolveProperties(result));\n }\n\n async call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag)\n });\n\n const result = await this.perform(\"call\", params);\n try {\n return hexlify(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params, result, error\n });\n }\n }\n\n async estimateGas(transaction: Deferrable): Promise {\n await this.getNetwork();\n const params = await resolveProperties({\n transaction: this._getTransactionRequest(transaction)\n });\n\n const result = await this.perform(\"estimateGas\", params);\n try {\n return BigNumber.from(result);\n } catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params, result, error\n });\n }\n }\n\n async _getAddress(addressOrName: string | Promise): Promise {\n addressOrName = await addressOrName;\n if (typeof(addressOrName) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n\n const address = await this.resolveName(addressOrName);\n if (address == null) {\n logger.throwError(\"ENS name not configured\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `resolveName(${ JSON.stringify(addressOrName) })`\n });\n }\n return address;\n }\n\n async _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise {\n await this.getNetwork();\n\n blockHashOrBlockTag = await blockHashOrBlockTag;\n\n // If blockTag is a number (not \"latest\", etc), this is the block number\n let blockNumber = -128;\n\n const params: { [key: string]: any } = {\n includeTransactions: !!includeTransactions\n };\n\n if (isHexString(blockHashOrBlockTag, 32)) {\n params.blockHash = blockHashOrBlockTag;\n } else {\n try {\n params.blockTag = await this._getBlockTag(blockHashOrBlockTag);\n if (isHexString(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n } catch (error) {\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n }\n }\n\n return poll(async () => {\n const block = await this.perform(\"getBlock\", params);\n\n // Block was not found\n if (block == null) {\n\n // For blockhashes, if we didn't say it existed, that blockhash may\n // not exist. If we did see it though, perhaps from a log, we know\n // it exists, and this node is just not caught up yet.\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) { return null; }\n }\n\n // For block tags, if we are asking for a future block, we return null\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) { return null; }\n }\n\n // Retry on the next block\n return undefined;\n }\n\n // Add transactions\n if (includeTransactions) {\n let blockNumber: number = null;\n for (let i = 0; i < block.transactions.length; i++) {\n const tx = block.transactions[i];\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n if (blockNumber == null) {\n blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n }\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n }\n\n const blockWithTxs: any = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map((tx: TransactionResponse) => this._wrapTransaction(tx));\n return blockWithTxs;\n }\n\n return this.formatter.block(block);\n\n }, { oncePoll: this });\n }\n\n getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, false));\n }\n\n getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise {\n return >(this._getBlock(blockHashOrBlockTag, true));\n }\n\n async getTransaction(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransaction\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n const tx = this.formatter.transactionResponse(result);\n\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n\n } else if (tx.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n tx.confirmations = confirmations;\n }\n\n return this._wrapTransaction(tx);\n }, { oncePoll: this });\n }\n\n async getTransactionReceipt(transactionHash: string | Promise): Promise {\n await this.getNetwork();\n\n transactionHash = await transactionHash;\n\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n\n return poll(async () => {\n const result = await this.perform(\"getTransactionReceipt\", params);\n\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n\n // \"geth-etc\" returns receipts before they are ready\n if (result.blockHash == null) { return undefined; }\n\n const receipt = this.formatter.receipt(result);\n\n if (receipt.blockNumber == null) {\n receipt.confirmations = 0;\n\n } else if (receipt.confirmations == null) {\n const blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - receipt.blockNumber) + 1;\n if (confirmations <= 0) { confirmations = 1; }\n receipt.confirmations = confirmations;\n }\n\n return receipt;\n }, { oncePoll: this });\n }\n\n async getLogs(filter: Filter | FilterByBlockHash | Promise): Promise> {\n await this.getNetwork();\n const params = await resolveProperties({ filter: this._getFilter(filter) });\n const logs: Array = await this.perform(\"getLogs\", params);\n logs.forEach((log) => {\n if (log.removed == null) { log.removed = false; }\n });\n return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs);\n }\n\n async getEtherPrice(): Promise {\n await this.getNetwork();\n return this.perform(\"getEtherPrice\", { });\n }\n\n async _getBlockTag(blockTag: BlockTag | Promise): Promise {\n blockTag = await blockTag;\n\n if (typeof(blockTag) === \"number\" && blockTag < 0) {\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n\n let blockNumber = await this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n blockNumber += blockTag;\n if (blockNumber < 0) { blockNumber = 0; }\n return this.formatter.blockTag(blockNumber)\n }\n\n return this.formatter.blockTag(blockTag);\n }\n\n\n async getResolver(name: string): Promise {\n try {\n const address = await this._getResolver(name);\n if (address == null) { return null; }\n return new Resolver(this, address, name);\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n return null;\n }\n }\n\n async _getResolver(name: string): Promise {\n // Get the resolver from the blockchain\n const network = await this.getNetwork();\n\n // No ENS...\n if (!network.ensAddress) {\n logger.throwError(\n \"network does not support ENS\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"ENS\", network: network.name }\n );\n }\n\n // keccak256(\"resolver(bytes32)\")\n const transaction = {\n to: network.ensAddress,\n data: (\"0x0178b8bf\" + namehash(name).substring(2))\n };\n\n try {\n return this.formatter.callAddress(await this.call(transaction));\n } catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) { return null; }\n throw error;\n }\n }\n\n async resolveName(name: string | Promise): Promise {\n name = await name;\n\n // If it is already an address, nothing to resolve\n try {\n return Promise.resolve(this.formatter.address(name));\n } catch (error) {\n // If is is a hexstring, the address is bad (See #694)\n if (isHexString(name)) { throw error; }\n }\n\n if (typeof(name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n\n // Get the addr from the resovler\n const resolver = await this.getResolver(name);\n if (!resolver) { return null; }\n\n return await resolver.getAddress();\n }\n\n async lookupAddress(address: string | Promise): Promise {\n address = await address;\n address = this.formatter.address(address);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n // keccak(\"name(bytes32)\")\n let bytes = arrayify(await this.call({\n to: resolverAddress,\n data: (\"0x691f3431\" + namehash(reverseName).substring(2))\n }));\n\n // Strip off the dynamic string pointer (0x20)\n if (bytes.length < 32 || !BigNumber.from(bytes.slice(0, 32)).eq(32)) { return null; }\n bytes = bytes.slice(32);\n\n // Not a length-prefixed string\n if (bytes.length < 32) { return null; }\n\n // Get the length of the string (from the length-prefix)\n const length = BigNumber.from(bytes.slice(0, 32)).toNumber();\n bytes = bytes.slice(32);\n\n // Length longer than available data\n if (length > bytes.length) { return null; }\n\n const name = toUtf8String(bytes.slice(0, length));\n\n // Make sure the reverse record matches the foward record\n const addr = await this.resolveName(name);\n if (addr != address) { return null; }\n\n return name;\n }\n\n async getAvatar(nameOrAddress: string): Promise {\n let resolver: Resolver = null;\n if (isHexString(nameOrAddress)) {\n // Address; reverse lookup\n const address = this.formatter.address(nameOrAddress);\n\n const reverseName = address.substring(2).toLowerCase() + \".addr.reverse\";\n\n const resolverAddress = await this._getResolver(reverseName);\n if (!resolverAddress) { return null; }\n\n resolver = new Resolver(this, resolverAddress, \"_\", address);\n\n } else {\n // ENS name; forward lookup\n resolver = await this.getResolver(nameOrAddress);\n if (!resolver) { return null; }\n }\n\n const avatar = await resolver.getAvatar();\n if (avatar == null) { return null; }\n\n return avatar.url;\n }\n\n perform(method: string, params: any): Promise {\n return logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n\n _startEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _stopEvent(event: Event): void {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n\n _addEventListener(eventName: EventType, listener: Listener, once: boolean): this {\n const event = new Event(getEventTag(eventName), listener, once)\n this._events.push(event);\n this._startEvent(event);\n\n return this;\n }\n\n on(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n once(eventName: EventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n\n emit(eventName: EventType, ...args: Array): boolean {\n let result = false;\n\n let stopped: Array = [ ];\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n\n setTimeout(() => {\n event.listener.apply(this, args);\n }, 0);\n\n result = true;\n\n if (event.once) {\n stopped.push(event);\n return false;\n }\n\n return true;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return result;\n }\n\n listenerCount(eventName?: EventType): number {\n if (!eventName) { return this._events.length; }\n\n let eventTag = getEventTag(eventName);\n return this._events.filter((event) => {\n return (event.tag === eventTag);\n }).length;\n }\n\n listeners(eventName?: EventType): Array {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n\n let eventTag = getEventTag(eventName);\n return this._events\n .filter((event) => (event.tag === eventTag))\n .map((event) => event.listener);\n }\n\n off(eventName: EventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [ ];\n\n let found = false;\n\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag || event.listener != listener) { return true; }\n if (found) { return true; }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n\n removeAllListeners(eventName?: EventType): this {\n let stopped: Array = [ ];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [ ];\n } else {\n const eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) { return true; }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach((event) => { this._stopEvent(event); });\n\n return this;\n }\n}\n","\"use strict\";\n\n// See: https://github.com/ethereum/wiki/wiki/JSON-RPC\n\nimport { Provider, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from \"@ethersproject/abstract-signer\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Bytes, hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { checkProperties, deepCopy, Deferrable, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { AccessList, accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson, poll } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider, Event } from \"./base-provider\";\n\n\nconst errorGas = [ \"call\", \"estimateGas\" ];\n\nfunction checkError(method: string, error: any, params: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n if (e && e.message.match(\"reverted\") && isHexString(e.data)) {\n return e.data;\n }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n\n const transaction = params.transaction || params.signedTransaction;\n\n // \"insufficient funds for gas * price + value + cost(data)\"\n if (message.match(/insufficient funds|base fee exceeds gas limit/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"nonce too low\"\n if (message.match(/nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction underpriced/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n // \"replacement transaction underpriced\"\n if (message.match(/only replay-protected/)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", Logger.errors.UNSUPPORTED_OPERATION, {\n error, method, transaction\n });\n }\n\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nfunction timer(timeout: number): Promise {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n}\n\nfunction getResult(payload: { error?: { code?: number, data?: any, message?: string }, result?: any }): any {\n if (payload.error) {\n // @TODO: not any\n const error: any = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n\n return payload.result;\n}\n\nfunction getLowerCase(value: string): string {\n if (value) { return value.toLowerCase(); }\n return value;\n}\n\nconst _constructorGuard = {};\n\nexport class JsonRpcSigner extends Signer implements TypedDataSigner {\n readonly provider: JsonRpcProvider;\n _index: number;\n _address: string;\n\n constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number) {\n logger.checkNew(new.target, JsonRpcSigner);\n\n super();\n\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n\n defineReadOnly(this, \"provider\", provider);\n\n if (addressOrIndex == null) { addressOrIndex = 0; }\n\n if (typeof(addressOrIndex) === \"string\") {\n defineReadOnly(this, \"_address\", this.provider.formatter.address(addressOrIndex));\n defineReadOnly(this, \"_index\", null);\n\n } else if (typeof(addressOrIndex) === \"number\") {\n defineReadOnly(this, \"_index\", addressOrIndex);\n defineReadOnly(this, \"_address\", null);\n\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n }\n\n connect(provider: Provider): JsonRpcSigner {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n }\n\n connectUnchecked(): JsonRpcSigner {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n }\n\n getAddress(): Promise {\n if (this._address) {\n return Promise.resolve(this._address);\n }\n\n return this.provider.send(\"eth_accounts\", []).then((accounts) => {\n if (accounts.length <= this._index) {\n logger.throwError(\"unknown account #\" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return this.provider.formatter.address(accounts[this._index])\n });\n }\n\n sendUncheckedTransaction(transaction: Deferrable): Promise {\n transaction = shallowCopy(transaction);\n\n const fromAddress = this.getAddress().then((address) => {\n if (address) { address = address.toLowerCase(); }\n return address;\n });\n\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (transaction.gasLimit == null) {\n const estimate = shallowCopy(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(async (to) => {\n if (to == null) { return null; }\n const address = await this.provider.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n });\n }\n\n return resolveProperties({\n tx: resolveProperties(transaction),\n sender: fromAddress\n }).then(({ tx, sender }) => {\n\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n\n const hexTx = (this.provider.constructor).hexlifyTransaction(tx, { from: true });\n\n return this.provider.send(\"eth_sendTransaction\", [ hexTx ]).then((hash) => {\n return hash;\n }, (error) => {\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n }\n\n signTransaction(transaction: Deferrable): Promise {\n return logger.throwError(\"signing transactions is unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n }\n\n async sendTransaction(transaction: Deferrable): Promise {\n // This cannot be mined any earlier than any recent block\n const blockNumber = await this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval);\n\n // Send the transaction\n const hash = await this.sendUncheckedTransaction(transaction);\n\n try {\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return await poll(async () => {\n const tx = await this.provider.getTransaction(hash);\n if (tx === null) { return undefined; }\n return this.provider._wrapTransaction(tx, hash, blockNumber);\n }, { oncePoll: this.provider });\n } catch (error) {\n (error).transactionHash = hash;\n throw error;\n }\n }\n\n async signMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n return await this.provider.send(\"personal_sign\", [ hexlify(data), address.toLowerCase() ]);\n }\n\n async _legacySignMessage(message: Bytes | string): Promise {\n const data = ((typeof(message) === \"string\") ? toUtf8Bytes(message): message);\n const address = await this.getAddress();\n\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n return await this.provider.send(\"eth_sign\", [ address.toLowerCase(), hexlify(data) ]);\n }\n\n async _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise {\n // Populate any ENS names (in-place)\n const populated = await _TypedDataEncoder.resolveNames(domain, types, value, (name: string) => {\n return this.provider.resolveName(name);\n });\n\n const address = await this.getAddress();\n\n return await this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n\n async unlock(password: string): Promise {\n const provider = this.provider;\n\n const address = await this.getAddress();\n\n return provider.send(\"personal_unlockAccount\", [ address.toLowerCase(), password, null ]);\n }\n}\n\nclass UncheckedJsonRpcSigner extends JsonRpcSigner {\n sendTransaction(transaction: Deferrable): Promise {\n return this.sendUncheckedTransaction(transaction).then((hash) => {\n return {\n hash: hash,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: (confirmations?: number) => { return this.provider.waitForTransaction(hash, confirmations); }\n };\n });\n }\n}\n\nconst allowedTransactionKeys: { [ key: string ]: boolean } = {\n chainId: true, data: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true\n}\n\nexport class JsonRpcProvider extends BaseProvider {\n readonly connection: ConnectionInfo;\n\n _pendingFilter: Promise;\n _nextId: number;\n\n // During any given event loop, the results for a given call will\n // all be the same, so we can dedup the calls to save requests and\n // bandwidth. @TODO: Try out generalizing this against send?\n _eventLoopCache: Record>;\n get _cache(): Record> {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = { };\n }\n return this._eventLoopCache;\n }\n\n constructor(url?: ConnectionInfo | string, network?: Networkish) {\n logger.checkNew(new.target, JsonRpcProvider);\n\n let networkOrReady: Networkish | Promise = network;\n\n // The network is unknown, query the JSON-RPC for it\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then((network) => {\n resolve(network);\n }, (error) => {\n reject(error);\n });\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Default URL\n if (!url) { url = getStatic<() => string>(this.constructor, \"defaultUrl\")(); }\n\n if (typeof(url) === \"string\") {\n defineReadOnly(this, \"connection\",Object.freeze({\n url: url\n }));\n } else {\n defineReadOnly(this, \"connection\", Object.freeze(shallowCopy(url)));\n }\n\n this._nextId = 42;\n }\n\n static defaultUrl(): string {\n return \"http:/\\/localhost:8545\";\n }\n\n detectNetwork(): Promise {\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n\n // Clear this cache at the beginning of the next event loop\n setTimeout(() => {\n this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n }\n\n async _uncachedDetectNetwork(): Promise {\n await timer(0);\n\n let chainId = null;\n try {\n chainId = await this.send(\"eth_chainId\", [ ]);\n } catch (error) {\n try {\n chainId = await this.send(\"net_version\", [ ]);\n } catch (error) { }\n }\n\n if (chainId != null) {\n const getNetwork = getStatic<(network: Networkish) => Network>(this.constructor, \"getNetwork\");\n try {\n return getNetwork(BigNumber.from(chainId).toNumber());\n } catch (error) {\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n chainId: chainId,\n event: \"invalidNetwork\",\n serverError: error\n });\n }\n }\n\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n });\n }\n\n getSigner(addressOrIndex?: string | number): JsonRpcSigner {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n }\n\n getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner {\n return this.getSigner(addressOrIndex).connectUnchecked();\n }\n\n listAccounts(): Promise> {\n return this.send(\"eth_accounts\", []).then((accounts: Array) => {\n return accounts.map((a) => this.formatter.address(a));\n });\n }\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n\n // We can expand this in the future to any call, but for now these\n // are the biggest wins and do not require any serializing parameters.\n const cache = ([ \"eth_chainId\", \"eth_blockNumber\" ].indexOf(method) >= 0);\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n\n const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n return result;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n throw error;\n });\n\n // Cache the fetch, but clear it on the next event loop\n if (cache) {\n this._cache[method] = result;\n setTimeout(() => {\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n\n prepareRequest(method: string, params: any): [ string, Array ] {\n switch (method) {\n case \"getBlockNumber\":\n return [ \"eth_blockNumber\", [] ];\n\n case \"getGasPrice\":\n return [ \"eth_gasPrice\", [] ];\n\n case \"getBalance\":\n return [ \"eth_getBalance\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getTransactionCount\":\n return [ \"eth_getTransactionCount\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getCode\":\n return [ \"eth_getCode\", [ getLowerCase(params.address), params.blockTag ] ];\n\n case \"getStorageAt\":\n return [ \"eth_getStorageAt\", [ getLowerCase(params.address), params.position, params.blockTag ] ];\n\n case \"sendTransaction\":\n return [ \"eth_sendRawTransaction\", [ params.signedTransaction ] ]\n\n case \"getBlock\":\n if (params.blockTag) {\n return [ \"eth_getBlockByNumber\", [ params.blockTag, !!params.includeTransactions ] ];\n } else if (params.blockHash) {\n return [ \"eth_getBlockByHash\", [ params.blockHash, !!params.includeTransactions ] ];\n }\n return null;\n\n case \"getTransaction\":\n return [ \"eth_getTransactionByHash\", [ params.transactionHash ] ];\n\n case \"getTransactionReceipt\":\n return [ \"eth_getTransactionReceipt\", [ params.transactionHash ] ];\n\n case \"call\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_call\", [ hexlifyTransaction(params.transaction, { from: true }), params.blockTag ] ];\n }\n\n case \"estimateGas\": {\n const hexlifyTransaction = getStatic<(t: TransactionRequest, a?: { [key: string]: boolean }) => { [key: string]: string }>(this.constructor, \"hexlifyTransaction\");\n return [ \"eth_estimateGas\", [ hexlifyTransaction(params.transaction, { from: true }) ] ];\n }\n\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [ \"eth_getLogs\", [ params.filter ] ];\n\n default:\n break;\n }\n\n return null;\n }\n\n async perform(method: string, params: any): Promise {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (method === \"call\" || method === \"estimateGas\") {\n const tx = params.transaction;\n if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {\n // If there are no EIP-1559 properties, it might be non-EIP-a559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n params = shallowCopy(params);\n params.transaction = shallowCopy(tx);\n delete params.transaction.type;\n }\n }\n }\n }\n\n const args = this.prepareRequest(method, params);\n\n if (args == null) {\n logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n try {\n return await this.send(args[0], args[1])\n } catch (error) {\n return checkError(method, error, params);\n }\n }\n\n _startEvent(event: Event): void {\n if (event.tag === \"pending\") { this._startPending(); }\n super._startEvent(event);\n }\n\n _startPending(): void {\n if (this._pendingFilter != null) { return; }\n const self = this;\n\n const pendingFilter: Promise = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n\n pendingFilter.then(function(filterId) {\n function poll() {\n self.send(\"eth_getFilterChanges\", [ filterId ]).then(function(hashes: Array) {\n if (self._pendingFilter != pendingFilter) { return null; }\n\n let seq = Promise.resolve();\n hashes.forEach(function(hash) {\n // @TODO: This should be garbage collected at some point... How? When?\n self._emitted[\"t:\" + hash.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self.getTransaction(hash).then(function(tx) {\n self.emit(\"pending\", tx);\n return null;\n });\n });\n });\n\n return seq.then(function() {\n return timer(1000);\n });\n }).then(function() {\n if (self._pendingFilter != pendingFilter) {\n self.send(\"eth_uninstallFilter\", [ filterId ]);\n return;\n }\n setTimeout(function() { poll(); }, 0);\n\n return null;\n }).catch((error: Error) => { });\n }\n poll();\n\n return filterId;\n }).catch((error: Error) => { });\n }\n\n _stopEvent(event: Event): void {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n super._stopEvent(event);\n }\n\n // Convert an ethers.js transaction into a JSON-RPC transaction\n // - gasLimit => gas\n // - All values hexlified\n // - All numeric values zero-striped\n // - All addresses are lowercased\n // NOTE: This allows a TransactionRequest, but all values should be resolved\n // before this is called\n // @TODO: This will likely be removed in future versions and prepareRequest\n // will be the preferred method for this.\n static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: { [key: string]: boolean }): { [key: string]: string | AccessList } {\n // Check only allowed properties are given\n const allowed = shallowCopy(allowedTransactionKeys);\n if (allowExtra) {\n for (const key in allowExtra) {\n if (allowExtra[key]) { allowed[key] = true; }\n }\n }\n\n checkProperties(transaction, allowed);\n\n const result: { [key: string]: string | AccessList } = {};\n\n // Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros.\n [\"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n const value = hexValue((transaction)[key]);\n if (key === \"gasLimit\") { key = \"gas\"; }\n result[key] = value;\n });\n\n [\"from\", \"to\", \"data\"].forEach(function(key) {\n if ((transaction)[key] == null) { return; }\n result[key] = hexlify((transaction)[key]);\n });\n\n if ((transaction).accessList) {\n result[\"accessList\"] = accessListify((transaction).accessList);\n }\n\n return result;\n }\n}\n","\"use strict\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\n\nlet WS: any = null;\n\ntry {\n WS = (WebSocket as any);\n if (WS == null) { throw new Error(\"inject please\"); }\n} catch (error) {\n const logger = new Logger(version);\n WS = function() {\n logger.throwError(\"WebSockets not supported in this environment\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n }\n}\n//export default WS;\n//module.exports = WS;\nexport { WS as WebSocket };\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Event } from \"./base-provider\";\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\nimport { WebSocket } from \"./ws\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n/**\n * Notes:\n *\n * This provider differs a bit from the polling providers. One main\n * difference is how it handles consistency. The polling providers\n * will stall responses to ensure a consistent state, while this\n * WebSocket provider assumes the connected backend will manage this.\n *\n * For example, if a polling provider emits an event which indicates\n * the event occurred in blockhash XXX, a call to fetch that block by\n * its hash XXX, if not present will retry until it is present. This\n * can occur when querying a pool of nodes that are mildly out of sync\n * with each other.\n */\n\nlet NextId = 1;\n\nexport type InflightRequest = {\n callback: (error: Error, result: any) => void;\n payload: string;\n};\n\nexport type Subscription = {\n tag: string;\n processFunc: (payload: any) => void;\n};\n\n\n// For more info about the Real-time Event API see:\n// https://geth.ethereum.org/docs/rpc/pubsub\n\nexport class WebSocketProvider extends JsonRpcProvider {\n readonly _websocket: any;\n readonly _requests: { [ name: string ]: InflightRequest };\n readonly _detectNetwork: Promise;\n\n // Maps event tag to subscription ID (we dedupe identical events)\n readonly _subIds: { [ tag: string ]: Promise };\n\n // Maps Subscription ID to Subscription\n readonly _subs: { [ name: string ]: Subscription };\n\n _wsReady: boolean;\n\n constructor(url: string, network?: Networkish) {\n // This will be added in the future; please open an issue to expedite\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n\n super(url, network);\n this._pollingInterval = -1;\n\n this._wsReady = false;\n\n defineReadOnly(this, \"_websocket\", new WebSocket(this.connection.url));\n defineReadOnly(this, \"_requests\", { });\n defineReadOnly(this, \"_subs\", { });\n defineReadOnly(this, \"_subIds\", { });\n defineReadOnly(this, \"_detectNetwork\", super.detectNetwork());\n\n // Stall sending requests until the socket is open...\n this._websocket.onopen = () => {\n this._wsReady = true;\n Object.keys(this._requests).forEach((id) => {\n this._websocket.send(this._requests[id].payload);\n });\n };\n\n this._websocket.onmessage = (messageEvent: { data: string }) => {\n const data = messageEvent.data;\n const result = JSON.parse(data);\n if (result.id != null) {\n const id = String(result.id);\n const request = this._requests[id];\n delete this._requests[id];\n\n if (result.result !== undefined) {\n request.callback(null, result.result);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: this\n });\n\n } else {\n let error: Error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n defineReadOnly(error, \"code\", result.error.code || null);\n defineReadOnly(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n\n request.callback(error, undefined);\n\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: JSON.parse(request.payload),\n provider: this\n });\n\n }\n\n } else if (result.method === \"eth_subscription\") {\n // Subscription...\n const sub = this._subs[result.params.subscription];\n if (sub) {\n //this.emit.apply(this, );\n sub.processFunc(result.params.result)\n }\n\n } else {\n console.warn(\"this should not happen\");\n }\n };\n\n // This Provider does not actually poll, but we want to trigger\n // poll events for things that depend on them (like stalling for\n // block and transaction lookups)\n const fauxPoll = setInterval(() => {\n this.emit(\"poll\");\n }, 1000);\n if (fauxPoll.unref) { fauxPoll.unref(); }\n }\n\n detectNetwork(): Promise {\n return this._detectNetwork;\n }\n\n get pollingInterval(): number {\n return 0;\n }\n\n resetEventsBlock(blockNumber: number): void {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n }\n\n set pollingInterval(value: number) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n }\n\n async poll(): Promise {\n return null;\n }\n\n set polling(value: boolean) {\n if (!value) { return; }\n\n logger.throwError(\"cannot set polling on WebSocketProvider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n }\n\n send(method: string, params?: Array): Promise {\n const rid = NextId++;\n\n return new Promise((resolve, reject) => {\n function callback(error: Error, result: any) {\n if (error) { return reject(error); }\n return resolve(result);\n }\n\n const payload = JSON.stringify({\n method: method,\n params: params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n\n this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: this\n });\n\n this._requests[String(rid)] = { callback, payload };\n\n if (this._wsReady) { this._websocket.send(payload); }\n });\n }\n\n static defaultUrl(): string {\n return \"ws:/\\/localhost:8546\";\n }\n\n async _subscribe(tag: string, param: Array, processFunc: (result: any) => void): Promise {\n let subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then((param) => {\n return this.send(\"eth_subscribe\", param);\n });\n this._subIds[tag] = subIdPromise;\n }\n const subId = await subIdPromise;\n this._subs[subId] = { tag, processFunc };\n }\n\n _startEvent(event: Event): void {\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [ \"newHeads\" ], (result: any) => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit(\"block\", blockNumber);\n });\n break;\n\n case \"pending\":\n this._subscribe(\"pending\", [ \"newPendingTransactions\" ], (result: any) => {\n this.emit(\"pending\", result);\n });\n break;\n\n case \"filter\":\n this._subscribe(event.tag, [ \"logs\", this._getFilter(event.filter) ], (result: any) => {\n if (result.removed == null) { result.removed = false; }\n this.emit(event.filter, this.formatter.filterLog(result));\n });\n break;\n\n case \"tx\": {\n const emitReceipt = (event: Event) => {\n const hash = event.hash;\n this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt) { return; }\n this.emit(hash, receipt);\n });\n };\n\n // In case it is already mined\n emitReceipt(event);\n\n // To keep things simple, we start up a single newHeads subscription\n // to keep an eye out for transactions we are watching for.\n // Starting a subscription for an event (i.e. \"tx\") that is already\n // running is (basically) a nop.\n this._subscribe(\"tx\", [ \"newHeads\" ], (result: any) => {\n this._events.filter((e) => (e.type === \"tx\")).forEach(emitReceipt);\n });\n break;\n }\n\n // Nothing is needed\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n }\n\n _stopEvent(event: Event): void {\n let tag = event.tag;\n\n if (event.type === \"tx\") {\n // There are remaining transaction event listeners\n if (this._events.filter((e) => (e.type === \"tx\")).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n // There are remaining event listeners\n return;\n }\n\n const subId = this._subIds[tag];\n if (!subId) { return; }\n\n delete this._subIds[tag];\n subId.then((subId) => {\n if (!this._subs[subId]) { return; }\n delete this._subs[subId];\n this.send(\"eth_unsubscribe\", [ subId ]);\n });\n }\n\n async destroy(): Promise {\n // Wait until we have connected before trying to disconnect\n if (this._websocket.readyState === WebSocket.CONNECTING) {\n await (new Promise((resolve) => {\n this._websocket.onopen = function() {\n resolve(true);\n };\n\n this._websocket.onerror = function() {\n resolve(false);\n };\n }));\n }\n\n // Hangup\n // See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes\n this._websocket.close(1000);\n }\n}\n","\n\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly, getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { CommunityResourcable } from \"./formatter\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\n\ntype getUrlFunc = (network: Network, apiKey: string) => string | ConnectionInfo;\n\n// A StaticJsonRpcProvider is useful when you *know* for certain that\n// the backend will never change, as it never calls eth_chainId to\n// verify its backend. However, if the backend does change, the effects\n// are undefined and may include:\n// - inconsistent results\n// - locking up the UI\n// - block skew warnings\n// - wrong results\n// If the network is not explicit (i.e. auto-detection is expected), the\n// node MUST be running and available to respond to requests BEFORE this\n// is instantiated.\nexport class StaticJsonRpcProvider extends JsonRpcProvider {\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, { });\n }\n\n // If still not set, set it\n if (this._network == null) {\n // A static network does not support \"any\"\n defineReadOnly(this, \"_network\", network);\n\n this.emit(\"network\", network, null);\n }\n }\n return network;\n }\n}\n\nexport abstract class UrlJsonRpcProvider extends StaticJsonRpcProvider implements CommunityResourcable {\n readonly apiKey: any;\n\n constructor(network?: Networkish, apiKey?: any) {\n logger.checkAbstract(new.target, UrlJsonRpcProvider);\n\n // Normalize the Network and API Key\n network = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n apiKey = getStatic<(apiKey: string) => string>(new.target, \"getApiKey\")(apiKey);\n\n const connection = getStatic(new.target, \"getUrl\")(network, apiKey);\n\n super(connection, network);\n\n if (typeof(apiKey) === \"string\") {\n defineReadOnly(this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach((key) => {\n defineReadOnly(this, key, apiKey[key]);\n });\n }\n }\n\n _startPending(): void {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n }\n\n isCommunityResource(): boolean {\n return false;\n }\n\n getSigner(address?: string): JsonRpcSigner {\n return logger.throwError(\n \"API provider does not support signing\",\n Logger.errors.UNSUPPORTED_OPERATION,\n { operation: \"getSigner\" }\n );\n }\n\n listAccounts(): Promise> {\n return Promise.resolve([]);\n }\n\n // Return a defaultApiKey if null, otherwise validate the API key\n static getApiKey(apiKey: any): any {\n return apiKey;\n }\n\n // Returns the url or connection for the given network and API key. The\n // API key will have been sanitized by the getApiKey first, so any validation\n // or transformations can be done there.\n static getUrl(network: Network, apiKey: any): string | ConnectionInfo {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\nimport { WebSocketProvider } from \"./websocket-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// This key was provided to ethers.js by Alchemy to be used by the\n// default provider, but it is recommended that for your own\n// production environments, that you acquire your own API key at:\n// https://dashboard.alchemyapi.io\n\nconst defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\"\n\nexport class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new AlchemyProvider(network, apiKey);\n\n const url = provider.connection.url.replace(/^http/i, \"ws\")\n .replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n\n super(url, provider.network);\n defineReadOnly(this, \"apiKey\", provider.apiKey);\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n\nexport class AlchemyProvider extends UrlJsonRpcProvider {\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): AlchemyWebSocketProvider {\n return new AlchemyWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n if (apiKey == null) { return defaultApiKey; }\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n }\n\n static getUrl(network: Network, apiKey: string): ConnectionInfo {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.alchemyapi.io/v2/\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.alchemyapi.io/v2/\";\n break;\n case \"kovan\":\n host = \"eth-kovan.alchemyapi.io/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arb-rinkeby.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-kovan\":\n host = \"opt-kovan.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + apiKey),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey === defaultApiKey) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nexport class CloudflareProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return host;\n }\n\n async perform(method: string, params: any): Promise {\n // The Cloudflare provider does not support eth_blockNumber,\n // so we get the latest block and pull it from that\n if (method === \"getBlockNumber\") {\n const block = await super.perform(\"getBlock\", { blockTag: \"latest\" });\n return block.number;\n }\n\n return super.perform(method, params);\n }\n}\n","\"use strict\";\n\nimport { BlockTag, TransactionRequest, TransactionResponse } from \"@ethersproject/abstract-provider\";\nimport { hexlify, hexValue, isHexString } from \"@ethersproject/bytes\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\nimport { accessListify } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, fetchJson } from \"@ethersproject/web\";\n\nimport { showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { BaseProvider } from \"./base-provider\";\n\n\n// The transaction has already been sanitized by the calls in Provider\nfunction getTransactionPostData(transaction: TransactionRequest): Record {\n const result: Record = { };\n for (let key in transaction) {\n if ((transaction)[key] == null) { continue; }\n let value = (transaction)[key];\n if (key === \"type\" && value === 0) { continue; }\n\n // Quantity-types require no leading zero, unless 0\n if (({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true })[key]) {\n value = hexValue(hexlify(value));\n } else if (key === \"accessList\") {\n value = \"[\" + accessListify(value).map((set) => {\n return `{address:\"${ set.address }\",storageKeys:[\"${ set.storageKeys.join('\",\"') }\"]}`;\n }).join(\",\") + \"]\";\n } else {\n value = hexlify(value);\n }\n result[key] = value;\n }\n return result;\n}\n\nfunction getResult(result: { status?: number, message?: string, result?: any }): any {\n // getLogs, getHistory have weird success responses\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n\n if (result.status != 1 || result.message != \"OK\") {\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n\n return result.result;\n}\n\nfunction getJsonResult(result: { jsonrpc: string, result?: any, error?: { code?: number, data?: any, message?: string} } ): any {\n // This response indicates we are being throttled\n if (result && (result).status == 0 && (result).message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n const error: any = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n\n if (result.jsonrpc != \"2.0\") {\n // @TODO: not any\n const error: any = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n\n if (result.error) {\n // @TODO: not any\n const error: any = new Error(result.error.message || \"unknown error\");\n if (result.error.code) { error.code = result.error.code; }\n if (result.error.data) { error.data = result.error.data; }\n throw error;\n }\n\n return result.result;\n}\n\n// The blockTag was normalized as a string by the Provider pre-perform operations\nfunction checkLogTag(blockTag: string): number | \"latest\" {\n if (blockTag === \"pending\") { throw new Error(\"pending not supported\"); }\n if (blockTag === \"latest\") { return blockTag; }\n\n return parseInt(blockTag.substring(2), 16);\n}\n\n\nconst defaultApiKey = \"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB\";\n\nfunction checkError(method: string, error: any, transaction: any): any {\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\" && error.code === Logger.errors.SERVER_ERROR) {\n const e = error.error;\n\n // Etherscan keeps changing their string\n if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) {\n // Etherscan prefixes the data like \"Reverted 0x1234\"\n let data = e.data;\n if (data) { data = \"0x\" + data.replace(/^.*0x/i, \"\"); }\n\n if (isHexString(data)) { return data; }\n\n logger.throwError(\"missing revert data in call exception\", Logger.errors.CALL_EXCEPTION, {\n error, data: \"0x\"\n });\n }\n }\n\n // Get the message from any nested error structure\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR) {\n if (error.error && typeof(error.error.message) === \"string\") {\n message = error.error.message;\n } else if (typeof(error.body) === \"string\") {\n message = error.body;\n } else if (typeof(error.responseText) === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n\n // \"Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0\"\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n\n // \"Transaction with the same hash was already imported.\"\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n\n // \"Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.\"\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n\n throw error;\n}\n\nexport class EtherscanProvider extends BaseProvider{\n readonly baseUrl: string;\n readonly apiKey: string;\n\n constructor(network?: Networkish, apiKey?: string) {\n logger.checkNew(new.target, EtherscanProvider);\n\n super(network);\n\n defineReadOnly(this, \"baseUrl\", this.getBaseUrl());\n defineReadOnly(this, \"apiKey\", apiKey || defaultApiKey);\n }\n\n getBaseUrl(): string {\n switch(this.network ? this.network.name: \"invalid\") {\n case \"homestead\":\n return \"https:/\\/api.etherscan.io\";\n case \"ropsten\":\n return \"https:/\\/api-ropsten.etherscan.io\";\n case \"rinkeby\":\n return \"https:/\\/api-rinkeby.etherscan.io\";\n case \"kovan\":\n return \"https:/\\/api-kovan.etherscan.io\";\n case \"goerli\":\n return \"https:/\\/api-goerli.etherscan.io\";\n default:\n }\n\n return logger.throwArgumentError(\"unsupported network\", \"network\", name);\n }\n\n getUrl(module: string, params: Record): string {\n const query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${ key }=${ value }`\n }\n return accum\n }, \"\");\n const apiKey = ((this.apiKey) ? `&apikey=${ this.apiKey }`: \"\");\n return `${ this.baseUrl }/api?module=${ module }${ query }${ apiKey }`;\n }\n\n getPostUrl(): string {\n return `${ this.baseUrl }/api`;\n }\n\n getPostData(module: string, params: Record): Record {\n params.module = module;\n params.apikey = this.apiKey;\n return params;\n }\n\n async fetch(module: string, params: Record, post?: boolean): Promise {\n const url = (post ? this.getPostUrl(): this.getUrl(module, params));\n const payload = (post ? this.getPostData(module, params): null);\n const procFunc = (module === \"proxy\") ? getJsonResult: getResult;\n\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n\n const connection: ConnectionInfo = {\n url: url,\n throttleSlotInterval: 1000,\n throttleCallback: (attempt: number, url: string) => {\n if (this.isCommunityResource()) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n let payloadStr: string = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map((key) => {\n return `${ key }=${ payload[key] }`\n }).join(\"&\");\n }\n\n const result = await fetchJson(connection, payloadStr, procFunc || getJsonResult);\n\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: deepCopy(result),\n provider: this\n });\n\n return result;\n }\n\n async detectNetwork(): Promise {\n return this.network;\n }\n\n async perform(method: string, params: any): Promise {\n\n switch (method) {\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n\n case \"getBalance\":\n // Returns base-10 result\n return this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n });\n\n case \"getStorageAt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n });\n\n case \"sendTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch((error) => {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n });\n\n case \"getBlock\":\n if (params.blockTag) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: (params.includeTransactions ? \"true\": \"false\")\n });\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n });\n\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n });\n\n case \"call\": {\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"call\", error, params.transaction);\n }\n }\n\n case \"estimateGas\": {\n const postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return checkError(\"estimateGas\", error, params.transaction);\n }\n }\n\n case \"getLogs\": {\n const args: Record = { action: \"getLogs\" }\n\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n\n // @TODO: We can handle slightly more complicated logs using the logs API\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n\n if (params.filter.topics.length === 1) {\n const topic0 = params.filter.topics[0];\n if (typeof(topic0) !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 });\n }\n args.topic0 = topic0;\n }\n }\n\n const logs: Array = await this.fetch(\"logs\", args);\n\n // Cache txHash => blockHash\n let blocks: { [tag: string]: string } = {};\n\n // Add any missing blockHash to the logs\n for (let i = 0; i < logs.length; i++) {\n const log = logs[i];\n if (log.blockHash != null) { continue; }\n if (blocks[log.blockNumber] == null) {\n const block = await this.getBlock(log.blockNumber);\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n }\n log.blockHash = blocks[log.blockNumber];\n }\n\n return logs;\n }\n\n case \"getEtherPrice\":\n if (this.network.name !== \"homestead\") { return 0.0; }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n\n default:\n break;\n }\n\n return super.perform(method, params);\n }\n\n // Note: The `page` page parameter only allows pagination within the\n // 10,000 window available without a page and offset parameter\n // Error: Result window is too large, PageNo x Offset size must\n // be less than or equal to 10000\n async getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise> {\n const params = {\n action: \"txlist\",\n address: (await this.resolveName(addressOrName)),\n startblock: ((startBlock == null) ? 0: startBlock),\n endblock: ((endBlock == null) ? 99999999: endBlock),\n sort: \"asc\"\n };\n\n const result = await this.fetch(\"account\", params);\n\n return result.map((tx: any) => {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") { delete tx[key]; }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n const item = this.formatter.transactionResponse(tx);\n if (tx.timeStamp) { item.timestamp = parseInt(tx.timeStamp); }\n return item;\n });\n }\n\n isCommunityResource(): boolean {\n return (this.apiKey === defaultApiKey);\n }\n}\n","\"use strict\";\n\nimport { Block, BlockWithTransactions, Provider } from \"@ethersproject/abstract-provider\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { isHexString } from \"@ethersproject/bytes\";\nimport { Network } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\nimport { shuffled } from \"@ethersproject/random\";\nimport { poll } from \"@ethersproject/web\";\n\nimport { BaseProvider } from \"./base-provider\";\nimport { isCommunityResource } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nfunction now() { return (new Date()).getTime(); }\n\n// Returns to network as long as all agree, or null if any is null.\n// Throws an error if any two networks do not match.\nfunction checkNetworks(networks: Array): Network {\n let result = null;\n\n for (let i = 0; i < networks.length; i++) {\n const network = networks[i];\n\n // Null! We do not know our network; bail.\n if (network == null) { return null; }\n\n if (result) {\n // Make sure the network matches the previous networks\n if (!(result.name === network.name && result.chainId === network.chainId &&\n ((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) {\n\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n\n return result;\n}\n\nfunction median(values: Array, maxDelta?: number): number {\n values = values.slice().sort();\n const middle = Math.floor(values.length / 2);\n\n // Odd length; take the middle\n if (values.length % 2) {\n return values[middle];\n }\n\n // Even length; take the average of the two middle\n const a = values[middle - 1], b = values[middle];\n\n if (maxDelta != null && Math.abs(a - b) > maxDelta) {\n return null;\n }\n\n return (a + b) / 2;\n}\n\nfunction serialize(value: any): string {\n if (value === null) {\n return \"null\";\n } else if (typeof(value) === \"number\" || typeof(value) === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof(value) === \"string\") {\n return value;\n } else if (BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map((i) => serialize(i)));\n } else if (typeof(value) === \"object\") {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((key) => {\n let v = value[key];\n if (typeof(v) === \"function\") {\n v = \"[function]\";\n } else {\n v = serialize(v);\n }\n return JSON.stringify(key) + \":\" + v;\n }).join(\",\") + \"}\";\n }\n\n throw new Error(\"unknown value type: \" + typeof(value));\n}\n\n// Next request ID to use for emitting debug info\nlet nextRid = 1;\n\n\nexport interface FallbackProviderConfig {\n // The Provider\n provider: Provider;\n\n // The priority to favour this Provider; lower values are used first (higher priority)\n priority?: number;\n\n // Timeout before also triggering the next provider; this does not stop\n // this provider and if its result comes back before a quorum is reached\n // it will be incorporated into the vote\n // - lower values will cause more network traffic but may result in a\n // faster result.\n stallTimeout?: number;\n\n // How much this provider contributes to the quorum; sometimes a specific\n // provider may be more reliable or trustworthy than others, but usually\n // this should be left as the default\n weight?: number;\n};\n\n// A Staller is used to provide a delay to give a Provider a chance to response\n// before asking the next Provider to try.\ntype Staller = {\n wait: (func: () => void) => Promise\n getPromise: () => Promise,\n cancel: () => void\n};\n\nfunction stall(duration: number): Staller {\n let cancel: () => void = null;\n\n let timer: NodeJS.Timer = null;\n let promise = >(new Promise((resolve) => {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n }\n timer = setTimeout(cancel, duration);\n }));\n\n const wait = (func: () => void) => {\n promise = promise.then(func);\n return promise;\n }\n\n function getPromise(): Promise {\n return promise;\n }\n\n return { cancel, getPromise, wait };\n}\n\nconst ForwardErrors = [\n Logger.errors.CALL_EXCEPTION,\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n Logger.errors.UNPREDICTABLE_GAS_LIMIT\n];\n\nconst ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\",\n];\n\n\n// @TODO: Make this an object with staller and cancel built-in\ninterface RunningConfig extends FallbackProviderConfig {\n start?: number;\n done?: boolean;\n cancelled?: boolean;\n runner?: Promise;\n staller?: Staller;\n result?: any;\n error?: Error;\n};\n\nfunction exposeDebugConfig(config: RunningConfig, now?: number): any {\n const result: any = {\n weight: config.weight\n };\n Object.defineProperty(result, \"provider\", { get: () => config.provider });\n if (config.start) { result.start = config.start; }\n if (now) { result.duration = (now - config.start); }\n if (config.done) {\n if (config.error) {\n result.error = config.error;\n } else {\n result.result = config.result || null;\n }\n }\n return result;\n}\n\nfunction normalizedTally(normalize: (value: any) => string, quorum: number): (configs: Array) => any {\n return function(configs: Array): any {\n\n // Count the votes for each result\n const tally: { [ key: string]: { count: number, result: any } } = { };\n configs.forEach((c) => {\n const value = normalize(c.result);\n if (!tally[value]) { tally[value] = { count: 0, result: c.result }; }\n tally[value].count++;\n });\n\n // Check for a quorum on any given result\n const keys = Object.keys(tally);\n for (let i = 0; i < keys.length; i++) {\n const check = tally[keys[i]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n\n // No quroum\n return undefined;\n }\n}\nfunction getProcessFunc(provider: FallbackProvider, method: string, params: { [ key: string ]: any }): (configs: Array) => any {\n\n let normalize = serialize;\n\n switch (method) {\n case \"getBlockNumber\":\n // Return the median value, unless there is (median + 1) is also\n // present, in which case that is probably true and the median\n // is going to be stale soon. In the event of a malicious node,\n // the lie will be true soon enough.\n return function(configs: Array): number {\n const values = configs.map((c) => c.result);\n\n // Get the median block number\n let blockNumber = median(configs.map((c) => c.result), 2);\n if (blockNumber == null) { return undefined; }\n\n blockNumber = Math.ceil(blockNumber);\n\n // If the next block height is present, its prolly safe to use\n if (values.indexOf(blockNumber + 1) >= 0) { blockNumber++; }\n\n // Don't ever roll back the blockNumber\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n\n return provider._highestBlockNumber;\n };\n\n case \"getGasPrice\":\n // Return the middle (round index up) value, similar to median\n // but do not average even entries and choose the higher.\n // Malicious actors must compromise 50% of the nodes to lie.\n return function(configs: Array): BigNumber {\n const values = configs.map((c) => c.result);\n values.sort();\n return values[Math.floor(values.length / 2)];\n }\n\n case \"getEtherPrice\":\n // Returns the median price. Malicious actors must compromise at\n // least 50% of the nodes to lie (in a meaningful way).\n return function(configs: Array): number {\n return median(configs.map((c) => c.result));\n }\n\n // No additional normalizing required; serialize is enough\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize = function(tx: any): string {\n if (tx == null) { return null; }\n\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return serialize(tx);\n }\n break;\n\n // We drop the confirmations from transactions as it is approximate\n case \"getBlock\":\n // We drop the confirmations from transactions as it is approximate\n if (params.includeTransactions) {\n normalize = function(block: BlockWithTransactions): string {\n if (block == null) { return null; }\n\n block = shallowCopy(block);\n block.transactions = block.transactions.map((tx) => {\n tx = shallowCopy(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize = function(block: Block): string {\n if (block == null) { return null; }\n return serialize(block);\n }\n }\n break;\n\n default:\n throw new Error(\"unknown method: \" + method);\n }\n\n // Return the result if and only if the expected quorum is\n // satisfied and agreed upon for the final result.\n return normalizedTally(normalize, provider.quorum);\n\n}\n\n// If we are doing a blockTag query, we need to make sure the backend is\n// caught up to the FallbackProvider, before sending a request to it.\nasync function waitForSync(config: RunningConfig, blockNumber: number): Promise {\n const provider = (config.provider);\n\n if ((provider.blockNumber != null && provider.blockNumber >= blockNumber) || blockNumber === -1) {\n return provider;\n }\n\n return poll(() => {\n return new Promise((resolve, reject) => {\n setTimeout(function() {\n\n // We are synced\n if (provider.blockNumber >= blockNumber) { return resolve(provider); }\n\n // We're done; just quit\n if (config.cancelled) { return resolve(null); }\n\n // Try again, next block\n return resolve(undefined);\n }, 0);\n });\n }, { oncePoll: provider });\n}\n\nasync function getRunner(config: RunningConfig, currentBlockNumber: number, method: string, params: { [ key: string]: any }): Promise {\n let provider = config.provider;\n\n switch (method) {\n case \"getBlockNumber\":\n case \"getGasPrice\":\n return provider[method]();\n case \"getEtherPrice\":\n if ((provider).getEtherPrice) {\n return (provider).getEtherPrice();\n }\n break;\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.address, params.blockTag || \"latest\");\n case \"getStorageAt\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\");\n case \"getBlock\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[(params.includeTransactions ? \"getBlockWithTransactions\": \"getBlock\")](params.blockTag || params.blockHash);\n case \"call\":\n case \"estimateGas\":\n if (params.blockTag && isHexString(params.blockTag)) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider[method](params.transaction);\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n return provider[method](params.transactionHash);\n case \"getLogs\": {\n let filter = params.filter;\n if ((filter.fromBlock && isHexString(filter.fromBlock)) || (filter.toBlock && isHexString(filter.toBlock))) {\n provider = await waitForSync(config, currentBlockNumber)\n }\n return provider.getLogs(filter);\n }\n }\n\n return logger.throwError(\"unknown method error\", Logger.errors.UNKNOWN_ERROR, {\n method: method,\n params: params\n });\n}\n\nexport class FallbackProvider extends BaseProvider {\n readonly providerConfigs: ReadonlyArray;\n readonly quorum: number;\n\n // Due to the highly asyncronous nature of the blockchain, we need\n // to make sure we never unroll the blockNumber due to our random\n // sample of backends\n _highestBlockNumber: number;\n\n constructor(providers: Array, quorum?: number) {\n logger.checkNew(new.target, FallbackProvider);\n\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n\n const providerConfigs: Array = providers.map((configOrProvider, index) => {\n if (Provider.isProvider(configOrProvider)) {\n const stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n const priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n\n const config: FallbackProviderConfig = shallowCopy(configOrProvider);\n\n if (config.priority == null) { config.priority = 1; }\n if (config.stallTimeout == null) {\n config.stallTimeout = isCommunityResource(configOrProvider) ? 2000: 750;\n }\n if (config.weight == null) { config.weight = 1; }\n\n const weight = config.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", `providers[${ index }].weight`, weight);\n }\n\n return Object.freeze(config);\n });\n\n const total = providerConfigs.reduce((accum, c) => (accum + c.weight), 0);\n\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n\n // Are all providers' networks are known\n let networkOrReady: Network | Promise = checkNetworks(providerConfigs.map((c) => ((c.provider)).network));\n\n // Not all networks are known; we must stall\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n\n super(networkOrReady);\n\n // Preserve a copy, so we do not get mutated\n defineReadOnly(this, \"providerConfigs\", Object.freeze(providerConfigs));\n defineReadOnly(this, \"quorum\", quorum);\n\n this._highestBlockNumber = -1;\n }\n\n async detectNetwork(): Promise {\n const networks = await Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork()));\n return checkNetworks(networks);\n }\n\n async perform(method: string, params: { [name: string]: any }): Promise {\n // Sending transactions is special; always broadcast it to all backends\n if (method === \"sendTransaction\") {\n const results: Array = await Promise.all(this.providerConfigs.map((c) => {\n return c.provider.sendTransaction(params.signedTransaction).then((result) => {\n return result.hash;\n }, (error) => {\n return error;\n });\n }));\n\n // Any success is good enough (other errors are likely \"already seen\" errors\n for (let i = 0; i < results.length; i++) {\n const result = results[i];\n if (typeof(result) === \"string\") { return result; }\n }\n\n // They were all an error; pick the first error\n throw results[0];\n }\n\n // We need to make sure we are in sync with our backends, so we need\n // to know this before we can make a lot of calls\n if (this._highestBlockNumber === -1 && method !== \"getBlockNumber\") {\n await this.getBlockNumber();\n }\n\n const processFunc = getProcessFunc(this, method, params);\n\n // Shuffle the providers and then sort them by their priority; we\n // shallowCopy them since we will store the result in them too\n const configs: Array = shuffled(this.providerConfigs.map(shallowCopy));\n configs.sort((a, b) => (a.priority - b.priority));\n\n const currentBlockNumber = this._highestBlockNumber;\n\n let i = 0;\n let first = true;\n while (true) {\n const t0 = now();\n\n // Compute the inflight weight (exclude anything past)\n let inflightWeight = configs.filter((c) => (c.runner && ((t0 - c.start) < c.stallTimeout)))\n .reduce((accum, c) => (accum + c.weight), 0);\n\n // Start running enough to meet quorum\n while (inflightWeight < this.quorum && i < configs.length) {\n const config = configs[i++];\n\n const rid = nextRid++;\n\n config.start = now();\n config.staller = stall(config.stallTimeout);\n config.staller.wait(() => { config.staller = null; });\n\n config.runner = getRunner(config, currentBlockNumber, method, params).then((result) => {\n config.done = true;\n config.result = result;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n }, (error) => {\n config.done = true;\n config.error = error;\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, now()),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n });\n\n if (this.listenerCount(\"debug\")) {\n this.emit(\"debug\", {\n action: \"request\",\n rid: rid,\n backend: exposeDebugConfig(config, null),\n request: { method: method, params: deepCopy(params) },\n provider: this\n });\n }\n\n inflightWeight += config.weight;\n }\n\n // Wait for anything meaningful to finish or stall out\n const waiting: Array> = [ ];\n configs.forEach((c) => {\n if (c.done || !c.runner) { return; }\n waiting.push(c.runner);\n if (c.staller) { waiting.push(c.staller.getPromise()); }\n });\n\n if (waiting.length) { await Promise.race(waiting); }\n\n // Check the quorum and process the results; the process function\n // may additionally decide the quorum is not met\n const results = configs.filter((c) => (c.done && c.error == null));\n if (results.length >= this.quorum) {\n const result = processFunc(results);\n if (result !== undefined) {\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n return result;\n }\n if (!first) { await stall(100).getPromise(); }\n first = false;\n }\n\n // No result, check for errors that should be forwarded\n const errors = configs.reduce((accum, c) => {\n if (!c.done || c.error == null) { return accum; }\n\n const code = ((c.error)).code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) { accum[code] = { error: c.error, weight: 0 }; }\n accum[code].weight += c.weight;\n }\n\n return accum;\n }, <{ [ code: string ]: { error: Error, weight: number } }>({ }));\n\n Object.keys(errors).forEach((errorCode: string) => {\n const tally = errors[errorCode];\n if (tally.weight < this.quorum) { return; }\n\n // Shut down any stallers\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n const e = (tally.error);\n\n const props: { [ name: string ]: any } = { };\n ForwardProperties.forEach((name) => {\n if (e[name] == null) { return; }\n props[name] = e[name];\n });\n\n logger.throwError(e.reason || e.message, errorCode, props);\n });\n\n // All configs have run to completion; we will never get more data\n if (configs.filter((c) => !c.done).length === 0) { break; }\n }\n\n // Shut down any stallers; shouldn't be any\n configs.forEach(c => {\n if (c.staller) { c.staller.cancel(); }\n c.cancelled = true;\n });\n\n return logger.throwError(\"failed to meet quorum\", Logger.errors.SERVER_ERROR, {\n method: method,\n params: params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map((c) => exposeDebugConfig(c)),\n provider: this\n });\n }\n}\n","\"use strict\";\n\nconst IpcProvider: any = null;\n\nexport {\n IpcProvider\n};\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { CommunityResourcable, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n\nconst defaultProjectId = \"84842078b09946638c03157f83405213\"\n\nexport class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable {\n readonly apiKey: string;\n readonly projectId: string;\n readonly projectSecret: string;\n\n constructor(network?: Networkish, apiKey?: any) {\n const provider = new InfuraProvider(network, apiKey);\n const connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n\n const url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, network);\n\n defineReadOnly(this, \"apiKey\", provider.projectId);\n defineReadOnly(this, \"projectId\", provider.projectId);\n defineReadOnly(this, \"projectSecret\", provider.projectSecret);\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n\nexport class InfuraProvider extends UrlJsonRpcProvider {\n readonly projectId: string;\n readonly projectSecret: string;\n\n static getWebSocketProvider(network?: Networkish, apiKey?: any): InfuraWebSocketProvider {\n return new InfuraWebSocketProvider(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n const apiKeyObj: { apiKey: string, projectId: string, projectSecret: string } = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n\n if (apiKey == null) { return apiKeyObj; }\n\n if (typeof(apiKey) === \"string\") {\n apiKeyObj.projectId = apiKey;\n\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument((typeof(apiKey.projectId) === \"string\"),\n \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument((typeof(apiKey.projectSecret) === \"string\"),\n \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n\n apiKeyObj.apiKey = apiKeyObj.projectId;\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch(network ? network.name: \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"ropsten\":\n host = \"ropsten.infura.io\";\n break;\n case \"rinkeby\":\n host = \"rinkeby.infura.io\";\n break;\n case \"kovan\":\n host = \"kovan.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-kovan\":\n host = \"optimism-kovan.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-rinkeby\":\n host = \"arbitrum-rinkeby.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n const connection: ConnectionInfo = {\n allowGzip: true,\n url: (\"https:/\" + \"/\" + host + \"/v3/\" + apiKey.projectId),\n throttleCallback: (attempt: number, url: string) => {\n if (apiKey.projectId === defaultProjectId) {\n showThrottleMessage();\n }\n return Promise.resolve(true);\n }\n };\n\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.projectId === defaultProjectId);\n }\n}\n","\nimport { deepCopy } from \"@ethersproject/properties\";\nimport { fetchJson } from \"@ethersproject/web\";\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Experimental\n\nexport class JsonRpcBatchProvider extends JsonRpcProvider {\n _pendingBatchAggregator: NodeJS.Timer;\n _pendingBatch: Array<{\n request: { method: string, params: Array, id: number, jsonrpc: \"2.0\" },\n resolve: (result: any) => void,\n reject: (error: Error) => void\n }>;\n\n send(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n\n if (this._pendingBatch == null) {\n this._pendingBatch = [ ];\n }\n\n const inflightRequest: any = { request, resolve: null, reject: null };\n\n const promise = new Promise((resolve, reject) => {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n\n this._pendingBatch.push(inflightRequest);\n\n if (!this._pendingBatchAggregator) {\n // Schedule batch for next event loop + short duration\n this._pendingBatchAggregator = setTimeout(() => {\n\n // Get teh current batch and clear it, so new requests\n // go into the next batch\n const batch = this._pendingBatch;\n this._pendingBatch = null;\n this._pendingBatchAggregator = null;\n\n // Get the request as an array of requests\n const request = batch.map((inflight) => inflight.request);\n\n this.emit(\"debug\", {\n action: \"requestBatch\",\n request: deepCopy(request),\n provider: this\n });\n\n return fetchJson(this.connection, JSON.stringify(request)).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n\n // For each result, feed it to the correct Promise, depending\n // on whether it was a success or error\n batch.forEach((inflightRequest, index) => {\n const payload = result[index];\n if (payload.error) {\n const error = new Error(payload.error.message);\n (error).code = payload.error.code;\n (error).data = payload.error.data;\n inflightRequest.reject(error);\n } else {\n inflightRequest.resolve(payload.result);\n }\n });\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n\n batch.forEach((inflightRequest) => {\n inflightRequest.reject(error);\n });\n });\n\n }, 10);\n }\n\n return promise;\n }\n}\n","/* istanbul ignore file */\n\n\"use strict\";\n\nimport { Network } from \"@ethersproject/networks\";\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n// Special API key provided by Nodesmith for ethers.js\nconst defaultApiKey = \"ETHERS_JS_SHARED\";\n\nexport class NodesmithProvider extends UrlJsonRpcProvider {\n\n static getApiKey(apiKey: any): any {\n if (apiKey && typeof(apiKey) !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n }\n\n static getUrl(network: Network, apiKey?: any): string {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n\n let host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n\n return (host + \"?apiKey=\" + apiKey);\n }\n}\n","\"use strict\";\n\nimport { Network, Networkish } from \"@ethersproject/networks\";\nimport { getStatic } from \"@ethersproject/properties\";\nimport { ConnectionInfo } from \"@ethersproject/web\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\n\n// These are load-balancer-based application IDs\nconst defaultApplicationIds: Record = {\n homestead: \"6004bcd10040261633ade990\",\n ropsten: \"6004bd4d0040261633ade991\",\n rinkeby: \"6004bda20040261633ade994\",\n goerli: \"6004bd860040261633ade992\",\n};\n\nexport class PocketProvider extends UrlJsonRpcProvider {\n readonly applicationId: string;\n readonly applicationSecretKey: string;\n readonly loadBalancer: boolean;\n\n constructor(network?: Networkish, apiKey?: any) {\n // We need a bit of creativity in the constructor because\n // Pocket uses different default API keys based on the network\n\n if (apiKey == null) {\n const n = getStatic<(network: Networkish) => Network>(new.target, \"getNetwork\")(network);\n if (n) {\n const applicationId = defaultApplicationIds[n.name];\n if (applicationId) {\n apiKey = {\n applicationId: applicationId,\n loadBalancer: true\n };\n }\n }\n\n // If there was any issue above, we don't know this network\n if (apiKey == null) {\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n }\n\n super(network, apiKey);\n }\n\n static getApiKey(apiKey: any): any {\n // Most API Providers allow null to get the default configuration, but\n // Pocket requires the network to decide the default provider, so we\n // rely on hijacking the constructor to add a sensible default for us\n\n if (apiKey == null) {\n logger.throwArgumentError(\"PocketProvider.getApiKey does not support null apiKey\", \"apiKey\", apiKey);\n }\n\n const apiKeyObj: { applicationId: string, applicationSecretKey: string, loadBalancer: boolean } = {\n applicationId: null,\n loadBalancer: false,\n applicationSecretKey: null\n };\n\n // Parse applicationId and applicationSecretKey\n if (typeof (apiKey) === \"string\") {\n apiKeyObj.applicationId = apiKey;\n\n } else if (apiKey.applicationSecretKey != null) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"applicationSecretKey requires an applicationId\", \"applicationId\", apiKey.applicationId);\n logger.assertArgument((typeof (apiKey.applicationSecretKey) === \"string\"),\n \"invalid applicationSecretKey\", \"applicationSecretKey\", \"[REDACTED]\");\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else if (apiKey.applicationId) {\n logger.assertArgument((typeof (apiKey.applicationId) === \"string\"),\n \"apiKey.applicationId must be a string\", \"apiKey.applicationId\", apiKey.applicationId);\n\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.loadBalancer = !!apiKey.loadBalancer;\n\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n\n return apiKeyObj;\n }\n\n static getUrl(network: Network, apiKey: any): ConnectionInfo {\n let host: string = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n\n let url = null;\n if (apiKey.loadBalancer) {\n url = `https:/\\/${ host }/v1/lb/${ apiKey.applicationId }`\n } else {\n url = `https:/\\/${ host }/v1/${ apiKey.applicationId }`\n }\n\n const connection: ConnectionInfo = { url };\n\n // Initialize empty headers\n connection.headers = {}\n\n // Apply application secret key\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey\n }\n\n return connection;\n }\n\n isCommunityResource(): boolean {\n return (this.applicationId === defaultApplicationIds[this.network.name]);\n }\n}\n","\"use strict\";\n\nimport { Networkish } from \"@ethersproject/networks\";\nimport { deepCopy, defineReadOnly } from \"@ethersproject/properties\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nimport { JsonRpcProvider } from \"./json-rpc-provider\";\n\n// Exported Types\nexport type ExternalProvider = {\n isMetaMask?: boolean;\n isStatus?: boolean;\n host?: string;\n path?: string;\n sendAsync?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n send?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void\n request?: (request: { method: string, params?: Array }) => Promise\n}\n\nlet _nextId = 1;\n\nexport type JsonRpcFetchFunc = (method: string, params?: Array) => Promise;\n\ntype Web3LegacySend = (request: any, callback: (error: Error, response: any) => void) => void;\n\nfunction buildWeb3LegacyFetcher(provider: ExternalProvider, sendFunc: Web3LegacySend) : JsonRpcFetchFunc {\n const fetcher = \"Web3LegacyFetcher\";\n\n return function(method: string, params: Array): Promise {\n const request = {\n method: method,\n params: params,\n id: (_nextId++),\n jsonrpc: \"2.0\"\n };\n\n return new Promise((resolve, reject) => {\n this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: deepCopy(request),\n provider: this\n });\n\n sendFunc(request, (error, response) => {\n\n if (error) {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: this\n });\n\n return reject(error);\n }\n\n this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: this\n });\n\n if (response.error) {\n const error = new Error(response.error.message);\n (error).code = response.error.code;\n (error).data = response.error.data;\n return reject(error);\n }\n\n resolve(response.result);\n });\n });\n }\n}\n\nfunction buildEip1193Fetcher(provider: ExternalProvider): JsonRpcFetchFunc {\n return function(method: string, params: Array): Promise {\n if (params == null) { params = [ ]; }\n\n const request = { method, params };\n\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: deepCopy(request),\n provider: this\n });\n\n return provider.request(request).then((response) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: this\n });\n\n return response;\n\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: this\n });\n\n throw error;\n });\n }\n}\n\nexport class Web3Provider extends JsonRpcProvider {\n readonly provider: ExternalProvider;\n readonly jsonRpcFetchFunc: JsonRpcFetchFunc;\n\n constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish) {\n logger.checkNew(new.target, Web3Provider);\n\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n\n let path: string = null;\n let jsonRpcFetchFunc: JsonRpcFetchFunc = null;\n let subprovider: ExternalProvider = null;\n\n if (typeof(provider) === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n\n subprovider = provider;\n\n if (provider.request) {\n if (path === \"\") { path = \"eip-1193:\"; }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n\n if (!path) { path = \"unknown:\"; }\n }\n\n super(path, network);\n\n defineReadOnly(this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n defineReadOnly(this, \"provider\", subprovider);\n }\n\n send(method: string, params: Array): Promise {\n return this.jsonRpcFetchFunc(method, params);\n }\n}\n","\"use strict\";\n\nimport {\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n Provider,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from \"@ethersproject/abstract-provider\";\n\nimport { getNetwork } from \"@ethersproject/networks\";\nimport { Network, Networkish } from \"@ethersproject/networks\";\n\nimport { BaseProvider, EnsProvider, EnsResolver, Resolver } from \"./base-provider\";\n\nimport { AlchemyProvider, AlchemyWebSocketProvider } from \"./alchemy-provider\";\nimport { CloudflareProvider } from \"./cloudflare-provider\";\nimport { EtherscanProvider } from \"./etherscan-provider\";\nimport { FallbackProvider, FallbackProviderConfig } from \"./fallback-provider\";\nimport { IpcProvider } from \"./ipc-provider\";\nimport { InfuraProvider, InfuraWebSocketProvider } from \"./infura-provider\";\nimport { JsonRpcProvider, JsonRpcSigner } from \"./json-rpc-provider\";\nimport { JsonRpcBatchProvider } from \"./json-rpc-batch-provider\";\nimport { NodesmithProvider } from \"./nodesmith-provider\";\nimport { PocketProvider } from \"./pocket-provider\";\nimport { StaticJsonRpcProvider, UrlJsonRpcProvider } from \"./url-json-rpc-provider\";\nimport { Web3Provider } from \"./web3-provider\";\nimport { WebSocketProvider } from \"./websocket-provider\";\nimport { ExternalProvider, JsonRpcFetchFunc } from \"./web3-provider\";\n\nimport { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from \"./formatter\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n////////////////////////\n// Helper Functions\n\nfunction getDefaultProvider(network?: Networkish, options?: any): BaseProvider {\n if (network == null) { network = \"homestead\"; }\n\n // If passed a URL, figure out the right type of provider based on the scheme\n if (typeof(network) === \"string\") {\n // @TODO: Add support for IpcProvider; maybe if it ends in \".ipc\"?\n\n // Handle http and ws (and their secure variants)\n const match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1]) {\n case \"http\":\n return new JsonRpcProvider(network);\n case \"ws\":\n return new WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n\n const n = getNetwork(network);\n if (!n || !n._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network: network\n });\n }\n\n return n._defaultProvider({\n FallbackProvider,\n\n AlchemyProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n JsonRpcProvider,\n NodesmithProvider,\n PocketProvider,\n Web3Provider,\n\n IpcProvider,\n }, options);\n}\n\n////////////////////////\n// Exports\n\nexport {\n\n // Abstract Providers (or Abstract-ish)\n Provider,\n BaseProvider,\n\n Resolver,\n\n UrlJsonRpcProvider,\n\n ///////////////////////\n // Concrete Providers\n\n FallbackProvider,\n\n AlchemyProvider,\n AlchemyWebSocketProvider,\n CloudflareProvider,\n EtherscanProvider,\n InfuraProvider,\n InfuraWebSocketProvider,\n JsonRpcProvider,\n JsonRpcBatchProvider,\n NodesmithProvider,\n PocketProvider,\n StaticJsonRpcProvider,\n Web3Provider,\n WebSocketProvider,\n\n IpcProvider,\n\n\n ///////////////////////\n // Signer\n\n JsonRpcSigner,\n\n\n ///////////////////////\n // Functions\n\n getDefaultProvider,\n getNetwork,\n isCommunityResource,\n isCommunityResourcable,\n showThrottleMessage,\n\n\n ///////////////////////\n // Objects\n\n Formatter,\n\n\n ///////////////////////\n // Types\n\n Block,\n BlockTag,\n EventType,\n FeeData,\n Filter,\n Log,\n Listener,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse,\n\n ExternalProvider,\n JsonRpcFetchFunc,\n\n FallbackProviderConfig,\n\n Network,\n Networkish,\n\n EnsProvider,\n EnsResolver,\n\n CommunityResourcable\n};\n\n","export const version = \"solidity/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\n\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\n\nfunction _pack(type: string, value: any, isArray?: boolean): Uint8Array {\n switch(type) {\n case \"address\":\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\": \"0x00\");\n if (isArray) { return zeroPad(value, 32); }\n return arrayify(value);\n }\n\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\")\n\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type)\n }\n\n if (isArray) { size = 256; }\n\n value = BigNumber.from(value).toTwos(size);\n\n return zeroPad(value, size / 8);\n }\n\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type)\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${ type }`, \"value\", value)\n }\n if (isArray) { return arrayify((value + Zeros).substring(0, 66)); }\n return value;\n }\n\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${ type }`, \"value\", value)\n }\n const result: Array = [];\n value.forEach(function(value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n\n return logger.throwArgumentError(\"invalid type\", \"type\", type)\n}\n\n// @TODO: Array Enum\n\nexport function pack(types: ReadonlyArray, values: ReadonlyArray) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values)\n }\n const tight: Array = [];\n types.forEach(function(type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\n\nexport function keccak256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashKeccak256(pack(types, values));\n}\n\nexport function sha256(types: ReadonlyArray, values: ReadonlyArray) {\n return hashSha256(pack(types, values));\n}\n","export const version = \"units/5.5.0\";\n","\"use strict\";\n\nimport { BigNumber, BigNumberish } from \"@ethersproject/bignumber\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\n\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n\n\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value: string | number): string {\n const comps = String(value).split(\".\");\n\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") { whole = whole.substring(1); }\n if (whole === \"\") { whole = \"0\"; }\n\n let suffix = \"\";\n if (comps.length === 2) { suffix = \".\" + (comps[1] || \"0\"); }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n\n return negative + formatted.join(\",\") + suffix;\n}\n\nexport function formatUnits(value: BigNumberish, unitName?: string | BigNumberish): string {\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return formatFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function parseUnits(value: string, unitName?: BigNumberish): BigNumber {\n if (typeof(value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof(unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) { unitName = 3 * index; }\n }\n return parseFixed(value, (unitName != null) ? unitName: 18);\n}\n\nexport function formatEther(wei: BigNumberish): string {\n return formatUnits(wei, 18);\n}\n\nexport function parseEther(ether: string): BigNumber {\n return parseUnits(ether, 18);\n}\n\n","\"use strict\";\n\nimport { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription }from \"@ethersproject/abi\";\nimport { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from \"@ethersproject/address\";\nimport * as base64 from \"@ethersproject/base64\";\nimport { Base58 as base58 } from \"@ethersproject/basex\";\nimport { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from \"@ethersproject/hash\";\nimport { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from \"@ethersproject/hdnode\";\nimport { getJsonWalletAddress } from \"@ethersproject/json-wallets\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { computeHmac, ripemd160, sha256, sha512 } from \"@ethersproject/sha2\";\nimport { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from \"@ethersproject/solidity\";\nimport { randomBytes, shuffled } from \"@ethersproject/random\";\nimport { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey, SigningKey } from \"@ethersproject/signing-key\";\nimport { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from \"@ethersproject/strings\";\nimport { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from \"@ethersproject/transactions\";\nimport { commify, formatEther, parseEther, formatUnits, parseUnits } from \"@ethersproject/units\";\nimport { verifyMessage, verifyTypedData } from \"@ethersproject/wallet\";\nimport { _fetchData, fetchJson, poll } from \"@ethersproject/web\";\n\n////////////////////////\n// Enums\n\nimport { SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { UnicodeNormalizationForm, Utf8ErrorReason } from \"@ethersproject/strings\";\nimport { UnsignedTransaction } from \"@ethersproject/transactions\";\n\n////////////////////////\n// Types and Interfaces\n\nimport { CoerceFunc } from \"@ethersproject/abi\";\nimport { Bytes, BytesLike, Hexable } from \"@ethersproject/bytes\"\nimport { Mnemonic } from \"@ethersproject/hdnode\";\nimport { EncryptOptions, ProgressCallback } from \"@ethersproject/json-wallets\";\nimport { Deferrable } from \"@ethersproject/properties\";\nimport { Utf8ErrorFunc } from \"@ethersproject/strings\";\nimport { AccessList, AccessListish } from \"@ethersproject/transactions\";\nimport { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from \"@ethersproject/web\";\n\n////////////////////////\n// Exports\n\nexport {\n AbiCoder,\n defaultAbiCoder,\n\n Fragment,\n ConstructorFragment,\n ErrorFragment,\n EventFragment,\n FunctionFragment,\n ParamType,\n FormatTypes,\n\n checkResultErrors,\n Result,\n\n Logger,\n\n RLP,\n\n _fetchData,\n fetchJson,\n poll,\n\n checkProperties,\n deepCopy,\n defineReadOnly,\n getStatic,\n resolveProperties,\n shallowCopy,\n\n arrayify,\n\n concat,\n stripZeros,\n zeroPad,\n\n isBytes,\n isBytesLike,\n\n defaultPath,\n HDNode,\n SigningKey,\n\n Interface,\n\n LogDescription,\n TransactionDescription,\n\n base58,\n base64,\n\n hexlify,\n isHexString,\n hexConcat,\n hexStripZeros,\n hexValue,\n hexZeroPad,\n hexDataLength,\n hexDataSlice,\n\n nameprep,\n _toEscapedUtf8String,\n toUtf8Bytes,\n toUtf8CodePoints,\n toUtf8String,\n Utf8ErrorFuncs,\n\n formatBytes32String,\n parseBytes32String,\n\n hashMessage,\n namehash,\n isValidName,\n id,\n\n _TypedDataEncoder,\n\n getAddress,\n getIcapAddress,\n getContractAddress,\n getCreate2Address,\n isAddress,\n\n formatEther,\n parseEther,\n\n formatUnits,\n parseUnits,\n\n commify,\n\n computeHmac,\n keccak256,\n ripemd160,\n sha256,\n sha512,\n\n randomBytes,\n shuffled,\n\n solidityPack,\n solidityKeccak256,\n soliditySha256,\n\n splitSignature,\n joinSignature,\n\n accessListify,\n parseTransaction,\n serializeTransaction,\n TransactionTypes,\n\n getJsonWalletAddress,\n\n computeAddress,\n recoverAddress,\n\n computePublicKey,\n recoverPublicKey,\n\n verifyMessage,\n verifyTypedData,\n\n getAccountPath,\n mnemonicToEntropy,\n entropyToMnemonic,\n isValidMnemonic,\n mnemonicToSeed,\n\n\n ////////////////////////\n // Enums\n\n SupportedAlgorithm,\n\n UnicodeNormalizationForm,\n Utf8ErrorReason,\n\n ////////////////////////\n // Types\n\n Bytes,\n BytesLike,\n Hexable,\n\n AccessList,\n AccessListish,\n UnsignedTransaction,\n\n CoerceFunc,\n\n Indexed,\n\n Mnemonic,\n\n Deferrable,\n\n Utf8ErrorFunc,\n\n ConnectionInfo,\n OnceBlockable,\n OncePollable,\n PollOptions,\n FetchJsonResponse,\n\n EncryptOptions,\n ProgressCallback\n}\n\n","export const version = \"ethers/5.5.2\";\n","\"use strict\";\n\nimport { BaseContract, Contract, ContractFactory } from \"@ethersproject/contracts\";\n\nimport { BigNumber, FixedNumber } from \"@ethersproject/bignumber\";\n\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { Wallet } from \"@ethersproject/wallet\";\n\nimport * as constants from \"@ethersproject/constants\";\n\nimport * as providers from \"@ethersproject/providers\";\nimport { getDefaultProvider } from \"@ethersproject/providers\";\n\nimport { Wordlist, wordlists} from \"@ethersproject/wordlists\";\n\nimport * as utils from \"./utils\";\n\nimport { ErrorCode as errors, Logger } from \"@ethersproject/logger\";\n\n////////////////////////\n// Types\n\nimport { BigNumberish } from \"@ethersproject/bignumber\";\nimport { Bytes, BytesLike, Signature } from \"@ethersproject/bytes\";\nimport { Transaction, UnsignedTransaction } from \"@ethersproject/transactions\";\n\n\n////////////////////////\n// Compile-Time Constants\n\n// This is generated by \"npm run dist\"\nimport { version } from \"./_version\";\n\nconst logger = new Logger(version);\n\n////////////////////////\n// Types\n\nimport {\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface\n} from \"@ethersproject/contracts\";\n\n\n////////////////////////\n// Exports\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n};\n\n","\"use strict\";\n\n// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js\n\nimport * as ethers from \"./ethers\";\n\ntry {\n const anyGlobal = (window as any);\n\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers;\n }\n} catch (error) { }\n\nexport { ethers };\n\nexport {\n Signer,\n\n Wallet,\n VoidSigner,\n\n getDefaultProvider,\n providers,\n\n BaseContract,\n Contract,\n ContractFactory,\n\n BigNumber,\n FixedNumber,\n\n constants,\n errors,\n\n logger,\n\n utils,\n\n wordlists,\n\n\n ////////////////////////\n // Compile-Time Constants\n\n version,\n\n\n ////////////////////////\n // Types\n\n ContractFunction,\n ContractReceipt,\n ContractTransaction,\n Event,\n EventFilter,\n\n Overrides,\n PayableOverrides,\n CallOverrides,\n\n PopulatedTransaction,\n\n ContractInterface,\n\n BigNumberish,\n\n Bytes,\n BytesLike,\n\n Signature,\n\n Transaction,\n UnsignedTransaction,\n\n Wordlist\n} from \"./ethers\";\n"]} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/_version.d.ts b/node_modules/ethers/lib.esm/_version.d.ts new file mode 100644 index 0000000..c13de58 --- /dev/null +++ b/node_modules/ethers/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "ethers/5.5.2"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/_version.d.ts.map b/node_modules/ethers/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/ethers/lib.esm/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/_version.js b/node_modules/ethers/lib.esm/_version.js new file mode 100644 index 0000000..cc04217 --- /dev/null +++ b/node_modules/ethers/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "ethers/5.5.2"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/_version.js.map b/node_modules/ethers/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/node_modules/ethers/lib.esm/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/ethers.d.ts b/node_modules/ethers/lib.esm/ethers.d.ts new file mode 100644 index 0000000..2a4be97 --- /dev/null +++ b/node_modules/ethers/lib.esm/ethers.d.ts @@ -0,0 +1,18 @@ +import { BaseContract, Contract, ContractFactory } from "@ethersproject/contracts"; +import { BigNumber, FixedNumber } from "@ethersproject/bignumber"; +import { Signer, VoidSigner } from "@ethersproject/abstract-signer"; +import { Wallet } from "@ethersproject/wallet"; +import * as constants from "@ethersproject/constants"; +import * as providers from "@ethersproject/providers"; +import { getDefaultProvider } from "@ethersproject/providers"; +import { Wordlist, wordlists } from "@ethersproject/wordlists"; +import * as utils from "./utils"; +import { ErrorCode as errors } from "@ethersproject/logger"; +import { BigNumberish } from "@ethersproject/bignumber"; +import { Bytes, BytesLike, Signature } from "@ethersproject/bytes"; +import { Transaction, UnsignedTransaction } from "@ethersproject/transactions"; +import { version } from "./_version"; +declare const logger: utils.Logger; +import { ContractFunction, ContractReceipt, ContractTransaction, Event, EventFilter, Overrides, PayableOverrides, CallOverrides, PopulatedTransaction, ContractInterface } from "@ethersproject/contracts"; +export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, BaseContract, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists, version, ContractFunction, ContractReceipt, ContractTransaction, Event, EventFilter, Overrides, PayableOverrides, CallOverrides, PopulatedTransaction, ContractInterface, BigNumberish, Bytes, BytesLike, Signature, Transaction, UnsignedTransaction, Wordlist }; +//# sourceMappingURL=ethers.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/ethers.d.ts.map b/node_modules/ethers/lib.esm/ethers.d.ts.map new file mode 100644 index 0000000..7806d60 --- /dev/null +++ b/node_modules/ethers/lib.esm/ethers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,SAAS,IAAI,MAAM,EAAU,MAAM,uBAAuB,CAAC;AAKpE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAO/E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,QAAA,MAAM,MAAM,cAAsB,CAAC;AAKnC,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EAEnB,KAAK,EACL,WAAW,EAEX,SAAS,EACT,gBAAgB,EAChB,aAAa,EAEb,oBAAoB,EAEpB,iBAAiB,EACpB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EACH,MAAM,EAEN,MAAM,EACN,UAAU,EAEV,kBAAkB,EAClB,SAAS,EAET,YAAY,EACZ,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,WAAW,EAEX,SAAS,EACT,MAAM,EAEN,MAAM,EAEN,KAAK,EAEL,SAAS,EAMT,OAAO,EAMP,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,WAAW,EAEX,SAAS,EACT,gBAAgB,EAChB,aAAa,EAEb,oBAAoB,EAEpB,iBAAiB,EAEjB,YAAY,EAEZ,KAAK,EACL,SAAS,EAET,SAAS,EAET,WAAW,EACX,mBAAmB,EAEnB,QAAQ,EACX,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/ethers.js b/node_modules/ethers/lib.esm/ethers.js new file mode 100644 index 0000000..ee2518a --- /dev/null +++ b/node_modules/ethers/lib.esm/ethers.js @@ -0,0 +1,23 @@ +"use strict"; +import { BaseContract, Contract, ContractFactory } from "@ethersproject/contracts"; +import { BigNumber, FixedNumber } from "@ethersproject/bignumber"; +import { Signer, VoidSigner } from "@ethersproject/abstract-signer"; +import { Wallet } from "@ethersproject/wallet"; +import * as constants from "@ethersproject/constants"; +import * as providers from "@ethersproject/providers"; +import { getDefaultProvider } from "@ethersproject/providers"; +import { Wordlist, wordlists } from "@ethersproject/wordlists"; +import * as utils from "./utils"; +import { ErrorCode as errors, Logger } from "@ethersproject/logger"; +//////////////////////// +// Compile-Time Constants +// This is generated by "npm run dist" +import { version } from "./_version"; +const logger = new Logger(version); +//////////////////////// +// Exports +export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, BaseContract, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists, +//////////////////////// +// Compile-Time Constants +version, Wordlist }; +//# sourceMappingURL=ethers.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/ethers.js.map b/node_modules/ethers/lib.esm/ethers.js.map new file mode 100644 index 0000000..cdd187b --- /dev/null +++ b/node_modules/ethers/lib.esm/ethers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ethers.js","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAUpE,wBAAwB;AACxB,yBAAyB;AAEzB,sCAAsC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAuBnC,wBAAwB;AACxB,UAAU;AAEV,OAAO,EACH,MAAM,EAEN,MAAM,EACN,UAAU,EAEV,kBAAkB,EAClB,SAAS,EAET,YAAY,EACZ,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,WAAW,EAEX,SAAS,EACT,MAAM,EAEN,MAAM,EAEN,KAAK,EAEL,SAAS;AAGT,wBAAwB;AACxB,yBAAyB;AAEzB,OAAO,EA8BP,QAAQ,EACX,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/index.d.ts b/node_modules/ethers/lib.esm/index.d.ts new file mode 100644 index 0000000..bc4d019 --- /dev/null +++ b/node_modules/ethers/lib.esm/index.d.ts @@ -0,0 +1,4 @@ +import * as ethers from "./ethers"; +export { ethers }; +export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, BaseContract, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists, version, ContractFunction, ContractReceipt, ContractTransaction, Event, EventFilter, Overrides, PayableOverrides, CallOverrides, PopulatedTransaction, ContractInterface, BigNumberish, Bytes, BytesLike, Signature, Transaction, UnsignedTransaction, Wordlist } from "./ethers"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/index.d.ts.map b/node_modules/ethers/lib.esm/index.d.ts.map new file mode 100644 index 0000000..a448742 --- /dev/null +++ b/node_modules/ethers/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAUnC,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EACH,MAAM,EAEN,MAAM,EACN,UAAU,EAEV,kBAAkB,EAClB,SAAS,EAET,YAAY,EACZ,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,WAAW,EAEX,SAAS,EACT,MAAM,EAEN,MAAM,EAEN,KAAK,EAEL,SAAS,EAMT,OAAO,EAMP,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,WAAW,EAEX,SAAS,EACT,gBAAgB,EAChB,aAAa,EAEb,oBAAoB,EAEpB,iBAAiB,EAEjB,YAAY,EAEZ,KAAK,EACL,SAAS,EAET,SAAS,EAET,WAAW,EACX,mBAAmB,EAEnB,QAAQ,EACX,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/index.js b/node_modules/ethers/lib.esm/index.js new file mode 100644 index 0000000..91baf76 --- /dev/null +++ b/node_modules/ethers/lib.esm/index.js @@ -0,0 +1,16 @@ +"use strict"; +// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js +import * as ethers from "./ethers"; +try { + const anyGlobal = window; + if (anyGlobal._ethers == null) { + anyGlobal._ethers = ethers; + } +} +catch (error) { } +export { ethers }; +export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, BaseContract, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists, +//////////////////////// +// Compile-Time Constants +version, Wordlist } from "./ethers"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/index.js.map b/node_modules/ethers/lib.esm/index.js.map new file mode 100644 index 0000000..dd8f344 --- /dev/null +++ b/node_modules/ethers/lib.esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,+EAA+E;AAE/E,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,IAAI;IACA,MAAM,SAAS,GAAI,MAAc,CAAC;IAElC,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,EAAE;QAC3B,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;KAC9B;CACJ;AAAC,OAAO,KAAK,EAAE,GAAG;AAEnB,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EACH,MAAM,EAEN,MAAM,EACN,UAAU,EAEV,kBAAkB,EAClB,SAAS,EAET,YAAY,EACZ,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,WAAW,EAEX,SAAS,EACT,MAAM,EAEN,MAAM,EAEN,KAAK,EAEL,SAAS;AAGT,wBAAwB;AACxB,yBAAyB;AAEzB,OAAO,EA8BP,QAAQ,EACX,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/utils.d.ts b/node_modules/ethers/lib.esm/utils.d.ts new file mode 100644 index 0000000..c735889 --- /dev/null +++ b/node_modules/ethers/lib.esm/utils.d.ts @@ -0,0 +1,34 @@ +import { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription } from "@ethersproject/abi"; +import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address"; +import * as base64 from "@ethersproject/base64"; +import { Base58 as base58 } from "@ethersproject/basex"; +import { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes"; +import { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from "@ethersproject/hash"; +import { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode"; +import { getJsonWalletAddress } from "@ethersproject/json-wallets"; +import { keccak256 } from "@ethersproject/keccak256"; +import { Logger } from "@ethersproject/logger"; +import { computeHmac, ripemd160, sha256, sha512 } from "@ethersproject/sha2"; +import { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from "@ethersproject/solidity"; +import { randomBytes, shuffled } from "@ethersproject/random"; +import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import * as RLP from "@ethersproject/rlp"; +import { computePublicKey, recoverPublicKey, SigningKey } from "@ethersproject/signing-key"; +import { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "@ethersproject/strings"; +import { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from "@ethersproject/transactions"; +import { commify, formatEther, parseEther, formatUnits, parseUnits } from "@ethersproject/units"; +import { verifyMessage, verifyTypedData } from "@ethersproject/wallet"; +import { _fetchData, fetchJson, poll } from "@ethersproject/web"; +import { SupportedAlgorithm } from "@ethersproject/sha2"; +import { UnicodeNormalizationForm, Utf8ErrorReason } from "@ethersproject/strings"; +import { UnsignedTransaction } from "@ethersproject/transactions"; +import { CoerceFunc } from "@ethersproject/abi"; +import { Bytes, BytesLike, Hexable } from "@ethersproject/bytes"; +import { Mnemonic } from "@ethersproject/hdnode"; +import { EncryptOptions, ProgressCallback } from "@ethersproject/json-wallets"; +import { Deferrable } from "@ethersproject/properties"; +import { Utf8ErrorFunc } from "@ethersproject/strings"; +import { AccessList, AccessListish } from "@ethersproject/transactions"; +import { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from "@ethersproject/web"; +export { AbiCoder, defaultAbiCoder, Fragment, ConstructorFragment, ErrorFragment, EventFragment, FunctionFragment, ParamType, FormatTypes, checkResultErrors, Result, Logger, RLP, _fetchData, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, isBytes, isBytesLike, defaultPath, HDNode, SigningKey, Interface, LogDescription, TransactionDescription, base58, base64, hexlify, isHexString, hexConcat, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, _TypedDataEncoder, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, computeHmac, keccak256, ripemd160, sha256, sha512, randomBytes, shuffled, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, accessListify, parseTransaction, serializeTransaction, TransactionTypes, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, verifyTypedData, getAccountPath, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Bytes, BytesLike, Hexable, AccessList, AccessListish, UnsignedTransaction, CoerceFunc, Indexed, Mnemonic, Deferrable, Utf8ErrorFunc, ConnectionInfo, OnceBlockable, OncePollable, PollOptions, FetchJsonResponse, EncryptOptions, ProgressCallback }; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/utils.d.ts.map b/node_modules/ethers/lib.esm/utils.d.ts.map new file mode 100644 index 0000000..9b9cd60 --- /dev/null +++ b/node_modules/ethers/lib.esm/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAK,oBAAoB,CAAC;AAC5P,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UA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S,EACT,iBAAiB,EACjB,WAAW,EAEX,QAAQ,EAER,MAAM,EACN,UAAU,EACV,OAAO,EAEP,OAAO,EACP,WAAW,EAEX,WAAW,EACX,MAAM,EACN,UAAU,EAEV,SAAS,EAET,cAAc,EACd,sBAAsB,EAEtB,MAAM,EACN,MAAM,EAEN,OAAO,EACP,WAAW,EACX,SAAS,EACT,aAAa,EACb,QAAQ,EACR,UAAU,EACV,aAAa,EACb,YAAY,EAEZ,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,cAAc,EAEd,mBAAmB,EACnB,kBAAkB,EAElB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,EAAE,EAEF,iBAAiB,EAEjB,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EAET,WAAW,EACX,UAAU,EAEV,WAAW,EACX,UAAU,EAEV,OAAO,EAEP,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,EAEN,WAAW,EACX,QAAQ,EAER,YAAY,EACZ,iBAAiB,EACjB,cAAc,EAEd,cAAc,EACd,aAAa,EAEb,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAEhB,oBAAoB,EAEpB,cAAc,EACd,cAAc,EAEd,gBAAgB,EAChB,gBAAgB,EAEhB,aAAa,EACb,eAAe,EAEf,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EAMd,kBAAkB,EAElB,wBAAwB,EACxB,eAAe,EAKf,KAAK,EACL,SAAS,EACT,OAAO,EAEP,UAAU,EACV,aAAa,EACb,mBAAmB,EAEnB,UAAU,EAEV,OAAO,EAEP,QAAQ,EAER,UAAU,EAEV,aAAa,EAEb,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,EAEjB,cAAc,EACd,gBAAgB,EACnB,CAAA"} \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/utils.js b/node_modules/ethers/lib.esm/utils.js new file mode 100644 index 0000000..cddc55b --- /dev/null +++ b/node_modules/ethers/lib.esm/utils.js @@ -0,0 +1,33 @@ +"use strict"; +import { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, TransactionDescription } from "@ethersproject/abi"; +import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address"; +import * as base64 from "@ethersproject/base64"; +import { Base58 as base58 } from "@ethersproject/basex"; +import { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes"; +import { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from "@ethersproject/hash"; +import { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode"; +import { getJsonWalletAddress } from "@ethersproject/json-wallets"; +import { keccak256 } from "@ethersproject/keccak256"; +import { Logger } from "@ethersproject/logger"; +import { computeHmac, ripemd160, sha256, sha512 } from "@ethersproject/sha2"; +import { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from "@ethersproject/solidity"; +import { randomBytes, shuffled } from "@ethersproject/random"; +import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import * as RLP from "@ethersproject/rlp"; +import { computePublicKey, recoverPublicKey, SigningKey } from "@ethersproject/signing-key"; +import { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "@ethersproject/strings"; +import { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from "@ethersproject/transactions"; +import { commify, formatEther, parseEther, formatUnits, parseUnits } from "@ethersproject/units"; +import { verifyMessage, verifyTypedData } from "@ethersproject/wallet"; +import { _fetchData, fetchJson, poll } from "@ethersproject/web"; +//////////////////////// +// Enums +import { SupportedAlgorithm } from "@ethersproject/sha2"; +import { UnicodeNormalizationForm, Utf8ErrorReason } from "@ethersproject/strings"; +//////////////////////// +// Exports +export { AbiCoder, defaultAbiCoder, Fragment, ConstructorFragment, ErrorFragment, EventFragment, FunctionFragment, ParamType, FormatTypes, checkResultErrors, Logger, RLP, _fetchData, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, isBytes, isBytesLike, defaultPath, HDNode, SigningKey, Interface, LogDescription, TransactionDescription, base58, base64, hexlify, isHexString, hexConcat, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, _TypedDataEncoder, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, computeHmac, keccak256, ripemd160, sha256, sha512, randomBytes, shuffled, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, accessListify, parseTransaction, serializeTransaction, TransactionTypes, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, verifyTypedData, getAccountPath, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, +//////////////////////// +// Enums +SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Indexed }; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib.esm/utils.js.map b/node_modules/ethers/lib.esm/utils.js.map new file mode 100644 index 0000000..db166dd --- /dev/null +++ b/node_modules/ethers/lib.esm/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src.ts/utils.ts"],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AAS,EACT,IAAI,EAEJ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,WAAW,EAEX,QAAQ,EAER,MAAM,EACN,UAAU,EACV,OAAO,EAEP,OAAO,EACP,WAAW,EAEX,WAAW,EACX,MAAM,EACN,UAAU,EAEV,SAAS,EAET,cAAc,EACd,sBAAsB,EAEtB,MAAM,EACN,MAAM,EAEN,OAAO,EACP,WAAW,EACX,SAAS,EACT,aAAa,EACb,QAAQ,EACR,UAAU,EACV,aAAa,EACb,YAAY,EAEZ,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,cAAc,EAEd,mBAAmB,EACnB,kBAAkB,EAElB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,EAAE,EAEF,iBAAiB,EAEjB,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EAET,WAAW,EACX,UAAU,EAEV,WAAW,EACX,UAAU,EAEV,OAAO,EAEP,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,EAEN,WAAW,EACX,QAAQ,EAER,YAAY,EACZ,iBAAiB,EACjB,cAAc,EAEd,cAAc,EACd,aAAa,EAEb,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAEhB,oBAAoB,EAEpB,cAAc,EACd,cAAc,EAEd,gBAAgB,EAChB,gBAAgB,EAEhB,aAAa,EACb,eAAe,EAEf,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc;AAGd,wBAAwB;AACxB,QAAQ;AAER,kBAAkB,EAElB,wBAAwB,EACxB,eAAe,EAef,OAAO,EAgBV,CAAA"} \ No newline at end of file diff --git a/node_modules/ethers/lib/_version.d.ts b/node_modules/ethers/lib/_version.d.ts new file mode 100644 index 0000000..c13de58 --- /dev/null +++ b/node_modules/ethers/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "ethers/5.5.2"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib/_version.d.ts.map b/node_modules/ethers/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/node_modules/ethers/lib/_version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib/_version.js b/node_modules/ethers/lib/_version.js new file mode 100644 index 0000000..480f734 --- /dev/null +++ b/node_modules/ethers/lib/_version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +exports.version = "ethers/5.5.2"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib/_version.js.map b/node_modules/ethers/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/node_modules/ethers/lib/_version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib/ethers.d.ts b/node_modules/ethers/lib/ethers.d.ts new file mode 100644 index 0000000..2a4be97 --- /dev/null +++ b/node_modules/ethers/lib/ethers.d.ts @@ -0,0 +1,18 @@ +import { BaseContract, Contract, ContractFactory } from "@ethersproject/contracts"; +import { BigNumber, FixedNumber } from "@ethersproject/bignumber"; +import { Signer, VoidSigner } from "@ethersproject/abstract-signer"; +import { Wallet } from "@ethersproject/wallet"; +import * as constants from "@ethersproject/constants"; +import * as providers from "@ethersproject/providers"; +import { getDefaultProvider } from "@ethersproject/providers"; +import { Wordlist, wordlists } from "@ethersproject/wordlists"; +import * as utils from "./utils"; +import { ErrorCode as errors } from "@ethersproject/logger"; +import { BigNumberish } from "@ethersproject/bignumber"; +import { Bytes, BytesLike, Signature } from "@ethersproject/bytes"; +import { Transaction, UnsignedTransaction } from "@ethersproject/transactions"; +import { version } from "./_version"; +declare const logger: utils.Logger; +import { ContractFunction, ContractReceipt, ContractTransaction, Event, EventFilter, Overrides, PayableOverrides, CallOverrides, PopulatedTransaction, ContractInterface } from "@ethersproject/contracts"; +export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, BaseContract, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists, version, ContractFunction, ContractReceipt, ContractTransaction, Event, EventFilter, Overrides, PayableOverrides, CallOverrides, PopulatedTransaction, ContractInterface, BigNumberish, Bytes, BytesLike, Signature, Transaction, UnsignedTransaction, Wordlist }; +//# sourceMappingURL=ethers.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib/ethers.d.ts.map b/node_modules/ethers/lib/ethers.d.ts.map new file mode 100644 index 0000000..7806d60 --- /dev/null +++ b/node_modules/ethers/lib/ethers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,SAAS,IAAI,MAAM,EAAU,MAAM,uBAAuB,CAAC;AAKpE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAO/E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,QAAA,MAAM,MAAM,cAAsB,CAAC;AAKnC,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EAEnB,KAAK,EACL,WAAW,EAEX,SAAS,EACT,gBAAgB,EAChB,aAAa,EAEb,oBAAoB,EAEpB,iBAAiB,EACpB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EACH,MAAM,EAEN,MAAM,EACN,UAAU,EAEV,kBAAkB,EAClB,SAAS,EAET,YAAY,EACZ,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,WAAW,EAEX,SAAS,EACT,MAAM,EAEN,MAAM,EAEN,KAAK,EAEL,SAAS,EAMT,OAAO,EAMP,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,WAAW,EAEX,SAAS,EACT,gBAAgB,EAChB,aAAa,EAEb,oBAAoB,EAEpB,iBAAiB,EAEjB,YAAY,EAEZ,KAAK,EACL,SAAS,EAET,SAAS,EAET,WAAW,EACX,mBAAmB,EAEnB,QAAQ,EACX,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib/ethers.js b/node_modules/ethers/lib/ethers.js new file mode 100644 index 0000000..8faacbf --- /dev/null +++ b/node_modules/ethers/lib/ethers.js @@ -0,0 +1,55 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Wordlist = exports.version = exports.wordlists = exports.utils = exports.logger = exports.errors = exports.constants = exports.FixedNumber = exports.BigNumber = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.providers = exports.getDefaultProvider = exports.VoidSigner = exports.Wallet = exports.Signer = void 0; +var contracts_1 = require("@ethersproject/contracts"); +Object.defineProperty(exports, "BaseContract", { enumerable: true, get: function () { return contracts_1.BaseContract; } }); +Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return contracts_1.Contract; } }); +Object.defineProperty(exports, "ContractFactory", { enumerable: true, get: function () { return contracts_1.ContractFactory; } }); +var bignumber_1 = require("@ethersproject/bignumber"); +Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return bignumber_1.BigNumber; } }); +Object.defineProperty(exports, "FixedNumber", { enumerable: true, get: function () { return bignumber_1.FixedNumber; } }); +var abstract_signer_1 = require("@ethersproject/abstract-signer"); +Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return abstract_signer_1.Signer; } }); +Object.defineProperty(exports, "VoidSigner", { enumerable: true, get: function () { return abstract_signer_1.VoidSigner; } }); +var wallet_1 = require("@ethersproject/wallet"); +Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return wallet_1.Wallet; } }); +var constants = __importStar(require("@ethersproject/constants")); +exports.constants = constants; +var providers = __importStar(require("@ethersproject/providers")); +exports.providers = providers; +var providers_1 = require("@ethersproject/providers"); +Object.defineProperty(exports, "getDefaultProvider", { enumerable: true, get: function () { return providers_1.getDefaultProvider; } }); +var wordlists_1 = require("@ethersproject/wordlists"); +Object.defineProperty(exports, "Wordlist", { enumerable: true, get: function () { return wordlists_1.Wordlist; } }); +Object.defineProperty(exports, "wordlists", { enumerable: true, get: function () { return wordlists_1.wordlists; } }); +var utils = __importStar(require("./utils")); +exports.utils = utils; +var logger_1 = require("@ethersproject/logger"); +Object.defineProperty(exports, "errors", { enumerable: true, get: function () { return logger_1.ErrorCode; } }); +//////////////////////// +// Compile-Time Constants +// This is generated by "npm run dist" +var _version_1 = require("./_version"); +Object.defineProperty(exports, "version", { enumerable: true, get: function () { return _version_1.version; } }); +var logger = new logger_1.Logger(_version_1.version); +exports.logger = logger; +//# sourceMappingURL=ethers.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib/ethers.js.map b/node_modules/ethers/lib/ethers.js.map new file mode 100644 index 0000000..2b12d52 --- /dev/null +++ b/node_modules/ethers/lib/ethers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ethers.js","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;AAEb,sDAAmF;AAmE/E,6FAnEK,wBAAY,OAmEL;AACZ,yFApEmB,oBAAQ,OAoEnB;AACR,gGArE6B,2BAAe,OAqE7B;AAnEnB,sDAAkE;AAqE9D,0FArEK,qBAAS,OAqEL;AACT,4FAtEgB,uBAAW,OAsEhB;AApEf,kEAAoE;AAuDhE,uFAvDK,wBAAM,OAuDL;AAGN,2FA1Da,4BAAU,OA0Db;AAzDd,gDAA+C;AAwD3C,uFAxDK,eAAM,OAwDL;AAtDV,kEAAsD;AAmElD,8BAAS;AAjEb,kEAAsD;AAwDlD,8BAAS;AAvDb,sDAA8D;AAsD1D,mGAtDK,8BAAkB,OAsDL;AApDtB,sDAA8D;AAyG1D,yFAzGK,oBAAQ,OAyGL;AApCR,0FArEe,qBAAS,OAqEf;AAnEb,6CAAiC;AAiE7B,sBAAK;AA/DT,gDAAoE;AA2DhE,uFA3DkB,kBAAM,OA2DlB;AAjDV,wBAAwB;AACxB,yBAAyB;AAEzB,sCAAsC;AACtC,uCAAqC;AAyDjC,wFAzDK,kBAAO,OAyDL;AAvDX,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AA6C/B,wBAAM"} \ No newline at end of file diff --git a/node_modules/ethers/lib/index.d.ts b/node_modules/ethers/lib/index.d.ts new file mode 100644 index 0000000..bc4d019 --- /dev/null +++ b/node_modules/ethers/lib/index.d.ts @@ -0,0 +1,4 @@ +import * as ethers from "./ethers"; +export { ethers }; +export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, BaseContract, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists, version, ContractFunction, ContractReceipt, ContractTransaction, Event, EventFilter, Overrides, PayableOverrides, CallOverrides, PopulatedTransaction, ContractInterface, BigNumberish, Bytes, BytesLike, Signature, Transaction, UnsignedTransaction, Wordlist } from "./ethers"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib/index.d.ts.map b/node_modules/ethers/lib/index.d.ts.map new file mode 100644 index 0000000..a448742 --- /dev/null +++ b/node_modules/ethers/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAUnC,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EACH,MAAM,EAEN,MAAM,EACN,UAAU,EAEV,kBAAkB,EAClB,SAAS,EAET,YAAY,EACZ,QAAQ,EACR,eAAe,EAEf,SAAS,EACT,WAAW,EAEX,SAAS,EACT,MAAM,EAEN,MAAM,EAEN,KAAK,EAEL,SAAS,EAMT,OAAO,EAMP,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,WAAW,EAEX,SAAS,EACT,gBAAgB,EAChB,aAAa,EAEb,oBAAoB,EAEpB,iBAAiB,EAEjB,YAAY,EAEZ,KAAK,EACL,SAAS,EAET,SAAS,EAET,WAAW,EACX,mBAAmB,EAEnB,QAAQ,EACX,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/ethers/lib/index.js b/node_modules/ethers/lib/index.js new file mode 100644 index 0000000..7930b07 --- /dev/null +++ b/node_modules/ethers/lib/index.js @@ -0,0 +1,53 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Wordlist = exports.version = exports.wordlists = exports.utils = exports.logger = exports.errors = exports.constants = exports.FixedNumber = exports.BigNumber = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.providers = exports.getDefaultProvider = exports.VoidSigner = exports.Wallet = exports.Signer = exports.ethers = void 0; +// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js +var ethers = __importStar(require("./ethers")); +exports.ethers = ethers; +try { + var anyGlobal = window; + if (anyGlobal._ethers == null) { + anyGlobal._ethers = ethers; + } +} +catch (error) { } +var ethers_1 = require("./ethers"); +Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return ethers_1.Signer; } }); +Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return ethers_1.Wallet; } }); +Object.defineProperty(exports, "VoidSigner", { enumerable: true, get: function () { return ethers_1.VoidSigner; } }); +Object.defineProperty(exports, "getDefaultProvider", { enumerable: true, get: function () { return ethers_1.getDefaultProvider; } }); +Object.defineProperty(exports, "providers", { enumerable: true, get: function () { return ethers_1.providers; } }); +Object.defineProperty(exports, "BaseContract", { enumerable: true, get: function () { return ethers_1.BaseContract; } }); +Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return ethers_1.Contract; } }); +Object.defineProperty(exports, "ContractFactory", { enumerable: true, get: function () { return ethers_1.ContractFactory; } }); +Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return ethers_1.BigNumber; } }); +Object.defineProperty(exports, "FixedNumber", { enumerable: true, get: function () { return ethers_1.FixedNumber; } }); +Object.defineProperty(exports, "constants", { enumerable: true, get: function () { return ethers_1.constants; } }); +Object.defineProperty(exports, "errors", { enumerable: true, get: function () { return ethers_1.errors; } }); +Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return ethers_1.logger; } }); +Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return ethers_1.utils; } }); +Object.defineProperty(exports, "wordlists", { enumerable: true, get: function () { return ethers_1.wordlists; } }); +//////////////////////// +// Compile-Time Constants +Object.defineProperty(exports, "version", { enumerable: true, get: function () { return ethers_1.version; } }); +Object.defineProperty(exports, "Wordlist", { enumerable: true, get: function () { return ethers_1.Wordlist; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib/index.js.map b/node_modules/ethers/lib/index.js.map new file mode 100644 index 0000000..d10f5ed --- /dev/null +++ b/node_modules/ethers/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;AAEb,+EAA+E;AAE/E,+CAAmC;AAU1B,wBAAM;AARf,IAAI;IACA,IAAM,SAAS,GAAI,MAAc,CAAC;IAElC,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,EAAE;QAC3B,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;KAC9B;CACJ;AAAC,OAAO,KAAK,EAAE,GAAG;AAInB,mCA4DkB;AA3Dd,gGAAA,MAAM,OAAA;AAEN,gGAAA,MAAM,OAAA;AACN,oGAAA,UAAU,OAAA;AAEV,4GAAA,kBAAkB,OAAA;AAClB,mGAAA,SAAS,OAAA;AAET,sGAAA,YAAY,OAAA;AACZ,kGAAA,QAAQ,OAAA;AACR,yGAAA,eAAe,OAAA;AAEf,mGAAA,SAAS,OAAA;AACT,qGAAA,WAAW,OAAA;AAEX,mGAAA,SAAS,OAAA;AACT,gGAAA,MAAM,OAAA;AAEN,gGAAA,MAAM,OAAA;AAEN,+FAAA,KAAK,OAAA;AAEL,mGAAA,SAAS,OAAA;AAGT,wBAAwB;AACxB,yBAAyB;AAEzB,iGAAA,OAAO,OAAA;AA8BP,kGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/node_modules/ethers/lib/utils.d.ts b/node_modules/ethers/lib/utils.d.ts new file mode 100644 index 0000000..c735889 --- /dev/null +++ b/node_modules/ethers/lib/utils.d.ts @@ -0,0 +1,34 @@ +import { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription } from "@ethersproject/abi"; +import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address"; +import * as base64 from "@ethersproject/base64"; +import { Base58 as base58 } from "@ethersproject/basex"; +import { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes"; +import { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from "@ethersproject/hash"; +import { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode"; +import { getJsonWalletAddress } from "@ethersproject/json-wallets"; +import { keccak256 } from "@ethersproject/keccak256"; +import { Logger } from "@ethersproject/logger"; +import { computeHmac, ripemd160, sha256, sha512 } from "@ethersproject/sha2"; +import { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from "@ethersproject/solidity"; +import { randomBytes, shuffled } from "@ethersproject/random"; +import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import * as RLP from "@ethersproject/rlp"; +import { computePublicKey, recoverPublicKey, SigningKey } from "@ethersproject/signing-key"; +import { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "@ethersproject/strings"; +import { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from "@ethersproject/transactions"; +import { commify, formatEther, parseEther, formatUnits, parseUnits } from "@ethersproject/units"; +import { verifyMessage, verifyTypedData } from "@ethersproject/wallet"; +import { _fetchData, fetchJson, poll } from "@ethersproject/web"; +import { SupportedAlgorithm } from "@ethersproject/sha2"; +import { UnicodeNormalizationForm, Utf8ErrorReason } from "@ethersproject/strings"; +import { UnsignedTransaction } from "@ethersproject/transactions"; +import { CoerceFunc } from "@ethersproject/abi"; +import { Bytes, BytesLike, Hexable } from "@ethersproject/bytes"; +import { Mnemonic } from "@ethersproject/hdnode"; +import { EncryptOptions, ProgressCallback } from "@ethersproject/json-wallets"; +import { Deferrable } from "@ethersproject/properties"; +import { Utf8ErrorFunc } from "@ethersproject/strings"; +import { AccessList, AccessListish } from "@ethersproject/transactions"; +import { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from "@ethersproject/web"; +export { AbiCoder, defaultAbiCoder, Fragment, ConstructorFragment, ErrorFragment, EventFragment, FunctionFragment, ParamType, FormatTypes, checkResultErrors, Result, Logger, RLP, _fetchData, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, isBytes, isBytesLike, defaultPath, HDNode, SigningKey, Interface, LogDescription, TransactionDescription, base58, base64, hexlify, isHexString, hexConcat, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, _TypedDataEncoder, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, computeHmac, keccak256, ripemd160, sha256, sha512, randomBytes, shuffled, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, accessListify, parseTransaction, serializeTransaction, TransactionTypes, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, verifyTypedData, getAccountPath, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Bytes, BytesLike, Hexable, AccessList, AccessListish, UnsignedTransaction, CoerceFunc, Indexed, Mnemonic, Deferrable, Utf8ErrorFunc, ConnectionInfo, OnceBlockable, OncePollable, PollOptions, FetchJsonResponse, EncryptOptions, ProgressCallback }; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/ethers/lib/utils.d.ts.map b/node_modules/ethers/lib/utils.d.ts.map new file mode 100644 index 0000000..9b9cd60 --- /dev/null +++ b/node_modules/ethers/lib/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,cA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B,aAAa,EACb,eAAe,EAEf,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EAMd,kBAAkB,EAElB,wBAAwB,EACxB,eAAe,EAKf,KAAK,EACL,SAAS,EACT,OAAO,EAEP,UAAU,EACV,aAAa,EACb,mBAAmB,EAEnB,UAAU,EAEV,OAAO,EAEP,QAAQ,EAER,UAAU,EAEV,aAAa,EAEb,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,EAEjB,cAAc,EACd,gBAAgB,EACnB,CAAA"} \ No newline at end of file diff --git a/node_modules/ethers/lib/utils.js b/node_modules/ethers/lib/utils.js new file mode 100644 index 0000000..62fd8d8 --- /dev/null +++ b/node_modules/ethers/lib/utils.js @@ -0,0 +1,147 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatBytes32String = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports._toEscapedUtf8String = exports.nameprep = exports.hexDataSlice = exports.hexDataLength = exports.hexZeroPad = exports.hexValue = exports.hexStripZeros = exports.hexConcat = exports.isHexString = exports.hexlify = exports.base64 = exports.base58 = exports.TransactionDescription = exports.LogDescription = exports.Interface = exports.SigningKey = exports.HDNode = exports.defaultPath = exports.isBytesLike = exports.isBytes = exports.zeroPad = exports.stripZeros = exports.concat = exports.arrayify = exports.shallowCopy = exports.resolveProperties = exports.getStatic = exports.defineReadOnly = exports.deepCopy = exports.checkProperties = exports.poll = exports.fetchJson = exports._fetchData = exports.RLP = exports.Logger = exports.checkResultErrors = exports.FormatTypes = exports.ParamType = exports.FunctionFragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = exports.Fragment = exports.defaultAbiCoder = exports.AbiCoder = void 0; +exports.Indexed = exports.Utf8ErrorReason = exports.UnicodeNormalizationForm = exports.SupportedAlgorithm = exports.mnemonicToSeed = exports.isValidMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.getAccountPath = exports.verifyTypedData = exports.verifyMessage = exports.recoverPublicKey = exports.computePublicKey = exports.recoverAddress = exports.computeAddress = exports.getJsonWalletAddress = exports.TransactionTypes = exports.serializeTransaction = exports.parseTransaction = exports.accessListify = exports.joinSignature = exports.splitSignature = exports.soliditySha256 = exports.solidityKeccak256 = exports.solidityPack = exports.shuffled = exports.randomBytes = exports.sha512 = exports.sha256 = exports.ripemd160 = exports.keccak256 = exports.computeHmac = exports.commify = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.isAddress = exports.getCreate2Address = exports.getContractAddress = exports.getIcapAddress = exports.getAddress = exports._TypedDataEncoder = exports.id = exports.isValidName = exports.namehash = exports.hashMessage = exports.parseBytes32String = void 0; +var abi_1 = require("@ethersproject/abi"); +Object.defineProperty(exports, "AbiCoder", { enumerable: true, get: function () { return abi_1.AbiCoder; } }); +Object.defineProperty(exports, "checkResultErrors", { enumerable: true, get: function () { return abi_1.checkResultErrors; } }); +Object.defineProperty(exports, "ConstructorFragment", { enumerable: true, get: function () { return abi_1.ConstructorFragment; } }); +Object.defineProperty(exports, "defaultAbiCoder", { enumerable: true, get: function () { return abi_1.defaultAbiCoder; } }); +Object.defineProperty(exports, "ErrorFragment", { enumerable: true, get: function () { return abi_1.ErrorFragment; } }); +Object.defineProperty(exports, "EventFragment", { enumerable: true, get: function () { return abi_1.EventFragment; } }); +Object.defineProperty(exports, "FormatTypes", { enumerable: true, get: function () { return abi_1.FormatTypes; } }); +Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return abi_1.Fragment; } }); +Object.defineProperty(exports, "FunctionFragment", { enumerable: true, get: function () { return abi_1.FunctionFragment; } }); +Object.defineProperty(exports, "Indexed", { enumerable: true, get: function () { return abi_1.Indexed; } }); +Object.defineProperty(exports, "Interface", { enumerable: true, get: function () { return abi_1.Interface; } }); +Object.defineProperty(exports, "LogDescription", { enumerable: true, get: function () { return abi_1.LogDescription; } }); +Object.defineProperty(exports, "ParamType", { enumerable: true, get: function () { return abi_1.ParamType; } }); +Object.defineProperty(exports, "TransactionDescription", { enumerable: true, get: function () { return abi_1.TransactionDescription; } }); +var address_1 = require("@ethersproject/address"); +Object.defineProperty(exports, "getAddress", { enumerable: true, get: function () { return address_1.getAddress; } }); +Object.defineProperty(exports, "getCreate2Address", { enumerable: true, get: function () { return address_1.getCreate2Address; } }); +Object.defineProperty(exports, "getContractAddress", { enumerable: true, get: function () { return address_1.getContractAddress; } }); +Object.defineProperty(exports, "getIcapAddress", { enumerable: true, get: function () { return address_1.getIcapAddress; } }); +Object.defineProperty(exports, "isAddress", { enumerable: true, get: function () { return address_1.isAddress; } }); +var base64 = __importStar(require("@ethersproject/base64")); +exports.base64 = base64; +var basex_1 = require("@ethersproject/basex"); +Object.defineProperty(exports, "base58", { enumerable: true, get: function () { return basex_1.Base58; } }); +var bytes_1 = require("@ethersproject/bytes"); +Object.defineProperty(exports, "arrayify", { enumerable: true, get: function () { return bytes_1.arrayify; } }); +Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return bytes_1.concat; } }); +Object.defineProperty(exports, "hexConcat", { enumerable: true, get: function () { return bytes_1.hexConcat; } }); +Object.defineProperty(exports, "hexDataSlice", { enumerable: true, get: function () { return bytes_1.hexDataSlice; } }); +Object.defineProperty(exports, "hexDataLength", { enumerable: true, get: function () { return bytes_1.hexDataLength; } }); +Object.defineProperty(exports, "hexlify", { enumerable: true, get: function () { return bytes_1.hexlify; } }); +Object.defineProperty(exports, "hexStripZeros", { enumerable: true, get: function () { return bytes_1.hexStripZeros; } }); +Object.defineProperty(exports, "hexValue", { enumerable: true, get: function () { return bytes_1.hexValue; } }); +Object.defineProperty(exports, "hexZeroPad", { enumerable: true, get: function () { return bytes_1.hexZeroPad; } }); +Object.defineProperty(exports, "isBytes", { enumerable: true, get: function () { return bytes_1.isBytes; } }); +Object.defineProperty(exports, "isBytesLike", { enumerable: true, get: function () { return bytes_1.isBytesLike; } }); +Object.defineProperty(exports, "isHexString", { enumerable: true, get: function () { return bytes_1.isHexString; } }); +Object.defineProperty(exports, "joinSignature", { enumerable: true, get: function () { return bytes_1.joinSignature; } }); +Object.defineProperty(exports, "zeroPad", { enumerable: true, get: function () { return bytes_1.zeroPad; } }); +Object.defineProperty(exports, "splitSignature", { enumerable: true, get: function () { return bytes_1.splitSignature; } }); +Object.defineProperty(exports, "stripZeros", { enumerable: true, get: function () { return bytes_1.stripZeros; } }); +var hash_1 = require("@ethersproject/hash"); +Object.defineProperty(exports, "_TypedDataEncoder", { enumerable: true, get: function () { return hash_1._TypedDataEncoder; } }); +Object.defineProperty(exports, "hashMessage", { enumerable: true, get: function () { return hash_1.hashMessage; } }); +Object.defineProperty(exports, "id", { enumerable: true, get: function () { return hash_1.id; } }); +Object.defineProperty(exports, "isValidName", { enumerable: true, get: function () { return hash_1.isValidName; } }); +Object.defineProperty(exports, "namehash", { enumerable: true, get: function () { return hash_1.namehash; } }); +var hdnode_1 = require("@ethersproject/hdnode"); +Object.defineProperty(exports, "defaultPath", { enumerable: true, get: function () { return hdnode_1.defaultPath; } }); +Object.defineProperty(exports, "entropyToMnemonic", { enumerable: true, get: function () { return hdnode_1.entropyToMnemonic; } }); +Object.defineProperty(exports, "getAccountPath", { enumerable: true, get: function () { return hdnode_1.getAccountPath; } }); +Object.defineProperty(exports, "HDNode", { enumerable: true, get: function () { return hdnode_1.HDNode; } }); +Object.defineProperty(exports, "isValidMnemonic", { enumerable: true, get: function () { return hdnode_1.isValidMnemonic; } }); +Object.defineProperty(exports, "mnemonicToEntropy", { enumerable: true, get: function () { return hdnode_1.mnemonicToEntropy; } }); +Object.defineProperty(exports, "mnemonicToSeed", { enumerable: true, get: function () { return hdnode_1.mnemonicToSeed; } }); +var json_wallets_1 = require("@ethersproject/json-wallets"); +Object.defineProperty(exports, "getJsonWalletAddress", { enumerable: true, get: function () { return json_wallets_1.getJsonWalletAddress; } }); +var keccak256_1 = require("@ethersproject/keccak256"); +Object.defineProperty(exports, "keccak256", { enumerable: true, get: function () { return keccak256_1.keccak256; } }); +var logger_1 = require("@ethersproject/logger"); +Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } }); +var sha2_1 = require("@ethersproject/sha2"); +Object.defineProperty(exports, "computeHmac", { enumerable: true, get: function () { return sha2_1.computeHmac; } }); +Object.defineProperty(exports, "ripemd160", { enumerable: true, get: function () { return sha2_1.ripemd160; } }); +Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha2_1.sha256; } }); +Object.defineProperty(exports, "sha512", { enumerable: true, get: function () { return sha2_1.sha512; } }); +var solidity_1 = require("@ethersproject/solidity"); +Object.defineProperty(exports, "solidityKeccak256", { enumerable: true, get: function () { return solidity_1.keccak256; } }); +Object.defineProperty(exports, "solidityPack", { enumerable: true, get: function () { return solidity_1.pack; } }); +Object.defineProperty(exports, "soliditySha256", { enumerable: true, get: function () { return solidity_1.sha256; } }); +var random_1 = require("@ethersproject/random"); +Object.defineProperty(exports, "randomBytes", { enumerable: true, get: function () { return random_1.randomBytes; } }); +Object.defineProperty(exports, "shuffled", { enumerable: true, get: function () { return random_1.shuffled; } }); +var properties_1 = require("@ethersproject/properties"); +Object.defineProperty(exports, "checkProperties", { enumerable: true, get: function () { return properties_1.checkProperties; } }); +Object.defineProperty(exports, "deepCopy", { enumerable: true, get: function () { return properties_1.deepCopy; } }); +Object.defineProperty(exports, "defineReadOnly", { enumerable: true, get: function () { return properties_1.defineReadOnly; } }); +Object.defineProperty(exports, "getStatic", { enumerable: true, get: function () { return properties_1.getStatic; } }); +Object.defineProperty(exports, "resolveProperties", { enumerable: true, get: function () { return properties_1.resolveProperties; } }); +Object.defineProperty(exports, "shallowCopy", { enumerable: true, get: function () { return properties_1.shallowCopy; } }); +var RLP = __importStar(require("@ethersproject/rlp")); +exports.RLP = RLP; +var signing_key_1 = require("@ethersproject/signing-key"); +Object.defineProperty(exports, "computePublicKey", { enumerable: true, get: function () { return signing_key_1.computePublicKey; } }); +Object.defineProperty(exports, "recoverPublicKey", { enumerable: true, get: function () { return signing_key_1.recoverPublicKey; } }); +Object.defineProperty(exports, "SigningKey", { enumerable: true, get: function () { return signing_key_1.SigningKey; } }); +var strings_1 = require("@ethersproject/strings"); +Object.defineProperty(exports, "formatBytes32String", { enumerable: true, get: function () { return strings_1.formatBytes32String; } }); +Object.defineProperty(exports, "nameprep", { enumerable: true, get: function () { return strings_1.nameprep; } }); +Object.defineProperty(exports, "parseBytes32String", { enumerable: true, get: function () { return strings_1.parseBytes32String; } }); +Object.defineProperty(exports, "_toEscapedUtf8String", { enumerable: true, get: function () { return strings_1._toEscapedUtf8String; } }); +Object.defineProperty(exports, "toUtf8Bytes", { enumerable: true, get: function () { return strings_1.toUtf8Bytes; } }); +Object.defineProperty(exports, "toUtf8CodePoints", { enumerable: true, get: function () { return strings_1.toUtf8CodePoints; } }); +Object.defineProperty(exports, "toUtf8String", { enumerable: true, get: function () { return strings_1.toUtf8String; } }); +Object.defineProperty(exports, "Utf8ErrorFuncs", { enumerable: true, get: function () { return strings_1.Utf8ErrorFuncs; } }); +var transactions_1 = require("@ethersproject/transactions"); +Object.defineProperty(exports, "accessListify", { enumerable: true, get: function () { return transactions_1.accessListify; } }); +Object.defineProperty(exports, "computeAddress", { enumerable: true, get: function () { return transactions_1.computeAddress; } }); +Object.defineProperty(exports, "parseTransaction", { enumerable: true, get: function () { return transactions_1.parse; } }); +Object.defineProperty(exports, "recoverAddress", { enumerable: true, get: function () { return transactions_1.recoverAddress; } }); +Object.defineProperty(exports, "serializeTransaction", { enumerable: true, get: function () { return transactions_1.serialize; } }); +Object.defineProperty(exports, "TransactionTypes", { enumerable: true, get: function () { return transactions_1.TransactionTypes; } }); +var units_1 = require("@ethersproject/units"); +Object.defineProperty(exports, "commify", { enumerable: true, get: function () { return units_1.commify; } }); +Object.defineProperty(exports, "formatEther", { enumerable: true, get: function () { return units_1.formatEther; } }); +Object.defineProperty(exports, "parseEther", { enumerable: true, get: function () { return units_1.parseEther; } }); +Object.defineProperty(exports, "formatUnits", { enumerable: true, get: function () { return units_1.formatUnits; } }); +Object.defineProperty(exports, "parseUnits", { enumerable: true, get: function () { return units_1.parseUnits; } }); +var wallet_1 = require("@ethersproject/wallet"); +Object.defineProperty(exports, "verifyMessage", { enumerable: true, get: function () { return wallet_1.verifyMessage; } }); +Object.defineProperty(exports, "verifyTypedData", { enumerable: true, get: function () { return wallet_1.verifyTypedData; } }); +var web_1 = require("@ethersproject/web"); +Object.defineProperty(exports, "_fetchData", { enumerable: true, get: function () { return web_1._fetchData; } }); +Object.defineProperty(exports, "fetchJson", { enumerable: true, get: function () { return web_1.fetchJson; } }); +Object.defineProperty(exports, "poll", { enumerable: true, get: function () { return web_1.poll; } }); +//////////////////////// +// Enums +var sha2_2 = require("@ethersproject/sha2"); +Object.defineProperty(exports, "SupportedAlgorithm", { enumerable: true, get: function () { return sha2_2.SupportedAlgorithm; } }); +var strings_2 = require("@ethersproject/strings"); +Object.defineProperty(exports, "UnicodeNormalizationForm", { enumerable: true, get: function () { return strings_2.UnicodeNormalizationForm; } }); +Object.defineProperty(exports, "Utf8ErrorReason", { enumerable: true, get: function () { return strings_2.Utf8ErrorReason; } }); +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/ethers/lib/utils.js.map b/node_modules/ethers/lib/utils.js.map new file mode 100644 index 0000000..89686c0 --- /dev/null +++ b/node_modules/ethers/lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAEb,0CAA4P;AA6CxP,yFA7CK,cAAQ,OA6CL;AAWR,kGAxDe,uBAAiB,OAwDf;AAPjB,oGAjDkC,yBAAmB,OAiDlC;AAHnB,gGA9CuD,qBAAe,OA8CvD;AAIf,8FAlDwE,mBAAa,OAkDxE;AACb,8FAnDuF,mBAAa,OAmDvF;AAGb,4FAtDsG,iBAAW,OAsDtG;AANX,yFAhDmH,cAAQ,OAgDnH;AAIR,iGApD6H,sBAAgB,OAoD7H;AA+IhB,wFAnM+I,aAAO,OAmM/I;AA5GP,0FAvFwJ,eAAS,OAuFxJ;AAET,+FAzFmK,oBAAc,OAyFnK;AApCd,0FArDmL,eAAS,OAqDnL;AAqCT,uGA1FsM,4BAAsB,OA0FtM;AAzF1B,kDAAsH;AAwHlH,2FAxHK,oBAAU,OAwHL;AAGV,kGA3HiB,2BAAiB,OA2HjB;AADjB,mGA1HoC,4BAAkB,OA0HpC;AADlB,+FAzHwD,wBAAc,OAyHxD;AAGd,0FA5HwE,mBAAS,OA4HxE;AA3Hb,4DAAgD;AA2F5C,wBAAM;AA1FV,8CAAwD;AAyFpD,uFAzFe,cAAM,OAyFf;AAxFV,8CAAqO;AAsEjO,yFAtEK,gBAAQ,OAsEL;AAER,uFAxEe,cAAM,OAwEf;AAqBN,0FA7FuB,iBAAS,OA6FvB;AAKT,6FAlGkC,oBAAY,OAkGlC;AADZ,8FAjGgD,qBAAa,OAiGhD;AANb,wFA3F+D,eAAO,OA2F/D;AAGP,8FA9FwE,qBAAa,OA8FxE;AACb,yFA/FuF,gBAAQ,OA+FvF;AACR,2FAhGiG,kBAAU,OAgGjG;AApBV,wFA5E6G,eAAO,OA4E7G;AACP,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0000000..1da1037 --- /dev/null +++ b/node_modules/ethers/package.json @@ -0,0 +1,69 @@ +{ + "author": "Richard Moore ", + "browser-old": "./dist/ethers.umd.js", + "dependencies": { + "@ethersproject/abi": "5.5.0", + "@ethersproject/abstract-provider": "5.5.1", + "@ethersproject/abstract-signer": "5.5.0", + "@ethersproject/address": "5.5.0", + "@ethersproject/base64": "5.5.0", + "@ethersproject/basex": "5.5.0", + "@ethersproject/bignumber": "5.5.0", + "@ethersproject/bytes": "5.5.0", + "@ethersproject/constants": "5.5.0", + "@ethersproject/contracts": "5.5.0", + "@ethersproject/hash": "5.5.0", + "@ethersproject/hdnode": "5.5.0", + "@ethersproject/json-wallets": "5.5.0", + "@ethersproject/keccak256": "5.5.0", + "@ethersproject/logger": "5.5.0", + "@ethersproject/networks": "5.5.1", + "@ethersproject/pbkdf2": "5.5.0", + "@ethersproject/properties": "5.5.0", + "@ethersproject/providers": "5.5.1", + "@ethersproject/random": "5.5.0", + "@ethersproject/rlp": "5.5.0", + "@ethersproject/sha2": "5.5.0", + "@ethersproject/signing-key": "5.5.0", + "@ethersproject/solidity": "5.5.0", + "@ethersproject/strings": "5.5.0", + "@ethersproject/transactions": "5.5.0", + "@ethersproject/units": "5.5.0", + "@ethersproject/wallet": "5.5.0", + "@ethersproject/web": "5.5.1", + "@ethersproject/wordlists": "5.5.0" + }, + "description": "Umbrella package for most common Ethers libraries.", + "ethereum": "donations.ethers.eth", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "gitHead": "eb432aa1f44ad2cc268d000b266eae9b03db1d17", + "keywords": [ + "Ethereum", + "ethers" + ], + "license": "MIT", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "name": "ethers", + "repository": { + "directory": "packages/ethers", + "type": "git", + "url": "git://github.com/ethers-io/ethers.js.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "sideEffects": false, + "tarballHash": "0x6b19578e1576908fc0e3fb2e953c3b2110f7d272911a109e6628f58536b0ff47", + "types": "./lib/index.d.ts", + "version": "5.5.2" +} diff --git a/node_modules/ethers/src.ts/_version.ts b/node_modules/ethers/src.ts/_version.ts new file mode 100644 index 0000000..c86432f --- /dev/null +++ b/node_modules/ethers/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "ethers/5.5.2"; diff --git a/node_modules/ethers/src.ts/ethers.ts b/node_modules/ethers/src.ts/ethers.ts new file mode 100644 index 0000000..f192c6d --- /dev/null +++ b/node_modules/ethers/src.ts/ethers.ts @@ -0,0 +1,122 @@ +"use strict"; + +import { BaseContract, Contract, ContractFactory } from "@ethersproject/contracts"; + +import { BigNumber, FixedNumber } from "@ethersproject/bignumber"; + +import { Signer, VoidSigner } from "@ethersproject/abstract-signer"; +import { Wallet } from "@ethersproject/wallet"; + +import * as constants from "@ethersproject/constants"; + +import * as providers from "@ethersproject/providers"; +import { getDefaultProvider } from "@ethersproject/providers"; + +import { Wordlist, wordlists} from "@ethersproject/wordlists"; + +import * as utils from "./utils"; + +import { ErrorCode as errors, Logger } from "@ethersproject/logger"; + +//////////////////////// +// Types + +import { BigNumberish } from "@ethersproject/bignumber"; +import { Bytes, BytesLike, Signature } from "@ethersproject/bytes"; +import { Transaction, UnsignedTransaction } from "@ethersproject/transactions"; + + +//////////////////////// +// Compile-Time Constants + +// This is generated by "npm run dist" +import { version } from "./_version"; + +const logger = new Logger(version); + +//////////////////////// +// Types + +import { + ContractFunction, + ContractReceipt, + ContractTransaction, + + Event, + EventFilter, + + Overrides, + PayableOverrides, + CallOverrides, + + PopulatedTransaction, + + ContractInterface +} from "@ethersproject/contracts"; + + +//////////////////////// +// Exports + +export { + Signer, + + Wallet, + VoidSigner, + + getDefaultProvider, + providers, + + BaseContract, + Contract, + ContractFactory, + + BigNumber, + FixedNumber, + + constants, + errors, + + logger, + + utils, + + wordlists, + + + //////////////////////// + // Compile-Time Constants + + version, + + + //////////////////////// + // Types + + ContractFunction, + ContractReceipt, + ContractTransaction, + Event, + EventFilter, + + Overrides, + PayableOverrides, + CallOverrides, + + PopulatedTransaction, + + ContractInterface, + + BigNumberish, + + Bytes, + BytesLike, + + Signature, + + Transaction, + UnsignedTransaction, + + Wordlist +}; + diff --git a/node_modules/ethers/src.ts/index.ts b/node_modules/ethers/src.ts/index.ts new file mode 100644 index 0000000..b1071dd --- /dev/null +++ b/node_modules/ethers/src.ts/index.ts @@ -0,0 +1,77 @@ +"use strict"; + +// To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js + +import * as ethers from "./ethers"; + +try { + const anyGlobal = (window as any); + + if (anyGlobal._ethers == null) { + anyGlobal._ethers = ethers; + } +} catch (error) { } + +export { ethers }; + +export { + Signer, + + Wallet, + VoidSigner, + + getDefaultProvider, + providers, + + BaseContract, + Contract, + ContractFactory, + + BigNumber, + FixedNumber, + + constants, + errors, + + logger, + + utils, + + wordlists, + + + //////////////////////// + // Compile-Time Constants + + version, + + + //////////////////////// + // Types + + ContractFunction, + ContractReceipt, + ContractTransaction, + Event, + EventFilter, + + Overrides, + PayableOverrides, + CallOverrides, + + PopulatedTransaction, + + ContractInterface, + + BigNumberish, + + Bytes, + BytesLike, + + Signature, + + Transaction, + UnsignedTransaction, + + Wordlist +} from "./ethers"; diff --git a/node_modules/ethers/src.ts/utils.ts b/node_modules/ethers/src.ts/utils.ts new file mode 100644 index 0000000..7a4de87 --- /dev/null +++ b/node_modules/ethers/src.ts/utils.ts @@ -0,0 +1,215 @@ +"use strict"; + +import { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription }from "@ethersproject/abi"; +import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address"; +import * as base64 from "@ethersproject/base64"; +import { Base58 as base58 } from "@ethersproject/basex"; +import { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes"; +import { _TypedDataEncoder, hashMessage, id, isValidName, namehash } from "@ethersproject/hash"; +import { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode"; +import { getJsonWalletAddress } from "@ethersproject/json-wallets"; +import { keccak256 } from "@ethersproject/keccak256"; +import { Logger } from "@ethersproject/logger"; +import { computeHmac, ripemd160, sha256, sha512 } from "@ethersproject/sha2"; +import { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from "@ethersproject/solidity"; +import { randomBytes, shuffled } from "@ethersproject/random"; +import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@ethersproject/properties"; +import * as RLP from "@ethersproject/rlp"; +import { computePublicKey, recoverPublicKey, SigningKey } from "@ethersproject/signing-key"; +import { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "@ethersproject/strings"; +import { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from "@ethersproject/transactions"; +import { commify, formatEther, parseEther, formatUnits, parseUnits } from "@ethersproject/units"; +import { verifyMessage, verifyTypedData } from "@ethersproject/wallet"; +import { _fetchData, fetchJson, poll } from "@ethersproject/web"; + +//////////////////////// +// Enums + +import { SupportedAlgorithm } from "@ethersproject/sha2"; +import { UnicodeNormalizationForm, Utf8ErrorReason } from "@ethersproject/strings"; +import { UnsignedTransaction } from "@ethersproject/transactions"; + +//////////////////////// +// Types and Interfaces + +import { CoerceFunc } from "@ethersproject/abi"; +import { Bytes, BytesLike, Hexable } from "@ethersproject/bytes" +import { Mnemonic } from "@ethersproject/hdnode"; +import { EncryptOptions, ProgressCallback } from "@ethersproject/json-wallets"; +import { Deferrable } from "@ethersproject/properties"; +import { Utf8ErrorFunc } from "@ethersproject/strings"; +import { AccessList, AccessListish } from "@ethersproject/transactions"; +import { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from "@ethersproject/web"; + +//////////////////////// +// Exports + +export { + AbiCoder, + defaultAbiCoder, + + Fragment, + ConstructorFragment, + ErrorFragment, + EventFragment, + FunctionFragment, + ParamType, + FormatTypes, + + checkResultErrors, + Result, + + Logger, + + RLP, + + _fetchData, + fetchJson, + poll, + + checkProperties, + deepCopy, + defineReadOnly, + getStatic, + resolveProperties, + shallowCopy, + + arrayify, + + concat, + stripZeros, + zeroPad, + + isBytes, + isBytesLike, + + defaultPath, + HDNode, + SigningKey, + + Interface, + + LogDescription, + TransactionDescription, + + base58, + base64, + + hexlify, + isHexString, + hexConcat, + hexStripZeros, + hexValue, + hexZeroPad, + hexDataLength, + hexDataSlice, + + nameprep, + _toEscapedUtf8String, + toUtf8Bytes, + toUtf8CodePoints, + toUtf8String, + Utf8ErrorFuncs, + + formatBytes32String, + parseBytes32String, + + hashMessage, + namehash, + isValidName, + id, + + _TypedDataEncoder, + + getAddress, + getIcapAddress, + getContractAddress, + getCreate2Address, + isAddress, + + formatEther, + parseEther, + + formatUnits, + parseUnits, + + commify, + + computeHmac, + keccak256, + ripemd160, + sha256, + sha512, + + randomBytes, + shuffled, + + solidityPack, + solidityKeccak256, + soliditySha256, + + splitSignature, + joinSignature, + + accessListify, + parseTransaction, + serializeTransaction, + TransactionTypes, + + getJsonWalletAddress, + + computeAddress, + recoverAddress, + + computePublicKey, + recoverPublicKey, + + verifyMessage, + verifyTypedData, + + getAccountPath, + mnemonicToEntropy, + entropyToMnemonic, + isValidMnemonic, + mnemonicToSeed, + + + //////////////////////// + // Enums + + SupportedAlgorithm, + + UnicodeNormalizationForm, + Utf8ErrorReason, + + //////////////////////// + // Types + + Bytes, + BytesLike, + Hexable, + + AccessList, + AccessListish, + UnsignedTransaction, + + CoerceFunc, + + Indexed, + + Mnemonic, + + Deferrable, + + Utf8ErrorFunc, + + ConnectionInfo, + OnceBlockable, + OncePollable, + PollOptions, + FetchJsonResponse, + + EncryptOptions, + ProgressCallback +} + diff --git a/node_modules/event-target-shim/LICENSE b/node_modules/event-target-shim/LICENSE new file mode 100644 index 0000000..c39e694 --- /dev/null +++ b/node_modules/event-target-shim/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/event-target-shim/README.md b/node_modules/event-target-shim/README.md new file mode 100644 index 0000000..a4f9c1b --- /dev/null +++ b/node_modules/event-target-shim/README.md @@ -0,0 +1,293 @@ +# event-target-shim + +[![npm version](https://img.shields.io/npm/v/event-target-shim.svg)](https://www.npmjs.com/package/event-target-shim) +[![Downloads/month](https://img.shields.io/npm/dm/event-target-shim.svg)](http://www.npmtrends.com/event-target-shim) +[![Build Status](https://travis-ci.org/mysticatea/event-target-shim.svg?branch=master)](https://travis-ci.org/mysticatea/event-target-shim) +[![Coverage Status](https://codecov.io/gh/mysticatea/event-target-shim/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/event-target-shim) +[![Dependency Status](https://david-dm.org/mysticatea/event-target-shim.svg)](https://david-dm.org/mysticatea/event-target-shim) + +An implementation of [WHATWG EventTarget interface](https://dom.spec.whatwg.org/#interface-eventtarget), plus few extensions. + +- This provides `EventTarget` constructor that can inherit for your custom object. +- This provides an utility that defines properties of attribute listeners (e.g. `obj.onclick`). + +```js +import {EventTarget, defineEventAttribute} from "event-target-shim" + +class Foo extends EventTarget { + // ... +} + +// Define `foo.onhello` property. +defineEventAttribute(Foo.prototype, "hello") + +// Use +const foo = new Foo() +foo.addEventListener("hello", e => console.log("hello", e)) +foo.onhello = e => console.log("onhello:", e) +foo.dispatchEvent(new CustomEvent("hello")) +``` + +## 💿 Installation + +Use [npm](https://www.npmjs.com/) to install then use a bundler. + +``` +npm install event-target-shim +``` + +Or download from [`dist` directory](./dist). + +- [dist/event-target-shim.mjs](dist/event-target-shim.mjs) ... ES modules version. +- [dist/event-target-shim.js](dist/event-target-shim.js) ... Common JS version. +- [dist/event-target-shim.umd.js](dist/event-target-shim.umd.js) ... UMD (Universal Module Definition) version. This is transpiled by [Babel](https://babeljs.io/) for IE 11. + +## 📖 Usage + +```js +import {EventTarget, defineEventAttribute} from "event-target-shim" +// or +const {EventTarget, defineEventAttribute} = require("event-target-shim") + +// or UMD version defines a global variable: +const {EventTarget, defineEventAttribute} = window.EventTargetShim +``` + +### EventTarget + +> https://dom.spec.whatwg.org/#interface-eventtarget + +#### eventTarget.addEventListener(type, callback, options) + +Register an event listener. + +- `type` is a string. This is the event name to register. +- `callback` is a function. This is the event listener to register. +- `options` is a boolean or an object `{ capture?: boolean, passive?: boolean, once?: boolean }`. If this is a boolean, it's same meaning as `{ capture: options }`. + - `capture` is the flag to register the event listener for capture phase. + - `passive` is the flag to ignore `event.preventDefault()` method in the event listener. + - `once` is the flag to remove the event listener automatically after the first call. + +#### eventTarget.removeEventListener(type, callback, options) + +Unregister an event listener. + +- `type` is a string. This is the event name to unregister. +- `callback` is a function. This is the event listener to unregister. +- `options` is a boolean or an object `{ capture?: boolean }`. If this is a boolean, it's same meaning as `{ capture: options }`. + - `capture` is the flag to register the event listener for capture phase. + +#### eventTarget.dispatchEvent(event) + +Dispatch an event. + +- `event` is a [Event](https://dom.spec.whatwg.org/#event) object or an object `{ type: string, [key: string]: any }`. The latter is non-standard but useful. In both cases, listeners receive the event as implementing [Event](https://dom.spec.whatwg.org/#event) interface. + +### defineEventAttribute(proto, type) + +Define an event attribute (e.g. `onclick`) to `proto`. This is non-standard. + +- `proto` is an object (assuming it's a prototype object). This function defines a getter/setter pair for the event attribute. +- `type` is a string. This is the event name to define. + +For example: + +```js +class AbortSignal extends EventTarget { + constructor() { + this.aborted = false + } +} +// Define `onabort` property. +defineEventAttribute(AbortSignal.prototype, "abort") +``` + +### EventTarget(types) + +Define a custom `EventTarget` class with event attributes. This is non-standard. + +- `types` is a string or an array of strings. This is the event name to define. + +For example: + +```js +// This has `onabort` property. +class AbortSignal extends EventTarget("abort") { + constructor() { + this.aborted = false + } +} +``` + +## 📚 Examples + +### ES2015 and later + +> https://jsfiddle.net/636vea92/ + +```js +const {EventTarget, defineEventAttribute} = EventTargetShim + +// Define a derived class. +class Foo extends EventTarget { + // ... +} + +// Define `foo.onhello` property. +defineEventAttribute(Foo.prototype, "hello") + +// Register event listeners. +const foo = new Foo() +foo.addEventListener("hello", (e) => { + console.log("hello", e) +}) +foo.onhello = (e) => { + console.log("onhello", e) +} + +// Dispatching events +foo.dispatchEvent(new CustomEvent("hello", { detail: "detail" })) +``` + +### Typescript + +```ts +import { EventTarget, defineEventAttribute } from "event-target-shim"; + +// Define events +type FooEvents = { + hello: CustomEvent +} +type FooEventAttributes = { + onhello: CustomEvent +} + +// Define a derived class. +class Foo extends EventTarget { + // ... +} +// Define `foo.onhello` property's implementation. +defineEventAttribute(Foo.prototype, "hello") + +// Register event listeners. +const foo = new Foo() +foo.addEventListener("hello", (e) => { + console.log("hello", e.detail) +}) +foo.onhello = (e) => { + console.log("onhello", e.detail) +} + +// Dispatching events +foo.dispatchEvent(new CustomEvent("hello", { detail: "detail" })) +``` + +Unfortunately, both `FooEvents` and `FooEventAttributes` are needed because TypeScript doesn't allow the mutation of string literal types. If TypeScript allowed us to compute `"onhello"` from `"hello"` in types, `FooEventAttributes` will be optional. + +This `EventTarget` type is compatible with `EventTarget` interface of `lib.dom.d.ts`. + +#### To disallow unknown events + +By default, methods such as `addEventListener` accept unknown events. You can disallow unknown events by the third type parameter `"strict"`. + +```ts +type FooEvents = { + hello: CustomEvent +} +class Foo extends EventTarget { + // ... +} + +// OK because `hello` is defined in FooEvents. +foo.addEventListener("hello", (e) => { +}) +// Error because `unknown` is not defined in FooEvents. +foo.addEventListener("unknown", (e) => { +}) +``` + +However, if you use `"strict"` parameter, it loses compatibility with `EventTarget` interface of `lib.dom.d.ts`. + +#### To infer the type of `dispatchEvent()` method + +TypeScript cannot infer the event type of `dispatchEvent()` method properly from the argument in most cases. You can improve this behavior with the following steps: + +1. Use the third type parameter `"strict"`. This prevents inferring to `dispatchEvent()`. +2. Make the `type` property of event definitions stricter. + +```ts +type FooEvents = { + hello: CustomEvent & { type: "hello" } + hey: Event & { type: "hey" } +} +class Foo extends EventTarget { + // ... +} + +// Error because `detail` property is lacking. +foo.dispatchEvent({ type: "hello" }) +``` + +### ES5 + +> https://jsfiddle.net/522zc9de/ + +```js +// Define a derived class. +function Foo() { + EventTarget.call(this) +} +Foo.prototype = Object.create(EventTarget.prototype, { + constructor: { value: Foo, configurable: true, writable: true } + // ... +}) + +// Define `foo.onhello` property. +defineEventAttribute(Foo.prototype, "hello") + +// Register event listeners. +var foo = new Foo() +foo.addEventListener("hello", function(e) { + console.log("hello", e) +}) +foo.onhello = function(e) { + console.log("onhello", e) +} + +// Dispatching events +function isSupportEventConstrucor() { // IE does not support. + try { + new CusomEvent("hello") + return true + } catch (_err) { + return false + } +} +if (isSupportEventConstrucor()) { + foo.dispatchEvent(new CustomEvent("hello", { detail: "detail" })) +} else { + var e = document.createEvent("CustomEvent") + e.initCustomEvent("hello", false, false, "detail") + foo.dispatchEvent(e) +} +``` + +## 📰 Changelog + +- See [GitHub releases](https://github.com/mysticatea/event-target-shim/releases). + +## 🍻 Contributing + +Contributing is welcome ❤️ + +Please use GitHub issues/PRs. + +### Development tools + +- `npm install` installs dependencies for development. +- `npm test` runs tests and measures code coverage. +- `npm run clean` removes temporary files of tests. +- `npm run coverage` opens code coverage of the previous test with your default browser. +- `npm run lint` runs ESLint. +- `npm run build` generates `dist` codes. +- `npm run watch` runs tests on each file change. diff --git a/node_modules/event-target-shim/dist/event-target-shim.js b/node_modules/event-target-shim/dist/event-target-shim.js new file mode 100644 index 0000000..53ce220 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.js @@ -0,0 +1,871 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +exports.defineEventAttribute = defineEventAttribute; +exports.EventTarget = EventTarget; +exports.default = EventTarget; + +module.exports = EventTarget +module.exports.EventTarget = module.exports["default"] = EventTarget +module.exports.defineEventAttribute = defineEventAttribute +//# sourceMappingURL=event-target-shim.js.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.js.map b/node_modules/event-target-shim/dist/event-target-shim.js.map new file mode 100644 index 0000000..83c5f62 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.js","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,IAAI,OAAO,GAAE;;;;;;;AAOjC,MAAM,QAAQ,GAAG,IAAI,OAAO,GAAE;;;;;;;;AAQ9B,SAAS,EAAE,CAAC,KAAK,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,EAAC;IACnC,OAAO,CAAC,MAAM;QACV,IAAI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newline at end of file diff --git a/node_modules/event-target-shim/dist/event-target-shim.mjs b/node_modules/event-target-shim/dist/event-target-shim.mjs new file mode 100644 index 0000000..114f3a1 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.mjs @@ -0,0 +1,862 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +export default EventTarget; +export { defineEventAttribute, EventTarget }; +//# sourceMappingURL=event-target-shim.mjs.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.mjs.map b/node_modules/event-target-shim/dist/event-target-shim.mjs.map new file mode 100644 index 0000000..57b3e8f --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.mjs","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,IAAI,OAAO,GAAE;;;;;;;AAOjC,MAAM,QAAQ,GAAG,IAAI,OAAO,GAAE;;;;;;;;AAQ9B,SAAS,EAAE,CAAC,KAAK,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,EAAC;IACnC,OAAO,CAAC,MAAM;QACV,IAAI,IAAI,IAAI;QACZ,6CAA6C;QAC7C,KAAK;MACR;IACD,OAAO,IAAI;CACd;;;;;;AAMD,SAAS,aAAa,CAAC,IAAI,EAAE;IACzB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;QAC9B;YACI,OAAO,OAAO,KAAK,WAAW;YAC9B,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;UACrC;YACE,OAAO,CAAC,KAAK;gBACT,oEAAoE;gBACpE,IAAI,CAAC,eAAe;cACvB;SACJ;QACD,MAAM;KACT;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;QACxB,MAAM;KACT;;IAED,IAAI,CAAC,QAAQ,GAAG,KAAI;IACpB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,UAAU,EAAE;QACjD,IAAI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ACjD;gBACE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,EAAC;aAC1C;;;YAGD,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE;gBACzB,KAAK;aACR;;YAED,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;QACD,kBAAkB,CAAC,YAAY,EAAE,IAAI,EAAC;QACtC,aAAa,CAAC,YAAY,EAAE,CAAC,EAAC;QAC9B,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAC;;QAEpC,OAAO,CAAC,YAAY,CAAC,gBAAgB;KACxC;EACJ;;;AAGD,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE;IACxD,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;CACjB,EAAC;;;AAGF;IACI,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW;EAC3C;IACE,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,EAAC;CAC7E;;;;;"} \ No newline at end of file diff --git a/node_modules/event-target-shim/dist/event-target-shim.umd.js b/node_modules/event-target-shim/dist/event-target-shim.umd.js new file mode 100644 index 0000000..e7cf5d4 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.umd.js @@ -0,0 +1,6 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.EventTargetShim={}))})(this,function(a){"use strict";function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a){var b=u.get(a);return console.assert(null!=b,"'this' is expected an Event object, but got",a),b}function d(a){return null==a.passiveListener?void(!a.event.cancelable||(a.canceled=!0,"function"==typeof a.event.preventDefault&&a.event.preventDefault())):void("undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",a.passiveListener))}function e(a,b){u.set(this,{eventTarget:a,event:b,eventPhase:2,currentTarget:a,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:b.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var c,d=Object.keys(b),e=0;e}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":["pd","event","retv","privateData","get","console","assert","setCancelFlag","data","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","Object","defineProperty","value","enumerable","key","keys","i","length","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","defineWrapper","BaseEvent","proto","CustomEvent","call","prototype","create","constructor","writable","descriptor","getOwnPropertyDescriptor","isFunc","getWrapper","wrapper","wrappers","getPrototypeOf","wrapEvent","Wrapper","isStopped","setEventPhase","setCurrentTarget","setPassiveListener","isObject","x","_typeof","getListeners","listeners","listenersMap","TypeError","defineEventAttributeDescriptor","eventName","node","listenerType","listener","next","prev","delete","newNode","passive","once","defineEventAttribute","eventTargetPrototype","defineCustomEventTarget","eventNames","CustomEventTarget","EventTarget","Map","Array","isArray","types","WeakMap","type","target","composedPath","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","defaultPrevented","composed","srcElement","cancelBubble","returnValue","initEvent","window","setPrototypeOf","CAPTURE","BUBBLE","addEventListener","options","optionsIsObj","capture","removeEventListener","dispatchEvent","w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b/node_modules/event-target-shim/index.d.ts new file mode 100644 index 0000000..a303097 --- /dev/null +++ b/node_modules/event-target-shim/index.d.ts @@ -0,0 +1,399 @@ +export as namespace EventTargetShim + +/** + * `Event` interface. + * @see https://dom.spec.whatwg.org/#event + */ +export interface Event { + /** + * The type of this event. + */ + readonly type: string + + /** + * The target of this event. + */ + readonly target: EventTarget<{}, {}, "standard"> | null + + /** + * The current target of this event. + */ + readonly currentTarget: EventTarget<{}, {}, "standard"> | null + + /** + * The target of this event. + * @deprecated + */ + readonly srcElement: any | null + + /** + * The composed path of this event. + */ + composedPath(): EventTarget<{}, {}, "standard">[] + + /** + * Constant of NONE. + */ + readonly NONE: number + + /** + * Constant of CAPTURING_PHASE. + */ + readonly CAPTURING_PHASE: number + + /** + * Constant of BUBBLING_PHASE. + */ + readonly BUBBLING_PHASE: number + + /** + * Constant of AT_TARGET. + */ + readonly AT_TARGET: number + + /** + * Indicates which phase of the event flow is currently being evaluated. + */ + readonly eventPhase: number + + /** + * Stop event bubbling. + */ + stopPropagation(): void + + /** + * Stop event bubbling. + */ + stopImmediatePropagation(): void + + /** + * Initialize event. + * @deprecated + */ + initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void + + /** + * The flag indicating bubbling. + */ + readonly bubbles: boolean + + /** + * Stop event bubbling. + * @deprecated + */ + cancelBubble: boolean + + /** + * Set or get cancellation flag. + * @deprecated + */ + returnValue: boolean + + /** + * The flag indicating whether the event can be canceled. + */ + readonly cancelable: boolean + + /** + * Cancel this event. + */ + preventDefault(): void + + /** + * The flag to indicating whether the event was canceled. + */ + readonly defaultPrevented: boolean + + /** + * The flag to indicating if event is composed. + */ + readonly composed: boolean + + /** + * Indicates whether the event was dispatched by the user agent. + */ + readonly isTrusted: boolean + + /** + * The unix time of this event. + */ + readonly timeStamp: number +} + +/** + * The constructor of `EventTarget` interface. + */ +export type EventTargetConstructor< + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" +> = { + prototype: EventTarget + new(): EventTarget +} + +/** + * `EventTarget` interface. + * @see https://dom.spec.whatwg.org/#interface-eventtarget + */ +export type EventTarget< + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" +> = EventTarget.EventAttributes & { + /** + * Add a given listener to this event target. + * @param eventName The event name to add. + * @param listener The listener to add. + * @param options The options for this listener. + */ + addEventListener>( + type: TEventType, + listener: + | EventTarget.Listener> + | null, + options?: boolean | EventTarget.AddOptions + ): void + + /** + * Remove a given listener from this event target. + * @param eventName The event name to remove. + * @param listener The listener to remove. + * @param options The options for this listener. + */ + removeEventListener>( + type: TEventType, + listener: + | EventTarget.Listener> + | null, + options?: boolean | EventTarget.RemoveOptions + ): void + + /** + * Dispatch a given event. + * @param event The event to dispatch. + * @returns `false` if canceled. + */ + dispatchEvent>( + event: EventTarget.EventData + ): boolean +} + +export const EventTarget: EventTargetConstructor & { + /** + * Create an `EventTarget` instance with detailed event definition. + * + * The detailed event definition requires to use `defineEventAttribute()` + * function later. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * const signal = new EventTarget<{ abort: Event }, { onabort: Event }>() + * defineEventAttribute(signal, "abort") + */ + new < + TEvents extends EventTarget.EventDefinition, + TEventAttributes extends EventTarget.EventDefinition, + TMode extends EventTarget.Mode = "loose" + >(): EventTarget + + /** + * Define an `EventTarget` constructor with attribute events and detailed event definition. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * class AbortSignal extends EventTarget<{ abort: Event }, { onabort: Event }>("abort") { + * abort(): void {} + * } + * + * @param events Optional event attributes (e.g. passing in `"click"` adds `onclick` to prototype). + */ + < + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" + >(events: string[]): EventTargetConstructor< + TEvents, + TEventAttributes, + TMode + > + + /** + * Define an `EventTarget` constructor with attribute events and detailed event definition. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * class AbortSignal extends EventTarget<{ abort: Event }, { onabort: Event }>("abort") { + * abort(): void {} + * } + * + * @param events Optional event attributes (e.g. passing in `"click"` adds `onclick` to prototype). + */ + < + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" + >(event0: string, ...events: string[]): EventTargetConstructor< + TEvents, + TEventAttributes, + TMode + > +} + +export namespace EventTarget { + /** + * Options of `removeEventListener()` method. + */ + export interface RemoveOptions { + /** + * The flag to indicate that the listener is for the capturing phase. + */ + capture?: boolean + } + + /** + * Options of `addEventListener()` method. + */ + export interface AddOptions extends RemoveOptions { + /** + * The flag to indicate that the listener doesn't support + * `event.preventDefault()` operation. + */ + passive?: boolean + /** + * The flag to indicate that the listener will be removed on the first + * event. + */ + once?: boolean + } + + /** + * The type of regular listeners. + */ + export interface FunctionListener { + (event: TEvent): void + } + + /** + * The type of object listeners. + */ + export interface ObjectListener { + handleEvent(event: TEvent): void + } + + /** + * The type of listeners. + */ + export type Listener = + | FunctionListener + | ObjectListener + + /** + * Event definition. + */ + export type EventDefinition = { + readonly [key: string]: Event + } + + /** + * Mapped type for event attributes. + */ + export type EventAttributes = { + [P in keyof TEventAttributes]: + | FunctionListener + | null + } + + /** + * The type of event data for `dispatchEvent()` method. + */ + export type EventData< + TEvents extends EventDefinition, + TEventType extends keyof TEvents | string, + TMode extends Mode + > = + TEventType extends keyof TEvents + ? ( + // Require properties which are not generated automatically. + & Pick< + TEvents[TEventType], + Exclude + > + // Properties which are generated automatically are optional. + & Partial> + ) + : ( + TMode extends "standard" + ? Event + : Event | NonStandardEvent + ) + + /** + * The string literal types of the properties which are generated + * automatically in `dispatchEvent()` method. + */ + export type OmittableEventKeys = Exclude + + /** + * The type of event data. + */ + export type NonStandardEvent = { + [key: string]: any + type: string + } + + /** + * The type of listeners. + */ + export type PickEvent< + TEvents extends EventDefinition, + TEventType extends keyof TEvents | string, + > = + TEventType extends keyof TEvents + ? TEvents[TEventType] + : Event + + /** + * Event type candidates. + */ + export type EventType< + TEvents extends EventDefinition, + TMode extends Mode + > = + TMode extends "strict" + ? keyof TEvents + : keyof TEvents | string + + /** + * - `"strict"` ..... Methods don't accept unknown events. + * `dispatchEvent()` accepts partial objects. + * - `"loose"` ...... Methods accept unknown events. + * `dispatchEvent()` accepts partial objects. + * - `"standard"` ... Methods accept unknown events. + * `dispatchEvent()` doesn't accept partial objects. + */ + export type Mode = "strict" | "standard" | "loose" +} + +/** + * Specialized `type` property. + */ +export type Type = { type: T } + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param prototype The event target prototype to define an event attribute. + * @param eventName The event name to define. + */ +export function defineEventAttribute( + prototype: EventTarget, + eventName: string +): void + +export default EventTarget diff --git a/node_modules/event-target-shim/package.json b/node_modules/event-target-shim/package.json new file mode 100644 index 0000000..40326f3 --- /dev/null +++ b/node_modules/event-target-shim/package.json @@ -0,0 +1,82 @@ +{ + "name": "event-target-shim", + "version": "5.0.1", + "description": "An implementation of WHATWG EventTarget interface.", + "main": "dist/event-target-shim", + "types": "index.d.ts", + "files": [ + "dist", + "index.d.ts" + ], + "engines": { + "node": ">=6" + }, + "scripts": { + "preversion": "npm test", + "version": "npm run build && git add dist/*", + "postversion": "git push && git push --tags", + "clean": "rimraf .nyc_output coverage", + "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", + "lint": "eslint src test scripts --ext .js,.mjs", + "build": "rollup -c scripts/rollup.config.js", + "pretest": "npm run lint", + "test": "run-s test:*", + "test:mocha": "nyc --require ./scripts/babel-register mocha test/*.mjs", + "test:karma": "karma start scripts/karma.conf.js --single-run", + "watch": "run-p watch:*", + "watch:mocha": "mocha test/*.mjs --require ./scripts/babel-register --watch --watch-extensions js,mjs --growl", + "watch:karma": "karma start scripts/karma.conf.js --watch", + "codecov": "codecov" + }, + "devDependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.2.3", + "@babel/register": "^7.0.0", + "@mysticatea/eslint-plugin": "^8.0.1", + "@mysticatea/spy": "^0.1.2", + "assert": "^1.4.1", + "codecov": "^3.1.0", + "eslint": "^5.12.1", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.2", + "karma-firefox-launcher": "^1.0.0", + "karma-growl-reporter": "^1.0.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0-rc.2", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "nyc": "^13.1.0", + "opener": "^1.5.1", + "rimraf": "^2.6.3", + "rollup": "^1.1.1", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel-minify": "^7.0.0", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-json": "^3.1.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-watch": "^4.3.1", + "type-tester": "^1.0.0", + "typescript": "^3.2.4" + }, + "repository": { + "type": "git", + "url": "https://github.com/mysticatea/event-target-shim.git" + }, + "keywords": [ + "w3c", + "whatwg", + "eventtarget", + "event", + "events", + "shim" + ], + "author": "Toru Nagashima", + "license": "MIT", + "bugs": { + "url": "https://github.com/mysticatea/event-target-shim/issues" + }, + "homepage": "https://github.com/mysticatea/event-target-shim" +} diff --git a/node_modules/hash.js/.eslintrc.js b/node_modules/hash.js/.eslintrc.js new file mode 100644 index 0000000..614f8fc --- /dev/null +++ b/node_modules/hash.js/.eslintrc.js @@ -0,0 +1,41 @@ +module.exports = { + 'env': { + 'browser': true, + 'commonjs': true, + 'node': true, + 'es6': true + }, + 'parserOptions': { + 'ecmaVersion': 8 + }, + 'extends': 'eslint:recommended', + 'rules': { + 'indent': [ + 'error', + 2, + { + 'FunctionDeclaration': { + 'parameters': 'first' + }, + 'FunctionExpression': { + 'parameters': 'first' + }, + 'CallExpression': { + 'arguments': 'first' + } + } + ], + 'linebreak-style': [ + 'error', + 'unix' + ], + 'quotes': [ + 'error', + 'single' + ], + 'semi': [ + 'error', + 'always' + ] + } +}; diff --git a/node_modules/hash.js/.travis.yml b/node_modules/hash.js/.travis.yml new file mode 100644 index 0000000..5406edc --- /dev/null +++ b/node_modules/hash.js/.travis.yml @@ -0,0 +1,10 @@ +sudo: false +language: node_js +node_js: + - "6" + - "8" + - "10" + - "stable" +branches: + only: + - master diff --git a/node_modules/hash.js/README.md b/node_modules/hash.js/README.md new file mode 100644 index 0000000..006d3bb --- /dev/null +++ b/node_modules/hash.js/README.md @@ -0,0 +1,48 @@ +# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.svg)](http://travis-ci.org/indutny/hash.js) + +Just a bike-shed. + +## Install + +```sh +npm install hash.js +``` + +## Usage + +```js +var hash = require('hash.js') +hash.sha256().update('abc').digest('hex') +``` + +## Selective hash usage + +```js +var sha512 = require('hash.js/lib/hash/sha/512'); +sha512().update('abc').digest('hex'); +``` + +#### LICENSE + +This software is licensed under the MIT License. + +Copyright Fedor Indutny, 2014. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/hash.js/lib/hash.d.ts b/node_modules/hash.js/lib/hash.d.ts new file mode 100644 index 0000000..abbb5c5 --- /dev/null +++ b/node_modules/hash.js/lib/hash.d.ts @@ -0,0 +1,106 @@ +declare var hash: Hash; + +declare module "hash.js" { + export = hash; +} + +interface BlockHash { + hmacStrength: number + padLength: number + endian: 'big' | 'little' +} + +interface MessageDigest { + blockSize: number + outSize: number + update(msg: any, enc?: 'hex'): T + digest(): number[] + digest(enc: 'hex'): string +} + +interface Hash { + hmac: HmacConstructor + ripemd: RipemdSet + ripemd160: Ripemd160Constructor + sha: ShaSet + sha1: Sha1Constructor + sha224: Sha224Constructor + sha256: Sha256Constructor + sha384: Sha384Constructor + sha512: Sha512Constructor + utils: Utils +} + +interface Utils { + toArray(msg: any, enc: 'hex'): Array + toHex(msg: any): string +} + +interface RipemdSet { + ripemd160: Ripemd160Constructor +} + +interface ShaSet { + sha1: Sha1Constructor + sha224: Sha224Constructor + sha256: Sha256Constructor + sha384: Sha384Constructor + sha512: Sha512Constructor +} + +interface HmacConstructor { (hash: BlockHash, key: any, enc?: 'hex'): Hmac } +interface Ripemd160Constructor { (): Ripemd160 } +interface Sha1Constructor { (): Sha1; } +interface Sha224Constructor { (): Sha224; } +interface Sha256Constructor { (): Sha256; } +interface Sha384Constructor { (): Sha384; } +interface Sha512Constructor { (): Sha512; } + +interface Hmac extends MessageDigest { + blockSize: 512 + outSize: 160 +} + +interface Ripemd160 extends BlockHash, MessageDigest { + blockSize: 512 + hmacStrength: 192 + outSize: 160 + padLength: 64 + endian: 'little' +} + +interface Sha1 extends BlockHash, MessageDigest { + blockSize: 512 + hmacStrength: 80 + outSize: 160 + padLength: 64 + endian: 'big' +} +interface Sha224 extends BlockHash, MessageDigest { + blockSize: 512 + hmacStrength: 192 + outSize: 224 + padLength: 64 + endian: 'big' +} +interface Sha256 extends BlockHash, MessageDigest { + blockSize: 512 + hmacStrength: 192 + outSize: 256 + padLength: 64 + endian: 'big' +} +interface Sha384 extends BlockHash, MessageDigest { + blockSize: 1024 + hmacStrength: 192 + outSize: 384 + padLength: 128 + endian: 'big' +} +interface Sha512 extends BlockHash, MessageDigest { + blockSize: 1024 + hmacStrength: 192 + outSize: 512 + padLength: 128 + endian: 'big' +} diff --git a/node_modules/hash.js/lib/hash.js b/node_modules/hash.js/lib/hash.js new file mode 100644 index 0000000..f59b673 --- /dev/null +++ b/node_modules/hash.js/lib/hash.js @@ -0,0 +1,15 @@ +var hash = exports; + +hash.utils = require('./hash/utils'); +hash.common = require('./hash/common'); +hash.sha = require('./hash/sha'); +hash.ripemd = require('./hash/ripemd'); +hash.hmac = require('./hash/hmac'); + +// Proxy hash functions to the main object +hash.sha1 = hash.sha.sha1; +hash.sha256 = hash.sha.sha256; +hash.sha224 = hash.sha.sha224; +hash.sha384 = hash.sha.sha384; +hash.sha512 = hash.sha.sha512; +hash.ripemd160 = hash.ripemd.ripemd160; diff --git a/node_modules/hash.js/lib/hash/common.js b/node_modules/hash.js/lib/hash/common.js new file mode 100644 index 0000000..c49f476 --- /dev/null +++ b/node_modules/hash.js/lib/hash/common.js @@ -0,0 +1,92 @@ +'use strict'; + +var utils = require('./utils'); +var assert = require('minimalistic-assert'); + +function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = 'big'; + + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; +} +exports.BlockHash = BlockHash; + +BlockHash.prototype.update = function update(msg, enc) { + // Convert message to array, pad it, and join into 32bit blocks + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + + // Enough data, try updating + if (this.pending.length >= this._delta8) { + msg = this.pending; + + // Process pending data in blocks + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + + return this; +}; + +BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert(this.pending === null); + + return this._digest(enc); +}; + +BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - ((len + this.padLength) % bytes); + var res = new Array(k + this.padLength); + res[0] = 0x80; + for (var i = 1; i < k; i++) + res[i] = 0; + + // Append length + len <<= 3; + if (this.endian === 'big') { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = (len >>> 24) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = len & 0xff; + } else { + res[i++] = len & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 24) & 0xff; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + + return res; +}; diff --git a/node_modules/hash.js/lib/hash/hmac.js b/node_modules/hash.js/lib/hash/hmac.js new file mode 100644 index 0000000..faff12d --- /dev/null +++ b/node_modules/hash.js/lib/hash/hmac.js @@ -0,0 +1,47 @@ +'use strict'; + +var utils = require('./utils'); +var assert = require('minimalistic-assert'); + +function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + + this._init(utils.toArray(key, enc)); +} +module.exports = Hmac; + +Hmac.prototype._init = function init(key) { + // Shorten key, if needed + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert(key.length <= this.blockSize); + + // Add padding to key + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + + for (i = 0; i < key.length; i++) + key[i] ^= 0x36; + this.inner = new this.Hash().update(key); + + // 0x36 ^ 0x5c = 0x6a + for (i = 0; i < key.length; i++) + key[i] ^= 0x6a; + this.outer = new this.Hash().update(key); +}; + +Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; +}; + +Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); +}; diff --git a/node_modules/hash.js/lib/hash/ripemd.js b/node_modules/hash.js/lib/hash/ripemd.js new file mode 100644 index 0000000..2dcdff2 --- /dev/null +++ b/node_modules/hash.js/lib/hash/ripemd.js @@ -0,0 +1,146 @@ +'use strict'; + +var utils = require('./utils'); +var common = require('./common'); + +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_3 = utils.sum32_3; +var sum32_4 = utils.sum32_4; +var BlockHash = common.BlockHash; + +function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + + BlockHash.call(this); + + this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; + this.endian = 'little'; +} +utils.inherits(RIPEMD160, BlockHash); +exports.ripemd160 = RIPEMD160; + +RIPEMD160.blockSize = 512; +RIPEMD160.outSize = 160; +RIPEMD160.hmacStrength = 192; +RIPEMD160.padLength = 64; + +RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32( + rotl32( + sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j]), + E); + A = E; + E = D; + D = rotl32(C, 10); + C = B; + B = T; + T = sum32( + rotl32( + sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j]), + Eh); + Ah = Eh; + Eh = Dh; + Dh = rotl32(Ch, 10); + Ch = Bh; + Bh = T; + } + T = sum32_3(this.h[1], C, Dh); + this.h[1] = sum32_3(this.h[2], D, Eh); + this.h[2] = sum32_3(this.h[3], E, Ah); + this.h[3] = sum32_3(this.h[4], A, Bh); + this.h[4] = sum32_3(this.h[0], B, Ch); + this.h[0] = T; +}; + +RIPEMD160.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'little'); + else + return utils.split32(this.h, 'little'); +}; + +function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return (x & y) | ((~x) & z); + else if (j <= 47) + return (x | (~y)) ^ z; + else if (j <= 63) + return (x & z) | (y & (~z)); + else + return x ^ (y | (~z)); +} + +function K(j) { + if (j <= 15) + return 0x00000000; + else if (j <= 31) + return 0x5a827999; + else if (j <= 47) + return 0x6ed9eba1; + else if (j <= 63) + return 0x8f1bbcdc; + else + return 0xa953fd4e; +} + +function Kh(j) { + if (j <= 15) + return 0x50a28be6; + else if (j <= 31) + return 0x5c4dd124; + else if (j <= 47) + return 0x6d703ef3; + else if (j <= 63) + return 0x7a6d76e9; + else + return 0x00000000; +} + +var r = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 +]; + +var rh = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 +]; + +var s = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 +]; + +var sh = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 +]; diff --git a/node_modules/hash.js/lib/hash/sha.js b/node_modules/hash.js/lib/hash/sha.js new file mode 100644 index 0000000..f34a38d --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha.js @@ -0,0 +1,7 @@ +'use strict'; + +exports.sha1 = require('./sha/1'); +exports.sha224 = require('./sha/224'); +exports.sha256 = require('./sha/256'); +exports.sha384 = require('./sha/384'); +exports.sha512 = require('./sha/512'); diff --git a/node_modules/hash.js/lib/hash/sha/1.js b/node_modules/hash.js/lib/hash/sha/1.js new file mode 100644 index 0000000..fcdfa29 --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha/1.js @@ -0,0 +1,74 @@ +'use strict'; + +var utils = require('../utils'); +var common = require('../common'); +var shaCommon = require('./common'); + +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_5 = utils.sum32_5; +var ft_1 = shaCommon.ft_1; +var BlockHash = common.BlockHash; + +var sha1_K = [ + 0x5A827999, 0x6ED9EBA1, + 0x8F1BBCDC, 0xCA62C1D6 +]; + +function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + + BlockHash.call(this); + this.h = [ + 0x67452301, 0xefcdab89, 0x98badcfe, + 0x10325476, 0xc3d2e1f0 ]; + this.W = new Array(80); +} + +utils.inherits(SHA1, BlockHash); +module.exports = SHA1; + +SHA1.blockSize = 512; +SHA1.outSize = 160; +SHA1.hmacStrength = 80; +SHA1.padLength = 64; + +SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + + for(; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); +}; + +SHA1.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; diff --git a/node_modules/hash.js/lib/hash/sha/224.js b/node_modules/hash.js/lib/hash/sha/224.js new file mode 100644 index 0000000..c69882d --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha/224.js @@ -0,0 +1,30 @@ +'use strict'; + +var utils = require('../utils'); +var SHA256 = require('./256'); + +function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + + SHA256.call(this); + this.h = [ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; +} +utils.inherits(SHA224, SHA256); +module.exports = SHA224; + +SHA224.blockSize = 512; +SHA224.outSize = 224; +SHA224.hmacStrength = 192; +SHA224.padLength = 64; + +SHA224.prototype._digest = function digest(enc) { + // Just truncate output + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 7), 'big'); + else + return utils.split32(this.h.slice(0, 7), 'big'); +}; + diff --git a/node_modules/hash.js/lib/hash/sha/256.js b/node_modules/hash.js/lib/hash/sha/256.js new file mode 100644 index 0000000..6dbd6a0 --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha/256.js @@ -0,0 +1,105 @@ +'use strict'; + +var utils = require('../utils'); +var common = require('../common'); +var shaCommon = require('./common'); +var assert = require('minimalistic-assert'); + +var sum32 = utils.sum32; +var sum32_4 = utils.sum32_4; +var sum32_5 = utils.sum32_5; +var ch32 = shaCommon.ch32; +var maj32 = shaCommon.maj32; +var s0_256 = shaCommon.s0_256; +var s1_256 = shaCommon.s1_256; +var g0_256 = shaCommon.g0_256; +var g1_256 = shaCommon.g1_256; + +var BlockHash = common.BlockHash; + +var sha256_K = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +]; + +function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + + BlockHash.call(this); + this.h = [ + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 + ]; + this.k = sha256_K; + this.W = new Array(64); +} +utils.inherits(SHA256, BlockHash); +module.exports = SHA256; + +SHA256.blockSize = 512; +SHA256.outSize = 256; +SHA256.hmacStrength = 192; +SHA256.padLength = 64; + +SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + + assert(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); + var T2 = sum32(s0_256(a), maj32(a, b, c)); + h = g; + g = f; + f = e; + e = sum32(d, T1); + d = c; + c = b; + b = a; + a = sum32(T1, T2); + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + this.h[5] = sum32(this.h[5], f); + this.h[6] = sum32(this.h[6], g); + this.h[7] = sum32(this.h[7], h); +}; + +SHA256.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; diff --git a/node_modules/hash.js/lib/hash/sha/384.js b/node_modules/hash.js/lib/hash/sha/384.js new file mode 100644 index 0000000..01df256 --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha/384.js @@ -0,0 +1,35 @@ +'use strict'; + +var utils = require('../utils'); + +var SHA512 = require('./512'); + +function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + + SHA512.call(this); + this.h = [ + 0xcbbb9d5d, 0xc1059ed8, + 0x629a292a, 0x367cd507, + 0x9159015a, 0x3070dd17, + 0x152fecd8, 0xf70e5939, + 0x67332667, 0xffc00b31, + 0x8eb44a87, 0x68581511, + 0xdb0c2e0d, 0x64f98fa7, + 0x47b5481d, 0xbefa4fa4 ]; +} +utils.inherits(SHA384, SHA512); +module.exports = SHA384; + +SHA384.blockSize = 1024; +SHA384.outSize = 384; +SHA384.hmacStrength = 192; +SHA384.padLength = 128; + +SHA384.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 12), 'big'); + else + return utils.split32(this.h.slice(0, 12), 'big'); +}; diff --git a/node_modules/hash.js/lib/hash/sha/512.js b/node_modules/hash.js/lib/hash/sha/512.js new file mode 100644 index 0000000..c371a25 --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha/512.js @@ -0,0 +1,330 @@ +'use strict'; + +var utils = require('../utils'); +var common = require('../common'); +var assert = require('minimalistic-assert'); + +var rotr64_hi = utils.rotr64_hi; +var rotr64_lo = utils.rotr64_lo; +var shr64_hi = utils.shr64_hi; +var shr64_lo = utils.shr64_lo; +var sum64 = utils.sum64; +var sum64_hi = utils.sum64_hi; +var sum64_lo = utils.sum64_lo; +var sum64_4_hi = utils.sum64_4_hi; +var sum64_4_lo = utils.sum64_4_lo; +var sum64_5_hi = utils.sum64_5_hi; +var sum64_5_lo = utils.sum64_5_lo; + +var BlockHash = common.BlockHash; + +var sha512_K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + + BlockHash.call(this); + this.h = [ + 0x6a09e667, 0xf3bcc908, + 0xbb67ae85, 0x84caa73b, + 0x3c6ef372, 0xfe94f82b, + 0xa54ff53a, 0x5f1d36f1, + 0x510e527f, 0xade682d1, + 0x9b05688c, 0x2b3e6c1f, + 0x1f83d9ab, 0xfb41bd6b, + 0x5be0cd19, 0x137e2179 ]; + this.k = sha512_K; + this.W = new Array(160); +} +utils.inherits(SHA512, BlockHash); +module.exports = SHA512; + +SHA512.blockSize = 1024; +SHA512.outSize = 512; +SHA512.hmacStrength = 192; +SHA512.padLength = 128; + +SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + + // 32 x 32bit words + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; // i - 7 + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; // i - 16 + var c3_lo = W[i - 31]; + + W[i] = sum64_4_hi( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + W[i + 1] = sum64_4_lo( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + } +}; + +SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + + var W = this.W; + + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + + assert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + + var T1_hi = sum64_5_hi( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + var T1_lo = sum64_5_lo( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + + var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); + + hh = gh; + hl = gl; + + gh = fh; + gl = fl; + + fh = eh; + fl = el; + + eh = sum64_hi(dh, dl, T1_hi, T1_lo); + el = sum64_lo(dl, dl, T1_hi, T1_lo); + + dh = ch; + dl = cl; + + ch = bh; + cl = bl; + + bh = ah; + bl = al; + + ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); + } + + sum64(this.h, 0, ah, al); + sum64(this.h, 2, bh, bl); + sum64(this.h, 4, ch, cl); + sum64(this.h, 6, dh, dl); + sum64(this.h, 8, eh, el); + sum64(this.h, 10, fh, fl); + sum64(this.h, 12, gh, gl); + sum64(this.h, 14, hh, hl); +}; + +SHA512.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +function ch64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ ((~xh) & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ ((~xl) & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 28); + var c1_hi = rotr64_hi(xl, xh, 2); // 34 + var c2_hi = rotr64_hi(xl, xh, 7); // 39 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 28); + var c1_lo = rotr64_lo(xl, xh, 2); // 34 + var c2_lo = rotr64_lo(xl, xh, 7); // 39 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 14); + var c1_hi = rotr64_hi(xh, xl, 18); + var c2_hi = rotr64_hi(xl, xh, 9); // 41 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 14); + var c1_lo = rotr64_lo(xh, xl, 18); + var c2_lo = rotr64_lo(xl, xh, 9); // 41 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 1); + var c1_hi = rotr64_hi(xh, xl, 8); + var c2_hi = shr64_hi(xh, xl, 7); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 1); + var c1_lo = rotr64_lo(xh, xl, 8); + var c2_lo = shr64_lo(xh, xl, 7); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 19); + var c1_hi = rotr64_hi(xl, xh, 29); // 61 + var c2_hi = shr64_hi(xh, xl, 6); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 19); + var c1_lo = rotr64_lo(xl, xh, 29); // 61 + var c2_lo = shr64_lo(xh, xl, 6); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} diff --git a/node_modules/hash.js/lib/hash/sha/common.js b/node_modules/hash.js/lib/hash/sha/common.js new file mode 100644 index 0000000..d41b464 --- /dev/null +++ b/node_modules/hash.js/lib/hash/sha/common.js @@ -0,0 +1,49 @@ +'use strict'; + +var utils = require('../utils'); +var rotr32 = utils.rotr32; + +function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); +} +exports.ft_1 = ft_1; + +function ch32(x, y, z) { + return (x & y) ^ ((~x) & z); +} +exports.ch32 = ch32; + +function maj32(x, y, z) { + return (x & y) ^ (x & z) ^ (y & z); +} +exports.maj32 = maj32; + +function p32(x, y, z) { + return x ^ y ^ z; +} +exports.p32 = p32; + +function s0_256(x) { + return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); +} +exports.s0_256 = s0_256; + +function s1_256(x) { + return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); +} +exports.s1_256 = s1_256; + +function g0_256(x) { + return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); +} +exports.g0_256 = g0_256; + +function g1_256(x) { + return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); +} +exports.g1_256 = g1_256; diff --git a/node_modules/hash.js/lib/hash/utils.js b/node_modules/hash.js/lib/hash/utils.js new file mode 100644 index 0000000..7487f8e --- /dev/null +++ b/node_modules/hash.js/lib/hash/utils.js @@ -0,0 +1,278 @@ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +exports.inherits = inherits; + +function isSurrogatePair(msg, i) { + if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) { + return false; + } + if (i < 0 || i + 1 >= msg.length) { + return false; + } + return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00; +} + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === 'string') { + if (!enc) { + // Inspired by stringToUtf8ByteArray() in closure-library by Google + // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 + // Apache License 2.0 + // https://github.com/google/closure-library/blob/master/LICENSE + var p = 0; + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + if (c < 128) { + res[p++] = c; + } else if (c < 2048) { + res[p++] = (c >> 6) | 192; + res[p++] = (c & 63) | 128; + } else if (isSurrogatePair(msg, i)) { + c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF); + res[p++] = (c >> 18) | 240; + res[p++] = ((c >> 12) & 63) | 128; + res[p++] = ((c >> 6) & 63) | 128; + res[p++] = (c & 63) | 128; + } else { + res[p++] = (c >> 12) | 224; + res[p++] = ((c >> 6) & 63) | 128; + res[p++] = (c & 63) | 128; + } + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; +} +exports.toArray = toArray; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +exports.toHex = toHex; + +function htonl(w) { + var res = (w >>> 24) | + ((w >>> 8) & 0xff00) | + ((w << 8) & 0xff0000) | + ((w & 0xff) << 24); + return res >>> 0; +} +exports.htonl = htonl; + +function toHex32(msg, endian) { + var res = ''; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === 'little') + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; +} +exports.toHex32 = toHex32; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +exports.zero2 = zero2; + +function zero8(word) { + if (word.length === 7) + return '0' + word; + else if (word.length === 6) + return '00' + word; + else if (word.length === 5) + return '000' + word; + else if (word.length === 4) + return '0000' + word; + else if (word.length === 3) + return '00000' + word; + else if (word.length === 2) + return '000000' + word; + else if (word.length === 1) + return '0000000' + word; + else + return word; +} +exports.zero8 = zero8; + +function join32(msg, start, end, endian) { + var len = end - start; + assert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === 'big') + w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; + else + w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; + res[i] = w >>> 0; + } + return res; +} +exports.join32 = join32; + +function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === 'big') { + res[k] = m >>> 24; + res[k + 1] = (m >>> 16) & 0xff; + res[k + 2] = (m >>> 8) & 0xff; + res[k + 3] = m & 0xff; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = (m >>> 16) & 0xff; + res[k + 1] = (m >>> 8) & 0xff; + res[k] = m & 0xff; + } + } + return res; +} +exports.split32 = split32; + +function rotr32(w, b) { + return (w >>> b) | (w << (32 - b)); +} +exports.rotr32 = rotr32; + +function rotl32(w, b) { + return (w << b) | (w >>> (32 - b)); +} +exports.rotl32 = rotl32; + +function sum32(a, b) { + return (a + b) >>> 0; +} +exports.sum32 = sum32; + +function sum32_3(a, b, c) { + return (a + b + c) >>> 0; +} +exports.sum32_3 = sum32_3; + +function sum32_4(a, b, c, d) { + return (a + b + c + d) >>> 0; +} +exports.sum32_4 = sum32_4; + +function sum32_5(a, b, c, d, e) { + return (a + b + c + d + e) >>> 0; +} +exports.sum32_5 = sum32_5; + +function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; +} +exports.sum64 = sum64; + +function sum64_hi(ah, al, bh, bl) { + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; +} +exports.sum64_hi = sum64_hi; + +function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; +} +exports.sum64_lo = sum64_lo; + +function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; +} +exports.sum64_4_hi = sum64_4_hi; + +function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; +} +exports.sum64_4_lo = sum64_4_lo; + +function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + lo = (lo + el) >>> 0; + carry += lo < el ? 1 : 0; + + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; +} +exports.sum64_5_hi = sum64_5_hi; + +function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + + return lo >>> 0; +} +exports.sum64_5_lo = sum64_5_lo; + +function rotr64_hi(ah, al, num) { + var r = (al << (32 - num)) | (ah >>> num); + return r >>> 0; +} +exports.rotr64_hi = rotr64_hi; + +function rotr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +} +exports.rotr64_lo = rotr64_lo; + +function shr64_hi(ah, al, num) { + return ah >>> num; +} +exports.shr64_hi = shr64_hi; + +function shr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +} +exports.shr64_lo = shr64_lo; diff --git a/node_modules/hash.js/package.json b/node_modules/hash.js/package.json new file mode 100644 index 0000000..c1a338a --- /dev/null +++ b/node_modules/hash.js/package.json @@ -0,0 +1,35 @@ +{ + "name": "hash.js", + "version": "1.1.7", + "description": "Various hash functions that could be run by both browser and node", + "main": "lib/hash.js", + "typings": "lib/hash.d.ts", + "scripts": { + "test": "mocha --reporter=spec test/*-test.js && npm run lint", + "lint": "eslint lib/*.js lib/**/*.js lib/**/**/*.js test/*.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/hash.js" + }, + "keywords": [ + "hash", + "sha256", + "sha224", + "hmac" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/hash.js/issues" + }, + "homepage": "https://github.com/indutny/hash.js", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + }, + "devDependencies": { + "eslint": "^4.19.1", + "mocha": "^5.2.0" + } +} diff --git a/node_modules/hash.js/test/hash-test.js b/node_modules/hash.js/test/hash-test.js new file mode 100644 index 0000000..f6ca564 --- /dev/null +++ b/node_modules/hash.js/test/hash-test.js @@ -0,0 +1,140 @@ +'use strict'; +/* global describe it */ + +var assert = require('assert'); +var crypto = require('crypto'); +var hash = require('../'); + +describe('Hash', function() { + function test(fn, cases) { + for (var i = 0; i < cases.length; i++) { + var msg = cases[i][0]; + var res = cases[i][1]; + var enc = cases[i][2]; + + var dgst = fn().update(msg, enc).digest('hex'); + assert.equal(dgst, res); + + // Split message + dgst = fn().update(msg.slice(0, 2), enc) + .update(msg.slice(2), enc) + .digest('hex'); + assert.equal(dgst, res); + } + } + + it('should support sha256', function() { + assert.equal(hash.sha256.blockSize, 512); + assert.equal(hash.sha256.outSize, 256); + + test(hash.sha256, [ + [ 'abc', + 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' ], + [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', + '248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1' ], + [ 'deadbeef', + '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953', + 'hex' ], + ]); + }); + + it('should support sha224', function() { + assert.equal(hash.sha224.blockSize, 512); + assert.equal(hash.sha224.outSize, 224); + + test(hash.sha224, [ + [ 'abc', + '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7' ], + [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', + '75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525' ], + [ 'deadbeef', + '55b9eee5f60cc362ddc07676f620372611e22272f60fdbec94f243f8', + 'hex' ], + ]); + }); + + it('should support ripemd160', function() { + assert.equal(hash.ripemd160.blockSize, 512); + assert.equal(hash.ripemd160.outSize, 160); + + test(hash.ripemd160, [ + [ '', '9c1185a5c5e9fc54612808977ee8f548b2258d31'], + [ 'abc', + '8eb208f7e05d987a9b044a8e98c6b087f15a0bfc' ], + [ 'message digest', + '5d0689ef49d2fae572b881b123a85ffa21595f36' ], + [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', + '12a053384a9c0c88e405a06c27dcf49ada62eb2b' ], + [ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', + 'b0e20b6e3116640286ed3a87a5713079b21f5189' ], + ]); + }); + + it('should support sha1', function() { + assert.equal(hash.sha1.blockSize, 512); + assert.equal(hash.sha1.outSize, 160); + + test(hash.sha1, [ + [ '', + 'da39a3ee5e6b4b0d3255bfef95601890afd80709' ], + [ 'abc', + 'a9993e364706816aba3e25717850c26c9cd0d89d' ], + [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', + '84983e441c3bd26ebaae4aa1f95129e5e54670f1' ], + [ 'deadbeef', + 'd78f8bb992a56a597f6c7a1fb918bb78271367eb', + 'hex' ], + ]); + }); + + it('should support sha512', function() { + assert.equal(hash.sha512.blockSize, 1024); + assert.equal(hash.sha512.outSize, 512); + + test(hash.sha512, [ + [ 'abc', + 'ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a' + + '2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f' + ], + [ + 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + + 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', + '8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018' + + '501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909' + ] + ]); + }); + + it('should support sha384', function() { + assert.equal(hash.sha384.blockSize, 1024); + assert.equal(hash.sha384.outSize, 384); + + test(hash.sha384, [ + [ 'abc', + 'cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed' + + '8086072ba1e7cc2358baeca134c825a7' + ], + [ + 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + + 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', + '09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712' + + 'fcc7c71a557e2db966c3e9fa91746039' + ] + ]); + }); + + it('handles utf8 in strings just like crypto', function() { + const algorithm = 'sha256'; + test(hash[algorithm], [ + 'hello', // one byte per character + 'привет', // two bytes per character + '您好', // three bytes per character + '👋', // four bytes per character + 'hello привет 您好 👋!!!' // mixed character lengths + ].map(str => [str, crypto + .createHash(algorithm) + .update(str) + .digest('hex')])); + }); + +}); diff --git a/node_modules/hash.js/test/hmac-test.js b/node_modules/hash.js/test/hmac-test.js new file mode 100644 index 0000000..6fe18e3 --- /dev/null +++ b/node_modules/hash.js/test/hmac-test.js @@ -0,0 +1,62 @@ +'use strict'; +/* global describe it */ + +var assert = require('assert'); +var hash = require('../'); + +describe('Hmac', function() { + describe('mixed test vector', function() { + test({ + name: 'nist 1', + key: '00010203 04050607 08090A0B 0C0D0E0F' + + '10111213 14151617 18191A1B 1C1D1E1F 20212223 24252627' + + '28292A2B 2C2D2E2F 30313233 34353637 38393A3B 3C3D3E3F', + msg: 'Sample message for keylen=blocklen', + res: '8bb9a1db9806f20df7f77b82138c7914d174d59e13dc4d0169c9057b133e1d62' + }); + test({ + name: 'nist 2', + key: '00010203 04050607' + + '08090A0B 0C0D0E0F 10111213 14151617 18191A1B 1C1D1E1F', + msg: 'Sample message for keylen= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); +} +module.exports = HmacDRBG; + +HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this._reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 +}; + +HmacDRBG.prototype._hmac = function hmac() { + return new hash.hmac(this.hash, this.K); +}; + +HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); +}; + +HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils.toArray(entropy, entropyEnc); + add = utils.toArray(add, addEnc); + + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this._reseed = 1; +}; + +HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this._reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils.toArray(add, addEnc || 'hex'); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this._reseed++; + return utils.encode(res, enc); +}; diff --git a/node_modules/hmac-drbg/package.json b/node_modules/hmac-drbg/package.json new file mode 100644 index 0000000..b95d391 --- /dev/null +++ b/node_modules/hmac-drbg/package.json @@ -0,0 +1,32 @@ +{ + "name": "hmac-drbg", + "version": "1.0.1", + "description": "Deterministic random bit generator (hmac)", + "main": "lib/hmac-drbg.js", + "scripts": { + "test": "mocha --reporter=spec test/*-test.js" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/hmac-drbg.git" + }, + "keywords": [ + "hmac", + "drbg", + "prng" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/hmac-drbg/issues" + }, + "homepage": "https://github.com/indutny/hmac-drbg#readme", + "devDependencies": { + "mocha": "^3.2.0" + }, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } +} diff --git a/node_modules/hmac-drbg/test/drbg-test.js b/node_modules/hmac-drbg/test/drbg-test.js new file mode 100644 index 0000000..14fd28a --- /dev/null +++ b/node_modules/hmac-drbg/test/drbg-test.js @@ -0,0 +1,91 @@ +'use strict'; + +const assert = require('assert'); +const HmacDRBG = require('../'); +const hash = require('hash.js'); + +describe('Hmac_DRBG', () => { + it('should support hmac-drbg-sha256', () => { + function doDrbg(opt) { + const drbg = HmacDRBG({ + hash: hash.sha256, + entropy: opt.entropy, + entropyEnc: 'utf8', + nonce: opt.nonce, + nonceEnc: 'utf8', + pers: opt.pers, + persEnc: 'utf8' + }); + return drbg.generate(opt.size, 'hex'); + } + + const test = [ + { + entropy: 'totally random0123456789', + nonce: 'secret nonce', + pers: 'my drbg', + size: 32, + res: '018ec5f8e08c41e5ac974eb129ac297c5388ee1864324fa13d9b15cf98d9a157' + }, + { + entropy: 'totally random0123456789', + nonce: 'secret nonce', + pers: null, + size: 32, + res: 'ed5d61ecf0ef38258e62f03bbb49f19f2cd07ba5145a840d83b134d5963b3633' + } + ]; + for (let i = 0; i < test.length; i++) + assert.equal(doDrbg(test[i]), test[i].res); + }); + + describe('NIST vector', function() { + require('./fixtures/hmac-drbg-nist.json').forEach(function (opt) { + it('should not fail at ' + opt.name, function() { + const drbg = HmacDRBG({ + hash: hash.sha256, + entropy: opt.entropy, + nonce: opt.nonce, + pers: opt.pers + }); + + let last; + for (let i = 0; i < opt.add.length; i++) { + let add = opt.add[i]; + last = drbg.generate(opt.expected.length / 2, 'hex', add); + } + assert.equal(last, opt.expected); + }); + }); + }); + + describe('reseeding', function() { + it('should reseed', function() { + const entropy = 'totally random string with many chars that I typed ' + + 'in agony'; + const nonce = 'nonce'; + const pers = 'pers'; + + const original = HmacDRBG({ + hash: hash.sha256, + entropy, + nonce, + pers + }); + const reseeded = HmacDRBG({ + hash: hash.sha256, + entropy, + nonce, + pers + }); + + assert.strictEqual(original.generate(32, 'hex'), + reseeded.generate(32, 'hex')); + + reseeded.reseed('another absolutely random string'); + + assert.notEqual(original.generate(32, 'hex'), + reseeded.generate(32, 'hex')); + }); + }); +}); diff --git a/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json b/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json new file mode 100644 index 0000000..fce148a --- /dev/null +++ b/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json @@ -0,0 +1,332 @@ +[ + { + "name": "0", + "entropy": "ca851911349384bffe89de1cbdc46e6831e44d34a4fb935ee285dd14b71a7488", + "nonce": "659ba96c601dc69fc902940805ec0ca8", + "pers": null, + "add": [ + null, + null + ], + "expected": "e528e9abf2dece54d47c7e75e5fe302149f817ea9fb4bee6f4199697d04d5b89d54fbb978a15b5c443c9ec21036d2460b6f73ebad0dc2aba6e624abf07745bc107694bb7547bb0995f70de25d6b29e2d3011bb19d27676c07162c8b5ccde0668961df86803482cb37ed6d5c0bb8d50cf1f50d476aa0458bdaba806f48be9dcb8" + }, + { + "name": "1", + "entropy": "79737479ba4e7642a221fcfd1b820b134e9e3540a35bb48ffae29c20f5418ea3", + "nonce": "3593259c092bef4129bc2c6c9e19f343", + "pers": null, + "add": [ + null, + null + ], + "expected": "cf5ad5984f9e43917aa9087380dac46e410ddc8a7731859c84e9d0f31bd43655b924159413e2293b17610f211e09f770f172b8fb693a35b85d3b9e5e63b1dc252ac0e115002e9bedfb4b5b6fd43f33b8e0eafb2d072e1a6fee1f159df9b51e6c8da737e60d5032dd30544ec51558c6f080bdbdab1de8a939e961e06b5f1aca37" + }, + { + "name": "2", + "entropy": "b340907445b97a8b589264de4a17c0bea11bb53ad72f9f33297f05d2879d898d", + "nonce": "65cb27735d83c0708f72684ea58f7ee5", + "pers": null, + "add": [ + null, + null + ], + "expected": "75183aaaf3574bc68003352ad655d0e9ce9dd17552723b47fab0e84ef903694a32987eeddbdc48efd24195dbdac8a46ba2d972f5808f23a869e71343140361f58b243e62722088fe10a98e43372d252b144e00c89c215a76a121734bdc485486f65c0b16b8963524a3a70e6f38f169c12f6cbdd169dd48fe4421a235847a23ff" + }, + { + "name": "3", + "entropy": "8e159f60060a7d6a7e6fe7c9f769c30b98acb1240b25e7ee33f1da834c0858e7", + "nonce": "c39d35052201bdcce4e127a04f04d644", + "pers": null, + "add": [ + null, + null + ], + "expected": "62910a77213967ea93d6457e255af51fc79d49629af2fccd81840cdfbb4910991f50a477cbd29edd8a47c4fec9d141f50dfde7c4d8fcab473eff3cc2ee9e7cc90871f180777a97841597b0dd7e779eff9784b9cc33689fd7d48c0dcd341515ac8fecf5c55a6327aea8d58f97220b7462373e84e3b7417a57e80ce946d6120db5" + }, + { + "name": "4", + "entropy": "74755f196305f7fb6689b2fe6835dc1d81484fc481a6b8087f649a1952f4df6a", + "nonce": "c36387a544a5f2b78007651a7b74b749", + "pers": null, + "add": [ + null, + null + ], + "expected": "b2896f3af4375dab67e8062d82c1a005ef4ed119d13a9f18371b1b873774418684805fd659bfd69964f83a5cfe08667ddad672cafd16befffa9faed49865214f703951b443e6dca22edb636f3308380144b9333de4bcb0735710e4d9266786342fc53babe7bdbe3c01a3addb7f23c63ce2834729fabbd419b47beceb4a460236" + }, + { + "name": "5", + "entropy": "4b222718f56a3260b3c2625a4cf80950b7d6c1250f170bd5c28b118abdf23b2f", + "nonce": "7aed52d0016fcaef0b6492bc40bbe0e9", + "pers": null, + "add": [ + null, + null + ], + "expected": "a6da029b3665cd39fd50a54c553f99fed3626f4902ffe322dc51f0670dfe8742ed48415cf04bbad5ed3b23b18b7892d170a7dcf3ef8052d5717cb0c1a8b3010d9a9ea5de70ae5356249c0e098946030c46d9d3d209864539444374d8fbcae068e1d6548fa59e6562e6b2d1acbda8da0318c23752ebc9be0c1c1c5b3cf66dd967" + }, + { + "name": "6", + "entropy": "b512633f27fb182a076917e39888ba3ff35d23c3742eb8f3c635a044163768e0", + "nonce": "e2c39b84629a3de5c301db5643af1c21", + "pers": null, + "add": [ + null, + null + ], + "expected": "fb931d0d0194a97b48d5d4c231fdad5c61aedf1c3a55ac24983ecbf38487b1c93396c6b86ff3920cfa8c77e0146de835ea5809676e702dee6a78100da9aa43d8ec0bf5720befa71f82193205ac2ea403e8d7e0e6270b366dc4200be26afd9f63b7e79286a35c688c57cbff55ac747d4c28bb80a2b2097b3b62ea439950d75dff" + }, + { + "name": "7", + "entropy": "aae3ffc8605a975befefcea0a7a286642bc3b95fb37bd0eb0585a4cabf8b3d1e", + "nonce": "9504c3c0c4310c1c0746a036c91d9034", + "pers": null, + "add": [ + null, + null + ], + "expected": "2819bd3b0d216dad59ddd6c354c4518153a2b04374b07c49e64a8e4d055575dfbc9a8fcde68bd257ff1ba5c6000564b46d6dd7ecd9c5d684fd757df62d85211575d3562d7814008ab5c8bc00e7b5a649eae2318665b55d762de36eba00c2906c0e0ec8706edb493e51ca5eb4b9f015dc932f262f52a86b11c41e9a6d5b3bd431" + }, + { + "name": "8", + "entropy": "b9475210b79b87180e746df704b3cbc7bf8424750e416a7fbb5ce3ef25a82cc6", + "nonce": "24baf03599c10df6ef44065d715a93f7", + "pers": null, + "add": [ + null, + null + ], + "expected": "ae12d784f796183c50db5a1a283aa35ed9a2b685dacea97c596ff8c294906d1b1305ba1f80254eb062b874a8dfffa3378c809ab2869aa51a4e6a489692284a25038908a347342175c38401193b8afc498077e10522bec5c70882b7f760ea5946870bd9fc72961eedbe8bff4fd58c7cc1589bb4f369ed0d3bf26c5bbc62e0b2b2" + }, + { + "name": "9", + "entropy": "27838eb44ceccb4e36210703ebf38f659bc39dd3277cd76b7a9bcd6bc964b628", + "nonce": "39cfe0210db2e7b0eb52a387476e7ea1", + "pers": null, + "add": [ + null, + null + ], + "expected": "e5e72a53605d2aaa67832f97536445ab774dd9bff7f13a0d11fd27bf6593bfb52309f2d4f09d147192199ea584503181de87002f4ee085c7dc18bf32ce5315647a3708e6f404d6588c92b2dda599c131aa350d18c747b33dc8eda15cf40e95263d1231e1b4b68f8d829f86054d49cfdb1b8d96ab0465110569c8583a424a099a" + }, + { + "name": "10", + "entropy": "d7129e4f47008ad60c9b5d081ff4ca8eb821a6e4deb91608bf4e2647835373a5", + "nonce": "a72882773f78c2fc4878295840a53012", + "pers": null, + "add": [ + null, + null + ], + "expected": "0cbf48585c5de9183b7ff76557f8fc9ebcfdfde07e588a8641156f61b7952725bbee954f87e9b937513b16bba0f2e523d095114658e00f0f3772175acfcb3240a01de631c19c5a834c94cc58d04a6837f0d2782fa53d2f9f65178ee9c837222494c799e64c60406069bd319549b889fa00a0032dd7ba5b1cc9edbf58de82bfcd" + }, + { + "name": "11", + "entropy": "67fe5e300c513371976c80de4b20d4473889c9f1214bce718bc32d1da3ab7532", + "nonce": "e256d88497738a33923aa003a8d7845c", + "pers": null, + "add": [ + null, + null + ], + "expected": "b44660d64ef7bcebc7a1ab71f8407a02285c7592d755ae6766059e894f694373ed9c776c0cfc8594413eefb400ed427e158d687e28da3ecc205e0f7370fb089676bbb0fa591ec8d916c3d5f18a3eb4a417120705f3e2198154cd60648dbfcfc901242e15711cacd501b2c2826abe870ba32da785ed6f1fdc68f203d1ab43a64f" + }, + { + "name": "12", + "entropy": "de8142541255c46d66efc6173b0fe3ffaf5936c897a3ce2e9d5835616aafa2cb", + "nonce": "d01f9002c407127bc3297a561d89b81d", + "pers": null, + "add": [ + null, + null + ], + "expected": "64d1020929d74716446d8a4e17205d0756b5264867811aa24d0d0da8644db25d5cde474143c57d12482f6bf0f31d10af9d1da4eb6d701bdd605a8db74fb4e77f79aaa9e450afda50b18d19fae68f03db1d7b5f1738d2fdce9ad3ee9461b58ee242daf7a1d72c45c9213eca34e14810a9fca5208d5c56d8066bab1586f1513de7" + }, + { + "name": "13", + "entropy": "4a8e0bd90bdb12f7748ad5f147b115d7385bb1b06aee7d8b76136a25d779bcb7", + "nonce": "7f3cce4af8c8ce3c45bdf23c6b181a00", + "pers": null, + "add": [ + null, + null + ], + "expected": "320c7ca4bbeb7af977bc054f604b5086a3f237aa5501658112f3e7a33d2231f5536d2c85c1dad9d9b0bf7f619c81be4854661626839c8c10ae7fdc0c0b571be34b58d66da553676167b00e7d8e49f416aacb2926c6eb2c66ec98bffae20864cf92496db15e3b09e530b7b9648be8d3916b3c20a3a779bec7d66da63396849aaf" + }, + { + "name": "14", + "entropy": "451ed024bc4b95f1025b14ec3616f5e42e80824541dc795a2f07500f92adc665", + "nonce": "2f28e6ee8de5879db1eccd58c994e5f0", + "pers": null, + "add": [ + null, + null + ], + "expected": "3fb637085ab75f4e95655faae95885166a5fbb423bb03dbf0543be063bcd48799c4f05d4e522634d9275fe02e1edd920e26d9accd43709cb0d8f6e50aa54a5f3bdd618be23cf73ef736ed0ef7524b0d14d5bef8c8aec1cf1ed3e1c38a808b35e61a44078127c7cb3a8fd7addfa50fcf3ff3bc6d6bc355d5436fe9b71eb44f7fd" + }, + { + "name": "0 with additional data", + "entropy": "d3cc4d1acf3dde0c4bd2290d262337042dc632948223d3a2eaab87da44295fbd", + "nonce": "0109b0e729f457328aa18569a9224921", + "pers": null, + "add": [ + "3c311848183c9a212a26f27f8c6647e40375e466a0857cc39c4e47575d53f1f6", + "fcb9abd19ccfbccef88c9c39bfb3dd7b1c12266c9808992e305bc3cff566e4e4" + ], + "expected": "9c7b758b212cd0fcecd5daa489821712e3cdea4467b560ef5ddc24ab47749a1f1ffdbbb118f4e62fcfca3371b8fbfc5b0646b83e06bfbbab5fac30ea09ea2bc76f1ea568c9be0444b2cc90517b20ca825f2d0eccd88e7175538b85d90ab390183ca6395535d34473af6b5a5b88f5a59ee7561573337ea819da0dcc3573a22974" + }, + { + "name": "1 with additional data", + "entropy": "f97a3cfd91faa046b9e61b9493d436c4931f604b22f1081521b3419151e8ff06", + "nonce": "11f3a7d43595357d58120bd1e2dd8aed", + "pers": null, + "add": [ + "517289afe444a0fe5ed1a41dbbb5eb17150079bdd31e29cf2ff30034d8268e3b", + "88028d29ef80b4e6f0fe12f91d7449fe75062682e89c571440c0c9b52c42a6e0" + ], + "expected": "c6871cff0824fe55ea7689a52229886730450e5d362da5bf590dcf9acd67fed4cb32107df5d03969a66b1f6494fdf5d63d5b4d0d34ea7399a07d0116126d0d518c7c55ba46e12f62efc8fe28a51c9d428e6d371d7397ab319fc73ded4722e5b4f30004032a6128df5e7497ecf82ca7b0a50e867ef6728a4f509a8c859087039c" + }, + { + "name": "2 with additional data", + "entropy": "0f2f23d64f481cabec7abb01db3aabf125c3173a044b9bf26844300b69dcac8b", + "nonce": "9a5ae13232b43aa19cfe8d7958b4b590", + "pers": null, + "add": [ + "ec4c7a62acab73385f567da10e892ff395a0929f959231a5628188ce0c26e818", + "6b97b8c6b6bb8935e676c410c17caa8042aa3145f856d0a32b641e4ae5298648" + ], + "expected": "7480a361058bd9afa3db82c9d7586e42269102013f6ec5c269b6d05f17987847748684766b44918fd4b65e1648622fc0e0954178b0279dfc9fa99b66c6f53e51c4860131e9e0644287a4afe4ca8e480417e070db68008a97c3397e4b320b5d1a1d7e1d18a95cfedd7d1e74997052bf649d132deb9ec53aae7dafdab55e6dae93" + }, + { + "name": "3 with additional data", + "entropy": "53c56660c78481be9c63284e005fcc14fbc7fb27732c9bf1366d01a426765a31", + "nonce": "dc7a14d0eb5b0b3534e717a0b3c64614", + "pers": null, + "add": [ + "3aa848706ecb877f5bedf4ffc332d57c22e08747a47e75cff6f0fd1316861c95", + "9a401afa739b8f752fddacd291e0b854f5eff4a55b515e20cb319852189d3722" + ], + "expected": "5c0eb420e0bf41ce9323e815310e4e8303cd677a8a8b023f31f0d79f0ca15aeb636099a369fd074d69889865eac1b72ab3cbfebdb8cf460b00072802e2ec648b1349a5303be4ccaadd729f1a9ea17482fd026aaeb93f1602bc1404b9853adde40d6c34b844cf148bc088941ecfc1642c8c0b9778e45f3b07e06e21ee2c9e0300" + }, + { + "name": "4 with additional data", + "entropy": "f63c804404902db334c54bb298fc271a21d7acd9f770278e089775710bf4fdd7", + "nonce": "3e45009ea9cb2a36ba1aa4bf39178200", + "pers": null, + "add": [ + "d165a13dc8cc43f3f0952c3f5d3de4136954d983683d4a3e6d2dc4c89bf23423", + "75106bc86d0336df85097f6af8e80e2da59046a03fa65b06706b8bbc7ffc6785" + ], + "expected": "6363139bba32c22a0f5cd23ca6d437b5669b7d432f786b8af445471bee0b2d24c9d5f2f93717cbe00d1f010cc3b9c515fc9f7336d53d4d26ba5c0d76a90186663c8582eb739c7b6578a3328bf68dc2cec2cd89b3a90201f6993adcc854df0f5c6974d0f5570765a15fe03dbce28942dd2fd16ba2027e68abac83926969349af8" + }, + { + "name": "5 with additional data", + "entropy": "2aaca9147da66c176615726b69e3e851cc3537f5f279fe7344233d8e44cfc99d", + "nonce": "4e171f080af9a6081bee9f183ac9e340", + "pers": null, + "add": [ + "d75a2a6eb66c3833e50f5ec3d2e434cf791448d618026d0c360806d120ded669", + "b643b74c15b37612e6577ed7ca2a4c67a78d560af9eb50a4108fca742e87b8d6" + ], + "expected": "501dcdc977f4ba856f24eaa4968b374bebb3166b280334cb510232c31ebffde10fa47b7840ef3fe3b77725c2272d3a1d4219baf23e0290c622271edcced58838cf428f0517425d2e19e0d8c89377eecfc378245f283236fafa466c914b99672ceafab369e8889a0c866d8bd639db9fb797254262c6fd44cfa9045ad6340a60ef" + }, + { + "name": "6 with additional data", + "entropy": "a2e4cd48a5cf918d6f55942d95fcb4e8465cdc4f77b7c52b6fae5b16a25ca306", + "nonce": "bef036716440db6e6d333d9d760b7ca8", + "pers": null, + "add": [ + "bfa591c7287f3f931168f95e38869441d1f9a11035ad8ea625bb61b9ea17591c", + "c00c735463bca215adc372cb892b05e939bf669583341c06d4e31d0e5b363a37" + ], + "expected": "e7d136af69926a5421d4266ee0420fd729f2a4f7c295d3c966bdfa05268180b508b8a2852d1b3a06fd2ab3e13c54005123ef319f42d0c6d3a575e6e7e1496cb28aacadbcf83740fba8f35fcee04bb2ed8a51db3d3362b01094a62fb57e33c99a432f29fce6676cffbbcc05107e794e75e44a02d5e6d9d748c5fbff00a0178d65" + }, + { + "name": "7 with additional data", + "entropy": "95a67771cba69011a79776e713145d309edae56fad5fd6d41d83eaff89df6e5e", + "nonce": "be5b5164e31ecc51ba6f7c3c5199eb33", + "pers": null, + "add": [ + "065f693b229a7c4fd373cd15b3807552dd9bf98c5485cef361949d4e7d774b53", + "9afb62406f0e812c4f156d58b19a656c904813c1b4a45a0029ae7f50731f8014" + ], + "expected": "f61b61a6e79a41183e8ed6647899d2dc85cdaf5c3abf5c7f3bf37685946dc28f4923dc842f2d4326bd6ce0d50a84cb3ba869d72a36e246910eba6512ba36cd7ed3a5437c9245b00a344308c792b668b458d3c3e16dee2fbec41867da31084d46d8ec168de2148ef64fc5b72069abf5a6ada1ead2b7146bb793ff1c9c3690fa56" + }, + { + "name": "8 with additional data", + "entropy": "a459e1815cbca4514ec8094d5ab2414a557ba6fe10e613c345338d0521e4bf90", + "nonce": "62221392e2552e76cd0d36df6e6068eb", + "pers": null, + "add": [ + "0a3642b02b23b3ef62c701a63401124022f5b896de86dab6e6c7451497aa1dcc", + "c80514865901371c45ba92d9f95d50bb7c9dd1768cb3dfbc45b968da94965c6e" + ], + "expected": "464e6977b8adaef307c9623e41c357013249c9ffd77f405f3925cebb69f151ce8fbb6a277164002aee7858fc224f6499042aa1e6322deee9a5d133c31d640e12a7487c731ba03ad866a24675badb1d79220c40be689f79c2a0be93cb4dada3e0eac4ab140cb91998b6f11953e68f2319b050c40f71c34de9905ae41b2de1c2f6" + }, + { + "name": "9 with additional data", + "entropy": "252c2cad613e002478162861880979ee4e323025eebb6fb2e0aa9f200e28e0a1", + "nonce": "d001bc9a8f2c8c242e4369df0c191989", + "pers": null, + "add": [ + "9bcfc61cb2bc000034bb3db980eb47c76fb5ecdd40553eff113368d639b947fd", + "8b0565c767c2610ee0014582e9fbecb96e173005b60e9581503a6dca5637a26e" + ], + "expected": "e96c15fe8a60692b0a7d67171e0195ff6e1c87aab844221e71700d1bbee75feea695f6a740c9760bbe0e812ecf4061d8f0955bc0195e18c4fd1516ebca50ba6a6db86881737dbab8321707675479b87611db6af2c97ea361a5484555ead454defb1a64335de964fc803d40f3a6f057893d2afc25725754f4f00abc51920743dc" + }, + { + "name": "10 with additional data", + "entropy": "8be0ca6adc8b3870c9d69d6021bc1f1d8eb9e649073d35ee6c5aa0b7e56ad8a5", + "nonce": "9d1265f7d51fdb65377f1e6edd6ae0e4", + "pers": null, + "add": [ + "da86167ac997c406bb7979f423986a84ec6614d6caa7afc10aff0699a9b2cf7f", + "e4baa3c555950b53e2bfdba480cb4c94b59381bac1e33947e0c22e838a9534cf" + ], + "expected": "64384ecc4ea6b458efc227ca697eac5510092265520c0a0d8a0ccf9ed3ca9d58074671188c6a7ad16d0b050cdc072c125d7298d3a31d9f044a9ee40da0089a84fea28cc7f05f1716db952fad29a0e779635cb7a912a959be67be2f0a4170aace2981802e2ff6467e5b46f0ffbff3b42ba5935fd553c82482ac266acf1cd247d7" + }, + { + "name": "11 with additional data", + "entropy": "d43a75b6adf26d60322284cb12ac38327792442aa8f040f60a2f331b33ac4a8f", + "nonce": "0682f8b091f811afacaacaec9b04d279", + "pers": null, + "add": [ + "7fd3b8f512940da7de5d80199d9a7b42670c04a945775a3dba869546cbb9bc65", + "2575db20bc7aafc2a90a5dabab760db851d754777bc9f05616af1858b24ff3da" + ], + "expected": "0da7a8dc73c163014bf0841913d3067806456bbca6d5de92b85534c6545467313648d71ef17c923d090dc92cff8d4d1a9a2bb63e001dc2e8ab1a597999be3d6cf70ff63fee9985801395fbd4f4990430c4259fcae4fa1fcd73dc3187ccc102d04af7c07532885e5a226fc42809c48f22eecf4f6ab996ae4fcb144786957d9f41" + }, + { + "name": "12 with additional data", + "entropy": "64352f236af5d32067a529a8fd05ba00a338c9de306371a0b00c36e610a48d18", + "nonce": "df99ed2c7608c870624b962a5dc68acd", + "pers": null, + "add": [ + "da416335e7aaf60cf3d06fb438735ce796aad09034f8969c8f8c3f81e32fef24", + "a28c07c21a2297311adf172c19e83ca0a87731bdffb80548978d2d1cd82cf8a3" + ], + "expected": "132b9f25868729e3853d3c51f99a3b5fae6d4204bea70890daf62e042b776a526c8fb831b80a6d5d3f153237df1fd39b6fd9137963f5516d9cdd4e3f9195c46e9972c15d3edc6606e3368bde1594977fb88d0ca6e6f5f3d057ccadc7d7dab77dfc42658a1e972aa446b20d418286386a52dfc1c714d2ac548713268b0b709729" + }, + { + "name": "13 with additional data", + "entropy": "282f4d2e05a2cd30e9087f5633089389449f04bac11df718c90bb351cd3653a5", + "nonce": "90a7daf3c0de9ea286081efc4a684dfb", + "pers": null, + "add": [ + "2630b4ccc7271cc379cb580b0aaede3d3aa8c1c7ba002cf791f0752c3d739007", + "c31d69de499f1017be44e3d4fa77ecebc6a9b9934749fcf136f267b29115d2cc" + ], + "expected": "c899094520e0197c37b91dd50778e20a5b950decfb308d39f1db709447ae48f6101d9abe63a783fbb830eec1d359a5f61a2013728966d349213ee96382614aa4135058a967627183810c6622a2158cababe3b8ab99169c89e362108bf5955b4ffc47440f87e4bad0d36bc738e737e072e64d8842e7619f1be0af1141f05afe2d" + }, + { + "name": "14 with additional data", + "entropy": "13c752b9e745ce77bbc7c0dbda982313d3fe66f903e83ebd8dbe4ff0c11380e9", + "nonce": "f1a533095d6174164bd7c82532464ae7", + "pers": null, + "add": [ + "4f53db89b9ba7fc00767bc751fb8f3c103fe0f76acd6d5c7891ab15b2b7cf67c", + "582c2a7d34679088cca6bd28723c99aac07db46c332dc0153d1673256903b446" + ], + "expected": "6311f4c0c4cd1f86bd48349abb9eb930d4f63df5e5f7217d1d1b91a71d8a6938b0ad2b3e897bd7e3d8703db125fab30e03464fad41e5ddf5bf9aeeb5161b244468cfb26a9d956931a5412c97d64188b0da1bd907819c686f39af82e91cfeef0cbffb5d1e229e383bed26d06412988640706815a6e820796876f416653e464961" + } +] diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js new file mode 100644 index 0000000..f71f2d9 --- /dev/null +++ b/node_modules/inherits/inherits.js @@ -0,0 +1,9 @@ +try { + var util = require('util'); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = require('./inherits_browser.js'); +} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..86bbb3d --- /dev/null +++ b/node_modules/inherits/inherits_browser.js @@ -0,0 +1,27 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json new file mode 100644 index 0000000..37b4366 --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,29 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.4", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", + "scripts": { + "test": "tap" + }, + "devDependencies": { + "tap": "^14.2.4" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ] +} diff --git a/node_modules/js-sha3/CHANGELOG.md b/node_modules/js-sha3/CHANGELOG.md new file mode 100644 index 0000000..0812bdd --- /dev/null +++ b/node_modules/js-sha3/CHANGELOG.md @@ -0,0 +1,106 @@ +# Change Log + +## v0.8.0 / 2018-08-05 +### Added +- TypeScript definitions. + +### Changed +- throw error if update after finalize + +## v0.7.0 / 2017-12-01 +### Added +- AMD support. +- support for web worker. #13 + +### Changed +- throw error if input type is incorrect when cSHAKE and KMAC. +- freeze hash after finalize. + +## v0.6.1 / 2017-07-03 +### Fixed +- Typo on variable kmac_256 type definition. #12 + +## v0.6.0 / 2017-06-15 +### Added +- cSHAKE method. +- KMAC method. +- alias methods without underscore like shake128, keccak512. + +### Changed +- throw error if input type is incorrect. + +## v0.5.7 / 2016-12-30 +### Fixed +- ArrayBuffer detection in old browsers. + +## v0.5.6 / 2016-12-29 +### Fixed +- ArrayBuffer dosen't work in Webpack. + +## v0.5.5 / 2016-09-26 +### Added +- TypeScript support. +- ArrayBuffer method. + +### Deprecated +- Buffer method. + +## v0.5.4 / 2016-09-12 +### Fixed +- CommonJS detection. + +## v0.5.3 / 2016-09-08 +### Added +- Some missing files to npm package. + +## v0.5.2 / 2016-06-06 +### Fixed +- Shake output incorrect in the special length. + +## v0.5.1 / 2015-10-27 +### Fixed +- Version in package.json and bower.json. + +## v0.5.0 / 2015-09-23 +### Added +- Hash object with create/update interface. + +## v0.4.1 / 2015-09-18 +### Added +- Integer array output. + +### Fixed +- Shake output incorrect when it's greater than 1088. + +## v0.4.0 / 2015-09-17 +### Added +- ArrayBuffer output. +- Shake alogirthms. + +## v0.3.1 / 2015-05-22 +### Fixed +- Some bugs. + +## v0.3.0 / 2015-05-21 +### Added +- Integer array input. +- ArrayBuffer input. + +## v0.2.0 / 2015-04-04 +### Added +- NIST's May 2014 SHA-3 version. + +### Changed +- Rename original methods to keccak. + +## v0.1.2 / 2015-02-27 +### Changed +- Improve performance. + +## v0.1.1 / 2015-02-26 +### Changed +- Improve performance. + +## v0.1.0 / 2015-02-23 +### Added +- First version implementation. diff --git a/node_modules/js-sha3/LICENSE.txt b/node_modules/js-sha3/LICENSE.txt new file mode 100644 index 0000000..968ee90 --- /dev/null +++ b/node_modules/js-sha3/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2015-2018 Chen, Yi-Cyuan + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/js-sha3/README.md b/node_modules/js-sha3/README.md new file mode 100644 index 0000000..a675ae7 --- /dev/null +++ b/node_modules/js-sha3/README.md @@ -0,0 +1,241 @@ +# js-sha3 + +[![Build Status](https://travis-ci.org/emn178/js-sha3.svg?branch=master)](https://travis-ci.org/emn178/js-sha3) +[![Coverage Status](https://coveralls.io/repos/emn178/js-sha3/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-sha3?branch=master) +[![NPM](https://nodei.co/npm/js-sha3.png?stars&downloads)](https://nodei.co/npm/js-sha3/) + +A simple SHA-3 / Keccak / Shake hash function for JavaScript supports UTF-8 encoding. + +## Notice +* v0.8.0+ will throw an error if try to update hash after finalize. +* Sha3 methods has been renamed to keccak since v0.2.0. It means that sha3 methods of v0.1.x are equal to keccak methods of v0.2.x and later. +* `buffer` method is deprecated. This maybe confuse with Buffer in node.js. Please use `arrayBuffer` instead. + +## Demo +[SHA3-512 Online](http://emn178.github.io/online-tools/sha3_512.html) +[SHA3-384 Online](http://emn178.github.io/online-tools/sha3_384.html) +[SHA3-256 Online](http://emn178.github.io/online-tools/sha3_256.html) +[SHA3-224 Online](http://emn178.github.io/online-tools/sha3_224.html) +[Keccak-512 Online](http://emn178.github.io/online-tools/keccak_512.html) +[Keccak-384 Online](http://emn178.github.io/online-tools/keccak_384.html) +[Keccak-256 Online](http://emn178.github.io/online-tools/keccak_256.html) +[Keccak-224 Online](http://emn178.github.io/online-tools/keccak_224.html) +[Shake128 Online](http://emn178.github.io/online-tools/shake_128.html) +[Shake256 Online](http://emn178.github.io/online-tools/shake_256.html) + +## Download +[Compress](https://raw.github.com/emn178/js-sha3/master/build/sha3.min.js) +[Uncompress](https://raw.github.com/emn178/js-sha3/master/src/sha3.js) + +## Installation +You can also install js-sha3 by using Bower. + + bower install js-sha3 + +For node.js, you can use this command to install: + + npm install js-sha3 + +## Usage +You could use like this: +```JavaScript +sha3_512('Message to hash'); +sha3_384('Message to hash'); +sha3_256('Message to hash'); +sha3_224('Message to hash'); +keccak512('Message to hash'); +keccak384('Message to hash'); +keccak256('Message to hash'); +keccak224('Message to hash'); +shake128('Message to hash', 256); +shake256('Message to hash', 512); +cshake128('Message to hash', 256, 'function name', 'customization'); +cshake256('Message to hash', 512, 'function name', 'customization'); +kmac128('key', 'Message to hash', 256, 'customization'); +kmac256('key', 'Message to hash', 512, 'customization'); + +// Support ArrayBuffer output +var arrayBuffer = keccak224.arrayBuffer('Message to hash'); + +// Support Array output +var bytes = keccak224.digest('Message to hash'); +var bytes = keccak224.array('Message to hash'); + +// update hash +sha3_512.update('Message ').update('to ').update('hash').hex(); +// specify shake output bits at first update +shake128.update('Message ', 256).update('to ').update('hash').hex(); + +// or to use create +var hash = sha3_512.create(); +hash.update('...'); +hash.update('...'); +hash.hex(); + +// specify shake output bits when creating +var hash = shake128.create(256); +hash.update('...'); +hash.update('...'); +hash.hex(); + +// specify cshake output bits, function name and customization when creating +var hash = cshake128.create(256, 'function name', 'customization'); + +// specify kmac key, output bits and customization when creating +var hash = kmac128.create('key', 256, 'customization'); +``` +If you use node.js, you should require the module first: +```JavaScript +sha3_512 = require('js-sha3').sha3_512; +sha3_384 = require('js-sha3').sha3_384; +sha3_256 = require('js-sha3').sha3_256; +sha3_224 = require('js-sha3').sha3_224; +keccak512 = require('js-sha3').keccak512; +keccak384 = require('js-sha3').keccak384; +keccak256 = require('js-sha3').keccak256; +keccak224 = require('js-sha3').keccak224; +shake128 = require('js-sha3').shake128; +shake256 = require('js-sha3').shake256; +cshake128 = require('js-sha3').cshake128; +cshake256 = require('js-sha3').cshake256; +kmac128 = require('js-sha3').kmac128; +kmac256 = require('js-sha3').kmac256; +``` +If you use TypeScript, you can import like this: +```TypeScript +import { sha3_512 } from 'js-sha3'; +``` + +## Example +Code +```JavaScript +sha3_512(''); +// a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26 + +sha3_512('The quick brown fox jumps over the lazy dog'); +// 01dedd5de4ef14642445ba5f5b97c15e47b9ad931326e4b0727cd94cefc44fff23f07bf543139939b49128caf436dc1bdee54fcb24023a08d9403f9b4bf0d450 + +sha3_512('The quick brown fox jumps over the lazy dog.'); +// 18f4f4bd419603f95538837003d9d254c26c23765565162247483f65c50303597bc9ce4d289f21d1c2f1f458828e33dc442100331b35e7eb031b5d38ba6460f8 + +sha3_384(''); +// 0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004 + +sha3_384('The quick brown fox jumps over the lazy dog'); +// 7063465e08a93bce31cd89d2e3ca8f602498696e253592ed26f07bf7e703cf328581e1471a7ba7ab119b1a9ebdf8be41 + +sha3_384('The quick brown fox jumps over the lazy dog.'); +// 1a34d81695b622df178bc74df7124fe12fac0f64ba5250b78b99c1273d4b080168e10652894ecad5f1f4d5b965437fb9 + +sha3_256(''); +// a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a + +sha3_256('The quick brown fox jumps over the lazy dog'); +// 69070dda01975c8c120c3aada1b282394e7f032fa9cf32f4cb2259a0897dfc04 + +sha3_256('The quick brown fox jumps over the lazy dog.'); +// a80f839cd4f83f6c3dafc87feae470045e4eb0d366397d5c6ce34ba1739f734d + +sha3_224(''); +// 6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7 + +sha3_224('The quick brown fox jumps over the lazy dog'); +// d15dadceaa4d5d7bb3b48f446421d542e08ad8887305e28d58335795 + +sha3_224('The quick brown fox jumps over the lazy dog.'); +// 2d0708903833afabdd232a20201176e8b58c5be8a6fe74265ac54db0 + +keccak512(''); +// 0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e + +keccak512('The quick brown fox jumps over the lazy dog'); +// d135bb84d0439dbac432247ee573a23ea7d3c9deb2a968eb31d47c4fb45f1ef4422d6c531b5b9bd6f449ebcc449ea94d0a8f05f62130fda612da53c79659f609 + +keccak512('The quick brown fox jumps over the lazy dog.'); +// ab7192d2b11f51c7dd744e7b3441febf397ca07bf812cceae122ca4ded6387889064f8db9230f173f6d1ab6e24b6e50f065b039f799f5592360a6558eb52d760 + +keccak384(''); +// 2c23146a63a29acf99e73b88f8c24eaa7dc60aa771780ccc006afbfa8fe2479b2dd2b21362337441ac12b515911957ff + +keccak384('The quick brown fox jumps over the lazy dog'); +// 283990fa9d5fb731d786c5bbee94ea4db4910f18c62c03d173fc0a5e494422e8a0b3da7574dae7fa0baf005e504063b3 + +keccak384('The quick brown fox jumps over the lazy dog.'); +// 9ad8e17325408eddb6edee6147f13856ad819bb7532668b605a24a2d958f88bd5c169e56dc4b2f89ffd325f6006d820b + +keccak256(''); +// c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 + +keccak256('The quick brown fox jumps over the lazy dog'); +// 4d741b6f1eb29cb2a9b9911c82f56fa8d73b04959d3d9d222895df6c0b28aa15 + +keccak256('The quick brown fox jumps over the lazy dog.'); +// 578951e24efd62a3d63a86f7cd19aaa53c898fe287d2552133220370240b572d + +keccak224(''); +// f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd + +keccak224('The quick brown fox jumps over the lazy dog'); +// 310aee6b30c47350576ac2873fa89fd190cdc488442f3ef654cf23fe + +keccak224('The quick brown fox jumps over the lazy dog.'); +// c59d4eaeac728671c635ff645014e2afa935bebffdb5fbd207ffdeab + +shake128('', 256); +// 7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26 + +shake256('', 512); +// 46b9dd2b0ba88d13233b3feb743eeb243fcd52ea62b81b82b50c27646ed5762fd75dc4ddd8c0f200cb05019d67b592f6fc821c49479ab48640292eacb3b7c4be +``` +It also supports UTF-8 encoding: + +Code +```JavaScript +sha3_512('中文'); +// 059bbe2efc50cc30e4d8ec5a96be697e2108fcbf9193e1296192eddabc13b143c0120d059399a13d0d42651efe23a6c1ce2d1efb576c5b207fa2516050505af7 + +sha3_384('中文'); +// 9fb5b99e3c546f2738dcd50a14e9aef9c313800c1bf8cf76bc9b2c3a23307841364c5a2d0794702662c5796fb72f5432 + +sha3_256('中文'); +// ac5305da3d18be1aed44aa7c70ea548da243a59a5fd546f489348fd5718fb1a0 + +sha3_224('中文'); +// 106d169e10b61c2a2a05554d3e631ec94467f8316640f29545d163ee + +keccak512('中文'); +// 2f6a1bd50562230229af34b0ccf46b8754b89d23ae2c5bf7840b4acfcef86f87395edc0a00b2bfef53bafebe3b79de2e3e01cbd8169ddbb08bde888dcc893524 + +keccak384('中文'); +// 743f64bb7544c6ed923be4741b738dde18b7cee384a3a09c4e01acaaac9f19222cdee137702bd3aa05dc198373d87d6c + +keccak256('中文'); +// 70a2b6579047f0a977fcb5e9120a4e07067bea9abb6916fbc2d13ffb9a4e4eee + +keccak224('中文'); +// f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd +``` + +It also supports byte `Array`, `Uint8Array`, `ArrayBuffer` input: + +Code +```JavaScript +sha3_512([]); +// a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26 + +sha3_512(new Uint8Array([])); +// a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26 + +// ... +``` + +## Benchmark +[UTF8](http://jsperf.com/sha3/5) +[ASCII](http://jsperf.com/sha3/4) + +## License +The project is released under the [MIT license](http://www.opensource.org/licenses/MIT). + +## Contact +The project's website is located at https://github.com/emn178/js-sha3 +Author: Chen, Yi-Cyuan (emn178@gmail.com) diff --git a/node_modules/js-sha3/build/sha3.min.js b/node_modules/js-sha3/build/sha3.min.js new file mode 100644 index 0000000..965b779 --- /dev/null +++ b/node_modules/js-sha3/build/sha3.min.js @@ -0,0 +1,9 @@ +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){"use strict";function t(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function e(e,r,n){t.call(this,e,r,n)}var r="input is invalid type",n="object"==typeof window,i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&"object"==typeof self;!i.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?i=global:o&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&"object"==typeof module&&module.exports,s="function"==typeof define&&define.amd,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),c=[4,1024,262144,67108864],h=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],d=[224,256,384,512],l=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!i.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!u||!i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var A=function(e,r,n){return function(i){return new t(e,r,e).update(i)[n]()}},w=function(e,r,n){return function(i,o){return new t(e,r,o).update(i)[n]()}},v=function(t,e,r){return function(e,n,i,o){return S["cshake"+t].update(e,n,i,o)[r]()}},B=function(t,e,r){return function(e,n,i,o){return S["kmac"+t].update(e,n,i,o)[r]()}},g=function(t,e,r,n){for(var i=0;i>2]|=t[p]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(a[i>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=s){for(this.start=i-s,this.block=a[c],i=0;i>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},t.prototype.encodeString=function(t){var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(r);if(null===t)throw new Error(r);if(u&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||u&&ArrayBuffer.isView(t)))throw new Error(r);e=!0}var i=0,o=t.length;if(e)i=o;else for(var a=0;a=57344?i+=3:(s=65536+((1023&s)<<10|1023&t.charCodeAt(++a)),i+=4)}return i+=this.encode(8*i),this.update(t),i},t.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+f[15&t]+f[t>>12&15]+f[t>>8&15]+f[t>>20&15]+f[t>>16&15]+f[t>>28&15]+f[t>>24&15];a%e==0&&(j(r),o=0)}return i&&(t=r[o],s+=f[t>>4&15]+f[15&t],i>1&&(s+=f[t>>12&15]+f[t>>8&15]),i>2&&(s+=f[t>>20&15]+f[t>>16&15])),s},t.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(t);a>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;s%r==0&&j(n)}return o&&(t=s<<2,e=n[a],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},(e.prototype=new t).finalize=function(){return this.encode(this.outputBits,!0),t.prototype.finalize.call(this)};var j=function(t){var e,r,n,i,o,a,s,u,f,c,h,d,l,y,b,A,w,v,B,g,_,k,S,C,x,m,E,O,z,N,j,J,M,H,I,R,U,V,F,D,W,Y,K,q,G,L,P,Q,T,X,Z,$,tt,et,rt,nt,it,ot,at,st,ut,ft,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],f=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],h=t[7]^t[17]^t[27]^t[37]^t[47],e=(d=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|s>>>31),r=(l=t[9]^t[19]^t[29]^t[39]^t[49])^(s<<1|a>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|f>>>31),r=o^(f<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=a^(c<<1|h>>>31),r=s^(h<<1|c>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(d<<1|l>>>31),r=f^(l<<1|d>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=c^(i<<1|o>>>31),r=h^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,y=t[0],b=t[1],L=t[11]<<4|t[10]>>>28,P=t[10]<<4|t[11]>>>28,O=t[20]<<3|t[21]>>>29,z=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,Y=t[40]<<18|t[41]>>>14,K=t[41]<<18|t[40]>>>14,H=t[2]<<1|t[3]>>>31,I=t[3]<<1|t[2]>>>31,A=t[13]<<12|t[12]>>>20,w=t[12]<<12|t[13]>>>20,Q=t[22]<<10|t[23]>>>22,T=t[23]<<10|t[22]>>>22,N=t[33]<<13|t[32]>>>19,j=t[32]<<13|t[33]>>>19,ft=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,R=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,v=t[25]<<11|t[24]>>>21,B=t[24]<<11|t[25]>>>21,X=t[34]<<15|t[35]>>>17,Z=t[35]<<15|t[34]>>>17,J=t[45]<<29|t[44]>>>3,M=t[44]<<29|t[45]>>>3,C=t[6]<<28|t[7]>>>4,x=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,V=t[26]<<25|t[27]>>>7,F=t[27]<<25|t[26]>>>7,g=t[36]<<21|t[37]>>>11,_=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,q=t[8]<<27|t[9]>>>5,G=t[9]<<27|t[8]>>>5,m=t[18]<<20|t[19]>>>12,E=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,D=t[38]<<8|t[39]>>>24,W=t[39]<<8|t[38]>>>24,k=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=y^~A&v,t[1]=b^~w&B,t[10]=C^~m&O,t[11]=x^~E&z,t[20]=H^~R&V,t[21]=I^~U&F,t[30]=q^~L&Q,t[31]=G^~P&T,t[40]=et^~nt&ot,t[41]=rt^~it&at,t[2]=A^~v&g,t[3]=w^~B&_,t[12]=m^~O&N,t[13]=E^~z&j,t[22]=R^~V&D,t[23]=U^~F&W,t[32]=L^~Q&X,t[33]=P^~T&Z,t[42]=nt^~ot&st,t[43]=it^~at&ut,t[4]=v^~g&k,t[5]=B^~_&S,t[14]=O^~N&J,t[15]=z^~j&M,t[24]=V^~D&Y,t[25]=F^~W&K,t[34]=Q^~X&$,t[35]=T^~Z&tt,t[44]=ot^~st&ft,t[45]=at^~ut&ct,t[6]=g^~k&y,t[7]=_^~S&b,t[16]=N^~J&C,t[17]=j^~M&x,t[26]=D^~Y&H,t[27]=W^~K&I,t[36]=X^~$&q,t[37]=Z^~tt&G,t[46]=st^~ft&et,t[47]=ut^~ct&rt,t[8]=k^~y&A,t[9]=S^~b&w,t[18]=J^~C&m,t[19]=M^~x&E,t[28]=Y^~H&R,t[29]=K^~I&U,t[38]=$^~q&L,t[39]=tt^~G&P,t[48]=ft^~et&nt,t[49]=ct^~rt&it,t[0]^=p[n],t[1]^=p[n+1]};if(a)module.exports=S;else{for(x=0;x", + "homepage": "https://github.com/emn178/js-sha3", + "bugs": { + "url": "https://github.com/emn178/js-sha3/issues" + }, + "nyc": { + "exclude": [ + "tests" + ] + } +} diff --git a/node_modules/js-sha3/src/sha3.js b/node_modules/js-sha3/src/sha3.js new file mode 100644 index 0000000..f9a8d9c --- /dev/null +++ b/node_modules/js-sha3/src/sha3.js @@ -0,0 +1,656 @@ +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +/*jslint bitwise: true */ +(function () { + 'use strict'; + + var INPUT_ERROR = 'input is invalid type'; + var FINALIZE_ERROR = 'finalize already called'; + var WINDOW = typeof window === 'object'; + var root = WINDOW ? window : {}; + if (root.JS_SHA3_NO_WINDOW) { + WINDOW = false; + } + var WEB_WORKER = !WINDOW && typeof self === 'object'; + var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; + if (NODE_JS) { + root = global; + } else if (WEB_WORKER) { + root = self; + } + var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports; + var AMD = typeof define === 'function' && define.amd; + var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; + var HEX_CHARS = '0123456789abcdef'.split(''); + var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; + var CSHAKE_PADDING = [4, 1024, 262144, 67108864]; + var KECCAK_PADDING = [1, 256, 65536, 16777216]; + var PADDING = [6, 1536, 393216, 100663296]; + var SHIFT = [0, 8, 16, 24]; + var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, + 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, + 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, + 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, + 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; + var BITS = [224, 256, 384, 512]; + var SHAKE_BITS = [128, 256]; + var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest']; + var CSHAKE_BYTEPAD = { + '128': 168, + '256': 136 + }; + + if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) { + Array.isArray = function (obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; + }; + } + + if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { + ArrayBuffer.isView = function (obj) { + return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; + }; + } + + var createOutputMethod = function (bits, padding, outputType) { + return function (message) { + return new Keccak(bits, padding, bits).update(message)[outputType](); + }; + }; + + var createShakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits) { + return new Keccak(bits, padding, outputBits).update(message)[outputType](); + }; + }; + + var createCshakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits, n, s) { + return methods['cshake' + bits].update(message, outputBits, n, s)[outputType](); + }; + }; + + var createKmacOutputMethod = function (bits, padding, outputType) { + return function (key, message, outputBits, s) { + return methods['kmac' + bits].update(key, message, outputBits, s)[outputType](); + }; + }; + + var createOutputMethods = function (method, createMethod, bits, padding) { + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createMethod(bits, padding, type); + } + return method; + }; + + var createMethod = function (bits, padding) { + var method = createOutputMethod(bits, padding, 'hex'); + method.create = function () { + return new Keccak(bits, padding, bits); + }; + method.update = function (message) { + return method.create().update(message); + }; + return createOutputMethods(method, createOutputMethod, bits, padding); + }; + + var createShakeMethod = function (bits, padding) { + var method = createShakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits) { + return new Keccak(bits, padding, outputBits); + }; + method.update = function (message, outputBits) { + return method.create(outputBits).update(message); + }; + return createOutputMethods(method, createShakeOutputMethod, bits, padding); + }; + + var createCshakeMethod = function (bits, padding) { + var w = CSHAKE_BYTEPAD[bits]; + var method = createCshakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits, n, s) { + if (!n && !s) { + return methods['shake' + bits].create(outputBits); + } else { + return new Keccak(bits, padding, outputBits).bytepad([n, s], w); + } + }; + method.update = function (message, outputBits, n, s) { + return method.create(outputBits, n, s).update(message); + }; + return createOutputMethods(method, createCshakeOutputMethod, bits, padding); + }; + + var createKmacMethod = function (bits, padding) { + var w = CSHAKE_BYTEPAD[bits]; + var method = createKmacOutputMethod(bits, padding, 'hex'); + method.create = function (key, outputBits, s) { + return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w); + }; + method.update = function (key, message, outputBits, s) { + return method.create(key, outputBits, s).update(message); + }; + return createOutputMethods(method, createKmacOutputMethod, bits, padding); + }; + + var algorithms = [ + { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod }, + { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod }, + { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod }, + { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod }, + { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod } + ]; + + var methods = {}, methodNames = []; + + for (var i = 0; i < algorithms.length; ++i) { + var algorithm = algorithms[i]; + var bits = algorithm.bits; + for (var j = 0; j < bits.length; ++j) { + var methodName = algorithm.name + '_' + bits[j]; + methodNames.push(methodName); + methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding); + if (algorithm.name !== 'sha3') { + var newMethodName = algorithm.name + bits[j]; + methodNames.push(newMethodName); + methods[newMethodName] = methods[methodName]; + } + } + } + + function Keccak(bits, padding, outputBits) { + this.blocks = []; + this.s = []; + this.padding = padding; + this.outputBits = outputBits; + this.reset = true; + this.finalized = false; + this.block = 0; + this.start = 0; + this.blockCount = (1600 - (bits << 1)) >> 5; + this.byteCount = this.blockCount << 2; + this.outputBlocks = outputBits >> 5; + this.extraBytes = (outputBits & 31) >> 3; + + for (var i = 0; i < 50; ++i) { + this.s[i] = 0; + } + } + + Keccak.prototype.update = function (message) { + if (this.finalized) { + throw new Error(FINALIZE_ERROR); + } + var notString, type = typeof message; + if (type !== 'string') { + if (type === 'object') { + if (message === null) { + throw new Error(INPUT_ERROR); + } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } else if (!Array.isArray(message)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { + throw new Error(INPUT_ERROR); + } + } + } else { + throw new Error(INPUT_ERROR); + } + notString = true; + } + var blocks = this.blocks, byteCount = this.byteCount, length = message.length, + blockCount = this.blockCount, index = 0, s = this.s, i, code; + + while (index < length) { + if (this.reset) { + this.reset = false; + blocks[0] = this.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (notString) { + for (i = this.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + if (i >= byteCount) { + this.start = i - byteCount; + this.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + this.reset = true; + } else { + this.start = i; + } + } + return this; + }; + + Keccak.prototype.encode = function (x, right) { + var o = x & 255, n = 1; + var bytes = [o]; + x = x >> 8; + o = x & 255; + while (o > 0) { + bytes.unshift(o); + x = x >> 8; + o = x & 255; + ++n; + } + if (right) { + bytes.push(n); + } else { + bytes.unshift(n); + } + this.update(bytes); + return bytes.length; + }; + + Keccak.prototype.encodeString = function (str) { + var notString, type = typeof str; + if (type !== 'string') { + if (type === 'object') { + if (str === null) { + throw new Error(INPUT_ERROR); + } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) { + str = new Uint8Array(str); + } else if (!Array.isArray(str)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) { + throw new Error(INPUT_ERROR); + } + } + } else { + throw new Error(INPUT_ERROR); + } + notString = true; + } + var bytes = 0, length = str.length; + if (notString) { + bytes = length; + } else { + for (var i = 0; i < str.length; ++i) { + var code = str.charCodeAt(i); + if (code < 0x80) { + bytes += 1; + } else if (code < 0x800) { + bytes += 2; + } else if (code < 0xd800 || code >= 0xe000) { + bytes += 3; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff)); + bytes += 4; + } + } + } + bytes += this.encode(bytes * 8); + this.update(str); + return bytes; + }; + + Keccak.prototype.bytepad = function (strs, w) { + var bytes = this.encode(w); + for (var i = 0; i < strs.length; ++i) { + bytes += this.encodeString(strs[i]); + } + var paddingBytes = w - bytes % w; + var zeros = []; + zeros.length = paddingBytes; + this.update(zeros); + return this; + }; + + Keccak.prototype.finalize = function () { + if (this.finalized) { + return; + } + this.finalized = true; + var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; + blocks[i >> 2] |= this.padding[i & 3]; + if (this.lastByteIndex === this.byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + }; + + Keccak.prototype.toString = Keccak.prototype.hex = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var hex = '', block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + + HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + + HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + + HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + if (extraBytes) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; + if (extraBytes > 1) { + hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; + } + if (extraBytes > 2) { + hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; + } + } + return hex; + }; + + Keccak.prototype.arrayBuffer = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var bytes = this.outputBits >> 3; + var buffer; + if (extraBytes) { + buffer = new ArrayBuffer((outputBlocks + 1) << 2); + } else { + buffer = new ArrayBuffer(bytes); + } + var array = new Uint32Array(buffer); + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + array[j] = s[i]; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + array[i] = s[i]; + buffer = buffer.slice(0, bytes); + } + return buffer; + }; + + Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; + + Keccak.prototype.digest = Keccak.prototype.array = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var array = [], offset, block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + array[offset + 1] = (block >> 8) & 0xFF; + array[offset + 2] = (block >> 16) & 0xFF; + array[offset + 3] = (block >> 24) & 0xFF; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + if (extraBytes > 1) { + array[offset + 1] = (block >> 8) & 0xFF; + } + if (extraBytes > 2) { + array[offset + 2] = (block >> 16) & 0xFF; + } + } + return array; + }; + + function Kmac(bits, padding, outputBits) { + Keccak.call(this, bits, padding, outputBits); + } + + Kmac.prototype = new Keccak(); + + Kmac.prototype.finalize = function () { + this.encode(this.outputBits, true); + return Keccak.prototype.finalize.call(this); + }; + + var f = function (s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, + b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, + b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, + b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ ((c2 << 1) | (c3 >>> 31)); + l = c9 ^ ((c3 << 1) | (c2 >>> 31)); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ ((c4 << 1) | (c5 >>> 31)); + l = c1 ^ ((c5 << 1) | (c4 >>> 31)); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ ((c6 << 1) | (c7 >>> 31)); + l = c3 ^ ((c7 << 1) | (c6 >>> 31)); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ ((c8 << 1) | (c9 >>> 31)); + l = c5 ^ ((c9 << 1) | (c8 >>> 31)); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ ((c0 << 1) | (c1 >>> 31)); + l = c7 ^ ((c1 << 1) | (c0 >>> 31)); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = (s[11] << 4) | (s[10] >>> 28); + b33 = (s[10] << 4) | (s[11] >>> 28); + b14 = (s[20] << 3) | (s[21] >>> 29); + b15 = (s[21] << 3) | (s[20] >>> 29); + b46 = (s[31] << 9) | (s[30] >>> 23); + b47 = (s[30] << 9) | (s[31] >>> 23); + b28 = (s[40] << 18) | (s[41] >>> 14); + b29 = (s[41] << 18) | (s[40] >>> 14); + b20 = (s[2] << 1) | (s[3] >>> 31); + b21 = (s[3] << 1) | (s[2] >>> 31); + b2 = (s[13] << 12) | (s[12] >>> 20); + b3 = (s[12] << 12) | (s[13] >>> 20); + b34 = (s[22] << 10) | (s[23] >>> 22); + b35 = (s[23] << 10) | (s[22] >>> 22); + b16 = (s[33] << 13) | (s[32] >>> 19); + b17 = (s[32] << 13) | (s[33] >>> 19); + b48 = (s[42] << 2) | (s[43] >>> 30); + b49 = (s[43] << 2) | (s[42] >>> 30); + b40 = (s[5] << 30) | (s[4] >>> 2); + b41 = (s[4] << 30) | (s[5] >>> 2); + b22 = (s[14] << 6) | (s[15] >>> 26); + b23 = (s[15] << 6) | (s[14] >>> 26); + b4 = (s[25] << 11) | (s[24] >>> 21); + b5 = (s[24] << 11) | (s[25] >>> 21); + b36 = (s[34] << 15) | (s[35] >>> 17); + b37 = (s[35] << 15) | (s[34] >>> 17); + b18 = (s[45] << 29) | (s[44] >>> 3); + b19 = (s[44] << 29) | (s[45] >>> 3); + b10 = (s[6] << 28) | (s[7] >>> 4); + b11 = (s[7] << 28) | (s[6] >>> 4); + b42 = (s[17] << 23) | (s[16] >>> 9); + b43 = (s[16] << 23) | (s[17] >>> 9); + b24 = (s[26] << 25) | (s[27] >>> 7); + b25 = (s[27] << 25) | (s[26] >>> 7); + b6 = (s[36] << 21) | (s[37] >>> 11); + b7 = (s[37] << 21) | (s[36] >>> 11); + b38 = (s[47] << 24) | (s[46] >>> 8); + b39 = (s[46] << 24) | (s[47] >>> 8); + b30 = (s[8] << 27) | (s[9] >>> 5); + b31 = (s[9] << 27) | (s[8] >>> 5); + b12 = (s[18] << 20) | (s[19] >>> 12); + b13 = (s[19] << 20) | (s[18] >>> 12); + b44 = (s[29] << 7) | (s[28] >>> 25); + b45 = (s[28] << 7) | (s[29] >>> 25); + b26 = (s[38] << 8) | (s[39] >>> 24); + b27 = (s[39] << 8) | (s[38] >>> 24); + b8 = (s[48] << 14) | (s[49] >>> 18); + b9 = (s[49] << 14) | (s[48] >>> 18); + + s[0] = b0 ^ (~b2 & b4); + s[1] = b1 ^ (~b3 & b5); + s[10] = b10 ^ (~b12 & b14); + s[11] = b11 ^ (~b13 & b15); + s[20] = b20 ^ (~b22 & b24); + s[21] = b21 ^ (~b23 & b25); + s[30] = b30 ^ (~b32 & b34); + s[31] = b31 ^ (~b33 & b35); + s[40] = b40 ^ (~b42 & b44); + s[41] = b41 ^ (~b43 & b45); + s[2] = b2 ^ (~b4 & b6); + s[3] = b3 ^ (~b5 & b7); + s[12] = b12 ^ (~b14 & b16); + s[13] = b13 ^ (~b15 & b17); + s[22] = b22 ^ (~b24 & b26); + s[23] = b23 ^ (~b25 & b27); + s[32] = b32 ^ (~b34 & b36); + s[33] = b33 ^ (~b35 & b37); + s[42] = b42 ^ (~b44 & b46); + s[43] = b43 ^ (~b45 & b47); + s[4] = b4 ^ (~b6 & b8); + s[5] = b5 ^ (~b7 & b9); + s[14] = b14 ^ (~b16 & b18); + s[15] = b15 ^ (~b17 & b19); + s[24] = b24 ^ (~b26 & b28); + s[25] = b25 ^ (~b27 & b29); + s[34] = b34 ^ (~b36 & b38); + s[35] = b35 ^ (~b37 & b39); + s[44] = b44 ^ (~b46 & b48); + s[45] = b45 ^ (~b47 & b49); + s[6] = b6 ^ (~b8 & b0); + s[7] = b7 ^ (~b9 & b1); + s[16] = b16 ^ (~b18 & b10); + s[17] = b17 ^ (~b19 & b11); + s[26] = b26 ^ (~b28 & b20); + s[27] = b27 ^ (~b29 & b21); + s[36] = b36 ^ (~b38 & b30); + s[37] = b37 ^ (~b39 & b31); + s[46] = b46 ^ (~b48 & b40); + s[47] = b47 ^ (~b49 & b41); + s[8] = b8 ^ (~b0 & b2); + s[9] = b9 ^ (~b1 & b3); + s[18] = b18 ^ (~b10 & b12); + s[19] = b19 ^ (~b11 & b13); + s[28] = b28 ^ (~b20 & b22); + s[29] = b29 ^ (~b21 & b23); + s[38] = b38 ^ (~b30 & b32); + s[39] = b39 ^ (~b31 & b33); + s[48] = b48 ^ (~b40 & b42); + s[49] = b49 ^ (~b41 & b43); + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } + }; + + if (COMMON_JS) { + module.exports = methods; + } else { + for (i = 0; i < methodNames.length; ++i) { + root[methodNames[i]] = methods[methodNames[i]]; + } + if (AMD) { + define(function () { + return methods; + }); + } + } +})(); diff --git a/node_modules/minimalistic-assert/LICENSE b/node_modules/minimalistic-assert/LICENSE new file mode 100644 index 0000000..adca66b --- /dev/null +++ b/node_modules/minimalistic-assert/LICENSE @@ -0,0 +1,13 @@ +Copyright 2015 Calvin Metcalf + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/minimalistic-assert/index.js b/node_modules/minimalistic-assert/index.js new file mode 100644 index 0000000..70b4ea5 --- /dev/null +++ b/node_modules/minimalistic-assert/index.js @@ -0,0 +1,11 @@ +module.exports = assert; + +function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; diff --git a/node_modules/minimalistic-assert/package.json b/node_modules/minimalistic-assert/package.json new file mode 100644 index 0000000..f8de10d --- /dev/null +++ b/node_modules/minimalistic-assert/package.json @@ -0,0 +1,19 @@ +{ + "name": "minimalistic-assert", + "version": "1.0.1", + "description": "minimalistic-assert ===", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/minimalistic-assert.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/calvinmetcalf/minimalistic-assert/issues" + }, + "homepage": "https://github.com/calvinmetcalf/minimalistic-assert" +} diff --git a/node_modules/minimalistic-assert/readme.md b/node_modules/minimalistic-assert/readme.md new file mode 100644 index 0000000..2ca0d25 --- /dev/null +++ b/node_modules/minimalistic-assert/readme.md @@ -0,0 +1,4 @@ +minimalistic-assert +=== + +very minimalistic assert module. diff --git a/node_modules/minimalistic-crypto-utils/.npmignore b/node_modules/minimalistic-crypto-utils/.npmignore new file mode 100644 index 0000000..1ca9571 --- /dev/null +++ b/node_modules/minimalistic-crypto-utils/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/node_modules/minimalistic-crypto-utils/.travis.yml b/node_modules/minimalistic-crypto-utils/.travis.yml new file mode 100644 index 0000000..ce24b7a --- /dev/null +++ b/node_modules/minimalistic-crypto-utils/.travis.yml @@ -0,0 +1,11 @@ +sudo: false + +language: node_js + +node_js: + - "4" + - "6" + - "stable" + +script: + - npm test diff --git a/node_modules/minimalistic-crypto-utils/README.md b/node_modules/minimalistic-crypto-utils/README.md new file mode 100644 index 0000000..9e58eba --- /dev/null +++ b/node_modules/minimalistic-crypto-utils/README.md @@ -0,0 +1,47 @@ +# minimalistic-crypto-utils +[![Build Status](https://secure.travis-ci.org/indutny/minimalistic-crypto-utils.svg)](http://travis-ci.org/indutny/minimalistic-crypto-utils) +[![NPM version](https://badge.fury.io/js/minimalistic-crypto-utils.svg)](http://badge.fury.io/js/minimalistic-crypto-utils) + +Very minimal utils that are required in order to write reasonable JS-only +crypto module. + +## Usage + +```js +const utils = require('minimalistic-crypto-utils'); + +utils.toArray('abcd', 'hex'); +utils.encode([ 1, 2, 3, 4 ], 'hex'); +utils.toHex([ 1, 2, 3, 4 ]); +``` + +#### LICENSE + +This software is licensed under the MIT License. + +Copyright Fedor Indutny, 2017. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +[0]: http://tools.ietf.org/html/rfc6979 +[1]: https://github.com/indutny/bn.js +[2]: https://github.com/indutny/hash.js +[3]: https://github.com/bitchan/eccrypto +[4]: https://github.com/wanderer/secp256k1-node diff --git a/node_modules/minimalistic-crypto-utils/lib/utils.js b/node_modules/minimalistic-crypto-utils/lib/utils.js new file mode 100644 index 0000000..cd48daf --- /dev/null +++ b/node_modules/minimalistic-crypto-utils/lib/utils.js @@ -0,0 +1,58 @@ +'use strict'; + +var utils = exports; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } else { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } + return res; +} +utils.toArray = toArray; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; +}; diff --git a/node_modules/minimalistic-crypto-utils/package.json b/node_modules/minimalistic-crypto-utils/package.json new file mode 100644 index 0000000..bc4c79a --- /dev/null +++ b/node_modules/minimalistic-crypto-utils/package.json @@ -0,0 +1,27 @@ +{ + "name": "minimalistic-crypto-utils", + "version": "1.0.1", + "description": "Minimalistic tools for JS crypto modules", + "main": "lib/utils.js", + "scripts": { + "test": "mocha --reporter=spec test/*-test.js" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/minimalistic-crypto-utils.git" + }, + "keywords": [ + "minimalistic", + "utils", + "crypto" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/minimalistic-crypto-utils/issues" + }, + "homepage": "https://github.com/indutny/minimalistic-crypto-utils#readme", + "devDependencies": { + "mocha": "^3.2.0" + } +} diff --git a/node_modules/minimalistic-crypto-utils/test/utils-test.js b/node_modules/minimalistic-crypto-utils/test/utils-test.js new file mode 100644 index 0000000..3da812d --- /dev/null +++ b/node_modules/minimalistic-crypto-utils/test/utils-test.js @@ -0,0 +1,28 @@ +'use strict'; + +const assert = require('assert'); +const utils = require('../'); + +describe('utils', () => { + it('should convert to array', () => { + assert.deepEqual(utils.toArray('1234', 'hex'), [ 0x12, 0x34 ]); + assert.deepEqual(utils.toArray('1234'), [ 49, 50, 51, 52 ]); + assert.deepEqual(utils.toArray('1234', 'utf8'), [ 49, 50, 51, 52 ]); + assert.deepEqual(utils.toArray('\u1234234'), [ 18, 52, 50, 51, 52 ]); + assert.deepEqual(utils.toArray([ 1, 2, 3, 4 ]), [ 1, 2, 3, 4 ]); + }); + + it('should zero pad byte to hex', () => { + assert.equal(utils.zero2('0'), '00'); + assert.equal(utils.zero2('01'), '01'); + }); + + it('should convert to hex', () => { + assert.equal(utils.toHex([ 0, 1, 2, 3 ]), '00010203'); + }); + + it('should encode', () => { + assert.deepEqual(utils.encode([ 0, 1, 2, 3 ]), [ 0, 1, 2, 3 ]); + assert.deepEqual(utils.encode([ 0, 1, 2, 3 ], 'hex'), '00010203'); + }); +}); diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml new file mode 100644 index 0000000..74c57bf --- /dev/null +++ b/node_modules/minimist/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js new file mode 100644 index 0000000..f7c8d49 --- /dev/null +++ b/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js new file mode 100644 index 0000000..d2afe5e --- /dev/null +++ b/node_modules/minimist/index.js @@ -0,0 +1,245 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + function setKey (obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length-1; i++) { + var key = keys[i]; + if (key === '__proto__') return; + if (o[key] === undefined) o[key] = {}; + if (o[key] === Object.prototype || o[key] === Number.prototype + || o[key] === String.prototype) o[key] = {}; + if (o[key] === Array.prototype) o[key] = []; + o = o[key]; + } + + var key = keys[keys.length - 1]; + if (key === '__proto__') return; + if (o === Object.prototype || o === Number.prototype + || o === String.prototype) o = {}; + if (o === Array.prototype) o = []; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next, arg) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); + i++; + } + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json new file mode 100644 index 0000000..c091d41 --- /dev/null +++ b/node_modules/minimist/package.json @@ -0,0 +1,45 @@ +{ + "name": "minimist", + "version": "1.2.5", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "covert": "^1.0.0", + "tap": "~0.4.0", + "tape": "^3.5.0" + }, + "scripts": { + "test": "tap test/*.js", + "coverage": "covert test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown new file mode 100644 index 0000000..5fd97ab --- /dev/null +++ b/node_modules/minimist/readme.markdown @@ -0,0 +1,95 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.log(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# security + +Previous versions had a prototype pollution bug that could cause privilege +escalation in some circumstances when handling untrusted user input. + +Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: + + ``` + > require('./')('one two three -- four five --six'.split(' '), { '--': true }) + { _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } + ``` + + Note that with `opts['--']` set, parsing for arguments still stops after the + `--`. + +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js new file mode 100644 index 0000000..ac83548 --- /dev/null +++ b/node_modules/minimist/test/all_bool.js @@ -0,0 +1,32 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean true (default all --args to boolean)', function (t) { + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); + +test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: 55, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js new file mode 100644 index 0000000..5f7dbde --- /dev/null +++ b/node_modules/minimist/test/bool.js @@ -0,0 +1,178 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias array with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var alt = [ '--harp', 'derp' ]; + var opts = { + alias: { 'h': ['herp', 'harp'] }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var altPropertyArgv = parse(alt, opts); + var expected = { + harp: true, + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.same(altPropertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); + +test('boolean --boool=true', function (t) { + var parsed = parse(['--boool=true'], { + default: { + boool: false + }, + boolean: ['boool'] + }); + + t.same(parsed.boool, true); + t.end(); +}); + +test('boolean --boool=false', function (t) { + var parsed = parse(['--boool=false'], { + default: { + boool: true + }, + boolean: ['boool'] + }); + + t.same(parsed.boool, false); + t.end(); +}); + +test('boolean using something similar to true', function (t) { + var opts = { boolean: 'h' }; + var result = parse(['-h', 'true.txt'], opts); + var expected = { + h: true, + '_': ['true.txt'] + }; + + t.same(result, expected); + t.end(); +}); \ No newline at end of file diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js new file mode 100644 index 0000000..5a4fa5b --- /dev/null +++ b/node_modules/minimist/test/dash.js @@ -0,0 +1,31 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); + +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +}); diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js new file mode 100644 index 0000000..780a311 --- /dev/null +++ b/node_modules/minimist/test/default_bool.js @@ -0,0 +1,35 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); + +test('boolean default to null', function (t) { + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, null); + var argv = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, true); + t.end(); + +}) diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js new file mode 100644 index 0000000..d8b3e85 --- /dev/null +++ b/node_modules/minimist/test/dotted.js @@ -0,0 +1,22 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); + +test('dotted default with no alias', function (t) { + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js new file mode 100644 index 0000000..f813b30 --- /dev/null +++ b/node_modules/minimist/test/kv_short.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-b=123' ]); + t.deepEqual(argv, { b: 123, _: [] }); +}); + +test('multi short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-a=whatever', '-b=robots' ]); + t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); +}); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js new file mode 100644 index 0000000..5d3a1e0 --- /dev/null +++ b/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js new file mode 100644 index 0000000..2cc77f4 --- /dev/null +++ b/node_modules/minimist/test/num.js @@ -0,0 +1,36 @@ +var parse = require('../'); +var test = require('tape'); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('already a number', function (t) { + var argv = parse([ '-x', 1234, 789 ]); + t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js new file mode 100644 index 0000000..7b4a2a1 --- /dev/null +++ b/node_modules/minimist/test/parse.js @@ -0,0 +1,197 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + t.end(); +}); + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js new file mode 100644 index 0000000..ab620dc --- /dev/null +++ b/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: [123] }); +}); diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js new file mode 100644 index 0000000..8649107 --- /dev/null +++ b/node_modules/minimist/test/proto.js @@ -0,0 +1,44 @@ +var parse = require('../'); +var test = require('tape'); + +test('proto pollution', function (t) { + var argv = parse(['--__proto__.x','123']); + t.equal({}.x, undefined); + t.equal(argv.__proto__.x, undefined); + t.equal(argv.x, undefined); + t.end(); +}); + +test('proto pollution (array)', function (t) { + var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']); + t.equal({}.z, undefined); + t.deepEqual(argv.x, [4,5]); + t.equal(argv.x.z, undefined); + t.equal(argv.x.__proto__.z, undefined); + t.end(); +}); + +test('proto pollution (number)', function (t) { + var argv = parse(['--x','5','--x.__proto__.z','100']); + t.equal({}.z, undefined); + t.equal((4).z, undefined); + t.equal(argv.x, 5); + t.equal(argv.x.z, undefined); + t.end(); +}); + +test('proto pollution (string)', function (t) { + var argv = parse(['--x','abc','--x.__proto__.z','def']); + t.equal({}.z, undefined); + t.equal('...'.z, undefined); + t.equal(argv.x, 'abc'); + t.equal(argv.x.z, undefined); + t.end(); +}); + +test('proto pollution (constructor)', function (t) { + var argv = parse(['--constructor.prototype.y','123']); + t.equal({}.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js new file mode 100644 index 0000000..d513a1c --- /dev/null +++ b/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000..bdf9fbc --- /dev/null +++ b/node_modules/minimist/test/stop_early.js @@ -0,0 +1,15 @@ +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); + + t.end(); +}); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js new file mode 100644 index 0000000..462a36b --- /dev/null +++ b/node_modules/minimist/test/unknown.js @@ -0,0 +1,102 @@ +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); +}); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js new file mode 100644 index 0000000..8a52a58 --- /dev/null +++ b/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/node_modules/module-alias/LICENSE b/node_modules/module-alias/LICENSE new file mode 100644 index 0000000..3a09102 --- /dev/null +++ b/node_modules/module-alias/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018, Nick Gavrilov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/module-alias/README.md b/node_modules/module-alias/README.md new file mode 100644 index 0000000..c23793c --- /dev/null +++ b/node_modules/module-alias/README.md @@ -0,0 +1,159 @@ +# module-alias +[![NPM Version][npm-image]][npm-url] +[![Build Status][travis-image]][travis-url] + +Create aliases of directories and register custom module paths in NodeJS like a boss! + +No more shit-coding paths in Node like so: + +```js +require('../../../../some/very/deep/module') +``` +Enough of this madness! + +Just create an alias and do it the right way: + +```js +var module = require('@deep/module') +// Or ES6 +import module from '@deep/module' +``` + +It also allows you to register directories that will act just like `node_modules` but with your own private modules, so that you can access them directly: + +```js +require('my_private_module'); +// Or ES6 +import module from 'my_private_module' +``` + +**WARNING:** This module should not be used in other npm modules since it modifies the default `require` behavior! It is designed to be used for development of final projects i.e. web-sites, applications etc. + +## Install + +``` +npm i --save module-alias +``` + +## Usage + +Add your custom configuration to your `package.json` (in your application's root) + +```js +// Aliases +"_moduleAliases": { + "@root" : ".", // Application's root + "@deep" : "src/some/very/deep/directory/or/file", + "@my_module" : "lib/some-file.js", + "something" : "src/foo", // Or without @. Actually, it could be any string +} + +// Custom module directories, just like `node_modules` but with your private modules (optional) +"_moduleDirectories": ["node_modules_custom"], +``` + +Then add this line at the very main file of your app, before any code + +```js +require('module-alias/register') +``` + +**And you're all set!** Now you can do stuff like: + +```js +require('something') +const module = require('@root/some-module') +const veryDeepModule = require('@deep/my-module') +const customModule = require('my_private_module') // module from `node_modules_custom` directory + +// Or ES6 +import 'something' +import module from '@root/some-module' +import veryDeepModule from '@deep/my-module' +import customModule from 'my_private_module' // module from `node_modules_custom` directory +``` + +## Advanced usage + +If you don't want to modify your `package.json` or you just prefer to set it all up programmatically, then the following methods are available for you: + +* `addAlias('alias', 'target_path')` - register a single alias +* `addAliases({ 'alias': 'target_path', ... }) ` - register multiple aliases +* `addPath(path)` - Register custom modules directory (like node_modules, but with your own modules) + +_Examples:_ +```js +const moduleAlias = require('module-alias') + +// +// Register alias +// +moduleAlias.addAlias('@client', __dirname + '/src/client') + +// Or multiple aliases +moduleAlias.addAliases({ + '@root' : __dirname, + '@client': __dirname + '/src/client', + ... +}) + +// Custom handler function (starting from v2.1) +moduleAlias.addAlias('@src', (fromPath, request, alias) => { + // fromPath - Full path of the file from which `require` was called + // request - The path (first argument) that was passed into `require` + // alias - The same alias that was passed as first argument to `addAlias` (`@src` in this case) + + // Return any custom target path for the `@src` alias depending on arguments + if (fromPath.startsWith(__dirname + '/others')) return __dirname + '/others' + return __dirname + '/src' +}) + +// +// Register custom modules directory +// +moduleAlias.addPath(__dirname + '/node_modules_custom') +moduleAlias.addPath(__dirname + '/src') + +// +// Import settings from a specific package.json +// +moduleAlias(__dirname + '/package.json') + +// Or let module-alias to figure where your package.json is +// located. By default it will look in the same directory +// where you have your node_modules (application's root) +moduleAlias() +``` + +## Usage with WebPack + +Luckily, WebPack has a built in support for aliases and custom modules directories so it's easy to make it work on the client side as well! + +```js +// webpack.config.js +const npm_package = require('./package.json') + +module.exports = { + entry: { ... }, + resolve: { + root: __dirname, + alias: npm_package._moduleAliases || {}, + modules: npm_package._moduleDirectories || [] // eg: ["node_modules", "node_modules_custom", "src"] + } +} +``` + +## How it works? + +In order to register an alias it modifies the internal `Module._resolveFilename` method so that when you use `require` or `import` it first checks whether the given string starts with one of the registered aliases, if so, it replaces the alias in the string with the target path of the alias. + +In order to register a custom modules path (`addPath`) it modifies the internal `Module._nodeModulePaths` method so that the given directory then acts like it's the `node_modules` directory. + +[npm-image]: https://img.shields.io/npm/v/module-alias.svg +[npm-url]: https://npmjs.org/package/module-alias +[travis-image]: https://img.shields.io/travis/ilearnio/module-alias/master.svg +[travis-url]: https://travis-ci.org/ilearnio/module-alias + +## Refactor your code (for already existing projects) + +If you are using this on an existing project, you can use [relative-to-alias](https://github.com/s-yadav/relative-to-alias) to refactor your code to start using aliases. diff --git a/node_modules/module-alias/index.js b/node_modules/module-alias/index.js new file mode 100644 index 0000000..8f2e570 --- /dev/null +++ b/node_modules/module-alias/index.js @@ -0,0 +1,224 @@ +'use strict' + +var BuiltinModule = require('module') + +// Guard against poorly mocked module constructors +var Module = module.constructor.length > 1 + ? module.constructor + : BuiltinModule + +var nodePath = require('path') + +var modulePaths = [] +var moduleAliases = {} +var moduleAliasNames = [] + +var oldNodeModulePaths = Module._nodeModulePaths +Module._nodeModulePaths = function (from) { + var paths = oldNodeModulePaths.call(this, from) + + // Only include the module path for top-level modules + // that were not installed: + if (from.indexOf('node_modules') === -1) { + paths = modulePaths.concat(paths) + } + + return paths +} + +var oldResolveFilename = Module._resolveFilename +Module._resolveFilename = function (request, parentModule, isMain, options) { + for (var i = moduleAliasNames.length; i-- > 0;) { + var alias = moduleAliasNames[i] + if (isPathMatchesAlias(request, alias)) { + var aliasTarget = moduleAliases[alias] + // Custom function handler + if (typeof moduleAliases[alias] === 'function') { + var fromPath = parentModule.filename + aliasTarget = moduleAliases[alias](fromPath, request, alias) + if (!aliasTarget || typeof aliasTarget !== 'string') { + throw new Error('[module-alias] Expecting custom handler function to return path.') + } + } + request = nodePath.join(aliasTarget, request.substr(alias.length)) + // Only use the first match + break + } + } + + return oldResolveFilename.call(this, request, parentModule, isMain, options) +} + +function isPathMatchesAlias (path, alias) { + // Matching /^alias(\/|$)/ + if (path.indexOf(alias) === 0) { + if (path.length === alias.length) return true + if (path[alias.length] === '/') return true + } + + return false +} + +function addPathHelper (path, targetArray) { + path = nodePath.normalize(path) + if (targetArray && targetArray.indexOf(path) === -1) { + targetArray.unshift(path) + } +} + +function removePathHelper (path, targetArray) { + if (targetArray) { + var index = targetArray.indexOf(path) + if (index !== -1) { + targetArray.splice(index, 1) + } + } +} + +function addPath (path) { + var parent + path = nodePath.normalize(path) + + if (modulePaths.indexOf(path) === -1) { + modulePaths.push(path) + // Enable the search path for the current top-level module + var mainModule = getMainModule() + if (mainModule) { + addPathHelper(path, mainModule.paths) + } + parent = module.parent + + // Also modify the paths of the module that was used to load the + // app-module-paths module and all of it's parents + while (parent && parent !== mainModule) { + addPathHelper(path, parent.paths) + parent = parent.parent + } + } +} + +function addAliases (aliases) { + for (var alias in aliases) { + addAlias(alias, aliases[alias]) + } +} + +function addAlias (alias, target) { + moduleAliases[alias] = target + // Cost of sorting is lower here than during resolution + moduleAliasNames = Object.keys(moduleAliases) + moduleAliasNames.sort() +} + +/** + * Reset any changes maded (resets all registered aliases + * and custom module directories) + * The function is undocumented and for testing purposes only + */ +function reset () { + var mainModule = getMainModule() + + // Reset all changes in paths caused by addPath function + modulePaths.forEach(function (path) { + if (mainModule) { + removePathHelper(path, mainModule.paths) + } + + // Delete from require.cache if the module has been required before. + // This is required for node >= 11 + Object.getOwnPropertyNames(require.cache).forEach(function (name) { + if (name.indexOf(path) !== -1) { + delete require.cache[name] + } + }) + + var parent = module.parent + while (parent && parent !== mainModule) { + removePathHelper(path, parent.paths) + parent = parent.parent + } + }) + + modulePaths = [] + moduleAliases = {} + moduleAliasNames = [] +} + +/** + * Import aliases from package.json + * @param {object} options + */ +function init (options) { + if (typeof options === 'string') { + options = { base: options } + } + + options = options || {} + + var candidatePackagePaths + if (options.base) { + candidatePackagePaths = [nodePath.resolve(options.base.replace(/\/package\.json$/, ''))] + } else { + // There is probably 99% chance that the project root directory in located + // above the node_modules directory, + // Or that package.json is in the node process' current working directory (when + // running a package manager script, e.g. `yarn start` / `npm run start`) + candidatePackagePaths = [nodePath.join(__dirname, '../..'), process.cwd()] + } + + var npmPackage + var base + for (var i in candidatePackagePaths) { + try { + base = candidatePackagePaths[i] + + npmPackage = require(nodePath.join(base, 'package.json')) + break + } catch (e) { + // noop + } + } + + if (typeof npmPackage !== 'object') { + var pathString = candidatePackagePaths.join(',\n') + throw new Error('Unable to find package.json in any of:\n[' + pathString + ']') + } + + // + // Import aliases + // + + var aliases = npmPackage._moduleAliases || {} + + for (var alias in aliases) { + if (aliases[alias][0] !== '/') { + aliases[alias] = nodePath.join(base, aliases[alias]) + } + } + + addAliases(aliases) + + // + // Register custom module directories (like node_modules) + // + + if (npmPackage._moduleDirectories instanceof Array) { + npmPackage._moduleDirectories.forEach(function (dir) { + if (dir === 'node_modules') return + + var modulePath = nodePath.join(base, dir) + addPath(modulePath) + }) + } +} + +function getMainModule () { + return require.main._simulateRepl ? undefined : require.main +} + +module.exports = init +module.exports.addPath = addPath +module.exports.addAlias = addAlias +module.exports.addAliases = addAliases +module.exports.isPathMatchesAlias = isPathMatchesAlias +module.exports.reset = reset diff --git a/node_modules/module-alias/package.json b/node_modules/module-alias/package.json new file mode 100644 index 0000000..4ead85a --- /dev/null +++ b/node_modules/module-alias/package.json @@ -0,0 +1,51 @@ +{ + "name": "module-alias", + "description": "Create aliases of directories and register custom module paths", + "version": "2.2.2", + "author": { + "name": "Nick Gavrilov", + "email": "artnikpro@gmail.com" + }, + "scripts": { + "test": "npm run lint && npm run testonly", + "testonly": "NODE_ENV=test mocha test/specs.js", + "testonly-watch": "NODE_ENV=test mocha -w test/specs.js", + "lint": "standard" + }, + "bugs": { + "url": "https://github.com/ilearnio/module-alias/issues" + }, + "homepage": "https://github.com/ilearnio/module-alias", + "keywords": [ + "extend", + "modules", + "node", + "path", + "resolve" + ], + "license": "MIT", + "main": "index.js", + "files": [ + "index.js", + "register.js", + "README.md", + "LICENSE" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/ilearnio/module-alias.git" + }, + "devDependencies": { + "chai": "^3.5.0", + "hello-world-classic": "ilearnio/hello-world-classic", + "husky": "^3.0.2", + "mocha": "^2.4.5", + "semver": "^6.1.1", + "standard": "^12.0.1" + }, + "husky": { + "hooks": { + "pre-push": "npm run test" + } + } +} diff --git a/node_modules/module-alias/register.js b/node_modules/module-alias/register.js new file mode 100644 index 0000000..5b07ef5 --- /dev/null +++ b/node_modules/module-alias/register.js @@ -0,0 +1 @@ +require('.')() diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js new file mode 100644 index 0000000..c4498bc --- /dev/null +++ b/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json new file mode 100644 index 0000000..eea666e --- /dev/null +++ b/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.1.2", + "description": "Tiny millisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" + } +} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md new file mode 100644 index 0000000..9a1996b --- /dev/null +++ b/node_modules/ms/readme.md @@ -0,0 +1,60 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/node-fetch/LICENSE.md b/node_modules/node-fetch/LICENSE.md new file mode 100644 index 0000000..660ffec --- /dev/null +++ b/node_modules/node-fetch/LICENSE.md @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 David Frank + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md new file mode 100644 index 0000000..2dde742 --- /dev/null +++ b/node_modules/node-fetch/README.md @@ -0,0 +1,590 @@ +node-fetch +========== + +[![npm version][npm-image]][npm-url] +[![build status][travis-image]][travis-url] +[![coverage status][codecov-image]][codecov-url] +[![install size][install-size-image]][install-size-url] +[![Discord][discord-image]][discord-url] + +A light-weight module that brings `window.fetch` to Node.js + +(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567)) + +[![Backers][opencollective-image]][opencollective-url] + + + +- [Motivation](#motivation) +- [Features](#features) +- [Difference from client-side fetch](#difference-from-client-side-fetch) +- [Installation](#installation) +- [Loading and configuring the module](#loading-and-configuring-the-module) +- [Common Usage](#common-usage) + - [Plain text or HTML](#plain-text-or-html) + - [JSON](#json) + - [Simple Post](#simple-post) + - [Post with JSON](#post-with-json) + - [Post with form parameters](#post-with-form-parameters) + - [Handling exceptions](#handling-exceptions) + - [Handling client and server errors](#handling-client-and-server-errors) +- [Advanced Usage](#advanced-usage) + - [Streams](#streams) + - [Buffer](#buffer) + - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data) + - [Extract Set-Cookie Header](#extract-set-cookie-header) + - [Post data using a file stream](#post-data-using-a-file-stream) + - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart) + - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal) +- [API](#api) + - [fetch(url[, options])](#fetchurl-options) + - [Options](#options) + - [Class: Request](#class-request) + - [Class: Response](#class-response) + - [Class: Headers](#class-headers) + - [Interface: Body](#interface-body) + - [Class: FetchError](#class-fetcherror) +- [License](#license) +- [Acknowledgement](#acknowledgement) + + + +## Motivation + +Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime. + +See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side). + +## Features + +- Stay consistent with `window.fetch` API. +- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences. +- Use native promise but allow substituting it with [insert your favorite promise library]. +- Use native Node streams for body on both request and response. +- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically. +- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting. + +## Difference from client-side fetch + +- See [Known Differences](LIMITS.md) for details. +- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue. +- Pull requests are welcomed too! + +## Installation + +Current stable release (`2.x`) + +```sh +$ npm install node-fetch +``` + +## Loading and configuring the module +We suggest you load the module via `require` until the stabilization of ES modules in node: +```js +const fetch = require('node-fetch'); +``` + +If you are using a Promise library other than native, set it through `fetch.Promise`: +```js +const Bluebird = require('bluebird'); + +fetch.Promise = Bluebird; +``` + +## Common Usage + +NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences. + +#### Plain text or HTML +```js +fetch('https://github.com/') + .then(res => res.text()) + .then(body => console.log(body)); +``` + +#### JSON + +```js + +fetch('https://api.github.com/users/github') + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Simple Post +```js +fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' }) + .then(res => res.json()) // expecting a json response + .then(json => console.log(json)); +``` + +#### Post with JSON + +```js +const body = { a: 1 }; + +fetch('https://httpbin.org/post', { + method: 'post', + body: JSON.stringify(body), + headers: { 'Content-Type': 'application/json' }, + }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Post with form parameters +`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods. + +NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such: + +```js +const { URLSearchParams } = require('url'); + +const params = new URLSearchParams(); +params.append('a', 1); + +fetch('https://httpbin.org/post', { method: 'POST', body: params }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Handling exceptions +NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information. + +Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details. + +```js +fetch('https://domain.invalid/') + .catch(err => console.error(err)); +``` + +#### Handling client and server errors +It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses: + +```js +function checkStatus(res) { + if (res.ok) { // res.status >= 200 && res.status < 300 + return res; + } else { + throw MyCustomError(res.statusText); + } +} + +fetch('https://httpbin.org/status/400') + .then(checkStatus) + .then(res => console.log('will not get here...')) +``` + +## Advanced Usage + +#### Streams +The "Node.js way" is to use streams when possible: + +```js +fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') + .then(res => { + const dest = fs.createWriteStream('./octocat.png'); + res.body.pipe(dest); + }); +``` + +#### Buffer +If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API) + +```js +const fileType = require('file-type'); + +fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') + .then(res => res.buffer()) + .then(buffer => fileType(buffer)) + .then(type => { /* ... */ }); +``` + +#### Accessing Headers and other Meta data +```js +fetch('https://github.com/') + .then(res => { + console.log(res.ok); + console.log(res.status); + console.log(res.statusText); + console.log(res.headers.raw()); + console.log(res.headers.get('content-type')); + }); +``` + +#### Extract Set-Cookie Header + +Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API. + +```js +fetch(url).then(res => { + // returns an array of values, instead of a string of comma-separated values + console.log(res.headers.raw()['set-cookie']); +}); +``` + +#### Post data using a file stream + +```js +const { createReadStream } = require('fs'); + +const stream = createReadStream('input.txt'); + +fetch('https://httpbin.org/post', { method: 'POST', body: stream }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Post with form-data (detect multipart) + +```js +const FormData = require('form-data'); + +const form = new FormData(); +form.append('a', 1); + +fetch('https://httpbin.org/post', { method: 'POST', body: form }) + .then(res => res.json()) + .then(json => console.log(json)); + +// OR, using custom headers +// NOTE: getHeaders() is non-standard API + +const form = new FormData(); +form.append('a', 1); + +const options = { + method: 'POST', + body: form, + headers: form.getHeaders() +} + +fetch('https://httpbin.org/post', options) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Request cancellation with AbortSignal + +> NOTE: You may cancel streamed requests only on Node >= v8.0.0 + +You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller). + +An example of timing out a request after 150ms could be achieved as the following: + +```js +import AbortController from 'abort-controller'; + +const controller = new AbortController(); +const timeout = setTimeout( + () => { controller.abort(); }, + 150, +); + +fetch(url, { signal: controller.signal }) + .then(res => res.json()) + .then( + data => { + useData(data) + }, + err => { + if (err.name === 'AbortError') { + // request was aborted + } + }, + ) + .finally(() => { + clearTimeout(timeout); + }); +``` + +See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples. + + +## API + +### fetch(url[, options]) + +- `url` A string representing the URL for fetching +- `options` [Options](#fetch-options) for the HTTP(S) request +- Returns: Promise<[Response](#class-response)> + +Perform an HTTP(S) fetch. + +`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`. + + +### Options + +The default values are shown after each option key. + +```js +{ + // These properties are part of the Fetch Standard + method: 'GET', + headers: {}, // request headers. format is the identical to that accepted by the Headers constructor (see below) + body: null, // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream + redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect + signal: null, // pass an instance of AbortSignal to optionally abort requests + + // The following properties are node-fetch extensions + follow: 20, // maximum redirect count. 0 to not follow redirect + timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead. + compress: true, // support gzip/deflate content encoding. false to disable + size: 0, // maximum response body size in bytes. 0 to disable + agent: null // http(s).Agent instance or function that returns an instance (see below) +} +``` + +##### Default Headers + +If no values are set, the following request headers will be sent automatically: + +Header | Value +------------------- | -------------------------------------------------------- +`Accept-Encoding` | `gzip,deflate` _(when `options.compress === true`)_ +`Accept` | `*/*` +`Connection` | `close` _(when no `options.agent` is present)_ +`Content-Length` | _(automatically calculated, if possible)_ +`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_ +`User-Agent` | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)` + +Note: when `body` is a `Stream`, `Content-Length` is not set automatically. + +##### Custom Agent + +The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following: + +- Support self-signed certificate +- Use only IPv4 or IPv6 +- Custom DNS Lookup + +See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information. + +In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. + +```js +const httpAgent = new http.Agent({ + keepAlive: true +}); +const httpsAgent = new https.Agent({ + keepAlive: true +}); + +const options = { + agent: function (_parsedURL) { + if (_parsedURL.protocol == 'http:') { + return httpAgent; + } else { + return httpsAgent; + } + } +} +``` + + +### Class: Request + +An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface. + +Due to the nature of Node.js, the following properties are not implemented at this moment: + +- `type` +- `destination` +- `referrer` +- `referrerPolicy` +- `mode` +- `credentials` +- `cache` +- `integrity` +- `keepalive` + +The following node-fetch extension properties are provided: + +- `follow` +- `compress` +- `counter` +- `agent` + +See [options](#fetch-options) for exact meaning of these extensions. + +#### new Request(input[, options]) + +*(spec-compliant)* + +- `input` A string representing a URL, or another `Request` (which will be cloned) +- `options` [Options][#fetch-options] for the HTTP(S) request + +Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + +In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object. + + +### Class: Response + +An HTTP(S) response. This class implements the [Body](#iface-body) interface. + +The following properties are not implemented in node-fetch at this moment: + +- `Response.error()` +- `Response.redirect()` +- `type` +- `trailer` + +#### new Response([body[, options]]) + +*(spec-compliant)* + +- `body` A `String` or [`Readable` stream][node-readable] +- `options` A [`ResponseInit`][response-init] options dictionary + +Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response). + +Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly. + +#### response.ok + +*(spec-compliant)* + +Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300. + +#### response.redirected + +*(spec-compliant)* + +Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0. + + +### Class: Headers + +This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented. + +#### new Headers([init]) + +*(spec-compliant)* + +- `init` Optional argument to pre-fill the `Headers` object + +Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object. + +```js +// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class + +const meta = { + 'Content-Type': 'text/xml', + 'Breaking-Bad': '<3' +}; +const headers = new Headers(meta); + +// The above is equivalent to +const meta = [ + [ 'Content-Type', 'text/xml' ], + [ 'Breaking-Bad', '<3' ] +]; +const headers = new Headers(meta); + +// You can in fact use any iterable objects, like a Map or even another Headers +const meta = new Map(); +meta.set('Content-Type', 'text/xml'); +meta.set('Breaking-Bad', '<3'); +const headers = new Headers(meta); +const copyOfHeaders = new Headers(headers); +``` + + +### Interface: Body + +`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes. + +The following methods are not yet implemented in node-fetch at this moment: + +- `formData()` + +#### body.body + +*(deviation from spec)* + +* Node.js [`Readable` stream][node-readable] + +Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable]. + +#### body.bodyUsed + +*(spec-compliant)* + +* `Boolean` + +A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again. + +#### body.arrayBuffer() +#### body.blob() +#### body.json() +#### body.text() + +*(spec-compliant)* + +* Returns: Promise + +Consume the body and return a promise that will resolve to one of these formats. + +#### body.buffer() + +*(node-fetch extension)* + +* Returns: Promise<Buffer> + +Consume the body and return a promise that will resolve to a Buffer. + +#### body.textConverted() + +*(node-fetch extension)* + +* Returns: Promise<String> + +Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible. + +(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.) + + +### Class: FetchError + +*(node-fetch extension)* + +An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info. + + +### Class: AbortError + +*(node-fetch extension)* + +An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info. + +## Acknowledgement + +Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference. + +`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr). + +## License + +MIT + +[npm-image]: https://flat.badgen.net/npm/v/node-fetch +[npm-url]: https://www.npmjs.com/package/node-fetch +[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch +[travis-url]: https://travis-ci.org/bitinn/node-fetch +[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master +[codecov-url]: https://codecov.io/gh/bitinn/node-fetch +[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch +[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch +[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square +[discord-url]: https://discord.gg/Zxbndcm +[opencollective-image]: https://opencollective.com/node-fetch/backers.svg +[opencollective-url]: https://opencollective.com/node-fetch +[whatwg-fetch]: https://fetch.spec.whatwg.org/ +[response-init]: https://fetch.spec.whatwg.org/#responseinit +[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams +[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers +[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md +[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md +[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md diff --git a/node_modules/node-fetch/browser.js b/node_modules/node-fetch/browser.js new file mode 100644 index 0000000..83c54c5 --- /dev/null +++ b/node_modules/node-fetch/browser.js @@ -0,0 +1,25 @@ +"use strict"; + +// ref: https://github.com/tc39/proposal-global +var getGlobal = function () { + // the only reliable means to get the global object is + // `Function('return this')()` + // However, this causes CSP violations in Chrome apps. + if (typeof self !== 'undefined') { return self; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + throw new Error('unable to locate global object'); +} + +var global = getGlobal(); + +module.exports = exports = global.fetch; + +// Needed for TypeScript and Webpack. +if (global.fetch) { + exports.default = global.fetch.bind(global); +} + +exports.Headers = global.Headers; +exports.Request = global.Request; +exports.Response = global.Response; \ No newline at end of file diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js new file mode 100644 index 0000000..79f70d3 --- /dev/null +++ b/node_modules/node-fetch/lib/index.es.js @@ -0,0 +1,1662 @@ +process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); + +import Stream from 'stream'; +import http from 'http'; +import Url from 'url'; +import whatwgUrl from 'whatwg-url'; +import https from 'https'; +import zlib from 'zlib'; + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +export default fetch; +export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js new file mode 100644 index 0000000..45d3985 --- /dev/null +++ b/node_modules/node-fetch/lib/index.js @@ -0,0 +1,1671 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(require('stream')); +var http = _interopDefault(require('http')); +var Url = _interopDefault(require('url')); +var whatwgUrl = _interopDefault(require('whatwg-url')); +var https = _interopDefault(require('https')); +var zlib = _interopDefault(require('zlib')); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs new file mode 100644 index 0000000..31260e5 --- /dev/null +++ b/node_modules/node-fetch/lib/index.mjs @@ -0,0 +1,1660 @@ +import Stream from 'stream'; +import http from 'http'; +import Url from 'url'; +import whatwgUrl from 'whatwg-url'; +import https from 'https'; +import zlib from 'zlib'; + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +export default fetch; +export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json new file mode 100644 index 0000000..ec05105 --- /dev/null +++ b/node_modules/node-fetch/package.json @@ -0,0 +1,68 @@ +{ + "name": "node-fetch", + "version": "2.6.6", + "description": "A light-weight module that brings window.fetch to node.js", + "main": "lib/index.js", + "browser": "./browser.js", + "module": "lib/index.mjs", + "files": [ + "lib/index.js", + "lib/index.mjs", + "lib/index.es.js", + "browser.js" + ], + "engines": { + "node": "4.x || >=6.0.0" + }, + "scripts": { + "build": "cross-env BABEL_ENV=rollup rollup -c", + "prepare": "npm run build", + "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js", + "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", + "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json" + }, + "repository": { + "type": "git", + "url": "https://github.com/bitinn/node-fetch.git" + }, + "keywords": [ + "fetch", + "http", + "promise" + ], + "author": "David Frank", + "license": "MIT", + "bugs": { + "url": "https://github.com/bitinn/node-fetch/issues" + }, + "homepage": "https://github.com/bitinn/node-fetch", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "devDependencies": { + "@ungap/url-search-params": "^0.1.2", + "abort-controller": "^1.1.0", + "abortcontroller-polyfill": "^1.3.0", + "babel-core": "^6.26.3", + "babel-plugin-istanbul": "^4.1.6", + "babel-preset-env": "^1.6.1", + "babel-register": "^6.16.3", + "chai": "^3.5.0", + "chai-as-promised": "^7.1.1", + "chai-iterator": "^1.1.1", + "chai-string": "~1.3.0", + "codecov": "3.3.0", + "cross-env": "^5.2.0", + "form-data": "^2.3.3", + "is-builtin-module": "^1.0.0", + "mocha": "^5.0.0", + "nyc": "11.9.0", + "parted": "^0.1.1", + "promise": "^8.0.3", + "resumer": "0.0.0", + "rollup": "^0.63.4", + "rollup-plugin-babel": "^3.0.7", + "string-to-arraybuffer": "^1.0.2", + "teeny-request": "3.7.0" + } +} diff --git a/node_modules/p-timeout/index.d.ts b/node_modules/p-timeout/index.d.ts new file mode 100644 index 0000000..480eb0c --- /dev/null +++ b/node_modules/p-timeout/index.d.ts @@ -0,0 +1,113 @@ +declare class TimeoutErrorClass extends Error { + readonly name: 'TimeoutError'; + constructor(message?: string); +} + +declare namespace pTimeout { + type TimeoutError = TimeoutErrorClass; + + type Options = { + /** + Custom implementations for the `setTimeout` and `clearTimeout` functions. + + Useful for testing purposes, in particular to work around [`sinon.useFakeTimers()`](https://sinonjs.org/releases/latest/fake-timers/). + + @example + ``` + import pTimeout = require('p-timeout'); + import sinon = require('sinon'); + + (async () => { + const originalSetTimeout = setTimeout; + const originalClearTimeout = clearTimeout; + + sinon.useFakeTimers(); + + // Use `pTimeout` without being affected by `sinon.useFakeTimers()`: + await pTimeout(doSomething(), 2000, undefined, { + customTimers: { + setTimeout: originalSetTimeout, + clearTimeout: originalClearTimeout + } + }); + })(); + ``` + */ + readonly customTimers?: { + setTimeout: typeof global.setTimeout; + clearTimeout: typeof global.clearTimeout; + }; + }; +} + +interface ClearablePromise extends Promise{ + /** + Clear the timeout. + */ + clear: () => void; +} + +declare const pTimeout: { + TimeoutError: typeof TimeoutErrorClass; + + default: typeof pTimeout; + + /** + Timeout a promise after a specified amount of time. + + If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out. + + @param input - Promise to decorate. + @param milliseconds - Milliseconds before timing out. + @param message - Specify a custom error message or error. If you do a custom error, it's recommended to sub-class `pTimeout.TimeoutError`. Default: `'Promise timed out after 50 milliseconds'`. + @returns A decorated `input` that times out after `milliseconds` time. It has a `.clear()` method that clears the timeout. + + @example + ``` + import delay = require('delay'); + import pTimeout = require('p-timeout'); + + const delayedPromise = delay(200); + + pTimeout(delayedPromise, 50).then(() => 'foo'); + //=> [TimeoutError: Promise timed out after 50 milliseconds] + ``` + */ + ( + input: PromiseLike, + milliseconds: number, + message?: string | Error, + options?: pTimeout.Options + ): ClearablePromise; + + /** + Timeout a promise after a specified amount of time. + + If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out. + + @param input - Promise to decorate. + @param milliseconds - Milliseconds before timing out. Passing `Infinity` will cause it to never time out. + @param fallback - Do something other than rejecting with an error on timeout. You could for example retry. + @returns A decorated `input` that times out after `milliseconds` time. It has a `.clear()` method that clears the timeout. + + @example + ``` + import delay = require('delay'); + import pTimeout = require('p-timeout'); + + const delayedPromise = () => delay(200); + + pTimeout(delayedPromise(), 50, () => { + return pTimeout(delayedPromise(), 300); + }); + ``` + */ + ( + input: PromiseLike, + milliseconds: number, + fallback: () => ReturnType | Promise, + options?: pTimeout.Options + ): ClearablePromise; +}; + +export = pTimeout; diff --git a/node_modules/p-timeout/index.js b/node_modules/p-timeout/index.js new file mode 100644 index 0000000..3cbd95e --- /dev/null +++ b/node_modules/p-timeout/index.js @@ -0,0 +1,71 @@ +'use strict'; + +class TimeoutError extends Error { + constructor(message) { + super(message); + this.name = 'TimeoutError'; + } +} + +const pTimeout = (promise, milliseconds, fallback, options) => { + let timer; + const cancelablePromise = new Promise((resolve, reject) => { + if (typeof milliseconds !== 'number' || milliseconds < 0) { + throw new TypeError('Expected `milliseconds` to be a positive number'); + } + + if (milliseconds === Infinity) { + resolve(promise); + return; + } + + options = { + customTimers: {setTimeout, clearTimeout}, + ...options + }; + + timer = options.customTimers.setTimeout.call(undefined, () => { + if (typeof fallback === 'function') { + try { + resolve(fallback()); + } catch (error) { + reject(error); + } + + return; + } + + const message = typeof fallback === 'string' ? fallback : `Promise timed out after ${milliseconds} milliseconds`; + const timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message); + + if (typeof promise.cancel === 'function') { + promise.cancel(); + } + + reject(timeoutError); + }, milliseconds); + + (async () => { + try { + resolve(await promise); + } catch (error) { + reject(error); + } finally { + options.customTimers.clearTimeout.call(undefined, timer); + } + })(); + }); + + cancelablePromise.clear = () => { + clearTimeout(timer); + timer = undefined; + }; + + return cancelablePromise; +}; + +module.exports = pTimeout; +// TODO: Remove this for the next major release +module.exports.default = pTimeout; + +module.exports.TimeoutError = TimeoutError; diff --git a/node_modules/p-timeout/license b/node_modules/p-timeout/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/node_modules/p-timeout/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-timeout/package.json b/node_modules/p-timeout/package.json new file mode 100644 index 0000000..6b3afe4 --- /dev/null +++ b/node_modules/p-timeout/package.json @@ -0,0 +1,44 @@ +{ + "name": "p-timeout", + "version": "4.1.0", + "description": "Timeout a promise after a specified amount of time", + "license": "MIT", + "repository": "sindresorhus/p-timeout", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "timeout", + "error", + "invalidate", + "async", + "await", + "promises", + "time", + "out", + "cancel", + "bluebird" + ], + "devDependencies": { + "ava": "^2.4.0", + "delay": "^4.4.0", + "p-cancelable": "^2.0.0", + "tsd": "^0.13.1", + "xo": "^0.35.0", + "in-range": "^2.0.0", + "time-span": "^4.0.0" + } +} diff --git a/node_modules/p-timeout/readme.md b/node_modules/p-timeout/readme.md new file mode 100644 index 0000000..4000012 --- /dev/null +++ b/node_modules/p-timeout/readme.md @@ -0,0 +1,117 @@ +# p-timeout + +> Timeout a promise after a specified amount of time + +## Install + +``` +$ npm install p-timeout +``` + +## Usage + +```js +const delay = require('delay'); +const pTimeout = require('p-timeout'); + +const delayedPromise = delay(200); + +pTimeout(delayedPromise, 50).then(() => 'foo'); +//=> [TimeoutError: Promise timed out after 50 milliseconds] +``` + +## API + +### pTimeout(input, milliseconds, message?, options?) +### pTimeout(input, milliseconds, fallback?, options?) + +Returns a decorated `input` that times out after `milliseconds` time. It has a `.clear()` method that clears the timeout. + +If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out. + +#### input + +Type: `Promise` + +Promise to decorate. + +#### milliseconds + +Type: `number` + +Milliseconds before timing out. + +Passing `Infinity` will cause it to never time out. + +#### message + +Type: `string | Error`\ +Default: `'Promise timed out after 50 milliseconds'` + +Specify a custom error message or error. + +If you do a custom error, it's recommended to sub-class `pTimeout.TimeoutError`. + +#### fallback + +Type: `Function` + +Do something other than rejecting with an error on timeout. + +You could for example retry: + +```js +const delay = require('delay'); +const pTimeout = require('p-timeout'); + +const delayedPromise = () => delay(200); + +pTimeout(delayedPromise(), 50, () => { + return pTimeout(delayedPromise(), 300); +}); +``` + +#### options + +Type: `object` + +##### customTimers + +Type: `object` with function properties `setTimeout` and `clearTimeout` + +Custom implementations for the `setTimeout` and `clearTimeout` functions. + +Useful for testing purposes, in particular to work around [`sinon.useFakeTimers()`](https://sinonjs.org/releases/latest/fake-timers/). + +Example: + +```js +const pTimeout = require('p-timeout'); +const sinon = require('sinon'); + +(async () => { + const originalSetTimeout = setTimeout; + const originalClearTimeout = clearTimeout; + + sinon.useFakeTimers(); + + // Use `pTimeout` without being affected by `sinon.useFakeTimers()`: + await pTimeout(doSomething(), 2000, undefined, { + customTimers: { + setTimeout: originalSetTimeout, + clearTimeout: originalClearTimeout + } + }); +})(); +``` + +### pTimeout.TimeoutError + +Exposed for instance checking and sub-classing. + +## Related + +- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time +- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time +- [p-retry](https://github.com/sindresorhus/p-retry) - Retry a promise-returning function +- [More…](https://github.com/sindresorhus/promise-fun) diff --git a/node_modules/safe-compare/.npmignore b/node_modules/safe-compare/.npmignore new file mode 100644 index 0000000..b739d24 --- /dev/null +++ b/node_modules/safe-compare/.npmignore @@ -0,0 +1,44 @@ +# Created by .ignore support plugin (hsz.mobi) +### Node template +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# IDE +.idea +.c9 +.git + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git +node_modules + +# misc +.DS_Store +.codeclimate.yml +.travis.yml + +# test directory +benchmark +test diff --git a/node_modules/safe-compare/LICENSE b/node_modules/safe-compare/LICENSE new file mode 100644 index 0000000..b7f34f5 --- /dev/null +++ b/node_modules/safe-compare/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Michael Raith + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/safe-compare/README.md b/node_modules/safe-compare/README.md new file mode 100644 index 0000000..4fb93a3 --- /dev/null +++ b/node_modules/safe-compare/README.md @@ -0,0 +1,58 @@ +# safe-compare +Constant-time comparison algorithm to prevent Node.js timing attacks. + +For more information about Node.js timing attacks, please visit https://snyk.io/blog/node-js-timing-attack-ccc-ctf/. + +[![npm package](https://img.shields.io/npm/v/safe-compare.svg?style=flat-square)](https://www.npmjs.org/package/safe-compare) +[![tag:?](https://img.shields.io/github/tag/Bruce17/safe-compare.svg?style=flat-square)](https://github.com/Bruce17/safe-compare/releases) +[![Dependency Status](https://david-dm.org/Bruce17/safe-compare.svg?style=flat-square)](https://david-dm.org/Bruce17/safe-compare) +[![devDependency Status](https://david-dm.org/Bruce17/safe-compare/dev-status.svg?style=flat-square)](https://david-dm.org/Bruce17/safe-compare#info=devDependencies) +[![Coverage Status](https://coveralls.io/repos/github/Bruce17/safe-compare/badge.svg?branch=master)](https://coveralls.io/github/Bruce17/safe-compare?branch=master) +[![Code Climate](https://codeclimate.com/github/Bruce17/safe-compare/badges/gpa.svg)](https://codeclimate.com/github/Bruce17/safe-compare) +[![Known Vulnerabilities](https://snyk.io/test/github/bruce17/safe-compare/badge.svg)](https://snyk.io/test/github/bruce17/safe-compare) +[![Build Status - Tarvis](https://travis-ci.org/Bruce17/safe-compare.svg?style=flat-square&branch=master)](https://travis-ci.org/Bruce17/safe-compare) +[![Build status - AppVeyor](https://ci.appveyor.com/api/projects/status/ounmeq5c4ajuu7g3/branch/master?svg=true)](https://ci.appveyor.com/project/Bruce17/safe-compare/branch/master) + +**NOTICE**: + +If you are using Node.js v6.6.0 or higher, you can use [crypto.timingSafeEqual(a, b)](https://nodejs.org/api/crypto.html#crypto_crypto_timingsafeequal_a_b) from the `crypto` module. Keep in mind that the method `crypto.timingSafeEqual` only accepts `Buffer`s with the same length! This bundle will handle strings with different lengths for you. + + +## Installation + +``` +$ npm install safe-compare --save +``` + + +## Usage + +```javascript +var safeCompare = require('safe-compare'); + +safeCompare('hello world', 'hello world'); // -> true + +safeCompare('hello', 'not hello'); // -> false +safeCompare('hello foo', 'hello bar'); // -> false +``` + +Note: runtime is always corresponding to the length of the first parameter. + + +## Tests + +``` +$ npm test +``` + + +## What's the improvement of this package? + +This Node.js module is a improvement of the two existing modules [scmp](https://github.com/freewil/scmp) and [secure-compare](https://github.com/vdemedes/secure-compare). It uses the best parts of both implementations. + +The implementation of [scmp](https://github.com/freewil/scmp) is a good base, but it has a shorter execution time if the string's length is not equal. The package [secure-compare](https://github.com/vdemedes/secure-compare) always compares the two input strings, but its implementation is not as clean as in [scmp](https://github.com/freewil/scmp). + + +## License + +safe-compare is released under the MIT license. diff --git a/node_modules/safe-compare/appveyor.yml b/node_modules/safe-compare/appveyor.yml new file mode 100644 index 0000000..51f0cc8 --- /dev/null +++ b/node_modules/safe-compare/appveyor.yml @@ -0,0 +1,56 @@ +# Set build version. +version: "{build}-{branch}" + +environment: + matrix: + - nodejs_version: "11" + - nodejs_version: "10" + - nodejs_version: "9" + - nodejs_version: "8" + - nodejs_version: "7" + - nodejs_version: "6" + - nodejs_version: "5" + - nodejs_version: "4" + - nodejs_version: "0.12" + - nodejs_version: "0.11" + - nodejs_version: "0.10" + # io.js + - nodejs_version: "1" + +platform: + - x86 + - x64 + +matrix: + # Fail fast and stop on build errors for the current tested version. + fast_finish: true + +cache: + - node_modules -> package.json + +# Fix Git line endings on checkout +#init: +# - git config --global core.autocrlf true + +install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm install + +test_script: + # Output used NodeJS/NPM versions + - node --version + - npm --version + + # run tests + - npm run-script test + - npm run-script test-travis + +#after_test: +# # send coverage data to coveralls +# - npm run-script coveralls +# +# # send coverage data to codeclimate +# - npm run-script codeclimate + +# Don't actually build. +build: off diff --git a/node_modules/safe-compare/index.js b/node_modules/safe-compare/index.js new file mode 100644 index 0000000..8dd4fac --- /dev/null +++ b/node_modules/safe-compare/index.js @@ -0,0 +1,75 @@ +/** + * @author Michael Raith + * @date 24.02.2016 12:04 + */ + +'use strict'; + +var crypto = require('crypto'); +var bufferAlloc = require('buffer-alloc'); + + +/** + * Do a constant time string comparison. Always compare the complete strings + * against each other to get a constant time. This method does not short-cut + * if the two string's length differs. + * + * @param {string} a + * @param {string} b + * + * @return {boolean} + */ +var safeCompare = function safeCompare(a, b) { + var strA = String(a); + var strB = String(b); + var lenA = strA.length; + var result = 0; + + if (lenA !== strB.length) { + strB = strA; + result = 1; + } + + for (var i = 0; i < lenA; i++) { + result |= (strA.charCodeAt(i) ^ strB.charCodeAt(i)); + } + + return result === 0; +}; + + +/** + * Call native "crypto.timingSafeEqual" methods. + * All passed values will be converted into strings first. + * + * Runtime is always corresponding to the length of the first parameter (string + * a). + * + * @param {string} a + * @param {string} b + * + * @return {boolean} + */ +var nativeTimingSafeEqual = function nativeTimingSafeEqual(a, b) { + var strA = String(a); + var strB = String(b); + var aLen = Buffer.byteLength(strA); + var bLen = Buffer.byteLength(strB); + + // Always use length of a to avoid leaking the length. Even if this is a + // false positive because one is a prefix of the other, the explicit length + // check at the end will catch that. + var bufA = bufferAlloc(aLen, 0, 'utf8'); + bufA.write(strA); + var bufB = bufferAlloc(aLen, 0, 'utf8'); + bufB.write(strB); + + return crypto.timingSafeEqual(bufA, bufB) && aLen === bLen; +}; + + +module.exports = ( + typeof crypto.timingSafeEqual !== 'undefined' ? + nativeTimingSafeEqual : + safeCompare +); diff --git a/node_modules/safe-compare/package.json b/node_modules/safe-compare/package.json new file mode 100644 index 0000000..d7cfe62 --- /dev/null +++ b/node_modules/safe-compare/package.json @@ -0,0 +1,46 @@ +{ + "name": "safe-compare", + "version": "1.1.4", + "description": "Constant-time comparison algorithm to prevent timing attacks.", + "main": "index.js", + "scripts": { + "test": "mocha", + "posttest": "matcha", + "test-travis": "node --harmony node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -u exports", + "coveralls": "node ./node_modules/.bin/coveralls < ./coverage/lcov.info", + "codeclimate": "node ./node_modules/.bin/codeclimate-test-reporter < ./coverage/lcov.info" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Bruce17/safe-compare.git" + }, + "keywords": [ + "safe-compare", + "secure-compare", + "compare", + "time-equivalent-comparison", + "time", + "equivalent", + "timing", + "attack", + "constant-time", + "constant", + "time" + ], + "author": "Michael Raith", + "license": "MIT", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/Bruce17/safe-compare/issues" + }, + "homepage": "https://github.com/Bruce17/safe-compare#readme", + "devDependencies": { + "coveralls": "^2.11.14", + "istanbul": "^0.4.5", + "matcha": "^0.7.0", + "mocha": "^3.1.2" + }, + "dependencies": { + "buffer-alloc": "^1.2.0" + } +} diff --git a/node_modules/sandwich-stream/.editorconfig b/node_modules/sandwich-stream/.editorconfig new file mode 100644 index 0000000..e2dccfd --- /dev/null +++ b/node_modules/sandwich-stream/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +indent_size = 4 +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/sandwich-stream/LICENCE b/node_modules/sandwich-stream/LICENCE new file mode 100644 index 0000000..00df770 --- /dev/null +++ b/node_modules/sandwich-stream/LICENCE @@ -0,0 +1,13 @@ +Copyright 2013 Paul Connolley (connrs) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/sandwich-stream/README.md b/node_modules/sandwich-stream/README.md new file mode 100644 index 0000000..6dfbc71 --- /dev/null +++ b/node_modules/sandwich-stream/README.md @@ -0,0 +1,58 @@ +# SandwichStream + +[![npm](https://img.shields.io/npm/v/sandwich-stream.svg?style=flat-square)](https://www.npmjs.com/package/sandwich-stream) +[![npm](https://img.shields.io/npm/dt/sandwich-stream.svg?style=flat-square)](https://www.npmjs.com/package/sandwich-stream) +[![Travis CI](https://img.shields.io/travis/connrs/node-sandwich-stream.svg?style=flat-square)](https://travis-ci.org/connrs/node-sandwich-stream) +[![codecov](https://img.shields.io/codecov/c/github/connrs/node-sandwich-stream.svg?style=flat-square)](https://codecov.io/gh/connrs/node-sandwich-stream) +[![Codacy Badge](https://img.shields.io/codacy/grade/6d64b00364bf413980280bd4e55d6115.svg?style=flat-square)](https://www.codacy.com/project/connrs/node-sandwich-stream/dashboard?utm_source=github.com&utm_medium=referral&utm_content=connrs/node-sandwich-stream&utm_campaign=Badge_Grade_Dashboard) +[![Dependencies](https://david-dm.org/connrs/node-sandwich-stream.svg?style=flat-square)](https://codeclimate.com/github/connrs/node-sandwich-stream/master/package.json) +[![Known Vulnerabilities](https://snyk.io/test/github/connrs/node-sandwich-stream/badge.svg?style=flat-square&targetFile=package.json)](https://snyk.io/test/github/connrs/node-sandwich-stream?targetFile=package.json) +[![Maintainability](https://api.codeclimate.com/v1/badges/a6a00d50601938edfdad/maintainability)](https://codeclimate.com/github/connrs/node-sandwich-stream/maintainability) + +## About +While I'm not overjoyed about how performant the internals will operate, I wanted a readable stream that was ACTUALLY A READABLE STREAM. Not a streams1 stream masquerading as streams2. As soon as somebody writes a better concat stream as a readable stream with a nice simple API, this baby is going to develop some serious abandonment issues. + +## Installation +```bash +npm install sandwich-stream --save +``` + +**note**: this code was made using it [TypeScript](https://www.typescriptlang.org/), and its typings are linked in [package.json](./package.json), so there's no need of installing _@types/sandwich-stream_ or anything related. + +## Usage +```typescript +import { SandwichStream } from 'sandwich-stream'; +// OR EVEN: +// const SandwichStream = require('sandwich-stream'); + +const sandwich = SandwichStream({ + head: 'Thing at the top\n', + tail: '\nThing at the bottom', + separator: '\n ---- \n' +}); + +sandwich.add(aStreamIPreparedEarlier) + .add(anotherStreamIPreparedEarlier) + .add(aFurtherStreamIPreparedEarlier) + .pipe(process.stdout); + +// The thing at the top +// ---- +// Stream1 +// ---- +// Stream2 +// ---- +// Stream3 +// The thing at the bottom +``` +## Configuration Options +* `head` option takes a string/buffer and pushes the string before all other content +* `foot` option takes a string/buffer and pushes the string after all other data has been pushed +* `separator` option pushes a string/buffer between each stream +* [Readable Options](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/be662c475da091788139b486a55708f02e2880b6/types/node/index.d.ts#L6485) can also be passed through. + +## API +Too add a stream use the **.add** method: `sandwich.add(streamVariable);` + +## More +Wanna known more about Node Streams? Read [this](https://medium.freecodecamp.org/node-js-streams-everything-you-need-to-know-c9141306be93). diff --git a/node_modules/sandwich-stream/dist/sandwich-stream.d.ts b/node_modules/sandwich-stream/dist/sandwich-stream.d.ts new file mode 100644 index 0000000..da28ff3 --- /dev/null +++ b/node_modules/sandwich-stream/dist/sandwich-stream.d.ts @@ -0,0 +1,107 @@ +/// +import { Readable, ReadableOptions } from 'stream'; +/** + * Sandwich Options that will configure parsed data + */ +export interface SandwichOptions extends ReadableOptions { + readonly head?: string | Buffer; + readonly tail?: string | Buffer; + readonly separator?: string | Buffer; +} +/** + * Handles Readable streams requests as concatenation through data handling as + * well adding tags it each begin, end and between of the streams + */ +export declare class SandwichStream extends Readable { + private streamsActive; + private streams; + private newStreams; + private head; + private tail; + private separator; + private currentStream; + /** + * Initiates the SandwichStream, you can consider it also passing + * ReadableOptions to it + * + * @param head Pushes this content before all other content + * @param tail Pushes this content after all other data has been pushed + * @param separator Pushes this content between each stream + * @param remaining The other kind of options to be passed to Readable + * @example + * const ss = new SandwichStream({ + * head: 'This at the top\n', + * tail: '\nThis at the bottom', + * separator: '\n --- \n' + * }); + */ + constructor({ head, tail, separator, ...remaining }: SandwichOptions); + /** + * Add a new Readable stream in the queue + * + * @param newStream The Readable stream + * @example + * sandwichStream.add(streamOne); + * sandwichStream.add(streamTwo); + * sandwichStream.add(streamThree); + * @throws An Error in case that this request was not accepted + * @returns This instance of Sandwich Stream + */ + add(newStream: Readable): this; + /** + * Works in a similar way from the Readable read, only that this one checks + * for whether or not a stream is already being handled + * @returns This instance of Sandwich Stream + */ + _read(): void; + /** + * Binds an error thrown from one of the streams being handled + * + * @param err Error to be bind + * @returns This instance of Sandwich Stream + */ + private subStreamOnError; + /** + * Fetches the next stream to be handled + * @returns This instance of Sandwich Stream + */ + private streamNextStream; + /** + * Verifies whether or not the stream queue has ended + * @returns This instance of Sandwich Stream + */ + private nextStream; + /** + * Once the current stream starts to pass their data, this handles it in a + * less complicated way + * @returns This instance of Sandwich Stream + */ + private bindCurrentStreamEvents; + /** + * Handles the data from a current stream once they are being streamed + * @returns This instance of Sandwich Stream + */ + private currentStreamOnReadable; + /** + * Handles the tagging once a stream is finished + * @returns This instance of Sandwich Stream + */ + private currentStreamOnEnd; + /** + * Adds the head tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + private pushHead; + /** + * Adds the separator tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + private pushSeparator; + /** + * Adds the tail tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + private pushTail; +} +export default SandwichStream; +//# sourceMappingURL=sandwich-stream.d.ts.map \ No newline at end of file diff --git a/node_modules/sandwich-stream/dist/sandwich-stream.d.ts.map b/node_modules/sandwich-stream/dist/sandwich-stream.d.ts.map new file mode 100644 index 0000000..2a9f3a4 --- /dev/null +++ b/node_modules/sandwich-stream/dist/sandwich-stream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sandwich-stream.d.ts","sourceRoot":"","sources":["src/sandwich-stream.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IACxC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,aAAa,CAAyB;IAE9C;;;;;;;;;;;;;;OAcG;gBACS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE,eAAe;IAQpE;;;;;;;;;;OAUG;IACI,GAAG,CAAC,SAAS,EAAE,QAAQ,GAAG,IAAI;IAWrC;;;;OAIG;IACI,KAAK,IAAI,IAAI;IAQpB;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAIxB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAOlB;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAK/B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAO/B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAMhB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAMrB;;;OAGG;IACH,OAAO,CAAC,QAAQ;CAKnB;AAED,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/sandwich-stream/dist/sandwich-stream.js b/node_modules/sandwich-stream/dist/sandwich-stream.js new file mode 100644 index 0000000..b9daf8a --- /dev/null +++ b/node_modules/sandwich-stream/dist/sandwich-stream.js @@ -0,0 +1,185 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var stream = require('stream'); + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +} + +/** + * Handles Readable streams requests as concatenation through data handling as + * well adding tags it each begin, end and between of the streams + */ +class SandwichStream extends stream.Readable { + /** + * Initiates the SandwichStream, you can consider it also passing + * ReadableOptions to it + * + * @param head Pushes this content before all other content + * @param tail Pushes this content after all other data has been pushed + * @param separator Pushes this content between each stream + * @param remaining The other kind of options to be passed to Readable + * @example + * const ss = new SandwichStream({ + * head: 'This at the top\n', + * tail: '\nThis at the bottom', + * separator: '\n --- \n' + * }); + */ + constructor(_a) { + var { head, tail, separator } = _a, remaining = __rest(_a, ["head", "tail", "separator"]); + super(remaining); + this.streamsActive = false; + this.streams = []; + this.newStreams = []; + this.currentStream = null; + this.head = (null !== head && undefined !== head) ? head : null; + this.tail = (null !== tail && undefined !== tail) ? tail : null; + this.separator = (null !== separator && undefined !== separator) ? separator : null; + } + /** + * Add a new Readable stream in the queue + * + * @param newStream The Readable stream + * @example + * sandwichStream.add(streamOne); + * sandwichStream.add(streamTwo); + * sandwichStream.add(streamThree); + * @throws An Error in case that this request was not accepted + * @returns This instance of Sandwich Stream + */ + add(newStream) { + if (false === this.streamsActive) { + this.streams.push(newStream); + newStream.on('error', this.subStreamOnError.bind(this)); + } + else { + this.newStreams.push(newStream); + } + return this; + } + /** + * Works in a similar way from the Readable read, only that this one checks + * for whether or not a stream is already being handled + * @returns This instance of Sandwich Stream + */ + _read() { + if (false === this.streamsActive) { + this.streamsActive = true; + this.pushHead(); + this.streamNextStream(); + } + } + /** + * Binds an error thrown from one of the streams being handled + * + * @param err Error to be bind + * @returns This instance of Sandwich Stream + */ + subStreamOnError(err) { + this.emit('error', err); + } + /** + * Fetches the next stream to be handled + * @returns This instance of Sandwich Stream + */ + streamNextStream() { + if (true === this.nextStream()) { + this.bindCurrentStreamEvents(); + } + else { + this.pushTail(); + this.push(null); + } + } + /** + * Verifies whether or not the stream queue has ended + * @returns This instance of Sandwich Stream + */ + nextStream() { + const tmp = this.streams.shift(); + this.currentStream = (undefined !== tmp) ? tmp : null; + return null !== this.currentStream; + } + /** + * Once the current stream starts to pass their data, this handles it in a + * less complicated way + * @returns This instance of Sandwich Stream + */ + bindCurrentStreamEvents() { + this.currentStream.on('readable', this.currentStreamOnReadable.bind(this)); + this.currentStream.on('end', this.currentStreamOnEnd.bind(this)); + } + /** + * Handles the data from a current stream once they are being streamed + * @returns This instance of Sandwich Stream + */ + currentStreamOnReadable() { + const tmp = this.currentStream.read(); + const data = (undefined !== tmp && null !== tmp) ? tmp : ''; + this.push(data); + } + /** + * Handles the tagging once a stream is finished + * @returns This instance of Sandwich Stream + */ + currentStreamOnEnd() { + this.pushSeparator(); + this.streams.concat(this.newStreams); + this.newStreams = []; + this.streamNextStream(); + } + /** + * Adds the head tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + pushHead() { + if (null !== this.head) { + this.push(this.head); + } + } + /** + * Adds the separator tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + pushSeparator() { + if (0 < this.streams.length && null !== this.separator) { + this.push(this.separator); + } + } + /** + * Adds the tail tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + pushTail() { + if (null !== this.tail) { + this.push(this.tail); + } + } +} + +exports.SandwichStream = SandwichStream; +exports.default = SandwichStream; diff --git a/node_modules/sandwich-stream/dist/sandwich-stream.mjs b/node_modules/sandwich-stream/dist/sandwich-stream.mjs new file mode 100644 index 0000000..2cba066 --- /dev/null +++ b/node_modules/sandwich-stream/dist/sandwich-stream.mjs @@ -0,0 +1,181 @@ +import { Readable } from 'stream'; + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +} + +/** + * Handles Readable streams requests as concatenation through data handling as + * well adding tags it each begin, end and between of the streams + */ +class SandwichStream extends Readable { + /** + * Initiates the SandwichStream, you can consider it also passing + * ReadableOptions to it + * + * @param head Pushes this content before all other content + * @param tail Pushes this content after all other data has been pushed + * @param separator Pushes this content between each stream + * @param remaining The other kind of options to be passed to Readable + * @example + * const ss = new SandwichStream({ + * head: 'This at the top\n', + * tail: '\nThis at the bottom', + * separator: '\n --- \n' + * }); + */ + constructor(_a) { + var { head, tail, separator } = _a, remaining = __rest(_a, ["head", "tail", "separator"]); + super(remaining); + this.streamsActive = false; + this.streams = []; + this.newStreams = []; + this.currentStream = null; + this.head = (null !== head && undefined !== head) ? head : null; + this.tail = (null !== tail && undefined !== tail) ? tail : null; + this.separator = (null !== separator && undefined !== separator) ? separator : null; + } + /** + * Add a new Readable stream in the queue + * + * @param newStream The Readable stream + * @example + * sandwichStream.add(streamOne); + * sandwichStream.add(streamTwo); + * sandwichStream.add(streamThree); + * @throws An Error in case that this request was not accepted + * @returns This instance of Sandwich Stream + */ + add(newStream) { + if (false === this.streamsActive) { + this.streams.push(newStream); + newStream.on('error', this.subStreamOnError.bind(this)); + } + else { + this.newStreams.push(newStream); + } + return this; + } + /** + * Works in a similar way from the Readable read, only that this one checks + * for whether or not a stream is already being handled + * @returns This instance of Sandwich Stream + */ + _read() { + if (false === this.streamsActive) { + this.streamsActive = true; + this.pushHead(); + this.streamNextStream(); + } + } + /** + * Binds an error thrown from one of the streams being handled + * + * @param err Error to be bind + * @returns This instance of Sandwich Stream + */ + subStreamOnError(err) { + this.emit('error', err); + } + /** + * Fetches the next stream to be handled + * @returns This instance of Sandwich Stream + */ + streamNextStream() { + if (true === this.nextStream()) { + this.bindCurrentStreamEvents(); + } + else { + this.pushTail(); + this.push(null); + } + } + /** + * Verifies whether or not the stream queue has ended + * @returns This instance of Sandwich Stream + */ + nextStream() { + const tmp = this.streams.shift(); + this.currentStream = (undefined !== tmp) ? tmp : null; + return null !== this.currentStream; + } + /** + * Once the current stream starts to pass their data, this handles it in a + * less complicated way + * @returns This instance of Sandwich Stream + */ + bindCurrentStreamEvents() { + this.currentStream.on('readable', this.currentStreamOnReadable.bind(this)); + this.currentStream.on('end', this.currentStreamOnEnd.bind(this)); + } + /** + * Handles the data from a current stream once they are being streamed + * @returns This instance of Sandwich Stream + */ + currentStreamOnReadable() { + const tmp = this.currentStream.read(); + const data = (undefined !== tmp && null !== tmp) ? tmp : ''; + this.push(data); + } + /** + * Handles the tagging once a stream is finished + * @returns This instance of Sandwich Stream + */ + currentStreamOnEnd() { + this.pushSeparator(); + this.streams.concat(this.newStreams); + this.newStreams = []; + this.streamNextStream(); + } + /** + * Adds the head tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + pushHead() { + if (null !== this.head) { + this.push(this.head); + } + } + /** + * Adds the separator tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + pushSeparator() { + if (0 < this.streams.length && null !== this.separator) { + this.push(this.separator); + } + } + /** + * Adds the tail tag to the Sandwich Stream + * @returns This instance of Sandwich Stream + */ + pushTail() { + if (null !== this.tail) { + this.push(this.tail); + } + } +} + +export default SandwichStream; +export { SandwichStream }; diff --git a/node_modules/sandwich-stream/package.json b/node_modules/sandwich-stream/package.json new file mode 100644 index 0000000..df415d4 --- /dev/null +++ b/node_modules/sandwich-stream/package.json @@ -0,0 +1,72 @@ +{ + "name": "sandwich-stream", + "version": "2.0.2", + "description": "A readable stream that concatenates multiple streams with optional head, tail & join buffers", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.10" + }, + "repository": { + "type": "git", + "url": "https://github.com/connrs/node-sandwich-stream.git" + }, + "main": "dist/sandwich-stream", + "module": "dist/sandwich-stream.mjs", + "types": "dist/sandwich-stream.d.ts", + "keywords": [ + "stream", + "sandwich", + "readable", + "typescript", + "concatenation" + ], + "scripts": { + "rollup:build": "rollup -c", + "rollup:watch": "npm run rollup:build -- --watch", + "build": "npm run rollup:build", + "test": "snyk test && npm run jest", + "docs": "typedoc --out ./docs/ ./src/", + "lint": "tslint --config tslint.json --project .", + "jest": "jest --config jest.config.json --ci --runInBand --detectOpenHandles --forceExit --no-cache" + }, + "licenses": [ + { + "type": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + ], + "author": { + "name": "connrs", + "url": "https://connrs.uk/" + }, + "contributors": [ + { + "name": "Fazendaaa", + "email": "lucas.carotta@outlook.com", + "url": "http://fazendaaa.me/" + } + ], + "dependencies": {}, + "devDependencies": { + "@types/jest": "^23.3.5", + "@types/node": "^10.12.0", + "codecov": "^3.1.0", + "husky": "^1.1.2", + "jest": "^23.6.0", + "rollup": "^0.66.6", + "rollup-plugin-typescript2": "^0.17.2", + "snyk": "^1.104.1", + "ts-jest": "^23.10.4", + "ts-node": "^7.0.1", + "tslint": "^5.11.0", + "tslint-microsoft-contrib": "^5.2.1", + "typedoc": "^0.13.0", + "typescript": "^3.1.4" + }, + "husky": { + "hooks": { + "pre-push": "npm run build && npm test", + "pre-commit": "npm run lint && npm run docs" + } + } +} diff --git a/node_modules/sandwich-stream/rollup.config.js b/node_modules/sandwich-stream/rollup.config.js new file mode 100644 index 0000000..fa37045 --- /dev/null +++ b/node_modules/sandwich-stream/rollup.config.js @@ -0,0 +1,40 @@ +import typescript from 'rollup-plugin-typescript2'; + +import nodeOs from 'os'; +import nodePath from 'path'; + +import pkg from './package.json'; + +export default [ + { + input: 'src/sandwich-stream.ts', + external: [ + 'stream' + ], + plugins: [ + typescript({ + cacheRoot: nodePath.join( + nodeOs.tmpdir(), + String(Date.now), + '.rpt2_cache' + ), + tsconfigOverride: { + compilerOptions: { + composite: false + } + } + }) + ], + output: [ + { + file: `${pkg.main}.js`, + format: 'cjs', + exports: 'named' + }, + { + file: `${pkg.main}.mjs`, + format: 'esm' + } + ] + } +]; diff --git a/node_modules/scrypt-js/LICENSE.txt b/node_modules/scrypt-js/LICENSE.txt new file mode 100644 index 0000000..a9c5e0a --- /dev/null +++ b/node_modules/scrypt-js/LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/scrypt-js/README.md b/node_modules/scrypt-js/README.md new file mode 100644 index 0000000..89fc575 --- /dev/null +++ b/node_modules/scrypt-js/README.md @@ -0,0 +1,222 @@ +scrypt +====== + +The [scrypt](https://en.wikipedia.org/wiki/Scrypt) password-base key derivation +function (pbkdf) is an algorithm designed to be brute-force resistant that +converts human readable passwords into fixed length arrays of bytes, which can +then be used as a key for symmetric block ciphers, private keys, et cetera. + +### Features: +- **Non-blocking** - Gives other events in the event loop opportunities to run (asynchronous) +- **Cancellable** - If the key is no longer required, the computation can be cancelled +- **Progress Callback** - Provides the current progress of key derivation as a percentage complete + +Tuning +------ + +The scrypt algorithm is, by design, expensive to execute, which increases the amount of time an attacker requires in order to brute force guess a password, adjustable by several parameters which can be tuned: +- **N** - The CPU/memory cost; increasing this increases the overall difficulty +- **r** - The block size; increasing this increases the dependency on memory latency and bandwidth +- **p** - The parallelization cost; increasing this increases the dependency on multi-processing + + + +Installing +---------- + +**node.js** + +If you do not require the progress callback or cancellable features, and your application +is specific to *node.js*, you should likely use the +[built-in crypto package](https://nodejs.org/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback). + +Otherwise, to install in node.js, use: + +``` +npm install scrypt-js +``` + + +**browser** + +```html + +``` + +API +--- + +**scrypt . scrypt ( password , salt , N , r , p , dkLen [ , progressCallback ] )** *=> Promise* + +Compute the scrypt PBKDF asynchronously using a Promise. If *progressCallback* is +provided, it is periodically called with a single parameter, a number between 0 and +1 (inclusive) indicating the completion progress; it will **always** emit 0 at the +beginning and 1 at the end, and numbers between may repeat. + +**scrypt . syncScrypt ( password , salt , N , r , p , dkLen )** *=> Uint8Array* + +Compute the scrypt PBKDF synchronously. Keep in mind this may stall UI and other tasks and the +asynchronous version is highly preferred. + + +Example +------- + +```html + + +
% complete...
+ + + + + + + + + + +``` + +Encoding Notes +-------------- + +``` +TL;DR - either only allow ASCII characters in passwords, or use + String.prototype.normalize('NFKC') on any password +``` + +It is *HIGHLY* recommended that you do **NOT** pass strings into this (or any password-base key derivation function) library without careful consideration; you should convert your strings to a canonical format that you will use consistently across all platforms. + +When encoding passwords with UTF-8, it is important to realize that there may be multiple UTF-8 representations of a given string. Since the key generated by a password-base key derivation function is *dependent on the specific bytes*, this matters a great deal. + +**Composed vs. Decomposed** + +Certain UTF-8 code points can be combined with other characters to create composed characters. For example, the letter *a with the umlaut diacritic mark* (two dots over it) can be expressed two ways; as its composed form, U+00FC; or its decomposed form, which is the letter "u" followed by U+0308 (which basically means modify the previous character by adding an umlaut to it). + +```javascript +// In the following two cases, a "u" with an umlaut would be seen +> '\u00fc' +> 'u\u0308' + + +// In its composed form, it is 2 bytes long +> new Buffer('u\u0308'.normalize('NFKC')) + +> new Buffer('\u00fc') + + +// Whereas the decomposed form is 3 bytes, the letter u followed by U+0308 +> new Buffer('\u00fc'.normalize('NFKD')) + +> new Buffer('u\u0308') + +``` + + +**Compatibility equivalence mode** + +Certain strings are often displayed the same, even though they may have different semantic means. For example, UTF-8 provides a code point for the roman number for one, which appears as the letter I, in most fonts identically. Compatibility equivalence will fold these two cases into simply the capital letter I. + +``` +> '\u2160' +'I' +> 'I' +'I' +> '\u2160' === 'I' +false +> '\u2160'.normalize('NFKC') === 'I' +true +``` + + +**Normalizing** + +The `normalize()` method of a string can be used to convert a string to a +specific form. Without going into too much detail, I generally recommend +`NFKC`, however if you wish to dive deeper into this, a nice short summary +can be found in Pythons [unicodedata module](https://docs.python.org/2/library/unicodedata.html#unicodedata.normalize)'s +documentation. + +For browsers without `normalize()` support, the [npm unorm module](https://www.npmjs.com/package/unorm) +can be used to polyfill strings. + + +**Another example of encoding woes** + +One quick story I will share is a project which used the `SHA256(encodeURI(password))` as +a key, which (ignoring [rainbow table attacks](https://en.wikipedia.org/wiki/Rainbow_table)) +had an unfortunate consequence of old web browsers replacing spaces with `+` while on new web +browsers, replacing it with a `%20`, causing issues for anyone who used spaces in their password. + + +### Suggestions + +- While it may be inconvenient to many international users, one option is to restrict passwords to a safe subset of ASCII, for example: `/^[A-Za-z0-9!@#$%^&*()]+$/`. +- My personal recommendation is to normalize to the NFKC form, however, one could imagine setting their password to a Chinese phrase on one computer, and then one day using a computer that does not have Chinese input capabilities and therefore be unable to log in. + +**See:** [Unicode Equivalence](https://en.wikipedia.org/wiki/Unicode_equivalence) + + +Tests +----- + +The test cases from the [scrypt whitepaper](http://www.tarsnap.com/scrypt/scrypt.pdf) are included in `test/test-vectors.json` and can be run using: + +```javascript +npm test +``` + +Special Thanks +-------------- + +I would like to thank @dchest for his [scrypt-async](https://github.com/dchest/scrypt-async-js) +library and for his assistance providing feedback and optimization suggestions. + + +License +------- + +MIT license. + + +References +---------- + +- [scrypt white paper](http://www.tarsnap.com/scrypt/scrypt.pdf) +- [Wikipedia](https://en.wikipedia.org/wiki/Scrypt) +- [scrypt-async npm module](https://www.npmjs.com/package/scrypt-async) +- [scryptsy npm module](https://www.npmjs.com/package/scryptsy) +- [Unicode Equivalence](https://en.wikipedia.org/wiki/Unicode_equivalence) + + +Donations +--------- + +Obviously, it's all licensed under the MIT license, so use it as you wish; +but if you'd like to buy me a coffee, I won't complain. =) + +- Ethereum - `ricmoo.eth` diff --git a/node_modules/scrypt-js/index.html b/node_modules/scrypt-js/index.html new file mode 100644 index 0000000..8765b56 --- /dev/null +++ b/node_modules/scrypt-js/index.html @@ -0,0 +1,291 @@ + + + scrypt-js + + + +
+
+

scrypt-js

+
+ + + + + + +
+
+
+
Nlog2 [1, 63]
+ +
+
+
r
+ +
+
+
p
+ +
+
+
dkLen
+ +
+
+
+ +
0%
+
+
+
+
+ + + + + + + + + diff --git a/node_modules/scrypt-js/package.json b/node_modules/scrypt-js/package.json new file mode 100644 index 0000000..31e16da --- /dev/null +++ b/node_modules/scrypt-js/package.json @@ -0,0 +1,27 @@ +{ + "name": "scrypt-js", + "version": "3.0.1", + "description": "The scrypt password-based key derivation function with sync and cancellable async.", + "main": "scrypt.js", + "scripts": { + "test": "mocha test/test-scrypt.js" + }, + "types": "scrypt.d.ts", + "devDependencies": { + "mocha": "6.2.2" + }, + "keywords": [ + "scrypt", + "pbkdf", + "password", + "async", + "asynchronous", + "stepwise" + ], + "author": "Richard Moore ", + "repository": { + "type": "git", + "url": "git://github.com/ricmoo/scrypt-js.git" + }, + "license": "MIT" +} diff --git a/node_modules/scrypt-js/scrypt.d.ts b/node_modules/scrypt-js/scrypt.d.ts new file mode 100644 index 0000000..e0a9770 --- /dev/null +++ b/node_modules/scrypt-js/scrypt.d.ts @@ -0,0 +1,23 @@ + +export as namespace scrypt; + +export type ProgressCallback = (progress: number) => boolean | void; + +export function scrypt( + password: ArrayLike, + salt: ArrayLike, + N: number, + r: number, + p: number, + dkLen: number, + callback?: ProgressCallback +): Promise; + +export function syncScrypt( + password: ArrayLike, + salt: ArrayLike, + N: number, + r: number, + p: number, + dkLen: number +): Uint8Array; diff --git a/node_modules/scrypt-js/scrypt.js b/node_modules/scrypt-js/scrypt.js new file mode 100644 index 0000000..406c654 --- /dev/null +++ b/node_modules/scrypt-js/scrypt.js @@ -0,0 +1,488 @@ +"use strict"; + +(function(root) { + const MAX_VALUE = 0x7fffffff; + + // The SHA256 and PBKDF2 implementation are from scrypt-async-js: + // See: https://github.com/dchest/scrypt-async-js + function SHA256(m) { + const K = new Uint32Array([ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, + 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, + 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, + 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, + 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, + 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, + 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, + 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, + 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, + 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 + ]); + + let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a; + let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19; + const w = new Uint32Array(64); + + function blocks(p) { + let off = 0, len = p.length; + while (len >= 64) { + let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2; + + for (i = 0; i < 16; i++) { + j = off + i*4; + w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) | + ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff); + } + + for (i = 16; i < 64; i++) { + u = w[i-2]; + t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10); + + u = w[i-15]; + t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3); + + w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0; + } + + for (i = 0; i < 64; i++) { + t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^ + ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) + + ((h + ((K[i] + w[i]) | 0)) | 0)) | 0; + + t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^ + ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + h0 = (h0 + a) | 0; + h1 = (h1 + b) | 0; + h2 = (h2 + c) | 0; + h3 = (h3 + d) | 0; + h4 = (h4 + e) | 0; + h5 = (h5 + f) | 0; + h6 = (h6 + g) | 0; + h7 = (h7 + h) | 0; + + off += 64; + len -= 64; + } + } + + blocks(m); + + let i, bytesLeft = m.length % 64, + bitLenHi = (m.length / 0x20000000) | 0, + bitLenLo = m.length << 3, + numZeros = (bytesLeft < 56) ? 56 : 120, + p = m.slice(m.length - bytesLeft, m.length); + + p.push(0x80); + for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); } + p.push((bitLenHi >>> 24) & 0xff); + p.push((bitLenHi >>> 16) & 0xff); + p.push((bitLenHi >>> 8) & 0xff); + p.push((bitLenHi >>> 0) & 0xff); + p.push((bitLenLo >>> 24) & 0xff); + p.push((bitLenLo >>> 16) & 0xff); + p.push((bitLenLo >>> 8) & 0xff); + p.push((bitLenLo >>> 0) & 0xff); + + blocks(p); + + return [ + (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff, + (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff, + (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff, + (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff, + (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff, + (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff, + (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff, + (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff + ]; + } + + function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) { + // compress password if it's longer than hash block length + password = (password.length <= 64) ? password : SHA256(password); + + const innerLen = 64 + salt.length + 4; + const inner = new Array(innerLen); + const outerKey = new Array(64); + + let i; + let dk = []; + + // inner = (password ^ ipad) || salt || counter + for (i = 0; i < 64; i++) { inner[i] = 0x36; } + for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; } + for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; } + for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; } + + // outerKey = password ^ opad + for (i = 0; i < 64; i++) outerKey[i] = 0x5c; + for (i = 0; i < password.length; i++) outerKey[i] ^= password[i]; + + // increments counter inside inner + function incrementCounter() { + for (let i = innerLen - 1; i >= innerLen - 4; i--) { + inner[i]++; + if (inner[i] <= 0xff) return; + inner[i] = 0; + } + } + + // output blocks = SHA256(outerKey || SHA256(inner)) ... + while (dkLen >= 32) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner)))); + dkLen -= 32; + } + if (dkLen > 0) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen)); + } + + return dk; + } + + // The following is an adaptation of scryptsy + // See: https://www.npmjs.com/package/scryptsy + function blockmix_salsa8(BY, Yi, r, x, _X) { + let i; + + arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16); + for (i = 0; i < 2 * r; i++) { + blockxor(BY, i * 16, _X, 16); + salsa20_8(_X, x); + arraycopy(_X, 0, BY, Yi + (i * 16), 16); + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16); + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16); + } + } + + function R(a, b) { + return (a << b) | (a >>> (32 - b)); + } + + function salsa20_8(B, x) { + arraycopy(B, 0, x, 0, 16); + + for (let i = 8; i > 0; i -= 2) { + x[ 4] ^= R(x[ 0] + x[12], 7); + x[ 8] ^= R(x[ 4] + x[ 0], 9); + x[12] ^= R(x[ 8] + x[ 4], 13); + x[ 0] ^= R(x[12] + x[ 8], 18); + x[ 9] ^= R(x[ 5] + x[ 1], 7); + x[13] ^= R(x[ 9] + x[ 5], 9); + x[ 1] ^= R(x[13] + x[ 9], 13); + x[ 5] ^= R(x[ 1] + x[13], 18); + x[14] ^= R(x[10] + x[ 6], 7); + x[ 2] ^= R(x[14] + x[10], 9); + x[ 6] ^= R(x[ 2] + x[14], 13); + x[10] ^= R(x[ 6] + x[ 2], 18); + x[ 3] ^= R(x[15] + x[11], 7); + x[ 7] ^= R(x[ 3] + x[15], 9); + x[11] ^= R(x[ 7] + x[ 3], 13); + x[15] ^= R(x[11] + x[ 7], 18); + x[ 1] ^= R(x[ 0] + x[ 3], 7); + x[ 2] ^= R(x[ 1] + x[ 0], 9); + x[ 3] ^= R(x[ 2] + x[ 1], 13); + x[ 0] ^= R(x[ 3] + x[ 2], 18); + x[ 6] ^= R(x[ 5] + x[ 4], 7); + x[ 7] ^= R(x[ 6] + x[ 5], 9); + x[ 4] ^= R(x[ 7] + x[ 6], 13); + x[ 5] ^= R(x[ 4] + x[ 7], 18); + x[11] ^= R(x[10] + x[ 9], 7); + x[ 8] ^= R(x[11] + x[10], 9); + x[ 9] ^= R(x[ 8] + x[11], 13); + x[10] ^= R(x[ 9] + x[ 8], 18); + x[12] ^= R(x[15] + x[14], 7); + x[13] ^= R(x[12] + x[15], 9); + x[14] ^= R(x[13] + x[12], 13); + x[15] ^= R(x[14] + x[13], 18); + } + + for (let i = 0; i < 16; ++i) { + B[i] += x[i]; + } + } + + // naive approach... going back to loop unrolling may yield additional performance + function blockxor(S, Si, D, len) { + for (let i = 0; i < len; i++) { + D[i] ^= S[Si + i] + } + } + + function arraycopy(src, srcPos, dest, destPos, length) { + while (length--) { + dest[destPos++] = src[srcPos++]; + } + } + + function checkBufferish(o) { + if (!o || typeof(o.length) !== 'number') { return false; } + + for (let i = 0; i < o.length; i++) { + const v = o[i]; + if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) { + return false; + } + } + + return true; + } + + function ensureInteger(value, name) { + if (typeof(value) !== "number" || (value % 1)) { throw new Error('invalid ' + name); } + return value; + } + + // N = Cpu cost, r = Memory cost, p = parallelization cost + // callback(error, progress, key) + function _scrypt(password, salt, N, r, p, dkLen, callback) { + + N = ensureInteger(N, 'N'); + r = ensureInteger(r, 'r'); + p = ensureInteger(p, 'p'); + + dkLen = ensureInteger(dkLen, 'dkLen'); + + if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); } + + if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); } + if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); } + + if (!checkBufferish(password)) { + throw new Error('password must be an array or buffer'); + } + password = Array.prototype.slice.call(password); + + if (!checkBufferish(salt)) { + throw new Error('salt must be an array or buffer'); + } + salt = Array.prototype.slice.call(salt); + + let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r); + const B = new Uint32Array(p * 32 * r) + for (let i = 0; i < B.length; i++) { + const j = i * 4; + B[i] = ((b[j + 3] & 0xff) << 24) | + ((b[j + 2] & 0xff) << 16) | + ((b[j + 1] & 0xff) << 8) | + ((b[j + 0] & 0xff) << 0); + } + + const XY = new Uint32Array(64 * r); + const V = new Uint32Array(32 * r * N); + + const Yi = 32 * r; + + // scratch space + const x = new Uint32Array(16); // salsa20_8 + const _X = new Uint32Array(16); // blockmix_salsa8 + + const totalOps = p * N * 2; + let currentOp = 0; + let lastPercent10 = null; + + // Set this to true to abandon the scrypt on the next step + let stop = false; + + // State information + let state = 0; + let i0 = 0, i1; + let Bi; + + // How many blockmix_salsa8 can we do per step? + const limit = callback ? parseInt(1000 / r): 0xffffffff; + + // Trick from scrypt-async; if there is a setImmediate shim in place, use it + const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout; + + // This is really all I changed; making scryptsy a state machine so we occasionally + // stop and give other evnts on the evnt loop a chance to run. ~RicMoo + const incrementalSMix = function() { + if (stop) { + return callback(new Error('cancelled'), currentOp / totalOps); + } + + let steps; + + switch (state) { + case 0: + // for (var i = 0; i < p; i++)... + Bi = i0 * 32 * r; + + arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1 + + state = 1; // Move to ROMix 2 + i1 = 0; + + // Fall through + + case 1: + + // Run up to 1000 steps of the first inner smix loop + steps = N - i1; + if (steps > limit) { steps = limit; } + for (let i = 0; i < steps; i++) { // ROMix - 2 + arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3 + blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4 + } + + // for (var i = 0; i < N; i++) + i1 += steps; + currentOp += steps; + + if (callback) { + // Call the callback with the progress (optionally stopping us) + const percent10 = parseInt(1000 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { break; } + lastPercent10 = percent10; + } + } + + if (i1 < N) { break; } + + i1 = 0; // Move to ROMix 6 + state = 2; + + // Fall through + + case 2: + + // Run up to 1000 steps of the second inner smix loop + steps = N - i1; + if (steps > limit) { steps = limit; } + for (let i = 0; i < steps; i++) { // ROMix - 6 + const offset = (2 * r - 1) * 16; // ROMix - 7 + const j = XY[offset] & (N - 1); + blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner) + blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer) + } + + // for (var i = 0; i < N; i++)... + i1 += steps; + currentOp += steps; + + // Call the callback with the progress (optionally stopping us) + if (callback) { + const percent10 = parseInt(1000 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { break; } + lastPercent10 = percent10; + } + } + + if (i1 < N) { break; } + + arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10 + + // for (var i = 0; i < p; i++)... + i0++; + if (i0 < p) { + state = 0; + break; + } + + b = []; + for (let i = 0; i < B.length; i++) { + b.push((B[i] >> 0) & 0xff); + b.push((B[i] >> 8) & 0xff); + b.push((B[i] >> 16) & 0xff); + b.push((B[i] >> 24) & 0xff); + } + + const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen); + + // Send the result to the callback + if (callback) { callback(null, 1.0, derivedKey); } + + // Done; don't break (which would reschedule) + return derivedKey; + } + + // Schedule the next steps + if (callback) { nextTick(incrementalSMix); } + } + + // Run the smix state machine until completion + if (!callback) { + while (true) { + const derivedKey = incrementalSMix(); + if (derivedKey != undefined) { return derivedKey; } + } + } + + // Bootstrap the async incremental smix + incrementalSMix(); + } + + const lib = { + scrypt: function(password, salt, N, r, p, dkLen, progressCallback) { + return new Promise(function(resolve, reject) { + let lastProgress = 0; + if (progressCallback) { progressCallback(0); } + _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) { + if (error) { + reject(error); + } else if (key) { + if (progressCallback && lastProgress !== 1) { + progressCallback(1); + } + resolve(new Uint8Array(key)); + } else if (progressCallback && progress !== lastProgress) { + lastProgress = progress; + return progressCallback(progress); + } + }); + }); + }, + syncScrypt: function(password, salt, N, r, p, dkLen) { + return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen)); + } + }; + + // node.js + if (typeof(exports) !== 'undefined') { + module.exports = lib; + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(define) === 'function' && define.amd) { + define(lib); + + // Web Browsers + } else if (root) { + + // If there was an existing library "scrypt", make sure it is still available + if (root.scrypt) { + root._scrypt = root.scrypt; + } + + root.scrypt = lib; + } + +})(this); diff --git a/node_modules/scrypt-js/thirdparty/buffer.js b/node_modules/scrypt-js/thirdparty/buffer.js new file mode 100644 index 0000000..6aa51e4 --- /dev/null +++ b/node_modules/scrypt-js/thirdparty/buffer.js @@ -0,0 +1,1381 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.buffer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],2:[function(require,module,exports){ +exports.read = function(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity); + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); +}; + +exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); + + buffer[offset + i - d] |= s * 128; +}; + +},{}],"buffer":[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = Buffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 + +/** + * If `TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + * + * We detect these buggy browsers and set `TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. + */ +var TYPED_ARRAY_SUPPORT = (function () { + try { + var buf = new ArrayBuffer(0) + var arr = new Uint8Array(buf) + arr.foo = function () { return 42 } + return 42 === arr.foo() && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +})() + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (subject, encoding, noZero) { + if (!(this instanceof Buffer)) + return new Buffer(subject, encoding, noZero) + + var type = typeof subject + + // Find the length + var length + if (type === 'number') + length = subject > 0 ? subject >>> 0 : 0 + else if (type === 'string') { + if (encoding === 'base64') + subject = base64clean(subject) + length = Buffer.byteLength(subject, encoding) + } else if (type === 'object' && subject !== null) { // assume object is array-like + if (subject.type === 'Buffer' && isArray(subject.data)) + subject = subject.data + length = +subject.length > 0 ? Math.floor(+subject.length) : 0 + } else + throw new Error('First argument needs to be a number, array or string.') + + var buf + if (TYPED_ARRAY_SUPPORT) { + // Preferred: Return an augmented `Uint8Array` instance for best performance + buf = Buffer._augment(new Uint8Array(length)) + } else { + // Fallback: Return THIS instance of Buffer (created by `new`) + buf = this + buf.length = length + buf._isBuffer = true + } + + var i + if (TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { + // Speed optimization -- use set if we're copying from a typed array + buf._set(subject) + } else if (isArrayish(subject)) { + // Treat array-ish objects as a byte array + if (Buffer.isBuffer(subject)) { + for (i = 0; i < length; i++) + buf[i] = subject.readUInt8(i) + } else { + for (i = 0; i < length; i++) + buf[i] = ((subject[i] % 256) + 256) % 256 + } + } else if (type === 'string') { + buf.write(subject, 0, encoding) + } else if (type === 'number' && !TYPED_ARRAY_SUPPORT && !noZero) { + for (i = 0; i < length; i++) { + buf[i] = 0 + } + } + + return buf +} + +// STATIC METHODS +// ============== + +Buffer.isEncoding = function (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.isBuffer = function (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.byteLength = function (str, encoding) { + var ret + str = str.toString() + switch (encoding || 'utf8') { + case 'hex': + ret = str.length / 2 + break + case 'utf8': + case 'utf-8': + ret = utf8ToBytes(str).length + break + case 'ascii': + case 'binary': + case 'raw': + ret = str.length + break + case 'base64': + ret = base64ToBytes(str).length + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = str.length * 2 + break + default: + throw new Error('Unknown encoding') + } + return ret +} + +Buffer.concat = function (list, totalLength) { + assert(isArray(list), 'Usage: Buffer.concat(list[, length])') + + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } + + var i + if (totalLength === undefined) { + totalLength = 0 + for (i = 0; i < list.length; i++) { + totalLength += list[i].length + } + } + + var buf = new Buffer(totalLength) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +Buffer.compare = function (a, b) { + assert(Buffer.isBuffer(a) && Buffer.isBuffer(b), 'Arguments must be Buffers') + var x = a.length + var y = b.length + for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {} + if (i !== len) { + x = a[i] + y = b[i] + } + if (x < y) { + return -1 + } + if (y < x) { + return 1 + } + return 0 +} + +// BUFFER INSTANCE METHODS +// ======================= + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + assert(strLen % 2 === 0, 'Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var byte = parseInt(string.substr(i * 2, 2), 16) + assert(!isNaN(byte), 'Invalid hex string') + buf[offset + i] = byte + } + return i +} + +function utf8Write (buf, string, offset, length) { + var charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length) + return charsWritten +} + +function asciiWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) + return charsWritten +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) + return charsWritten +} + +function utf16leWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(utf16leToBytes(string), buf, offset, length) + return charsWritten +} + +Buffer.prototype.write = function (string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length + length = undefined + } + } else { // legacy + var swap = encoding + encoding = offset + offset = length + length = swap + } + + offset = Number(offset) || 0 + var remaining = this.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + encoding = String(encoding || 'utf8').toLowerCase() + + var ret + switch (encoding) { + case 'hex': + ret = hexWrite(this, string, offset, length) + break + case 'utf8': + case 'utf-8': + ret = utf8Write(this, string, offset, length) + break + case 'ascii': + ret = asciiWrite(this, string, offset, length) + break + case 'binary': + ret = binaryWrite(this, string, offset, length) + break + case 'base64': + ret = base64Write(this, string, offset, length) + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = utf16leWrite(this, string, offset, length) + break + default: + throw new Error('Unknown encoding') + } + return ret +} + +Buffer.prototype.toString = function (encoding, start, end) { + var self = this + + encoding = String(encoding || 'utf8').toLowerCase() + start = Number(start) || 0 + end = (end === undefined) ? self.length : Number(end) + + // Fastpath empty strings + if (end === start) + return '' + + var ret + switch (encoding) { + case 'hex': + ret = hexSlice(self, start, end) + break + case 'utf8': + case 'utf-8': + ret = utf8Slice(self, start, end) + break + case 'ascii': + ret = asciiSlice(self, start, end) + break + case 'binary': + ret = binarySlice(self, start, end) + break + case 'base64': + ret = base64Slice(self, start, end) + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = utf16leSlice(self, start, end) + break + default: + throw new Error('Unknown encoding') + } + return ret +} + +Buffer.prototype.toJSON = function () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +Buffer.prototype.equals = function (b) { + assert(Buffer.isBuffer(b), 'Argument must be a Buffer') + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.compare = function (b) { + assert(Buffer.isBuffer(b), 'Argument must be a Buffer') + return Buffer.compare(this, b) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function (target, target_start, start, end) { + var source = this + + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (!target_start) target_start = 0 + + // Copy 0 bytes; we're done + if (end === start) return + if (target.length === 0 || source.length === 0) return + + // Fatal error conditions + assert(end >= start, 'sourceEnd < sourceStart') + assert(target_start >= 0 && target_start < target.length, + 'targetStart out of bounds') + assert(start >= 0 && start < source.length, 'sourceStart out of bounds') + assert(end >= 0 && end <= source.length, 'sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) + end = this.length + if (target.length - target_start < end - start) + end = target.length - target_start + start + + var len = end - start + + if (len < 100 || !TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < len; i++) { + target[i + target_start] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), target_start) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } + + return res + decodeUtf8Char(tmp) +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function binarySlice (buf, start, end) { + return asciiSlice(buf, start, end) +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len; + if (start < 0) + start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) + end = 0 + } else if (end > len) { + end = len + } + + if (end < start) + end = start + + if (TYPED_ARRAY_SUPPORT) { + return Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + var newBuf = new Buffer(sliceLen, undefined, true) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + return newBuf + } +} + +// `get` will be removed in Node 0.13+ +Buffer.prototype.get = function (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` will be removed in Node 0.13+ +Buffer.prototype.set = function (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +Buffer.prototype.readUInt8 = function (offset, noAssert) { + if (!noAssert) { + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < this.length, 'Trying to read beyond buffer length') + } + + if (offset >= this.length) + return + + return this[offset] +} + +function readUInt16 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val + if (littleEndian) { + val = buf[offset] + if (offset + 1 < len) + val |= buf[offset + 1] << 8 + } else { + val = buf[offset] << 8 + if (offset + 1 < len) + val |= buf[offset + 1] + } + return val +} + +Buffer.prototype.readUInt16LE = function (offset, noAssert) { + return readUInt16(this, offset, true, noAssert) +} + +Buffer.prototype.readUInt16BE = function (offset, noAssert) { + return readUInt16(this, offset, false, noAssert) +} + +function readUInt32 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val + if (littleEndian) { + if (offset + 2 < len) + val = buf[offset + 2] << 16 + if (offset + 1 < len) + val |= buf[offset + 1] << 8 + val |= buf[offset] + if (offset + 3 < len) + val = val + (buf[offset + 3] << 24 >>> 0) + } else { + if (offset + 1 < len) + val = buf[offset + 1] << 16 + if (offset + 2 < len) + val |= buf[offset + 2] << 8 + if (offset + 3 < len) + val |= buf[offset + 3] + val = val + (buf[offset] << 24 >>> 0) + } + return val +} + +Buffer.prototype.readUInt32LE = function (offset, noAssert) { + return readUInt32(this, offset, true, noAssert) +} + +Buffer.prototype.readUInt32BE = function (offset, noAssert) { + return readUInt32(this, offset, false, noAssert) +} + +Buffer.prototype.readInt8 = function (offset, noAssert) { + if (!noAssert) { + assert(offset !== undefined && offset !== null, + 'missing offset') + assert(offset < this.length, 'Trying to read beyond buffer length') + } + + if (offset >= this.length) + return + + var neg = this[offset] & 0x80 + if (neg) + return (0xff - this[offset] + 1) * -1 + else + return this[offset] +} + +function readInt16 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val = readUInt16(buf, offset, littleEndian, true) + var neg = val & 0x8000 + if (neg) + return (0xffff - val + 1) * -1 + else + return val +} + +Buffer.prototype.readInt16LE = function (offset, noAssert) { + return readInt16(this, offset, true, noAssert) +} + +Buffer.prototype.readInt16BE = function (offset, noAssert) { + return readInt16(this, offset, false, noAssert) +} + +function readInt32 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val = readUInt32(buf, offset, littleEndian, true) + var neg = val & 0x80000000 + if (neg) + return (0xffffffff - val + 1) * -1 + else + return val +} + +Buffer.prototype.readInt32LE = function (offset, noAssert) { + return readInt32(this, offset, true, noAssert) +} + +Buffer.prototype.readInt32BE = function (offset, noAssert) { + return readInt32(this, offset, false, noAssert) +} + +function readFloat (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + return ieee754.read(buf, offset, littleEndian, 23, 4) +} + +Buffer.prototype.readFloatLE = function (offset, noAssert) { + return readFloat(this, offset, true, noAssert) +} + +Buffer.prototype.readFloatBE = function (offset, noAssert) { + return readFloat(this, offset, false, noAssert) +} + +function readDouble (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset + 7 < buf.length, 'Trying to read beyond buffer length') + } + + return ieee754.read(buf, offset, littleEndian, 52, 8) +} + +Buffer.prototype.readDoubleLE = function (offset, noAssert) { + return readDouble(this, offset, true, noAssert) +} + +Buffer.prototype.readDoubleBE = function (offset, noAssert) { + return readDouble(this, offset, false, noAssert) +} + +Buffer.prototype.writeUInt8 = function (value, offset, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < this.length, 'trying to write beyond buffer length') + verifuint(value, 0xff) + } + + if (offset >= this.length) return + + this[offset] = value + return offset + 1 +} + +function writeUInt16 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xffff) + } + + var len = buf.length + if (offset >= len) + return + + for (var i = 0, j = Math.min(len - offset, 2); i < j; i++) { + buf[offset + i] = + (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } + return offset + 2 +} + +Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) { + return writeUInt16(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) { + return writeUInt16(this, value, offset, false, noAssert) +} + +function writeUInt32 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xffffffff) + } + + var len = buf.length + if (offset >= len) + return + + for (var i = 0, j = Math.min(len - offset, 4); i < j; i++) { + buf[offset + i] = + (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } + return offset + 4 +} + +Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) { + return writeUInt32(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) { + return writeUInt32(this, value, offset, false, noAssert) +} + +Buffer.prototype.writeInt8 = function (value, offset, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < this.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7f, -0x80) + } + + if (offset >= this.length) + return + + if (value >= 0) + this.writeUInt8(value, offset, noAssert) + else + this.writeUInt8(0xff + value + 1, offset, noAssert) + return offset + 1 +} + +function writeInt16 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7fff, -0x8000) + } + + var len = buf.length + if (offset >= len) + return + + if (value >= 0) + writeUInt16(buf, value, offset, littleEndian, noAssert) + else + writeUInt16(buf, 0xffff + value + 1, offset, littleEndian, noAssert) + return offset + 2 +} + +Buffer.prototype.writeInt16LE = function (value, offset, noAssert) { + return writeInt16(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeInt16BE = function (value, offset, noAssert) { + return writeInt16(this, value, offset, false, noAssert) +} + +function writeInt32 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7fffffff, -0x80000000) + } + + var len = buf.length + if (offset >= len) + return + + if (value >= 0) + writeUInt32(buf, value, offset, littleEndian, noAssert) + else + writeUInt32(buf, 0xffffffff + value + 1, offset, littleEndian, noAssert) + return offset + 4 +} + +Buffer.prototype.writeInt32LE = function (value, offset, noAssert) { + return writeInt32(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeInt32BE = function (value, offset, noAssert) { + return writeInt32(this, value, offset, false, noAssert) +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to write beyond buffer length') + verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + + var len = buf.length + if (offset >= len) + return + + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 7 < buf.length, + 'Trying to write beyond buffer length') + verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + + var len = buf.length + if (offset >= len) + return + + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + assert(end >= start, 'end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + assert(start >= 0 && start < this.length, 'start out of bounds') + assert(end >= 0 && end <= this.length, 'end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +Buffer.prototype.inspect = function () { + var out = [] + var len = this.length + for (var i = 0; i < len; i++) { + out[i] = toHex(this[i]) + if (i === exports.INSPECT_MAX_BYTES) { + out[i + 1] = '...' + break + } + } + return '' +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function () { + if (typeof Uint8Array !== 'undefined') { + if (TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new Error('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function (arr) { + arr._isBuffer = true + + // save reference to original Uint8Array get/set methods before overwriting + arr._get = arr.get + arr._set = arr.set + + // deprecated, will be removed in node 0.13+ + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-z]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function isArray (subject) { + return (Array.isArray || function (subject) { + return Object.prototype.toString.call(subject) === '[object Array]' + })(subject) +} + +function isArrayish (subject) { + return isArray(subject) || Buffer.isBuffer(subject) || + subject && typeof subject === 'object' && + typeof subject.length === 'number' +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + var b = str.charCodeAt(i) + if (b <= 0x7F) { + byteArray.push(b) + } else { + var start = i + if (b >= 0xD800 && b <= 0xDFFF) i++ + var h = encodeURIComponent(str.slice(start, i+1)).substr(1).split('%') + for (var j = 0; j < h.length; j++) { + byteArray.push(parseInt(h[j], 16)) + } + } + } + return byteArray +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(str) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) + break + dst[i + offset] = src[i] + } + return i +} + +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} + +/* + * We have to make sure that the value is a valid integer. This means that it + * is non-negative. It has no fractional component and that it does not + * exceed the maximum allowed value. + */ +function verifuint (value, max) { + assert(typeof value === 'number', 'cannot write a non-number as a number') + assert(value >= 0, 'specified a negative value for writing an unsigned value') + assert(value <= max, 'value is larger than maximum value for type') + assert(Math.floor(value) === value, 'value has a fractional component') +} + +function verifsint (value, max, min) { + assert(typeof value === 'number', 'cannot write a non-number as a number') + assert(value <= max, 'value larger than maximum allowed value') + assert(value >= min, 'value smaller than minimum allowed value') + assert(Math.floor(value) === value, 'value has a fractional component') +} + +function verifIEEE754 (value, max, min) { + assert(typeof value === 'number', 'cannot write a non-number as a number') + assert(value <= max, 'value larger than maximum allowed value') + assert(value >= min, 'value smaller than minimum allowed value') +} + +function assert (test, message) { + if (!test) throw new Error(message || 'Failed assertion') +} + +},{"base64-js":1,"ieee754":2}]},{},[])("buffer") +}); \ No newline at end of file diff --git a/node_modules/scrypt-js/thirdparty/setImmediate.js b/node_modules/scrypt-js/thirdparty/setImmediate.js new file mode 100644 index 0000000..5abe55c --- /dev/null +++ b/node_modules/scrypt-js/thirdparty/setImmediate.js @@ -0,0 +1,175 @@ +(function (global, undefined) { + "use strict"; + + if (global.setImmediate) { + return; + } + + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var setImmediate; + + function addFromSetImmediateArguments(args) { + tasksByHandle[nextHandle] = partiallyApplied.apply(undefined, args); + return nextHandle++; + } + + // This function accepts the same arguments as setImmediate, but + // returns a function that requires no arguments. + function partiallyApplied(handler) { + var args = [].slice.call(arguments, 1); + return function() { + if (typeof handler === "function") { + handler.apply(undefined, args); + } else { + (new Function("" + handler))(); + } + }; + } + + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(partiallyApplied(runIfPresent, handle), 0); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + task(); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + + function installNextTickImplementation() { + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + process.nextTick(partiallyApplied(runIfPresent, handle)); + return handle; + }; + } + + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages + + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } + + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + global.postMessage(messagePrefix + handle, "*"); + return handle; + }; + } + + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + channel.port2.postMessage(handle); + return handle; + }; + } + + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + // Create a